MCPcopy Create free account
hub / github.com/alignoth/alignoth / yF

Function yF

resources/vega.min.js:24125–24309  ·  view source on GitHub ↗
(t, e, n, r, i, o, a, s, u, l, c)

Source from the content-addressed store, hash-verified

24123 },
24124 };
24125 function yF(t, e, n, r, i, o, a, s, u, l, c) {
24126 if (!t.length) return t;
24127 const f = Math.max(r.length, i.length),
24128 h = (function (t, e) {
24129 const n = new Float64Array(e),
24130 r = t.length;
24131 for (let e = 0; e < r; ++e) n[e] = t[e] || 0;
24132 for (let t = r; t < e; ++t) n[t] = n[r - 1];
24133 return n;
24134 })(r, f),
24135 d = (function (t, e) {
24136 const n = new Int8Array(e),
24137 r = t.length;
24138 for (let e = 0; e < r; ++e) n[e] |= gF[t[e]];
24139 for (let t = r; t < e; ++t) n[t] = n[r - 1];
24140 return n;
24141 })(i, f),
24142 p = (x = t[0].datum) && x.mark && x.mark.marktype,
24143 g = "group" === p && t[0].datum.items[u].marktype,
24144 m = "area" === g,
24145 y = (function (t, e, n, r) {
24146 const i = (t) => [t.x, t.x, t.x, t.y, t.y, t.y];
24147 return t
24148 ? "line" === t || "area" === t
24149 ? (t) => i(t.datum)
24150 : "line" === e
24151 ? (t) => {
24152 const e = t.datum.items[r].items;
24153 return i(
24154 e.length
24155 ? e["start" === n ? 0 : e.length - 1]
24156 : { x: NaN, y: NaN },
24157 );
24158 }
24159 : (t) => {
24160 const e = t.datum.bounds;
24161 return [
24162 e.x1,
24163 (e.x1 + e.x2) / 2,
24164 e.x2,
24165 e.y1,
24166 (e.y1 + e.y2) / 2,
24167 e.y2,
24168 ];
24169 }
24170 : i;
24171 })(p, g, s, u),
24172 v = null === l || l === 1 / 0,
24173 _ = m && "naive" === c;
24174 var x;
24175 let b = -1,
24176 w = -1;
24177 const k = t.map((t) => {
24178 const e = v ? My.width(t, t.text) : void 0;
24179 return (
24180 (b = Math.max(b, e)),
24181 (w = Math.max(w, t.fontSize)),
24182 {

Callers 1

transformFunction · 0.85

Calls 13

sFFunction · 0.85
tFFunction · 0.85
KCFunction · 0.85
pFFunction · 0.85
widthMethod · 0.80
iFunction · 0.70
yFunction · 0.70
nFunction · 0.70
ScFunction · 0.70
tFunction · 0.70
EFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected