Viewing File: /home/markqprx/iniasli.pro/public/client/817-es2015.2ae85b0999d5b424474b.js

(self.webpackChunkclient=self.webpackChunkclient||[]).push([[817],{11817:function(t,e,n){"use strict";n.r(e),n.d(e,{AnalyticsModule:function(){return N}});var a=n(61116),i=n(20653),s=n(68400),o=n(63337),r=n(35366),c=n(88195),l=n(38116),g=n(84369);const d=function(){return{exact:!0}},p=function(t){return[t]};function h(t,e){if(1&t&&(r.TgZ(0,"li",4),r.TgZ(1,"a",5),r._uU(2),r.qZA(),r.qZA()),2&t){const t=e.$implicit;r.xp6(1),r.Q6J("routerLinkActiveOptions",r.DdM(3,d))("routerLink",r.VKq(4,p,t.route)),r.xp6(1),r.Oqu(t.name)}}function u(t,e){if(1&t&&(r.TgZ(0,"header"),r.TgZ(1,"h1",1),r._uU(2,"Analytics"),r.qZA(),r.TgZ(3,"ul",2),r.YNc(4,h,3,6,"li",3),r.qZA(),r.qZA()),2&t){const t=r.oxw();r.xp6(4),r.Q6J("ngForOf",t.channels)}}let m=(()=>{class t{constructor(t){this.settings=t,this.channels=[]}ngOnInit(){this.channels=this.settings.get("vebto.admin.analytics.channels",[]).filter(t=>!t.condition||this.settings.get(t.condition))}ngOnDestroy(){const t=document.querySelector(".chartist-tooltip");t&&t.remove()}}return t.\u0275fac=function(e){return new(e||t)(r.Y36(c.Z))},t.\u0275cmp=r.Xpm({type:t,selectors:[["analytics-host"]],decls:2,vars:1,consts:[[4,"ngIf"],["trans",""],[1,"unstyled-list","analytics-nav"],["class","analytics-nav-item",4,"ngFor","ngForOf"],[1,"analytics-nav-item"],["mat-button","","routerLinkActive","active","trans","",3,"routerLinkActiveOptions","routerLink"]],template:function(t,e){1&t&&(r.YNc(0,u,5,1,"header",0),r._UZ(1,"router-outlet")),2&t&&r.Q6J("ngIf",e.channels&&e.channels.length)},directives:[a.O5,o.lC,l.P,a.sg,g.zs,o.yS,o.Od],styles:["[_nghost-%COMP%]{display:block;position:relative}header[_ngcontent-%COMP%]{display:flex;align-items:center;background-color:var(--be-background);box-shadow:none;border:1px solid var(--be-divider-default);padding:10px 15px;border-radius:4px;margin-bottom:25px}h1[_ngcontent-%COMP%]{font-size:2.2rem;margin:0;font-weight:300;text-transform:capitalize}.analytics-nav[_ngcontent-%COMP%]{margin-left:auto}.analytics-nav-item[_ngcontent-%COMP%]{display:inline-block;padding:0 5px;text-transform:capitalize}.active[_ngcontent-%COMP%]{background-color:var(--be-accent-default);color:var(--be-accent-contrast)}@media only screen and (max-width:768px){h1[_ngcontent-%COMP%]{display:none}.analytics-nav[_ngcontent-%COMP%]{margin-left:0}}"],changeDetection:0}),t})();var v=n(66994),Z=n(11520),f=n(9823),y=n(77307),x=n(25079);function b(t,e){if(1&t&&(r.TgZ(0,"div",6),r._uU(1),r.ALo(2,"number"),r.qZA()),2&t){const t=r.oxw().$implicit;r.xp6(1),r.Oqu(r.lcZ(2,1,t.value))}}function w(t,e){if(1&t&&(r.TgZ(0,"div",6),r._uU(1),r.ALo(2,"formattedFileSize"),r.qZA()),2&t){const t=r.oxw().$implicit;r.xp6(1),r.Oqu(r.lcZ(2,1,t.value))}}function A(t,e){if(1&t&&(r.TgZ(0,"div",1),r._UZ(1,"mat-icon",2),r.TgZ(2,"div",3),r.TgZ(3,"div",4),r._uU(4),r.qZA(),r.YNc(5,b,3,3,"div",5),r.YNc(6,w,3,3,"div",5),r.qZA(),r.qZA()),2&t){const t=e.$implicit;r.xp6(1),r.Q6J("svgIcon",t.icon),r.xp6(3),r.Oqu(t.name),r.xp6(1),r.Q6J("ngIf","number"===t.type),r.xp6(1),r.Q6J("ngIf","fileSize"===t.type)}}let _=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Xpm({type:t,selectors:[["analytics-header"]],inputs:{data:"data"},decls:1,vars:1,consts:[["class","stat",4,"ngFor","ngForOf"],[1,"stat"],[3,"svgIcon"],[1,"details"],["trans","",1,"name"],["class","count",4,"ngIf"],[1,"count"]],template:function(t,e){1&t&&r.YNc(0,A,7,4,"div",0),2&t&&r.Q6J("ngForOf",e.data)},directives:[a.sg,y.Hw,l.P,a.O5],pipes:[a.JJ,x.y],styles:["[_nghost-%COMP%]{display:flex;margin-bottom:25px;min-height:110px}@media only screen and (max-width:768px){[_nghost-%COMP%]{display:none}}.stat[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;min-width:0;margin-right:25px;border-radius:4px;height:110px;align-items:center;color:var(--be-text);background-color:var(--be-background);box-shadow:none;border:1px solid var(--be-divider-default);padding:0 15px}.stat[_ngcontent-%COMP%]:last-of-type{margin-right:0}.details[_ngcontent-%COMP%]{margin-left:10px}.details[_ngcontent-%COMP%]   .count[_ngcontent-%COMP%]{font-size:2.3rem;font-family:Montserrat,sans-serif;color:var(--be-text)}.details[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-size:1.4rem;color:var(--be-secondary-text)}.details[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]   .capitalize[_ngcontent-%COMP%]{text-transform:capitalize}.mat-icon[_ngcontent-%COMP%]{color:var(--be-accent-default);opacity:.8;width:60px;height:60px}"],changeDetection:0}),t})();var T=n(93836),q=n(27701);function O(t,e){1&t&&r._UZ(0,"mat-progress-bar",3)}let P=(()=>{class t{constructor(t){this.http=t,this.loading$=new v.t(1),this.linkStats$=new v.t(1)}ngOnInit(){this.loading$.next(!0),this.http.get("admin/analytics/stats",{channel:"clicks"}).pipe((0,Z.x)(()=>this.loading$.next(!1))).subscribe(t=>{this.headerData=t.headerData,this.linkStats$.next(t.mainData)})}}return t.\u0275fac=function(e){return new(e||t)(r.Y36(f.F))},t.\u0275cmp=r.Xpm({type:t,selectors:[["click-analytics-host"]],decls:5,vars:7,consts:[["mode","indeterminate","color","accent",4,"ngIf"],[3,"data"],["endpoint","admin/analytics/stats?channel=clicks",3,"reports"],["mode","indeterminate","color","accent"]],template:function(t,e){1&t&&(r.YNc(0,O,1,0,"mat-progress-bar",0),r.ALo(1,"async"),r._UZ(2,"analytics-header",1),r._UZ(3,"click-charts",2),r.ALo(4,"async")),2&t&&(r.Q6J("ngIf",r.lcZ(1,3,e.loading$)),r.xp6(2),r.Q6J("data",e.headerData),r.xp6(1),r.Q6J("reports",r.lcZ(4,5,e.linkStats$)))},directives:[a.O5,_,T.z,q.pW],pipes:[a.Ov],styles:[".mat-progress-bar[_ngcontent-%COMP%]{position:absolute;top:55px}"],changeDetection:0}),t})();var C=n(83693);function k(t){var e;const n={type:C.o.LINE,labels:[],tooltip:"Pageviews",data:[[],[]]};return null===(e=null==t?void 0:t.current)||void 0===e||e.forEach((e,a)=>{var i;n.labels.push(function(t,e="en-US"){return new Date(1e3*t).toLocaleDateString(e,{weekday:"short"})}(e.date)),n.data[0].push(e.pageViews),n.data[1].push((null===(i=t.previous[a])||void 0===i?void 0:i.pageViews)||0)}),n}function M(t){const e={selector:".monthly-chart",type:C.o.LINE,labels:[],tooltip:"Pageviews",data:[[],[]]};return t&&t.current.forEach((n,a)=>{e.labels.push(""+(a+1)),e.data[0].push(n.pageViews);const i=t.previous[a];e.data[1].push(i?i.pageViews:0)}),e}function U(t=[]){return{type:C.o.PIE,tooltip:"Number of sessions",labels:t.map(t=>t.browser),data:t.map(t=>t.sessions),legend:!1,options:{showLabel:!0,donut:!0}}}function J(t=[]){return{selector:".countries-chart",type:C.o.PIE,tooltip:"Number of sessions",labels:t.map(t=>t.country),data:t.map(t=>t.sessions),options:{showLabel:!0,donut:!0}}}var L=n(92007);function I(t,e){1&t&&r._UZ(0,"mat-progress-bar",12)}const D=[{path:"",component:m,children:[{path:"",redirectTo:"links"},{path:"links",component:P},{path:"google",component:(()=>{class t{constructor(t){this.http=t,this.channel="default",this.chartHeight=400,this.loading$=new v.t(1)}ngOnInit(){this.loading$.next(!0),this.http.get("admin/analytics/stats",{channel:this.channel}).pipe((0,Z.x)(()=>this.loading$.next(!1))).subscribe(t=>{this.headerData=t.headerData,this.charts=this.generateCharts(t.mainData)})}generateCharts(t){return{weeklyPageViews:k(t.weeklyPageViews),monthlyPageViews:M(t.monthlyPageViews),browsers:U(t.browsers),countries:J(t.countries)}}}return t.\u0275fac=function(e){return new(e||t)(r.Y36(f.F))},t.\u0275cmp=r.Xpm({type:t,selectors:[["default-analytics"]],decls:44,vars:12,consts:[["mode","indeterminate","color","accent",4,"ngIf"],[3,"data"],[1,"content"],[1,"chart-row"],[1,"chart-wrapper"],[3,"chartConfig","height"],[1,"chart-header"],["trans","",1,"title"],["trans","",1,"subtitle"],[1,"chart-legend"],["trans","",1,"legend-item"],[1,"chart-wrapper","pie-wrapper"],["mode","indeterminate","color","accent"]],template:function(t,e){1&t&&(r.YNc(0,I,1,0,"mat-progress-bar",0),r.ALo(1,"async"),r._UZ(2,"analytics-header",1),r.TgZ(3,"div",2),r.TgZ(4,"div",3),r.TgZ(5,"div",4),r.TgZ(6,"chart",5),r.TgZ(7,"div",6),r.TgZ(8,"div",7),r._uU(9,"This Week vs Last Week"),r.qZA(),r.TgZ(10,"div",8),r._uU(11,"By page views"),r.qZA(),r.qZA(),r.TgZ(12,"div",9),r.TgZ(13,"div",10),r._uU(14,"This week"),r.qZA(),r.TgZ(15,"div",10),r._uU(16,"Last week"),r.qZA(),r.qZA(),r.qZA(),r.qZA(),r.TgZ(17,"div",11),r.TgZ(18,"chart",5),r.TgZ(19,"div",6),r.TgZ(20,"div",7),r._uU(21,"Top Browsers"),r.qZA(),r.TgZ(22,"div",8),r._uU(23,"By sessions"),r.qZA(),r.qZA(),r.qZA(),r.qZA(),r.qZA(),r.TgZ(24,"div",3),r.TgZ(25,"div",4),r.TgZ(26,"chart",5),r.TgZ(27,"div",6),r.TgZ(28,"div",7),r._uU(29,"This Month vs Last Month"),r.qZA(),r.TgZ(30,"div",8),r._uU(31,"By page views"),r.qZA(),r.qZA(),r.TgZ(32,"div",9),r.TgZ(33,"div",10),r._uU(34,"This month"),r.qZA(),r.TgZ(35,"div",10),r._uU(36,"Last month"),r.qZA(),r.qZA(),r.qZA(),r.qZA(),r.TgZ(37,"div",11),r.TgZ(38,"chart",5),r.TgZ(39,"div",6),r.TgZ(40,"div",7),r._uU(41,"Top Countries"),r.qZA(),r.TgZ(42,"div",8),r._uU(43,"By sessions"),r.qZA(),r.qZA(),r.qZA(),r.qZA(),r.qZA(),r.qZA()),2&t&&(r.Q6J("ngIf",r.lcZ(1,10,e.loading$)),r.xp6(2),r.Q6J("data",e.headerData),r.xp6(4),r.Q6J("chartConfig",null==e.charts?null:e.charts.weeklyPageViews)("height",e.chartHeight),r.xp6(12),r.Q6J("chartConfig",null==e.charts?null:e.charts.browsers)("height",380),r.xp6(8),r.Q6J("chartConfig",null==e.charts?null:e.charts.monthlyPageViews)("height",e.chartHeight),r.xp6(12),r.Q6J("chartConfig",null==e.charts?null:e.charts.countries)("height",380))},directives:[a.O5,_,L.x,l.P,q.pW],pipes:[a.Ov],styles:[".mat-progress-bar[_ngcontent-%COMP%]{position:absolute;top:110px}"],changeDetection:0}),t})()}]}];let Q=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.oAB({type:t}),t.\u0275inj=r.cJS({imports:[[o.Bz.forChild(D)],o.Bz]}),t})();var $=n(50615),z=n(69193);let N=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.oAB({type:t}),t.\u0275inj=r.cJS({imports:[[Q,a.ez,i.m,s.N,$.X,z.a,g.ot,y.Ps,q.Cv]]}),t})()}}]);
//# sourceMappingURL=817-es2015.2ae85b0999d5b424474b.js.map
Back to Directory File Manager