react-semaphor 0.1.416 → 0.1.417

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 (50) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +1 -1
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +2 -2
  5. package/dist/chunks/{analyze-result-contract-DPjm6btg.js → analyze-result-contract-B0O3oIYu.js} +2 -1
  6. package/dist/chunks/analyze-result-contract-CL97m8X8.js +1 -0
  7. package/dist/chunks/{calendar-preferences-dialog-B8FmFRHX.js → calendar-preferences-dialog-BOfryj8P.js} +3 -3
  8. package/dist/chunks/{calendar-preferences-dialog-ck4AU-to.js → calendar-preferences-dialog-Rq9qiG3X.js} +1 -1
  9. package/dist/chunks/{dashboard-briefing-launcher-Br_1IK1z.js → dashboard-briefing-launcher-D_P0cNQ_.js} +1 -1
  10. package/dist/chunks/{dashboard-briefing-launcher-Tr2SqDMK.js → dashboard-briefing-launcher-DgvlOcRI.js} +4 -4
  11. package/dist/chunks/{dashboard-controls-B7OObDNl.js → dashboard-controls-DzVA-wWu.js} +1 -1
  12. package/dist/chunks/{dashboard-controls-B2bEv8uG.js → dashboard-controls-JYTKRokc.js} +5 -5
  13. package/dist/chunks/{dashboard-json-DNixjalS.js → dashboard-json-D5TEri2w.js} +1 -1
  14. package/dist/chunks/{dashboard-json-DAB8WVyb.js → dashboard-json-h6YMk_-l.js} +3 -3
  15. package/dist/chunks/{edit-dashboard-visual-Dh8Ge3-B.js → edit-dashboard-visual-DOtCYmDn.js} +4 -4
  16. package/dist/chunks/{edit-dashboard-visual-DWygSAp3.js → edit-dashboard-visual-kfbu03n9.js} +1 -1
  17. package/dist/chunks/{index-CQIMj-FF.js → index-Beol8cOo.js} +2 -2
  18. package/dist/chunks/{index-BkTLAfKy.js → index-BgESS5r7.js} +5 -5
  19. package/dist/chunks/{switch-DMlqgIx_.js → switch--FHwRAOL.js} +1 -1
  20. package/dist/chunks/{switch-DgiogS4X.js → switch-C8_t4Pio.js} +1 -1
  21. package/dist/chunks/update-policy-B50M0Jeg.js +3 -0
  22. package/dist/chunks/{update-policy-BnEbPhHW.js → update-policy-CQLHKQ_h.js} +304 -290
  23. package/dist/chunks/{use-create-flow-overlay-state-CZA-dSns.js → use-create-flow-overlay-state-BEPWzqQn.js} +1 -1
  24. package/dist/chunks/{use-create-flow-overlay-state-uujasvbD.js → use-create-flow-overlay-state-NEs9ePDy.js} +3 -3
  25. package/dist/dashboard/index.cjs +1 -1
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/dashboard-authoring/index.cjs +1 -1
  28. package/dist/dashboard-authoring/index.js +1 -1
  29. package/dist/data-app-builder/index.cjs +1 -1
  30. package/dist/data-app-builder/index.js +2 -2
  31. package/dist/data-app-codegen/index.cjs +1 -1
  32. package/dist/data-app-codegen/index.js +2 -2
  33. package/dist/data-app-codegen-node/index.cjs +18 -18
  34. package/dist/data-app-codegen-node/index.js +81 -81
  35. package/dist/data-app-sdk/index.cjs +1 -1
  36. package/dist/data-app-sdk/index.js +1 -1
  37. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  38. package/dist/data-app-sdk-adapters/index.js +1 -1
  39. package/dist/data-app-sdk-validation/index.cjs +1 -1
  40. package/dist/data-app-sdk-validation/index.js +1 -1
  41. package/dist/index.cjs +1 -1
  42. package/dist/index.js +7 -7
  43. package/dist/surfboard/index.cjs +1 -1
  44. package/dist/surfboard/index.js +2 -2
  45. package/dist/types/analytics-protocol.d.ts +1 -1
  46. package/dist/types/data-app-codegen-node.d.ts +4 -3
  47. package/dist/types/data-app-codegen.d.ts +4 -3
  48. package/package.json +1 -1
  49. package/dist/chunks/analyze-result-contract-8nxUOWp8.js +0 -1
  50. package/dist/chunks/update-policy-CWg9c08k.js +0 -3
@@ -19,9 +19,9 @@ import * as J from "react";
19
19
  import he, { createContext as Nr, useContext as Fn, useState as ee, useMemo as Q, useEffect as xe, useCallback as ge, useRef as Re, forwardRef as Ii, isValidElement as fg, memo as ds, useLayoutEffect as la, Component as KG, createElement as Lo, Suspense as oc, cloneElement as PO, Fragment as aw, useId as Tc, useSyncExternalStore as DS, useTransition as Zpe, useReducer as Xpe, Children as Qpe, startTransition as ZG, useImperativeHandle as XG, lazy as qk } from "react";
20
20
  import * as VA from "react-dom";
21
21
  import sw, { flushSync as su, createPortal as Um, unstable_batchedUpdates as R1 } from "react-dom";
22
- import { bz as lu, bA as lw, bB as BA, A as Nn, bC as Wk, bD as QG, u as ne, bE as Jpe, bh as Yn, b0 as Pa, bF as i6, bG as ege, bH as tge, bI as nge, aC as rge, bJ as oge, p as Is, c as X, bK as Eu, bL as kl, bM as en, bN as lo, bO as FO, bP as Hs, bQ as OO, bR as $n, bS as Gk, bT as Yk, bU as JG, bV as eY, bW as tY, bX as nY, bY as LO, bZ as $O, b_ as rY, b$ as oY, c0 as iY, c1 as ige, ax as zO, c2 as Kk, c3 as VO, c4 as ca, c5 as aY, c6 as Il, c7 as yc, d as ur, B as Ae, e as Yr, c8 as BO, bv as Lu, c9 as cw, aA as Zk, aB as si, ca as Qr, cb as age, N as Ja, az as Gd, cc as CN, P as dr, a as xr, b as wr, aJ as sge, cd as lge, aK as cge, ce as uw, L as ut, Z as zt, aF as go, be as uge, cf as dge, cg as sY, ch as fge, ci as SN, cj as jA, ck as Sb, cl as Nb, cm as a6, cn as hge, co as lY, cp as cY, cq as mge, cr as pge, cs as gge, ct as bge, aS as Du, cu as s6, cv as yge, cw as vge, aG as gf, bq as jO, E as at, aL as ir, av as HO, cx as HA, bg as uY, bo as Rs, bp as sl, cy as xge, cz as wge, F as yo, cA as dY, cB as NN, cC as fY, cD as UO, cE as qO, cF as hY, aD as Xk, cG as Qk, cH as WO, cI as GO, bs as $u, cJ as mY, br as zu, cK as Cge, cL as YO, bt as KO, cM as Sge, bc as BE, aM as es, cN as vh, cO as sm, w as Nge, O as Ya, _ as Wt, $ as Gt, a0 as Kt, a1 as Yt, a2 as et, cP as pY, cQ as _ge, aR as qm, cR as kge, cS as Di, bb as qo, b9 as Ige, ba as Tge, S as jg, cT as ZO, cU as gY, cV as bY, cW as yY, cX as _N, Q as bo, V as Ir, W as Tr, X as io, Y as qr, cY as Ege, b1 as vY, cZ as xY, c_ as Dge, c$ as Mge, d0 as Age, T as Vu, G as Bu, H as Ci, J as Ld, I as Mu, d1 as XO, by as cu, bx as wd, d2 as tv, d3 as MS, d4 as AS, d5 as nv, d6 as Jf, d7 as eh, d8 as el, d9 as RS, da as PS, db as rv, dc as UA, dd as qA, de as WA, l as vl, k as Yd, df as Rge, dg as C0, dh as Pge, di as wY, dj as jE, dk as HE, dl as Fge, dm as Oge, dn as Lge, dp as $ge, dq as zge, dr as Vge, ds as QO, aI as Bge, dt as jge, du as Hge, dv as CY, dw as SY, C as Jk, aT as NY, dx as Uge, dy as qge, a$ as _Y, dz as Wge, ay as Gge, dA as Yge, dB as kY, b2 as IY, dC as Kge, b5 as Cd, dD as zv, b6 as JO, dE as TY, dF as Dy, bf as l6, dG as EY, dH as Zge, dI as Xge, dJ as Qge, dK as DY, dL as c6, dM as MY, dN as cd, dO as AY, dP as RY, dQ as e5, a3 as vc, dR as Jge, dS as ebe, bk as eI, aE as ov, aO as t5, K as n5, y as tbe, dT as nbe, dU as rbe, M as GA, dV as obe, dW as u6, dX as d6, dY as PY, dZ as ibe, d_ as abe, d$ as sbe, e0 as lbe, e1 as cbe, e2 as ube, e3 as dbe, e4 as fbe, e5 as hbe, t as YA, o as FY, n as OY, j as mbe, h as f6, e6 as KA, e7 as pbe, e8 as gbe, e9 as bbe, ea as ybe, eb as vbe, ec as $d, ed as r5, ee as Ql, bu as xbe, ef as wbe, eg as LY, eh as Cbe, aj as o5, ei as i5, ae as tI, af as Sbe, ah as $Y, ej as Nbe, ai as UE, ek as _be, el as kbe, em as Ibe, aW as Tbe, aX as Ebe, ap as Dbe, a7 as zY, en as Fl, aa as Mbe, ac as VY, ab as qE, ao as BY, ak as jY, aq as ZA, at as h6, as as Abe, ad as HY, eo as XA, ep as Sd, R as m6, eq as UY, er as P1, es as Rbe, et as a5, eu as QA, ev as Pbe, ew as Vv, aP as Fbe, ex as Obe, a5 as Lbe, aw as $be, U as s5, ey as zbe, bl as _b, bm as qY, bn as WY, ez as GY, eA as l5, eB as c5, bj as YY, b3 as Vbe, eC as Bbe, eD as jbe, eE as Hbe, eF as Ube, eG as qbe, eH as KY } from "./switch-DgiogS4X.js";
22
+ import { bz as lu, bA as lw, bB as BA, A as Nn, bC as Wk, bD as QG, u as ne, bE as Jpe, bh as Yn, b0 as Pa, bF as i6, bG as ege, bH as tge, bI as nge, aC as rge, bJ as oge, p as Is, c as X, bK as Eu, bL as kl, bM as en, bN as lo, bO as FO, bP as Hs, bQ as OO, bR as $n, bS as Gk, bT as Yk, bU as JG, bV as eY, bW as tY, bX as nY, bY as LO, bZ as $O, b_ as rY, b$ as oY, c0 as iY, c1 as ige, ax as zO, c2 as Kk, c3 as VO, c4 as ca, c5 as aY, c6 as Il, c7 as yc, d as ur, B as Ae, e as Yr, c8 as BO, bv as Lu, c9 as cw, aA as Zk, aB as si, ca as Qr, cb as age, N as Ja, az as Gd, cc as CN, P as dr, a as xr, b as wr, aJ as sge, cd as lge, aK as cge, ce as uw, L as ut, Z as zt, aF as go, be as uge, cf as dge, cg as sY, ch as fge, ci as SN, cj as jA, ck as Sb, cl as Nb, cm as a6, cn as hge, co as lY, cp as cY, cq as mge, cr as pge, cs as gge, ct as bge, aS as Du, cu as s6, cv as yge, cw as vge, aG as gf, bq as jO, E as at, aL as ir, av as HO, cx as HA, bg as uY, bo as Rs, bp as sl, cy as xge, cz as wge, F as yo, cA as dY, cB as NN, cC as fY, cD as UO, cE as qO, cF as hY, aD as Xk, cG as Qk, cH as WO, cI as GO, bs as $u, cJ as mY, br as zu, cK as Cge, cL as YO, bt as KO, cM as Sge, bc as BE, aM as es, cN as vh, cO as sm, w as Nge, O as Ya, _ as Wt, $ as Gt, a0 as Kt, a1 as Yt, a2 as et, cP as pY, cQ as _ge, aR as qm, cR as kge, cS as Di, bb as qo, b9 as Ige, ba as Tge, S as jg, cT as ZO, cU as gY, cV as bY, cW as yY, cX as _N, Q as bo, V as Ir, W as Tr, X as io, Y as qr, cY as Ege, b1 as vY, cZ as xY, c_ as Dge, c$ as Mge, d0 as Age, T as Vu, G as Bu, H as Ci, J as Ld, I as Mu, d1 as XO, by as cu, bx as wd, d2 as tv, d3 as MS, d4 as AS, d5 as nv, d6 as Jf, d7 as eh, d8 as el, d9 as RS, da as PS, db as rv, dc as UA, dd as qA, de as WA, l as vl, k as Yd, df as Rge, dg as C0, dh as Pge, di as wY, dj as jE, dk as HE, dl as Fge, dm as Oge, dn as Lge, dp as $ge, dq as zge, dr as Vge, ds as QO, aI as Bge, dt as jge, du as Hge, dv as CY, dw as SY, C as Jk, aT as NY, dx as Uge, dy as qge, a$ as _Y, dz as Wge, ay as Gge, dA as Yge, dB as kY, b2 as IY, dC as Kge, b5 as Cd, dD as zv, b6 as JO, dE as TY, dF as Dy, bf as l6, dG as EY, dH as Zge, dI as Xge, dJ as Qge, dK as DY, dL as c6, dM as MY, dN as cd, dO as AY, dP as RY, dQ as e5, a3 as vc, dR as Jge, dS as ebe, bk as eI, aE as ov, aO as t5, K as n5, y as tbe, dT as nbe, dU as rbe, M as GA, dV as obe, dW as u6, dX as d6, dY as PY, dZ as ibe, d_ as abe, d$ as sbe, e0 as lbe, e1 as cbe, e2 as ube, e3 as dbe, e4 as fbe, e5 as hbe, t as YA, o as FY, n as OY, j as mbe, h as f6, e6 as KA, e7 as pbe, e8 as gbe, e9 as bbe, ea as ybe, eb as vbe, ec as $d, ed as r5, ee as Ql, bu as xbe, ef as wbe, eg as LY, eh as Cbe, aj as o5, ei as i5, ae as tI, af as Sbe, ah as $Y, ej as Nbe, ai as UE, ek as _be, el as kbe, em as Ibe, aW as Tbe, aX as Ebe, ap as Dbe, a7 as zY, en as Fl, aa as Mbe, ac as VY, ab as qE, ao as BY, ak as jY, aq as ZA, at as h6, as as Abe, ad as HY, eo as XA, ep as Sd, R as m6, eq as UY, er as P1, es as Rbe, et as a5, eu as QA, ev as Pbe, ew as Vv, aP as Fbe, ex as Obe, a5 as Lbe, aw as $be, U as s5, ey as zbe, bl as _b, bm as qY, bn as WY, ez as GY, eA as l5, eB as c5, bj as YY, b3 as Vbe, eC as Bbe, eD as jbe, eE as Hbe, eF as Ube, eG as qbe, eH as KY } from "./switch-C8_t4Pio.js";
23
23
  import { j as Wbe, c as st, X as dn, C as fa } from "./x-CXDkqdur.js";
24
- import "./analyze-result-contract-DPjm6btg.js";
24
+ import "./analyze-result-contract-B0O3oIYu.js";
25
25
  import { c as dw, d as Gbe, A as Ybe, r as ZY } from "./index-CJdxSyQq.js";
26
26
  import { createRoot as Kbe } from "react-dom/client";
27
27
  import { S as qi, C as Cr, E as nI, a as u5, M as XY } from "./search-BHsQIWBV.js";
@@ -143181,9 +143181,9 @@ function z_t() {
143181
143181
  }
143182
143182
  );
143183
143183
  }
143184
- const V_t = qk(() => import("./dashboard-controls-B2bEv8uG.js")), B_t = qk(
143185
- () => import("./edit-dashboard-visual-Dh8Ge3-B.js")
143186
- ), j_t = qk(() => import("./dashboard-json-DAB8WVyb.js"));
143184
+ const V_t = qk(() => import("./dashboard-controls-JYTKRokc.js")), B_t = qk(
143185
+ () => import("./edit-dashboard-visual-DOtCYmDn.js")
143186
+ ), j_t = qk(() => import("./dashboard-json-h6YMk_-l.js"));
143187
143187
  function fTt({
143188
143188
  showControls: e = !1,
143189
143189
  showFooter: t = !0,
@@ -1,4 +1,4 @@
1
- "use strict";const ve=require("./x-B6ghREd2.js"),x=require("react/jsx-runtime"),le=require("react");require("./analyze-result-contract-8nxUOWp8.js");const ml=require("react-dom"),ut=require("./index-DRlMUglg.js");require("react-dom/client");const _i=require("./catalog-field-grounding-Bnx-3tE0.js"),vp=require("../layouts/index.cjs"),he=require("./index-D7KJindZ.js"),xn=require("./common-types-C73-Ud1-.js");function hl(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const f=hl(le),Bn=hl(ml),Ya=e=>{let r;const t=new Set,n=(c,u)=>{const d=typeof c=="function"?c(r):c;if(!Object.is(d,r)){const p=r;r=u??(typeof d!="object"||d===null)?d:Object.assign({},r,d),t.forEach(h=>h(r,p))}},o=()=>r,s={setState:n,getState:o,getInitialState:()=>l,subscribe:c=>(t.add(c),()=>t.delete(c))},l=r=e(n,o,s);return s},Cp=e=>e?Ya(e):Ya,Sp=e=>e;function xp(e,r=Sp){const t=le.useSyncExternalStore(e.subscribe,le.useCallback(()=>r(e.getState()),[e,r]),le.useCallback(()=>r(e.getInitialState()),[e,r]));return le.useDebugValue(t),t}const Ka=e=>{const r=Cp(e),t=n=>xp(r,n);return Object.assign(t,r),t},_t=e=>e?Ka(e):Ka;var gl=Symbol.for("immer-nothing"),Xa=Symbol.for("immer-draftable"),Q=Symbol.for("immer-state"),wp=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function be(e,...r){if(process.env.NODE_ENV!=="production"){const t=wp[e],n=typeof t=="function"?t.apply(null,r):t;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fr=Object.getPrototypeOf;function Qt(e){return!!e&&!!e[Q]}function Ze(e){var r;return e?yl(e)||Array.isArray(e)||!!e[Xa]||!!((r=e.constructor)!=null&&r[Xa])||Br(e)||$n(e):!1}var Ip=Object.prototype.constructor.toString(),Za=new WeakMap;function yl(e){if(!e||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype)return!0;const t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;if(t===Object)return!0;if(typeof t!="function")return!1;let n=Za.get(t);return n===void 0&&(n=Function.toString.call(t),Za.set(t,n)),n===Ip}function Dr(e,r,t=!0){jn(e)===0?(t?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{r(o,e[o],e)}):e.forEach((n,o)=>r(o,n,e))}function jn(e){const r=e[Q];return r?r.type_:Array.isArray(e)?1:Br(e)?2:$n(e)?3:0}function ei(e,r){return jn(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function bl(e,r,t){const n=jn(e);n===2?e.set(r,t):n===3?e.add(t):e[r]=t}function Ep(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function Br(e){return e instanceof Map}function $n(e){return e instanceof Set}function ue(e){return e.copy_||e.base_}function ti(e,r){if(Br(e))return new Map(e);if($n(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const t=yl(e);if(r===!0||r==="class_only"&&!t){const n=Object.getOwnPropertyDescriptors(e);delete n[Q];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){const a=o[i],s=n[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Fr(e),n)}else{const n=Fr(e);if(n!==null&&t)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function Oi(e,r=!1){return Un(e)||Qt(e)||!Ze(e)||(jn(e)>1&&Object.defineProperties(e,{set:tn,add:tn,clear:tn,delete:tn}),Object.freeze(e),r&&Object.values(e).forEach(t=>Oi(t,!0))),e}function Tp(){be(2)}var tn={value:Tp};function Un(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var ri={};function Tt(e){const r=ri[e];return r||be(0,e),r}function Ap(e,r){ri[e]||(ri[e]=r)}var Rr;function wn(){return Rr}function Fp(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Qa(e,r){r&&(Tt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function ni(e){oi(e),e.drafts_.forEach(Dp),e.drafts_=null}function oi(e){e===Rr&&(Rr=e.parent_)}function Ja(e){return Rr=Fp(Rr,e)}function Dp(e){const r=e[Q];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function es(e,r){r.unfinalizedDrafts_=r.drafts_.length;const t=r.drafts_[0];return e!==void 0&&e!==t?(t[Q].modified_&&(ni(r),be(4)),Ze(e)&&(e=In(r,e),r.parent_||En(r,e)),r.patches_&&Tt("Patches").generateReplacementPatches_(t[Q].base_,e,r.patches_,r.inversePatches_)):e=In(r,t,[]),ni(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==gl?e:void 0}function In(e,r,t){if(Un(r))return r;const n=e.immer_.shouldUseStrictIteration(),o=r[Q];if(!o)return Dr(r,(i,a)=>ts(e,o,r,i,a,t),n),r;if(o.scope_!==e)return r;if(!o.modified_)return En(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const i=o.copy_;let a=i,s=!1;o.type_===3&&(a=new Set(i),i.clear(),s=!0),Dr(a,(l,c)=>ts(e,o,i,l,c,t,s),n),En(e,i,!1),t&&e.patches_&&Tt("Patches").generatePatches_(o,t,e.patches_,e.inversePatches_)}return o.copy_}function ts(e,r,t,n,o,i,a){if(o==null||typeof o!="object"&&!a)return;const s=Un(o);if(!(s&&!a)){if(process.env.NODE_ENV!=="production"&&o===t&&be(5),Qt(o)){const l=i&&r&&r.type_!==3&&!ei(r.assigned_,n)?i.concat(n):void 0,c=In(e,o,l);if(bl(t,n,c),Qt(c))e.canAutoFreeze_=!1;else return}else a&&t.add(o);if(Ze(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||r&&r.base_&&r.base_[n]===o&&s)return;In(e,o),(!r||!r.scope_.parent_)&&typeof n!="symbol"&&(Br(t)?t.has(n):Object.prototype.propertyIsEnumerable.call(t,n))&&En(e,o)}}}function En(e,r,t=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Oi(r,t)}function Rp(e,r){const t=Array.isArray(e),n={type_:t?1:0,scope_:r?r.scope_:wn(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=Mi;t&&(o=[n],i=Pr);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}var Mi={get(e,r){if(r===Q)return e;const t=ue(e);if(!ei(t,r))return Pp(e,t,r);const n=t[r];return e.finalized_||!Ze(n)?n:n===Eo(e.base_,r)?(To(e),e.copy_[r]=_r(n,e)):n},has(e,r){return r in ue(e)},ownKeys(e){return Reflect.ownKeys(ue(e))},set(e,r,t){const n=vl(ue(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,t),!0;if(!e.modified_){const o=Eo(ue(e),r),i=o==null?void 0:o[Q];if(i&&i.base_===t)return e.copy_[r]=t,e.assigned_[r]=!1,!0;if(Ep(t,o)&&(t!==void 0||ei(e.base_,r)))return!0;To(e),Ye(e)}return e.copy_[r]===t&&(t!==void 0||r in e.copy_)||Number.isNaN(t)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=t,e.assigned_[r]=!0),!0},deleteProperty(e,r){return Eo(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,To(e),Ye(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const t=ue(e),n=Reflect.getOwnPropertyDescriptor(t,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:t[r]}},defineProperty(){be(11)},getPrototypeOf(e){return Fr(e.base_)},setPrototypeOf(){be(12)}},Pr={};Dr(Mi,(e,r)=>{Pr[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});Pr.deleteProperty=function(e,r){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(r))&&be(13),Pr.set.call(this,e,r,void 0)};Pr.set=function(e,r,t){return process.env.NODE_ENV!=="production"&&r!=="length"&&isNaN(parseInt(r))&&be(14),Mi.set.call(this,e[0],r,t,e[0])};function Eo(e,r){const t=e[Q];return(t?ue(t):e)[r]}function Pp(e,r,t){var o;const n=vl(r,t);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function vl(e,r){if(!(r in e))return;let t=Fr(e);for(;t;){const n=Object.getOwnPropertyDescriptor(t,r);if(n)return n;t=Fr(t)}}function Ye(e){e.modified_||(e.modified_=!0,e.parent_&&Ye(e.parent_))}function To(e){e.copy_||(e.copy_=ti(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var _p=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(r,t,n)=>{if(typeof r=="function"&&typeof t!="function"){const i=t;t=r;const a=this;return function(l=i,...c){return a.produce(l,u=>t.call(this,u,...c))}}typeof t!="function"&&be(6),n!==void 0&&typeof n!="function"&&be(7);let o;if(Ze(r)){const i=Ja(this),a=_r(r,void 0);let s=!0;try{o=t(a),s=!1}finally{s?ni(i):oi(i)}return Qa(i,n),es(o,i)}else if(!r||typeof r!="object"){if(o=t(r),o===void 0&&(o=r),o===gl&&(o=void 0),this.autoFreeze_&&Oi(o,!0),n){const i=[],a=[];Tt("Patches").generateReplacementPatches_(r,o,i,a),n(i,a)}return o}else be(1,r)},this.produceWithPatches=(r,t)=>{if(typeof r=="function")return(a,...s)=>this.produceWithPatches(a,l=>r(l,...s));let n,o;return[this.produce(r,t,(a,s)=>{n=a,o=s}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ze(e)||be(8),Qt(e)&&(e=Op(e));const r=Ja(this),t=_r(e,void 0);return t[Q].isManual_=!0,oi(r),t}finishDraft(e,r){const t=e&&e[Q];(!t||!t.isManual_)&&be(9);const{scope_:n}=t;return Qa(n,r),es(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,r){let t;for(t=r.length-1;t>=0;t--){const o=r[t];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}t>-1&&(r=r.slice(t+1));const n=Tt("Patches").applyPatches_;return Qt(e)?n(e,r):this.produce(e,o=>n(o,r))}};function _r(e,r){const t=Br(e)?Tt("MapSet").proxyMap_(e,r):$n(e)?Tt("MapSet").proxySet_(e,r):Rp(e,r);return(r?r.scope_:wn()).drafts_.push(t),t}function Op(e){return Qt(e)||be(10,e),Cl(e)}function Cl(e){if(!Ze(e)||Un(e))return e;const r=e[Q];let t,n=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,t=ti(e,r.scope_.immer_.useStrictShallowCopy_),n=r.scope_.immer_.shouldUseStrictIteration()}else t=ti(e,!0);return Dr(t,(o,i)=>{bl(t,o,Cl(i))},n),r&&(r.finalized_=!1),t}function Mp(){class e extends Map{constructor(l,c){super(),this[Q]={type_:2,parent_:c,scope_:c?c.scope_:wn(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:l,draft_:this,isManual_:!1,revoked_:!1}}get size(){return ue(this[Q]).size}has(l){return ue(this[Q]).has(l)}set(l,c){const u=this[Q];return a(u),(!ue(u).has(l)||ue(u).get(l)!==c)&&(t(u),Ye(u),u.assigned_.set(l,!0),u.copy_.set(l,c),u.assigned_.set(l,!0)),this}delete(l){if(!this.has(l))return!1;const c=this[Q];return a(c),t(c),Ye(c),c.base_.has(l)?c.assigned_.set(l,!1):c.assigned_.delete(l),c.copy_.delete(l),!0}clear(){const l=this[Q];a(l),ue(l).size&&(t(l),Ye(l),l.assigned_=new Map,Dr(l.base_,c=>{l.assigned_.set(c,!1)}),l.copy_.clear())}forEach(l,c){const u=this[Q];ue(u).forEach((d,p,h)=>{l.call(c,this.get(p),p,this)})}get(l){const c=this[Q];a(c);const u=ue(c).get(l);if(c.finalized_||!Ze(u)||u!==c.base_.get(l))return u;const d=_r(u,c);return t(c),c.copy_.set(l,d),d}keys(){return ue(this[Q]).keys()}values(){const l=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const c=l.next();return c.done?c:{done:!1,value:this.get(c.value)}}}}entries(){const l=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const c=l.next();if(c.done)return c;const u=this.get(c.value);return{done:!1,value:[c.value,u]}}}}[Symbol.iterator](){return this.entries()}}function r(s,l){return new e(s,l)}function t(s){s.copy_||(s.assigned_=new Map,s.copy_=new Map(s.base_))}class n extends Set{constructor(l,c){super(),this[Q]={type_:3,parent_:c,scope_:c?c.scope_:wn(),modified_:!1,finalized_:!1,copy_:void 0,base_:l,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return ue(this[Q]).size}has(l){const c=this[Q];return a(c),c.copy_?!!(c.copy_.has(l)||c.drafts_.has(l)&&c.copy_.has(c.drafts_.get(l))):c.base_.has(l)}add(l){const c=this[Q];return a(c),this.has(l)||(i(c),Ye(c),c.copy_.add(l)),this}delete(l){if(!this.has(l))return!1;const c=this[Q];return a(c),i(c),Ye(c),c.copy_.delete(l)||(c.drafts_.has(l)?c.copy_.delete(c.drafts_.get(l)):!1)}clear(){const l=this[Q];a(l),ue(l).size&&(i(l),Ye(l),l.copy_.clear())}values(){const l=this[Q];return a(l),i(l),l.copy_.values()}entries(){const l=this[Q];return a(l),i(l),l.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(l,c){const u=this.values();let d=u.next();for(;!d.done;)l.call(c,d.value,d.value,this),d=u.next()}}function o(s,l){return new n(s,l)}function i(s){s.copy_||(s.copy_=new Set,s.base_.forEach(l=>{if(Ze(l)){const c=_r(l,s);s.drafts_.set(l,c),s.copy_.add(c)}else s.copy_.add(l)}))}function a(s){s.revoked_&&be(3,JSON.stringify(ue(s)))}Ap("MapSet",{proxyMap_:r,proxySet_:o})}var Np=new _p,kp=Np.produce;const Lp=e=>(r,t,n)=>(n.setState=(o,i,...a)=>{const s=typeof o=="function"?kp(o):o;return r(s,i,...a)},e(n.setState,t,n)),zn=Lp;var Te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vp(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t}var Bp=function e(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var n,o,i;if(Array.isArray(r)){if(n=r.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!e(r[o],t[o]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if(i=Object.keys(r),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!(a==="_owner"&&r.$$typeof)&&!e(r[a],t[a]))return!1}return!0}return r!==r&&t!==t};const ii=qn(Bp),xt=new Map;function jp(e,r){return xt.has(e)||xt.set(e,new Set),xt.get(e).add(r),()=>{var t;(t=xt.get(e))==null||t.delete(r)}}function Ni(e){const r=xt.get(e);r&&r.forEach(t=>{try{t()}catch(n){console.error(`Error in store event callback for '${e}':`,n)}})}function $p(e){e?xt.delete(e):xt.clear()}const et={subscribe:jp,emit:Ni,clear:$p},Up=()=>Ni("dashboard:load"),zp=()=>Ni("dashboard:unload"),rs={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Or=new Map,rn=e=>{const r=Or.get(e);return r?Object.fromEntries(Object.entries(r.stores).map(([t,n])=>[t,n.getState()])):{}},qp=(e,r,t)=>{if(e===void 0)return{type:"untracked",connection:r.connect(t)};const n=Or.get(t.name);if(n)return{type:"tracked",store:e,...n};const o={connection:r.connect(t),stores:{}};return Or.set(t.name,o),{type:"tracked",store:e,...o}},Hp=(e,r)=>{if(r===void 0)return;const t=Or.get(e);t&&(delete t.stores[r],Object.keys(t.stores).length===0&&Or.delete(e))},Wp=e=>{var r,t;if(!e)return;const n=e.split(`
1
+ "use strict";const ve=require("./x-B6ghREd2.js"),x=require("react/jsx-runtime"),le=require("react");require("./analyze-result-contract-CL97m8X8.js");const ml=require("react-dom"),ut=require("./index-DRlMUglg.js");require("react-dom/client");const _i=require("./catalog-field-grounding-Bnx-3tE0.js"),vp=require("../layouts/index.cjs"),he=require("./index-D7KJindZ.js"),xn=require("./common-types-C73-Ud1-.js");function hl(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const f=hl(le),Bn=hl(ml),Ya=e=>{let r;const t=new Set,n=(c,u)=>{const d=typeof c=="function"?c(r):c;if(!Object.is(d,r)){const p=r;r=u??(typeof d!="object"||d===null)?d:Object.assign({},r,d),t.forEach(h=>h(r,p))}},o=()=>r,s={setState:n,getState:o,getInitialState:()=>l,subscribe:c=>(t.add(c),()=>t.delete(c))},l=r=e(n,o,s);return s},Cp=e=>e?Ya(e):Ya,Sp=e=>e;function xp(e,r=Sp){const t=le.useSyncExternalStore(e.subscribe,le.useCallback(()=>r(e.getState()),[e,r]),le.useCallback(()=>r(e.getInitialState()),[e,r]));return le.useDebugValue(t),t}const Ka=e=>{const r=Cp(e),t=n=>xp(r,n);return Object.assign(t,r),t},_t=e=>e?Ka(e):Ka;var gl=Symbol.for("immer-nothing"),Xa=Symbol.for("immer-draftable"),Q=Symbol.for("immer-state"),wp=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function be(e,...r){if(process.env.NODE_ENV!=="production"){const t=wp[e],n=typeof t=="function"?t.apply(null,r):t;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fr=Object.getPrototypeOf;function Qt(e){return!!e&&!!e[Q]}function Ze(e){var r;return e?yl(e)||Array.isArray(e)||!!e[Xa]||!!((r=e.constructor)!=null&&r[Xa])||Br(e)||$n(e):!1}var Ip=Object.prototype.constructor.toString(),Za=new WeakMap;function yl(e){if(!e||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype)return!0;const t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;if(t===Object)return!0;if(typeof t!="function")return!1;let n=Za.get(t);return n===void 0&&(n=Function.toString.call(t),Za.set(t,n)),n===Ip}function Dr(e,r,t=!0){jn(e)===0?(t?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{r(o,e[o],e)}):e.forEach((n,o)=>r(o,n,e))}function jn(e){const r=e[Q];return r?r.type_:Array.isArray(e)?1:Br(e)?2:$n(e)?3:0}function ei(e,r){return jn(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function bl(e,r,t){const n=jn(e);n===2?e.set(r,t):n===3?e.add(t):e[r]=t}function Ep(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function Br(e){return e instanceof Map}function $n(e){return e instanceof Set}function ue(e){return e.copy_||e.base_}function ti(e,r){if(Br(e))return new Map(e);if($n(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const t=yl(e);if(r===!0||r==="class_only"&&!t){const n=Object.getOwnPropertyDescriptors(e);delete n[Q];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){const a=o[i],s=n[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Fr(e),n)}else{const n=Fr(e);if(n!==null&&t)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function Oi(e,r=!1){return Un(e)||Qt(e)||!Ze(e)||(jn(e)>1&&Object.defineProperties(e,{set:tn,add:tn,clear:tn,delete:tn}),Object.freeze(e),r&&Object.values(e).forEach(t=>Oi(t,!0))),e}function Tp(){be(2)}var tn={value:Tp};function Un(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var ri={};function Tt(e){const r=ri[e];return r||be(0,e),r}function Ap(e,r){ri[e]||(ri[e]=r)}var Rr;function wn(){return Rr}function Fp(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Qa(e,r){r&&(Tt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function ni(e){oi(e),e.drafts_.forEach(Dp),e.drafts_=null}function oi(e){e===Rr&&(Rr=e.parent_)}function Ja(e){return Rr=Fp(Rr,e)}function Dp(e){const r=e[Q];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function es(e,r){r.unfinalizedDrafts_=r.drafts_.length;const t=r.drafts_[0];return e!==void 0&&e!==t?(t[Q].modified_&&(ni(r),be(4)),Ze(e)&&(e=In(r,e),r.parent_||En(r,e)),r.patches_&&Tt("Patches").generateReplacementPatches_(t[Q].base_,e,r.patches_,r.inversePatches_)):e=In(r,t,[]),ni(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==gl?e:void 0}function In(e,r,t){if(Un(r))return r;const n=e.immer_.shouldUseStrictIteration(),o=r[Q];if(!o)return Dr(r,(i,a)=>ts(e,o,r,i,a,t),n),r;if(o.scope_!==e)return r;if(!o.modified_)return En(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const i=o.copy_;let a=i,s=!1;o.type_===3&&(a=new Set(i),i.clear(),s=!0),Dr(a,(l,c)=>ts(e,o,i,l,c,t,s),n),En(e,i,!1),t&&e.patches_&&Tt("Patches").generatePatches_(o,t,e.patches_,e.inversePatches_)}return o.copy_}function ts(e,r,t,n,o,i,a){if(o==null||typeof o!="object"&&!a)return;const s=Un(o);if(!(s&&!a)){if(process.env.NODE_ENV!=="production"&&o===t&&be(5),Qt(o)){const l=i&&r&&r.type_!==3&&!ei(r.assigned_,n)?i.concat(n):void 0,c=In(e,o,l);if(bl(t,n,c),Qt(c))e.canAutoFreeze_=!1;else return}else a&&t.add(o);if(Ze(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||r&&r.base_&&r.base_[n]===o&&s)return;In(e,o),(!r||!r.scope_.parent_)&&typeof n!="symbol"&&(Br(t)?t.has(n):Object.prototype.propertyIsEnumerable.call(t,n))&&En(e,o)}}}function En(e,r,t=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Oi(r,t)}function Rp(e,r){const t=Array.isArray(e),n={type_:t?1:0,scope_:r?r.scope_:wn(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=Mi;t&&(o=[n],i=Pr);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}var Mi={get(e,r){if(r===Q)return e;const t=ue(e);if(!ei(t,r))return Pp(e,t,r);const n=t[r];return e.finalized_||!Ze(n)?n:n===Eo(e.base_,r)?(To(e),e.copy_[r]=_r(n,e)):n},has(e,r){return r in ue(e)},ownKeys(e){return Reflect.ownKeys(ue(e))},set(e,r,t){const n=vl(ue(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,t),!0;if(!e.modified_){const o=Eo(ue(e),r),i=o==null?void 0:o[Q];if(i&&i.base_===t)return e.copy_[r]=t,e.assigned_[r]=!1,!0;if(Ep(t,o)&&(t!==void 0||ei(e.base_,r)))return!0;To(e),Ye(e)}return e.copy_[r]===t&&(t!==void 0||r in e.copy_)||Number.isNaN(t)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=t,e.assigned_[r]=!0),!0},deleteProperty(e,r){return Eo(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,To(e),Ye(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const t=ue(e),n=Reflect.getOwnPropertyDescriptor(t,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:t[r]}},defineProperty(){be(11)},getPrototypeOf(e){return Fr(e.base_)},setPrototypeOf(){be(12)}},Pr={};Dr(Mi,(e,r)=>{Pr[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});Pr.deleteProperty=function(e,r){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(r))&&be(13),Pr.set.call(this,e,r,void 0)};Pr.set=function(e,r,t){return process.env.NODE_ENV!=="production"&&r!=="length"&&isNaN(parseInt(r))&&be(14),Mi.set.call(this,e[0],r,t,e[0])};function Eo(e,r){const t=e[Q];return(t?ue(t):e)[r]}function Pp(e,r,t){var o;const n=vl(r,t);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function vl(e,r){if(!(r in e))return;let t=Fr(e);for(;t;){const n=Object.getOwnPropertyDescriptor(t,r);if(n)return n;t=Fr(t)}}function Ye(e){e.modified_||(e.modified_=!0,e.parent_&&Ye(e.parent_))}function To(e){e.copy_||(e.copy_=ti(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var _p=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(r,t,n)=>{if(typeof r=="function"&&typeof t!="function"){const i=t;t=r;const a=this;return function(l=i,...c){return a.produce(l,u=>t.call(this,u,...c))}}typeof t!="function"&&be(6),n!==void 0&&typeof n!="function"&&be(7);let o;if(Ze(r)){const i=Ja(this),a=_r(r,void 0);let s=!0;try{o=t(a),s=!1}finally{s?ni(i):oi(i)}return Qa(i,n),es(o,i)}else if(!r||typeof r!="object"){if(o=t(r),o===void 0&&(o=r),o===gl&&(o=void 0),this.autoFreeze_&&Oi(o,!0),n){const i=[],a=[];Tt("Patches").generateReplacementPatches_(r,o,i,a),n(i,a)}return o}else be(1,r)},this.produceWithPatches=(r,t)=>{if(typeof r=="function")return(a,...s)=>this.produceWithPatches(a,l=>r(l,...s));let n,o;return[this.produce(r,t,(a,s)=>{n=a,o=s}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ze(e)||be(8),Qt(e)&&(e=Op(e));const r=Ja(this),t=_r(e,void 0);return t[Q].isManual_=!0,oi(r),t}finishDraft(e,r){const t=e&&e[Q];(!t||!t.isManual_)&&be(9);const{scope_:n}=t;return Qa(n,r),es(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,r){let t;for(t=r.length-1;t>=0;t--){const o=r[t];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}t>-1&&(r=r.slice(t+1));const n=Tt("Patches").applyPatches_;return Qt(e)?n(e,r):this.produce(e,o=>n(o,r))}};function _r(e,r){const t=Br(e)?Tt("MapSet").proxyMap_(e,r):$n(e)?Tt("MapSet").proxySet_(e,r):Rp(e,r);return(r?r.scope_:wn()).drafts_.push(t),t}function Op(e){return Qt(e)||be(10,e),Cl(e)}function Cl(e){if(!Ze(e)||Un(e))return e;const r=e[Q];let t,n=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,t=ti(e,r.scope_.immer_.useStrictShallowCopy_),n=r.scope_.immer_.shouldUseStrictIteration()}else t=ti(e,!0);return Dr(t,(o,i)=>{bl(t,o,Cl(i))},n),r&&(r.finalized_=!1),t}function Mp(){class e extends Map{constructor(l,c){super(),this[Q]={type_:2,parent_:c,scope_:c?c.scope_:wn(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:l,draft_:this,isManual_:!1,revoked_:!1}}get size(){return ue(this[Q]).size}has(l){return ue(this[Q]).has(l)}set(l,c){const u=this[Q];return a(u),(!ue(u).has(l)||ue(u).get(l)!==c)&&(t(u),Ye(u),u.assigned_.set(l,!0),u.copy_.set(l,c),u.assigned_.set(l,!0)),this}delete(l){if(!this.has(l))return!1;const c=this[Q];return a(c),t(c),Ye(c),c.base_.has(l)?c.assigned_.set(l,!1):c.assigned_.delete(l),c.copy_.delete(l),!0}clear(){const l=this[Q];a(l),ue(l).size&&(t(l),Ye(l),l.assigned_=new Map,Dr(l.base_,c=>{l.assigned_.set(c,!1)}),l.copy_.clear())}forEach(l,c){const u=this[Q];ue(u).forEach((d,p,h)=>{l.call(c,this.get(p),p,this)})}get(l){const c=this[Q];a(c);const u=ue(c).get(l);if(c.finalized_||!Ze(u)||u!==c.base_.get(l))return u;const d=_r(u,c);return t(c),c.copy_.set(l,d),d}keys(){return ue(this[Q]).keys()}values(){const l=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const c=l.next();return c.done?c:{done:!1,value:this.get(c.value)}}}}entries(){const l=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const c=l.next();if(c.done)return c;const u=this.get(c.value);return{done:!1,value:[c.value,u]}}}}[Symbol.iterator](){return this.entries()}}function r(s,l){return new e(s,l)}function t(s){s.copy_||(s.assigned_=new Map,s.copy_=new Map(s.base_))}class n extends Set{constructor(l,c){super(),this[Q]={type_:3,parent_:c,scope_:c?c.scope_:wn(),modified_:!1,finalized_:!1,copy_:void 0,base_:l,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return ue(this[Q]).size}has(l){const c=this[Q];return a(c),c.copy_?!!(c.copy_.has(l)||c.drafts_.has(l)&&c.copy_.has(c.drafts_.get(l))):c.base_.has(l)}add(l){const c=this[Q];return a(c),this.has(l)||(i(c),Ye(c),c.copy_.add(l)),this}delete(l){if(!this.has(l))return!1;const c=this[Q];return a(c),i(c),Ye(c),c.copy_.delete(l)||(c.drafts_.has(l)?c.copy_.delete(c.drafts_.get(l)):!1)}clear(){const l=this[Q];a(l),ue(l).size&&(i(l),Ye(l),l.copy_.clear())}values(){const l=this[Q];return a(l),i(l),l.copy_.values()}entries(){const l=this[Q];return a(l),i(l),l.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(l,c){const u=this.values();let d=u.next();for(;!d.done;)l.call(c,d.value,d.value,this),d=u.next()}}function o(s,l){return new n(s,l)}function i(s){s.copy_||(s.copy_=new Set,s.base_.forEach(l=>{if(Ze(l)){const c=_r(l,s);s.drafts_.set(l,c),s.copy_.add(c)}else s.copy_.add(l)}))}function a(s){s.revoked_&&be(3,JSON.stringify(ue(s)))}Ap("MapSet",{proxyMap_:r,proxySet_:o})}var Np=new _p,kp=Np.produce;const Lp=e=>(r,t,n)=>(n.setState=(o,i,...a)=>{const s=typeof o=="function"?kp(o):o;return r(s,i,...a)},e(n.setState,t,n)),zn=Lp;var Te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vp(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t}var Bp=function e(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var n,o,i;if(Array.isArray(r)){if(n=r.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!e(r[o],t[o]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if(i=Object.keys(r),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!(a==="_owner"&&r.$$typeof)&&!e(r[a],t[a]))return!1}return!0}return r!==r&&t!==t};const ii=qn(Bp),xt=new Map;function jp(e,r){return xt.has(e)||xt.set(e,new Set),xt.get(e).add(r),()=>{var t;(t=xt.get(e))==null||t.delete(r)}}function Ni(e){const r=xt.get(e);r&&r.forEach(t=>{try{t()}catch(n){console.error(`Error in store event callback for '${e}':`,n)}})}function $p(e){e?xt.delete(e):xt.clear()}const et={subscribe:jp,emit:Ni,clear:$p},Up=()=>Ni("dashboard:load"),zp=()=>Ni("dashboard:unload"),rs={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Or=new Map,rn=e=>{const r=Or.get(e);return r?Object.fromEntries(Object.entries(r.stores).map(([t,n])=>[t,n.getState()])):{}},qp=(e,r,t)=>{if(e===void 0)return{type:"untracked",connection:r.connect(t)};const n=Or.get(t.name);if(n)return{type:"tracked",store:e,...n};const o={connection:r.connect(t),stores:{}};return Or.set(t.name,o),{type:"tracked",store:e,...o}},Hp=(e,r)=>{if(r===void 0)return;const t=Or.get(e);t&&(delete t.stores[r],Object.keys(t.stores).length===0&&Or.delete(e))},Wp=e=>{var r,t;if(!e)return;const n=e.split(`
2
2
  `),o=n.findIndex(a=>a.includes("api.setState"));if(o<0)return;const i=((r=n[o+1])==null?void 0:r.trim())||"";return(t=/.+ (.+) .+/.exec(i))==null?void 0:t[1]},Gp=(e,r={})=>(t,n,o)=>{const{enabled:i,anonymousActionType:a,store:s,...l}=r;let c;try{c=(i??(rs?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(t,n,o);const{connection:u,...d}=qp(s,c,l);let p=!0;o.setState=(m,b,S)=>{const g=t(m,b);if(!p)return g;const y=S===void 0?{type:a||Wp(new Error().stack)||"anonymous"}:typeof S=="string"?{type:S}:S;return s===void 0?(u==null||u.send(y,n()),g):(u==null||u.send({...y,type:`${s}/${y.type}`},{...rn(l.name),[s]:o.getState()}),g)},o.devtools={cleanup:()=>{u&&typeof u.unsubscribe=="function"&&u.unsubscribe(),Hp(l.name,s)}};const h=(...m)=>{const b=p;p=!1,t(...m),p=b},v=e(o.setState,n,o);if(d.type==="untracked"?u==null||u.init(v):(d.stores[d.store]=o,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([m,b])=>[m,m===d.store?v:b.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let m=!1;const b=o.dispatch;o.dispatch=(...S)=>{(rs?"production":void 0)!=="production"&&S[0].type==="__setState"&&!m&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),m=!0),b(...S)}}return u.subscribe(m=>{var b;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ao(m.payload,S=>{if(S.type==="__setState"){if(s===void 0){h(S.state);return}Object.keys(S.state).length!==1&&console.error(`
3
3
  [zustand devtools middleware] Unsupported __setState action format.
4
4
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
@@ -2,7 +2,7 @@ import { j as di, c as Be, C as Bs } from "./x-CXDkqdur.js";
2
2
  import { jsx as x, jsxs as be, Fragment as Dr } from "react/jsx-runtime";
3
3
  import * as f from "react";
4
4
  import Ce, { createContext as Qu, useContext as Ju, useLayoutEffect as ef, useState as tf, useMemo as rf, useId as nf } from "react";
5
- import "./analyze-result-contract-DPjm6btg.js";
5
+ import "./analyze-result-contract-B0O3oIYu.js";
6
6
  import * as An from "react-dom";
7
7
  import of from "react-dom";
8
8
  import { S as af, b as ua, c as $s, d as sf, e as lf, r as cf } from "./index-CJdxSyQq.js";
@@ -0,0 +1,3 @@
1
+ "use strict";const D=require("./analyze-result-contract-CL97m8X8.js"),S=require("../data-app-sdk-adapters/index.cjs"),re=D.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION,H=D.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION,T="semaphor-generated-data-app-contract/v1",F="semaphor-generated-data-app-contract-manifest/v1";function K(e){return R(e)?[...D.validateSemaphorDataAppCodegenSummary(e).issues,...ae(e)]:["Plan artifact must be a Semaphor codegenSummary object."]}function ne(e){const t=K(e);if(t.length>0)throw new Error(`Invalid Semaphor codegenSummary:
2
+ - ${t.join(`
3
+ - `)}`)}function ae(e){var r;const t=R(e);if(!t)return[];const n=[];return((r=R(t.validation))==null?void 0:r.status)==="blocked"&&n.push("validation.status blocked cannot be generated. Resolve blocked semantic model gaps and replan before generating contract files."),Array.isArray(t.unsupportedInsights)&&t.unsupportedInsights.forEach((s,o)=>{var a;((a=R(s))==null?void 0:a.reason)==="missing_relationship"&&n.push(`unsupportedInsights.${o}.reason missing_relationship blocks contract generation. Call semaphor_propose_semantic_model_change, apply an approved semantic model patch, and replan before generating contract files.`)}),Array.isArray(t.views)&&t.views.forEach((s,o)=>{var i;const a=R((i=R(s))==null?void 0:i.computation);(a==null?void 0:a.kind)==="unsupported"&&a.reason==="missing_relationship"&&n.push(`views.${o}.computation.reason missing_relationship blocks contract generation. Call semaphor_propose_semantic_model_change, apply an approved semantic model patch, and replan before generating contract files.`)}),n}function R(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}const J=["sources.ts","fields.ts","inputs.ts","queries.ts","bindings.ts","accessors.ts","metadata.ts","index.ts"],Y=[...J,"contract.manifest.json"];async function se({manifest:e,generatedFiles:t}){const n=[],r=y(e);if(!r)return{issues:[{message:"Generated contract manifest must be an object.",repairHint:"Regenerate the generated contract instead of hand-editing the manifest."}]};r.schemaVersion!==F&&n.push({path:"schemaVersion",message:`schemaVersion must be ${F}. Regenerate the contract with semaphor_create_data_app_contract.`,repairHint:"Regenerate the contract with semaphor_create_data_app_contract."}),r.generatedContractSchemaVersion!==T&&n.push({path:"generatedContractSchemaVersion",message:`generatedContractSchemaVersion must be ${T}. Regenerate the contract with semaphor_generate_data_app_contract.`,repairHint:"Regenerate the contract with semaphor_generate_data_app_contract."});const s=y(r.generator);A(s==null?void 0:s.name)||n.push({path:"generator.name",message:"generator.name is required.",repairHint:"Regenerate the generated contract so manifest generator metadata is written deterministically."}),A(s==null?void 0:s.version)||n.push({path:"generator.version",message:"generator.version is required.",repairHint:"Regenerate the generated contract so manifest generator metadata is written deterministically."});for(const a of K(r.codegenSummary))n.push({path:`codegenSummary.${a}`,message:`codegenSummary.${a}`,repairHint:"Regenerate the generated contract from a valid Data App codegenSummary."});if(r.codegenSummaryValidatorVersion!==H&&n.push({path:"codegenSummaryValidatorVersion",message:`codegenSummaryValidatorVersion must be ${H}. Regenerate the contract with semaphor_generate_data_app_contract.`,repairHint:"Regenerate the contract with semaphor_generate_data_app_contract."}),typeof r.codegenSummaryHash!="string")n.push({path:"codegenSummaryHash",message:"codegenSummaryHash is required.",repairHint:"Regenerate the generated contract so manifest hashes are written deterministically."});else if(y(r.codegenSummary)){const a=await de(r.codegenSummary);r.codegenSummaryHash!==a&&n.push({path:"codegenSummaryHash",message:"codegenSummaryHash does not match codegenSummary. Regenerate the contract instead of editing the manifest.",repairHint:"Regenerate the generated contract instead of editing the manifest."})}n.push(...oe(r.codegenSummary));const o=t?ie(t):[];if(n.push(...o),typeof r.generatedContentHash!="string")n.push({path:"generatedContentHash",message:"generatedContentHash is required.",repairHint:"Regenerate the generated contract so manifest hashes are written deterministically."});else if(t&&o.length===0){const a=await ce(t);r.generatedContentHash!==a&&n.push({path:"generatedContentHash",message:"generatedContentHash does not match generated TypeScript files. Regenerate the contract instead of hand-editing generated files.",repairHint:"Regenerate the contract instead of hand-editing generated files."})}return{issues:n}}function ie(e){var r;const t=[],n=new Set(Y);for(const s of Object.keys(e)){if(s.includes("/")||s.includes("\\")){const o=((r=s.split("/").pop())==null?void 0:r.split("\\").pop())||s;t.push({path:`generatedFiles.${s}`,message:`generatedFiles keys must be generated filenames such as "${o}", not path-qualified keys such as "${s}".`,repairHint:'Pass generatedFiles keyed by filename, for example "queries.ts", not "src/semaphor/generated/queries.ts".'});continue}n.has(s)||t.push({path:`generatedFiles.${s}`,message:`generatedFiles contains unknown generated contract file "${s}".`,repairHint:"Pass only the generated files returned by semaphor_generate_data_app_contract, keyed by filename."})}return t}function oe(e){const t=y(e);if(!t)return[];const n=[],r=new Set(V(t.inputs).map(o=>{var a;return(a=y(o))==null?void 0:a.id}).filter(A)),s=new Set(V(t.views).map(o=>{var a;return(a=y(o))==null?void 0:a.id}).filter(A));return V(t.filterContracts).forEach((o,a)=>{const i=y(o),c=i==null?void 0:i.inputId;(!A(c)||!r.has(c))&&n.push({path:`codegenSummary.filterContracts.${a}.inputId`,message:`codegenSummary.filterContracts.${a}.inputId must reference a generated input.`,repairHint:"Regenerate the generated contract from a valid planner output."}),Array.isArray(i==null?void 0:i.bindings)&&i.bindings.forEach((u,f)=>{const p=y(u),m=p==null?void 0:p.viewId;(!A(m)||!s.has(m))&&n.push({path:`codegenSummary.filterContracts.${a}.bindings.${f}.viewId`,message:`codegenSummary.filterContracts.${a}.bindings.${f}.viewId must reference a generated view.`,repairHint:"Regenerate the generated contract from a valid planner output."});const h=y(p==null?void 0:p.fieldRef);A(h==null?void 0:h.name)||n.push({path:`codegenSummary.filterContracts.${a}.bindings.${f}.fieldRef`,message:`codegenSummary.filterContracts.${a}.bindings.${f}.fieldRef is required.`,repairHint:"Regenerate the generated contract from a valid planner output."})})}),n}async function ce(e){const t=Object.keys(e).filter(r=>r.endsWith(".ts")).sort();let n="";for(const r of t)n+=`${r}\0${e[r]}\0`;return`sha256:${await Q(n)}`}async function de(e){return`sha256:${await Q(k(e))}`}function k(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>k(r)).join(",")}]`;const t=e;return`{${Object.keys(t).sort().filter(r=>t[r]!==void 0).map(r=>`${JSON.stringify(r)}:${k(t[r])}`).join(",")}}`}async function Q(e){var r;if(!((r=globalThis.crypto)!=null&&r.subtle))throw new Error("SHA-256 digest support is required for generated contract validation.");const t=new TextEncoder().encode(e),n=await globalThis.crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(s=>s.toString(16).padStart(2,"0")).join("")}function y(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function V(e){return Array.isArray(e)?e:[]}function A(e){return typeof e=="string"&&e.length>0}function ue(e){const t=d(e),n=C(t),r=[],s=[];return I(t==null?void 0:t.views).filter(o=>{var i;const a=d((i=d(o))==null?void 0:i.sdkSpec);return!!(a!=null&&a.builder&&(a!=null&&a.spec))}).forEach((o,a)=>{var u;const i=String(((u=d(o))==null?void 0:u.id)||`view_${a}`),c=W(o,n);if(c){r.push({viewId:i,...c});return}s.push({viewId:i,path:`views.${i}.sdkSpec`,message:`Generated view execution validation could not build intent for "${i}".`})}),{requests:r,issues:s}}function W(e,t){const n=d(e),r=d(n==null?void 0:n.sdkSpec),s=d(r==null?void 0:r.spec);if(!n||!(r!=null&&r.builder)||!s)return null;const o=ge(t)?t:C(d(t)),a=Ve(r.builder),i=d(w(s,o))||{},c=me({view:n,builder:a,rawSpec:s,spec:{...i,id:n.id,label:Oe(n,s)},context:o});try{if(a==="analysis"){const u=c;return{intent:S.toSemaphorAnalysisIntent(u),resultShape:"analysis",analysisOptions:S.toSemaphorAnalysisQueryOptions(u)}}if(a==="metric")return{intent:S.toSemaphorMetricIntent(c),resultShape:"metric"};if(a==="records")return{intent:S.toSemaphorRecordsIntent(c),resultShape:"records"};if(a==="matrix")return{intent:S.toSemaphorMatrixIntent(c),resultShape:"matrix"};if(a==="sql")return{intent:S.toSemaphorSqlIntent(c),resultShape:"sql"}}catch{return null}return null}function fe({input:e,filterContract:t,codegenSummary:n}){const r=d(e),s=d(t),o=d(r==null?void 0:r.optionQuery)||d(s==null?void 0:s.optionQuery);if(!r||!o)return null;const a=C(d(n)),i=d(o.spec),c=le(o,i,a),u=o.valueFieldRef||o.valueField||(i==null?void 0:i.valueField),f=o.labelFieldRef||o.labelField||(i==null?void 0:i.labelField);if(!c||!u||!f)return null;const m={...d(w(i||{},a))||{},id:o.id||(i==null?void 0:i.id)||`${r.id}-options`,inputId:r.id,source:c,valueField:u,labelField:f,population:o.population||(i==null?void 0:i.population),dependencies:o.dependencies||(i==null?void 0:i.dependencies),limit:o.limit||(i==null?void 0:i.limit)||100};try{return S.toSemaphorInputOptionsIntent(w(m,a))}catch{return null}}function pe({input:e,filterContract:t,binding:n,option:r,codegenSummary:s}){const o=C(d(s)),a=d(e),i=d(t),c=d(n),u=w((c==null?void 0:c.fieldRef)||(i==null?void 0:i.fieldRef)||(a==null?void 0:a.fieldRef),o),f=String((i==null?void 0:i.operator)||(a==null?void 0:a.operator)||"in"),p=Ne(c);return{inputId:String((i==null?void 0:i.inputId)||(a==null?void 0:a.id)||""),kind:"filter",operator:f,value:be(f,r.value),isActive:!0,...u?{field:u}:{},...p?{relationshipHint:p}:{}}}function C(e){return{sourcesByKey:new Map(I(e==null?void 0:e.sources).map(d).filter(ke).filter(t=>typeof t.sourceKey=="string").map(t=>[String(t.sourceKey),Z(t)]))}}function ge(e){var t;return e instanceof Object&&((t=d(e))==null?void 0:t.sourcesByKey)instanceof Map}function le(e,t,n){if(typeof e.sourceKey=="string")return n.sourcesByKey.get(e.sourceKey)||{sourceKey:e.sourceKey};if(e.source)return e.source;if(t!=null&&t.source)return t.source;if(typeof(t==null?void 0:t.sourceKey)=="string")return n.sourcesByKey.get(t.sourceKey)||{sourceKey:t.sourceKey}}function me({view:e,builder:t,rawSpec:n,spec:r,context:s}){var i;if(t!=="records"&&t!=="sql")return r;const o=d((i=d(e.visualSpec))==null?void 0:i.tableBehavior);if(!o)return r;const a={...r};if($e(o)==="server"&&(a.pagination={page:1,pageSize:he({tableBehavior:o,spec:r})}),t==="records"&&Ce(o)==="server"){const c=ye({view:e,rawSpec:n,tableBehavior:o,context:s});c&&(a.orderBy=c)}return a}function he({tableBehavior:e,spec:t}){const n=d(e.pagination),r=d(t.pagination);return N(n==null?void 0:n.pageSize)||N(r==null?void 0:r.pageSize)||N(t.limit)||100}function ye({view:e,rawSpec:t,tableBehavior:n,context:r}){const s=d(n.sorting),o=g(s==null?void 0:s.defaultField);if(!o)return;const i=Se({view:e,rawSpec:t,context:r}).filter(c=>Ae(c.lookup).includes(o));if(i.length===1)return{field:i[0].field,direction:(s==null?void 0:s.defaultDirection)==="desc"?"desc":"asc"}}function Se({view:e,rawSpec:t,context:n}){var s;const r=[];for(const o of I(t.fields))v(r,o,n);v(r,t.dateField,n),v(r,(s=d(t.orderBy))==null?void 0:s.field,n);for(const o of I(e.fields))v(r,o,n);return He(r,o=>_e(o.lookup))}function v(e,t,n){const r=d(t);if(typeof(r==null?void 0:r.name)!="string"||r.name.length===0)return;const s=d(w(r,n))||r;e.push({lookup:r,field:s})}function Ae(e){return Te([g(e.name),X(e),Re(e)])}function _e(e){return[X(e),g(e.name),g(e.role),g(e.aggregate)].join("|")}function X(e){return[g(e.sourceKey)||we(e.source),g(e.name),g(e.aggregate)].filter(Boolean).join(":")}function we(e){const t=d(e);if(!t)return"";if(typeof t.kind=="string"&&typeof t.domainId=="string"){if(typeof t.datasetId=="string")return`${t.kind}:${t.domainId}:datasetId:${t.datasetId}`;if(typeof t.datasetName=="string")return`${t.kind}:${t.domainId}:datasetName:${t.datasetName}`}return JSON.stringify(t)}function Re(e){return Fe([Ee(e),g(e.aggregate).toLowerCase(),g(e.label)||g(e.name)].filter(Boolean))}function Ee(e){return typeof e.sourceKey=="string"?ve(e.sourceKey):Ie(e.source)}function Ie(e){const t=d(e);return t?g(t.datasetName)||g(t.datasetId)||g(t.name)||g(t.kind):""}function ve(e){const t=String(e).split(":");return t[t.length-1]||String(e)}function $e(e){var t;return g((t=d(e.pagination))==null?void 0:t.mode)}function Ce(e){var t;return g((t=d(e.sorting))==null?void 0:t.mode)}function w(e,t){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(s=>w(s,t));const n=e;if(typeof n.sourceKey=="string"&&typeof n.kind=="string"&&(typeof n.datasetName=="string"||typeof n.datasetId=="string"))return Z(n);const r={};for(const[s,o]of Object.entries(n))s!=="sourceKey"&&(r[s]=w(o,t));if(typeof n.sourceKey=="string"){const s=t.sourcesByKey.get(n.sourceKey);s&&!r.source&&(r.source=s)}return r}function Z(e){const{sourceKey:t,...n}=e;return n}function Oe(e,t){const n=d(e.visualSpec);return(n==null?void 0:n.title)||e.title||t.label}function Ve(e){const t=String(e||"").replace(/^semaphor\./,"");return["metric","records","analysis","matrix","sql"].includes(t)?t:""}function Ne(e){if(e!=null&&e.relationshipHint)return e.relationshipHint;const t=I(e==null?void 0:e.relationshipsUsed).map(n=>{var r;return(r=d(n))==null?void 0:r.id}).filter(n=>typeof n=="string"&&n.length>0);return t.length>0?{relationshipIds:t}:void 0}function be(e,t){return e==="in"||e==="not_in"?[t]:e==="between"?Array.isArray(t)?t:[t,t]:t}function N(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function g(e){return typeof e=="string"?e:""}function He(e,t){const n=new Set,r=[];for(const s of e){const o=t(s);!o||n.has(o)||(n.add(o),r.push(s))}return r}function Te(e){return Array.from(new Set(e.filter(Boolean)))}function Fe(e){return(Array.isArray(e)?e.join(" "):e).replace(/[^a-zA-Z0-9]+/g," ").trim().split(/\s+/).filter(Boolean).map((n,r)=>{const s=n.toLowerCase();return r===0?s:s.charAt(0).toUpperCase()+s.slice(1)}).join("")}function d(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function I(e){return Array.isArray(e)?e:[]}function ke(e){return e!==void 0}const Me=new Set(["diagnostic_fix","fix_diagnostics","fix_inspector_warnings","fix_runtime_warnings","fix_warnings"]),q=new Set(["fields","sdkSpec"]);function Ge({beforeSummary:e,afterSummary:t,migrationReport:n,operationIntent:r,constraints:s,preferences:o}){const a=l(r),i=typeof(a==null?void 0:a.kind)=="string"?a.kind.trim():"add";return B(o)?{ok:!1,policy:{kind:i,mode:"invalid_update_constraints",reason:"Metric aggregate override updates must use operationIntent.measureAggregateOverrides so deterministic update policy can guard the targeted edit."},violations:[{path:"preferences.measureAggregateOverrides",reason:"preferences is retired. Move measureAggregateOverrides to operationIntent.measureAggregateOverrides for update calls."}]}:B(s)?{ok:!1,policy:{kind:i,mode:"invalid_update_constraints",reason:"Metric aggregate override updates must use operationIntent.measureAggregateOverrides so deterministic update policy can guard the targeted edit."},violations:[{path:"constraints.measureAggregateOverrides",reason:"Move measureAggregateOverrides to operationIntent.measureAggregateOverrides for update calls."}]}:Me.has(i)?P({beforeSummary:e,afterSummary:t,migrationReport:n,operationIntent:a,mode:"diagnostic_warning_fix",allowedViewChangeReasons:q,label:"Diagnostic warning fixes",reason:"Diagnostic warning fixes are preserve-by-default and may not add/remove views, inputs, or filter contracts."}):i==="edit"&&Array.isArray(a==null?void 0:a.measureAggregateOverrides)&&a.measureAggregateOverrides.length>0?P({beforeSummary:e,afterSummary:t,migrationReport:n,operationIntent:a,mode:"metric_aggregate_override_edit",allowedViewChangeReasons:q,label:"Metric aggregate override edits",reason:"Metric aggregate override edits are preserve-by-default and may only adjust fields/sdkSpec on targeted views."}):{ok:!0,policy:{kind:i,mode:"general_iterative_update",reason:"General generated-contract edits are allowed to change the requested contract shape. Review the migration report for expected UI work."},violations:[]}}function B(e){var t;return Array.isArray((t=l(e))==null?void 0:t.measureAggregateOverrides)}function P({beforeSummary:e,afterSummary:t,migrationReport:n,operationIntent:r,mode:s,allowedViewChangeReasons:o,label:a,reason:i}){const c=[],u=Ke(r==null?void 0:r.targetViewIds),f=l(n)||{};u.size===0&&c.push({path:"operationIntent.targetViewIds",reason:`${a} must declare targetViewIds so the update cannot broaden to unrelated views.`}),b({bucket:l(f.views),label:"views",operationLabel:a,violations:c}),b({bucket:l(f.inputs),label:"inputs",operationLabel:a,violations:c}),U({bucket:l(f.inputs),label:"inputs",operationLabel:a,violations:c}),b({bucket:l(f.filterContracts),label:"filterContracts",operationLabel:a,violations:c}),U({bucket:l(f.filterContracts),label:"filterContracts",operationLabel:a,violations:c});for(const m of ee(l(f.views))){u.size>0&&!u.has(_(m.id))&&c.push({path:`views.${_(m.id)||"<unknown>"}`,reason:`${a} may only change explicitly targeted views.`});const h=Array.isArray(m.reasons)?m.reasons.filter(E=>typeof E!="string"||!o.has(E)):[];h.length>0&&c.push({path:`views.${_(m.id)||"<unknown>"}`,reason:`${a} may only adjust fields/sdkSpec; changed ${h.join(", ")}.`})}const p=De({beforeSummary:e,afterSummary:t,targetViewIds:u,label:a});return p&&c.push(p),{ok:c.length===0,policy:{kind:_(r==null?void 0:r.kind)||"diagnostic_fix",mode:s,allowedViewChangeReasons:Array.from(o).sort(),targetViewIds:Array.from(u).sort(),reason:i},violations:c}}function De({beforeSummary:e,afterSummary:t,targetViewIds:n,label:r}){const s=l(e),o=l(t);if(!s||!o)return{path:"codegenSummary",reason:`${r} require before/after codegen summaries for full-scope verification.`};const a=L(s),i=L(o),c=z(s.views),u=z(o.views),f=Array.isArray(a.views)?a.views:[];a.views=f;for(const p of n){const m=c.get(p),h=u.get(p);if(!m||!h)continue;const E=f.find(te=>{var j;return((j=l(te))==null?void 0:j.id)===p}),O=l(h);if(!E||!O)continue;const x=E;x.fields=G(O.fields),x.sdkSpec=G(O.sdkSpec)}return $(a)===$(i)?null:{path:"codegenSummary",reason:`${r} may only change fields/sdkSpec on targetViewIds; another generated contract section changed.`}}function L(e){const t=G(e);for(const n of["implementationChecklist","assumptions","nextStep","nextRequiredTool","validation"])delete t[n];return je(t.unsupportedInsights)&&delete t.unsupportedInsights,t}function b({bucket:e,label:t,operationLabel:n,violations:r}){for(const s of M(e==null?void 0:e.added))r.push({path:`${t}.${_(s.id)||"<unknown>"}`,reason:`${n} may not add ${t}.`});for(const s of M(e==null?void 0:e.removed))r.push({path:`${t}.${_(s.id)||"<unknown>"}`,reason:`${n} may not remove ${t}.`})}function U({bucket:e,label:t,operationLabel:n,violations:r}){for(const s of ee(e))r.push({path:`${t}.${_(s.id)||"<unknown>"}`,reason:`${n} may not change ${t}.`})}function ee(e){return M(e==null?void 0:e.changed)}function M(e){return Array.isArray(e)?e.map(l).filter(xe):[]}function Ke(e){return Array.isArray(e)?new Set(e.filter(t=>typeof t=="string"&&t.trim().length>0).map(t=>t.trim())):new Set}function z(e){var n;const t=new Map;for(const r of Array.isArray(e)?e:[]){const s=(n=l(r))==null?void 0:n.id;typeof s=="string"&&s.trim()&&t.set(s,r)}return t}function G(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function $(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(n=>$(n)).join(",")}]`;const t=e;return`{${Object.keys(t).sort().filter(n=>t[n]!==void 0).map(n=>`${JSON.stringify(n)}:${$(t[n])}`).join(",")}}`}function l(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function xe(e){return e!==void 0}function je(e){return Array.isArray(e)&&e.length===0}function _(e){return typeof e=="string"?e:""}exports.CODEGEN_SUMMARY_SCHEMA_VERSION=re;exports.CODEGEN_SUMMARY_VALIDATOR_VERSION=H;exports.CONTRACT_MANIFEST_SCHEMA_VERSION=F;exports.GENERATED_CONTRACT_SCHEMA_VERSION=T;exports.GENERATED_CONTRACT_TYPESCRIPT_FILES=J;exports.REQUIRED_GENERATED_CONTRACT_FILES=Y;exports.assertValidCodegenSummary=ne;exports.buildSemaphorGeneratedActiveInput=pe;exports.buildSemaphorGeneratedInputOptionIntent=fe;exports.buildSemaphorGeneratedViewExecutionRequest=W;exports.buildSemaphorGeneratedViewExecutionRequests=ue;exports.evaluateSemaphorDataAppContractUpdatePolicy=Ge;exports.validateCodegenSummary=K;exports.validateSemaphorGeneratedContract=se;