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

Function mz

resources/vega.min.js:29337–29354  ·  view source on GitHub ↗
(t, e, n, r)

Source from the content-addressed store, hash-verified

29335 }));
29336 }
29337 function mz(t, e, n, r) {
29338 const i = sz("span", { class: cz }),
29339 o = n.labels || [];
29340 (e.appendChild(i),
29341 (t.elements = n.options.map((e, a) => {
29342 const s = { type: "radio", name: n.signal, value: e };
29343 vz(e, r) && (s.checked = !0);
29344 const u = sz("input", s);
29345 u.addEventListener("change", () => t.update(e));
29346 const l = sz("label", {}, (o[a] || e) + "");
29347 return (l.prepend(u), i.appendChild(l), u);
29348 })),
29349 (t.set = (e) => {
29350 const n = t.elements,
29351 r = n.length;
29352 for (let t = 0; t < r; ++t) vz(n[t].value, e) && (n[t].checked = !0);
29353 }));
29354 }
29355 function yz(t, e, n, r) {
29356 r = void 0 !== r ? r : (+n.max + +n.min) / 2;
29357 const i = null != n.max ? n.max : Math.max(100, +r) || 100,

Callers

nothing calls this directly

Calls 4

szFunction · 0.85
vzFunction · 0.85
mapMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected