react-semaphor 0.1.593 → 0.1.595

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/briefings/index.js +2 -2
  3. package/dist/chunks/{assistant-chat-D05uNAeO.js → assistant-chat-C8VXUHvX.js} +6 -6
  4. package/dist/chunks/{bookmark-impact-B0k90wq8.js → bookmark-impact-Dh-wiTs3.js} +2 -2
  5. package/dist/chunks/{card-filter-builder-CiafWE26.js → card-filter-builder-Dmh9R278.js} +351 -362
  6. package/dist/chunks/{comparison-window-caption-h8w3ySL6.js → comparison-window-caption-DmMFtNP5.js} +1 -1
  7. package/dist/chunks/{dashboard-briefing-launcher-CPh2B3Rf.js → dashboard-briefing-launcher-BFlkwqSg.js} +224 -224
  8. package/dist/chunks/{dashboard-controls-Cijc9c3G.js → dashboard-controls-C-MFtXUc.js} +8 -8
  9. package/dist/chunks/{dashboard-json-D3m7h4VL.js → dashboard-json-H8rjI8MK.js} +1 -1
  10. package/dist/chunks/{dashboard-T-gYKGTF.js → dashboard-wzORuqkj.js} +1 -1
  11. package/dist/chunks/{dates-Bb0sn54j.js → dates-B-bKEsiu.js} +5 -5
  12. package/dist/chunks/{edit-dashboard-visual-C0iSuX9t.js → edit-dashboard-visual-g78CyvZZ.js} +5170 -5302
  13. package/dist/chunks/{filter-line-CYT7KIXb.js → filter-line-BpdPq1D2.js} +3 -2
  14. package/dist/chunks/{filter-reach-copy-CifrEFxj.js → filter-reach-copy-DoXmRmk-.js} +4 -4
  15. package/dist/chunks/{filter-value-text-CHBm4IU7.js → filter-value-text-CDQCIREQ.js} +10 -10
  16. package/dist/chunks/{index-CzM2w1kY.js → index-C0jX5wlM.js} +2 -2
  17. package/dist/chunks/{pivot-result-contract-expectations-CaS0y823.js → pivot-result-contract-expectations-Dt0E1Wou.js} +1309 -1312
  18. package/dist/chunks/{report-preferences-dialog-GHvai50w.js → report-preferences-dialog-B2CoGxJu.js} +8 -8
  19. package/dist/chunks/{resolve-dashboard-input-context-BcQHmMlw.js → resolve-dashboard-input-context-DfJshnw8.js} +3621 -3556
  20. package/dist/chunks/{saved-dashboard-context-BHHEzmwM.js → saved-dashboard-context-DdhPU2Kq.js} +3 -3
  21. package/dist/chunks/{semaphor-ready-indicator-AOUJrUAJ.js → semaphor-ready-indicator-CLJFaXjd.js} +22645 -22574
  22. package/dist/chunks/{shelf-drop-preview-context-Cs62lWI1.js → shelf-drop-preview-context-BMUmDkqr.js} +2 -2
  23. package/dist/chunks/{stored-dashboard-Cmtl_Obh.js → stored-dashboard-D6FtWx_3.js} +930 -928
  24. package/dist/chunks/{table-export-sheet-Cd6z7SsG.js → table-export-sheet-DBlFMvE8.js} +1 -1
  25. package/dist/chunks/{variable-draft-CSK9Ps1o.js → variable-draft-CxdgKDCx.js} +2 -2
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/dashboard-authoring/index.js +1025 -1012
  28. package/dist/format-utils/index.js +211 -210
  29. package/dist/index.js +11 -11
  30. package/dist/surfboard/index.js +1 -1
  31. package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +3 -1
  32. package/dist/types/shared/dashboard-authoring/card-formats/detail-date-display.d.ts +43 -1
  33. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  34. package/dist/types/shared/dashboard-authoring/semantic-card-domain.d.ts +30 -0
  35. package/dist/types/shared/dashboard-authoring/temporal-bucket-authoring.d.ts +7 -1
  36. package/dist/types/shared/format-utils/temporal-bucket-format-policy.d.ts +27 -5
  37. package/package.json +1 -1
@@ -1,37 +1,37 @@
1
1
  var Cs = Object.defineProperty;
2
2
  var $s = (e, a, t) => a in e ? Cs(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
3
3
  var ct = (e, a, t) => $s(e, typeof a != "symbol" ? a + "" : a, t);
4
- import { a1 as ws, a2 as xs, a3 as Ss, a4 as ks, a5 as Ts, a6 as Na, a7 as ve, a8 as Rs, a9 as he, aa as $e, ab as ca, ac as nt, ad as Pa, ae as U, af as K, ag as qe, ah as As, ai as Ds, aj as Ft, ak as Fs, al as Os, am as Es, an as qs, ao as Ns, ap as Ps, aq as Ls, ar as La, as as Ms, at as Bs, au as Vs, av as Gs, aw as js, ax as Ks, ay as Ws, az as ut, aA as Us, aB as Ma, aC as ua, aD as we, aE as ge, aF as Ne, aG as Qs, aH as Hs, aI as Ys, t as Xe, aJ as zs, aK as Js, aL as $t, aM as Ze, aN as Xs, aO as Zs, aP as Ba, aQ as Ot, aR as wt, aS as eo, aT as to, aU as ao, aV as re, aW as Va, aX as Ga, aY as fa, aZ as ft, a_ as so, a$ as oo, b0 as ma, b1 as xt, b2 as no, b3 as ha, b4 as io, b5 as pa, b6 as ga, b7 as et, b8 as ba, b9 as De, ba as ro, bb as Ye, q as lo, bc as ja, bd as co, be as uo, bf as fo, bg as Ka, a as mo, bh as ho, bi as po, bj as go, bk as bo, bl as yo, bm as vo, bn as _o, bo as Io, bp as Co, bq as $o, br as wo, bs as xo, bt as So, bu as ya, bv as ko, bw as To, bx as Ro, by as Ao, bz as Do, bA as Fo, bB as Oo, bC as Eo, bD as qo, bE as No, bF as Po, bG as Lo } from "../chunks/resolve-dashboard-input-context-BcQHmMlw.js";
5
- import { e0 as zr, c1 as Jr, c6 as Xr, dF as Zr, dG as ed, dU as td, dT as ad, dO as sd, f3 as od, dV as nd, dW as id, em as rd, dg as dd, dh as ld, di as cd, dd as ud, de as fd, df as md, d9 as hd, da as pd, dc as gd, db as bd, dj as yd, eg as vd, dH as _d, cu as Id, eM as Cd, eL as $d, er as wd, es as xd, ct as Sd, dz as kd, e2 as Td, cD as Rd, f5 as Ad, ck as Dd, bX as Fd, ej as Od, e5 as Ed, et as qd, fw as Nd, fH as Pd, fA as Ld, dR as Md, dS as Bd, cA as Vd, ff as Gd, fd as jd, fe as Kd, bU as Wd, fr as Ud, e4 as Qd, cG as Hd, eb as Yd, cz as zd, fL as Jd, fM as Xd, eU as Zd, b$ as el, e3 as tl, dn as al, fi as sl, fQ as ol, c_ as nl, fB as il, dN as rl, cB as dl, cP as ll, bY as cl, eB as ul, eC as fl, dk as ml, c$ as hl, ei as pl, bO as gl, en as bl, eS as yl, c0 as vl, e7 as _l, fV as Il, fj as Cl, bP as $l, c5 as wl, ew as xl, cV as Sl, fO as kl, eV as Tl, ea as Rl, eT as Al, el as Dl, dy as Fl, dx as Ol, cy as El, eh as ql, eP as Nl, cg as Pl, cm as Ll, ef as Ml, cQ as Bl, d2 as Vl, d4 as Gl, cS as jl, bM as Kl, fC as Wl, fG as Ul, eN as Ql, eQ as Hl, eR as Yl, cH as zl, eq as Jl, eo as Xl, eH as Zl, bQ as ec, bZ as tc, eW as ac, fs as sc, b_ as oc, d_ as nc, d$ as ic, fR as rc, fS as dc, fU as lc, d3 as cc, ch as uc, ci as fc, cj as mc, cC as hc, cE as pc, fN as gc, f0 as bc, dC as yc, k as vc, d8 as _c, cr as Ic, cM as Cc, b as $c, d5 as wc, dD as xc, c8 as Sc, c9 as kc, c2 as Tc, dp as Rc, e9 as Ac, cq as Dc, ey as Fc, cI as Oc, bH as Ec, cv as qc, dP as Nc, cc as Pc, dZ as Lc, cl as Mc, dt as Bc, fg as Vc, fT as Gc, bV as jc, dv as Kc, ez as Wc, dw as Uc, eD as Qc, f8 as Hc, f7 as Yc, ec as zc, cX as Jc, cL as Xc, cN as Zc, o as eu, cO as tu, e_ as au, dX as su, e8 as ou, bI as nu, bJ as iu, bK as ru, bR as du, fy as lu, ft as cu, e1 as uu, fu, cU as mu, cw as hu, d1 as pu, dY as gu, eZ as bu, dA as yu, dB as vu, c7 as _u, fP as Iu, e6 as Cu, eX as $u, eO as wu, dE as xu, fc as Su, fa as ku, M as Tu, fx as Ru, cp as Au, fD as Du, fE as Fu, dL as Ou, d7 as Eu, cb as qu, ep as Nu, ek as Pu, bL as Lu, cY as Mu, cZ as Bu, cx as Vu, dm as Gu, cf as ju, cn as Ku, co as Wu, dI as Uu, dJ as Qu, cs as Hu, bS as Yu, ce as zu, dr as Ju, f6 as Xu, f2 as Zu, fF as ef, ds as tf, dq as af, fI as sf, ca as of, f4 as nf, cW as rf, f1 as df, d6 as lf, eA as cf, fh as uf, dK as ff, cT as mf, dQ as hf, bN as pf, cd as gf, ed as bf, fb as yf, ex as vf, d0 as _f, du as If, bW as Cf, ee as $f, fJ as wf, ev as xf, eu as Sf, e$ as kf, f9 as Tf, cF as Rf, cK as Af, bT as Df, fz as Ff, fv as Of, fK as Ef, dl as qf, eY as Nf, eK as Pf, dM as Lf, eJ as Mf, fl as Bf, c3 as Vf, eG as Gf, c4 as jf, eI as Kf, cJ as Wf, eE as Uf, eF as Qf, fk as Hf, fm as Yf, fn as zf, fo as Jf, cR as Xf, fp as Zf, fq as em } from "../chunks/resolve-dashboard-input-context-BcQHmMlw.js";
6
- import { L as Mo, M as Wa, H as Ua, N as Bo, O as Vo, P as Et, Q as Qa, R as Ha, D as xe, S as Go, T as jo, I as Ko, U as Wo } from "../chunks/bookmark-state-Be2W3s6t.js";
7
- import { ah as am, aB as sm, $ as om, a0 as nm, ab as im, af as rm, ac as dm, ad as lm, ae as cm, ai as um, az as fm, at as mm, F as hm, ax as pm, G as gm, a4 as bm, J as ym, aA as vm, a7 as _m, a8 as Im, av as Cm, ag as $m, a5 as wm, ar as xm, aw as Sm, ay as km, as as Tm, au as Rm, a3 as Am, a1 as Dm, ak as Fm, ap as Om, X as Em, Y as qm, W as Nm, Z as Pm, a6 as Lm, aq as Mm, aC as Bm, al as Vm, aj as Gm, am as jm, an as Km, ao as Wm, aa as Um, a9 as Qm, _ as Hm, a2 as Ym } from "../chunks/bookmark-state-Be2W3s6t.js";
8
- import { L as Jm, D as Xm, E as Zm, d as eh, C as th, k as ah, x as sh, A as oh, q as nh, s as ih, B as rh, z as dh, n as lh, o as ch, p as uh, y as fh, F as mh, t as hh, v as ph, u as gh, w as bh } from "../chunks/stored-dashboard-Cmtl_Obh.js";
9
- import { r as Uo, ab as va } from "../chunks/pivot-result-contract-expectations-CaS0y823.js";
10
- import { aR as vh, aQ as _h, aM as Ih, aP as Ch, aS as $h, aG as wh } from "../chunks/pivot-result-contract-expectations-CaS0y823.js";
11
- import { f as Qo, w as Ho, D as _a, a as Yo } from "../chunks/metric-comparison-BeKnUD08.js";
12
- import { p as zo } from "../chunks/report-runtime-context-g4Zp_TU9.js";
13
- import { r as Ya, D as Ia, h as Jo, i as za, j as Xo, k as Zo, l as en, f as St, m as tn, v as an } from "../chunks/filter-reach-copy-CifrEFxj.js";
14
- import { N as Sh, $ as kh, S as Th, o as Rh, t as Ah, w as Dh, u as Fh, G as Oh, C as Eh, n as qh, q as Nh, J as Ph, d as Lh, a1 as Mh, L as Bh, M as Vh, _ as Gh, a0 as jh, E as Kh, X as Wh, F as Uh, x as Qh, y as Hh, A as Yh, p as zh, z as Jh, R as Xh, O as Zh, a2 as ep, Z as tp, Y as ap, K as sp, H as op, I as np, U as ip, T as rp, Q as dp, V as lp, P as cp, s as up, W as fp, B as mp } from "../chunks/filter-reach-copy-CifrEFxj.js";
15
- import { a9 as Ja, r as Xa, aP as sn, b0 as Pe, aN as on, aS as nn, aM as rn, aG as dn, aO as ln, a7 as cn } from "../chunks/validators-BlEWWX9O.js";
4
+ import { a1 as ws, a2 as Ss, a3 as xs, a4 as ks, a5 as Ts, a6 as Na, a7 as ve, a8 as Rs, a9 as he, aa as $e, ab as ca, ac as nt, ad as Pa, ae as Q, af as W, ag as qe, ah as As, ai as Ds, aj as Ft, ak as Fs, al as Os, am as Es, an as qs, ao as Ns, ap as Ps, aq as Ls, ar as La, as as Ms, at as Bs, au as Vs, av as Gs, aw as js, ax as Ks, ay as Ws, az as Us, aA as Qs, aB as ut, aC as Hs, aD as Ma, aE as ua, aF as we, aG as ge, aH as Ne, aI as Ys, aJ as zs, aK as Js, t as Xe, aL as Xs, aM as Zs, aN as $t, aO as Ze, aP as eo, aQ as to, aR as Ba, aS as Ot, aT as wt, aU as ao, aV as so, aW as oo, aX as re, aY as Va, aZ as Ga, a_ as fa, a$ as ft, b0 as no, b1 as io, b2 as ma, b3 as St, b4 as ro, b5 as ha, b6 as lo, b7 as pa, b8 as ga, b9 as et, ba, bb as De, bc as co, bd as Ye, q as uo, be as ja, bf as fo, bg as mo, bh as ho, bi as Ka, a as po, bj as go, bk as bo, bl as yo, bm as vo, bn as _o, bo as Io, bp as Co, bq as $o, br as wo, bs as So, bt as xo, bu as ko, bv as To, bw as ya, bx as Ro, by as Ao, bz as Do, bA as Fo, bB as Oo, bC as Eo, bD as qo, bE as No, bF as Po, bG as Lo, bH as Mo, bI as Bo } from "../chunks/resolve-dashboard-input-context-DfJshnw8.js";
5
+ import { e7 as Xr, c3 as Zr, c8 as ed, dM as td, dN as ad, d$ as sd, d_ as od, dV as nd, fd as id, e0 as rd, e1 as dd, et as ld, dn as cd, dp as ud, dq as fd, dk as md, dl as hd, dm as pd, dg as gd, dh as bd, dj as yd, di as vd, dr as _d, en as Id, dO as Cd, cB as $d, eT as wd, eS as Sd, ey as xd, ez as kd, cA as Td, dG as Rd, e9 as Ad, cK as Dd, ff as Fd, cm as Od, bZ as Ed, eq as qd, ec as Nd, eA as Pd, fG as Ld, fR as Md, fK as Bd, dY as Vd, dZ as Gd, cH as jd, fp as Kd, fn as Wd, fo as Ud, bW as Qd, fB as Hd, eb as Yd, cN as zd, ei as Jd, cG as Xd, fV as Zd, fW as el, f2 as tl, c1 as al, ea as sl, dv as ol, fs as nl, f_ as il, d5 as rl, fL as dl, dU as ll, cI as cl, cW as ul, b_ as fl, eI as ml, eJ as hl, ds as pl, d6 as gl, ep as bl, bQ as yl, eu as vl, f0 as _l, c2 as Il, ee as Cl, g3 as $l, ft as wl, bR as Sl, c7 as xl, eD as kl, d0 as Tl, fY as Rl, f3 as Al, eh as Dl, f1 as Fl, es as Ol, dF as El, dE as ql, cF as Nl, eo as Pl, eW as Ll, e$ as Ml, ci as Bl, ct as Vl, em as Gl, cX as jl, d9 as Kl, db as Wl, cZ as Ul, bO as Ql, fM as Hl, fQ as Yl, eU as zl, eX as Jl, eY as Xl, cO as Zl, ex as ec, ev as tc, eO as ac, bS as sc, b$ as oc, f4 as nc, fC as ic, c0 as rc, e5 as dc, e6 as lc, cs as cc, cq as uc, cr as fc, f$ as mc, g0 as hc, g2 as pc, da as gc, cj as bc, ck as yc, cl as vc, cJ as _c, cL as Ic, fX as Cc, fa as $c, dJ as wc, k as Sc, df as xc, cy as kc, cT as Tc, b as Rc, dc as Ac, dK as Dc, ca as Fc, cb as Oc, c4 as Ec, dw as qc, eZ as Nc, eg as Pc, cx as Lc, eF as Mc, cP as Bc, cp as Vc, bJ as Gc, cC as jc, dW as Kc, ce as Wc, e4 as Uc, cn as Qc, dA as Hc, fq as Yc, g1 as zc, bX as Jc, dC as Xc, eG as Zc, dD as eu, eK as tu, fi as au, fh as su, ej as ou, d2 as nu, cS as iu, cU as ru, o as du, cV as lu, f8 as cu, e2 as uu, ef as fu, bK as mu, bL as hu, bM as pu, bT as gu, fI as bu, fD as yu, e8 as vu, fE as _u, c$ as Iu, cD as Cu, d8 as $u, e3 as wu, f7 as Su, dH as xu, dI as ku, c9 as Tu, fZ as Ru, ed as Au, f5 as Du, eV as Fu, dL as Ou, e_ as Eu, fm as qu, fk as Nu, M as Pu, fH as Lu, cw as Mu, fN as Bu, fO as Vu, dS as Gu, de as ju, cd as Ku, ew as Wu, er as Uu, bN as Qu, d3 as Hu, d4 as Yu, cE as zu, du as Ju, ch as Xu, cu as Zu, cv as ef, dP as tf, dQ as af, cz as sf, bU as of, cg as nf, dy as rf, fg as df, fc as lf, fP as cf, dz as uf, dx as ff, fS as mf, cc as hf, fe as pf, d1 as gf, fb as bf, dd as yf, eH as vf, fr as _f, dR as If, c_ as Cf, co as $f, dX as wf, bP as Sf, cf as xf, ek as kf, fl as Tf, eE as Rf, d7 as Af, dB as Df, bY as Ff, el as Of, fT as Ef, eC as qf, eB as Nf, f9 as Pf, fj as Lf, cM as Mf, cR as Bf, bV as Vf, fJ as Gf, fF as jf, fU as Kf, dt as Wf, f6 as Uf, eR as Qf, dT as Hf, eQ as Yf, fv as zf, c5 as Jf, eN as Xf, c6 as Zf, eP as em, cQ as tm, eL as am, eM as sm, fu as om, fw as nm, fx as im, fy as rm, cY as dm, fz as lm, fA as cm } from "../chunks/resolve-dashboard-input-context-DfJshnw8.js";
6
+ import { L as Vo, M as Wa, H as Ua, N as Go, O as jo, P as Et, Q as Qa, R as Ha, D as Se, S as Ko, T as Wo, I as Uo, U as Qo } from "../chunks/bookmark-state-Be2W3s6t.js";
7
+ import { ah as fm, aB as mm, $ as hm, a0 as pm, ab as gm, af as bm, ac as ym, ad as vm, ae as _m, ai as Im, az as Cm, at as $m, F as wm, ax as Sm, G as xm, a4 as km, J as Tm, aA as Rm, a7 as Am, a8 as Dm, av as Fm, ag as Om, a5 as Em, ar as qm, aw as Nm, ay as Pm, as as Lm, au as Mm, a3 as Bm, a1 as Vm, ak as Gm, ap as jm, X as Km, Y as Wm, W as Um, Z as Qm, a6 as Hm, aq as Ym, aC as zm, al as Jm, aj as Xm, am as Zm, an as eh, ao as th, aa as ah, a9 as sh, _ as oh, a2 as nh } from "../chunks/bookmark-state-Be2W3s6t.js";
8
+ import { L as rh, D as dh, E as lh, d as ch, C as uh, k as fh, x as mh, A as hh, q as ph, s as gh, B as bh, z as yh, n as vh, o as _h, p as Ih, y as Ch, F as $h, t as wh, v as Sh, u as xh, w as kh } from "../chunks/stored-dashboard-D6FtWx_3.js";
9
+ import { r as Ho, ac as va } from "../chunks/pivot-result-contract-expectations-Dt0E1Wou.js";
10
+ import { aS as Rh, aR as Ah, aN as Dh, aQ as Fh, aT as Oh, aH as Eh } from "../chunks/pivot-result-contract-expectations-Dt0E1Wou.js";
11
+ import { f as Yo, w as zo, D as _a, a as Jo } from "../chunks/metric-comparison-BeKnUD08.js";
12
+ import { p as Xo } from "../chunks/report-runtime-context-g4Zp_TU9.js";
13
+ import { r as Ya, D as Ia, h as Zo, i as za, j as en, k as tn, l as an, f as xt, m as sn, v as on } from "../chunks/filter-reach-copy-DoXmRmk-.js";
14
+ import { N as Nh, $ as Ph, S as Lh, o as Mh, t as Bh, w as Vh, u as Gh, G as jh, C as Kh, n as Wh, q as Uh, J as Qh, d as Hh, a1 as Yh, L as zh, M as Jh, _ as Xh, a0 as Zh, E as ep, X as tp, F as ap, x as sp, y as op, A as np, p as ip, z as rp, R as dp, O as lp, a2 as cp, Z as up, Y as fp, K as mp, H as hp, I as pp, U as gp, T as bp, Q as yp, V as vp, P as _p, s as Ip, W as Cp, B as $p } from "../chunks/filter-reach-copy-DoXmRmk-.js";
15
+ import { a9 as Ja, r as Xa, aP as nn, b0 as Pe, aN as rn, aS as dn, aM as ln, aG as cn, aO as un, a7 as fn } from "../chunks/validators-BlEWWX9O.js";
16
16
  import "../chunks/schema-C9NPiIru.js";
17
- import { i as Za, C as je, D as un, e as fn, b as mn } from "../chunks/edit-9df1zOWe.js";
17
+ import { i as Za, C as je, D as mn, e as hn, b as pn } from "../chunks/edit-9df1zOWe.js";
18
18
  import "../chunks/matrix-operation-contract-CAanJeCj.js";
19
- import { C as Me, D as Oe, B as hn, f as pn, z as qt, t as Be, e as gn } from "../chunks/analytics-base-schemas-8wz9vqn_.js";
20
- import { A as Ca, E as bn } from "../chunks/matrix-analytical-definition-CyWOwLmE.js";
19
+ import { C as Me, D as Oe, B as gn, f as bn, z as qt, t as Be, e as yn } from "../chunks/analytics-base-schemas-8wz9vqn_.js";
20
+ import { A as Ca, E as vn } from "../chunks/matrix-analytical-definition-CyWOwLmE.js";
21
21
  import "zod";
22
22
  import "../value-format-preferences/index.js";
23
- import { d as yn } from "../chunks/raw-temporal-value-BzdgeDa7.js";
24
- import { C as pp, a as gp, S as bp } from "../chunks/pickers-DkqmtnTL.js";
25
- import { r as vn } from "../chunks/index-CV_Kzou0.js";
23
+ import { d as _n } from "../chunks/raw-temporal-value-BzdgeDa7.js";
24
+ import { C as Sp, a as xp, S as kp } from "../chunks/pickers-DkqmtnTL.js";
25
+ import { r as In } from "../chunks/index-CV_Kzou0.js";
26
26
  import "../chunks/context-CVXTFljo.js";
27
- import { v as ze, a as _n, i as $a, o as mt, d as In, b as Cn, c as $n } from "../chunks/variable-draft-CSK9Ps1o.js";
28
- import { S as vp, f as _p, g as Ip, e as Cp, n as $p } from "../chunks/variable-draft-CSK9Ps1o.js";
29
- import { K as xp, a as Sp, d as kp, r as Tp, b as Rp } from "../chunks/dates-Bb0sn54j.js";
30
- import { b as Dp, d as Fp } from "../chunks/bookmark-impact-B0k90wq8.js";
31
- import { r as be, b as wn, s as xn, a as Sn } from "../chunks/resolver-DG_tfEpt.js";
32
- import { n as kn, r as Tn } from "../chunks/index-BVKzKl5d.js";
33
- import { e as Ep } from "../chunks/brand-BoUV0iHF.js";
34
- const qr = [
27
+ import { v as ze, a as Cn, i as $a, o as mt, d as $n, b as wn, c as Sn } from "../chunks/variable-draft-CxdgKDCx.js";
28
+ import { S as Rp, f as Ap, g as Dp, e as Fp, n as Op } from "../chunks/variable-draft-CxdgKDCx.js";
29
+ import { K as qp, a as Np, d as Pp, r as Lp, b as Mp } from "../chunks/dates-B-bKEsiu.js";
30
+ import { b as Vp, d as Gp } from "../chunks/bookmark-impact-Dh-wiTs3.js";
31
+ import { r as be, b as xn, s as kn, a as Tn } from "../chunks/resolver-DG_tfEpt.js";
32
+ import { n as Rn, r as An } from "../chunks/index-BVKzKl5d.js";
33
+ import { e as Kp } from "../chunks/brand-BoUV0iHF.js";
34
+ const Pr = [
35
35
  "cardType",
36
36
  "sql",
37
37
  "python",
@@ -47,7 +47,7 @@ const qr = [
47
47
  "globalDateComparison",
48
48
  "calendarContext",
49
49
  "sqlRowLimit"
50
- ], Nr = [
50
+ ], Lr = [
51
51
  "cardId",
52
52
  "cardTitle",
53
53
  "cache_config",
@@ -71,10 +71,10 @@ function ye(e) {
71
71
  function Ke(e) {
72
72
  return typeof e == "string" ? e : "";
73
73
  }
74
- function Rn(e, a = {}) {
74
+ function Dn(e, a = {}) {
75
75
  const t = ye(e), s = Nt(a), o = {};
76
76
  if (t.calendarContext !== void 0) {
77
- const i = zo(t.calendarContext);
77
+ const i = Xo(t.calendarContext);
78
78
  if (!i.ok)
79
79
  throw new le(
80
80
  `${s}calendarContext: ${i.issues.map((d) => d.message).join("; ")}`,
@@ -86,25 +86,25 @@ function Rn(e, a = {}) {
86
86
  const n = ws(t.resolvedPrimaryDateField);
87
87
  if (!n.ok)
88
88
  throw new le(
89
- `${s}${xs(n.issues)}`,
89
+ `${s}${Ss(n.issues)}`,
90
90
  "resolvedPrimaryDateField",
91
91
  n.issues
92
92
  );
93
93
  if (t.resolvedPrimaryDateField && (o.resolvedPrimaryDateField = t.resolvedPrimaryDateField), t.globalDateComparison !== void 0) {
94
- const i = Qo(t.globalDateComparison);
94
+ const i = Yo(t.globalDateComparison);
95
95
  if (!i.ok)
96
96
  throw new le(
97
97
  `${s}Invalid globalDateComparison: ${i.errors.map((d) => `${d.path}: ${d.message}`).join("; ")}`,
98
98
  "globalDateComparison",
99
99
  i.errors
100
100
  );
101
- o.globalDateComparison = Ho(
101
+ o.globalDateComparison = zo(
102
102
  t.globalDateComparison
103
103
  );
104
104
  }
105
105
  return o;
106
106
  }
107
- function Pr(e, a = {}) {
107
+ function Mr(e, a = {}) {
108
108
  const t = ye(e), s = Nt(a), o = {};
109
109
  if (t.pagination !== void 0) {
110
110
  const n = ye(t.pagination), i = n.page, d = n.pageSize;
@@ -136,8 +136,8 @@ function Pr(e, a = {}) {
136
136
  }
137
137
  return o;
138
138
  }
139
- function Lr(e, a = {}) {
140
- const t = ye(e), s = Nt(a), o = (x) => new le(`${s}${x} is required`, x), n = Ke(t.connection_id).trim();
139
+ function Br(e, a = {}) {
140
+ const t = ye(e), s = Nt(a), o = (S) => new le(`${s}${S} is required`, S), n = Ke(t.connection_id).trim();
141
141
  if (!n) throw o("connection_id");
142
142
  const i = Ke(t.cardType).trim();
143
143
  if (!i) throw o("cardType");
@@ -147,7 +147,7 @@ function Lr(e, a = {}) {
147
147
  const l = ye(t.cardConfig), c = Ke(t.sql), h = Ke(t.python), p = !!a.configOptional || Object.keys(l).length > 0;
148
148
  if (d === "config" && !p) throw o("cardConfig");
149
149
  if (d === "freeform" && !c.trim()) throw o("sql");
150
- const v = Ss({
150
+ const v = xs({
151
151
  hasExecutableConfig: p,
152
152
  sql: c,
153
153
  normalizedPython: h
@@ -160,7 +160,7 @@ function Lr(e, a = {}) {
160
160
  if (d === "none") throw o("cardConfig");
161
161
  const b = ye(t.cardDataSource);
162
162
  if (Object.keys(b).length === 0) throw o("cardDataSource");
163
- const S = ks({
163
+ const x = ks({
164
164
  controlValues: t.controlValues,
165
165
  controlDefinitions: t.controlDefinitions,
166
166
  cardControlDefinitions: t.cardControlDefinitions,
@@ -175,16 +175,16 @@ function Lr(e, a = {}) {
175
175
  cardConfig: l,
176
176
  cardDataSource: b,
177
177
  active_filters: Array.isArray(t.active_filters) ? t.active_filters : [],
178
- controlValues: S.controlValues,
179
- controlDefinitions: S.controlDefinitions,
180
- cardControlDefinitions: S.cardControlDefinitions,
181
- controlBindings: S.controlBindings,
182
- ...Rn(t, a),
178
+ controlValues: x.controlValues,
179
+ controlDefinitions: x.controlDefinitions,
180
+ cardControlDefinitions: x.cardControlDefinitions,
181
+ controlBindings: x.controlBindings,
182
+ ...Dn(t, a),
183
183
  ...typeof t.sqlRowLimit == "number" && Number.isInteger(t.sqlRowLimit) && t.sqlRowLimit > 0 ? { sqlRowLimit: t.sqlRowLimit } : {}
184
184
  };
185
185
  }
186
- const ht = ["#14b8a6", "#5eead4", "#374151", "#6b7280", "#d1d5db"], An = ["spacing", "canvasPadding", "canvas", "cardCorners", "chartColors"], es = ["light", "dark"];
187
- function Mr(e) {
186
+ const ht = ["#14b8a6", "#5eead4", "#374151", "#6b7280", "#d1d5db"], Fn = ["spacing", "canvasPadding", "canvas", "cardCorners", "chartColors"], es = ["light", "dark"];
187
+ function Vr(e) {
188
188
  const a = [], t = gt(e.globalStyle) ? e.globalStyle : {}, s = gt(t.default) ? t.default : {}, o = gt(t.dark) ? t.dark : {}, n = (p) => be(o, p) ?? be(s, p), i = {}, d = n(["gridLayout", "margin"]);
189
189
  Array.isArray(d) && typeof d[1] == "number" && (i.spacing = Fe("spacing", d[1], a), i.canvasPadding = Fe("canvasPadding", d[1], a));
190
190
  const l = n(["cardBorderRadius"]);
@@ -194,24 +194,24 @@ function Mr(e) {
194
194
  const h = n(["chart", "options", "borderRadius"]);
195
195
  typeof h == "number" && (i.barCorners = Fe("barCorners", h, a));
196
196
  for (const p of es) {
197
- const v = p === "light" ? be(s, ["canvasTheme"]) : n(["canvasTheme"]), b = On(v, a);
197
+ const v = p === "light" ? be(s, ["canvasTheme"]) : n(["canvasTheme"]), b = qn(v, a);
198
198
  b !== void 0 && (i.canvas = { ...i.canvas, [p]: b });
199
- const S = Fn(s, o, p);
200
- if (S) {
201
- const x = S.filter(Za).map((E) => E.toLowerCase());
202
- x.length < S.length && a.push({ field: "chartColors", kind: "dropped_colour", detail: `${p}: ${S.length - x.length} colours that aren't hex` }), x.length >= je.min && (i.chartColors = { ...i.chartColors, [p]: x.slice(0, je.max) }), x.length > je.max && a.push({ field: "chartColors", kind: "clamped", detail: `${p}: kept the first ${je.max} colours` });
199
+ const x = En(s, o, p);
200
+ if (x) {
201
+ const S = x.filter(Za).map((E) => E.toLowerCase());
202
+ S.length < x.length && a.push({ field: "chartColors", kind: "dropped_colour", detail: `${p}: ${x.length - S.length} colours that aren't hex` }), S.length >= je.min && (i.chartColors = { ...i.chartColors, [p]: S.slice(0, je.max) }), S.length > je.max && a.push({ field: "chartColors", kind: "clamped", detail: `${p}: kept the first ${je.max} colours` });
203
203
  }
204
204
  }
205
- return { style: Dn(i, e.organizationAppearance, a), notes: a };
205
+ return { style: On(i, e.organizationAppearance, a), notes: a };
206
206
  }
207
- function Dn(e, a, t) {
208
- const s = wn({ organizationAppearance: a ? kn(a).spec : null }), o = { ...e };
207
+ function On(e, a, t) {
208
+ const s = xn({ organizationAppearance: a ? Rn(a).spec : null }), o = { ...e };
209
209
  for (const n of Object.keys(e)) {
210
- const i = Sn[n], d = n === "canvas" || n === "chartColors";
210
+ const i = Tn[n], d = n === "canvas" || n === "chartColors";
211
211
  for (const l of es) {
212
- const c = xn(o, n, l);
212
+ const c = kn(o, n, l);
213
213
  if (c === void 0) continue;
214
- const h = An.includes(n) && be(Tn(a, l), i) !== void 0, p = JSON.stringify(be(s.schemes[l], i)) === JSON.stringify(c);
214
+ const h = Fn.includes(n) && be(An(a, l), i) !== void 0, p = JSON.stringify(be(s.schemes[l], i)) === JSON.stringify(c);
215
215
  if (!(!h && !p))
216
216
  if ((d || l === "light") && t.push({ field: n, kind: h ? "brand_wins" : "equal_to_inherited", detail: d ? l : `${JSON.stringify(c)}` }), d) {
217
217
  const v = { ...o[n] };
@@ -221,7 +221,7 @@ function Dn(e, a, t) {
221
221
  }
222
222
  return Object.keys(o).length > 0 ? o : void 0;
223
223
  }
224
- function Fn(e, a, t) {
224
+ function En(e, a, t) {
225
225
  const s = be(e, ["chart", "dataset", "backgroundColor"]), o = be(a, ["chart", "dataset", "backgroundColor"]), n = pt(ht, s);
226
226
  if (t === "light") return Array.isArray(s) ? n : void 0;
227
227
  const i = pt(n, pt(ht, o));
@@ -233,7 +233,7 @@ function pt(e, a) {
233
233
  const t = Math.max(e.length, a.length);
234
234
  return Array.from({ length: t }, (s, o) => a[o] !== void 0 ? String(a[o]) : e[o]);
235
235
  }
236
- function On(e, a) {
236
+ function qn(e, a) {
237
237
  if (!(e == null || e === "")) {
238
238
  if (e === "muted") return "muted";
239
239
  if (e === "clear") return "background";
@@ -242,7 +242,7 @@ function On(e, a) {
242
242
  }
243
243
  }
244
244
  function Fe(e, a, t) {
245
- const { min: s, max: o } = un[e], n = Math.min(o, Math.max(s, Math.round(a)));
245
+ const { min: s, max: o } = mn[e], n = Math.min(o, Math.max(s, Math.round(a)));
246
246
  return n !== a && t.push({ field: e, kind: "clamped", detail: `${a} → ${n}` }), n;
247
247
  }
248
248
  function gt(e) {
@@ -259,21 +259,21 @@ const bt = {
259
259
  chartColors: (e, a) => a.chartColors = e,
260
260
  barCorners: (e, a) => a.barCorners = e
261
261
  };
262
- function En(e) {
262
+ function Nn(e) {
263
263
  var t;
264
264
  const a = {};
265
265
  for (const [s, o] of Object.entries(e ?? {}))
266
266
  o !== void 0 && ((t = bt[s]) == null || t.call(bt, o, a));
267
267
  return a;
268
268
  }
269
- const qn = {
269
+ const Pn = {
270
270
  global_date: "The date filter for the whole report can't be changed through the MCP. Change it in the editor; removing or excluding it works.",
271
271
  not_semantic: "This filter reads a database table, not a dataset, so it can't be changed through the MCP. Change it in the editor; removing or excluding it works.",
272
272
  scope_not_expressible: "This filter applies to chosen cards rather than whole sheets, so it can't be changed through the MCP. Change it in the editor; removing or excluding it works."
273
273
  };
274
- function Nn(e, a, t = {}) {
274
+ function Ln(e, a, t = {}) {
275
275
  var d;
276
- const s = ve(e), o = Mo(a.scope), n = new Set(Wa(e).map((l) => l.id)), i = {
276
+ const s = ve(e), o = Vo(a.scope), n = new Set(Wa(e).map((l) => l.id)), i = {
277
277
  reaches: [],
278
278
  excluded: [
279
279
  .../* @__PURE__ */ new Set([
@@ -358,16 +358,16 @@ function Nn(e, a, t = {}) {
358
358
  }
359
359
  return i;
360
360
  }
361
- function Pn(e, a) {
361
+ function Mn(e, a) {
362
362
  var o;
363
363
  const t = a.scope;
364
364
  if (t.kind === "allSheets") {
365
365
  if ((o = t.sheetKinds) != null && o.length && !t.sheetKinds.includes("dashboard")) return;
366
- const n = Bo(t);
366
+ const n = Go(t);
367
367
  return {
368
368
  sheetIds: "all",
369
369
  ...n.length ? { exceptSheetIds: [...n] } : {},
370
- ...Vo(t) ? { includesDocumentSheets: !0 } : {}
370
+ ...jo(t) ? { includesDocumentSheets: !0 } : {}
371
371
  };
372
372
  }
373
373
  if (t.kind !== "sheets") return;
@@ -383,12 +383,12 @@ function ts(e, a) {
383
383
  }
384
384
  function as(e, a, t, s) {
385
385
  var E, C, k;
386
- const { input: o } = a, n = Nn(e, o, s), i = (y, F) => ({
386
+ const { input: o } = a, n = Ln(e, o, s), i = (y, F) => ({
387
387
  filterId: o.id,
388
388
  label: o.label,
389
389
  editable: !1,
390
390
  kind: F,
391
- notEditable: { reason: y, message: qn[y] },
391
+ notEditable: { reason: y, message: Pn[y] },
392
392
  reaches: n.reaches,
393
393
  excluded: n.excluded,
394
394
  ...n.blocked ? { blocked: n.blocked } : {},
@@ -398,14 +398,14 @@ function as(e, a, t, s) {
398
398
  if (o.filter.kind === "global-date") return i("global_date", "global_date");
399
399
  const d = Ts(o.filter).filter((y) => y.kind === "semantic");
400
400
  if (d.length !== 1 || d[0].kind !== "semantic") return i("not_semantic", "field");
401
- const l = Pn(e, o);
401
+ const l = Mn(e, o);
402
402
  if (!l || a.origin !== "embeddedInput") return i("scope_not_expressible", "field");
403
403
  const c = ((E = o.filter.fieldMeta) == null ? void 0 : E.name) ?? ((C = o.filter.column) == null ? void 0 : C.split(".").pop()) ?? "", h = Ya({
404
404
  dashboard: e,
405
405
  target: { kind: "dashboardInput", input: o, scope: {} },
406
406
  calendar: ts(t, void 0)
407
- }).value, p = Ja(o.filter.dataType), v = p || (k = h == null ? void 0 : h.values) == null ? void 0 : k.filter((y) => ["string", "number", "boolean"].includes(typeof y)), b = Xa(h && "relativeMeta" in h ? h.relativeMeta : void 0), S = p ? b : void 0, x = S ? Ln(h == null ? void 0 : h.operation, S) ?? sn(
408
- S,
407
+ }).value, p = Ja(o.filter.dataType), v = p || (k = h == null ? void 0 : h.values) == null ? void 0 : k.filter((y) => ["string", "number", "boolean"].includes(typeof y)), b = Xa(h && "relativeMeta" in h ? h.relativeMeta : void 0), x = p ? b : void 0, S = x ? Bn(h == null ? void 0 : h.operation, x) ?? nn(
408
+ x,
409
409
  { use: "filterDefault", columnHasTime: Na(o.filter) === "datetime" },
410
410
  "defaultPeriod"
411
411
  ) : void 0;
@@ -418,15 +418,15 @@ function as(e, a, t, s) {
418
418
  field: c,
419
419
  selection: o.filter.type === "single" ? "single" : "multiple",
420
420
  ...v != null && v.length ? { defaultValues: v } : {},
421
- ...S ? { defaultPeriod: S } : {},
422
- ...x ? { defaultPeriodReadOnly: x } : {},
421
+ ...x ? { defaultPeriod: x } : {},
422
+ ...S ? { defaultPeriodReadOnly: S } : {},
423
423
  ...p ? { datePicker: o.filter.dateSelectionMode === "day" ? "day" : o.filter.dateSelectionMode === "months" ? "month" : "range" } : {},
424
424
  ...l,
425
425
  ...n
426
426
  };
427
427
  }
428
- function Ln(e, a) {
429
- const t = typeof e == "string" ? yn(e, a) : void 0;
428
+ function Bn(e, a) {
429
+ const t = typeof e == "string" ? _n(e, a) : void 0;
430
430
  return t ? {
431
431
  reason: "point_default",
432
432
  message: `The default is "${t}", a condition set in the editor. It stays while defaultPeriod is left out.`,
@@ -465,7 +465,7 @@ function is(e) {
465
465
  field: s
466
466
  }));
467
467
  }
468
- function Mn(e) {
468
+ function Vn(e) {
469
469
  const a = ns(e), t = /* @__PURE__ */ new Map();
470
470
  for (const { field: s } of is(e)) {
471
471
  const o = os(s, a);
@@ -473,14 +473,14 @@ function Mn(e) {
473
473
  }
474
474
  return [...t.values()];
475
475
  }
476
- function Bn(e, a, t) {
476
+ function Gn(e, a, t) {
477
477
  if (!t) return;
478
478
  const s = ca(a), o = is(e).find((d) => ca(d.ref) === s);
479
479
  if (!o) return;
480
480
  const n = os(o.field, ns(e)), i = n ? t[Pt(n)] : void 0;
481
481
  return i ? nt(i, o.field.name, n.datasetName) : void 0;
482
482
  }
483
- const tt = ["orientation", "stack", "donut", "columnOrder", "totals", "dataLabels", "legend", "axes", "comparisonDisplay", "inheritComparison", "trend", "trendGrain", "seeRecords"], Vn = {
483
+ const tt = ["orientation", "stack", "donut", "columnOrder", "totals", "dataLabels", "legend", "axes", "comparisonDisplay", "inheritComparison", "trend", "trendGrain", "seeRecords"], jn = {
484
484
  orientation: "orientation",
485
485
  stack: "stacking",
486
486
  donut: "donut hole",
@@ -494,28 +494,28 @@ const tt = ["orientation", "stack", "donut", "columnOrder", "totals", "dataLabel
494
494
  trend: "trend under its value",
495
495
  trendGrain: "trend grain",
496
496
  seeRecords: "records to see"
497
- }, Gn = { x: "xAxisConfig", y: "yAxisConfig" }, yt = { x: "horizontal", y: "vertical" };
498
- function jn(e) {
497
+ }, Kn = { x: "xAxisConfig", y: "yAxisConfig" }, yt = { x: "horizontal", y: "vertical" };
498
+ function Wn(e) {
499
499
  const a = `${e.sql ? "SQL " : ""}${Ps(e.type)}`;
500
500
  return `${/^[aeiou]/i.test(a) ? "an" : "a"} ${a}`;
501
501
  }
502
- function Kn(e, a, t) {
502
+ function Un(e, a, t) {
503
503
  const s = Object.fromEntries(Object.entries(a).filter(([o, n]) => n !== void 0 && !t.includes(o)));
504
504
  return Object.keys(s).length ? { op: "card.update", cardId: e.cardRef, ...s } : void 0;
505
505
  }
506
- function Wn(e, a, t, s, o) {
507
- var b, S, x, E, C, k, y, F, w, N, I;
506
+ function Qn(e, a, t, s, o) {
507
+ var b, x, S, E, C, k, y, F, w, N, I;
508
508
  const n = tt.filter((_) => t[_] !== void 0);
509
509
  if (!n.length) return {};
510
510
  const i = tt.filter((_) => a.settings.has(_)), d = n.filter((_) => !a.settings.has(_));
511
511
  for (const _ of d)
512
512
  o.push(
513
- U("setting_not_for_card", {
514
- message: `${K(e.title)} is ${jn(a)}, which has no ${Vn[_]}.`,
513
+ Q("setting_not_for_card", {
514
+ message: `${W(e.title)} is ${Wn(a)}, which has no ${jn[_]}.`,
515
515
  path: `${s.path}.${_}`,
516
516
  fix: i.length ? `Leave out ${_}; this card takes ${i.join(", ")}.` : `Leave out ${_}.`,
517
517
  allowed: i,
518
- suggestedChange: Kn(s, t, d)
518
+ suggestedChange: Un(s, t, d)
519
519
  })
520
520
  );
521
521
  if (d.length) return {};
@@ -532,15 +532,15 @@ function Wn(e, a, t, s, o) {
532
532
  _ && (l.columnOrder = _);
533
533
  }
534
534
  if (t.totals) {
535
- const _ = Os(e, a, t.totals, ((S = v.totals) == null ? void 0 : S.row) ?? !1, s, o);
535
+ const _ = Os(e, a, t.totals, ((x = v.totals) == null ? void 0 : x.row) ?? !1, s, o);
536
536
  _ && (l.totals = _);
537
537
  }
538
538
  if (t.dataLabels) {
539
539
  const _ = {};
540
540
  t.dataLabels.show !== Es(p) && (_.show = t.dataLabels.show);
541
541
  const D = t.dataLabels.format;
542
- if (D === null && ((x = v.dataLabels) != null && x.format) && (_.format = null), D) {
543
- const M = Un(e, a, D, `${s.path}.dataLabels.format`, o);
542
+ if (D === null && ((S = v.dataLabels) != null && S.format) && (_.format = null), D) {
543
+ const M = Hn(e, a, D, `${s.path}.dataLabels.format`, o);
544
544
  M && !Pe(M, (E = v.dataLabels) == null ? void 0 : E.format) && (_.format = M);
545
545
  }
546
546
  Object.keys(_).length && (l.dataLabels = _);
@@ -554,8 +554,8 @@ function Wn(e, a, t, s, o) {
554
554
  for (const M of ["x", "y"]) {
555
555
  const P = t.axes[M];
556
556
  if (!P) continue;
557
- const G = Qn(e, M, P, ((y = v.axes) == null ? void 0 : y[M]) ?? {}, M === _, `${s.path}.axes.${M}`, o);
558
- G && (D[Gn[M]] = G);
557
+ const G = Yn(e, M, P, ((y = v.axes) == null ? void 0 : y[M]) ?? {}, M === _, `${s.path}.axes.${M}`, o);
558
+ G && (D[Kn[M]] = G);
559
559
  }
560
560
  Object.keys(D).length && (l.axes = D);
561
561
  }
@@ -566,8 +566,8 @@ function Wn(e, a, t, s, o) {
566
566
  if (t.inheritComparison !== void 0 && t.inheritComparison !== (((w = e.preferences) == null ? void 0 : w.inheritGlobalComparison) !== !1) && (l.inheritComparison = t.inheritComparison), t.seeRecords !== void 0 && t.seeRecords !== (e.seeRecords !== !1) && (l.seeRecords = t.seeRecords), t.trend !== void 0 && t.trend !== (((N = e.config) == null ? void 0 : N.kpiBand) === "trend") && (l.trend = t.trend), t.trendGrain !== void 0) {
567
567
  const _ = Ns(e.config);
568
568
  _ ? o.push(
569
- U("value_invalid", {
570
- message: `${K(e.title)} draws its trend by its Trend By${_.granularity ? `, by ${_.granularity}` : ""}, so it takes no grain of its own.`,
569
+ Q("value_invalid", {
570
+ message: `${W(e.title)} draws its trend by its Trend By${_.granularity ? `, by ${_.granularity}` : ""}, so it takes no grain of its own.`,
571
571
  path: `${s.path}.trendGrain`,
572
572
  fix: "Change the Trend By's timeGrain in its query, or remove the Trend By to set a grain here.",
573
573
  allowed: []
@@ -576,13 +576,13 @@ function Wn(e, a, t, s, o) {
576
576
  }
577
577
  return l;
578
578
  }
579
- function Un(e, a, t, s, o) {
579
+ function Hn(e, a, t, s, o) {
580
580
  const n = String(t.type), i = Ls("cartesian", "number"), d = Me(n), l = d == null ? void 0 : d.safeParse(t);
581
581
  if (!i.includes(n) || !(l != null && l.success)) {
582
582
  const h = l && !l.success ? l.error.issues[0] : void 0;
583
583
  o.push(
584
- U("format_invalid", {
585
- message: i.includes(n) ? `That format for the values on ${K(e.title)} isn't valid: ${(h == null ? void 0 : h.message) ?? "invalid"}.` : `The values on ${K(e.title)} are numbers, so they can't take a ${n.replace("_", " ")} format.`,
584
+ Q("format_invalid", {
585
+ message: i.includes(n) ? `That format for the values on ${W(e.title)} isn't valid: ${(h == null ? void 0 : h.message) ?? "invalid"}.` : `The values on ${W(e.title)} are numbers, so they can't take a ${n.replace("_", " ")} format.`,
586
586
  path: s,
587
587
  fix: "Send a whole number, currency, percent, scientific or duration format.",
588
588
  allowed: i.includes(n) ? Oe(n) : [...i]
@@ -592,20 +592,20 @@ function Un(e, a, t, s, o) {
592
592
  }
593
593
  const c = La({ surface: a.type === "pie" ? "pie" : "cartesian", value: "number", rawValueKinds: [] }, l.data);
594
594
  if (!c.ok) {
595
- o.push(U("format_invalid", { message: `${K(e.title)} can't draw that format on its values: ${c.reason}.`, path: s }));
595
+ o.push(Q("format_invalid", { message: `${W(e.title)} can't draw that format on its values: ${c.reason}.`, path: s }));
596
596
  return;
597
597
  }
598
598
  return l.data;
599
599
  }
600
- function Qn(e, a, t, s, o, n, i) {
600
+ function Yn(e, a, t, s, o, n, i) {
601
601
  const d = {};
602
- t.title !== void 0 && (t.title !== null && !t.title.trim() ? i.push(U("value_invalid", { message: "An axis title can't be empty.", path: `${n}.title`, fix: "Send a title, or null for none." })) : (t.title ?? void 0) !== s.title && (d.title = t.title));
602
+ t.title !== void 0 && (t.title !== null && !t.title.trim() ? i.push(Q("value_invalid", { message: "An axis title can't be empty.", path: `${n}.title`, fix: "Send a title, or null for none." })) : (t.title ?? void 0) !== s.title && (d.title = t.title));
603
603
  const l = ["min", "max"].filter((c) => t[c] !== void 0 && t[c] !== null);
604
604
  if (!o && l.length) {
605
605
  const c = yt[a === "x" ? "y" : "x"];
606
606
  i.push(
607
- U("setting_not_for_card", {
608
- message: `${K(e.title)}'s ${yt[a]} axis lists categories; set a range on its ${c} axis.`,
607
+ Q("setting_not_for_card", {
608
+ message: `${W(e.title)}'s ${yt[a]} axis lists categories; set a range on its ${c} axis.`,
609
609
  path: `${n}.${l[0]}`,
610
610
  allowed: ["title"]
611
611
  })
@@ -617,7 +617,7 @@ function Qn(e, a, t, s, o, n, i) {
617
617
  const v = t[p];
618
618
  if (v !== void 0) {
619
619
  if (v !== null && !Number.isFinite(v)) {
620
- i.push(U("value_invalid", { message: `An axis ${p} must be a number.`, path: `${n}.${p}` }));
620
+ i.push(Q("value_invalid", { message: `An axis ${p} must be a number.`, path: `${n}.${p}` }));
621
621
  return;
622
622
  }
623
623
  (v ?? void 0) !== s[p] && (d[p] = v);
@@ -626,8 +626,8 @@ function Qn(e, a, t, s, o, n, i) {
626
626
  const c = t.min !== void 0 ? t.min : s.min, h = t.max !== void 0 ? t.max : s.max;
627
627
  if (typeof c == "number" && typeof h == "number" && c > h) {
628
628
  i.push(
629
- U("value_invalid", {
630
- message: `The ${yt[a]} axis of ${K(e.title)} can't start at ${c} and end at ${h}.`,
629
+ Q("value_invalid", {
630
+ message: `The ${yt[a]} axis of ${W(e.title)} can't start at ${c} and end at ${h}.`,
631
631
  path: n,
632
632
  fix: "Send a min no greater than the max."
633
633
  })
@@ -639,36 +639,36 @@ function Qn(e, a, t, s, o, n, i) {
639
639
  }
640
640
  function wa(e, a, t, s, o) {
641
641
  const n = o === "date" && s.role === "dimension";
642
- return U("setting_not_for_card", {
643
- message: o === "text" ? `${a} on ${K(e.title)} shows its text as it is; text formats apply on a Matrix only.` : o === "category" ? `${a} labels the categories of ${K(e.title)}, which a chart shows as the query returns them; format it on a table or a Matrix.` : `${K(e.title)} shows ${a}, ${rs(s)}, without a format of its own; this card type doesn't apply one.`,
642
+ return Q("setting_not_for_card", {
643
+ message: o === "text" ? `${a} on ${W(e.title)} shows its text as it is; text formats apply on a Matrix only.` : o === "category" ? `${a} labels the categories of ${W(e.title)}, which a chart shows as the query returns them; format it on a table or a Matrix.` : `${W(e.title)} shows ${a}, ${rs(s)}, without a format of its own; this card type doesn't apply one.`,
644
644
  path: t,
645
645
  ...n ? { fix: `Group ${a} by day, week, month, quarter or year to format its dates.` } : {}
646
646
  });
647
647
  }
648
648
  const rs = (e) => e.granularity ? `a date grouped by ${e.granularity}` : e.dataType ? `a ${e.dataType.toLowerCase()}` : "this column";
649
- function Se(e, a) {
649
+ function xe(e, a) {
650
650
  return `${e}.columns[${JSON.stringify(a)}]`;
651
651
  }
652
652
  function kt(e, a, t, s) {
653
653
  const { [s]: o, ...n } = t;
654
654
  return Object.keys(n).length ? { op: "card.update", cardId: e.cardRef, columns: { [a]: n } } : void 0;
655
655
  }
656
- function Hn(e, a, t) {
656
+ function zn(e, a, t) {
657
657
  const { hidden: s, width: o, ...n } = t;
658
658
  return Object.keys(n).length ? { op: "card.update", cardId: e.cardRef, columns: { [a]: n } } : void 0;
659
659
  }
660
660
  function We(e, a, t) {
661
661
  return { op: "card.update", cardId: e.cardRef, columns: { [a]: { format: t } } };
662
662
  }
663
- function Yn(e, a, t, s, o, n, i) {
663
+ function Jn(e, a, t, s, o, n, i) {
664
664
  var c;
665
665
  const d = o.label;
666
666
  if (d === void 0 || d === t.label) return;
667
- const l = `${Se(n.path, s)}.label`;
667
+ const l = `${xe(n.path, s)}.label`;
668
668
  if (!a.settings.has("columns.label") || !t.labelKey) {
669
669
  i.push(
670
- U("setting_not_for_card", {
671
- message: a.sql ? `${K(e.title)}'s column ${s} takes its header from the query; rename it in the SQL.` : `${s} on ${K(e.title)} takes no header of its own.`,
670
+ Q("setting_not_for_card", {
671
+ message: a.sql ? `${W(e.title)}'s column ${s} takes its header from the query; rename it in the SQL.` : `${s} on ${W(e.title)} takes no header of its own.`,
672
672
  path: l,
673
673
  allowed: ["hidden", "width", "format"].filter((h) => h !== "hidden" || a.settings.has("columns.hidden")),
674
674
  suggestedChange: kt(n, s, o, "label")
@@ -677,23 +677,23 @@ function Yn(e, a, t, s, o, n, i) {
677
677
  return;
678
678
  }
679
679
  if (d === null) {
680
- const h = ((c = Bn(e, t.ref, n.catalogs)) == null ? void 0 : c.label) || t.field || t.label;
680
+ const h = ((c = Gn(e, t.ref, n.catalogs)) == null ? void 0 : c.label) || t.field || t.label;
681
681
  return t.labelInherited && t.label === h ? void 0 : { key: t.labelKey, label: h, origin: "semantic" };
682
682
  }
683
683
  if (!d.trim()) {
684
- i.push(U("value_invalid", { message: "A column header can't be empty.", path: l, fix: "Send a header, or null to use the model's." }));
684
+ i.push(Q("value_invalid", { message: "A column header can't be empty.", path: l, fix: "Send a header, or null to use the model's." }));
685
685
  return;
686
686
  }
687
687
  return { key: t.labelKey, label: d };
688
688
  }
689
- function zn(e, a, t, s, o, n, i) {
689
+ function Xn(e, a, t, s, o, n, i) {
690
690
  var _, D, M;
691
- const d = `${Se(n.path, s)}.format`;
691
+ const d = `${xe(n.path, s)}.format`;
692
692
  if (!a.settings.has("columns.format")) {
693
- i.push(U("setting_not_for_card", { message: `${K(e.title)} takes no column formats.`, path: d }));
693
+ i.push(Q("setting_not_for_card", { message: `${W(e.title)} takes no column formats.`, path: d }));
694
694
  return;
695
695
  }
696
- const l = t.ref, c = ((_ = n.modelFormats) == null ? void 0 : _.status) === "read" ? n.modelFormats.formats : void 0, h = l.kind === "matrixLevel" ? c == null ? void 0 : c[l.levelId] : l.kind === "matrixMeasure" ? c == null ? void 0 : c[l.measureId] : void 0, p = Uo({
696
+ const l = t.ref, c = ((_ = n.modelFormats) == null ? void 0 : _.status) === "read" ? n.modelFormats.formats : void 0, h = l.kind === "matrixLevel" ? c == null ? void 0 : c[l.levelId] : l.kind === "matrixMeasure" ? c == null ? void 0 : c[l.measureId] : void 0, p = Ho({
697
697
  card: e,
698
698
  column: l,
699
699
  ...c ? { modelFormats: c } : {},
@@ -701,18 +701,18 @@ function zn(e, a, t, s, o, n, i) {
701
701
  }), v = p.source === "override" ? p.format : void 0;
702
702
  if (o === null) return v ? null : void 0;
703
703
  if (v && Pe(o, v)) return;
704
- const b = Ks(e, a, t, n.sqlResultColumns), S = b.value, x = Ws(b);
705
- if (x.length === 0) {
706
- i.push(wa(e, s, d, t, S));
704
+ const b = Ks(e, a, t, n.sqlResultColumns), x = b.value, S = Ws(b);
705
+ if (S.length === 0) {
706
+ i.push(wa(e, s, d, t, x));
707
707
  return;
708
708
  }
709
709
  const E = !("type" in o) || o.type === void 0;
710
710
  if (E && !p.format) {
711
- const P = x[0];
711
+ const P = S[0];
712
712
  i.push(
713
- U("format_invalid", {
713
+ Q("format_invalid", {
714
714
  // Unavailable is not "none": say which, so the agent knows the column may have a model format (ledger P2-20).
715
- message: ((D = n.modelFormats) == null ? void 0 : D.status) === "unavailable" ? `${s} on ${K(e.title)} may follow its model's format, which couldn't be read; state the whole format with its type.` : `${s} on ${K(e.title)} has no format to change; state the whole format with its type.`,
715
+ message: ((D = n.modelFormats) == null ? void 0 : D.status) === "unavailable" ? `${s} on ${W(e.title)} may follow its model's format, which couldn't be read; state the whole format with its type.` : `${s} on ${W(e.title)} has no format to change; state the whole format with its type.`,
716
716
  path: d,
717
717
  fix: "Add `type` to the format.",
718
718
  allowed: Oe(P),
@@ -722,12 +722,12 @@ function zn(e, a, t, s, o, n, i) {
722
722
  return;
723
723
  }
724
724
  const C = E ? { ...p.format, ...o } : o, k = String(C.type);
725
- if (!x.includes(k)) {
725
+ if (!S.includes(k)) {
726
726
  i.push(
727
- k === "string" ? wa(e, s, `${d}.type`, t, "text") : U("format_invalid", {
728
- message: S === "result" ? `${s} on ${K(e.title)} comes straight from the query, so it can't take a ${k.replace("_", " ")} format.` : `${s} on ${K(e.title)} is ${rs(t)}, so it can't take a ${k.replace("_", " ")} format.`,
727
+ k === "string" ? wa(e, s, `${d}.type`, t, "text") : Q("format_invalid", {
728
+ message: x === "result" ? `${s} on ${W(e.title)} comes straight from the query, so it can't take a ${k.replace("_", " ")} format.` : `${s} on ${W(e.title)} is ${rs(t)}, so it can't take a ${k.replace("_", " ")} format.`,
729
729
  path: `${d}.type`,
730
- allowed: [...x]
730
+ allowed: [...S]
731
731
  })
732
732
  );
733
733
  return;
@@ -736,59 +736,62 @@ function zn(e, a, t, s, o, n, i) {
736
736
  if (!y || !(F != null && F.success)) {
737
737
  const P = F && !F.success ? F.error.issues[0] : void 0;
738
738
  i.push(
739
- U("format_invalid", {
739
+ Q("format_invalid", {
740
740
  message: y ? (P == null ? void 0 : P.code) === "unrecognized_keys" ? `A ${k} format has no ${P.keys.join(", ")}.` : `That format for ${s} isn't valid: ${(P == null ? void 0 : P.message) ?? "invalid"}.` : `${JSON.stringify(k)} isn't a format type.`,
741
741
  path: d,
742
- fix: ei(k),
743
- allowed: y ? Oe(k) : [...hn],
742
+ fix: ai(k),
743
+ allowed: y ? Oe(k) : [...gn],
744
744
  ...p.format ? { suggestedChange: We(n, s, p.format) } : {}
745
745
  })
746
746
  );
747
747
  return;
748
748
  }
749
749
  const w = F.data;
750
- if (w.type === "temporal_bucket" && t.granularity && !va(w, t.granularity).ok) {
751
- const G = pn.filter(
752
- (B) => va({ presentation: { mode: "preset", preset: B } }, t.granularity).ok
753
- );
754
- i.push(
755
- U("date_finer_than_grain", {
756
- message: `${s} on ${K(e.title)} is grouped by ${t.granularity}, which that date format doesn't fit.`,
757
- path: d,
758
- allowed: G,
759
- suggestedChange: We(n, s, { type: "temporal_bucket", presentation: { mode: "preset", preset: G[0] ?? "short" } })
760
- })
761
- );
762
- return;
750
+ if (w.type === "temporal_bucket" && t.granularity) {
751
+ const P = t.granularity, G = va(w, P);
752
+ if (!G.ok) {
753
+ const B = Us(P) ? Qs(P).map((K) => ({ type: "temporal_bucket", presentation: { mode: "pattern", pattern: K } })) : bn.map((K) => ({ type: "temporal_bucket", presentation: { mode: "preset", preset: K } })).filter(
754
+ (K) => va(K, P).ok
755
+ );
756
+ i.push(
757
+ Q("date_finer_than_grain", {
758
+ message: `${s} on ${W(e.title)} is grouped by ${t.granularity}, which that date format doesn't fit: ${G.message}`,
759
+ path: d,
760
+ allowed: B.map(({ presentation: K }) => K.mode === "pattern" ? K.pattern : K.mode === "preset" ? K.preset : "auto"),
761
+ ...B[0] ? { suggestedChange: We(n, s, B[0]) } : {}
762
+ })
763
+ );
764
+ return;
765
+ }
763
766
  }
764
767
  if (w.type === "date") {
765
- const P = o, G = p.format ?? {}, B = Object.keys(P).filter((Z) => !ut.includes(Z) && !Pe(P[Z], G[Z]));
768
+ const P = o, G = p.format ?? {}, B = Object.keys(P).filter((K) => !ut.includes(K) && !Pe(P[K], G[K]));
766
769
  if (B.length) {
767
- const Z = Object.fromEntries(Object.entries(w).filter(([te]) => !B.includes(te)));
770
+ const K = Object.fromEntries(Object.entries(w).filter(([te]) => !B.includes(te)));
768
771
  i.push(
769
- U("format_invalid", {
772
+ Q("format_invalid", {
770
773
  message: `A date format set here takes a pattern or a preset; it doesn't set ${B.join(", ")}.`,
771
774
  path: d,
772
775
  fix: `Leave out ${B.join(", ")}.`,
773
776
  allowed: ut.filter((te) => te !== "type"),
774
- suggestedChange: We(n, s, Z)
777
+ suggestedChange: We(n, s, K)
775
778
  })
776
779
  );
777
780
  return;
778
781
  }
779
782
  }
780
- const N = w.type === "date" && b.surface === "detail_table" && b.value === "date" ? Us(t, w, (M = e.dataSource) == null ? void 0 : M.connectionType) : void 0;
783
+ const N = w.type === "date" && b.surface === "detail_table" && b.value === "date" ? Hs(t, w, (M = e.dataSource) == null ? void 0 : M.connectionType) : void 0;
781
784
  if (N) {
782
785
  i.push(
783
- U(
786
+ Q(
784
787
  "format_invalid",
785
788
  N.reason === "connection" ? {
786
- message: `${K(e.title)} can't show ${s} that way: ${N.message}`,
789
+ message: `${W(e.title)} can't show ${s} that way: ${N.message}`,
787
790
  path: d,
788
791
  fix: "Write the pattern in uppercase letters (YYYY MM DD HH mm ss) with no dialect, for example 'DD MMM YYYY' or 'HH:mm'.",
789
792
  allowed: ut.filter((P) => P !== "type")
790
793
  } : {
791
- message: `${K(e.title)} can't draw that format on ${s}: ${N.message}.`,
794
+ message: `${W(e.title)} can't draw that format on ${s}: ${N.message}.`,
792
795
  path: d,
793
796
  fix: "Change the format to one the column can show.",
794
797
  allowed: Oe(k)
@@ -800,8 +803,8 @@ function zn(e, a, t, s, o, n, i) {
800
803
  const I = La(b, w);
801
804
  if (!I.ok) {
802
805
  i.push(
803
- U("format_invalid", {
804
- message: `${K(e.title)} can't draw that format on ${s}: ${I.reason}.`,
806
+ Q("format_invalid", {
807
+ message: `${W(e.title)} can't draw that format on ${s}: ${I.reason}.`,
805
808
  path: d,
806
809
  fix: "Change the format to one the column can show.",
807
810
  allowed: Oe(k)
@@ -811,15 +814,15 @@ function zn(e, a, t, s, o, n, i) {
811
814
  }
812
815
  return v && Pe(v, w) ? void 0 : w;
813
816
  }
814
- function Jn(e, a, t, s, o, n, i) {
815
- var x, E;
817
+ function Zn(e, a, t, s, o, n, i) {
818
+ var S, E;
816
819
  const d = o.polarity;
817
820
  if (d === void 0) return;
818
- const l = `${Se(n.path, s)}.polarity`, c = t.ref;
821
+ const l = `${xe(n.path, s)}.polarity`, c = t.ref;
819
822
  if (!(a.settings.has("columns.polarity") && (c.kind === "sqlKpiValue" || c.kind === "field" && t.role === "measure"))) {
820
823
  i.push(
821
- U("setting_not_for_card", {
822
- message: t.role === "measure" || t.role === "value" ? `${K(e.title)} shows no comparison, so ${s} has no favorable direction.` : `${s} on ${K(e.title)} isn't a measure, so it has no favorable direction.`,
824
+ Q("setting_not_for_card", {
825
+ message: t.role === "measure" || t.role === "value" ? `${W(e.title)} shows no comparison, so ${s} has no favorable direction.` : `${s} on ${W(e.title)} isn't a measure, so it has no favorable direction.`,
823
826
  path: l,
824
827
  fix: "Leave out polarity.",
825
828
  suggestedChange: kt(n, s, o, "polarity")
@@ -827,51 +830,51 @@ function Jn(e, a, t, s, o, n, i) {
827
830
  );
828
831
  return;
829
832
  }
830
- const p = c.kind === "field" ? (E = (x = e.config) == null ? void 0 : x.metricColumns) == null ? void 0 : E.find((C) => C.id === c.fieldId) : void 0, v = c.kind === "sqlKpiValue" ? Ma(e) : void 0, b = c.kind === "sqlKpiValue" ? (v == null ? void 0 : v.source) === "sql" && v.polarity !== _a ? v.polarity : void 0 : p == null ? void 0 : p.comparisonPolarity, S = p == null ? void 0 : p.semanticComparisonPolarity;
833
+ const p = c.kind === "field" ? (E = (S = e.config) == null ? void 0 : S.metricColumns) == null ? void 0 : E.find((C) => C.id === c.fieldId) : void 0, v = c.kind === "sqlKpiValue" ? Ma(e) : void 0, b = c.kind === "sqlKpiValue" ? (v == null ? void 0 : v.source) === "sql" && v.polarity !== _a ? v.polarity : void 0 : p == null ? void 0 : p.comparisonPolarity, x = p == null ? void 0 : p.semanticComparisonPolarity;
831
834
  if (d === null) return b ? null : void 0;
832
- if (S && d !== S) {
835
+ if (x && d !== x) {
833
836
  i.push(
834
- U("polarity_set_by_model", {
835
- message: `The model says ${s} is ${S.replace(/_/g, " ")}; a card can't say otherwise.`,
837
+ Q("polarity_set_by_model", {
838
+ message: `The model says ${s} is ${x.replace(/_/g, " ")}; a card can't say otherwise.`,
836
839
  path: l,
837
840
  fix: "Change it in the model, or leave polarity out.",
838
- allowed: [S],
841
+ allowed: [x],
839
842
  suggestedChange: kt(n, s, o, "polarity")
840
843
  })
841
844
  );
842
845
  return;
843
846
  }
844
- return d === (S ?? b ?? _a) ? void 0 : d;
847
+ return d === (x ?? b ?? _a) ? void 0 : d;
845
848
  }
846
- function Xn(e, a, t, s, o, n, i, d) {
849
+ function ei(e, a, t, s, o, n, i, d) {
847
850
  var h, p, v;
848
851
  if (o.hidden === void 0 && o.width === void 0) return {};
849
- const l = Se(i.path, s);
852
+ const l = xe(i.path, s);
850
853
  if (!a.settings.has("columns.hidden") || t.resultKey === void 0) {
851
854
  const b = a.pivoted && t.role === "measure";
852
855
  return d.push(
853
- U("setting_not_for_card", {
854
- message: b ? `${s} on ${K(e.title)} has a column for each pivot value; hide or size them in the editor.` : `${K(e.title)} has no hidden columns or column widths; those are for tables.`,
856
+ Q("setting_not_for_card", {
857
+ message: b ? `${s} on ${W(e.title)} has a column for each pivot value; hide or size them in the editor.` : `${W(e.title)} has no hidden columns or column widths; those are for tables.`,
855
858
  path: `${l}.${o.hidden !== void 0 ? "hidden" : "width"}`,
856
- allowed: b ? ["label", "format"] : ["label", "format"].filter((S) => a.settings.has(`columns.${S}`)),
857
- suggestedChange: Hn(i, s, o)
859
+ allowed: b ? ["label", "format"] : ["label", "format"].filter((x) => a.settings.has(`columns.${x}`)),
860
+ suggestedChange: zn(i, s, o)
858
861
  })
859
862
  ), {};
860
863
  }
861
864
  const c = {};
862
865
  if (o.hidden !== void 0 && o.hidden !== ((n == null ? void 0 : n.hidden) === !0) && (c.hidden = o.hidden), o.width !== void 0 && o.width !== ((n == null ? void 0 : n.width) ?? null)) {
863
- const { minSize: b, maxSize: S } = js((v = (p = (h = e.preferences) == null ? void 0 : h.tablePrefs) == null ? void 0 : p.columnSettingsMap) == null ? void 0 : v[t.resultKey]);
864
- o.width !== null && (!Number.isFinite(o.width) || o.width < b || o.width > S) ? d.push(
865
- U("value_invalid", {
866
- message: `${s} on ${K(e.title)} can be ${b} to ${S} pixels wide.`,
866
+ const { minSize: b, maxSize: x } = js((v = (p = (h = e.preferences) == null ? void 0 : h.tablePrefs) == null ? void 0 : p.columnSettingsMap) == null ? void 0 : v[t.resultKey]);
867
+ o.width !== null && (!Number.isFinite(o.width) || o.width < b || o.width > x) ? d.push(
868
+ Q("value_invalid", {
869
+ message: `${s} on ${W(e.title)} can be ${b} to ${x} pixels wide.`,
867
870
  path: `${l}.width`,
868
- fix: `Send a width from ${b} to ${S} pixels, or null for automatic.`
871
+ fix: `Send a width from ${b} to ${x} pixels, or null for automatic.`
869
872
  })
870
873
  ) : c.width = o.width;
871
874
  }
872
875
  return c;
873
876
  }
874
- function Zn(e, a, t) {
877
+ function ti(e, a, t) {
875
878
  var E, C, k, y;
876
879
  const { columns: s = {}, ...o } = a.settings ?? {}, n = [], i = tt.some((F) => o[F] !== void 0), d = !!((C = (E = a.highlights) == null ? void 0 : E.add) != null && C.length || (y = (k = a.highlights) == null ? void 0 : k.remove) != null && y.length);
877
880
  if (!Object.keys(s).length && !i && !d) return { ok: !0, labels: [], settings: null, warnings: [] };
@@ -879,11 +882,11 @@ function Zn(e, a, t) {
879
882
  if (!l)
880
883
  return {
881
884
  ok: !1,
882
- problems: [U("setting_not_for_card", { message: `${K(e.title)} takes no card settings through this tool.`, path: t.path })]
885
+ problems: [Q("setting_not_for_card", { message: `${W(e.title)} takes no card settings through this tool.`, path: t.path })]
883
886
  };
884
- const c = Wn(e, l, o, t, n), h = Bs(e, l, t.sqlResultColumns), p = d ? Vs(e, l, h, a.highlights, t, n) : void 0, v = Ft(e), b = [], S = [];
887
+ const c = Qn(e, l, o, t, n), h = Bs(e, l, t.sqlResultColumns), p = d ? Vs(e, l, h, a.highlights, t, n) : void 0, v = Ft(e), b = [], x = [];
885
888
  for (const [F, w] of Object.entries(s)) {
886
- const N = Gs(h, F, { path: Se(t.path, F), cardTitle: K(e.title) });
889
+ const N = Gs(h, F, { path: xe(t.path, F), cardTitle: W(e.title) });
887
890
  if (!N.ok) {
888
891
  n.push(N.problem);
889
892
  continue;
@@ -891,33 +894,33 @@ function Zn(e, a, t) {
891
894
  const I = N.column;
892
895
  if (I.sqlName === "inferred") {
893
896
  n.push(
894
- U("columns_unavailable", {
895
- message: `${K(e.title)}'s columns weren't read from its query, so ${F} can't be checked.`,
896
- path: Se(t.path, F),
897
+ Q("columns_unavailable", {
898
+ message: `${W(e.title)}'s columns weren't read from its query, so ${F} can't be checked.`,
899
+ path: xe(t.path, F),
897
900
  fix: "Check that the card runs and returns rows, then propose again."
898
901
  })
899
902
  );
900
903
  continue;
901
904
  }
902
- const _ = Yn(e, l, I, F, w, t, n);
905
+ const _ = Jn(e, l, I, F, w, t, n);
903
906
  _ && b.push(_);
904
- const D = Xn(e, l, I, F, w, v.columns[I.name], t, n), M = w.format !== void 0 ? zn(e, l, I, F, w.format, t, n) : void 0, P = Jn(e, l, I, F, w, t, n), G = {
907
+ const D = ei(e, l, I, F, w, v.columns[I.name], t, n), M = w.format !== void 0 ? Xn(e, l, I, F, w.format, t, n) : void 0, P = Zn(e, l, I, F, w, t, n), G = {
905
908
  column: I.ref,
906
909
  ...D,
907
910
  ...M !== void 0 ? { format: M } : {},
908
911
  ...P !== void 0 ? { polarity: P } : {}
909
912
  };
910
- Object.keys(G).length > 1 && S.push(G);
913
+ Object.keys(G).length > 1 && x.push(G);
911
914
  }
912
915
  if (n.length) return { ok: !1, problems: n };
913
- const x = { ...c, ...S.length ? { columns: S } : {}, ...p ? { highlights: p } : {} };
914
- return { ok: !0, labels: b, settings: Object.keys(x).length ? x : null, warnings: [] };
916
+ const S = { ...c, ...x.length ? { columns: x } : {}, ...p ? { highlights: p } : {} };
917
+ return { ok: !0, labels: b, settings: Object.keys(S).length ? S : null, warnings: [] };
915
918
  }
916
- function ei(e) {
919
+ function ai(e) {
917
920
  const a = Me(e), t = a && a === Me("number") ? ua.number : e === "temporal_bucket" || e === "date" ? ua[e] : void 0;
918
921
  return t ? `Send a stored format: ${t}.` : "Send the format in the stored shape the outline shows.";
919
922
  }
920
- function ti(e, a, t, s, o) {
923
+ function si(e, a, t, s, o) {
921
924
  var C, k, y, F, w, N;
922
925
  const n = we(e, { sql: !0, calculations: !1 });
923
926
  if (!n.editable) return [n.message];
@@ -942,33 +945,33 @@ function ti(e, a, t, s, o) {
942
945
  b("dimensions", _(d.dimensions, t), _(i.dimensions, n.matrix)), b("matrix.columns", t == null ? void 0 : t.columns, (C = n.matrix) == null ? void 0 : C.columns);
943
946
  } else
944
947
  b("dimensions", d.dimensions, i.dimensions);
945
- const S = d.timeWindow !== void 0 && !d.timeGrain, x = S && i.timeWindow === void 0 ? void 0 : S && d.dateField === void 0 ? c == null ? void 0 : c.dateField : d.dateField;
946
- x !== void 0 && (i.dateField === void 0 || v(x) !== v(i.dateField)) && p.push("dateField"), d.timeGrain !== void 0 && d.timeGrain !== i.timeGrain && p.push("timeGrain");
948
+ const x = d.timeWindow !== void 0 && !d.timeGrain, S = x && i.timeWindow === void 0 ? void 0 : x && d.dateField === void 0 ? c == null ? void 0 : c.dateField : d.dateField;
949
+ S !== void 0 && (i.dateField === void 0 || v(S) !== v(i.dateField)) && p.push("dateField"), d.timeGrain !== void 0 && d.timeGrain !== i.timeGrain && p.push("timeGrain");
947
950
  const E = (k = e.config) != null && k.matrix ? e.config.matrix.spec.measures.map((I) => I.kind === "aggregate" ? { aggregate: I.aggregate } : {}) : ((y = e.config) == null ? void 0 : y.metricColumns) ?? [];
948
951
  (d.measures ?? []).forEach((I, _) => {
949
952
  const D = I && typeof I == "object" ? I.aggregate : void 0;
950
953
  D && Ca(E[_] ?? {}) !== D && p.push(`the aggregate of measures[${_}]`);
951
954
  });
952
955
  for (const { key: I, label: _ } of Ne(a))
953
- Qs(e, I) !== _ && p.push(`the label "${_}"`);
956
+ Ys(e, I) !== _ && p.push(`the label "${_}"`);
954
957
  if (!o || o.aspects.includes("filters")) {
955
958
  const I = d.filters ?? [];
956
959
  let _ = i.filters ?? [];
957
960
  const D = d.timeWindow, M = i.timeWindow, P = (G, B) => {
958
- const Z = (te) => JSON.stringify((te ?? []).map(String));
959
- return v(G.field) === v(B.field) && G.operator === B.operator && (G.scope ?? "row") === (B.scope ?? "row") && (typeof G.field == "object" ? G.field.aggregate : void 0) === (typeof B.field == "object" ? B.field.aggregate : void 0) && (G.values === void 0 || Z(G.values) === Z(B.values));
961
+ const K = (te) => JSON.stringify((te ?? []).map(String));
962
+ return v(G.field) === v(B.field) && G.operator === B.operator && (G.scope ?? "row") === (B.scope ?? "row") && (typeof G.field == "object" ? G.field.aggregate : void 0) === (typeof B.field == "object" ? B.field.aggregate : void 0) && (G.values === void 0 || K(G.values) === K(B.values));
960
963
  };
961
964
  if (D && !M) {
962
965
  const G = ((c == null ? void 0 : c.filters) ?? []).filter(
963
- (B) => !(c != null && c.timeWindow) && !I.some((Z) => P(Z, B))
966
+ (B) => !(c != null && c.timeWindow) && !I.some((K) => P(K, B))
964
967
  );
965
- (!G.length || G.some((B) => !_.some((Z) => P(B, Z)))) && p.push("timeWindow"), _ = _.filter((B) => !G.some((Z) => P(Z, B)));
966
- } else D ? on(d.timeWindow, i.timeWindow) || p.push("timeWindow") : M && p.push("timeWindow");
968
+ (!G.length || G.some((B) => !_.some((K) => P(B, K)))) && p.push("timeWindow"), _ = _.filter((B) => !G.some((K) => P(K, B)));
969
+ } else D ? rn(d.timeWindow, i.timeWindow) || p.push("timeWindow") : M && p.push("timeWindow");
967
970
  (I.length !== _.length || I.some((G, B) => !P(G, _[B]))) && p.push("filters");
968
971
  }
969
972
  if (d.orderBy !== void 0) {
970
- const I = d.orderBy, _ = (w = (F = e.config) == null ? void 0 : F.sortByColumns) == null ? void 0 : w[0], D = _ && Hs(e.config ?? {}, _), M = I.field && typeof I.field == "object" ? I.field.aggregate : void 0;
971
- (!_ || !D || _.direction !== I.direction || v(I.field) !== Ys(D.name, Pa(D)) || M !== void 0 && Ca(D) !== M) && p.push("orderBy");
973
+ const I = d.orderBy, _ = (w = (F = e.config) == null ? void 0 : F.sortByColumns) == null ? void 0 : w[0], D = _ && zs(e.config ?? {}, _), M = I.field && typeof I.field == "object" ? I.field.aggregate : void 0;
974
+ (!_ || !D || _.direction !== I.direction || v(I.field) !== Js(D.name, Pa(D)) || M !== void 0 && Ca(D) !== M) && p.push("orderBy");
972
975
  }
973
976
  return d.limit !== void 0 && ((N = e.config) == null ? void 0 : N.rowLimit) !== d.limit && p.push("limit"), p;
974
977
  }
@@ -985,7 +988,7 @@ function Je(e, a) {
985
988
  const t = e.variables ?? [];
986
989
  return t.find((s) => s.name === a) ?? t.find((s) => s.id === a);
987
990
  }
988
- function ai(e, a, t, s) {
991
+ function oi(e, a, t, s) {
989
992
  var i;
990
993
  const o = Je(e, a);
991
994
  o || s.problem(cs(e, a, t));
@@ -1017,7 +1020,7 @@ function us(e, a) {
1017
1020
  ...t.places ? { details: { places: t.places } } : {}
1018
1021
  }));
1019
1022
  }
1020
- async function xa(e, a, t) {
1023
+ async function Sa(e, a, t) {
1021
1024
  var y, F;
1022
1025
  const { problem: s, need: o, services: n } = t, { path: i, query: d } = e, l = ls(e.get), c = {
1023
1026
  id: e.id,
@@ -1045,7 +1048,7 @@ async function xa(e, a, t) {
1045
1048
  const p = h.fields;
1046
1049
  for (const w of Ba({ ...d, measures: d.measures ?? [] })) s({ ...w, path: `${i}.${w.path}` });
1047
1050
  const v = (w, N) => {
1048
- const I = wt(w), _ = eo(w, d.datasetName);
1051
+ const I = wt(w), _ = ao(w, d.datasetName);
1049
1052
  _.toLowerCase() !== d.datasetName.toLowerCase() && s({
1050
1053
  code: "field_not_found",
1051
1054
  message: `A variable reads one dataset: "${I}" names ${_}, not ${d.datasetName}.`,
@@ -1060,22 +1063,22 @@ async function xa(e, a, t) {
1060
1063
  fix: "Use one of details.available, or read semaphor_get_dataset_schema.",
1061
1064
  details: { available: p.slice(0, 20).map((M) => M.name) }
1062
1065
  }), D;
1063
- }, b = d.measures ?? [], S = d.dimensions ?? [], x = {
1066
+ }, b = d.measures ?? [], x = d.dimensions ?? [], S = {
1064
1067
  ...c,
1065
1068
  mode: "data",
1066
1069
  dataSource: h.dataSource,
1067
1070
  connectionId: h.connectionId,
1068
1071
  get: "only",
1069
- ...(y = d.filters) != null && y.length ? { conditions: await oi(d, n, i, t.refuseAll) } : {}
1072
+ ...(y = d.filters) != null && y.length ? { conditions: await ii(d, n, i, t.refuseAll) } : {}
1070
1073
  };
1071
1074
  if (l.kind === "aggregate") {
1072
- (b.length !== 1 || S.length) && s({
1075
+ (b.length !== 1 || x.length) && s({
1073
1076
  code: "invalid_change",
1074
1077
  message: "An aggregate reads one measure and no dimension.",
1075
1078
  path: `${i}.query`,
1076
1079
  fix: `Send measures: [{ name, aggregate }] alone; for one field's value use get: "only", "first" or "list" with dimensions: [field].`
1077
1080
  }), d.orderBy && s({ code: "invalid_change", message: "An aggregate is one value, so it has no order.", path: `${i}.query.orderBy`, fix: "Leave out orderBy." });
1078
- const w = v(b[0], `${i}.query.measures[0]`), N = typeof b[0] == "string" ? void 0 : b[0].aggregate, I = _n(w).filter((M) => $a(M.value)), _ = N ?? (mt(w) ? "calculation" : In(w));
1081
+ const w = v(b[0], `${i}.query.measures[0]`), N = typeof b[0] == "string" ? void 0 : b[0].aggregate, I = Cn(w).filter((M) => $a(M.value)), _ = N ?? (mt(w) ? "calculation" : $n(w));
1079
1082
  if (!$a(_) || !I.some((M) => M.value === _)) {
1080
1083
  const M = I.map((P) => P.value);
1081
1084
  s({
@@ -1086,16 +1089,16 @@ async function xa(e, a, t) {
1086
1089
  allowed: M
1087
1090
  });
1088
1091
  }
1089
- const D = si(b[0], { ...x, field: w, get: _ }, `${i}.query.measures[0].comparison`, s);
1090
- return k(ze({ ...x, field: w, get: _, ...D ? { comparison: D } : {} }, a));
1092
+ const D = ni(b[0], { ...S, field: w, get: _ }, `${i}.query.measures[0].comparison`, s);
1093
+ return k(ze({ ...S, field: w, get: _, ...D ? { comparison: D } : {} }, a));
1091
1094
  }
1092
- (S.length !== 1 || b.length) && s({
1095
+ (x.length !== 1 || b.length) && s({
1093
1096
  code: "invalid_change",
1094
1097
  message: `The ${l.kind === "only" ? "only value" : l.kind === "first" ? "first value" : "list"} reads one dimension; a measure's one value is get: "aggregate".`,
1095
1098
  path: `${i}.query`,
1096
1099
  fix: "Send dimensions: [field] and no measures; order the first value or the list with orderBy."
1097
1100
  });
1098
- const E = v(S[0], `${i}.query.dimensions[0]`);
1101
+ const E = v(x[0], `${i}.query.dimensions[0]`);
1099
1102
  mt(E) && s({
1100
1103
  code: "invalid_change",
1101
1104
  message: `${E.label || E.name} is an aggregate calculation, so it has one value, not rows.`,
@@ -1115,7 +1118,7 @@ async function xa(e, a, t) {
1115
1118
  return k(
1116
1119
  ze(
1117
1120
  {
1118
- ...x,
1121
+ ...S,
1119
1122
  field: E,
1120
1123
  get: l.kind,
1121
1124
  ...C ? { sortField: C } : {},
@@ -1131,7 +1134,7 @@ async function xa(e, a, t) {
1131
1134
  return I.length && t.refuseAll(us(I, i)), N;
1132
1135
  }
1133
1136
  }
1134
- function si(e, a, t, s) {
1137
+ function ni(e, a, t, s) {
1135
1138
  var n, i;
1136
1139
  const o = typeof e == "string" ? void 0 : e.comparison;
1137
1140
  if (!(!o || o.kind === "inherit" || o.kind === "off"))
@@ -1140,14 +1143,14 @@ function si(e, a, t, s) {
1140
1143
  message: "A variable compares with an earlier period, not a target.",
1141
1144
  path: t,
1142
1145
  fix: "Send comparison: { kind: 'previous_period' } or { kind: 'previous_year' }; put a target in the words, or on a KPI card."
1143
- }), $n(a) || s({
1146
+ }), Sn(a) || s({
1144
1147
  code: "invalid_change",
1145
1148
  message: `${((n = a.field) == null ? void 0 : n.label) || ((i = a.field) == null ? void 0 : i.name)} with ${String(a.get)} isn't a number, so it has no comparison.`,
1146
1149
  path: t,
1147
1150
  fix: "Compare a count, or a numeric field's total, average, lowest or highest; leave comparison out here."
1148
- }), to(o);
1151
+ }), so(o);
1149
1152
  }
1150
- async function oi(e, a, t, s) {
1153
+ async function ii(e, a, t, s) {
1151
1154
  var n;
1152
1155
  const o = await a.compileCardQuery({
1153
1156
  query: { domainId: e.domainId, datasetName: e.datasetName, measures: ["__count"], filters: e.filters },
@@ -1155,8 +1158,8 @@ async function oi(e, a, t, s) {
1155
1158
  });
1156
1159
  return o.ok ? ((n = o.part.config) == null ? void 0 : n.filters) ?? null : s(o.problems.map((i) => ({ ...i, path: i.path ? `${t}.query.${i.path}` : `${t}.query.filters` })));
1157
1160
  }
1158
- function ni(e, a, t, s, o) {
1159
- const n = ls(a), i = Cn(e);
1161
+ function ri(e, a, t, s, o) {
1162
+ const n = ls(a), i = wn(e);
1160
1163
  n.kind === "aggregate" && e.get.kind !== "aggregate" && s.problem({ code: "invalid_change", message: `${e.name} reads a field's rows; an aggregate needs its measure.`, path: `${o}.get`, fix: 'Send query with measures: [{ name, aggregate }] and get: "aggregate".' }), n.kind !== "aggregate" && e.get.kind === "aggregate" && s.problem({ code: "invalid_change", message: `${e.name} is an aggregate; a value, the first or a list reads a dimension.`, path: `${o}.get`, fix: "Send query with dimensions: [field] and the get." }), i.mode === "sql" && n.kind !== "only" && n.kind !== "first" && s.problem({ code: "invalid_change", message: "A SQL variable takes the only row or the first row of its result.", path: `${o}.get`, fix: 'Send get: "only" or "first", or write the list in the SQL itself.' });
1161
1164
  const d = ze(
1162
1165
  {
@@ -1169,11 +1172,11 @@ function ni(e, a, t, s, o) {
1169
1172
  );
1170
1173
  return { query: d.query, get: d.get };
1171
1174
  }
1172
- function ii(e, a) {
1175
+ function di(e, a) {
1173
1176
  const t = Ha(e).filter(({ ref: i }) => i.source === "data" && i.variableId === a), s = (i) => {
1174
1177
  var d;
1175
1178
  return `"${((d = (e.sheets ?? []).find((l) => l.id === i)) == null ? void 0 : d.title) ?? i}"`;
1176
- }, o = xe(e);
1179
+ }, o = Se(e);
1177
1180
  return { words: [
1178
1181
  ...new Set(
1179
1182
  t.map(
@@ -1185,7 +1188,7 @@ function ii(e, a) {
1185
1188
  )
1186
1189
  ].join(", "), places: t };
1187
1190
  }
1188
- function ri(e, a, t, s, o) {
1191
+ function li(e, a, t, s, o) {
1189
1192
  const { problem: n } = o;
1190
1193
  (!Xe(t) || !t.document) && n({
1191
1194
  code: "invalid_change",
@@ -1196,30 +1199,30 @@ function ri(e, a, t, s, o) {
1196
1199
  const i = t.document, d = e.target;
1197
1200
  let l, c;
1198
1201
  if ("sectionId" in d) {
1199
- const x = i.sections.find((E) => E.id === d.sectionId);
1200
- x || n({ code: "invalid_change", message: `No section ${d.sectionId} on "${t.title}".`, path: `${s}.target.sectionId`, fix: "Use a section id from the outline's textSections." }), x.type !== "text" && n({ code: "invalid_change", message: `Section ${d.sectionId} is a ${x.type} section, not text.`, path: `${s}.target.sectionId`, fix: "Name one of the outline's textSections." }), l = x.content, c = x.style;
1202
+ const S = i.sections.find((E) => E.id === d.sectionId);
1203
+ S || n({ code: "invalid_change", message: `No section ${d.sectionId} on "${t.title}".`, path: `${s}.target.sectionId`, fix: "Use a section id from the outline's textSections." }), S.type !== "text" && n({ code: "invalid_change", message: `Section ${d.sectionId} is a ${S.type} section, not text.`, path: `${s}.target.sectionId`, fix: "Name one of the outline's textSections." }), l = S.content, c = S.style;
1201
1204
  } else {
1202
- const { region: x, role: E } = d;
1203
- Ia[x].includes(E) || n({
1205
+ const { region: S, role: E } = d;
1206
+ Ia[S].includes(E) || n({
1204
1207
  code: "invalid_change",
1205
- message: `The ${x} has ${x === "header" ? "a title and a metadata line" : "a note and a page info line"}, not a ${E} line.`,
1208
+ message: `The ${S} has ${S === "header" ? "a title and a metadata line" : "a note and a page info line"}, not a ${E} line.`,
1206
1209
  path: `${s}.target.role`,
1207
- fix: `Send role: ${Ia[x].map((k) => `"${k}"`).join(" or ")}.`
1208
- }), e.style !== void 0 && !zs(E) && n({
1210
+ fix: `Send role: ${Ia[S].map((k) => `"${k}"`).join(" or ")}.`
1211
+ }), e.style !== void 0 && !Xs(E) && n({
1209
1212
  code: "invalid_change",
1210
1213
  message: `The footer's ${E === "pageInfo" ? "page info" : E} line has no size or alignment; only the header's title and metadata lines and text sections do.`,
1211
1214
  path: `${s}.style`,
1212
1215
  fix: "Leave style out for a footer line."
1213
1216
  });
1214
- const C = i[x] ? Jo(i[x].blocks, E) : void 0;
1217
+ const C = i[S] ? Zo(i[S].blocks, E) : void 0;
1215
1218
  l = (C == null ? void 0 : C.content) ?? [], c = C == null ? void 0 : C.style;
1216
1219
  }
1217
- const h = e.style !== void 0 ? Js(e.style) : void 0, p = !h || Object.entries(h).every(([x, E]) => (c == null ? void 0 : c[x]) === E);
1220
+ const h = e.style !== void 0 ? Zs(e.style) : void 0, p = !h || Object.entries(h).every(([S, E]) => (c == null ? void 0 : c[S]) === E);
1218
1221
  let v;
1219
1222
  if (e.text !== void 0) {
1220
- const x = { kind: "document", sheetId: t.id }, E = { catalog: $t({ dashboard: a, place: x }), inputs: a.inputs, variables: a.variables }, C = JSON.stringify(Ze(l, E));
1221
- if (JSON.stringify(Xs(e.text)) !== C) {
1222
- const k = Zs(e.text, l, { dashboard: a, place: x, path: `${s}.text`, links: !0 });
1223
+ const S = { kind: "document", sheetId: t.id }, E = { catalog: $t({ dashboard: a, place: S }), inputs: a.inputs, variables: a.variables }, C = JSON.stringify(Ze(l, E));
1224
+ if (JSON.stringify(eo(e.text)) !== C) {
1225
+ const k = to(e.text, l, { dashboard: a, place: S, path: `${s}.text`, links: !0 });
1223
1226
  k.ok || o.refuseAll(k.problems);
1224
1227
  const y = k.content;
1225
1228
  JSON.stringify(Ze(y, E)) !== C && (v = y);
@@ -1231,7 +1234,7 @@ function ri(e, a, t, s, o) {
1231
1234
  };
1232
1235
  return { edit: "sectionId" in d ? { type: "updateText", sectionId: d.sectionId, ...b } : { type: "updateRegionText", region: d.region, role: d.role, ...b }, unchanged: v === void 0 && p };
1233
1236
  }
1234
- const di = {
1237
+ const ci = {
1235
1238
  matrix: "A Matrix",
1236
1239
  pie: "A pie chart",
1237
1240
  detail_table: "A detail table",
@@ -1239,10 +1242,10 @@ const di = {
1239
1242
  };
1240
1243
  class me extends Error {
1241
1244
  }
1242
- const Sa = "A text card takes title, description and text.", vt = (e) => e.cards.some((a) => {
1245
+ const xa = "A text card takes title, description and text.", vt = (e) => e.cards.some((a) => {
1243
1246
  var t, s;
1244
1247
  return ((t = a.customCardPreferences) == null ? void 0 : t.visualType) === "multiple" || !!((s = a.customCardPreferences) != null && s.dataInputCardIds);
1245
- }), Rt = (e) => (e ?? "").trim().toLowerCase(), at = ro, ka = { measures: fo, records: uo, sql: co }, Ue = {
1248
+ }), Rt = (e) => (e ?? "").trim().toLowerCase(), at = co, ka = { measures: ho, records: mo, sql: fo }, Ue = {
1246
1249
  measures: "a measures query (measures, with optional dimensions)",
1247
1250
  records: "a records query (columns)",
1248
1251
  sql: "a SQL query"
@@ -1250,14 +1253,14 @@ const Sa = "A text card takes title, description and text.", vt = (e) => e.cards
1250
1253
  function fs(e, a) {
1251
1254
  return a.path.reduce((t, s) => typeof s == "number" ? `${t}[${s}]` : `${t}.${s}`, e);
1252
1255
  }
1253
- const li = { max: So, what: "A proposal", fix: "Split the changes into several proposals." };
1254
- async function Br(e, a, t) {
1255
- return ms(e, a, t, { limit: li });
1256
+ const ui = { max: To, what: "A proposal", fix: "Split the changes into several proposals." };
1257
+ async function Gr(e, a, t) {
1258
+ return ms(e, a, t, { limit: ui });
1256
1259
  }
1257
1260
  async function ms(e, a, t, s) {
1258
1261
  var Qt, Ht, Yt, zt, Jt, Xt, Zt, ea, ta, aa, sa, oa, na, ia, ra, da;
1259
1262
  const o = [], n = [], i = [], d = [], l = /* @__PURE__ */ new Set(), c = [], h = /* @__PURE__ */ new Map(), p = { calendar: t.calendar }, v = t.relationshipReach ? { relationshipReach: t.relationshipReach } : {};
1260
- let b = e, S, x = 0, E = 0;
1263
+ let b = e, x, S = 0, E = 0;
1261
1264
  const { limit: C } = s;
1262
1265
  if (a.length > C.max)
1263
1266
  return {
@@ -1273,13 +1276,13 @@ async function ms(e, a, t, s) {
1273
1276
  };
1274
1277
  const k = [];
1275
1278
  if (a.forEach((m, r) => {
1276
- const f = ao.safeParse(m);
1279
+ const f = oo.safeParse(m);
1277
1280
  if (f.success) {
1278
1281
  k.push(f.data);
1279
1282
  return;
1280
1283
  }
1281
1284
  for (const u of f.error.issues) {
1282
- const g = nn(u.message);
1285
+ const g = dn(u.message);
1283
1286
  o.push({
1284
1287
  code: "invalid_change",
1285
1288
  message: (g == null ? void 0 : g.message) ?? u.message,
@@ -1298,35 +1301,35 @@ async function ms(e, a, t, s) {
1298
1301
  fix: "Use a measures or records query (a semantic dataset for a variable), or ask an administrator for SQL access."
1299
1302
  }), l.add("sql");
1300
1303
  }, w = (m, r) => {
1301
- const f = St(b, [m], p);
1304
+ const f = xt(b, [m], p);
1302
1305
  f.ok ? (b = f.dashboard, i.push(m)) : y({ code: "invalid_change", message: f.failedAt.message, path: r, ...f.failedAt.fix ? { fix: f.failedAt.fix } : {} });
1303
1306
  }, N = async (m) => {
1304
- var J, j, ie, fe, Ae, Ie;
1305
- const { cardId: r, index: f, path: u } = m, { settings: g = {}, highlights: $ } = m.request, O = g.columns && Object.keys(g.columns).length ? g.columns : void 0, R = Object.entries(g).some(([Y, X]) => Y !== "columns" && X !== void 0), A = !!((J = $ == null ? void 0 : $.add) != null && J.length);
1307
+ var X, j, ie, fe, Ae, Ie;
1308
+ const { cardId: r, index: f, path: u } = m, { settings: g = {}, highlights: $ } = m.request, O = g.columns && Object.keys(g.columns).length ? g.columns : void 0, R = Object.entries(g).some(([z, Z]) => z !== "columns" && Z !== void 0), A = !!((X = $ == null ? void 0 : $.add) != null && X.length);
1306
1309
  if (!O && !R && !A && !((j = $ == null ? void 0 : $.remove) != null && j.length)) return null;
1307
- const T = re(b, r).card, L = Object.values(O ?? {}).some((Y) => Y.label === null), q = Object.values(O ?? {}).some((Y) => Y.format !== void 0 && Y.format !== null), V = {};
1310
+ const T = re(b, r).card, L = Object.values(O ?? {}).some((z) => z.label === null), q = Object.values(O ?? {}).some((z) => z.format !== void 0 && z.format !== null), V = {};
1308
1311
  if (L && !((ie = T.sql) != null && ie.trim()))
1309
- for (const Y of Mn(T)) {
1310
- const X = await t.loadCardSource(Y);
1311
- X && (V[Pt(Y)] = X.fields);
1312
+ for (const z of Vn(T)) {
1313
+ const Z = await t.loadCardSource(z);
1314
+ Z && (V[Pt(z)] = Z.fields);
1312
1315
  }
1313
- let W;
1316
+ let U;
1314
1317
  if (q && !((fe = T.sql) != null && fe.trim())) {
1315
- const Y = t.readModelFormats ? await t.readModelFormats({ card: T }) : null;
1316
- W = Y ? { status: "read", formats: Y } : { status: "unavailable" };
1318
+ const z = t.readModelFormats ? await t.readModelFormats({ card: T }) : null;
1319
+ U = z ? { status: "read", formats: z } : { status: "unavailable" };
1317
1320
  }
1318
- const z = !!((Ae = g.columnOrder) != null && Ae.length);
1319
- let H;
1320
- if ((O || A || z) && ((Ie = T.sql) != null && Ie.trim()) && T.type !== "kpi") {
1321
- const Y = t.readSqlResultColumns ? await t.readSqlResultColumns({ cardId: r, dashboard: b }) : null;
1322
- Y || y({
1321
+ const J = !!((Ae = g.columnOrder) != null && Ae.length);
1322
+ let Y;
1323
+ if ((O || A || J) && ((Ie = T.sql) != null && Ie.trim()) && T.type !== "kpi") {
1324
+ const z = t.readSqlResultColumns ? await t.readSqlResultColumns({ cardId: r, dashboard: b }) : null;
1325
+ z || y({
1323
1326
  code: "columns_unavailable",
1324
- message: O || z ? `"${T.title || "Untitled"}" couldn't be run to read its columns, so their names can't be checked.` : `"${T.title || "Untitled"}" couldn't be run to read its columns, so the highlight's column can't be checked.`,
1325
- path: O ? `${u}.columns` : z ? `${u}.columnOrder` : `${u}.column`,
1327
+ message: O || J ? `"${T.title || "Untitled"}" couldn't be run to read its columns, so their names can't be checked.` : `"${T.title || "Untitled"}" couldn't be run to read its columns, so the highlight's column can't be checked.`,
1328
+ path: O ? `${u}.columns` : J ? `${u}.columnOrder` : `${u}.column`,
1326
1329
  fix: "Check that the card runs and returns rows, then propose again."
1327
- }), H = Y;
1330
+ }), Y = z;
1328
1331
  }
1329
- const Q = Zn(
1332
+ const H = ti(
1330
1333
  T,
1331
1334
  {
1332
1335
  settings: { ...g, ...O ? { columns: O } : { columns: void 0 } },
@@ -1337,22 +1340,22 @@ async function ms(e, a, t, s) {
1337
1340
  cardRef: m.cardRef,
1338
1341
  catalogs: V,
1339
1342
  newId: t.newId,
1340
- ...W ? { modelFormats: W } : {},
1341
- ...H ? { sqlResultColumns: H } : {}
1343
+ ...U ? { modelFormats: U } : {},
1344
+ ...Y ? { sqlResultColumns: Y } : {}
1342
1345
  }
1343
1346
  );
1344
- if (!Q.ok)
1345
- throw o.push(...Q.problems), new me();
1346
- for (const Y of Q.labels) {
1347
- const X = m.queryLabels.find((ce) => Ye(ce.key, Y.key) && ce.label !== Y.label);
1348
- X && y({
1347
+ if (!H.ok)
1348
+ throw o.push(...H.problems), new me();
1349
+ for (const z of H.labels) {
1350
+ const Z = m.queryLabels.find((ce) => Ye(ce.key, z.key) && ce.label !== z.label);
1351
+ Z && y({
1349
1352
  code: "value_invalid",
1350
- message: `Two labels are stated for one column of "${T.title || "Untitled"}": "${X.label}" in the query and "${Y.label}" in columns.`,
1353
+ message: `Two labels are stated for one column of "${T.title || "Untitled"}": "${Z.label}" in the query and "${z.label}" in columns.`,
1351
1354
  path: `${u}.columns`,
1352
1355
  fix: "State the label once."
1353
1356
  });
1354
1357
  }
1355
- return n.push(...Q.warnings), Q.labels.length && ga(T, Q.labels).changed.length && w({ op: "card.update", cardId: r, update: { kind: "relabel", labels: Q.labels }, changeIndex: f }, `${u}.columns`), Q.settings && w({ op: "card.update", cardId: r, update: { kind: "settings", settings: Q.settings }, changeIndex: f }, O ? `${u}.columns` : u), Q.settings;
1358
+ return n.push(...H.warnings), H.labels.length && ga(T, H.labels).changed.length && w({ op: "card.update", cardId: r, update: { kind: "relabel", labels: H.labels }, changeIndex: f }, `${u}.columns`), H.settings && w({ op: "card.update", cardId: r, update: { kind: "settings", settings: H.settings }, changeIndex: f }, O ? `${u}.columns` : u), H.settings;
1356
1359
  }, I = (m, r) => {
1357
1360
  var g;
1358
1361
  const f = re(b, m);
@@ -1389,7 +1392,7 @@ async function ms(e, a, t, s) {
1389
1392
  { op: "card.update", cardId: m.cardId, update: { kind: "calculations", calculations: $.update }, changeIndex: m.index },
1390
1393
  `${m.path}.query`
1391
1394
  ), !0) : !1;
1392
- }, P = (m) => Object.fromEntries(["columns", ...tt].map((r) => [r, m[r]])), G = (m) => Object.entries(P(m)).filter(([, r]) => r !== void 0).map(([r]) => r), B = (m) => (o.push(...m.slice(0, -1)), y(m[m.length - 1])), Z = (m, r, f, u) => {
1395
+ }, P = (m) => Object.fromEntries(["columns", ...tt].map((r) => [r, m[r]])), G = (m) => Object.entries(P(m)).filter(([, r]) => r !== void 0).map(([r]) => r), B = (m) => (o.push(...m.slice(0, -1)), y(m[m.length - 1])), K = (m, r, f, u) => {
1393
1396
  const { card: g } = r, $ = [...m.type ? ["type"] : [], ...m.query ? ["query"] : [], ...m.matrix ? ["matrix"] : [], ...G(m)];
1394
1397
  $.length && y({
1395
1398
  code: "invalid_change",
@@ -1443,7 +1446,7 @@ async function ms(e, a, t, s) {
1443
1446
  fix: "Define the handle with an earlier card.add, or use the card id from the outline."
1444
1447
  }), f.id;
1445
1448
  }
1446
- return xe(b).some((f) => f.cardId === m) || y({
1449
+ return Se(b).some((f) => f.cardId === m) || y({
1447
1450
  code: "card_not_found",
1448
1451
  message: `There's no card ${m} on this dashboard.`,
1449
1452
  path: r,
@@ -1525,18 +1528,18 @@ async function ms(e, a, t, s) {
1525
1528
  fix: "Send matrix: { columns: [...] } naming dimensions or the date field of the query (an empty list puts nothing across the top)."
1526
1529
  }), !g.matrixColumns && f && y({ code: "type_not_supported", message: "matrix.columns is only for Matrix cards.", path: `${u}.matrix`, fix: 'Leave out matrix, or use type "matrix".' }), f && $ === "measures") {
1527
1530
  const A = r, T = A.datasetName, L = [...A.dimensions ?? [], ...A.timeGrain && A.dateField ? [A.dateField] : []];
1528
- L.length && f.columns.length >= L.length && L.every((V) => f.columns.some((W) => ge(W, T) === ge(V, T))) && y({
1531
+ L.length && f.columns.length >= L.length && L.every((V) => f.columns.some((U) => ge(U, T) === ge(V, T))) && y({
1529
1532
  code: "type_not_supported",
1530
1533
  message: "A Matrix needs at least one field down the side.",
1531
1534
  path: `${u}.matrix.columns`,
1532
1535
  fix: "Leave one dimension or the date field out of matrix.columns."
1533
1536
  });
1534
1537
  const q = new Set([...A.dimensions ?? [], ...A.dateField ? [A.dateField] : []].map((V) => ge(V, T)));
1535
- f.columns.forEach((V, W) => {
1538
+ f.columns.forEach((V, U) => {
1536
1539
  q.has(ge(V, T)) || y({
1537
1540
  code: "type_not_supported",
1538
1541
  message: `"${wt(V)}" isn't one of the query's dimensions or its date field.`,
1539
- path: `${u}.matrix.columns[${W}]`,
1542
+ path: `${u}.matrix.columns[${U}]`,
1540
1543
  fix: "Name dimensions or the date field of the query in matrix.columns."
1541
1544
  });
1542
1545
  });
@@ -1548,7 +1551,7 @@ async function ms(e, a, t, s) {
1548
1551
  fix: m.code === "query_not_kept" ? "Tell the user to make this change in the editor." : "Read the outline again and propose again.",
1549
1552
  details: { reason: "not_expressible", ..."parts" in m ? { parts: m.parts } : {} }
1550
1553
  }), Wt = (m, r, f, u, g, $, O) => {
1551
- const R = ti(m, r, f, $, O);
1554
+ const R = si(m, r, f, $, O);
1552
1555
  if (!R.length) return;
1553
1556
  const A = r;
1554
1557
  if (R.length === 1 && R[0] === "dateField" && A.dateField && !A.timeGrain && !A.timeWindow) {
@@ -1572,7 +1575,7 @@ async function ms(e, a, t, s) {
1572
1575
  const $ = ft(m);
1573
1576
  if ("sql" in r)
1574
1577
  return F(`${u}.query`), { type: $, source: { kind: "sql", connectionId: r.connectionId, sql: r.sql } };
1575
- "measures" in r && r.timeGrain === ho && (po({ cardType: $, configBacked: !0, shelf: "groupBy", dataType: "date" }).ok || y(
1578
+ "measures" in r && r.timeGrain === go && (bo({ cardType: $, configBacked: !0, shelf: "groupBy", dataType: "date" }).ok || y(
1576
1579
  m === "kpi" ? {
1577
1580
  code: "type_not_supported",
1578
1581
  message: "A KPI's query can't group by a grain that follows the dashboard date.",
@@ -1580,7 +1583,7 @@ async function ms(e, a, t, s) {
1580
1583
  fix: 'For a trend that follows the dashboard date, send trend: true and trendGrain: "automatic" with no Trend By.'
1581
1584
  } : {
1582
1585
  code: "type_not_supported",
1583
- message: `${di[m] ?? `A ${m.replace(/_/g, " ")}`} can't group by a grain that follows the dashboard date.`,
1586
+ message: `${ci[m] ?? `A ${m.replace(/_/g, " ")}`} can't group by a grain that follows the dashboard date.`,
1584
1587
  path: `${u}.query.timeGrain`,
1585
1588
  fix: 'Use a bar, line or area chart or a table, or send a fixed timeGrain such as "month".'
1586
1589
  }
@@ -1589,20 +1592,20 @@ async function ms(e, a, t, s) {
1589
1592
  if (!R.ok)
1590
1593
  throw o.push(...R.problems.map((q) => ({ ...q, path: q.path ? `${u}.query.${q.path}` : `${u}.query` }))), new me();
1591
1594
  n.push(...R.warnings.map((q) => ({ ...q, path: q.path ?? `${u}.query` })));
1592
- const A = !g && "timeWindow" in r && r.timeWindow ? yi(R.part.config) : void 0;
1593
- A && "timeWindow" in r && r.timeWindow && ps(r.timeWindow, { use: "cardFilter", columnHasTime: go(A) }, `${u}.query.timeWindow`, y);
1595
+ const A = !g && "timeWindow" in r && r.timeWindow ? _i(R.part.config) : void 0;
1596
+ A && "timeWindow" in r && r.timeWindow && ps(r.timeWindow, { use: "cardFilter", columnHasTime: yo(A) }, `${u}.query.timeWindow`, y);
1594
1597
  let T = { ...R.part, type: $ };
1595
1598
  const L = T.config ?? {};
1596
1599
  if ($ === "detailTable") {
1597
- const q = bo(yo("table", "detailTable", L)) ?? {};
1598
- T = { ...T, config: ui(q) };
1600
+ const q = vo(_o("table", "detailTable", L)) ?? {};
1601
+ T = { ...T, config: mi(q) };
1599
1602
  }
1600
- return $ === "matrixTable" && (T = await _s(T, L, r, f, u)), fi(T, Ne(r));
1603
+ return $ === "matrixTable" && (T = await _s(T, L, r, f, u)), hi(T, Ne(r));
1601
1604
  }, _s = async (m, r, f, u, g) => {
1602
1605
  var q;
1603
1606
  const $ = await t.loadCardSource({ domainId: f.domainId, datasetName: f.datasetName });
1604
1607
  if ($ || y({ code: "field_not_found", message: `The dataset "${f.datasetName}" isn't available.`, path: `${g}.query.datasetName`, fix: "Find datasets with semaphor_list_datasets." }), m.source.kind !== "semantic") throw new me();
1605
- const O = { id: "scratch", title: "", type: "table", dataSource: m.source.dataSource, config: r }, R = _o(O, "matrixTable", { catalog: $.fields, createId: t.newId }), A = R.status === "changed" ? (q = R.card.config) == null ? void 0 : q.matrix : void 0;
1608
+ const O = { id: "scratch", title: "", type: "table", dataSource: m.source.dataSource, config: r }, R = Co(O, "matrixTable", { catalog: $.fields, createId: t.newId }), A = R.status === "changed" ? (q = R.card.config) == null ? void 0 : q.matrix : void 0;
1606
1609
  (R.status !== "changed" || R.leftOut.length || !A) && y({
1607
1610
  code: "type_not_supported",
1608
1611
  message: R.status === "changed" && R.leftOut.length ? `These fields can't run in a Matrix: ${R.leftOut.join(", ")}.` : "This query can't be shown as a Matrix.",
@@ -1611,11 +1614,11 @@ async function ms(e, a, t, s) {
1611
1614
  });
1612
1615
  let T = A;
1613
1616
  const L = f.datasetName;
1614
- for (const [V, W] of u.columns.entries()) {
1615
- const z = [...T.spec.rows, ...T.spec.columns].find(
1616
- (H) => Io(H.field) === ge(W, L)
1617
+ for (const [V, U] of u.columns.entries()) {
1618
+ const J = [...T.spec.rows, ...T.spec.columns].find(
1619
+ (Y) => $o(Y.field) === ge(U, L)
1617
1620
  );
1618
- z || y({ code: "type_not_supported", message: `"${wt(W)}" isn't a level of this Matrix.`, path: `${g}.matrix.columns[${V}]`, fix: "Name dimensions or the date field of the query in matrix.columns." }), T = Co(T, $o(T.spec, z.id, "columns")).config;
1621
+ J || y({ code: "type_not_supported", message: `"${wt(U)}" isn't a level of this Matrix.`, path: `${g}.matrix.columns[${V}]`, fix: "Name dimensions or the date field of the query in matrix.columns." }), T = wo(T, So(T.spec, J.id, "columns")).config;
1619
1622
  }
1620
1623
  return { ...m, config: { matrix: T } };
1621
1624
  }, dt = /* @__PURE__ */ new Map(), lt = /* @__PURE__ */ new Map();
@@ -1625,8 +1628,8 @@ async function ms(e, a, t, s) {
1625
1628
  switch (r.op) {
1626
1629
  case "card.add": {
1627
1630
  const u = r.position && typeof r.position == "object" ? (() => {
1628
- const J = te(r.position.after, `${f}.position.after`), j = xe(b).find(
1629
- (ie) => ie.cardId === J && ie.kind === "frameCard"
1631
+ const X = te(r.position.after, `${f}.position.after`), j = Se(b).find(
1632
+ (ie) => ie.cardId === X && ie.kind === "frameCard"
1630
1633
  );
1631
1634
  return !j || j.kind !== "frameCard" ? y({
1632
1635
  code: "card_not_found",
@@ -1640,24 +1643,24 @@ async function ms(e, a, t, s) {
1640
1643
  fix: "Leave out sheetId, or name the card's sheet."
1641
1644
  }), { sheetId: j.sheetId, frameId: j.frameId });
1642
1645
  })() : void 0, g = u ? Re(u.sheetId, `${f}.position.after`) : r.sheetId ? Re(r.sheetId, `${f}.sheetId`) : (() => {
1643
- const J = it();
1644
- return J.length !== 1 && y({
1645
- code: J.length ? "sheet_required" : "sheet_not_a_grid",
1646
- message: J.length ? "This dashboard has several grid sheets; say which one gets the card." : "This dashboard has no grid sheet to add a card to.",
1646
+ const X = it();
1647
+ return X.length !== 1 && y({
1648
+ code: X.length ? "sheet_required" : "sheet_not_a_grid",
1649
+ message: X.length ? "This dashboard has several grid sheets; say which one gets the card." : "This dashboard has no grid sheet to add a card to.",
1647
1650
  path: `${f}.sheetId`,
1648
- fix: J.length ? "Send sheetId: one of details.sheets." : "Add a sheet with sheet.add earlier in this list.",
1651
+ fix: X.length ? "Send sheetId: one of details.sheets." : "Add a sheet with sheet.add earlier in this list.",
1649
1652
  details: { sheets: Ve() }
1650
- }), J[0];
1651
- })(), $ = u ? { after: u.frameId } : typeof r.position == "string" ? r.position : void 0, O = $ || r.width ? { ...$ ? { position: $ } : {}, ...r.width ? { width: r.width } : {} } : void 0, R = (J) => {
1652
- const j = r.handle ?? `$card_${++x}`;
1653
- return h.has(j) && y({ code: "invalid_change", message: `The handle ${j} is defined twice.`, path: `${f}.handle`, fix: "Give each new card, filter or sheet its own handle." }), h.set(j, { kind: "card", id: J.id, title: r.title }), d.push({ ref: j, kind: "card", id: J.id, title: r.title, changeIndex: m }), j;
1653
+ }), X[0];
1654
+ })(), $ = u ? { after: u.frameId } : typeof r.position == "string" ? r.position : void 0, O = $ || r.width ? { ...$ ? { position: $ } : {}, ...r.width ? { width: r.width } : {} } : void 0, R = (X) => {
1655
+ const j = r.handle ?? `$card_${++S}`;
1656
+ return h.has(j) && y({ code: "invalid_change", message: `The handle ${j} is defined twice.`, path: `${f}.handle`, fix: "Give each new card, filter or sheet its own handle." }), h.set(j, { kind: "card", id: X.id, title: r.title }), d.push({ ref: j, kind: "card", id: X.id, title: r.title, changeIndex: m }), j;
1654
1657
  };
1655
1658
  if (r.type === "text") {
1656
- const J = [...r.query ? ["query"] : [], ...r.matrix ? ["matrix"] : [], ...G(r)];
1657
- J.length && y({ code: "invalid_change", message: `A text card takes no ${et(J)}.`, path: f, fix: Sa }), r.text === void 0 && y({ code: "invalid_change", message: "A text card needs its words in text.", path: `${f}.text`, fix: Sa });
1659
+ const X = [...r.query ? ["query"] : [], ...r.matrix ? ["matrix"] : [], ...G(r)];
1660
+ X.length && y({ code: "invalid_change", message: `A text card takes no ${et(X)}.`, path: f, fix: xa }), r.text === void 0 && y({ code: "invalid_change", message: "A text card needs its words in text.", path: `${f}.text`, fix: xa });
1658
1661
  const j = ba({ text: r.text, context: { dashboard: b, place: { kind: "sheet", sheetId: g.id } }, path: `${f}.text` });
1659
1662
  j.ok || B(j.problems);
1660
- const ie = Zo({
1663
+ const ie = tn({
1661
1664
  id: t.newId(),
1662
1665
  title: r.title,
1663
1666
  ...r.description ? { description: r.description } : {},
@@ -1675,18 +1678,18 @@ async function ms(e, a, t, s) {
1675
1678
  const A = _t(r.query), T = A.query, L = r.type;
1676
1679
  jt(L, T, r.matrix, f);
1677
1680
  const q = await Ut(L, T, r.matrix, f), V = {
1678
- ...en({ id: t.newId(), title: r.title, ...r.description ? { description: r.description } : {} }),
1681
+ ...an({ id: t.newId(), title: r.title, ...r.description ? { description: r.description } : {} }),
1679
1682
  type: q.type
1680
- }, W = pa(V, q);
1681
- W.ok || y({ code: "invalid_change", message: W.message, path: f });
1682
- const z = W.ok ? W.card : V;
1683
- Wt(z, T, r.matrix, f, r.title, q);
1684
- const H = { id: t.newId(), cards: [z], activeCardId: z.id };
1685
- w({ op: "card.add", sheetId: g.id, frame: H, ...O ? { placement: O } : {}, changeIndex: m }, f);
1686
- const Q = R(z);
1687
- c.push(z.id), await M({ cardId: z.id, cardRef: Q, stated: A.calculations, index: m, path: f }), await N({
1688
- cardId: z.id,
1689
- cardRef: Q,
1683
+ }, U = pa(V, q);
1684
+ U.ok || y({ code: "invalid_change", message: U.message, path: f });
1685
+ const J = U.ok ? U.card : V;
1686
+ Wt(J, T, r.matrix, f, r.title, q);
1687
+ const Y = { id: t.newId(), cards: [J], activeCardId: J.id };
1688
+ w({ op: "card.add", sheetId: g.id, frame: Y, ...O ? { placement: O } : {}, changeIndex: m }, f);
1689
+ const H = R(J);
1690
+ c.push(J.id), await M({ cardId: J.id, cardRef: H, stated: A.calculations, index: m, path: f }), await N({
1691
+ cardId: J.id,
1692
+ cardRef: H,
1690
1693
  request: { settings: P(r) },
1691
1694
  queryLabels: "sql" in T ? [] : Ne(T),
1692
1695
  index: m,
@@ -1697,7 +1700,7 @@ async function ms(e, a, t, s) {
1697
1700
  case "card.update": {
1698
1701
  const u = te(r.cardId, `${f}.cardId`), g = re(b, u);
1699
1702
  if ((g == null ? void 0 : g.card.type) === "text") {
1700
- Z(r, g, m, f);
1703
+ K(r, g, m, f);
1701
1704
  break;
1702
1705
  }
1703
1706
  r.text !== void 0 && y({ code: "invalid_change", message: `"${(g == null ? void 0 : g.card.title) ?? u}" isn't a text card, so it takes no text.`, path: `${f}.text`, fix: "Change its query; text is for text cards." });
@@ -1705,51 +1708,51 @@ async function ms(e, a, t, s) {
1705
1708
  let R = !1, A = [];
1706
1709
  const T = r.type && r.type !== ((Qt = qe($)) == null ? void 0 : Qt.type) ? ft(r.type) : void 0;
1707
1710
  if (T && T !== $.type) {
1708
- const q = O.editable ? O.source : void 0, V = so($, T), W = V && q && q.kind === "semantic" ? (Ht = await t.loadCardSource({ domainId: q.domainId, datasetName: q.datasetName })) == null ? void 0 : Ht.fields : void 0, z = [], H = oo($, T, {
1709
- ...W ? { catalog: W } : {},
1710
- ...V && !W ? { catalogLoading: !0 } : {},
1711
+ const q = O.editable ? O.source : void 0, V = no($, T), U = V && q && q.kind === "semantic" ? (Ht = await t.loadCardSource({ domainId: q.domainId, datasetName: q.datasetName })) == null ? void 0 : Ht.fields : void 0, J = [], Y = io($, T, {
1712
+ ...U ? { catalog: U } : {},
1713
+ ...V && !U ? { catalogLoading: !0 } : {},
1711
1714
  createId: () => {
1712
- const Q = t.newId();
1713
- return z.push(Q), Q;
1715
+ const H = t.newId();
1716
+ return J.push(H), H;
1714
1717
  }
1715
1718
  });
1716
- if (H.status === "refused" && y({ code: "type_not_supported", message: "The card's dataset fields couldn't be loaded for a change to or from a Matrix.", path: `${f}.type`, fix: "Send a complete query with the type change." }), H.status === "changed") {
1717
- const Q = [...H.leftOut, ...H.droppedPreferences];
1718
- Q.length && n.push({
1719
+ if (Y.status === "refused" && y({ code: "type_not_supported", message: "The card's dataset fields couldn't be loaded for a change to or from a Matrix.", path: `${f}.type`, fix: "Send a complete query with the type change." }), Y.status === "changed") {
1720
+ const H = [...Y.leftOut, ...Y.droppedPreferences];
1721
+ H.length && n.push({
1719
1722
  code: "type_change_drops",
1720
- message: `Changing "${$.title}" to ${r.type.replace(/_/g, " ")} leaves out ${Q.join(", ")}.`,
1723
+ message: `Changing "${$.title}" to ${r.type.replace(/_/g, " ")} leaves out ${H.join(", ")}.`,
1721
1724
  path: `${f}.type`,
1722
- details: { dropped: Q }
1725
+ details: { dropped: H }
1723
1726
  }), w(
1724
- { op: "card.update", cardId: u, update: { kind: "retype", type: T, ...W ? { catalog: W } : {}, newIds: z }, changeIndex: m },
1727
+ { op: "card.update", cardId: u, update: { kind: "retype", type: T, ...U ? { catalog: U } : {}, newIds: J }, changeIndex: m },
1725
1728
  `${f}.type`
1726
1729
  ), R = !0;
1727
1730
  }
1728
1731
  }
1729
1732
  const L = r.query ? _t(r.query) : void 0;
1730
1733
  if (r.query || r.matrix) {
1731
- const q = re(b, u).card, V = we(q, { sql: !0, calculations: !1 }), W = V.editable ? _t(V.query).query : void 0, z = W, H = gi(z, (L == null ? void 0 : L.query) ?? {}, `${f}.query`, (X) => {
1732
- if (X.code === "query_form_mismatch" && (L != null && L.calculations.length)) {
1734
+ const q = re(b, u).card, V = we(q, { sql: !0, calculations: !1 }), U = V.editable ? _t(V.query).query : void 0, J = U, Y = yi(J, (L == null ? void 0 : L.query) ?? {}, `${f}.query`, (Z) => {
1735
+ if (Z.code === "query_form_mismatch" && (L != null && L.calculations.length)) {
1733
1736
  const ce = D(q, L.calculations, f), Ce = ma({ card: q, stated: ce, context: { path: f, cardRef: r.cardId, dates: Ta(q) } });
1734
1737
  if (!Ce.ok)
1735
1738
  throw o.push(...Ce.problems), new me();
1736
1739
  }
1737
- return y(X);
1740
+ return y(Z);
1738
1741
  });
1739
- A = pi((L == null ? void 0 : L.query) ?? {}, H);
1740
- const Q = ((Yt = qe(q)) == null ? void 0 : Yt.type) ?? xt(q.type), J = r.matrix ?? (V.editable ? V.matrix : void 0);
1741
- jt(Q, H, J, f);
1742
- const j = V.editable && W ? no(W, H, V.matrix, J) : void 0, ie = !j || j.aspects.length > 0, fe = j && !("sql" in H) ? Ne(H).filter((X) => !ha(j, X.key.role)) : [], Ae = io(q, j, fe.map((X) => X.key.role));
1742
+ A = bi((L == null ? void 0 : L.query) ?? {}, Y);
1743
+ const H = ((Yt = qe(q)) == null ? void 0 : Yt.type) ?? St(q.type), X = r.matrix ?? (V.editable ? V.matrix : void 0);
1744
+ jt(H, Y, X, f);
1745
+ const j = V.editable && U ? ro(U, Y, V.matrix, X) : void 0, ie = !j || j.aspects.length > 0, fe = j && !("sql" in Y) ? Ne(Y).filter((Z) => !ha(j, Z.key.role)) : [], Ae = lo(q, j, fe.map((Z) => Z.key.role));
1743
1746
  Ae && Kt(Ae, f);
1744
- let Ie = H;
1745
- if (j && !("sql" in H) && H.orderBy && !j.aspects.includes("order") && ["metric", "group_by", "detail"].some((X) => ha(j, X))) {
1746
- const { orderBy: X, ...ce } = H;
1747
+ let Ie = Y;
1748
+ if (j && !("sql" in Y) && Y.orderBy && !j.aspects.includes("order") && ["metric", "group_by", "detail"].some((Z) => ha(j, Z))) {
1749
+ const { orderBy: Z, ...ce } = Y;
1747
1750
  Ie = ce;
1748
1751
  }
1749
- let Y;
1752
+ let z;
1750
1753
  if (ie) {
1751
- const X = !!(z && hs(z, (L == null ? void 0 : L.query) ?? {}) && (j != null && j.keptWindow)), ce = await Ut(Q, Ie, J, f, X), Ce = ce.type === ft(Q) ? { ...ce, type: q.type } : ce;
1752
- Y = Ce;
1754
+ const Z = !!(J && hs(J, (L == null ? void 0 : L.query) ?? {}) && (j != null && j.keptWindow)), ce = await Ut(H, Ie, X, f, Z), Ce = ce.type === ft(H) ? { ...ce, type: q.type } : ce;
1755
+ z = Ce;
1753
1756
  const la = j ? { ...Ce, change: j } : Ce, pe = pa(q, la);
1754
1757
  if (pe.ok || Kt(pe, f), pe.ok && pe.droppedBindings.length && n.push({
1755
1758
  code: "control_binding_dropped",
@@ -1768,7 +1771,7 @@ async function ms(e, a, t, s) {
1768
1771
  });
1769
1772
  w({ op: "card.update", cardId: u, update: { kind: "requery", query: la }, changeIndex: m }, `${f}.query`), R = !0;
1770
1773
  }
1771
- fe.length && ga(re(b, u).card, fe).changed.length && w({ op: "card.update", cardId: u, update: { kind: "relabel", labels: fe }, changeIndex: m }, `${f}.query`), (ie || fe.length) && Wt(re(b, u).card, Ie, J, f, q.title ?? "", Y, j);
1774
+ fe.length && ga(re(b, u).card, fe).changed.length && w({ op: "card.update", cardId: u, update: { kind: "relabel", labels: fe }, changeIndex: m }, `${f}.query`), (ie || fe.length) && Wt(re(b, u).card, Ie, X, f, q.title ?? "", z, j);
1772
1775
  }
1773
1776
  (r.query || T) && await M({ cardId: u, cardRef: r.cardId, stated: (L == null ? void 0 : L.calculations) ?? [], index: m, path: f }) && (R = !0), (r.title !== void 0 || r.description !== void 0) && w(
1774
1777
  {
@@ -1813,7 +1816,7 @@ async function ms(e, a, t, s) {
1813
1816
  fix: "Use one of details.available, or read semaphor_get_dataset_schema.",
1814
1817
  details: { available: u.fields.slice(0, 20).map((L) => L.name) }
1815
1818
  });
1816
- const $ = r.sheetIds ? Gt(r.sheetIds, f) : void 0, O = Ra($), R = Xo({
1819
+ const $ = r.sheetIds ? Gt(r.sheetIds, f) : void 0, O = Ra($), R = en({
1817
1820
  field: g,
1818
1821
  dataSource: u.dataSource,
1819
1822
  connectionId: u.connectionId,
@@ -1853,7 +1856,7 @@ async function ms(e, a, t, s) {
1853
1856
  ...r.selection !== void 0 || R ? { definition: O } : {},
1854
1857
  // A change of sheets states the sheets; what else the scope says (the cards it leaves out,
1855
1858
  // whether it covers Document sheets) stays.
1856
- ...A ? { scope: Go(
1859
+ ...A ? { scope: Ko(
1857
1860
  $.scope,
1858
1861
  Ra(A === "all" ? void 0 : A),
1859
1862
  new Set([...Et(b).values()].filter((L) => L.sheetKind === "document").map((L) => L.sheetId))
@@ -1876,7 +1879,7 @@ async function ms(e, a, t, s) {
1876
1879
  path: `${f}.filterId`,
1877
1880
  fix: "Tell the user to change it in the editor; removing or excluding it works."
1878
1881
  });
1879
- const $ = Vt(r.cardId, `${f}.cardId`), O = Ua(b, $).card, R = ve(b).findFilterInput({ inputId: u }), A = R && $e(R.input, O, v).reach === "relationshipApplied", T = await vi(O, r.field, t, `${f}.field`, y, A ? g.label : void 0);
1882
+ const $ = Vt(r.cardId, `${f}.cardId`), O = Ua(b, $).card, R = ve(b).findFilterInput({ inputId: u }), A = R && $e(R.input, O, v).reach === "relationshipApplied", T = await Ii(O, r.field, t, `${f}.field`, y, A ? g.label : void 0);
1880
1883
  w({ op: "filter.bind", filterId: u, cardId: $, binding: { kind: "bound", cardId: $, bindingId: t.newId(), target: T }, changeIndex: m }, f), d.push({ ref: r.filterId, kind: "filter", id: u, title: g.label, changeIndex: m });
1881
1884
  break;
1882
1885
  }
@@ -1895,7 +1898,7 @@ async function ms(e, a, t, s) {
1895
1898
  break;
1896
1899
  }
1897
1900
  case "layout.tabs": {
1898
- const u = r.cardIds.map((q, V) => te(q, `${f}.cardIds[${V}]`)), g = (q, V, W = `${f}.cardIds`) => y({ code: "layout_invalid", message: q, path: W, fix: V });
1901
+ const u = r.cardIds.map((q, V) => te(q, `${f}.cardIds[${V}]`)), g = (q, V, U = `${f}.cardIds`) => y({ code: "layout_invalid", message: q, path: U, fix: V });
1899
1902
  new Set(u).size !== u.length && g("Each card is named once in tabs.", "Name two or more different cards, each once.");
1900
1903
  const $ = u.map((q, V) => re(b, q) ?? g("A Document section's card can't be a tab.", "Name cards on a grid sheet.", `${f}.cardIds[${V}]`)), O = $[0].sheet;
1901
1904
  $.some((q) => q.sheet.id !== O.id) && g("Tabs are cards on one sheet.", "Name cards on one sheet; a card moves to another sheet in the editor."), $.some((q) => vt(q.frame) && q.frame.cards.length > 1) && g("A custom visual's inputs stay in its spot.", "Name cards that aren't a custom visual's inputs, or arrange them in the editor.");
@@ -1973,8 +1976,8 @@ async function ms(e, a, t, s) {
1973
1976
  }
1974
1977
  case "dashboard.style": {
1975
1978
  const { op: u, ...g } = r;
1976
- S ?? (S = t.readOrganizationAppearance ? t.readOrganizationAppearance() : Promise.resolve(null));
1977
- const { style: $, organizationAppearance: O } = za(b, await S), R = fn({ style: $, edit: g, layers: { organizationAppearance: O } });
1979
+ x ?? (x = t.readOrganizationAppearance ? t.readOrganizationAppearance() : Promise.resolve(null));
1980
+ const { style: $, organizationAppearance: O } = za(b, await x), R = hn({ style: $, edit: g, layers: { organizationAppearance: O } });
1978
1981
  if (R.ok)
1979
1982
  R.sentences.length && w({ op: "dashboard.style", style: R.style, sentences: R.sentences, changeIndex: m }, f);
1980
1983
  else {
@@ -1985,7 +1988,7 @@ async function ms(e, a, t, s) {
1985
1988
  }
1986
1989
  case "variable.add": {
1987
1990
  Je(b, r.name) && y({ code: "variable_name_taken", message: `A variable named ${r.name} is already on this dashboard.`, path: `${f}.name`, fix: "Choose another name, or change it with variable.update." });
1988
- const u = await xa(
1991
+ const u = await Sa(
1989
1992
  {
1990
1993
  id: t.newId(),
1991
1994
  name: r.name,
@@ -2003,14 +2006,14 @@ async function ms(e, a, t, s) {
2003
2006
  break;
2004
2007
  }
2005
2008
  case "variable.update": {
2006
- const u = ai(b, r.name, `${f}.name`, Te), g = r.rename ?? u.name, $ = {
2009
+ const u = oi(b, r.name, `${f}.name`, Te), g = r.rename ?? u.name, $ = {
2007
2010
  ...r.rename !== void 0 ? { name: r.rename } : {},
2008
2011
  ...r.label !== void 0 ? { label: r.label } : {},
2009
2012
  ...r.presentation !== void 0 ? { presentation: r.presentation } : {},
2010
2013
  ...r.emptyText !== void 0 ? { emptyText: r.emptyText } : {}
2011
2014
  }, O = { ...b, variables: (b.variables ?? []).filter((T) => T.id !== u.id) };
2012
2015
  if (r.query) {
2013
- const T = await xa(
2016
+ const T = await Sa(
2014
2017
  {
2015
2018
  id: u.id,
2016
2019
  name: g,
@@ -2026,7 +2029,7 @@ async function ms(e, a, t, s) {
2026
2029
  );
2027
2030
  $.query = T.query, $.get = T.get;
2028
2031
  } else if (r.get !== void 0) {
2029
- const T = ni(u, r.get, O, Te, f);
2032
+ const T = ri(u, r.get, O, Te, f);
2030
2033
  $.query = T.query, $.get = T.get;
2031
2034
  }
2032
2035
  Object.keys($).length || y({ code: "invalid_change", message: `variable.update on ${u.name} changes nothing.`, path: f, fix: "Send rename, label, query, get, presentation or emptyText." });
@@ -2037,7 +2040,7 @@ async function ms(e, a, t, s) {
2037
2040
  case "variable.remove": {
2038
2041
  const u = Je(b, r.name);
2039
2042
  u || y(cs(b, r.name, `${f}.name`));
2040
- const g = u, $ = ii(b, g.id);
2043
+ const g = u, $ = di(b, g.id);
2041
2044
  $.places.length && y({
2042
2045
  code: "variable_in_use",
2043
2046
  message: `${g.name} is shown in ${$.words}.`,
@@ -2048,7 +2051,7 @@ async function ms(e, a, t, s) {
2048
2051
  break;
2049
2052
  }
2050
2053
  case "document.text.update": {
2051
- const u = rt(r.sheetId, `${f}.sheetId`, { grid: !1 }), { edit: g, unchanged: $ } = ri(r, b, u, f, Te);
2054
+ const u = rt(r.sheetId, `${f}.sheetId`, { grid: !1 }), { edit: g, unchanged: $ } = li(r, b, u, f, Te);
2052
2055
  if (d.push({ ref: r.sheetId, kind: "sheet", id: u.id, title: u.title ?? "", changeIndex: m }), $) break;
2053
2056
  w({ op: "document.text", sheetId: u.id, edit: g, changeIndex: m }, f);
2054
2057
  break;
@@ -2063,7 +2066,7 @@ async function ms(e, a, t, s) {
2063
2066
  }
2064
2067
  }
2065
2068
  if (o.length) return { ok: !1, problems: o };
2066
- const ne = St(e, i, { ...p, ...v });
2069
+ const ne = xt(e, i, { ...p, ...v });
2067
2070
  if (!ne.ok)
2068
2071
  return {
2069
2072
  ok: !1,
@@ -2079,7 +2082,7 @@ async function ms(e, a, t, s) {
2079
2082
  for (const m of c) {
2080
2083
  const r = re(ne.dashboard, m);
2081
2084
  if (!r) continue;
2082
- const f = ((ta = i.find((O) => Lt(O) === m)) == null ? void 0 : ta.changeIndex) ?? 0, u = we(r.card, { sql: !0 }), g = ((aa = qe(r.card)) == null ? void 0 : aa.type) ?? xt(r.card.type);
2085
+ const f = ((ta = i.find((O) => Lt(O) === m)) == null ? void 0 : ta.changeIndex) ?? 0, u = we(r.card, { sql: !0 }), g = ((aa = qe(r.card)) == null ? void 0 : aa.type) ?? St(r.card.type);
2083
2086
  u.editable && ("sql" in u.query ? !!u.query.sql : "measures" in u.query ? u.query.measures.length > 0 : u.query.columns.length > 0) && ((sa = De[g]) == null ? void 0 : sa.forms.includes(at(u.query))) || o.push({
2084
2087
  code: "type_not_supported",
2085
2088
  message: `As changed, "${r.card.title}" would have no query a ${g.replace(/_/g, " ")} can run.`,
@@ -2087,7 +2090,7 @@ async function ms(e, a, t, s) {
2087
2090
  fix: `Send a complete query with the type change: ${((oa = De[g]) == null ? void 0 : oa.forms.map((O) => Ue[O]).join(" or ")) ?? "a measures query"}.`
2088
2091
  });
2089
2092
  }
2090
- if (o.push(...mi(e, ne.dashboard, i, dt, v)), o.push(...hi(ne.dashboard, lt, t.calendar)), o.length) return { ok: !1, problems: o };
2093
+ if (o.push(...pi(e, ne.dashboard, i, dt, v)), o.push(...gi(ne.dashboard, lt, t.calendar)), o.length) return { ok: !1, problems: o };
2091
2094
  for (const m of i) {
2092
2095
  if (m.op !== "filter.add" && !(m.op === "filter.update" && m.settings.scope)) continue;
2093
2096
  const r = m.op === "filter.add" ? m.input.id : m.filterId, f = Le(ne.dashboard, r, void 0, v);
@@ -2150,7 +2153,7 @@ async function ms(e, a, t, s) {
2150
2153
  fix: "Add a timeWindow on that date, or a dashboard date filter that reaches the card."
2151
2154
  });
2152
2155
  }
2153
- const Is = ci(ne.dashboard, i, ne.descriptions, v);
2156
+ const Is = fi(ne.dashboard, i, ne.descriptions, v);
2154
2157
  return {
2155
2158
  ok: !0,
2156
2159
  operations: i,
@@ -2164,7 +2167,7 @@ async function ms(e, a, t, s) {
2164
2167
  warnings: n
2165
2168
  };
2166
2169
  }
2167
- function ci(e, a, t, s) {
2170
+ function fi(e, a, t, s) {
2168
2171
  const o = a.filter((l) => l.op === "card.add");
2169
2172
  if (!o.length) return [...t];
2170
2173
  const n = ss(e, void 0, s);
@@ -2178,18 +2181,18 @@ function ci(e, a, t, s) {
2178
2181
  var y;
2179
2182
  return "notReached" in k && ((y = k.notReached) == null ? void 0 : y.some((F) => F.cardId === c && F.reason === "sql_no_filter_reference" === C));
2180
2183
  }
2181
- ).map((k) => k.label), v = p(!1), b = p(!0), S = n.filter((C) => {
2184
+ ).map((k) => k.label), v = p(!1), b = p(!0), x = n.filter((C) => {
2182
2185
  var k;
2183
2186
  return (k = C.relationshipPending) == null ? void 0 : k.some((y) => y.cardId === c);
2184
- }).map((C) => C.label), x = n.filter((C) => {
2187
+ }).map((C) => C.label), S = n.filter((C) => {
2185
2188
  var k;
2186
2189
  return (k = C.sqlPending) == null ? void 0 : k.some((y) => y.cardId === c);
2187
2190
  }).map((C) => C.label), E = [
2188
2191
  ...h.length ? [`The dashboard's ${i(h)} filter${h.length === 1 ? " applies" : "s apply"} to it.`] : [],
2189
2192
  ...v.length ? [`${i(v)} ${v.length === 1 ? "doesn't" : "don't"} reach it.`] : [],
2190
2193
  ...b.length ? [`${i(b)} ${b.length === 1 ? "doesn't" : "don't"} reach it: its SQL doesn't use dashboard filters.`] : [],
2191
- ...S.length ? [`${i(S)} may reach it through the domain's relationships.`] : [],
2192
- ...x.length ? [`${i(x)} may apply through its SQL.`] : []
2194
+ ...x.length ? [`${i(x)} may reach it through the domain's relationships.`] : [],
2195
+ ...S.length ? [`${i(S)} may apply through its SQL.`] : []
2193
2196
  ];
2194
2197
  E.length && d.set(l.changeIndex, E.join(" "));
2195
2198
  }
@@ -2203,16 +2206,16 @@ function Lt(e) {
2203
2206
  if (e.op === "card.update" || e.op === "card.remove") return e.cardId;
2204
2207
  if (e.op === "card.add") return (a = e.frame.cards[0]) == null ? void 0 : a.id;
2205
2208
  }
2206
- function ui(e) {
2209
+ function mi(e) {
2207
2210
  return Object.fromEntries(
2208
- vo.flatMap((a) => e[a] === void 0 ? [] : [[a, e[a]]])
2211
+ Io.flatMap((a) => e[a] === void 0 ? [] : [[a, e[a]]])
2209
2212
  );
2210
2213
  }
2211
- function fi(e, a) {
2214
+ function hi(e, a) {
2212
2215
  if (!a.length || !e.config) return e;
2213
2216
  const t = { ...e.config }, s = [];
2214
2217
  if (t.matrix) {
2215
- const n = t.matrix, i = wo(n), d = [...n.spec.rows, ...n.spec.columns], l = { ...n.presentation.levelLabels }, c = { ...n.presentation.measureLabels };
2218
+ const n = t.matrix, i = xo(n), d = [...n.spec.rows, ...n.spec.columns], l = { ...n.presentation.levelLabels }, c = { ...n.presentation.measureLabels };
2216
2219
  for (const { key: h, label: p } of a) {
2217
2220
  if (h.role === "metric") {
2218
2221
  const v = i.measures.findIndex((b) => Ye(b, h));
@@ -2230,13 +2233,13 @@ function fi(e, a) {
2230
2233
  const o = { metric: "metricColumns", group_by: "groupByColumns", detail: "detailColumns" };
2231
2234
  for (const { key: n, label: i } of a) {
2232
2235
  const d = [...t[o[n.role]] ?? []], l = Ka(n.role, d).findIndex((c) => Ye(c, n));
2233
- l < 0 || (d[l] = bn(d[l], i), t[o[n.role]] = d, s.push(n));
2236
+ l < 0 || (d[l] = vn(d[l], i), t[o[n.role]] = d, s.push(n));
2234
2237
  }
2235
2238
  return { ...e, config: t, statedLabels: s };
2236
2239
  }
2237
- function mi(e, a, t, s, o) {
2240
+ function pi(e, a, t, s, o) {
2238
2241
  var E;
2239
- const n = [], i = new Map(xe(a).map((C) => [C.cardId, C])), d = Et(a), l = ve(a), c = (C) => {
2242
+ const n = [], i = new Map(Se(a).map((C) => [C.cardId, C])), d = Et(a), l = ve(a), c = (C) => {
2240
2243
  var k, y;
2241
2244
  return ((y = (k = a.sheets) == null ? void 0 : k.find((F) => F.id === C)) == null ? void 0 : y.title) ?? C;
2242
2245
  }, h = (C, k) => {
@@ -2257,7 +2260,7 @@ function mi(e, a, t, s, o) {
2257
2260
  message: `${N} isn't shown on "${c(F.sheetId)}", so it can't filter ${w}.`,
2258
2261
  fix: "Show it on that sheet first with filter.update sheetIds (null for every sheet), in the same proposal."
2259
2262
  };
2260
- const _ = xo(y, F.card);
2263
+ const _ = ko(y, F.card);
2261
2264
  switch (_.status) {
2262
2265
  case "incompatible":
2263
2266
  return { reason: "incompatible_field", message: `${w} can't take ${N}'s values on that field: their types differ.`, fix: "Bind a field of the same type (filter.bind)." };
@@ -2335,13 +2338,13 @@ function mi(e, a, t, s, o) {
2335
2338
  details: { reason: "filter_settings_override", ...w ? { sheetIds: w } : {} }
2336
2339
  });
2337
2340
  }
2338
- const S = ve(e), x = (C) => C === "blocked" || C === "ambiguous";
2341
+ const x = ve(e), S = (C) => C === "blocked" || C === "ambiguous";
2339
2342
  for (const C of l.inputs) {
2340
2343
  const k = C.input.id;
2341
2344
  for (const y of l.reachedCards({ inputId: k })) {
2342
- if (v.has(`${k}|${y.cardId}`) || !x($e(C.input, y.card, o).reach)) continue;
2343
- const F = S.findFilterInput({ inputId: k }), w = F && S.reachedCards({ inputId: k }).find((I) => I.cardId === y.cardId);
2344
- if (F && w && x($e(F.input, w.card, o).reach)) continue;
2345
+ if (v.has(`${k}|${y.cardId}`) || !S($e(C.input, y.card, o).reach)) continue;
2346
+ const F = x.findFilterInput({ inputId: k }), w = F && x.reachedCards({ inputId: k }).find((I) => I.cardId === y.cardId);
2347
+ if (F && w && S($e(F.input, w.card, o).reach)) continue;
2345
2348
  const N = p(k, y.cardId);
2346
2349
  n.push({
2347
2350
  code: "invalid_change",
@@ -2354,7 +2357,7 @@ function mi(e, a, t, s, o) {
2354
2357
  }
2355
2358
  return n;
2356
2359
  }
2357
- function hi(e, a, t) {
2360
+ function gi(e, a, t) {
2358
2361
  const s = [], o = ve(e);
2359
2362
  for (const [n, i] of a) {
2360
2363
  const d = o.findFilterInput({ inputId: n });
@@ -2368,7 +2371,7 @@ function hi(e, a, t) {
2368
2371
  });
2369
2372
  if (i.period) {
2370
2373
  const v = Xa(l && "relativeMeta" in l ? l.relativeMeta : void 0);
2371
- (!v || rn(i.period) || !dn(v, i.period)) && p(
2374
+ (!v || ln(i.period) || !cn(v, i.period)) && p(
2372
2375
  `"${d.input.label}" wouldn't load with that default${h ? `: ${h}` : ""}.`,
2373
2376
  h ? "Ask for a default the picker can take, or tell the user to make it a date range in the editor." : "Tell the user to change the filter's default in the editor."
2374
2377
  );
@@ -2392,10 +2395,10 @@ function _t(e) {
2392
2395
  }
2393
2396
  function Ta(e) {
2394
2397
  var t, s;
2395
- const a = (s = (t = e.config) == null ? void 0 : t.groupByColumns) == null ? void 0 : s.find((o) => mo(o.dataType || "") === "date");
2398
+ const a = (s = (t = e.config) == null ? void 0 : t.groupByColumns) == null ? void 0 : s.find((o) => po(o.dataType || "") === "date");
2396
2399
  return { comparisonDate: a ? { name: a.name, label: a.label || a.name } : null, dateWindow: "unknown" };
2397
2400
  }
2398
- function pi(e, a) {
2401
+ function bi(e, a) {
2399
2402
  if ("sql" in a) return [];
2400
2403
  const t = e, s = (...n) => new Set(n.flatMap((i) => Array.isArray(i) ? i : i ? [i] : []).map((i) => ge(i, a.datasetName))), o = {
2401
2404
  metric: s(t.measures),
@@ -2404,7 +2407,7 @@ function pi(e, a) {
2404
2407
  };
2405
2408
  return Ne(a).filter((n) => o[n.key.role].has(n.key.field));
2406
2409
  }
2407
- function gi(e, a, t, s) {
2410
+ function yi(e, a, t, s) {
2408
2411
  const o = Object.fromEntries(Object.entries(a).filter(([, p]) => p != null)), n = at(o), i = at(e), d = (p) => ka[p].safeParse(o);
2409
2412
  if (!e || n && n !== i) {
2410
2413
  const p = n ?? i, v = p ? d(p) : void 0;
@@ -2440,10 +2443,10 @@ function Ra(e) {
2440
2443
  return e ? { kind: "sheets", sheetIds: e } : { kind: "allSheets", sheetKinds: ["dashboard"] };
2441
2444
  }
2442
2445
  function Aa(e, a, t, s) {
2443
- return ["date", "datetime", "timestamp"].some((i) => Rt(a.dataType).includes(i)) || s({ code: "invalid_change", message: "defaultPeriod is for date filters.", path: t, fix: "Use defaultValues for this field." }), ps(e, { use: "filterDefault", columnHasTime: bi(a) }, t, s);
2446
+ return ["date", "datetime", "timestamp"].some((i) => Rt(a.dataType).includes(i)) || s({ code: "invalid_change", message: "defaultPeriod is for date filters.", path: t, fix: "Use defaultValues for this field." }), ps(e, { use: "filterDefault", columnHasTime: vi(a) }, t, s);
2444
2447
  }
2445
2448
  function ps(e, a, t, s) {
2446
- const o = ln(e, a);
2449
+ const o = un(e, a);
2447
2450
  return o.ok ? o.window : s({
2448
2451
  code: "invalid_change",
2449
2452
  message: o.refusal.message,
@@ -2451,15 +2454,15 @@ function ps(e, a, t, s) {
2451
2454
  path: o.refusal.path ? `${t}.${o.refusal.path}` : t
2452
2455
  });
2453
2456
  }
2454
- function bi(e) {
2457
+ function vi(e) {
2455
2458
  return Na({ dataType: e.dataType }) === "datetime";
2456
2459
  }
2457
- function yi(e) {
2460
+ function _i(e) {
2458
2461
  var a, t, s;
2459
2462
  return (s = (t = (a = e == null ? void 0 : e.filters) == null ? void 0 : a.conditions) == null ? void 0 : t.find((o) => o.relativeMeta)) == null ? void 0 : s.field;
2460
2463
  }
2461
- async function vi(e, a, t, s, o, n) {
2462
- const i = lo(e), d = i.kind === "config" ? i.executableSources : i.kind === "sql" ? i.pinnedCatalogSources.map((x) => x.source) : [], l = he(e), c = typeof a == "string" ? (l == null ? void 0 : l.kind) === "semantic" ? l.datasetName : void 0 : a.datasetName, h = d.find((x) => x.kind === "semantic" && Rt(x.datasetName) === Rt(c));
2464
+ async function Ii(e, a, t, s, o, n) {
2465
+ const i = uo(e), d = i.kind === "config" ? i.executableSources : i.kind === "sql" ? i.pinnedCatalogSources.map((S) => S.source) : [], l = he(e), c = typeof a == "string" ? (l == null ? void 0 : l.kind) === "semantic" ? l.datasetName : void 0 : a.datasetName, h = d.find((S) => S.kind === "semantic" && Rt(S.datasetName) === Rt(c));
2463
2466
  if ((!h || h.kind !== "semantic") && n)
2464
2467
  return o({
2465
2468
  code: "field_not_found",
@@ -2474,21 +2477,21 @@ async function vi(e, a, t, s, o, n) {
2474
2477
  path: s,
2475
2478
  fix: "Name a field of the card's own dataset, or { name, datasetName } for a dataset its query joins."
2476
2479
  });
2477
- const p = await t.loadCardSource({ domainId: h.domainId, datasetName: h.datasetName }), v = typeof a == "string" ? a : a.name, b = p ? nt(p.fields, v, h.datasetName) : void 0, S = b ? tn(h, { column_name: b.name, data_type: b.dataType, ...b.sourceField ? { sourceField: b.sourceField } : {} }) : void 0;
2478
- return S || o({
2480
+ const p = await t.loadCardSource({ domainId: h.domainId, datasetName: h.datasetName }), v = typeof a == "string" ? a : a.name, b = p ? nt(p.fields, v, h.datasetName) : void 0, x = b ? sn(h, { column_name: b.name, data_type: b.dataType, ...b.sourceField ? { sourceField: b.sourceField } : {} }) : void 0;
2481
+ return x || o({
2479
2482
  code: "field_not_found",
2480
2483
  message: `"${v}" isn't a field of ${h.datasetName}.`,
2481
2484
  path: s,
2482
2485
  fix: "Use one of details.available, or read semaphor_get_dataset_schema.",
2483
- details: { available: ((p == null ? void 0 : p.fields) ?? []).slice(0, 20).map((x) => x.name) }
2486
+ details: { available: ((p == null ? void 0 : p.fields) ?? []).slice(0, 20).map((S) => S.name) }
2484
2487
  });
2485
2488
  }
2486
- const _i = {
2489
+ const Ci = {
2487
2490
  max: ya,
2488
2491
  what: "A proposal that creates a dashboard",
2489
2492
  fix: `Create with the first ${ya}, then change the new dashboard in a second proposal.`
2490
2493
  };
2491
- async function Vr(e, a) {
2494
+ async function jr(e, a) {
2492
2495
  const t = (d) => d && typeof d == "object" ? d.op : void 0, s = e.changes.flatMap(
2493
2496
  (d, l) => t(d) === "dashboard.update" ? [
2494
2497
  {
@@ -2500,12 +2503,12 @@ async function Vr(e, a) {
2500
2503
  ] : []
2501
2504
  );
2502
2505
  if (s.length) return { ok: !1, problems: s };
2503
- const o = Ci(e, a), n = await ms(o, e.changes, a, { limit: _i });
2506
+ const o = wi(e, a), n = await ms(o, e.changes, a, { limit: Ci });
2504
2507
  if (!n.ok) return n;
2505
- const i = Ii(n, e.changes);
2506
- return { ...i, seed: o, sentence: $i(i.dashboard) };
2508
+ const i = $i(n, e.changes);
2509
+ return { ...i, seed: o, sentence: Si(i.dashboard) };
2507
2510
  }
2508
- function Ii(e, a) {
2511
+ function $i(e, a) {
2509
2512
  if (a.some((n) => {
2510
2513
  if (!n || typeof n != "object") return !1;
2511
2514
  const { op: i } = n;
@@ -2513,7 +2516,7 @@ function Ii(e, a) {
2513
2516
  })) return e;
2514
2517
  const s = (e.dashboard.sheets ?? []).filter((n) => !Xe(n) && (n.frames ?? []).length > 0).map((n) => ({ op: "layout.arrange", sheetId: n.id }));
2515
2518
  if (!s.length) return e;
2516
- const o = St(e.dashboard, s, e.context);
2519
+ const o = xt(e.dashboard, s, e.context);
2517
2520
  if (!o.ok) throw new Error(`Arranging a new dashboard failed: ${o.failedAt.code}`);
2518
2521
  return {
2519
2522
  ...e,
@@ -2522,7 +2525,7 @@ function Ii(e, a) {
2522
2525
  descriptions: [...e.descriptions, ...o.descriptions]
2523
2526
  };
2524
2527
  }
2525
- function Ci(e, a) {
2528
+ function wi(e, a) {
2526
2529
  const t = e.changes.some((s) => s && typeof s == "object" && s.op === "sheet.add");
2527
2530
  return {
2528
2531
  id: e.dashboardId,
@@ -2534,33 +2537,33 @@ function Ci(e, a) {
2534
2537
  };
2535
2538
  }
2536
2539
  const It = (e, a) => `${e} ${a}${e === 1 ? "" : "s"}`;
2537
- function $i(e) {
2540
+ function Si(e) {
2538
2541
  const a = e.sheets ?? [], t = a.reduce((n, i) => n + (i.frames ?? []).reduce((d, l) => {
2539
2542
  var c;
2540
2543
  return d + (((c = l.cards) == null ? void 0 : c.length) ?? 0);
2541
2544
  }, 0), 0), s = (e.inputs ?? []).filter((n) => n.kind === "filter").length, o = [It(a.length, "sheet"), It(t, "card"), ...s ? [It(s, "filter")] : []];
2542
2545
  return `Creates a private dashboard ${Ga(e.title)} with ${et(o)}.`;
2543
2546
  }
2544
- const wi = 50;
2545
- function Gr(e, a) {
2547
+ const xi = 50;
2548
+ function Kr(e, a) {
2546
2549
  var w, N;
2547
- const t = (w = a.sheetIds) != null && w.length ? new Set(a.sheetIds) : void 0, s = (N = a.cardIds) != null && N.length ? new Set(a.cardIds) : void 0, o = (e.sheets ?? []).filter((I) => !t || t.has(I.id)), n = xe(e).filter(
2550
+ const t = (w = a.sheetIds) != null && w.length ? new Set(a.sheetIds) : void 0, s = (N = a.cardIds) != null && N.length ? new Set(a.cardIds) : void 0, o = (e.sheets ?? []).filter((I) => !t || t.has(I.id)), n = Se(e).filter(
2548
2551
  (I) => (!t || t.has(I.sheetId)) && (!s || s.has(I.cardId))
2549
- ), i = n.length > (a.maxQueryCards ?? wi), d = new Map(
2552
+ ), i = n.length > (a.maxQueryCards ?? xi), d = new Map(
2550
2553
  (e.sheets ?? []).flatMap((I) => (I.frames ?? []).map((_) => [_.id, _]))
2551
2554
  ), l = /* @__PURE__ */ new Map(), c = (I) => {
2552
2555
  (I == null ? void 0 : I.kind) === "semantic" && l.set(`${I.domainId}|${I.datasetName}`, { domainId: I.domainId, datasetName: I.datasetName });
2553
2556
  }, h = new Map(
2554
2557
  (e.sheets ?? []).map((I) => [I.id, $t({ dashboard: e, place: { kind: I.kind === "document" ? "document" : "sheet", sheetId: I.id } })])
2555
- ), p = (I) => ({ catalog: I, inputs: e.inputs, variables: e.variables }), v = (I) => p(h.get(I)), b = /* @__PURE__ */ new Map(), S = (I, _) => {
2558
+ ), p = (I) => ({ catalog: I, inputs: e.inputs, variables: e.variables }), v = (I) => p(h.get(I)), b = /* @__PURE__ */ new Map(), x = (I, _) => {
2556
2559
  if (I.kind === "document") return v(I.id);
2557
2560
  const D = $t({ dashboard: e, place: { kind: "sheet", sheetId: I.id, cardId: _ } });
2558
2561
  return b.set(`${I.id}:${_}`, D), p(D);
2559
- }, x = o.map((I) => ({
2562
+ }, S = o.map((I) => ({
2560
2563
  sheetId: I.id,
2561
2564
  title: I.title ?? "",
2562
2565
  kind: I.kind === "document" ? "document" : "dashboard",
2563
- ...I.kind === "document" ? Si(I, v(I.id)) : { layout: Ri(I) },
2566
+ ...I.kind === "document" ? Ti(I, v(I.id)) : { layout: Di(I) },
2564
2567
  cards: n.filter((_) => _.sheetId === I.id).map((_) => {
2565
2568
  var te;
2566
2569
  const D = _.card, M = _.kind === "frameCard" ? (te = d.get(_.frameId)) == null ? void 0 : te.visualId : void 0, P = M ? { linkedVisualId: M } : {}, G = { cardId: _.cardId, title: D.title ?? "" };
@@ -2579,7 +2582,7 @@ function Gr(e, a) {
2579
2582
  };
2580
2583
  }
2581
2584
  if (D.type === "text") {
2582
- const oe = ja(D, S(I, D.id));
2585
+ const oe = ja(D, x(I, D.id));
2583
2586
  return oe.editable ? { ...G, type: "text", ...P, editable: !0, text: oe.text, ...oe.editorOnly.length ? { editorOnly: oe.editorOnly } : {} } : { ...G, ...Qe(D), ...P, editable: !1, notEditable: { reason: "text", message: oe.message } };
2584
2587
  }
2585
2588
  const B = we(D, { sql: a.sql });
@@ -2592,7 +2595,7 @@ function Gr(e, a) {
2592
2595
  editable: !1,
2593
2596
  notEditable: { reason: B.reason, message: B.message, ...B.detail ? { detail: B.detail } : {} }
2594
2597
  };
2595
- const Z = i ? void 0 : Ft(D);
2598
+ const K = i ? void 0 : Ft(D);
2596
2599
  return {
2597
2600
  ...G,
2598
2601
  ...Qe(D),
@@ -2605,7 +2608,7 @@ function Gr(e, a) {
2605
2608
  ...B.matrix ? { matrix: B.matrix } : {},
2606
2609
  ...B.timeWindowReadOnly ? { timeWindowReadOnly: B.timeWindowReadOnly } : {}
2607
2610
  },
2608
- ...Z
2611
+ ...K
2609
2612
  };
2610
2613
  })
2611
2614
  })), E = ss(e, ts(a.calendar, a.updatedAt), {
@@ -2613,7 +2616,7 @@ function Gr(e, a) {
2613
2616
  });
2614
2617
  for (const I of E)
2615
2618
  I.editable && l.set(`${I.domainId}|${I.datasetName}`, { domainId: I.domainId, datasetName: I.datasetName });
2616
- const C = ki(e, a, new Map([...h, ...b]));
2619
+ const C = Ri(e, a, new Map([...h, ...b]));
2617
2620
  for (const I of e.variables ?? []) {
2618
2621
  const _ = Tt(I);
2619
2622
  (_ == null ? void 0 : _.kind) === "semantic" && l.set(`${_.domainId}|${_.datasetName}`, { domainId: _.domainId, datasetName: _.datasetName });
@@ -2648,23 +2651,23 @@ function Gr(e, a) {
2648
2651
  updatedAt: a.updatedAt,
2649
2652
  access: a.access,
2650
2653
  datasets: [...l.values()],
2651
- sheets: x,
2654
+ sheets: S,
2652
2655
  filters: E,
2653
2656
  variables: C,
2654
- style: xi(e, a),
2657
+ style: ki(e, a),
2655
2658
  editorOnly: F,
2656
2659
  ...i ? { truncated: !0 } : {}
2657
2660
  };
2658
2661
  }
2659
- function xi(e, a) {
2662
+ function ki(e, a) {
2660
2663
  const { style: t, organizationAppearance: s } = za(e, a.organizationAppearance);
2661
- return { set: En(t), shows: mn({ organizationAppearance: s, dashboardStyle: t }, "light").shows };
2664
+ return { set: Nn(t), shows: pn({ organizationAppearance: s, dashboardStyle: t }, "light").shows };
2662
2665
  }
2663
2666
  function Da(e, a) {
2664
- const t = To(a);
2667
+ const t = Ao(a);
2665
2668
  return t ? { ...e, style: t } : e;
2666
2669
  }
2667
- function Si(e, a) {
2670
+ function Ti(e, a) {
2668
2671
  const t = e.document;
2669
2672
  if (!t) return {};
2670
2673
  const s = (o) => {
@@ -2681,7 +2684,7 @@ function Si(e, a) {
2681
2684
  )
2682
2685
  };
2683
2686
  }
2684
- function ki(e, a, t) {
2687
+ function Ri(e, a, t) {
2685
2688
  const s = Ha(e), o = (c) => s.filter(({ ref: h }) => c(h)).map(({ place: h, where: p }) => ({
2686
2689
  sheetId: h.sheetId,
2687
2690
  where: p.kind,
@@ -2702,17 +2705,17 @@ function ki(e, a, t) {
2702
2705
  })), d = [...n.values()].filter((c) => c.kind === "report").map((c) => ({
2703
2706
  name: c.name,
2704
2707
  kind: "report",
2705
- words: Ti[c.reportKey],
2708
+ words: Ai[c.reportKey],
2706
2709
  parts: [],
2707
2710
  usedIn: o((h) => h.source === "documentMeta" && h.key === c.reportKey),
2708
2711
  editable: !1
2709
2712
  })), l = (e.variables ?? []).map((c) => {
2710
- const h = ds(c, { sql: a.sql }), p = Ot(c, e)[0], v = ko(c.presentation);
2713
+ const h = ds(c, { sql: a.sql }), p = Ot(c, e)[0], v = Ro(c.presentation);
2711
2714
  return {
2712
2715
  name: c.name,
2713
2716
  kind: "data",
2714
- words: an(c),
2715
- parts: jo(c),
2717
+ words: on(c),
2718
+ parts: Wo(c),
2716
2719
  ...v ? { presentation: v } : {},
2717
2720
  usedIn: o((b) => b.source === "data" && b.variableId === c.id),
2718
2721
  editable: h.editable,
@@ -2722,18 +2725,18 @@ function ki(e, a, t) {
2722
2725
  });
2723
2726
  return [...i, ...d, ...l];
2724
2727
  }
2725
- const Ti = {
2728
+ const Ai = {
2726
2729
  generatedAt: "When the report was generated",
2727
2730
  pageNumber: "The page number (Documents)",
2728
2731
  pageCount: "The page count (Documents)"
2729
2732
  };
2730
2733
  function Qe(e) {
2731
2734
  const a = qe(e);
2732
- return a ? { type: a.type, ...a.properties } : { type: xt(e.type) };
2735
+ return a ? { type: a.type, ...a.properties } : { type: St(e.type) };
2733
2736
  }
2734
- function Ri(e) {
2737
+ function Di(e) {
2735
2738
  const a = new Map((e.frames ?? []).map((t) => [t.id, t]));
2736
- return vn(e).rows.map((t) => ({
2739
+ return In(e).rows.map((t) => ({
2737
2740
  tiles: t.tiles.map((s) => {
2738
2741
  const o = a.get(s.frameId);
2739
2742
  return { cardIds: o ? Va(o) : [], width: s.width };
@@ -2746,13 +2749,13 @@ function ae(e) {
2746
2749
  function ue(e, a) {
2747
2750
  return ae(e) && Object.prototype.hasOwnProperty.call(e, a) && e[a] !== void 0;
2748
2751
  }
2749
- const de = ue, Ai = ["metricColumns", "groupByColumns", "detailColumns", "pivotByColumns", "sortByColumns"], Di = ["xAxisConfig", "yAxisConfig", "secondaryYAxisConfig", "tooltipConfig", "dataLabelsConfig"], Fi = '`format` on the matching column in `config.metricColumns`, `groupByColumns` or `detailColumns`; for a SQL or Python card, `preferences.sqlColumns["<column>"].format`', He = "`preferences.conditionalFormatting`, with columns named by card column id";
2750
- function Oi(e) {
2752
+ const de = ue, Fi = ["metricColumns", "groupByColumns", "detailColumns", "pivotByColumns", "sortByColumns"], Oi = ["xAxisConfig", "yAxisConfig", "secondaryYAxisConfig", "tooltipConfig", "dataLabelsConfig"], Ei = '`format` on the matching column in `config.metricColumns`, `groupByColumns` or `detailColumns`; for a SQL or Python card, `preferences.sqlColumns["<column>"].format`', He = "`preferences.conditionalFormatting`, with columns named by card column id";
2753
+ function qi(e) {
2751
2754
  return Me(String(e.type)) ?? qt;
2752
2755
  }
2753
2756
  function Ee(e, a, t) {
2754
2757
  if (t === void 0) return;
2755
- const s = ae(t) ? Oi(t).safeParse(t) : qt.safeParse(t);
2758
+ const s = ae(t) ? qi(t).safeParse(t) : qt.safeParse(t);
2756
2759
  if (!s.success)
2757
2760
  for (const o of s.error.issues) {
2758
2761
  const n = o.code === "unrecognized_keys" ? o.keys : [o.path.length ? String(o.path[o.path.length - 1]) : "type"];
@@ -2773,29 +2776,29 @@ function Ct(e, a, t) {
2773
2776
  }
2774
2777
  function gs(e, a) {
2775
2778
  const t = [], s = e.config;
2776
- for (const S of Ai) {
2777
- const x = s == null ? void 0 : s[S];
2778
- Array.isArray(x) && x.forEach((E, C) => Ct(t, `${a}.config.${S}[${C}]`, E));
2779
+ for (const x of Fi) {
2780
+ const S = s == null ? void 0 : s[x];
2781
+ Array.isArray(S) && S.forEach((E, C) => Ct(t, `${a}.config.${x}[${C}]`, E));
2779
2782
  }
2780
2783
  const o = ae(s == null ? void 0 : s.matrix) ? s.matrix : void 0, n = ae(o == null ? void 0 : o.presentation) ? o.presentation : void 0;
2781
- for (const S of ["measureFormats", "levelFormats"]) {
2782
- const x = n == null ? void 0 : n[S];
2783
- if (ae(x)) for (const [E, C] of Object.entries(x)) Ee(t, `${a}.config.matrix.presentation.${S}.${E}`, C);
2784
+ for (const x of ["measureFormats", "levelFormats"]) {
2785
+ const S = n == null ? void 0 : n[x];
2786
+ if (ae(S)) for (const [E, C] of Object.entries(S)) Ee(t, `${a}.config.matrix.presentation.${x}.${E}`, C);
2784
2787
  }
2785
2788
  de(n, "conditionalFormatting") && t.push({ path: `${a}.config.matrix.presentation.conditionalFormatting`, field: "conditionalFormatting", replacement: He });
2786
2789
  const i = e.interactionConfig, d = i == null ? void 0 : i.drillHierarchies;
2787
- Array.isArray(d) && d.forEach((S, x) => {
2788
- ae(S) && (Ct(t, `${a}.interactionConfig.drillHierarchies[${x}].baseField`, S.baseField), Array.isArray(S.steps) && S.steps.forEach((E, C) => {
2789
- ae(E) && Ct(t, `${a}.interactionConfig.drillHierarchies[${x}].steps[${C}].field`, E.field);
2790
+ Array.isArray(d) && d.forEach((x, S) => {
2791
+ ae(x) && (Ct(t, `${a}.interactionConfig.drillHierarchies[${S}].baseField`, x.baseField), Array.isArray(x.steps) && x.steps.forEach((E, C) => {
2792
+ ae(E) && Ct(t, `${a}.interactionConfig.drillHierarchies[${S}].steps[${C}].field`, E.field);
2790
2793
  }));
2791
2794
  });
2792
2795
  const l = e.preferences;
2793
2796
  if (!l) return t;
2794
2797
  const c = `${a}.preferences`;
2795
2798
  if (de(l, "formatNumber")) {
2796
- const S = l.formatNumber, x = ae(S) && Object.keys(S).every((E) => E === "colorRanges");
2799
+ const x = l.formatNumber, S = ae(x) && Object.keys(x).every((E) => E === "colorRanges");
2797
2800
  t.push(
2798
- x ? { path: `${c}.formatNumber.colorRanges`, field: "colorRanges", replacement: `${He} (a rule on the KPI's value)` } : { path: `${c}.formatNumber`, field: "formatNumber", replacement: "`format` on each measure in `config.metricColumns`; for a SQL KPI, `preferences.sqlKpiValue.format`" }
2801
+ S ? { path: `${c}.formatNumber.colorRanges`, field: "colorRanges", replacement: `${He} (a rule on the KPI's value)` } : { path: `${c}.formatNumber`, field: "formatNumber", replacement: "`format` on each measure in `config.metricColumns`; for a SQL KPI, `preferences.sqlKpiValue.format`" }
2799
2802
  );
2800
2803
  }
2801
2804
  de(l, "numberAxisFormat") && t.push({ path: `${c}.numberAxisFormat`, field: "numberAxisFormat", replacement: "`valueFormat` on `preferences.yAxisConfig` (or the axis it formats)" }), de(l, "columnSettings") && t.push({ path: `${c}.columnSettings`, field: "columnSettings", replacement: "`preferences.tablePrefs.columnSettingsMap`, keyed by column" });
@@ -2805,28 +2808,28 @@ function gs(e, a) {
2805
2808
  de(p, "conditionalFormatting") && t.push({ path: `${c}.tablePrefs.conditionalFormatting`, field: "conditionalFormatting", replacement: He });
2806
2809
  const v = p == null ? void 0 : p.columnSettingsMap;
2807
2810
  if (ae(v))
2808
- for (const [S, x] of Object.entries(v)) {
2809
- if (!ae(x)) continue;
2810
- const E = `${c}.tablePrefs.columnSettingsMap.${S}`;
2811
+ for (const [x, S] of Object.entries(v)) {
2812
+ if (!ae(S)) continue;
2813
+ const E = `${c}.tablePrefs.columnSettingsMap.${x}`;
2811
2814
  for (const C of ["numberFormat", "dateFormat", "inheritMetricFormat"])
2812
- de(x, C) && t.push({ path: `${E}.${C}`, field: C, replacement: C === "inheritMetricFormat" ? "nothing: a column follows its `format`" : Fi });
2813
- de(x, "colorRanges") && t.push({ path: `${E}.colorRanges`, field: "colorRanges", replacement: He });
2815
+ de(S, C) && t.push({ path: `${E}.${C}`, field: C, replacement: C === "inheritMetricFormat" ? "nothing: a column follows its `format`" : Ei });
2816
+ de(S, "colorRanges") && t.push({ path: `${E}.colorRanges`, field: "colorRanges", replacement: He });
2814
2817
  }
2815
- for (const S of Di) {
2816
- const x = l[S];
2817
- if (ae(x)) {
2818
+ for (const x of Oi) {
2819
+ const S = l[x];
2820
+ if (ae(S)) {
2818
2821
  for (const E of ["formatMode", "mode", "formatOptions"])
2819
- de(x, E) && t.push({ path: `${c}.${S}.${E}`, field: E, replacement: `\`preferences.${S}.valueFormat\` (absent means the column's format)` });
2820
- S === "dataLabelsConfig" && de(x, "format") && t.push({ path: `${c}.${S}.format`, field: "format", replacement: "`preferences.dataLabelsConfig.valueFormat`" }), Ee(t, `${c}.${S}.valueFormat`, x.valueFormat);
2822
+ de(S, E) && t.push({ path: `${c}.${x}.${E}`, field: E, replacement: `\`preferences.${x}.valueFormat\` (absent means the column's format)` });
2823
+ x === "dataLabelsConfig" && de(S, "format") && t.push({ path: `${c}.${x}.format`, field: "format", replacement: "`preferences.dataLabelsConfig.valueFormat`" }), Ee(t, `${c}.${x}.valueFormat`, S.valueFormat);
2821
2824
  }
2822
2825
  }
2823
2826
  const b = l.sqlColumns;
2824
2827
  if (ae(b))
2825
- for (const [S, x] of Object.entries(b))
2826
- ae(x) && Ee(t, `${c}.sqlColumns.${S}.format`, x.format);
2828
+ for (const [x, S] of Object.entries(b))
2829
+ ae(S) && Ee(t, `${c}.sqlColumns.${x}.format`, S.format);
2827
2830
  return ae(l.sqlKpiValue) && Ee(t, `${c}.sqlKpiValue.format`, l.sqlKpiValue.format), t;
2828
2831
  }
2829
- function Ei(e) {
2832
+ function Ni(e) {
2830
2833
  const a = `sheets[id=${e.sheetId}]`;
2831
2834
  switch (e.kind) {
2832
2835
  case "sheetCard":
@@ -2840,22 +2843,22 @@ function Ei(e) {
2840
2843
  function bs(e) {
2841
2844
  if (!ae(e)) return [];
2842
2845
  if (Array.isArray(e.sheets))
2843
- return xe(e).map((t) => ({
2846
+ return Se(e).map((t) => ({
2844
2847
  card: t.card,
2845
- at: Ei(t)
2848
+ at: Ni(t)
2846
2849
  }));
2847
2850
  const a = e;
2848
2851
  return Array.isArray(a.cards) ? a.cards.map((t) => ({ card: t, at: `cards[id=${t.id}]` })) : [];
2849
2852
  }
2850
- function jr(e) {
2853
+ function Wr(e) {
2851
2854
  return bs(e).flatMap(({ card: a, at: t }) => gs(a, t));
2852
2855
  }
2853
- function qi(e, a) {
2856
+ function Pi(e, a) {
2854
2857
  var n;
2855
2858
  const t = (n = e.preferences) == null ? void 0 : n.conditionalFormatting;
2856
2859
  if (t === void 0) return [];
2857
- const s = `${a}.preferences.conditionalFormatting`, o = Ro.safeParse(t);
2858
- return o.success ? Ao(e).map((i) => ({
2860
+ const s = `${a}.preferences.conditionalFormatting`, o = Do.safeParse(t);
2861
+ return o.success ? Fo(e).map((i) => ({
2859
2862
  code: "invalid_conditional_formatting",
2860
2863
  path: `${s}.rules[id=${i.ruleId}].${i.path}`,
2861
2864
  message: i.message
@@ -2865,14 +2868,14 @@ function qi(e, a) {
2865
2868
  message: i.message
2866
2869
  }));
2867
2870
  }
2868
- function Kr(e) {
2871
+ function Ur(e) {
2869
2872
  return bs(e).flatMap(({ card: a, at: t }) => [
2870
2873
  ...gs(a, t).map((s) => ({
2871
2874
  code: "retired_presentation_field",
2872
2875
  path: s.path,
2873
2876
  message: `\`${s.field}\` is retired: use ${s.replacement}.`
2874
2877
  })),
2875
- ...qi(a, t)
2878
+ ...Pi(a, t)
2876
2879
  ]);
2877
2880
  }
2878
2881
  const Mt = [
@@ -2881,7 +2884,7 @@ const Mt = [
2881
2884
  "detailColumns",
2882
2885
  "pivotByColumns",
2883
2886
  "sortByColumns"
2884
- ], Ni = [
2887
+ ], Li = [
2885
2888
  "xAxisConfig",
2886
2889
  "yAxisConfig",
2887
2890
  "secondaryYAxisConfig",
@@ -2901,15 +2904,15 @@ function _e(e, a) {
2901
2904
  return ys(t(e), t(a));
2902
2905
  }
2903
2906
  function st(e) {
2904
- const a = cn(e);
2907
+ const a = fn(e);
2905
2908
  return a === "date" || a === "datetime";
2906
2909
  }
2907
2910
  function vs(e) {
2908
2911
  var a, t;
2909
2912
  return !!((a = e.sql) != null && a.trim() || (t = e.python) != null && t.trim());
2910
2913
  }
2911
- function Pi(e) {
2912
- return e.type === "kpi" && Lo(e);
2914
+ function Mi(e) {
2915
+ return e.type === "kpi" && Bo(e);
2913
2916
  }
2914
2917
  function At(e) {
2915
2918
  return e.type === "table" || e.type === "detailTable";
@@ -2919,7 +2922,7 @@ function se(e, a) {
2919
2922
  const t = (s = e.config) == null ? void 0 : s[a];
2920
2923
  return Array.isArray(t) ? t : [];
2921
2924
  }
2922
- function Li(e, a) {
2925
+ function Bi(e, a) {
2923
2926
  for (const t of Mt) {
2924
2927
  const s = se(e, t).indexOf(a);
2925
2928
  if (s >= 0) return `config.${t}[${s}]`;
@@ -2935,7 +2938,7 @@ function ot(e, a, t, s) {
2935
2938
  a.format = t, a.formatOrigin = "override", e.changes.push({
2936
2939
  path: s,
2937
2940
  action: "moved",
2938
- to: `${Li(e.card, a) ?? "config"}.format`
2941
+ to: `${Bi(e.card, a) ?? "config"}.format`
2939
2942
  });
2940
2943
  }
2941
2944
  function Bt(e) {
@@ -2945,7 +2948,7 @@ function Bt(e) {
2945
2948
  function Dt(e, a, t) {
2946
2949
  if (!(!ue(a, "dateFormat") && !ue(a, "customFormat"))) {
2947
2950
  if (st(a.dataType) && a.format == null && a.dateFormat != null) {
2948
- const s = No({
2951
+ const s = Lo({
2949
2952
  fieldId: a.id,
2950
2953
  dataType: a.dataType,
2951
2954
  granularity: a.granularity,
@@ -2961,7 +2964,7 @@ function Dt(e, a, t) {
2961
2964
  ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${t}.dateFormat`, action: "removed" });
2962
2965
  }
2963
2966
  }
2964
- function Mi(e, a, t) {
2967
+ function Vi(e, a, t) {
2965
2968
  if (!ue(a, "dateFormat") && !ue(a, "customFormat")) return;
2966
2969
  const s = a.dateFormat === "custom" ? a.customFormat : a.dateFormat;
2967
2970
  e.card.type === "detailTable" && st(a.dataType) && !a.format && typeof s == "string" && s.trim() ? (a.format = { type: "date", pattern: s }, a.formatOrigin = "override", e.changes.push({
@@ -2974,14 +2977,14 @@ function Mi(e, a, t) {
2974
2977
  detail: "A detail date pattern on a column that has a format of its own."
2975
2978
  }), ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${t}.dateFormat`, action: "removed" });
2976
2979
  }
2977
- function Bi(e, a, t, s) {
2980
+ function Gi(e, a, t, s) {
2978
2981
  if (a.format !== void 0) {
2979
2982
  const o = Bt(a.format);
2980
2983
  o ? _e(o, a.format) || (a.format = o, e.changes.push({ path: `${s}.format`, action: "cleaned" })) : (delete a.format, e.changes.push({ path: `${s}.format`, action: "removed" }));
2981
2984
  }
2982
- t === "groupByColumns" || t === "pivotByColumns" ? Dt(e, a, s) : t === "detailColumns" ? Mi(e, a, s) : ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${s}.dateFormat`, action: "removed" });
2985
+ t === "groupByColumns" || t === "pivotByColumns" ? Dt(e, a, s) : t === "detailColumns" ? Vi(e, a, s) : ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${s}.dateFormat`, action: "removed" });
2983
2986
  }
2984
- function Vi(e, a) {
2987
+ function ji(e, a) {
2985
2988
  for (const t of Mt)
2986
2989
  se(e.card, t).forEach((s, o) => {
2987
2990
  var i;
@@ -2993,7 +2996,7 @@ function Vi(e, a) {
2993
2996
  });
2994
2997
  });
2995
2998
  }
2996
- function Gi(e) {
2999
+ function Ki(e) {
2997
3000
  var t;
2998
3001
  const a = (t = e.card.interactionConfig) == null ? void 0 : t.drillHierarchies;
2999
3002
  Array.isArray(a) && a.forEach((s, o) => {
@@ -3011,13 +3014,13 @@ function Gi(e) {
3011
3014
  });
3012
3015
  });
3013
3016
  }
3014
- const ji = [
3017
+ const Wi = [
3015
3018
  "numberFormat",
3016
3019
  "dateFormat",
3017
3020
  "inheritMetricFormat",
3018
3021
  "colorRanges"
3019
3022
  ];
3020
- function Ki(e, a) {
3023
+ function Ui(e, a) {
3021
3024
  const t = (o) => o == null ? void 0 : o.trim().toLowerCase(), s = t(a);
3022
3025
  return [
3023
3026
  e.id,
@@ -3025,32 +3028,32 @@ function Ki(e, a) {
3025
3028
  e.name,
3026
3029
  e.qualifiedFieldName,
3027
3030
  e.label,
3028
- e.role === "metric" ? Yo(e) : void 0
3031
+ e.role === "metric" ? Jo(e) : void 0
3029
3032
  ].some((o) => o !== void 0 && t(o) === s);
3030
3033
  }
3031
3034
  function Fa(e, a) {
3032
- const t = Po(e, { columnId: a });
3035
+ const t = Mo(e, { columnId: a });
3033
3036
  if (t) return t;
3034
3037
  const s = [
3035
3038
  ...se(e, "detailColumns"),
3036
3039
  ...se(e, "metricColumns"),
3037
3040
  ...se(e, "groupByColumns")
3038
- ].filter((o) => Ki(o, a));
3041
+ ].filter((o) => Ui(o, a));
3039
3042
  return s.length === 1 ? s[0] : void 0;
3040
3043
  }
3041
- function Wi(e) {
3044
+ function Qi(e) {
3042
3045
  return e.type === "number" && ee(e.numberFormat) && e.inheritMetricFormat !== !0;
3043
3046
  }
3044
- function Ui(e, a) {
3047
+ function Hi(e, a) {
3045
3048
  var t;
3046
- return st(a.dataType) ? se(e, "detailColumns").includes(a) ? e.type === "detailTable" : gn(a.granularity) || ((t = a.format) == null ? void 0 : t.type) === "temporal_bucket" || a.semanticTemporalPresentation != null : !1;
3049
+ return st(a.dataType) ? se(e, "detailColumns").includes(a) ? e.type === "detailTable" : yn(a.granularity) || ((t = a.format) == null ? void 0 : t.type) === "temporal_bucket" || a.semanticTemporalPresentation != null : !1;
3047
3050
  }
3048
3051
  function Oa(e, a, t, s) {
3049
3052
  var i;
3050
3053
  const o = (i = e.card).preferences ?? (i.preferences = {}), n = o.sqlColumns ?? (o.sqlColumns = {});
3051
3054
  n[a] = { ...n[a], format: t }, e.changes.push({ path: s, action: "moved", to: `preferences.sqlColumns[${JSON.stringify(a)}].format` });
3052
3055
  }
3053
- function Qi(e) {
3056
+ function Yi(e) {
3054
3057
  const [a, ...t] = e;
3055
3058
  if (!a) return;
3056
3059
  const s = Object.fromEntries(
@@ -3058,8 +3061,8 @@ function Qi(e) {
3058
3061
  );
3059
3062
  return qt.safeParse(s).success ? s : void 0;
3060
3063
  }
3061
- function Hi(e, a) {
3062
- const t = e.card, s = Ko({
3064
+ function zi(e, a) {
3065
+ const t = e.card, s = Uo({
3063
3066
  groupByColumns: se(t, "groupByColumns"),
3064
3067
  metricColumns: se(t, "metricColumns"),
3065
3068
  pivotByColumns: se(t, "pivotByColumns"),
@@ -3076,10 +3079,10 @@ function Hi(e, a) {
3076
3079
  });
3077
3080
  }
3078
3081
  }
3079
- function Yi(e, a) {
3082
+ function Ji(e, a) {
3080
3083
  var n;
3081
3084
  if (!a.length) return;
3082
- const t = se(e.card, "metricColumns"), s = t.length === 1 ? t[0] : void 0, o = s && !s.format ? Qi(a.map((i) => i.format)) : void 0;
3085
+ const t = se(e.card, "metricColumns"), s = t.length === 1 ? t[0] : void 0, o = s && !s.format ? Yi(a.map((i) => i.format)) : void 0;
3083
3086
  s && o && ot(e, s, o, a[0].from);
3084
3087
  for (const i of a)
3085
3088
  if (!(s != null && s.format && _e(i.format, s.format))) {
@@ -3104,7 +3107,7 @@ function Yi(e, a) {
3104
3107
  );
3105
3108
  }
3106
3109
  }
3107
- function zi(e) {
3110
+ function Xi(e) {
3108
3111
  var l;
3109
3112
  const a = (l = e.card.preferences) == null ? void 0 : l.tablePrefs, t = a == null ? void 0 : a.columnSettingsMap;
3110
3113
  if (!ee(t)) return;
@@ -3112,19 +3115,19 @@ function zi(e) {
3112
3115
  for (const [c, h] of Object.entries(t)) {
3113
3116
  if (!ee(h)) continue;
3114
3117
  const p = h, v = `preferences.tablePrefs.columnSettingsMap[${JSON.stringify(c)}]`;
3115
- if (Wi(p)) {
3116
- const b = Do(p.numberFormat);
3118
+ if (Qi(p)) {
3119
+ const b = Oo(p.numberFormat);
3117
3120
  if (b && o)
3118
3121
  Oa(e, c, b, `${v}.numberFormat`);
3119
3122
  else if (b && At(s)) {
3120
- const S = Fa(s, c), x = { key: c, format: b, from: `${v}.numberFormat` };
3121
- S ? i.set(S, [...i.get(S) ?? [], x]) : n ? d.push(x) : e.unconverted.push({
3122
- path: x.from,
3123
+ const x = Fa(s, c), S = { key: c, format: b, from: `${v}.numberFormat` };
3124
+ x ? i.set(x, [...i.get(x) ?? [], S]) : n ? d.push(S) : e.unconverted.push({
3125
+ path: S.from,
3123
3126
  reason: "unmatched_column_setting",
3124
3127
  detail: `"${c}" names no card column.`
3125
3128
  });
3126
3129
  } else b && s.type !== "matrixTable" && s.type !== "kpi" && se(s, "metricColumns").some(
3127
- (x) => x.comparison != null
3130
+ (S) => S.comparison != null
3128
3131
  ) && e.unconverted.push({
3129
3132
  path: `${v}.numberFormat`,
3130
3133
  reason: "chart_comparison_column_setting",
@@ -3134,39 +3137,39 @@ function zi(e) {
3134
3137
  if (ee(p.dateFormat)) {
3135
3138
  const b = p.type === "date";
3136
3139
  if (b && o)
3137
- Oa(e, c, Fo(p.dateFormat), `${v}.dateFormat`);
3140
+ Oa(e, c, Eo(p.dateFormat), `${v}.dateFormat`);
3138
3141
  else if (b && At(s)) {
3139
- const S = Fa(s, c);
3140
- (!S || !Ui(s, S)) && e.unconverted.push({
3142
+ const x = Fa(s, c);
3143
+ (!x || !Hi(s, x)) && e.unconverted.push({
3141
3144
  path: `${v}.dateFormat`,
3142
3145
  reason: "config_column_date_setting",
3143
3146
  detail: `"${c}"'s download formats its dates with this setting.`
3144
3147
  });
3145
3148
  }
3146
3149
  }
3147
- for (const b of ji)
3150
+ for (const b of Wi)
3148
3151
  Object.prototype.hasOwnProperty.call(p, b) && (delete p[b], e.changes.push({ path: `${v}.${b}`, action: "removed" }));
3149
3152
  }
3150
- Hi(e, i), Yi(e, d);
3153
+ zi(e, i), Ji(e, d);
3151
3154
  }
3152
- function Ji(e) {
3155
+ function Zi(e) {
3153
3156
  return Object.keys(e).some(
3154
3157
  (a) => a !== "enabled" && a !== "colorRanges" && e[a] !== void 0
3155
3158
  );
3156
3159
  }
3157
- function Xi(e) {
3160
+ function er(e) {
3158
3161
  return (e == null ? void 0 : e.enabled) === !1 || (e == null ? void 0 : e.enabled) === "false";
3159
3162
  }
3160
- function Zi(e) {
3163
+ function tr(e) {
3161
3164
  const a = e.card, t = a.preferences;
3162
3165
  if (!t) return;
3163
- const s = t.kpiVisualOptions, o = ee(s == null ? void 0 : s.formatOptions) ? s.formatOptions : void 0, n = t, i = ee(n.formatNumber) ? n.formatNumber : void 0, d = o ? Be(Oo(o)) : void 0, l = i && Ji(i) ? Be(Eo(i)) : void 0;
3166
+ const s = t.kpiVisualOptions, o = ee(s == null ? void 0 : s.formatOptions) ? s.formatOptions : void 0, n = t, i = ee(n.formatNumber) ? n.formatNumber : void 0, d = o ? Be(qo(o)) : void 0, l = i && Zi(i) ? Be(No(i)) : void 0;
3164
3167
  if (a.type === "kpi") {
3165
- if (Xi(i) && e.unconverted.push({
3168
+ if (er(i) && e.unconverted.push({
3166
3169
  path: "preferences.formatNumber.enabled",
3167
3170
  reason: "raw_display",
3168
3171
  detail: "Formatting is switched off on this KPI."
3169
- }), Pi(a)) {
3172
+ }), Mi(a)) {
3170
3173
  const c = d ?? l, h = s == null ? void 0 : s.queryComparisonPolarity;
3171
3174
  (c || h) && (t.sqlKpiValue = {
3172
3175
  ...t.sqlKpiValue,
@@ -3181,7 +3184,7 @@ function Zi(e) {
3181
3184
  se(a, "metricColumns").forEach((h) => {
3182
3185
  d ? ot(e, h, d, "preferences.kpiVisualOptions.formatOptions") : l && !h.format && ot(e, h, l, "preferences.formatNumber");
3183
3186
  });
3184
- er(e, i);
3187
+ ar(e, i);
3185
3188
  } else if (l) {
3186
3189
  const c = se(a, "metricColumns");
3187
3190
  vs(a) ? e.unconverted.push({
@@ -3202,11 +3205,11 @@ function Zi(e) {
3202
3205
  for (const c of ["numberAxisFormat", "columnSettings"])
3203
3206
  ke(t, [c]) && e.changes.push({ path: `preferences.${c}`, action: "removed" });
3204
3207
  }
3205
- function er(e, a) {
3208
+ function ar(e, a) {
3206
3209
  var n;
3207
3210
  const t = a == null ? void 0 : a.decimalPlaces, s = e.card.preferences;
3208
3211
  if (typeof t != "number" || ((n = s.comparisonPresentation) == null ? void 0 : n.precision) !== void 0) return;
3209
- const o = Wo(t);
3212
+ const o = Qo(t);
3210
3213
  o !== void 0 && (s.comparisonPresentation = {
3211
3214
  ...s.comparisonPresentation,
3212
3215
  precision: o
@@ -3216,24 +3219,24 @@ function er(e, a) {
3216
3219
  to: "preferences.comparisonPresentation.precision"
3217
3220
  }));
3218
3221
  }
3219
- const tr = /* @__PURE__ */ new Set(["number", "currency", "percent", "scientific", "date", "duration"]);
3220
- function ar(e) {
3222
+ const sr = /* @__PURE__ */ new Set(["number", "currency", "percent", "scientific", "date", "duration"]);
3223
+ function or(e) {
3221
3224
  const a = e.card.preferences;
3222
3225
  if (a)
3223
- for (const t of Ni) {
3226
+ for (const t of Li) {
3224
3227
  const s = a[t];
3225
3228
  if (!ee(s)) continue;
3226
3229
  const o = `preferences.${t}`, n = ee(s.formatOptions) ? s.formatOptions : void 0, i = t === "dataLabelsConfig" && typeof s.format == "string" ? s.format : void 0, d = s.formatMode === "override" || s.formatMode === "inherit" ? s.formatMode : s.mode === "override" || s.mode === "inherit" ? s.mode : void 0, l = d ?? (i === "none" ? "raw" : i && i !== "auto" || n ? "override" : "inherit");
3227
3230
  if (l === "raw" || d === void 0 && i === "none")
3228
3231
  e.unconverted.push({ path: `${o}.format`, reason: "raw_display", detail: "Data labels show raw values." });
3229
3232
  else if (l === "override") {
3230
- const c = n && n.type ? n : i && tr.has(i) ? { ...n, type: i } : n, h = c ? Be(qo(c, { preserveOmittedProperties: !0 })) : void 0;
3233
+ const c = n && n.type ? n : i && sr.has(i) ? { ...n, type: i } : n, h = c ? Be(Po(c, { preserveOmittedProperties: !0 })) : void 0;
3231
3234
  h && (s.valueFormat = h, e.changes.push({ path: `${o}.formatOptions`, action: "moved", to: `${o}.valueFormat` }));
3232
3235
  }
3233
3236
  ke(s, ["formatMode", "mode", "formatOptions", ...t === "dataLabelsConfig" ? ["format"] : []]) && e.changes.push({ path: `${o}.formatMode`, action: "removed" });
3234
3237
  }
3235
3238
  }
3236
- function sr(e) {
3239
+ function nr(e) {
3237
3240
  var s;
3238
3241
  const a = (s = e.card.config) == null ? void 0 : s.matrix, t = ee(a) && ee(a.presentation) ? a.presentation : void 0;
3239
3242
  if (t)
@@ -3246,27 +3249,27 @@ function sr(e) {
3246
3249
  }
3247
3250
  }
3248
3251
  }
3249
- function or(e, a = {}) {
3252
+ function ir(e, a = {}) {
3250
3253
  const t = { card: structuredClone(e), changes: [], unconverted: [] };
3251
3254
  for (const s of Mt)
3252
3255
  se(t.card, s).forEach((o, n) => {
3253
- ee(o) && Bi(t, o, s, `config.${s}[${n}]`);
3256
+ ee(o) && Gi(t, o, s, `config.${s}[${n}]`);
3254
3257
  });
3255
- return Gi(t), zi(t), Zi(t), ar(t), sr(t), Vi(t, a), t.changes.length === 0 && t.unconverted.length === 0 ? { card: e, changes: [], unconverted: [] } : t;
3258
+ return Ki(t), Xi(t), tr(t), or(t), nr(t), ji(t, a), t.changes.length === 0 && t.unconverted.length === 0 ? { card: e, changes: [], unconverted: [] } : t;
3256
3259
  }
3257
- const nr = "__semaphor_unassigned_trigger__", ir = "__NULL__";
3258
- function rr(e) {
3260
+ const rr = "__semaphor_unassigned_trigger__", dr = "__NULL__";
3261
+ function lr(e) {
3259
3262
  var a, t;
3260
3263
  return !!((a = e.sql) != null && a.trim() || (t = e.python) != null && t.trim());
3261
3264
  }
3262
- function dr(e) {
3265
+ function cr(e) {
3263
3266
  const a = e.config;
3264
3267
  return a ? e.type === "detailTable" ? a.detailColumns ?? [] : [...a.detailColumns ?? [], ...a.metricColumns ?? [], ...a.groupByColumns ?? []] : [];
3265
3268
  }
3266
3269
  function Ea(e) {
3267
3270
  return [e.id, e.alias, e.name, e.qualifiedFieldName, e.label];
3268
3271
  }
3269
- function lr(e, a) {
3272
+ function ur(e, a) {
3270
3273
  var c, h;
3271
3274
  const t = ((c = e.config) == null ? void 0 : c.metricColumns) ?? [], s = ((h = e.config) == null ? void 0 : h.pivotByColumns) ?? [];
3272
3275
  if (t.length !== 1 || s.length !== 1) return { reason: "pivot_key_form" };
@@ -3275,16 +3278,16 @@ function lr(e, a) {
3275
3278
  ref: {
3276
3279
  kind: "pivot",
3277
3280
  metricId: o.id,
3278
- members: [{ fieldId: n.id, value: a === ir ? null : a }]
3281
+ members: [{ fieldId: n.id, value: a === dr ? null : a }]
3279
3282
  }
3280
3283
  };
3281
3284
  }
3282
- function cr(e, a) {
3285
+ function fr(e, a) {
3283
3286
  var i, d;
3284
- if (a === nr) return { reason: "unassigned_trigger" };
3285
- if (rr(e)) return { ref: { kind: "result", key: a } };
3286
- const t = dr(e), s = t.filter((l) => Ea(l).includes(a)), o = s.length ? s : t.filter((l) => Ea(l).some((c) => (c == null ? void 0 : c.trim().toLowerCase()) === a.trim().toLowerCase())), n = [...new Set(o.map((l) => l.id))];
3287
- return n.length === 1 ? { ref: { kind: "field", fieldId: n[0] } } : n.length > 1 ? { reason: "ambiguous_column" } : (d = (i = e.config) == null ? void 0 : i.pivotByColumns) != null && d.length ? lr(e, a) : { reason: "no_matching_column" };
3287
+ if (a === rr) return { reason: "unassigned_trigger" };
3288
+ if (lr(e)) return { ref: { kind: "result", key: a } };
3289
+ const t = cr(e), s = t.filter((l) => Ea(l).includes(a)), o = s.length ? s : t.filter((l) => Ea(l).some((c) => (c == null ? void 0 : c.trim().toLowerCase()) === a.trim().toLowerCase())), n = [...new Set(o.map((l) => l.id))];
3290
+ return n.length === 1 ? { ref: { kind: "field", fieldId: n[0] } } : n.length > 1 ? { reason: "ambiguous_column" } : (d = (i = e.config) == null ? void 0 : i.pivotByColumns) != null && d.length ? ur(e, a) : { reason: "no_matching_column" };
3288
3291
  }
3289
3292
  function qa(e, a, t, s, o) {
3290
3293
  const n = (I, _, D) => {
@@ -3305,8 +3308,8 @@ function qa(e, a, t, s, o) {
3305
3308
  columnIds: p,
3306
3309
  applyToColumnIds: v,
3307
3310
  conditionColumnId: b,
3308
- matrix: S,
3309
- rowRoles: x,
3311
+ matrix: x,
3312
+ rowRoles: S,
3310
3313
  depth: E,
3311
3314
  includeTotals: C,
3312
3315
  includeSubtotals: k,
@@ -3316,8 +3319,8 @@ function qa(e, a, t, s, o) {
3316
3319
  ...h.length ? { columns: h } : {},
3317
3320
  // The Matrix scope means something only on a Matrix card.
3318
3321
  ...o ? {
3319
- ...S !== void 0 ? { matrix: S } : {},
3320
- ...x !== void 0 ? { rowRoles: x } : {},
3322
+ ...x !== void 0 ? { matrix: x } : {},
3323
+ ...S !== void 0 ? { rowRoles: S } : {},
3321
3324
  ...E !== void 0 ? { depth: E } : {},
3322
3325
  ...C !== void 0 ? { includeTotals: C } : {},
3323
3326
  ...k !== void 0 ? { includeSubtotals: k } : {}
@@ -3329,7 +3332,7 @@ function qa(e, a, t, s, o) {
3329
3332
  target: N
3330
3333
  };
3331
3334
  }
3332
- function ur(e, a) {
3335
+ function mr(e, a) {
3333
3336
  var o;
3334
3337
  const t = (o = Ma(e)) == null ? void 0 : o.value;
3335
3338
  if (!t) return [];
@@ -3338,12 +3341,12 @@ function ur(e, a) {
3338
3341
  if (!n || typeof n != "object") return [];
3339
3342
  const { start: d, end: l, color: c } = n, h = s(d), p = s(l);
3340
3343
  if (Number.isNaN(h) || Number.isNaN(p) || h > p || h === 1 / 0 || p === -1 / 0) return [];
3341
- const v = h === -1 / 0 ? void 0 : h, b = p === 1 / 0 ? void 0 : p, S = v !== void 0 && b !== void 0 ? { kind: "between", column: t, min: v, max: b, inclusive: !0 } : v !== void 0 ? { kind: "comparison", column: t, operator: "gte", value: v } : b !== void 0 ? { kind: "comparison", column: t, operator: "lte", value: b } : { kind: "blank", column: t, isBlank: !1 }, x = typeof c == "string" ? c : "";
3342
- return [{ id: `kpi-color-range-${i + 1}`, condition: S, target: { level: "cell" }, style: { textColor: x } }];
3344
+ const v = h === -1 / 0 ? void 0 : h, b = p === 1 / 0 ? void 0 : p, x = v !== void 0 && b !== void 0 ? { kind: "between", column: t, min: v, max: b, inclusive: !0 } : v !== void 0 ? { kind: "comparison", column: t, operator: "gte", value: v } : b !== void 0 ? { kind: "comparison", column: t, operator: "lte", value: b } : { kind: "blank", column: t, isBlank: !1 }, S = typeof c == "string" ? c : "";
3345
+ return [{ id: `kpi-color-range-${i + 1}`, condition: x, target: { level: "cell" }, style: { textColor: S } }];
3343
3346
  }).reverse();
3344
3347
  }
3345
- function fr(e) {
3346
- var h, p, v, b, S, x, E;
3348
+ function hr(e) {
3349
+ var h, p, v, b, x, S, E;
3347
3350
  const a = structuredClone(e), t = [], s = [], o = [], n = (C) => {
3348
3351
  t.some((k) => k.from.startsWith(C)) || t.push({ ruleId: "", action: "removed", from: C });
3349
3352
  }, i = (h = a.preferences) == null ? void 0 : h.tablePrefs;
@@ -3355,13 +3358,13 @@ function fr(e) {
3355
3358
  t.push({ ruleId: F.id, action: "removed", from: `${k}.rules[${w}]` });
3356
3359
  return;
3357
3360
  }
3358
- const N = qa(F, (_) => cr(a, _), `${k}.rules[${w}]`, s, !1);
3361
+ const N = qa(F, (_) => fr(a, _), `${k}.rules[${w}]`, s, !1);
3359
3362
  N && (o.push(N), t.push({ ruleId: F.id, action: "moved", from: `${k}.rules[${w}]` }));
3360
3363
  }), delete i.conditionalFormatting, s.some((F) => F.path.startsWith(k)) || n(k);
3361
3364
  }
3362
3365
  const d = (v = (p = a.config) == null ? void 0 : p.matrix) == null ? void 0 : v.presentation;
3363
3366
  if (d && ue(d, "conditionalFormatting")) {
3364
- const C = d.conditionalFormatting, k = "config.matrix.presentation.conditionalFormatting", y = new Set((S = (b = a.config) == null ? void 0 : b.matrix) == null ? void 0 : S.spec.measures.map((F) => F.id));
3367
+ const C = d.conditionalFormatting, k = "config.matrix.presentation.conditionalFormatting", y = new Set((x = (b = a.config) == null ? void 0 : b.matrix) == null ? void 0 : x.spec.measures.map((F) => F.id));
3365
3368
  ((C == null ? void 0 : C.rules) ?? []).forEach((F, w) => {
3366
3369
  const N = qa(
3367
3370
  F,
@@ -3377,14 +3380,14 @@ function fr(e) {
3377
3380
  if (c && ue(c, "colorRanges")) {
3378
3381
  const C = Array.isArray(c.colorRanges) ? c.colorRanges : [];
3379
3382
  if (a.type === "kpi") {
3380
- const k = ur(a, C);
3383
+ const k = mr(a, C);
3381
3384
  o.push(...k), k.forEach((y) => t.push({ ruleId: y.id, action: "moved", from: "preferences.formatNumber.colorRanges" }));
3382
3385
  }
3383
3386
  delete c.colorRanges, Object.keys(c).length === 0 && delete l.formatNumber, t.some((k) => k.from === "preferences.formatNumber.colorRanges") || t.push({ ruleId: "", action: "removed", from: "preferences.formatNumber.colorRanges" });
3384
3387
  }
3385
3388
  if (!t.length && !s.length) return { card: e, changes: [], unresolved: [] };
3386
3389
  if (o.length) {
3387
- const C = ((E = (x = a.preferences) == null ? void 0 : x.conditionalFormatting) == null ? void 0 : E.rules) ?? [], k = new Set(C.map((y) => y.id));
3390
+ const C = ((E = (S = a.preferences) == null ? void 0 : S.conditionalFormatting) == null ? void 0 : E.rules) ?? [], k = new Set(C.map((y) => y.id));
3388
3391
  a.preferences = {
3389
3392
  ...a.preferences,
3390
3393
  conditionalFormatting: {
@@ -3395,14 +3398,14 @@ function fr(e) {
3395
3398
  }
3396
3399
  return { card: a, changes: t, unresolved: s };
3397
3400
  }
3398
- function Wr(e, a = {}) {
3399
- const { only: t, ...s } = a, o = t === "rules" ? void 0 : or(e, s), n = t === "formats" ? void 0 : fr((o == null ? void 0 : o.card) ?? e);
3401
+ function Qr(e, a = {}) {
3402
+ const { only: t, ...s } = a, o = t === "rules" ? void 0 : ir(e, s), n = t === "formats" ? void 0 : hr((o == null ? void 0 : o.card) ?? e);
3400
3403
  return { card: (n == null ? void 0 : n.card) ?? (o == null ? void 0 : o.card) ?? e, formats: o, rules: n };
3401
3404
  }
3402
- function Ur(e) {
3405
+ function Hr(e) {
3403
3406
  return e.kind === "metric" ? e.resultId : e.measureId;
3404
3407
  }
3405
- function mr(e) {
3408
+ function pr(e) {
3406
3409
  if (e.op === "dashboard.update" || e.op === "dashboard.style" || e.op === "sheet.update") return !0;
3407
3410
  if (e.op !== "card.update") return !1;
3408
3411
  switch (e.update.kind) {
@@ -3414,536 +3417,546 @@ function mr(e) {
3414
3417
  return !1;
3415
3418
  }
3416
3419
  }
3417
- function Qr(e) {
3418
- return e.impact.length || e.detaches ? "needed" : e.operations.length > 0 && e.operations.every(mr) ? "not_needed" : "needed";
3420
+ function Yr(e) {
3421
+ return e.impact.length || e.detaches ? "needed" : e.operations.length > 0 && e.operations.every(pr) ? "not_needed" : "needed";
3419
3422
  }
3420
3423
  export {
3421
- zr as AGGREGATES,
3422
- Jr as AUTOMATIC_FALLBACK_GRAIN,
3423
- Xr as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
3424
- ho as AUTOMATIC_TIME_GRAIN,
3425
- Zr as CALCULATED_FIELDS_GROUP_ID,
3426
- ed as CALCULATED_FIELDS_GROUP_NAME,
3427
- td as CARD_CONFIG_KEY_CLASSES,
3428
- ad as CARD_KEY_CLASSES,
3429
- vo as CARD_QUERY_CONFIG_KEYS,
3430
- Nr as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
3431
- qr as CARD_QUERY_REQUEST_EXECUTED_FIELDS,
3432
- pp as CARD_SURFACES,
3433
- sd as CARD_TYPES,
3424
+ Xr as AGGREGATES,
3425
+ Zr as AUTOMATIC_FALLBACK_GRAIN,
3426
+ ed as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
3427
+ go as AUTOMATIC_TIME_GRAIN,
3428
+ td as CALCULATED_FIELDS_GROUP_ID,
3429
+ ad as CALCULATED_FIELDS_GROUP_NAME,
3430
+ sd as CARD_CONFIG_KEY_CLASSES,
3431
+ od as CARD_KEY_CLASSES,
3432
+ Io as CARD_QUERY_CONFIG_KEYS,
3433
+ Lr as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
3434
+ Pr as CARD_QUERY_REQUEST_EXECUTED_FIELDS,
3435
+ Sp as CARD_SURFACES,
3436
+ nd as CARD_TYPES,
3434
3437
  De as CARD_TYPE_RULES,
3435
3438
  je as CHART_COLORS_BOUNDS,
3436
- od as CHIP_VALUE_COLUMN,
3437
- nd as COLUMN_KEY_CLASSES,
3438
- id as COLUMN_PRESENTATION_KEYS,
3439
- rd as COMPARISON_POLARITIES,
3440
- am as COMPARISON_SIGN_WORDS,
3441
- dd as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
3442
- ld as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
3443
- cd as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
3444
- ud as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
3445
- fd as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
3446
- md as CONTROL_DEFINITION_INVALID_ERROR_CODE,
3447
- hd as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
3448
- pd as CONTROL_REFERENCE_MISSING_ERROR_CODE,
3449
- gd as CONTROL_VALUE_INVALID_ERROR_CODE,
3450
- bd as CONTROL_VALUE_MISSING_ERROR_CODE,
3451
- gp as CORNER_STEPS,
3439
+ id as CHIP_VALUE_COLUMN,
3440
+ rd as COLUMN_KEY_CLASSES,
3441
+ dd as COLUMN_PRESENTATION_KEYS,
3442
+ ld as COMPARISON_POLARITIES,
3443
+ fm as COMPARISON_SIGN_WORDS,
3444
+ cd as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
3445
+ ud as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
3446
+ fd as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
3447
+ md as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
3448
+ hd as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
3449
+ pd as CONTROL_DEFINITION_INVALID_ERROR_CODE,
3450
+ gd as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
3451
+ bd as CONTROL_REFERENCE_MISSING_ERROR_CODE,
3452
+ yd as CONTROL_VALUE_INVALID_ERROR_CODE,
3453
+ vd as CONTROL_VALUE_MISSING_ERROR_CODE,
3454
+ xp as CORNER_STEPS,
3452
3455
  le as CardQueryRequestError,
3453
- yd as ControlResolutionError,
3454
- vd as DASHBOARD_CHANGE_OPS,
3455
- _d as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
3456
- sm as DASHBOARD_FILTER_OPERATIONS,
3457
- Id as DASHBOARD_INPUT_RUNTIME_SCOPE_KINDS,
3458
- un as DASHBOARD_STYLE_NUMBER_BOUNDS,
3459
- Cd as DEFAULT_DETAIL_DATE_STYLE,
3460
- $d as DETAIL_DATE_STYLES,
3461
- om as DOCUMENT_KPI_SECTION_MAX_CARDS,
3462
- nm as DOCUMENT_KPI_SECTION_MAX_TILES,
3463
- wd as DOMAIN_EDIT_CHANGE_OPS,
3464
- xd as DYNAMIC_TEXT_MESSAGE,
3465
- Sd as DashboardFilterMappingContractError,
3466
- kd as ExecutionControlContractError,
3467
- Td as FILTER_OPERATORS,
3456
+ _d as ControlResolutionError,
3457
+ Id as DASHBOARD_CHANGE_OPS,
3458
+ Cd as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
3459
+ mm as DASHBOARD_FILTER_OPERATIONS,
3460
+ $d as DASHBOARD_INPUT_RUNTIME_SCOPE_KINDS,
3461
+ mn as DASHBOARD_STYLE_NUMBER_BOUNDS,
3462
+ wd as DEFAULT_DETAIL_DATE_STYLE,
3463
+ Sd as DETAIL_DATE_STYLES,
3464
+ hm as DOCUMENT_KPI_SECTION_MAX_CARDS,
3465
+ pm as DOCUMENT_KPI_SECTION_MAX_TILES,
3466
+ xd as DOMAIN_EDIT_CHANGE_OPS,
3467
+ kd as DYNAMIC_TEXT_MESSAGE,
3468
+ Td as DashboardFilterMappingContractError,
3469
+ Rd as ExecutionControlContractError,
3470
+ Ad as FILTER_OPERATORS,
3468
3471
  ua as FORMAT_WORDS,
3469
- Rd as FilterModelError,
3470
- Ad as KPI_MEASURES_SHOWN,
3471
- xp as KPI_TREND_GRAINS,
3472
- Sp as KPI_TREND_PERIODS,
3473
- Dd as LEGACY_TABLE_CARD_TYPES,
3474
- Jm as LEGACY_TABLE_ROUTING_ID_NAMESPACE,
3472
+ Dd as FilterModelError,
3473
+ Fd as KPI_MEASURES_SHOWN,
3474
+ qp as KPI_TREND_GRAINS,
3475
+ Np as KPI_TREND_PERIODS,
3476
+ Od as LEGACY_TABLE_CARD_TYPES,
3477
+ rh as LEGACY_TABLE_ROUTING_ID_NAMESPACE,
3475
3478
  ya as MAX_CREATE_CHANGES,
3476
- Fd as MAX_DATE_GRAIN_POINTS,
3477
- Od as MAX_NEXT_STEP_CHARS,
3478
- So as MAX_PROPOSED_CHANGES,
3479
- Ed as MAX_QUERY_LIMIT,
3480
- qd as MAX_TEXT_WORDS,
3481
- Nd as MEASURE_CALCULATION_SUMMARIES,
3482
- Sh as NEW_CARD_TYPE,
3483
- Pd as NON_ADDITIVE_SUM_OF_ROWS_HINT,
3484
- Ld as PUBLIC_TRANSFORM_KIND,
3485
- Md as QUERY_ASPECTS,
3486
- Bd as QUERY_CONFIG_KEY_ASPECTS,
3487
- kh as RELATIONSHIP_ROUTE_CHANGED_MESSAGE,
3488
- Vd as RESERVED_VARIABLE_NAMES,
3489
- Gd as SEE_RECORDS_CARD_TYPES,
3490
- jd as SEE_RECORDS_LIMITS,
3491
- Kd as SEE_RECORDS_MAX_PAGE,
3492
- Th as SEE_RECORDS_MESSAGES,
3493
- Wd as SEMAPHOR_CARTESIAN_CHART_TYPES,
3494
- Ud as SETTINGS_BY_KIND,
3495
- vp as SHELF_FIELD_KEYS,
3496
- bp as SPACING_STEPS,
3497
- Qd as TIME_GRAINS,
3498
- Hd as TOOLBAR_FILTER_REACH_FIELDS,
3499
- im as VARIABLE_CARD_TYPE,
3500
- rm as VARIABLE_COMPARISON_PARTS,
3501
- Yd as VARIABLE_GETS,
3502
- dm as VARIABLE_LIST_CAP,
3503
- lm as VARIABLE_LIST_SHOWN,
3504
- zd as VARIABLE_NAME_PATTERN,
3505
- cm as VARIABLE_VALUE_PART,
3506
- Jd as WINDOW_ERROR_CODES,
3507
- Xd as WINDOW_WARNING_CODES,
3508
- Zd as acceptedColumnRefKinds,
3509
- el as acceptsGrainThatRan,
3510
- tl as analyticsFilterSchema,
3511
- al as appliedBindingControlValue,
3512
- Xm as applyCardReferenceRemapping,
3513
- sl as applyCardSettings,
3514
- St as applyDashboardOperations,
3515
- ol as applyFilterApplicability,
3516
- Rh as applyFilterSettingsChange,
3517
- Zm as applyGroupByOverride,
3518
- nl as applyLinkedClickToFilterOverrides,
3519
- il as applyMeasureCalculations,
3520
- rl as applyOptionDependencyOverride,
3521
- dl as applyVariableChange,
3522
- ll as asDateDefaultPointCondition,
3523
- cl as automaticDateGrain,
3524
- po as automaticGrainSupport,
3525
- ul as blockClause,
3526
- fl as blockSentence,
3527
- Dp as bookmarkImpactSentence,
3528
- Ah as buildCardExportFormatOptions,
3529
- eh as buildCardExportQueryContext,
3530
- Dh as buildCardExportRequest,
3531
- Fh as buildCardExportRequestFromOptions,
3532
- Oh as buildColumnCatalog,
3533
- ml as buildControlDefinitionIndex,
3534
- lo as buildDashboardCardSourceIndex,
3535
- Eh as buildEntityColumnGroup,
3536
- qh as buildFilterInputFromDefinition,
3537
- Xo as buildFilterInputFromField,
3538
- hl as buildLinkedClickToFilterOverrides,
3539
- pl as buildProposeChangeInputSchema,
3540
- gl as buildSavedEditorCard,
3541
- Nh as buildTableExportFormatOptions,
3542
- bl as calculationAddSchema,
3543
- Ph as cardColumnRefForKey,
3544
- yl as cardColumnRefSchema,
3545
- Ro as cardConditionalFormattingSchema,
3546
- vl as cardConfigAsRan,
3547
- _l as cardQueryPatchSchema,
3548
- Il as cardReachesDatasetThroughRelationships,
3479
+ Ed as MAX_DATE_GRAIN_POINTS,
3480
+ qd as MAX_NEXT_STEP_CHARS,
3481
+ To as MAX_PROPOSED_CHANGES,
3482
+ Nd as MAX_QUERY_LIMIT,
3483
+ Pd as MAX_TEXT_WORDS,
3484
+ Ld as MEASURE_CALCULATION_SUMMARIES,
3485
+ Nh as NEW_CARD_TYPE,
3486
+ Md as NON_ADDITIVE_SUM_OF_ROWS_HINT,
3487
+ Bd as PUBLIC_TRANSFORM_KIND,
3488
+ Vd as QUERY_ASPECTS,
3489
+ Gd as QUERY_CONFIG_KEY_ASPECTS,
3490
+ Ph as RELATIONSHIP_ROUTE_CHANGED_MESSAGE,
3491
+ jd as RESERVED_VARIABLE_NAMES,
3492
+ Kd as SEE_RECORDS_CARD_TYPES,
3493
+ Wd as SEE_RECORDS_LIMITS,
3494
+ Ud as SEE_RECORDS_MAX_PAGE,
3495
+ Lh as SEE_RECORDS_MESSAGES,
3496
+ Qd as SEMAPHOR_CARTESIAN_CHART_TYPES,
3497
+ Hd as SETTINGS_BY_KIND,
3498
+ Rp as SHELF_FIELD_KEYS,
3499
+ kp as SPACING_STEPS,
3500
+ Yd as TIME_GRAINS,
3501
+ zd as TOOLBAR_FILTER_REACH_FIELDS,
3502
+ gm as VARIABLE_CARD_TYPE,
3503
+ bm as VARIABLE_COMPARISON_PARTS,
3504
+ Jd as VARIABLE_GETS,
3505
+ ym as VARIABLE_LIST_CAP,
3506
+ vm as VARIABLE_LIST_SHOWN,
3507
+ Xd as VARIABLE_NAME_PATTERN,
3508
+ _m as VARIABLE_VALUE_PART,
3509
+ Zd as WINDOW_ERROR_CODES,
3510
+ el as WINDOW_WARNING_CODES,
3511
+ tl as acceptedColumnRefKinds,
3512
+ al as acceptsGrainThatRan,
3513
+ sl as analyticsFilterSchema,
3514
+ ol as appliedBindingControlValue,
3515
+ dh as applyCardReferenceRemapping,
3516
+ nl as applyCardSettings,
3517
+ xt as applyDashboardOperations,
3518
+ il as applyFilterApplicability,
3519
+ Mh as applyFilterSettingsChange,
3520
+ lh as applyGroupByOverride,
3521
+ rl as applyLinkedClickToFilterOverrides,
3522
+ dl as applyMeasureCalculations,
3523
+ ll as applyOptionDependencyOverride,
3524
+ cl as applyVariableChange,
3525
+ ul as asDateDefaultPointCondition,
3526
+ fl as automaticDateGrain,
3527
+ bo as automaticGrainSupport,
3528
+ ml as blockClause,
3529
+ hl as blockSentence,
3530
+ Vp as bookmarkImpactSentence,
3531
+ Bh as buildCardExportFormatOptions,
3532
+ ch as buildCardExportQueryContext,
3533
+ Vh as buildCardExportRequest,
3534
+ Gh as buildCardExportRequestFromOptions,
3535
+ jh as buildColumnCatalog,
3536
+ pl as buildControlDefinitionIndex,
3537
+ uo as buildDashboardCardSourceIndex,
3538
+ Kh as buildEntityColumnGroup,
3539
+ Wh as buildFilterInputFromDefinition,
3540
+ en as buildFilterInputFromField,
3541
+ gl as buildLinkedClickToFilterOverrides,
3542
+ bl as buildProposeChangeInputSchema,
3543
+ yl as buildSavedEditorCard,
3544
+ Uh as buildTableExportFormatOptions,
3545
+ vl as calculationAddSchema,
3546
+ Qh as cardColumnRefForKey,
3547
+ _l as cardColumnRefSchema,
3548
+ Do as cardConditionalFormattingSchema,
3549
+ Il as cardConfigAsRan,
3550
+ Cl as cardQueryPatchSchema,
3551
+ $l as cardReachesDatasetThroughRelationships,
3549
3552
  Ms as cardSettingsKind,
3550
3553
  Ps as cardTypeSentenceName,
3551
- Cl as carryColumnSettings,
3552
- _o as changeCardType,
3553
- $l as changeMatrixEditor,
3554
- Ao as checkConditionalRuleColumns,
3554
+ wl as carryColumnSettings,
3555
+ Co as changeCardType,
3556
+ Sl as changeMatrixEditor,
3557
+ Fo as checkConditionalRuleColumns,
3555
3558
  Ot as checkDataVariable,
3556
- wl as checkDetailDateFormat,
3557
- Kr as checkPresentationStores,
3558
- xl as chipOverVariable,
3559
- Sl as clickToFilterSettingsSchema,
3560
- kl as collectJoinPlanIdentifiers,
3559
+ xl as checkDetailDateFormat,
3560
+ Ur as checkPresentationStores,
3561
+ kl as chipOverVariable,
3562
+ Tl as clickToFilterSettingsSchema,
3563
+ Rl as collectJoinPlanIdentifiers,
3561
3564
  Ha as collectVariableReferences,
3562
3565
  Pa as columnDataset,
3563
- Io as columnFieldKey,
3566
+ $o as columnFieldKey,
3564
3567
  Ka as columnKeys,
3565
- Tl as columnRefIssue,
3568
+ Al as columnRefIssue,
3566
3569
  ca as columnRefKey,
3567
- Rl as columnSettingsInputSchema,
3568
- um as comparisonPartPresentation,
3569
- th as composeCardReferenceRemapping,
3570
- Al as conditionalRuleSchema,
3571
- Qr as confirmClassFor,
3572
- Dl as contextChangeSchema,
3573
- Fl as controlBindingExecutionSchema,
3574
- Ol as controlDefinitionExecutionSchema,
3575
- io as controlRefusal,
3576
- Mr as convertLegacyStyle,
3577
- El as createDashboardFilterBindingId,
3578
- vh as createMatrixAuthoringDraft,
3579
- _h as createMatrixConfig,
3580
- en as createNewCard,
3581
- ql as createTargetSchema,
3582
- Zo as createTextCard,
3583
- Nl as customDetailDateFormat,
3584
- Pl as dashboardCardFilterSourceInventoryContains,
3585
- ao as dashboardChangeSchema,
3586
- Ll as dashboardFilterTargetMatchesLogicalValue,
3587
- fm as dashboardFilterValueTypeForDataType,
3588
- Vo as dashboardInputScopeIncludesDocumentSheets,
3589
- En as dashboardStyleAsEdit,
3590
- Ml as dashboardStyleChangeSchema,
3570
+ Dl as columnSettingsInputSchema,
3571
+ Im as comparisonPartPresentation,
3572
+ uh as composeCardReferenceRemapping,
3573
+ Fl as conditionalRuleSchema,
3574
+ Yr as confirmClassFor,
3575
+ Ol as contextChangeSchema,
3576
+ El as controlBindingExecutionSchema,
3577
+ ql as controlDefinitionExecutionSchema,
3578
+ lo as controlRefusal,
3579
+ Vr as convertLegacyStyle,
3580
+ Nl as createDashboardFilterBindingId,
3581
+ Rh as createMatrixAuthoringDraft,
3582
+ Ah as createMatrixConfig,
3583
+ an as createNewCard,
3584
+ Pl as createTargetSchema,
3585
+ tn as createTextCard,
3586
+ Ll as customDetailDateFormat,
3587
+ Ml as customGroupedDateFormat,
3588
+ Bl as dashboardCardFilterSourceInventoryContains,
3589
+ oo as dashboardChangeSchema,
3590
+ Vl as dashboardFilterTargetMatchesLogicalValue,
3591
+ Cm as dashboardFilterValueTypeForDataType,
3592
+ jo as dashboardInputScopeIncludesDocumentSheets,
3593
+ Nn as dashboardStyleAsEdit,
3594
+ Gl as dashboardStyleChangeSchema,
3591
3595
  za as dashboardStyleLayers,
3592
- Bl as dateDefaultPointCondition,
3593
- Vl as decideClickToFilterCardLevel,
3594
- Gl as decideClickToFilterField,
3595
- jl as defaultClickToFilterSettings,
3596
- In as defaultVariableGet,
3597
- _p as defaultVariableName,
3598
- Fp as describeBookmarkImpact,
3599
- Kl as describeDashboardFilterCardReach,
3596
+ jl as dateDefaultPointCondition,
3597
+ Kl as decideClickToFilterCardLevel,
3598
+ Wl as decideClickToFilterField,
3599
+ Ul as defaultClickToFilterSettings,
3600
+ $n as defaultVariableGet,
3601
+ Ap as defaultVariableName,
3602
+ Gp as describeBookmarkImpact,
3603
+ Ql as describeDashboardFilterCardReach,
3600
3604
  $e as describeDashboardFilterCardReachDetail,
3601
- Lh as describeDateWindow,
3602
- Mh as describeFilterReachEntry,
3603
- Bh as describeKpiDateSection,
3604
- Vh as describeKpiTileDate,
3605
- kp as describeKpiTrendRow,
3606
- Wl as describeMeasureCalculations,
3607
- no as describeQueryChange,
3608
- Gh as describeRelationshipRoute,
3609
- jh as describeRelationshipSkip,
3610
- Ul as describeTableColumnTotal,
3611
- Ql as detailDateDisplayFormat,
3612
- Hl as detailDateFormatProblem,
3613
- Yl as detailDateTwelveHourAvailable,
3614
- mm as documentInputTextUsage,
3615
- hm as doesDashboardInputApplyToTarget,
3616
- pm as doesDashboardInputReachFilterTarget,
3617
- gm as doesDashboardInputSurviveCarriedContext,
3618
- zl as doesToolbarFilterReachTab,
3619
- Kh as domainCalculatedFields,
3620
- Jl as domainEditChangeSchema,
3621
- Xl as domainEditChangeSchemas,
3622
- Ip as draftBlocker,
3623
- Cn as draftFromVariable,
3624
- Zl as drawsDetailDatesInBrowser,
3625
- ec as dropMatrixEditorField,
3626
- Ep as editBrandStyle,
3627
- fn as editDashboardStyle,
3628
- tc as estimateDateGrainPoints,
3629
- ac as evaluateConditionalRules,
3630
- sc as explicitComparisonSchema,
3631
- oc as fieldAsRan,
3632
- Ys as fieldIdentityKey,
3633
- nc as fieldRef,
3634
- ic as fieldRefSchema,
3635
- rc as filterApplicabilityContextForCard,
3636
- Wh as filterReachPreviewAnswers,
3637
- dc as filterValueReachForCard,
3638
- lc as filterValueSemanticDataset,
3639
- cc as findBorrowedSelectionBinding,
3605
+ Hh as describeDateWindow,
3606
+ Yh as describeFilterReachEntry,
3607
+ zh as describeKpiDateSection,
3608
+ Jh as describeKpiTileDate,
3609
+ Pp as describeKpiTrendRow,
3610
+ Hl as describeMeasureCalculations,
3611
+ ro as describeQueryChange,
3612
+ Xh as describeRelationshipRoute,
3613
+ Zh as describeRelationshipSkip,
3614
+ Yl as describeTableColumnTotal,
3615
+ zl as detailDateDisplayFormat,
3616
+ Jl as detailDateFormatProblem,
3617
+ Xl as detailDateTwelveHourAvailable,
3618
+ $m as documentInputTextUsage,
3619
+ wm as doesDashboardInputApplyToTarget,
3620
+ Sm as doesDashboardInputReachFilterTarget,
3621
+ xm as doesDashboardInputSurviveCarriedContext,
3622
+ Zl as doesToolbarFilterReachTab,
3623
+ ep as domainCalculatedFields,
3624
+ ec as domainEditChangeSchema,
3625
+ tc as domainEditChangeSchemas,
3626
+ Dp as draftBlocker,
3627
+ wn as draftFromVariable,
3628
+ ac as drawsDetailDatesInBrowser,
3629
+ sc as dropMatrixEditorField,
3630
+ Kp as editBrandStyle,
3631
+ hn as editDashboardStyle,
3632
+ oc as estimateDateGrainPoints,
3633
+ nc as evaluateConditionalRules,
3634
+ ic as explicitComparisonSchema,
3635
+ rc as fieldAsRan,
3636
+ Js as fieldIdentityKey,
3637
+ dc as fieldRef,
3638
+ lc as fieldRefSchema,
3639
+ cc as fillFrameSemanticCardDomains,
3640
+ uc as fillSemanticCardDomain,
3641
+ fc as fillSemanticCardDomains,
3642
+ mc as filterApplicabilityContextForCard,
3643
+ tp as filterReachPreviewAnswers,
3644
+ hc as filterValueReachForCard,
3645
+ pc as filterValueSemanticDataset,
3646
+ gc as findBorrowedSelectionBinding,
3640
3647
  nt as findCatalogField,
3641
- uc as findDashboardCardExecutableSource,
3642
- fc as findDashboardCardPinnedCatalogSource,
3648
+ bc as findDashboardCardExecutableSource,
3649
+ yc as findDashboardCardPinnedCatalogSource,
3643
3650
  Ua as findDashboardFilterTarget,
3644
- mc as findDashboardSqlPinnedCatalogSource,
3651
+ vc as findDashboardSqlPinnedCatalogSource,
3645
3652
  gs as findRetiredCardPresentationFields,
3646
- jr as findRetiredPresentationFields,
3647
- Hs as findSortedColumn,
3648
- Uh as flattenEntityColumns,
3649
- hc as foldPrototypeDocumentInputs,
3650
- pc as formatFilterModelIssues,
3651
- xs as formatResolvedPrimaryDateFieldIssues,
3652
- gc as formatSkippedFilterWarnings,
3653
- bc as fromEditableRules,
3654
- Qh as getCalculatedFieldAggregateOverrides,
3655
- yc as getCalculatedFieldNamespace,
3656
- Hh as getCalculatedFieldParameters,
3657
- Yh as getCalculatedFieldShelfOverrides,
3658
- vc as getCardDefinition,
3659
- zh as getClickContextFromTable,
3660
- _c as getColumnCatalogFieldId,
3661
- Ic as getDashboardFilterSubscriptionHint,
3662
- Cc as getDashboardGlobalDateFilter,
3663
- bm as getDocumentKpiSectionShapeIssues,
3664
- ym as getDocumentSectionCards,
3665
- Jh as getDomainCalculatedSelectionOverrides,
3666
- $c as getFieldAggregationOptions,
3667
- wc as getMatrixBindingTargets,
3668
- Ih as getMatrixLevelLabel,
3669
- Ch as getMatrixMeasureLabel,
3670
- xc as getStableDomainCalculatedFieldId,
3671
- Sc as getTemporalBucketAuthoringOptions,
3672
- kc as getTemporalBucketAuthoringSelection,
3673
- Tc as grainChoicePatch,
3674
- Rc as grainControlApplies,
3675
- Ac as handleSchema,
3676
- Dc as hasDashboardFilterSubscription,
3677
- Xh as hasSeeRecordsMeasureFilter,
3653
+ Wr as findRetiredPresentationFields,
3654
+ zs as findSortedColumn,
3655
+ ap as flattenEntityColumns,
3656
+ _c as foldPrototypeDocumentInputs,
3657
+ Ic as formatFilterModelIssues,
3658
+ Ss as formatResolvedPrimaryDateFieldIssues,
3659
+ Cc as formatSkippedFilterWarnings,
3660
+ $c as fromEditableRules,
3661
+ sp as getCalculatedFieldAggregateOverrides,
3662
+ wc as getCalculatedFieldNamespace,
3663
+ op as getCalculatedFieldParameters,
3664
+ np as getCalculatedFieldShelfOverrides,
3665
+ Sc as getCardDefinition,
3666
+ ip as getClickContextFromTable,
3667
+ xc as getColumnCatalogFieldId,
3668
+ kc as getDashboardFilterSubscriptionHint,
3669
+ Tc as getDashboardGlobalDateFilter,
3670
+ km as getDocumentKpiSectionShapeIssues,
3671
+ Tm as getDocumentSectionCards,
3672
+ rp as getDomainCalculatedSelectionOverrides,
3673
+ Rc as getFieldAggregationOptions,
3674
+ Ac as getMatrixBindingTargets,
3675
+ Dh as getMatrixLevelLabel,
3676
+ Fh as getMatrixMeasureLabel,
3677
+ Dc as getStableDomainCalculatedFieldId,
3678
+ Fc as getTemporalBucketAuthoringOptions,
3679
+ Oc as getTemporalBucketAuthoringSelection,
3680
+ Ec as grainChoicePatch,
3681
+ qc as grainControlApplies,
3682
+ Nc as groupedDateDisplayFormat,
3683
+ Qs as groupedDateDisplayPatterns,
3684
+ Pc as handleSchema,
3685
+ Lc as hasDashboardFilterSubscription,
3686
+ dp as hasSeeRecordsMeasureFilter,
3678
3687
  ue as hasStoredKey,
3679
- Fc as hasTextCardRichWords,
3680
- Oc as hasToolbarFilterReachField,
3681
- ah as hostFilterValueFor,
3682
- sh as hostFilterValuesToSlots,
3683
- Ec as inspectMatrixCardConfig,
3684
- oh as isAdHocFilterValueOnTab,
3688
+ Mc as hasTextCardRichWords,
3689
+ Bc as hasToolbarFilterReachField,
3690
+ fh as hostFilterValueFor,
3691
+ mh as hostFilterValuesToSlots,
3692
+ Vc as inferSemanticDomainIdFromSelectedEntities,
3693
+ Gc as inspectMatrixCardConfig,
3694
+ hh as isAdHocFilterValueOnTab,
3685
3695
  $a as isAggregateGet,
3686
- qc as isAllowedDashboardInputScopeCombination,
3687
- Nc as isCardType,
3688
- vm as isDashboardFilterOperationCompatible,
3696
+ jc as isAllowedDashboardInputScopeCombination,
3697
+ Kc as isCardType,
3698
+ Rm as isDashboardFilterOperationCompatible,
3689
3699
  Qa as isDashboardInputOnTab,
3690
- _m as isDashboardInputOwnedBySheet,
3691
- Im as isDashboardInputScopeEmpty,
3692
- Cm as isDashboardTargetIdTaken,
3693
- Pc as isDatabaseEntityReference,
3694
- Lc as isGroupedDate,
3695
- Mc as isLegacyTableCard,
3696
- Bc as isPresentationCurrencyBinding,
3697
- Vc as isSeeRecordsCardType,
3698
- Gc as isSemanticAutoJoinCard,
3699
- jc as isSemaphorCartesianChartType,
3700
- Lo as isSqlKpi,
3701
- Kc as isStructuralControlBinding,
3702
- Wc as isTextCardRichContent,
3703
- Uc as isValidControlOptionPresentation,
3704
- $m as isVariableComparisonPart,
3705
- Qc as isWhenRun,
3706
- Hc as kpiSegmentMetricId,
3707
- Yc as kpiShowsTrend,
3700
+ Am as isDashboardInputOwnedBySheet,
3701
+ Dm as isDashboardInputScopeEmpty,
3702
+ Fm as isDashboardTargetIdTaken,
3703
+ Wc as isDatabaseEntityReference,
3704
+ Uc as isGroupedDate,
3705
+ Us as isGroupedTimeGrain,
3706
+ Qc as isLegacyTableCard,
3707
+ Hc as isPresentationCurrencyBinding,
3708
+ Yc as isSeeRecordsCardType,
3709
+ zc as isSemanticAutoJoinCard,
3710
+ Jc as isSemaphorCartesianChartType,
3711
+ Bo as isSqlKpi,
3712
+ Xc as isStructuralControlBinding,
3713
+ Zc as isTextCardRichContent,
3714
+ eu as isValidControlOptionPresentation,
3715
+ Om as isVariableComparisonPart,
3716
+ tu as isWhenRun,
3717
+ au as kpiSegmentMetricId,
3718
+ su as kpiShowsTrend,
3708
3719
  Ns as kpiTrendBy,
3709
- Zh as kpiTrendByHint,
3710
- Qs as labelAt,
3711
- zc as layoutArrangeSchema,
3712
- nh as legacyTableRoutingIds,
3713
- ih as legacyTableRoutingTarget,
3714
- Jc as linkedClickToFilterOverridesSchema,
3715
- rh as listAdHocFilterValuesOnTab,
3716
- xe as listDashboardCardLocations,
3717
- Xc as listDashboardFilterDefinitions,
3718
- Zc as listDashboardFilterInputsOnTab,
3720
+ lp as kpiTrendByHint,
3721
+ Ys as labelAt,
3722
+ ou as layoutArrangeSchema,
3723
+ ph as legacyTableRoutingIds,
3724
+ gh as legacyTableRoutingTarget,
3725
+ nu as linkedClickToFilterOverridesSchema,
3726
+ bh as listAdHocFilterValuesOnTab,
3727
+ Se as listDashboardCardLocations,
3728
+ iu as listDashboardFilterDefinitions,
3729
+ ru as listDashboardFilterInputsOnTab,
3719
3730
  Wa as listDashboardFilterTargets,
3720
- wm as listDashboardInputReachKeys,
3721
- Mo as listDashboardInputScopeExceptedCardIds,
3722
- Bo as listDashboardInputScopeExceptedSheetIds,
3723
- eu as listDashboardInputsTolerantly,
3731
+ Em as listDashboardInputReachKeys,
3732
+ Vo as listDashboardInputScopeExceptedCardIds,
3733
+ Go as listDashboardInputScopeExceptedSheetIds,
3734
+ du as listDashboardInputsTolerantly,
3724
3735
  Et as listDashboardTabTargets,
3725
- xm as listDataVariablePlaces,
3726
- dh as listFilterInputValueTargets,
3727
- Sm as listFilterTargetScopeTargets,
3728
- km as listReachedVariableTargets,
3729
- Tm as listReferencedDataVariableIds,
3730
- tu as listStoredFilterDefinitions,
3731
- Rm as listVariableScopeTargets,
3732
- Am as mapDashboardCards,
3733
- Dm as mapDocumentSectionCards,
3734
- au as mapRuleColumns,
3735
- su as matchColumns,
3736
- lh as matrixCatalogSources,
3737
- wo as matrixColumnKeys,
3738
- ou as matrixColumnsSchema,
3739
- nu as matrixDefinitionFieldRefs,
3740
- iu as matrixDefinitionFields,
3741
- ru as matrixDefinitionSources,
3742
- du as matrixEditorCatalogFromFields,
3743
- ch as matrixExecutionSources,
3744
- lu as measureCalculationOptions,
3745
- cu as measureComparisonSchema,
3746
- uu as measureRefSchema,
3747
- fu as measureTransformSchema,
3748
- $h as mergeMatrixSorts,
3749
- fo as metricCardQuerySchema,
3750
- $o as moveMatrixLevel,
3751
- Cp as newVariableDraft,
3752
- $p as newVariableId,
3753
- mu as normalizeClickToFilterSettings,
3754
- hu as normalizeDashboardInputs,
3755
- pu as normalizeLegacyLinkedTargetOverrides,
3756
- gu as occurrenceKeys,
3736
+ qm as listDataVariablePlaces,
3737
+ yh as listFilterInputValueTargets,
3738
+ Nm as listFilterTargetScopeTargets,
3739
+ Pm as listReachedVariableTargets,
3740
+ Lm as listReferencedDataVariableIds,
3741
+ lu as listStoredFilterDefinitions,
3742
+ Mm as listVariableScopeTargets,
3743
+ Bm as mapDashboardCards,
3744
+ Vm as mapDocumentSectionCards,
3745
+ cu as mapRuleColumns,
3746
+ uu as matchColumns,
3747
+ vh as matrixCatalogSources,
3748
+ xo as matrixColumnKeys,
3749
+ fu as matrixColumnsSchema,
3750
+ mu as matrixDefinitionFieldRefs,
3751
+ hu as matrixDefinitionFields,
3752
+ pu as matrixDefinitionSources,
3753
+ gu as matrixEditorCatalogFromFields,
3754
+ _h as matrixExecutionSources,
3755
+ bu as measureCalculationOptions,
3756
+ yu as measureComparisonSchema,
3757
+ vu as measureRefSchema,
3758
+ _u as measureTransformSchema,
3759
+ Oh as mergeMatrixSorts,
3760
+ ho as metricCardQuerySchema,
3761
+ So as moveMatrixLevel,
3762
+ Fp as newVariableDraft,
3763
+ Op as newVariableId,
3764
+ Iu as normalizeClickToFilterSettings,
3765
+ Cu as normalizeDashboardInputs,
3766
+ $u as normalizeLegacyLinkedTargetOverrides,
3767
+ wu as occurrenceKeys,
3757
3768
  ts as outlineCalendar,
3758
- Gr as outlineDashboard,
3769
+ Kr as outlineDashboard,
3759
3770
  Le as outlineFilter,
3760
3771
  ss as outlineFilters,
3761
3772
  mt as ownsItsAggregate,
3762
- Lr as parseCardQueryRequest,
3763
- Rn as parseCardQueryRequestContext,
3764
- Pr as parseCardQueryRequestExtras,
3765
- bu as parseColumnRefKey,
3766
- ep as parseDashboardStyle,
3767
- yu as parseExecutionControlBindingsShallow,
3773
+ Br as parseCardQueryRequest,
3774
+ Dn as parseCardQueryRequestContext,
3775
+ Mr as parseCardQueryRequestExtras,
3776
+ Su as parseColumnRefKey,
3777
+ cp as parseDashboardStyle,
3778
+ xu as parseExecutionControlBindingsShallow,
3768
3779
  ks as parseExecutionControlContext,
3769
- vu as parseExecutionControlContract,
3780
+ ku as parseExecutionControlContract,
3770
3781
  ga as planCardLabels,
3771
3782
  pa as planCardRequery,
3772
- tp as pluralDatasetLabel,
3773
- uh as prepareLoadedDashboard,
3774
- _u as previewTemporalBucketAuthoringFormat,
3775
- Fm as projectDataVariableToCard,
3776
- Iu as pruneUnrelatedCalculatedFilters,
3777
- ro as queryForm,
3778
- Cu as queryMeasureSchema,
3779
- $u as readCardConditionalRules,
3783
+ up as pluralDatasetLabel,
3784
+ Ih as prepareLoadedDashboard,
3785
+ Tu as previewTemporalBucketAuthoringFormat,
3786
+ Gm as projectDataVariableToCard,
3787
+ Ru as pruneUnrelatedCalculatedFilters,
3788
+ co as queryForm,
3789
+ Au as queryMeasureSchema,
3790
+ Du as readCardConditionalRules,
3780
3791
  we as readCardQuery,
3781
3792
  Ft as readCardSettings,
3782
3793
  he as readCardSource,
3783
3794
  qe as readCardTypeProperties,
3784
- Tp as readComparisonDates,
3795
+ Lp as readComparisonDates,
3785
3796
  ve as readDashboardFilterModel,
3786
- Rp as readDefaultComparisonDates,
3787
- wu as readDetailDateChoice,
3788
- xu as readExactDomainCalculatedFieldReference,
3789
- ap as readFilterReachResponse,
3790
- fh as readFilterValueList,
3791
- sp as readKpiDateContext,
3792
- Su as readKpiFigure,
3793
- ku as readKpiNumber,
3794
- Tu as readMatrixCardConfig,
3795
- Ru as readMeasureCalculations,
3796
- Au as readSqlFilterUse,
3797
- Du as readStoredTransform,
3797
+ Mp as readDefaultComparisonDates,
3798
+ Fu as readDetailDateChoice,
3799
+ Ou as readExactDomainCalculatedFieldReference,
3800
+ fp as readFilterReachResponse,
3801
+ Ch as readFilterValueList,
3802
+ Eu as readGroupedDateChoice,
3803
+ mp as readKpiDateContext,
3804
+ qu as readKpiFigure,
3805
+ Nu as readKpiNumber,
3806
+ Pu as readMatrixCardConfig,
3807
+ Lu as readMeasureCalculations,
3808
+ Mu as readSqlFilterUse,
3809
+ Bu as readStoredTransform,
3798
3810
  ja as readTextCardWords,
3799
3811
  Ze as readTextWords,
3800
- Fu as readTransform,
3801
- Om as readVariableAnswer,
3812
+ Vu as readTransform,
3813
+ jm as readVariableAnswer,
3802
3814
  ds as readVariableEditability,
3803
3815
  Tt as readVariableSource,
3804
- ko as readablePresentation,
3805
- Ou as rebindDashboardOptionDependencyInputId,
3816
+ Ro as readablePresentation,
3817
+ Gu as rebindDashboardOptionDependencyInputId,
3806
3818
  ha as rebuildsRole,
3807
- Eu as reconcileMatrixSpecStructure,
3808
- qu as reconcileTemporalBucketAuthoringFormat,
3809
- uo as recordsCardQuerySchema,
3810
- eo as refDataset,
3819
+ ju as reconcileMatrixSpecStructure,
3820
+ Ku as reconcileTemporalBucketAuthoringFormat,
3821
+ mo as recordsCardQuerySchema,
3822
+ ao as refDataset,
3811
3823
  ge as refKey,
3812
3824
  wt as refName,
3813
- Nu as registeredDomainEditChangeSchemas,
3814
- Pu as relationshipAddSchema,
3815
- Lu as relationshipRouteTarget,
3816
- Mu as remapClickToFilterReferences,
3817
- Bu as remapLinkedClickToFilterOverrides,
3818
- Vu as requireNormalizedDashboardInputs,
3819
- Gu as resolveBindingControlValue,
3820
- Em as resolveCanonicalDetailResultRawKey,
3821
- qm as resolveCanonicalResultOutputKey,
3822
- Ko as resolveCanonicalResultOutputKeys,
3823
- Nm as resolveCanonicalResultRawKey,
3824
- op as resolveCardColumnRef,
3825
- Zn as resolveCardSettings,
3826
- np as resolveConditionalRules,
3827
- Br as resolveDashboardChanges,
3828
- Vr as resolveDashboardCreate,
3829
- ju as resolveDashboardEntitySource,
3830
- Ku as resolveDashboardFilterAutomaticTarget,
3831
- Wu as resolveDashboardFilterInheritedTarget,
3832
- Uu as resolveDashboardOptionDependencies,
3833
- Qu as resolveDashboardOptionPopulation,
3834
- Hu as resolveDashboardSqlFilterTarget,
3835
- mn as resolveDashboardStyle,
3836
- Yu as resolveDetailTableRawTemporalPresentation,
3837
- Pm as resolveDistinctDetailRawKeys,
3838
- zu as resolveFieldSelectedSource,
3839
- Ju as resolveGroupByFieldTarget,
3840
- Xu as resolveKpiLayout,
3825
+ Wu as registeredDomainEditChangeSchemas,
3826
+ Uu as relationshipAddSchema,
3827
+ Qu as relationshipRouteTarget,
3828
+ Hu as remapClickToFilterReferences,
3829
+ Yu as remapLinkedClickToFilterOverrides,
3830
+ zu as requireNormalizedDashboardInputs,
3831
+ Ju as resolveBindingControlValue,
3832
+ Km as resolveCanonicalDetailResultRawKey,
3833
+ Wm as resolveCanonicalResultOutputKey,
3834
+ Uo as resolveCanonicalResultOutputKeys,
3835
+ Um as resolveCanonicalResultRawKey,
3836
+ hp as resolveCardColumnRef,
3837
+ ti as resolveCardSettings,
3838
+ pp as resolveConditionalRules,
3839
+ Gr as resolveDashboardChanges,
3840
+ jr as resolveDashboardCreate,
3841
+ Xu as resolveDashboardEntitySource,
3842
+ Zu as resolveDashboardFilterAutomaticTarget,
3843
+ ef as resolveDashboardFilterInheritedTarget,
3844
+ tf as resolveDashboardOptionDependencies,
3845
+ af as resolveDashboardOptionPopulation,
3846
+ sf as resolveDashboardSqlFilterTarget,
3847
+ pn as resolveDashboardStyle,
3848
+ of as resolveDetailTableRawTemporalPresentation,
3849
+ Qm as resolveDistinctDetailRawKeys,
3850
+ nf as resolveFieldSelectedSource,
3851
+ rf as resolveGroupByFieldTarget,
3852
+ df as resolveKpiLayout,
3841
3853
  Ma as resolveKpiShape,
3842
- Zu as resolveKpiValueStyle,
3843
- mh as resolveMatrixControlBindings,
3844
- wh as resolveMatrixDefinition,
3854
+ lf as resolveKpiValueStyle,
3855
+ $h as resolveMatrixControlBindings,
3856
+ Eh as resolveMatrixDefinition,
3845
3857
  ma as resolveMeasureCalculations,
3846
- ef as resolveMeasureTransform,
3847
- tf as resolveMetricFieldTarget,
3848
- af as resolveScalarMappedValue,
3849
- sf as resolveTableColumnTotal,
3850
- of as resolveTemporalBucketAuthoringFormat,
3851
- Ss as resolveTemporalResultOwner,
3858
+ cf as resolveMeasureTransform,
3859
+ uf as resolveMetricFieldTarget,
3860
+ ff as resolveScalarMappedValue,
3861
+ mf as resolveTableColumnTotal,
3862
+ hf as resolveTemporalBucketAuthoringFormat,
3863
+ xs as resolveTemporalResultOwner,
3852
3864
  ba as resolveTextCardWords,
3853
- nf as resolveValueStyle,
3854
- rf as respondsToSelectionsSchema,
3855
- df as retainConditionalRules,
3856
- lf as retainedMatrixPath,
3857
- Lm as rewriteDashboardInputScopeIds,
3858
- hh as routeLegacyTableCard,
3859
- ph as routeLegacyTableCards,
3860
- gh as routeLegacyTableFrame,
3865
+ pf as resolveValueStyle,
3866
+ gf as respondsToSelectionsSchema,
3867
+ bf as retainConditionalRules,
3868
+ yf as retainedMatrixPath,
3869
+ Hm as rewriteDashboardInputScopeIds,
3870
+ wh as routeLegacyTableCard,
3871
+ Sh as routeLegacyTableCards,
3872
+ xh as routeLegacyTableFrame,
3861
3873
  Ye as sameColumnKey,
3862
- cf as sanitizeTextCardUrl,
3863
- ip as seeRecordsAvailability,
3864
- rp as seeRecordsCardAvailability,
3865
- Ur as seeRecordsMeasureId,
3866
- dp as seeRecordsMeasureKind,
3867
- lp as seeRecordsReasonHidesOffer,
3868
- uf as seeRecordsRequestSchema,
3869
- cp as seeRecordsRowField,
3870
- ff as selectDashboardOptionDependencyInputIds,
3871
- mf as selectionFieldFromExplorerField,
3872
- up as selectionTupleFromClickContext,
3873
- fp as setMeasureCalculations,
3874
- hf as settableCardType,
3875
- pf as sharedCardPreferences,
3876
- gf as sharedTableDialect,
3877
- bf as sheetChangeSchemas,
3878
- co as sqlCardQuerySchema,
3879
- yf as sqlKpiResultKeys,
3874
+ vf as sanitizeTextCardUrl,
3875
+ gp as seeRecordsAvailability,
3876
+ bp as seeRecordsCardAvailability,
3877
+ Hr as seeRecordsMeasureId,
3878
+ yp as seeRecordsMeasureKind,
3879
+ vp as seeRecordsReasonHidesOffer,
3880
+ _f as seeRecordsRequestSchema,
3881
+ _p as seeRecordsRowField,
3882
+ If as selectDashboardOptionDependencyInputIds,
3883
+ Cf as selectionFieldFromExplorerField,
3884
+ Ip as selectionTupleFromClickContext,
3885
+ $f as semanticDomainIdsOfSelectedEntities,
3886
+ Cp as setMeasureCalculations,
3887
+ wf as settableCardType,
3888
+ Sf as sharedCardPreferences,
3889
+ xf as sharedTableDialect,
3890
+ kf as sheetChangeSchemas,
3891
+ fo as sqlCardQuerySchema,
3892
+ Tf as sqlKpiResultKeys,
3880
3893
  Ne as statedLabelsOf,
3881
3894
  As as storedCardTypeFor,
3882
- vf as storedRunPresentation,
3883
- Mm as storedTextRefs,
3884
- _f as stripInstanceTargetsForLibrarySave,
3885
- If as structuralControlOverride,
3895
+ Rf as storedRunPresentation,
3896
+ Ym as storedTextRefs,
3897
+ Af as stripInstanceTargetsForLibrarySave,
3898
+ Df as structuralControlOverride,
3886
3899
  as as summarizeFilter,
3887
- Cf as supportsCanonicalDashboardTemporalResult,
3888
- $f as tabChangeSchemas,
3889
- wf as tableColumnTotalLabel,
3890
- xf as textCardExcerpt,
3891
- Sf as textCardWordingClauses,
3900
+ Ff as supportsCanonicalDashboardTemporalResult,
3901
+ Of as tabChangeSchemas,
3902
+ Ef as tableColumnTotalLabel,
3903
+ qf as textCardExcerpt,
3904
+ Nf as textCardWordingClauses,
3892
3905
  $t as textCatalogAt,
3893
3906
  ft as toChartType,
3894
- kf as toEditableRules,
3895
- Tf as toFiniteKpiNumber,
3896
- xt as toPublicCardType,
3897
- to as toStoredComparison,
3898
- Rf as toolbarFilterInputFields,
3899
- Af as toolbarFilterScope,
3900
- Df as transformComparisonDocument,
3901
- Ff as transformGroupings,
3902
- Of as transformOrderSchema,
3903
- Co as updateMatrixConfig,
3904
- or as upgradeCardFormats,
3905
- Wr as upgradeCardPresentation,
3906
- fr as upgradeConditionalFormatting,
3907
- bh as upgradeToStoredDashboard,
3908
- Ef as validateAndResolveWindowTransforms,
3909
- qf as validateControlValue,
3910
- Bm as validateDashboardFilterValues,
3907
+ Pf as toEditableRules,
3908
+ Lf as toFiniteKpiNumber,
3909
+ St as toPublicCardType,
3910
+ so as toStoredComparison,
3911
+ Mf as toolbarFilterInputFields,
3912
+ Bf as toolbarFilterScope,
3913
+ Vf as transformComparisonDocument,
3914
+ Gf as transformGroupings,
3915
+ jf as transformOrderSchema,
3916
+ wo as updateMatrixConfig,
3917
+ ir as upgradeCardFormats,
3918
+ Qr as upgradeCardPresentation,
3919
+ hr as upgradeConditionalFormatting,
3920
+ kh as upgradeToStoredDashboard,
3921
+ Kf as validateAndResolveWindowTransforms,
3922
+ Wf as validateControlValue,
3923
+ zm as validateDashboardFilterValues,
3911
3924
  ws as validateResolvedPrimaryDateFieldShape,
3912
- Vm as variableCardKeepsComparison,
3913
- Gm as variableComparison,
3925
+ Jm as variableCardKeepsComparison,
3926
+ Xm as variableComparison,
3914
3927
  ze as variableFromDraft,
3915
- _n as variableGetOptions,
3916
- jm as variablePartCell,
3917
- Km as variablePartType,
3918
- jo as variableParts,
3919
- Wm as variableQueryResponseOf,
3920
- mp as variableSourceWords,
3921
- $n as variableTakesComparison,
3922
- an as variableWords,
3923
- Nf as withCardConditionalRules,
3924
- Pf as withCardConfigSqlDatePatterns,
3925
- Um as withCardExcludedFromScope,
3926
- Qm as withCardIncludedInScope,
3927
- Lf as withDashboardOptionDependencyOverride,
3928
- Mf as withDetailSqlDatePattern,
3929
- Hm as withDistinctDetailColumnAliases,
3930
- Ym as withDraftCard,
3931
- Bf as withFormatOverride,
3932
- Vf as withGrainChoice,
3933
- Gf as withSqlDatePattern,
3934
- jf as withStartingGrain,
3935
- Go as withUnstatedScopeParts,
3936
- Kf as withoutSqlDatePattern,
3937
- Wf as withoutToolbarFilterReachFields,
3938
- Uf as wordingBlocks,
3939
- Qf as wordingClauses,
3940
- Hf as writeColumnFormat,
3941
- Yf as writeColumnPolarity,
3942
- zf as writeComparisonDisplay,
3943
- Jf as writeComparisonPresentation,
3928
+ Cn as variableGetOptions,
3929
+ Zm as variablePartCell,
3930
+ eh as variablePartType,
3931
+ Wo as variableParts,
3932
+ th as variableQueryResponseOf,
3933
+ $p as variableSourceWords,
3934
+ Sn as variableTakesComparison,
3935
+ on as variableWords,
3936
+ Uf as withCardConditionalRules,
3937
+ Qf as withCardConfigSqlDatePatterns,
3938
+ ah as withCardExcludedFromScope,
3939
+ sh as withCardIncludedInScope,
3940
+ Hf as withDashboardOptionDependencyOverride,
3941
+ Yf as withDetailSqlDatePattern,
3942
+ oh as withDistinctDetailColumnAliases,
3943
+ nh as withDraftCard,
3944
+ zf as withFormatOverride,
3945
+ Jf as withGrainChoice,
3946
+ Xf as withSqlDatePattern,
3947
+ Zf as withStartingGrain,
3948
+ Ko as withUnstatedScopeParts,
3949
+ em as withoutSqlDatePattern,
3950
+ tm as withoutToolbarFilterReachFields,
3951
+ am as wordingBlocks,
3952
+ sm as wordingClauses,
3953
+ om as writeColumnFormat,
3954
+ nm as writeColumnPolarity,
3955
+ im as writeComparisonDisplay,
3956
+ rm as writeComparisonPresentation,
3944
3957
  fa as writeDateFilterDefault,
3945
- Xf as writeDateSelectionMode,
3946
- Zf as writeInheritComparison,
3947
- em as writeSeeRecords,
3948
- Zs as writeTextWords
3958
+ dm as writeDateSelectionMode,
3959
+ lm as writeInheritComparison,
3960
+ cm as writeSeeRecords,
3961
+ to as writeTextWords
3949
3962
  };