@arcgis/charts-components 5.2.0-next.3 → 5.2.0-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import f from"./MF3FGXHI.js";import e from"./26FWESH3.js";import d from"./2K4ODNJ4.js";import{c as re}from"./Y7HBWU3M.js";import c from"./N5ERJZPG.js";import b from"./JHYH555K.js";import{g as fe,i as I,j as v,k as N,l as pe,m as li,n as ci}from"./WNKDEOFZ.js";import a from"./5FMEOIBS.js";import{e as J,f as Ve}from"./EZV7JSQJ.js";import{c as j,d as R,n as E}from"./LRNADJJG.js";import{$ as Oe,G as ce,H as ye,I as Ne,V as we,_ as Re,ba as Ee,f as Le,wa as Me}from"./PAIRUVLU.js";import{a as qe,f as ke}from"./KX7KGXKQ.js";import{d as Te,g as Z,k as Ie}from"./SP2IPHWF.js";import{a as se}from"./QP5UAIC6.js";import{a as le}from"./XJFVSX2E.js";import{a as C,b as A,e as ve,h as Ce,k as G,n as Y,o as Ae,v as q}from"./547RDEMV.js";export default $arcgis.t(([{substitute:D},{$a:He,Ab:ii,B:je,H:$e,Jb:si,K:We,Q:Ye,R:ie,S:Ue,Sa:ze,T:$,U:Xe,Ua:ge,V:k,_b:ti,ac:ri,cb:Qe,cc:ai,d:Pe,dc:ni,fb:Ze,gc:oi,m:K,mb:Ge,n:De,nb:Je,ob:W,pb:Ke,qb:U,rb:ei,sa:_e,sb:ue,t:ee,tb:me,wb:de},{a:V,b:te,d:L,e:Se,f:yi,g:Fe,r:gi},{a:ui},{a:mi,e:di},{b:_},{a:fi,b:xe,f:P,g:X,i:he}])=>{var is=i=>{let e,s=i.series[0];return k(s)&&(e=s.temporalBinning?.size),e},hi=i=>{let e,s=i.series[0];return k(s)&&(e=s.temporalBinning?.unit),e},ss=i=>{let e,s=i.series[0];return k(s)&&(e=s.temporalBinning?.timeAggregationType),e},ts=i=>{let e,s=i.series[0];return k(s)&&(e=s.temporalBinning?.trimIncompleteTimeInterval),e},rs=i=>{let e,s=i.series[0];return k(s)&&(e=s.temporalBinning?.nullPolicy),e},Bi=(i,e)=>{e?.series?.forEach(s=>{k(s)&&(s.temporalBinning??={},s.temporalBinning.size=i)}),L({config:e,value:null,axisIndex:1,isMax:!1}),L({config:e,value:null,axisIndex:1,isMax:!0})},bi=(i,e)=>{e?.series?.forEach(s=>{k(s)&&(s.temporalBinning??={},s.temporalBinning.nullPolicy=i)}),L({config:e,value:null,axisIndex:1,isMax:!1}),L({config:e,value:null,axisIndex:1,isMax:!0})},as=(i,e)=>{e.series?.forEach(s=>{k(s)&&(s.temporalBinning??={},s.temporalBinning.unit=i)}),L({config:e,value:null,axisIndex:1,isMax:!1}),L({config:e,value:null,axisIndex:1,isMax:!0})},ns=(i,e)=>{e.series?.forEach(s=>{k(s)&&(s.temporalBinning??={},s.temporalBinning.timeAggregationType=i)}),L({config:e,value:null,axisIndex:1,isMax:!1}),L({config:e,value:null,axisIndex:1,isMax:!0})},os=(i,e)=>{e.series?.forEach(s=>{k(s)&&(s.temporalBinning??={},s.temporalBinning.trimIncompleteTimeInterval=i)}),L({config:e,value:null,axisIndex:1,isMax:!1}),L({config:e,value:null,axisIndex:1,isMax:!0})},ls=i=>{Bi(0,i)};function cs(i,e){let s;return e!==void 0&&(s={...e},s.legend!==void 0&&(s.legend.position=i)),s}function ys(i,e){let s;return e!==void 0&&(s={...e},s.legend!==void 0&&(s.legend.visible=i)),s}function gs(i,e){let s;return e!==void 0&&(s={...e,rotated:i}),s}function Ti(i){let e;return i!==void 0&&(e={...i},delete e.axes?.[0]?.minimum,delete e.axes?.[0]?.maximum,delete e.axes?.[1]?.minimum,delete e.axes?.[1]?.maximum),e}function us(i,e){return e!=null||fe(i)}async function ms(i){let{config:e,layer:s,abortSignal:a}=i,r=!1;return J(s)||Ve(e)?e&&J(s)&&(r=await Ze({config:e,layer:s,abortSignal:a})):r=!0,r}async function Ii(i){let{queryObject:e,chartConfig:s,splitByField:a,errorStrings:r,abortSignal:t,runtimeDataFilters:o,ignoreViewExtent:c,setTimeBinningInfoWhenNotProvided:l,returnFeaturesExtent:f,chartLimits:F}=i,n=[],m,u=Z(s),g=u.series[0],y=ii({queryObject:e,chartConfig:u,runtimeDataFilters:o,ignoreViewExtent:c});if(y.outStatistics?.[0]?.outStatisticFieldName&&(y.outStatistics[0].outStatisticFieldName=Le.outStatistics.outStatisticFieldName),k(g)&&Xe({xAxisValueFormatType:Pe(u),setTimeBinningInfoWhenNotProvided:l,seriesConfig:g,queryObject:e})&&$e(a,e)){let{temporalBinning:p,x:B}=g,{uniqueQuery:T}=ge({chartConfig:u,queryConfig:y,queryObject:e,setTimeBinningInfoWhenNotProvided:l,returnFeaturesExtent:f,chartLimits:F}),x=s.axes?.[0].valueFormat.type===C.DateAxisFormat?s.axes[0].valueFormat.intlOptions.timeZone:void 0;m=await Qe({queryObject:e,dateField:B,splitByField:a,queryConfig:T,axisTimeZone:x,temporalBinning:p,errorStrings:r,abortSignal:t}),n=Array.from(new Set(m.flatMap(S=>{let{stackedAttributes:w}=S,d=[];return w&&(d=w.map(h=>h[a]).filter(h=>h!==void 0)),d})).values())}else{let{uniqueQuery:p}=ge({chartConfig:u,queryObject:e,queryConfig:y,setTimeBinningInfoWhenNotProvided:l,returnFeaturesExtent:f,chartLimits:F}),{elementCount:B}=await ti({chartConfig:u,queryObject:e,queryConfig:y,behaviorAfterLimit:F?.behaviorAfterLimit,numberMaxOfFeaturesToFetch:p.num,abortSignal:t});m=await He({queryObject:e,queryConfig:p,featureCount:B,errorStrings:r,abortSignal:t}),n=Array.from(new Set(m.map(T=>T.attributes[a]).filter(T=>T!==void 0)).values())}return{allValues:n,preFetchedQueryResponse:m}}function vi(i,e){let s=new Map;return i.series.forEach(a=>{let r=ie({where:a.query?.where,normalize:!0,escape:!1});e&&r!==null&&(r=Number(r));let t=le([a]);t!==void 0&&s.set(t,[...s.get(t)??[],r])}),s}function Ci(i){let{allValues:e,configUniqueValuesPerSeriesType:s,initialConfigWasEmpty:a}=i,r=new Map;return Array.from(s.keys()).forEach(t=>{let o=s.get(t)??[],c=[];a?c=e:e.forEach(l=>{o.includes(l)||c.push(l)}),r.set(t,c)}),r}function Ai(i){let{chartConfig:e,missingValue:s,splitByField:a,seriesTemplate:r}=i,t=JSON.parse(JSON.stringify({...e.series[0],...r}));if(t.query){if(t.id=s===null?j.nullValue:`${s}`,t.name=`${s}`,t.query.outStatistics?.[0]!==void 0){let c=t.id;t.query.outStatistics[0].outStatisticFieldName=c,"y"in t&&(t.y=c)}let o=typeof s=="number"||s===null?s:`'${s}'`;t.query.where=`${a}=${o}`}return t}async function qi(i){let{updateSplitBySeries:e,config:s,queryObject:a,errorStrings:r,abortSignal:t,runtimeDataFilters:o,ignoreViewExtent:c,setTimeBinningInfoWhenNotProvided:l,returnFeaturesExtent:f,chartLimits:F}=i,{seriesTemplate:n}=e??{},m;if(a&&!J(a)&&e!==void 0&&s!==void 0&&(s.series.length>0||n!==void 0)&&e.addMissingSeries){let u=s.series.length===0;s.series.length===0&&n!==void 0&&s.series.push(n);let g=$(s.series);if(g===R.BoxPlotMonoFieldAndSplitBy||g===R.BoxPlotMultiFieldsAndSplitBy||g===R.BoxPlotMonoFieldAndCategoryAndSplitBy||g===R.BarAndLineSplitBy||g===R.BarAndLineSplitByNoAggregation){let y=Ye(s.series[0]?.query?.where),p=Ge(a),B=Je(y,p),T=B?Ke(B):!1,x=await Ii({queryObject:a,chartConfig:s,splitByField:y,abortSignal:t,runtimeDataFilters:o,ignoreViewExtent:c,setTimeBinningInfoWhenNotProvided:l,returnFeaturesExtent:f,chartLimits:F,errorStrings:r}),{allValues:S}=x;if({preFetchedQueryResponse:m}=x,S.length>0){let w=vi(s,T),d=Ci({allValues:S,configUniqueValuesPerSeriesType:w,initialConfigWasEmpty:u});Array.from(d.keys()).forEach(h=>{(d.get(h)??[]).forEach(M=>{s.series.push(Ai({chartConfig:s,seriesTemplate:n,missingValue:M,splitByField:y}))}),u&&s.series.shift()})}}}return m}function ki(i,e){e&&!fe(e)&&(e=We({chartConfig:e,queryObject:i}))}async function ds(i){let{configToAlter:e,layer:s,addMissingSeries:a,updateSplitBySeries:r,chartContainer:t,queryObject:o,abortSignal:c,runtimeDataFilters:l,ignoreViewExtent:f,setTimeBinningInfoWhenNotProvided:F,returnFeaturesExtent:n,chartLimits:m,errorStrings:u}=i,g=e,y;return g&&(ki(s,g),g=await ui(g,s,void 0,c),a&&o&&(y=await qi({updateSplitBySeries:r,config:g,queryObject:o,errorStrings:u,abortSignal:c,runtimeDataFilters:l,ignoreViewExtent:f,setTimeBinningInfoWhenNotProvided:F,returnFeaturesExtent:n,chartLimits:m})),g=_e(g,t)),{alteredConfig:g,preFetchedQueryResponse:y}}function Li(i,e){let s=!1;if(e!==void 0){let a=ai({key:je.Average,splitBy:e});s=Number.isFinite(i[a])}return s}function fs(i){let{data:e,config:s,showEmptySeries:a}=i,r=s.series.length,t=Z(s),o=!1;if(!a&&r>1&&e){let c=ri(e),l=le(s?.series),f=$(s?.series),F=new Set;switch(l){case C.ComboLineAndBarSeries:case C.BarSeries:case C.RadarSeries:case C.LineSeries:{t.series.forEach(m=>{if(Array.isArray(c)){let u="";"y"in m&&(u=Array.isArray(m.y)?m.y[0]:m.y,f===R.BarAndLineSplitByNoAggregation&&(u=`${u}_${ie({where:m.query?.where,keepSurroundingQuotes:!1,escape:!1})}`),c.some(g=>oi({dataItem:g,x:m.x,y:u,aggregationType:s.series[0].query?.outStatistics?.[0]?.statisticType}))&&F.add(m))}});break}case C.BoxPlotSeries:{if(De(s)){let m=ze(s);s.series.forEach(u=>{let g,y;u.type===C.BoxPlotSeries?(g=e.dataItems,y=g?.some(p=>ni({dataItem:p,splitBy:u.query?.where,showOutliers:m}))):u.type===C.LineSeries&&(g=e.meanLines,y=g?.some(p=>Li(p,u.query?.where))),y&&F.add(u)})}break}}let n=Array.from(F.values());o=n.length>0&&n.length<r,o&&(t.series=n)}return{seriesFilteredOut:o,filteredConfig:t}}var ps=i=>i.hideEmptyRowsAndColumns,Ss=(i,e)=>{i.hideEmptyRowsAndColumns=e},Fs=(i,e)=>{let s=i.series[0];s.heatRulesType=e},xs=i=>i.series[0].heatRulesType,hs=(i,e)=>{let s=i.series[0];s.gradientRules=e},Bs=i=>i.series[0].gradientRules,bs=i=>{let{yField:e,config:s,layerInfo:a}=i,{layerFieldsInfo:r}=a,t=re(1,s),o=Ni(s),c=_(s),l=s.series[0];if(typeof e=="string"&&o!==e&&l&&(l.y=e,Ti(s),o===t||c)){let f=E(r,e);V(s,1,f)}},Ni=i=>i.series[0].y??"",Ts=i=>{let{binning:e,config:s,commonStrings:a}=i,r=s.series[0];if(r.xTemporalBinning=e,e?.unit!==void 0&&e.unit in a.utilsStrings.heatChartCalendarDatePartsUnits){let t=a.utilsStrings.heatChartCalendarDatePartsUnits[e.unit];V(s,0,t)}},Is=i=>i.series[0].xTemporalBinning,vs=i=>{let{binning:e,config:s,commonStrings:a}=i,r=s.series[0];if(r.yTemporalBinning=e,e?.unit!==void 0&&e.unit in a.utilsStrings.heatChartCalendarDatePartsUnits){let t=a.utilsStrings.heatChartCalendarDatePartsUnits[e.unit];V(s,1,t)}},Cs=i=>i.series[0].yTemporalBinning,wi=(i,e)=>{e.orderOptions??={};let s=e.axes?.[0]?.valueFormat?.type==="category"?q.Category:q.YValue,a=Be(e)[0],r=e.axes?.[1]?.valueFormat?.type==="category"?q.Category:q.YValue,t=Be(e)[1],o={...e.orderOptions.data??{},orderType:q.MultiAxes};a===se.customSort&&s===q.Category&&(o.orderByX=[...i]),t===se.customSort&&r===q.Category&&(o.orderByY=[...i]),Object.keys(o).length>1&&(e.orderOptions.data=o)},As=(i,e)=>{let s=e.series[0];s.gridLine&&(s.gridLine.width=i)},qs=i=>i.series[0].gridLine?.width,ks=(i,e)=>{let s=e.series[0],a=i?.length===4&&i.every(r=>typeof r=="number");s.gridLine&&a&&(s.gridLine.color=i)},Ls=i=>i.series[0].gridLine?.color,Ns=(i,e)=>{let s=e.legend;s&&(s.position=i)},ws=i=>i.legend?.position??ve.Bottom,Rs=i=>i.series[0].query?.outStatistics?.[0]?.onStatisticField,Os=i=>{let{field:e,config:s,layerInfo:a,commonStrings:r}=i,t=s.series[0].query?.outStatistics?.[0],o=ne(s,a,r);t?(t.onStatisticField=e,t.outStatisticFieldName=`${t.statisticType}_${e}`):s.series[0].query={outStatistics:[{onStatisticField:e,outStatisticFieldName:`${A.Count}_${e}`,statisticType:A.Count}]},o&&s.title&&(s.title.content.text=Q(s,a,r))},Es=i=>i.series[0].query?.outStatistics?.[0].statisticType??A.Count,Ms=i=>{let{aggregationType:e,config:s,layerInfo:a,commonStrings:r}=i,t=s.series[0]?.query?.outStatistics?.[0],o=ne(s,a,r);t&&e!==A.NoAggregation&&(t.statisticType=e,t.outStatisticFieldName=`${e}_${t.onStatisticField}`),(e===A.Count||e===A.Sum)&&Ri(Y.Zero,s),o&&s.title&&(s.title.content.text=Q(s,a,r))},Vs=i=>i.nullPolicy,Ri=(i,e)=>{e.nullPolicy=i},Ps=i=>i.series[0].emptyCells,Ds=(i,e)=>{e.series[0].emptyCells=i},js=i=>i.series[0].emptyCells?.text,$s=(i,e)=>{e.series[0].emptyCells?e.series[0].emptyCells.text=i:e.series[0].emptyCells={text:i}},Ws=i=>i.includeLeapDay,Ys=(i,e)=>{e.includeLeapDay=i},Us=i=>i.series[0].emptyCells?.symbol,Xs=(i,e)=>{e.series[0].emptyCells?e.series[0].emptyCells.symbol=i:e.series[0].emptyCells={symbol:i}};function _s(i){return i.viewType}function zs(i,e){si(e)||(e.viewType=i)}function Hs(i){return i.series[0].classBreaksRules?.breaksCount??j.classBreaks.breaksCount}function Qs(i,e){e.series[0].classBreaksRules!==void 0?e.series[0].classBreaksRules.breaksCount=i??j.classBreaks.breaksCount:e.series[0].classBreaksRules={breaksCount:i??j.classBreaks.breaksCount}}function Zs(i){return i.series[0].classBreaksRules?.classificationMethod}function Gs(i,e){e.series[0].classBreaksRules!==void 0?e.series[0].classBreaksRules.classificationMethod=i:e.series[0].classBreaksRules={classificationMethod:i},e.series[0].classBreaksRules.breaksCount=e.series[0].classBreaksRules.breaksCount??j.classBreaks.breaksCount}function Js(i,e){e.firstDayOfWeek=i}function Ks(i){return i.firstDayOfWeek}function et(i){return i.series[0].classBreaksRules?.colorRampInfo?.name}function it(i,e){e.series[0].classBreaksRules!==void 0?e.series[0].classBreaksRules.colorRampInfo={...e.series[0].classBreaksRules.colorRampInfo,name:i}:e.series[0].classBreaksRules={colorRampInfo:{name:i,flipped:!1}}}function st(i){return i.series[0].classBreaksRules?.colorRampInfo?.flipped??!1}function tt(i,e){e.series[0].classBreaksRules!==void 0?e.series[0].classBreaksRules.colorRampInfo={...e.series[0].classBreaksRules.colorRampInfo,flipped:i}:e.series[0].classBreaksRules={colorRampInfo:{flipped:i}}}function z(i){let{seriesIndex:e,xAxisField:s,aggregationType:a,config:r,layerInfo:t,commonStrings:o}=i,c=W(t?.layer).idField,l,f=r.series[e??0],F=!1,n=!1,m=!1;if(f===void 0){let y=r.series;F=y.slice(0,e).every(p=>I(p)),n=y.slice(0,e).every(p=>v(p)),m=y.slice(0,e).every(p=>pe(p))}else F=I(f),n=v(f),m=pe(f);F?l=Re({commonStrings:o,seriesIndex:e,objectIDField:c}):n?l=Oe({commonStrings:o,seriesIndex:e,objectIDField:c}):m?l=we(o,c):l=Ee({seriesIndex:e,objectIDField:c,commonStrings:o});let u=r.series[0]?.dataLabels,g={...l,x:s,y:"",dataLabels:{...l.dataLabels,type:l.dataLabels?.type??C.Text,content:{...l.dataLabels?.content,...u?.content,type:ke.TS},visible:u?.visible??!1}};if(g.query={groupByFieldsForStatistics:[s]},a!==A.NoAggregation&&c!==void 0){let y=`${a}_${c}_0`.toUpperCase();g.y=y,g.query.outStatistics=[{statisticType:a,onStatisticField:c,outStatisticFieldName:y}]}if(k(r.series[0])&&k(g)){let y;if(r?.series?.[0]!==void 0&&(y=$(r.series)),y!==R.BarAndLineNoAggregation&&y!==R.BarAndLineSplitByNoAggregation){let p=hi(r);p===G.Quarter&&(p=G.Month),g.temporalBinning={...r.series[0]?.temporalBinning,unit:p}}}return Z(g)}function Q(i,e,s){let{layerFieldsInfo:a}=e,{idField:r,isTraditionalTypeOID:t}=W(e.layer),o=P(i),c=ae(i),l=Si(i),f=be(i),F=t&&(c.length===0||c.includes(r)),n=Me(l,s),m=F?"":c.map(x=>E(a??[],x)).join(", "),u=E(a??[],o),g=E(a??[],f),y=i.series.some(x=>N(x)),p=y?"category":"xAxisField",B=u,T="";if(he({fieldName:o,numericFields:c,fieldList:a}))T=D(s.titleLabels.aggrTypeOfAggrFields,{aggregationType:n,aggregationFields:m});else if(l===A.NoAggregation){let x=F?r:m;if(f===""){let S=y?"aggrTypeCategory":"aggrTypeXAxisField";T=D(s.titleLabels[S],{aggregationType:x,[p]:B})}else{let S=y?"aggrTypeCategoryBySplitBy":"aggrTypeXAxisFieldBySplitBy";T=D(s.titleLabels[S],{aggregationType:x,[p]:B,splitByField:g})}}else if(l===A.Count)if(f===""){let x=y?"aggrTypeCategory":"aggrTypeXAxisField";T=D(s.titleLabels[x],{aggregationType:n,[p]:B})}else{let x=y?"aggrTypeCategoryBySplitBy":"aggrTypeXAxisFieldBySplitBy";T=D(s.titleLabels[x],{aggregationType:n,[p]:B,splitByField:g})}else if(f!==""){let x=y?"aggrTypeOfAggrFieldByCategoryBySplitByField":"aggrTypeOfAggrFieldByXAxisFieldBySplitByField";T=D(s.titleLabels[x],{aggregationType:n,aggregationField:m,[p]:B,splitByField:g})}else if(c.length>0){let x=y?"aggrTypeOfAggrFieldsByCategory":"aggrTypeOfAggrFieldsByXAxisField";T=D(s.titleLabels[x],{aggregationType:n,aggregationFields:m,[p]:B})}return T}var pi=i=>ie({where:i.query?.where,normalize:!1,escape:!1})??"",Si=i=>i?.series?.[0]?.query?.outStatistics?.[0]?.statisticType??A.NoAggregation,be=Te(i=>{let e=i?.series?.[0]?.query?.where?.split("=")[0].trim()??"";return Ue(i?.series?.[0]?.query?.where)?"":e},i=>i?.series?.[0]?.query?.where),ae=i=>{let e=[];if(be(i)==="")e=i?.series.map(s=>{let a=s.query?.outStatistics?.map(r=>r.onStatisticField)??[];return a?.length>0?a:s.y}).flat()??[];else{let s=i?.series?.[0],a=s?.query?.outStatistics?.[0]?.onStatisticField??[s?.y].flat()[0];e=a!==void 0?[a]:[]}return e.filter(s=>s!=="")};function Oi(i){let{numericFields:e,aggregationType:s,config:a,layerInfo:r}=i,t=!1;s===A.Count?t=!0:s===A.NoAggregation&&(t=e.every(l=>{let f=r.layerFieldsInfo.find(F=>F.name===l);return f!==void 0?me(f):!1})),Fe(a,1,t);let o=a.series.some(l=>I(l)),c=a.series.some(l=>v(l));if(o||c){let l=P(a),f=r.layerFieldsInfo.find(n=>n.name===l),F=f!==void 0&&me(f);Fe(a,0,F)}}var Be=i=>{let e;if(K(i)){let s=i.orderOptions?.data?.orderByX??[""],a=i.orderOptions?.data?.orderByY??[""],r=i.axes?.[0]?.valueFormat?.type==="category"?q.Category:q.YValue,t=i.axes?.[1]?.valueFormat?.type==="category"?q.Category:q.YValue;e=[xe(s,r),xe(a,t)]}else{let s=i.orderOptions?.data?.orderType??q.Category,a=i.orderOptions?.data&&"orderBy"in i.orderOptions.data?i.orderOptions.data.orderBy:Ce.Ascending;e=[fi(a,s)]}return e};function Ei(i){let{xAxisField:e,numericFields:s,aggregationType:a,config:r,layerInfo:t,commonStrings:o}=i,{layerFieldsInfo:c}=t,l=!1,f=z({config:r,xAxisField:e,aggregationType:a,layerInfo:t,seriesIndex:0,commonStrings:o}),F=X({config:r,xAxisField:e,numericFields:s,aggregationType:a,layer:t.layer,fieldList:c}).name,n={...f,id:`series_${Date.now()}`,name:o.axisLabels.values,x:ee,y:F},m=[];for(let g of s)m.push({onStatisticField:g,outStatisticFieldName:`${g}_0`.toUpperCase(),statisticType:a});n.query={outStatistics:m};let u=r.series[0];return u!==void 0&&(n.id=u.id,(I(n)&&I(u)||v(n)&&v(u))&&H(n,u),r.colorMatch||(N(u)&&N(n)?n.fillSymbol=u.fillSymbol:(I(n)&&I(u)||v(n)&&v(u))&&(n.lineSymbol=u.lineSymbol,n.markerSymbol=u.markerSymbol),l=!0),n.id=u.id,u.name!==f.name&&(n.name=u.name)),r.series.length===1&&((I(n)||v(n))&&H(n,r.series[0]),r.colorMatch||(N(n)?n.fillSymbol=r.series[0].fillSymbol:(I(n)||v(n))&&(n.lineSymbol=r.series[0].lineSymbol,n.markerSymbol=r.series[0].markerSymbol),l=!0)),r.colorMatch=!l,[n]}function Fi(i){let{xAxisField:e,numericFields:s,aggregationType:a,config:r,layerInfo:t,commonStrings:o}=i,{layerFieldsInfo:c}=t,l=W(t.layer).idField,f=[],F=!1;for(let y=0;y<s.length;y+=1){let p=z({config:r,xAxisField:e,aggregationType:a,layerInfo:t,seriesIndex:y,commonStrings:o}),B=r.series[y]?.y,T=typeof B=="string"&&B.trim()!==""?B:X({config:r,xAxisField:e,numericFields:s,aggregationType:a,layer:t.layer,numericFieldIndex:y,fieldList:c}).name,x=s[y],S={...p,query:{...p.query}};s&&x!==l&&(S={...S,id:x,name:E(c,x)});let w=x;S.query!==void 0&&(a!==A.NoAggregation?(w=T,S.query.outStatistics=[{...p.query?.outStatistics?.[0]??{},onStatisticField:x,outStatisticFieldName:T,statisticType:a}]):delete S.query.outStatistics),S.y=w;let d=r.series.find(h=>h.query?.outStatistics?.[0]?.onStatisticField===x&&h.query.where===void 0||h.query?.outStatistics===void 0&&(h.y===x||h.x===x));if(d!==void 0&&typeof d.y=="string"&&d.y.trim()!==""){(I(S)&&I(d)||v(S)&&v(d))&&H(S,d),r.colorMatch||(N(S)&&N(d)?S.fillSymbol=d.fillSymbol:(I(S)&&I(d)||v(S)&&v(d))&&(S.lineSymbol=d.lineSymbol,S.markerSymbol=d.markerSymbol),F=!0);let h=z({config:r,xAxisField:e,aggregationType:a,layerInfo:t,seriesIndex:y,commonStrings:o});S.id=d.id,d.id!==h.id&&d.name!==h.name&&(S.id=d.id,S.name=d.name),S.assignToSecondValueAxis=d.assignToSecondValueAxis,S.type===C.HeatSeries&&d.type===C.HeatSeries&&(S.y=d.y,S.heatRulesType=d.heatRulesType)}f.push(S)}let n=f.filter(y=>N(y)),m=f.filter(y=>I(y)||v(y)),u=r.series.filter(y=>N(y)),g=r.series.filter(y=>I(y)||v(y));return u.length===1&&n.length===1&&!r.colorMatch&&(N(u[0])&&N(n[0])&&(n[0].fillSymbol=u[0].fillSymbol),F=!0),g.length===1&&m.length===1&&((I(g[0])&&I(m[0])||v(g[0])&&v(m[0]))&&H(m[0],g[0]),r.colorMatch||((I(g[0])&&I(m[0])||v(g[0])&&v(m[0]))&&(m[0].lineSymbol=g[0].lineSymbol,m[0].markerSymbol=g[0].markerSymbol),F=!0)),r.colorMatch=!F,f}function rt(i){let{aggregationType:e,config:s,layerInfo:a,commonStrings:r}=i,{layerFieldsInfo:t,layer:o}=a,c=P(s),l=ae(s),f=ne(s,a,r),F=xi(s,a,r);if(s.series.forEach((n,m)=>{let u=X({config:s,xAxisField:c,numericFields:l,aggregationType:e,layer:o,seriesIndex:m,numericFieldIndex:m,fieldList:t}).name;e!==A.NoAggregation?(n.y=u,n.query={...n.query,outStatistics:[{...n.query?.outStatistics?.[0],outStatisticFieldName:u,statisticType:e,onStatisticField:n.query?.outStatistics?.[0]?.onStatisticField??l[m]}]}):(delete n.query?.outStatistics,n.y=l[m])}),f&&s.title&&(s.title.content.text=Q(s,a,r)),F&&s.series[0].type!==C.HeatSeries){let n=te({config:s,layerInfo:a,commonStrings:r,numericFields:l,aggregationType:e});V(s,1,n)}}function Mi(i){let{splitByField:e,xAxisField:s,numericFields:a,aggregationType:r,config:t,layerInfo:o,commonStrings:c,splitByFieldInfos:l}=i,{layer:f,layerFieldsInfo:F}=o,{categoriesArray:n,splitByFieldType:m}=l,u=a.length===0?W(f).idField:a[0],g=[],y=!1;if(n.length===0){g=Fi({xAxisField:s,numericFields:a,aggregationType:r,config:t,layerInfo:o,commonStrings:c});for(let p of g)p.query&&(p.query.where=`${e}=''`)}else for(let p=0;p<n.length;p+=1){let B=n[p],T=X({config:t,xAxisField:s,numericFields:a,aggregationType:r,layer:o.layer,seriesIndex:p,splitByField:e,fieldList:F}).name,x=z({config:t,xAxisField:s,aggregationType:r,layerInfo:o,seriesIndex:p,commonStrings:c}),S=de({queryObject:o.layer,fieldName:e,fieldValue:B??""}),w=`${B}`,d={...x,id:w,name:S??w,y:T,query:{...x.query,where:`${e}=${m===qe.String&&B!==null?`'${B}'`:B}`,outStatistics:r!==A.NoAggregation?[{...x.query?.outStatistics?.[0]??{},onStatisticField:u,outStatisticFieldName:T,statisticType:r}]:void 0}};r===A.NoAggregation&&(d.query!==void 0&&(delete d.query.outStatistics,delete d.query.groupByFieldsForStatistics),d.y=u);let h=t.series.find(M=>String(pi(M)).trim().replace(/'/gu,"")===w);h!==void 0&&((I(d)&&I(h)||v(d)&&v(h))&&H(d,h),t.colorMatch||(N(d)&&N(h)?d.fillSymbol=h.fillSymbol:(I(d)&&I(h)||v(d)&&v(h))&&(d.lineSymbol=h.lineSymbol,d.markerSymbol=h.markerSymbol),y=!0),d.id=h.id,d.name=h.name,d.assignToSecondValueAxis=h.assignToSecondValueAxis),d.query&&(d.query.fetchNullValues=t.series.some(M=>M.query?.fetchNullValues)),g.push(d)}return t.colorMatch=!y,g}var at=i=>{let{xAxisFieldName:e,splitByField:s,numericFields:a,aggregationType:r,config:t,layerInfo:o,commonStrings:c,splitByFieldInfos:l}=i,{layerFieldsInfo:f}=o??{},F=di(t),n=P(t),m=f.find(b=>b.name===n),u=t.series[0].query?.fetchNullValues,g="nullCategory"in t.series?.[0]?t.series[0].nullCategory:void 0,y=t.series[0]?.query===void 0,p=f.find(b=>b.name===e),B=ne(t,o,c),T=xi(t,o,c),x=Vi(t,o),S=Se(t),w=t.series.some(b=>N(b)),d=li(t.series),h=ci(t.series),M=K(t),O={};M&&(O.classBreaksRules=t.series[0]?.classBreaksRules,O.xTemporalBinning=t.series[0]?.xTemporalBinning,O.yTemporalBinning=t.series[0]?.yTemporalBinning,O.emptyCells=t.series[0]?.emptyCells,O.nullPolicy=t.nullPolicy);let oe=!1;if(ei(p)?S=ce():!ue(m)&&ue(p)?S=ye():!U(m)&&U(p)?(S=ye(),oe=!0):U(m)&&!U(p)&&(w?S=ce():S=Ne(),oe=!0),S!==void 0&&yi(t,c,S),F===0&&(t.series=[z({config:t,xAxisField:e,aggregationType:r,layerInfo:o,commonStrings:c})]),t.series.forEach(b=>{b.x=e,b.query!==void 0&&(b.query.groupByFieldsForStatistics=[e])}),s===""||a.length>1?he({fieldName:e,numericFields:a,fieldList:f})?t.series=Ei({config:t,layerInfo:o,xAxisField:e,numericFields:a,aggregationType:r,commonStrings:c}):t.series=Fi({config:t,layerInfo:o,xAxisField:e,numericFields:a,aggregationType:r,commonStrings:c}):l&&(t.series=Mi({config:t,layerInfo:o,splitByField:s,xAxisField:e,numericFields:a,aggregationType:r,commonStrings:c,splitByFieldInfos:l})),x&&t.series[0].type!==C.HeatSeries){let b=E(f,e);V(t,0,b)}if(T&&t.series[0].type!==C.HeatSeries){let b=te({config:t,layerInfo:o,commonStrings:c,numericFields:a,aggregationType:r});V(t,1,b)}if(B&&t.title&&(t.title.content.text=Q(t,o,c)),L({config:t,value:null,axisIndex:1,isMax:!1}),L({config:t,value:null,axisIndex:1,isMax:!0}),Oi({numericFields:a,aggregationType:r,config:t,layerInfo:o}),(d||h)&&(L({config:t,value:null,axisIndex:0,isMax:!1}),L({config:t,value:null,axisIndex:0,isMax:!0}),oe)){let b=S?.type===C.DateAxisFormat?Y.Null:Y.Interpolate;bi(b,t)}M&&(t.series[0].classBreaksRules=O.classBreaksRules,t.series[0].xTemporalBinning=O.xTemporalBinning,t.series[0].yTemporalBinning=O.yTemporalBinning,t.series[0].emptyCells=O.emptyCells,t.nullPolicy=O.nullPolicy),y?t.series.forEach(b=>{delete b.query}):u&&t.series.forEach(b=>{b.query&&(b.query.fetchNullValues=u)}),g&&t.series.forEach(b=>{(b.type===C.BarSeries||b.type===C.LineSeries||b.type===C.RadarSeries)&&(b.nullCategory=g)})},H=(i,e)=>{i.markerVisible=e.markerVisible,i.lineSmoothed=e.lineSmoothed,i.showArea=e.showArea,i.areaColor=e.areaColor,i.stackNegativeValuesToBaseline=e.stackNegativeValuesToBaseline,e.lineSymbol&&(i.lineSymbol={...e.lineSymbol,color:i.lineSymbol?.color}),e.markerSymbol&&(i.markerSymbol={...e.markerSymbol,color:i.markerSymbol?.color})},nt=i=>{let{config:e,seriesIndex:s,layerInfo:a,commonStrings:r}=i,t=e.series?.[s],o=be(e),c;if($(e.series)===R.BarAndLineFromFields)c=r.axisLabels.values;else if(Ie(o)){let l=t.query?.outStatistics?.[0]?.onStatisticField;l!==void 0&&l!==W(a.layer).idField&&(c=E(a.layerFieldsInfo,l))}else{let l=String(pi(t)).trim().replace(/'/gu,"");c=de({queryObject:a.layer,fieldName:o,fieldValue:l??""})??l}return c??t.id},ot=(i,e)=>{if(K(e))wi(i,e);else{e.orderOptions??={};let s=e.orderOptions?.data?.orderType;Be(e)[0]===se.customSort&&s===q.Category&&(e.orderOptions.data={orderType:q.Category,orderBy:[...i]})}},lt=async i=>{let{config:e,layerInfo:s,errorStrings:a}=i,r=P(e),t=Se(e)?.type,o=ae(e),c=$(e.series),l=[];return t===C.CategoryAxisFormat&&(c===R.BarAndLineFromFields||r===ee?l=o.map(f=>E(s?.layerFieldsInfo,f)):r.trim()!==""&&r!==ee&&s!==void 0&&(l=await gi({layerInfo:s,config:e,category:r,errorStrings:a}))),l};function ne(i,e,s){let a=Q(i,e,s),r=mi(i),t=_(i);return a===r||t}function xi(i,e,s){let a=te({config:i,layerInfo:e,commonStrings:s,numericFields:ae(i),aggregationType:Si(i)}),r=re(1,i),t=_(i);return a===r||t}function Vi(i,e){let s=E(e.layerFieldsInfo,P(i)),a=re(0,i),r=_(i);return s===a||r}function ct(i){return k(i.series[0])?i.series[0].binTemporalData??!0:!1}function yt(i,e){e?.series.forEach(s=>{(s?.type===C.BarSeries||s?.type===C.LineSeries)&&(s.binTemporalData=i,i?s.temporalBinning={unit:G.Day,size:0,timeAggregationType:Ae.Start,trimIncompleteTimeInterval:!0,nullPolicy:Y.Null}:delete s.temporalBinning)})}return{a:is,b:hi,c:ss,d:ts,e:rs,f:Bi,g:bi,h:as,i:ns,j:os,k:ls,l:cs,m:ys,n:gs,o:Ti,p:us,q:ms,r:ds,s:fs,t:ps,u:Ss,v:Fs,w:xs,x:hs,y:Bs,z:bs,A:Ni,B:Ts,C:Is,D:vs,E:Cs,F:As,G:qs,H:ks,I:Ls,J:Ns,K:ws,L:Rs,M:Os,N:Es,O:Ms,P:Vs,Q:Ri,R:Ps,S:Ds,T:js,U:$s,V:Ws,W:Ys,X:Us,Y:Xs,Z:_s,_:zs,$:Hs,aa:Qs,ba:Zs,ca:Gs,da:Js,ea:Ks,fa:et,ga:it,ha:st,ia:tt,ja:Q,ka:Si,la:be,ma:ae,na:Be,oa:rt,pa:at,qa:nt,ra:ot,sa:lt,ta:ct,ua:yt}},"intl",a,b,c,d,e,f)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as i,b as n,c}from"./KDJ5RVHA.js";import{k as r}from"./QP5UAIC6.js";async function d(t){let a="config"in t?n(t.config):t.chartType,o;if(!("layer"in t)&&!("iLayer"in t)&&"config"in t&&t.config.iLayer===void 0)throw new Error("The source is missing. You can provide it to createModel through either `iLayer`, `layer`, or by setting the `config.iLayer` property.");switch(a){case r.LineChart:{let{LineChartModel:e}=await import("./GES3HRXE.js").then(m=>m.default.then(e=>({LineChartModel:e})));o=new e;break}case r.ComboBarLineChart:{let{ComboBarLineChartModel:e}=await import("./N524VXQ2.js").then(m=>m.default.then(e=>({ComboBarLineChartModel:e})));o=new e;break}case r.PieChart:{let{PieChartModel:e}=await import("./P2NPQAJ3.js").then(m=>m.default.then(e=>({PieChartModel:e})));o=new e;break}case r.Histogram:{let{HistogramModel:e}=await import("./R45FWF7D.js").then(m=>m.default.then(e=>({HistogramModel:e})));o=new e;break}case r.Scatterplot:{let{ScatterplotModel:e}=await import("./U2LJZ4ML.js").then(m=>m.default.then(e=>({ScatterplotModel:e})));o=new e;break}case r.BoxPlot:{let{BoxPlotModel:e}=await import("./KLC6NTPC.js").then(m=>m.default.then(e=>({BoxPlotModel:e})));o=new e;break}case r.Gauge:{let{GaugeModel:e}=await import("./5QO32XSX.js").then(m=>m.default.then(e=>({GaugeModel:e})));o=new e;break}case r.RadarChart:{let{RadarChartModel:e}=await import("./RX3RNE7F.js").then(m=>m.default.then(e=>({RadarChartModel:e})));o=new e;break}case r.HeatChart:{let{HeatChartModel:e}=await import("./24LTTBTF.js").then(m=>m.default.then(e=>({HeatChartModel:e})));o=new e;break}case r.BarChart:default:{let{BarChartModel:e}=await import("./OE3UFORR.js").then(m=>m.default.then(e=>({BarChartModel:e})));o=new e;break}}if(await o?.setup({layer:"layer"in t?t.layer:void 0,iLayer:"iLayer"in t?t.iLayer:void 0,config:"config"in t?t.config:void 0,commonStrings:"commonStrings"in t?t.commonStrings:void 0}),a!==void 0&&c(o,a))return o;{let e=i(o.chartType);throw new Error(`Please check the arguments provided to \`createModel\`. The generated model's type (\`${e}\`) does not match the type specified by either the \`chartType\` or the \`config\` argument (\`${a}\`).`)}}export{d as a};
2
+ import{a as i,b as n,c}from"./KDJ5RVHA.js";import{k as r}from"./QP5UAIC6.js";async function d(t){let a="config"in t?n(t.config):t.chartType,o;if(!("layer"in t)&&!("iLayer"in t)&&"config"in t&&t.config.iLayer===void 0)throw new Error("The source is missing. You can provide it to createModel through either `iLayer`, `layer`, or by setting the `config.iLayer` property.");switch(a){case r.LineChart:{let{LineChartModel:e}=await import("./Z2CVF7CH.js").then(m=>m.default.then(e=>({LineChartModel:e})));o=new e;break}case r.ComboBarLineChart:{let{ComboBarLineChartModel:e}=await import("./SVLEJ3HK.js").then(m=>m.default.then(e=>({ComboBarLineChartModel:e})));o=new e;break}case r.PieChart:{let{PieChartModel:e}=await import("./P2NPQAJ3.js").then(m=>m.default.then(e=>({PieChartModel:e})));o=new e;break}case r.Histogram:{let{HistogramModel:e}=await import("./R45FWF7D.js").then(m=>m.default.then(e=>({HistogramModel:e})));o=new e;break}case r.Scatterplot:{let{ScatterplotModel:e}=await import("./U2LJZ4ML.js").then(m=>m.default.then(e=>({ScatterplotModel:e})));o=new e;break}case r.BoxPlot:{let{BoxPlotModel:e}=await import("./KLC6NTPC.js").then(m=>m.default.then(e=>({BoxPlotModel:e})));o=new e;break}case r.Gauge:{let{GaugeModel:e}=await import("./5QO32XSX.js").then(m=>m.default.then(e=>({GaugeModel:e})));o=new e;break}case r.RadarChart:{let{RadarChartModel:e}=await import("./YRFZPSCC.js").then(m=>m.default.then(e=>({RadarChartModel:e})));o=new e;break}case r.HeatChart:{let{HeatChartModel:e}=await import("./GLJWUZHK.js").then(m=>m.default.then(e=>({HeatChartModel:e})));o=new e;break}case r.BarChart:default:{let{BarChartModel:e}=await import("./NPXBPNXE.js").then(m=>m.default.then(e=>({BarChartModel:e})));o=new e;break}}if(await o?.setup({layer:"layer"in t?t.layer:void 0,iLayer:"iLayer"in t?t.iLayer:void 0,config:"config"in t?t.config:void 0,commonStrings:"commonStrings"in t?t.commonStrings:void 0}),a!==void 0&&c(o,a))return o;{let e=i(o.chartType);throw new Error(`Please check the arguments provided to \`createModel\`. The generated model's type (\`${e}\`) does not match the type specified by either the \`chartType\` or the \`config\` argument (\`${a}\`).`)}}export{d as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import u from"./HCV34H6X.js";import t from"./WO6JBNMU.js";import s from"./WEQBZOH7.js";import r from"./MF3FGXHI.js";import q from"./RAQZUMC6.js";import o from"./PVJEBBA7.js";import n from"./YRBE7MBU.js";import l from"./26FWESH3.js";import j from"./U4XLNCOU.js";import i from"./PZGIXDMC.js";import g from"./KI4HS3AM.js";import f from"./5G7DSKI7.js";import e from"./ZRZEKOEF.js";import d from"./N5ERJZPG.js";import c from"./JHYH555K.js";import{i as h,j as y,k as p}from"./WNKDEOFZ.js";import a from"./5FMEOIBS.js";import{I as P,K as V,R as D,W as k,aa as E}from"./PAIRUVLU.js";import{l as b}from"./SP2IPHWF.js";import{a as L}from"./QP5UAIC6.js";import{a as w,b as m,f as F}from"./547RDEMV.js";export default $arcgis.t(([{ob:N,t:d},{a:M,b:x,d:I,n:U,o:W,p:j,q:q},{c:o},O,{b:Fe,d:xe,f:Ie},{b:ue,d:Se,f:_e},{d:pe,e:fe},ye,{b:R},{b:Te},{a:le,b:ge,c:ce,d:he},{a:me,b:de},{d:T,e:B,f:z},{b:Be},{a:X,b:Y,c:$,d:G,e:H,f:J,g:K,h:Q,i:Z,j:ee,ja:se,k:ie,ka:u,la:te,ma:S,na:A,oa:re,pa:_,ra:C,sa:v,ta:oe,ua:ne},{b:ae}])=>{var Ae=(t,e)=>e.series?.[t].assignToSecondValueAxis??!1,Ce=t=>{let{assign:e,seriesIndex:i,config:s,commonStrings:r}=t;e&&s.axes!==void 0&&!s.axes?.[2]&&(s.axes[2]=k(r,w.BarSeries)[1]),s.series&&s.series.forEach((a,c)=>{c===i?a.assignToSecondValueAxis=e:c!==i&&a?.assignToSecondValueAxis!==!0&&(a.assignToSecondValueAxis=!1)}),s.axes?.[2]&&!s.series.some(a=>a.assignToSecondValueAxis)&&s.axes.splice(2,1)},ve=(t,e)=>e.series?.[t]?.name,Oe=(t,e,i)=>{i.series?.[e]&&(i.series[e].name=t)},be=(t,e)=>{let i=e.series?.[t],s;return p(i)?s=i.fillSymbol?.color:h(i)&&(s=i.lineSymbol?.color),s},we=(t,e,i)=>{let s=i.series?.[e];s&&(p(s)?s.fillSymbol={...E(e),...s.fillSymbol,color:t}:h(s)&&(s.lineSymbol={...D(e),...s.lineSymbol,color:t}))},Pe=t=>t.series.map(e=>e.id),Ve=(t,e)=>{e.series?.sort((i,s)=>t.findIndex(r=>i.id===r)-t.findIndex(r=>s.id===r))},De=t=>t.stackedType??F.Side,ke=t=>{let{newStackedType:e,config:i,layerInfo:s,commonStrings:r}=t;if(i.stackedType=e,s!==void 0){let a=x({config:i,layerInfo:s,commonStrings:r,numericFields:S(i),aggregationType:u(i)});M(i,1,a)}i.axes?.[1]&&(e===F.Stacked100?i.axes[1].valueFormat=V():i.axes[1].valueFormat=P()),I({config:i,value:null,axisIndex:1,isMax:!1}),I({config:i,value:null,axisIndex:1,isMax:!0})},Ee=t=>{let e,i=t.series.find(s=>(p(s)||h(s)||y(s))&&s.nullCategory!==void 0);return(p(i)||h(i)||y(i))&&(e=i?.nullCategory),e},Ne=(t,e)=>{t.series.forEach(i=>{(p(i)||h(i)||y(i))&&(i.nullCategory=e)})},Le=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,f=(t,e,i,s)=>{for(var r=Me(e,i),a=t.length-1,c;a>=0;a--)(c=t[a])&&(r=c(e,i,r)||r);return r&&Le(e,i,r),r},g=class extends O{get temporalBinningSize(){return X(this._config)}set temporalBinningSize(e){J(e,this._config)}get temporalBinningUnit(){return Y(this._config)}set temporalBinningUnit(e){Q(e,this._config)}get timeAggregationType(){return $(this._config)}set timeAggregationType(e){Z(e,this._config)}get trimIncompleteTimeInterval(){return G(this._config)}set trimIncompleteTimeInterval(e){ee(e,this._config)}get nullPolicy(){return H(this._config)}set nullPolicy(e){K(e,this._config)}resetTimeInterval(){ie(this._config)}};f([o],g.prototype,"temporalBinningSize");f([o],g.prototype,"temporalBinningUnit");f([o],g.prototype,"timeAggregationType");f([o],g.prototype,"trimIncompleteTimeInterval");f([o],g.prototype,"nullPolicy");f([o],g.prototype,"resetTimeInterval");var Ue=Object.defineProperty,We=Object.getOwnPropertyDescriptor,l=(t,e,i,s)=>{for(var r=We(e,i),a=t.length-1,c;a>=0;a--)(c=t[a])&&(r=c(e,i,r)||r);return r&&Ue(e,i,r),r},n=class extends O{constructor(){super(...arguments),this._xAxisField="",this._aggregationType=m.Count,this._splitByField="",this._numericFields=[]}get xAxisField(){return this._xAxisField}set xAxisField(e){if(this._xAxisField=e,e.trim()===""||e===d){let i=this.numericFields;this.resetConfig(),this.numericFields=i}this.processSeriesRebuild("xAxisField")}get aggregationType(){return this._aggregationType}set aggregationType(e){this._aggregationType=e,re({aggregationType:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get splitByField(){return this._splitByField}set splitByField(e){this.layerInfo?.layerFieldsInfo&&W(this.layerInfo?.layerFieldsInfo,e)&&(this._splitByField=e,this.processSeriesRebuild("splitByField"))}get numericFields(){return this._numericFields}set numericFields(e){typeof e=="string"&&(e=[e]);let i=j(this.layerInfo?.layerFieldsInfo??[],e),s=(this.xAxisField===""||this.xAxisField===d)&&e.length===0;if(i&&!s){let r=N(this.layerInfo.layer).idField;e.length===0&&r!==void 0?(e.push(r),this._aggregationType=m.Count):this._aggregationType===m.Count&&e.length>=1&&r!==void 0&&!e.includes(r)&&(this._aggregationType=m.Sum),this._numericFields=e,this.numericFields.length>1&&(this._splitByField=""),this.processSeriesRebuild("numericFields")}else s&&this.resetConfig()}getAssignToSecondValueAxis(e){return Ae(e,this._config)}setAssignToSecondValueAxis(e,i){Ce({assign:e,seriesIndex:i,config:this._config,commonStrings:this.commonStrings})}getSortOrder(){return A(this._config)[0]}setSortOrder(e,i){B(e,this._config,i)}async getCustomSortValues(){return await v({config:this._config,layerInfo:this.layerInfo,errorStrings:this.commonStrings?.errorStrings})}async setDataFilters(e){super.setDataFilters(e);let i=A(this._config)[0];if(i===L.customSort){this.startAsyncUpdate();let s=await v({config:this._config,layerInfo:this.layerInfo,errorStrings:this.commonStrings?.errorStrings});B(i,this._config,s),this.finishAsyncUpdate()}this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get orderByList(){return T(this._config)}set orderByList(e){!R(this._config)&&C(e,this._config)}updateSeriesFromLayerFilter(){this.layerInfo!==void 0&&_(this.getBuildNewSeriesProps())}get binTemporalData(){return oe(this._config)}set binTemporalData(e){ne(e,this._config)}getSeriesName(e){return ve(e,this._config)}setSeriesName(e,i){Oe(e,i,this._config)}getSeriesColor(e){return be(e,this._config)}setSeriesColor(e,i){we(e,i,this._config)}getOrderOfSeries(){return Pe(this._config)}setOrderOfSeries(e){Ve(e,this._config)}get stackedType(){return De(this._config)}set stackedType(e){ke({newStackedType:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}moveSeries(e,i){let s=this.getOrderOfSeries(),[r]=s.splice(e,1);s.splice(i,0,r),this.setOrderOfSeries(s)}moveCustomSortValuesInOrderByList(e,i){let s=T(this._config),[r]=s.splice(e,1);s.splice(i,0,r),C(s,this._config)}get nullCategory(){return Ee(this._config)}set nullCategory(e){let i=this.nullCategory;b(i,e)||Ne(this._config,e)}setupLocalProps(){this._xAxisField=z(this._config),this._aggregationType=u(this._config),this._splitByField=te(this._config),this._numericFields=S(this._config)}resetConfig(){let e=this._config.id;this._config=this.generateDefaultConfig(),this._config.id=e,this.setupLocalProps(),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}usingSplitBy(){return this.splitByField!==""&&this.numericFields.length<=1}async processSeriesRebuild(e){this.usingSplitBy()?(this.startAsyncUpdate(),await this.fetchSplitByFieldInfos(),_(this.getBuildNewSeriesProps()),this.finishAsyncUpdate()):_(this.getBuildNewSeriesProps()),this.setupLocalProps(),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange")),this.emitConfigUpdate(e)}async fetchSplitByFieldInfos(){return this.splitByFieldInfos=await U({config:this._config,layer:this.layerInfo.layer,layerFieldsInfo:this.layerInfo.layerFieldsInfo,xAxisField:this._xAxisField!==d?this._xAxisField:void 0,splitByField:this._splitByField,fetchNullValues:this._config?.series?.[0]?.query?.fetchNullValues,errorStrings:this.commonStrings?.errorStrings}),this.splitByFieldInfos}getBuildNewSeriesProps(){return{xAxisFieldName:this._xAxisField,splitByField:this._splitByField,numericFields:this._numericFields,aggregationType:this._aggregationType,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings,splitByFieldInfos:this.splitByFieldInfos}}generateChartTitle(){return this.layerInfo!==void 0?se(this._config,this.layerInfo,this.commonStrings):""}generateYAxisTitle(){return this.layerInfo!==void 0?x({config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings,numericFields:S(this._config),aggregationType:u(this._config)}):""}};l([o],n.prototype,"aggregationType");l([o],n.prototype,"setAssignToSecondValueAxis");l([o],n.prototype,"setSortOrder");l([o],n.prototype,"setDataFilters");l([o],n.prototype,"orderByList");l([o],n.prototype,"binTemporalData");l([o],n.prototype,"setSeriesName");l([o],n.prototype,"setSeriesColor");l([o],n.prototype,"setOrderOfSeries");l([o],n.prototype,"stackedType");l([o],n.prototype,"moveSeries");l([o],n.prototype,"moveCustomSortValuesInOrderByList");l([o],n.prototype,"nullCategory");l([o],n.prototype,"resetConfig");var je=[me,le,ge,ce,Be,he,Te,ye,de,g,Fe,pe,xe,fe,ue,Se,_e,Ie,ae];q(n,je);return{a:ve,b:Oe,c:we,d:n}},a,c,d,e,f,g,i,j,l,n,o,q,r,s,t,u)
2
+ import u from"./HCV34H6X.js";import t from"./5XTB2INB.js";import s from"./WEQBZOH7.js";import r from"./MF3FGXHI.js";import q from"./RAQZUMC6.js";import o from"./PVJEBBA7.js";import n from"./YRBE7MBU.js";import l from"./26FWESH3.js";import j from"./U4XLNCOU.js";import i from"./PZGIXDMC.js";import g from"./KI4HS3AM.js";import f from"./5G7DSKI7.js";import e from"./ZRZEKOEF.js";import d from"./N5ERJZPG.js";import c from"./JHYH555K.js";import{i as h,j as y,k as p}from"./WNKDEOFZ.js";import a from"./5FMEOIBS.js";import{I as P,K as V,R as D,W as k,aa as E}from"./PAIRUVLU.js";import{l as b}from"./SP2IPHWF.js";import{a as L}from"./QP5UAIC6.js";import{a as w,b as m,f as F}from"./547RDEMV.js";export default $arcgis.t(([{ob:N,t:d},{a:M,b:x,d:I,n:U,o:W,p:j,q:q},{c:o},O,{b:Fe,d:xe,f:Ie},{b:ue,d:Se,f:_e},{d:pe,e:fe},ye,{b:R},{b:Te},{a:le,b:ge,c:ce,d:he},{a:me,b:de},{d:T,e:B,f:z},{b:Be},{a:X,b:Y,c:$,d:G,e:H,f:J,g:K,h:Q,i:Z,j:ee,ja:se,k:ie,ka:u,la:te,ma:S,na:A,oa:re,pa:_,ra:C,sa:v,ta:oe,ua:ne},{b:ae}])=>{var Ae=(t,e)=>e.series?.[t].assignToSecondValueAxis??!1,Ce=t=>{let{assign:e,seriesIndex:i,config:s,commonStrings:r}=t;e&&s.axes!==void 0&&!s.axes?.[2]&&(s.axes[2]=k(r,w.BarSeries)[1]),s.series&&s.series.forEach((a,c)=>{c===i?a.assignToSecondValueAxis=e:c!==i&&a?.assignToSecondValueAxis!==!0&&(a.assignToSecondValueAxis=!1)}),s.axes?.[2]&&!s.series.some(a=>a.assignToSecondValueAxis)&&s.axes.splice(2,1)},ve=(t,e)=>e.series?.[t]?.name,Oe=(t,e,i)=>{i.series?.[e]&&(i.series[e].name=t)},be=(t,e)=>{let i=e.series?.[t],s;return p(i)?s=i.fillSymbol?.color:h(i)&&(s=i.lineSymbol?.color),s},we=(t,e,i)=>{let s=i.series?.[e];s&&(p(s)?s.fillSymbol={...E(e),...s.fillSymbol,color:t}:h(s)&&(s.lineSymbol={...D(e),...s.lineSymbol,color:t}))},Pe=t=>t.series.map(e=>e.id),Ve=(t,e)=>{e.series?.sort((i,s)=>t.findIndex(r=>i.id===r)-t.findIndex(r=>s.id===r))},De=t=>t.stackedType??F.Side,ke=t=>{let{newStackedType:e,config:i,layerInfo:s,commonStrings:r}=t;if(i.stackedType=e,s!==void 0){let a=x({config:i,layerInfo:s,commonStrings:r,numericFields:S(i),aggregationType:u(i)});M(i,1,a)}i.axes?.[1]&&(e===F.Stacked100?i.axes[1].valueFormat=V():i.axes[1].valueFormat=P()),I({config:i,value:null,axisIndex:1,isMax:!1}),I({config:i,value:null,axisIndex:1,isMax:!0})},Ee=t=>{let e,i=t.series.find(s=>(p(s)||h(s)||y(s))&&s.nullCategory!==void 0);return(p(i)||h(i)||y(i))&&(e=i?.nullCategory),e},Ne=(t,e)=>{t.series.forEach(i=>{(p(i)||h(i)||y(i))&&(i.nullCategory=e)})},Le=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,f=(t,e,i,s)=>{for(var r=Me(e,i),a=t.length-1,c;a>=0;a--)(c=t[a])&&(r=c(e,i,r)||r);return r&&Le(e,i,r),r},g=class extends O{get temporalBinningSize(){return X(this._config)}set temporalBinningSize(e){J(e,this._config)}get temporalBinningUnit(){return Y(this._config)}set temporalBinningUnit(e){Q(e,this._config)}get timeAggregationType(){return $(this._config)}set timeAggregationType(e){Z(e,this._config)}get trimIncompleteTimeInterval(){return G(this._config)}set trimIncompleteTimeInterval(e){ee(e,this._config)}get nullPolicy(){return H(this._config)}set nullPolicy(e){K(e,this._config)}resetTimeInterval(){ie(this._config)}};f([o],g.prototype,"temporalBinningSize");f([o],g.prototype,"temporalBinningUnit");f([o],g.prototype,"timeAggregationType");f([o],g.prototype,"trimIncompleteTimeInterval");f([o],g.prototype,"nullPolicy");f([o],g.prototype,"resetTimeInterval");var Ue=Object.defineProperty,We=Object.getOwnPropertyDescriptor,l=(t,e,i,s)=>{for(var r=We(e,i),a=t.length-1,c;a>=0;a--)(c=t[a])&&(r=c(e,i,r)||r);return r&&Ue(e,i,r),r},n=class extends O{constructor(){super(...arguments),this._xAxisField="",this._aggregationType=m.Count,this._splitByField="",this._numericFields=[]}get xAxisField(){return this._xAxisField}set xAxisField(e){if(this._xAxisField=e,e.trim()===""||e===d){let i=this.numericFields;this.resetConfig(),this.numericFields=i}this.processSeriesRebuild("xAxisField")}get aggregationType(){return this._aggregationType}set aggregationType(e){this._aggregationType=e,re({aggregationType:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get splitByField(){return this._splitByField}set splitByField(e){this.layerInfo?.layerFieldsInfo&&W(this.layerInfo?.layerFieldsInfo,e)&&(this._splitByField=e,this.processSeriesRebuild("splitByField"))}get numericFields(){return this._numericFields}set numericFields(e){typeof e=="string"&&(e=[e]);let i=j(this.layerInfo?.layerFieldsInfo??[],e),s=(this.xAxisField===""||this.xAxisField===d)&&e.length===0;if(i&&!s){let r=N(this.layerInfo.layer).idField;e.length===0&&r!==void 0?(e.push(r),this._aggregationType=m.Count):this._aggregationType===m.Count&&e.length>=1&&r!==void 0&&!e.includes(r)&&(this._aggregationType=m.Sum),this._numericFields=e,this.numericFields.length>1&&(this._splitByField=""),this.processSeriesRebuild("numericFields")}else s&&this.resetConfig()}getAssignToSecondValueAxis(e){return Ae(e,this._config)}setAssignToSecondValueAxis(e,i){Ce({assign:e,seriesIndex:i,config:this._config,commonStrings:this.commonStrings})}getSortOrder(){return A(this._config)[0]}setSortOrder(e,i){B(e,this._config,i)}async getCustomSortValues(){return await v({config:this._config,layerInfo:this.layerInfo,errorStrings:this.commonStrings?.errorStrings})}async setDataFilters(e){super.setDataFilters(e);let i=A(this._config)[0];if(i===L.customSort){this.startAsyncUpdate();let s=await v({config:this._config,layerInfo:this.layerInfo,errorStrings:this.commonStrings?.errorStrings});B(i,this._config,s),this.finishAsyncUpdate()}this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get orderByList(){return T(this._config)}set orderByList(e){!R(this._config)&&C(e,this._config)}updateSeriesFromLayerFilter(){this.layerInfo!==void 0&&_(this.getBuildNewSeriesProps())}get binTemporalData(){return oe(this._config)}set binTemporalData(e){ne(e,this._config)}getSeriesName(e){return ve(e,this._config)}setSeriesName(e,i){Oe(e,i,this._config)}getSeriesColor(e){return be(e,this._config)}setSeriesColor(e,i){we(e,i,this._config)}getOrderOfSeries(){return Pe(this._config)}setOrderOfSeries(e){Ve(e,this._config)}get stackedType(){return De(this._config)}set stackedType(e){ke({newStackedType:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}moveSeries(e,i){let s=this.getOrderOfSeries(),[r]=s.splice(e,1);s.splice(i,0,r),this.setOrderOfSeries(s)}moveCustomSortValuesInOrderByList(e,i){let s=T(this._config),[r]=s.splice(e,1);s.splice(i,0,r),C(s,this._config)}get nullCategory(){return Ee(this._config)}set nullCategory(e){let i=this.nullCategory;b(i,e)||Ne(this._config,e)}setupLocalProps(){this._xAxisField=z(this._config),this._aggregationType=u(this._config),this._splitByField=te(this._config),this._numericFields=S(this._config)}resetConfig(){let e=this._config.id;this._config=this.generateDefaultConfig(),this._config.id=e,this.setupLocalProps(),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}usingSplitBy(){return this.splitByField!==""&&this.numericFields.length<=1}async processSeriesRebuild(e){this.usingSplitBy()?(this.startAsyncUpdate(),await this.fetchSplitByFieldInfos(),_(this.getBuildNewSeriesProps()),this.finishAsyncUpdate()):_(this.getBuildNewSeriesProps()),this.setupLocalProps(),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange")),this.emitConfigUpdate(e)}async fetchSplitByFieldInfos(){return this.splitByFieldInfos=await U({config:this._config,layer:this.layerInfo.layer,layerFieldsInfo:this.layerInfo.layerFieldsInfo,xAxisField:this._xAxisField!==d?this._xAxisField:void 0,splitByField:this._splitByField,fetchNullValues:this._config?.series?.[0]?.query?.fetchNullValues,errorStrings:this.commonStrings?.errorStrings}),this.splitByFieldInfos}getBuildNewSeriesProps(){return{xAxisFieldName:this._xAxisField,splitByField:this._splitByField,numericFields:this._numericFields,aggregationType:this._aggregationType,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings,splitByFieldInfos:this.splitByFieldInfos}}generateChartTitle(){return this.layerInfo!==void 0?se(this._config,this.layerInfo,this.commonStrings):""}generateYAxisTitle(){return this.layerInfo!==void 0?x({config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings,numericFields:S(this._config),aggregationType:u(this._config)}):""}};l([o],n.prototype,"aggregationType");l([o],n.prototype,"setAssignToSecondValueAxis");l([o],n.prototype,"setSortOrder");l([o],n.prototype,"setDataFilters");l([o],n.prototype,"orderByList");l([o],n.prototype,"binTemporalData");l([o],n.prototype,"setSeriesName");l([o],n.prototype,"setSeriesColor");l([o],n.prototype,"setOrderOfSeries");l([o],n.prototype,"stackedType");l([o],n.prototype,"moveSeries");l([o],n.prototype,"moveCustomSortValuesInOrderByList");l([o],n.prototype,"nullCategory");l([o],n.prototype,"resetConfig");var je=[me,le,ge,ce,Be,he,Te,ye,de,g,Fe,pe,xe,fe,ue,Se,_e,Ie,ae];q(n,je);return{a:ve,b:Oe,c:we,d:n}},a,c,d,e,f,g,i,j,l,n,o,q,r,s,t,u)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import d from"./7ABIELGZ.js";import c from"./TU3UF32Y.js";import b from"./ZRZEKOEF.js";import a from"./N5ERJZPG.js";export default $arcgis.t(([{c:r},f,{c:h},{a:p,b:S,c:l,d:_,e:y,f:d,g:m,h:k,i:M,j:b,k:L,l:u,m:C,n:c,o:x,p:A,q:V,r:v,s:I}])=>{var j=Object.defineProperty,z=Object.getOwnPropertyDescriptor,t=(n,e,i,O)=>{for(var o=z(e,i),a=n.length-1,g;a>=0;a--)(g=n[a])&&(o=g(e,i,o)||o);return o&&j(e,i,o),o},s=class extends f{getSeriesLineStyle(e){return p(e,this._config)}setSeriesLineStyle(e,i){S(e,i,this._config)}getSeriesLineWidth(e){return l(e,this._config)}setSeriesLineWidth(e,i){_(e,i,this._config)}getSeriesMarkerColor(e){return y(e,this._config)}setSeriesMarkerColor(e,i){d(e,i,this._config)}getSeriesMarkerStyle(e){return m(e,this._config)}setSeriesMarkerStyle(e,i){k(e,i,this._config)}getSeriesMarkerSize(e){return M(e,this._config)}setSeriesMarkerSize(e,i){b(e,i,this._config)}isLineSmoothed(e){return L(e,this._config)}setLineSmoothed(e,i){u({smoothed:e,seriesIndex:i,config:this._config})}getConnectLines(e){return v(e,this._config)}setConnectLines(e,i){I({connect:e,seriesIndex:i,config:this._config})}isAreaVisible(e){return C(e,this._config)}setAreaVisible(e,i){c({visible:e,seriesIndex:i,config:this._config})}isMarkerVisible(e){return x(e,this._config)}setMarkerVisible(e,i){A({visible:e,seriesIndex:i,config:this._config})}getAreaColor(e){return V(e,this._config)}setAreaColor(e,i){c({visible:!0,seriesIndex:i,config:this._config}),h(e,i,this._config)}};t([r],s.prototype,"setSeriesLineStyle");t([r],s.prototype,"setSeriesLineWidth");t([r],s.prototype,"setSeriesMarkerColor");t([r],s.prototype,"setSeriesMarkerStyle");t([r],s.prototype,"setSeriesMarkerSize");t([r],s.prototype,"setLineSmoothed");t([r],s.prototype,"setConnectLines");t([r],s.prototype,"setAreaVisible");t([r],s.prototype,"setMarkerVisible");t([r],s.prototype,"setAreaColor");return s},a,b,c,d)
2
+ import d from"./7ABIELGZ.js";import c from"./7CN6J33C.js";import b from"./ZRZEKOEF.js";import a from"./N5ERJZPG.js";export default $arcgis.t(([{c:r},f,{c:h},{a:p,b:S,c:l,d:_,e:y,f:d,g:m,h:k,i:M,j:b,k:L,l:u,m:C,n:c,o:x,p:A,q:V,r:v,s:I}])=>{var j=Object.defineProperty,z=Object.getOwnPropertyDescriptor,t=(n,e,i,O)=>{for(var o=z(e,i),a=n.length-1,g;a>=0;a--)(g=n[a])&&(o=g(e,i,o)||o);return o&&j(e,i,o),o},s=class extends f{getSeriesLineStyle(e){return p(e,this._config)}setSeriesLineStyle(e,i){S(e,i,this._config)}getSeriesLineWidth(e){return l(e,this._config)}setSeriesLineWidth(e,i){_(e,i,this._config)}getSeriesMarkerColor(e){return y(e,this._config)}setSeriesMarkerColor(e,i){d(e,i,this._config)}getSeriesMarkerStyle(e){return m(e,this._config)}setSeriesMarkerStyle(e,i){k(e,i,this._config)}getSeriesMarkerSize(e){return M(e,this._config)}setSeriesMarkerSize(e,i){b(e,i,this._config)}isLineSmoothed(e){return L(e,this._config)}setLineSmoothed(e,i){u({smoothed:e,seriesIndex:i,config:this._config})}getConnectLines(e){return v(e,this._config)}setConnectLines(e,i){I({connect:e,seriesIndex:i,config:this._config})}isAreaVisible(e){return C(e,this._config)}setAreaVisible(e,i){c({visible:e,seriesIndex:i,config:this._config})}isMarkerVisible(e){return x(e,this._config)}setMarkerVisible(e,i){A({visible:e,seriesIndex:i,config:this._config})}getAreaColor(e){return V(e,this._config)}setAreaColor(e,i){c({visible:!0,seriesIndex:i,config:this._config}),h(e,i,this._config)}};t([r],s.prototype,"setSeriesLineStyle");t([r],s.prototype,"setSeriesLineWidth");t([r],s.prototype,"setSeriesMarkerColor");t([r],s.prototype,"setSeriesMarkerStyle");t([r],s.prototype,"setSeriesMarkerSize");t([r],s.prototype,"setLineSmoothed");t([r],s.prototype,"setConnectLines");t([r],s.prototype,"setAreaVisible");t([r],s.prototype,"setMarkerVisible");t([r],s.prototype,"setAreaColor");return s},a,b,c,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import v from"./TU3UF32Y.js";import t from"./HCV34H6X.js";import s from"./WO6JBNMU.js";import q from"./WEQBZOH7.js";import p from"./MF3FGXHI.js";import o from"./RAQZUMC6.js";import n from"./PVJEBBA7.js";import m from"./YRBE7MBU.js";import l from"./26FWESH3.js";import k from"./U4XLNCOU.js";import j from"./PZGIXDMC.js";import i from"./KI4HS3AM.js";import h from"./5G7DSKI7.js";import"./THTYR6IL.js";import g from"./ZRZEKOEF.js";import f from"./2K4ODNJ4.js";import"./Y7HBWU3M.js";import e from"./N5ERJZPG.js";import d from"./CJ4POAPM.js";import b from"./JHYH555K.js";import"./WNKDEOFZ.js";import a from"./5FMEOIBS.js";import"./EZV7JSQJ.js";import{r as S}from"./LRNADJJG.js";import{pa as _}from"./PAIRUVLU.js";import"./KX7KGXKQ.js";import"./SP2IPHWF.js";import"./NZR4L5AA.js";import"./KDJ5RVHA.js";import{c as r}from"./QP5UAIC6.js";import"./XJFVSX2E.js";import{a as u,b as c}from"./547RDEMV.js";import"./CHQDKVVQ.js";import"./U67P6YAZ.js";export default $arcgis.t(([{ob:l},,,{c:i},,,,,,,,,,,{e:y},,{$:$,A:L,B:b,C:R,D:w,E:D,F:I,G:P,H:k,I:B,J:N,K:U,L:W,M:E,N:h,O:f,P:M,Q:Y,R:G,S:H,T:V,U:X,V:j,W:Z,X:q,Y:J,Z:K,_:Q,aa:z,ba:tt,ca:et,da:it,ea:st,fa:ot,ga:rt,ha:nt,ia:at,ja:gt,na:m,t:C,u:T,v:A,w:F,x:O,y:x,z:v},,{a:pt,b:ct,d:lt}])=>{var yt=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,s=(p,t,o,a)=>{for(var n=ht(t,o),g=p.length-1,d;g>=0;g--)(d=p[g])&&(n=d(t,o,n)||n);return n&&yt(t,o,n),n},e=class extends lt{constructor(){super(...arguments),this._chartType=u.HeatSeries}generateChartTitle(){return this.layerInfo!==void 0?gt(this._config,this.layerInfo,this.commonStrings):""}generateYAxisTitle(){let t=this.yTemporalBinning?.unit;return t!==void 0?this.commonStrings.utilsStrings.heatChartCalendarDatePartsUnits[t]:""}get layer(){return super.layer}async setup(t){await this.loadConfigFromLayer(t),this.setupLocalProps(),typeof this.resolveSetup=="function"&&this.resolveSetup()}get yAxisField(){return L(this._config)}set yAxisField(t){v({yField:t,config:this._config,layerInfo:this.layerInfo})}get viewType(){return K(this._config)}set viewType(t){this.guardSetterFromAsyncOverwrite(()=>{Q(t,this._config),this.emitConfigUpdate("heatChartViewType")})}get xTemporalBinning(){return R(this._config)}set xTemporalBinning(t){b({commonStrings:this.commonStrings,binning:t,config:this._config})}get yTemporalBinning(){return D(this._config)}set yTemporalBinning(t){w({commonStrings:this.commonStrings,binning:t,config:this._config})}get breaksCount(){return $(this._config)}set breaksCount(t){this.guardSetterFromAsyncOverwrite(()=>{z(t,this._config),this.emitConfigUpdate("breaksCount")})}get classificationMethod(){return tt(this._config)}set classificationMethod(t){this.guardSetterFromAsyncOverwrite(()=>{t&&(et(t,this._config),this.emitConfigUpdate("classificationMethod"))})}get colorRampName(){return ot(this._config)}set colorRampName(t){rt(t,this._config)}get isColorRampFlipped(){return nt(this._config)}set isColorRampFlipped(t){at(t,this._config)}get hideEmptyRowsAndColumns(){return C(this._config)}set hideEmptyRowsAndColumns(t){T(this._config,t)}get gridLineWidth(){return P(this._config)}set gridLineWidth(t){I(t,this._config)}get gridLineColor(){return B(this._config)}set gridLineColor(t){k(t,this._config)}get seriesName(){return pt(0,this._config)}set seriesName(t){typeof t=="string"&&ct(t,0,this._config)}get heatRulesType(){return F(this._config)}set heatRulesType(t){A(this._config,t)}get gradientRules(){return x(this._config)}set gradientRules(t){O(this._config,t)}getGridLinesSymbol(){return this._config.series?.[0]?.gridLine}setGridLinesSymbol(t){this._config.series?.[0]&&(this._config.series[0].gridLine=t)}get numericFields(){let t=W(this._config);return t!==void 0?[t]:[]}set numericFields(t){let{idField:o}=l(this.layerInfo.layer),a=S(t[0]),n=a?o:t[0];E({field:n,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings});let g=h(this._config);a&&g!==c.Count&&f({aggregationType:c.Count,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get aggregationType(){return h(this._config)}set aggregationType(t){f({aggregationType:t,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get splitByField(){return""}set splitByField(t){}get legendPosition(){return U(this._config)}set legendPosition(t){N(t,this._config)}get nullPolicy(){return M(this._config)}set nullPolicy(t){Y(t,this._config)}get emptyCell(){return G(this._config)}set emptyCell(t){this.guardSetterFromAsyncOverwrite(()=>{H(t,this._config),this.emitConfigUpdate("emptyCell")})}getSortOrder(){return r.Asc}setSortOrder(t,o){}getXAxisSortOrder(){let t=m(this._config)[0];return t===r.Asc||t===r.Desc||t===r.customSort?t:r.Asc}setXAxisSortOrder(t,o){y(t,this._config,o)}getYAxisSortOrder(){let t=m(this._config)[1];return t===r.Asc||t===r.Desc||t===r.customSort?t:r.Asc}setYAxisSortOrder(t,o){y(t,this._config,o,!0)}get emptyCellText(){return V(this._config)}set emptyCellText(t){X(t,this._config)}get includeLeapDay(){return j(this._config)}set includeLeapDay(t){this.guardSetterFromAsyncOverwrite(()=>{Z(t,this._config),this.emitConfigUpdate("includeLeapDay")})}get firstDayOfWeek(){return st(this._config)}set firstDayOfWeek(t){this.guardSetterFromAsyncOverwrite(()=>{it(t,this._config),this.emitConfigUpdate("firstDayOfWeek")})}get emptyCellSymbol(){return q(this._config)}set emptyCellSymbol(t){J(t,this._config)}get rotated(){return!1}set rotated(t){}setAssignToSecondValueAxis(t,o){}set stackedType(t){}set binTemporalData(t){}set nullCategory(t){}generateDefaultConfig(){let t=_(this.commonStrings,l(this.layerInfo.layer).idField);return t.axes?.forEach((o,a)=>{o&&(o.valueFormat={intlOptions:{timeZone:void 0,dateStyle:a>0?"long":"medium"},type:"date"})}),t}};s([i],e.prototype,"yAxisField");s([i],e.prototype,"xTemporalBinning");s([i],e.prototype,"yTemporalBinning");s([i],e.prototype,"colorRampName");s([i],e.prototype,"isColorRampFlipped");s([i],e.prototype,"hideEmptyRowsAndColumns");s([i],e.prototype,"gridLineWidth");s([i],e.prototype,"gridLineColor");s([i],e.prototype,"seriesName");s([i],e.prototype,"heatRulesType");s([i],e.prototype,"gradientRules");s([i],e.prototype,"setGridLinesSymbol");s([i],e.prototype,"numericFields");s([i],e.prototype,"aggregationType");s([i],e.prototype,"splitByField");s([i],e.prototype,"legendPosition");s([i],e.prototype,"nullPolicy");s([i],e.prototype,"setSortOrder");s([i],e.prototype,"setXAxisSortOrder");s([i],e.prototype,"setYAxisSortOrder");s([i],e.prototype,"emptyCellText");s([i],e.prototype,"firstDayOfWeek");s([i],e.prototype,"emptyCellSymbol");s([i],e.prototype,"rotated");s([i],e.prototype,"setAssignToSecondValueAxis");s([i],e.prototype,"stackedType");s([i],e.prototype,"binTemporalData");s([i],e.prototype,"nullCategory");return e},a,b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,v)
2
+ import v from"./7CN6J33C.js";import t from"./HCV34H6X.js";import s from"./5XTB2INB.js";import q from"./WEQBZOH7.js";import p from"./MF3FGXHI.js";import o from"./RAQZUMC6.js";import n from"./PVJEBBA7.js";import m from"./YRBE7MBU.js";import l from"./26FWESH3.js";import k from"./U4XLNCOU.js";import j from"./PZGIXDMC.js";import i from"./KI4HS3AM.js";import h from"./5G7DSKI7.js";import"./THTYR6IL.js";import g from"./ZRZEKOEF.js";import f from"./2K4ODNJ4.js";import"./Y7HBWU3M.js";import e from"./N5ERJZPG.js";import d from"./CJ4POAPM.js";import b from"./JHYH555K.js";import"./WNKDEOFZ.js";import a from"./5FMEOIBS.js";import"./EZV7JSQJ.js";import{r as S}from"./LRNADJJG.js";import{pa as _}from"./PAIRUVLU.js";import"./KX7KGXKQ.js";import"./SP2IPHWF.js";import"./NZR4L5AA.js";import"./KDJ5RVHA.js";import{c as r}from"./QP5UAIC6.js";import"./XJFVSX2E.js";import{a as u,b as c}from"./547RDEMV.js";import"./CHQDKVVQ.js";import"./U67P6YAZ.js";export default $arcgis.t(([{ob:l},,,{c:i},,,,,,,,,,,{e:y},,{$:$,A:L,B:b,C:R,D:w,E:D,F:I,G:P,H:k,I:B,J:N,K:U,L:W,M:E,N:h,O:f,P:M,Q:Y,R:G,S:H,T:V,U:X,V:j,W:Z,X:q,Y:J,Z:K,_:Q,aa:z,ba:tt,ca:et,da:it,ea:st,fa:ot,ga:rt,ha:nt,ia:at,ja:gt,na:m,t:C,u:T,v:A,w:F,x:O,y:x,z:v},,{a:pt,b:ct,d:lt}])=>{var yt=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,s=(p,t,o,a)=>{for(var n=ht(t,o),g=p.length-1,d;g>=0;g--)(d=p[g])&&(n=d(t,o,n)||n);return n&&yt(t,o,n),n},e=class extends lt{constructor(){super(...arguments),this._chartType=u.HeatSeries}generateChartTitle(){return this.layerInfo!==void 0?gt(this._config,this.layerInfo,this.commonStrings):""}generateYAxisTitle(){let t=this.yTemporalBinning?.unit;return t!==void 0?this.commonStrings.utilsStrings.heatChartCalendarDatePartsUnits[t]:""}get layer(){return super.layer}async setup(t){await this.loadConfigFromLayer(t),this.setupLocalProps(),typeof this.resolveSetup=="function"&&this.resolveSetup()}get yAxisField(){return L(this._config)}set yAxisField(t){v({yField:t,config:this._config,layerInfo:this.layerInfo})}get viewType(){return K(this._config)}set viewType(t){this.guardSetterFromAsyncOverwrite(()=>{Q(t,this._config),this.emitConfigUpdate("heatChartViewType")})}get xTemporalBinning(){return R(this._config)}set xTemporalBinning(t){b({commonStrings:this.commonStrings,binning:t,config:this._config})}get yTemporalBinning(){return D(this._config)}set yTemporalBinning(t){w({commonStrings:this.commonStrings,binning:t,config:this._config})}get breaksCount(){return $(this._config)}set breaksCount(t){this.guardSetterFromAsyncOverwrite(()=>{z(t,this._config),this.emitConfigUpdate("breaksCount")})}get classificationMethod(){return tt(this._config)}set classificationMethod(t){this.guardSetterFromAsyncOverwrite(()=>{t&&(et(t,this._config),this.emitConfigUpdate("classificationMethod"))})}get colorRampName(){return ot(this._config)}set colorRampName(t){rt(t,this._config)}get isColorRampFlipped(){return nt(this._config)}set isColorRampFlipped(t){at(t,this._config)}get hideEmptyRowsAndColumns(){return C(this._config)}set hideEmptyRowsAndColumns(t){T(this._config,t)}get gridLineWidth(){return P(this._config)}set gridLineWidth(t){I(t,this._config)}get gridLineColor(){return B(this._config)}set gridLineColor(t){k(t,this._config)}get seriesName(){return pt(0,this._config)}set seriesName(t){typeof t=="string"&&ct(t,0,this._config)}get heatRulesType(){return F(this._config)}set heatRulesType(t){A(this._config,t)}get gradientRules(){return x(this._config)}set gradientRules(t){O(this._config,t)}getGridLinesSymbol(){return this._config.series?.[0]?.gridLine}setGridLinesSymbol(t){this._config.series?.[0]&&(this._config.series[0].gridLine=t)}get numericFields(){let t=W(this._config);return t!==void 0?[t]:[]}set numericFields(t){let{idField:o}=l(this.layerInfo.layer),a=S(t[0]),n=a?o:t[0];E({field:n,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings});let g=h(this._config);a&&g!==c.Count&&f({aggregationType:c.Count,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get aggregationType(){return h(this._config)}set aggregationType(t){f({aggregationType:t,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get splitByField(){return""}set splitByField(t){}get legendPosition(){return U(this._config)}set legendPosition(t){N(t,this._config)}get nullPolicy(){return M(this._config)}set nullPolicy(t){Y(t,this._config)}get emptyCell(){return G(this._config)}set emptyCell(t){this.guardSetterFromAsyncOverwrite(()=>{H(t,this._config),this.emitConfigUpdate("emptyCell")})}getSortOrder(){return r.Asc}setSortOrder(t,o){}getXAxisSortOrder(){let t=m(this._config)[0];return t===r.Asc||t===r.Desc||t===r.customSort?t:r.Asc}setXAxisSortOrder(t,o){y(t,this._config,o)}getYAxisSortOrder(){let t=m(this._config)[1];return t===r.Asc||t===r.Desc||t===r.customSort?t:r.Asc}setYAxisSortOrder(t,o){y(t,this._config,o,!0)}get emptyCellText(){return V(this._config)}set emptyCellText(t){X(t,this._config)}get includeLeapDay(){return j(this._config)}set includeLeapDay(t){this.guardSetterFromAsyncOverwrite(()=>{Z(t,this._config),this.emitConfigUpdate("includeLeapDay")})}get firstDayOfWeek(){return st(this._config)}set firstDayOfWeek(t){this.guardSetterFromAsyncOverwrite(()=>{it(t,this._config),this.emitConfigUpdate("firstDayOfWeek")})}get emptyCellSymbol(){return q(this._config)}set emptyCellSymbol(t){J(t,this._config)}get rotated(){return!1}set rotated(t){}setAssignToSecondValueAxis(t,o){}set stackedType(t){}set binTemporalData(t){}set nullCategory(t){}generateDefaultConfig(){let t=_(this.commonStrings,l(this.layerInfo.layer).idField);return t.axes?.forEach((o,a)=>{o&&(o.valueFormat={intlOptions:{timeZone:void 0,dateStyle:a>0?"long":"medium"},type:"date"})}),t}};s([i],e.prototype,"yAxisField");s([i],e.prototype,"xTemporalBinning");s([i],e.prototype,"yTemporalBinning");s([i],e.prototype,"colorRampName");s([i],e.prototype,"isColorRampFlipped");s([i],e.prototype,"hideEmptyRowsAndColumns");s([i],e.prototype,"gridLineWidth");s([i],e.prototype,"gridLineColor");s([i],e.prototype,"seriesName");s([i],e.prototype,"heatRulesType");s([i],e.prototype,"gradientRules");s([i],e.prototype,"setGridLinesSymbol");s([i],e.prototype,"numericFields");s([i],e.prototype,"aggregationType");s([i],e.prototype,"splitByField");s([i],e.prototype,"legendPosition");s([i],e.prototype,"nullPolicy");s([i],e.prototype,"setSortOrder");s([i],e.prototype,"setXAxisSortOrder");s([i],e.prototype,"setYAxisSortOrder");s([i],e.prototype,"emptyCellText");s([i],e.prototype,"firstDayOfWeek");s([i],e.prototype,"emptyCellSymbol");s([i],e.prototype,"rotated");s([i],e.prototype,"setAssignToSecondValueAxis");s([i],e.prototype,"stackedType");s([i],e.prototype,"binTemporalData");s([i],e.prototype,"nullCategory");return e},a,b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t,v)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import u from"./PK5XIIZY.js";import{a as ae}from"./L7CMLBHB.js";import{a as ie}from"./VOTZAPI3.js";import{a as k}from"./JNNB2DIA.js";import{a as se}from"./IHO3OLL3.js";import t from"./IHQ7R6L4.js";import{a as f}from"./IVLVCLDE.js";import{a as $,b as W,e as ee}from"./OBPAQN4H.js";import s from"./VDG54AIC.js";import{d as c}from"./AK7X7SGI.js";import{a as P}from"./MRTKZZTF.js";import r from"./RMYZGOBM.js";import q from"./FDXE5JLT.js";import p from"./TAI4RIWT.js";import m from"./WO6JBNMU.js";import l from"./WEQBZOH7.js";import j from"./MF3FGXHI.js";import i from"./26FWESH3.js";import{b as B,c as L,i as Y,l as w,p as D}from"./THTYR6IL.js";import g from"./2K4ODNJ4.js";import"./Y7HBWU3M.js";import e from"./N5ERJZPG.js";import d from"./CJ4POAPM.js";import b from"./JHYH555K.js";import"./WNKDEOFZ.js";import a from"./5FMEOIBS.js";import{d as M,e as X}from"./EZV7JSQJ.js";import{C as v,c as R,q as x}from"./LRNADJJG.js";import"./PAIRUVLU.js";import"./KX7KGXKQ.js";import{l as T}from"./SP2IPHWF.js";import"./NZR4L5AA.js";import{a as J}from"./ZRFHAQL6.js";import"./KDJ5RVHA.js";import"./QP5UAIC6.js";import"./XJFVSX2E.js";import{a as o,k as H}from"./547RDEMV.js";import{A as _,B as h,C as U,E as S,G as z,g as N,i as n,n as C,y as A,z as V}from"./CHQDKVVQ.js";import"./U67P6YAZ.js";export default $arcgis.t(([{substitute:le},{Ga:O,Jb:K,eb:G,hb:Z,jc:j},,,,,{b:I},,{a:Q},,,,,{r:te},{e:y,f:q},{b:E}])=>{var d={chartUIComponent:"chart-ui-component",tabBar:"tab-bar",tab:"tab"};function re(m,e){let i=new Set,t=e;return m?.forEach((a,s)=>{let r=a.chartId;(i.has(r)||r===void 0||r==="")&&(a.chartId=`Chart_${Date.now()}_${s}`,e===r&&(t=a.chartId)),i.add(r)}),t}function ce(m,e,i){return m?.filter(t=>x(i,t.config)&&t.layer?.id===e)??[]}function ne(m){let{modelList:e,layerList:i,activeLayerId:t,disableEditing:a}=m,s=new Map;return e?.forEach(r=>{let l=r.layer;l&&s.set(l.id,l)}),a||i.forEach(r=>s.set(r.id,r)),Array.from(s.values()).filter(r=>!t||r.id===t)}function he(m,e){m.forEach(i=>{e.forEach(t=>{i?.id===t.layer?.id&&oe(i,t)})})}function oe(m,e){let i=m;if(i){let t=[...i?.charts??[]],a=t?.findIndex(r=>r.id===e.chartId),s=!1;a!==void 0&&a>-1?(s=!T(t[a],e.config),t[a]=e.config):i&&!I(e.config)&&(s=!0,t.push(e.config)),s&&(i.charts=t)}}function de(m,e){let i=m;if(i){let t=[...i.charts??[]],a=t.findIndex(s=>s.id===e);a>-1&&(t.splice(a,1),i.charts=t)}}function me(m,e){let i=m;if(i){let t=[...i.charts??[]];t=v({arrayA:t,arrayB:e.map(a=>a.config),getKey:a=>a.id??a.title?.content.text??""}),i.charts=t}}var pe=N`:host{display:flex;flex-direction:column;flex:1 1 auto;overflow:hidden;height:inherit;max-height:100%}.chart-ui-component{overflow-y:auto;overflow-x:hidden}.label{display:flex;margin-left:1rem;margin-bottom:.5rem;justify-content:space-between}.text{display:flex;margin-left:1rem;width:calc(100% - 1.5rem);height:2rem;margin-bottom:.5rem;justify-content:space-between}.field-list{max-height:50vh;overflow-y:scroll}.row{padding:.5rem}.bin-count-container{display:flex;width:calc(100% - 1rem);padding:.5rem}.bin-count-slider{margin-left:1rem;width:calc(90% - 1rem)}.bin-count-input{margin-left:1rem;height:2rem;width:2rem}.bin-row{padding:.5rem 0 .5rem .5rem}.tab-bar{display:flex}.tab{flex:1;height:2.5rem}`,F=class extends _{constructor(){super(),this.selectChartTypePopover=null,this.chartsListFlowItem=A(),this.supportedChartTypes=[o.BarSeries,o.BoxPlotSeries,o.LineSeries,o.PieSeries,o.HistogramSeries,o.ScatterSeries,o.HeatSeries],this._messages=P(),this.commonStrings=P({name:"common",blocking:!0}),this.chartDataProcessComplete=e=>{let i=e,{chartData:t,model:a}=i.detail,s=this.getModel(this.selectedChartId);if(a?.isSameChartAs(s))switch(s?.chartType){case o.HistogramSeries:if(this.chartData=t,a&&(a.dataStore.chartData=t,X(a.layer))){let r=a,l=t?.bins?.length;l!==void 0&&r.binCount!==l&&(r.binCount=l)}break;case o.PieSeries:{this.chartData=t,a&&(a.dataStore.chartData=t);break}case o.ScatterSeries:{let r=t,{dataItems:l,r2:g,aggregated:u}=r,p=g;Number.isFinite(g)||(p=void 0),this.r2=p,Y(a)&&(a.dataStore.r2=p,a.dataStore.aggregated=u,u&&(a.additionalTooltipField=void 0)),this.calculatedDataMinMaxBounds=this.getDataExtent(l),a&&(a.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}case o.LineSeries:case o.BarSeries:{let{dataItems:r,timeIntervalInfo:l}=t;if((L(s)||B(s)&&s.binTemporalData)&&(l?.size!==void 0&&s.temporalBinningSize!==l?.size&&(s.temporalBinningSize=l?.size),l?.unit!==void 0&&s.temporalBinningUnit!==l?.unit&&l?.unit!==H.Quarter&&(s.temporalBinningUnit=l?.unit),l?.size!==void 0&&l?.unit!==void 0&&ee($,{size:l.size,unit:l.unit})),this.calculatedDataMinMaxBounds=this.getDataExtent(r),a&&(a.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds),B(s)){let g=s.xAxisField,u=r.some(b=>b[g]===null),p=s.nullCategory;u&&p===void 0&&(s.nullCategory=R.nullCategory)}break}}},this.chartAxesMinMaxChange=e=>{let i=e,{bounds:t,model:a}=i.detail,s=this.getModel(this.selectedChartId),r=a?.isSameChartAs(s),l=s?.chartType;if(r)switch(l){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:case o.ScatterSeries:this.calculatedMinMaxBounds=t,a&&(a.dataStore.calculatedMinMaxBounds=t),this.updateAxesBoundsInAppState(t);break}},this.chartSeriesColorChange=e=>{let i=e,{data:t,model:a}=i.detail,s=this.getModel(this.selectedChartId);if(a?.isSameChartAs(s))switch(s?.chartType){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:this.seriesColor=t,a&&(a.dataStore.seriesColor=t);break;case o.PieSeries:{let r=new Map([[0,t]]);this.seriesColor=r,a&&(a.dataStore.seriesColor=r);break}case o.ScatterSeries:}},this.chartNoRenderPropChange=e=>{let i=e,{propName:t,value:a,model:s}=i.detail,r=this.modelList.find(l=>s?.isSameChartAs(l));if(r)switch(t){case"rotation":typeof a=="boolean"&&Q(r)&&(r.rotated=a);break;case"legendPosition":typeof a=="string"&&D(r)&&(r.legendPosition=a);break;case"legendVisibility":typeof a=="boolean"&&D(r)&&(r.legendVisibility=a);break}},this.chartLegendItemVisibilityChange=e=>{let i=e,{legendItemVisibility:t,model:a}=i.detail,s=this.modelList.find(r=>a?.isSameChartAs(r));s?.setSeriesVisibility(t),w(s)&&((s.getMinBound(1)===null||Number.isNaN(s.getMinBound(1)))&&s.setMinBound(null,1),(s.getMaxBound(1)===null||Number.isNaN(s.getMaxBound(1)))&&s.setMaxBound(null,1),L(s)&&((s.getMinBound(0)===null||Number.isNaN(s.getMinBound(0)))&&s.setMinBound(null,0),(s.getMaxBound(0)===null||Number.isNaN(s.getMaxBound(0)))&&s.setMaxBound(null,0)))},this.onSelectChartTypeChange=e=>{this.currentChartTypeText="",this.calculatedDataMinMaxBounds=void 0,this.calculatedMinMaxBounds=void 0,this.removeSelectChartTypePopover();let{selectedModelType:i,layerId:t}=e.target;i!==void 0&&(this.allowChartSyncing=!0,this.arcgisChartsConfigNewChart.emit({key:"key",chartType:i,layerId:t}))},this.onAddChartClose=()=>{this.removeSelectChartTypePopover()},this.onModelConfigChange=e=>{if(this.syncChartsToLayers&&this.allowChartSyncing){let i=e.target;oe(i?.layer,i)}this.requestUpdate()},this.allowChartSyncing=!1,this.currentChartTypeText="",this.modelList=[],this.layerList=[],this.disableEditing=!1,this.syncChartsToLayers=!1,this.close=!1,this.usePopupTemplateFieldsInfo=!1,this.panelNumber=0,this.filterBySelection=!1,this.arcgisChartsConfigChartViewChartClose=C(),this.arcgisChartsConfigModelListChange=C(),this.arcgisChartsConfigNewChart=C(),this.arcgisChartsConfigPanelNumberChange=C(),this.arcgisChartsConfigSelectedChartChange=C(),this.addChartEventListeners(),this.listen("arcgisChartsConfigModelListReorder",this.modelListReorderChangeListener)}static{this.properties={selectedPanel:16,currentChartTypeText:16,messageOverrides:0,modelList:[0,{hasChanged:y}],layerList:[0,{hasChanged:y}],selectedChartId:1,activeLayerId:1,disableEditing:5,syncChartsToLayers:5,timeZone:1,headerTitle:1,close:5,chartData:[0,{hasChanged:y}],r2:9,calculatedDataMinMaxBounds:[0,{hasChanged:y}],calculatedMinMaxBounds:[0,{hasChanged:y}],seriesColor:[0,{hasChanged:q}],popoverPlacement:1,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5,panelNumber:9,filterBySelection:5}}static{this.styles=pe}async setFocus(){await this.chartsListFlowItem.value?.setFocus()}async load(){await this.layerListChange();let e=this.getModel(this.selectedChartId);this.setEventBasedPropsFromModelData(e)}willUpdate(e){e.has("layerList")&&this.layerListChange(),e.has("panelNumber")&&this.panelNumberChange(this.panelNumber),e.has("modelList")&&this.modelListChange(this.modelList,e.get("modelList")),e.has("selectedChartId")&&this.selectedChartIdChange(this.selectedChartId)}disconnectedCallback(){super.disconnectedCallback(),this.clearPartialModels(),this.removeSelectChartTypePopover()}modelListReorderChangeListener(e){let{modelList:i}=e.detail;if(this.modelList=v({arrayA:this.modelList,arrayB:i,getKey:t=>t.chartId??t.titleText??""}),this.syncChartsToLayers){let t=i.find(a=>a.layer?.id!==void 0)?.layer?.id;if(t){let a=this.layerList.find(s=>s.id.toString()===t);a&&me(a,i)}}}async layerListChange(){let e=[],i=this.layerList.map(a=>a.id.toString()),t=[...this.modelList.filter(a=>i.includes(a.layer?.id??""))];for(let a of this.layerList??[]){if(a.type==="sublayer"){let r=await a.createFeatureLayer();if(!r)continue;a=r}let s=a.charts;for(let r of s??[]){let l=await J({layer:a,config:r,commonStrings:this.commonStrings});l!==void 0&&e.push(l)}}re(e),e.forEach(a=>{t.find(s=>s.isSameChartAs(a))===void 0&&t.push(a)}),t=t.filter(a=>!K(a.config)),this.modelList=t}modelListChange(e,i){this.selectedChartId=re(e,this.selectedChartId),i?.forEach(a=>{a.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}),e.forEach(a=>{a.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)});let t=this.getModel(this.selectedChartId);this.currentChartTypeText=t?.chartType!==void 0?E({chartType:t.chartType,commonStrings:this.commonStrings,config:t.config}):"",this.syncChartsToLayers&&this.allowChartSyncing&&he(this.layerList,e),this.arcgisChartsConfigModelListChange.emit({modelList:e})}selectedChartIdChange(e){this.selectedChartId===void 0&&(this.panelNumber=0),this.selectedPanel=c.Data;let i=this.getModel(e);this.setEventBasedPropsFromModelData(i),this.currentChartTypeText=i?.chartType!==void 0?E({chartType:i.chartType,commonStrings:this.commonStrings,config:i.config}):"",e!==void 0&&e!==$.selectedChartId&&($.selectedChartId=e),this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:i})}panelNumberChange(e){e===0?this.clearPartialModels():e===1&&this.removeSelectChartTypePopover(),this.arcgisChartsConfigPanelNumberChange.emit({panelNumber:e,modelList:this.modelList})}addChartEventListeners(){this.listenOn(document,f.DataProcessComplete,this.chartDataProcessComplete),this.listenOn(document,f.AxesMinMaxChange,this.chartAxesMinMaxChange),this.listenOn(document,f.SeriesColorChange,this.chartSeriesColorChange),this.listenOn(document,f.NoRenderPropChange,this.chartNoRenderPropChange),this.listenOn(document,f.LegendItemVisibilityChange,this.chartLegendItemVisibilityChange)}getDataExtent(e){let i=this.getModel(this.selectedChartId)?.config,t=[];if(i!==void 0&&e!==void 0){let a=j({chartConfig:i,chartData:e}),{minY:s,maxY:r,minX:l,maxX:g}=a;t=[{isXAxis:!0,minimum:l,maximum:g},{isXAxis:!1,minimum:s,maximum:r}]}return t}updateAxesBoundsInAppState(e){e?.forEach(i=>{let{isXAxis:t,maximum:a,minimum:s}=i,r=this.getModel(this.selectedChartId);if(r!==void 0&&w(r)&&this.selectedChartId!==void 0){let l=new ae(r,t),g=W({chartId:this.selectedChartId,isXAxis:t,isLogarithmic:l.getLogarithmic()}),u=$.chartAxesBoundDataMap;u[this.selectedChartId]===void 0&&(u[this.selectedChartId]={});let p=u[this.selectedChartId]?.[g],b={defaultMinBound:p?.defaultMinBound===p?.currMinBound?s:p?.defaultMinBound,currMinBound:s,defaultMaxBound:p?.defaultMaxBound===p?.currMaxBound?a:p?.defaultMaxBound,currMaxBound:a};!T(p,b)&&this.selectedChartId!==void 0&&u?.[this.selectedChartId]!==void 0&&(u[this.selectedChartId][g]=b)}})}getPlacement(){let e;return this.popoverPlacement!==void 0?e=this.popoverPlacement:e=this.modelList?.filter(i=>x(O,i.config)).length<=2?"bottom":"top",e}onBackFlow(){this.panelNumber-=1}async onAddChartClick(e){let{referenceElement:i,layerId:t,layerType:a}=e.detail,s=!0;if(M(a)&&t){let r=this.layerList.find(l=>l.id===t);M(r?.type)&&(s=!!(await Z(r))?.attributeTable)}this.setupSelectChartTypePopover(i,t,a,s)}setupSelectChartTypePopover(e,i,t,a=!0){let s=this.getPlacement();this.removeSelectChartTypePopover(),this.selectChartTypePopover=S(n`<arcgis-charts-config-select-chart-type-popover .referenceElement=${e} open .layerId=${i} .layerType=${t} .isRasterBarChartSupported=${a} .popoverPlacement=${s} @arcgisChartsConfigPopoverClose=${this.onAddChartClose} @arcgisChartsConfigSelectChartTypeChange=${this.onSelectChartTypeChange}></arcgis-charts-config-select-chart-type-popover>`),!document.body.contains(this.selectChartTypePopover)&&this.selectChartTypePopover!==null&&document.body.appendChild(this.selectChartTypePopover)}getModel(e){return this.modelList?.find(i=>i.chartId===e)}removeSelectChartTypePopover(){this.selectChartTypePopover!==void 0&&(this.selectChartTypePopover?.remove(),this.selectChartTypePopover=se(this.selectChartTypePopover))}clearPartialModels(){this.modelList=this.modelList.filter(e=>!I(e.config))}onViewChartDelete(e){let{chartId:i}=e.detail;if(i!==void 0){let t=this.modelList.find(s=>s.chartId===i),a=this.layerList.find(s=>s.id===t?.layer?.id);this.modelList=[...this.modelList.filter(s=>s.chartId!==i)],a&&this.syncChartsToLayers&&this.allowChartSyncing&&de(a,i)}}onViewChartsSelect(e){this.selectedChartId===e.detail.chartId&&(this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:this.getModel(this.selectedChartId)})),this.selectedChartId=e.detail.chartId}onViewChartsEdit(e){this.onViewChartsSelect(e),this.panelNumber=1}onViewChartClose(){this.close=!0,this.removeSelectChartTypePopover(),this.arcgisChartsConfigChartViewChartClose.emit()}setEventBasedPropsFromModelData(e){this.chartData=e?.dataStore.chartData,this.r2=e?.dataStore.r2,this.seriesColor=e?.dataStore.seriesColor,this.calculatedMinMaxBounds=e?.dataStore.calculatedMinMaxBounds,this.calculatedDataMinMaxBounds=e?.dataStore.calculatedDataMinMaxBounds}createTooltip(e){let i=e.target,t="";switch(i.icon){case"configure":t=this._messages.data??"";break;case"graph-bar-stacked":case"graph-line-series":case"box-chart-series":t=this._messages.series??"";break;case"graph-pie-slice":t=this._messages.slices??"";break;case"graph-axis":t=this._messages.axes??"";break;case"graph-guides":t=this._messages.guides??"";break;case"palette":t=this._messages.format??"";break;case"text":t=this._messages.general??"";break;default:t="";break}this.tooltip=S(n`<calcite-tooltip style=${U({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${i} open placement=top>${t}</calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){te(this.tooltip)}renderViewCharts(){let e=ne({modelList:this.modelList,layerList:this.layerList,activeLayerId:this.activeLayerId,disableEditing:this.disableEditing});return ie(e,i=>i.id,i=>n`<arcgis-charts-config-view-charts .noGroup=${this.activeLayerId!==void 0} .modelList=${ce(this.modelList,i.id.toString(),M(i.type)?G:this.supportedChartTypes)} .selectedChartId=${this.selectedChartId??""} .layer=${i} .disableEditing=${this.disableEditing} @arcgisChartsConfigViewChartSelect=${this.onViewChartsSelect} @arcgisChartsConfigViewChartEdit=${this.onViewChartsEdit} @arcgisChartsConfigViewChartDelete=${this.onViewChartDelete} @arcgisChartsConfigViewChartAddChart=${this.onAddChartClick}></arcgis-charts-config-view-charts>`)}render(){return this.close?null:n`<calcite-flow>${k("charts-list",n`<calcite-flow-item .selected=${this.panelNumber===0||this.disableEditing} .heading=${this.headerTitle??this._messages.defaultHeaderTitle} closable @calciteFlowItemClose=${this.onViewChartClose} ${V(this.chartsListFlowItem)}>${this.renderViewCharts()}</calcite-flow-item>`)}${this.panelNumber>=1&&!this.disableEditing?this.renderTabs():null}</calcite-flow>`}renderTabs(){let e=this.getModel(this.selectedChartId);return k("chart-edit",n`<calcite-flow-item .selected=${this.panelNumber>=1&&!this.disableEditing} @calciteFlowItemBack=${this.onBackFlow} .heading=${this._messages[this.selectedPanel??c.Data]} .description=${this.currentChartTypeText!==""&&this._messages.pageFlowTitle!==void 0?le(this._messages.pageFlowTitle,{chartName:e?.titleText??this.currentChartTypeText,layerName:e?.layer?.title??""}):""}>${e?.chartType!==void 0?n`<calcite-action-bar class=${h(d.tabBar)} layout=horizontal expand-disabled><calcite-action class=${h(d.tab)} icon=configure scale=s alignment=center .active=${this.selectedPanel===c.Data||this.selectedPanel===void 0} @click=${()=>{this.selectedPanel=c.Data}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>${e?.chartType===o.BarSeries?n`<calcite-action class=${h(d.tab)} icon=graph-bar-stacked scale=s alignment=center .active=${this.selectedPanel===c.Series} @click=${()=>{this.selectedPanel=c.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.LineSeries?n`<calcite-action class=${h(d.tab)} icon=graph-line-series scale=s alignment=center .active=${this.selectedPanel===c.Series} @click=${()=>{this.selectedPanel=c.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.BoxPlotSeries?n`<calcite-action class=${h(d.tab)} icon=box-chart-series scale=s alignment=center .active=${this.selectedPanel===c.Series} @click=${()=>{this.selectedPanel=c.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.PieSeries?n`<calcite-action class=${h(d.tab)} icon=graph-pie-slice scale=s alignment=center .active=${this.selectedPanel===c.Slices} @click=${()=>{this.selectedPanel=c.Slices}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?n`<calcite-action class=${h(d.tab)} icon=graph-axis scale=s alignment=center .active=${this.selectedPanel===c.Axes} @click=${()=>{this.selectedPanel=c.Axes}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?n`<calcite-action class=${h(d.tab)} icon=graph-guides scale=s alignment=center .active=${this.selectedPanel===c.Guides} @click=${()=>{this.selectedPanel=c.Guides}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}<calcite-action class=${h(d.tab)} icon=palette scale=s alignment=center .active=${this.selectedPanel===c.Format} @click=${()=>{this.selectedPanel=c.Format}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action><calcite-action class=${h(d.tab)} icon=text scale=s alignment=center .active=${this.selectedPanel===c.General} @click=${()=>{this.selectedPanel=c.General}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action></calcite-action-bar>`:null}${this.renderChartUIComponent()}</calcite-flow-item>`)}renderChartUIComponent(){let e=this.getModel(this.selectedChartId),i=e?.layer,t=null;if(e!==void 0&&!this.disableEditing)switch(e?.chartType){case o.BarSeries:t=n`<arcgis-charts-config-bar-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-bar-chart>`;break;case o.LineSeries:t=n`<arcgis-charts-config-line-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-line-chart>`;break;case o.PieSeries:t=n`<arcgis-charts-config-pie-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .chartData=${this.chartData} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor} .filterBySelection=${this.filterBySelection}></arcgis-charts-config-pie-chart>`;break;case o.HistogramSeries:t=n`<arcgis-charts-config-histogram class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .chartData=${this.chartData} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-histogram>`;break;case o.ScatterSeries:t=n`<arcgis-charts-config-scatter-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .r2=${this.r2} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-scatter-plot>`;break;case o.BoxPlotSeries:t=n`<arcgis-charts-config-box-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-box-plot>`;break;case o.HeatSeries:t=n`<arcgis-charts-config-heat-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data}></arcgis-charts-config-heat-chart>`;break}return t}};z("arcgis-charts-config-create-flow",F);return F},"intl",a,b,d,e,g,i,j,l,m,p,q,r,s,t,u)
2
+ import u from"./PK5XIIZY.js";import{a as ae}from"./L7CMLBHB.js";import{a as ie}from"./VOTZAPI3.js";import{a as k}from"./JNNB2DIA.js";import{a as se}from"./IHO3OLL3.js";import t from"./OLV642SY.js";import{a as f}from"./IVLVCLDE.js";import{a as $,b as W,e as ee}from"./OBPAQN4H.js";import s from"./VDG54AIC.js";import{d as c}from"./AK7X7SGI.js";import{a as P}from"./MRTKZZTF.js";import r from"./RMYZGOBM.js";import q from"./FDXE5JLT.js";import p from"./TAI4RIWT.js";import m from"./5XTB2INB.js";import l from"./WEQBZOH7.js";import j from"./MF3FGXHI.js";import i from"./26FWESH3.js";import{b as B,c as L,i as Y,l as w,p as D}from"./THTYR6IL.js";import g from"./2K4ODNJ4.js";import"./Y7HBWU3M.js";import e from"./N5ERJZPG.js";import d from"./CJ4POAPM.js";import b from"./JHYH555K.js";import"./WNKDEOFZ.js";import a from"./5FMEOIBS.js";import{d as M,e as X}from"./EZV7JSQJ.js";import{C as v,c as R,q as x}from"./LRNADJJG.js";import"./PAIRUVLU.js";import"./KX7KGXKQ.js";import{l as T}from"./SP2IPHWF.js";import"./NZR4L5AA.js";import{a as J}from"./64ZMYZ2S.js";import"./KDJ5RVHA.js";import"./QP5UAIC6.js";import"./XJFVSX2E.js";import{a as o,k as H}from"./547RDEMV.js";import{A as _,B as h,C as U,E as S,G as z,g as N,i as n,n as C,y as A,z as V}from"./CHQDKVVQ.js";import"./U67P6YAZ.js";export default $arcgis.t(([{substitute:le},{Ga:O,Jb:K,eb:G,hb:Z,jc:j},,,,,{b:I},,{a:Q},,,,,{r:te},{e:y,f:q},{b:E}])=>{var d={chartUIComponent:"chart-ui-component",tabBar:"tab-bar",tab:"tab"};function re(m,e){let i=new Set,t=e;return m?.forEach((a,s)=>{let r=a.chartId;(i.has(r)||r===void 0||r==="")&&(a.chartId=`Chart_${Date.now()}_${s}`,e===r&&(t=a.chartId)),i.add(r)}),t}function ce(m,e,i){return m?.filter(t=>x(i,t.config)&&t.layer?.id===e)??[]}function ne(m){let{modelList:e,layerList:i,activeLayerId:t,disableEditing:a}=m,s=new Map;return e?.forEach(r=>{let l=r.layer;l&&s.set(l.id,l)}),a||i.forEach(r=>s.set(r.id,r)),Array.from(s.values()).filter(r=>!t||r.id===t)}function he(m,e){m.forEach(i=>{e.forEach(t=>{i?.id===t.layer?.id&&oe(i,t)})})}function oe(m,e){let i=m;if(i){let t=[...i?.charts??[]],a=t?.findIndex(r=>r.id===e.chartId),s=!1;a!==void 0&&a>-1?(s=!T(t[a],e.config),t[a]=e.config):i&&!I(e.config)&&(s=!0,t.push(e.config)),s&&(i.charts=t)}}function de(m,e){let i=m;if(i){let t=[...i.charts??[]],a=t.findIndex(s=>s.id===e);a>-1&&(t.splice(a,1),i.charts=t)}}function me(m,e){let i=m;if(i){let t=[...i.charts??[]];t=v({arrayA:t,arrayB:e.map(a=>a.config),getKey:a=>a.id??a.title?.content.text??""}),i.charts=t}}var pe=N`:host{display:flex;flex-direction:column;flex:1 1 auto;overflow:hidden;height:inherit;max-height:100%}.chart-ui-component{overflow-y:auto;overflow-x:hidden}.label{display:flex;margin-left:1rem;margin-bottom:.5rem;justify-content:space-between}.text{display:flex;margin-left:1rem;width:calc(100% - 1.5rem);height:2rem;margin-bottom:.5rem;justify-content:space-between}.field-list{max-height:50vh;overflow-y:scroll}.row{padding:.5rem}.bin-count-container{display:flex;width:calc(100% - 1rem);padding:.5rem}.bin-count-slider{margin-left:1rem;width:calc(90% - 1rem)}.bin-count-input{margin-left:1rem;height:2rem;width:2rem}.bin-row{padding:.5rem 0 .5rem .5rem}.tab-bar{display:flex}.tab{flex:1;height:2.5rem}`,F=class extends _{constructor(){super(),this.selectChartTypePopover=null,this.chartsListFlowItem=A(),this.supportedChartTypes=[o.BarSeries,o.BoxPlotSeries,o.LineSeries,o.PieSeries,o.HistogramSeries,o.ScatterSeries,o.HeatSeries],this._messages=P(),this.commonStrings=P({name:"common",blocking:!0}),this.chartDataProcessComplete=e=>{let i=e,{chartData:t,model:a}=i.detail,s=this.getModel(this.selectedChartId);if(a?.isSameChartAs(s))switch(s?.chartType){case o.HistogramSeries:if(this.chartData=t,a&&(a.dataStore.chartData=t,X(a.layer))){let r=a,l=t?.bins?.length;l!==void 0&&r.binCount!==l&&(r.binCount=l)}break;case o.PieSeries:{this.chartData=t,a&&(a.dataStore.chartData=t);break}case o.ScatterSeries:{let r=t,{dataItems:l,r2:g,aggregated:u}=r,p=g;Number.isFinite(g)||(p=void 0),this.r2=p,Y(a)&&(a.dataStore.r2=p,a.dataStore.aggregated=u,u&&(a.additionalTooltipField=void 0)),this.calculatedDataMinMaxBounds=this.getDataExtent(l),a&&(a.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}case o.LineSeries:case o.BarSeries:{let{dataItems:r,timeIntervalInfo:l}=t;if((L(s)||B(s)&&s.binTemporalData)&&(l?.size!==void 0&&s.temporalBinningSize!==l?.size&&(s.temporalBinningSize=l?.size),l?.unit!==void 0&&s.temporalBinningUnit!==l?.unit&&l?.unit!==H.Quarter&&(s.temporalBinningUnit=l?.unit),l?.size!==void 0&&l?.unit!==void 0&&ee($,{size:l.size,unit:l.unit})),this.calculatedDataMinMaxBounds=this.getDataExtent(r),a&&(a.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds),B(s)){let g=s.xAxisField,u=r.some(b=>b[g]===null),p=s.nullCategory;u&&p===void 0&&(s.nullCategory=R.nullCategory)}break}}},this.chartAxesMinMaxChange=e=>{let i=e,{bounds:t,model:a}=i.detail,s=this.getModel(this.selectedChartId),r=a?.isSameChartAs(s),l=s?.chartType;if(r)switch(l){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:case o.ScatterSeries:this.calculatedMinMaxBounds=t,a&&(a.dataStore.calculatedMinMaxBounds=t),this.updateAxesBoundsInAppState(t);break}},this.chartSeriesColorChange=e=>{let i=e,{data:t,model:a}=i.detail,s=this.getModel(this.selectedChartId);if(a?.isSameChartAs(s))switch(s?.chartType){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:this.seriesColor=t,a&&(a.dataStore.seriesColor=t);break;case o.PieSeries:{let r=new Map([[0,t]]);this.seriesColor=r,a&&(a.dataStore.seriesColor=r);break}case o.ScatterSeries:}},this.chartNoRenderPropChange=e=>{let i=e,{propName:t,value:a,model:s}=i.detail,r=this.modelList.find(l=>s?.isSameChartAs(l));if(r)switch(t){case"rotation":typeof a=="boolean"&&Q(r)&&(r.rotated=a);break;case"legendPosition":typeof a=="string"&&D(r)&&(r.legendPosition=a);break;case"legendVisibility":typeof a=="boolean"&&D(r)&&(r.legendVisibility=a);break}},this.chartLegendItemVisibilityChange=e=>{let i=e,{legendItemVisibility:t,model:a}=i.detail,s=this.modelList.find(r=>a?.isSameChartAs(r));s?.setSeriesVisibility(t),w(s)&&((s.getMinBound(1)===null||Number.isNaN(s.getMinBound(1)))&&s.setMinBound(null,1),(s.getMaxBound(1)===null||Number.isNaN(s.getMaxBound(1)))&&s.setMaxBound(null,1),L(s)&&((s.getMinBound(0)===null||Number.isNaN(s.getMinBound(0)))&&s.setMinBound(null,0),(s.getMaxBound(0)===null||Number.isNaN(s.getMaxBound(0)))&&s.setMaxBound(null,0)))},this.onSelectChartTypeChange=e=>{this.currentChartTypeText="",this.calculatedDataMinMaxBounds=void 0,this.calculatedMinMaxBounds=void 0,this.removeSelectChartTypePopover();let{selectedModelType:i,layerId:t}=e.target;i!==void 0&&(this.allowChartSyncing=!0,this.arcgisChartsConfigNewChart.emit({key:"key",chartType:i,layerId:t}))},this.onAddChartClose=()=>{this.removeSelectChartTypePopover()},this.onModelConfigChange=e=>{if(this.syncChartsToLayers&&this.allowChartSyncing){let i=e.target;oe(i?.layer,i)}this.requestUpdate()},this.allowChartSyncing=!1,this.currentChartTypeText="",this.modelList=[],this.layerList=[],this.disableEditing=!1,this.syncChartsToLayers=!1,this.close=!1,this.usePopupTemplateFieldsInfo=!1,this.panelNumber=0,this.filterBySelection=!1,this.arcgisChartsConfigChartViewChartClose=C(),this.arcgisChartsConfigModelListChange=C(),this.arcgisChartsConfigNewChart=C(),this.arcgisChartsConfigPanelNumberChange=C(),this.arcgisChartsConfigSelectedChartChange=C(),this.addChartEventListeners(),this.listen("arcgisChartsConfigModelListReorder",this.modelListReorderChangeListener)}static{this.properties={selectedPanel:16,currentChartTypeText:16,messageOverrides:0,modelList:[0,{hasChanged:y}],layerList:[0,{hasChanged:y}],selectedChartId:1,activeLayerId:1,disableEditing:5,syncChartsToLayers:5,timeZone:1,headerTitle:1,close:5,chartData:[0,{hasChanged:y}],r2:9,calculatedDataMinMaxBounds:[0,{hasChanged:y}],calculatedMinMaxBounds:[0,{hasChanged:y}],seriesColor:[0,{hasChanged:q}],popoverPlacement:1,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5,panelNumber:9,filterBySelection:5}}static{this.styles=pe}async setFocus(){await this.chartsListFlowItem.value?.setFocus()}async load(){await this.layerListChange();let e=this.getModel(this.selectedChartId);this.setEventBasedPropsFromModelData(e)}willUpdate(e){e.has("layerList")&&this.layerListChange(),e.has("panelNumber")&&this.panelNumberChange(this.panelNumber),e.has("modelList")&&this.modelListChange(this.modelList,e.get("modelList")),e.has("selectedChartId")&&this.selectedChartIdChange(this.selectedChartId)}disconnectedCallback(){super.disconnectedCallback(),this.clearPartialModels(),this.removeSelectChartTypePopover()}modelListReorderChangeListener(e){let{modelList:i}=e.detail;if(this.modelList=v({arrayA:this.modelList,arrayB:i,getKey:t=>t.chartId??t.titleText??""}),this.syncChartsToLayers){let t=i.find(a=>a.layer?.id!==void 0)?.layer?.id;if(t){let a=this.layerList.find(s=>s.id.toString()===t);a&&me(a,i)}}}async layerListChange(){let e=[],i=this.layerList.map(a=>a.id.toString()),t=[...this.modelList.filter(a=>i.includes(a.layer?.id??""))];for(let a of this.layerList??[]){if(a.type==="sublayer"){let r=await a.createFeatureLayer();if(!r)continue;a=r}let s=a.charts;for(let r of s??[]){let l=await J({layer:a,config:r,commonStrings:this.commonStrings});l!==void 0&&e.push(l)}}re(e),e.forEach(a=>{t.find(s=>s.isSameChartAs(a))===void 0&&t.push(a)}),t=t.filter(a=>!K(a.config)),this.modelList=t}modelListChange(e,i){this.selectedChartId=re(e,this.selectedChartId),i?.forEach(a=>{a.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}),e.forEach(a=>{a.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)});let t=this.getModel(this.selectedChartId);this.currentChartTypeText=t?.chartType!==void 0?E({chartType:t.chartType,commonStrings:this.commonStrings,config:t.config}):"",this.syncChartsToLayers&&this.allowChartSyncing&&he(this.layerList,e),this.arcgisChartsConfigModelListChange.emit({modelList:e})}selectedChartIdChange(e){this.selectedChartId===void 0&&(this.panelNumber=0),this.selectedPanel=c.Data;let i=this.getModel(e);this.setEventBasedPropsFromModelData(i),this.currentChartTypeText=i?.chartType!==void 0?E({chartType:i.chartType,commonStrings:this.commonStrings,config:i.config}):"",e!==void 0&&e!==$.selectedChartId&&($.selectedChartId=e),this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:i})}panelNumberChange(e){e===0?this.clearPartialModels():e===1&&this.removeSelectChartTypePopover(),this.arcgisChartsConfigPanelNumberChange.emit({panelNumber:e,modelList:this.modelList})}addChartEventListeners(){this.listenOn(document,f.DataProcessComplete,this.chartDataProcessComplete),this.listenOn(document,f.AxesMinMaxChange,this.chartAxesMinMaxChange),this.listenOn(document,f.SeriesColorChange,this.chartSeriesColorChange),this.listenOn(document,f.NoRenderPropChange,this.chartNoRenderPropChange),this.listenOn(document,f.LegendItemVisibilityChange,this.chartLegendItemVisibilityChange)}getDataExtent(e){let i=this.getModel(this.selectedChartId)?.config,t=[];if(i!==void 0&&e!==void 0){let a=j({chartConfig:i,chartData:e}),{minY:s,maxY:r,minX:l,maxX:g}=a;t=[{isXAxis:!0,minimum:l,maximum:g},{isXAxis:!1,minimum:s,maximum:r}]}return t}updateAxesBoundsInAppState(e){e?.forEach(i=>{let{isXAxis:t,maximum:a,minimum:s}=i,r=this.getModel(this.selectedChartId);if(r!==void 0&&w(r)&&this.selectedChartId!==void 0){let l=new ae(r,t),g=W({chartId:this.selectedChartId,isXAxis:t,isLogarithmic:l.getLogarithmic()}),u=$.chartAxesBoundDataMap;u[this.selectedChartId]===void 0&&(u[this.selectedChartId]={});let p=u[this.selectedChartId]?.[g],b={defaultMinBound:p?.defaultMinBound===p?.currMinBound?s:p?.defaultMinBound,currMinBound:s,defaultMaxBound:p?.defaultMaxBound===p?.currMaxBound?a:p?.defaultMaxBound,currMaxBound:a};!T(p,b)&&this.selectedChartId!==void 0&&u?.[this.selectedChartId]!==void 0&&(u[this.selectedChartId][g]=b)}})}getPlacement(){let e;return this.popoverPlacement!==void 0?e=this.popoverPlacement:e=this.modelList?.filter(i=>x(O,i.config)).length<=2?"bottom":"top",e}onBackFlow(){this.panelNumber-=1}async onAddChartClick(e){let{referenceElement:i,layerId:t,layerType:a}=e.detail,s=!0;if(M(a)&&t){let r=this.layerList.find(l=>l.id===t);M(r?.type)&&(s=!!(await Z(r))?.attributeTable)}this.setupSelectChartTypePopover(i,t,a,s)}setupSelectChartTypePopover(e,i,t,a=!0){let s=this.getPlacement();this.removeSelectChartTypePopover(),this.selectChartTypePopover=S(n`<arcgis-charts-config-select-chart-type-popover .referenceElement=${e} open .layerId=${i} .layerType=${t} .isRasterBarChartSupported=${a} .popoverPlacement=${s} @arcgisChartsConfigPopoverClose=${this.onAddChartClose} @arcgisChartsConfigSelectChartTypeChange=${this.onSelectChartTypeChange}></arcgis-charts-config-select-chart-type-popover>`),!document.body.contains(this.selectChartTypePopover)&&this.selectChartTypePopover!==null&&document.body.appendChild(this.selectChartTypePopover)}getModel(e){return this.modelList?.find(i=>i.chartId===e)}removeSelectChartTypePopover(){this.selectChartTypePopover!==void 0&&(this.selectChartTypePopover?.remove(),this.selectChartTypePopover=se(this.selectChartTypePopover))}clearPartialModels(){this.modelList=this.modelList.filter(e=>!I(e.config))}onViewChartDelete(e){let{chartId:i}=e.detail;if(i!==void 0){let t=this.modelList.find(s=>s.chartId===i),a=this.layerList.find(s=>s.id===t?.layer?.id);this.modelList=[...this.modelList.filter(s=>s.chartId!==i)],a&&this.syncChartsToLayers&&this.allowChartSyncing&&de(a,i)}}onViewChartsSelect(e){this.selectedChartId===e.detail.chartId&&(this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:this.getModel(this.selectedChartId)})),this.selectedChartId=e.detail.chartId}onViewChartsEdit(e){this.onViewChartsSelect(e),this.panelNumber=1}onViewChartClose(){this.close=!0,this.removeSelectChartTypePopover(),this.arcgisChartsConfigChartViewChartClose.emit()}setEventBasedPropsFromModelData(e){this.chartData=e?.dataStore.chartData,this.r2=e?.dataStore.r2,this.seriesColor=e?.dataStore.seriesColor,this.calculatedMinMaxBounds=e?.dataStore.calculatedMinMaxBounds,this.calculatedDataMinMaxBounds=e?.dataStore.calculatedDataMinMaxBounds}createTooltip(e){let i=e.target,t="";switch(i.icon){case"configure":t=this._messages.data??"";break;case"graph-bar-stacked":case"graph-line-series":case"box-chart-series":t=this._messages.series??"";break;case"graph-pie-slice":t=this._messages.slices??"";break;case"graph-axis":t=this._messages.axes??"";break;case"graph-guides":t=this._messages.guides??"";break;case"palette":t=this._messages.format??"";break;case"text":t=this._messages.general??"";break;default:t="";break}this.tooltip=S(n`<calcite-tooltip style=${U({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${i} open placement=top>${t}</calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){te(this.tooltip)}renderViewCharts(){let e=ne({modelList:this.modelList,layerList:this.layerList,activeLayerId:this.activeLayerId,disableEditing:this.disableEditing});return ie(e,i=>i.id,i=>n`<arcgis-charts-config-view-charts .noGroup=${this.activeLayerId!==void 0} .modelList=${ce(this.modelList,i.id.toString(),M(i.type)?G:this.supportedChartTypes)} .selectedChartId=${this.selectedChartId??""} .layer=${i} .disableEditing=${this.disableEditing} @arcgisChartsConfigViewChartSelect=${this.onViewChartsSelect} @arcgisChartsConfigViewChartEdit=${this.onViewChartsEdit} @arcgisChartsConfigViewChartDelete=${this.onViewChartDelete} @arcgisChartsConfigViewChartAddChart=${this.onAddChartClick}></arcgis-charts-config-view-charts>`)}render(){return this.close?null:n`<calcite-flow>${k("charts-list",n`<calcite-flow-item .selected=${this.panelNumber===0||this.disableEditing} .heading=${this.headerTitle??this._messages.defaultHeaderTitle} closable @calciteFlowItemClose=${this.onViewChartClose} ${V(this.chartsListFlowItem)}>${this.renderViewCharts()}</calcite-flow-item>`)}${this.panelNumber>=1&&!this.disableEditing?this.renderTabs():null}</calcite-flow>`}renderTabs(){let e=this.getModel(this.selectedChartId);return k("chart-edit",n`<calcite-flow-item .selected=${this.panelNumber>=1&&!this.disableEditing} @calciteFlowItemBack=${this.onBackFlow} .heading=${this._messages[this.selectedPanel??c.Data]} .description=${this.currentChartTypeText!==""&&this._messages.pageFlowTitle!==void 0?le(this._messages.pageFlowTitle,{chartName:e?.titleText??this.currentChartTypeText,layerName:e?.layer?.title??""}):""}>${e?.chartType!==void 0?n`<calcite-action-bar class=${h(d.tabBar)} layout=horizontal expand-disabled><calcite-action class=${h(d.tab)} icon=configure scale=s alignment=center .active=${this.selectedPanel===c.Data||this.selectedPanel===void 0} @click=${()=>{this.selectedPanel=c.Data}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>${e?.chartType===o.BarSeries?n`<calcite-action class=${h(d.tab)} icon=graph-bar-stacked scale=s alignment=center .active=${this.selectedPanel===c.Series} @click=${()=>{this.selectedPanel=c.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.LineSeries?n`<calcite-action class=${h(d.tab)} icon=graph-line-series scale=s alignment=center .active=${this.selectedPanel===c.Series} @click=${()=>{this.selectedPanel=c.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.BoxPlotSeries?n`<calcite-action class=${h(d.tab)} icon=box-chart-series scale=s alignment=center .active=${this.selectedPanel===c.Series} @click=${()=>{this.selectedPanel=c.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.PieSeries?n`<calcite-action class=${h(d.tab)} icon=graph-pie-slice scale=s alignment=center .active=${this.selectedPanel===c.Slices} @click=${()=>{this.selectedPanel=c.Slices}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?n`<calcite-action class=${h(d.tab)} icon=graph-axis scale=s alignment=center .active=${this.selectedPanel===c.Axes} @click=${()=>{this.selectedPanel=c.Axes}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?n`<calcite-action class=${h(d.tab)} icon=graph-guides scale=s alignment=center .active=${this.selectedPanel===c.Guides} @click=${()=>{this.selectedPanel=c.Guides}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}<calcite-action class=${h(d.tab)} icon=palette scale=s alignment=center .active=${this.selectedPanel===c.Format} @click=${()=>{this.selectedPanel=c.Format}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action><calcite-action class=${h(d.tab)} icon=text scale=s alignment=center .active=${this.selectedPanel===c.General} @click=${()=>{this.selectedPanel=c.General}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action></calcite-action-bar>`:null}${this.renderChartUIComponent()}</calcite-flow-item>`)}renderChartUIComponent(){let e=this.getModel(this.selectedChartId),i=e?.layer,t=null;if(e!==void 0&&!this.disableEditing)switch(e?.chartType){case o.BarSeries:t=n`<arcgis-charts-config-bar-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-bar-chart>`;break;case o.LineSeries:t=n`<arcgis-charts-config-line-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-line-chart>`;break;case o.PieSeries:t=n`<arcgis-charts-config-pie-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .chartData=${this.chartData} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor} .filterBySelection=${this.filterBySelection}></arcgis-charts-config-pie-chart>`;break;case o.HistogramSeries:t=n`<arcgis-charts-config-histogram class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .chartData=${this.chartData} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-histogram>`;break;case o.ScatterSeries:t=n`<arcgis-charts-config-scatter-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .r2=${this.r2} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-scatter-plot>`;break;case o.BoxPlotSeries:t=n`<arcgis-charts-config-box-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-box-plot>`;break;case o.HeatSeries:t=n`<arcgis-charts-config-heat-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??c.Data}></arcgis-charts-config-heat-chart>`;break}return t}};z("arcgis-charts-config-create-flow",F);return F},"intl",a,b,d,e,g,i,j,l,m,p,q,r,s,t,u)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as b,b as L,c as _,d as O}from"./WPPMMVD5.js";import x from"./TU3UF32Y.js";import w from"./HCV34H6X.js";import v from"./WO6JBNMU.js";import u from"./WEQBZOH7.js";import t from"./MF3FGXHI.js";import s from"./RAQZUMC6.js";import r from"./PVJEBBA7.js";import q from"./YRBE7MBU.js";import o from"./26FWESH3.js";import n from"./U4XLNCOU.js";import k from"./PZGIXDMC.js";import j from"./KI4HS3AM.js";import i from"./5G7DSKI7.js";import"./THTYR6IL.js";import h from"./ZRZEKOEF.js";import f from"./2K4ODNJ4.js";import"./Y7HBWU3M.js";import e from"./N5ERJZPG.js";import d from"./CJ4POAPM.js";import c from"./JHYH555K.js";import"./WNKDEOFZ.js";import a from"./5FMEOIBS.js";import"./EZV7JSQJ.js";import"./LRNADJJG.js";import{ba as S,i as g,ia as p,y as m}from"./PAIRUVLU.js";import"./KX7KGXKQ.js";import"./SP2IPHWF.js";import"./NZR4L5AA.js";import"./KDJ5RVHA.js";import"./QP5UAIC6.js";import"./XJFVSX2E.js";import{a as l}from"./547RDEMV.js";import"./CHQDKVVQ.js";import"./U67P6YAZ.js";export default $arcgis.t(([{ob:a},,,{c:n},,,,,,,,,,,{c:y},,{qa:d},,{b:u,c:v,d:I}])=>{var B=Object.defineProperty,F=Object.getOwnPropertyDescriptor,f=(c,e,t,r)=>{for(var i=F(e,t),s=c.length-1,h;s>=0;s--)(h=c[s])&&(i=h(e,t,i)||i);return i&&B(e,t,i),i},o=class extends I{constructor(){super(...arguments),this._chartType=l.BarSeries}async setup(e){await this.loadConfigFromLayer(e),this.setupLocalProps(),e.config!==void 0&&this.updateSeriesFromLayerFilter(),typeof this.resolveSetup=="function"&&this.resolveSetup()}generateDefaultConfig(){let e=p(this.commonStrings);return e.series=[S({objectIDField:a(this.layerInfo.layer).idField,commonStrings:this.commonStrings})],e}getSeriesHideOversizedSideBySideLabels(e){return b(e,this._config)}setSeriesHideOversizedSideBySideLabels(e,t){L(e,t,this._config)}getSeriesHideOversizedStackedLabels(e){return _(e,this._config)}setSeriesHideOversizedStackedLabels(e,t){O(e,t,this._config)}getSortOrder(){return y(this._config)}resetSeriesStyling(){for(let e=0;e<this.seriesLength;e+=1){let t=this.getSeriesId(e),r=m({colorIndex:e,opacity:g});if(v(r,e,this._config),this.layerInfo!==void 0){let i=d({config:this._config,seriesIndex:e,layerInfo:this.layerInfo,commonStrings:this.commonStrings});i!==a(this.layerInfo.layer).idField&&u(i??t,e,this._config)}}this._config.colorMatch=!0}resetAvailable(){let e=!this.colorMatch,t=!1;if(!e&&this.layerInfo!==void 0)for(let r=0;r<this.seriesLength;r+=1){let i=d({config:this._config,seriesIndex:r,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),s=this.getSeriesName(r);if(i!==void 0&&i!==a(this.layerInfo.layer).idField&&i!==s){t=!0;break}}return e||t}};f([n],o.prototype,"setSeriesHideOversizedSideBySideLabels");f([n],o.prototype,"setSeriesHideOversizedStackedLabels");f([n],o.prototype,"resetSeriesStyling");return o},a,c,d,e,f,h,i,j,k,n,o,q,r,s,t,u,v,w,x)
2
+ import{a as b,b as L,c as _,d as O}from"./WPPMMVD5.js";import x from"./7CN6J33C.js";import w from"./HCV34H6X.js";import v from"./5XTB2INB.js";import u from"./WEQBZOH7.js";import t from"./MF3FGXHI.js";import s from"./RAQZUMC6.js";import r from"./PVJEBBA7.js";import q from"./YRBE7MBU.js";import o from"./26FWESH3.js";import n from"./U4XLNCOU.js";import k from"./PZGIXDMC.js";import j from"./KI4HS3AM.js";import i from"./5G7DSKI7.js";import"./THTYR6IL.js";import h from"./ZRZEKOEF.js";import f from"./2K4ODNJ4.js";import"./Y7HBWU3M.js";import e from"./N5ERJZPG.js";import d from"./CJ4POAPM.js";import c from"./JHYH555K.js";import"./WNKDEOFZ.js";import a from"./5FMEOIBS.js";import"./EZV7JSQJ.js";import"./LRNADJJG.js";import{ba as S,i as g,ia as p,y as m}from"./PAIRUVLU.js";import"./KX7KGXKQ.js";import"./SP2IPHWF.js";import"./NZR4L5AA.js";import"./KDJ5RVHA.js";import"./QP5UAIC6.js";import"./XJFVSX2E.js";import{a as l}from"./547RDEMV.js";import"./CHQDKVVQ.js";import"./U67P6YAZ.js";export default $arcgis.t(([{ob:a},,,{c:n},,,,,,,,,,,{c:y},,{qa:d},,{b:u,c:v,d:I}])=>{var B=Object.defineProperty,F=Object.getOwnPropertyDescriptor,f=(c,e,t,r)=>{for(var i=F(e,t),s=c.length-1,h;s>=0;s--)(h=c[s])&&(i=h(e,t,i)||i);return i&&B(e,t,i),i},o=class extends I{constructor(){super(...arguments),this._chartType=l.BarSeries}async setup(e){await this.loadConfigFromLayer(e),this.setupLocalProps(),e.config!==void 0&&this.updateSeriesFromLayerFilter(),typeof this.resolveSetup=="function"&&this.resolveSetup()}generateDefaultConfig(){let e=p(this.commonStrings);return e.series=[S({objectIDField:a(this.layerInfo.layer).idField,commonStrings:this.commonStrings})],e}getSeriesHideOversizedSideBySideLabels(e){return b(e,this._config)}setSeriesHideOversizedSideBySideLabels(e,t){L(e,t,this._config)}getSeriesHideOversizedStackedLabels(e){return _(e,this._config)}setSeriesHideOversizedStackedLabels(e,t){O(e,t,this._config)}getSortOrder(){return y(this._config)}resetSeriesStyling(){for(let e=0;e<this.seriesLength;e+=1){let t=this.getSeriesId(e),r=m({colorIndex:e,opacity:g});if(v(r,e,this._config),this.layerInfo!==void 0){let i=d({config:this._config,seriesIndex:e,layerInfo:this.layerInfo,commonStrings:this.commonStrings});i!==a(this.layerInfo.layer).idField&&u(i??t,e,this._config)}}this._config.colorMatch=!0}resetAvailable(){let e=!this.colorMatch,t=!1;if(!e&&this.layerInfo!==void 0)for(let r=0;r<this.seriesLength;r+=1){let i=d({config:this._config,seriesIndex:r,layerInfo:this.layerInfo,commonStrings:this.commonStrings}),s=this.getSeriesName(r);if(i!==void 0&&i!==a(this.layerInfo.layer).idField&&i!==s){t=!0;break}}return e||t}};f([n],o.prototype,"setSeriesHideOversizedSideBySideLabels");f([n],o.prototype,"setSeriesHideOversizedStackedLabels");f([n],o.prototype,"resetSeriesStyling");return o},a,c,d,e,f,h,i,j,k,n,o,q,r,s,t,u,v,w,x)
@@ -1,4 +1,4 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{i as ye}from"./IVLVCLDE.js";import{c as R}from"./AK7X7SGI.js";import g from"./RMYZGOBM.js";import f from"./FDXE5JLT.js";import e from"./TAI4RIWT.js";import d from"./WO6JBNMU.js";import c from"./MF3FGXHI.js";import b from"./2K4ODNJ4.js";import a from"./5FMEOIBS.js";import{c as O,d as m,r as $}from"./LRNADJJG.js";import{Ba as re,Ca as j,Ea as h,Fa as ie,p as C,q as N}from"./PAIRUVLU.js";import{a as oe}from"./KX7KGXKQ.js";import{e as p,l as te,m as T,s as Z}from"./SP2IPHWF.js";import{e as z}from"./QP5UAIC6.js";import{a as ae}from"./XJFVSX2E.js";import{a as B,l as D}from"./547RDEMV.js";export default $arcgis.t(([{B:S,J:le,T:M,ec:V,ob:ne,qb:se},{c:G},{f:ue,g:U},{ka:K,la:be,ma:Q},{k:Y,l:E,m:J,x:fe},{b:ce},{a:me,c:de,d:ge}])=>{function Le(l){let{hour:e,minute:t=0,format:i,locale:r="en-US"}=l,o=i&&Object.keys(i).length>0?i:{hour:"numeric",minute:"2-digit",hour12:!1},a=e.toString();if(Number.isInteger(e)&&e>=0&&e<=23&&Number.isInteger(t)&&t>=0&&t<=59){let u=new Date(2e3,0,1,e,t);a=new Intl.DateTimeFormat(r,o).format(u),a.includes(":")||a.startsWith("0")&&(a=a.slice(1))}return a}function ve(l){let{weekdayNumber:e,format:t,locale:i="en-US",firstDayOfWeek:r=7}=l,o=t&&Object.keys(t).length>0?t:{weekday:"long"},a=e.toString();if(Number.isInteger(e)&&e>0&&e<=7&&Number.isInteger(r)&&r>0&&r<=7){let u=(e+r-1)%7,f=new Date(2e3,0,2+u);a=new Intl.DateTimeFormat(i,o).format(f)}return a}function Ae(l){let{monthNumber:e,format:t,locale:i="en-US"}=l,r=t&&Object.keys(t).length>0?t:{month:"long"},o=e.toString();if(Number.isInteger(e)&&e>0&&e<=12){let a=new Date(2e3,e-1);o=new Intl.DateTimeFormat(i,r).format(a)}return o}function xe(l){let{value:e,formatLocale:t,unit:i,config:r,utilsStrings:o}=l,a={label:"",value:e.toString()};switch(i){case D.DayOfWeek:a={label:o.heatChartCalendarDatePartsUnits.dayOfWeek,value:ve({weekdayNumber:e,firstDayOfWeek:"firstDayOfWeek"in r?r.firstDayOfWeek:ie,locale:t})};break;case D.MonthOfYear:a={label:o.heatChartCalendarDatePartsUnits.monthOfYear,value:Ae({monthNumber:e,locale:t})};break;case D.HourOfDay:a={label:o.heatChartCalendarDatePartsUnits.hourOfDay,value:Le({hour:e,format:{hour:"numeric",hour12:!1},locale:t})};break;case D.DayOfMonth:a={label:o.heatChartCalendarDatePartsUnits.dayOfMonth,value:typeof e=="string"?e:e?.toString()??""};break;case D.DayOfYear:a={label:o.heatChartCalendarDatePartsUnits.dayOfYear,value:typeof e=="string"?e:e?.toString()??""};break;case D.MinuteOfDay:a={label:o.heatChartCalendarDatePartsUnits.minuteOfDay,value:typeof e=="string"?e:e?.toString()??""};break;case D.WeekOfYear:a={label:o.heatChartCalendarDatePartsUnits.weekOfYear,value:typeof e=="string"?e:e?.toString()??""};break;case D.QuarterOfYear:a={label:o.heatChartCalendarDatePartsUnits.quarterOfYear,value:typeof e=="string"?e:e?.toString()??""};break}return a}function Se(l,e){return!te(l,e)}function Qe(l,e){return Se(l,e)||l!==e}function Pe(l){return(new Intl.NumberFormat(l,{minimumFractionDigits:1,maximumFractionDigits:1}).formatToParts(1.1).find(e=>e.type==="decimal")?.value??".")==="."?",":";"}function De(l){return new Intl.NumberFormat(l,{minimumFractionDigits:1,maximumFractionDigits:1}).formatToParts(1.1).find(e=>e.type==="decimal")?.value??"."}var pe=l=>{let{value:e,quoteAll:t=!1,locale:i,roundDecimals:r}=l,o=e==null?"":String(e);if(e===null)o="null";else if(e===void 0)o="";else if(typeof e=="number"&&Number.isFinite(e)&&i!==void 0){let a=De(i),u=r??o.split(a)[1]?.length??2;o=new Intl.NumberFormat(i,{maximumFractionDigits:u}).format(e).replace(/\u202F/gu," ")}return(t||/[",\r\n]/u.test(o))&&(o=`"${o.replace(/"/gu,'""')}"`),o};function Xe(l,e={}){let{columns:t,delimiter:i,includeHeader:r=!0,quoteAll:o=!1,locale:a,roundDecimals:u}=e,f=l.length===0,n="";if(!f){let w=t??Object.keys(l[0]),F=[],x=i??Pe(a??"en");if(a!==void 0&&x!==","&&(n+=`sep=${x}\r
2
+ import{i as ye}from"./IVLVCLDE.js";import{c as R}from"./AK7X7SGI.js";import g from"./RMYZGOBM.js";import f from"./FDXE5JLT.js";import e from"./TAI4RIWT.js";import d from"./5XTB2INB.js";import c from"./MF3FGXHI.js";import b from"./2K4ODNJ4.js";import a from"./5FMEOIBS.js";import{c as O,d as m,r as $}from"./LRNADJJG.js";import{Ba as re,Ca as j,Ea as h,Fa as ie,p as C,q as N}from"./PAIRUVLU.js";import{a as oe}from"./KX7KGXKQ.js";import{e as p,l as te,m as T,s as Z}from"./SP2IPHWF.js";import{e as z}from"./QP5UAIC6.js";import{a as ae}from"./XJFVSX2E.js";import{a as B,l as D}from"./547RDEMV.js";export default $arcgis.t(([{B:S,J:le,T:M,ec:V,ob:ne,qb:se},{c:G},{f:ue,g:U},{ka:K,la:be,ma:Q},{k:Y,l:E,m:J,x:fe},{b:ce},{a:me,c:de,d:ge}])=>{function Le(l){let{hour:e,minute:t=0,format:i,locale:r="en-US"}=l,o=i&&Object.keys(i).length>0?i:{hour:"numeric",minute:"2-digit",hour12:!1},a=e.toString();if(Number.isInteger(e)&&e>=0&&e<=23&&Number.isInteger(t)&&t>=0&&t<=59){let u=new Date(2e3,0,1,e,t);a=new Intl.DateTimeFormat(r,o).format(u),a.includes(":")||a.startsWith("0")&&(a=a.slice(1))}return a}function ve(l){let{weekdayNumber:e,format:t,locale:i="en-US",firstDayOfWeek:r=7}=l,o=t&&Object.keys(t).length>0?t:{weekday:"long"},a=e.toString();if(Number.isInteger(e)&&e>0&&e<=7&&Number.isInteger(r)&&r>0&&r<=7){let u=(e+r-1)%7,f=new Date(2e3,0,2+u);a=new Intl.DateTimeFormat(i,o).format(f)}return a}function Ae(l){let{monthNumber:e,format:t,locale:i="en-US"}=l,r=t&&Object.keys(t).length>0?t:{month:"long"},o=e.toString();if(Number.isInteger(e)&&e>0&&e<=12){let a=new Date(2e3,e-1);o=new Intl.DateTimeFormat(i,r).format(a)}return o}function xe(l){let{value:e,formatLocale:t,unit:i,config:r,utilsStrings:o}=l,a={label:"",value:e.toString()};switch(i){case D.DayOfWeek:a={label:o.heatChartCalendarDatePartsUnits.dayOfWeek,value:ve({weekdayNumber:e,firstDayOfWeek:"firstDayOfWeek"in r?r.firstDayOfWeek:ie,locale:t})};break;case D.MonthOfYear:a={label:o.heatChartCalendarDatePartsUnits.monthOfYear,value:Ae({monthNumber:e,locale:t})};break;case D.HourOfDay:a={label:o.heatChartCalendarDatePartsUnits.hourOfDay,value:Le({hour:e,format:{hour:"numeric",hour12:!1},locale:t})};break;case D.DayOfMonth:a={label:o.heatChartCalendarDatePartsUnits.dayOfMonth,value:typeof e=="string"?e:e?.toString()??""};break;case D.DayOfYear:a={label:o.heatChartCalendarDatePartsUnits.dayOfYear,value:typeof e=="string"?e:e?.toString()??""};break;case D.MinuteOfDay:a={label:o.heatChartCalendarDatePartsUnits.minuteOfDay,value:typeof e=="string"?e:e?.toString()??""};break;case D.WeekOfYear:a={label:o.heatChartCalendarDatePartsUnits.weekOfYear,value:typeof e=="string"?e:e?.toString()??""};break;case D.QuarterOfYear:a={label:o.heatChartCalendarDatePartsUnits.quarterOfYear,value:typeof e=="string"?e:e?.toString()??""};break}return a}function Se(l,e){return!te(l,e)}function Qe(l,e){return Se(l,e)||l!==e}function Pe(l){return(new Intl.NumberFormat(l,{minimumFractionDigits:1,maximumFractionDigits:1}).formatToParts(1.1).find(e=>e.type==="decimal")?.value??".")==="."?",":";"}function De(l){return new Intl.NumberFormat(l,{minimumFractionDigits:1,maximumFractionDigits:1}).formatToParts(1.1).find(e=>e.type==="decimal")?.value??"."}var pe=l=>{let{value:e,quoteAll:t=!1,locale:i,roundDecimals:r}=l,o=e==null?"":String(e);if(e===null)o="null";else if(e===void 0)o="";else if(typeof e=="number"&&Number.isFinite(e)&&i!==void 0){let a=De(i),u=r??o.split(a)[1]?.length??2;o=new Intl.NumberFormat(i,{maximumFractionDigits:u}).format(e).replace(/\u202F/gu," ")}return(t||/[",\r\n]/u.test(o))&&(o=`"${o.replace(/"/gu,'""')}"`),o};function Xe(l,e={}){let{columns:t,delimiter:i,includeHeader:r=!0,quoteAll:o=!1,locale:a,roundDecimals:u}=e,f=l.length===0,n="";if(!f){let w=t??Object.keys(l[0]),F=[],x=i??Pe(a??"en");if(a!==void 0&&x!==","&&(n+=`sep=${x}\r
3
3
  `),r){let g=w.map(s=>pe({value:s,quoteAll:o,locale:a,roundDecimals:u}));F.push(g.join(x))}l.forEach(g=>{let s=w.map(c=>pe({value:g[c],quoteAll:o,locale:a,roundDecimals:u}));F.push(s.join(x))}),n+=F.join(`\r
4
4
  `)}return n}function et(l){let{rawData:e,config:t,layer:i,fieldList:r,formatters:o,formatLocale:a,utilsStrings:u}=l,f=[];if(t!==void 0&&Array.isArray(e)&&e.length>0){let n=ae(t?.series);n===B.HistogramSeries?f=Oe(t,e,o):n===B.HeatSeries?f=he({config:t,rows:e,layer:i,fieldList:r,formatLocale:a,utilsStrings:u}):n===B.BarSeries||n===B.LineSeries||n===B.ComboLineAndBarSeries?f=Ce({config:t,rows:e,layer:i,fieldList:r,formatters:o}):n===B.PieSeries?f=Me({config:t,rows:e,layer:i,fieldList:r,formatters:o}):n===B.BoxPlotSeries&&(f=Ie({config:t,rows:e,fieldList:r,formatters:o}))}return f}function v(l){let{value:e,originalValue:t,formatter:i}=l,r=e;return i!==void 0&&(e===null||e instanceof Date||typeof e=="number"||typeof e=="string")&&(r=i(e,t)),r}function k(l){let{field:e,row:t,fieldList:i,formatter:r}=l,o=Object.keys(t).find(f=>f.toLocaleLowerCase()===e.toLocaleLowerCase()),a=t[o??e],u;return a==null||typeof a=="boolean"||Array.isArray(a)?u=a:typeof a=="string"||typeof a=="number"||a instanceof Date?u=we({field:e,value:a,fieldList:i}):u=a,v({value:u,originalValue:a,formatter:r})}function X(l){let{config:e,seriesIndex:t,formatters:i}=l;return e.series?.[t]?.assignToSecondValueAxis===!0?i?.secondaryYAxisLabelFormatter:i?.yAxisLabelFormatter}function Be(l){let{config:e,splitValueIndex:t,formatters:i}=l;return e?.series?.[t]?.assignToSecondValueAxis===!0?i?.secondaryYAxisLabelFormatter:i?.yAxisLabelFormatter}function he(l){let{config:e,rows:t,layer:i,fieldList:r,formatLocale:o,utilsStrings:a}=l,[u]=e.series,f=u.x,n=K(e),w=Q(e),F=U({config:e,xAxisField:f,numericFields:w,aggregationType:n,layer:i,fieldList:r});return t.map(x=>{let g=x[N.xField],s=x[N.yField],c=x[N.valueField],d=typeof c=="number"&&Number.isFinite(c)?c.toFixed(2):c,b={label:u.x,value:g},y={label:u.y,value:s};if(u.xTemporalBinning!==void 0){let{label:L,value:A}=xe({value:Number(g),config:e,formatLocale:o,unit:u.xTemporalBinning.unit,utilsStrings:a});!$(L)&&!$(A)&&(b={label:L,value:A})}if(u.yTemporalBinning!==void 0){let{label:L,value:A}=xe({value:Number(s),config:e,formatLocale:o,unit:u.yTemporalBinning.unit,utilsStrings:a});!$(L)&&!$(A)&&(y={label:L,value:A})}return{[b.label]:b.value,[y.label]:y.value,[F.description]:d}})}function Oe(l,e,t){let i=ce(l),r=`${p(R.Min)} of ${i}`,o=`${p(R.Max)} of ${i}`,a=`${p(R.Count)} of ${i}`;return e.map(u=>{let{minValue:f,maxValue:n,count:w}=u,F=T(f),x=T(n),g=T(w),s={};if(F&&(s[r]=v({value:f,originalValue:f,formatter:t?.xAxisLabelFormatter})),x&&(s[o]=v({value:n,originalValue:n,formatter:t?.xAxisLabelFormatter})),F&&x){let c=v({value:f,originalValue:f,formatter:t?.xAxisLabelFormatter}),d=v({value:n,originalValue:n,formatter:t?.xAxisLabelFormatter});s.Label=`${String(c??"")} - ${String(d??"")}`}return g&&(s[a]=v({value:w,originalValue:w,formatter:t?.yAxisLabelFormatter})),s})}function ke(l,e,t){let i=Object.keys(l),r=[];return t?r=t.map(o=>i.find(a=>a.toLowerCase().includes(o.toLowerCase()))||""):r=i.filter(o=>o.toLowerCase().includes(e.toLowerCase())),r.filter(o=>o.trim()!=="")}function Ce(l){let{config:e,rows:t,layer:i,fieldList:r,formatters:o}=l,a=ue(e),u=K(e),f=p(u),n=Q(e),w=M(e.series),F=G(e),x=be(e),{idField:g,isTraditionalTypeOID:s}=ne(le(i)),c=s&&n.length===1&&n[0]===g,d;switch(w){case m.BarAndLineNoAggregation:d=t.map(b=>{let y=k({field:a,row:b,fieldList:r,formatter:o?.xAxisLabelFormatter}),L={[a]:y};return Object.assign(L,...n.map((A,P)=>({[A]:v({value:b[A],originalValue:b[A],formatter:X({config:e,seriesIndex:P,formatters:o})})}))),L});break;case m.BarAndLineFromFields:d=Z(n,t).map(([b,y])=>{let L=V(e.series)[0],A={};return y!==void 0&&b!==void 0&&(A.Field=v({value:y[a],originalValue:y[a],formatter:o?.xAxisLabelFormatter}),A.Value=v({value:y[L],originalValue:y[L],formatter:X({config:e,seriesIndex:0,formatters:o})})),A});break;case m.BarAndLineMonoField:case m.BarAndLineMultiFields:d=t.map(b=>{let y=k({field:a,row:b,fieldList:r,formatter:o?.xAxisLabelFormatter}),L={[a]:y};return n.forEach((A,P)=>{let W=U({config:e,xAxisField:a,numericFields:n,aggregationType:u,layer:i,numericFieldIndex:P,fieldList:r}),q=V(e.series)[P],ee=q,H=q;q.toLowerCase()===W.name.toLowerCase()&&(ee=W.description,H=W.name),L[ee]=v({value:b[H],originalValue:b[H],formatter:X({config:e,seriesIndex:P,formatters:o})})}),L});break;case m.BarAndLineSplitBy:d=t.flatMap(b=>{let y=V(e.series),L=k({field:a,row:b,fieldList:r,formatter:o?.xAxisLabelFormatter});return F.map((A,P)=>({[a]:L,[x]:A,[c?f:`${f} of ${n[0]}`]:v({value:b[y[P]],originalValue:b[y[P]],formatter:Be({config:e,splitValueIndex:P,formatters:o})})}))});break;case m.BarAndLineSplitByNoAggregation:d=t.map(b=>{let y=k({field:a,row:b,fieldList:r,formatter:o?.xAxisLabelFormatter}),L=ke(b,n[0],F);return{[a]:y,[x]:b[x],[n[0]]:v({value:b[L[0]],originalValue:b[L[0]],formatter:o?.yAxisLabelFormatter})}});break;default:d=t}return d}function $e(l){if(l.length===0)return[];let e=l.reduce((t,i)=>{for(let[r,o]of Object.entries(i))typeof o=="number"&&Number.isFinite(o)&&(t[r]=(t[r]??0)+o);return t},{});return l.map(t=>{let i={...t};for(let[r,o]of Object.entries(t))if(typeof o=="number"&&e[r]>0){let a=o/e[r];i[`${r}${h}`]=a.toPrecision(2)}return i})}function Me(l){let{config:e,rows:t,layer:i,fieldList:r,formatters:o}=l,a=me(e),u=M(e.series),f=$e(t),n=de(e),w=u!==m.PieFromFields?z.Category:z.Fields,F=ge(e,w),x=U({config:e,xAxisField:a,numericFields:n,aggregationType:F,mode:w,layer:i,fieldList:r}),g=V(e.series)[0];return u===m.PieFromCategory||u===m.PieNoAggregation?f=f.map(s=>{let c=k({field:a,row:s,fieldList:r,formatter:o?.xAxisLabelFormatter}),d={[a]:c},b=g,y=g;return u===m.PieFromCategory&&g.toLowerCase()===x.name.toLowerCase()&&(b=x.description,y=x.name),d[b]=v({value:s[y],originalValue:s[y],formatter:o?.yAxisLabelFormatter}),d[p(h.trim())]=v({value:s[`${y}${h}`],originalValue:s[`${y}${h}`],formatter:o?.yAxisLabelFormatter}),d}):u===m.PieFromFields&&(f=Z(n,f).map(([s,c])=>{let d={};return c!==void 0&&s!==void 0&&(d.Field=v({value:c[a],originalValue:c[a],formatter:o?.xAxisLabelFormatter}),d.Value=v({value:c[g],originalValue:c[g],formatter:o?.yAxisLabelFormatter}),d[p(h.trim())]=v({value:c[`${g}${h}`],originalValue:c[`${g}${h}`],formatter:o?.yAxisLabelFormatter})),d})),f}function _(l){let{rawData:e,keyBase:t="",outRow:i}=l;for(let[r,o]of Object.entries(S)){let a=e[t+o];a!==void 0&&(i[r]=a);let u=e[t+o+re];u!==void 0&&(i[`${r} Outlier`]=u);let f=e[t+o+j];f!==void 0&&(i[`${r} Z-Score`]=f)}}function I(l){let{rawData:e,outRow:t,config:i,boxPlotSubType:r,fieldList:o}=l,a=Y(i),u=J(i),f=E(i),n=S.Outlier,w=C;switch(r){case m.BoxPlotMonoFieldAndCategory:{let g=we({field:a,value:e[a],fieldList:o});t[a]=g,t[p(S.Outlier)]=e[n];break}case m.BoxPlotMultiFieldsAndCategory:{t[p(a)]=e[a],n=`${u.find(g=>Object.keys(e).some(s=>s.toLowerCase().includes(g.toLowerCase())))??""}_${n}`,t[p(S.Outlier)]=e[n];break}case m.BoxPlotMonoFieldAndSplitBy:case m.BoxPlotMultiFieldsAndSplitBy:{let g=String(e[f]);n=`${g}_${n}`,t.Field=e[w],t[p(f)]=g,t[p(S.Outlier)]=e[n];break}case m.BoxPlotMonoFieldAndCategoryAndSplitBy:{let g=String(e[f]);n=`${g}_${n}`,t[p(a)]=e[a],t[p(f)]=g,t[p(S.Outlier)]=e[n];break}case m.BoxPlotMonoField:case m.BoxPlotMultiFields:default:{t.Field=e[w],t[p(S.Outlier)]=e[n];break}}let F=`${n}${j}`,x=e[F];x!==void 0&&(t[`${p(S.Outlier)} Z-Score`]=x)}function Ve(l){let{rawData:e,outRow:t,config:i,splitByValue:r}=l,o=M(i.series),a=e[`${r}_${S.Average}`],u=E(i),f=Y(i),n="";switch(o){case m.BoxPlotMonoFieldAndSplitBy:{n=`${r}_${u}`,t.Field=e[C],t[p(u)]=e[n];break}case m.BoxPlotMultiFieldsAndSplitBy:{n=`${r}_${S.Average}`,t.Field=e[C],t[p(u)]=e[n];break}case m.BoxPlotMonoFieldAndCategoryAndSplitBy:{n=`${r}_${S.Average}`,t[f]=e[f],t[p(u)]=r;break}}t[p(S.Average)]=a;let w=`${String(a)}${j}`,F=e[w];F!==void 0&&(t[`${p(S.Average)} Z-Score`]=F)}function Ie(l){let{config:e,rows:t,fieldList:i,formatters:r}=l,o=M(e.series),a=o,u=fe(e),f=Array.isArray(t)&&t.length>0&&t.every(s=>s[O.boxPlot.boxPlotMeanLineMarkerId]!==void 0);u&&!f&&(o===m.BoxPlotMonoFieldAndSplitBy?a=m.BoxPlotMonoField:o===m.BoxPlotMultiFieldsAndSplitBy?a=m.BoxPlotMultiFields:o===m.BoxPlotMonoFieldAndCategoryAndSplitBy&&(a=m.BoxPlotMonoFieldAndCategory));let n=Y(e),w=J(e),F=G(e),x=E(e),g;switch(a){case m.BoxPlotMonoField:case m.BoxPlotMonoFieldAndCategory:{g=t.map(s=>{let c={};if(s[O.boxPlot.boxPlotOutlierId])I({rawData:s,outRow:c,config:e,boxPlotSubType:a});else{if(a===m.BoxPlotMonoFieldAndCategory){let d=k({field:n,row:s,fieldList:i,formatter:r?.xAxisLabelFormatter});c[n]=d}else a===m.BoxPlotMonoField&&(c.Field=s[C]);_({rawData:s,outRow:c})}return c});break}case m.BoxPlotMultiFields:{g=t.flatMap(s=>{let c={};return s[O.boxPlot.boxPlotOutlierId]?I({rawData:s,outRow:c,config:e,boxPlotSubType:a}):(c.Field=s[C],_({rawData:s,outRow:c})),[c]});break}case m.BoxPlotMultiFieldsAndCategory:{g=t.flatMap(s=>w.map(c=>{let d={},b="";if(d.Field=c,s[O.boxPlot.boxPlotOutlierId])I({rawData:s,outRow:d,config:e,boxPlotSubType:a});else{if(a===m.BoxPlotMultiFieldsAndCategory){let y=k({field:n,row:s,fieldList:i,formatter:r?.xAxisLabelFormatter});d[n]=y,b=`${c}_`}_({rawData:s,outRow:d,keyBase:b})}return d}));break}case m.BoxPlotMonoFieldAndSplitBy:case m.BoxPlotMultiFieldsAndSplitBy:case m.BoxPlotMonoFieldAndCategoryAndSplitBy:{g=t.flatMap(s=>{if(s[O.boxPlot.boxPlotOutlierId]){let c={};return I({rawData:s,outRow:c,config:e,boxPlotSubType:a}),[c]}else return s[O.boxPlot.boxPlotMeanLineMarkerId]?F?.map(c=>{let d={};return Ve({rawData:s,outRow:d,splitByValue:c,config:e}),d}):F.map(c=>{let d={};if(a===m.BoxPlotMonoFieldAndCategoryAndSplitBy){let b=k({field:n,row:s,fieldList:i,formatter:r?.xAxisLabelFormatter});d[n]=b}return s[O.boxPlot.boxPlotOutlierId]?I({rawData:s,outRow:d,config:e,boxPlotSubType:a}):(d[x]=c,_({rawData:s,outRow:d,keyBase:`${c}_`})),d})});break}default:g=t}return g}var Fe=l=>{let e=!1;return(typeof l=="string"||typeof l=="number")&&(e=!Number.isNaN(new Date(l).getTime())),e},we=l=>{let{field:e,value:t,fieldList:i}=l,r=t,o=i?.find(a=>a.name===e);if(o){let a=o.type===oe.DateOnly;se(o)&&!a?r=Fe(t)?new Date(t).toISOString():t:a&&typeof t!="string"&&(r=Fe(t)?new Date(t).toISOString().split("T")[0]:t)}return r};function tt(l){let{runtimeDataFilters:e,view:t,viewTimeExtentChangePolicy:i,syncViewTimeExtent:r}=l,o=e;return t&&(i===ye.Refresh||r)&&t.timeExtent?.start!=null&&t.timeExtent?.end!=null&&(o={...e,timeExtent:[t.timeExtent.start.valueOf(),t.timeExtent.end.valueOf()]}),o}return{a:Le,b:ve,c:Ae,d:xe,e:Se,f:Qe,g:Xe,h:et,i:tt}},a,b,c,d,e,f,g)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as w,b as P,c as q,d as N}from"./WPPMMVD5.js";import C from"./7ABIELGZ.js";import B from"./TU3UF32Y.js";import A from"./HCV34H6X.js";import z from"./WO6JBNMU.js";import"./VY3KBD6N.js";import y from"./WEQBZOH7.js";import x from"./MF3FGXHI.js";import v from"./RAQZUMC6.js";import u from"./PVJEBBA7.js";import t from"./YRBE7MBU.js";import s from"./26FWESH3.js";import r from"./U4XLNCOU.js";import o from"./PZGIXDMC.js";import n from"./KI4HS3AM.js";import m from"./5G7DSKI7.js";import"./THTYR6IL.js";import k from"./ZRZEKOEF.js";import j from"./2K4ODNJ4.js";import"./Y7HBWU3M.js";import i from"./N5ERJZPG.js";import e from"./CJ4POAPM.js";import d from"./JHYH555K.js";import{i as l,k as f,m as b}from"./WNKDEOFZ.js";import a from"./5FMEOIBS.js";import"./EZV7JSQJ.js";import"./LRNADJJG.js";import{_ as g,ba as h,ia as p}from"./PAIRUVLU.js";import"./KX7KGXKQ.js";import"./SP2IPHWF.js";import"./NZR4L5AA.js";import"./KDJ5RVHA.js";import"./QP5UAIC6.js";import"./XJFVSX2E.js";import{a as c}from"./547RDEMV.js";import"./CHQDKVVQ.js";import"./U67P6YAZ.js";export default $arcgis.t(([{ob:S},{q:_},,{c:n},,,,,,,,,,,,,,,{c:u,d:L},{a:k,b:v,c:M,d:C,e:z,f:F,g:I,h:O,i:B,j:j,k:D,l:V,m:A,n:m,o:x,p:H,q:T,t:W}])=>{var Y=Object.defineProperty,E=Object.getOwnPropertyDescriptor,a=(d,e,s,i)=>{for(var t=E(e,s),r=d.length-1,y;r>=0;r--)(y=d[r])&&(t=y(e,s,t)||t);return t&&Y(e,s,t),t},o=class extends L{constructor(){super(...arguments),this._chartType=c.ComboLineAndBarSeries}async setup(e){await this.loadConfigFromLayer(e),this.setupLocalProps(),e.config!==void 0&&(b(e.config?.series)&&this.initDefaultSeries(),this.updateSeriesFromLayerFilter()),typeof this.resolveSetup=="function"&&this.resolveSetup()}generateDefaultConfig(){let e=p(this.commonStrings);return e.series=[h({commonStrings:this.commonStrings,objectIDField:S(this.layerInfo.layer).idField})],e}initDefaultSeries(){this.defaultSeries=g({commonStrings:this.commonStrings,objectIDField:S(this.layerInfo.layer).idField})}setSeriesType(e,s){if(e<this._config.series.length&&e>=0){let i=this._config.series[e],t;if(s===c.BarSeries&&l(i)){let r={...i};delete r.lineSymbol,delete r.markerSymbol,delete r.lineSmoothed,delete r.markerVisible,delete r.areaColor,delete r.stackNegativeValuesToBaseline,t={...h({commonStrings:this.commonStrings,objectIDField:S(this.layerInfo.layer).idField}),...r,type:c.BarSeries,y:[i.y].flat()[0]},t.fillSymbol&&(t.fillSymbol={...t.fillSymbol,color:i.lineSymbol?.color})}else if(s===c.LineSeries&&f(i)){let r={...i};delete r.fillSymbol,delete r.hideOversizedStackedLabels,delete r.hideOversizedSideBySideLabels,t={...g({commonStrings:this.commonStrings,objectIDField:S(this.layerInfo.layer).idField}),...r,type:c.LineSeries},t.lineSymbol&&(t.lineSymbol={...t.lineSymbol,color:i.fillSymbol?.color})}t!==void 0&&(this._config.series[e]=t)}}getSeriesLineStyle(e){return k(e,this._config)}setSeriesLineStyle(e,s){let i=this._config.series?.[s];l(i)&&v(e,s,this._config)}getSeriesLineWidth(e){return M(e,this._config)}setSeriesLineWidth(e,s){let i=this._config.series?.[s];l(i)&&C(e,s,this._config)}getSeriesMarkerColor(e){return z(e,this._config)}setSeriesMarkerColor(e,s){let i=this._config.series?.[s];l(i)&&F(e,s,this._config)}getSeriesMarkerStyle(e){return I(e,this._config)}setSeriesMarkerStyle(e,s){let i=this._config.series?.[s];l(i)&&O(e,s,this._config)}getSeriesMarkerSize(e){return B(e,this._config)}setSeriesMarkerSize(e,s){let i=this._config.series?.[s];l(i)&&j(e,s,this._config)}isLineSmoothed(e){return D(e,this._config)}setLineSmoothed(e,s){let i=this._config.series?.[s];l(i)&&V({smoothed:e,seriesIndex:s,config:this._config})}isAreaVisible(e){return A(e,this._config)}setAreaVisible(e,s){let i=this._config.series?.[s];l(i)&&m({visible:e,seriesIndex:s,config:this._config})}isMarkerVisible(e){return x(e,this._config)}setMarkerVisible(e,s){let i=this._config.series?.[s];l(i)&&H({visible:e,seriesIndex:s,config:this._config})}getAreaColor(e){return T(e,this._config)}setAreaColor(e,s){let i=this._config.series?.[s];l(i)&&(m({visible:!0,seriesIndex:s,config:this._config}),u(e,s,this._config))}getSeriesHideOversizedSideBySideLabels(e){return w(e,this._config)}setSeriesHideOversizedSideBySideLabels(e,s){let i=this._config.series?.[s];f(i)&&P(e,s,this._config)}getSeriesHideOversizedStackedLabels(e){return q(e,this._config)}setSeriesHideOversizedStackedLabels(e,s){let i=this._config.series?.[s];f(i)&&N(e,s,this._config)}};a([n],o.prototype,"setSeriesType");a([n],o.prototype,"setSeriesLineStyle");a([n],o.prototype,"setSeriesLineWidth");a([n],o.prototype,"setSeriesMarkerColor");a([n],o.prototype,"setSeriesMarkerStyle");a([n],o.prototype,"setSeriesMarkerSize");a([n],o.prototype,"setLineSmoothed");a([n],o.prototype,"setAreaVisible");a([n],o.prototype,"setMarkerVisible");a([n],o.prototype,"setAreaColor");a([n],o.prototype,"setSeriesHideOversizedSideBySideLabels");a([n],o.prototype,"setSeriesHideOversizedStackedLabels");var G=[W];_(o,G);return o},a,d,e,i,j,k,m,n,o,r,s,t,u,v,x,y,z,A,B,C)
2
+ import{a as w,b as P,c as q,d as N}from"./WPPMMVD5.js";import C from"./7ABIELGZ.js";import B from"./7CN6J33C.js";import A from"./HCV34H6X.js";import z from"./5XTB2INB.js";import"./VY3KBD6N.js";import y from"./WEQBZOH7.js";import x from"./MF3FGXHI.js";import v from"./RAQZUMC6.js";import u from"./PVJEBBA7.js";import t from"./YRBE7MBU.js";import s from"./26FWESH3.js";import r from"./U4XLNCOU.js";import o from"./PZGIXDMC.js";import n from"./KI4HS3AM.js";import m from"./5G7DSKI7.js";import"./THTYR6IL.js";import k from"./ZRZEKOEF.js";import j from"./2K4ODNJ4.js";import"./Y7HBWU3M.js";import i from"./N5ERJZPG.js";import e from"./CJ4POAPM.js";import d from"./JHYH555K.js";import{i as l,k as f,m as b}from"./WNKDEOFZ.js";import a from"./5FMEOIBS.js";import"./EZV7JSQJ.js";import"./LRNADJJG.js";import{_ as g,ba as h,ia as p}from"./PAIRUVLU.js";import"./KX7KGXKQ.js";import"./SP2IPHWF.js";import"./NZR4L5AA.js";import"./KDJ5RVHA.js";import"./QP5UAIC6.js";import"./XJFVSX2E.js";import{a as c}from"./547RDEMV.js";import"./CHQDKVVQ.js";import"./U67P6YAZ.js";export default $arcgis.t(([{ob:S},{q:_},,{c:n},,,,,,,,,,,,,,,{c:u,d:L},{a:k,b:v,c:M,d:C,e:z,f:F,g:I,h:O,i:B,j:j,k:D,l:V,m:A,n:m,o:x,p:H,q:T,t:W}])=>{var Y=Object.defineProperty,E=Object.getOwnPropertyDescriptor,a=(d,e,s,i)=>{for(var t=E(e,s),r=d.length-1,y;r>=0;r--)(y=d[r])&&(t=y(e,s,t)||t);return t&&Y(e,s,t),t},o=class extends L{constructor(){super(...arguments),this._chartType=c.ComboLineAndBarSeries}async setup(e){await this.loadConfigFromLayer(e),this.setupLocalProps(),e.config!==void 0&&(b(e.config?.series)&&this.initDefaultSeries(),this.updateSeriesFromLayerFilter()),typeof this.resolveSetup=="function"&&this.resolveSetup()}generateDefaultConfig(){let e=p(this.commonStrings);return e.series=[h({commonStrings:this.commonStrings,objectIDField:S(this.layerInfo.layer).idField})],e}initDefaultSeries(){this.defaultSeries=g({commonStrings:this.commonStrings,objectIDField:S(this.layerInfo.layer).idField})}setSeriesType(e,s){if(e<this._config.series.length&&e>=0){let i=this._config.series[e],t;if(s===c.BarSeries&&l(i)){let r={...i};delete r.lineSymbol,delete r.markerSymbol,delete r.lineSmoothed,delete r.markerVisible,delete r.areaColor,delete r.stackNegativeValuesToBaseline,t={...h({commonStrings:this.commonStrings,objectIDField:S(this.layerInfo.layer).idField}),...r,type:c.BarSeries,y:[i.y].flat()[0]},t.fillSymbol&&(t.fillSymbol={...t.fillSymbol,color:i.lineSymbol?.color})}else if(s===c.LineSeries&&f(i)){let r={...i};delete r.fillSymbol,delete r.hideOversizedStackedLabels,delete r.hideOversizedSideBySideLabels,t={...g({commonStrings:this.commonStrings,objectIDField:S(this.layerInfo.layer).idField}),...r,type:c.LineSeries},t.lineSymbol&&(t.lineSymbol={...t.lineSymbol,color:i.fillSymbol?.color})}t!==void 0&&(this._config.series[e]=t)}}getSeriesLineStyle(e){return k(e,this._config)}setSeriesLineStyle(e,s){let i=this._config.series?.[s];l(i)&&v(e,s,this._config)}getSeriesLineWidth(e){return M(e,this._config)}setSeriesLineWidth(e,s){let i=this._config.series?.[s];l(i)&&C(e,s,this._config)}getSeriesMarkerColor(e){return z(e,this._config)}setSeriesMarkerColor(e,s){let i=this._config.series?.[s];l(i)&&F(e,s,this._config)}getSeriesMarkerStyle(e){return I(e,this._config)}setSeriesMarkerStyle(e,s){let i=this._config.series?.[s];l(i)&&O(e,s,this._config)}getSeriesMarkerSize(e){return B(e,this._config)}setSeriesMarkerSize(e,s){let i=this._config.series?.[s];l(i)&&j(e,s,this._config)}isLineSmoothed(e){return D(e,this._config)}setLineSmoothed(e,s){let i=this._config.series?.[s];l(i)&&V({smoothed:e,seriesIndex:s,config:this._config})}isAreaVisible(e){return A(e,this._config)}setAreaVisible(e,s){let i=this._config.series?.[s];l(i)&&m({visible:e,seriesIndex:s,config:this._config})}isMarkerVisible(e){return x(e,this._config)}setMarkerVisible(e,s){let i=this._config.series?.[s];l(i)&&H({visible:e,seriesIndex:s,config:this._config})}getAreaColor(e){return T(e,this._config)}setAreaColor(e,s){let i=this._config.series?.[s];l(i)&&(m({visible:!0,seriesIndex:s,config:this._config}),u(e,s,this._config))}getSeriesHideOversizedSideBySideLabels(e){return w(e,this._config)}setSeriesHideOversizedSideBySideLabels(e,s){let i=this._config.series?.[s];f(i)&&P(e,s,this._config)}getSeriesHideOversizedStackedLabels(e){return q(e,this._config)}setSeriesHideOversizedStackedLabels(e,s){let i=this._config.series?.[s];f(i)&&N(e,s,this._config)}};a([n],o.prototype,"setSeriesType");a([n],o.prototype,"setSeriesLineStyle");a([n],o.prototype,"setSeriesLineWidth");a([n],o.prototype,"setSeriesMarkerColor");a([n],o.prototype,"setSeriesMarkerStyle");a([n],o.prototype,"setSeriesMarkerSize");a([n],o.prototype,"setLineSmoothed");a([n],o.prototype,"setAreaVisible");a([n],o.prototype,"setMarkerVisible");a([n],o.prototype,"setAreaColor");a([n],o.prototype,"setSeriesHideOversizedSideBySideLabels");a([n],o.prototype,"setSeriesHideOversizedStackedLabels");var G=[W];_(o,G);return o},a,d,e,i,j,k,m,n,o,r,s,t,u,v,x,y,z,A,B,C)