/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import { m, C as o } from "./model-setter.js";
import "@arcgis/toolkit/intl";
import "lodash-es";
import "luxon";
import "d3-array";
import "@arcgis/toolkit/type";
import "./series-types.js";
import { aP as l, aN as a, bI as n, k as g } from "./index.js";
import "@arcgis/core/Graphic.js";
import "@arcgis/core/renderers/support/jsonUtils.js";
import "@arcgis/core/symbols/support/symbolUtils.js";
import "@esri/arcgis-html-sanitizer";
import "@arcgis/core/intl.js";
import "@arcgis/core/layers/support/FeatureFilter.js";
import "@arcgis/core/smartMapping/statistics/histogram.js";
import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
import "simple-statistics";
import "@arcgis/core/request.js";
import "@arcgis/core/core/sql.js";
import "@arcgis/core/AttributeBinsGraphic.js";
import "@arcgis/core/geometry/support/jsonUtils.js";
import "@arcgis/core/rest/support/AttributeBinsQuery.js";
import "@arcgis/core/rest/support/StatisticDefinition.js";
import "@arcgis/core/time/TimeExtent.js";
import "@arcgis/core/core/promiseUtils.js";
import "./runtime.js";
import "@arcgis/toolkit/dom";
var h = Object.defineProperty, c = Object.getOwnPropertyDescriptor, f = (t, e, r, v) => {
  for (var i = c(e, r), s = t.length - 1, p; s >= 0; s--)
    (p = t[s]) && (i = p(e, r, i) || i);
  return i && h(e, r, i), i;
};
const x = (t) => t.title?.content.text ?? "", d = (t, e) => {
  e.title !== void 0 ? e.title.content.text = t : e.title === void 0 && t !== void 0 && (e.title = l({
    text: t,
    visible: !0,
    font: a(n.ChartTitle)
  }));
};
class u extends o {
  /**
   * The chart title text.
   */
  get titleText() {
    return x(this._config);
  }
  set titleText(e) {
    d(e, this._config);
  }
}
f([
  m
], u.prototype, "titleText");
const T = (t) => t.series.map((e) => String(g({ where: e.query?.where }))).filter((e) => e !== void 0 && e.trim() !== "");
class R extends o {
  /**
   * The split-by values for the chart.
   */
  get splitByValues() {
    return T(this._config);
  }
}
const _ = (t) => t.series.length ?? 0;
class U extends o {
  /**
   * The length of the series array.
   */
  get seriesLength() {
    return _(this._config);
  }
}
export {
  u as W,
  T as a,
  _ as b,
  U as c,
  R as d,
  x as g
};
