/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import "@arcgis/toolkit/intl";
import "lodash-es";
import "luxon";
import "d3-array";
import "@arcgis/toolkit/type";
import "./series-types.js";
import { b0 as m } 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 { j as i, k as a } from "./index4.js";
import "@arcgis/toolkit/dom";
import { s as S, b as k, g as c, a as b } from "./series.js";
import { C as n, m as v } from "./model-setter.js";
const g = (s, e) => {
  if (i(e.series[s]) || a(e.series[s]))
    return c(e.series[s]);
}, x = (s, e, r) => {
  (i(r.series[e]) || a(r.series[e])) && S(s, r.series[e]);
}, I = (s, e) => {
  if (i(e.series[s]) || a(e.series[s]))
    return b(e.series[s]);
}, ee = (s, e, r) => {
  (i(r.series[e]) || a(r.series[e])) && k(s, r.series[e]);
}, se = (s, e) => i(e.series[s]) || a(e.series[s]) ? e.series[s].markerSymbol?.color : void 0, re = (s, e, r) => {
  if (i(r.series[e]) || a(r.series[e])) {
    const t = r.series[e];
    t.markerSymbol === void 0 && (t.markerSymbol = m()), t.markerSymbol.color = s;
  }
}, te = (s, e) => i(e.series[s]) || a(e.series[s]) ? e.series?.[s]?.markerSymbol?.style : void 0, ie = (s, e, r) => {
  if (i(r.series[e]) || a(r.series[e])) {
    const t = r.series[e];
    t.markerSymbol === void 0 && (t.markerSymbol = m()), t.markerSymbol.style = s;
  }
}, ae = (s, e) => i(e.series[s]) || a(e.series[s]) ? e.series?.[s]?.markerSymbol?.size : void 0, oe = (s, e, r) => {
  if (i(r.series[e]) || a(r.series[e])) {
    const t = r.series[e];
    t.markerSymbol === void 0 && (t.markerSymbol = m()), t.markerSymbol.size = s;
  }
}, le = (s, e) => i(e.series[s]) || a(e.series[s]) ? e.series?.[s]?.lineSmoothed ?? !1 : !1, me = (s) => {
  const { smoothed: e, seriesIndex: r, config: t } = s;
  (i(t.series[r]) || a(t.series[r])) && (t.series[r].lineSmoothed = e);
}, pe = (s, e) => i(e.series[s]) || a(e.series[s]) ? e.series[s].showArea ?? !1 : !1, Se = (s) => {
  const { visible: e, seriesIndex: r, config: t } = s;
  (i(t.series[r]) || a(t.series[r])) && (t.series[r].showArea = e);
}, ke = (s, e) => i(e.series[s]) || a(e.series[s]) ? e.series[s].markerVisible ?? !0 : !1, ce = (s) => {
  const { visible: e, seriesIndex: r, config: t } = s;
  (i(t.series[r]) || a(t.series[r])) && (t.series[r].markerVisible = e);
}, be = (s, e) => i(e.series[s]) || a(e.series[s]) ? e.series[s].areaColor : void 0, ne = (s, e) => i(e.series[s]) || a(e.series[s]) ? e.series?.[s]?.connectLines : void 0, ve = (s) => {
  const { connect: e, seriesIndex: r, config: t } = s;
  (i(t.series[r]) || a(t.series[r])) && (t.series[r].connectLines = e);
};
var y = Object.defineProperty, h = Object.getOwnPropertyDescriptor, u = (s, e, r, t) => {
  for (var o = h(e, r), l = s.length - 1, p; l >= 0; l--)
    (p = s[l]) && (o = p(e, r, o) || o);
  return o && y(e, r, o), o;
};
const L = (s, e) => i(e.series[s]) || a(e.series[s]) ? e.series[s].stackNegativeValuesToBaseline ?? !0 : !1, V = (s) => {
  const { stackNegativeValuesToBaseline: e, seriesIndex: r, config: t } = s;
  (i(t.series[r]) || a(t.series[r])) && (t.series[r].stackNegativeValuesToBaseline = e);
};
class C extends n {
  /**
   * Specify how negative values are treated in stacked series.
   *
   * **Note:** If true, negative values will be stacked on the base line. If false, negative values will be stacked in relation to their previous values in the stack.
   *
   * @param seriesIndex - The index of the series.
   */
  isNegativeValuesStackedToBaseline(e) {
    return L(e, this._config);
  }
  setNegativeValuesStackedToBaseline(e, r) {
    V({
      stackNegativeValuesToBaseline: e,
      seriesIndex: r,
      config: this._config
    });
  }
}
u([
  v
], C.prototype, "setNegativeValuesStackedToBaseline");
export {
  C as W,
  x as a,
  ee as b,
  ie as c,
  oe as d,
  I as e,
  se as f,
  g,
  te as h,
  ae as i,
  le as j,
  me as k,
  ne as l,
  ve as m,
  pe as n,
  Se as o,
  ke as p,
  ce as q,
  be as r,
  re as s
};
