| 10640 | : [e]; |
| 10641 | } |
| 10642 | function fm(e, n, i, r) { |
| 10643 | const { encoding: o, markDef: a, mark: s, config: l, stack: c } = i, |
| 10644 | u = ka(o[r]), |
| 10645 | { type: f } = u, |
| 10646 | d = u.timeUnit, |
| 10647 | m = (function (e) { |
| 10648 | const { marks: t, scales: n } = xc(e); |
| 10649 | return t === n |
| 10650 | ? bc.Main |
| 10651 | : "include-invalid-values" === n |
| 10652 | ? bc.PreFilterInvalid |
| 10653 | : bc.PostFilterInvalid; |
| 10654 | })({ invalid: Mn("invalid", a, l), isPath: Zr(s) }); |
| 10655 | if ( |
| 10656 | (function (e) { |
| 10657 | return J(e, "unionWith"); |
| 10658 | })(n) |
| 10659 | ) { |
| 10660 | const t = fm(e, void 0, i, r); |
| 10661 | return ac([...um(n.unionWith, f, d), ...t.value]); |
| 10662 | } |
| 10663 | if (wn(n)) return ac([n]); |
| 10664 | if (n && "unaggregated" !== n && !Or(n)) return ac(um(n, f, d)); |
| 10665 | if (c && r === c.fieldChannel) { |
| 10666 | if ("normalize" === c.offset) return sc([[0, 1]]); |
| 10667 | const e = i.requestDataName(m); |
| 10668 | return sc([ |
| 10669 | { data: e, field: i.vgField(r, { suffix: "start" }) }, |
| 10670 | { data: e, field: i.vgField(r, { suffix: "end" }) }, |
| 10671 | ]); |
| 10672 | } |
| 10673 | const g = |
| 10674 | Qt(r) && Zo(u) |
| 10675 | ? (function (e, t, n) { |
| 10676 | if (!kr(n)) return; |
| 10677 | const i = e.fieldDef(t), |
| 10678 | r = i.sort; |
| 10679 | if (qo(r)) |
| 10680 | return { op: "min", field: Ff(i, t), order: "ascending" }; |
| 10681 | const { stack: o } = e, |
| 10682 | a = o |
| 10683 | ? new Set([ |
| 10684 | ...o.groupbyFields, |
| 10685 | ...o.stackBy.map((e) => e.fieldDef.field), |
| 10686 | ]) |
| 10687 | : void 0; |
| 10688 | if (Lo(r)) { |
| 10689 | return dm(r, o && !a.has(r.field)); |
| 10690 | } |
| 10691 | if ( |
| 10692 | (function (e) { |
| 10693 | return J(e, "encoding"); |
| 10694 | })(r) |
| 10695 | ) { |
| 10696 | const { encoding: t, order: n } = r, |
| 10697 | i = e.fieldDef(t), |
| 10698 | { aggregate: s, field: l } = i, |
| 10699 | c = o && !a.has(l); |