mupdf-webviewer
Version:
The web viewer SDK using mupdf.js
1 lines • 360 kB
JavaScript
import{$c as bo,Aa as zs,Bb as gt,Bd as ta,Ca as Z,Cb as Ht,Cc as Gs,Cd as Sn,Dc as Xs,Dd as xi,Eb as li,Ed as Ci,Fa as Ke,Fd as bi,H as At,Hb as $s,Ib as E,Id as en,Ie as Pi,If as Oi,Jb as A,Jc as Ks,Ka as g,Kb as Te,La as Hs,Lb as It,M as ge,Mb as vt,Mf as ga,Na as ai,Nd as ea,Nf as fa,Oa as H,Od as na,Oe as Wt,Pd as yi,Qa as et,Qd as ia,Ra as Pt,Rb as qt,Rd as oa,Sa as Ys,Sb as _t,Ta as fe,Tb as pt,Td as nn,Ua as L,Ub as ci,Ud as Mi,Vb as di,We as ha,Xa as jt,Xb as me,Xc as Co,Ya as b,Yb as hi,Yc as pi,Za as ke,_a as U,_b as Qe,_c as Ee,a as $e,ac as Dt,ad as ui,ae as sa,af as kn,b as oi,bd as yo,be as aa,ca as Ns,cb as x,ce as ra,db as _,de as la,eb as z,ef as pa,f as y,fb as St,gb as kt,hb as qe,ib as Y,id as qs,j as ue,jd as Ze,jf as ua,k as Rs,ka as Ls,kd as gi,kf as dt,lb as F,ld as wn,lf as Qt,mb as M,me as ca,nb as js,nd as ut,ne as da,oa as Ge,ob as Ws,pa as Mt,pb as Us,qb as zt,qd as Je,rb as Tt,rd as fi,sb as Et,sd as mi,tb as Ot,ua as Xe,ub as v,ud as _i,va as R,vb as w,vc as $,wa as N,wb as Ft,wd as Qs,xa as Vs,xb as ri,xd as Zs,ya as Bs,yd as tn,z as si,zd as Js}from"./chunk-FQTIMCVV.js";var xe=(()=>{let i=class i{statusSrc=new Rs({isVisible:!1,position:{top:"0",left:"0"},initialDate:0});status$=this.statusSrc.asObservable();dateChangeSrc=new ue;dateChange$=this.dateChangeSrc.asObservable();get status(){return this.statusSrc.getValue()}};y(i,"DATE_PICKER_WIDTH",258),y(i,"DATE_PICKER_HEIGHT",469),y(i,"\u0275fac",function(o){return new(o||i)}),y(i,"\u0275prov",Ge({token:i,factory:i.\u0275fac}));let e=i;return e})();function ql(e,i){if(e&1){let t=Y();x(0,"div",8)(1,"h3"),v(2),_(),x(3,"i",9),F("click",function(){R(t);let o=M();return N(o.closeCal())}),_()()}if(e&2){let t=M();g(2),w(t.title)}}function Ql(e,i){if(e&1){let t=Y();x(0,"pu-input",10),F("blur",function(){R(t);let o=M();return N(o.onDateInputBlur())})("focus",function(){R(t);let o=M();return N(o.onDateInputFocus())}),_()}if(e&2){let t=M();b("formControl",t.dateFormControl)}}function Zl(e,i){if(e&1&&(x(0,"div",15),v(1),_()),e&2){let t=i.$implicit;g(),w(t)}}function Jl(e,i){if(e&1){let t=Y();x(0,"div",16),F("click",function(){let o=R(t).$implicit,s=M(2);return N(s.changeDate(o))}),z(1,"mark",17)(2,"mark",18),x(3,"span"),v(4),_()()}if(e&2){let t=i.$implicit,n=M(2);U("inactive",n.isInActiveDate(t))("selected",t.isActive&&n.selectedDate.getDate()===t.date&&n.selectedDate.getMonth()===n.currentDate.getMonth()&&n.selectedDate.getFullYear()===n.currentDate.getFullYear()),g(4),w(t.date)}}function tc(e,i){if(e&1&&(St(0),x(1,"article",11),L(2,Zl,2,1,"div",12),_(),x(3,"article",13),L(4,Jl,5,5,"div",14),_(),kt()),e&2){let t=M();g(2),b("ngForOf",t.Weeks),g(2),b("ngForOf",t.onDisplayDays)}}function ec(e,i){if(e&1){let t=Y();x(0,"div",21),F("click",function(){let o=R(t).$implicit,s=M(2);return N(s.changeMonth(o))}),z(1,"mark",17)(2,"mark",18),x(3,"span"),v(4),_()()}if(e&2){let t=i.$implicit,n=M(2);U("selected",n.selectedDate.getMonth()+1===t&&n.selectedDate.getFullYear()===n.currentDate.getFullYear())("inactive",n.isInActiveDate(t)),g(4),w(t)}}function nc(e,i){if(e&1&&(St(0),x(1,"article",19),L(2,ec,5,5,"div",20),_(),kt()),e&2){let t=M();g(2),b("ngForOf",t.onDisplayMonth)}}function ic(e,i){if(e&1){let t=Y();x(0,"div",24),F("click",function(){let o=R(t).$implicit,s=M(2);return N(s.changeYear(o))}),z(1,"mark",17)(2,"mark",18),x(3,"span"),v(4),_()()}if(e&2){let t=i.$implicit,n=M(2);U("selected",n.selectedDate.getFullYear()===t)("inactive",n.isInActiveDate(t)),g(4),w(t)}}function oc(e,i){if(e&1&&(St(0),x(1,"article",22),L(2,ic,5,5,"div",23),_(),kt()),e&2){let t=M();g(2),b("ngForOf",t.onDisplayYears)}}function sc(e,i){if(e&1){let t=Y();x(0,"footer")(1,"button",25),E(2,"translate"),F("click",function(){R(t);let o=M();return N(o.closeCal())}),v(3),E(4,"translate"),_(),x(5,"button",26),E(6,"translate"),F("click",function(){R(t);let o=M();return N(o.publishDate())}),v(7),E(8,"translate"),_()()}e&2&&(g(),jt("aria-label",A(2,4,"CANCEL")),g(2),Ft(" ",A(4,6,"CANCEL")," "),g(2),jt("aria-label",A(6,8,"CONFIRM")),g(2),Ft(" ",A(8,10,"CONFIRM")," "))}var vi=(()=>{let i=class i{subscriptionService;datePickerService;changeDetectorRef;translatePipe;subs;elRef;renderer;disablePast=!1;size="TALL";title="";dateFormat="yyyy-MM-dd";defaultDateType=0;autoClosing=!1;initialDate;dateSelect=new Z;dateType;selectedDate;isHoverOnHost=!1;onDisplayDays=[];onDisplayMonth=[1,2,3,4,5,6,7,8,9,10,11,12];onDisplayYears=[];today=new Date;currentDate=new Date;nextDay=new Date(this.today.setDate(this.today.getDate()+1));dateFormControl=new ut;defaultDateTypeLength=[2,1,0].length;Weeks=["S","M","T","W","T","F","S"];CalendarColNum=42;get disableToPast(){let n=this.disablePast?this.nextDay:this.today,o=this.currentDate.getMonth()===n.getMonth(),s=this.currentDate.getFullYear()===n.getFullYear(),a=this.dateType===0&&o&&s,r=this.dateType===1&&n.getFullYear()===parseInt(this.getTitle()),l=this.dateType===2&&!!this.onDisplayYears.find(c=>c===n.getFullYear());return(a||r||l)&&this.disablePast}get Year(){return 2}get Month(){return 1}get Date(){return 0}get isYear(){return this.dateType===this.Year}get isTallSize(){return this.size==="TALL"}get visibleFooter(){return this.size!=="TINY"}constructor(n,o,s,a,r,l,c){this.subscriptionService=n,this.datePickerService=o,this.changeDetectorRef=s,this.translatePipe=a,this.subs=r,this.elRef=l,this.renderer=c}preventClose(n){n.stopPropagation(),n.stopImmediatePropagation()}onMouseEnter(){this.isHoverOnHost=!0}onMouseLeave(){this.isHoverOnHost=!1}ngOnInit(){this.initSubscriptions(),this.initialDate?(this.selectedDate=new Date(this.initialDate),this.currentDate.setFullYear(this.selectedDate.getFullYear(),this.selectedDate.getMonth())):(this.selectedDate=new Date,this.disablePast&&(this.currentDate.setDate(this.currentDate.getDate()+1),this.selectedDate.setDate(this.selectedDate.getDate()+1))),this.currentDate.setDate(1),this.currentDate.setHours(0,0,0,0),this.dateType=this.defaultDateType,this.setDisplayDays(),this.setDisplayYears(),this.dateFormControl.setValue(`${this.getFormattedDateString(this.selectedDate)}(${this.getRemainingDate()}${this.translatePipe.transform("DAYS")})`),this.subscriptionService.push(kn.windowScrollEvent$.pipe(ge(()=>this.isHoverOnHost),Ls(n=>n.preventDefault()),Ns(200)).subscribe(n=>{this.changeNextPage(n.deltaY>0),this.changeDetectorRef.detectChanges()}))}ngAfterViewInit(){this.placeCalendarWithinWindow()}initSubscriptions(){this.subs.push(At(document,"mousedown").subscribe({next:n=>{let o=n.target,a=this.elRef.nativeElement.parentNode,r=o.parentNode;!this.autoClosing||a.contains(r)||(this.closeCal(),this.changeDetectorRef.markForCheck())}}),kn.windowResize$.subscribe({next:()=>{this.autoClosing&&this.closeCal(),this.placeCalendarWithinWindow()}}))}placeCalendarWithinWindow(){let n=this.elRef.nativeElement,o=window.innerHeight,s=n.getBoundingClientRect(),a=Number(n.style.transform.replace(/translateY\((-?\d+\.?\d*)px\)/,"$1")),r=Math.max(0,s.bottom-a-o);this.renderer.setStyle(n,"transform",`translateY(-${r}px)`)}onDateInputFocus(){this.dateFormControl.setValue(this.getFormattedDateString(this.selectedDate))}onDateInputBlur(){let n=this.dateFormControl.value,o=Wt.parseYMDstr(n),s=new Date,a=new Date;switch(o&&a.setFullYear(o[0],o[1]-1,o[2]),!o||Number(a)<Number(s)?(this.selectedDate.setFullYear(s.getFullYear(),s.getMonth(),s.getDate()+1),this.currentDate.setFullYear(s.getFullYear(),s.getMonth(),s.getDate()+1)):(this.selectedDate.setFullYear(o[0],o[1]-1,o[2]),this.currentDate.setFullYear(o[0],o[1]-1,o[2])),this.updateDateInputValue(),this.dateType){case 0:this.setDisplayDays();break;case 2:this.setDisplayYears();break;default:break}}updateDateInputValue(){this.dateFormControl.setValue(`${this.getFormattedDateString(this.selectedDate)}(${this.getRemainingDate()}\uC77C)`)}getTitle(){switch(this.dateType){case 0:return`${this.currentDate.getMonth()+1}${this.translatePipe.transform("MONTH")} ${this.currentDate.getFullYear()}`;case 1:return`${this.currentDate.getFullYear()}`;case 2:return`${this.selectedDate.getFullYear()}`}}increaseDateType(){this.dateType=Math.min(this.dateType+1,this.defaultDateTypeLength-1)}changeNextPage(n){let o=n?1:-1;if(!(!n&&this.disableToPast))switch(this.dateType){case 0:this.currentDate.setMonth(this.currentDate.getMonth()+o),this.setDisplayDays();break;case 1:this.currentDate.setFullYear(this.currentDate.getFullYear()+o);break;case 2:this.currentDate.setFullYear(this.currentDate.getFullYear()+o*7),this.setDisplayYears();break;default:break}}changeDate(n){if(this.isInActiveDate(n))return;let o=new Date(this.selectedDate);o.setDate(n.date),o.setMonth(this.currentDate.getMonth()),o.setFullYear(this.currentDate.getFullYear()),this.selectedDate=o,this.updateDateInputValue(),this.decreaseDateLevel(),this.size==="TINY"&&this.publishDate()}changeMonth(n){this.isInActiveDate(n)||(this.currentDate.setMonth(n-1),this.decreaseDateLevel())}changeYear(n){this.isInActiveDate(n)||(this.currentDate.setFullYear(n),this.decreaseDateLevel())}publishDate(){this.dateSelect.emit(this.selectedDate),this.datePickerService.dateChangeSrc.next(this.selectedDate),this.closeCal()}closeCal(){this.datePickerService.statusSrc.next({isVisible:!1})}getRemainingDate(){return Math.round((this.selectedDate.getTime()-this.today.getTime())/(1e3*60*60*24))+1}isInActiveDate(n){let o=this.disablePast?this.nextDay:this.today;switch(this.dateType){case 0:{let s=n,a=!s.isActive,r=s.date<o.getDate(),l=this.currentDate.getMonth()===o.getMonth(),c=this.currentDate.getFullYear()===o.getFullYear();return a||this.disablePast&&r&&l&&c}case 1:{let s=n;return this.disablePast&&s<o.getMonth()+1&&o.getFullYear()===parseInt(this.getTitle())}case 2:{let s=n;return this.disablePast&&s<o.getFullYear()}}}getFormattedDateString(n){return`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}-${String(n.getDate()).padStart(2,"0")}`}decreaseDateLevel(){this.dateType=Math.max(this.dateType-1,0),this.dateType===0&&this.setDisplayDays()}culDate(n,o){let s=new Date(n,o,0).getDate(),a=new Date(n,o+1,0).getDate(),r=new Date(n,o,1).getDay(),l=[],c=s-r,d=0,h=0,p;for(let u=0;u<this.CalendarColNum;u++)u<r?(c++,p={date:c,isActive:!1}):d<a?(d++,p={date:d,isActive:!0}):(h++,p={date:h,isActive:!1}),l.push(p);return l}setDisplayDays(){this.onDisplayDays=this.culDate(this.currentDate.getFullYear(),this.currentDate.getMonth())}setDisplayYears(){this.onDisplayYears=[];for(let n=this.currentDate.getFullYear()-7;n<this.currentDate.getFullYear()+8;n++)this.onDisplayYears.push(n)}};y(i,"\u0275fac",function(o){return new(o||i)(H($),H(xe),H(vt),H(dt),H($),H(Ke),H(ai))}),y(i,"\u0275cmp",et({type:i,selectors:[["sd-date-picker"]],hostBindings:function(o,s){o&1&&F("mousedown",function(r){return s.preventClose(r)})("touchstart",function(r){return s.preventClose(r)})("mouseenter",function(){return s.onMouseEnter()})("mouseleave",function(){return s.onMouseLeave()})},inputs:{disablePast:"disablePast",size:"size",title:"title",dateFormat:"dateFormat",defaultDateType:"defaultDateType",autoClosing:"autoClosing",initialDate:"initialDate"},outputs:{dateSelect:"dateSelect"},standalone:!1,features:[gt([$])],decls:13,vars:12,consts:[["class","title",4,"ngIf"],["class","selected-date","size","small",3,"formControl","blur","focus",4,"ngIf"],[1,"controller"],[1,"chevron-icon","bt",3,"click","ngClass"],[1,"text",3,"click"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngIf"],[1,"title"],[1,"papycon","papycon-cross",3,"click"],["size","small",1,"selected-date",3,"blur","focus","formControl"],[1,"weeks"],["class","day",4,"ngFor","ngForOf"],[1,"days"],["class","day",3,"inactive","selected","click",4,"ngFor","ngForOf"],[1,"day"],[1,"day",3,"click"],[1,"period-bg"],[1,"period-fg"],[1,"months"],["class","month",3,"selected","inactive","click",4,"ngFor","ngForOf"],[1,"month",3,"click"],[1,"years"],["class","year",3,"selected","inactive","click",4,"ngFor","ngForOf"],[1,"year",3,"click"],["size","small","color","white",1,"ep-button",3,"click"],["size","small","color","primary",1,"ep-button",3,"click"]],template:function(o,s){o&1&&(x(0,"header"),L(1,ql,4,1,"div",0)(2,Ql,1,1,"pu-input",1),x(3,"div",2)(4,"i",3),F("click",function(){return s.changeNextPage(!1)}),_(),x(5,"div",4),F("click",function(){return s.increaseDateType()}),v(6),_(),x(7,"i",3),F("click",function(){return s.changeNextPage(!0)}),_()()(),x(8,"section",5),L(9,tc,5,2,"ng-container",6)(10,nc,3,1,"ng-container",6)(11,oc,3,1,"ng-container",6),_(),L(12,sc,9,12,"footer",7)),o&2&&(g(),b("ngIf",s.title),g(),b("ngIf",s.isTallSize),g(2),U("inactive",s.disableToPast),b("ngClass",s.isYear?"papycon papycon-chevron3-up":"papycon papycon-chevron3-left"),g(2),w(s.getTitle()),g(),b("ngClass",s.isYear?"papycon papycon-chevron3-down":"papycon papycon-chevron3-right"),g(),b("ngSwitch",s.dateType),g(),b("ngSwitchCase",s.Date),g(),b("ngSwitchCase",s.Month),g(),b("ngSwitchCase",s.Year),g(),b("ngIf",s.visibleFooter))},styles:["[_nghost-%COMP%]{position:absolute;display:flex;flex-direction:column;width:257px;border-radius:2px;border:solid 1px var(--mono-30);background-color:var(--mono-00);padding:20px 16px 10px;max-width:224px;font-family:NotoSans-Regular,sans-serif;font-size:13px;line-height:22px}[_nghost-%COMP%] header[_ngcontent-%COMP%]{color:var(--mono-70);width:100%;display:flex;flex-direction:column}[_nghost-%COMP%] header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:13px}[_nghost-%COMP%] header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-family:NotoSans-Medium,sans-serif;font-size:20px;line-height:28px;margin:10px 0 0 8px;font-weight:400;display:flex}[_nghost-%COMP%] header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:24px;height:24px;margin:12px 5px 0 0;cursor:pointer}[_nghost-%COMP%] header[_ngcontent-%COMP%] pu-input.selected-date[_ngcontent-%COMP%]{margin:9px 6px 17px}[_nghost-%COMP%] header[_ngcontent-%COMP%] pu-input.selected-date[_ngcontent-%COMP%] input{color:var(--primary-70)}[_nghost-%COMP%] header[_ngcontent-%COMP%] .controller[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between}[_nghost-%COMP%] header[_ngcontent-%COMP%] .chevron-icon[_ngcontent-%COMP%]{width:20px;line-height:20px;cursor:pointer;font-size:10px;margin:0 8px;display:flex;justify-content:center;align-items:center}[_nghost-%COMP%] header[_ngcontent-%COMP%] .chevron-icon.inactive[_ngcontent-%COMP%]{color:var(--font-disable);cursor:auto}[_nghost-%COMP%] header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:NotoSans-Medium,sans-serif;text-align:center;font-size:12px;cursor:pointer;padding:0 3px}[_nghost-%COMP%] header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]:hover{background-color:var(--mono-10)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month[_ngcontent-%COMP%]{position:relative;cursor:pointer;line-height:32px;width:32px;text-align:center;color:var(--mono-50);font-weight:500;font-size:12px;width:52px;padding:4px 11px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month[_ngcontent-%COMP%]:not(.inactive):hover mark[_ngcontent-%COMP%]{border-radius:50%;border-color:var(--primary-50);background:rgba(var(--primary-50),.08)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative;font-family:Roboto;font-weight:400;font-stretch:normal;font-style:normal;text-align:center;color:var(--mono-90);font-size:12px;line-height:20px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month[_ngcontent-%COMP%] mark[_ngcontent-%COMP%]{position:absolute;bottom:2px;left:3px;right:3px;top:4px;border:1px solid transparent;background:none}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month[_ngcontent-%COMP%]:hover mark[_ngcontent-%COMP%]{border-radius:50%;border-color:var(--primary-50);background:rgba(var(--primary-50),.08)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month.selected[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--mono-00)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month.selected[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{color:var(--mono-90)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month.selected[_ngcontent-%COMP%] mark[_ngcontent-%COMP%]{border-radius:50%;border-color:var(--primary-50);background:var(--primary-50)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month[_ngcontent-%COMP%] mark[_ngcontent-%COMP%]{border-radius:12px;bottom:6px;left:14px;right:14px;top:8px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month[_ngcontent-%COMP%]:hover mark[_ngcontent-%COMP%]{border-radius:12px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month.selected[_ngcontent-%COMP%] mark[_ngcontent-%COMP%]{border-radius:12px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month.inactive[_ngcontent-%COMP%]{cursor:auto}[_nghost-%COMP%] section[_ngcontent-%COMP%] .months[_ngcontent-%COMP%] .month.inactive[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--font-disable)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%]{color:var(--mono-50);margin-bottom:7px;font-weight:500;display:flex}[_nghost-%COMP%] section[_ngcontent-%COMP%] .weeks[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]{line-height:32px;width:32px;text-align:center;color:var(--mono-50);font-weight:500;font-size:12px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year[_ngcontent-%COMP%]{position:relative;cursor:pointer;line-height:32px;width:32px;text-align:center;color:var(--mono-50);font-weight:500;font-size:12px;width:52px;padding:4px 11px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year[_ngcontent-%COMP%]:not(.inactive):hover mark[_ngcontent-%COMP%]{border-radius:50%;border-color:var(--primary-50);background:rgba(var(--primary-50),.08)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative;font-family:Roboto;font-weight:400;font-stretch:normal;font-style:normal;text-align:center;color:var(--mono-90);font-size:12px;line-height:20px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year[_ngcontent-%COMP%] mark[_ngcontent-%COMP%]{position:absolute;bottom:2px;left:3px;right:3px;top:4px;border:1px solid transparent;background:none}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year[_ngcontent-%COMP%]:hover mark[_ngcontent-%COMP%]{border-radius:50%;border-color:var(--primary-50);background:rgba(var(--primary-50),.08)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year.selected[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--mono-00)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year.selected[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{color:var(--mono-90)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year.selected[_ngcontent-%COMP%] mark[_ngcontent-%COMP%]{border-radius:50%;border-color:var(--primary-50);background:var(--primary-50)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year[_ngcontent-%COMP%] mark[_ngcontent-%COMP%]{border-radius:12px;bottom:6px;left:14px;right:14px;top:8px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year[_ngcontent-%COMP%]:hover mark[_ngcontent-%COMP%]{border-radius:12px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year.selected[_ngcontent-%COMP%] mark[_ngcontent-%COMP%]{border-radius:12px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year.inactive[_ngcontent-%COMP%]{cursor:auto}[_nghost-%COMP%] section[_ngcontent-%COMP%] .years[_ngcontent-%COMP%] .year.inactive[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--font-disable)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .days[_ngcontent-%COMP%]{color:var(--mono-90);display:flex;flex-flow:wrap}[_nghost-%COMP%] section[_ngcontent-%COMP%] .days[_ngcontent-%COMP%] .day.inactive[_ngcontent-%COMP%]{height:32px;color:var(--font-disable);line-height:32px;width:32px;text-align:center;color:var(--mono-50);font-weight:500;font-size:12px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .days[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]:not(.inactive){position:relative;cursor:pointer;line-height:32px;width:32px;text-align:center;color:var(--mono-50);font-weight:500;font-size:12px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .days[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]:not(.inactive):not(.inactive):hover mark[_ngcontent-%COMP%]{border-radius:50%;border-color:var(--primary-50);background:rgba(var(--primary-50),.08)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .days[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]:not(.inactive) span[_ngcontent-%COMP%]{position:relative;font-family:Roboto;font-weight:400;font-stretch:normal;font-style:normal;text-align:center;color:var(--mono-90);font-size:12px;line-height:20px}[_nghost-%COMP%] section[_ngcontent-%COMP%] .days[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]:not(.inactive) mark[_ngcontent-%COMP%]{position:absolute;bottom:2px;left:3px;right:3px;top:4px;border:1px solid transparent;background:none}[_nghost-%COMP%] section[_ngcontent-%COMP%] .days[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]:not(.inactive):hover mark[_ngcontent-%COMP%]{border-radius:50%;border-color:var(--primary-50);background:rgba(var(--primary-50),.08)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .days[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]:not(.inactive).selected span[_ngcontent-%COMP%]{color:var(--mono-00)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .days[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]:not(.inactive).selected:hover span[_ngcontent-%COMP%]{color:var(--mono-90)}[_nghost-%COMP%] section[_ngcontent-%COMP%] .days[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]:not(.inactive).selected mark[_ngcontent-%COMP%]{border-radius:50%;border-color:var(--primary-50);background:var(--primary-50)}[_nghost-%COMP%] footer[_ngcontent-%COMP%]{margin:28px 7px 24px 0;text-align:right}[_nghost-%COMP%] footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{margin-left:12px}"],changeDetection:0}));let e=i;return e})();var ma=(()=>{let i=class i{static forRoot(){return{ngModule:i,providers:[xe]}}};y(i,"\u0275fac",function(o){return new(o||i)}),y(i,"\u0275mod",Pt({type:i})),y(i,"\u0275inj",Mt({imports:[Dt,Qt,en,tn]}));let e=i;return e})();Ht(vi,[qt,_t,pt,ci,di,bi,Ze,Je],[dt]);var wi=function(e){return e.WARNING="WARNING",e.DELETE="DELETE",e.DELETE_ITEMS="DELETE_ITEMS",e.CHECK_USER="CHECK_USER",e.MODIFY_USER="MODIFY_USER",e.CREATE_USER="CREATE_USER",e.MODIFY_MY_INFO="MODIFY_MY_INFO",e.ADD_DOCUMENT="ADD_DOCUMENT",e.DOCUMENT_DETAIL="DOCUMENT_DETAIL",e.ASK_BEFORE_DESTROY_LICENSE="ASK_BEFORE_DESTROY_LICENSE",e.STANDARD_UI_MODE="STANDARD_UI_MODE",e.LITE_UI_MODE="LITE_UI_MODE",e.LANGUAGE_SETTING="LANGUAGE_SETTING",e}(wi||{}),Po=function(e){return e[e.DASHBOARD=0]="DASHBOARD",e[e.DOCUMENT_LIST=1]="DOCUMENT_LIST",e[e.STATISTIC_PERIOD=2]="STATISTIC_PERIOD",e[e.STATISTIC_DOCUMENT=3]="STATISTIC_DOCUMENT",e[e.SERVER_MONITORING=4]="SERVER_MONITORING",e[e.LOG=5]="LOG",e[e.DOCUMENT_LOG=6]="DOCUMENT_LOG",e[e.SETTINGS=7]="SETTINGS",e[e.ACCOUNT=8]="ACCOUNT",e[e.LICENSE=9]="LICENSE",e}(Po||{}),on=(()=>{let i=class i{dialogVisibility={};dialogConfigs={};dialogEventSrc=new ue;dialogEvent$=this.dialogEventSrc.asObservable();closeCurrentActiveDialog(){if(Object.values(this.dialogVisibility).every(s=>!s))return;let n=Object.entries(this.dialogVisibility).find(s=>s[1]);if(!n)throw new Ks("Expected to find an open dialog, but none was found.");let o=n[0];this.toggleDialogVisibility(wi[o],!1)}toggleDialogVisibility(n,o,s){this.dialogVisibility[n]=o,this.dialogConfigs[n]=s??{size:{height:360,width:360}},this.dialogEventSrc.next({dialogType:n,action:o?"open":"close"})}publishEvent(n,o){this.dialogEventSrc.next($e({dialogType:n},o))}};y(i,"\u0275fac",function(o){return new(o||i)}),y(i,"\u0275prov",Ge({token:i,factory:i.\u0275fac}));let e=i;return e})();var rc=["buttonElement"],lc=e=>({top:e});function cc(e,i){if(e&1){let t=Y();x(0,"li",1),F("click",function(){let o=R(t).$implicit,s=M(2);return N(s.onItemClick(o))}),v(1),_()}if(e&2){let t=i.$implicit;g(),w(t.label)}}function dc(e,i){if(e&1&&(x(0,"ul",4),L(1,cc,2,1,"li",5),_()),e&2){let t=M();b("ngStyle",li(2,lc,t.styleTop+"px")),g(),b("ngForOf",t.options)}}var xm=(()=>{let i=class i{ngControl;color;changeDetectorRef;datePickerService;subs;options=[];isVisibleOptions=!1;value;label="";styleTop=0;labelSubs=[];buttonElement;constructor(n,o,s,a,r){this.ngControl=n,this.color=o,this.changeDetectorRef=s,this.datePickerService=a,this.subs=r,this.ngControl&&(this.ngControl.valueAccessor=this)}labelFunc=()=>this.value.label;ngAfterViewInit(){this.styleTop=this.buttonElement.nativeElement.getBoundingClientRect().height}ngOnChanges(){this.value=this.options[0]}registerOnChange(n){this.avcChanger=n}registerOnTouched(){}writeValue(n){let o=n.value.type;if(typeof n?.value.type=="function"){let s=n.value.type();if(typeof s=="string"||s instanceof Date)o=s;else{this.labelSubs.push(n.value.type().subscribe({next:a=>{this.value=n,this.avcChanger(n),this.isVisibleOptions=!1,this.label=this.labelFunc(a),this.changeDetectorRef.markForCheck()}}),this.datePickerService.status$.pipe(ge(a=>!a.isVisible)).subscribe({next:()=>{this.labelSubs.forEach(a=>a.unsubscribe())}}));return}}this.value=n,this.avcChanger(n),this.isVisibleOptions=!1,this.label=this.labelFunc(o),this.labelSubs.forEach(s=>s.unsubscribe()),this.changeDetectorRef.markForCheck()}onItemClick(n){this.writeValue(n)}toggleOption(){this.isVisibleOptions=!this.isVisibleOptions,this.isVisibleOptions?setTimeout(()=>{this.subs.set("click",At(kn.nativeWindow,"click",{once:!0}).subscribe({next:()=>{this.isVisibleOptions=!1,this.changeDetectorRef.markForCheck()}}))}):this.subs.unsubscribe()}avcChanger=n=>n};y(i,"\u0275fac",function(o){return new(o||i)(H(qs,10),zs("color"),H(vt),H(xe),H($))}),y(i,"\u0275cmp",et({type:i,selectors:[["admin-dropdown"]],viewQuery:function(o,s){if(o&1&&zt(rc,5),o&2){let a;Tt(a=Et())&&(s.buttonElement=a.first)}},inputs:{options:"options",labelFunc:"labelFunc"},standalone:!1,features:[gt([$]),Xe],decls:5,vars:3,consts:[["buttonElement",""],[3,"click"],[1,"papycon","papycon-chevron2-down"],[3,"ngStyle",4,"ngIf"],[3,"ngStyle"],[3,"click",4,"ngFor","ngForOf"]],template:function(o,s){if(o&1){let a=Y();x(0,"button",1,0),F("click",function(){return R(a),N(s.toggleOption())}),z(2,"i",2),v(3),_(),L(4,dc,2,4,"ul",3)}o&2&&(jt("color",s.color),g(3),w(s.label),g(),b("ngIf",s.isVisibleOptions))},dependencies:[_t,pt,me],styles:["[_nghost-%COMP%]{position:relative;color:#1e1e1e;height:33px;display:flex}button[_ngcontent-%COMP%]{width:100%;height:100%;padding:8px;border-radius:2px;box-shadow:0 4px 32px #6c6c6c1f;border:solid 1px #DADADA;background-color:#fff;display:flex;align-items:center;cursor:pointer;font-family:NotoSans-Regular,sans-serif;font-size:14px;line-height:24px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}button[color=none][_ngcontent-%COMP%]{background:none;border:none;box-shadow:none}button[color=none][_ngcontent-%COMP%]:hover{background-color:#fff;box-shadow:0 4px 32px #6c6c6c1f;border:solid 1px #DADADA}button[_ngcontent-%COMP%]:hover{background-color:#dadada}button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:8px;margin-right:6px}ul[_ngcontent-%COMP%]{font-size:13px;line-height:22px;font-family:NotoSans-Regular,sans-serif;left:0;position:absolute;list-style:none;padding:4px 0;margin:0;border-radius:4px;box-shadow:0 4px 32px #6c6c6c1f;border:solid 1.2px #DADADA;background-color:#fff;z-index:500;width:100%;box-sizing:border-box}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding:8px 11px}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background-color:#dadada}"],changeDetection:0}));let e=i;return e})();var Om=(()=>{let i=class i{};y(i,"\u0275fac",function(o){return new(o||i)}),y(i,"\u0275mod",Pt({type:i})),y(i,"\u0275inj",Mt({imports:[Dt]}));let e=i;return e})();var Ie=function(e){return e.ONE_DAY="1d",e.ONE_WEEK="1w",e.ONE_MONTH="1M",e.ONE_YEAR="1y",e.TWO_HUNDRED_YEAR="200y",e}(Ie||{});var hc=["*"];function pc(e,i){e&1&&z(0,"sd-card-loader")}function uc(e,i){if(e&1&&(x(0,"h3"),v(1),_()),e&2){let t=M();g(),w(t.title)}}function gc(e,i){e&1&&(x(0,"div",4),z(1,"div",5)(2,"div",5)(3,"div",5)(4,"div",5),x(5,"span",6),v(6),E(7,"translate"),_()()),e&2&&(g(6),w(A(7,1,"FAILED_FETCHING_DATA")))}function fc(e,i){if(e&1&&(x(0,"div",2),L(1,gc,8,3,"div",3),_()),e&2){let t=M();g(),b("ngIf",t.fetchError)}}var Oo=(()=>{let i=class i{title="";fetchError;isLoading};y(i,"\u0275fac",function(o){return new(o||i)}),y(i,"\u0275cmp",et({type:i,selectors:[["sd-card"]],hostVars:2,hostBindings:function(o,s){o&2&&U("isLoading",s.isLoading)},inputs:{title:"title",fetchError:"fetchError",isLoading:"isLoading"},standalone:!1,ngContentSelectors:hc,decls:4,vars:3,consts:[[4,"ngIf"],["class","cover",4,"ngIf"],[1,"cover"],["class","error-message",4,"ngIf"],[1,"error-message"],[1,"dot"],[1,"text"]],template:function(o,s){o&1&&(js(),L(0,pc,1,0,"sd-card-loader",0)(1,uc,2,1,"h3",0),Ws(2),L(3,fc,2,1,"div",1)),o&2&&(b("ngIf",s.isLoading),g(),b("ngIf",s.title),g(2),b("ngIf",s.isLoading||s.fetchError))},styles:["[_nghost-%COMP%]{border-radius:4px;background-color:#fff;display:flex;flex-direction:column;flex:1 1 auto;position:relative;padding:30px}sd-card-loader[_ngcontent-%COMP%]{position:absolute;top:calc(50% - 20px);left:calc(50% - 130px)}.cover[_ngcontent-%COMP%]{border-radius:4px;background-color:#6c6c6c4d;position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.cover[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{display:flex;justify-content:space-around;align-items:center;width:458px;height:48px;padding:0 10px;border-radius:6px;box-shadow:0 4px 32px #6c6c6c1f;border:solid 1.2px #DADADA;background-color:#fff;z-index:10000}.cover[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{position:relative;width:14px;height:14px;border-radius:50%;float:left}.cover[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]:nth-child(1){background:#f4f4f4}.cover[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]:nth-child(2){background:#dadada}.cover[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]:nth-child(3){background:#f79f1a}.cover[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]:nth-child(4){background:#ff6100}.cover[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:inline-block;font-size:14px;color:#6c6c6c}h3[_ngcontent-%COMP%]{font-family:NotoSans-Medium,sans-serif;font-size:14px;line-height:24px;line-height:1;font-weight:400}"]}));let e=i;return e})();var mc=["dateDropdownElement"];function _c(e,i){if(e&1){let t=Y();x(0,"button",3),F("click",function(o){R(t);let s=M();return N(s.changeDateType(s.Today,o))}),v(1),E(2,"translate"),_()}if(e&2){let t=M();jt("color",t.isToday?"primary":"white"),g(),w(A(2,2,"TODAY"))}}function xc(e,i){if(e&1){let t=Y();x(0,"button",9),F("click",function(){R(t);let o=M();return N(o.download())}),z(1,"i",10),x(2,"span"),v(3),E(4,"translate"),_()()}e&2&&(g(3),w(A(4,1,"DOWNLOAD")))}function Cc(e,i){if(e&1){let t=Y();x(0,"button",12),F("click",function(){let o=R(t).$implicit,s=M(2);return N(s.toggleChartLineVisibility(o))}),z(1,"span",13),x(2,"span"),v(3),_()()}if(e&2){let t=i.$implicit;g(),ke("background-color",t.hidden?null:t.borderColor),U("inactive",t.hidden),g(2),w(t.label)}}function bc(e,i){if(e&1&&(x(0,"div"),L(1,Cc,4,5,"button",11),_()),e&2){let t=M();g(),b("ngForOf",t.chartConfig.data.datasets)}}var Ca=(()=>{let i=class i{dateDropdownElement;type="";title="";chartConfig;chartStyle;height=260;legendDate;showDownloadButton=!1;showChartLineHiddenButton=!1;dateTypeChange=new Z;customDateChange=new Z;downloadClick=new Z;chartLineVisibilityChange=new Z;date=1;startDate=new Date;endDate=new Date;get Year(){return 3}get Month(){return 2}get Week(){return 1}get Today(){return 0}get Custom(){return 4}get isYear(){return this.date===this.Year}get isMonth(){return this.date===this.Month}get isWeek(){return this.date===this.Week}get isToday(){return this.date===this.Today}get isCustom(){return this.date===this.Custom}changeDateType(n,o){if(this.date=n,typeof o!="boolean")this.dateTypeChange.emit(this.date),this.dateDropdownElement.closeCalendarInternal(o);else{let s={startDate:this.dateDropdownElement.calendarState.curr.startDate,endDate:this.dateDropdownElement.calendarState.curr.endDate};this.customDateChange.emit(s)}}download(){this.downloadClick.emit()}toggleChartLineVisibility(n){this.chartLineVisibilityChange.emit(n)}};y(i,"\u0275fac",function(o){return new(o||i)}),y(i,"\u0275cmp",et({type:i,selectors:[["sd-statistic-card"]],viewQuery:function(o,s){if(o&1&&zt(mc,5),o&2){let a;Tt(a=Et())&&(s.dateDropdownElement=a.first)}},inputs:{type:"type",title:"title",chartConfig:"chartConfig",chartStyle:"chartStyle",height:"height",legendDate:"legendDate",showDownloadButton:"showDownloadButton",showChartLineHiddenButton:"showChartLineHiddenButton"},outputs:{dateTypeChange:"dateTypeChange",customDateChange:"customDateChange",downloadClick:"downloadClick",chartLineVisibilityChange:"chartLineVisibilityChange"},standalone:!1,features:[gt([$])],decls:19,vars:28,consts:[["dateDropdownElement",""],[3,"title"],["class","ep-button","size","tiny",3,"click",4,"ngIf"],["size","tiny",1,"ep-button",3,"click"],[1,"split"],[3,"dateChange","toggleBtnClick","datePickerDirection","disableNext","buttonActive"],["class","ep-button","size","tiny","color","dark",3,"click",4,"ngIf"],[4,"ngIf"],[3,"visibleLegend","height","chartStyle","legendDate","config","showLegendItems"],["size","tiny","color","dark",1,"ep-button",3,"click"],[1,"papycon","papycon-download"],["class","ep-button line","size","tiny","color","white",3,"click",4,"ngFor","ngForOf"],["size","tiny","color","white",1,"ep-button","line",3,"click"],[1,"color"]],template:function(o,s){if(o&1){let a=Y();x(0,"sd-card",1)(1,"article")(2,"div"),L(3,_c,3,4,"button",2),x(4,"button",3),F("click",function(l){return R(a),N(s.changeDateType(s.Week,l))}),v(5),E(6,"translate"),_(),x(7,"button",3),F("click",function(l){return R(a),N(s.changeDateType(s.Month,l))}),v(8),E(9,"translate"),_(),x(10,"button",3),F("click",function(l){return R(a),N(s.changeDateType(s.Year,l))}),v(11),E(12,"translate"),_(),z(13,"div",4),x(14,"sd-date-dropdown",5,0),F("dateChange",function(l){return R(a),N(s.customDateChange.emit(l))})("toggleBtnClick",function(l){return R(a),N(s.changeDateType(s.Custom,l))}),_(),L(16,xc,5,3,"button",6),_(),L(17,bc,2,1,"div",7),_(),z(18,"sd-chart",8),_()}o&2&&(b("title",s.title),g(3),b("ngIf",s.type==="visitor"),g(),jt("color",s.isWeek?"primary":"white"),g(),w(Te(6,19,"N_WEEKS",1)),g(2),jt("color",s.isMonth?"primary":"white"),g(),w(Te(9,22,"N_MONTHS",1)),g(2),jt("color",s.isYear?"primary":"white"),g(),w(Te(12,25,"N_YEARS",1)),g(3),b("datePickerDirection","right")("disableNext",!0)("buttonActive",s.isCustom),g(2),b("ngIf",s.showDownloadButton),g(),b("ngIf",s.showChartLineHiddenButton),g(),b("visibleLegend",!0)("height",s.height)("chartStyle",s.chartStyle)("legendDate",s.legendDate)("config",s.chartConfig)("showLegendItems",!s.showChartLineHiddenButton))},styles:["[_nghost-%COMP%]{max-height:458px}article[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:23px}article[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:12px}article[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:2px;font-size:18px}article[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{display:flex;align-items:center}article[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .color[_ngcontent-%COMP%]{margin-right:4px;display:inline-block;width:12px;height:12px}article[_ngcontent-%COMP%] .line[_ngcontent-%COMP%] .color.inactive[_ngcontent-%COMP%]{background-color:#dadada}article[_ngcontent-%COMP%] sd-date-dropdown[_ngcontent-%COMP%]{margin-right:12px}article[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex}article[_ngcontent-%COMP%] .split[_ngcontent-%COMP%]{width:1px;height:30px;margin-right:12px;background-color:#c8c8c8}sd-card[_ngcontent-%COMP%]{box-sizing:border-box;max-height:458px}sd-chart[_ngcontent-%COMP%] >.chart-container{height:260px}"]}));let e=i;return e})();function Rn(e){return e+.5|0}var Ce=(e,i,t)=>Math.max(Math.min(e,t),i);function An(e){return Ce(Rn(e*2.55),0,255)}function be(e){return Ce(Rn(e*255),0,255)}function ae(e){return Ce(Rn(e/2.55)/100,0,1)}function ba(e){return Ce(Rn(e*100),0,100)}var Ut={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},Do=[..."0123456789ABCDEF"],yc=e=>Do[e&15],Mc=e=>Do[(e&240)>>4]+Do[e&15],Si=e=>(e&240)>>4===(e&15),Pc=e=>Si(e.r)&&Si(e.g)&&Si(e.b)&&Si(e.a);function Oc(e){var i=e.length,t;return e[0]==="#"&&(i===4||i===5?t={r:255&Ut[e[1]]*17,g:255&Ut[e[2]]*17,b:255&Ut[e[3]]*17,a:i===5?Ut[e[4]]*17:255}:(i===7||i===9)&&(t={r:Ut[e[1]]<<4|Ut[e[2]],g:Ut[e[3]]<<4|Ut[e[4]],b:Ut[e[5]]<<4|Ut[e[6]],a:i===9?Ut[e[7]]<<4|Ut[e[8]]:255})),t}var vc=(e,i)=>e<255?i(e):"";function Dc(e){var i=Pc(e)?yc:Mc;return e?"#"+i(e.r)+i(e.g)+i(e.b)+vc(e.a,i):void 0}var wc=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Oa(e,i,t){let n=i*Math.min(t,1-t),o=(s,a=(s+e/30)%12)=>t-n*Math.max(Math.min(a-3,9-a,1),-1);return[o(0),o(8),o(4)]}function Sc(e,i,t){let n=(o,s=(o+e/60)%6)=>t-t*i*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function kc(e,i,t){let n=Oa(e,1,.5),o;for(i+t>1&&(o=1/(i+t),i*=o,t*=o),o=0;o<3;o++)n[o]*=1-i-t,n[o]+=i;return n}function Tc(e,i,t,n,o){return e===o?(i-t)/n+(i<t?6:0):i===o?(t-e)/n+2:(e-i)/n+4}function wo(e){let t=e.r/255,n=e.g/255,o=e.b/255,s=Math.max(t,n,o),a=Math.min(t,n,o),r=(s+a)/2,l,c,d;return s!==a&&(d=s-a,c=r>.5?d/(2-s-a):d/(s+a),l=Tc(t,n,o,d,s),l=l*60+.5),[l|0,c||0,r]}function So(e,i,t,n){return(Array.isArray(i)?e(i[0],i[1],i[2]):e(i,t,n)).map(be)}function ko(e,i,t){return So(Oa,e,i,t)}function Ec(e,i,t){return So(kc,e,i,t)}function Ic(e,i,t){return So(Sc,e,i,t)}function va(e){return(e%360+360)%360}function Ac(e){let i=wc.exec(e),t=255,n;if(!i)return;i[5]!==n&&(t=i[6]?An(+i[5]):be(+i[5]));let o=va(+i[2]),s=+i[3]/100,a=+i[4]/100;return i[1]==="hwb"?n=Ec(o,s,a):i[1]==="hsv"?n=Ic(o,s,a):n=ko(o,s,a),{r:n[0],g:n[1],b:n[2],a:t}}function Fc(e,i){var t=wo(e);t[0]=va(t[0]+i),t=ko(t),e.r=t[0],e.g=t[1],e.b=t[2]}function Rc(e){if(!e)return;let i=wo(e),t=i[0],n=ba(i[1]),o=ba(i[2]);return e.a<255?`hsla(${t}, ${n}%, ${o}%, ${ae(e.a)})`:`hsl(${t}, ${n}%, ${o}%)`}var ya={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"},Ma={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Nc(){let e={},i=Object.keys(Ma),t=Object.keys(ya),n,o,s,a,r;for(n=0;n<i.length;n++){for(a=r=i[n],o=0;o<t.length;o++)s=t[o],r=r.replace(s,ya[s]);s=parseInt(Ma[a],16),e[r]=[s>>16&255,s>>8&255,s&255]}return e}var ki;function Lc(e){ki||(ki=Nc(),ki.transparent=[0,0,0,0]);let i=ki[e.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:i.length===4?i[3]:255}}var Vc=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Bc(e){let i=Vc.exec(e),t=255,n,o,s;if(i){if(i[7]!==n){let a=+i[7];t=i[8]?An(a):Ce(a*255,0,255)}return n=+i[1],o=+i[3],s=+i[5],n=255&(i[2]?An(n):Ce(n,0,255)),o=255&(i[4]?An(o):Ce(o,0,255)),s=255&(i[6]?An(s):Ce(s,0,255)),{r:n,g:o,b:s,a:t}}}function zc(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${ae(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var vo=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,sn=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Hc(e,i,t){let n=sn(ae(e.r)),o=sn(ae(e.g)),s=sn(ae(e.b));return{r:be(vo(n+t*(sn(ae(i.r))-n))),g:be(vo(o+t*(sn(ae(i.g))-o))),b:be(vo(s+t*(sn(ae(i.b))-s))),a:e.a+t*(i.a-e.a)}}function Ti(e,i,t){if(e){let n=wo(e);n[i]=Math.max(0,Math.min(n[i]+n[i]*t,i===0?360:1)),n=ko(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function Da(e,i){return e&&Object.assign(i||{},e)}function Pa(e){var i={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(i={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(i.a=be(e[3]))):(i=Da(e,{r:0,g:0,b:0,a:1}),i.a=be(i.a)),i}function Yc(e){return e.charAt(0)==="r"?Bc(e):Ac(e)}var Fn=class e{constructor(i){if(i instanceof e)return i;let t=typeof i,n;t==="object"?n=Pa(i):t==="string"&&(n=Oc(i)||Lc(i)||Yc(i)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var i=Da(this._rgb);return i&&(i.a=ae(i.a)),i}set rgb(i){this._rgb=Pa(i)}rgbString(){return this._valid?zc(this._rgb):void 0}hexString(){return this._valid?Dc(this._rgb):void 0}hslString(){return this._valid?Rc(this._rgb):void 0}mix(i,t){if(i){let n=this.rgb,o=i.rgb,s,a=t===s?.5:t,r=2*a-1,l=n.a-o.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;s=1-c,n.r=255&c*n.r+s*o.r+.5,n.g=255&c*n.g+s*o.g+.5,n.b=255&c*n.b+s*o.b+.5,n.a=a*n.a+(1-a)*o.a,this.rgb=n}return this}interpolate(i,t){return i&&(this._rgb=Hc(this._rgb,i._rgb,t)),this}clone(){return new e(this.rgb)}alpha(i){return this._rgb.a=be(i),this}clearer(i){let t=this._rgb;return t.a*=1-i,this}greyscale(){let i=this._rgb,t=Rn(i.r*.3+i.g*.59+i.b*.11);return i.r=i.g=i.b=t,this}opaquer(i){let t=this._rgb;return t.a*=1+i,this}negate(){let i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this}lighten(i){return Ti(this._rgb,2,i),this}darken(i){return Ti(this._rgb,2,-i),this}saturate(i){return Ti(this._rgb,1,i),this}desaturate(i){return Ti(this._rgb,1,-i),this}rotate(i){return Fc(this._rgb,i),this}};function te(){}var La=(()=>{let e=0;return()=>e++})();function q(e){return e===null||typeof e>"u"}function it(e){if(Array.isArray&&Array.isArray(e))return!0;let i=Object.prototype.toString.call(e);return i.slice(0,7)==="[object"&&i.slice(-6)==="Array]"}function X(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function lt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Nt(e,i){return lt(e)?e:i}function j(e,i){return typeof e>"u"?i:e}var Va=(e,i)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/i,Ao=(e,i)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*i:+e;function nt(e,i,t){if(e&&typeof e.call=="function")return e.apply(t,i)}function Q(e,i,t,n){let o,s,a;if(it(e))if(s=e.length,n)for(o=s-1;o>=0;o--)i.call(t,e[o],o);else for(o=0;o<s;o++)i.call(t,e[o],o);else if(X(e))for(a=Object.keys(e),s=a.length,o=0;o<s;o++)i.call(t,e[a[o]],a[o])}function Vn(e,i){let t,n,o,s;if(!e||!i||e.length!==i.length)return!1;for(t=0,n=e.length;t<n;++t)if(o=e[t],s=i[t],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function Fi(e){if(it(e))return e.map(Fi);if(X(e)){let i=Object.create(null),t=Object.keys(e),n=t.length,o=0;for(;o<n;++o)i[t[o]]=Fi(e[t[o]]);return i}return e}function Ba(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function jc(e,i,t,n){if(!Ba(e))return;let o=i[e],s=t[e];X(o)&&X(s)?rn(o,s,n):i[e]=Fi(s)}function rn(e,i,t){let n=it(i)?i:[i],o=n.length;if(!X(e))return e;t=t||{};let s=t.merger||jc,a;for(let r=0;r<o;++r){if(a=n[r],!X(a))continue;let l=Object.keys(a);for(let c=0,d=l.length;c<d;++c)s(l[c],e,a,t)}return e}function cn(e,i){return rn(e,i,{merger:Wc})}function Wc(e,i,t){if(!Ba(e))return;let n=i[e],o=t[e];X(n)&&X(o)?cn(n,o):Object.prototype.hasOwnProperty.call(i,e)||(i[e]=Fi(o))}var wa={"":e=>e,x:e=>e.x,y:e=>e.y};function Uc(e){let i=e.split("."),t=[],n="";for(let o of i)n+=o,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}function $c(e){let i=Uc(e);return t=>{for(let n of i){if(n==="")break;t=t&&t[n]}return t}}function ce(e,i){return(wa[i]||(wa[i]=$c(i)))(e)}function Vi(e){return e.charAt(0).toUpperCase()+e.slice(1)}var dn=e=>typeof e<"u",re=e=>typeof e=="function",Fo=(e,i)=>{if(e.size!==i.size)return!1;for(let t of e)if(!i.has(t))return!1;return!0};function za(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}var st=Math.PI,ot=2*st,Gc=ot+st,Ri=Number.POSITIVE_INFINITY,Xc=st/180,rt=st/2,Ae=st/4,Sa=st*2/3,le=Math.log10,Kt=Math.sign;function hn(e,i,t){return Math.abs(e-i)<t}function Ro(e){let i=Math.round(e);e=hn(e,i,e/1e3)?i:e;let t=Math.pow(10,Math.floor(le(e))),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function Ha(e){let i=[],t=Math.sqrt(e),n;for(n=1;n<t;n++)e%n===0&&(i.push(n),i.push(e/n));return t===(t|0)&&i.push(t),i.sort((o,s)=>o-s).pop(),i}function Ne(e){return!isNaN(parseFloat(e))&&isFinite(e)}function Ya(e,i){let t=Math.round(e);return t-i<=e&&t+i>=e}function No(e,i,t){let n,o,s;for(n=0,o=e.length;n<o;n++)s=e[n][t],isNaN(s)||(i.min=Math.min(i.min,s),i.max=Math.max(i.max,s))}function $t(e){return e*(st/180)}function Bi(e){return e*(180/st)}function Lo(e){if(!lt(e))return;let i=1,t=0;for(;Math.round(e*i)/i!==e;)i*=10,t++;return t}function Vo(e,i){let t=i.x-e.x,n=i.y-e.y,o=Math.sqrt(t*t+n*n),s=Math.atan2(n,t);return s<-.5*st&&(s+=ot),{angle:s,distance:o}}function Ni(e,i){return Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2))}function Kc(e,i){return(e-i+Gc)%ot-st}function Rt(e){return(e%ot+ot)%ot}function pn(e,i,t,n){let o=Rt(e),s=Rt(i),a=Rt(t),r=Rt(s-o),l=Rt(a-o),c=Rt(o-s),d=Rt(o-a);return o===s||o===a||n&&s===a||r>l&&c<d}function mt(e,i,t){return Math.max(i,Math.min(t,e))}function ja(e){return mt(e,-32768,32767)}function ee(e,i,t,n=1e-6){return e>=Math.min(i,t)-n&&e<=Math.max(i,t)+n}function zi(e,i,t){t=t||(a=>e[a]<i);let n=e.length-1,o=0,s;for(;n-o>1;)s=o+n>>1,t(s)?o=s:n=s;return{lo:o,hi:n}}var Zt=(e,i,t,n)=>zi(e,t,n?o=>{let s=e[o][i];return s<t||s===t&&e[o+1][i]===t}:o=>e[o][i]<t),Wa=(e,i,t)=>zi(e,t,n=>e[n][i]>=t);function Ua(e,i,t){let n=0,o=e.length;for(;n<o&&e[n]<i;)n++;for(;o>n&&e[o-1]>t;)o--;return n>0||o<e.length?e.slice(n,o):e}var $a=["push","pop","shift","splice","unshift"];function Ga(e,i){if(e._chartjs){e._chartjs.listeners.push(i);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[i]}}),$a.forEach(t=>{let n="_onData"+Vi(t),o=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...s){let a=o.apply(this,s);return e._chartjs.listeners.forEach(r=>{typeof r[n]=="function"&&r[n](...s)}),a}})})}function Bo(e,i){let t=e._chartjs;if(!t)return;let n=t.listeners,o=n.indexOf(i);o!==-1&&n.splice(o,1),!(n.length>0)&&($a.forEach(s=>{delete e[s]}),delete e._chartjs)}function zo(e){let i=new Set(e);return i.size===e.length?e:Array.from(i)}var Ho=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Yo(e,i){let t=[],n=!1;return function(...o){t=o,n||(n=!0,Ho.call(window,()=>{n=!1,e.apply(i,t)}))}}function Xa(e,i){let t;return function(...n){return i?(clearTimeout(t),t=setTimeout(e,i,n)):e.apply(this,n),i}}var Hi=e=>e==="star