1import{A as v,B as z,Ea as m,Fa as W,G as D,Ha as C,Ia as p,Ja as A,Ob as n,Pb as E,Pc as O,Rd as x,T as j,Wb as o,Yc as R,Zc as M,_c as F,ad as T,bc as l,bd as G,cc as I,d as w,fb as d,g as y,ib as b,j as g,s as f,ta as L,z as S}from"./chunk-XW6AEKHB.js";import{a as c}from"./chunk-6G35VSEK.js";var P=["*"];var a=(function(t){return t.AnnotationChart="AnnotationChart",t.AreaChart="AreaChart",t.Bar="Bar",t.BarChart="BarChart",t.BubbleChart="BubbleChart",t.Calendar="Calendar",t.CandlestickChart="CandlestickChart",t.ColumnChart="ColumnChart",t.ComboChart="ComboChart",t.PieChart="PieChart",t.Gantt="Gantt",t.Gauge="Gauge",t.GeoChart="GeoChart",t.Histogram="Histogram",t.Line="Line",t.LineChart="LineChart",t.Map="Map",t.OrgChart="OrgChart",t.Sankey="Sankey",t.Scatter="Scatter",t.ScatterChart="ScatterChart",t.SteppedAreaChart="SteppedAreaChart",t.Table="Table",t.Timeline="Timeline",t.TreeMap="TreeMap",t.WordTree="WordTree",t})(a||{}),N={[a.AnnotationChart]:"annotationchart",[a.AreaChart]:"corechart",[a.Bar]:"bar",[a.BarChart]:"corechart",[a.BubbleChart]:"corechart",[a.Calendar]:"calendar",[a.CandlestickChart]:"corechart",[a.ColumnChart]:"corechart",[a.ComboChart]:"corechart",[a.PieChart]:"corechart",[a.Gantt]:"gantt",[a.Gauge]:"gauge",[a.GeoChart]:"geochart",[a.Histogram]:"corechart",[a.Line]:"line",[a.LineChart]:"corechart",[a.Map]:"map",[a.OrgChart]:"orgchart",[a.Sankey]:"sankey",[a.Scatter]:"scatter",[a.ScatterChart]:"corechart",[a.SteppedAreaChart]:"corechart",[a.Table]:"table",[a.Timeline]:"timeline",[a.TreeMap]:"treemap",[a.WordTree]:"wordtree"};function $(t){return N[t]}function _(){return{version:"current",safeMode:!1}}var k=new C("GOOGLE_CHARTS_CONFIG"),H=new C("GOOGLE_CHARTS_LAZY_CONFIG",{providedIn:"root",factory:()=>{let t=A(k,{optional:!0});return f(c(c({},_()),t||{}))}}),u=(()=>{class t{constructor(e,r,i){this.zone=e,this.localeId=r,this.config$=i,this.scriptSource="https://www.gstatic.com/charts/loader.js",this.scriptLoadSubject=new y}isGoogleChartsAvailable(){return!(typeof google>"u"||typeof google.charts>"u")}loadChartPackages(...e){return this.loadGoogleCharts().pipe(z(()=>this.config$),S(r=>c(c({},_()),r||{})),L(r=>new w(i=>{let s={packages:e,language:this.localeId,mapsApiKey:r.mapsApiKey,safeMode:r.safeMode};google.charts.load(r.version,s),google.charts.setOnLoadCallback(()=>{this.zone.run(()=>{i.next(),i.complete()})})})))}loadGoogleCharts(){if(this.isGoogleChartsAvailable())return f(void 0);if(!this.isLoadingGoogleCharts()){let e=this.createGoogleChartsScript();e.onload=()=>{this.zone.run(()=>{this.scriptLoadSubject.next(),this.scriptLoadSubject.complete()})},e.onerror=()=>{this.zone.run(()=>{console.error("Failed to load the google charts script!"),this.scriptLoadSubject.error(new Error("Failed to load the google charts script!"))})}}return this.scriptLoadSubject.asObservable()}isLoadingGoogleCharts(){return this.getGoogleChartsScript()!=null}getGoogleChartsScript(){return Array.from(document.getElementsByTagName("script")).find(r=>r.src===this.scriptSource)}createGoogleChartsScript(){let e=document.createElement("script");return e.type="text/javascript",e.src=this.scriptSource,e.async=!0,document.getElementsByTagName("head")[0].appendChild(e),e}static{this.\u0275fac=function(r){return new(r||t)(p(E),p(x),p(H))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})();var B=(()=>{class t{create(e,r,i){if(e==null)return;let s=!0;r!=null&&(s=!1);let h=google.visualization.arrayToDataTable(this.getDataAsTable(e,r),s);return i&&this.applyFormatters(h,i),h}getDataAsTable(e,r){return r?[r,...e]:e}applyFormatters(e,r){for(let i of r)i.formatter.format(e,i.colIndex)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Q(){return"_"+Math.random().toString(36).substr(2,9)}var U=(()=>{class t{constructor(e){this.loaderService=e,this.error=new n,this.ready=new n,this.stateChange=new n,this.id=Q(),this.wrapperReadySubject=ne
1w g(1)}get wrapperReady$(){return this.wrapperReadySubject.asObservable()}get controlWrapper(){if(!this._controlWrapper)throw new Error("Cannot access the control wrapper before it being initialized.");return this._controlWrapper}ngOnInit(){this.loaderService.loadChartPackages("controls").subscribe(()=>{this.createControlWrapper()})}ngOnChanges(e){this._controlWrapper&&(e.type&&this._controlWrapper.setControlType(this.type),e.options&&this._controlWrapper.setOptions(this.options||{}),e.state&&this._controlWrapper.setState(this.state||{}))}createControlWrapper(){this._controlWrapper=new google.visualization.ControlWrapper({containerId:this.id,controlType:this.type,state:this.state,options:this.options}),this.addEventListeners(),this.wrapperReadySubject.next(this._controlWrapper)}addEventListeners(){google.visualization.events.removeAllListeners(this._controlWrapper),google.visualization.events.addListener(this._controlWrapper,"ready",e=>this.ready.emit(e)),google.visualization.events.addListener(this._controlWrapper,"error",e=>this.error.emit(e)),google.visualization.events.addListener(this._controlWrapper,"statechange",e=>this.stateChange.emit(e))}static{this.\u0275fac=function(r){return new(r||t)(o(u))}}static{this.\u0275cmp=l({type:t,selectors:[["control-wrapper"]],hostAttrs:[1,"control-wrapper"],hostVars:1,hostBindings:function(r,i){r&2&&O("id",i.id)},inputs:{for:"for",type:"type",options:"options",state:"state"},outputs:{error:"error",ready:"ready",stateChange:"stateChange"},exportAs:["controlWrapper"],standalone:!1,features:[d],decls:0,vars:0,template:function(r,i){},encapsulation:2,changeDetection:0})}}return t})(),V=(()=>{class t{constructor(e,r,i){this.element=e,this.loaderService=r,this.dataTableService=i,this.ready=new n,this.error=new n,this.initialized=!1}ngOnInit(){this.loaderService.loadChartPackages("controls").subscribe(()=>{this.dataTable=this.dataTableService.create(this.data,this.columns,this.formatters),this.createDashboard(),this.initialized=!0})}ngOnChanges(e){this.initialized&&(e.data||e.columns||e.formatters)&&(this.dataTable=this.dataTableService.create(this.data,this.columns,this.formatters),this.dashboard.draw(this.dataTable))}createDashboard(){let e=this.controlWrappers.map(i=>i.wrapperReady$),r=this.controlWrappers.map(i=>i.for).map(i=>Array.isArray(i)?v(i.map(s=>s.wrapperReady$)):i.wrapperReady$);v([...e,...r]).subscribe(()=>{this.dashboard=new google.visualization.Dashboard(this.element.nativeElement),this.initializeBindings(),this.registerEvents(),this.dashboard.draw(this.dataTable)})}registerEvents(){google.visualization.events.removeAllListeners(this.dashboard);let e=(r,i,s)=>{google.visualization.events.addListener(r,i,s)};e(this.dashboard,"ready",()=>this.ready.emit()),e(this.dashboard,"error",r=>this.error.emit(r))}initializeBindings(){this.controlWrappers.forEach(e=>{if(Array.isArray(e.for)){let r=e.for.map(i=>i.chartWrapper);this.dashboard.bind(e.controlWrapper,r)}else this.dashboard.bind(e.controlWrapper,e.for.chartWrapper)})}static{this.\u0275fac=function(r){return new(r||t)(o(b),o(u),o(B))}}static{this.\u0275cmp=l({type:t,selectors:[["dashboard"]],contentQueries:function(r,i,s){if(r&1&&F(s,U,4),r&2){let h;T(h=G())&&(i.controlWrappers=h)}},hostAttrs:[1,"dashboard"],inputs:{data:"data",columns:"columns",formatters:"formatters"},outputs:{ready:"ready",error:"error"},exportAs:["dashboard"],standalone:!1,features:[d],ngContentSelectors:P,decls:1,vars:0,template:function(r,i){r&1&&(R(),M(0))},encapsulation:2,changeDetection:0})}}return t})(),ue=(()=>{class t{constructor(e,r,i,s){this.element=e,this.scriptLoaderService=r,this.dataTableService=i,this.dashboard=s,this.options={},this.dynamicResize=!1,this.ready=new n,this.error=new n,this.select=new n,this.mouseover=new n,this.mouseleave=new n,this.wrapperReadySubject=ne
1w g(1),this.initialized=!1,this.eventListeners=new Map}get chart(){return this.chartWrapper.getChart()}get wrapperReady$(){return this.wrapperReadySubject.asObservable()}get chartWrapper(){if(!this.wrapper)throw new Error("Trying to access the chart wrapper before it was fully initialized");return this.wrapper}set chartWrapper(e){this.wrapper=e,this.drawChart()}ngOnInit(){this.scriptLoaderService.loadChartPackages($(this.type)).subscribe(()=>{this.dataTable=this.dataTableService.create(this.data,this.columns,this.formatters),this.wrapper=new google.visualization.ChartWrapper({container:this.element.nativeElement,chartType:this.type,dataTable:this.dataTable,options:this.mergeOptions()}),this.registerChartEvents(),this.wrapperReadySubject.next(this.wrapper),this.initialized=!0,this.drawChart()})}ngOnChanges(e){if(e.dynamicResize&&this.updateResizeListener(),this.initialized){let r=!1;(e.data||e.columns||e.formatters)&&(this.dataTable=this.dataTableService.create(this.data,this.columns,this.formatters),this.wrapper.setDataTable(this.dataTable),r=!0),e.type&&(this.wrapper.setChartType(this.type),r=!0),(e.options||e.width||e.height||e.title)&&(this.wrapper.setOptions(this.mergeOptions()),r=!0),r&&this.drawChart()}}ngOnDestroy(){this.unsubscribeToResizeIfSubscribed()}addEventListener(e,r){let i=this.registerChartEvent(this.chart,e,r);return this.eventListeners.set(i,{eventName:e,callback:r,handle:i}),i}removeEventListener(e){let r=this.eventListeners.get(e);r&&(google.visualization.events.removeListener(r.handle),this.eventListeners.delete(e))}updateResizeListener(){this.unsubscribeToResizeIfSubscribed(),this.dynamicResize&&(this.resizeSubscription=D(window,"resize",{passive:!0}).pipe(j(100)).subscribe(()=>{this.initialized&&this.drawChart()}))}unsubscribeToResizeIfSubscribed(){this.resizeSubscription!=null&&(this.resizeSubscription.unsubscribe(),this.resizeSubscription=void 0)}mergeOptions(){return c({title:this.title,width:this.width,height:this.height},this.options)}registerChartEvents(){google.visualization.events.removeAllListeners(this.wrapper),this.registerChartEvent(this.wrapper,"ready",()=>{google.visualization.events.removeAllListeners(this.chart),this.registerChartEvent(this.chart,"onmouseover",e=>this.mouseover.emit(e)),this.registerChartEvent(this.chart,"onmouseout",e=>this.mouseleave.emit(e)),this.registerChartEvent(this.chart,"select",()=>{let e=this.chart.getSelection();this.select.emit({selection:e})}),this.eventListeners.forEach(e=>e.handle=this.registerChartEvent(this.chart,e.eventName,e.callback)),this.ready.emit({chart:this.chart})}),this.registerChartEvent(this.wrapper,"error",e=>this.error.emit(e))}registerChartEvent(e,r,i){return google.visualization.events.addListener(e,r,i)}drawChart(){this.dashboard==null&&this.wrapper.draw()}static{this.\u0275fac=function(r){return new(r||t)(o(b),o(u),o(B),o(V,8))}}static{this.\u0275cmp=l({type:t,selectors:[["google-chart"]],hostAttrs:[1,"google-chart"],inputs:{type:"type",data:"data",columns:"columns",title:"title",width:"width",height:"height",options:"options",formatters:"formatters",dynamicResize:"dynamicResize"},outputs:{ready:"ready",error:"error",select:"select",mouseover:"mouseover",mouseleave:"mou
1seleave"},exportAs:["googleChart"],standalone:!1,features:[d],decls:0,vars:0,template:function(r,i){},styles:["[_nghost-%COMP%]{width:-moz-fit-content;width:fit-content;display:block}"],changeDetection:0})}}return t})();var ge=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[{provide:k,useValue:e}]}}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275mod=I({type:t})}static{this.\u0275inj=W({providers:[u]})}}return t})();export{a,ue as b,ge as c};
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.