@vertesia/fusion-ux 1.0.0 → 1.1.0

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.
@@ -9,14 +9,6 @@ export function ChartRenderer({ chart, data, className }) {
9
9
  const context = useFusionFragmentContextSafe();
10
10
  const ChartComponent = context?.ChartComponent;
11
11
  const artifactRunId = context?.artifactRunId;
12
- // Debug logging
13
- console.log('[ChartRenderer] Context:', {
14
- hasContext: !!context,
15
- hasChartComponent: !!ChartComponent,
16
- artifactRunId,
17
- chartTitle: chart.title,
18
- dataKey: chart.dataKey,
19
- });
20
12
  // Resolve data from context if dataKey is provided
21
13
  const resolvedSpec = { ...chart.spec };
22
14
  if (chart.dataKey && data[chart.dataKey]) {
@@ -1 +1 @@
1
- {"version":3,"file":"ChartRenderer.js","sourceRoot":"","sources":["../../../src/fusion-fragment/ChartRenderer.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAW1E;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,KAAK,EACL,IAAI,EACJ,SAAS,EACU;IACnB,MAAM,OAAO,GAAG,4BAA4B,EAAE,CAAC;IAC/C,MAAM,cAAc,GAAG,OAAO,EAAE,cAAc,CAAC;IAC/C,MAAM,aAAa,GAAG,OAAO,EAAE,aAAa,CAAC;IAE7C,gBAAgB;IAChB,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE;QACtC,UAAU,EAAE,CAAC,CAAC,OAAO;QACrB,iBAAiB,EAAE,CAAC,CAAC,cAAc;QACnC,aAAa;QACb,UAAU,EAAE,KAAK,CAAC,KAAK;QACvB,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC,CAAC;IAEH,mDAAmD;IACnD,MAAM,YAAY,GAAG,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAEvC,IAAI,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC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KAAK,EAAE,yBAAyB;iBACjC,YAEA,KAAK,CAAC,KAAK,GACR,CACP,EACA,KAAK,CAAC,WAAW,IAAI,CACpB,cACE,KAAK,EAAE;oBACL,QAAQ,EAAE,MAAM;oBAChB,KAAK,EAAE,yBAAyB;oBAChC,YAAY,EAAE,MAAM;iBACrB,YAEA,KAAK,CAAC,WAAW,GACd,CACP,EACD,cACE,KAAK,EAAE;oBACL,OAAO,EAAE,MAAM;oBACf,UAAU,EAAE,QAAQ;oBACpB,cAAc,EAAE,QAAQ;oBACxB,MAAM,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC,GAAG,EAAE;oBAClC,eAAe,EAAE,wBAAwB;oBACzC,YAAY,EAAE,KAAK;oBACnB,KAAK,EAAE,yBAAyB;oBAChC,QAAQ,EAAE,MAAM;iBACjB,oBACe,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,YAExC,eAAK,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,aACjC,eAAK,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,wBACzB,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,YAAY,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,IAChI,EACL,YAAY,CAAC,IAAI,EAAE,MAAM,IAAI,CAC5B,eAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,aAC3C,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,oBAC5B,CACP,IACG,GACF,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -23,13 +23,6 @@ const FusionFragmentContext = createContext(null);
23
23
  */
24
24
  export function FusionFragmentProvider({ data, onUpdate, sendMessage, ChartComponent, artifactRunId, children }) {
25
25
  const value = useMemo(() => ({ data, onUpdate, sendMessage, ChartComponent, artifactRunId }), [data, onUpdate, sendMessage, ChartComponent, artifactRunId]);
26
- // Debug logging
27
- console.log('[FusionFragmentProvider] Created with:', {
28
- hasData: !!data,
29
- dataKeys: data ? Object.keys(data) : [],
30
- hasChartComponent: !!ChartComponent,
31
- artifactRunId,
32
- });
33
26
  return (_jsx(FusionFragmentContext.Provider, { value: value, children: children }));
34
27
  }
35
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"FusionFragmentContext.js","sourceRoot":"","sources":["../../../src/fusion-fragment/FusionFragmentContext.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAqC,MAAM,OAAO,CAAC;AAG9F,MAAM,qBAAqB,GAAG,aAAa,CAAoC,IAAI,CAAC,CAAC;AAiBrF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,sBAAsB,CAAC,EACrC,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,cAAc,EACd,aAAa,EACb,QAAQ,EACoB;IAC5B,MAAM,KAAK,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC,EACtE,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,CAAC,CAC7D,CAAC;IAEF,gBAAgB;IAChB,OAAO,CAAC,GAAG,CAAC,wCAAwC,EAAE;QACpD,OAAO,EAAE,CAAC,CAAC,IAAI;QACf,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;QACvC,iBAAiB,EAAE,CAAC,CAAC,cAAc;QACnC,aAAa;KACd,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACzC,QAAQ,GACsB,CAClC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB;IACtC,MAAM,OAAO,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAElD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,uEAAuE,CACxE,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,4BAA4B;IAC1C,OAAO,UAAU,CAAC,qBAAqB,CAAC,CAAC;AAC3C,CAAC"}
1
+ {"version":3,"file":"FusionFragmentContext.js","sourceRoot":"","sources":["../../../src/fusion-fragment/FusionFragmentContext.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAqC,MAAM,OAAO,CAAC;AAG9F,MAAM,qBAAqB,GAAG,aAAa,CAAoC,IAAI,CAAC,CAAC;AAiBrF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,sBAAsB,CAAC,EACrC,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,cAAc,EACd,aAAa,EACb,QAAQ,EACoB;IAC5B,MAAM,KAAK,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC,EACtE,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,CAAC,CAC7D,CAAC;IAEF,OAAO,CACL,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACzC,QAAQ,GACsB,CAClC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB;IACtC,MAAM,OAAO,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAElD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,uEAAuE,CACxE,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,4BAA4B;IAC1C,OAAO,UAAU,CAAC,qBAAqB,CAAC,CAAC;AAC3C,CAAC"}
@@ -95,7 +95,6 @@ export function SectionRenderer({ section, data, onUpdate, agentMode, }) {
95
95
  const layout = section.layout || 'grid-3';
96
96
  const isTable = layout === 'table';
97
97
  const isChart = layout === 'chart';
98
- const layoutStyle = isTable || isChart ? {} : gridLayouts[layout];
99
98
  const isCollapsible = section.collapsed !== undefined;
100
99
  // Get table rows from data
101
100
  const tableRows = useMemo(() => {
@@ -110,9 +109,9 @@ export function SectionRenderer({ section, data, onUpdate, agentMode, }) {
110
109
  }), [isCollapsible]);
111
110
  const contentStyle = useMemo(() => ({
112
111
  ...styles.content,
113
- ...layoutStyle,
112
+ ...(isTable || isChart ? {} : gridLayouts[layout]),
114
113
  ...(isCollapsed ? styles.contentCollapsed : styles.contentExpanded),
115
- }), [isCollapsed, layoutStyle]);
114
+ }), [isCollapsed, isTable, isChart, layout]);
116
115
  const handleHeaderClick = () => {
117
116
  if (isCollapsible) {
118
117
  setIsCollapsed(!isCollapsed);
@@ -1 +1 @@
1
- {"version":3,"file":"SectionRenderer.js","sourceRoot":"","sources":["../../../src/fusion-fragment/SectionRenderer.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAqB,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,6BAA6B;AAC7B,MAAM,WAAW,GAAG;IAClB,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM;QACf,mBAAmB,EAAE,gBAAgB;QACrC,GAAG,EAAE,MAAM;KACZ;IACD,QAAQ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AC;QAC7D,CAAC;QAED,yBAAyB;QACzB,OAAO,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3C,KAAC,aAAa,IAEZ,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EACtB,QAAQ,EACN,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAE9D,SAAS,EAAE,SAAS,IANf,KAAK,CAAC,GAAG,IAAI,KAAK,CAOvB,CACH,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACL,eAAK,KAAK,EAAE,MAAM,CAAC,OAAO,aACxB,eACE,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,mBAC3B,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,aAEtD,aAAa,IAAI,KAAC,WAAW,IAAC,SAAS,EAAE,WAAW,GAAI,EACzD,eAAM,KAAK,EAAE,MAAM,CAAC,KAAK,YAAG,OAAO,CAAC,KAAK,GAAQ,IAC7C,EAEN,cAAK,KAAK,EAAE,YAAY,YACrB,aAAa,EAAE,GACZ,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@types+react@19.2.3/node_modules/@types/react/global.d.ts","../../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@types+react@19.2.3/node_modules/@types/react/index.d.ts","../../../node_modules/.pnpm/@types+react@19.2.3/node_modules/@types/react/jsx-runtime.d.ts","../src/types.ts","../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/types/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/errors.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/types/json-schema.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/types/jtd-schema.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/types/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.d.ts","../src/validation/schemas.ts","../src/validation/fuzzyMatch.ts","../src/validation/validateTemplate.ts","../src/fusion-fragment/FieldRenderer.tsx","../src/fusion-fragment/TableRenderer.tsx","../src/fusion-fragment/FusionFragmentContext.tsx","../src/fusion-fragment/ChartRenderer.tsx","../src/fusion-fragment/SectionRenderer.tsx","../src/fusion-fragment/FusionFragmentRenderer.tsx","../src/fusion-fragment/FusionFragmentHandler.tsx","../src/fusion-fragment/index.ts","../src/validation/formatErrors.ts","../src/validation/index.ts","../src/render/textPreview.ts","../src/render/index.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/index.d.ts"],"fileIdsList":[[142,188,189,191,208,209],[142,190,191,208,209],[191,208,209],[142,191,196,208,209,226],[142,191,192,197,202,208,209,211,223,234],[142,191,192,193,202,208,209,211],[142,191,208,209],[137,138,139,142,191,208,209],[142,191,194,208,209,235],[142,191,195,196,203,208,209,212],[142,191,196,208,209,223,231],[142,191,197,199,202,208,209,211],[142,190,191,198,208,209],[142,191,199,200,208,209],[142,191,201,202,208,209],[142,190,191,202,208,209],[142,191,202,203,204,208,209,223,234],[142,191,202,203,204,208,209,218,223,226],[142,184,191,199,202,205,208,209,211,223,234],[142,191,202,203,205,206,208,209,211,223,231,234],[142,191,205,207,208,209,223,231,234],[140,141,142,143,144,145,146,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240],[142,191,202,208,209],[142,191,208,209,210,234],[142,191,199,202,208,209,211,223],[142,191,208,209,212],[142,191,208,209,213],[142,190,191,208,209,214],[142,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240],[142,191,208,209,216],[142,191,208,209,217],[142,191,202,208,209,218,219],[142,191,208,209,218,220,235,237],[142,191,203,208,209],[142,191,202,208,209,223,224,226],[142,191,208,209,225,226],[142,191,208,209,223,224],[142,191,208,209,226],[142,191,208,209,227],[142,188,191,208,209,223,228,234],[142,191,202,208,209,229,230],[142,191,208,209,229,230],[142,191,196,208,209,211,223,231],[142,191,208,209,232],[142,191,208,209,211,233],[142,191,205,208,209,217,234],[142,191,196,208,209,235],[142,191,208,209,223,236],[142,191,208,209,210,237],[142,191,208,209,238],[142,184,191,208,209],[142,184,191,202,204,208,209,214,223,226,234,236,237,239],[142,191,208,209,223,240],[71,72,142,191,208,209],[73,142,191,208,209],[79,80,84,111,112,114,115,116,118,119,142,191,208,209],[77,78,142,191,208,209],[77,142,191,208,209],[79,119,142,191,208,209],[79,80,116,117,119,142,191,208,209],[119,142,191,208,209],[76,119,120,142,191,208,209],[79,80,118,119,142,191,208,209],[79,80,82,83,118,119,142,191,208,209],[79,80,81,118,119,142,191,208,209],[79,80,84,111,112,113,114,115,118,119,142,191,208,209],[76,79,80,84,116,118,142,191,208,209],[84,119,142,191,208,209],[86,87,88,89,90,91,92,93,94,95,119,142,191,208,209],[109,119,142,191,208,209],[85,96,104,105,106,107,108,110,142,191,208,209],[89,119,142,191,208,209],[97,98,99,100,101,102,103,119,142,191,208,209],[142,156,160,191,208,209,234],[142,156,191,208,209,223,234],[142,151,191,208,209],[142,153,156,191,208,209,231,234],[142,191,208,209,211,231],[142,191,208,209,241],[142,151,191,208,209,241],[142,153,156,191,208,209,211,234],[142,148,149,152,155,191,202,208,209,223,234],[142,156,163,191,208,209],[142,148,154,191,208,209],[142,156,177,178,191,208,209],[142,152,156,191,208,209,226,234,241],[142,177,191,208,209,241],[142,150,151,191,208,209,241],[142,156,191,208,209],[142,150,151,152,153,154,155,156,157,158,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,178,179,180,181,182,183,191,208,209],[142,156,171,191,208,209],[142,156,163,164,191,208,209],[142,154,156,164,165,191,208,209],[142,155,191,208,209],[142,148,151,156,191,208,209],[142,156,160,164,165,191,208,209],[142,160,191,208,209],[142,154,156,159,191,208,209,234],[142,148,153,156,163,191,208,209],[142,191,208,209,223],[142,151,156,177,191,208,209,239,241],[73,74,75,126,142,191,208,209],[73,74,75,142,191,208,209],[73,74,75,123,126,129,142,191,208,209],[73,74,75,123,128,142,191,208,209],[73,74,75,124,125,127,142,191,208,209],[74,124,125,126,127,128,129,130,142,191,208,209],[74,75,131,133,135,142,191,208,209],[74,134,142,191,208,209],[74,75,142,191,208,209],[73,74,142,191,208,209],[74,142,191,208,209],[74,121,122,123,132,142,191,208,209],[74,75,120,142,191,208,209],[74,75,120,121,122,142,191,208,209]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"170d4db14678c68178ee8a3d5a990d5afb759ecb6ec44dbd885c50f6da6204f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"0ff1b165090b491f5e1407ae680b9a0bc3806dc56827ec85f93c57390491e732","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"cb1b63b488a288119373fc66f93fcda33bd4fa8eba56daca61440b46d6d810b3","signature":"91507f69a5e107d2edbf737d581621a80e19b9a183fae22bcc91563fef879332"},{"version":"84bcc7c6b06f4d643a55dc63b56be0c81d990f8d549b66ea615c553268774dc3","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"4304f640f7cb4724ea82441accb7c7607fa7207541182470d625adda99b2900b","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"beb2ee2ffcdfecc70d705af0bea1dbb2603d09664c82ad1b5ae53ca74612fe19","signature":"883786c56116d939056022c1176c012b593f01464144605481a2f03ab881306f"},{"version":"9728ded03434a2df8f167024ecad79128f6d12de3ad4e59ef6cfe31db1762bd5","signature":"20a4e501d3436462189a3e4c3a8085015c73965a93ffc7f7843674ef98540d68"},{"version":"126501063eb1dd9f4695429923edc3258b62b86a54cd2aa9e230cef260034d19","signature":"36e095fdc72ca976b807afe8fdd70cb40a8039b2e2af235fd1ea2c187c8fcf06"},{"version":"bc7baa07b8e85ce73a4fe2022121f05bbd1723686d2bb930f33d45f84332f518","signature":"49d395a8ce506484d40c01de78fc473e6dc227ae92b96cab9dbf301b260ce769"},{"version":"00f3a6ffe8600d66c6fadb71a6259b47017527a9c6917c24e0d417cc4090eeaa","signature":"bbb977ebfbff18bb81aab629d0de2dc2ad4c2ffe44486c024162dd35b36e2a5b"},{"version":"c76dc6880fad920d2b8e388bd15d390cdcecf01ce2c9bce0875c169e5ba10d59","signature":"4be72b42987b371b1af2103abe093b6ac4642526c6863c2e86472ba696a8da4e"},{"version":"a245fcc0bfcf78e4a2a8a75050a4c656f0ae0ca327eddf0d2e87c7fe72c8c421","signature":"d991e9d40e159f4bb23b06260d6ca154ea585dcbec0db92ed7f0a92bd6f08e73"},{"version":"bbecb18a979ac53b88147fccd9c34794b12a73b8f23c917fc1ac5e8f3349d807","signature":"a6b947a71fba32a1f9ccc1faf6d80e786981e9afecea802019d9799a12225c43"},{"version":"51b65f09ac04342c276ca171808ec22ec43a2993427dfee22860ba8ad066e801","signature":"0d7294c13db934c5c4aaa71fed9b41210b94c9349d9a56d0145fc60afbb9af6e"},{"version":"b5a6820d1136c84c4692d55b26b1d682bdfb6d3ee175c7500494dac31d2c7074","signature":"22578ac4a3f374cb2632d7aa08581e9b4b00d669dade5077ca2eea0cdec03a2c"},{"version":"b6d2c611a7b3e84686cfa0f36d29b892c7d2a7a68fd9b620b52aa0631b38358b","signature":"1f72b050bd014f7d77043c15a7cd11e064a2542487f6e57d77a0c053c3d6f6a2"},{"version":"cb8d591141618a8ff8197981286bf7dc24fa8666e17613dc366057c384e9cc0f","signature":"284b082f22d1395ea1d046c3a38e7c8469495e5c78a8b1896bcc9d32d54f5772"},{"version":"4a01113e03c73c2409cb2d71df8d94a7c12c7d50e6c000cab98bcf3adba095ac","signature":"8e82ed2ef170568936f176f01b97041676148930bab6ab46c10d57a5e1fe1fa9"},{"version":"bdd47a155de9de17e448721bb1148c250ad2f72ca3b1634269670dd01d4d0845","signature":"cb70da7b2ec6d09d6a6c8553b390eb52cfc736bc7de25a882420f9ebd4d420b6"},{"version":"66c0baa10168da566982d61d3aa6b8abb33806e12f39f9c96d206b0ee766b4f5","signature":"ea9183e9cb6ca119bc2d1c3f2bb2f3e4c10247184a5e8af0593a7ea4556d74ad"},{"version":"c6f8e8b1cd697efe7678e413339516e4cc67726e4b121be0a6343aed5f21720a","signature":"f9dbd3907a66aebc4364c4331aa24f58d998b74c40018e407bc73652f3831a5a"},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"f949f7f6c7802a338039cfc2156d1fe285cdd1e092c64437ebe15ae8edc854e0","impliedFormat":1},{"version":"6b4e081d55ac24fc8a4631d5dd77fe249fa25900abd7d046abb87d90e3b45645","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"83e63d6ccf8ec004a3bb6d58b9bb0104f60e002754b1e968024b320730cc5311","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"d2bc7425ef40526650d6db7e072c1ff4a51101c3ac2cc4b666623b19496a6e27","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"f27524f4bef4b6519c604bdb23bf4465bddcccbf3f003abb901acbd0d7404d99","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"6b039f55681caaf111d5eb84d292b9bee9e0131d0db1ad0871eef0964f533c73","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"0dba70b3fb0dcd713fda33c2df64fa6751fff6460e536971cee917260fb17882","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"9f663c2f91127ef7024e8ca4b3b4383ff2770e5f826696005de382282794b127","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1}],"root":[75,[121,136]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declarationDir":"./types","declarationMap":true,"esModuleInterop":true,"jsx":4,"module":99,"noFallthroughCasesInSwitch":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./esm","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":11},"referencedMap":[[188,1],[189,1],[190,2],[142,3],[191,4],[192,5],[193,6],[137,7],[140,8],[138,7],[139,7],[194,9],[195,10],[196,11],[197,12],[198,13],[199,14],[200,14],[201,15],[202,16],[203,17],[204,18],[143,7],[141,7],[205,19],[206,20],[207,21],[241,22],[208,23],[209,7],[210,24],[211,25],[212,26],[213,27],[214,28],[215,29],[216,30],[217,31],[218,32],[219,32],[220,33],[221,7],[222,34],[223,35],[225,36],[224,37],[226,38],[227,39],[228,40],[229,41],[230,42],[231,43],[232,44],[233,45],[234,46],[235,47],[236,48],[237,49],[238,50],[144,7],[145,7],[146,7],[185,51],[186,7],[187,7],[239,52],[240,53],[71,7],[73,54],[74,55],[120,56],[77,7],[79,57],[78,58],[83,59],[118,60],[115,61],[117,62],[80,61],[81,63],[85,63],[84,64],[82,65],[116,66],[114,61],[119,67],[112,7],[113,7],[86,68],[91,61],[93,61],[88,61],[89,68],[95,61],[96,69],[87,61],[92,61],[94,61],[90,61],[110,70],[109,61],[111,71],[105,61],[107,61],[106,61],[102,61],[108,72],[103,61],[104,73],[97,61],[98,61],[99,61],[100,61],[101,61],[147,7],[72,7],[76,7],[69,7],[70,7],[12,7],[14,7],[13,7],[2,7],[15,7],[16,7],[17,7],[18,7],[19,7],[20,7],[21,7],[22,7],[3,7],[23,7],[24,7],[4,7],[25,7],[29,7],[26,7],[27,7],[28,7],[30,7],[31,7],[32,7],[5,7],[33,7],[34,7],[35,7],[36,7],[6,7],[40,7],[37,7],[38,7],[39,7],[41,7],[7,7],[42,7],[47,7],[48,7],[43,7],[44,7],[45,7],[46,7],[8,7],[52,7],[49,7],[50,7],[51,7],[53,7],[9,7],[54,7],[55,7],[56,7],[58,7],[57,7],[59,7],[60,7],[10,7],[61,7],[62,7],[63,7],[11,7],[64,7],[65,7],[66,7],[67,7],[68,7],[1,7],[163,74],[173,75],[162,74],[183,76],[154,77],[153,78],[182,79],[176,80],[181,81],[156,82],[170,83],[155,84],[179,85],[151,86],[150,79],[180,87],[152,88],[157,89],[158,7],[161,89],[148,7],[184,90],[174,91],[165,92],[166,93],[168,94],[164,95],[167,96],[177,79],[159,97],[160,98],[169,99],[149,100],[172,91],[171,89],[175,7],[178,101],[127,102],[124,103],[126,103],[130,104],[129,105],[128,106],[125,103],[131,107],[136,108],[135,109],[134,110],[75,111],[132,110],[122,112],[133,113],[121,114],[123,115]],"latestChangedDtsFile":"./types/index.d.ts","version":"5.9.3"}
1
+ {"fileNames":["../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@types+react@19.2.3/node_modules/@types/react/global.d.ts","../../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@types+react@19.2.3/node_modules/@types/react/index.d.ts","../../../node_modules/.pnpm/@types+react@19.2.3/node_modules/@types/react/jsx-runtime.d.ts","../src/types.ts","../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/types/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/errors.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/types/json-schema.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/types/jtd-schema.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/types/index.d.ts","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.d.ts","../src/validation/schemas.ts","../src/validation/fuzzyMatch.ts","../src/validation/validateTemplate.ts","../src/fusion-fragment/FieldRenderer.tsx","../src/fusion-fragment/TableRenderer.tsx","../src/fusion-fragment/FusionFragmentContext.tsx","../src/fusion-fragment/ChartRenderer.tsx","../src/fusion-fragment/SectionRenderer.tsx","../src/fusion-fragment/FusionFragmentRenderer.tsx","../src/fusion-fragment/FusionFragmentHandler.tsx","../src/fusion-fragment/index.ts","../src/validation/formatErrors.ts","../src/validation/index.ts","../src/render/textPreview.ts","../src/render/index.ts","../src/index.ts"],"fileIdsList":[[71,72],[73],[79,80,84,111,112,114,115,116,118,119],[77,78],[77],[79,119],[79,80,116,117,119],[119],[76,119,120],[79,80,118,119],[79,80,82,83,118,119],[79,80,81,118,119],[79,80,84,111,112,113,114,115,118,119],[76,79,80,84,116,118],[84,119],[86,87,88,89,90,91,92,93,94,95,119],[109,119],[85,96,104,105,106,107,108,110],[89,119],[97,98,99,100,101,102,103,119],[73,74,75,126],[73,74,75],[73,74,75,123,126,129],[73,74,75,123,128],[73,74,75,124,125,127],[74,124,125,126,127,128,129,130],[74,75,131,133,135],[74,134],[74,75],[73,74],[74],[74,121,122,123,132],[74,75,120],[74,75,120,121,122]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"170d4db14678c68178ee8a3d5a990d5afb759ecb6ec44dbd885c50f6da6204f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"0ff1b165090b491f5e1407ae680b9a0bc3806dc56827ec85f93c57390491e732","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"cb1b63b488a288119373fc66f93fcda33bd4fa8eba56daca61440b46d6d810b3","signature":"91507f69a5e107d2edbf737d581621a80e19b9a183fae22bcc91563fef879332"},{"version":"84bcc7c6b06f4d643a55dc63b56be0c81d990f8d549b66ea615c553268774dc3","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"4304f640f7cb4724ea82441accb7c7607fa7207541182470d625adda99b2900b","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"beb2ee2ffcdfecc70d705af0bea1dbb2603d09664c82ad1b5ae53ca74612fe19","signature":"883786c56116d939056022c1176c012b593f01464144605481a2f03ab881306f"},{"version":"9728ded03434a2df8f167024ecad79128f6d12de3ad4e59ef6cfe31db1762bd5","signature":"20a4e501d3436462189a3e4c3a8085015c73965a93ffc7f7843674ef98540d68"},{"version":"126501063eb1dd9f4695429923edc3258b62b86a54cd2aa9e230cef260034d19","signature":"36e095fdc72ca976b807afe8fdd70cb40a8039b2e2af235fd1ea2c187c8fcf06"},{"version":"bc7baa07b8e85ce73a4fe2022121f05bbd1723686d2bb930f33d45f84332f518","signature":"49d395a8ce506484d40c01de78fc473e6dc227ae92b96cab9dbf301b260ce769"},{"version":"00f3a6ffe8600d66c6fadb71a6259b47017527a9c6917c24e0d417cc4090eeaa","signature":"bbb977ebfbff18bb81aab629d0de2dc2ad4c2ffe44486c024162dd35b36e2a5b"},{"version":"080315c0d80cd17e46e88bd0d21dc77279097fcec927de800cf8e7598fc7edc3","signature":"4be72b42987b371b1af2103abe093b6ac4642526c6863c2e86472ba696a8da4e"},{"version":"7a971b279eb475ddab0833d7c0dd1208e65808d379515f09f618cc9bd4f43f56","signature":"d991e9d40e159f4bb23b06260d6ca154ea585dcbec0db92ed7f0a92bd6f08e73"},{"version":"cff899c67e51a4bb3c9c32866f49fc883a2916bd268f4a2dbdb3fbf8094fba75","signature":"a6b947a71fba32a1f9ccc1faf6d80e786981e9afecea802019d9799a12225c43"},{"version":"51b65f09ac04342c276ca171808ec22ec43a2993427dfee22860ba8ad066e801","signature":"0d7294c13db934c5c4aaa71fed9b41210b94c9349d9a56d0145fc60afbb9af6e"},{"version":"b5a6820d1136c84c4692d55b26b1d682bdfb6d3ee175c7500494dac31d2c7074","signature":"22578ac4a3f374cb2632d7aa08581e9b4b00d669dade5077ca2eea0cdec03a2c"},{"version":"b6d2c611a7b3e84686cfa0f36d29b892c7d2a7a68fd9b620b52aa0631b38358b","signature":"1f72b050bd014f7d77043c15a7cd11e064a2542487f6e57d77a0c053c3d6f6a2"},{"version":"cb8d591141618a8ff8197981286bf7dc24fa8666e17613dc366057c384e9cc0f","signature":"284b082f22d1395ea1d046c3a38e7c8469495e5c78a8b1896bcc9d32d54f5772"},{"version":"4a01113e03c73c2409cb2d71df8d94a7c12c7d50e6c000cab98bcf3adba095ac","signature":"8e82ed2ef170568936f176f01b97041676148930bab6ab46c10d57a5e1fe1fa9"},{"version":"bdd47a155de9de17e448721bb1148c250ad2f72ca3b1634269670dd01d4d0845","signature":"cb70da7b2ec6d09d6a6c8553b390eb52cfc736bc7de25a882420f9ebd4d420b6"},{"version":"66c0baa10168da566982d61d3aa6b8abb33806e12f39f9c96d206b0ee766b4f5","signature":"ea9183e9cb6ca119bc2d1c3f2bb2f3e4c10247184a5e8af0593a7ea4556d74ad"},{"version":"c6f8e8b1cd697efe7678e413339516e4cc67726e4b121be0a6343aed5f21720a","signature":"f9dbd3907a66aebc4364c4331aa24f58d998b74c40018e407bc73652f3831a5a"}],"root":[75,[121,136]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declarationDir":"./types","declarationMap":true,"esModuleInterop":true,"jsx":4,"module":99,"noFallthroughCasesInSwitch":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./esm","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":11},"referencedMap":[[73,1],[74,2],[120,3],[79,4],[78,5],[83,6],[118,7],[115,8],[117,9],[80,8],[81,10],[85,10],[84,11],[82,12],[116,13],[114,8],[119,14],[86,15],[91,8],[93,8],[88,8],[89,15],[95,8],[96,16],[87,8],[92,8],[94,8],[90,8],[110,17],[109,8],[111,18],[105,8],[107,8],[106,8],[102,8],[108,19],[103,8],[104,20],[97,8],[98,8],[99,8],[100,8],[101,8],[127,21],[124,22],[126,22],[130,23],[129,24],[128,25],[125,22],[131,26],[136,27],[135,28],[134,29],[75,30],[132,29],[122,31],[133,32],[121,33],[123,34]],"latestChangedDtsFile":"./types/index.d.ts","version":"6.0.3"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChartRenderer.d.ts","sourceRoot":"","sources":["../../../src/fusion-fragment/ChartRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,MAAM,WAAW,kBAAkB;IACjC,mCAAmC;IACnC,KAAK,EAAE,aAAa,CAAC;IACrB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,IAAI,EACJ,SAAS,EACV,EAAE,kBAAkB,GAAG,YAAY,CA0GnC"}
1
+ {"version":3,"file":"ChartRenderer.d.ts","sourceRoot":"","sources":["../../../src/fusion-fragment/ChartRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,MAAM,WAAW,kBAAkB;IACjC,mCAAmC;IACnC,KAAK,EAAE,aAAa,CAAC;IACrB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,IAAI,EACJ,SAAS,EACV,EAAE,kBAAkB,GAAG,YAAY,CAiGnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FusionFragmentContext.d.ts","sourceRoot":"","sources":["../../../src/fusion-fragment/FusionFragmentContext.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsC,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC9F,OAAO,KAAK,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAInF,MAAM,WAAW,2BAA2B;IAC1C,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,gDAAgD;IAChD,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,mFAAmF;IACnF,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC1D,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0BAA0B;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,cAAc,EACd,aAAa,EACb,QAAQ,EACT,EAAE,2BAA2B,GAAG,YAAY,CAmB5C;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,0BAA0B,CAUrE;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,0BAA0B,GAAG,IAAI,CAEhF"}
1
+ {"version":3,"file":"FusionFragmentContext.d.ts","sourceRoot":"","sources":["../../../src/fusion-fragment/FusionFragmentContext.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsC,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC9F,OAAO,KAAK,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAInF,MAAM,WAAW,2BAA2B;IAC1C,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,gDAAgD;IAChD,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,mFAAmF;IACnF,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC1D,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0BAA0B;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,cAAc,EACd,aAAa,EACb,QAAQ,EACT,EAAE,2BAA2B,GAAG,YAAY,CAW5C;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,0BAA0B,CAUrE;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,0BAA0B,GAAG,IAAI,CAEhF"}
@@ -1 +1 @@
1
- {"version":3,"file":"SectionRenderer.d.ts","sourceRoot":"","sources":["../../../src/fusion-fragment/SectionRenderer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAmGxD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,SAAS,GACV,EAAE,oBAAoB,GAAG,YAAY,CAiFrC"}
1
+ {"version":3,"file":"SectionRenderer.d.ts","sourceRoot":"","sources":["../../../src/fusion-fragment/SectionRenderer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAmGxD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,SAAS,GACV,EAAE,oBAAoB,GAAG,YAAY,CAgFrC"}
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useMemo as n,useCallback as a,createContext as o,useContext as i}from"react";import s from"ajv";const l={type:"object",properties:{label:{type:"string"},key:{type:"string"},format:{type:"string",enum:["text","number","currency","percent","date","boolean"],nullable:!0},unit:{type:"string",nullable:!0},editable:{type:"boolean",nullable:!0},inputType:{type:"string",enum:["text","number","date","select","checkbox"],nullable:!0},options:{type:"array",items:{type:"object",properties:{label:{type:"string"},value:{type:"string"}},required:["label","value"],additionalProperties:!1},nullable:!0},min:{type:"number",nullable:!0},max:{type:"number",nullable:!0},highlight:{type:"string",enum:["success","warning","error","info"],nullable:!0},tooltip:{type:"string",nullable:!0},decimals:{type:"number",nullable:!0},currency:{type:"string",nullable:!0}},required:["label","key"],additionalProperties:!1},c={type:"object",properties:{title:{type:"string"},layout:{type:"string",enum:["grid-2","grid-3","grid-4","list","table","chart"],nullable:!0},collapsed:{type:"boolean",nullable:!0},fields:{type:"array",items:l,nullable:!0},columns:{type:"array",items:{type:"object",properties:{header:{type:"string"},key:{type:"string"},format:{type:"string",enum:["text","number","currency","percent","date","boolean"],nullable:!0},width:{type:"string",nullable:!0},align:{type:"string",enum:["left","center","right"],nullable:!0},currency:{type:"string",nullable:!0},decimals:{type:"number",nullable:!0},highlight:{type:"string",enum:["success","warning","error","info"],nullable:!0}},required:["header","key"],additionalProperties:!1},nullable:!0},dataKey:{type:"string",nullable:!0},chart:{...{type:"object",properties:{title:{type:"string",nullable:!0},description:{type:"string",nullable:!0},spec:{type:"object",additionalProperties:!0},height:{type:"number",nullable:!0},width:{type:"number",nullable:!0},dataKey:{type:"string",nullable:!0}},required:["spec"],additionalProperties:!1},nullable:!0}},required:["title"],additionalProperties:!1},d={type:"object",properties:{title:{type:"string",nullable:!0},entityType:{type:"string",enum:["fund","scenario","portfolio","transaction","custom"],nullable:!0},sections:{type:"array",items:c},footer:{type:"string",nullable:!0}},required:["sections"],additionalProperties:!1};function p(e,t){const r=[];for(let t=0;t<=e.length;t++)r[t]=[t];for(let e=0;e<=t.length;e++)r[0][e]=e;for(let n=1;n<=e.length;n++)for(let a=1;a<=t.length;a++){const o=e[n-1]===t[a-1]?0:1;r[n][a]=Math.min(r[n-1][a]+1,r[n][a-1]+1,r[n-1][a-1]+o)}return r[e.length][t.length]}function u(e,t,r=3){if(0===t.length)return;const n=e.toLowerCase();let a,o=1/0;for(const e of t){const t=e.toLowerCase();if(n===t)return e;if(n.includes(t)||t.includes(n)){const r=Math.abs(n.length-t.length);r<o&&(o=r,a=e);continue}const i=p(n,t);i<o&&i<=r&&(o=i,a=e)}return a}function g(e,t,r=3){if(0===t.length)return[];const n=e.toLowerCase();return t.map(e=>({key:e,distance:p(n,e.toLowerCase())})).filter(({distance:e})=>e<=4).sort((e,t)=>e.distance-t.distance).slice(0,r).map(({key:e})=>e)}const h=new s({allErrors:!0,verbose:!0}).compile(d);function m(e,t){const r=[];if(!h(e)&&h.errors){for(const e of h.errors){const t=e.instancePath.replace(/^\//,"").replace(/\//g,".")||"root";let n,a=e.message||"Invalid value";if("enum"===e.keyword){n=`Valid values: ${e.params.allowedValues.join(", ")}`}else if("required"===e.keyword){a=`Missing required property: ${e.params.missingProperty}`}else if("additionalProperties"===e.keyword){a=`Unknown property: ${e.params.additionalProperty}`,n="Remove this property or check spelling"}r.push({path:t,message:a,suggestion:n})}return{valid:!1,errors:r}}const n=e;for(let e=0;e<n.sections.length;e++){const a=n.sections[e],o=`sections[${e}]`;if("table"!==a.layout)if("chart"!==a.layout)if(a.fields&&0!==a.fields.length)for(let e=0;e<a.fields.length;e++){const n=a.fields[e],i=`${o}.fields[${e}]`;if(!t.includes(n.key)){const e=u(n.key,t);r.push({path:`${i}.key`,message:`Unknown key '${n.key}'`,suggestion:e?`Did you mean '${e}'?`:void 0})}if(n.format){const e=f(n,i);r.push(...e)}"select"!==n.inputType||n.options&&0!==n.options.length||r.push({path:`${i}.options`,message:"Select input type requires options array",suggestion:'Add options: [{ label: "...", value: "..." }]'}),void 0!==n.min&&void 0!==n.max&&n.min>n.max&&r.push({path:`${i}.min`,message:`min (${n.min}) cannot be greater than max (${n.max})`,suggestion:"Swap min and max values"})}else r.push({path:`${o}.fields`,message:"Non-table/chart sections require fields array",suggestion:'Add fields: [{ label: "...", key: "..." }]'});else if(a.chart){if(a.chart.spec){const e=a.chart.spec;e.mark||e.layer||e.vconcat||e.hconcat||r.push({path:`${o}.chart.spec`,message:"Chart spec requires mark, layer, vconcat, or hconcat",suggestion:'Add mark: "bar" or mark: "line" etc.'})}else r.push({path:`${o}.chart.spec`,message:"Chart requires a Vega-Lite spec",suggestion:'Add spec: { mark: "bar", encoding: {...}, data: {...} }'});if(a.chart.dataKey&&!t.includes(a.chart.dataKey)){const e=u(a.chart.dataKey,t);r.push({path:`${o}.chart.dataKey`,message:`Unknown dataKey '${a.chart.dataKey}'`,suggestion:e?`Did you mean '${e}'?`:void 0})}}else r.push({path:`${o}.chart`,message:"Chart layout requires a chart specification",suggestion:'Add chart: { spec: { mark: "bar", encoding: {...} } }'});else if(a.columns&&0!==a.columns.length||r.push({path:`${o}.columns`,message:"Table layout requires columns array",suggestion:'Add columns: [{ header: "...", key: "..." }]'}),a.dataKey){if(!t.includes(a.dataKey)){const e=u(a.dataKey,t);r.push({path:`${o}.dataKey`,message:`Unknown dataKey '${a.dataKey}'`,suggestion:e?`Did you mean '${e}'?`:void 0})}}else r.push({path:`${o}.dataKey`,message:"Table layout requires dataKey to reference the data array",suggestion:'Add dataKey: "yourArrayKey"'})}return{valid:0===r.length,errors:r}}function f(e,t){const r=[];if(void 0!==e.decimals){const n=["number","currency","percent"];e.format&&!n.includes(e.format)&&r.push({path:`${t}.decimals`,message:"'decimals' only applies to number, currency, or percent formats",suggestion:`Remove 'decimals' or change format to one of: ${n.join(", ")}`})}if(void 0!==e.currency&&"currency"!==e.format&&r.push({path:`${t}.currency`,message:"'currency' only applies to currency format",suggestion:"Set format: 'currency' or remove 'currency' property"}),e.inputType&&e.format){const n={text:["text"],number:["number","text"],currency:["number","text"],percent:["number","text"],date:["date","text"],boolean:["checkbox"]}[e.format];n&&!n.includes(e.inputType)&&r.push({path:`${t}.inputType`,message:`inputType '${e.inputType}' is not compatible with format '${e.format}'`,suggestion:`Use one of: ${n.join(", ")}`})}return r}function y(e,t){let r;try{r=JSON.parse(e)}catch(e){return{valid:!1,errors:[{path:"root",message:`JSON parse error: ${e instanceof Error?e.message:"Invalid JSON"}`,suggestion:"Check JSON syntax (missing quotes, commas, brackets)"}]}}const n=m(r,t);return n.valid?{...n,template:r}:n}const b={container:{display:"flex",flexDirection:"column",gap:"2px",minWidth:0},label:{fontSize:"11px",fontWeight:500,color:"var(--gray-11, #6b7280)",textTransform:"uppercase",letterSpacing:"0.5px"},value:{fontSize:"14px",fontWeight:500,color:"var(--gray-12, #1f2937)",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontVariantNumeric:"tabular-nums",letterSpacing:"-0.02em"},unit:{fontSize:"12px",color:"var(--gray-10, #9ca3af)",marginLeft:"4px"},highlight:{success:{color:"var(--green-11, #15803d)"},warning:{color:"var(--yellow-11, #ca8a04)"},error:{color:"var(--red-11, #dc2626)"},info:{color:"var(--blue-11, #2563eb)"}},editable:{cursor:"pointer",padding:"2px 4px",borderRadius:"4px",transition:"background-color 0.15s"},nullValue:{color:"var(--gray-9, #9ca3af)",fontStyle:"italic"}};function v({field:o,value:i,onUpdate:s,agentMode:l}){const[c,d]=r(!1),p=n(()=>function(e,t){if(null==e)return"—";switch(t.format){case"number":{const r="number"==typeof e?e:parseFloat(String(e));if(isNaN(r))return String(e);const n={minimumFractionDigits:t.decimals??0,maximumFractionDigits:t.decimals??2};return new Intl.NumberFormat("en-US",n).format(r)}case"currency":{const r="number"==typeof e?e:parseFloat(String(e));if(isNaN(r))return String(e);const n={style:"currency",currency:t.currency||"USD",minimumFractionDigits:t.decimals??0,maximumFractionDigits:t.decimals??0};return new Intl.NumberFormat("en-US",n).format(r)}case"percent":{const r="number"==typeof e?e:parseFloat(String(e));if(isNaN(r))return String(e);const n=r<1&&r>-1&&0!==r?100*r:r,a=t.decimals??1;return`${n.toFixed(a)}%`}case"date":{if(!e)return"—";const t=e instanceof Date?e:new Date(String(e));return isNaN(t.getTime())?String(e):new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric"}).format(t)}case"boolean":return("boolean"==typeof e?e:"true"===e||"1"===e)?"Yes":"No";default:return String(e)}}(i,o),[i,o]),u=null==i,g=o.editable&&(s||l),h=a(()=>{g&&l?.enabled&&l.sendMessage&&l.sendMessage(`Please help me update the "${o.label}" field (key: ${o.key}). Current value: ${p}`)},[g,l,o,p]),m=n(()=>{const e={...b.value};return u?{...e,...b.nullValue}:o.highlight?{...e,...b.highlight[o.highlight]}:g?{...e,...b.editable,backgroundColor:c?"var(--gray-3, #f3f4f6)":"transparent"}:e},[u,o.highlight,g,c]);return e("div",{style:b.container,title:o.tooltip,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:h,role:g?"button":void 0,tabIndex:g?0:void 0,children:[t("span",{style:b.label,children:o.label}),e("span",{style:m,children:[p,o.unit&&!u&&t("span",{style:b.unit,children:o.unit})]})]})}const x={container:{width:"100%",overflowX:"auto"},table:{width:"100%",borderCollapse:"collapse",fontSize:"13px"},thead:{backgroundColor:"var(--gray-3, #f3f4f6)"},th:{padding:"10px 12px",textAlign:"left",fontWeight:600,fontSize:"11px",textTransform:"uppercase",letterSpacing:"0.5px",color:"var(--gray-11, #6b7280)",borderBottom:"2px solid var(--gray-5, #e5e7eb)"},td:{padding:"10px 12px",borderBottom:"1px solid var(--gray-4, #e5e7eb)",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontVariantNumeric:"tabular-nums"},empty:{padding:"20px",textAlign:"center",color:"var(--gray-10, #9ca3af)",fontStyle:"italic"},highlight:{success:{color:"var(--green-11, #15803d)"},warning:{color:"var(--yellow-11, #ca8a04)"},error:{color:"var(--red-11, #dc2626)"},info:{color:"var(--blue-11, #2563eb)"}}};function k({columns:r,rows:a}){const o=n(()=>r.reduce((e,t)=>(e[t.key]=t.align||("number"===t.format||"currency"===t.format||"percent"===t.format?"right":"left"),e),{}),[r]);return 0===a.length?t("div",{style:x.container,children:e("table",{style:x.table,children:[t("thead",{style:x.thead,children:t("tr",{children:r.map(e=>t("th",{style:{...x.th,textAlign:o[e.key],width:e.width},children:e.header},e.key))})}),t("tbody",{children:t("tr",{children:t("td",{colSpan:r.length,style:x.empty,children:"No data available"})})})]})}):t("div",{style:x.container,children:e("table",{style:x.table,children:[t("thead",{style:x.thead,children:t("tr",{children:r.map(e=>t("th",{style:{...x.th,textAlign:o[e.key],width:e.width},children:e.header},e.key))})}),t("tbody",{children:a.map((e,n)=>t("tr",{children:r.map(r=>{const n=function(e,t){if(null==e)return"—";switch(t.format){case"number":{const r="number"==typeof e?e:parseFloat(String(e));return isNaN(r)?String(e):new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:t.decimals??2}).format(r)}case"currency":{const r="number"==typeof e?e:parseFloat(String(e));return isNaN(r)?String(e):new Intl.NumberFormat("en-US",{style:"currency",currency:t.currency||"USD",minimumFractionDigits:t.decimals??0,maximumFractionDigits:t.decimals??0}).format(r)}case"percent":{const r="number"==typeof e?e:parseFloat(String(e));return isNaN(r)?String(e):`${(r<1&&r>-1&&0!==r?100*r:r).toFixed(t.decimals??1)}%`}case"date":{const t=e instanceof Date?e:new Date(String(e));return isNaN(t.getTime())?String(e):new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric"}).format(t)}case"boolean":return e?"Yes":"No";default:return String(e)}}(e[r.key],r),a={...x.td,textAlign:o[r.key],...r.highlight?x.highlight[r.highlight]:{}};return t("td",{style:a,children:n},r.key)})},n))})]})})}const $=o(null);function S({data:e,onUpdate:r,sendMessage:a,ChartComponent:o,artifactRunId:i,children:s}){const l=n(()=>({data:e,onUpdate:r,sendMessage:a,ChartComponent:o,artifactRunId:i}),[e,r,a,o,i]);return console.log("[FusionFragmentProvider] Created with:",{hasData:!!e,dataKeys:e?Object.keys(e):[],hasChartComponent:!!o,artifactRunId:i}),t($.Provider,{value:l,children:s})}function w(){const e=i($);if(!e)throw new Error("useFusionFragmentContext must be used within a FusionFragmentProvider");return e}function C(){return i($)}function N({chart:r,data:n,className:a}){const o=C(),i=o?.ChartComponent,s=o?.artifactRunId;console.log("[ChartRenderer] Context:",{hasContext:!!o,hasChartComponent:!!i,artifactRunId:s,chartTitle:r.title,dataKey:r.dataKey});const l={...r.spec};if(r.dataKey&&n[r.dataKey]){const e=n[r.dataKey];Array.isArray(e)&&(l.data={values:e})}const c={library:"vega-lite",title:r.title,description:r.description,spec:l,options:{height:r.height}};return i?t("div",{className:a,children:t(i,{spec:c,artifactRunId:s})}):e("div",{className:a,style:{padding:"16px",backgroundColor:"var(--gray-2, #f9fafb)",border:"1px solid var(--gray-5, #e5e7eb)",borderRadius:"8px",minHeight:r.height||280},children:[r.title&&t("div",{style:{fontSize:"14px",fontWeight:600,marginBottom:"8px",color:"var(--gray-12, #111827)"},children:r.title}),r.description&&t("div",{style:{fontSize:"12px",color:"var(--gray-11, #6b7280)",marginBottom:"12px"},children:r.description}),t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:(r.height||280)-60,backgroundColor:"var(--gray-3, #f3f4f6)",borderRadius:"4px",color:"var(--gray-11, #6b7280)",fontSize:"12px"},"data-vega-spec":JSON.stringify(c),children:e("div",{style:{textAlign:"center"},children:[e("div",{style:{marginBottom:"4px"},children:["Chart: ",l.mark?String("string"==typeof l.mark?l.mark:l.mark.type):"composite"]}),l.data?.values&&e("div",{style:{fontSize:"11px",opacity:.8},children:[l.data.values.length," data points"]})]})})]})}const T={"grid-2":{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"16px"},"grid-3":{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"16px"},"grid-4":{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"16px"},list:{display:"flex",flexDirection:"column",gap:"12px"}},F={section:{marginBottom:"20px"},header:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px",cursor:"default"},headerCollapsible:{cursor:"pointer",userSelect:"none"},title:{fontSize:"11px",fontWeight:600,color:"var(--gray-11, #6b7280)",textTransform:"uppercase",letterSpacing:"0.5px"},chevron:{width:"14px",height:"14px",color:"var(--gray-10, #9ca3af)",transition:"transform 0.2s"},chevronCollapsed:{transform:"rotate(-90deg)"},content:{overflow:"hidden",transition:"max-height 0.2s ease-out"},contentCollapsed:{maxHeight:"0",opacity:0},contentExpanded:{maxHeight:"2000px",opacity:1}};function j({collapsed:e}){return t("svg",{style:{...F.chevron,...e?F.chevronCollapsed:{}},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t("polyline",{points:"6 9 12 15 18 9"})})}function K({section:a,data:o,onUpdate:i,agentMode:s}){const[l,c]=r(a.collapsed??!1),d=a.layout||"grid-3",p="table"===d,u="chart"===d,g=p||u?{}:T[d],h=void 0!==a.collapsed,m=n(()=>{if(!p||!a.dataKey)return[];const e=o[a.dataKey];return Array.isArray(e)?e:[]},[p,a.dataKey,o]),f=n(()=>({...F.header,...h?F.headerCollapsible:{}}),[h]),y=n(()=>({...F.content,...g,...l?F.contentCollapsed:F.contentExpanded}),[l,g]);return e("div",{style:F.section,children:[e("div",{style:f,onClick:()=>{h&&c(!l)},role:h?"button":void 0,"aria-expanded":h?!l:void 0,children:[h&&t(j,{collapsed:l}),t("span",{style:F.title,children:a.title})]}),t("div",{style:y,children:p&&a.columns?t(k,{columns:a.columns,rows:m}):u&&a.chart?t(N,{chart:a.chart,data:o}):a.fields?.map((e,r)=>t(v,{field:e,value:o[e.key],onUpdate:i?t=>i(e.key,t):void 0,agentMode:s},e.key||r))})]})}const D={container:{backgroundColor:"var(--gray-2, #f9fafb)",border:"1px solid var(--gray-5, #e5e7eb)",borderRadius:"8px",padding:"16px 20px"},title:{fontSize:"16px",fontWeight:600,color:"var(--gray-12, #1f2937)",marginBottom:"16px",paddingBottom:"12px",borderBottom:"1px solid var(--gray-5, #e5e7eb)"},footer:{fontSize:"12px",color:"var(--gray-10, #9ca3af)",marginTop:"16px",paddingTop:"12px",borderTop:"1px solid var(--gray-5, #e5e7eb)"},error:{backgroundColor:"var(--red-2, #fef2f2)",border:"1px solid var(--red-6, #fca5a5)",borderRadius:"8px",padding:"16px"},errorTitle:{fontSize:"14px",fontWeight:600,color:"var(--red-11, #dc2626)",marginBottom:"12px"},errorList:{listStyle:"none",padding:0,margin:0},errorItem:{fontSize:"13px",color:"var(--red-11, #dc2626)",marginBottom:"8px",fontFamily:"var(--font-mono, ui-monospace, monospace)"},errorPath:{fontSize:"11px",color:"var(--red-9, #ef4444)",display:"block"},errorSuggestion:{fontSize:"12px",color:"var(--gray-11, #6b7280)",marginTop:"4px",fontStyle:"italic"}};function M({errors:r}){return e("div",{style:D.error,children:[e("div",{style:D.errorTitle,children:["Template Validation Failed (",r.length," error",r.length>1?"s":"",")"]}),t("ul",{style:D.errorList,children:r.map((r,n)=>e("li",{style:D.errorItem,children:[t("span",{children:r.message}),e("span",{style:D.errorPath,children:["at ",r.path]}),r.suggestion&&e("span",{style:D.errorSuggestion,children:["\\u2192 ",r.suggestion]})]},n))})]})}function I({template:r,data:a,onUpdate:o,agentMode:i,className:s}){const l=n(()=>{const e=Object.keys(a);return m(r,e)},[r,a]);return l.valid?e("div",{style:D.container,className:s,children:[r.title&&t("div",{style:D.title,children:r.title}),r.sections.map((e,r)=>t(K,{section:e,data:a,onUpdate:o,agentMode:i},e.title||r)),r.footer&&t("div",{style:D.footer,children:r.footer})]}):t(M,{errors:l.errors})}const U={error:{backgroundColor:"var(--red-2, #fef2f2)",border:"1px solid var(--red-6, #fca5a5)",borderRadius:"8px",padding:"16px",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:"13px"},errorTitle:{fontWeight:600,color:"var(--red-11, #dc2626)",marginBottom:"8px"},errorMessage:{color:"var(--red-10, #ef4444)",whiteSpace:"pre-wrap"},noContext:{backgroundColor:"var(--yellow-2, #fefce8)",border:"1px solid var(--yellow-6, #fde047)",borderRadius:"8px",padding:"16px"},noContextTitle:{fontSize:"14px",fontWeight:600,color:"var(--yellow-11, #ca8a04)",marginBottom:"8px"},noContextMessage:{fontSize:"13px",color:"var(--gray-11, #6b7280)"},loading:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"12px",minHeight:"150px",borderRadius:"8px",border:"1px solid var(--gray-6, #e5e7eb)",backgroundColor:"var(--gray-2, #f9fafb)"},loadingIcon:{width:"32px",height:"32px",color:"var(--gray-9, #9ca3af)"},loadingText:{fontSize:"14px",color:"var(--gray-9, #9ca3af)"},loadingDots:{display:"flex",gap:"4px"},loadingDot:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:"var(--gray-6, #d1d5db)",animation:"fusion-fragment-bounce 1s infinite"}};function A(){return e("div",{style:U.loading,children:[t("style",{children:"\n @keyframes fusion-fragment-bounce {\n 0%, 80%, 100% { transform: translateY(0); }\n 40% { transform: translateY(-6px); }\n }\n "}),e("svg",{style:U.loadingIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t("polyline",{points:"16 18 22 12 16 6"}),t("polyline",{points:"8 6 2 12 8 18"})]}),t("span",{style:U.loadingText,children:"Loading fragment..."}),t("div",{style:U.loadingDots,children:[0,1,2].map(e=>t("div",{style:{...U.loadingDot,animationDelay:150*e+"ms"}},e))})]})}function z({message:r}){return e("div",{style:U.error,children:[t("div",{style:U.errorTitle,children:"Failed to parse fusion-fragment"}),t("div",{style:U.errorMessage,children:r})]})}function P({template:r}){const n=r.sections.flatMap(e=>e.fields||[]).map(e=>e.key);return e("div",{style:U.noContext,children:[t("div",{style:U.noContextTitle,children:"No data context available"}),e("div",{style:U.noContextMessage,children:["This fusion-fragment requires data with keys: ",n.join(", "),".",t("br",{}),"Wrap this component in a FusionFragmentProvider with the required data."]})]})}function q({code:e,data:r,onUpdate:a}){const o=C(),i=r??o?.data,s=a??o?.onUpdate,l=o?.sendMessage,c=n(()=>function(e){const t=e.trim();if(t.length<2)return!0;if(!t.startsWith("{"))return!1;try{return JSON.parse(t),!1}catch(e){const r=["unexpected end","unterminated string","expected","unexpected token"],n=(e instanceof Error?e.message:"").toLowerCase();if(r.some(e=>n.includes(e))){let e=0,r=0,n=!1,a=!1;for(const o of t)a?a=!1:"\\"!==o?'"'!==o?n||("{"===o?e++:"}"===o?e--:"["===o?r++:"]"===o&&r--):n=!n:a=!0;return e>0||r>0||n}return!1}}(e),[e]),d=n(()=>{if(c)return{valid:!1,errors:[],template:void 0};const t=i?Object.keys(i):[];return y(e,t)},[e,i,c]);if(c)return t(A,{});if(!d.valid&&!d.template){const e=d.errors.find(e=>"root"===e.path&&e.message.includes("JSON"));if(e)return t(z,{message:e.message})}return d.template&&!i?t(P,{template:d.template}):d.template&&i?t(I,{template:d.template,data:i,onUpdate:s,agentMode:l?{enabled:!0,sendMessage:l}:void 0}):t(z,{message:d.errors.map(e=>`${e.path}: ${e.message}`).join("\n")})}function L(){return{language:"fusion-fragment",component:q}}function R(e){if(0===e.length)return"Template is valid.";return`Template validation failed with ${e.length} error${e.length>1?"s":""}:\n`+"\n"+e.map((e,t)=>{let r=`${t+1}. ${e.message}`;return r+=`\n Path: ${e.path}`,e.suggestion&&(r+=`\n → ${e.suggestion}`),r}).join("\n\n")}function B(e,t){const r=["Template valid. Preview:"];r.push(""),e.title&&(r.push(`**${e.title}**`),r.push(""));for(const n of e.sections){const e=n.fields.length;r.push(`[${n.title}] ${e} field${e>1?"s":""}:`);for(const e of n.fields){let n=`- ${e.label} (${e.key}`;e.format&&"text"!==e.format&&(n+=`, ${e.format}`),n+=")",t.includes(e.key)||(n+=" ⚠️ key not in data"),r.push(n)}r.push("")}return r.join("\n")}function W(e,t=!0){if(0===e.length)return"No data keys available.";if(!t||e.length<=10)return`Available keys: ${e.join(", ")}`;const r=new Map;for(const t of e){const e=t.indexOf(".");if(e>0){const n=t.substring(0,e),a=t.substring(e+1),o=r.get(n)||[];o.push(a),r.set(n,o)}else{const e=r.get("")||[];e.push(t),r.set("",e)}}const n=["Available keys:"],a=r.get("");a&&a.length>0&&n.push(` ${a.join(", ")}`);for(const[e,t]of r)""!==e&&(t.length<=3?n.push(` ${e}: ${t.join(", ")}`):n.push(` ${e}: ${t.slice(0,3).join(", ")}, ... (${t.length} total)`));return n.join("\n")}function O(e,t){const r={};for(const e of t)r[e]=`<${e}>`;for(const t of e.sections)if(t.fields)for(const e of t.fields)e.key in r&&(r[e.key]=V(e));return r}function V(e){switch(e.format){case"number":return 1234;case"currency":return 1e6;case"percent":return 25;case"date":return(new Date).toISOString().split("T")[0];case"boolean":return!0;default:return`Sample ${e.label}`}}function E(e,t){const r=[];r.push("Template structure preview:"),r.push(""),e.title&&(r.push(`## ${e.title}`),r.push(""));for(const n of e.sections){const e=n.layout||"grid-3";if(r.push(`### ${n.title}`),"table"===e){if(r.push("Layout: table"),n.dataKey&&r.push(`Data key: \`${n.dataKey}\``),r.push(""),n.columns){r.push("Columns:");for(const e of n.columns){let t=`- **${e.header}** → \`${e.key}\``;e.format&&"text"!==e.format&&(t+=` (${e.format})`),r.push(t)}}}else if("chart"===e){if(r.push("Layout: chart"),n.chart){const e=n.chart;e.title&&r.push(`Chart title: ${e.title}`),e.description&&r.push(`Description: ${e.description}`);const a=e.spec.mark?"string"==typeof e.spec.mark?e.spec.mark:e.spec.mark.type||"unknown":"composite";r.push(`Chart type: ${a}`),e.dataKey?(r.push(`Data key: \`${e.dataKey}\``),t.includes(e.dataKey)||r.push("⚠️ **dataKey not found in data**")):e.spec.data?.values&&r.push(`Inline data: ${e.spec.data.values.length} points`),e.height&&r.push(`Height: ${e.height}px`)}r.push("")}else{const a="list"===e?"vertical list":`${e.split("-")[1]}-column grid`;if(r.push(`Layout: ${a}${n.collapsed?" (collapsed by default)":""}`),r.push(""),n.fields)for(const e of n.fields){let n=`- **${e.label}** → \`${e.key}\``;const a=[];e.format&&"text"!==e.format&&a.push(e.format),e.unit&&a.push(`unit: "${e.unit}"`),e.editable&&a.push("editable"),e.highlight&&a.push(`highlight: ${e.highlight}`),a.length>0&&(n+=` (${a.join(", ")})`),t.includes(e.key)||(n+=" ⚠️ **key not found in data**"),r.push(n)}}r.push("")}e.footer&&(r.push("---"),r.push(`Footer: ${e.footer}`),r.push(""));const n=e.sections.reduce((e,t)=>e+(t.fields?.length||0)+(t.columns?.length||0),0),a=e.sections.flatMap(e=>e.fields||[]).filter(e=>!t.includes(e.key)).map(e=>e.key);return r.push("---"),r.push(`Summary: ${e.sections.length} section(s), ${n} field(s)/column(s)`),a.length>0?r.push(`⚠️ Missing keys: ${a.join(", ")}`):r.push("✅ All field keys found in data"),r.join("\n")}function J(e){const t=e.sections.map(e=>{if("table"===e.layout&&e.columns){const t=e.columns.slice(0,3).map(e=>e.header).join(", "),r=e.columns.length>3?`, +${e.columns.length-3} more`:"";return`${e.title} (table): ${t}${r}`}if("chart"===e.layout&&e.chart){const t=e.chart.spec.mark?"string"==typeof e.chart.spec.mark?e.chart.spec.mark:e.chart.spec.mark.type||"chart":"chart";return`${e.title} (${t} chart)`}if(e.fields){const t=e.fields.slice(0,3).map(e=>e.label).join(", "),r=e.fields.length>3?`, +${e.fields.length-3} more`:"";return`${e.title}: ${t}${r}`}return e.title});return`${e.title?`"${e.title}" - `:""}${t.join(" | ")}`}export{v as FieldRenderer,l as FieldTemplateSchema,d as FragmentTemplateSchema,q as FusionFragmentHandler,S as FusionFragmentProvider,I as FusionFragmentRenderer,K as SectionRenderer,c as SectionTemplateSchema,L as createFusionFragmentCodeBlockRenderer,u as findClosestKey,g as findSimilarKeys,W as formatAvailableKeys,R as formatValidationErrors,B as formatValidationSuccess,J as generateCompactPreview,O as generateSampleData,E as generateTextPreview,y as parseAndValidateTemplate,w as useFusionFragmentContext,C as useFusionFragmentContextSafe,m as validateTemplate};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useMemo as n,useCallback as a,createContext as o,useContext as i}from"react";import s from"ajv";const l={type:"object",properties:{label:{type:"string"},key:{type:"string"},format:{type:"string",enum:["text","number","currency","percent","date","boolean"],nullable:!0},unit:{type:"string",nullable:!0},editable:{type:"boolean",nullable:!0},inputType:{type:"string",enum:["text","number","date","select","checkbox"],nullable:!0},options:{type:"array",items:{type:"object",properties:{label:{type:"string"},value:{type:"string"}},required:["label","value"],additionalProperties:!1},nullable:!0},min:{type:"number",nullable:!0},max:{type:"number",nullable:!0},highlight:{type:"string",enum:["success","warning","error","info"],nullable:!0},tooltip:{type:"string",nullable:!0},decimals:{type:"number",nullable:!0},currency:{type:"string",nullable:!0}},required:["label","key"],additionalProperties:!1},c={type:"object",properties:{title:{type:"string"},layout:{type:"string",enum:["grid-2","grid-3","grid-4","list","table","chart"],nullable:!0},collapsed:{type:"boolean",nullable:!0},fields:{type:"array",items:l,nullable:!0},columns:{type:"array",items:{type:"object",properties:{header:{type:"string"},key:{type:"string"},format:{type:"string",enum:["text","number","currency","percent","date","boolean"],nullable:!0},width:{type:"string",nullable:!0},align:{type:"string",enum:["left","center","right"],nullable:!0},currency:{type:"string",nullable:!0},decimals:{type:"number",nullable:!0},highlight:{type:"string",enum:["success","warning","error","info"],nullable:!0}},required:["header","key"],additionalProperties:!1},nullable:!0},dataKey:{type:"string",nullable:!0},chart:{...{type:"object",properties:{title:{type:"string",nullable:!0},description:{type:"string",nullable:!0},spec:{type:"object",additionalProperties:!0},height:{type:"number",nullable:!0},width:{type:"number",nullable:!0},dataKey:{type:"string",nullable:!0}},required:["spec"],additionalProperties:!1},nullable:!0}},required:["title"],additionalProperties:!1},d={type:"object",properties:{title:{type:"string",nullable:!0},entityType:{type:"string",enum:["fund","scenario","portfolio","transaction","custom"],nullable:!0},sections:{type:"array",items:c},footer:{type:"string",nullable:!0}},required:["sections"],additionalProperties:!1};function p(e,t){const r=[];for(let t=0;t<=e.length;t++)r[t]=[t];for(let e=0;e<=t.length;e++)r[0][e]=e;for(let n=1;n<=e.length;n++)for(let a=1;a<=t.length;a++){const o=e[n-1]===t[a-1]?0:1;r[n][a]=Math.min(r[n-1][a]+1,r[n][a-1]+1,r[n-1][a-1]+o)}return r[e.length][t.length]}function u(e,t,r=3){if(0===t.length)return;const n=e.toLowerCase();let a,o=1/0;for(const e of t){const t=e.toLowerCase();if(n===t)return e;if(n.includes(t)||t.includes(n)){const r=Math.abs(n.length-t.length);r<o&&(o=r,a=e);continue}const i=p(n,t);i<o&&i<=r&&(o=i,a=e)}return a}function g(e,t,r=3){if(0===t.length)return[];const n=e.toLowerCase();return t.map(e=>({key:e,distance:p(n,e.toLowerCase())})).filter(({distance:e})=>e<=4).sort((e,t)=>e.distance-t.distance).slice(0,r).map(({key:e})=>e)}const h=new s({allErrors:!0,verbose:!0}).compile(d);function m(e,t){const r=[];if(!h(e)&&h.errors){for(const e of h.errors){const t=e.instancePath.replace(/^\//,"").replace(/\//g,".")||"root";let n,a=e.message||"Invalid value";if("enum"===e.keyword){n=`Valid values: ${e.params.allowedValues.join(", ")}`}else if("required"===e.keyword){a=`Missing required property: ${e.params.missingProperty}`}else if("additionalProperties"===e.keyword){a=`Unknown property: ${e.params.additionalProperty}`,n="Remove this property or check spelling"}r.push({path:t,message:a,suggestion:n})}return{valid:!1,errors:r}}const n=e;for(let e=0;e<n.sections.length;e++){const a=n.sections[e],o=`sections[${e}]`;if("table"!==a.layout)if("chart"!==a.layout)if(a.fields&&0!==a.fields.length)for(let e=0;e<a.fields.length;e++){const n=a.fields[e],i=`${o}.fields[${e}]`;if(!t.includes(n.key)){const e=u(n.key,t);r.push({path:`${i}.key`,message:`Unknown key '${n.key}'`,suggestion:e?`Did you mean '${e}'?`:void 0})}if(n.format){const e=f(n,i);r.push(...e)}"select"!==n.inputType||n.options&&0!==n.options.length||r.push({path:`${i}.options`,message:"Select input type requires options array",suggestion:'Add options: [{ label: "...", value: "..." }]'}),void 0!==n.min&&void 0!==n.max&&n.min>n.max&&r.push({path:`${i}.min`,message:`min (${n.min}) cannot be greater than max (${n.max})`,suggestion:"Swap min and max values"})}else r.push({path:`${o}.fields`,message:"Non-table/chart sections require fields array",suggestion:'Add fields: [{ label: "...", key: "..." }]'});else if(a.chart){if(a.chart.spec){const e=a.chart.spec;e.mark||e.layer||e.vconcat||e.hconcat||r.push({path:`${o}.chart.spec`,message:"Chart spec requires mark, layer, vconcat, or hconcat",suggestion:'Add mark: "bar" or mark: "line" etc.'})}else r.push({path:`${o}.chart.spec`,message:"Chart requires a Vega-Lite spec",suggestion:'Add spec: { mark: "bar", encoding: {...}, data: {...} }'});if(a.chart.dataKey&&!t.includes(a.chart.dataKey)){const e=u(a.chart.dataKey,t);r.push({path:`${o}.chart.dataKey`,message:`Unknown dataKey '${a.chart.dataKey}'`,suggestion:e?`Did you mean '${e}'?`:void 0})}}else r.push({path:`${o}.chart`,message:"Chart layout requires a chart specification",suggestion:'Add chart: { spec: { mark: "bar", encoding: {...} } }'});else if(a.columns&&0!==a.columns.length||r.push({path:`${o}.columns`,message:"Table layout requires columns array",suggestion:'Add columns: [{ header: "...", key: "..." }]'}),a.dataKey){if(!t.includes(a.dataKey)){const e=u(a.dataKey,t);r.push({path:`${o}.dataKey`,message:`Unknown dataKey '${a.dataKey}'`,suggestion:e?`Did you mean '${e}'?`:void 0})}}else r.push({path:`${o}.dataKey`,message:"Table layout requires dataKey to reference the data array",suggestion:'Add dataKey: "yourArrayKey"'})}return{valid:0===r.length,errors:r}}function f(e,t){const r=[];if(void 0!==e.decimals){const n=["number","currency","percent"];e.format&&!n.includes(e.format)&&r.push({path:`${t}.decimals`,message:"'decimals' only applies to number, currency, or percent formats",suggestion:`Remove 'decimals' or change format to one of: ${n.join(", ")}`})}if(void 0!==e.currency&&"currency"!==e.format&&r.push({path:`${t}.currency`,message:"'currency' only applies to currency format",suggestion:"Set format: 'currency' or remove 'currency' property"}),e.inputType&&e.format){const n={text:["text"],number:["number","text"],currency:["number","text"],percent:["number","text"],date:["date","text"],boolean:["checkbox"]}[e.format];n&&!n.includes(e.inputType)&&r.push({path:`${t}.inputType`,message:`inputType '${e.inputType}' is not compatible with format '${e.format}'`,suggestion:`Use one of: ${n.join(", ")}`})}return r}function y(e,t){let r;try{r=JSON.parse(e)}catch(e){return{valid:!1,errors:[{path:"root",message:`JSON parse error: ${e instanceof Error?e.message:"Invalid JSON"}`,suggestion:"Check JSON syntax (missing quotes, commas, brackets)"}]}}const n=m(r,t);return n.valid?{...n,template:r}:n}const b={container:{display:"flex",flexDirection:"column",gap:"2px",minWidth:0},label:{fontSize:"11px",fontWeight:500,color:"var(--gray-11, #6b7280)",textTransform:"uppercase",letterSpacing:"0.5px"},value:{fontSize:"14px",fontWeight:500,color:"var(--gray-12, #1f2937)",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontVariantNumeric:"tabular-nums",letterSpacing:"-0.02em"},unit:{fontSize:"12px",color:"var(--gray-10, #9ca3af)",marginLeft:"4px"},highlight:{success:{color:"var(--green-11, #15803d)"},warning:{color:"var(--yellow-11, #ca8a04)"},error:{color:"var(--red-11, #dc2626)"},info:{color:"var(--blue-11, #2563eb)"}},editable:{cursor:"pointer",padding:"2px 4px",borderRadius:"4px",transition:"background-color 0.15s"},nullValue:{color:"var(--gray-9, #9ca3af)",fontStyle:"italic"}};function v({field:o,value:i,onUpdate:s,agentMode:l}){const[c,d]=r(!1),p=n(()=>function(e,t){if(null==e)return"—";switch(t.format){case"number":{const r="number"==typeof e?e:parseFloat(String(e));if(isNaN(r))return String(e);const n={minimumFractionDigits:t.decimals??0,maximumFractionDigits:t.decimals??2};return new Intl.NumberFormat("en-US",n).format(r)}case"currency":{const r="number"==typeof e?e:parseFloat(String(e));if(isNaN(r))return String(e);const n={style:"currency",currency:t.currency||"USD",minimumFractionDigits:t.decimals??0,maximumFractionDigits:t.decimals??0};return new Intl.NumberFormat("en-US",n).format(r)}case"percent":{const r="number"==typeof e?e:parseFloat(String(e));if(isNaN(r))return String(e);const n=r<1&&r>-1&&0!==r?100*r:r,a=t.decimals??1;return`${n.toFixed(a)}%`}case"date":{if(!e)return"—";const t=e instanceof Date?e:new Date(String(e));return isNaN(t.getTime())?String(e):new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric"}).format(t)}case"boolean":return("boolean"==typeof e?e:"true"===e||"1"===e)?"Yes":"No";default:return String(e)}}(i,o),[i,o]),u=null==i,g=o.editable&&(s||l),h=a(()=>{g&&l?.enabled&&l.sendMessage&&l.sendMessage(`Please help me update the "${o.label}" field (key: ${o.key}). Current value: ${p}`)},[g,l,o,p]),m=n(()=>{const e={...b.value};return u?{...e,...b.nullValue}:o.highlight?{...e,...b.highlight[o.highlight]}:g?{...e,...b.editable,backgroundColor:c?"var(--gray-3, #f3f4f6)":"transparent"}:e},[u,o.highlight,g,c]);return e("div",{style:b.container,title:o.tooltip,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:h,role:g?"button":void 0,tabIndex:g?0:void 0,children:[t("span",{style:b.label,children:o.label}),e("span",{style:m,children:[p,o.unit&&!u&&t("span",{style:b.unit,children:o.unit})]})]})}const x={container:{width:"100%",overflowX:"auto"},table:{width:"100%",borderCollapse:"collapse",fontSize:"13px"},thead:{backgroundColor:"var(--gray-3, #f3f4f6)"},th:{padding:"10px 12px",textAlign:"left",fontWeight:600,fontSize:"11px",textTransform:"uppercase",letterSpacing:"0.5px",color:"var(--gray-11, #6b7280)",borderBottom:"2px solid var(--gray-5, #e5e7eb)"},td:{padding:"10px 12px",borderBottom:"1px solid var(--gray-4, #e5e7eb)",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontVariantNumeric:"tabular-nums"},empty:{padding:"20px",textAlign:"center",color:"var(--gray-10, #9ca3af)",fontStyle:"italic"},highlight:{success:{color:"var(--green-11, #15803d)"},warning:{color:"var(--yellow-11, #ca8a04)"},error:{color:"var(--red-11, #dc2626)"},info:{color:"var(--blue-11, #2563eb)"}}};function k({columns:r,rows:a}){const o=n(()=>r.reduce((e,t)=>(e[t.key]=t.align||("number"===t.format||"currency"===t.format||"percent"===t.format?"right":"left"),e),{}),[r]);return 0===a.length?t("div",{style:x.container,children:e("table",{style:x.table,children:[t("thead",{style:x.thead,children:t("tr",{children:r.map(e=>t("th",{style:{...x.th,textAlign:o[e.key],width:e.width},children:e.header},e.key))})}),t("tbody",{children:t("tr",{children:t("td",{colSpan:r.length,style:x.empty,children:"No data available"})})})]})}):t("div",{style:x.container,children:e("table",{style:x.table,children:[t("thead",{style:x.thead,children:t("tr",{children:r.map(e=>t("th",{style:{...x.th,textAlign:o[e.key],width:e.width},children:e.header},e.key))})}),t("tbody",{children:a.map((e,n)=>t("tr",{children:r.map(r=>{const n=function(e,t){if(null==e)return"—";switch(t.format){case"number":{const r="number"==typeof e?e:parseFloat(String(e));return isNaN(r)?String(e):new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:t.decimals??2}).format(r)}case"currency":{const r="number"==typeof e?e:parseFloat(String(e));return isNaN(r)?String(e):new Intl.NumberFormat("en-US",{style:"currency",currency:t.currency||"USD",minimumFractionDigits:t.decimals??0,maximumFractionDigits:t.decimals??0}).format(r)}case"percent":{const r="number"==typeof e?e:parseFloat(String(e));return isNaN(r)?String(e):`${(r<1&&r>-1&&0!==r?100*r:r).toFixed(t.decimals??1)}%`}case"date":{const t=e instanceof Date?e:new Date(String(e));return isNaN(t.getTime())?String(e):new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric"}).format(t)}case"boolean":return e?"Yes":"No";default:return String(e)}}(e[r.key],r),a={...x.td,textAlign:o[r.key],...r.highlight?x.highlight[r.highlight]:{}};return t("td",{style:a,children:n},r.key)})},n))})]})})}const $=o(null);function S({data:e,onUpdate:r,sendMessage:a,ChartComponent:o,artifactRunId:i,children:s}){const l=n(()=>({data:e,onUpdate:r,sendMessage:a,ChartComponent:o,artifactRunId:i}),[e,r,a,o,i]);return t($.Provider,{value:l,children:s})}function w(){const e=i($);if(!e)throw new Error("useFusionFragmentContext must be used within a FusionFragmentProvider");return e}function C(){return i($)}function N({chart:r,data:n,className:a}){const o=C(),i=o?.ChartComponent,s=o?.artifactRunId,l={...r.spec};if(r.dataKey&&n[r.dataKey]){const e=n[r.dataKey];Array.isArray(e)&&(l.data={values:e})}const c={library:"vega-lite",title:r.title,description:r.description,spec:l,options:{height:r.height}};return i?t("div",{className:a,children:t(i,{spec:c,artifactRunId:s})}):e("div",{className:a,style:{padding:"16px",backgroundColor:"var(--gray-2, #f9fafb)",border:"1px solid var(--gray-5, #e5e7eb)",borderRadius:"8px",minHeight:r.height||280},children:[r.title&&t("div",{style:{fontSize:"14px",fontWeight:600,marginBottom:"8px",color:"var(--gray-12, #111827)"},children:r.title}),r.description&&t("div",{style:{fontSize:"12px",color:"var(--gray-11, #6b7280)",marginBottom:"12px"},children:r.description}),t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:(r.height||280)-60,backgroundColor:"var(--gray-3, #f3f4f6)",borderRadius:"4px",color:"var(--gray-11, #6b7280)",fontSize:"12px"},"data-vega-spec":JSON.stringify(c),children:e("div",{style:{textAlign:"center"},children:[e("div",{style:{marginBottom:"4px"},children:["Chart: ",l.mark?String("string"==typeof l.mark?l.mark:l.mark.type):"composite"]}),l.data?.values&&e("div",{style:{fontSize:"11px",opacity:.8},children:[l.data.values.length," data points"]})]})})]})}const T={"grid-2":{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"16px"},"grid-3":{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"16px"},"grid-4":{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"16px"},list:{display:"flex",flexDirection:"column",gap:"12px"}},F={section:{marginBottom:"20px"},header:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px",cursor:"default"},headerCollapsible:{cursor:"pointer",userSelect:"none"},title:{fontSize:"11px",fontWeight:600,color:"var(--gray-11, #6b7280)",textTransform:"uppercase",letterSpacing:"0.5px"},chevron:{width:"14px",height:"14px",color:"var(--gray-10, #9ca3af)",transition:"transform 0.2s"},chevronCollapsed:{transform:"rotate(-90deg)"},content:{overflow:"hidden",transition:"max-height 0.2s ease-out"},contentCollapsed:{maxHeight:"0",opacity:0},contentExpanded:{maxHeight:"2000px",opacity:1}};function j({collapsed:e}){return t("svg",{style:{...F.chevron,...e?F.chevronCollapsed:{}},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t("polyline",{points:"6 9 12 15 18 9"})})}function D({section:a,data:o,onUpdate:i,agentMode:s}){const[l,c]=r(a.collapsed??!1),d=a.layout||"grid-3",p="table"===d,u="chart"===d,g=void 0!==a.collapsed,h=n(()=>{if(!p||!a.dataKey)return[];const e=o[a.dataKey];return Array.isArray(e)?e:[]},[p,a.dataKey,o]),m=n(()=>({...F.header,...g?F.headerCollapsible:{}}),[g]),f=n(()=>({...F.content,...p||u?{}:T[d],...l?F.contentCollapsed:F.contentExpanded}),[l,p,u,d]);return e("div",{style:F.section,children:[e("div",{style:m,onClick:()=>{g&&c(!l)},role:g?"button":void 0,"aria-expanded":g?!l:void 0,children:[g&&t(j,{collapsed:l}),t("span",{style:F.title,children:a.title})]}),t("div",{style:f,children:p&&a.columns?t(k,{columns:a.columns,rows:h}):u&&a.chart?t(N,{chart:a.chart,data:o}):a.fields?.map((e,r)=>t(v,{field:e,value:o[e.key],onUpdate:i?t=>i(e.key,t):void 0,agentMode:s},e.key||r))})]})}const K={container:{backgroundColor:"var(--gray-2, #f9fafb)",border:"1px solid var(--gray-5, #e5e7eb)",borderRadius:"8px",padding:"16px 20px"},title:{fontSize:"16px",fontWeight:600,color:"var(--gray-12, #1f2937)",marginBottom:"16px",paddingBottom:"12px",borderBottom:"1px solid var(--gray-5, #e5e7eb)"},footer:{fontSize:"12px",color:"var(--gray-10, #9ca3af)",marginTop:"16px",paddingTop:"12px",borderTop:"1px solid var(--gray-5, #e5e7eb)"},error:{backgroundColor:"var(--red-2, #fef2f2)",border:"1px solid var(--red-6, #fca5a5)",borderRadius:"8px",padding:"16px"},errorTitle:{fontSize:"14px",fontWeight:600,color:"var(--red-11, #dc2626)",marginBottom:"12px"},errorList:{listStyle:"none",padding:0,margin:0},errorItem:{fontSize:"13px",color:"var(--red-11, #dc2626)",marginBottom:"8px",fontFamily:"var(--font-mono, ui-monospace, monospace)"},errorPath:{fontSize:"11px",color:"var(--red-9, #ef4444)",display:"block"},errorSuggestion:{fontSize:"12px",color:"var(--gray-11, #6b7280)",marginTop:"4px",fontStyle:"italic"}};function M({errors:r}){return e("div",{style:K.error,children:[e("div",{style:K.errorTitle,children:["Template Validation Failed (",r.length," error",r.length>1?"s":"",")"]}),t("ul",{style:K.errorList,children:r.map((r,n)=>e("li",{style:K.errorItem,children:[t("span",{children:r.message}),e("span",{style:K.errorPath,children:["at ",r.path]}),r.suggestion&&e("span",{style:K.errorSuggestion,children:["\\u2192 ",r.suggestion]})]},n))})]})}function U({template:r,data:a,onUpdate:o,agentMode:i,className:s}){const l=n(()=>{const e=Object.keys(a);return m(r,e)},[r,a]);return l.valid?e("div",{style:K.container,className:s,children:[r.title&&t("div",{style:K.title,children:r.title}),r.sections.map((e,r)=>t(D,{section:e,data:a,onUpdate:o,agentMode:i},e.title||r)),r.footer&&t("div",{style:K.footer,children:r.footer})]}):t(M,{errors:l.errors})}const I={error:{backgroundColor:"var(--red-2, #fef2f2)",border:"1px solid var(--red-6, #fca5a5)",borderRadius:"8px",padding:"16px",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:"13px"},errorTitle:{fontWeight:600,color:"var(--red-11, #dc2626)",marginBottom:"8px"},errorMessage:{color:"var(--red-10, #ef4444)",whiteSpace:"pre-wrap"},noContext:{backgroundColor:"var(--yellow-2, #fefce8)",border:"1px solid var(--yellow-6, #fde047)",borderRadius:"8px",padding:"16px"},noContextTitle:{fontSize:"14px",fontWeight:600,color:"var(--yellow-11, #ca8a04)",marginBottom:"8px"},noContextMessage:{fontSize:"13px",color:"var(--gray-11, #6b7280)"},loading:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"12px",minHeight:"150px",borderRadius:"8px",border:"1px solid var(--gray-6, #e5e7eb)",backgroundColor:"var(--gray-2, #f9fafb)"},loadingIcon:{width:"32px",height:"32px",color:"var(--gray-9, #9ca3af)"},loadingText:{fontSize:"14px",color:"var(--gray-9, #9ca3af)"},loadingDots:{display:"flex",gap:"4px"},loadingDot:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:"var(--gray-6, #d1d5db)",animation:"fusion-fragment-bounce 1s infinite"}};function A(){return e("div",{style:I.loading,children:[t("style",{children:"\n @keyframes fusion-fragment-bounce {\n 0%, 80%, 100% { transform: translateY(0); }\n 40% { transform: translateY(-6px); }\n }\n "}),e("svg",{style:I.loadingIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t("polyline",{points:"16 18 22 12 16 6"}),t("polyline",{points:"8 6 2 12 8 18"})]}),t("span",{style:I.loadingText,children:"Loading fragment..."}),t("div",{style:I.loadingDots,children:[0,1,2].map(e=>t("div",{style:{...I.loadingDot,animationDelay:150*e+"ms"}},e))})]})}function z({message:r}){return e("div",{style:I.error,children:[t("div",{style:I.errorTitle,children:"Failed to parse fusion-fragment"}),t("div",{style:I.errorMessage,children:r})]})}function P({template:r}){const n=r.sections.flatMap(e=>e.fields||[]).map(e=>e.key);return e("div",{style:I.noContext,children:[t("div",{style:I.noContextTitle,children:"No data context available"}),e("div",{style:I.noContextMessage,children:["This fusion-fragment requires data with keys: ",n.join(", "),".",t("br",{}),"Wrap this component in a FusionFragmentProvider with the required data."]})]})}function q({code:e,data:r,onUpdate:a}){const o=C(),i=r??o?.data,s=a??o?.onUpdate,l=o?.sendMessage,c=n(()=>function(e){const t=e.trim();if(t.length<2)return!0;if(!t.startsWith("{"))return!1;try{return JSON.parse(t),!1}catch(e){const r=["unexpected end","unterminated string","expected","unexpected token"],n=(e instanceof Error?e.message:"").toLowerCase();if(r.some(e=>n.includes(e))){let e=0,r=0,n=!1,a=!1;for(const o of t)a?a=!1:"\\"!==o?'"'!==o?n||("{"===o?e++:"}"===o?e--:"["===o?r++:"]"===o&&r--):n=!n:a=!0;return e>0||r>0||n}return!1}}(e),[e]),d=n(()=>{if(c)return{valid:!1,errors:[],template:void 0};const t=i?Object.keys(i):[];return y(e,t)},[e,i,c]);if(c)return t(A,{});if(!d.valid&&!d.template){const e=d.errors.find(e=>"root"===e.path&&e.message.includes("JSON"));if(e)return t(z,{message:e.message})}return d.template&&!i?t(P,{template:d.template}):d.template&&i?t(U,{template:d.template,data:i,onUpdate:s,agentMode:l?{enabled:!0,sendMessage:l}:void 0}):t(z,{message:d.errors.map(e=>`${e.path}: ${e.message}`).join("\n")})}function L(){return{language:"fusion-fragment",component:q}}function B(e){if(0===e.length)return"Template is valid.";return`Template validation failed with ${e.length} error${e.length>1?"s":""}:\n`+"\n"+e.map((e,t)=>{let r=`${t+1}. ${e.message}`;return r+=`\n Path: ${e.path}`,e.suggestion&&(r+=`\n → ${e.suggestion}`),r}).join("\n\n")}function R(e,t){const r=["Template valid. Preview:"];r.push(""),e.title&&(r.push(`**${e.title}**`),r.push(""));for(const n of e.sections){const e=n.fields.length;r.push(`[${n.title}] ${e} field${e>1?"s":""}:`);for(const e of n.fields){let n=`- ${e.label} (${e.key}`;e.format&&"text"!==e.format&&(n+=`, ${e.format}`),n+=")",t.includes(e.key)||(n+=" ⚠️ key not in data"),r.push(n)}r.push("")}return r.join("\n")}function W(e,t=!0){if(0===e.length)return"No data keys available.";if(!t||e.length<=10)return`Available keys: ${e.join(", ")}`;const r=new Map;for(const t of e){const e=t.indexOf(".");if(e>0){const n=t.substring(0,e),a=t.substring(e+1),o=r.get(n)||[];o.push(a),r.set(n,o)}else{const e=r.get("")||[];e.push(t),r.set("",e)}}const n=["Available keys:"],a=r.get("");a&&a.length>0&&n.push(` ${a.join(", ")}`);for(const[e,t]of r)""!==e&&(t.length<=3?n.push(` ${e}: ${t.join(", ")}`):n.push(` ${e}: ${t.slice(0,3).join(", ")}, ... (${t.length} total)`));return n.join("\n")}function O(e,t){const r={};for(const e of t)r[e]=`<${e}>`;for(const t of e.sections)if(t.fields)for(const e of t.fields)e.key in r&&(r[e.key]=V(e));return r}function V(e){switch(e.format){case"number":return 1234;case"currency":return 1e6;case"percent":return 25;case"date":return(new Date).toISOString().split("T")[0];case"boolean":return!0;default:return`Sample ${e.label}`}}function E(e,t){const r=[];r.push("Template structure preview:"),r.push(""),e.title&&(r.push(`## ${e.title}`),r.push(""));for(const n of e.sections){const e=n.layout||"grid-3";if(r.push(`### ${n.title}`),"table"===e){if(r.push("Layout: table"),n.dataKey&&r.push(`Data key: \`${n.dataKey}\``),r.push(""),n.columns){r.push("Columns:");for(const e of n.columns){let t=`- **${e.header}** → \`${e.key}\``;e.format&&"text"!==e.format&&(t+=` (${e.format})`),r.push(t)}}}else if("chart"===e){if(r.push("Layout: chart"),n.chart){const e=n.chart;e.title&&r.push(`Chart title: ${e.title}`),e.description&&r.push(`Description: ${e.description}`);const a=e.spec.mark?"string"==typeof e.spec.mark?e.spec.mark:e.spec.mark.type||"unknown":"composite";r.push(`Chart type: ${a}`),e.dataKey?(r.push(`Data key: \`${e.dataKey}\``),t.includes(e.dataKey)||r.push("⚠️ **dataKey not found in data**")):e.spec.data?.values&&r.push(`Inline data: ${e.spec.data.values.length} points`),e.height&&r.push(`Height: ${e.height}px`)}r.push("")}else{const a="list"===e?"vertical list":`${e.split("-")[1]}-column grid`;if(r.push(`Layout: ${a}${n.collapsed?" (collapsed by default)":""}`),r.push(""),n.fields)for(const e of n.fields){let n=`- **${e.label}** → \`${e.key}\``;const a=[];e.format&&"text"!==e.format&&a.push(e.format),e.unit&&a.push(`unit: "${e.unit}"`),e.editable&&a.push("editable"),e.highlight&&a.push(`highlight: ${e.highlight}`),a.length>0&&(n+=` (${a.join(", ")})`),t.includes(e.key)||(n+=" ⚠️ **key not found in data**"),r.push(n)}}r.push("")}e.footer&&(r.push("---"),r.push(`Footer: ${e.footer}`),r.push(""));const n=e.sections.reduce((e,t)=>e+(t.fields?.length||0)+(t.columns?.length||0),0),a=e.sections.flatMap(e=>e.fields||[]).filter(e=>!t.includes(e.key)).map(e=>e.key);return r.push("---"),r.push(`Summary: ${e.sections.length} section(s), ${n} field(s)/column(s)`),a.length>0?r.push(`⚠️ Missing keys: ${a.join(", ")}`):r.push("✅ All field keys found in data"),r.join("\n")}function J(e){const t=e.sections.map(e=>{if("table"===e.layout&&e.columns){const t=e.columns.slice(0,3).map(e=>e.header).join(", "),r=e.columns.length>3?`, +${e.columns.length-3} more`:"";return`${e.title} (table): ${t}${r}`}if("chart"===e.layout&&e.chart){const t=e.chart.spec.mark?"string"==typeof e.chart.spec.mark?e.chart.spec.mark:e.chart.spec.mark.type||"chart":"chart";return`${e.title} (${t} chart)`}if(e.fields){const t=e.fields.slice(0,3).map(e=>e.label).join(", "),r=e.fields.length>3?`, +${e.fields.length-3} more`:"";return`${e.title}: ${t}${r}`}return e.title});return`${e.title?`"${e.title}" - `:""}${t.join(" | ")}`}export{v as FieldRenderer,l as FieldTemplateSchema,d as FragmentTemplateSchema,q as FusionFragmentHandler,S as FusionFragmentProvider,U as FusionFragmentRenderer,D as SectionRenderer,c as SectionTemplateSchema,L as createFusionFragmentCodeBlockRenderer,u as findClosestKey,g as findSimilarKeys,W as formatAvailableKeys,B as formatValidationErrors,R as formatValidationSuccess,J as generateCompactPreview,O as generateSampleData,E as generateTextPreview,y as parseAndValidateTemplate,w as useFusionFragmentContext,C as useFusionFragmentContextSafe,m as validateTemplate};
2
2
  //# sourceMappingURL=vertesia-fusion-ux.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vertesia-fusion-ux.js","sources":["esm/validation/schemas.js","esm/validation/fuzzyMatch.js","esm/validation/validateTemplate.js","esm/fusion-fragment/FieldRenderer.js","esm/fusion-fragment/TableRenderer.js","esm/fusion-fragment/FusionFragmentContext.js","esm/fusion-fragment/ChartRenderer.js","esm/fusion-fragment/SectionRenderer.js","esm/fusion-fragment/FusionFragmentRenderer.js","esm/fusion-fragment/FusionFragmentHandler.js","esm/validation/formatErrors.js","esm/render/textPreview.js"],"sourcesContent":["/**\n * JSON Schemas for template validation using AJV\n */\n/**\n * Schema for field options (select dropdowns)\n */\nconst FieldOptionSchema = {\n type: 'object',\n properties: {\n label: { type: 'string' },\n value: { type: 'string' }\n },\n required: ['label', 'value'],\n additionalProperties: false\n};\n/**\n * Schema for a single field template\n */\nexport const FieldTemplateSchema = {\n type: 'object',\n properties: {\n label: { type: 'string' },\n key: { type: 'string' },\n format: {\n type: 'string',\n enum: ['text', 'number', 'currency', 'percent', 'date', 'boolean'],\n nullable: true\n },\n unit: { type: 'string', nullable: true },\n editable: { type: 'boolean', nullable: true },\n inputType: {\n type: 'string',\n enum: ['text', 'number', 'date', 'select', 'checkbox'],\n nullable: true\n },\n options: {\n type: 'array',\n items: FieldOptionSchema,\n nullable: true\n },\n min: { type: 'number', nullable: true },\n max: { type: 'number', nullable: true },\n highlight: {\n type: 'string',\n enum: ['success', 'warning', 'error', 'info'],\n nullable: true\n },\n tooltip: { type: 'string', nullable: true },\n decimals: { type: 'number', nullable: true },\n currency: { type: 'string', nullable: true }\n },\n required: ['label', 'key'],\n additionalProperties: false\n};\n/**\n * Schema for a table column template\n */\nexport const ColumnTemplateSchema = {\n type: 'object',\n properties: {\n header: { type: 'string' },\n key: { type: 'string' },\n format: {\n type: 'string',\n enum: ['text', 'number', 'currency', 'percent', 'date', 'boolean'],\n nullable: true\n },\n width: { type: 'string', nullable: true },\n align: {\n type: 'string',\n enum: ['left', 'center', 'right'],\n nullable: true\n },\n currency: { type: 'string', nullable: true },\n decimals: { type: 'number', nullable: true },\n highlight: {\n type: 'string',\n enum: ['success', 'warning', 'error', 'info'],\n nullable: true\n }\n },\n required: ['header', 'key'],\n additionalProperties: false\n};\n/**\n * Schema for Vega-Lite spec (flexible - allows any valid Vega-Lite properties)\n * We validate structure loosely and let Vega-Lite handle detailed validation\n * Note: Using loose typing since VegaLiteSpec is intentionally flexible\n */\nexport const VegaLiteSpecSchema = {\n type: 'object',\n additionalProperties: true, // Allow any Vega-Lite properties\n // We don't enforce specific properties since Vega-Lite has many valid forms\n};\n/**\n * Schema for chart template\n * Note: Using loose typing for spec since VegaLiteSpec is flexible\n */\nexport const ChartTemplateSchema = {\n type: 'object',\n properties: {\n title: { type: 'string', nullable: true },\n description: { type: 'string', nullable: true },\n spec: VegaLiteSpecSchema,\n height: { type: 'number', nullable: true },\n width: { type: 'number', nullable: true },\n dataKey: { type: 'string', nullable: true }\n },\n required: ['spec'],\n additionalProperties: false\n};\n/**\n * Schema for a section template\n * Note: Using type assertion due to ChartTemplate's flexible VegaLiteSpec\n */\nexport const SectionTemplateSchema = {\n type: 'object',\n properties: {\n title: { type: 'string' },\n layout: {\n type: 'string',\n enum: ['grid-2', 'grid-3', 'grid-4', 'list', 'table', 'chart'],\n nullable: true\n },\n collapsed: { type: 'boolean', nullable: true },\n fields: {\n type: 'array',\n items: FieldTemplateSchema,\n nullable: true\n },\n columns: {\n type: 'array',\n items: ColumnTemplateSchema,\n nullable: true\n },\n dataKey: { type: 'string', nullable: true },\n chart: {\n ...ChartTemplateSchema,\n nullable: true\n }\n },\n required: ['title'],\n additionalProperties: false\n};\n/**\n * Schema for the root fragment template\n */\nexport const FragmentTemplateSchema = {\n type: 'object',\n properties: {\n title: { type: 'string', nullable: true },\n entityType: {\n type: 'string',\n enum: ['fund', 'scenario', 'portfolio', 'transaction', 'custom'],\n nullable: true\n },\n sections: {\n type: 'array',\n items: SectionTemplateSchema\n },\n footer: { type: 'string', nullable: true }\n },\n required: ['sections'],\n additionalProperties: false\n};\n//# sourceMappingURL=schemas.js.map","/**\n * Fuzzy matching utilities for key suggestions\n * Uses Levenshtein distance for finding similar keys\n */\n/**\n * Calculate Levenshtein distance between two strings\n */\nexport function levenshteinDistance(a, b) {\n const matrix = [];\n // Initialize first column\n for (let i = 0; i <= a.length; i++) {\n matrix[i] = [i];\n }\n // Initialize first row\n for (let j = 0; j <= b.length; j++) {\n matrix[0][j] = j;\n }\n // Fill in the rest of the matrix\n for (let i = 1; i <= a.length; i++) {\n for (let j = 1; j <= b.length; j++) {\n const cost = a[i - 1] === b[j - 1] ? 0 : 1;\n matrix[i][j] = Math.min(matrix[i - 1][j] + 1, // deletion\n matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j - 1] + cost // substitution\n );\n }\n }\n return matrix[a.length][b.length];\n}\n/**\n * Find the closest matching key from a list of valid keys\n * @param input - The key that wasn't found\n * @param validKeys - List of valid keys to search\n * @param maxDistance - Maximum edit distance to consider (default: 3)\n * @returns The closest key, or undefined if none are close enough\n */\nexport function findClosestKey(input, validKeys, maxDistance = 3) {\n if (validKeys.length === 0)\n return undefined;\n const inputLower = input.toLowerCase();\n let bestMatch;\n let bestDistance = Infinity;\n for (const key of validKeys) {\n const keyLower = key.toLowerCase();\n // Exact case-insensitive match\n if (inputLower === keyLower) {\n return key;\n }\n // Check if input is a substring or key is a substring\n if (inputLower.includes(keyLower) || keyLower.includes(inputLower)) {\n const distance = Math.abs(inputLower.length - keyLower.length);\n if (distance < bestDistance) {\n bestDistance = distance;\n bestMatch = key;\n }\n continue;\n }\n // Levenshtein distance\n const distance = levenshteinDistance(inputLower, keyLower);\n if (distance < bestDistance && distance <= maxDistance) {\n bestDistance = distance;\n bestMatch = key;\n }\n }\n return bestMatch;\n}\n/**\n * Find multiple similar keys, sorted by relevance\n * @param input - The key that wasn't found\n * @param validKeys - List of valid keys to search\n * @param maxResults - Maximum number of suggestions (default: 3)\n * @returns Array of similar keys\n */\nexport function findSimilarKeys(input, validKeys, maxResults = 3) {\n if (validKeys.length === 0)\n return [];\n const inputLower = input.toLowerCase();\n const scored = validKeys\n .map(key => ({\n key,\n distance: levenshteinDistance(inputLower, key.toLowerCase())\n }))\n .filter(({ distance }) => distance <= 4) // Filter out very different keys\n .sort((a, b) => a.distance - b.distance);\n return scored.slice(0, maxResults).map(({ key }) => key);\n}\n//# sourceMappingURL=fuzzyMatch.js.map","/**\n * Core template validation logic\n * Two-stage validation: Schema (AJV) + Semantic (custom)\n */\nimport Ajv from 'ajv';\nimport { FragmentTemplateSchema } from './schemas.js';\nimport { findClosestKey } from './fuzzyMatch.js';\n// Create AJV instance with all errors enabled\nconst ajv = new Ajv({ allErrors: true, verbose: true });\n// Compile the schema\nconst validateSchema = ajv.compile(FragmentTemplateSchema);\n/**\n * Validate a template against schema and data keys\n * @param template - The template to validate (unknown for parsing)\n * @param dataKeys - Available keys in the data\n * @returns Validation result with errors\n */\nexport function validateTemplate(template, dataKeys) {\n const errors = [];\n // Stage 1: Schema validation\n const valid = validateSchema(template);\n if (!valid && validateSchema.errors) {\n for (const error of validateSchema.errors) {\n const path = error.instancePath.replace(/^\\//, '').replace(/\\//g, '.') || 'root';\n let message = error.message || 'Invalid value';\n let suggestion;\n // Enhance error messages\n if (error.keyword === 'enum') {\n const allowedValues = error.params.allowedValues;\n suggestion = `Valid values: ${allowedValues.join(', ')}`;\n }\n else if (error.keyword === 'required') {\n const missingProp = error.params.missingProperty;\n message = `Missing required property: ${missingProp}`;\n }\n else if (error.keyword === 'additionalProperties') {\n const extraProp = error.params.additionalProperty;\n message = `Unknown property: ${extraProp}`;\n suggestion = 'Remove this property or check spelling';\n }\n errors.push({ path, message, suggestion });\n }\n return { valid: false, errors };\n }\n // Stage 2: Semantic validation (key existence)\n const typedTemplate = template;\n for (let sectionIndex = 0; sectionIndex < typedTemplate.sections.length; sectionIndex++) {\n const section = typedTemplate.sections[sectionIndex];\n const sectionPath = `sections[${sectionIndex}]`;\n // Validate table sections\n if (section.layout === 'table') {\n if (!section.columns || section.columns.length === 0) {\n errors.push({\n path: `${sectionPath}.columns`,\n message: 'Table layout requires columns array',\n suggestion: 'Add columns: [{ header: \"...\", key: \"...\" }]'\n });\n }\n if (!section.dataKey) {\n errors.push({\n path: `${sectionPath}.dataKey`,\n message: 'Table layout requires dataKey to reference the data array',\n suggestion: 'Add dataKey: \"yourArrayKey\"'\n });\n }\n else if (!dataKeys.includes(section.dataKey)) {\n const closest = findClosestKey(section.dataKey, dataKeys);\n errors.push({\n path: `${sectionPath}.dataKey`,\n message: `Unknown dataKey '${section.dataKey}'`,\n suggestion: closest ? `Did you mean '${closest}'?` : undefined\n });\n }\n // Skip field validation for table sections\n continue;\n }\n // Validate chart sections\n if (section.layout === 'chart') {\n if (!section.chart) {\n errors.push({\n path: `${sectionPath}.chart`,\n message: 'Chart layout requires a chart specification',\n suggestion: 'Add chart: { spec: { mark: \"bar\", encoding: {...} } }'\n });\n }\n else {\n // Validate chart spec has required properties\n if (!section.chart.spec) {\n errors.push({\n path: `${sectionPath}.chart.spec`,\n message: 'Chart requires a Vega-Lite spec',\n suggestion: 'Add spec: { mark: \"bar\", encoding: {...}, data: {...} }'\n });\n }\n else {\n // Check for mark or layer/concat\n const spec = section.chart.spec;\n const hasContent = spec.mark || spec.layer || spec.vconcat || spec.hconcat;\n if (!hasContent) {\n errors.push({\n path: `${sectionPath}.chart.spec`,\n message: 'Chart spec requires mark, layer, vconcat, or hconcat',\n suggestion: 'Add mark: \"bar\" or mark: \"line\" etc.'\n });\n }\n }\n // Validate dataKey if provided\n if (section.chart.dataKey && !dataKeys.includes(section.chart.dataKey)) {\n const closest = findClosestKey(section.chart.dataKey, dataKeys);\n errors.push({\n path: `${sectionPath}.chart.dataKey`,\n message: `Unknown dataKey '${section.chart.dataKey}'`,\n suggestion: closest ? `Did you mean '${closest}'?` : undefined\n });\n }\n }\n // Skip field validation for chart sections\n continue;\n }\n // Validate non-table/non-chart sections have fields\n if (!section.fields || section.fields.length === 0) {\n errors.push({\n path: `${sectionPath}.fields`,\n message: 'Non-table/chart sections require fields array',\n suggestion: 'Add fields: [{ label: \"...\", key: \"...\" }]'\n });\n continue;\n }\n for (let fieldIndex = 0; fieldIndex < section.fields.length; fieldIndex++) {\n const field = section.fields[fieldIndex];\n const path = `${sectionPath}.fields[${fieldIndex}]`;\n // Check if key exists in data\n if (!dataKeys.includes(field.key)) {\n const closest = findClosestKey(field.key, dataKeys);\n errors.push({\n path: `${path}.key`,\n message: `Unknown key '${field.key}'`,\n suggestion: closest ? `Did you mean '${closest}'?` : undefined\n });\n }\n // Check format compatibility (basic type checking)\n if (field.format) {\n const formatErrors = validateFormatCompatibility(field, path);\n errors.push(...formatErrors);\n }\n // Check select options\n if (field.inputType === 'select' && (!field.options || field.options.length === 0)) {\n errors.push({\n path: `${path}.options`,\n message: 'Select input type requires options array',\n suggestion: 'Add options: [{ label: \"...\", value: \"...\" }]'\n });\n }\n // Check min/max for number inputs\n if (field.min !== undefined && field.max !== undefined && field.min > field.max) {\n errors.push({\n path: `${path}.min`,\n message: `min (${field.min}) cannot be greater than max (${field.max})`,\n suggestion: 'Swap min and max values'\n });\n }\n }\n }\n return {\n valid: errors.length === 0,\n errors\n };\n}\n/**\n * Validate format compatibility\n */\nfunction validateFormatCompatibility(field, path) {\n const errors = [];\n // Check decimals is only used with number/currency/percent\n if (field.decimals !== undefined) {\n const validFormats = ['number', 'currency', 'percent'];\n if (field.format && !validFormats.includes(field.format)) {\n errors.push({\n path: `${path}.decimals`,\n message: `'decimals' only applies to number, currency, or percent formats`,\n suggestion: `Remove 'decimals' or change format to one of: ${validFormats.join(', ')}`\n });\n }\n }\n // Check currency is only used with currency format\n if (field.currency !== undefined && field.format !== 'currency') {\n errors.push({\n path: `${path}.currency`,\n message: `'currency' only applies to currency format`,\n suggestion: `Set format: 'currency' or remove 'currency' property`\n });\n }\n // Check inputType compatibility with format\n if (field.inputType && field.format) {\n const compatMap = {\n text: ['text'],\n number: ['number', 'text'],\n currency: ['number', 'text'],\n percent: ['number', 'text'],\n date: ['date', 'text'],\n boolean: ['checkbox']\n };\n const validInputs = compatMap[field.format];\n if (validInputs && !validInputs.includes(field.inputType)) {\n errors.push({\n path: `${path}.inputType`,\n message: `inputType '${field.inputType}' is not compatible with format '${field.format}'`,\n suggestion: `Use one of: ${validInputs.join(', ')}`\n });\n }\n }\n return errors;\n}\n/**\n * Parse and validate a JSON string as a template\n * @param jsonString - JSON string to parse\n * @param dataKeys - Available data keys\n * @returns Validation result with parsed template if valid\n */\nexport function parseAndValidateTemplate(jsonString, dataKeys) {\n // Try to parse JSON\n let parsed;\n try {\n parsed = JSON.parse(jsonString);\n }\n catch (err) {\n const message = err instanceof Error ? err.message : 'Invalid JSON';\n return {\n valid: false,\n errors: [{\n path: 'root',\n message: `JSON parse error: ${message}`,\n suggestion: 'Check JSON syntax (missing quotes, commas, brackets)'\n }]\n };\n }\n // Validate the parsed template\n const result = validateTemplate(parsed, dataKeys);\n if (result.valid) {\n return {\n ...result,\n template: parsed\n };\n }\n return result;\n}\n//# sourceMappingURL=validateTemplate.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * FieldRenderer component\n * Renders a single field with formatting and optional edit capability\n */\nimport { useMemo, useState, useCallback } from 'react';\n// Styles as constants\nconst styles = {\n container: {\n display: 'flex',\n flexDirection: 'column',\n gap: '2px',\n minWidth: 0, // Allow text truncation\n },\n label: {\n fontSize: '11px',\n fontWeight: 500,\n color: 'var(--gray-11, #6b7280)',\n textTransform: 'uppercase',\n letterSpacing: '0.5px',\n },\n value: {\n fontSize: '14px',\n fontWeight: 500,\n color: 'var(--gray-12, #1f2937)',\n fontFamily: 'var(--font-mono, ui-monospace, monospace)',\n fontVariantNumeric: 'tabular-nums',\n letterSpacing: '-0.02em',\n },\n unit: {\n fontSize: '12px',\n color: 'var(--gray-10, #9ca3af)',\n marginLeft: '4px',\n },\n highlight: {\n success: { color: 'var(--green-11, #15803d)' },\n warning: { color: 'var(--yellow-11, #ca8a04)' },\n error: { color: 'var(--red-11, #dc2626)' },\n info: { color: 'var(--blue-11, #2563eb)' },\n },\n editable: {\n cursor: 'pointer',\n padding: '2px 4px',\n borderRadius: '4px',\n transition: 'background-color 0.15s',\n },\n tooltip: {\n position: 'relative',\n },\n nullValue: {\n color: 'var(--gray-9, #9ca3af)',\n fontStyle: 'italic',\n },\n};\n/**\n * Format a value according to the field's format specification\n */\nfunction formatValue(value, field) {\n if (value === null || value === undefined) {\n return '\\u2014'; // em-dash for null/undefined\n }\n switch (field.format) {\n case 'number': {\n const num = typeof value === 'number' ? value : parseFloat(String(value));\n if (isNaN(num))\n return String(value);\n const options = {\n minimumFractionDigits: field.decimals ?? 0,\n maximumFractionDigits: field.decimals ?? 2,\n };\n return new Intl.NumberFormat('en-US', options).format(num);\n }\n case 'currency': {\n const num = typeof value === 'number' ? value : parseFloat(String(value));\n if (isNaN(num))\n return String(value);\n const options = {\n style: 'currency',\n currency: field.currency || 'USD',\n minimumFractionDigits: field.decimals ?? 0,\n maximumFractionDigits: field.decimals ?? 0,\n };\n return new Intl.NumberFormat('en-US', options).format(num);\n }\n case 'percent': {\n const num = typeof value === 'number' ? value : parseFloat(String(value));\n if (isNaN(num))\n return String(value);\n // Assume value is already a percentage (e.g., 25 for 25%)\n // If it's a decimal (e.g., 0.25), multiply by 100\n const pct = num < 1 && num > -1 && num !== 0 ? num * 100 : num;\n const decimals = field.decimals ?? 1;\n return `${pct.toFixed(decimals)}%`;\n }\n case 'date': {\n if (!value)\n return '\\u2014';\n const date = value instanceof Date ? value : new Date(String(value));\n if (isNaN(date.getTime()))\n return String(value);\n return new Intl.DateTimeFormat('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n }).format(date);\n }\n case 'boolean': {\n const bool = typeof value === 'boolean' ? value : value === 'true' || value === '1';\n return bool ? 'Yes' : 'No';\n }\n case 'text':\n default:\n return String(value);\n }\n}\n/**\n * FieldRenderer component\n * Displays a field with label, formatted value, and optional highlighting\n */\nexport function FieldRenderer({ field, value, onUpdate, agentMode, }) {\n const [isHovered, setIsHovered] = useState(false);\n const formattedValue = useMemo(() => formatValue(value, field), [value, field]);\n const isNull = value === null || value === undefined;\n const isEditable = field.editable && (onUpdate || agentMode);\n const handleClick = useCallback(() => {\n if (!isEditable)\n return;\n if (agentMode?.enabled && agentMode.sendMessage) {\n // Send message to agent for editing\n agentMode.sendMessage(`Please help me update the \"${field.label}\" field (key: ${field.key}). Current value: ${formattedValue}`);\n }\n // Direct edit mode would go here (Phase 2)\n }, [isEditable, agentMode, field, formattedValue]);\n const valueStyle = useMemo(() => {\n const base = { ...styles.value };\n if (isNull) {\n return { ...base, ...styles.nullValue };\n }\n if (field.highlight) {\n return { ...base, ...styles.highlight[field.highlight] };\n }\n if (isEditable) {\n return {\n ...base,\n ...styles.editable,\n backgroundColor: isHovered ? 'var(--gray-3, #f3f4f6)' : 'transparent',\n };\n }\n return base;\n }, [isNull, field.highlight, isEditable, isHovered]);\n return (_jsxs(\"div\", { style: styles.container, title: field.tooltip, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onClick: handleClick, role: isEditable ? 'button' : undefined, tabIndex: isEditable ? 0 : undefined, children: [_jsx(\"span\", { style: styles.label, children: field.label }), _jsxs(\"span\", { style: valueStyle, children: [formattedValue, field.unit && !isNull && (_jsx(\"span\", { style: styles.unit, children: field.unit }))] })] }));\n}\n//# sourceMappingURL=FieldRenderer.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * TableRenderer component\n * Renders a table with columns and row data\n */\nimport { useMemo } from 'react';\nconst styles = {\n container: {\n width: '100%',\n overflowX: 'auto',\n },\n table: {\n width: '100%',\n borderCollapse: 'collapse',\n fontSize: '13px',\n },\n thead: {\n backgroundColor: 'var(--gray-3, #f3f4f6)',\n },\n th: {\n padding: '10px 12px',\n textAlign: 'left',\n fontWeight: 600,\n fontSize: '11px',\n textTransform: 'uppercase',\n letterSpacing: '0.5px',\n color: 'var(--gray-11, #6b7280)',\n borderBottom: '2px solid var(--gray-5, #e5e7eb)',\n },\n td: {\n padding: '10px 12px',\n borderBottom: '1px solid var(--gray-4, #e5e7eb)',\n fontFamily: 'var(--font-mono, ui-monospace, monospace)',\n fontVariantNumeric: 'tabular-nums',\n },\n trHover: {\n backgroundColor: 'var(--gray-2, #f9fafb)',\n },\n empty: {\n padding: '20px',\n textAlign: 'center',\n color: 'var(--gray-10, #9ca3af)',\n fontStyle: 'italic',\n },\n highlight: {\n success: { color: 'var(--green-11, #15803d)' },\n warning: { color: 'var(--yellow-11, #ca8a04)' },\n error: { color: 'var(--red-11, #dc2626)' },\n info: { color: 'var(--blue-11, #2563eb)' },\n },\n};\n/**\n * Format a cell value according to column format\n */\nfunction formatCellValue(value, column) {\n if (value === null || value === undefined) {\n return '—';\n }\n switch (column.format) {\n case 'number': {\n const num = typeof value === 'number' ? value : parseFloat(String(value));\n if (isNaN(num))\n return String(value);\n return new Intl.NumberFormat('en-US', {\n minimumFractionDigits: 0,\n maximumFractionDigits: column.decimals ?? 2,\n }).format(num);\n }\n case 'currency': {\n const num = typeof value === 'number' ? value : parseFloat(String(value));\n if (isNaN(num))\n return String(value);\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: column.currency || 'USD',\n minimumFractionDigits: column.decimals ?? 0,\n maximumFractionDigits: column.decimals ?? 0,\n }).format(num);\n }\n case 'percent': {\n const num = typeof value === 'number' ? value : parseFloat(String(value));\n if (isNaN(num))\n return String(value);\n const pct = num < 1 && num > -1 && num !== 0 ? num * 100 : num;\n return `${pct.toFixed(column.decimals ?? 1)}%`;\n }\n case 'date': {\n const date = value instanceof Date ? value : new Date(String(value));\n if (isNaN(date.getTime()))\n return String(value);\n return new Intl.DateTimeFormat('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n }).format(date);\n }\n case 'boolean':\n return value ? 'Yes' : 'No';\n default:\n return String(value);\n }\n}\n/**\n * TableRenderer component\n */\nexport function TableRenderer({ columns, rows }) {\n const alignmentStyle = useMemo(() => {\n return columns.reduce((acc, col) => {\n acc[col.key] = col.align || (col.format === 'number' || col.format === 'currency' || col.format === 'percent'\n ? 'right'\n : 'left');\n return acc;\n }, {});\n }, [columns]);\n if (rows.length === 0) {\n return (_jsx(\"div\", { style: styles.container, children: _jsxs(\"table\", { style: styles.table, children: [_jsx(\"thead\", { style: styles.thead, children: _jsx(\"tr\", { children: columns.map((col) => (_jsx(\"th\", { style: {\n ...styles.th,\n textAlign: alignmentStyle[col.key],\n width: col.width,\n }, children: col.header }, col.key))) }) }), _jsx(\"tbody\", { children: _jsx(\"tr\", { children: _jsx(\"td\", { colSpan: columns.length, style: styles.empty, children: \"No data available\" }) }) })] }) }));\n }\n return (_jsx(\"div\", { style: styles.container, children: _jsxs(\"table\", { style: styles.table, children: [_jsx(\"thead\", { style: styles.thead, children: _jsx(\"tr\", { children: columns.map((col) => (_jsx(\"th\", { style: {\n ...styles.th,\n textAlign: alignmentStyle[col.key],\n width: col.width,\n }, children: col.header }, col.key))) }) }), _jsx(\"tbody\", { children: rows.map((row, rowIndex) => (_jsx(\"tr\", { children: columns.map((col) => {\n const value = row[col.key];\n const formatted = formatCellValue(value, col);\n const cellStyle = {\n ...styles.td,\n textAlign: alignmentStyle[col.key],\n ...(col.highlight ? styles.highlight[col.highlight] : {}),\n };\n return (_jsx(\"td\", { style: cellStyle, children: formatted }, col.key));\n }) }, rowIndex))) })] }) }));\n}\n//# sourceMappingURL=TableRenderer.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Context provider for FusionFragment components\n * Provides data and update handlers to nested components\n */\nimport { createContext, useContext, useMemo } from 'react';\nconst FusionFragmentContext = createContext(null);\n/**\n * Provider component that supplies data and update handlers\n * to FusionFragment components via context\n *\n * @example\n * ```tsx\n * <FusionFragmentProvider\n * data={fund.parameters}\n * onUpdate={async (key, value) => {\n * await api.funds.updateParameters(fundId, { [key]: value });\n * }}\n * >\n * <MarkdownRenderer content={agentResponse} />\n * </FusionFragmentProvider>\n * ```\n */\nexport function FusionFragmentProvider({ data, onUpdate, sendMessage, ChartComponent, artifactRunId, children }) {\n const value = useMemo(() => ({ data, onUpdate, sendMessage, ChartComponent, artifactRunId }), [data, onUpdate, sendMessage, ChartComponent, artifactRunId]);\n // Debug logging\n console.log('[FusionFragmentProvider] Created with:', {\n hasData: !!data,\n dataKeys: data ? Object.keys(data) : [],\n hasChartComponent: !!ChartComponent,\n artifactRunId,\n });\n return (_jsx(FusionFragmentContext.Provider, { value: value, children: children }));\n}\n/**\n * Hook to access FusionFragment context\n * @throws Error if used outside of FusionFragmentProvider\n */\nexport function useFusionFragmentContext() {\n const context = useContext(FusionFragmentContext);\n if (!context) {\n throw new Error('useFusionFragmentContext must be used within a FusionFragmentProvider');\n }\n return context;\n}\n/**\n * Hook to safely access FusionFragment context\n * Returns null if not within a provider (useful for optional context)\n */\nexport function useFusionFragmentContextSafe() {\n return useContext(FusionFragmentContext);\n}\n//# sourceMappingURL=FusionFragmentContext.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useFusionFragmentContextSafe } from './FusionFragmentContext.js';\n/**\n * Renders a Vega-Lite chart from a chart template.\n * If dataKey is provided, it merges data from context into the spec.\n * Uses the ChartComponent from FusionFragmentContext if available.\n */\nexport function ChartRenderer({ chart, data, className }) {\n const context = useFusionFragmentContextSafe();\n const ChartComponent = context?.ChartComponent;\n const artifactRunId = context?.artifactRunId;\n // Debug logging\n console.log('[ChartRenderer] Context:', {\n hasContext: !!context,\n hasChartComponent: !!ChartComponent,\n artifactRunId,\n chartTitle: chart.title,\n dataKey: chart.dataKey,\n });\n // Resolve data from context if dataKey is provided\n const resolvedSpec = { ...chart.spec };\n if (chart.dataKey && data[chart.dataKey]) {\n const chartData = data[chart.dataKey];\n if (Array.isArray(chartData)) {\n // Inject data into spec\n resolvedSpec.data = { values: chartData };\n }\n }\n // Build the VegaLiteChartSpec format expected by @vertesia/ui\n const vegaSpec = {\n library: 'vega-lite',\n title: chart.title,\n description: chart.description,\n spec: resolvedSpec,\n options: {\n height: chart.height,\n }\n };\n // If a ChartComponent is provided via context, use it to render the actual chart\n if (ChartComponent) {\n return (_jsx(\"div\", { className: className, children: _jsx(ChartComponent, { spec: vegaSpec, artifactRunId: artifactRunId }) }));\n }\n // Fallback: render a placeholder with spec info when no ChartComponent is injected\n return (_jsxs(\"div\", { className: className, style: {\n padding: '16px',\n backgroundColor: 'var(--gray-2, #f9fafb)',\n border: '1px solid var(--gray-5, #e5e7eb)',\n borderRadius: '8px',\n minHeight: chart.height || 280\n }, children: [chart.title && (_jsx(\"div\", { style: {\n fontSize: '14px',\n fontWeight: 600,\n marginBottom: '8px',\n color: 'var(--gray-12, #111827)'\n }, children: chart.title })), chart.description && (_jsx(\"div\", { style: {\n fontSize: '12px',\n color: 'var(--gray-11, #6b7280)',\n marginBottom: '12px'\n }, children: chart.description })), _jsx(\"div\", { style: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: (chart.height || 280) - 60,\n backgroundColor: 'var(--gray-3, #f3f4f6)',\n borderRadius: '4px',\n color: 'var(--gray-11, #6b7280)',\n fontSize: '12px'\n }, \"data-vega-spec\": JSON.stringify(vegaSpec), children: _jsxs(\"div\", { style: { textAlign: 'center' }, children: [_jsxs(\"div\", { style: { marginBottom: '4px' }, children: [\"Chart: \", resolvedSpec.mark ? String(typeof resolvedSpec.mark === 'string' ? resolvedSpec.mark : resolvedSpec.mark.type) : 'composite'] }), resolvedSpec.data?.values && (_jsxs(\"div\", { style: { fontSize: '11px', opacity: 0.8 }, children: [resolvedSpec.data.values.length, \" data points\"] }))] }) })] }));\n}\n//# sourceMappingURL=ChartRenderer.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * SectionRenderer component\n * Renders a section with grid layout and collapsible behavior\n */\nimport { useState, useMemo } from 'react';\nimport { FieldRenderer } from './FieldRenderer.js';\nimport { TableRenderer } from './TableRenderer.js';\nimport { ChartRenderer } from './ChartRenderer.js';\n// Layout grid configurations\nconst gridLayouts = {\n 'grid-2': {\n display: 'grid',\n gridTemplateColumns: 'repeat(2, 1fr)',\n gap: '16px',\n },\n 'grid-3': {\n display: 'grid',\n gridTemplateColumns: 'repeat(3, 1fr)',\n gap: '16px',\n },\n 'grid-4': {\n display: 'grid',\n gridTemplateColumns: 'repeat(4, 1fr)',\n gap: '16px',\n },\n list: {\n display: 'flex',\n flexDirection: 'column',\n gap: '12px',\n },\n};\nconst styles = {\n section: {\n marginBottom: '20px',\n },\n header: {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n marginBottom: '12px',\n cursor: 'default',\n },\n headerCollapsible: {\n cursor: 'pointer',\n userSelect: 'none',\n },\n title: {\n fontSize: '11px',\n fontWeight: 600,\n color: 'var(--gray-11, #6b7280)',\n textTransform: 'uppercase',\n letterSpacing: '0.5px',\n },\n chevron: {\n width: '14px',\n height: '14px',\n color: 'var(--gray-10, #9ca3af)',\n transition: 'transform 0.2s',\n },\n chevronCollapsed: {\n transform: 'rotate(-90deg)',\n },\n content: {\n overflow: 'hidden',\n transition: 'max-height 0.2s ease-out',\n },\n contentCollapsed: {\n maxHeight: '0',\n opacity: 0,\n },\n contentExpanded: {\n maxHeight: '2000px', // Large enough for most content\n opacity: 1,\n },\n divider: {\n height: '1px',\n backgroundColor: 'var(--gray-5, #e5e7eb)',\n marginTop: '16px',\n },\n};\n// Simple chevron SVG component\nfunction ChevronIcon({ collapsed }) {\n return (_jsx(\"svg\", { style: {\n ...styles.chevron,\n ...(collapsed ? styles.chevronCollapsed : {}),\n }, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: \"2\", strokeLinecap: \"round\", strokeLinejoin: \"round\", children: _jsx(\"polyline\", { points: \"6 9 12 15 18 9\" }) }));\n}\n/**\n * SectionRenderer component\n * Displays a section with title, optional collapse, and grid of fields\n */\nexport function SectionRenderer({ section, data, onUpdate, agentMode, }) {\n const [isCollapsed, setIsCollapsed] = useState(section.collapsed ?? false);\n const layout = section.layout || 'grid-3';\n const isTable = layout === 'table';\n const isChart = layout === 'chart';\n const layoutStyle = isTable || isChart ? {} : gridLayouts[layout];\n const isCollapsible = section.collapsed !== undefined;\n // Get table rows from data\n const tableRows = useMemo(() => {\n if (!isTable || !section.dataKey)\n return [];\n const rows = data[section.dataKey];\n return Array.isArray(rows) ? rows : [];\n }, [isTable, section.dataKey, data]);\n const headerStyle = useMemo(() => ({\n ...styles.header,\n ...(isCollapsible ? styles.headerCollapsible : {}),\n }), [isCollapsible]);\n const contentStyle = useMemo(() => ({\n ...styles.content,\n ...layoutStyle,\n ...(isCollapsed ? styles.contentCollapsed : styles.contentExpanded),\n }), [isCollapsed, layoutStyle]);\n const handleHeaderClick = () => {\n if (isCollapsible) {\n setIsCollapsed(!isCollapsed);\n }\n };\n // Render content based on layout type\n const renderContent = () => {\n if (isTable && section.columns) {\n return _jsx(TableRenderer, { columns: section.columns, rows: tableRows });\n }\n if (isChart && section.chart) {\n return _jsx(ChartRenderer, { chart: section.chart, data: data });\n }\n // Default: render fields\n return section.fields?.map((field, index) => (_jsx(FieldRenderer, { field: field, value: data[field.key], onUpdate: onUpdate ? (value) => onUpdate(field.key, value) : undefined, agentMode: agentMode }, field.key || index)));\n };\n return (_jsxs(\"div\", { style: styles.section, children: [_jsxs(\"div\", { style: headerStyle, onClick: handleHeaderClick, role: isCollapsible ? 'button' : undefined, \"aria-expanded\": isCollapsible ? !isCollapsed : undefined, children: [isCollapsible && _jsx(ChevronIcon, { collapsed: isCollapsed }), _jsx(\"span\", { style: styles.title, children: section.title })] }), _jsx(\"div\", { style: contentStyle, children: renderContent() })] }));\n}\n//# sourceMappingURL=SectionRenderer.js.map","import { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * FusionFragmentRenderer - Main component\n * Renders a model-generated template with actual data values\n */\nimport { useMemo } from 'react';\nimport { validateTemplate } from '../validation/validateTemplate.js';\nimport { SectionRenderer } from './SectionRenderer.js';\nconst styles = {\n container: {\n backgroundColor: 'var(--gray-2, #f9fafb)',\n border: '1px solid var(--gray-5, #e5e7eb)',\n borderRadius: '8px',\n padding: '16px 20px',\n },\n title: {\n fontSize: '16px',\n fontWeight: 600,\n color: 'var(--gray-12, #1f2937)',\n marginBottom: '16px',\n paddingBottom: '12px',\n borderBottom: '1px solid var(--gray-5, #e5e7eb)',\n },\n footer: {\n fontSize: '12px',\n color: 'var(--gray-10, #9ca3af)',\n marginTop: '16px',\n paddingTop: '12px',\n borderTop: '1px solid var(--gray-5, #e5e7eb)',\n },\n error: {\n backgroundColor: 'var(--red-2, #fef2f2)',\n border: '1px solid var(--red-6, #fca5a5)',\n borderRadius: '8px',\n padding: '16px',\n },\n errorTitle: {\n fontSize: '14px',\n fontWeight: 600,\n color: 'var(--red-11, #dc2626)',\n marginBottom: '12px',\n },\n errorList: {\n listStyle: 'none',\n padding: 0,\n margin: 0,\n },\n errorItem: {\n fontSize: '13px',\n color: 'var(--red-11, #dc2626)',\n marginBottom: '8px',\n fontFamily: 'var(--font-mono, ui-monospace, monospace)',\n },\n errorPath: {\n fontSize: '11px',\n color: 'var(--red-9, #ef4444)',\n display: 'block',\n },\n errorSuggestion: {\n fontSize: '12px',\n color: 'var(--gray-11, #6b7280)',\n marginTop: '4px',\n fontStyle: 'italic',\n },\n};\n/**\n * Component to display validation errors\n */\nfunction ValidationErrors({ errors }) {\n return (_jsxs(\"div\", { style: styles.error, children: [_jsxs(\"div\", { style: styles.errorTitle, children: [\"Template Validation Failed (\", errors.length, \" error\", errors.length > 1 ? 's' : '', \")\"] }), _jsx(\"ul\", { style: styles.errorList, children: errors.map((error, index) => (_jsxs(\"li\", { style: styles.errorItem, children: [_jsx(\"span\", { children: error.message }), _jsxs(\"span\", { style: styles.errorPath, children: [\"at \", error.path] }), error.suggestion && (_jsxs(\"span\", { style: styles.errorSuggestion, children: [\"\\\\u2192 \", error.suggestion] }))] }, index))) })] }));\n}\n/**\n * FusionFragmentRenderer - Main renderer component\n *\n * Takes a model-generated template and actual data, validates the template,\n * and renders the UI with proper formatting and layout.\n *\n * @example\n * ```tsx\n * <FusionFragmentRenderer\n * template={{\n * title: \"Fund Parameters\",\n * sections: [{\n * title: \"Identity\",\n * layout: \"grid-3\",\n * fields: [\n * { label: \"Firm Name\", key: \"firmName\" },\n * { label: \"Vintage\", key: \"vintageYear\", format: \"number\" }\n * ]\n * }]\n * }}\n * data={{ firmName: \"Acme Capital\", vintageYear: 2024 }}\n * />\n * ```\n */\nexport function FusionFragmentRenderer({ template, data, onUpdate, agentMode, className, }) {\n // Validate template against data keys\n const validation = useMemo(() => {\n const dataKeys = Object.keys(data);\n return validateTemplate(template, dataKeys);\n }, [template, data]);\n // Show validation errors if any\n if (!validation.valid) {\n return _jsx(ValidationErrors, { errors: validation.errors });\n }\n return (_jsxs(\"div\", { style: styles.container, className: className, children: [template.title && (_jsx(\"div\", { style: styles.title, children: template.title })), template.sections.map((section, index) => (_jsx(SectionRenderer, { section: section, data: data, onUpdate: onUpdate, agentMode: agentMode }, section.title || index))), template.footer && (_jsx(\"div\", { style: styles.footer, children: template.footer }))] }));\n}\n//# sourceMappingURL=FusionFragmentRenderer.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * FusionFragmentHandler - Code block handler component\n * Parses fusion-fragment code blocks and renders them\n */\nimport { useMemo } from 'react';\nimport { parseAndValidateTemplate } from '../validation/validateTemplate.js';\nimport { FusionFragmentRenderer } from './FusionFragmentRenderer.js';\nimport { useFusionFragmentContextSafe } from './FusionFragmentContext.js';\nconst styles = {\n error: {\n backgroundColor: 'var(--red-2, #fef2f2)',\n border: '1px solid var(--red-6, #fca5a5)',\n borderRadius: '8px',\n padding: '16px',\n fontFamily: 'var(--font-mono, ui-monospace, monospace)',\n fontSize: '13px',\n },\n errorTitle: {\n fontWeight: 600,\n color: 'var(--red-11, #dc2626)',\n marginBottom: '8px',\n },\n errorMessage: {\n color: 'var(--red-10, #ef4444)',\n whiteSpace: 'pre-wrap',\n },\n noContext: {\n backgroundColor: 'var(--yellow-2, #fefce8)',\n border: '1px solid var(--yellow-6, #fde047)',\n borderRadius: '8px',\n padding: '16px',\n },\n noContextTitle: {\n fontSize: '14px',\n fontWeight: 600,\n color: 'var(--yellow-11, #ca8a04)',\n marginBottom: '8px',\n },\n noContextMessage: {\n fontSize: '13px',\n color: 'var(--gray-11, #6b7280)',\n },\n loading: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '12px',\n minHeight: '150px',\n borderRadius: '8px',\n border: '1px solid var(--gray-6, #e5e7eb)',\n backgroundColor: 'var(--gray-2, #f9fafb)',\n },\n loadingIcon: {\n width: '32px',\n height: '32px',\n color: 'var(--gray-9, #9ca3af)',\n },\n loadingText: {\n fontSize: '14px',\n color: 'var(--gray-9, #9ca3af)',\n },\n loadingDots: {\n display: 'flex',\n gap: '4px',\n },\n loadingDot: {\n width: '8px',\n height: '8px',\n borderRadius: '50%',\n backgroundColor: 'var(--gray-6, #d1d5db)',\n animation: 'fusion-fragment-bounce 1s infinite',\n },\n};\n/**\n * Check if JSON parsing failed due to incomplete content (streaming)\n * vs actually invalid JSON structure\n */\nfunction isIncompleteJson(code) {\n const trimmed = code.trim();\n // Empty or very short content is likely incomplete\n if (trimmed.length < 2)\n return true;\n // Must start with { for a valid JSON object\n if (!trimmed.startsWith('{'))\n return false;\n // Try to parse - if it succeeds, it's not incomplete\n try {\n JSON.parse(trimmed);\n return false; // Valid JSON\n }\n catch (e) {\n const message = e instanceof Error ? e.message : '';\n // Common indicators of incomplete JSON during streaming\n const incompleteIndicators = [\n 'unexpected end',\n 'unterminated string',\n 'expected',\n 'unexpected token',\n ];\n const lowerMessage = message.toLowerCase();\n if (incompleteIndicators.some(ind => lowerMessage.includes(ind))) {\n // Additional check: count brackets to see if they're unbalanced\n let braceCount = 0;\n let bracketCount = 0;\n let inString = false;\n let escaped = false;\n for (const char of trimmed) {\n if (escaped) {\n escaped = false;\n continue;\n }\n if (char === '\\\\') {\n escaped = true;\n continue;\n }\n if (char === '\"') {\n inString = !inString;\n continue;\n }\n if (!inString) {\n if (char === '{')\n braceCount++;\n else if (char === '}')\n braceCount--;\n else if (char === '[')\n bracketCount++;\n else if (char === ']')\n bracketCount--;\n }\n }\n // If brackets are unbalanced or we're in an unclosed string, it's incomplete\n return braceCount > 0 || bracketCount > 0 || inString;\n }\n // For other parse errors, consider it invalid rather than incomplete\n return false;\n }\n}\n/**\n * Loading placeholder shown while streaming incomplete JSON\n */\nfunction LoadingPlaceholder() {\n return (_jsxs(\"div\", { style: styles.loading, children: [_jsx(\"style\", { children: `\n @keyframes fusion-fragment-bounce {\n 0%, 80%, 100% { transform: translateY(0); }\n 40% { transform: translateY(-6px); }\n }\n ` }), _jsxs(\"svg\", { style: styles.loadingIcon, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: \"2\", strokeLinecap: \"round\", strokeLinejoin: \"round\", children: [_jsx(\"polyline\", { points: \"16 18 22 12 16 6\" }), _jsx(\"polyline\", { points: \"8 6 2 12 8 18\" })] }), _jsx(\"span\", { style: styles.loadingText, children: \"Loading fragment...\" }), _jsx(\"div\", { style: styles.loadingDots, children: [0, 1, 2].map(i => (_jsx(\"div\", { style: {\n ...styles.loadingDot,\n animationDelay: `${i * 150}ms`,\n } }, i))) })] }));\n}\n/**\n * Error display component\n */\nfunction ParseError({ message }) {\n return (_jsxs(\"div\", { style: styles.error, children: [_jsx(\"div\", { style: styles.errorTitle, children: \"Failed to parse fusion-fragment\" }), _jsx(\"div\", { style: styles.errorMessage, children: message })] }));\n}\n/**\n * Warning when no context is available\n */\nfunction NoContextWarning({ template }) {\n const requiredKeys = template.sections\n .flatMap(s => s.fields || [])\n .map(f => f.key);\n return (_jsxs(\"div\", { style: styles.noContext, children: [_jsx(\"div\", { style: styles.noContextTitle, children: \"No data context available\" }), _jsxs(\"div\", { style: styles.noContextMessage, children: [\"This fusion-fragment requires data with keys: \", requiredKeys.join(', '), \".\", _jsx(\"br\", {}), \"Wrap this component in a FusionFragmentProvider with the required data.\"] })] }));\n}\n/**\n * FusionFragmentHandler - Handles fusion-fragment code blocks\n *\n * This component is designed to be used as a code block renderer.\n * It parses the JSON template from the code block and renders it\n * using data from the FusionFragmentContext.\n *\n * @example\n * ```tsx\n * // In your markdown renderer:\n * const codeBlockRenderers = {\n * 'fusion-fragment': ({ code }) => <FusionFragmentHandler code={code} />\n * };\n * ```\n */\nexport function FusionFragmentHandler({ code, data: propData, onUpdate: propOnUpdate, }) {\n // Try to get context (may be null if no provider)\n const context = useFusionFragmentContextSafe();\n // Use prop data or context data\n const data = propData ?? context?.data;\n const onUpdate = propOnUpdate ?? context?.onUpdate;\n const sendMessage = context?.sendMessage;\n // Check if JSON is incomplete (streaming) - show loading placeholder\n const incomplete = useMemo(() => isIncompleteJson(code), [code]);\n // Parse and validate the template (only if not obviously incomplete)\n const result = useMemo(() => {\n if (incomplete) {\n return { valid: false, errors: [], template: undefined };\n }\n const dataKeys = data ? Object.keys(data) : [];\n return parseAndValidateTemplate(code, dataKeys);\n }, [code, data, incomplete]);\n // Show loading placeholder for incomplete JSON (streaming in progress)\n if (incomplete) {\n return _jsx(LoadingPlaceholder, {});\n }\n // Parse error\n if (!result.valid && !result.template) {\n const parseError = result.errors.find(e => e.path === 'root' && e.message.includes('JSON'));\n if (parseError) {\n return _jsx(ParseError, { message: parseError.message });\n }\n }\n // Template parsed but no data available\n if (result.template && !data) {\n return _jsx(NoContextWarning, { template: result.template });\n }\n // Template parsed but validation errors (show errors in renderer)\n if (result.template && data) {\n return (_jsx(FusionFragmentRenderer, { template: result.template, data: data, onUpdate: onUpdate, agentMode: sendMessage ? { enabled: true, sendMessage } : undefined }));\n }\n // Fallback for any other error case\n return (_jsx(ParseError, { message: result.errors.map(e => `${e.path}: ${e.message}`).join('\\n') }));\n}\n/**\n * Factory function to create a code block renderer configuration\n * for use with markdown renderers that support custom code blocks\n */\nexport function createFusionFragmentCodeBlockRenderer() {\n return {\n language: 'fusion-fragment',\n component: FusionFragmentHandler,\n };\n}\n//# sourceMappingURL=FusionFragmentHandler.js.map","/**\n * Error formatting utilities for model-friendly output\n */\n/**\n * Format validation errors as a model-friendly string\n * @param errors - Array of validation errors\n * @returns Formatted error message\n */\nexport function formatValidationErrors(errors) {\n if (errors.length === 0) {\n return 'Template is valid.';\n }\n const header = `Template validation failed with ${errors.length} error${errors.length > 1 ? 's' : ''}:\\n`;\n const formattedErrors = errors.map((error, index) => {\n let message = `${index + 1}. ${error.message}`;\n message += `\\n Path: ${error.path}`;\n if (error.suggestion) {\n message += `\\n \\u2192 ${error.suggestion}`;\n }\n return message;\n });\n return header + '\\n' + formattedErrors.join('\\n\\n');\n}\n/**\n * Format a successful validation with preview info\n * @param template - The validated template\n * @param dataKeys - Available data keys\n * @returns Success message with preview\n */\nexport function formatValidationSuccess(template, dataKeys) {\n const lines = ['Template valid. Preview:'];\n lines.push('');\n if (template.title) {\n lines.push(`**${template.title}**`);\n lines.push('');\n }\n for (const section of template.sections) {\n const fieldCount = section.fields.length;\n lines.push(`[${section.title}] ${fieldCount} field${fieldCount > 1 ? 's' : ''}:`);\n for (const field of section.fields) {\n let fieldDesc = `- ${field.label} (${field.key}`;\n if (field.format && field.format !== 'text') {\n fieldDesc += `, ${field.format}`;\n }\n fieldDesc += ')';\n // Check if key exists in data\n if (!dataKeys.includes(field.key)) {\n fieldDesc += ' \\u26a0\\ufe0f key not in data';\n }\n lines.push(fieldDesc);\n }\n lines.push('');\n }\n return lines.join('\\n');\n}\n/**\n * Format a list of available keys for model reference\n * @param dataKeys - Available data keys\n * @param groupByPrefix - Whether to group keys by common prefix\n * @returns Formatted key list\n */\nexport function formatAvailableKeys(dataKeys, groupByPrefix = true) {\n if (dataKeys.length === 0) {\n return 'No data keys available.';\n }\n if (!groupByPrefix || dataKeys.length <= 10) {\n return `Available keys: ${dataKeys.join(', ')}`;\n }\n // Group by prefix (e.g., fund.name, fund.type -> fund.*)\n const groups = new Map();\n for (const key of dataKeys) {\n const dotIndex = key.indexOf('.');\n if (dotIndex > 0) {\n const prefix = key.substring(0, dotIndex);\n const rest = key.substring(dotIndex + 1);\n const group = groups.get(prefix) || [];\n group.push(rest);\n groups.set(prefix, group);\n }\n else {\n const group = groups.get('') || [];\n group.push(key);\n groups.set('', group);\n }\n }\n const lines = ['Available keys:'];\n // Top-level keys first\n const topLevel = groups.get('');\n if (topLevel && topLevel.length > 0) {\n lines.push(` ${topLevel.join(', ')}`);\n }\n // Grouped keys\n for (const [prefix, keys] of groups) {\n if (prefix === '')\n continue;\n if (keys.length <= 3) {\n lines.push(` ${prefix}: ${keys.join(', ')}`);\n }\n else {\n lines.push(` ${prefix}: ${keys.slice(0, 3).join(', ')}, ... (${keys.length} total)`);\n }\n }\n return lines.join('\\n');\n}\n//# sourceMappingURL=formatErrors.js.map","/**\n * Text preview generation for non-vision models\n * Generates a text description of what the fragment will look like\n */\n/**\n * Generate sample data for preview rendering\n * Creates placeholder values based on field definitions\n */\nexport function generateSampleData(template, dataKeys) {\n const data = {};\n // Add provided data keys with placeholder values\n for (const key of dataKeys) {\n data[key] = `<${key}>`;\n }\n // Override with more specific placeholders based on field format\n for (const section of template.sections) {\n if (section.fields) {\n for (const field of section.fields) {\n if (field.key in data) {\n data[field.key] = getSampleValue(field);\n }\n }\n }\n }\n return data;\n}\n/**\n * Get a sample value for a field based on its format\n */\nfunction getSampleValue(field) {\n switch (field.format) {\n case 'number':\n return 1234;\n case 'currency':\n return 1000000;\n case 'percent':\n return 25;\n case 'date':\n return new Date().toISOString().split('T')[0];\n case 'boolean':\n return true;\n case 'text':\n default:\n return `Sample ${field.label}`;\n }\n}\n/**\n * Generate a text description of the template for preview\n * Used for non-vision models\n */\nexport function generateTextPreview(template, dataKeys) {\n const lines = [];\n lines.push('Template structure preview:');\n lines.push('');\n if (template.title) {\n lines.push(`## ${template.title}`);\n lines.push('');\n }\n for (const section of template.sections) {\n const layout = section.layout || 'grid-3';\n lines.push(`### ${section.title}`);\n if (layout === 'table') {\n lines.push(`Layout: table`);\n if (section.dataKey) {\n lines.push(`Data key: \\`${section.dataKey}\\``);\n }\n lines.push('');\n if (section.columns) {\n lines.push('Columns:');\n for (const col of section.columns) {\n let colLine = `- **${col.header}** \\u2192 \\`${col.key}\\``;\n if (col.format && col.format !== 'text') {\n colLine += ` (${col.format})`;\n }\n lines.push(colLine);\n }\n }\n }\n else if (layout === 'chart') {\n lines.push(`Layout: chart`);\n if (section.chart) {\n const chart = section.chart;\n if (chart.title) {\n lines.push(`Chart title: ${chart.title}`);\n }\n if (chart.description) {\n lines.push(`Description: ${chart.description}`);\n }\n const markType = chart.spec.mark\n ? (typeof chart.spec.mark === 'string' ? chart.spec.mark : chart.spec.mark.type || 'unknown')\n : 'composite';\n lines.push(`Chart type: ${markType}`);\n if (chart.dataKey) {\n lines.push(`Data key: \\`${chart.dataKey}\\``);\n if (!dataKeys.includes(chart.dataKey)) {\n lines.push('\\u26a0\\ufe0f **dataKey not found in data**');\n }\n }\n else if (chart.spec.data?.values) {\n lines.push(`Inline data: ${chart.spec.data.values.length} points`);\n }\n if (chart.height) {\n lines.push(`Height: ${chart.height}px`);\n }\n }\n lines.push('');\n }\n else {\n const layoutDesc = layout === 'list' ? 'vertical list' : `${layout.split('-')[1]}-column grid`;\n lines.push(`Layout: ${layoutDesc}${section.collapsed ? ' (collapsed by default)' : ''}`);\n lines.push('');\n if (section.fields) {\n for (const field of section.fields) {\n let fieldLine = `- **${field.label}** \\u2192 \\`${field.key}\\``;\n const attributes = [];\n if (field.format && field.format !== 'text') {\n attributes.push(field.format);\n }\n if (field.unit) {\n attributes.push(`unit: \"${field.unit}\"`);\n }\n if (field.editable) {\n attributes.push('editable');\n }\n if (field.highlight) {\n attributes.push(`highlight: ${field.highlight}`);\n }\n if (attributes.length > 0) {\n fieldLine += ` (${attributes.join(', ')})`;\n }\n // Check if key exists in data\n if (!dataKeys.includes(field.key)) {\n fieldLine += ' \\u26a0\\ufe0f **key not found in data**';\n }\n lines.push(fieldLine);\n }\n }\n }\n lines.push('');\n }\n if (template.footer) {\n lines.push('---');\n lines.push(`Footer: ${template.footer}`);\n lines.push('');\n }\n // Summary\n const totalFields = template.sections.reduce((sum, s) => sum + (s.fields?.length || 0) + (s.columns?.length || 0), 0);\n const missingKeys = template.sections\n .flatMap(s => s.fields || [])\n .filter(f => !dataKeys.includes(f.key))\n .map(f => f.key);\n lines.push('---');\n lines.push(`Summary: ${template.sections.length} section(s), ${totalFields} field(s)/column(s)`);\n if (missingKeys.length > 0) {\n lines.push(`\\u26a0\\ufe0f Missing keys: ${missingKeys.join(', ')}`);\n }\n else {\n lines.push('\\u2705 All field keys found in data');\n }\n return lines.join('\\n');\n}\n/**\n * Generate a compact description for tool responses\n */\nexport function generateCompactPreview(template) {\n const sections = template.sections.map(s => {\n if (s.layout === 'table' && s.columns) {\n const colList = s.columns\n .slice(0, 3)\n .map(c => c.header)\n .join(', ');\n const more = s.columns.length > 3 ? `, +${s.columns.length - 3} more` : '';\n return `${s.title} (table): ${colList}${more}`;\n }\n if (s.layout === 'chart' && s.chart) {\n const markType = s.chart.spec.mark\n ? (typeof s.chart.spec.mark === 'string' ? s.chart.spec.mark : s.chart.spec.mark.type || 'chart')\n : 'chart';\n return `${s.title} (${markType} chart)`;\n }\n if (s.fields) {\n const fieldList = s.fields\n .slice(0, 3)\n .map(f => f.label)\n .join(', ');\n const more = s.fields.length > 3 ? `, +${s.fields.length - 3} more` : '';\n return `${s.title}: ${fieldList}${more}`;\n }\n return s.title;\n });\n const title = template.title ? `\"${template.title}\" - ` : '';\n return `${title}${sections.join(' | ')}`;\n}\n//# sourceMappingURL=textPreview.js.map"],"names":["FieldTemplateSchema","type","properties","label","key","format","enum","nullable","unit","editable","inputType","options","items","value","required","additionalProperties","min","max","highlight","tooltip","decimals","currency","SectionTemplateSchema","title","layout","collapsed","fields","columns","header","width","align","dataKey","chart","description","spec","height","FragmentTemplateSchema","entityType","sections","footer","levenshteinDistance","a","b","matrix","i","length","j","cost","Math","findClosestKey","input","validKeys","maxDistance","inputLower","toLowerCase","bestMatch","bestDistance","Infinity","keyLower","includes","distance","abs","findSimilarKeys","maxResults","map","filter","sort","slice","validateSchema","Ajv","allErrors","verbose","compile","validateTemplate","template","dataKeys","errors","error","path","instancePath","replace","suggestion","message","keyword","params","allowedValues","join","missingProperty","additionalProperty","push","valid","typedTemplate","sectionIndex","section","sectionPath","fieldIndex","field","closest","undefined","formatErrors","validateFormatCompatibility","mark","layer","vconcat","hconcat","validFormats","validInputs","text","number","percent","date","boolean","parseAndValidateTemplate","jsonString","parsed","JSON","parse","err","Error","result","styles","container","display","flexDirection","gap","minWidth","fontSize","fontWeight","color","textTransform","letterSpacing","fontFamily","fontVariantNumeric","marginLeft","success","warning","info","cursor","padding","borderRadius","transition","nullValue","fontStyle","FieldRenderer","onUpdate","agentMode","isHovered","setIsHovered","useState","formattedValue","useMemo","num","parseFloat","String","isNaN","minimumFractionDigits","maximumFractionDigits","Intl","NumberFormat","style","pct","toFixed","Date","getTime","DateTimeFormat","year","month","day","formatValue","isNull","isEditable","handleClick","useCallback","enabled","sendMessage","valueStyle","base","backgroundColor","_jsxs","onMouseEnter","onMouseLeave","onClick","role","tabIndex","children","_jsx","overflowX","table","borderCollapse","thead","th","textAlign","borderBottom","td","empty","TableRenderer","rows","alignmentStyle","reduce","acc","col","colSpan","row","rowIndex","formatted","column","formatCellValue","cellStyle","FusionFragmentContext","createContext","FusionFragmentProvider","data","ChartComponent","artifactRunId","console","log","hasData","Object","keys","hasChartComponent","Provider","useFusionFragmentContext","context","useContext","useFusionFragmentContextSafe","ChartRenderer","className","hasContext","chartTitle","resolvedSpec","chartData","Array","isArray","values","vegaSpec","library","border","minHeight","marginBottom","alignItems","justifyContent","stringify","opacity","gridLayouts","gridTemplateColumns","list","headerCollapsible","userSelect","chevron","chevronCollapsed","transform","content","overflow","contentCollapsed","maxHeight","contentExpanded","ChevronIcon","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","points","SectionRenderer","isCollapsed","setIsCollapsed","isTable","isChart","layoutStyle","isCollapsible","tableRows","headerStyle","contentStyle","index","paddingBottom","marginTop","paddingTop","borderTop","errorTitle","errorList","listStyle","margin","errorItem","errorPath","errorSuggestion","ValidationErrors","FusionFragmentRenderer","validation","errorMessage","whiteSpace","noContext","noContextTitle","noContextMessage","loading","loadingIcon","loadingText","loadingDots","loadingDot","animation","LoadingPlaceholder","animationDelay","ParseError","NoContextWarning","requiredKeys","flatMap","s","f","FusionFragmentHandler","code","propData","propOnUpdate","incomplete","trimmed","trim","startsWith","e","incompleteIndicators","lowerMessage","some","ind","braceCount","bracketCount","inString","escaped","char","isIncompleteJson","parseError","find","createFusionFragmentCodeBlockRenderer","language","component","formatValidationErrors","formatValidationSuccess","lines","fieldCount","fieldDesc","formatAvailableKeys","groupByPrefix","groups","Map","dotIndex","indexOf","prefix","substring","rest","group","get","set","topLevel","generateSampleData","getSampleValue","toISOString","split","generateTextPreview","colLine","markType","layoutDesc","fieldLine","attributes","totalFields","sum","missingKeys","generateCompactPreview","colList","c","more","fieldList"],"mappings":"uKAMA,MAYaA,EAAsB,CAC/BC,KAAM,SACNC,WAAY,CACRC,MAAO,CAAEF,KAAM,UACfG,IAAK,CAAEH,KAAM,UACbI,OAAQ,CACJJ,KAAM,SACNK,KAAM,CAAC,OAAQ,SAAU,WAAY,UAAW,OAAQ,WACxDC,UA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AAG,GACTH,IAAI6S,GAAKA,EAAEjV,QACX0D,KAAK,MACJwR,EAAO5D,EAAEvR,QAAQkB,OAAS,EAAI,MAAMqQ,EAAEvR,QAAQkB,OAAS,SAAW,GACxE,MAAO,GAAGqQ,EAAE3R,kBAAkBqV,IAAUE,GAC5C,CACA,GAAiB,UAAb5D,EAAE1R,QAAsB0R,EAAElR,MAAO,CACjC,MAAMoU,EAAWlD,EAAElR,MAAME,KAAKmE,KACM,iBAAtB6M,EAAElR,MAAME,KAAKmE,KAAoB6M,EAAElR,MAAME,KAAKmE,KAAO6M,EAAElR,MAAME,KAAKmE,KAAKpG,MAAQ,QACvF,QACN,MAAO,GAAGiT,EAAE3R,UAAU6U,UAC1B,CACA,GAAIlD,EAAExR,OAAQ,CACV,MAAMqV,EAAY7D,EAAExR,OACfyC,MAAM,EAAG,GACTH,IAAImP,GAAKA,EAAEhT,OACXmF,KAAK,MACJwR,EAAO5D,EAAExR,OAAOmB,OAAS,EAAI,MAAMqQ,EAAExR,OAAOmB,OAAS,SAAW,GACtE,MAAO,GAAGqQ,EAAE3R,UAAUwV,IAAYD,GACtC,CACA,OAAO5D,EAAE3R,QAGb,MAAO,GADOmD,EAASnD,MAAQ,IAAImD,EAASnD,YAAc,KACxCe,EAASgD,KAAK,QACpC"}
1
+ {"version":3,"file":"vertesia-fusion-ux.js","sources":["esm/validation/schemas.js","esm/validation/fuzzyMatch.js","esm/validation/validateTemplate.js","esm/fusion-fragment/FieldRenderer.js","esm/fusion-fragment/TableRenderer.js","esm/fusion-fragment/FusionFragmentContext.js","esm/fusion-fragment/ChartRenderer.js","esm/fusion-fragment/SectionRenderer.js","esm/fusion-fragment/FusionFragmentRenderer.js","esm/fusion-fragment/FusionFragmentHandler.js","esm/validation/formatErrors.js","esm/render/textPreview.js"],"sourcesContent":["/**\n * JSON Schemas for template validation using AJV\n */\n/**\n * Schema for field options (select dropdowns)\n */\nconst FieldOptionSchema = {\n type: 'object',\n properties: {\n label: { type: 'string' },\n value: { type: 'string' }\n },\n required: ['label', 'value'],\n additionalProperties: false\n};\n/**\n * Schema for a single field template\n */\nexport const FieldTemplateSchema = {\n type: 'object',\n properties: {\n label: { type: 'string' },\n key: { type: 'string' },\n format: {\n type: 'string',\n enum: ['text', 'number', 'currency', 'percent', 'date', 'boolean'],\n nullable: true\n },\n unit: { type: 'string', nullable: true },\n editable: { type: 'boolean', nullable: true },\n inputType: {\n type: 'string',\n enum: ['text', 'number', 'date', 'select', 'checkbox'],\n nullable: true\n },\n options: {\n type: 'array',\n items: FieldOptionSchema,\n nullable: true\n },\n min: { type: 'number', nullable: true },\n max: { type: 'number', nullable: true },\n highlight: {\n type: 'string',\n enum: ['success', 'warning', 'error', 'info'],\n nullable: true\n },\n tooltip: { type: 'string', nullable: true },\n decimals: { type: 'number', nullable: true },\n currency: { type: 'string', nullable: true }\n },\n required: ['label', 'key'],\n additionalProperties: false\n};\n/**\n * Schema for a table column template\n */\nexport const ColumnTemplateSchema = {\n type: 'object',\n properties: {\n header: { type: 'string' },\n key: { type: 'string' },\n format: {\n type: 'string',\n enum: ['text', 'number', 'currency', 'percent', 'date', 'boolean'],\n nullable: true\n },\n width: { type: 'string', nullable: true },\n align: {\n type: 'string',\n enum: ['left', 'center', 'right'],\n nullable: true\n },\n currency: { type: 'string', nullable: true },\n decimals: { type: 'number', nullable: true },\n highlight: {\n type: 'string',\n enum: ['success', 'warning', 'error', 'info'],\n nullable: true\n }\n },\n required: ['header', 'key'],\n additionalProperties: false\n};\n/**\n * Schema for Vega-Lite spec (flexible - allows any valid Vega-Lite properties)\n * We validate structure loosely and let Vega-Lite handle detailed validation\n * Note: Using loose typing since VegaLiteSpec is intentionally flexible\n */\nexport const VegaLiteSpecSchema = {\n type: 'object',\n additionalProperties: true, // Allow any Vega-Lite properties\n // We don't enforce specific properties since Vega-Lite has many valid forms\n};\n/**\n * Schema for chart template\n * Note: Using loose typing for spec since VegaLiteSpec is flexible\n */\nexport const ChartTemplateSchema = {\n type: 'object',\n properties: {\n title: { type: 'string', nullable: true },\n description: { type: 'string', nullable: true },\n spec: VegaLiteSpecSchema,\n height: { type: 'number', nullable: true },\n width: { type: 'number', nullable: true },\n dataKey: { type: 'string', nullable: true }\n },\n required: ['spec'],\n additionalProperties: false\n};\n/**\n * Schema for a section template\n * Note: Using type assertion due to ChartTemplate's flexible VegaLiteSpec\n */\nexport const SectionTemplateSchema = {\n type: 'object',\n properties: {\n title: { type: 'string' },\n layout: {\n type: 'string',\n enum: ['grid-2', 'grid-3', 'grid-4', 'list', 'table', 'chart'],\n nullable: true\n },\n collapsed: { type: 'boolean', nullable: true },\n fields: {\n type: 'array',\n items: FieldTemplateSchema,\n nullable: true\n },\n columns: {\n type: 'array',\n items: ColumnTemplateSchema,\n nullable: true\n },\n dataKey: { type: 'string', nullable: true },\n chart: {\n ...ChartTemplateSchema,\n nullable: true\n }\n },\n required: ['title'],\n additionalProperties: false\n};\n/**\n * Schema for the root fragment template\n */\nexport const FragmentTemplateSchema = {\n type: 'object',\n properties: {\n title: { type: 'string', nullable: true },\n entityType: {\n type: 'string',\n enum: ['fund', 'scenario', 'portfolio', 'transaction', 'custom'],\n nullable: true\n },\n sections: {\n type: 'array',\n items: SectionTemplateSchema\n },\n footer: { type: 'string', nullable: true }\n },\n required: ['sections'],\n additionalProperties: false\n};\n//# sourceMappingURL=schemas.js.map","/**\n * Fuzzy matching utilities for key suggestions\n * Uses Levenshtein distance for finding similar keys\n */\n/**\n * Calculate Levenshtein distance between two strings\n */\nexport function levenshteinDistance(a, b) {\n const matrix = [];\n // Initialize first column\n for (let i = 0; i <= a.length; i++) {\n matrix[i] = [i];\n }\n // Initialize first row\n for (let j = 0; j <= b.length; j++) {\n matrix[0][j] = j;\n }\n // Fill in the rest of the matrix\n for (let i = 1; i <= a.length; i++) {\n for (let j = 1; j <= b.length; j++) {\n const cost = a[i - 1] === b[j - 1] ? 0 : 1;\n matrix[i][j] = Math.min(matrix[i - 1][j] + 1, // deletion\n matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j - 1] + cost // substitution\n );\n }\n }\n return matrix[a.length][b.length];\n}\n/**\n * Find the closest matching key from a list of valid keys\n * @param input - The key that wasn't found\n * @param validKeys - List of valid keys to search\n * @param maxDistance - Maximum edit distance to consider (default: 3)\n * @returns The closest key, or undefined if none are close enough\n */\nexport function findClosestKey(input, validKeys, maxDistance = 3) {\n if (validKeys.length === 0)\n return undefined;\n const inputLower = input.toLowerCase();\n let bestMatch;\n let bestDistance = Infinity;\n for (const key of validKeys) {\n const keyLower = key.toLowerCase();\n // Exact case-insensitive match\n if (inputLower === keyLower) {\n return key;\n }\n // Check if input is a substring or key is a substring\n if (inputLower.includes(keyLower) || keyLower.includes(inputLower)) {\n const distance = Math.abs(inputLower.length - keyLower.length);\n if (distance < bestDistance) {\n bestDistance = distance;\n bestMatch = key;\n }\n continue;\n }\n // Levenshtein distance\n const distance = levenshteinDistance(inputLower, keyLower);\n if (distance < bestDistance && distance <= maxDistance) {\n bestDistance = distance;\n bestMatch = key;\n }\n }\n return bestMatch;\n}\n/**\n * Find multiple similar keys, sorted by relevance\n * @param input - The key that wasn't found\n * @param validKeys - List of valid keys to search\n * @param maxResults - Maximum number of suggestions (default: 3)\n * @returns Array of similar keys\n */\nexport function findSimilarKeys(input, validKeys, maxResults = 3) {\n if (validKeys.length === 0)\n return [];\n const inputLower = input.toLowerCase();\n const scored = validKeys\n .map(key => ({\n key,\n distance: levenshteinDistance(inputLower, key.toLowerCase())\n }))\n .filter(({ distance }) => distance <= 4) // Filter out very different keys\n .sort((a, b) => a.distance - b.distance);\n return scored.slice(0, maxResults).map(({ key }) => key);\n}\n//# sourceMappingURL=fuzzyMatch.js.map","/**\n * Core template validation logic\n * Two-stage validation: Schema (AJV) + Semantic (custom)\n */\nimport Ajv from 'ajv';\nimport { FragmentTemplateSchema } from './schemas.js';\nimport { findClosestKey } from './fuzzyMatch.js';\n// Create AJV instance with all errors enabled\nconst ajv = new Ajv({ allErrors: true, verbose: true });\n// Compile the schema\nconst validateSchema = ajv.compile(FragmentTemplateSchema);\n/**\n * Validate a template against schema and data keys\n * @param template - The template to validate (unknown for parsing)\n * @param dataKeys - Available keys in the data\n * @returns Validation result with errors\n */\nexport function validateTemplate(template, dataKeys) {\n const errors = [];\n // Stage 1: Schema validation\n const valid = validateSchema(template);\n if (!valid && validateSchema.errors) {\n for (const error of validateSchema.errors) {\n const path = error.instancePath.replace(/^\\//, '').replace(/\\//g, '.') || 'root';\n let message = error.message || 'Invalid value';\n let suggestion;\n // Enhance error messages\n if (error.keyword === 'enum') {\n const allowedValues = error.params.allowedValues;\n suggestion = `Valid values: ${allowedValues.join(', ')}`;\n }\n else if (error.keyword === 'required') {\n const missingProp = error.params.missingProperty;\n message = `Missing required property: ${missingProp}`;\n }\n else if (error.keyword === 'additionalProperties') {\n const extraProp = error.params.additionalProperty;\n message = `Unknown property: ${extraProp}`;\n suggestion = 'Remove this property or check spelling';\n }\n errors.push({ path, message, suggestion });\n }\n return { valid: false, errors };\n }\n // Stage 2: Semantic validation (key existence)\n const typedTemplate = template;\n for (let sectionIndex = 0; sectionIndex < typedTemplate.sections.length; sectionIndex++) {\n const section = typedTemplate.sections[sectionIndex];\n const sectionPath = `sections[${sectionIndex}]`;\n // Validate table sections\n if (section.layout === 'table') {\n if (!section.columns || section.columns.length === 0) {\n errors.push({\n path: `${sectionPath}.columns`,\n message: 'Table layout requires columns array',\n suggestion: 'Add columns: [{ header: \"...\", key: \"...\" }]'\n });\n }\n if (!section.dataKey) {\n errors.push({\n path: `${sectionPath}.dataKey`,\n message: 'Table layout requires dataKey to reference the data array',\n suggestion: 'Add dataKey: \"yourArrayKey\"'\n });\n }\n else if (!dataKeys.includes(section.dataKey)) {\n const closest = findClosestKey(section.dataKey, dataKeys);\n errors.push({\n path: `${sectionPath}.dataKey`,\n message: `Unknown dataKey '${section.dataKey}'`,\n suggestion: closest ? `Did you mean '${closest}'?` : undefined\n });\n }\n // Skip field validation for table sections\n continue;\n }\n // Validate chart sections\n if (section.layout === 'chart') {\n if (!section.chart) {\n errors.push({\n path: `${sectionPath}.chart`,\n message: 'Chart layout requires a chart specification',\n suggestion: 'Add chart: { spec: { mark: \"bar\", encoding: {...} } }'\n });\n }\n else {\n // Validate chart spec has required properties\n if (!section.chart.spec) {\n errors.push({\n path: `${sectionPath}.chart.spec`,\n message: 'Chart requires a Vega-Lite spec',\n suggestion: 'Add spec: { mark: \"bar\", encoding: {...}, data: {...} }'\n });\n }\n else {\n // Check for mark or layer/concat\n const spec = section.chart.spec;\n const hasContent = spec.mark || spec.layer || spec.vconcat || spec.hconcat;\n if (!hasContent) {\n errors.push({\n path: `${sectionPath}.chart.spec`,\n message: 'Chart spec requires mark, layer, vconcat, or hconcat',\n suggestion: 'Add mark: \"bar\" or mark: \"line\" etc.'\n });\n }\n }\n // Validate dataKey if provided\n if (section.chart.dataKey && !dataKeys.includes(section.chart.dataKey)) {\n const closest = findClosestKey(section.chart.dataKey, dataKeys);\n errors.push({\n path: `${sectionPath}.chart.dataKey`,\n message: `Unknown dataKey '${section.chart.dataKey}'`,\n suggestion: closest ? `Did you mean '${closest}'?` : undefined\n });\n }\n }\n // Skip field validation for chart sections\n continue;\n }\n // Validate non-table/non-chart sections have fields\n if (!section.fields || section.fields.length === 0) {\n errors.push({\n path: `${sectionPath}.fields`,\n message: 'Non-table/chart sections require fields array',\n suggestion: 'Add fields: [{ label: \"...\", key: \"...\" }]'\n });\n continue;\n }\n for (let fieldIndex = 0; fieldIndex < section.fields.length; fieldIndex++) {\n const field = section.fields[fieldIndex];\n const path = `${sectionPath}.fields[${fieldIndex}]`;\n // Check if key exists in data\n if (!dataKeys.includes(field.key)) {\n const closest = findClosestKey(field.key, dataKeys);\n errors.push({\n path: `${path}.key`,\n message: `Unknown key '${field.key}'`,\n suggestion: closest ? `Did you mean '${closest}'?` : undefined\n });\n }\n // Check format compatibility (basic type checking)\n if (field.format) {\n const formatErrors = validateFormatCompatibility(field, path);\n errors.push(...formatErrors);\n }\n // Check select options\n if (field.inputType === 'select' && (!field.options || field.options.length === 0)) {\n errors.push({\n path: `${path}.options`,\n message: 'Select input type requires options array',\n suggestion: 'Add options: [{ label: \"...\", value: \"...\" }]'\n });\n }\n // Check min/max for number inputs\n if (field.min !== undefined && field.max !== undefined && field.min > field.max) {\n errors.push({\n path: `${path}.min`,\n message: `min (${field.min}) cannot be greater than max (${field.max})`,\n suggestion: 'Swap min and max values'\n });\n }\n }\n }\n return {\n valid: errors.length === 0,\n errors\n };\n}\n/**\n * Validate format compatibility\n */\nfunction validateFormatCompatibility(field, path) {\n const errors = [];\n // Check decimals is only used with number/currency/percent\n if (field.decimals !== undefined) {\n const validFormats = ['number', 'currency', 'percent'];\n if (field.format && !validFormats.includes(field.format)) {\n errors.push({\n path: `${path}.decimals`,\n message: `'decimals' only applies to number, currency, or percent formats`,\n suggestion: `Remove 'decimals' or change format to one of: ${validFormats.join(', ')}`\n });\n }\n }\n // Check currency is only used with currency format\n if (field.currency !== undefined && field.format !== 'currency') {\n errors.push({\n path: `${path}.currency`,\n message: `'currency' only applies to currency format`,\n suggestion: `Set format: 'currency' or remove 'currency' property`\n });\n }\n // Check inputType compatibility with format\n if (field.inputType && field.format) {\n const compatMap = {\n text: ['text'],\n number: ['number', 'text'],\n currency: ['number', 'text'],\n percent: ['number', 'text'],\n date: ['date', 'text'],\n boolean: ['checkbox']\n };\n const validInputs = compatMap[field.format];\n if (validInputs && !validInputs.includes(field.inputType)) {\n errors.push({\n path: `${path}.inputType`,\n message: `inputType '${field.inputType}' is not compatible with format '${field.format}'`,\n suggestion: `Use one of: ${validInputs.join(', ')}`\n });\n }\n }\n return errors;\n}\n/**\n * Parse and validate a JSON string as a template\n * @param jsonString - JSON string to parse\n * @param dataKeys - Available data keys\n * @returns Validation result with parsed template if valid\n */\nexport function parseAndValidateTemplate(jsonString, dataKeys) {\n // Try to parse JSON\n let parsed;\n try {\n parsed = JSON.parse(jsonString);\n }\n catch (err) {\n const message = err instanceof Error ? err.message : 'Invalid JSON';\n return {\n valid: false,\n errors: [{\n path: 'root',\n message: `JSON parse error: ${message}`,\n suggestion: 'Check JSON syntax (missing quotes, commas, brackets)'\n }]\n };\n }\n // Validate the parsed template\n const result = validateTemplate(parsed, dataKeys);\n if (result.valid) {\n return {\n ...result,\n template: parsed\n };\n }\n return result;\n}\n//# sourceMappingURL=validateTemplate.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * FieldRenderer component\n * Renders a single field with formatting and optional edit capability\n */\nimport { useMemo, useState, useCallback } from 'react';\n// Styles as constants\nconst styles = {\n container: {\n display: 'flex',\n flexDirection: 'column',\n gap: '2px',\n minWidth: 0, // Allow text truncation\n },\n label: {\n fontSize: '11px',\n fontWeight: 500,\n color: 'var(--gray-11, #6b7280)',\n textTransform: 'uppercase',\n letterSpacing: '0.5px',\n },\n value: {\n fontSize: '14px',\n fontWeight: 500,\n color: 'var(--gray-12, #1f2937)',\n fontFamily: 'var(--font-mono, ui-monospace, monospace)',\n fontVariantNumeric: 'tabular-nums',\n letterSpacing: '-0.02em',\n },\n unit: {\n fontSize: '12px',\n color: 'var(--gray-10, #9ca3af)',\n marginLeft: '4px',\n },\n highlight: {\n success: { color: 'var(--green-11, #15803d)' },\n warning: { color: 'var(--yellow-11, #ca8a04)' },\n error: { color: 'var(--red-11, #dc2626)' },\n info: { color: 'var(--blue-11, #2563eb)' },\n },\n editable: {\n cursor: 'pointer',\n padding: '2px 4px',\n borderRadius: '4px',\n transition: 'background-color 0.15s',\n },\n tooltip: {\n position: 'relative',\n },\n nullValue: {\n color: 'var(--gray-9, #9ca3af)',\n fontStyle: 'italic',\n },\n};\n/**\n * Format a value according to the field's format specification\n */\nfunction formatValue(value, field) {\n if (value === null || value === undefined) {\n return '\\u2014'; // em-dash for null/undefined\n }\n switch (field.format) {\n case 'number': {\n const num = typeof value === 'number' ? value : parseFloat(String(value));\n if (isNaN(num))\n return String(value);\n const options = {\n minimumFractionDigits: field.decimals ?? 0,\n maximumFractionDigits: field.decimals ?? 2,\n };\n return new Intl.NumberFormat('en-US', options).format(num);\n }\n case 'currency': {\n const num = typeof value === 'number' ? value : parseFloat(String(value));\n if (isNaN(num))\n return String(value);\n const options = {\n style: 'currency',\n currency: field.currency || 'USD',\n minimumFractionDigits: field.decimals ?? 0,\n maximumFractionDigits: field.decimals ?? 0,\n };\n return new Intl.NumberFormat('en-US', options).format(num);\n }\n case 'percent': {\n const num = typeof value === 'number' ? value : parseFloat(String(value));\n if (isNaN(num))\n return String(value);\n // Assume value is already a percentage (e.g., 25 for 25%)\n // If it's a decimal (e.g., 0.25), multiply by 100\n const pct = num < 1 && num > -1 && num !== 0 ? num * 100 : num;\n const decimals = field.decimals ?? 1;\n return `${pct.toFixed(decimals)}%`;\n }\n case 'date': {\n if (!value)\n return '\\u2014';\n const date = value instanceof Date ? value : new Date(String(value));\n if (isNaN(date.getTime()))\n return String(value);\n return new Intl.DateTimeFormat('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n }).format(date);\n }\n case 'boolean': {\n const bool = typeof value === 'boolean' ? value : value === 'true' || value === '1';\n return bool ? 'Yes' : 'No';\n }\n case 'text':\n default:\n return String(value);\n }\n}\n/**\n * FieldRenderer component\n * Displays a field with label, formatted value, and optional highlighting\n */\nexport function FieldRenderer({ field, value, onUpdate, agentMode, }) {\n const [isHovered, setIsHovered] = useState(false);\n const formattedValue = useMemo(() => formatValue(value, field), [value, field]);\n const isNull = value === null || value === undefined;\n const isEditable = field.editable && (onUpdate || agentMode);\n const handleClick = useCallback(() => {\n if (!isEditable)\n return;\n if (agentMode?.enabled && agentMode.sendMessage) {\n // Send message to agent for editing\n agentMode.sendMessage(`Please help me update the \"${field.label}\" field (key: ${field.key}). Current value: ${formattedValue}`);\n }\n // Direct edit mode would go here (Phase 2)\n }, [isEditable, agentMode, field, formattedValue]);\n const valueStyle = useMemo(() => {\n const base = { ...styles.value };\n if (isNull) {\n return { ...base, ...styles.nullValue };\n }\n if (field.highlight) {\n return { ...base, ...styles.highlight[field.highlight] };\n }\n if (isEditable) {\n return {\n ...base,\n ...styles.editable,\n backgroundColor: isHovered ? 'var(--gray-3, #f3f4f6)' : 'transparent',\n };\n }\n return base;\n }, [isNull, field.highlight, isEditable, isHovered]);\n return (_jsxs(\"div\", { style: styles.container, title: field.tooltip, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onClick: handleClick, role: isEditable ? 'button' : undefined, tabIndex: isEditable ? 0 : undefined, children: [_jsx(\"span\", { style: styles.label, children: field.label }), _jsxs(\"span\", { style: valueStyle, children: [formattedValue, field.unit && !isNull && (_jsx(\"span\", { style: styles.unit, children: field.unit }))] })] }));\n}\n//# sourceMappingURL=FieldRenderer.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * TableRenderer component\n * Renders a table with columns and row data\n */\nimport { useMemo } from 'react';\nconst styles = {\n container: {\n width: '100%',\n overflowX: 'auto',\n },\n table: {\n width: '100%',\n borderCollapse: 'collapse',\n fontSize: '13px',\n },\n thead: {\n backgroundColor: 'var(--gray-3, #f3f4f6)',\n },\n th: {\n padding: '10px 12px',\n textAlign: 'left',\n fontWeight: 600,\n fontSize: '11px',\n textTransform: 'uppercase',\n letterSpacing: '0.5px',\n color: 'var(--gray-11, #6b7280)',\n borderBottom: '2px solid var(--gray-5, #e5e7eb)',\n },\n td: {\n padding: '10px 12px',\n borderBottom: '1px solid var(--gray-4, #e5e7eb)',\n fontFamily: 'var(--font-mono, ui-monospace, monospace)',\n fontVariantNumeric: 'tabular-nums',\n },\n trHover: {\n backgroundColor: 'var(--gray-2, #f9fafb)',\n },\n empty: {\n padding: '20px',\n textAlign: 'center',\n color: 'var(--gray-10, #9ca3af)',\n fontStyle: 'italic',\n },\n highlight: {\n success: { color: 'var(--green-11, #15803d)' },\n warning: { color: 'var(--yellow-11, #ca8a04)' },\n error: { color: 'var(--red-11, #dc2626)' },\n info: { color: 'var(--blue-11, #2563eb)' },\n },\n};\n/**\n * Format a cell value according to column format\n */\nfunction formatCellValue(value, column) {\n if (value === null || value === undefined) {\n return '—';\n }\n switch (column.format) {\n case 'number': {\n const num = typeof value === 'number' ? value : parseFloat(String(value));\n if (isNaN(num))\n return String(value);\n return new Intl.NumberFormat('en-US', {\n minimumFractionDigits: 0,\n maximumFractionDigits: column.decimals ?? 2,\n }).format(num);\n }\n case 'currency': {\n const num = typeof value === 'number' ? value : parseFloat(String(value));\n if (isNaN(num))\n return String(value);\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: column.currency || 'USD',\n minimumFractionDigits: column.decimals ?? 0,\n maximumFractionDigits: column.decimals ?? 0,\n }).format(num);\n }\n case 'percent': {\n const num = typeof value === 'number' ? value : parseFloat(String(value));\n if (isNaN(num))\n return String(value);\n const pct = num < 1 && num > -1 && num !== 0 ? num * 100 : num;\n return `${pct.toFixed(column.decimals ?? 1)}%`;\n }\n case 'date': {\n const date = value instanceof Date ? value : new Date(String(value));\n if (isNaN(date.getTime()))\n return String(value);\n return new Intl.DateTimeFormat('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n }).format(date);\n }\n case 'boolean':\n return value ? 'Yes' : 'No';\n default:\n return String(value);\n }\n}\n/**\n * TableRenderer component\n */\nexport function TableRenderer({ columns, rows }) {\n const alignmentStyle = useMemo(() => {\n return columns.reduce((acc, col) => {\n acc[col.key] = col.align || (col.format === 'number' || col.format === 'currency' || col.format === 'percent'\n ? 'right'\n : 'left');\n return acc;\n }, {});\n }, [columns]);\n if (rows.length === 0) {\n return (_jsx(\"div\", { style: styles.container, children: _jsxs(\"table\", { style: styles.table, children: [_jsx(\"thead\", { style: styles.thead, children: _jsx(\"tr\", { children: columns.map((col) => (_jsx(\"th\", { style: {\n ...styles.th,\n textAlign: alignmentStyle[col.key],\n width: col.width,\n }, children: col.header }, col.key))) }) }), _jsx(\"tbody\", { children: _jsx(\"tr\", { children: _jsx(\"td\", { colSpan: columns.length, style: styles.empty, children: \"No data available\" }) }) })] }) }));\n }\n return (_jsx(\"div\", { style: styles.container, children: _jsxs(\"table\", { style: styles.table, children: [_jsx(\"thead\", { style: styles.thead, children: _jsx(\"tr\", { children: columns.map((col) => (_jsx(\"th\", { style: {\n ...styles.th,\n textAlign: alignmentStyle[col.key],\n width: col.width,\n }, children: col.header }, col.key))) }) }), _jsx(\"tbody\", { children: rows.map((row, rowIndex) => (_jsx(\"tr\", { children: columns.map((col) => {\n const value = row[col.key];\n const formatted = formatCellValue(value, col);\n const cellStyle = {\n ...styles.td,\n textAlign: alignmentStyle[col.key],\n ...(col.highlight ? styles.highlight[col.highlight] : {}),\n };\n return (_jsx(\"td\", { style: cellStyle, children: formatted }, col.key));\n }) }, rowIndex))) })] }) }));\n}\n//# sourceMappingURL=TableRenderer.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Context provider for FusionFragment components\n * Provides data and update handlers to nested components\n */\nimport { createContext, useContext, useMemo } from 'react';\nconst FusionFragmentContext = createContext(null);\n/**\n * Provider component that supplies data and update handlers\n * to FusionFragment components via context\n *\n * @example\n * ```tsx\n * <FusionFragmentProvider\n * data={fund.parameters}\n * onUpdate={async (key, value) => {\n * await api.funds.updateParameters(fundId, { [key]: value });\n * }}\n * >\n * <MarkdownRenderer content={agentResponse} />\n * </FusionFragmentProvider>\n * ```\n */\nexport function FusionFragmentProvider({ data, onUpdate, sendMessage, ChartComponent, artifactRunId, children }) {\n const value = useMemo(() => ({ data, onUpdate, sendMessage, ChartComponent, artifactRunId }), [data, onUpdate, sendMessage, ChartComponent, artifactRunId]);\n return (_jsx(FusionFragmentContext.Provider, { value: value, children: children }));\n}\n/**\n * Hook to access FusionFragment context\n * @throws Error if used outside of FusionFragmentProvider\n */\nexport function useFusionFragmentContext() {\n const context = useContext(FusionFragmentContext);\n if (!context) {\n throw new Error('useFusionFragmentContext must be used within a FusionFragmentProvider');\n }\n return context;\n}\n/**\n * Hook to safely access FusionFragment context\n * Returns null if not within a provider (useful for optional context)\n */\nexport function useFusionFragmentContextSafe() {\n return useContext(FusionFragmentContext);\n}\n//# sourceMappingURL=FusionFragmentContext.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useFusionFragmentContextSafe } from './FusionFragmentContext.js';\n/**\n * Renders a Vega-Lite chart from a chart template.\n * If dataKey is provided, it merges data from context into the spec.\n * Uses the ChartComponent from FusionFragmentContext if available.\n */\nexport function ChartRenderer({ chart, data, className }) {\n const context = useFusionFragmentContextSafe();\n const ChartComponent = context?.ChartComponent;\n const artifactRunId = context?.artifactRunId;\n // Resolve data from context if dataKey is provided\n const resolvedSpec = { ...chart.spec };\n if (chart.dataKey && data[chart.dataKey]) {\n const chartData = data[chart.dataKey];\n if (Array.isArray(chartData)) {\n // Inject data into spec\n resolvedSpec.data = { values: chartData };\n }\n }\n // Build the VegaLiteChartSpec format expected by @vertesia/ui\n const vegaSpec = {\n library: 'vega-lite',\n title: chart.title,\n description: chart.description,\n spec: resolvedSpec,\n options: {\n height: chart.height,\n }\n };\n // If a ChartComponent is provided via context, use it to render the actual chart\n if (ChartComponent) {\n return (_jsx(\"div\", { className: className, children: _jsx(ChartComponent, { spec: vegaSpec, artifactRunId: artifactRunId }) }));\n }\n // Fallback: render a placeholder with spec info when no ChartComponent is injected\n return (_jsxs(\"div\", { className: className, style: {\n padding: '16px',\n backgroundColor: 'var(--gray-2, #f9fafb)',\n border: '1px solid var(--gray-5, #e5e7eb)',\n borderRadius: '8px',\n minHeight: chart.height || 280\n }, children: [chart.title && (_jsx(\"div\", { style: {\n fontSize: '14px',\n fontWeight: 600,\n marginBottom: '8px',\n color: 'var(--gray-12, #111827)'\n }, children: chart.title })), chart.description && (_jsx(\"div\", { style: {\n fontSize: '12px',\n color: 'var(--gray-11, #6b7280)',\n marginBottom: '12px'\n }, children: chart.description })), _jsx(\"div\", { style: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: (chart.height || 280) - 60,\n backgroundColor: 'var(--gray-3, #f3f4f6)',\n borderRadius: '4px',\n color: 'var(--gray-11, #6b7280)',\n fontSize: '12px'\n }, \"data-vega-spec\": JSON.stringify(vegaSpec), children: _jsxs(\"div\", { style: { textAlign: 'center' }, children: [_jsxs(\"div\", { style: { marginBottom: '4px' }, children: [\"Chart: \", resolvedSpec.mark ? String(typeof resolvedSpec.mark === 'string' ? resolvedSpec.mark : resolvedSpec.mark.type) : 'composite'] }), resolvedSpec.data?.values && (_jsxs(\"div\", { style: { fontSize: '11px', opacity: 0.8 }, children: [resolvedSpec.data.values.length, \" data points\"] }))] }) })] }));\n}\n//# sourceMappingURL=ChartRenderer.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * SectionRenderer component\n * Renders a section with grid layout and collapsible behavior\n */\nimport { useState, useMemo } from 'react';\nimport { FieldRenderer } from './FieldRenderer.js';\nimport { TableRenderer } from './TableRenderer.js';\nimport { ChartRenderer } from './ChartRenderer.js';\n// Layout grid configurations\nconst gridLayouts = {\n 'grid-2': {\n display: 'grid',\n gridTemplateColumns: 'repeat(2, 1fr)',\n gap: '16px',\n },\n 'grid-3': {\n display: 'grid',\n gridTemplateColumns: 'repeat(3, 1fr)',\n gap: '16px',\n },\n 'grid-4': {\n display: 'grid',\n gridTemplateColumns: 'repeat(4, 1fr)',\n gap: '16px',\n },\n list: {\n display: 'flex',\n flexDirection: 'column',\n gap: '12px',\n },\n};\nconst styles = {\n section: {\n marginBottom: '20px',\n },\n header: {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n marginBottom: '12px',\n cursor: 'default',\n },\n headerCollapsible: {\n cursor: 'pointer',\n userSelect: 'none',\n },\n title: {\n fontSize: '11px',\n fontWeight: 600,\n color: 'var(--gray-11, #6b7280)',\n textTransform: 'uppercase',\n letterSpacing: '0.5px',\n },\n chevron: {\n width: '14px',\n height: '14px',\n color: 'var(--gray-10, #9ca3af)',\n transition: 'transform 0.2s',\n },\n chevronCollapsed: {\n transform: 'rotate(-90deg)',\n },\n content: {\n overflow: 'hidden',\n transition: 'max-height 0.2s ease-out',\n },\n contentCollapsed: {\n maxHeight: '0',\n opacity: 0,\n },\n contentExpanded: {\n maxHeight: '2000px', // Large enough for most content\n opacity: 1,\n },\n divider: {\n height: '1px',\n backgroundColor: 'var(--gray-5, #e5e7eb)',\n marginTop: '16px',\n },\n};\n// Simple chevron SVG component\nfunction ChevronIcon({ collapsed }) {\n return (_jsx(\"svg\", { style: {\n ...styles.chevron,\n ...(collapsed ? styles.chevronCollapsed : {}),\n }, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: \"2\", strokeLinecap: \"round\", strokeLinejoin: \"round\", children: _jsx(\"polyline\", { points: \"6 9 12 15 18 9\" }) }));\n}\n/**\n * SectionRenderer component\n * Displays a section with title, optional collapse, and grid of fields\n */\nexport function SectionRenderer({ section, data, onUpdate, agentMode, }) {\n const [isCollapsed, setIsCollapsed] = useState(section.collapsed ?? false);\n const layout = section.layout || 'grid-3';\n const isTable = layout === 'table';\n const isChart = layout === 'chart';\n const isCollapsible = section.collapsed !== undefined;\n // Get table rows from data\n const tableRows = useMemo(() => {\n if (!isTable || !section.dataKey)\n return [];\n const rows = data[section.dataKey];\n return Array.isArray(rows) ? rows : [];\n }, [isTable, section.dataKey, data]);\n const headerStyle = useMemo(() => ({\n ...styles.header,\n ...(isCollapsible ? styles.headerCollapsible : {}),\n }), [isCollapsible]);\n const contentStyle = useMemo(() => ({\n ...styles.content,\n ...(isTable || isChart ? {} : gridLayouts[layout]),\n ...(isCollapsed ? styles.contentCollapsed : styles.contentExpanded),\n }), [isCollapsed, isTable, isChart, layout]);\n const handleHeaderClick = () => {\n if (isCollapsible) {\n setIsCollapsed(!isCollapsed);\n }\n };\n // Render content based on layout type\n const renderContent = () => {\n if (isTable && section.columns) {\n return _jsx(TableRenderer, { columns: section.columns, rows: tableRows });\n }\n if (isChart && section.chart) {\n return _jsx(ChartRenderer, { chart: section.chart, data: data });\n }\n // Default: render fields\n return section.fields?.map((field, index) => (_jsx(FieldRenderer, { field: field, value: data[field.key], onUpdate: onUpdate ? (value) => onUpdate(field.key, value) : undefined, agentMode: agentMode }, field.key || index)));\n };\n return (_jsxs(\"div\", { style: styles.section, children: [_jsxs(\"div\", { style: headerStyle, onClick: handleHeaderClick, role: isCollapsible ? 'button' : undefined, \"aria-expanded\": isCollapsible ? !isCollapsed : undefined, children: [isCollapsible && _jsx(ChevronIcon, { collapsed: isCollapsed }), _jsx(\"span\", { style: styles.title, children: section.title })] }), _jsx(\"div\", { style: contentStyle, children: renderContent() })] }));\n}\n//# sourceMappingURL=SectionRenderer.js.map","import { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * FusionFragmentRenderer - Main component\n * Renders a model-generated template with actual data values\n */\nimport { useMemo } from 'react';\nimport { validateTemplate } from '../validation/validateTemplate.js';\nimport { SectionRenderer } from './SectionRenderer.js';\nconst styles = {\n container: {\n backgroundColor: 'var(--gray-2, #f9fafb)',\n border: '1px solid var(--gray-5, #e5e7eb)',\n borderRadius: '8px',\n padding: '16px 20px',\n },\n title: {\n fontSize: '16px',\n fontWeight: 600,\n color: 'var(--gray-12, #1f2937)',\n marginBottom: '16px',\n paddingBottom: '12px',\n borderBottom: '1px solid var(--gray-5, #e5e7eb)',\n },\n footer: {\n fontSize: '12px',\n color: 'var(--gray-10, #9ca3af)',\n marginTop: '16px',\n paddingTop: '12px',\n borderTop: '1px solid var(--gray-5, #e5e7eb)',\n },\n error: {\n backgroundColor: 'var(--red-2, #fef2f2)',\n border: '1px solid var(--red-6, #fca5a5)',\n borderRadius: '8px',\n padding: '16px',\n },\n errorTitle: {\n fontSize: '14px',\n fontWeight: 600,\n color: 'var(--red-11, #dc2626)',\n marginBottom: '12px',\n },\n errorList: {\n listStyle: 'none',\n padding: 0,\n margin: 0,\n },\n errorItem: {\n fontSize: '13px',\n color: 'var(--red-11, #dc2626)',\n marginBottom: '8px',\n fontFamily: 'var(--font-mono, ui-monospace, monospace)',\n },\n errorPath: {\n fontSize: '11px',\n color: 'var(--red-9, #ef4444)',\n display: 'block',\n },\n errorSuggestion: {\n fontSize: '12px',\n color: 'var(--gray-11, #6b7280)',\n marginTop: '4px',\n fontStyle: 'italic',\n },\n};\n/**\n * Component to display validation errors\n */\nfunction ValidationErrors({ errors }) {\n return (_jsxs(\"div\", { style: styles.error, children: [_jsxs(\"div\", { style: styles.errorTitle, children: [\"Template Validation Failed (\", errors.length, \" error\", errors.length > 1 ? 's' : '', \")\"] }), _jsx(\"ul\", { style: styles.errorList, children: errors.map((error, index) => (_jsxs(\"li\", { style: styles.errorItem, children: [_jsx(\"span\", { children: error.message }), _jsxs(\"span\", { style: styles.errorPath, children: [\"at \", error.path] }), error.suggestion && (_jsxs(\"span\", { style: styles.errorSuggestion, children: [\"\\\\u2192 \", error.suggestion] }))] }, index))) })] }));\n}\n/**\n * FusionFragmentRenderer - Main renderer component\n *\n * Takes a model-generated template and actual data, validates the template,\n * and renders the UI with proper formatting and layout.\n *\n * @example\n * ```tsx\n * <FusionFragmentRenderer\n * template={{\n * title: \"Fund Parameters\",\n * sections: [{\n * title: \"Identity\",\n * layout: \"grid-3\",\n * fields: [\n * { label: \"Firm Name\", key: \"firmName\" },\n * { label: \"Vintage\", key: \"vintageYear\", format: \"number\" }\n * ]\n * }]\n * }}\n * data={{ firmName: \"Acme Capital\", vintageYear: 2024 }}\n * />\n * ```\n */\nexport function FusionFragmentRenderer({ template, data, onUpdate, agentMode, className, }) {\n // Validate template against data keys\n const validation = useMemo(() => {\n const dataKeys = Object.keys(data);\n return validateTemplate(template, dataKeys);\n }, [template, data]);\n // Show validation errors if any\n if (!validation.valid) {\n return _jsx(ValidationErrors, { errors: validation.errors });\n }\n return (_jsxs(\"div\", { style: styles.container, className: className, children: [template.title && (_jsx(\"div\", { style: styles.title, children: template.title })), template.sections.map((section, index) => (_jsx(SectionRenderer, { section: section, data: data, onUpdate: onUpdate, agentMode: agentMode }, section.title || index))), template.footer && (_jsx(\"div\", { style: styles.footer, children: template.footer }))] }));\n}\n//# sourceMappingURL=FusionFragmentRenderer.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * FusionFragmentHandler - Code block handler component\n * Parses fusion-fragment code blocks and renders them\n */\nimport { useMemo } from 'react';\nimport { parseAndValidateTemplate } from '../validation/validateTemplate.js';\nimport { FusionFragmentRenderer } from './FusionFragmentRenderer.js';\nimport { useFusionFragmentContextSafe } from './FusionFragmentContext.js';\nconst styles = {\n error: {\n backgroundColor: 'var(--red-2, #fef2f2)',\n border: '1px solid var(--red-6, #fca5a5)',\n borderRadius: '8px',\n padding: '16px',\n fontFamily: 'var(--font-mono, ui-monospace, monospace)',\n fontSize: '13px',\n },\n errorTitle: {\n fontWeight: 600,\n color: 'var(--red-11, #dc2626)',\n marginBottom: '8px',\n },\n errorMessage: {\n color: 'var(--red-10, #ef4444)',\n whiteSpace: 'pre-wrap',\n },\n noContext: {\n backgroundColor: 'var(--yellow-2, #fefce8)',\n border: '1px solid var(--yellow-6, #fde047)',\n borderRadius: '8px',\n padding: '16px',\n },\n noContextTitle: {\n fontSize: '14px',\n fontWeight: 600,\n color: 'var(--yellow-11, #ca8a04)',\n marginBottom: '8px',\n },\n noContextMessage: {\n fontSize: '13px',\n color: 'var(--gray-11, #6b7280)',\n },\n loading: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '12px',\n minHeight: '150px',\n borderRadius: '8px',\n border: '1px solid var(--gray-6, #e5e7eb)',\n backgroundColor: 'var(--gray-2, #f9fafb)',\n },\n loadingIcon: {\n width: '32px',\n height: '32px',\n color: 'var(--gray-9, #9ca3af)',\n },\n loadingText: {\n fontSize: '14px',\n color: 'var(--gray-9, #9ca3af)',\n },\n loadingDots: {\n display: 'flex',\n gap: '4px',\n },\n loadingDot: {\n width: '8px',\n height: '8px',\n borderRadius: '50%',\n backgroundColor: 'var(--gray-6, #d1d5db)',\n animation: 'fusion-fragment-bounce 1s infinite',\n },\n};\n/**\n * Check if JSON parsing failed due to incomplete content (streaming)\n * vs actually invalid JSON structure\n */\nfunction isIncompleteJson(code) {\n const trimmed = code.trim();\n // Empty or very short content is likely incomplete\n if (trimmed.length < 2)\n return true;\n // Must start with { for a valid JSON object\n if (!trimmed.startsWith('{'))\n return false;\n // Try to parse - if it succeeds, it's not incomplete\n try {\n JSON.parse(trimmed);\n return false; // Valid JSON\n }\n catch (e) {\n const message = e instanceof Error ? e.message : '';\n // Common indicators of incomplete JSON during streaming\n const incompleteIndicators = [\n 'unexpected end',\n 'unterminated string',\n 'expected',\n 'unexpected token',\n ];\n const lowerMessage = message.toLowerCase();\n if (incompleteIndicators.some(ind => lowerMessage.includes(ind))) {\n // Additional check: count brackets to see if they're unbalanced\n let braceCount = 0;\n let bracketCount = 0;\n let inString = false;\n let escaped = false;\n for (const char of trimmed) {\n if (escaped) {\n escaped = false;\n continue;\n }\n if (char === '\\\\') {\n escaped = true;\n continue;\n }\n if (char === '\"') {\n inString = !inString;\n continue;\n }\n if (!inString) {\n if (char === '{')\n braceCount++;\n else if (char === '}')\n braceCount--;\n else if (char === '[')\n bracketCount++;\n else if (char === ']')\n bracketCount--;\n }\n }\n // If brackets are unbalanced or we're in an unclosed string, it's incomplete\n return braceCount > 0 || bracketCount > 0 || inString;\n }\n // For other parse errors, consider it invalid rather than incomplete\n return false;\n }\n}\n/**\n * Loading placeholder shown while streaming incomplete JSON\n */\nfunction LoadingPlaceholder() {\n return (_jsxs(\"div\", { style: styles.loading, children: [_jsx(\"style\", { children: `\n @keyframes fusion-fragment-bounce {\n 0%, 80%, 100% { transform: translateY(0); }\n 40% { transform: translateY(-6px); }\n }\n ` }), _jsxs(\"svg\", { style: styles.loadingIcon, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: \"2\", strokeLinecap: \"round\", strokeLinejoin: \"round\", children: [_jsx(\"polyline\", { points: \"16 18 22 12 16 6\" }), _jsx(\"polyline\", { points: \"8 6 2 12 8 18\" })] }), _jsx(\"span\", { style: styles.loadingText, children: \"Loading fragment...\" }), _jsx(\"div\", { style: styles.loadingDots, children: [0, 1, 2].map(i => (_jsx(\"div\", { style: {\n ...styles.loadingDot,\n animationDelay: `${i * 150}ms`,\n } }, i))) })] }));\n}\n/**\n * Error display component\n */\nfunction ParseError({ message }) {\n return (_jsxs(\"div\", { style: styles.error, children: [_jsx(\"div\", { style: styles.errorTitle, children: \"Failed to parse fusion-fragment\" }), _jsx(\"div\", { style: styles.errorMessage, children: message })] }));\n}\n/**\n * Warning when no context is available\n */\nfunction NoContextWarning({ template }) {\n const requiredKeys = template.sections\n .flatMap(s => s.fields || [])\n .map(f => f.key);\n return (_jsxs(\"div\", { style: styles.noContext, children: [_jsx(\"div\", { style: styles.noContextTitle, children: \"No data context available\" }), _jsxs(\"div\", { style: styles.noContextMessage, children: [\"This fusion-fragment requires data with keys: \", requiredKeys.join(', '), \".\", _jsx(\"br\", {}), \"Wrap this component in a FusionFragmentProvider with the required data.\"] })] }));\n}\n/**\n * FusionFragmentHandler - Handles fusion-fragment code blocks\n *\n * This component is designed to be used as a code block renderer.\n * It parses the JSON template from the code block and renders it\n * using data from the FusionFragmentContext.\n *\n * @example\n * ```tsx\n * // In your markdown renderer:\n * const codeBlockRenderers = {\n * 'fusion-fragment': ({ code }) => <FusionFragmentHandler code={code} />\n * };\n * ```\n */\nexport function FusionFragmentHandler({ code, data: propData, onUpdate: propOnUpdate, }) {\n // Try to get context (may be null if no provider)\n const context = useFusionFragmentContextSafe();\n // Use prop data or context data\n const data = propData ?? context?.data;\n const onUpdate = propOnUpdate ?? context?.onUpdate;\n const sendMessage = context?.sendMessage;\n // Check if JSON is incomplete (streaming) - show loading placeholder\n const incomplete = useMemo(() => isIncompleteJson(code), [code]);\n // Parse and validate the template (only if not obviously incomplete)\n const result = useMemo(() => {\n if (incomplete) {\n return { valid: false, errors: [], template: undefined };\n }\n const dataKeys = data ? Object.keys(data) : [];\n return parseAndValidateTemplate(code, dataKeys);\n }, [code, data, incomplete]);\n // Show loading placeholder for incomplete JSON (streaming in progress)\n if (incomplete) {\n return _jsx(LoadingPlaceholder, {});\n }\n // Parse error\n if (!result.valid && !result.template) {\n const parseError = result.errors.find(e => e.path === 'root' && e.message.includes('JSON'));\n if (parseError) {\n return _jsx(ParseError, { message: parseError.message });\n }\n }\n // Template parsed but no data available\n if (result.template && !data) {\n return _jsx(NoContextWarning, { template: result.template });\n }\n // Template parsed but validation errors (show errors in renderer)\n if (result.template && data) {\n return (_jsx(FusionFragmentRenderer, { template: result.template, data: data, onUpdate: onUpdate, agentMode: sendMessage ? { enabled: true, sendMessage } : undefined }));\n }\n // Fallback for any other error case\n return (_jsx(ParseError, { message: result.errors.map(e => `${e.path}: ${e.message}`).join('\\n') }));\n}\n/**\n * Factory function to create a code block renderer configuration\n * for use with markdown renderers that support custom code blocks\n */\nexport function createFusionFragmentCodeBlockRenderer() {\n return {\n language: 'fusion-fragment',\n component: FusionFragmentHandler,\n };\n}\n//# sourceMappingURL=FusionFragmentHandler.js.map","/**\n * Error formatting utilities for model-friendly output\n */\n/**\n * Format validation errors as a model-friendly string\n * @param errors - Array of validation errors\n * @returns Formatted error message\n */\nexport function formatValidationErrors(errors) {\n if (errors.length === 0) {\n return 'Template is valid.';\n }\n const header = `Template validation failed with ${errors.length} error${errors.length > 1 ? 's' : ''}:\\n`;\n const formattedErrors = errors.map((error, index) => {\n let message = `${index + 1}. ${error.message}`;\n message += `\\n Path: ${error.path}`;\n if (error.suggestion) {\n message += `\\n \\u2192 ${error.suggestion}`;\n }\n return message;\n });\n return header + '\\n' + formattedErrors.join('\\n\\n');\n}\n/**\n * Format a successful validation with preview info\n * @param template - The validated template\n * @param dataKeys - Available data keys\n * @returns Success message with preview\n */\nexport function formatValidationSuccess(template, dataKeys) {\n const lines = ['Template valid. Preview:'];\n lines.push('');\n if (template.title) {\n lines.push(`**${template.title}**`);\n lines.push('');\n }\n for (const section of template.sections) {\n const fieldCount = section.fields.length;\n lines.push(`[${section.title}] ${fieldCount} field${fieldCount > 1 ? 's' : ''}:`);\n for (const field of section.fields) {\n let fieldDesc = `- ${field.label} (${field.key}`;\n if (field.format && field.format !== 'text') {\n fieldDesc += `, ${field.format}`;\n }\n fieldDesc += ')';\n // Check if key exists in data\n if (!dataKeys.includes(field.key)) {\n fieldDesc += ' \\u26a0\\ufe0f key not in data';\n }\n lines.push(fieldDesc);\n }\n lines.push('');\n }\n return lines.join('\\n');\n}\n/**\n * Format a list of available keys for model reference\n * @param dataKeys - Available data keys\n * @param groupByPrefix - Whether to group keys by common prefix\n * @returns Formatted key list\n */\nexport function formatAvailableKeys(dataKeys, groupByPrefix = true) {\n if (dataKeys.length === 0) {\n return 'No data keys available.';\n }\n if (!groupByPrefix || dataKeys.length <= 10) {\n return `Available keys: ${dataKeys.join(', ')}`;\n }\n // Group by prefix (e.g., fund.name, fund.type -> fund.*)\n const groups = new Map();\n for (const key of dataKeys) {\n const dotIndex = key.indexOf('.');\n if (dotIndex > 0) {\n const prefix = key.substring(0, dotIndex);\n const rest = key.substring(dotIndex + 1);\n const group = groups.get(prefix) || [];\n group.push(rest);\n groups.set(prefix, group);\n }\n else {\n const group = groups.get('') || [];\n group.push(key);\n groups.set('', group);\n }\n }\n const lines = ['Available keys:'];\n // Top-level keys first\n const topLevel = groups.get('');\n if (topLevel && topLevel.length > 0) {\n lines.push(` ${topLevel.join(', ')}`);\n }\n // Grouped keys\n for (const [prefix, keys] of groups) {\n if (prefix === '')\n continue;\n if (keys.length <= 3) {\n lines.push(` ${prefix}: ${keys.join(', ')}`);\n }\n else {\n lines.push(` ${prefix}: ${keys.slice(0, 3).join(', ')}, ... (${keys.length} total)`);\n }\n }\n return lines.join('\\n');\n}\n//# sourceMappingURL=formatErrors.js.map","/**\n * Text preview generation for non-vision models\n * Generates a text description of what the fragment will look like\n */\n/**\n * Generate sample data for preview rendering\n * Creates placeholder values based on field definitions\n */\nexport function generateSampleData(template, dataKeys) {\n const data = {};\n // Add provided data keys with placeholder values\n for (const key of dataKeys) {\n data[key] = `<${key}>`;\n }\n // Override with more specific placeholders based on field format\n for (const section of template.sections) {\n if (section.fields) {\n for (const field of section.fields) {\n if (field.key in data) {\n data[field.key] = getSampleValue(field);\n }\n }\n }\n }\n return data;\n}\n/**\n * Get a sample value for a field based on its format\n */\nfunction getSampleValue(field) {\n switch (field.format) {\n case 'number':\n return 1234;\n case 'currency':\n return 1000000;\n case 'percent':\n return 25;\n case 'date':\n return new Date().toISOString().split('T')[0];\n case 'boolean':\n return true;\n case 'text':\n default:\n return `Sample ${field.label}`;\n }\n}\n/**\n * Generate a text description of the template for preview\n * Used for non-vision models\n */\nexport function generateTextPreview(template, dataKeys) {\n const lines = [];\n lines.push('Template structure preview:');\n lines.push('');\n if (template.title) {\n lines.push(`## ${template.title}`);\n lines.push('');\n }\n for (const section of template.sections) {\n const layout = section.layout || 'grid-3';\n lines.push(`### ${section.title}`);\n if (layout === 'table') {\n lines.push(`Layout: table`);\n if (section.dataKey) {\n lines.push(`Data key: \\`${section.dataKey}\\``);\n }\n lines.push('');\n if (section.columns) {\n lines.push('Columns:');\n for (const col of section.columns) {\n let colLine = `- **${col.header}** \\u2192 \\`${col.key}\\``;\n if (col.format && col.format !== 'text') {\n colLine += ` (${col.format})`;\n }\n lines.push(colLine);\n }\n }\n }\n else if (layout === 'chart') {\n lines.push(`Layout: chart`);\n if (section.chart) {\n const chart = section.chart;\n if (chart.title) {\n lines.push(`Chart title: ${chart.title}`);\n }\n if (chart.description) {\n lines.push(`Description: ${chart.description}`);\n }\n const markType = chart.spec.mark\n ? (typeof chart.spec.mark === 'string' ? chart.spec.mark : chart.spec.mark.type || 'unknown')\n : 'composite';\n lines.push(`Chart type: ${markType}`);\n if (chart.dataKey) {\n lines.push(`Data key: \\`${chart.dataKey}\\``);\n if (!dataKeys.includes(chart.dataKey)) {\n lines.push('\\u26a0\\ufe0f **dataKey not found in data**');\n }\n }\n else if (chart.spec.data?.values) {\n lines.push(`Inline data: ${chart.spec.data.values.length} points`);\n }\n if (chart.height) {\n lines.push(`Height: ${chart.height}px`);\n }\n }\n lines.push('');\n }\n else {\n const layoutDesc = layout === 'list' ? 'vertical list' : `${layout.split('-')[1]}-column grid`;\n lines.push(`Layout: ${layoutDesc}${section.collapsed ? ' (collapsed by default)' : ''}`);\n lines.push('');\n if (section.fields) {\n for (const field of section.fields) {\n let fieldLine = `- **${field.label}** \\u2192 \\`${field.key}\\``;\n const attributes = [];\n if (field.format && field.format !== 'text') {\n attributes.push(field.format);\n }\n if (field.unit) {\n attributes.push(`unit: \"${field.unit}\"`);\n }\n if (field.editable) {\n attributes.push('editable');\n }\n if (field.highlight) {\n attributes.push(`highlight: ${field.highlight}`);\n }\n if (attributes.length > 0) {\n fieldLine += ` (${attributes.join(', ')})`;\n }\n // Check if key exists in data\n if (!dataKeys.includes(field.key)) {\n fieldLine += ' \\u26a0\\ufe0f **key not found in data**';\n }\n lines.push(fieldLine);\n }\n }\n }\n lines.push('');\n }\n if (template.footer) {\n lines.push('---');\n lines.push(`Footer: ${template.footer}`);\n lines.push('');\n }\n // Summary\n const totalFields = template.sections.reduce((sum, s) => sum + (s.fields?.length || 0) + (s.columns?.length || 0), 0);\n const missingKeys = template.sections\n .flatMap(s => s.fields || [])\n .filter(f => !dataKeys.includes(f.key))\n .map(f => f.key);\n lines.push('---');\n lines.push(`Summary: ${template.sections.length} section(s), ${totalFields} field(s)/column(s)`);\n if (missingKeys.length > 0) {\n lines.push(`\\u26a0\\ufe0f Missing keys: ${missingKeys.join(', ')}`);\n }\n else {\n lines.push('\\u2705 All field keys found in data');\n }\n return lines.join('\\n');\n}\n/**\n * Generate a compact description for tool responses\n */\nexport function generateCompactPreview(template) {\n const sections = template.sections.map(s => {\n if (s.layout === 'table' && s.columns) {\n const colList = s.columns\n .slice(0, 3)\n .map(c => c.header)\n .join(', ');\n const more = s.columns.length > 3 ? `, +${s.columns.length - 3} more` : '';\n return `${s.title} (table): ${colList}${more}`;\n }\n if (s.layout === 'chart' && s.chart) {\n const markType = s.chart.spec.mark\n ? (typeof s.chart.spec.mark === 'string' ? s.chart.spec.mark : s.chart.spec.mark.type || 'chart')\n : 'chart';\n return `${s.title} (${markType} chart)`;\n }\n if (s.fields) {\n const fieldList = s.fields\n .slice(0, 3)\n .map(f => f.label)\n .join(', ');\n const more = s.fields.length > 3 ? `, +${s.fields.length - 3} more` : '';\n return `${s.title}: ${fieldList}${more}`;\n }\n return s.title;\n });\n const title = template.title ? `\"${template.title}\" - ` : '';\n return `${title}${sections.join(' | ')}`;\n}\n//# sourceMappingURL=textPreview.js.map"],"names":["FieldTemplateSchema","type","properties","label","key","format","enum","nullable","unit","editable","inputType","options","items","value","required","additionalProperties","min","max","highlight","tooltip","decimals","currency","SectionTemplateSchema","title","layout","collapsed","fields","columns","header","width","align","dataKey","chart","description","spec","height","FragmentTemplateSchema","entityType","sections","footer","levenshteinDistance","a","b","matrix","i","length","j","cost","Math","findClosestKey","input","validKeys","maxDistance","inputLower","toLowerCase","bestMatch","bestDistance","Infinity","keyLower","includes","distance","abs","findSimilarKeys","maxResults","map","filter","sort","slice","validateSchema","Ajv","allErrors","verbose","compile","validateTemplate","template","dataKeys","errors","error","path","instancePath","replace","suggestion","message","keyword","params","allowedValues","join","missingProperty","additionalProperty","push","valid","typedTemplate","sectionIndex","section","sectionPath","fieldIndex","field","closest","undefined","formatErrors","validateFormatCompatibility","mark","layer","vconcat","hconcat","validFormats","validInputs","text","number","percent","date","boolean","parseAndValidateTemplate","jsonString","parsed","JSON","parse","err","Error","result","styles","container","display","flexDirection","gap","minWidth","fontSize","fontWeight","color","textTransform","letterSpacing","fontFamily","fontVariantNumeric","marginLeft","success","warning","info","cursor","padding","borderRadius","transition","nullValue","fontStyle","FieldRenderer","onUpdate","agentMode","isHovered","setIsHovered","useState","formattedValue","useMemo","num","parseFloat","String","isNaN","minimumFractionDigits","maximumFractionDigits","Intl","NumberFormat","style","pct","toFixed","Date","getTime","DateTimeFormat","year","month","day","formatValue","isNull","isEditable","handleClick","useCallback","enabled","sendMessage","valueStyle","base","backgroundColor","_jsxs","onMouseEnter","onMouseLeave","onClick","role","tabIndex","children","_jsx","overflowX","table","borderCollapse","thead","th","textAlign","borderBottom","td","empty","TableRenderer","rows","alignmentStyle","reduce","acc","col","colSpan","row","rowIndex","formatted","column","formatCellValue","cellStyle","FusionFragmentContext","createContext","FusionFragmentProvider","data","ChartComponent","artifactRunId","Provider","useFusionFragmentContext","context","useContext","useFusionFragmentContextSafe","ChartRenderer","className","resolvedSpec","chartData","Array","isArray","values","vegaSpec","library","border","minHeight","marginBottom","alignItems","justifyContent","stringify","opacity","gridLayouts","gridTemplateColumns","list","headerCollapsible","userSelect","chevron","chevronCollapsed","transform","content","overflow","contentCollapsed","maxHeight","contentExpanded","ChevronIcon","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","points","SectionRenderer","isCollapsed","setIsCollapsed","isTable","isChart","isCollapsible","tableRows","headerStyle","contentStyle","index","paddingBottom","marginTop","paddingTop","borderTop","errorTitle","errorList","listStyle","margin","errorItem","errorPath","errorSuggestion","ValidationErrors","FusionFragmentRenderer","validation","Object","keys","errorMessage","whiteSpace","noContext","noContextTitle","noContextMessage","loading","loadingIcon","loadingText","loadingDots","loadingDot","animation","LoadingPlaceholder","animationDelay","ParseError","NoContextWarning","requiredKeys","flatMap","s","f","FusionFragmentHandler","code","propData","propOnUpdate","incomplete","trimmed","trim","startsWith","e","incompleteIndicators","lowerMessage","some","ind","braceCount","bracketCount","inString","escaped","char","isIncompleteJson","parseError","find","createFusionFragmentCodeBlockRenderer","language","component","formatValidationErrors","formatValidationSuccess","lines","fieldCount","fieldDesc","formatAvailableKeys","groupByPrefix","groups","Map","dotIndex","indexOf","prefix","substring","rest","group","get","set","topLevel","generateSampleData","getSampleValue","toISOString","split","generateTextPreview","colLine","markType","layoutDesc","fieldLine","attributes","totalFields","sum","missingKeys","generateCompactPreview","colList","c","more","fieldList"],"mappings":"uKAMA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D,EAAEhR,QAAQkB,OAAS,EAAI,MAAM8P,EAAEhR,QAAQkB,OAAS,SAAW,GACxE,MAAO,GAAG8P,EAAEpR,kBAAkB8U,IAAUE,GAC5C,CACA,GAAiB,UAAb5D,EAAEnR,QAAsBmR,EAAE3Q,MAAO,CACjC,MAAM6T,EAAWlD,EAAE3Q,MAAME,KAAKmE,KACM,iBAAtBsM,EAAE3Q,MAAME,KAAKmE,KAAoBsM,EAAE3Q,MAAME,KAAKmE,KAAOsM,EAAE3Q,MAAME,KAAKmE,KAAKpG,MAAQ,QACvF,QACN,MAAO,GAAG0S,EAAEpR,UAAUsU,UAC1B,CACA,GAAIlD,EAAEjR,OAAQ,CACV,MAAM8U,EAAY7D,EAAEjR,OACfyC,MAAM,EAAG,GACTH,IAAI4O,GAAKA,EAAEzS,OACXmF,KAAK,MACJiR,EAAO5D,EAAEjR,OAAOmB,OAAS,EAAI,MAAM8P,EAAEjR,OAAOmB,OAAS,SAAW,GACtE,MAAO,GAAG8P,EAAEpR,UAAUiV,IAAYD,GACtC,CACA,OAAO5D,EAAEpR,QAGb,MAAO,GADOmD,EAASnD,MAAQ,IAAImD,EAASnD,YAAc,KACxCe,EAASgD,KAAK,QACpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertesia/fusion-ux",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Dynamic model-generated UI components for Vertesia",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "ajv": "^8.17.1",
24
24
  "react": "^19.2.3",
25
- "@vertesia/common": "1.0.0"
25
+ "@vertesia/common": "1.1.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@eslint/compat": "^2.0.2",
@@ -30,16 +30,16 @@
30
30
  "@rollup/plugin-commonjs": "^28.0.3",
31
31
  "@rollup/plugin-node-resolve": "^16.0.1",
32
32
  "@rollup/plugin-replace": "^6.0.2",
33
- "@types/node": "^22.15.0",
33
+ "@rollup/plugin-terser": "^0.4.4",
34
+ "@types/node": "^25.6.0",
34
35
  "@types/react": "^19.2.3",
35
36
  "eslint": "^10.0.2",
36
37
  "eslint-plugin-react": "^7.37.5",
37
38
  "eslint-plugin-react-hooks": "^7.0.1",
38
39
  "rimraf": "^6.1.2",
39
40
  "rollup": "^4.59.0",
40
- "@rollup/plugin-terser": "^0.4.4",
41
- "typescript": "^5.9.3",
42
- "typescript-eslint": "^8.56.1",
41
+ "typescript": "^6.0.2",
42
+ "typescript-eslint": "^8.58.1",
43
43
  "vitest": "^4.0.16"
44
44
  },
45
45
  "exports": {
@@ -32,15 +32,6 @@ export function ChartRenderer({
32
32
  const ChartComponent = context?.ChartComponent;
33
33
  const artifactRunId = context?.artifactRunId;
34
34
 
35
- // Debug logging
36
- console.log('[ChartRenderer] Context:', {
37
- hasContext: !!context,
38
- hasChartComponent: !!ChartComponent,
39
- artifactRunId,
40
- chartTitle: chart.title,
41
- dataKey: chart.dataKey,
42
- });
43
-
44
35
  // Resolve data from context if dataKey is provided
45
36
  const resolvedSpec = { ...chart.spec };
46
37
 
@@ -52,14 +52,6 @@ export function FusionFragmentProvider({
52
52
  [data, onUpdate, sendMessage, ChartComponent, artifactRunId]
53
53
  );
54
54
 
55
- // Debug logging
56
- console.log('[FusionFragmentProvider] Created with:', {
57
- hasData: !!data,
58
- dataKeys: data ? Object.keys(data) : [],
59
- hasChartComponent: !!ChartComponent,
60
- artifactRunId,
61
- });
62
-
63
55
  return (
64
56
  <FusionFragmentContext.Provider value={value}>
65
57
  {children}
@@ -118,7 +118,6 @@ export function SectionRenderer({
118
118
  const layout = section.layout || 'grid-3';
119
119
  const isTable = layout === 'table';
120
120
  const isChart = layout === 'chart';
121
- const layoutStyle = isTable || isChart ? {} : gridLayouts[layout as keyof typeof gridLayouts];
122
121
 
123
122
  const isCollapsible = section.collapsed !== undefined;
124
123
 
@@ -140,10 +139,10 @@ export function SectionRenderer({
140
139
  const contentStyle = useMemo(
141
140
  () => ({
142
141
  ...styles.content,
143
- ...layoutStyle,
142
+ ...(isTable || isChart ? {} : gridLayouts[layout as keyof typeof gridLayouts]),
144
143
  ...(isCollapsed ? styles.contentCollapsed : styles.contentExpanded),
145
144
  }),
146
- [isCollapsed, layoutStyle]
145
+ [isCollapsed, isTable, isChart, layout]
147
146
  );
148
147
 
149
148
  const handleHeaderClick = () => {