PageSourceSearch

https://minasidor.k2a.se/355.0bea9c42fb9c0871.js

js k2a.se collected 2026-09-24 20:00:07 UTC 321,204 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunktaiga=self.webpackChunktaiga||[]).push([[355],{1580:(lr,Je,S)=>{S.d(Je,{E:()=>Hn});var Zt=S(1360),zn=S(5850);let Hn=(()=>{class jt{constructor(J){this.requestService=J}saveBlob(J,ct){const Tt=new Blob([J],{type:ct});if(window.navigator&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(Tt);else{const te=window.URL.createObjectURL(Tt);window.open(te,"_blank"),setTimeout(()=>{window.URL.revokeObjectURL(te)},100)}}saveBlobWithFilename(J,ct){const Tt=ct.split(".").pop(),te=this.getMimeType(Tt),Ke=new Blob([J],{type:te});if(window.navigator&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(Ke,ct);else{const o=window.URL.createObjectURL(Ke),U=document.createElement("a");typeof U.download>"u"?window.open(o,"_blank"):(U.href=o,U.download=ct,document.body.appendChild(U),U.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))),setTimeout(()=>{window.URL.revokeObjectURL(o),U&&U.remove()},100)}}getMimeType(J){switch(J=J.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(J){switch(J){case"application/pdf":case"image/jpeg":case"image/png":case"image/bmp":case"image/gif":return!0;default:return!1}}getValidImageMediaType(J){switch(J){case"image/jpeg":case"image/png":case"image/bmp":case"image/gif":return!0;default:return!1}}getBlobFromUrl(J){return this.requestService.getBlobFromUrl(J)}static{this.\u0275fac=function(ct){return new(ct||jt)(Zt.KVO(zn.B))}}static{this.\u0275prov=Zt.jDH({token:jt,factory:jt.\u0275fac,providedIn:"root"})}}return jt})()},4355:(lr,Je,S)=>{S.r(Je),S.d(Je,{ContractModule:()=>L1});var Zt=S(1630),zn=S(7468),Hn=S(2806),jt=S(7002),Ki=S(1397),J=S(4058),ct=S(9437),Tt=S(44),te=S(8056),Ke=S(3723),o=S(1360),U=S(2155),Lt=S(2043),cr=S(6354),Yn=S(5850);let dr=(()=>{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,cr.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)(o.KVO(Yn.B))}}static{this.\u0275prov=o.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var hr=S(9015),ur=S(6844),fr=S(7033),Qe=S(666);let pr=(()=>{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)(o.KVO(Yn.B))}}static{this.\u0275prov=o.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Qi=(()=>{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)(o.KVO(Yn.B))}}static{this.\u0275prov=o.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var gr=S(3687),mr=S(1715),K=S(8018),Nt=S(56),Wn=S(1580),_r=S(2304),br=S(345),qi=S(5565),yr=S(4959);const xr=e=>({startTag:'<span class="mat-body-strong">',endTag:"</span>",amount:e});function vr(e,n){if(1&e){const t=o.RV6();o.j41(0,"taiga-quick-actions",15),o.bIt("featureClicked",function(s){o.eBV(t);const a=o.XpG(3);return o.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 Cr(e,n){if(1&e&&(o.qex(0),o.nrm(1,"mat-divider",9),o.j41(2,"h2",10),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.DNE(5,vr,1,2,"taiga-quick-actions",14),o.bVm()),2&e){const t=o.XpG(2);o.R7$(3),o.JRh(o.bMT(4,2,"QUICKACTIONS")),o.R7$(2),o.Y8G("ngIf",t.featureList)}}function Mr(e,n){if(1&e&&(o.j41(0,"div",19),o.nrm(1,"taiga-maintenance-table",20),o.k0s()),2&e){const t=n.$implicit,i=o.XpG(3);o.R7$(),o.Y8G("maintenance",t)("isMobile",i.mediaQueryService.isMobile())}}function Sr(e,n){if(1&e&&(o.j41(0,"div"),o.nrm(1,"mat-divider",9),o.j41(2,"h2",10),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.j41(5,"p",16),o.EFF(6),o.nI1(7,"translate"),o.k0s(),o.j41(8,"mat-accordion")(9,"mat-expansion-panel")(10,"mat-expansion-panel-header")(11,"mat-panel-title",17),o.EFF(12),o.nI1(13,"translate"),o.nI1(14,"lowercase"),o.k0s()(),o.DNE(15,Mr,2,2,"div",18),o.k0s()()()),2&e){const t=o.XpG(2);o.R7$(3),o.JRh(o.bMT(4,5,"MAINTENANCE")),o.R7$(3),o.JRh(o.bMT(7,7,"MAINTENANCEHELP")),o.R7$(6),o.Lme(" ",t.maintenanceList.length," ",o.bMT(14,11,o.bMT(13,9,"SPACES"))," "),o.R7$(3),o.Y8G("ngForOf",t.maintenanceList)}}function Or(e,n){if(1&e&&(o.j41(0,"div",22)(1,"div",23)(2,"mat-icon",24),o.EFF(3,"info"),o.k0s()(),o.j41(4,"div"),o.nrm(5,"taiga-markdown",5),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,xr,t.totalDiscountString)))}}function kr(e,n){if(1&e){const t=o.RV6();o.j41(0,"div")(1,"mat-card")(2,"taiga-hlu-legacy-shopping-cart",25),o.bIt("itemClicked",function(s){o.eBV(t);const a=o.XpG(4);return o.Njj(a.deleteoShoppingCart(s))}),o.k0s()(),o.nrm(3,"mat-divider",9),o.k0s()}if(2&e){const t=o.XpG(4);o.R7$(2),o.Y8G("items",t.hluOrder)("contractId",t.contract.id)}}function Tr(e,n){if(1&e&&(o.qex(0),o.nrm(1,"mat-divider",9),o.j41(2,"h2",10),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.DNE(5,Or,7,6,"div",21)(6,kr,4,2,"div",13),o.bVm()),2&e){const t=o.XpG(3);o.R7$(3),o.JRh(o.bMT(4,3,"TENANTCONTROLLEDMAINTENANCE")),o.R7$(2),o.Y8G("ngIf",t.totalDiscountString),o.R7$(),o.Y8G("ngIf",(null==t.hluOrder?null:t.hluOrder.length)>0)}}function Rr(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",26),o.EFF(4),o.k0s()(),o.j41(5,"taiga-hlu-legacy",27),o.bIt("itemClicked",function(s){o.eBV(t);const a=o.XpG(3);return o.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 Ir(e,n){if(1&e&&(o.qex(0),o.nrm(1,"mat-divider",9),o.j41(2,"h2",10),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.j41(5,"mat-accordion")(6,"mat-expansion-panel")(7,"mat-expansion-panel-header")(8,"mat-panel-title",28),o.EFF(9),o.k0s()(),o.nrm(10,"taiga-hlu-legacy",29),o.k0s()(),o.bVm()),2&e){const t=o.XpG(3);o.R7$(3),o.JRh(o.bMT(4,4,"ORDEREDMAINTENANCE")),o.R7$(6),o.SpI(" ",t.allreadyOrdered.length," st "),o.R7$(),o.Y8G("maintenanceStatusResult",t.allreadyOrdered)("isAllreadyOrdered",!0)}}function Pr(e,n){if(1&e&&(o.j41(0,"div"),o.DNE(1,Tr,7,5,"ng-container",13)(2,Rr,6,2,"mat-accordion",13)(3,Ir,11,6,"ng-container",13),o.k0s()),2&e){const t=o.XpG(2);o.R7$(),o.Y8G("ngIf",(null==t.canBeOrdered?null:t.canBeOrdered.length)>0||(null==t.hluOrder?null:t.hluOrder.length)>0),o.R7$(),o.Y8G("ngIf",(null==t.canBeOrdered?null:t.canBeOrdered.length)>0),o.R7$(),o.Y8G("ngIf",(null==t.allreadyOrdered?null:t.allreadyOrdered.length)>0)}}function Er(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 Fr(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 Ar(e,n){1&e&&(o.qex(0),o.EFF(1,", "),o.bVm())}function Dr(e,n){if(1&e&&(o.qex(0),o.EFF(1),o.DNE(2,Ar,2,0,"ng-container",13),o.bVm()),2&e){const t=n.$implicit,i=n.index,s=o.XpG(2).$implicit;o.R7$(),o.JRh(t.displayName),o.R7$(),o.Y8G("ngIf",(null==s.keys?null:s.keys.length)>1&&i!==(null==s.keys?null:s.keys.length)-1&&t.displayName)}}function wr(e,n){if(1&e&&(o.qex(0),o.DNE(1,Dr,3,2,"ng-container",40),o.bVm()),2&e){const t=o.XpG().$implicit;o.R7$(),o.Y8G("ngForOf",t.keys)}}function jr(e,n){1&e&&o.EFF(0,"-")}function Lr(e,n){if(1&e){const t=o.RV6();o.j41(0,"button",41),o.nI1(1,"translate"),o.bIt("click",function(){o.eBV(t);const s=o.XpG().$implicit,a=o.XpG(3);return o.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 Nr(e,n){if(1&e&&(o.j41(0,"div",32)(1,"h3",33),o.EFF(2),o.k0s(),o.j41(3,"div",34),o.EFF(4),o.nI1(5,"translate"),o.k0s(),o.j41(6,"div",35),o.EFF(7),o.nI1(8,"translate"),o.k0s(),o.j41(9,"div",36),o.EFF(10),o.nI1(11,"translate"),o.DNE(12,wr,2,1,"ng-container",37)(13,jr,1,0,"ng-template",null,0,o.C5r),o.k0s(),o.j41(15,"div",38),o.EFF(16),o.nI1(17,"translate"),o.DNE(18,Lr,4,3,"button",39),o.k0s()()),2&e){const t=n.$implicit,i=o.sdS(14),s=o.XpG(3);o.R7$(2),o.JRh(t.displayNameTypeOfChange),o.R7$(2),o.Lme("",o.bMT(5,11,"KEYTYPE"),": ",t.displayName,""),o.R7$(3),o.Lme("",o.bMT(8,13,"NUMBER"),": ",t.number,""),o.R7$(3),o.SpI(" ",o.bMT(11,15,"MARKING"),": "),o.R7$(2),o.Y8G("ngIf",s.hasDisplayNameKeys(t.keys))("ngIfElse",i),o.R7$(4),o.Lme(" ",o.bMT(17,17,"QUANTITY"),": ",t.count," "),o.R7$(2),o.Y8G("ngIf",null==t||null==t.report?null:t.report.mimeType)}}function $r(e,n){if(1&e&&(o.j41(0,"div"),o.nrm(1,"mat-divider",9),o.j41(2,"h2",10),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.j41(5,"p",16),o.EFF(6),o.nI1(7,"translate"),o.k0s(),o.j41(8,"mat-accordion")(9,"mat-expansion-panel",30)(10,"mat-expansion-panel-header")(11,"mat-panel-title",28),o.DNE(12,Er,4,6,"div",13)(13,Fr,4,6,"div",13),o.k0s()(),o.DNE(14,Nr,19,19,"div",31),o.k0s()()()),2&e){const t=o.XpG(2);o.R7$(3),o.JRh(o.bMT(4,5,"KEYS")),o.R7$(3),o.JRh(o.bMT(7,7,"KEYSHELP")),o.R7$(6),o.Y8G("ngIf",1===t.contractsItemKeySerieItem.count),o.R7$(),o.Y8G("ngIf",1!==t.contractsItemKeySerieItem.count),o.R7$(),o.Y8G("ngForOf",t.contractsItemKeySerieItem.keySeries)}}function Br(e,n){if(1&e&&(o.j41(0,"div",49),o.nrm(1,"taiga-consumption-widget",50),o.k0s()),2&e){const t=n.$implicit;o.XpG();const i=o.sdS(10),s=o.XpG(2);o.R7$(),o.Y8G("chartType",i.value)("anlaggning",t)("isMobile",s.mediaQueryService.isMobile())}}function Gr(e,n){if(1&e&&(o.j41(0,"div"),o.nrm(1,"mat-divider",9),o.j41(2,"div",42)(3,"div")(4,"h2",10),o.EFF(5),o.nI1(6,"translate"),o.k0s(),o.nrm(7,"taiga-markdown",5),o.nI1(8,"translate"),o.k0s(),o.j41(9,"mat-button-toggle-group",43,1)(11,"mat-button-toggle",44),o.EFF(12),o.nI1(13,"translate"),o.k0s(),o.j41(14,"mat-button-toggle",45),o.EFF(1
15),o.nI1(16,"translate"),o.k0s()()(),o.j41(17,"mat-accordion")(18,"mat-expansion-panel",46),o.nI1(19,"translate"),o.nI1(20,"lowercase"),o.nI1(21,"translate"),o.j41(22,"mat-expansion-panel-header")(23,"mat-panel-title",47),o.EFF(24),o.nI1(25,"translate"),o.nI1(26,"lowercase"),o.k0s()(),o.DNE(27,Br,2,3,"div",48),o.k0s()()()),2&e){const t=o.XpG(2);o.R7$(5),o.JRh(o.bMT(6,10,"CONSUMPTION")),o.R7$(2),o.Y8G("markdown",o.bMT(8,12,"CONSUMPTIONHELP")),o.R7$(2),o.Y8G("value",t.chartType),o.R7$(3),o.JRh(o.bMT(13,14,"BAR")),o.R7$(3),o.JRh(o.bMT(16,16,"LINE")),o.R7$(3),o.FS9("eventLabel",o.bMT(20,20,o.bMT(19,18,"METERGROUPS"))),o.FS9("eventCategory",o.bMT(21,22,"CONSUMPTION")),o.R7$(6),o.Lme(" ",t.anlaggningar.length," ",o.bMT(26,26,o.bMT(25,24,"METERGROUPS"))," "),o.R7$(3),o.Y8G("ngForOf",t.anlaggningar)}}function Vr(e,n){if(1&e&&(o.j41(0,"div"),o.nrm(1,"mat-divider",9),o.j41(2,"h2",10),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.j41(5,"mat-accordion")(6,"mat-expansion-panel",51)(7,"mat-expansion-panel-header")(8,"mat-panel-title",52),o.EFF(9),o.nI1(10,"translate"),o.nI1(11,"lowercase"),o.k0s()(),o.nrm(12,"taiga-inspection",53),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 zr(e,n){if(1&e&&(o.j41(0,"div",3)(1,"div")(2,"h1",4),o.EFF(3),o.k0s(),o.nrm(4,"taiga-markdown",5),o.nI1(5,"translate"),o.k0s(),o.j41(6,"div",6)(7,"div",7)(8,"div",8),o.nrm(9,"mat-divider",9),o.j41(10,"h2",10),o.EFF(11),o.k0s(),o.nrm(12,"taiga-object-widget",11),o.k0s(),o.j41(13,"div",12),o.DNE(14,Cr,6,4,"ng-container",13),o.k0s()()(),o.DNE(15,Sr,16,13,"div",13)(16,Pr,4,3,"div",13)(17,$r,15,9,"div",13)(18,Gr,28,28,"div",13)(19,Vr,13,10,"div",13),o.k0s()),2&e){const t=o.XpG();o.AVh("is-mobile",t.mediaQueryService.isMobile())("is-desktop",!t.mediaQueryService.isMobile()),o.R7$(3),o.JRh(null==t.contract.primaryObject?null:t.contract.primaryObject.location.address.address),o.R7$(),o.Y8G("markdown",o.bMT(5,16,"WELCOMEHELP")),o.R7$(7),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.Y8G("ngIf",t.featureList&&t.featureList.length>0),o.R7$(),o.Y8G("ngIf",t.maintenanceList&&t.maintenanceList.length>0),o.R7$(),o.Y8G("ngIf",t.myPagesResult&&(null==t.myPagesResult.Result?null:t.myPagesResult.Result.length)>0),o.R7$(),o.Y8G("ngIf",t.contractsItemKeySerieItem&&(null==t.contractsItemKeySerieItem.keySeries?null:t.contractsItemKeySerieItem.keySeries.length)>0),o.R7$(),o.Y8G("ngIf",t.anlaggningar),o.R7$(),o.Y8G("ngIf",t.errandsInspections&&(null==t.errandsInspections.items?null:t.errandsInspections.items.length)>0)}}let Zi=(()=>{class e{constructor(t,i,s,a,r,l,c,d,h,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=d,this.maintenanceService=h,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,zn.p)({bookingObjectsObjectType:this.laundryBookingService.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,Hn.H)(s).pipe((0,jt.$)(a=>a.Avser.split(" / ")[1]),(0,Ki.Z)(a=>a.pipe((0,J.$)()))).subscribe(a=>{this.maintenanceList.push({Utrymme:a[0].Avser.split(" / ")[1],Underh\u00e5ll:a})})}),i.clientConfigurationFeatures?.inspections?.enabled&&this.inspectionService.getErrandsInspections([this.route.
1snapshot.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===Zt.l.ErrorReport?this.openErrorReportSheet():t.type===Zt.l.LaundryBooking?this.openLaundryBooking(t):t.type===Zt.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(te.o,{data:t,panelClass:"custom-rightsheet",scrollStrategy:new Tt.N,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 Tt.N})}):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(U.nX),o.rXU(Lt.M),o.rXU(dr),o.rXU(U.Ix),o.rXU(hr.Y),o.rXU(ur.w),o.rXU(fr.m),o.rXU(Qe.t),o.rXU(pr),o.rXU(Qi),o.rXU(gr.c9),o.rXU(mr.Q),o.rXU(K.c$),o.rXU(Nt.y),o.rXU(Wn.E),o.rXU(_r.I),o.rXU(br.hE),o.rXU(qi.j),o.rXU(yr.m))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-contract-home"]],standalone:!1,decls:1,vars:1,consts:[["hyphen",""],["group","matButtonToggleGroup"],["class","page",3,"is-mobile","is-desktop",4,"ngIf"],[1,"page"],[1,"large-header","header-text"],[3,"markdown"],[1,"body-content"],[1,"row"],[1,"column","left-column"],[1,"divider"],[1,"mat-h2","header-text"],[3,"object","contractId"],[1,"column"],[4,"ngIf"],[3,"initialCount","featureList","featureClicked",4,"ngIf"],[3,"featureClicked","initialCount","featureList"],[1,"help-text"],["data-mom-test","MyPages_Agreement_Maintenance",2,"font-size","1.125rem"],["class","maintenance",4,"ngFor","ngForOf"],[1,"maintenance"],[3,"maintenance","isMobile"],["class","totalDiscount",4,"ngIf"],[1,"totalDiscount"],[1,"icon-wrapper"],["color","primary",2,"margin-right","10px"],[3,"itemClicked","items","contractId"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance",2,"font-size","1.125rem"],[3,"itemClicked","maintenanceStatusResult"],[2,"font-size","1.125rem"],[3,"maintenanceStatusResult","isAllreadyOrdered"],["data-mom-test","MinaSidor_Avtal_Nycklar\xd6versiktMedPil"],["class","key-serie",4,"ngFor","ngForOf"],[1,"key-serie"],["data-mom-test","MinaSidor_Avtal_NycklarNyckelkvittenstyp",1,"mat-h3",2,"margin","0"],["data-mom-test","MinaSidor_Avtal_NycklarNyckeltyp"],["data-mom-test","MinaSidor_Avtal_NycklarNummer"],["data-mom-test","MinaSidor_Avtal_NycklarM\xe4rkning"],[4,"ngIf","ngIfElse"],["data-mom-test","MinaSidor_Avtal_NycklarAntal",2,"display","flex","justify-content","space-between"],["mat-icon-button","","color","primary","data-mom-test","MinaSidor_Avtal_NycklarPDF",3,"click",4,"ngIf"],[4,"ngFor","ngForOf"],["mat-icon-button","","color","primary","data-mom-test","MinaSidor_Avtal_NycklarPDF",3,"click"],[1,"header"],[1,"slim-toggle",3,"value"],["value","bar"],["value","line"],["taigaEventTracker","",3,"eventLabel","eventCategory"],["data-mom-test","MyPages_Agreement_Consumption",2,"font-size","1.125rem"],["style","padding-bottom: 10px;",4,"ngFor","ngForOf"],[2,"padding-bottom","10px"],[3,"chartType","anlaggning","isMobile"],["data-mom-test","MinaSidor_Avtal_Besiktning\xd6versiktMedPil"],["data-mom-test","MyPages_Agreement_Inspections",2,"font-size","1.125rem"],[3,"errandsInspections"]],template:function(i,s){1&i&&o.DNE(0,zr,20,18,"div",2),2&i&&o.Y8G("ngIf",s.contract)},styles:[".large-header[_ngcontent-%COMP%]{font-size:1.875rem}.page[_ngcontent-%COMP%]{display:block}.is-desktop[_ngcontent-%COMP%]{padding:30px}.is-mobile[_ngcontent-%COMP%]{padding:20px}.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:30px}.is-desktop[_ngcontent-%COMP%]   .left-column[_ngcontent-%COMP%]{flex:2;margin-right:20px}@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}mat-button-toggle-group[_ngcontent-%COMP%]{height:32px}.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 Hr=S(5974),Yr=S(7586),ut=S.n(Yr),Un=S(7052),Wr=S(8709),Ur=S(6090),_e=S(5207),ts=S(5665),be=S(9213),ee=S(8834),dt=S(5596),z=S(2881);const es=(e,n)=>[e,n];function Xr(e,n){if(1&e&&o.nrm(0,"taiga-pill-badge",15),2&e){const t=o.XpG(2);o.Y8G("text",t.getStatusText(t.object.status,t.object.notice))}}function Jr(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 Kr(e,n){if(1&e&&(o.j41(0,"div")(1,"div",4),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",16),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.JRh(null==t.object||null==t.object.primaryObject||null==t.object.primaryObject.identity?null:t.object.primaryObject.identity.officialNumber)}}function Qr(e,n){if(1&e&&(o.j41(0,"div")(1,"div",4),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,"CONTRACTPERIODTO")),o.R7$(3),o.JRh(t.formatDate(null==t.object||null==t.object.status?null:t.object.status.endDate))}}function qr(e,n){1&e&&(o.j41(0,"mat-icon"),o.EFF(1,"picture_as_pdf"),o.k0s())}function Zr(e,n){1&e&&(o.j41(0,"mat-icon"),o.EFF(1,"picture_as_pdf"),o.k0s())}function tl(e,n){1&e&&(o.j41(0,"mat-icon"),o.EFF(1,"attachment"),o.k0s())}function el(e,n){if(1&e){const t=o.RV6();o.qex(0)(1,20),o.j41(2,"button",21),o.nI1(3,"translate"),o.bIt("click",function(){const s=o.eBV(t).$implicit,a=o.XpG(3);return o.Njj(a.getContractsItemFloorPlansItem(s.floorPlanId,s.displayName))}
1),o.DNE(4,qr,2,0,"mat-icon",22)(5,Zr,2,0,"mat-icon",22)(6,tl,2,0,"mat-icon",23),o.EFF(7),o.nI1(8,"translate"),o.k0s(),o.bVm()()}if(2&e){const t=n.$implicit,i=n.index;o.R7$(),o.Y8G("ngSwitch",!0),o.R7$(),o.BMQ("aria-label",o.bMT(3,6,"DOWNLOADFLOORPLANASPDF")),o.R7$(2),o.Y8G("ngSwitchCase","application/pdf"===t.mediaType),o.R7$(),o.Y8G("ngSwitchCase","image/jpeg"===t.mediaType||"image/bmp"===t.mediaType||"image/png"===t.mediaType||"image/gif"===t.mediaType),o.R7$(2),o.Lme(" ",o.bMT(8,8,"FLOORPLAN")," ",0===i?"":i+1," ")}}function nl(e,n){if(1&e&&(o.qex(0),o.j41(1,"div",18),o.DNE(2,el,9,10,"ng-container",19),o.k0s(),o.bVm()),2&e){const t=o.XpG(2);o.R7$(2),o.Y8G("ngForOf",t.contractsItemFloorPlans.items)}}function il(e,n){if(1&e){const t=o.RV6();o.j41(0,"div",24)(1,"button",25),o.nI1(2,"translate"),o.bIt("click",function(){o.eBV(t);const s=o.XpG(2);return o.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 sl(e,n){if(1&e&&(o.j41(0,"div",26)(1,"button",27),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,es,t.noticeLink,t._contractId)),o.R7$(),o.JRh(o.bMT(3,2,"TERMINATECONTRACT"))}}function ol(e,n){if(1&e){const t=o.RV6();o.qex(0),o.j41(1,"div",28)(2,"p"),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.j41(5,"button",29),o.EFF(6),o.nI1(7,"translate"),o.k0s(),o.j41(8,"button",30),o.bIt("click",function(){o.eBV(t);const s=o.XpG(2);return o.Njj(s.deleteContractsItemNotice())}),o.EFF(9),o.nI1(10,"translate"),o.k0s()(),o.bVm()}if(2&e){const t=o.XpG(2);o.R7$(3),o.JRh(o.bMT(4,4,"PENDINGSIGNING")),o.R7$(2),o.Y8G("routerLink",o.l_i(10,es,t.signingsLink,t.signingId)),o.R7$(),o.JRh(o.bMT(7,6,"SIGN")),o.R7$(3),o.JRh(o.bMT(10,8,"CANCELTERMINATION"))}}function al(e,n){if(1&e&&(o.qex(0),o.j41(1,"div",1),o.DNE(2,Xr,1,1,"taiga-pill-badge",2),o.k0s(),o.j41(3,"div",3)(4,"div")(5,"div",4),o.EFF(6),o.nI1(7,"translate"),o.k0s(),o.j41(8,"div",5),o.EFF(9),o.k0s(),o.j41(10,"div",6),o.EFF(11),o.k0s()(),o.j41(12,"div")(13,"div",4),o.EFF(14),o.nI1(15,"translate"),o.k0s(),o.j41(16,"div",7),o.EFF(17),o.k0s(),o.j41(18,"div",8),o.EFF(19),o.k0s()(),o.j41(20,"div")(21,"div",4),o.EFF(22),o.nI1(23,"translate"),o.k0s(),o.j41(24,"div",9),o.EFF(25),o.k0s()(),o.j41(26,"div")(27,"div",4),o.EFF(28),o.nI1(29,"translate"),o.k0s(),o.j41(30,"div",10),o.EFF(31),o.DNE(32,Jr,4,6,"span",0),o.k0s()(),o.DNE(33,Kr,6,4,"div",0),o.j41(34,"div")(35,"div",4),o.EFF(36),o.nI1(37,"translate"),o.k0s(),o.j41(38,"div",11),o.EFF(39),o.k0s()(),o.DNE(40,Qr,6,4,"div",0),o.j41(41,"div")(42,"div",4),o.EFF(43),o.nI1(44,"translate"),o.k0s(),o.j41(45,"div",12),o.EFF(46),o.k0s()()(),o.DNE(47,nl,3,1,"ng-container",0)(48,il,7,6,"div",13)(49,sl,4,7,"div",14)(50,ol,11,13,"ng-container",0),o.bVm()),2&e){const t=o.XpG();o.R7$(2),o.Y8G("ngIf",t.getStatusText(t.object.status,t.object.notice)),o.R7$(4),o.JRh(o.bMT(7,23,"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,25,"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,27,"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,29,"RENT")),o.R7$(3),o.SpI("",t.formatNumber(null==t.object||null==t.object.pricing?null:t.object.pricing.price,0)," "),o.R7$(),o.Y8G("ngIf",null==t.object||null==t.object.pricing?null:t.object.pricing.price),o.R7$(),o.Y8G("ngIf",null==t.object||null==t.object.primaryObject||null==t.object.primaryObject.identity?null:t.object.primaryObject.identity.officialNumber),o.R7$(3),o.JRh(o.bMT(37,31,"CONTRACTPERIODFROM")),o.R7$(3),o.JRh(t.formatDate(null==t.object||null==t.object.status?null:t.object.status.startDate)),o.R7$(),o.Y8G("ngIf",null==t.object||null==t.object.status?null:t.object.status.endDate),o.R7$(3),o.JRh(o.bMT(44,33,"NOTICEPERIOD")),o.R7$(3),o.JRh(null==t.object||null==t.object.notice?null:t.object.notice.tenantPerio
1dDescription),o.R7$(),o.Y8G("ngIf",(null==t.contractsItemFloorPlans||null==t.contractsItemFloorPlans.items?null:t.contractsItemFloorPlans.items.length)>0),o.R7$(),o.Y8G("ngIf",null==t.object?null:t.object.report),o.R7$(),o.Y8G("ngIf",t.allowDigitalNotice),o.R7$(),o.Y8G("ngIf",t.signingId&&!(null!=t.object&&null!=t.object.notice&&t.object.notice.dateOfNotice))}}let rl=(()=>{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=Un.i.NOTICE,this.signingsLink=Un.t.SIGNINGS}formatDate(t){return ut()(t).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"):"-"}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(Wr.w,{data:{heading:null,text:this.translate.instant("CONFIRMREMOVENOTICE"),dialogChoices:Ur.$.YesNo},scrollStrategy:new Tt.N,ariaLabel:this.translate.instant("CONFIRMREMOVENOTICE")}).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(Nt.y),o.rXU(Wn.E),o.rXU(qi.j),o.rXU(Qe.t),o.rXU(Lt.M))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-object-widget"]],inputs:{contractId:"contractId",object:"object"},standalone:!1,decls:2,vars:3,consts:[[4,"ngIf"],[1,"badge-container"],["class","badge-info","data-mom-test","MinaSidor_Avtal_Status",3,"text",4,"ngIf"],[1,"grid","object-info"],[1,"label"],["data-mom-test","MinaSidor_Avtal_Gatuadress"],["data-mom-test","MyPages_Agreement_PostCodeAndCity"],["data-mom-test","MyPages_Agreement_ObjectArea"],["data-mom-test","MyPages_Agreement_ObjectRooms"],["data-mom-test","MinaSidor_Avtal_Objektnummer"],["data-mom-test","MyPages_Agreement_ObjectPrice"],["data-mom-test","MyPages_Agreement_AgreementPeriodFrom"],["data-mom-test","MyPages_Agreement_NoticePeriod"],["class","report-button-container",4,"ngIf"],["class","notice-button-container",4,"ngIf"],["data-mom-test","MinaSidor_Avtal_Status",1,"badge-info",3,"text"],["data-mom-test","MyPages_Agreement_OfficialNumber"],["data-mom-test","MyPages_Agreement_AgreementPeriodTo"],[1,"floor-plan-buttons-container"],[4,"ngFor","ngForOf"],[3,"ngSwitch"],["mat-raised-button","","color","primary","data-mom-test","MyPages_Agreement_FloorPlan",1,"floor-plan-button",3,"click"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"report-button-container"],["mat-raised-button","","color","primary",3,"click"],[1,"notice-button-container"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_Avtal_StartaUpps\xe4gningsprocess",3,"routerLink"],[1,"signing-button-container"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_Avtal_G\xe5TillSigneraUpps\xe4gning",1,"sign-notice-button",3,"routerLink"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_Avtal_AvbrytUpps\xe4gning",1,"delete-notice-button",3,"click"]],template:function(i,s){1&i&&(o.j41(0,"mat-card"),o.DNE(1,al,51,35,"ng-container",0),o.k0s()),2&i&&(o.AVh("is-mobile",s.mediaQueryService.isMobile()),o.R7$(),o.Y8G("ngIf",s.object))},dependencies:[_e.Wk,ts.Y,be.An,ee.$z,dt.RN,z.Sq,z.bT,z.ux,z.e1,z.fG,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%}']})}}return e})();function ne(e){return e+.5|0}const bt=(e,n,t)=>Math.max(Math.min(e,t),n);function ye(e){return bt(ne(2.55*e),0,255)}function Rt(e){return bt(ne(255*e),0,255)}function yt(e){return bt(ne(e/2.55)/100,0,1)}function ns(e){return bt(ne(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},Xn=[..."0123456789ABCDEF"],ll=e=>Xn[15&e],cl=e=>Xn[(240&e)>>4]+Xn[15&e],qe=e=>(240&e)>>4==(15&e);
vendor: 4,294 bytes, line 1
1const pl=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function is(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 gl(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 ml(e,n,t){const i=is(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 Jn(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,d,h;return a!==r&&(h=a-r,d=l>.5?h/(2-a-r):h/(a+r),c=function _l(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}(t,i,s,h,a),c=60*c+.5),[0|c,d||0,l]}function Kn(e,n,t,i){return(Array.isArray(n)?e(n[0],n[1],n[2]):e(n,t,i)).map(Rt)}function Qn(e,n,t){return Kn(is,e,n,t)}function ss(e){return(e%360+360)%360}const os={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"},as={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 Ol=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,qn=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,ie=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function tn(e,n,t){if(e){let i=Jn(e);i[n]=Math.max(0,Math.min(i[n]+i[n]*t,0===n?360:1)),i=Qn(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function rs(e,n){return e&&Object.assign(n||{},e)}function ls(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=Rt(e[3]))):(n=rs(e,{r:0,g:0,b:0,a:1})).a=Rt(n.a),n}function Il(e){return"r"===e.charAt(0)?function kl(e){const n=Ol.exec(e);let i,s,a,t=255;if(n){if(n[7]!==i){const r=+n[7];t=n[8]?ye(r):bt(255*r,0,255)}return i=+n[1],s=+n[3],a=+n[5],i=255&(n[2]?ye(i):bt(i,0,255)),s=255&(n[4]?ye(s):bt(s,0,255)),a=255&(n[6]?ye(a):bt(a,0,255)),{r:i,g:s,b:
1a,a:t}}}(e):function xl(e){const n=pl.exec(e);let i,t=255;if(!n)return;n[5]!==i&&(t=n[6]?ye(+n[5]):Rt(+n[5]));const s=ss(+n[2]),a=+n[3]/100,r=+n[4]/100;return i="hwb"===n[1]?function bl(e,n,t){return Kn(ml,e,n,t)}(s,a,r):"hsv"===n[1]?function yl(e,n,t){return Kn(gl,e,n,t)}(s,a,r):Qn(s,a,r),{r:i[0],g:i[1],b:i[2],a:t}}(e)}class se{constructor(n){if(n instanceof se)return n;const t=typeof n;let i;"object"===t?i=ls(n):"string"===t&&(i=function hl(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]]:255})),t}(n)||function Sl(e){Ze||(Ze=function Ml(){const e={},n=Object.keys(as),t=Object.keys(os);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,os[a]);a=parseInt(as[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)||Il(n)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var n=rs(this._rgb);return n&&(n.a=yt(n.a)),n}set rgb(n){this._rgb=ls(n)}rgbString(){return this._valid?function Tl(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 fl(e){var n=(e=>qe(e.r)&&qe(e.g)&&qe(e.b)&&qe(e.a))(e)?ll:cl;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 Cl(e){if(!e)return;const n=Jn(e),t=n[0],i=ns(n[1]),s=ns(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,d=((l*c==-1?l:(l+c)/(1+l*c))+1)/2;a=1-d,i.r=255&d*i.r+a*s.r+.5,i.g=255&d*i.g+a*s.g+.5,i.b=255&d*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 Rl(e,n,t){const i=ie(yt(e.r)),s=ie(yt(e.g)),a=ie(yt(e.b));return{r:Rt(qn(i+t*(ie(yt(n.r))-i))),g:Rt(qn(s+t*(ie(yt(n.g))-s))),b:Rt(qn(a+t*(ie(yt(n.b))-a))),a:e.a+t*(n.a-e.a)}}(this._rgb,n._rgb,t)),this}clone(){return new se(this.rgb)}alpha(n){return this._rgb.a=Rt(n),this}clearer(n){return this._rgb.a*=1-n,this}greyscale(){const n=this._rgb,t=ne(.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 tn(this._rgb,2,n),this}darken(n){return tn(this._rgb,2,-n),this}saturate(n){return tn(this._rgb,1,n),this}desaturate(n){return tn(this._rgb,1,-n),this}rotate(n){return function vl(e,n){var t=Jn(e);t[0]=ss(t[0]+n),t=Qn(t),e.r=t[0],e.g=t[1],e.b=t[2]}(this._rgb,n),this}}function xt(){}const Pl=(()=>{let e=0;return()=>e++})();function E(e){return null==e}function $(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 F(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function H(e){return("number"==typeof e||e instanceof Number)&&isFinite(+e)}function rt(e,n){return H(e)?e:n}function R(e,n){return typeof e>"u"?n:e}const cs=(e,n)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100*n:+e;function L(e,n,t){if(e&&"function"==typeof e.call)return e.apply(t,n)}function w(e,n,t,i){let s,a,r;if($(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(F(e))for(r=Object.keys(e),a=r.length,s=0;s<a;s++)n.call(t,e[r[s]],r[s])}function en(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 nn(e){if($(e))return e.map(nn);if(F(e)){const n=Object.create(null),t=Object.keys(e),i=t.length;let s=0;for(;s<i;++s)n[t[s]]=nn(e[t[s]]);return n}return e}function ds(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function Fl(e,n,t,i){if(!ds(e))return;const s=n[e],a=t[e];F(s)&&F(a)?xe(s,a,i):n[e]=nn(a)}function xe(e,n,t){const i=$(n)?n:[n],s=i.length;if(!F(e))return e;const a=(t=t||{}).merger||Fl;let r;for(let l=0;l<s;++l){if(r=i[l],!F(r))continue;const c=Object.keys(r);for(let d=0,h=c.length;d<h;++d)a(c[d],e,r,t)}return e}function ve(e,n){return xe(e,n,{merger:Al})}function Al(e,n,t){if(!ds(e))return;const i=n[e],s=t[e];F(i)&&F(s)?ve(i,s):Object.prototype.hasOwnProperty.call(n,e)||(n[e]=nn(s))}const hs={"":e=>e,x:e=>e.x,y:e=>e.y};
1function It(e,n){return(hs[n]||(hs[n]=function wl(e){const n=function Dl(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 Zn(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ce=e=>typeof e<"u",Pt=e=>"function"==typeof e,us=(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,B=2*D,Ll=B+D,sn=Number.POSITIVE_INFINITY,Nl=D/180,Y=D/2,$t=D/4,fs=2*D/3,Et=Math.log10,gt=Math.sign;function Me(e,n,t){return Math.abs(e-n)<t}function ps(e){const n=Math.round(e);e=Me(e,n,e/1e3)?n:e;const t=Math.pow(10,Math.floor(Et(e))),i=e/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function oe(e){return!function Bl(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 gs(e,n,t){let i,s,a;for(i=0,s=e.length;i<s;i++)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 ti(e){return e*(180/D)}function ms(e){if(!H(e))return;let n=1,t=0;for(;Math.round(e*n)/n!==e;)n*=10,t++;return t}function _s(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+=B),{angle:a,distance:s}}function ei(e,n){return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}function Vl(e,n){return(e-n+Ll)%B-D}function tt(e){return(e%B+B)%B}function Se(e,n,t,i){const s=tt(e),a=tt(n),r=tt(t),l=tt(a-s),c=tt(r-s),d=tt(s-a),h=tt(s-r);return s===a||s===r||i&&a===r||l>c&&d<h}function Q(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 ni(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)=>ni(e,t,i?s=>{const a=e[s][n];return a<t||a===t&&e[s+1][n]===t}:s=>e[s][n]<t),Hl=(e,n,t)=>ni(e,t,i=>e[i][n]>=t),bs=["push","pop","shift","splice","unshift"];function ys(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)&&(bs.forEach(a=>{delete e[a]}),delete e._chartjs)}function xs(e){const n=new Set(e);return n.size===e.length?e:Array.from(n)}const vs=typeof window>"u"?function(e){return e()}:window.requestAnimationFrame;function Cs(e,n){let t=[],i=!1;return function(...s){t=s,i||(i=!0,vs.call(window,()=>{i=!1,e.apply(n,t)}))}}const ii=e=>"start"===e?"left":"end"===e?"right":"center",et=(e,n,t)=>"start"===e?n:"end"===e?t:(n+t)/2;function Ms(e,n,t){const i=n.length;let s=0,a=i;if(e._sorted){const{iScale:r,vScale:l,_parsed:c}=e,d=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,h=r.axis,{min:u,max:f,minDefined:p,maxDefined:g}=r.getUserBounds();if(p){if(s=Math.min(Ct(c,h,u).lo,t?i:Ct(n,h,r.getPixelForValue(u)).lo),d){const m=c.slice(0,s+1).reverse().findIndex(_=>!E(_[l.axis]));s-=Math.max(0,m)}s=Q(s,0,i-1)}if(g){let m=Math.max(Ct(c,r.axis,f,!0).hi+1,t?0:Ct(n,h,r.getPixelForValue(f),!0).hi+1);if(d){const _=c.slice(m-1).findIndex(b=>!E(b[l.axis]));m+=Math.max(0,_)}a=Q(m,s,i)-s}else a=i-s}return{start:s,count:a}}function Ss(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 on=e=>0===e||1===e,Os=(e,n,t)=>-Math.pow(2,10*(e-=1))*Math.sin((e-n)*B/t),ks=(e,n,t)=>Math.pow(2,-10*e)*Math.sin((e-n)*B/t)+1,Oe={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*Y),easeOutSine:e=>Math.sin(e*Y),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=>on(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=>on(e)?e:Os(e,.075,.3),easeOutElastic:e=>on(e)?e:ks(e,.075,.3),easeInOutElastic:e=>on(e)?e:e<.5?.5*Os(2*e,.1125,.45):.5+.5*ks(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-Oe.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*Oe.easeInBounce(2*e):.5*Oe.easeOutBounce(2*e-1)+.5};function si(e){if(e&&"object"==typeof e){const n=e.toString();return"[object CanvasPattern]"===n||"[object CanvasGradient]"===n}return!1}function Ts(e){return si(e)?e:new se(e)}function oi(e){return si(e)?e:new se(e).saturate(.5).darken(.1).hexString()}const Jl=["x","y","borderWidth","radius","tension"],Kl=["color","borderColor","backgroundColor"],Rs=new Map;function ke(e,n,t){return function Zl(e,n){n=n||{};const t=e+JSON.stringify(n);let i=Rs.get(t);
vendor: 6,067 bytes, line 1
1return i||(i=new Intl.NumberFormat(e,n),Rs.set(t,i)),i}(n,t).format(e)}const Is={values:e=>$(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 d=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(d<1e-4||d>1e15)&&(s="scientific"),a=function tc(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=Et(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),ke(e,i,c)},logarithmic(e,n,t){if(0===e)return"0";const i=t[n].significand||e/Math.pow(10,Math.floor(Et(e)));return[1,2,3,5,10,15].includes(i)||n>.8*t.length?Is.numeric.call(this,e,n,t):""}};var an={formatters:Is};const Bt=Object.create(null),ai=Object.create(null);function Te(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 ri(e,n,t){return"string"==typeof n?xe(Te(e,n),t):xe(Te(e,""),n)}class nc{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)=>oi(s.backgroundColor),this.hoverBorderColor=(i,s)=>oi(s.borderColor),this.hoverColor=(i,s)=>oi(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(n),this.apply(t)}set(n,t){return ri(this,n,t)}get(n){return Te(this,n)}describe(n,t){return ri(ai,n,t)}override(n,t){return ri(Bt,n,t)}route(n,t,i,s){const a=Te(this,n),r=Te(this,i),l="_"+t;Object.defineProperties(a,{[l]:{value:a[t],writable:!0},[t]:{enumerable:!0,get(){const c=this[l],d=r[s];return F(c)?Object.assign({},d,c):R(c,d)},set(c){this[l]=c}}})}apply(n){n.forEach(t=>t(this))}}var N=new nc({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function Ql(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:Kl},numbers:{type:"number",properties:Jl}}),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 ql(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function ec(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:an.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 rn(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 sc(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,d,h,u,f;for(c=0;c<l;c++)if(u=t[c],null==u||$(u)){if($(u))for(d=0,h=u.length;d<h;d++)f=u[d],null!=f&&!$(f)&&(r=rn(e,s,a,r,f))}else r=rn(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 Gt(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 Ps(e,n){!n&&!e||((n=n||e.getContext("2d")).save(),n.resetTransform(),n.clearRect(0,0,e.width,e.height),n.restore())}function li(e,n,t,i){Es(e,n,t,i,null)}function Es(e,n,t,i,s){let a,r,l,c,d,h,u,f;const p=n.pointStyle,g=n.rotation,m=n.radius;let _=(g||0)*Nl;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,B):e.arc(t,i,m,0,B),e.closePath();break;case"triangle":h=s?s/2:m,e.moveTo(t+Math.sin(_)*h,i-Math.cos(_)*m),_+=fs,e.lineTo(t+Math.sin(_)*h,i-Math.cos(_)*m),_+=fs,e.lineTo(t+Math.sin(_)*h,i-Math.cos(_)*m),e.closePath();break;case"rectRounded":d=.516*m,c=m-d,r=Math.cos(_+$t)*c,u=Math.cos(_+$t)*(s?s/2-d:c),l=Math.sin(_+$t)*c,f=Math.sin(_+$t)*(s?s
1/2-d:c),e.arc(t-u,i-l,d,_-D,_-Y),e.arc(t+f,i-r,d,_-Y,_),e.arc(t+u,i+l,d,_,_+Y),e.arc(t-f,i+r,d,_+Y,_+D),e.closePath();break;case"rect":if(!g){c=Math.SQRT1_2*m,h=s?s/2:c,e.rect(t-h,i-c,2*h,2*c);break}_+=$t;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":_+=$t;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),_+=$t,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 ln(e,n){e.save(),e.beginPath(),e.rect(n.left,n.top,n.right-n.left,n.bottom-n.top),e.clip()}function cn(e){e.restore()}function oc(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 ac(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 lc(e,n,t,i,s){if(s.strikethrough||s.underline){const a=e.measureText(i),r=n-a.actualBoundingBoxLeft,l=n+a.actualBoundingBoxRight,d=t+a.actualBoundingBoxDescent,h=s.strikethrough?(t-a.actualBoundingBoxAscent+d)/2:d;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(r,h),e.lineTo(l,h),e.stroke()}}function cc(e,n){const t=e.fillStyle;e.fillStyle=n.color,e.fillRect(n.left,n.top,n.width,n.height),e.fillStyle=t}function Vt(e,n,t,i,s,a={}){const r=$(n)?n:[n],l=a.strokeWidth>0&&""!==a.strokeColor;let c,d;for(e.save(),e.font=s.string,function rc(e,n){n.translation&&e.translate(n.translation[0],n.translation[1]),E(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)d=r[c],a.backdrop&&cc(e,a.backdrop),l&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),E(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(d,t,i,a.maxWidth)),e.fillText(d,t,i,a.maxWidth),lc(e,t,i,d,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,Y,!0),e.lineTo(t+s-r.bottomRight,i+a),e.arc(t+s-r.bottomRight,i+a-r.bottomRight,r.bottomRight,Y,0,!0),e.lineTo(t+s,i+r.topRight),e.arc(t+s-r.topRight,i+r.topRight,r.topRight,0,-Y,!0),e.lineTo(t+r.topLeft,i)}const dc=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,hc=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function uc(e,n){const t=(""+e).match(dc);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 fc=e=>+e||0;function ci(e,n){const t={},i=F(n),s=i?Object.keys(n):n,a=F(e)?i?r=>R(e[r],e[n[r]]):r=>e[r]:()=>e;for(const r of s)t[r]=fc(a(r));return t}function Fs(e){return ci(e,{top:"y",right:"x",bottom:"y",left:"x"})}function zt(e){return ci(e,["topLeft","topRight","bottomLeft","bottomRight"])}function nt(e){const n=Fs(e);return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function X(e,n){let t=R((e=e||{}).size,(n=n||N.font).size);"string"==typeof t&&(t=parseInt(t,10));let i=R(e.style,n.style);i&&!(""+i).match(hc)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:R(e.family,n.family),lineHeight:uc(R(e.lineHeight,n.lineHeight),t),size:t,style:i,weight:R(e.weight,n.weight),string:""};return s.string=function ic(e){return!e||E(e.size)||E(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(s),s}function Ie(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&&$(l)&&(l=l[t%l.length],s=!1),void 0!==l))return i&&!s&&(i.cacheable=!1),l}function Ft(e,n){return Object.assign(Object.create(e),n)}function di(e,n=[""],t,i,s=()=>e[0]){const a=t||e;typeof i>"u"&&(i=Ls("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:i,_getTarget:s,override:l=>di([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)=>Ds(l,c,()=>function Cc(e,n,t,i){let s;for(const a of n)if(s=Ls(gc(a,e),t),typeof s<"u")return hi(e,s)?ui(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)=>Ns(l).includes(c),ownKeys:l=>Ns(l),set(l,c,d){const h=l._storage||(l._storage=s());return l[c]=h[c]=d,delete l._keys,!0}})}function ae(e,n,t,i){const s={_cacheable:!1,_proxy:e,_context:n,_subProxy:t,_stack:new Set,_descriptors:As(e,i),setContext:a=>ae(e,a,t,i),override:a=>ae(e.override(a),n,t,i)};return new Proxy(s,{deleteProperty:(a,r)=>(delete a[r],delete e[r],!0),get:(a,r,l)=>Ds(a,r,()=>function mc(e,n,t){const{_proxy:i,_context:s,_subProxy:a,_descriptors:r}=e;let l=i[n];return Pt(l)&&r.isScriptable(n)&&(l=function _c(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),hi(e,c)&&(c=ui(s._scopes,s,e,c)),c}(n,l,e,t)),$(l)&&l.length&&(l=function bc(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(F(n[0])){const c=n,d=s._scopes.filter(h=>h!==c);n=[];
1for(const h of c){const u=ui(d,s,e,h);n.push(ae(u,a,r&&r[e],l))}}return n}(n,l,e,r.isIndexable)),hi(n,l)&&(l=ae(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)=>Reflect.has(e,r),ownKeys:()=>Reflect.ownKeys(e),set:(a,r,l)=>(e[r]=l,delete a[r],!0)})}function As(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:Pt(t)?t:()=>t,isIndexable:Pt(i)?i:()=>i}}const gc=(e,n)=>e?e+Zn(n):n,hi=(e,n)=>F(n)&&"adapters"!==e&&(null===Object.getPrototypeOf(n)||n.constructor===Object);function Ds(e,n,t){if(Object.prototype.hasOwnProperty.call(e,n)||"constructor"===n)return e[n];const i=t();return e[n]=i,i}function ws(e,n,t){return Pt(e)?e(n,t):e}const yc=(e,n)=>!0===e?n:"string"==typeof e?It(n,e):void 0;function xc(e,n,t,i,s){for(const a of n){const r=yc(t,a);if(r){e.add(r);const l=ws(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 ui(e,n,t,i){const s=n._rootScopes,a=ws(n._fallback,t,i),r=[...e,...s],l=new Set;l.add(i);let c=js(l,r,t,a||t,i);return!(null===c||typeof a<"u"&&a!==t&&(c=js(l,r,a,c,i),null===c))&&di(Array.from(l),[""],s,a,()=>function vc(e,n,t){const i=e._getTarget();n in i||(i[n]={});const s=i[n];return $(s)&&F(t)?t:s||{}}(n,t,i))}function js(e,n,t,i,s){for(;t;)t=xc(e,n,t,i,s);return t}function Ls(e,n){for(const t of n){if(!t)continue;const i=t[e];if(typeof i<"u")return i}}function Ns(e){let n=e._keys;return n||(n=e._keys=function Mc(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 $s(e,n,t,i){const{iScale:s}=e,{key:a="r"}=this._parsing,r=new Array(i);let l,c,d,h;for(l=0,c=i;l<c;++l)d=l+t,h=n[d],r[l]={r:s.parse(It(h,a),d)};return r}const Sc=Number.EPSILON||1e-14,re=(e,n)=>n<e.length&&!e[n].skip&&e[n],Bs=e=>"x"===e?"y":"x";function Oc(e,n,t,i){const s=e.skip?n:e,a=n,r=t.skip?n:t,l=ei(a,s),c=ei(r,a);let d=l/(l+c),h=c/(l+c);d=isNaN(d)?0:d,h=isNaN(h)?0:h;const u=i*d,f=i*h;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 dn(e,n,t){return Math.max(Math.min(e,t),n)}function Pc(e,n,t,i,s){let a,r,l,c;if(n.spanGaps&&(e=e.filter(d=>!d.skip)),"monotone"===n.cubicInterpolationMode)!function Rc(e,n="x"){const t=Bs(n),i=e.length,s=Array(i).fill(0),a=Array(i);let r,l,c,d=re(e,0);for(r=0;r<i;++r)if(l=c,c=d,d=re(e,r+1),c){if(d){const h=d[n]-c[n];s[r]=0!==h?(d[t]-c[t])/h:0}a[r]=l?d?gt(s[r-1])!==gt(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}(function kc(e,n,t){const i=e.length;let s,a,r,l,c,d=re(e,0);for(let h=0;h<i-1;++h)if(c=d,d=re(e,h+1),c&&d){if(Me(n[h],0,Sc)){t[h]=t[h+1]=0;continue}s=t[h]/n[h],a=t[h+1]/n[h],l=Math.pow(s,2)+Math.pow(a,2),!(l<=9)&&(r=3/Math.sqrt(l),t[h]=s*r*n[h],t[h+1]=a*r*n[h])}})(e,s,a),function Tc(e,n,t="x"){const i=Bs(t),s=e.length;let a,r,l,c=re(e,0);for(let d=0;d<s;++d){if(r=l,l=c,c=re(e,d+1),!l)continue;const h=l[t],u=l[i];r&&(a=(h-r[t])/3,l[`cp1${t}`]=h-a,l[`cp1${i}`]=u-a*n[d]),c&&(a=(c[t]-h)/3,l[`cp2${t}`]=h+a,l[`cp2${i}`]=u+a*n[d])}}(e,a,n)}(e,s);else{let d=i?e[e.length-1]:e[0];for(a=0,r=e.length;a<r;++a)l=e[a],c=Oc(d,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,d=l}n.capBezierPoints&&function Ic(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=dn(s.cp1x,n.left,n.right),s.cp1y=dn(s.cp1y,n.top,n.bottom)),l&&(s.cp2x=dn(s.cp2x,n.left,n.right),s.cp2y=dn(s.cp2y,n.top,n.bottom)))}(e,t)}function fi(){return typeof window<"u"&&typeof document<"u"}function pi(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 un=e=>e.ownerDocument.defaultView.getComputedStyle(e,null),Fc=["top","right","bottom","left"];function Ht(e,n,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const a=Fc[s];i[a]=parseFloat(e[n+"-"+a+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function Yt(e,n){if("native"in e)return e;const{canvas:t,currentDevicePixelRatio:i}=n,s=un(t),a="border-box"===s.boxSizing,r=Ht(s,"padding"),l=Ht(s,"border","width"),{x:c,y:d,box:h}=function Dc(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 d=n.getBoundingClientRect();l=i.clientX-d.left,c=i.clientY-d.top,r=!0}return{x:l,y:c,box:r}}(e,t),u=r.left+(h&&l.left),f=r.top+(h&&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((d-f)/g*t.height/i)}}const At=e=>Math.round(10*e)/10;function Gs(e,n,t){const i=n||1,s=At(e.height*i),a=At(e.width*i);e.height=At(e.height),e.width=At(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 Lc=function(){let e=!1;
1try{const n={get passive(){return e=!0,!1}};fi()&&(window.addEventListener("test",null,n),window.removeEventListener("test",null,n))}catch{}return e}();function Vs(e,n){const t=function Ec(e,n){return un(e).getPropertyValue(n)}(e,n),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Wt(e,n,t,i){return{x:e.x+t*(n.x-e.x),y:e.y+t*(n.y-e.y)}}function Nc(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 $c(e,n,t,i){const s={x:e.cp2x,y:e.cp2y},a={x:n.cp1x,y:n.cp1y},r=Wt(e,s,t),l=Wt(s,a,t),c=Wt(a,n,t),d=Wt(r,l,t),h=Wt(l,c,t);return Wt(d,h,t)}function le(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 zs(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 Hs(e,n){void 0!==n&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",n[0],n[1]))}function Ys(e){return"angle"===e?{between:Se,compare:Vl,normalize:tt}:{between:vt,compare:(n,t)=>n-t,normalize:n=>n}}function Ws({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 Us(e,n,t){if(!t)return[e];const{property:i,start:s,end:a}=t,r=n.length,{compare:l,between:c,normalize:d}=Ys(i),{start:h,end:u,loop:f,style:p}=function Vc(e,n,t){const{property:i,start:s,end:a}=t,{between:r,normalize:l}=Ys(i),c=n.length;let f,p,{start:d,end:h,loop:u}=e;if(u){for(d+=c,h+=c,f=0,p=c;f<p&&r(l(n[d%c][i]),s,a);++f)d--,h--;d%=c,h%=c}return h<d&&(h+=c),{start:d,end:h,loop:u,style:e.style}}(e,n,t),g=[];let b,y,v,m=!1,_=null;for(let O=h,T=h;O<=u;++O)y=n[O%r],!y.skip&&(b=d(y[i]),b!==v&&(m=c(b,s,a),null===_&&(m||c(s,v,b)&&0!==l(s,v))&&(_=0===l(b,s)?O:T),null!==_&&(!m||0===l(a,b)||c(a,v,b))&&(g.push(Ws({start:_,end:O,loop:f,count:r,style:p})),_=null),T=O,v=b));return null!==_&&g.push(Ws({start:_,end:u,loop:f,count:r,style:p})),g}function Xs(e,n){const t=[],i=e.segments;for(let s=0;s<i.length;s++){const a=Us(i[s],e.points,n);a.length&&t.push(...a)}return t}function Ks(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Uc(e,n){if(!n)return!1;const t=[],i=function(s,a){return si(a)?(t.includes(a)||t.push(a),t.indexOf(a)):a};return JSON.stringify(e,i)!==JSON.stringify(n,i)}function fn(e,n,t){return e.options.clip?e[t]:n[t]}function Qs(e,n){const t=n._clip;if(t.disabled)return!1;const i=function Xc(e,n){const{xScale:t,yScale:i}=e;return t&&i?{left:fn(t,n,"left"),right:fn(t,n,"right"),top:fn(i,n,"top"),bottom:fn(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 Jc{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(n,t,i,s){const r=t.duration;t.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=vs.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)}}
vendor: 1,902 bytes, line 1
1var St=new Jc;const qs="transparent",Kc={boolean:(e,n,t)=>t>.5?n:e,color(e,n,t){const i=Ts(e||qs),s=i.valid&&Ts(n||qs);return s&&s.valid?s.mix(i,t).hexString():n},number:(e,n,t)=>e+(n-e)*t};class Qc{constructor(n,t,i,s){const a=t[i];s=Ie([n.to,s,a,n.from]);const r=Ie([n.from,a,s]);this._active=!0,this._fn=n.fn||Kc[n.type||typeof r],this._easing=Oe[n.easing]||Oe.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=Ie([n.to,t,s,n.from]),this._from=Ie([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 Zs{constructor(n,t){this._chart=n,this._properties=new Map,this.configure(t)}configure(n){if(!F(n))return;const t=Object.keys(N.animation),i=this._properties;Object.getOwnPropertyNames(n).forEach(s=>{const a=n[s];if(!F(a))return;const r={};for(const l of t)r[l]=a[l];($(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 Zc(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 qc(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 d=r[c];if("$"===d.charAt(0))continue;if("options"===d){s.push(...this._animateOptions(n,t));continue}const h=t[d];let u=a[d];const f=i.get(d);if(u){if(f&&u.active()){u.update(f,h,l);continue}u.cancel()}f&&f.duration?(a[d]=u=new Qc(f,n,d,h),s.push(u)):n[d]=h}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 to(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 eo(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 no(e,n,t,i={}){const s=e.keys,a="single"===i.mode;let r,l,c,d;if(null===n)return;let h=!1;for(r=0,l=s.length;r<l;++r){if(c=+s[r],c===t){if(h=!0,i.all)continue;break}d=e.values[c],H(d)&&(a||0===n||gt(n)===gt(d))&&(n+=d)}return h||i.all?n:0}function gi(e,n){const t=e&&e.options.stacked;return t||void 0===t&&void 0!==n.stack}function od(e,n,t){const i=e[n]||(e[n]={});return i[t]||(i[t]={})}function io(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 so(e,n){const{chart:t,_cachedMeta:i}=e,s=t._stacks||(t._stacks={}),{iScale:a,vScale:r,index:l}=i,c=a.axis,d=r.axis,h=function id(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,[d]:_}=g;f=(g._stacks||(g._stacks={}))[d]=od(s,h,m),f[l]=_,f._top=io(f,r,!0,i.type),f._bottom=io(f,r,!1,i.type),(f._visualValues||(f._visualValues={}))[l]=_}}function mi(e,n){const t=e.scales;return Object.keys(t).filter(i=>t[i].axis===n).shift()}function Pe(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 _i=e=>"reset"===e||"none"===e,oo=(e,n)=>n?e:Object.assign({},e);let Dt=(()=>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=gi(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&&Pe(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,mi(t,"x")),l=i.yAxisID=R(s.yAxisID,mi(t,"y")),c=i.rAxisID=R(s.rAxisID,mi(t,"r")),d=i.indexAxis,h=i.iAxisID=a(d,r,l,c),u=i.vAxisID=a(d,l,r,c);i.xScale=this.getScaleForId(r),i.yScale=this.getScaleForId(l),i.rScale=this.getScaleForId(c),i.iScale=this.getScaleForId(h),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&&ys(this._data,this),t._stacked&&Pe(t)}_dataCheck(){const t=this.getDataset(),i=t.data||(t.data=[]),s=this._data;if(F(i))this._data=function nd(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,d,h;for(c=0,d=r.length;c<d;++c)h=r[c],l[c]={[s]:h,[a]:e[h]};return l}(i,this._cachedMeta);else if(s!==i){if(s){ys(s,this);const a=this._cachedMeta;Pe(a),a._parsed=[]}i&&Object.isExtensible(i)&&function Wl(e,n){e._chartjs?e._chartjs.listeners.push(n):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[n]}}),bs.forEach(t=>{const i="_onData"+Zn(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=gi(i.vScale,i),i.stack!==s.stack&&(a=!0,Pe(i),i.stack=s.stack),this._resyncElements(t),(a||r!==i._stacked)&&(so(this,i._parsed),i._stacked=gi(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,d=0===t&&i===a.length||s._sorted,h=t>0&&s._parsed[t-1];if(!1===this._parsing)s._parsed=a,s._sorted=!0,p=a;else{p=$(a[t])?this.parseArrayData(s,a,t,i):F(a[t])?this.parseObjectData(s,a,t,i):this.parsePrimitiveData(s,a,t,i);const g=()=>null===f[c]||h&&f[c]<h[c];for(u=0;u<i;++u)s._parsed[u+t]=f=p[u],d&&(g()&&(d=!1),h=f);s._sorted=d}l&&so(this,p)}parsePrimitiveData(t,i,s,a){const{iScale:r,vScale:l}=t,c=r.axis,d=l.axis,h=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(h[m],m),[d]:l.parse(i[m],m)};return f}parseArrayData(t,i,s,a){const{xScale:r,yScale:l}=t,c=new Array(a);let d,h,u,f;for(d=0,h=a;d<h;++d)u=d+s,f=i[u],c[d]={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:d="y"}=this._parsing,h=new Array(a);let u,f,p,g;for(u=0,f=a;u<f;++u)p=u+s,g=i[p],h[u]={x:r.parse(It(g,c),p),y:l.parse(It(g,d),p)};return h}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 no({keys:eo(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=no(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),d=((e,n)=>e&&!n.hidden&&n._stacked&&{keys:eo(this.chart,!0),values:null})(i,s),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=function sd(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!H(g[t.axis])||u>_||f<_}for(p=0;p<l&&(m()||(this.updateRangeFromParsed(h,t,g,d),!r));++p);if(r)for(p=l-1;p>=0;--p)if(!m()){this.updateRangeFromParsed(h,t,g,d);break}return h}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],H(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 ed(e){let n,t,i,s;return F(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 td(e,n,t){if(!1===t)return!1;const i=to(e,t),s=to(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,d=this._drawCount||a.length-c,h=this.options.drawActiveElementsOnTop;let u;for(s.dataset&&s.dataset.draw(t,r,c,d),u=c;u<c+d;++u){const f=a[u];f.hidden||(f.active&&h?l.push(f):f.draw(t,r))}for(u=0;
vendor: 27,856 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 rd(e,n,t){return Ft(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 ad(e,n){return Ft(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],d=this.enableOptionSharing&&Ce(s);if(c)return oo(c,d);const h=this.chart.config,u=h.datasetElementScopeKeys(this._type,t),f=a?[`${t}Hover`,"hover",t,""]:[t,""],p=h.getOptionScopes(this.getDataset(),u),g=Object.keys(N.elements[t]),_=h.resolveNamedOptions(p,g,()=>this.getContext(s,a,i),f);return _.$shared&&(_.$shared=d,r[l]=Object.freeze(oo(_,d))),_}_resolveAnimations(t,i,s){const a=this.chart,r=this._cachedDataOpts,l=`animation-${i}`,c=r[l];if(c)return c;let d;if(!1!==a.options.animation){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,i),p=u.getOptionScopes(this.getDataset(),f);d=u.createResolver(p,this.getContext(t,s,i))}const h=new Zs(a,d&&d.animations);return d&&d._cacheable&&(r[l]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,i){return!i||_i(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){_i(a)?Object.assign(t,s):this._resolveAnimations(i,a).update(t,s)}updateSharedOptions(t,i,s){t&&!_i(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,d,h]of this._syncList)this[c](d,h);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 d=h=>{for(h.length+=i,c=h.length-1;c>=l;c--)h[c]=h[c-i]};for(d(r),c=t;c<l;++c)r[c]=new this.dataElementType;this._parsing&&d(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&&Pe(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 dd(e){const n=e.iScale,t=function cd(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=xs(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||(Ce(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 ao(e,n,t,i){return $(e)?function fd(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,d=l;Math.abs(r)>Math.abs(l)&&(c=l,d=r),n[t.axis]=d,n._custom={barStart:c,barEnd:d,start:s,end:a,min:r,max:l}}(e,n,t,i):n[t.axis]=t.parse(e,i),n}function ro(e,n,t,i){const s=e.iScale,a=e.vScale,r=s.getLabels(),l=s===a,c=[];let d,h,u,f;for(d=t,h=t+i;d<h;++d)f=n[d],u={},u[s.axis]=l||s.parse(r[d],d),c.push(ao(f,u,a,d));return c}function bi(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function md(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:d,bottom:h}=function gd(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=d:(t._bottom||0)===i?s=h:(a[lo(h,r,l,c)]=!0,s=d)),a[lo(s,r,l,c)]=!0,e.borderSkipped=a}function lo(e,n,t,i){return i?(e=function _d(e,n,t){return e===n?t:e===t?n:e}(e,n,t),e=co(e,t,n)):e=co(e,n,t),e}function co(e,n,t){return"start"===e?n:"end"===e?t:e}function bd(e,{inflateAmount:n},t){e.inflateAmount="auto"===n?1===t?.33:0:n}let yd=(()=>class e extends Dt{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 ro(t,i,s,a)}parseArrayData(t,i,s,a){return ro(t,i,s,a)}parseObjectData(t,i,s,a){const{iScale:r,vScale:l}=t,{xAxisKey:c="x",yAxisKey:d="y"}=this._parsing,h="x"===r.axis?c:d,u="x"===l.axis?c:d,f=[];let p,g,m,_;for(p=s,g=s+a;p<g;++p)_=i[p],m={},m[r.axis]=r.parse(It(_,h),p),f.push(ao(It(_,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=bi(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,d=c.getBasePixel(),h=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||E(m[c.axis])?{base:d,head:d}:this._calculateBarValuePixels(g),b=this._calculateBarIndexPixels(g,u),y=(m._stacks||{})[c.axis],v={horizontal:h,base:_.base,enableBorderRadius:!y||bi(m._custom)||l===y._top||l===y._bottom,x:h?_.head:b.center,y:h?b.center:_.head,height:h?b.size:Math.abs(_.size),width:h?Math.abs(_.size):b.size};p&&(v.options=f||this.resolveDataElementOptions(g,t[g].active?"active":a));const M=v.options||t[g].options;md(v,M,y,l),bd(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),d=c&&c[s.axis],h=u=>{const f=u._parsed.find(g=>g[s.axis]===d),p=f&&f[u.vScale.axis];if(E(p)||isNaN(p))return!0};for(const u of a)if((void 0===i||!h(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||dd(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,d=this.getParsed(t),h=d._custom,u=bi(h);let m,_,f=d[i.axis],p=0,g=s?this.applyStack(i,d,s):f;g!==f&&(p=g-f,g=f),u&&(f=h.barStart,g=h.barEnd-h.barStart,0!==f&&gt(f)!==gt(h.barEnd)&&(p=0),p+=f);const b=E(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 pd(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&&(d._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,d;const h=this._getAxisCount();if(i.grouped){const u=r?this._getStackCount(t):i.stackCount,f="flex"===a.barThickness?function ud(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 d=a-(a-Math.min(r,l))/2*c;return{chunk:Math.abs(l-r)/2*c/i,ratio:t.barPercentage,start:d}}(t,i,a,u*h):function hd(e,n,t,i){const s=t.barThickness;let a,r;return E(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*h),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,d=Math.min(l,f.chunk*f.ratio)}else c=s.getPixelForValue(this.getParsed(t)[s.axis],t),d=Math.min(l,i.min*i.ratio);return{base:c-d/2,head:c+d/2,center:c,size:d}}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)}})(),xd=(()=>class e extends Dt{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),d=r.getLabelForValue(l.y),h=l._custom;return{label:s[t]||"",value:"("+c+", "+d+(h?", "+h:"")+")"}}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:d,includeOptions:h}=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),h&&(_.options=d||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}})(),yi=(()=>class e extends Dt{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((d,h)=>{const f=t.getDatasetMeta(0).controller.getStyle(h);return{text:d,fillStyle:f.backgroundColor,fontColor:r,hidden:!t.getDataVisibility(h),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:h}}):[]}},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=d=>+s[d];if(F(s[t])){const{key:d="value"}=this._parsing;r=h=>+It(s[h],d)}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=B,i=-B;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),d=Math.min(((e,n)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100:+e/n)(this.options.cutout,c),1),h=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:p,ratioY:g,offsetX:m,offsetY:_}=function vd(e,n,t){let i=1,s=1,a=0,r=0;if(n<B){const l=e,c=l+n,d=Math.cos(l),h=Math.sin(l),u=Math.cos(c),f=Math.sin(c),p=(v,M,x)=>Se(v,l,c,!0)?1:Math.max(M,M*t,x,x*t),g=(v,M,x)=>Se(v,l,c,!0)?-1:Math.min(M,M*t,x,x*t),m=p(0,d,u),_=p(Y,h,f),b=g(D,d,u),y=g(D+Y,h,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,d),v=Math.max(Math.min((s.width-l)/p,(s.height-l)/g)/2,0),M=cs(this.options.radius,v),C=(M-Math.max(M*d,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*h,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/B)}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)?B*(Math.abs(t)/i):0}getLabelAndValue(t){const s=this.chart,a=s.data.labels||[],r=ke(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,d;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)d=c.resolveDataElementOptions(a),"inner"!==d.borderAlign&&(i=Math.max(i,d.borderWidth||0,d.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}})(),Cd=(()=>class e extends Dt{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:d}=Ms(i,a,l);this._drawStart=c,this._drawCount=d,Ss(i)&&(c=0,d=a.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!r._decimated,s.points=a;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(s,void 0,{animated:!l,options:h},t),this.updateElements(a,c,d,t)}updateElements(t,i,s,a){const r="reset"===a,{iScale:l,vScale:c,_stacked:d,_dataset:h}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(i,a),p=l.axis,g=c.axis,{spanGaps:m,segment:_}=this.options,b=oe(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 k=t[C],O=y?k:{};if(C<i||C>=v){O.skip=!0;continue}const T=this.getParsed(C),P=E(T[g]),I=O[p]=l.getPixelForValue(T[p],C),A=O[g]=r||P?c.getBasePixel():c.getPixelForValue(d?this.applyStack(c,T,d):T[g],C);O.skip=isNaN(I)||isNaN(A)||P,O.stop=C>0&&Math.abs(T[p]-x[p])>b,_&&(O.parsed=T,O.raw=h.data[C]),f&&(O.options=u||this.resolveDataElementOptions(C,k.active?"active":a)),y||this.updateElement(k,C,O,a),x=T}}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()}})(),ho=(()=>class e extends Dt{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 d=t.getDatasetMeta(0).controller.getStyle(l);return{text:r,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:a,lineWidth:d.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=ke(this._cachedMeta._parsed[t].r,s.options.locale);return{label:a[t]||"",value:r}}parseObjectData(t,i,s,a){return $s.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,d=l.options.animation,h=this._cachedMeta.rScale,u=h.xCenter,f=h.yCenter,p=h.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)?h.getDistanceFromCenterForValue(this.getParsed(m).r):0;g=v,r&&(d.animateScale&&(M=0),d.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 Md=Object.freeze({__proto__:null,BarController:yd,BubbleController:xd,DoughnutController:yi,LineController:Cd,PieController:(()=>class e extends yi{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}})(),PolarAreaController:ho,RadarController:(()=>class e extends Dt{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 $s.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 d=t[c],h=this.resolveDataElementOptions(c,d.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:h};this.updateElement(d,c,g,a)}}})(),ScatterController:(()=>class e extends Dt{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),d=r.getLabelForValue(l.y);return{label:s[t]||"",value:"("+c+", "+d+")"}}update(t){const i=this._cachedMeta,{data:s=[]}=i,a=this.chart._animationsDisabled;let{start:r,count:l}=Ms(i,s,a);if(this._drawStart=r,this._drawCount=l,Ss(i)&&(r=0,l=s.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:c,_dataset:d}=i;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!d._decimated,c.points=s;const h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(c,void 0,{animated:!a,options:h},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:d,_dataset:h}=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=oe(_)?_: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],k=this.getParsed(x),O=v?C:{},T=E(k[m]),P=O[g]=l.getPixelForValue(k[g],x),I=O[m]=r||T?c.getBasePixel():c.getPixelForValue(d?this.applyStack(c,k,d):k[m],x);O.skip=isNaN(P)||isNaN(I)||T,O.stop=x>0&&Math.abs(k[g]-M[g])>y,b&&(O.parsed=k,O.raw=h.data[x]),p&&(O.options=f||this.resolveDataElementOptions(x,C.active?"active":a)),v||this.updateElement(C,x,O,a),M=k}this.updateSharedOptions(f,a,u)}getMaxOverflow(){const t=this._cachedMeta,i=t.data||[];if(!this.options.showLine){let c=0;for(let d=i.length-1;d>=0;--d)c=Math.max(c,i[d].size(this.resolveDataElementOptions(d))/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 Ut(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class xi{static override(n){Object.assign(xi.prototype,n)}options;constructor(n){this.options=n||{}}init(){}formats(){return Ut()}parse(){return Ut()}format(){return Ut()}add(){return Ut()}diff(){return Ut()}startOf(){return Ut()}endOf(){return Ut()}}var Sd__date=xi;function Od(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 d=l._reversePixels?Hl:Ct;if(!i){const h=d(a,n,t);
1if(c){const{vScale:u}=s._cachedMeta,{_parsed:f}=e,p=f.slice(0,h.lo+1).reverse().findIndex(m=>!E(m[u.axis]));h.lo-=Math.max(0,p);const g=f.slice(h.hi).findIndex(m=>!E(m[u.axis]));h.hi+=Math.max(0,g)}return h}if(s._sharedOptions){const h=a[0],u="function"==typeof h.getRange&&h.getRange(n);if(u){const f=d(a,n,t-u),p=d(a,n,t+u);return{lo:f.lo,hi:p.hi}}}}return{lo:0,hi:a.length-1}}function Ee(e,n,t,i,s){const a=e.getSortedVisibleDatasetMetas(),r=t[n];for(let l=0,c=a.length;l<c;++l){const{index:d,data:h}=a[l],{lo:u,hi:f}=Od(a[l],n,r,s);for(let p=u;p<=f;++p){const g=h[p];g.skip||i(g,d,p)}}}function vi(e,n,t,i,s){const a=[];return!s&&!e.isPointInArea(n)||Ee(e,t,n,function(l,c,d){!s&&!Mt(l,e.chartArea,0)||l.inRange(n.x,n.y,i)&&a.push({element:l,datasetIndex:c,index:d})},!0),a}function Ci(e,n,t,i,s,a){return a||e.isPointInArea(n)?"r"!==t||i?function Rd(e,n,t,i,s,a){let r=[];const l=function kd(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 Ee(e,t,n,function d(h,u,f){const p=h.inRange(n.x,n.y,s);if(i&&!p)return;const g=h.getCenterPoint(s);if(!a&&!e.isPointInArea(g)&&!p)return;const _=l(n,g);_<c?(r=[{element:h,datasetIndex:u,index:f}],c=_):_===c&&r.push({element:h,datasetIndex:u,index:f})}),r}(e,n,t,i,s,a):function Td(e,n,t,i){let s=[];return Ee(e,t,n,function a(r,l,c){const{startAngle:d,endAngle:h}=r.getProps(["startAngle","endAngle"],i),{angle:u}=_s(r,{x:n.x,y:n.y});Se(u,d,h)&&s.push({element:r,datasetIndex:l,index:c})}),s}(e,n,t,s):[]}function uo(e,n,t,i,s){const a=[],r="x"===t?"inXRange":"inYRange";let l=!1;return Ee(e,t,n,(c,d,h)=>{c[r]&&c[r](n[t],s)&&(a.push({element:c,datasetIndex:d,index:h}),l=l||c.inRange(n.x,n.y,s))}),i&&!l?[]:a}var Id={evaluateInteractionItems:Ee,modes:{index(e,n,t,i){const s=Yt(n,e),a=t.axis||"x",r=t.includeInvisible||!1,l=t.intersect?vi(e,s,a,i,r):Ci(e,s,a,!1,i,r),c=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(d=>{const h=l[0].index,u=d.data[h];u&&!u.skip&&c.push({element:u,datasetIndex:d.index,index:h})}),c):[]},dataset(e,n,t,i){const s=Yt(n,e),a=t.axis||"xy",r=t.includeInvisible||!1;let l=t.intersect?vi(e,s,a,i,r):Ci(e,s,a,!1,i,r);if(l.length>0){const c=l[0].datasetIndex,d=e.getDatasetMeta(c).data;l=[];for(let h=0;h<d.length;++h)l.push({element:d[h],datasetIndex:c,index:h})}return l},point:(e,n,t,i)=>vi(e,Yt(n,e),t.axis||"xy",i,t.includeInvisible||!1),nearest:(e,n,t,i)=>Ci(e,Yt(n,e),t.axis||"xy",t.intersect,i,t.includeInvisible||!1),x:(e,n,t,i)=>uo(e,Yt(n,e),"x",t.intersect,i),y:(e,n,t,i)=>uo(e,Yt(n,e),"y",t.intersect,i)}};const fo=["left","top","right","bottom"];function Fe(e,n){return e.filter(t=>t.pos===n)}function po(e,n){return e.filter(t=>-1===fo.indexOf(t.pos)&&t.box.axis===n)}function Ae(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 go(e,n,t,i){return Math.max(e[t],n[t])+Math.max(e[i],n[i])}function mo(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 Dd(e,n,t,i){const{pos:s,box:a}=t,r=e.maxPadding;if(!F(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&&mo(r,a.getPadding());const l=Math.max(0,n.outerWidth-go(r,e,"left","right")),c=Math.max(0,n.outerHeight-go(r,e,"top","bottom")),d=l!==e.w,h=c!==e.h;return e.w=l,e.h=c,t.horizontal?{same:d,other:h}:{same:h,other:d}}function jd(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,d,h;for(a=0,r=e.length,d=0;a<r;++a){l=e[a],c=l.box,c.update(l.width||n.w,l.height||n.h,jd(l.horizontal,n));const{same:u,other:f}=Dd(n,t,l,i);d|=u&&s.length,h=h||f,c.fullSize||s.push(l)}return d&&De(s,n,t,i)||h}function pn(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 _o(e,n,t,i){const s=t.padding;let{x:a,y:r}=n;for(const l of e){const c=l.box,d=i[l.stack]||{count:1,placed:0,weight:1},h=l.stackWeight/d.weight||1;if(l.horizontal){const u=n.w*h,f=d.size||c.height;Ce(d.start)&&(r=d.start),c.fullSize?pn(c,s.left,r,t.outerWidth-s.right-s.left,f):pn(c,n.left+d.placed,r,u,f),d.start=r,d.placed+=u,r=c.bottom}else{const u=n.h*h,f=d.size||c.width;Ce(d.start)&&(a=d.start),c.fullSize?pn(c,a,s.top,f,t.outerHeight-s.bottom-s.top):pn(c,a,n.top+d.placed,f,u),d.start=a,d.placed+=u,a=c.right}}n.x=a,n.y=r}
1var it={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=nt(e.options.layout.padding),a=Math.max(n-s.width,0),r=Math.max(t-s.height,0),l=function Ad(e){const n=function Pd(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=Ae(n.filter(d=>d.box.fullSize),!0),i=Ae(Fe(n,"left"),!0),s=Ae(Fe(n,"right")),a=Ae(Fe(n,"top"),!0),r=Ae(Fe(n,"bottom")),l=po(n,"x"),c=po(n,"y");return{fullSize:t,leftAndTop:i.concat(a),rightAndBottom:s.concat(c).concat(r).concat(l),chartArea:Fe(n,"chartArea"),vertical:i.concat(s).concat(c),horizontal:a.concat(r).concat(l)}}(e.boxes),c=l.vertical,d=l.horizontal;w(e.boxes,m=>{"function"==typeof m.beforeLayout&&m.beforeLayout()});const h=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/h,hBoxMaxHeight:r/2}),f=Object.assign({},s);mo(f,nt(i));const p=Object.assign({maxPadding:f,w:a,h:r,x:s.left,y:s.top},s),g=function Fd(e,n){const t=function Ed(e){const n={};for(const t of e){const{stack:i,pos:s,stackWeight:a}=t;if(!i||!fo.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,d=t[l.stack],h=d&&l.stackWeight/d.weight;l.horizontal?(l.width=h?h*i:c&&n.availableWidth,l.height=s):(l.width=i,l.height=h?h*s:c&&n.availableHeight)}return t}(c.concat(d),u);De(l.fullSize,p,u,g),De(c,p,u,g),De(d,p,u,g)&&De(c,p,u,g),function wd(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),_o(l.leftAndTop,p,u,g),p.x+=p.w,p.y+=p.h,_o(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},w(l.chartArea,m=>{const _=m.box;Object.assign(_,e.chartArea),_.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class bo{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 Ld extends bo{acquireContext(n){return n&&n.getContext&&n.getContext("2d")||null}updateConfig(n){n.options.animation=!1}}const gn="$chartjs",Nd={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},yo=e=>null===e||""===e,xo=!!Lc&&{passive:!0};function Gd(e,n,t){e&&e.canvas&&e.canvas.removeEventListener(n,t,xo)}function mn(e,n){for(const t of e)if(t===n||t.contains(n))return!0}function zd(e,n,t){const i=e.canvas,s=new MutationObserver(a=>{let r=!1;for(const l of a)r=r||mn(l.addedNodes,i),r=r&&!mn(l.removedNodes,i);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function Hd(e,n,t){const i=e.canvas,s=new MutationObserver(a=>{let r=!1;for(const l of a)r=r||mn(l.removedNodes,i),r=r&&!mn(l.addedNodes,i);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const we=new Map;let vo=0;function Co(){const e=window.devicePixelRatio;e!==vo&&(vo=e,we.forEach((n,t)=>{t.currentDevicePixelRatio!==e&&n()}))}function Ud(e,n,t){const i=e.canvas,s=i&&pi(i);if(!s)return;const a=Cs((l,c)=>{const d=s.clientWidth;t(l,c),d<s.clientWidth&&t()},window),r=new ResizeObserver(l=>{const c=l[0],d=c.contentRect.width,h=c.contentRect.height;0===d&&0===h||a(d,h)});return r.observe(s),function Yd(e,n){we.size||window.addEventListener("resize",Co
vendor: 27,790 bytes, line 1
1),we.set(e,n)}(e,a),r}function Mi(e,n,t){t&&t.disconnect(),"resize"===n&&function Wd(e){we.delete(e),we.size||window.removeEventListener("resize",Co)}(e)}function Xd(e,n,t){const i=e.canvas,s=Cs(a=>{null!==e.ctx&&t(function Vd(e,n){const t=Nd[e.type]||e.type,{x:i,y:s}=Yt(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 Bd(e,n,t){e&&e.addEventListener(n,t,xo)}(i,n,s),s}class Jd extends bo{acquireContext(n,t){const i=n&&n.getContext&&n.getContext("2d");return i&&i.canvas===n?(function $d(e,n){const t=e.style,i=e.getAttribute("height"),s=e.getAttribute("width");if(e[gn]={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",yo(s)){const a=Vs(e,"width");void 0!==a&&(e.width=a)}if(yo(i))if(""===e.style.height)e.height=e.width/(n||2);else{const a=Vs(e,"height");void 0!==a&&(e.height=a)}}(n,t),i):null}releaseContext(n){const t=n.canvas;if(!t[gn])return!1;const i=t[gn].initial;["height","width"].forEach(a=>{const r=i[a];E(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[gn],!0}addEventListener(n,t,i){this.removeEventListener(n,t),(n.$proxies||(n.$proxies={}))[t]=({attach:zd,detach:Hd,resize:Ud}[t]||Xd)(n,t,i)}removeEventListener(n,t){const i=n.$proxies||(n.$proxies={}),s=i[t];s&&(({attach:Mi,detach:Mi,resize:Mi}[t]||Gd)(n,t,s),i[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(n,t,i,s){return function jc(e,n,t,i){const s=un(e),a=Ht(s,"margin"),r=hn(s.maxWidth,e,"clientWidth")||sn,l=hn(s.maxHeight,e,"clientHeight")||sn,c=function wc(e,n,t){let i,s;if(void 0===n||void 0===t){const a=e&&pi(e);if(a){const r=a.getBoundingClientRect(),l=un(a),c=Ht(l,"border","width"),d=Ht(l,"padding");n=r.width-d.width-c.width,t=r.height-d.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||sn,maxHeight:s||sn}}(e,n,t);let{width:d,height:h}=c;if("content-box"===s.boxSizing){const f=Ht(s,"border","width"),p=Ht(s,"padding");d-=p.width+f.width,h-=p.height+f.height}return d=Math.max(0,d-a.width),h=Math.max(0,i?d/i:h-a.height),d=At(Math.min(d,r,c.maxWidth)),h=At(Math.min(h,l,c.maxHeight)),d&&!h&&(h=At(d/2)),(void 0!==n||void 0!==t)&&i&&c.height&&h>c.height&&(h=c.height,d=At(Math.floor(h*i))),{width:d,height:h}}(n,t,i,s)}isAttached(n){const t=n&&pi(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 oe(this.x)&&oe(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 _n(e,n,t,i,s){const a=R(i,0),r=Math.min(R(s,e.length),e.length);let c,d,h,l=0;for(t=Math.ceil(t),s&&(c=s-i,t=c/Math.floor(c/t)),h=a;h<0;)l++,h=Math.round(a+l*t);for(d=Math.max(a,0);d<r;d++)d===h&&(n.push(e[d]),l++,h=Math.round(a+l*t))}const Mo=(e,n,t)=>"top"===n||"left"===n?e[n]+t:e[n]-t,So=(e,n)=>Math.min(n||e,e);function Oo(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 sh(e,n,t){const i=e.ticks.length,s=Math.min(n,i-1),a=e._startPixel,r=e._endPixel,l=1e-6;let d,c=e.getPixelForTick(s);if(!(t&&(d=1===i?Math.max(c-a,r-c):0===n?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(s-1))/2,c+=s<n?d:-d,c<a-l||c>r+l)))return c}function je(e){return e.drawTicks?e.tickLength:0}function ko(e,n){if(!e.display)return 0;const t=X(e.font,n),i=nt(e.padding);return($(e.text)?e.text.length:1)*t.lineHeight+i.height}function lh(e,n,t){let i=ii(e);return(t&&"right"!==n||!t&&"right"===n)&&(i=(e=>"left"===e?"right":"right"===e?"left":e)(i)),i}class Xt 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:H(n),maxDefined:H(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,d=l.length;c<d;++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||[]}getLabelItems(n=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(n))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(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 pc(e,n,t){const{min:i,max:s}=e,a=cs(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?Oo(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||"auto"===r.source)&&(this.ticks=function Qd(e,n){const t=e.options.ticks,i=function qd(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 th(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],d=[];if(r>s)return function eh(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,d,a,r/s),d;const h=function Zd(e,n,t){const i=function nh(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 $l(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(_n(n,d,h,E(p)?0:l-p,l),u=0,f=r-1;u<f;u++)_n(n,d,h,a[u],a[u+1]);return _n(n,d,h,c,E(p)?n.length:c+p),d}return _n(n,d,h),d}(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(){L(this.options.afterUpdate,[this])}beforeSetDimensions(){L(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(){L(this.options.afterSetDimensions,[this])}_callHooks(n){this.chart.notifyPlugins(n,this.getContext()),L(this.options[n],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){L(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=L(t.callback,[a.value,i,n],this)}afterTickToLabelConversion(){L(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){L(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const n=this.options,t=n.ticks,i=So(this.ticks.length,n.ticks.maxTicksLimit),s=t.minRotation||0,a=t.maxRotation;let l,c,d,r=s;if(!this._isVisible()||!t.display||s>=a||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const h=this._getLabelSizes(),u=h.widest.width,f=h.highest.height,p=Q(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-je(n.grid)-t.padding-ko(n.title,this.chart.options.font),d=Math.sqrt(u*u+f*f),r=ti(Math.min(Math.asin(Q((h.highest.height+6)/l,-1,1)),Math.asin(Q(c/d,-1,1))-Math.asin(Q(f/d,-1,1)))),r=Math.max(s,Math.min(a,r))),this.labelRotation=r}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){L(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=ko(s,t.options.font);if(l?(n.width=this.maxWidth,n.height=je(a)+c):(n.height=this.maxHeight,n.width=je(a)+c),i.display&&this.ticks.length){const{first:d,last:h,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(d,h,_,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,d="top"!==l&&"x"===this.axis;if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;c?d?(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-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((p-u+r)*this.width/(this.width-u),0)}else{let h=t.height/2,u=n.height/2;"start"===a?(h=0,u=n.height):"end"===a&&(h=t.height,u=0),this.paddingTop=h+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(){L(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++)E(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=Oo(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/So(t,i));let u,f,p,g,m,_,b,y,v,M,x,d=0,h=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,E(g)||$(g)){if($(g))for(f=0,p=g.length;f<p;++f)x=g[f],!E(x)&&!$(x)&&(v=rn(s,b.data,b.gc,v,x),M+=y)}else v=rn(s,b.data,b.gc,v,g),M=y;r.push(v),l.push(M),d=Math.max(v,d),h=Math.max(M,h)}!function oh(e,n){w(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(d),k=l.indexOf(h),O=T=>({width:r[T]||0,height:l[T]||0});return{first:O(0),last:O(t-1),widest:O(C),highest:O(k),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 zl(e){return Q(e,-32768,32767)}(this._alignToPixels?Gt(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 rh(e,n,t){return Ft(e,{tick:t,index:n,type:"tick"})}(this.getContext(),n,i))}return this.$context||(this.$context=function ah(e,n){return Ft(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,d=this.isHorizontal(),u=this.ticks.length+(c?1:0),f=je(a),p=[],g=l.setContext(this.getContext()),m=g.display?g.width:0,_=m/2,b=function(V){return Gt(i,V,m)};let y,v,M,x,C,k,O,T,P,I,A,Z;if("top"===r)y=b(this.bottom),k=this.bottom-f,T=y-_,I=b(n.top)+_,Z=n.bottom;else if("bottom"===r)y=b(this.top),I=n.top,Z=b(n.bottom)-_,k=y+_,T=this.top+f;else if("left"===r)y=b(this.right),C=this.right-f,O=y-_,P=b(n.left)+_,A=n.right;else if("right"===r)y=b(this.left),P=n.left,A=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(F(r)){const V=Object.keys(r)[0];y=b(this.chart.scales[V].getPixelForValue(r[V]))}I=n.top,Z=n.bottom,k=y+_,T=k+f}else if("y"===t){if("center"===r)y=b((n.left+n.right)/2);else if(F(r)){const V=Object.keys(r)[0];y=b(this.chart.scales[V].getPixelForValue(r[V]))}C=y-_,O=C-f,P=n.left,A=n.right}const lt=R(s.ticks.maxTicksLimit,u),j=Math.max(1,Math.ceil(u/lt));for(v=0;v<u;v+=j){const V=this.getContext(v),W=a.setContext(V),pt=l.setContext(V),st=W.lineWidth,ge=W.color,Vn=pt.dash||[],me=pt.dashOffset,Ue=W.tickWidth,Qt=W.tickColor,Xe=W.tickBorderDash||[],qt=W.tickBorderDashOffset;M=sh(this,v,c),void 0!==M&&(x=Gt(i,M,st),d?C=O=P=A=x:k=T=I=Z=x,p.push({tx1:C,ty1:k,tx2:O,ty2:T,x1:P,y1:I,x2:A,y2:Z,width:st,color:ge,borderDash:Vn,borderDashOffset:me,tickWidth:Ue,tickColor:Qt,tickBorderDash:Xe,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:d,padding:h,mirror:u}=a,f=je(i.grid),p=f+h,g=u?-h:p,m=-ft(this.labelRotation),_=[];let b,y,v,M,x,C,k,O,T,P,I,A,Z="middle";if("top"===s)C=this.bottom-g,k=this._getXAxisLabelAlignment();else if("bottom"===s)C=this.top+g,k=this._getXAxisLabelAlignment();else if("left"===s){const j=this._getYAxisLabelAlignment(f);k=j.textAlign,x=j.x}else if("right"===s){const j=this._getYAxisLabelAlignment(f);k=j.textAlign,x=j.x}else if("x"===t){if("center"===s)C=(n.top+n.bottom)/2+p;else if(F(s)){const j=Object.keys(s)[0];C=this.chart.scales[j].getPixelForValue(s[j])+p}k=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===s)x=(n.left+n.right)/2-p;else if(F(s)){const j=Object.keys(s)[0];x=this.chart.scales[j].getPixelForValue(s[j])}k=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 j=a.setContext(this.getContext(b));O=this.getPixelForTick(b)+a.labelOffset,T=this._resolveTickFontOptions(b),P=T.lineHeight,I=$(M)?M.length:1;const V=I/2,W=j.color,pt=j.textStrokeColor,st=j.textStrokeWidth;let Vn,ge=k;if(r?(x=O,"inner"===k&&(ge=b===y-1?this.options.reverse?"left":"right":0===b?this.options.reverse?"right":"left":"center"),A="top"===s?"near"===d||0!==m?-I*P+P/2:"center"===d?-lt.highest.height/2-V*P+P:P/2-lt.highest.height:"near"===d||0!==m?P/2:"center"===d?lt.highest.height/2-V*P:lt.highest.height-I*P,u&&(A*=-1),0!==m&&!j.showLabelBackdrop&&(x+=P/2*Math.sin(m))):(C=O,A=(1-I)*P/2),j.showLabelBackdrop){const me=nt(j.backdropPadding),Ue=lt.heights[b],Qt=lt.widths[b];let Xe=A-me.top,qt=0-me.left;switch(Z){case"middle":Xe-=Ue/2;break;case"bottom":Xe-=Ue}switch(k){case"center":qt-=Qt/2;break;case"right":qt-=Qt;break;case"inner":b===y-1?qt-=Qt:b>0&&(qt-=Qt/2)}Vn={left:qt,top:Xe,width:Qt+me.width,height:Ue+me.height,color:j.backdropColor}}_.push({label:M,font:T,textOffset:A,options:{rotation:m,color:W,strokeColor:pt,strokeWidth:st,textAlign:ge,textBaseline:Z,translation:[x,C],backdrop:Vn}})}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 d,h;return"left"===t?s?(h=this.right+a,"near"===i?d="left":"center"===i?(d="center",h+=c/2):(d="right",h+=c)):(h=this.right-l,"near"===i?d="right":"center"===i?(d="center",h-=c/2):(d="left",h=this.left)):"right"===t?s?(h=this.left+a,"near"===i?d="right":"center"===i?(d="center",h-=c/2):(d="left",h-=c)):(h=this.left+l,"near"===i?d="left":"center"===i?(d="center",h+=c/2):(d="right",h=this.right)):d="right",{textAlign:d,x:h}}_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,d,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(c.x,c.y),i.lineTo(d.x,d.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 d,h,u,f;this.isHorizontal()?(d=Gt(n,this.left,r)-r/2,h=Gt(n,this.right,l)+l/2,u=f=c):(u=Gt(n,this.top,r)-r/2,f=Gt(n,this.bottom,l)+l/2,d=h=c),t.save(),t.lineWidth=a.width,t.strokeStyle=a.color,t.beginPath(),t.moveTo(d,u),t.lineTo(h,f),t.stroke(),t.restore()}drawLabels(n){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&ln(i,s);const a=this.getLabelItems(n);for(const r of a)Vt(i,r.label,0,r.textOffset,r.font,r.options);s&&cn(i)}drawTitle(){const{ctx:n,options:{position:t,title:i,reverse:s}}=this;if(!i.display)return;const a=X(i.font),r=nt(i.padding),l=i.align;let c=a.lineHeight/2;"bottom"===t||"center"===t||F(t)?(c+=r.bottom,$(i.text)&&(c+=a.lineHeight*(i.text.length-1))):c+=r.top;const{titleX:d,titleY:h,maxWidth:u,rotation:f}=function ch(e,n,t,i){const{top:s,left:a,bottom:r,right:l,chart:c}=e,{chartArea:d,scales:h}=c;let f,p,g,u=0;const m=r-s,_=l-a;if(e.isHorizontal()){if(p=et(i,a,l),F(t)){const b=Object.keys(t)[0];g=h[b].getPixelForValue(t[b])+m-n}else g="center"===t?(d.bottom+d.top)/2+m-n:Mo(e,t,n);f=l-a}else{if(F(t)){const b=Object.keys(t)[0];p=h[b].getPixelForValue(t[b])-_+n}else p="center"===t?(d.left+d.right)/2-_+n:Mo(e,t,n);g=et(i,r,s),u="left"===t?-Y:Y}return{titleX:p,titleY:g,maxWidth:f,rotation:u}}(this,c,t,l);Vt(n,i.text,0,0,a,{color:i.color,maxWidth:u,rotation:f,textAlign:lh(l,t,s),textBaseline:"middle",translation:[d,h]})}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===Xt.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 X(this.options.ticks.setContext(this.getContext(n)).font)}_maxDigits(){const n=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/n}}class bn{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 uh(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 dh(e,n,t){const i=xe(Object.create(null),[t?N.get(t):{},N.get(n),e.defaults]);N.set(n,i),e.defaultRoutes&&function hh(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(".");N.route(a,s,c,l)})}(n,e.defaultRoutes),e.descriptors&&N.describe(n,e.descriptors)}(n,r,i),this.override&&N.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 N[s]&&(delete N[s][i],this.override&&delete Bt[i])}}class fh{constructor(){this.controllers=new bn(Dt,"datasets",!0),this.elements=new bn(Ot,"elements"),this.plugins=new bn(Object,"plugins"),this.scales=new bn(Xt,"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):w(s,r=>{const l=i||this._getRegistryForType(r);this._exec(n,l,r)})})}_exec(n,t,i){const s=Zn(n);L(i["before"+s],[],i),t[n](i),L(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 fh;class ph{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===L(r[i],[t,s,a.options],r)&&s.cancelable)return!1}return!0}invalidate(){E(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 gh(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 _h(e,{plugins:n,localIds:t},i,s){const a=[],r=e.getContext();for(const l of n){const c=l.id,d=mh(i[c],s);null!==d&&a.push({plugin:l,options:bh(e.config,{plugin:l,local:t[c]},d,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 mh(e,n){return n||!1!==e?!0===e?{}:e:null}function bh(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 Si(e,n){return((n.datasets||{})[e]||{}).indexAxis||n.indexAxis||(N.datasets[e]||{}).indexAxis||"x"}function To(e){if("x"===e||"y"===e||"r"===e)return e}
1function vh(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function Oi(e,...n){if(To(e))return e;for(const t of n){const i=t.axis||vh(t.position)||e.length>1&&To(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Ro(e,n,t){if(t[n+"AxisID"]===e)return{axis:n}}function Io(e){const n=e.options||(e.options={});n.plugins=R(n.plugins,{}),n.scales=function Mh(e,n){const t=Bt[e.type]||{scales:{}},i=n.scales||{},s=Si(e.type,n),a=Object.create(null);return Object.keys(i).forEach(r=>{const l=i[r];if(!F(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=Oi(r,l,function Ch(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 Ro(e,"x",t[0])||Ro(e,"y",t[0])}return{}}(r,e),N.scales[l.type]),d=function xh(e,n){return e===n?"_index_":"_value_"}(c,s),h=t.scales||{};a[r]=ve(Object.create(null),[{axis:c},l,h[c],h[d]])}),e.data.datasets.forEach(r=>{const l=r.type||e.type,c=r.indexAxis||Si(l,n),h=(Bt[l]||{}).scales||{};Object.keys(h).forEach(u=>{const f=function yh(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),ve(a[p],[{axis:f},i[p],h[u]])})}),Object.keys(a).forEach(r=>{const l=a[r];ve(l,[N.scales[l.type],N.scale])}),a}(e,n)}function Po(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const Eo=new Map,Fo=new Set;function yn(e,n){let t=Eo.get(e);return t||(t=n(),Eo.set(e,t),Fo.add(t)),t}const Le=(e,n,t)=>{const i=It(n,t);void 0!==i&&e.add(i)};class Oh{constructor(n){this._config=function Sh(e){return(e=e||{}).data=Po(e.data),Io(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=Po(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(),Io(n)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(n){return yn(n,()=>[[`datasets.${n}`,""]])}datasetAnimationScopeKeys(n,t){return yn(`${n}.transition.${t}`,()=>[[`datasets.${n}.transitions.${t}`,`transitions.${t}`],[`datasets.${n}`,""]])}datasetElementScopeKeys(n,t){return yn(`${n}-${t}`,()=>[[`datasets.${n}.elements.${t}`,`datasets.${n}`,`elements.${t}`,""]])}pluginScopeKeys(n){const t=n.id;return yn(`${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(h=>{n&&(c.add(n),h.forEach(u=>Le(c,n,u))),h.forEach(u=>Le(c,s,u)),h.forEach(u=>Le(c,Bt[a]||{},u)),h.forEach(u=>Le(c,N,u)),h.forEach(u=>Le(c,ai,u))});const d=Array.from(c);return 0===d.length&&d.push(Object.create(null)),Fo.has(t)&&r.set(t,d),d}chartOptionScopes(){const{options:n,type:t}=this;return[n,Bt[t]||{},N.datasets[t]||{},{type:t},N,ai]}resolveNamedOptions(n,t,i,s=[""]){const a={$shared:!0},{resolver:r,subPrefixes:l}=Ao(this._resolverCache,n,s);let c=r;(function Th(e,n){const{isScriptable:t,isIndexable:i}=As(e);for(const s of n){const a=t(s),r=i(s),l=(r||a)&&e[s];if(a&&(Pt(l)||kh(l))||r&&$(l))return!0}return!1})(r,t)&&(a.$shared=!1,c=ae(r,i=Pt(i)?i():i,this.createResolver(n,i,l)));for(const d of t)a[d]=c[d];return a}createResolver(n,t,i=[""],s){const{resolver:a}=Ao(this._resolverCache,n,i);return F(t)?ae(a,t,void 0,s):a}}function Ao(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:di(n,t),subPrefixes:t.filter(l=>!l.toLowerCase().includes("hover"))},i.set(s,a)),a}const kh=e=>F(e)&&Object.getOwnPropertyNames(e).some(n=>Pt(e[n])),Ih=["top","bottom","left","right","chartArea"];function Do(e,n){return"top"===e||"bottom"===e||-1===Ih.indexOf(e)&&"x"===n}function wo(e,n){return function(t,i){return t[e]===i[e]?t[n]-i[n]:t[e]-i[e]}}function jo(e){const n=e.chart,t=n.options.animation;n.notifyPlugins("afterRender"),L(t&&t.onComplete,[e],n)}function Ph(e){const n=e.chart,t=n.options.animation;L(t&&t.onProgress,[e],n)}function Lo(e){return fi()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const xn={},No=e=>{const n=Lo(e);return Object.values(xn).filter(t=>t.canvas===n).pop()};function Eh(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 vn=(()=>class e{static defaults=N;static instances=xn;static overrides=Bt;static registry=mt;static version="4.5.1";static getChart=No;static register(...t){mt.add(...t),$o()}static unregister(...t){mt.remove(...t),$o()}constructor(t,i){const s=this.config=new Oh(i),a=Lo(t),r=No(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 Kd(e){return!fi()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Ld:Jd}(a)),this.platform.updateConfig(s);const c=this.platform.acquireContext(a,l.aspectRatio),d=c&&c.canvas,h=d&&d.height,u=d&&d.width;this.id=Pl(),this.ctx=c,this.canvas=d,this.width=u,this.height=h,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 ph,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function Ul(e,n){let t;return function(...i){return n?(clearTimeout(t),t=setTimeout(e,n,i)
1):e.apply(this,i),n}}(f=>this.update(f),l.resizeDelay||0),this._dataChanges=[],xn[this.id]=this,c&&d?(St.listen(this,"complete",jo),St.listen(this,"progress",Ph),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 E(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 Ps(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(),d=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}),L(s.onResize,[this,l],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){w(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],d=Oi(l,c),h="r"===d,u="x"===d;return{options:c,dposition:h?"chartArea":u?"bottom":"left",dtype:h?"radialLinear":u?"category":"linear"}}))),w(r,l=>{const c=l.options,d=c.id,h=Oi(d,c),u=R(c.type,l.dtype);(void 0===c.position||Do(c.position,h)!==Do(l.dposition))&&(c.position=l.dposition),a[d]=!0;let f=null;d in s&&s[d].type===u?f=s[d]:(f=new(mt.getScale(u))({id:d,type:u,ctx:this.ctx,chart:this}),s[f.id]=f),f.init(c,t)}),w(a,(l,c)=>{l||delete s[c]}),w(s,l=>{it.configure(this,l,l.options),it.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(wo("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||Si(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 d=mt.getController(c),{datasetElementType:h,dataElementType:u}=N.datasets[c];Object.assign(d,{dataElementType:mt.getElement(u),datasetElementType:h&&mt.getElement(h)}),l.controller=new d(this,s),t.push(l.controller)}}return this._updateMetasets(),t}_resetElements(){w(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 h=0,u=this.data.datasets.length;h<u;h++){const{controller:f}=this.getDatasetMeta(h),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||w(r,h=>{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(wo("z","_idx"));const{_active:c,_lastEvent:d}=this;d?this._eventHandler(d,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){w(this.scales,t=>{it.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,i=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!us(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)Eh(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(!us(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;it.update(this,this.width,this.height,t);const i=this.chartArea,s=i.width<=0||i.height<=0;this._layers=[],w(this.boxes,a=>{s&&"chartArea"===a.position||(a.configure&&a.configure(),this._layers.push(...a._layers()))}
vendor: 7,383 bytes, line 1
1,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,Pt(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(),jo({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=Qs(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(a&&ln(i,a),t.controller.draw(),a&&cn(i),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Mt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,i,s,a){const r=Id.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=Ft(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);Ce(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(),Ps(t,i),this.platform.releaseContext(i),this.canvas=null,this.ctx=null),delete xn[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)};w(this.options.events,r=>s(r,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,i=this.platform,s=(d,h)=>{i.addEventListener(this,d,h),t[d]=h},a=(d,h)=>{t[d]&&(i.removeEventListener(this,d,h),delete t[d])},r=(d,h)=>{this.canvas&&this.resize(d,h)};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(){w(this._listeners,(t,i)=>{this.platform.removeEventListener(this,i,t)}),this._listeners={},w(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,d;for("dataset"===i&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+a+"DatasetHoverStyle"]()),c=0,d=t.length;c<d;++c){l=t[c];const h=l&&this.getDatasetMeta(l.datasetIndex).controller;h&&h[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}});!en(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=(d,h)=>d.filter(u=>!h.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),d=function jl(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(t),h=function Fh(e,n,t,i){return t&&"mouseout"!==e.type?i?n:e:null}(t,this._lastEvent,s,d);s&&(this._lastEvent=null,L(r.onHover,[t,c,this],this),d&&L(r.onClick,[t,c,this],this));const u=!en(c,a);return(u||i)&&(this._active=c,this._updateHoverStyles(c,a,i)),this._lastEvent=h,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 $o(){return w(vn.instances,e=>e._plugins.invalidate())}function ce(e,n,t,i){return{x:t+e*Math.cos(n),y:i+e*Math.sin(n)}}function Cn(e,n,t,i,s,a){const{x:r,y:l,startAngle:c,pixelMargin:d,innerRadius:h}=n,u=Math.max(n.outerRadius+i+t-d,0),f=h>0?h+i+t+d:0;let p=0;const g=s-c;if(i){const W=((h>0?h-i:0)+(u>0?u-i:0))/2;p=(g-(0!==W?g*W/(W+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 jh(e,n,t,i){const s=function wh(e){return ci(e,["outerStart","outerEnd","innerStart","innerEnd"])}(e.options.borderRadius),a=(t-n)/2,r=Math.min(a,i*n/2),l=c=>
1{const d=(t-Math.min(a,c))*i/2;return Q(c,0,Math.min(a,d))};return{outerStart:l(s.outerStart),outerEnd:l(s.outerEnd),innerStart:Q(s.innerStart,0,r),innerEnd:Q(s.innerEnd,0,r)}}(n,f,u,y-b),k=u-v,O=u-M,T=b+v/k,P=y-M/O,I=f+x,A=f+C,Z=b+x/I,lt=y-C/A;if(e.beginPath(),a){const j=(T+P)/2;if(e.arc(r,l,u,T,j),e.arc(r,l,u,j,P),M>0){const st=ce(O,P,r,l);e.arc(st.x,st.y,M,P,y+Y)}const V=ce(A,y,r,l);if(e.lineTo(V.x,V.y),C>0){const st=ce(A,lt,r,l);e.arc(st.x,st.y,C,y+Y,lt+Math.PI)}const W=(y-C/f+(b+x/f))/2;if(e.arc(r,l,f,y-C/f,W,!0),e.arc(r,l,f,W,b+x/f,!0),x>0){const st=ce(I,Z,r,l);e.arc(st.x,st.y,x,Z+Math.PI,b-Y)}const pt=ce(k,b,r,l);if(e.lineTo(pt.x,pt.y),v>0){const st=ce(k,T,r,l);e.arc(st.x,st.y,v,b-Y,T)}}else{e.moveTo(r,l);const j=Math.cos(T)*u+r,V=Math.sin(T)*u+l;e.lineTo(j,V);const W=Math.cos(P)*u+r,pt=Math.sin(P)*u+l;e.lineTo(W,pt)}e.closePath()}function Bo(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 Bh(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),d=Math.min(a,l);return{count:i,start:c,loop:n.loop,ilen:d<c&&!(s<r&&a<r||s>l&&a>l)?i+d-c:d-c}}function Vh(e,n,t,i){const{points:s,options:a}=n,{count:r,start:l,loop:c,ilen:d}=Go(s,t,i),h=function Gh(e){return e.stepped?oc:e.tension||"monotone"===e.cubicInterpolationMode?ac:Bh}(a);let p,g,m,{move:u=!0,reverse:f}=i||{};for(p=0;p<=d;++p)g=s[(l+(f?d-p:p))%r],!g.skip&&(u?(e.moveTo(g.x,g.y),u=!1):h(e,m,g,f,a.stepped),m=g);return c&&(g=s[(l+(f?d:0))%r],h(e,m,g,f,a.stepped)),!!c}function zh(e,n,t,i){const s=n.points,{count:a,start:r,ilen:l}=Go(s,t,i),{move:c=!0,reverse:d}=i||{};let f,p,g,m,_,b,h=0,u=0;const y=M=>(r+(d?l-M:M))%a,v=()=>{m!==_&&(e.lineTo(h,_),e.lineTo(h,m),e.lineTo(h,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),h=(u*h+M)/++u):(v(),e.lineTo(M,x),g=C,u=0,m=_=x),b=x}v()}function ki(e){const n=e.options;return e._decimated||e._loop||n.tension||"monotone"===n.cubicInterpolationMode||n.stepped||n.borderDash&&n.borderDash.length?Vh:zh}const Uh="function"==typeof Path2D;let Mn=(()=>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||(Pc(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 Yc(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 zc(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 Js(e,n,t,i){return i&&i.setContext&&t?function Wc(e,n,t,i){const s=e._chart.getContext(),a=Ks(e.options),{_datasetIndex:r,options:{spanGaps:l}}=e,c=t.length,d=[];let h=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&&(d.push({start:g%c,end:m%c,loop:_,style:b}),h=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];_=Ks(i.setContext(Ft(s,{type:"segment",p0:m,p1:b,p0DataIndex:(f-1)%c,p1DataIndex:f%c,datasetIndex:r}))),Uc(_,h)&&p(u,f-1,g.loop,h),m=b,h=_}u<f-1&&p(u,f-1,g.loop,h)}return d}(e,n,t,i):n}(e,!0===i?[{start:r,end:l,loop:a}]:function Hc(e,n,t,i){const s=e.length,a=[];let c,r=n,l=e[n];for(c=n+1;c<=t;++c){const d=e[c%s];d.skip||d.stop?l.skip||(a.push({start:n%s,end:(c-1)%s,loop:i=!1}),n=r=d.stop?c:null):(r=c,l.skip&&(n=c)),l=d}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=Xs(this,{property:i,start:a,end:a});if(!l.length)return;const c=[],d=function Hh(e){return e.stepped?Nc:e.tension||"monotone"===e.cubicInterpolationMode?$c:Wt}(s);let h,u;
1for(h=0,u=l.length;h<u;++h){const{start:f,end:p}=l[h],g=r[f],m=r[p];if(g===m){c.push(g);continue}const b=d(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 ki(this)(t,this,i,s)}path(t,i,s){const a=this.segments,r=ki(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 Xh(e,n,t,i){Uh&&!n.options.segment?function Yh(e,n,t,i){let s=n._path;s||(s=n._path=new Path2D,n.path(s,t,i)&&s.closePath()),Bo(e,n.options),e.stroke(s)}(e,n,t,i):function Wh(e,n,t,i){const{segments:s,options:a}=n,r=ki(n);for(const l of s)Bo(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 Vo(e,n,t,i){const s=e.options,{[t]:a}=e.getProps([t],i);return Math.abs(n-a)<s.radius+s.hitRadius}let Jh=(()=>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 Vo(this,t,"x",i)}inYRange(t,i){return Vo(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,li(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}})();function zo(e,n){const{x:t,y:i,base:s,width:a,height:r}=e.getProps(["x","y","base","width","height"],n);let l,c,d,h,u;return e.horizontal?(u=r/2,l=Math.min(t,s),c=Math.max(t,s),d=i-u,h=i+u):(u=a/2,l=t-u,c=t+u,d=Math.min(i,s),h=Math.max(i,s)),{left:l,top:d,right:c,bottom:h}}function wt(e,n,t,i){return e?0:Q(n,t,i)}function Ti(e,n,t,i){const s=null===n,a=null===t,l=e&&!(s&&a)&&zo(e,i);return l&&(s||vt(n,l.left,l.right))&&(a||vt(t,l.top,l.bottom))}function tu(e,n){e.rect(n.x,n.y,n.w,n.h)}function Ri(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 nu=Object.freeze({__proto__:null,ArcElement:class $h 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}=_s(s,{x:n,y:t}),{startAngle:l,endAngle:c,innerRadius:d,outerRadius:h,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),f=(this.options.spacing+this.options.borderWidth)/2,p=R(u,c-l),g=Se(a,l,c)&&l!==c,m=p>=B||g,_=vt(r,d+f,h+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:d}=this.options,h=(s+a)/2,u=(r+l+d+c)/2;return{x:t+Math.cos(h)*u,y:i+Math.sin(h)*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>B?Math.floor(i/B):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 d=s*(1-Math.sin(Math.min(D,i||0)));n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,function Lh(e,n,t,i,s){const{fullCircles:a,startAngle:r,circumference:l}=n;let c=n.endAngle;if(a){Cn(e,n,t,i,c,s);for(let d=0;d<a;++d)e.fill();isNaN(l)||(c=r+(l%B||B))}Cn(e,n,t,i,c,s),e.fill()}(n,this,d,a,r),function Nh(e,n,t,i,s){const{fullCircles:a,startAngle:r,circumference:l,options:c}=n,{borderWidth:d,borderJoinStyle:h,borderDash:u,borderDashOffset:f,borderRadius:p}=c,g="inner"===c.borderAlign;if(!d)return;e.setLineDash(u||[]),e.lineDashOffset=f,g?(e.lineWidth=2*d,e.lineJoin=
1h||"round"):(e.lineWidth=d,e.lineJoin=h||"bevel");let m=n.endAngle;if(a){Cn(e,n,t,i,m,s);for(let _=0;_<a;++_)e.stroke();isNaN(l)||(m=r+(l%B||B))}g&&function Dh(e,n,t){const{startAngle:i,pixelMargin:s,x:a,y:r,outerRadius:l,innerRadius:c}=n;let d=s/l;e.beginPath(),e.arc(a,r,l,i-d,t+d),c>s?(d=s/c,e.arc(a,r,c,t+d,i-d,!0)):e.arc(a,r,s,t+Y,i-Y),e.closePath(),e.clip()}(e,n,m),c.selfJoin&&m-r>=D&&0===p&&"miter"!==h&&function Ah(e,n,t){const{startAngle:i,x:s,y:a,outerRadius:r,innerRadius:l,options:c}=n,{borderWidth:d,borderJoinStyle:h}=c,u=Math.min(d/r,tt(i-t));if(e.beginPath(),e.arc(s,a,r-d/2,i+u/2,t-u/2),l>0){const f=Math.min(d/l,tt(i-t));e.arc(s,a,l+d/2,t-f/2,i+f/2,!0)}else{const f=Math.min(d/2,r*tt(i-t));if("round"===h)e.arc(s,a,f,t-D/2,i+D/2,!0);else if("bevel"===h){const p=2*f*f,g=-p*Math.cos(t+D/2)+s,m=-p*Math.sin(t+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||(Cn(e,n,t,i,m,s),e.stroke())}(n,this,d,a,r),n.restore()}},BarElement:class eu 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 qh(e){const n=zo(e),t=n.right-n.left,i=n.bottom-n.top,s=function Kh(e,n,t){const s=e.borderSkipped,a=Fs(e.options.borderWidth);return{t:wt(s.top,a.top,0,t),r:wt(s.right,a.right,0,n),b:wt(s.bottom,a.bottom,0,t),l:wt(s.left,a.left,0,n)}}(e,t/2,i/2),a=function Qh(e,n,t){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,a=zt(s),r=Math.min(n,t),l=e.borderSkipped,c=i||F(s);return{topLeft:wt(!c||l.top||l.left,a.topLeft,0,r),topRight:wt(!c||l.top||l.right,a.topRight,0,r),bottomLeft:wt(!c||l.bottom||l.left,a.bottomLeft,0,r),bottomRight:wt(!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 Zh(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}(r.radius)?Re:tu;n.save(),(r.w!==a.w||r.h!==a.h)&&(n.beginPath(),l(n,Ri(r,t,a)),n.clip(),l(n,Ri(a,-t,r)),n.fillStyle=i,n.fill("evenodd")),n.beginPath(),l(n,Ri(a,t)),n.fillStyle=s,n.fill(),n.restore()}inRange(n,t,i){return Ti(this,n,t,i)}inXRange(n,t){return Ti(this,n,null,t)}inYRange(n,t){return Ti(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:Mn,PointElement:Jh});const Ii=["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)"],Ho=Ii.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Yo(e){return Ii[e%Ii.length]}function Wo(e){return Ho[e%Ho.length]}function Uo(e){let n;for(n in e)if(e[n].borderColor||e[n].backgroundColor)return!0;return!1}var cu={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=Uo(i)||function ru(e){return e&&(e.borderColor||e.backgroundColor)}(s)||a&&Uo(a)||function lu(){return"rgba(0,0,0,0.1)"!==N.borderColor||"rgba(0,0,0,0.1)"!==N.backgroundColor}();if(!t.forceOverride&&r)return;const l=function au(e){let n=0;return(t,i)=>{const s=e.getDatasetMeta(i).controller;s instanceof yi?n=function su(e,n){return e.backgroundColor=e.data.map(()=>Yo(n++)),n}(t,n):s instanceof ho?n=function ou(e,n){return e.backgroundColor=e.data.map(()=>Wo(n++)),n}(t,n):s&&(n=function iu(e,n){return e.borderColor=Yo(n),e.backgroundColor=Wo(n),++n}(t,n))}}(e);
1i.forEach(l)}};function Xo(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 Jo(e){e.data.datasets.forEach(n=>{Xo(n)})}var fu={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,n,t)=>{if(!t.enabled)return void Jo(e);const i=e.width;e.data.datasets.forEach((s,a)=>{const{_data:r,indexAxis:l}=s,c=e.getDatasetMeta(a),d=r||s.data;if("y"===Ie([l,e.options.indexAxis])||!c.controller.supportsDecimation)return;const h=e.scales[c.xAxisID];if("linear"!==h.type&&"time"!==h.type||e.options.parsing)return;let g,{start:u,count:f}=function uu(e,n){const t=n.length;let s,i=0;const{iScale:a}=e,{min:r,max:l,minDefined:c,maxDefined:d}=a.getUserBounds();return c&&(i=Q(Ct(n,a.axis,r).lo,0,t-1)),s=d?Q(Ct(n,a.axis,l).hi+1,i,t)-i:t-i,{start:i,count:s}}(c,d);if(f<=(t.threshold||4*i))Xo(s);else{switch(E(r)&&(s._data=d,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 du(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 d=n+t-1;let u,f,p,g,m,h=n;for(r[c++]=e[h],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,k=Math.min(Math.floor((u+1)*l)+1,t)+n,{x:O,y:T}=e[h];for(p=g=-1,y=C;y<k;y++)g=.5*Math.abs((O-_)*(e[y].y-T)-(O-e[y].x)*(b-T)),g>p&&(p=g,f=e[y],m=y);r[c++]=f,h=m}return r[c++]=e[d],r}(d,u,f,i,t);break;case"min-max":g=function hu(e,n,t,i){let r,l,c,d,h,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,d=l.y;const x=0|c;if(x===h)d<g?(g=d,u=r):d>m&&(m=d,f=r),s=(a*s+l.x)/++a;else{const C=r-1;if(!E(u)&&!E(f)){const k=Math.min(u,f),O=Math.max(u,f);k!==p&&k!==C&&_.push({...e[k],x:s}),O!==p&&O!==C&&_.push({...e[O],x:s})}r>0&&C!==p&&_.push(e[C]),_.push(l),h=x,a=0,g=m=d,u=f=p=r}}return _}(d,u,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}s._decimated=g}})},destroy(e){Jo(e)}};function Pi(e,n,t,i){if(i)return;let s=n[e],a=t[e];return"angle"===e&&(s=tt(s),a=tt(a)),{property:e,start:s,end:a}}function Sn(e,n,t){for(;n>e;n--){const i=t[n];if(!isNaN(i.x)&&!isNaN(i.y))break}return n}function Ko(e,n,t,i){return e&&n?i(e[t],n[t]):e?e[t]:n?n[t]:0}function Qo(e,n){let t=[],i=!1;return $(e)?(i=!0,t=e):t=function gu(e,n){const{x:t=null,y:i=null}=e||{},s=n.points,a=[];return n.segments.forEach(({start:r,end:l})=>{l=Sn(r,l,s);const c=s[r],d=s[l];null!==i?(a.push({x:c.x,y:i}),a.push({x:d.x,y:i})):null!==t&&(a.push({x:t,y:c.y}),a.push({x:t,y:d.y}))}),a}(e,n),t.length?new Mn({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function qo(e){return e&&!1!==e.fill}function mu(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(!H(s))return s;if(r=e[s],!r)return!1;if(r.visible)return s;a.push(s),s=r.fill}return!1}function _u(e,n,t){const i=function vu(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(F(i))return!isNaN(i.value)&&i;let s=parseFloat(i);return H(s)&&Math.floor(s)===s?function bu(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 Su(e,n,t){const i=[];for(let s=0;s<t.length;s++){const a=t[s],{first:r,last:l,point:c}=Ou(a,n,"x");if(!(!c||r&&l))if(r)i.unshift(c);else if(e.push(c),!l)break}e.push(...i)}function Ou(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 d=0;d<a.length;d++){const h=a[d],u=r[h.start][t],f=r[h.end][t];if(vt(s,u,f)){l=s===u,c=s===f;break}}return{first:l,last:c,point:i}}class Zo{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:B}).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 Ei(e,n,t){const i=function ku(e){const{chart:n,fill:t,line:i}=e;if(H(t))return function Tu(e,n){const t=e.getDatasetMeta(n);return t&&e.isDatasetVisible(n)?t.dataset:null}(n,t);if("stack"===t)return function Cu(e){const{scale:n,index:t,line:i}=e,s=[],a=i.segments,r=i.points,l=function Mu(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(Qo({x:null,y:n.bottom},i));for(let c=0;c<a.length;c++){const d=a[c];for(let h=d.start;h<=d.end;h++)Su(s,r[h],l)}return new Mn({points:s,options:{}})}(e);if("shape"===t)return!0;const s=function Ru(e){return(e.scale||{}).getPointPositionForValue?function Pu(e){const{scale:n,fill:t}=e,i=n.options,s=n.getLabels().length,a=i.reverse?n.max:n.min,r=function xu(e,n,t){let i;return i="start"===e?t:"end"===e?n.options.reverse?n.min:n.max:F(e)?e.value:n.getBaseValue(),i}(t,n,a),l=[];
vendor: 5,743 bytes, line 1
1if(i.grid.circular){const c=n.getPointPositionForValue(0,a);return new Zo({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 Iu(e){const{scale:n={},fill:t}=e,i=function yu(e,n){let t=null;return"start"===e?t=n.bottom:"end"===e?t=n.top:F(e)?t=n.getPixelForValue(e.value):n.getBasePixel&&(t=n.getBasePixel()),t}(t,n);if(H(i)){const s=n.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}(e)}(e);return s instanceof Zo?s:Qo(s,i)}(n),{chart:s,index:a,line:r,scale:l,axis:c}=n,d=r.options,h=d.fill,u=d.backgroundColor,{above:f=u,below:p=u}=h||{},g=s.getDatasetMeta(a),m=Qs(s,g);i&&r.points.length&&(ln(e,t),function Eu(e,n){const{line:t,target:i,above:s,below:a,area:r,scale:l,clip:c}=n,d=t._loop?"angle":n.axis;e.save();let h=a;a!==s&&("x"===d?(ta(e,i,r.top),Fi(e,{line:t,target:i,color:s,scale:l,property:d,clip:c}),e.restore(),e.save(),ta(e,i,r.bottom)):"y"===d&&(ea(e,i,r.left),Fi(e,{line:t,target:i,color:a,scale:l,property:d,clip:c}),e.restore(),e.save(),ea(e,i,r.right),h=s)),Fi(e,{line:t,target:i,color:h,scale:l,property:d,clip:c}),e.restore()}(e,{line:r,target:i,above:f,below:p,area:t,scale:l,axis:c,clip:m}),cn(e))}function ta(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:d}=l,h=s[c],u=s[Sn(c,d,s)];a?(e.moveTo(h.x,h.y),a=!1):(e.lineTo(h.x,t),e.lineTo(h.x,h.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 ea(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:d}=l,h=s[c],u=s[Sn(c,d,s)];a?(e.moveTo(h.x,h.y),a=!1):(e.lineTo(t,h.y),e.lineTo(h.x,h.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 Fi(e,n){const{line:t,target:i,property:s,color:a,scale:r,clip:l}=n,c=function pu(e,n,t){const i=e.segments,s=e.points,a=n.points,r=[];for(const l of i){let{start:c,end:d}=l;d=Sn(c,d,s);const h=Pi(t,s[c],s[d],l.loop);if(!n.segments){r.push({source:l,target:h,start:s[c],end:s[d]});continue}const u=Xs(n,h);for(const f of u){const p=Pi(t,a[f.start],a[f.end],f.loop),g=Us(l,s,p);for(const m of g)r.push({source:m,target:f,start:{[t]:Ko(h,p,"start",Math.max)},end:{[t]:Ko(h,p,"end",Math.min)}})}}return r}(t,i,s);for(const{source:d,target:h,start:u,end:f}of c){const{style:{backgroundColor:p=a}={}}=d,g=!0!==i;e.save(),e.fillStyle=p,Fu(e,r,l,g&&Pi(s,u,f)),e.beginPath();const m=!!t.pathSegment(e,d);let _;if(g){m?e.closePath():na(e,i,f,s);const b=!!i.pathSegment(e,h,{move:m,reverse:!0});_=m&&b,_||na(e,i,u,s)}e.closePath(),e.fill(_?"evenodd":"nonzero"),e.restore()}}function Fu(e,n,t,i){const s=n.chart.chartArea,{property:a,start:r,end:l}=i||{};if("x"===a||"y"===a){let c,d,h,u;"x"===a?(c=r,d=s.top,h=l,u=s.bottom):(c=s.left,d=r,h=s.right,u=l),e.beginPath(),t&&(c=Math.max(c,t.left),h=Math.min(h,t.right),d=Math.max(d,t.top),u=Math.min(u,t.bottom)),e.rect(c,d,h-c,u-d),e.clip()}}function na(e,n,t,i){const s=n.interpolate(t,i);s&&e.lineTo(s.x,s.y)}var Au={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 Mn&&(c={visible:e.isDatasetVisible(r),index:r,fill:_u(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=mu(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&&Ei(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;qo(a)&&Ei(e.ctx,a,e.chartArea)}},beforeDatasetDraw(e,n,t){const i=n.meta.$filler;!qo(i)||"beforeDatasetDraw"!==t.drawTime||Ei(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ia=(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 sa 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=L(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=X(i.font),a=s.size,r=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=ia(i,a);let d,h;t.font=s.string,this.isHorizontal()?(d=this.maxWidth,h=this._fitRows(r,a,l,c)+10):(h=this.maxHeight,d=this._fitCols(r,s,l,c)+10),this.width=Math.min(d,n.maxWidth||this.maxWidth),this.height=Math.min(h,n.maxHeight||this.maxHeight)}
1_fitRows(n,t,i,s){const{ctx:a,maxWidth:r,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],h=s+l;let u=n;a.textAlign="left",a.textBaseline="middle";let f=-1,p=-h;return this.legendItems.forEach((g,m)=>{const _=i+t/2+a.measureText(g.text).width;(0===m||d[d.length-1]+_+2*l>r)&&(u+=h,d[d.length-(m>0?0:1)]=0,p+=h,f++),c[m]={left:0,top:p,row:f,width:_,height:s},d[d.length-1]+=_+l}),u}_fitCols(n,t,i,s){const{ctx:a,maxHeight:r,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],h=r-n;let u=l,f=0,p=0,g=0,m=0;return this.legendItems.forEach((_,b)=>{const{itemWidth:y,itemHeight:v}=function wu(e,n,t,i,s){const a=function ju(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 Lu(e,n,t){let i=e;return"string"!=typeof n.text&&(i=oa(n,t)),i}(s,i,n.lineHeight);return{itemWidth:a,itemHeight:r}}(i,t,a,_,s);b>0&&p+v+2*l>h&&(u+=f+l,d.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,d.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=le(a,this.left,this.width);if(this.isHorizontal()){let l=0,c=et(i,this.left+s,this.right-this.lineWidths[l]);for(const d of t)l!==d.row&&(l=d.row,c=et(i,this.left+s,this.right-this.lineWidths[l])),d.top+=this.top+n+s,d.left=r.leftForLtr(r.x(c),d.width),c+=d.width+s}else{let l=0,c=et(i,this.top+n+s,this.bottom-this.columnSizes[l].height);for(const d of t)d.col!==l&&(l=d.col,c=et(i,this.top+n+s,this.bottom-this.columnSizes[l].height)),d.top=c,d.left+=this.left+s,d.left
vendor: 8,419 bytes, line 1
1=r.leftForLtr(r.x(d.left),d.width),c+=d.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const n=this.ctx;ln(n,this),this._draw(),cn(n)}}_draw(){const{options:n,columnSizes:t,lineWidths:i,ctx:s}=this,{align:a,labels:r}=n,l=N.color,c=le(n.rtl,this.left,this.width),d=X(r.font),{padding:h}=r,u=d.size,f=u/2;let p;this.drawTitle(),s.textAlign=c.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=d.string;const{boxWidth:g,boxHeight:m,itemHeight:_}=ia(r,u),v=this.isHorizontal(),M=this._computeTitleHeight();p=v?{x:et(a,this.left+h,this.right-i[0]),y:this.top+h+M,line:0}:{x:this.left+h,y:et(a,this.top+M+h,this.bottom-t[0].height),line:0},zs(this.ctx,n.textDirection);const x=_+h;this.legendItems.forEach((C,k)=>{s.strokeStyle=C.fontColor,s.fillStyle=C.fontColor;const O=s.measureText(C.text).width,T=c.textAlign(C.textAlign||(C.textAlign=r.textAlign)),P=g+f+O;let I=p.x,A=p.y;c.setWidth(this.width),v?k>0&&I+P+h>this.right&&(A=p.y+=x,p.line++,I=p.x=et(a,this.left+h,this.right-i[p.line])):k>0&&A+x>this.bottom&&(I=p.x=I+t[p.line].width+h,p.line++,A=p.y=et(a,this.top+M+h,this.bottom-t[p.line].height)),function(C,k,O){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;s.save();const T=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=T,s.strokeStyle=R(O.strokeStyle,l),s.setLineDash(R(O.lineDash,[])),r.usePointStyle){const P={radius:m*Math.SQRT2/2,pointStyle:O.pointStyle,rotation:O.rotation,borderWidth:T},I=c.xPlus(C,g/2);Es(s,P,I,k+f,r.pointStyleWidth&&g)}else{const P=k+Math.max((u-m)/2,0),I=c.leftForLtr(C,g),A=zt(O.borderRadius);s.beginPath(),Object.values(A).some(Z=>0!==Z)?Re(s,{x:I,y:P,w:g,h:m,radius:A}):s.rect(I,P,g,m),s.fill(),0!==T&&s.stroke()}s.restore()}(c.x(I),A,C),I=((e,n,t,i)=>e===(i?"left":"right")?t:"center"===e?(n+t)/2:n)(T,I+g+f,v?I+P:this.right,n.rtl),function(C,k,O){Vt(s,O.text,C,k+_/2,d,{strikethrough:O.hidden,textAlign:c.textAlign(O.textAlign)})}(c.x(I),A,C),v?p.x+=P+h:p.y+="string"!=typeof C.text?oa(C,d.lineHeight)+h:x}),Hs(this.ctx,n.textDirection)}drawTitle(){const n=this.options,t=n.title,i=X(t.font),s=nt(t.padding);if(!t.display)return;const a=le(n.rtl,this.left,this.width),r=this.ctx,l=t.position,d=s.top+i.size/2;let h,u=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),h=this.top+d,u=et(n.align,u,this.right-f);else{const g=this.columnSizes.reduce((m,_)=>Math.max(m,_.height),0);h=d+et(n.align,this.top,this.bottom-g-n.labels.padding-this._computeTitleHeight())}const p=et(l,u,u+f);r.textAlign=a.textAlign(ii(l)),r.textBaseline="middle",r.strokeStyle=t.color,r.fillStyle=t.color,r.font=i.string,Vt(r,t.text,p,h,i)}_computeTitleHeight(){const n=this.options.title,t=X(n.font),i=nt(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 Nu(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&&L(t.onLeave,[n,s,this],this),this._hoveredItem=i,i&&!a&&L(t.onHover,[n,i,this],this)}else i&&L(t.onClick,[n,i,this],this)}}function oa(e,n){return n*(e.text?e.text.length:0)}var $u={id:"legend",_element:sa,start(e,n,t){const i=e.legend=new sa({ctx:e.ctx,options:t,chart:e});it.configure(e,i,t),it.addBox(e,i)},stop(e){it.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,n,t){const i=e.legend;it.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 d=c.controller.getStyle(t?0:void 0),h=nt(d.borderWidth);return{text:n[c.index].label,fillStyle:d.backgroundColor,fontColor:a,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:d.borderColor,pointStyle:i||d.pointStyle,rotation:d.rotation,textAlign:s||d.textAlign,borderRadius:r&&(l||d.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)}}};class Ai 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=$(i.text)?i.text.length:1;this._padding=nt(i.padding);const a=s*X(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 d,h,u,c=0;return this.isHorizontal()?(h=et(l,i,a),u=t+n,d=a-i):("left"===r.position?(h=i+n,u=et(l,s,t),c=-.5*D):(h=a-n,u=et(l,t,s),c=.5*D),d=s-t),{titleX:h,titleY:u,maxWidth:d,rotation:c}}draw(){const n=this.ctx,t=this.options;if(!t.display)return;const i=X(t.font),a=i.lineHeight/2+this._padding.top,{titleX:r,titleY:l,maxWidth:c,rotation:d}=this._drawArgs(a);Vt(n,t.text,0,0,i,{color:t.color,maxWidth:c,rotation:d,textAlign:ii(t.align),textBaseline:"middle",translation:[r,l]})}}var Gu={id:"title",_element:Ai,start(e,n,t){!function Bu(e,n){const t=new Ai({ctx:e.ctx,options:n,chart:e});it.configure(e,t,n),it.addBox(e,t),e.titleBlock=t}(e,t)},stop(e){it.removeBox(e,e.titleBlock),delete e.titleBlock},beforeUpdate(e,n,t){const i=e.titleBlock;it.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 On=new WeakMap;var Vu={id:"subtitle",start(e,n,t){const i=new Ai({ctx:e.ctx,options:t,chart:e});it.configure(e,i,t),it.addBox(e,i),On.set(e,i)},stop(e){it.removeBox(e,On.get(e)),On.delete(e)},beforeUpdate(e,n,t){const i=On.get(e);it.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 Ne={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 h=ei(n,c.getCenterPoint());h<s&&(s=h,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&&($(n)?Array.prototype.push.apply(e,n):e.push(n)),e}function kt(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function zu(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}}
1function aa(e,n){const t=e.chart.ctx,{body:i,footer:s,title:a}=e,{boxWidth:r,boxHeight:l}=n,c=X(n.bodyFont),d=X(n.titleFont),h=X(n.footerFont),u=a.length,f=s.length,p=i.length,g=nt(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*d.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*h.lineHeight+(f-1)*n.footerSpacing);let y=0;const v=function(M){_=Math.max(_,t.measureText(M).width+y)};return t.save(),t.font=d.string,w(e.title,v),t.font=c.string,w(e.beforeBody.concat(e.afterBody),v),y=n.displayColors?r+2+n.boxPadding:0,w(i,M=>{w(M.before,v),w(M.lines,v),w(M.after,v)}),y=0,t.font=h.string,w(e.footer,v),t.restore(),_+=g.width,{width:_,height:m}}function Wu(e,n,t,i){const{x:s,width:a}=t,{width:r,chartArea:{left:l,right:c}}=e;let d="center";return"center"===i?d=s<=(l+c)/2?"left":"right":s<=a/2?d="left":s>=r-a/2&&(d="right"),function Yu(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}(d,e,n,t)&&(d="center"),d}function ra(e,n,t){const i=t.yAlign||n.yAlign||function Hu(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||Wu(e,n,t,i),yAlign:i}}function la(e,n,t,i){const{caretSize:s,caretPadding:a,cornerRadius:r}=e,{xAlign:l,yAlign:c}=t,d=s+a,{topLeft:h,topRight:u,bottomLeft:f,bottomRight:p}=zt(r);let g=function Uu(e,n){let{x:t,width:i}=e;return"right"===n?t-=i:"center"===n&&(t-=i/2),t}(n,l);const m=function Xu(e,n,t){let{y:i,height:s}=e;return"top"===n?i+=t:i-="bottom"===n?s+t:s/2,i}(n,c,d);return"center"===c?"left"===l?g+=d:"right"===l&&(g-=d):"left"===l?g-=Math.max(h,f)+s:"right"===l&&(g+=Math.max(u,p)+s),{x:Q(g,0,i.width-n.width),y:Q(m,0,i.height-n.height)}}function kn(e,n,t){const i=nt(t.padding);return"center"===n?e.x+e.width/2:"right"===n?e.x+e.width-i.right:e.x+i.left}function ca(e){return _t([],kt(e))}
1function da(e,n){const t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?e.override(t):e}const ha={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 E(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"?ha[n].call(t,i):s}let ua=(()=>class e extends Ot{static positioners=Ne;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 Zs(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=function Ju(e,n,t){return Ft(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,kt(a)),c=_t(c,kt(r)),c=_t(c,kt(l)),c}getBeforeBody(t,i){return ca(ot(i.callbacks,"beforeBody",this,t))}getBody(t,i){const{callbacks:s}=i,a=[];return w(t,r=>{const l={before:[],lines:[],after:[]},c=da(s,r);_t(l.before,kt(ot(c,"beforeLabel",this,r))),_t(l.lines,ot(c,"label",this,r)),_t(l.after,kt(ot(c,"afterLabel",this,r))),a.push(l)}),a}getAfterBody(t,i){return ca(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,kt(a)),c=_t(c,kt(r)),c=_t(c,kt(l)),c}_createItems(t){const i=this._active,s=this.chart.data,a=[],r=[],l=[];let d,h,c=[];for(d=0,h=i.length;d<h;++d)c.push(zu(this.chart,i[d]));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))),w(c,u=>{const f=da(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=Ne[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 d=this._size=aa(this,s),h=Object.assign({},c,d),u=ra(this.chart,s,h),f=la(s,h,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:f.x,y:f.y,width:d.width,height:d.height,caretX:c.x,caretY:c.y}}else 0!==this.opacity&&(r={opacity:0}
vendor: 7,199 bytes, line 1
1);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:d,topRight:h,bottomLeft:u,bottomRight:f}=zt(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(d,u)+l:"right"===a?p+m-Math.max(h,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,d;if(r){const h=le(s.rtl,this.x,this.width);for(t.x=kn(this,s.titleAlign,s),i.textAlign=h.textAlign(s.titleAlign),i.textBaseline="middle",l=X(s.titleFont),c=s.titleSpacing,i.fillStyle=s.titleColor,i.font=l.string,d=0;d<r;++d)i.fillText(a[d],h.x(t.x),t.y+l.lineHeight/2),t.y+=l.lineHeight+c,d+1===r&&(t.y+=s.titleMarginBottom-c)}}_drawColorBox(t,i,s,a,r){const l=this.labelColors[s],c=this.labelPointStyles[s],{boxHeight:d,boxWidth:h}=r,u=X(r.bodyFont),f=kn(this,"left",r),p=a.x(f),m=i.y+(d<u.lineHeight?(u.lineHeight-d)/2:0);if(r.usePointStyle){const _={radius:Math.min(h,d)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},b=a.leftForLtr(p,h)+h/2,y=m+d/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,li(t,_,b,y),t.strokeStyle=l.borderColor,t.fillStyle=l.backgroundColor,li(t,_,b,y)}else{t.lineWidth=F(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,h),b=a.leftForLtr(a.xPlus(p,1),h-2),y=zt(l.borderRadius);Object.values(y).some(v=>0!==v)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Re(t,{x:_,y:m,w:h,h:d,radius:y}),t.fill(),t.stroke(),t.fillStyle=l.backgroundColor,t.beginPath(),Re(t,{x:b,y:m+1,w:h-2,h:d-2,radius:y}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(_,m,h,d),t.strokeRect(_,m,h,d),t.fillStyle=l.backgroundColor,t.fillRect(b,m+1,h-2,d-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,i,s){const{body:a}=this,{bodySpacing:r,bodyAlign:l,displayColors:c,boxHeight:d,boxWidth:h,boxPadding:u}=s,f=X(s.bodyFont);let p=f.lineHeight,g=0;const m=le(s.rtl,this.x,this.width),_=function(T){i.fillText(T,m.x(t.x+g),t.y+p/2),t.y+=p+r},b=m.textAlign(l);let y,v,M,x,C,k,O;for(i.textAlign=l,i.textBaseline="middle",i.font=f.string,t.x=kn(this,b,s),i.fillStyle=s.bodyColor,w(this.beforeBody,_),g=c&&"right"!==b?"center"===l?h/2+u:h+2+u:0,x=0,k=a.length;x<k;++x){for(y=a[x],v=this.labelTextColors[x],i.fillStyle=v,w(y.before,_),M=y.lines,c&&M.length&&(this._drawColorBox(i,t,x,m,s),p=Math.max(f.lineHeight,d)),C=0,O=M.length;C<O;++C)_(M[C]),p=f.lineHeight;w(y.after,_)}g=0,p=f.lineHeight,w(this.afterBody,_),t.y-=r}drawFooter(t,i,s){const a=this.footer,r=a.length;let l,c;if(r){const d=le(s.rtl,this.x,this.width);for(t.x=kn(this,s.footerAlign,s),t.y+=s.footerMarginTop,i.textAlign=d.textAlign(s.footerAlign),i.textBaseline="middle",l=X(s.footerFont),i.fillStyle=s.footerColor,i.font=l.string,c=0;c<r;++c)i.fillText(a[c],d.x(t.x),t.y+l.lineHeight/2),t.y+=l.lineHeight+s.footerSpacing}}drawBackground(t,i,s,a){const{xAlign:r,yAlign:l}=this,{x:c,y:d}=t,{width:h,height:u}=s,{topLeft:f,topRight:p,bottomLeft:g,bottomRight:m}=zt(a.cornerRadius);i.fillStyle=a.backgroundColor,i.strokeStyle=a.borderColor,i.lineWidth=a.borderWidth,i.beginPath(),i.moveTo(c+f,d),"top"===l&&this.drawCaret(t,i,s,a),i.lineTo(c+h-p,d),i.quadraticCurveTo(c+h,d,c+h,d+p),"center"===l&&"right"===r&&this.drawCaret(t,i,s,a),i.lineTo(c+h,d+u-m),i.quadraticCurveTo(c+h,d+u,c+h-m,d+u),"bottom"===l&&this.drawCaret(t,i,s,a),i.lineTo(c+g,d+u),i.quadraticCurveTo(c,d+u,c,d+u-g),"center"===l&&"left"===r&&this.drawCaret(t,i,s,a),i.lineTo(c,d+f),i.quadraticCurveTo(c,d,c+f,d),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=Ne[t.position].call(this,this._active,this._eventPosition);if(!l)return;const c=this._size=aa(this,t),d=Object.assign({},l,this._size),h=ra(i,t,d),u=la(t,d,h,i);(a._to!==u.x||r._to!==u.y)&&(this.xAlign=h.xAlign,this.yAlign=h.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=nt(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),zs(t,i.textDirection),r.y+=l.top,this.drawTitle(r,t,i),this.drawBody(r,t,i),this.drawFooter(r,t,i),Hs(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,i){const s=this._active,a=t.map(({datasetIndex:c,index:d})=>{const h=this.chart.getDatasetMeta(c);if(!h)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:h.data[d],index:d}}),r=!en(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),d=i||!en(l,r)||c;return d&&(this._active=l,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,i))),d}_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=Ne[r.position].call(this,t,i);return!1!==l&&(s!==l.x||a!==l.y)}})();var Ku={id:"tooltip",_element:ua,positioners:Ne,afterInit(e,n,t){t&&(e.tooltip=new ua({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: 5,961 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:ha},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"]},Qu=Object.freeze({__proto__:null,Colors:cu,Decimation:fu,Filler:Au,Legend:$u,SubTitle:Vu,Title:Gu,Tooltip:Ku});function fa(e){const n=this.getLabels();return e>=0&&e<n.length?n[e]:e}let ef=(()=>class e extends Xt{static id="category";static defaults={ticks:{callback:fa}};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(E(t))return null;const s=this.getLabels();return((e,n)=>null===e?null:Q(Math.round(e),0,n))(i=isFinite(i)&&s[i]===t?i:function Zu(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 fa.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 pa(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 Xt{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 E(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),d=gt(a);c<0&&d<0?l(0):c>0&&d>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 nf(e,n){const t=[],{bounds:s,step:a,min:r,max:l,precision:c,count:d,maxTicks:h,maxDigits:u,includeBounds:f}=e,p=a||1,g=h-1,{min:m,max:_}=n,b=!E(r),y=!E(l),v=!E(d),M=(_-m)/(u+1);let C,k,O,T,x=ps((_-m)/g/p)*p;if(x<1e-14&&!b&&!y)return[{value:m},{value:_}];T=Math.ceil(_/x)-Math.floor(m/x),T>g&&(x=ps(T*x/g/p)*p),E(c)||(C=Math.pow(10,c),x=Math.ceil(x*C)/C),"ticks"===s?(k=Math.floor(m/x)*x,O=Math.ceil(_/x)*x):(k=m,O=_),b&&y&&a&&function Gl(e,n){const t=Math.round(e);return t-n<=e&&t+n>=e}((l-r)/a,x/1e3)?(T=Math.round(Math.min((l-r)/x,h)),x=(l-r)/T,k=r,O=l):v?(k=b?r:k,O=y?l:O,T=d-1,x=(O-k)/T):(T=(O-k)/x,T=Me(T,Math.round(T),x/1e3)?Math.round(T):Math.ceil(T));const P=Math.max(ms(x),ms(k));C=Math.pow(10,E(c)?P:c),k=Math.round(k*C)/C,O=Math.round(O*C)/C;let I=0;for(b&&(f&&k!==r?(t.push({value:r}),k<r&&I++,Me(Math.round((k+I*x)*C)/C,r,pa(r,M,e))&&I++):k<r&&I++);I<T;++I){const A=Math.round((k+I*x)*C)/C;if(y&&A>l)break;t.push({value:A})}return y&&f&&O!==l?t.length&&Me(t[t.length-1].value,l,pa(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&&gs(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 ke(n,this.chart.options.locale,this.options.ticks.format)}}const $e=e=>Math.floor(Et(e)),Jt=(e,n)=>Math.pow(10,$e(e)+n);function ga(e){return e/Math.pow(10,$e(e))==1}function ma(e,n,t){const i=Math.pow(10,t),s=Math.floor(e/i);return Math.ceil(n/i)-s}function Di(e){const n=e.ticks;if(n.display&&e.display){const t=nt(n.backdropPadding);return R(n.font&&n.font.size,N.font.size)+t.height}return 0}function lf(e,n,t){return t=$(t)?t:[t],{w:sc(e,n.string,t),h:t.length*n.lineHeight}}function _a(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 df(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 hf(e,n,t){const i=e.drawingArea,{extra:s,additionalAngle:a,padding:r,size:l}=t,c=e.getPointPosition(n,i+s+r,a),d=Math.round(ti(tt(c.angle+Y))),h=function mf(e,n,t){return 90===t||270===t?e-=n/2:(t>270||t<90)&&(e-=n),e}(c.y,l.h,d),u=function pf(e){return 0===e||180===e?"center":e<180?"left":"right"}(d),f=function gf(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:h,textAlign:u,left:f,top:h,right:f+l.w,bottom:h+l.h}}function uf(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 _f(e,n,t){const{left:i,top:s,right:a,bottom:r}=t,{backdropColor:l}=n;if(!E(l)){const c=zt(n.borderRadius),d=nt(n.backdropPadding);e.fillStyle=l;const h=i-d.left,u=s-d.top,f=a-i+d.width,p=r-s+d.height;Object.values(c).some(g=>0!==g)?(e.beginPath(),Re(e,{x:h,y:u,w:f,h:p,radius:c}),e.fill()):e.fillRect(h,u,f,p)}}function ba(e,n,t,i){const{ctx:s}=e;if(t)s.arc(e.xCenter,e.yCenter,n,0,B);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 Rn={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(Rn);function ya(e,n){return e-n}function xa(e,n){if(E(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)),H(r)||(r="string"==typeof i?t.parse(r,i):t.parse(r)),null===r?null:(s&&(r="week"!==s||!oe(a)&&!0!==a?t.startOf(r,s):t.startOf(r,"isoWeek",a)),+r)}function va(e,n,t,i){const s=at.length;for(let a=at.indexOf(e);a<s-1;++a){const r=Rn[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 Ca(e,n,t){if(t){if(t.length){const{lo:i,hi:s}=ni(t,n);e[t[i]>=n?t[i]:t[s]]=!0}}else e[n]=!0}function Ma(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 Sf(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 wi=(()=>class e extends Xt{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 Sd__date(t.adapters.date);a.init(i),ve(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:xa(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 d(h){!l&&!isNaN(h.min)&&(a=Math.min(a,h.min)),!c&&!isNaN(h.max)&&(r=Math.max(r,h.max))}(!l||!c)&&(d(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&d(this.getMinMax(!1))),a=H(a)&&!isNaN(a)?a:+i.startOf(Date.now(),s),r=H(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]);
1const r=this.min,c=function Yl(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?va(i.minUnit,this.min,this.max,this._getLabelCapacity(r)):function Cf(e,n,t,i,s){for(let a=at.length-1;a>=at.indexOf(t);a--){const r=at[a];if(Rn[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 Mf(e){for(let n=at.indexOf(e)+1,t=at.length;n<t;++n)if(Rn[at[n]].common)return at[n]}(this._unit):void 0,this.initOffsets(a),t.reverse&&c.reverse(),Ma(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=Q(i,0,l),s=Q(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||va(r.minUnit,i,s,this._getLabelCapacity(i)),c=R(a.ticks.stepSize,1),d="week"===l&&r.isoWeekday,h=oe(d)||!0===d,u={};let p,g,f=i;if(h&&(f=+t.startOf(f,"isoWeek",d)),f=+t.startOf(f,h?"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++)Ca(u,p,m);return(p===s||"ticks"===a.bounds||1===g)&&Ca(u,p,m),Object.keys(u).sort(ya).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 L(l,[t,i,s],this);const c=r.time.displayFormats,d=this._unit,h=this._majorUnit,f=h&&c[h],p=s[i];return this._adapter.format(t,a||(h&&f&&p&&p.major?f:d&&c[d]))}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,598 bytes, line 1
1FormatFunction(t,0,Ma(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(xa(this,a[i]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return xs(t.sort(ya))}})();function In(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 d=r-a;return d?l+(c-l)*(n-a)/d:l}var kf=Object.freeze({__proto__:null,CategoryScale:ef,LinearScale:class sf extends Tn{static id="linear";static defaults={ticks:{callback:an.formatters.numeric}};determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=H(n)?n:0,this.max=H(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 rf extends Xt{static id="logarithmic";static defaults={ticks:{callback:an.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 H(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=H(n)?Math.max(0,n):null,this.max=H(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!H(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 af(e,{min:n,max:t}){n=rt(e.min,n);const i=[],s=$e(n);let a=function of(e,n){let i=$e(n-e);for(;ma(e,n,i)>10;)i++;for(;ma(e,n,i)<10;)i--;return Math.min(i,$e(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,d=Math.round((n-c)*r)/r,h=Math.floor((n-c)/l/10)*l*10;let u=Math.floor((d-h)/Math.pow(10,a)),f=rt(e.min,Math.round((c+h+u*Math.pow(10,a))*r)/r);for(;f<t;)i.push({value:f,major:ga(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+h+u*Math.pow(10,a))*r)/r;const p=rt(e.max,f);return i.push({value:p,major:ga(p),significand:u}),i}({min:this._userMin,max:this._userMax},this);return"ticks"===n.bounds&&gs(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":ke(n,this.chart.options.locale,this.options.ticks.format)}configure(){const n=this.min;super.configure(),this._startValue=Et(n),this._valueRange=Et(this.max)-Et(n)}getPixelForValue(n){return(void 0===n||0===n)&&(n=this.min),null===n||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(Et(n)-this._startValue)/this._valueRange)}getValueForPixel(n){const t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}},RadialLinearScale:class vf 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:an.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=nt(Di(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=H(n)&&!isNaN(n)?n:0,this.max=H(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Di(this.options))}generateTickLabels(n){Tn.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,i)=>{const s=L(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 cf(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 d=r.setContext(e.getPointLabelContext(c));s[c]=d.padding;const h=e.getPointPosition(c,e.drawingArea+s[c],l),u=X(d.font),f=lf(e.ctx,u,e._pointLabels[c]);i[c]=f;const p=tt(e.getIndexAngle(c)+l),g=Math.round(ti(p));df(t,n,p,_a(g,h.x,f.w,0,180),_a(g,h.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 ff(e,n,t){const i=[],s=e._pointLabels.length,a=e.options,{centerPointLabels:r,display:l}=a.pointLabels,c={extra:Di(a)/2,additionalAngle:r?D/s:0};let d;for(let h=0;h<s;h++){c.padding=t[h],c.size=n[h];const u=hf(e,h,c);i.push(u),"auto"===l&&(u.visible=uf(u,d),u.visible&&(d=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 tt(n*(B/(this._pointLabels.length||1))+ft(this.options.startAngle||0))}getDistanceFromCenterForValue(n){if(E(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(E(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 xf(e,n,t){return Ft(e,{label:t,index:n,type:"pointLabel"})}(this.getContext(),n,i)}}getPointPosition(n,t,i=0){const s=this.getIndexAngle(n)-Y+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(),ba(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,d;if(t.pointLabels.display&&function bf(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));_f(t,r,a);const l=X(r.font),{x:c,y:d,textAlign:h}=a;Vt(t,e._pointLabels[s],c,d+l.lineHeight/2,l,{color:r.color,textAlign:h,textBaseline:"middle"})}}(this,r),s.display&&this.ticks.forEach((h,u)=>{if(0!==u||0===u&&this.min<0){c=this.getDistanceFromCenterForValue(h.value);const f=this.getContext(u),p=s.setContext(f),g=a.setContext(f);!function yf(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(),ba(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 h=i.setContext(this.getPointLabelContext(l)),{color:u,lineWidth:f}=h;!f||!u||(n.lineWidth=f,n.strokeStyle=u,n.setLineDash(h.borderDash),n.lineDashOffset=h.borderDashOffset,c=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),d=this.getPointPosition(l,c),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(d.x,d.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 d=i.setContext(this.getContext(c)),h=X(d.font);if(a=this.getDistanceFromCenterForValue(this.ticks[c].value),d.showLabelBackdrop){n.font=h.string,r=n.measureText(l.label).width,n.fillStyle=d.backdropColor;const u=nt(d.backdropPadding);n.fillRect(-r/2-u.left,-a-h.size/2-u.top,r+u.width,h.size+u.height)}Vt(n,l.label,0,-a,h,{color:d.color,strokeColor:d.textStrokeColor,strokeWidth:d.textStrokeWidth})}),n.restore()}drawTitle(){}},TimeScale:wi,TimeSeriesScale:class Of extends wi{static id="timeseries";static defaults=wi.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=In(t,this.min),this._tableRange=In(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){const{min:t,max:i}=this,s=[],a=[];let r,l,c,d,h;for(r=0,l=n.length;r<l;++r)d=n[r],d>=t&&d<=i&&s.push(d);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(r=0,l=s.length;r<l;++r)h=s[r+1],c=s[r-1],d=s[r],Math.round((h+c)/2)!==d&&a.push({time:d,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(In(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){const t=this._offsets,i=this.getDecimalForPixel(n)/t.factor-t.end;return In(this._table,i*this._tableRange+this._minPos,!0)}}});const Tf=[Md,nu,Qu,kf];var Rf=S(1413),If=S(6977),Pf=S(913);const Pn=function Af(e,n){return e===n||e!=e&&n!=n},En=function Df(e,n){for(var t=e.length;t--;)if(Pn(e[t][0],n))return t;return-1};var jf=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 Ef(){this.__data__=[],this.size=0},de.prototype.delete=function Lf(e){var n=this.__data__,t=En(n,e);return!(t<0||(t==n.length-1?n.pop():jf.call(n,t,1),--this.size,0))},de.prototype.get=function $f(e){var n=this.__data__,t=En(n,e);return t<0?void 0:n[t][1]},de.prototype.has=function Gf(e){return En(this.__data__,e)>-1},de.prototype.set=function zf(e,n){var t=this.__data__,i=En(t,e);return i<0?(++this.size,t.push([e,n])):t[i][1]=n,this};const Fn=de,Sa="object"==typeof global&&global&&global.Object===Object&&global;var tp="object"==typeof self&&self&&self.Object===Object&&self;const he=Sa||tp||Function("return this")();var np=he.Symbol,Oa=Object.prototype,ip=Oa.hasOwnProperty,sp=Oa.toString,Be=np?np.toStringTag:void 0;var lp=Object.prototype.toString;var ka=np?np.toStringTag:void 0;const Dn=function fp(e){return null==e?void 0===e?"[object Undef
1ined]":"[object Null]":ka&&ka in Object(e)?function op(e){var n=ip.call(e,Be),t=e[Be];try{e[Be]=void 0;var i=!0}catch{}var s=sp.call(e);return i&&(n?e[Be]=t:delete e[Be]),s}(e):function cp(e){return lp.call(e)}(e)},Kt=function pp(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)},ji=function yp(e){if(!Kt(e))return!1;var n=Dn(e);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n};var e,xp=he["__core-js_shared__"],Ta=(e=/[^.]+$/.exec(xp&&xp.keys&&xp.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"";var Sp=Function.prototype.toString;var Rp=/^\[object .+?Constructor\]$/,Ap=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const wp=function Dp(e){return!(!Kt(e)||function vp(e){return!!Ta&&Ta in e}(e))&&(ji(e)?Ap:Rp).test(function Op(e){if(null!=e){try{return Sp.call(e)}catch{}try{return e+""}catch{}}return""}(e))},Ni=function Np(e,n){var t=function jp(e,n){return e?.[n]}(e,n);return wp(t)?t:void 0},Ra=Ni(he,"Map"),Ge=Ni(Object,"create");var Up=Object.prototype.hasOwnProperty;var Qp=Object.prototype.hasOwnProperty;function ue(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])}}ue.prototype.clear=function Gp(){this.__data__=Ge?Ge(null):{},this.size=0},ue.prototype.delete=function zp(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n},ue.prototype.get=function Xp(e){var n=this.__data__;if(Ge){var t=n[e];return"__lodash_hash_undefined__"===t?void 0:t}return Up.call(n,e)?n[e]:void 0},ue.prototype.has=function qp(e){var n=this.__data__;return Ge?void 0!==n[e]:Qp.call(n,e)},ue.prototype.set=function eg(e,n){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=Ge&&void 0===n?"__lodash_hash_undefined__":n,this};const Ia=ue,wn=function rg(e,n){var t=e.__data__;return function og(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 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 ig(){this.size=0,this.__data__={hash:new Ia,map:new(Ra||Fn),string:new Ia}},fe.prototype.delete=function lg(e){var n=wn(this,e).delete(e);return this.size-=n?1:0,n},fe.prototype.get=function dg(e){return wn(this,e).get(e)},fe.prototype.has=function ug(e){return wn(this,e).has(e)},fe.prototype.set=function pg(e,n){var t=wn(this,e),i=t.size;return t.set(e,n),this.size+=t.size==i?0:1,this};const mg=fe;function pe(e){var n=this.__data__=new Fn(e);this.size=n.size}pe.prototype.clear=function Yf(){this.__data__=new Fn,this.size=0},pe.prototype.delete=function Uf(e){var n=this.__data__,t=n.delete(e);return this.size=n.size,t},pe.prototype.get=function Jf(e){return this.__data__.get(e)},pe.prototype.has=function Qf(e){return this.__data__.has(e)},pe.prototype.set=function bg(e,n){var t=this.__data__;if(t instanceof Fn){var i=t.__data__;if(!Ra||i.length<199)return i.push([e,n]),this.size=++t.size,this;t=this.__data__=new mg(i)}return t.set(e,n),this.size=t.size,this};const xg=pe;var vg=function(){try{var e=Ni(Object,"defineProperty");return e({},"",{}),e}catch{}}();const jn=vg,$i=function Cg(e,n,t){"__proto__"==n&&jn?jn(e,n,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[n]=t},Bi=function Mg(e,n,t){(void 0!==t&&!Pn(e[n],t)||void 0===t&&!(n in e))&&$i(e,n,t)};var Og=function Sg(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 kg=Og;var Pa="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ea=Pa&&"object"==typeof module&&module&&!module.nodeType&&module,Fa=Ea&&Ea.exports===Pa?he.Buffer:void 0,Aa=Fa?Fa.allocUnsafe:void 0;const Da=he.Uint8Array,Dg=function Ag(e,n){var t=n?function Eg(e){var n=new e.constructor(e.byteLength);return new Da(n).set(new Da(e)),n}(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)};var wa=Object.create,Lg=function(){function e(){}return function(n){if(!Kt(n))return{};if(wa)return wa(n);e.prototype=n;var t=new e;return e.prototype=void 0,t}}();const Ng=Lg;var Bg=function $g(e,n){return function(t){return e(n(t))}}(Object.getPrototypeOf,Object);const ja=Bg;var Gg=Object.prototype;const La=function Vg(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||Gg)},Ve=function Yg(e){return null!=e&&"object"==typeof e},Na=function Ug(e){return Ve(e)&&"[object Arguments]"==Dn(e)};var $a=Object.prototype,Xg=$a.hasOwnProperty,Jg=$a.propertyIsEnumerable,Kg=Na(function(){return arguments}())?Na:function(e){return Ve(e)&&Xg.call(e,"callee")&&!Jg.call(e,"callee")};const Gi=Kg,Vi=Array.isArray,Ba=function Zg(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},zi=function tm(e){return null!=e&&Ba(e.length)&&!ji(e)};var Ga="object"==typeof exports&&exports&&!exports.nodeType&&exports,Va=Ga&&"object"==typeof module&&module&&!module.nodeType&&module,za=Va&&Va.exports===Ga?he.Buffer:void 0;const Ha=(za?za.isBuffer:void 0)||function im(){return!1};var Ya=Function.prototype.toString,hm=Object.prototype.hasOwnProperty,um=Ya.call(Object);var G={};
1G["[object Float32Array]"]=G["[object Float64Array]"]=G["[object Int8Array]"]=G["[object Int16Array]"]=G["[object Int32Array]"]=G["[object Uint8Array]"]=G["[object Uint8ClampedArray]"]=G["[object Uint16Array]"]=G["[object Uint32Array]"]=!0,G["[object Arguments]"]=G["[object Array]"]=G["[object ArrayBuffer]"]=G["[object Boolean]"]=G["[object DataView]"]=G["[object Date]"]=G["[object Error]"]=G["[object Function]"]=G["[object Map]"]=G["[object Number]"]=G["[object Object]"]=G["[object RegExp]"]=G["[object Set]"]=G["[object String]"]=G["[object WeakMap]"]=!1;var Wa="object"==typeof exports&&exports&&!exports.nodeType&&exports,ze=Wa&&"object"==typeof module&&module&&!module.nodeType&&module,Hi=ze&&ze.exports===Wa&&Sa.process,Hm=function(){try{return ze&&ze.require&&ze.require("util").types||Hi&&Hi.binding&&Hi.binding("util")}catch{}}(),Xa=Hm&&Hm.isTypedArray;const Ja=Xa?function Gm(e){return function(n){return e(n)}}(Xa):function $m(e){return Ve(e)&&Ba(e.length)&&!!G[Dn(e)]},Yi=function Wm(e,n){if(("constructor"!==n||"function"!=typeof e[n])&&"__proto__"!=n)return e[n]};var Xm=Object.prototype.hasOwnProperty;const Km=function Jm(e,n,t){var i=e[n];(!Xm.call(e,n)||!Pn(i,t)||void 0===t&&!(n in e))&&$i(e,n,t)};var n_=/^(?:0|[1-9]\d*)$/;const Ka=function i_(e,n){var t=typeof e;return!!(n=n??9007199254740991)&&("number"==t||"symbol"!=t&&n_.test(e))&&e>-1&&e%1==0&&e<n};var o_=Object.prototype.hasOwnProperty;const r_=function a_(e,n){var t=Vi(e),i=!t&&Gi(e),s=!t&&!i&&Ha(e),a=!t&&!i&&!s&&Ja(e),r=t||i||s||a,l=r?function Zm(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 d in e)(n||o_.call(e,d))&&(!r||!("length"==d||s&&("offset"==d||"parent"==d)||a&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Ka(d,c)))&&l.push(d);return l};var h_=Object.prototype.hasOwnProperty;const f_=function u_(e){if(!Kt(e))return function l_(e){var n=[];if(null!=e)for(var t in Object(e))n.push(t);return n}(e);var n=La(e),t=[];for(var i in e)"constructor"==i&&(n||!h_.call(e,i))||t.push(i);return t},Qa=function p_(e){return zi(e)?r_(e,!0):f_(e)},m_=function g_(e){return function Qm(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?$i(t,l,c):Km(t,l,c)}return t}(e,Qa(e))},b_=function __(e,n,t,i,s,a,r){var l=Yi(e,t),c=Yi(n,t),d=r.get(c);if(d)Bi(e,t,d);else{var h=a?a(l,c,t+"",e,n,r):void 0,u=void 0===h;if(u){var f=Vi(c),p=!f&&Ha(c),g=!f&&!p&&Ja(c);h=c,f||p||g?Vi(l)?h=l:function em(e){return Ve(e)&&zi(e)}(l)?h=function wg(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,h=function Rg(e,n){if(n)return e.slice();var t=e.length,i=Aa?Aa(t):new e.constructor(t);return e.copy(i),i}(c,!0)):g?(u=!1,h=Dg(c,!0)):h=[]:function fm(e){if(!Ve(e)||"[object Object]"!=Dn(e))return!1;var n=ja(e);if(null===n)return!0;var t=hm.call(n,"constructor")&&n.constructor;return"function"==typeof t&&t instanceof t&&Ya.call(t)==um}(c)||Gi(c)?(h=l,Gi(l)?h=m_(l):(!Kt(l)||ji(l))&&(h=function zg(e){return"function"!=typeof e.constructor||La(e)?{}:Ng(ja(e))}(c))):u=!1}u&&(r.set(c,h),s(h,c,i,a,r),r.delete(c)),Bi(e,t,h)}},y_=function qa(e,n,t,i,s){e!==n&&kg(n,function(a,r){if(s||(s=new xg),Kt(a))b_(e,n,r,t,qa,i,s);else{var l=i?i(Yi(e,r),a,r+"",e,n,s):void 0;void 0===l&&(l=a),Bi(e,r,l)}},Qa)},Za=function x_(e){return e};var tr=Math.max;const k_=function O_(e){return function(){return e}};var T_=jn?function(e,n){return jn(e,"toString",{configurable:!0,enumerable:!1,value:k_(n),writable:!0})}:Za,E_=Date.now,A_=function F_(e){var n=0,t=0;return function(){var i=E_(),s=16-(i-t);if(t=i,s>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}(T_);const D_=A_,j_=function w_(e,n){return D_(function M_(e,n,t){return n=tr(void 0===n?e.length-1:n,0),function(){for(var i=arguments,s=-1,a=tr(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 v_(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,Za),e+"")};var B_=function $_(e){return j_(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 L_(e,n,t){if(!Kt(t))return!1;var i=typeof n;return!!("number"==i?zi(t)&&Ka(n,t.length):"string"==i&&n in t)&&Pn(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){y_(e,n,t)});const G_=B_;var V_=S(4412),z_=S(3294);const er=new o.nKC("Configuration for ngCharts");let nr=(()=>{class e{constructor(){this.colorschemesOptions=new V_.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=o.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),H_=(()=>{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&&vn.register(...a.registerables),a?.defaults&&N.set(a.defaults),this.ctx=t.nativeElement.getContext("2d"),this.subs.push(this.themeService.colorschemesOptions.pipe((0,z_.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.forEac
1h(t=>t.unsubscribe())}render(){return this.chart&&this.chart.destroy(),this.zone.runOutsideAngular(()=>this.chart=new vn(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 G_({onHover:(t,i)=>{!this.chartHover.observed&&!this.chartHover.observers?.length||this.zone.run(()=>this.chartHover.emit({event:t,active:i}))},onClick:(t,i)=>{!this.chartClick.observed&&!this.chartClick.observers?.length||this.zone.run(()=>this.chartClick.emit({event:t,active:i}))}},this.themeOverrides,this.options,{plugins:{legend:{display:this.legend}}})}getChartConfiguration(){return{type:this.type,data:this.getChartData(),options:this.getChartOptions(),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(nr),o.rXU(er,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 Y_(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)}}let W_=(()=>{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 Rf.B,this.primaryPalette=this.styleService.getPrimaryPalette(),N.font.family="Inter",this.barChartLabels=this.translate.instant("ALLMONTHS").split(","),this.styleService.themeState.pipe((0,If.Q)(this.componentDestroyed)).subscribe(a=>{a&&this.setTheme()}),vn.register(...Tf)}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});this.barChartOptions.plugins.title.text=this.usage,this.setTheme()}}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),[d,h]=c.format("YYYY-MM").split("-");return r&&(s[d+h]?s[d+h].consumption+=r:s[d+h]={year:d,month:h,consumption:r,unit:l}),s},{})}createSeries(t,i){const s=[];let r=0;for(const[l,c]of t.entries()){if(r>=3)break;let d=[0,0,0,0,0,0,0,0,0,0,0,0],h=i.filter(f=>f.year===c);for(const f of h)d.splice(+f.month-1,1,f.consumption);const u={title:c,data:d,color:this.getBarColor(l,3),borderColor:this.getBarColor(l,3),hoverColor:this.primaryPalette[4].color.str};s.push(u),r++}return s}setUsageAndUnit(t){null!=t&&t.length>0&&(this.usage=this.meterGroup.Anv\u00e4ndning+" ("+t[0].unit+")")}getBarColor(t,i){return this.primaryPalette[i-t].color.str}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(Pf.J),o.rXU(nr),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",4,"ngIf"],[1,"chart"],["baseChart","",1,"chart",3,"type","datasets","labels","options","legend"]],template:function(i,s){1&i&&o.DNE(0,Y_,3,7,"div",0),2&i&&o.Y8G("ngIf",s.barChartData)},dependencies:[z.bT,H_],styles:[".chart[_ngcontent-%COMP%]{height:400px}.is-mobile[_ngcontent-%COMP%]   .chart[_ngcontent-%COMP%]{height:250px}"]})}}return e})();var He=S(1336),Wi=S(7673),U_=S(983),X_=S(6697),ir=S(6380),sr=S(7342);let J_=(()=>{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,X_.s)(1),(0,Ki.Z)(s=>s?(0,Wi.of)(s):U_.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,Wi.of)(null)}))}static{this.\u0275fac=function(i){return new(i||e)(o.KVO(Nt.y),o.KVO(ir.I),o.KVO(sr.z),o.KVO(U.Ix),o.KVO(K.c$))}}static{this.\u0275prov=o.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var K_=S(9496),Ln=S(6695),Ui=S(3013);function Q_(e,n){if(1&e&&o.nrm(0,"taiga-pill-badge",22),2&e){const t=o.XpG().$implicit,i=o.XpG();o.Y8G("text",i.getStatusText(t.status))}}function q_(e,n){if(1&e&&(o.qex(0),o.j41(1,"div",23),o.EFF(2),o.k0s(),o.j41(3,"div"),o.EFF(4),o.k0s(),o.bVm()),2&e){const t=o.XpG().$implicit;o.R7$(2),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(" ",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 Z_(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function tb(e,n){if(1&e&&(o.qex(0),o.j41(1,"div",24),o.EFF(2),o.k0s(),o.bVm()),2&e){const t=o.XpG().$implicit;o.R7$(2),o.JRh(null==t||null==t.primaryObject?null:t.primaryObject.number)}}function eb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function nb(e,n){if(1&e&&(o.qex(0),o.j41(1,"div"),o.EFF(2),o.k0s(),o.bVm()),2&e){const t=o.XpG().$implicit;o.R7$(2),o.JRh(null==t||null==t.primaryObject||null==t.primaryObject.identity?null:t.primaryObject.identity.officialNumber)}}function ib(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}
1function sb(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 ob(e,n){if(1&e&&(o.qex(0),o.j41(1,"div"),o.EFF(2),o.k0s(),o.DNE(3,sb,2,1,"div",25),o.bVm()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(2),o.JRh(i.formatArea(null==t||null==t.primaryObject||null==t.primaryObject.size?null:t.primaryObject.size.area,0)),o.R7$(),o.Y8G("ngIf","Ingen"!==(null==t||null==t.primaryObject||null==t.primaryObject.size?null:t.primaryObject.size.roomsDisplayName))}}function ab(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function rb(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 lb(e,n){if(1&e&&(o.qex(0),o.j41(1,"div"),o.EFF(2),o.DNE(3,rb,4,6,"span",25),o.k0s(),o.bVm()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(2),o.SpI(" ",i.formatNumber(null==t||null==t.pricing?null:t.pricing.price,0)," "),o.R7$(),o.Y8G("ngIf",null==t||null==t.pricing?null:t.pricing.price)}}function cb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function db(e,n){if(1&e&&(o.qex(0),o.j41(1,"div"),o.EFF(2),o.k0s(),o.bVm()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(2),o.SpI(" ",i.formatDate(null==t||null==t.status?null:t.status.startDate)," ")}}function hb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function ub(e,n){if(1&e&&(o.qex(0),o.j41(1,"div"),o.EFF(2),o.k0s(),o.bVm()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(2),o.SpI(" ",i.formatDate(null==t||null==t.status?null:t.status.endDate)," ")}}function fb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function pb(e,n){if(1&e){const t=o.RV6();o.j41(0,"mat-card",13)(1,"div",14)(2,"mat-card-title"),o.EFF(3),o.k0s(),o.j41(4,"div",15),o.DNE(5,Q_,1,1,"taiga-pill-badge",16),o.k0s()(),o.j41(6,"mat-card-content")(7,"div",17)(8,"div",18)(9,"h4"),o.EFF(10),o.nI1(11,"translate"),o.k0s(),o.DNE(12,q_,5,3,"ng-container",19)(13,Z_,2,0,"ng-template",null,0,o.C5r),o.j41(15,"h4"),o.EFF(16),o.nI1(17,"translate"),o.k0s(),o.DNE(18,tb,3,1,"ng-container",19)(19,eb,2,0,"ng-template",null,1,o.C5r),o.j41(21,"h4"),o.EFF(22),o.nI1(23,"translate"),o.k0s(),o.DNE(24,nb,3,1,"ng-container",19)(25,ib,2,0,"ng-template",null,2,o.C5r),o.k0s(),o.j41(27,"div",18)(28,"h4"),o.EFF(29),o.nI1(30,"translate"),o.k0s(),o.DNE(31,ob,4,2,"ng-container",19)(32,ab,2,0,"ng-template",null,3,o.C5r),o.j41(34,"h4"),o.EFF(35),o.nI1(36,"translate"),o.k0s(),o.DNE(37,lb,4,2,"ng-container",19)(38,cb,2,0,"ng-template",null,4,o.C5r),o.k0s(),o.j41(40,"div",18)(41,"h4"),o.EFF(42),o.nI1(43,"translate"),o.k0s(),o.DNE(44,db,3,1,"ng-container",19)(45,hb,2,0,"ng-template",null,5,o.C5r),o.j41(47,"h4"),o.EFF(48),o.nI1(49,"translate"),o.k0s(),o.DNE(50,ub,3,1,"ng-container",19)(51,fb,2,0,"ng-template",null,6,o.C5r),o.k0s(),o.j41(53,"div",20)(54,"button",21),o.bIt("click",function(){const s=o.eBV(t).$implicit,a=o.XpG();return o.Njj(a.showContract(s.id))}),o.EFF(55),o.nI1(56,"translate"),o.k0s()()()()()}if(2&e){const t=n.$implicit,i=o.sdS(14),s=o.sdS(20),a=o.sdS(26),r=o.sdS(33),l=o.sdS(39),c=o.sdS(46),d=o.sdS(52),h=o.XpG();o.R7$(3),o.Lme(" ",t.type.displayName," ",t.number," "),o.R7$(2),o.Y8G("ngIf",h.getStatusText(t.status)),o.R7$(5),o.JRh(o.bMT(11,27,"ADDRESS")),o.R7$(2),o.Y8G("ngIf",null==t||null==t.primaryObject||null==t.primaryObject.location||null==t.primaryObject.location.address?null:t.primaryObject.location.address.address)("ngIfElse",i),o.R7$(4),o.JRh(o.bMT(17,29,"OBJECTNO")),o.R7$(2),o.Y8G("ngIf",null==t||null==t.primaryObject?null:t.primaryObject.number)("ngIfElse",s),o.R7$(4),o.JRh(o.bMT(23,31,"APARTMENTNUMBER")),o.R7$(2),o.Y8G("ngIf",null==t||null==t.primaryObject||null==t.primaryObject.identity?null:t.primaryObject.identity.officialNumber)("ngIfElse",a),o.R7$(5),o.JRh(o.bMT(30,33,"AREA")),o.R7$(2),o.Y8G("ngIf",null==t||null==t.primaryObject||null==t.primaryObject.size?null:t.primaryObject.size.area)("ngIfElse",r),o.R7$(4),o.JRh(o.bMT(36,35,"RENT")),o.R7$(2),o.Y8G("ngIf",null==t||null==t.pricing?null:t.pricing.price)("ngIfElse",l),o.R7$(5),o.JRh(o.bMT(43,37,"CONTRACTPERIODFROM")),o.R7$(2),o.Y8G("ngIf",null==t||null==t.status?null:t.status.startDate)("ngIfElse",c),o.R7$(4),o.JRh(o.bMT(49,39,"CONTRACTPERIODTO")),o.R7$(2),o.Y8G("ngIf",null==t||null==t.status?null:t.status.endDate)("ngIfElse",d),o.R7$(3),o.AVh("full-width",h.mediaQueryService.isMobile()),o.R7$(2),o.JRh(o.bMT(56,41,"SHOW"))}}function gb(e,n){if(1&e&&o.nrm(0,"taiga-pill-badge",22),2&e){const t=o.XpG().$implicit,i=o.XpG();o.Y8G("text",i.getStatusText(t))}}function mb(e,n){if(1&e&&(o.qex(0),o.j41(1,"div",23),o.EFF(2),o.k0s(),o.j41(3,"div"),o.EFF(4),o.k0s(),o.bVm()),2&e){const t=o.XpG().$implicit;o.R7$(2),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 _b(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function bb(e,n){if(1&e&&(o.qex(0),o.j41(1,"div",24),o.EFF(2),o.k0s(),o.bVm()),2&e){const t=o.XpG().$implicit;o.R7$(2),o.JRh(null==t||null==t.objectPrimary?null:t.objectPrimary.number)}}function yb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function xb(e,n){if(1&e&&(o.qex(0),o.j41(1,"div"),o.EFF(2),o.k0s(),o.bVm()),2&e){const t=o.XpG().$implicit;o.R7$(2),o.JRh(null==t||null==t.objectPrimary?null:t.objectPrimary.identityOfficialApartmentNumber)}}function vb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Cb(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 Mb(e,n){if(1&e&&(o.qex(0),o.j41(1,"div"),o.EFF(2),o.k0s(),o.DNE(3,Cb,2,1,"div",25),o.bVm()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(2),o.JRh(i.formatArea(null==t||null==t.objectPrimary?null:t.objectPrimary.sizeAreaValue,0)),o.R7$(),o.Y8G("ngIf","Ingen"!==(null==t||null==t.objectPrimary?null:t.objectPrimary.sizeRoomsDisplayName))}}function Sb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Ob(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 kb(e,n){if(1&e&&(o.qex(0),o.j41(1,"div"),o.EFF(2),o.DNE(3,Ob,4,6,"span",25),o.k0s(),o.bVm()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(2),o.SpI(" ",i.formatNumber(null==t?null:t.pricingPrice,0)," "),o.R7$(),o.Y8G("ngIf",null==t?null:t.pricingPrice)}}function Tb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Rb(e,n){if(1&e&&(o.qex(0),o.j41(1,"div"),o.EFF(2),o.k0s(),o.bVm()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(2),o.SpI(" ",i.formatDate(t.statusStart)," ")}}function Ib(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Pb(e,n){if(1&e&&(o.qex(0),o.j41(1,"div"),o.EFF(2),o.k0s(),o.bVm()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(2),o.SpI(" ",i.formatDate(t.statusEnd)," ")}}function Eb(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function Fb(e,n){if(1&e){const t=o.RV6();o.j41(0,"mat-card",13)(1,"div",14)(2,"mat-card-title"),o.EFF(3),o.k0s(),o.j41(4,"div",15),o.DNE(5,gb,1,1,"taiga-pill-badge",16),o.k0s()(),o.j41(6,"mat-card-content")(7,"div",17)(8,"div",18)(9,"h4"),o.EFF(10),o.nI1(11,"translate"),o.k0s(),o.DNE(12,mb,5,3,"ng-container",19)(13,_b,2,0,"ng-template",null,0,o.C5r),o.j41(15,"h4"),o.EFF(16),o.nI1(17,"translate"),o.k0s(),o.DNE(18,bb,3,1,"ng-container",19)(19,yb,2,0,"ng-template",null,1,o.C5r),o.j41(21,"h4"),o.EFF(22),o.nI1(23,"translate"),o.k0s(),o.DNE(24,xb,3,1,"ng-container",19)(25,vb,2,0,"ng-template",null,2,o.C5r),o.k0s(),o.j41(27,"div",18)(28,"h4"),o.EFF(29),o.nI1(30,"translate"),o.k0s(),o.DNE(31,Mb,4,2,"ng-container",19)(32,Sb,2,0,"ng-template",null,3,o.C5r),o.j41(34,"h4"),o.EFF(35),o.nI1(36,"translate"),o.k0s(),o.DNE(37,kb,4,2,"ng-container",19)(38,Tb,2,0,"ng-template",null,4,o.C5r),o.k0s(),o.j41(40,"div",18)(41,"h4"),o.EFF(42),o.nI1(43,"translate"),o.k0s(),o.DNE(44,Rb,3,1,"ng-container",19)(45,Ib,2,0,"ng-template",null,5,o.C5r),o.j41(47,"h4"),o.EFF(48),o.nI1(49,"translate"),o.k0s(),o.DNE(50,Pb,3,1,"ng-container",19)(51,Eb,2,0,"ng-template",null,6,o.C5r),o.k0s(),o.j41(53,"div",20)(54,"button",21),o.bIt("click",function(){const s=o.eBV(t).$implicit,a=o.XpG();return o.Njj(a.showContract(null==s?null:s.guid))}),o.EFF(55),o.nI1(56,"translate"),o.k0s()()()()()}if(2&e){const t=n.$implicit,i=o.sdS(14),s=o.sdS(20),a=o.sdS(26),r=o.sdS(33),l=o.sdS(39),c=o.sdS(46),d=o.sdS(52),h=o.XpG();o.R7$(3),o.Lme(" ",null==t.nodeClass?null:t.nodeClass.displayName," ",t.number," "),o.R7$(2),o.Y8G("ngIf",h.getStatusText(t)),o.R7$(5),o.JRh(o.bMT(11,27,"ADDRESS")),o.R7$(2),o.Y8G("ngIf",null==t||null==t.objectPrimary?null:t.objectPrimary.locationAddress)("ngIfElse",i),o.R7$(4),o.JRh(o.bMT(17,29,"OBJECTNO")),o.R7$(2),o.Y8G("ngIf",null==t||null==t.objectPrimary?null:t.objectPrimary.number)("ngIfElse",s),o.R7$(4),o.JRh(o.bMT(23,31,"APARTMENTNUMBER")),o.R7$(2),o.Y8G("ngIf",null==t||null==t.objectPrimary?null:t.objectPrimary.identityOfficialApartmentNumber)("ngIfElse",a),o.R7$(5),o.JRh(o.bMT(30,33,"AREA")),o.R7$(2),o.Y8G("ngIf",null==t||null==t.objectPrimary?null:t.objectPrimary.sizeAreaValue)("ngIfElse",r),o.R7$(4),o.JRh(o.bMT(36,35,"RENT")),o.R7$(2),o.Y8G("ngIf",null==t?null:t.pricingPrice)("ngIfElse",l),o.R7$(5),o.JRh(o.bMT(43,37,"CONTRACTPERIODFROM")),o.R7$(2),o.Y8G("ngIf",null==t?null:t.statusStart)("ngIfElse",c),o.R7$(4),o.JRh(o.bMT(49,39,"CONTRACTPERIODTO")),o.R7$(2),o.Y8G("ngIf",null==t?null:t.statusEnd)("ngIfElse",d),o.R7$(3),o.AVh("full-width",h.mediaQueryService.isMobile()),o.R7$(2),o.JRh(o.bMT(56,41,"SHOW"))}}let Ab=(()=>{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=`${Un.i.CONTRACT}`,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)=>
1{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(Nt.y),o.rXU(U.nX),o.rXU(Lt.M),o.rXU(K.c$),o.rXU(U.Ix),o.rXU(Qe.t))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-contracts-list"]],viewQuery:function(i,s){if(1&i&&o.GBs(Ln.iy,7),2&i){let a;o.mGM(a=o.lsd())&&(s.paginator=a.first)}},standalone:!1,decls:13,vars:16,consts:[["address",""],["number",""],["officialNumber",""],["area",""],["price",""],["startDate",""],["endDate",""],[1,"card"],[1,"title"],["data-mom-test","MinaSidor_Avtal_AllaAvtalRubrik",1,"overflow-ellipsis"],[3,"text"],["class","invoice-card","data-mom-test","MinaSidor_Avtal_AllaAvtal_AvtalKort",4,"ngFor","ngForOf"],["data-mom-test","MinaSidor_Avtal_AntalObjektPerSida",3,"page","length","pageIndex","pageSize","hidePageSize"],["data-mom-test","MinaSidor_Avtal_AllaAvtal_AvtalKort",1,"invoice-card"],[1,"card-title"],[1,"pill-badge"],["class","badge-info",3,"text",4,"ngIf"],[1,"flex-contaioner"],[1,"flex-item"],[4,"ngIf","ngIfElse"],[1,"button-row"],["mat-raised-button","","color","primary","data-mom-test","MinaSidor_Avtal_AllaAvtalVisaAvtal",3,"click"],[1,"badge-info",3,"text"],["data-mom-test","MinaSidor_Avtal_AllaAvtalAdress"],["data-mom-test","MinaSidor_Avtal_AllaAvtalObjektnummer"],[4,"ngIf"]],template:function(i,s){1&i&&(o.j41(0,"div")(1,"mat-card",7)(2,"mat-card-title")(3,"div",8)(4,"div",9),o.nrm(5,"taiga-medium-header",10),o.nI1(6,"translate"),o.k0s()()(),o.j41(7,"mat-card-subtitle"),o.EFF(8),o.nI1(9,"translate"),o.k0s()(),o.DNE(10,pb,57,43,"mat-card",11)(11,Fb,57,43,"mat-card",11),o.j41(12,"mat-paginator",12),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,12,"CONTRACT")),o.R7$(3),o.SpI(" ",o.bMT(9,14,"CONTRACTLISTINFO")," "),o.R7$(2),o.Y8G("ngForOf",s.visiblecontractsListItems),o.R7$(),o.Y8G("ngForOf",null==s.contractsQuery||null==s.contractsQuery.contracts?null:s.contractsQuery.contracts.nodes),o.R7$(),o.Y8G("length",s.contractsCount)("pageIndex",s.page-1)("pageSize",s.pageSize)("hidePageSize",!0))},dependencies:[ts.Y,ee.$z,dt.RN,dt.m2,dt.Lc,dt.dh,z.Sq,z.bT,Ui.o,Ln.iy,K.D9],styles:[".is-desktop[_ngcontent-%COMP%]{padding:30px}.is-mobile[_ngcontent-%COMP%]{padding:20px}.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),Db=S(5263),Nn=S(7356),wb=S(2899),$n=S(1585),jb=S(5661),Lb=S(100),Bn=S(2928),Xi=S(3069),Nb=S(5380),$b=S(1396),Bb=S(2765),Ye=S(6233),Gb=S(1301),or=S(6112);const Ji=e=>({invalidChars:e});function Vb(e,n){1&e&&(o.EFF(0),o.nI1(1,"translate")),2&e&&o.JRh(o.bMT(1,1,"CHOOSECONTRACTS"))}function zb(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 Hb(e,n){if(1&e){const t=o.RV6();o.qex(0),o.j41(1,"div",25)(2,"div",26)(3,"div",27),o.EFF(4),o.nI1(5,"translate"),o.k0s(),o.j41(6,"div",28),o.EFF(7),o.k0s()(),o.j41(8,"div",26)(9,"div",27),o.EFF(10),o.nI1(11,"translate"),o.k0s(),o.j41(12,"div",29),o.EFF(13),o.k0s()(),o.j41(14,"div",26)(15,"div",27),o.EFF(16),o.nI1(17,"translate"),o.k0s(),o.j41(18,"div",30),o.EFF(19),o.k0s()(),o.j41(20,"div",26)(21,"div",27),o.EFF(22),o.nI1(23,"translate"),o.k0s(),o.j41(24,"div",31),o.EFF(25),o.k0s()(),o.j41(26,"div",26)(27,"div",27),o.EFF(28),o.nI1(29,"translate"),o.k0s(),o.j41(30,"div",32),o.EFF(31),o.k0s()(),o.j41(32,"div",33)(33,"mat-checkbox",34),o.bIt("change",function(){o.eBV(t),o.XpG();const s=o.sdS(19);return o.Njj(s.reset())}),o.EFF(34),o.nI1(35,"translate"),o.DNE(36,zb,3,3,"span",14),o.k0s()()(),o.bVm()}if(2&e){const t=n.$implicit,i=o.XpG();o.R7$(4),o.JRh(o.bMT(5,13,"CONTRACT")),o.R7$(3),o.JRh(t.displayName),o.R7$(3),o.JRh(o.bMT(11,15,"TYPE")),o.R7$(3),o.JRh(t.typeDisplayName),o.R7$(3),o.JRh(o.bMT(17,17,"ADDRESS")),o.R7$(3),o.JRh(t.primaryObjectLocationAddress),o.R7$(3),o.JRh(o.bMT(23,19,"OBJECTTYPE")),o.R7$(3),o.JRh(t.primaryObjectTypeDisplayName),o.R7$(3),o.JRh(o.bMT(29,21,"NOTICEPERIOD")),o.R7$(3),o.JRh(t.noticeTenantPeriodDescription),o.R7$(2),o.Y8G("formControlName",t.id),o.R7$(),o.SpI("",o.bMT(35,23,"TERMINATE")," "),o.R7$(2),o.Y8G("ngIf",t.isPrimaryContract&&(null==i.contractsItemNoticeContracts||null==i.contractsItemNoticeContracts.items?null:i.contractsItemNoticeContracts.items.length)>1)}}function Yb(e,n){1&e&&(o.EFF(0),o.nI1(1,"translate")),2&e&&o.JRh(o.bMT(1,1,"MOVINGOUT"))}function Wb(e,n){if(1&e&&(o.j41(0,"mat-option",37),o.EFF(1),o.k0s()),2&e){const t=n.$implicit;o.Y8G("value",t.id),o.R7$(),o.SpI(" ",t.displayName," ")}}function Ub(e,n){if(1&e&&(o.j41(0,"div")(1,"mat-form-field",18)(2,"mat-label"),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.j41(5,"mat-select",35),o.DNE(6,Wb,2,2,"mat-option",36),o.k0s(),o.j41(7,"mat-error"),o.EFF(8),o.nI1(9,"translate"),o.k0s()()()),2&e){const t=o.XpG(2);o.R7$(3),o.JRh(o.bMT(4,4,"MOVINGOUTREASON")),o.R7$(2),o.Y8G("required",null==t.s.reasonTypes.errors?null:t.s.reasonTypes.errors.required),o.R7$(),o.Y8G("ngForOf",t.contractsItemNoticeOptions.reasonTypes),o.R7$(2),o.SpI(" ",o.bMT(9,6,"INPUTREQUIRED")," ")}}function Xb(e,n){if(1&e){const t=o.RV6();o.j41(0,"div")(1,"mat-form-field",38),o.bIt("click",function(){o.eBV(t);const s=o.sdS(8);return o.Njj(s.open())}),o.j41(2,"mat-label"),o.EFF(3),o.nI1(4,"translate"),o.k0s(),o.nrm(5,"input",39)(6,"mat-datepicker-toggle",40)(7,"mat-datepicker",41,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")," ")}}function Jb(e,n){if(1&e){const t=o.RV6();o.j41(0,"div")(1,"div",42)(2,"mat-checkbox",43)(3,"div",44),o.nrm(4,"taiga-markdown",45),o.nI1(5,"translate"),o.k0s()()(),o.j41(6,"mat-form-field",38),o.bIt("click",function(){o.eBV(t);const s=o.sdS(13);return o.Njj(s.open())}),o.j41(7,"mat-label"),o.EFF(8),o.nI1(9,"translate"),o.k0s(),o.nrm(10,"input",46)(11,"mat-datepicker-toggle",40)(12,"mat-datepicker",41,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 Kb(e,n){if(1&e&&(o.j41(0,"div"),o.DNE(1,Ub,10,8,"div",14)(2,Xb,12,10,"div",14)(3,Jb,17,14,"div",14),o.k0s()),2&e){const t=o.XpG();o.R7$(),o.Y8G("ngIf",t.contractsItemNoticeOptions.reasonTypes&&t.contractsItemNoticeOptions.reasonTypes.length>0),o.R7$(),o.Y8G("ngIf",t.contractsItemNoticeOptions.allowedEndDates&&t.contractsItemNoticeOptions.allowedEndDates.length>0),o.R7$(),o.Y8G("ngIf",t.contractsItemNoticeOptions.showEarlyEndDates&&t.contractsItemNoticeOptions.earlyEndDates&&t.contractsItemNoticeOptions.earlyEndDates.length>0)}}function Qb(e,n){1&e&&(o.EFF(0),o.nI1(1,"translate")),2&e&&o.JRh(o.bMT(1,1,"NEWADDRESS"))}function qb(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 Zb(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();
1o.R7$(),o.SpI(" ",o.i5U(2,1,"INVALIDCHARACTERS",o.eq3(4,Ji,null==(t=i.t.address.getError("allowedCharacters"))?null:t.invalidChars))," ")}}function t1(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 e1(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,Ji,null==(t=i.t.postcode.getError("allowedCharacters"))?null:t.invalidChars))," ")}}function n1(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 i1(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,Ji,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,$n.f)()]],postcode:[null,[(0,$n.f)()]],city:[null,[(0,$n.f)()]],country:[null,[(0,$n.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.updateValueAndValidity())}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,endD
1ate: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(Nt.y),o.rXU(Lt.M),o.rXU(q.ze),o.rXU(U.nX),o.rXU(Nn.D),o.rXU(U.Ix),o.rXU(o.gRc))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-notice"]],standalone:!1,features:[o.Jv_([{provide:Nn.D,useClass:Db.QH,deps:[Nn.M]},{provide:Nn.a,useValue:wb.D}])],decls:66,vars:55,consts:[["stepper",""],["secondStep",""],["allowedEndDatesPicker",""],["earlyEndDatesPicker",""],["data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_Rubrik",1,"header-container"],[3,"text"],["orientation","vertical","linear","true",3,"selectionChange"],[3,"stepControl"],[3,"formGroup"],["matStepLabel",""],[1,"step-help-text"],[1,"contracts-container"],[4,"ngFor","ngForOf"],["color","primary","mat-raised-button","","matStepperNext","","data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_N\xe4staTillSteg2",1,"step-button"],[4,"ngIf"],["color","primary","mat-raised-button","","matStepperPrevious","","data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_BackaTillSteg1",1,"step-button"],["color","primary","mat-raised-button","","matStepperNext","","data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_N\xe4staTillSteg3",1,"step-button"],[1,"address-container"],[1,"form-field"],["matInput","","formControlName","address","maxlength","128","data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_Gatuadress","autocomplete","street-address",3,"required"],["matInput","","formControlName","postcode","maxlength","64","data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_Postnummer","autocomplete","postal-code",3,"required"],["matInput","","formControlName","city","maxlength","64","data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_Postort","autocomplete","address-level2",3,"required"],["controlName","country","data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_Land",3,"useV2","required"],["color","primary","mat-raised-button","","matStepperPrevious","","data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_BackaTillSteg2",1,"step-button"],["color","primary","mat-raised-button","","matStepperNext","","data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_N\xe4staTillSignering",1,"step-button",3,"clicked","disabled","spin","text"],[1,"contract"],[1,"item"],[1,"label"],["data-mom-test","MyPages_Agreement_TerminateProcess_Agreement",1,"value"],["data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_AvtalTyp",1,"value"],["data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_AvtalAdress",1,"value"],["data-mom-test","MyPages_Agreement_TerminateProcess_Objecttype",1,"value"],["data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_AvtalUpps\xe4gningstid",1,"value"],["data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_AvtalKryssruta",1,"checkbox"],["color","primary",3,"change","formControlName"],["formControlName","reasonTypes","data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_Avflyttningsorsak",3,"required"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"form-field","pointer",3,"click"],["matInput","","readonly","true","required","","formControlName","allowedEndDates","data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_Avflyttningsdatum","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","MinaSidor_Avtal_Upps\xe4gningsprocess_\xd6nskadAvflyttningKryssruta"],[1,"checkbox-label"],[3,"markdown"],["matInput","","readonly","true","formControlName","earlyEndDates","data-mom-test","MinaSidor_Avtal_Upps\xe4gningsprocess_\xd6nskadAvflyttningDatum","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.j41(4,"mat-stepper",6,0),o.bIt("selectionChange",function(l){return o.eBV(a),o.Njj(s.selectionChange(l))}),o.j41(6,"mat-step",7)(7,"form",8),o.DNE(8,Vb,2,3,"ng-template",9),o.j41(9,"div",10),o.EFF(10),o.nI1(11,"translate"),o.k0s(),o.j41(12,"div",11),o.DNE(13,Hb,37,25,"ng-container",12),o.k0s(),o.j41(14,"div")(15,"button",13),o.EFF(16),o.nI1(17,"translate"),o.k0s()()()(),o.j41(18,"mat-step",7,1)(20,"form",8),o.DNE(21,Yb,2,3,"ng-template",9)(22,Kb,4,3,"div",14),o.j41(23,"div")(24,"button",15),o.EFF(25),o.nI1(26,"translate"),o.k0s(),o.j41(27,"button",16),o.EFF(28),o.nI1(29,"translate"),o.k0s()()()(),o.j41(30,"mat-step",7)(31,"form",8),o.DNE(32,Qb,2,3,"ng-template",9),o.j41(33,"div",17)(34,"div")(35,"mat-form-field",18)(36,"mat-label"),o.EFF(37),o.nI1(38,"translate"),o.k0s(),o.nrm(39,"input",19),o.DNE(40,qb,3,3,"mat-error",14)(41,Zb,3,6,"mat-error",14),o.k0s()(),o.j41(42,"div")(43,"mat-form-field",18)(44,"mat-label"),o.EFF(45),o.nI1(46,"translate"),o.k0s(),o.nrm(47,"input",20),o.DNE(48,t1,3,3,"mat-error",14)(49,e1,3,6,"mat-error",14),o.k0s()(),o.j41(50,"div")(51,"mat-form-field",18)(52,"mat-label"),o.EFF(53),o.nI1(54,"translate"),o.k0s(),o.nrm(55,"input",21),o.DNE(56,n1,3,3,"mat-error",14)(57,i1,3,6,"mat-error",14),o.k0s()(),o.j41(58,"div"),o.nrm(59,"taiga-country-select",22),o.k0s()(),o.j41(60,"div")(61,"button",23),o.EFF(62),o.nI1(63,"translate"),o.k0s(),o.j41(64,"taiga-loading-button",24),o.nI1(65,"translate"),o.bIt("clicked",function(){return o.eBV(a),o.Njj(s.putContractsItemNotice())}),o.k0s()()()()()()}2&i&&(o.AVh("is-mobile",s.mediaQueryService.isMobile())("is-desktop",!s.mediaQueryService.isMobile()),o.R7$(2),o.FS9("text",o.bMT(3,35,"NOTICE")),o.R7$(4),o.Y8G("stepControl",s.firstFormGroup),o.R7$(),o.Y8G("formGroup",s.firstFormGroup),o.R7$(3),o.JRh(o.bMT(11,37,"CHOOSECONTRACTSHELP")),o.R7$(3),o.Y8G("ngForOf",null==s.contractsItemNoticeContracts?null:s.contractsItemNoticeContracts.items),o.R7$(3),o.JRh(o.bMT(17,39,"NEXT")),o.R7$(2),o.Y8G("stepControl",s.secondFormGroup),o.R7$(2),o.Y8G("formGroup",s.secondFormGroup),o.R7$(2),o.Y8G("ngIf",s.contractsItemNoticeOptions),o.R7$(3),o.JRh(o.bMT(26,41,"BACK")),o.R7$(3),o.JRh(o.bMT(29,43,"NEXT")),o.R7$(2),o.Y8G("stepControl",s.thirdFormGroup),o.R7$(),o.Y8G("formGroup",s.thirdFormGroup),o.R7$(6),o.JRh(o.bMT(38,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(46,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(54,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.JRh(o.bMT(63,51,"BACK")),o.R7$(2),o.Y8G("disabled",s.disableSaveButton)("spin",s.disableSaveButton)("text",o.bMT(65,53,"GOTOSIGNING")))},dependencies:[jb.m,ee.$z,Lb.fg,Bn.j,Bn.M,Bn.b,Bn.g,Xi.Vh,Xi.bZ,Xi.bU,Nb.g,$b.M,Bb.So,Ye.V5,Ye.Ti,Ye.M6,Ye.F7,Ye.FR,z.Sq,z.bT,q.qT,q.me,q.BC,q.cb,q.YS,q.tU,q.j4,q.JD,Ui.o,Gb.A,or.N,K.D9],styles:[".is-desktop[_ngcontent-%COMP%]{padding:30px}.is-desktop[_ngcontent-%COMP%]   .form-field[_ngcontent-%COMP%]{width:100%}.is-mobile[_ngcontent-%COMP%]{padding:20px}.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,Wi.of)(null)}))}static{this.\u0275fac=function(i){return new(i||e)(o.KVO(Nt.y),o.KVO(ir.I),o.KVO(sr.z),o.KVO(U.Ix))}}static{this.\u0275prov=o.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function a1(e,n){if(1&e&&(o.j41(0,"mat-card",3)(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",4)(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.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.JRh(o.bMT(10,5,"SELECT"))}}function r1(e,n){if(1&e&&(o.j41(0,"mat-card",3)(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",4)(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.JRh(o.bMT(10,5,"SELECT"))}}function l1(e,n){if(1&e){const t=o.RV6();o.j41(0,"mat-paginator",6),o.bIt("page",function(s){o.eBV(t);const a=o.XpG();return o.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 c1=(()=>{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(Nt.y),o.rXU(U.nX),o.rXU(Lt.M),o.rXU(U.Ix),o.rXU(Qe.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(Ln.iy,5),2&i){let a;o.mGM(a=o.lsd())&&(s.matPaginator=a.first)}},standalone:!1,decls:7,vars:13,consts:[[3,"text","subText"],["class","contract-card",4,"ngFor","ngForOf"],[3,"length","pageIndex","pageSize","hidePageSize","page",4,"ngIf"],[1,"contract-card"],["align","end"],["mat-raised-button","","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.DNE(4,a1,11,7,"mat-card",1)(5,r1,11,7,"mat-card",1)(6,l1,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,9,"WEBSHOP"))("subText",o.bMT(3,11,"WEBSHOPSELECTCONTRACTHELP")),o.R7$(3),o.Y8G("ngForOf",s.visiblecontractsListItems),o.R7$(),o.Y8G("ngForOf",null==s.contractsQuery||null==s.contractsQuery.contracts?null:s.contractsQuery.contracts.nodes),o.R7$(),o.Y8G("ngIf",s.contractsCount>10))},dependencies:[_e.Wk,ee.$z,dt.RN,dt.YY,dt.m2,dt.MM,dt.Lc,dt.dh,z.Sq,z.bT,Ui.o,Ln.iy,K.D9],styles:[".is-desktop[_ngcontent-%COMP%]{padding:30px}.is-mobile[_ngcontent-%COMP%]{padding:20px}.contract-card[_ngcontent-%COMP%]{margin:10px 0}"]})}}return e})();const d1=[{path:"",component:Ab,canActivate:[He.q],title:"MYCONTRACTS"},{path:"webshop",component:c1,canActivate:[He.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:[He.q]},{path:":id",component:Zi,canActivate:[He.q,K_.u],resolve:{contract:J_},title:"HANDLE-IN-COMPONENT"},{path:"notice/:id",component:s1,canActivate:[He.q],resolve:{contractsItemNoticeContracts:o1},title:"NOTICE"}];let h1=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=o.$C({type:e})}static{this.\u0275inj=o.G2t({imports:[_e.iI.forChild(d1),_e.iI]})}}return e})();var We=S(1997);function u1(e,n){if(1&e&&(o.j41(0,"div")(1,"div",5)(2,"div",6)(3,"div",7),o.EFF(4),o.nI1(5,"translate"),o.k0s(),o.j41(6,"div",8),o.EFF(7),o.k0s()(),o.j41(8,"div",1)(9,"div",9)(10,"div",10),o.EFF(11),o.nI1(12,"translate"),o.k0s(),o.j41(13,"div",11),o.EFF(14),o.k0s()(),o.j41(15,"div",9)(16,"div",12),o.EFF(17),o.nI1(18,"translate"),o.k0s(),o.j41(19,"div",13),o.EFF(20),o.k0s()(),o.j41(21,"div",9)(22,"div",14),o.EFF(23),o.nI1(24,"translate"),o.k0s(),o.j41(25,"div",15),o.EFF(26),o.k0s()()()(),o.nrm(27,"mat-divider",16),o.k0s()),2&e){let t;const i=n.$implicit,s=o.XpG(2);o.R7$(4),o.JRh(o.bMT(5,8,"REFERS")),o.R7$(3),o.JRh(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.JRh(o.bMT(12,10,"ACTION")),o.R7$(3),o.JRh(i.\u00c5tg\u00e4rd),o.R7$(3),o.JRh(o.bMT(18,12,"PLANNED")),o.R7$(3),o.JRh(s.formatDate(i.Planerad)),o.R7$(3),o.JRh(o.bMT(24,14,"DONE")),o.R7$(3),o.JRh(s.formatDate(i.Utf\u00f6rd))}}
1function f1(e,n){if(1&e&&(o.qex(0),o.j41(1,"div")(2,"div",1)(3,"div",2)(4,"h3",3),o.EFF(5),o.k0s()()(),o.DNE(6,u1,28,16,"div",4),o.k0s(),o.bVm()),2&e){const t=o.XpG();o.R7$(),o.AVh("is-mobile",t.mediaQueryService.isMobile())("is-desktop",!t.mediaQueryService.isMobile()),o.R7$(4),o.JRh(t.maintenanceStatus.Utrymme),o.R7$(),o.Y8G("ngForOf",t.maintenanceStatus.Underh\u00e5ll)}}let p1=(()=>{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(Lt.M))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-maintenance-table"]],inputs:{isMobile:"isMobile",maintenance:"maintenance"},standalone:!1,decls:1,vars:1,consts:[[4,"ngIf"],[1,"flex-container"],["data-mom-test","MyPages_Agreement_Maintenance_Space"],[1,"mat-h3","title"],[4,"ngFor","ngForOf"],["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,"divider"]],template:function(i,s){1&i&&o.DNE(0,f1,7,6,"ng-container",0),2&i&&o.Y8G("ngIf",s.maintenanceStatus)},dependencies:[We.q,z.Sq,z.bT,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 ar=S(4506);
1function g1(e,n){if(1&e){const t=o.RV6();o.j41(0,"div",11)(1,"button",12),o.nI1(2,"translate"),o.bIt("click",function(){o.eBV(t);const s=o.XpG().$implicit,a=o.XpG();return o.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 m1(e,n){if(1&e&&(o.qex(0),o.j41(1,"div",1)(2,"div",2)(3,"div")(4,"h3",3),o.EFF(5),o.k0s(),o.j41(6,"div",4),o.EFF(7),o.k0s()(),o.j41(8,"div",5),o.EFF(9),o.k0s()(),o.j41(10,"div",2)(11,"div")(12,"h3",6),o.EFF(13),o.k0s(),o.j41(14,"div",7),o.EFF(15),o.k0s(),o.j41(16,"div",8),o.EFF(17),o.k0s()(),o.DNE(18,g1,5,3,"div",9),o.k0s()(),o.nrm(19,"mat-divider",10),o.bVm()),2&e){const t=n.$implicit,i=o.XpG();o.R7$(5),o.JRh(t.type.displayName),o.R7$(2),o.JRh(t.number),o.R7$(2),o.JRh(i.formatDate(null==t.status?null:t.status.estimatedStart)),o.R7$(4),o.JRh(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.Y8G("ngIf",t.report)}}let _1=(()=>{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(Qi),o.rXU(Wn.E))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["taiga-inspection"]],inputs:{errandsInspections:"errandsInspections"},standalone:!1,decls:1,vars:1,consts:[[4,"ngFor","ngForOf"],["data-mom-test","MinaSidor_Avtal_BesiktningKort"],[1,"flex-container"],["data-mom-test","MinaSidor_Avtal_BesiktningBesiktningstyp",1,"mat-h3","title"],["data-mom-test","MinaSidor_Avtal_Besiktning\xc4rendenr"],["data-mom-test","MyPages_Agreement_Inspection_EstimatedStart",1,"mat-small"],["data-mom-test","MyPages_Agreement_Inspection_ObjectType",1,"mat-h3","title"],["data-mom-test","MinaSidor_Avtal_BesiktningObjektnummer"],["data-mom-test","MyPages_Agreement_Inspection_ObjectAddress"],["class","icon-container",4,"ngIf"],[1,"divider"],[1,"icon-container"],["mat-icon-button","","color","primary","data-mom-test","MinaSidor_Avtal_BesiktningPDF",3,"click"]],template:function(i,s){1&i&&o.DNE(0,m1,20,7,"ng-container",0),2&i&&o.Y8G("ngForOf",null==s.errandsInspections?null:s.errandsInspections.items)},dependencies:[We.q,be.An,ar.M,z.Sq,z.bT,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 b1(e,n){if(1&e&&(o.j41(0,"div",9)(1,"div",14),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",15),o.EFF(5),o.k0s()()),2&e){const t=o.XpG().$implicit;o.R7$(2),o.JRh(o.bMT(3,2,"PERFORMED")),o.R7$(3),o.JRh(t.Performed)}}function y1(e,n){if(1&e&&(o.j41(0,"div",9)(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.JRh(o.bMT(3,2,"PLANNED")),o.R7$(3),o.JRh(t.Planned)}}function x1(e,n){if(1&e&&(o.j41(0,"div",20),o.EFF(1),o.k0s()),2&e){const t=o.XpG(2).$implicit,i=o.XpG();o.R7$(),o.JRh(i.formatDate(t.OrderedDate))}}function v1(e,n){1&e&&(o.j41(0,"div"),o.EFF(1,"-"),o.k0s())}function C1(e,n){if(1&e&&(o.j41(0,"div",9)(1,"div",18),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.DNE(4,x1,2,1,"div",19)(5,v1,2,0,"ng-template",null,1,o.C5r),o.k0s()),2&e){const t=o.sdS(6),i=o.XpG().$implicit;o.R7$(2),o.JRh(o.bMT(3,3,"PROCESSEDDATE")),o.R7$(2),o.Y8G("ngIf",i.OrderedDate)("ngIfElse",t)}}function M1(e,n){if(1&e&&(o.j41(0,"div",9)(1,"div",21),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",22),o.EFF(5),o.k0s()()),2&e){const t=o.XpG().$implicit;o.R7$(2),o.JRh(o.bMT(3,3,"DISCOUNT")),o.R7$(3),o.Lme("",t.DiscountToday.toFixed()," kr/",t.DiscountTypeToday,"")}}function S1(e,n){if(1&e&&(o.j41(0,"div",9)(1,"div",23),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",24),o.EFF(5),o.k0s()()),2&e){const t=o.XpG().$implicit;o.R7$(2),o.JRh(o.bMT(3,2,"CANBEORDERED")),o.R7$(3),o.JRh(t.OfferAccepted?"Tackat ja "+t.OfferAccepted:t.CanBeOrdered?"Ja":"Nej")}}function O1(e,n){if(1&e&&(o.j41(0,"div",25),o.EFF(1),o.k0s()),2&e){const t=o.XpG().$implicit;o.R7$(),o.SpI("",t.ResidualValue.toFixed()," kr")}}function k1(e,n){1&e&&(o.EFF(0),o.nI1(1,"translate")),2&e&&o.SpI(" ",o.bMT(1,1,"NONE")," ")}function T1(e,n){if(1&e&&(o.j41(0,"div",9)(1,"div",26),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",27),o.EFF(5),o.k0s()()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(2),o.JRh(o.bMT(3,2,"ORDERDATE")),o.R7$(3),o.JRh(i.formatDate(t.ClientOrderedDate))}}function R1(e,n){if(1&e&&(o.j41(0,"div",9)(1,"div",28),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",29),o.EFF(5),o.k0s()()),2&e){const t=o.XpG().$implicit,i=o.XpG();o.R7$(2),o.JRh(o.bMT(3,2,"REPLYBY")),o.R7$(3),o.JRh(i.formatDate(t.AnswerAtLatest))}}function I1(e,n){if(1&e){const t=o.RV6();o.j41(0,"div",30)(1,"button",31),o.bIt("click",function(){o.eBV(t);const s=o.XpG().$implicit,a=o.XpG();return o.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.JRh(o.bMT(3,1,"ADDTOCART")))}function P1(e,n){if(1&e&&(o.qex(0),o.j41(1,"div",3)(2,"div",4)(3,"h3",5),o.EFF(4),o.j41(5,"mat-icon",6),o.EFF(6,"arrow_forward"),o.k0s(),o.EFF(7),o.k0s()()(),o.j41(8,"div")(9,"div",7)(10,"div",7),o.DNE(11,b1,6,4,"div",8)(12,y1,6,4,"div",8)(13,C1,7,5,"div",8)(14,M1,6,5,"div",8)(15,S1,6,4,"div",8),o.j41(16,"div",9)(17,"div",10),o.EFF(18),o.nI1(19,"translate"),o.k0s(),o.DNE(20,O1,2,1,"div",11)(21,k1,2,3,"ng-template",null,0,o.C5r),o.k0s(),o.DNE(23,T1,6,4,"div",8)(24,R1,6,4,"div",8)(25,I1,4,3,"div",12),o.k0s()(),o.nrm(26,"mat-divider",13),o.k0s(),o.bVm()),2&e){const t=n.$implicit,i=o.sdS(22),s=o.XpG();o.R7$(4),o.SpI("",t.Space," "),o.R7$(3),o.JRh(t.Measure),o.R7$(4),o.Y8G("ngIf",t.Performed),o.R7$(),o.Y8G("ngIf",t.Planned),o.R7$(),o.Y8G("ngIf",s.isAllreadyOrdered),o.R7$(),o.Y8G("ngIf",s.isNumber(t.DiscountToday)),o.R7$(),o.Y8G("ngIf",!s.isAllreadyOrdered&&(!0===t.CanBeOrdered||!1===t.CanBeOrdered)),o.R7$(3),o.JRh(o.bMT(19,13,"ADVANCECOST")),o.R7$(2),o.Y8G("ngIf",t.ResidualValue)("ngIfElse",i),o.R7$(3),o.Y8G("ngIf",t.ClientOrderedDate),o.R7$(),o.Y8G("ngIf",!s.isAllreadyOrdered&&t.AnswerAtLatest),o.R7$(),o.Y8G("ngIf",!s.isAllreadyOrdered&&!0===t.CanBeOrdered)}}let E1=(()=>{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")}
1itemClick(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(Lt.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:3,vars:5,consts:[["ResidualValue",""],["OrderedDate",""],[4,"ngFor","ngForOf"],["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","data-mom-test","MyPages_Agreement_TenantControlledMaintenance_Action"],[1,"flex-container"],["class","flex-item width-180",4,"ngIf"],[1,"flex-item","width-180"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_AdvanceCost",1,"mat-body-strong"],["data-mom-test","MyPages_Agreement_TenantControlledMaintenance_AdvanceCostValue",4,"ngIf","ngIfElse"],["class","flex-item","style","margin-left: auto;",4,"ngIf"],[1,"divider"],["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",4,"ngIf","ngIfElse"],["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_AdvanceCostValue"],["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"],[1,"flex-item",2,"margin-left","auto"],["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.DNE(2,P1,27,15,"ng-container",2),o.k0s(),o.bVm()),2&i&&(o.R7$(),o.AVh("is-mobile",s.mediaQueryService.isMobile())("is-desktop",!s.mediaQueryService.isMobile()),o.R7$(),o.Y8G("ngForOf",s.maintenanceStatusResult))},dependencies:[We.q,be.An,ee.$z,z.Sq,z.bT,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 F1(e,n){if(1&e){const t=o.RV6();o.j41(0,"div")(1,"div",4)(2,"div",5)(3,"h3",6),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",7)(9,"button",8),o.bIt("click",function(){const s=o.eBV(t).$implicit,a=o.XpG();return o.Njj(a.deleteItem(s))}),o.EFF(10),o.nI1(11,"translate"),o.k0s()()(),o.nrm(12,"mat-divider",9),o.k0s()}if(2&e){const t=n.$implicit;o.R7$(4),o.SpI("",t.space," "),o.R7$(3),o.JRh(t.measure),o.R7$(3),o.JRh(o.bMT(11,3,"DELETE"))}}function A1(e,n){if(1&e){const t=o.RV6();o.j41(0,"div",10)(1,"button",11),o.bIt("click",function(){o.eBV(t);const s=o.XpG();return o.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 D1=(()=>{class e{constructor(t){this.router=t,this.itemClicked=new o.bkB}
1deleteItem(t){this.itemClicked.emit(t)}goToCheckout(){this.router.navigateByUrl("mypages/checkout/"+this.contractId)}static{this.\u0275fac=function(i){return new(i||e)(o.rXU(U.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:5,vars:2,consts:[[1,"shopping-cart-title"],["color","primary"],[4,"ngFor","ngForOf"],["class","send-button",4,"ngIf"],[1,"flex-container"],[1,"flex-item","width-180"],[1,"mat-h3","title"],[1,"flex-item",2,"margin-left","auto"],["mat-raised-button","",3,"click"],[1,"divider"],[1,"send-button"],["mat-raised-button","","color","primary",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.DNE(3,F1,13,5,"div",2)(4,A1,4,3,"div",3)),2&i&&(o.R7$(3),o.Y8G("ngForOf",s.items),o.R7$(),o.Y8G("ngIf",(null==s.items?null:s.items.length)>0))},dependencies:[We.q,be.An,ee.$z,z.Sq,z.bT,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 w1=S(293),Gn=S(9454),rr=S(5571),j1=S(1843);let L1=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=o.$C({type:e})}static{this.\u0275inj=o.G2t({imports:[K.h.forChild(),_e.iI,Hr.G,h1]})}}return e})();o.wjB(Zi,function(){return[w1.g,We.q,be.An,ar.M,dt.RN,Gn.BS,Gn.GK,Gn.Z2,Gn.WN,rr.ec,rr.pc,z.Sq,z.bT,j1.u,or.N,rl,W_,p1,_1,E1,D1]},function(){return[K.D9,z.GH]})}}]);

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.