semiotic 3.10.0 → 3.10.1
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.
- package/README.md +55 -59
- package/ai/artifact-surface-inventory.json +1 -1
- package/ai/componentMetadata.cjs +3 -1
- package/ai/dist/mcp-server.js +45 -45
- package/ai/examples.md +67 -0
- package/ai/reference.md +75 -1
- package/ai/schema.json +5199 -1
- package/ai/surface-manifest.json +24 -3
- package/ai/task-packets/compare-category-totals.json +6 -6
- package/ai/task-packets/compare-category-totals.md +3 -3
- package/ai/task-packets/correct-published-chart.json +6 -6
- package/ai/task-packets/correct-published-chart.md +3 -3
- package/ai/task-packets/index.json +6 -6
- package/ai/task-packets/update-live-chart.json +6 -6
- package/ai/task-packets/update-live-chart.md +3 -3
- package/dist/c-2RL2QPZJ.min.js +1 -0
- package/dist/c-45CQWZZ6.min.js +1 -0
- package/dist/{c-PP6VY3QU.min.js → c-4BRHKVKV.min.js} +1 -1
- package/dist/c-7DVPSB5C.min.js +1 -0
- package/dist/{c-XDQKXPX4.min.js → c-A7OGOFSL.min.js} +1 -1
- package/dist/{c-AZKPVBOC.min.js → c-AH5HWZWS.min.js} +1 -1
- package/dist/c-B7GW7IHJ.min.js +1 -0
- package/dist/{c-ROEHCIGV.min.js → c-C3TZLTZK.min.js} +1 -1
- package/dist/c-CGQAQWBV.min.js +1 -0
- package/dist/c-DIPEYUOW.min.js +1 -0
- package/dist/{c-WNGH47HF.min.js → c-E72OTUZU.min.js} +1 -1
- package/dist/{c-DY2676CR.min.js → c-EUMPMDCS.min.js} +1 -1
- package/dist/c-EZZT2WAE.min.js +1 -0
- package/dist/c-FHBVFCQB.min.js +1 -0
- package/dist/{c-E32M6XW5.min.js → c-G4HCO2IQ.min.js} +1 -1
- package/dist/{c-ZYPXQF7B.min.js → c-G5VIJEOK.min.js} +1 -1
- package/dist/c-GHVOXAYH.min.js +1 -0
- package/dist/{c-EBOQ7ER7.min.js → c-HP4ZFM47.min.js} +1 -1
- package/dist/{c-IDJV3CZK.min.js → c-HYDTS5OP.min.js} +1 -1
- package/dist/c-IK33LNZ6.min.js +1 -0
- package/dist/c-IK3PZHRY.min.js +1 -0
- package/dist/{c-JO2UGTCP.min.js → c-J6DVC236.min.js} +1 -1
- package/dist/{c-MXCP7GNZ.min.js → c-JIMJF6F6.min.js} +1 -1
- package/dist/{c-4FN7Q6VQ.min.js → c-KKPMHAZC.min.js} +1 -1
- package/dist/c-L6WNDBHV.min.js +1 -0
- package/dist/c-LDEX5OFW.min.js +1 -0
- package/dist/{c-CPSPZH6A.min.js → c-LESEUVC5.min.js} +1 -1
- package/dist/c-MB6CV5NC.min.js +1 -0
- package/dist/{c-OO5QLMJC.min.js → c-MOKJOIPE.min.js} +1 -1
- package/dist/{c-BNG5ECK5.min.js → c-N3FXLRNT.min.js} +1 -1
- package/dist/c-N5NPTJVJ.min.js +1 -0
- package/dist/{c-DE5Q3U2X.min.js → c-NHBL4J67.min.js} +1 -1
- package/dist/{c-LMGSSD2E.min.js → c-ODG6TFSY.min.js} +1 -1
- package/dist/{c-HXDKPIKR.min.js → c-PSKKFZNP.min.js} +1 -1
- package/dist/{c-NYZ2QNAM.min.js → c-R2P4RR7Q.min.js} +1 -1
- package/dist/{c-KCRJGUHP.min.js → c-RFC7UAG7.min.js} +1 -1
- package/dist/c-SGAURYHG.min.js +1 -0
- package/dist/{c-DK662R77.min.js → c-SJMWU6UX.min.js} +1 -1
- package/dist/c-STIIGQOD.min.js +1 -0
- package/dist/c-T2ASIJVZ.min.js +1 -0
- package/dist/c-TX3THUTO.min.js +1 -0
- package/dist/{c-55BAJ333.min.js → c-TX7XJM3Z.min.js} +1 -1
- package/dist/c-UMXSJIOV.min.js +1 -0
- package/dist/{c-JLGRHXGZ.min.js → c-VRSXMLYF.min.js} +1 -1
- package/dist/c-VSLWSAN2.min.js +1 -0
- package/dist/{c-33QOXEUG.min.js → c-WCBRPILW.min.js} +1 -1
- package/dist/{c-WH2O53VI.min.js → c-WGHT7OCY.min.js} +1 -1
- package/dist/c-WWCW3APR.min.js +1 -0
- package/dist/c-Y6PYUMFU.min.js +1 -0
- package/dist/c-ZIVPFTOC.min.js +1 -0
- package/dist/components/charts/shared/chartDataProps.d.ts +3 -0
- package/dist/components/charts/shared/chartSpecAtlasSchemas.d.ts +5 -0
- package/dist/components/charts/shared/chartSpecCore.d.ts +4 -0
- package/dist/components/charts/shared/chartSpecsAtlas.d.ts +2 -0
- package/dist/components/charts/shared/hooks.d.ts +3 -1
- package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
- package/dist/components/recipes/atlas/DependencyForestChart.d.ts +20 -0
- package/dist/components/recipes/atlas/DependencyMatrix.d.ts +7 -0
- package/dist/components/recipes/atlas/FlowCircuitChart.d.ts +20 -0
- package/dist/components/recipes/atlas/MotifBraidChart.d.ts +17 -0
- package/dist/components/recipes/atlas/atlasChartOptions.d.ts +11 -0
- package/dist/components/recipes/atlas/braid.d.ts +62 -0
- package/dist/components/recipes/atlas/capsules.d.ts +18 -0
- package/dist/components/recipes/atlas/compare.d.ts +4 -0
- package/dist/components/recipes/atlas/completeness.d.ts +2 -0
- package/dist/components/recipes/atlas/dependencyForest.d.ts +32 -0
- package/dist/components/recipes/atlas/dependencyForestChartProps.d.ts +58 -0
- package/dist/components/recipes/atlas/dependencyForestLayout.d.ts +17 -0
- package/dist/components/recipes/atlas/dependencyQueries.d.ts +20 -0
- package/dist/components/recipes/atlas/dependencyTypes.d.ts +21 -0
- package/dist/components/recipes/atlas/directedGraph.d.ts +9 -0
- package/dist/components/recipes/atlas/entityCounts.d.ts +3 -0
- package/dist/components/recipes/atlas/flowCircuit.d.ts +32 -0
- package/dist/components/recipes/atlas/flowCircuitChartProps.d.ts +72 -0
- package/dist/components/recipes/atlas/flowCircuitChrome.d.ts +18 -0
- package/dist/components/recipes/atlas/flowCircuitGeometry.d.ts +11 -0
- package/dist/components/recipes/atlas/flowCircuitLayout.d.ts +20 -0
- package/dist/components/recipes/atlas/flowCircuitSemantics.d.ts +26 -0
- package/dist/components/recipes/atlas/flowCircuitTape.d.ts +22 -0
- package/dist/components/recipes/atlas/flowCircuitTypes.d.ts +144 -0
- package/dist/components/recipes/atlas/forests.d.ts +11 -0
- package/dist/components/recipes/atlas/ids.d.ts +6 -0
- package/dist/components/recipes/atlas/index.d.ts +26 -0
- package/dist/components/recipes/atlas/ledger.d.ts +7 -0
- package/dist/components/recipes/atlas/motifBraidChartProps.d.ts +51 -0
- package/dist/components/recipes/atlas/motifBraidGeometry.d.ts +5 -0
- package/dist/components/recipes/atlas/motifBraidLayout.d.ts +11 -0
- package/dist/components/recipes/atlas/motifs.d.ts +3 -0
- package/dist/components/recipes/atlas/prefixForest.d.ts +9 -0
- package/dist/components/recipes/atlas/prepare.d.ts +14 -0
- package/dist/components/recipes/atlas/prepareAsync.d.ts +7 -0
- package/dist/components/recipes/atlas/profile.d.ts +19 -0
- package/dist/components/recipes/atlas/publish.d.ts +10 -0
- package/dist/components/recipes/atlas/queries.d.ts +34 -0
- package/dist/components/recipes/atlas/requiredPaths.d.ts +9 -0
- package/dist/components/recipes/atlas/rootedForest.d.ts +4 -0
- package/dist/components/recipes/atlas/sections.d.ts +3 -0
- package/dist/components/recipes/atlas/support.d.ts +7 -0
- package/dist/components/recipes/atlas/types.d.ts +278 -0
- package/dist/components/recipes/atlas/validate.d.ts +12 -0
- package/dist/components/semiotic-atlas-core.d.ts +20 -0
- package/dist/components/semiotic-atlas.d.ts +8 -0
- package/dist/components/semiotic-recipes-core.d.ts +9 -0
- package/dist/components/server/serverChartConfigs.d.ts +3 -0
- package/dist/components/server/serverChartConfigsAtlas.d.ts +4 -0
- package/dist/components/stream/NetworkPipelineStore.d.ts +1 -0
- package/dist/components/stream/canvasSetup.d.ts +1 -2
- package/dist/components/stream/fontLoading.d.ts +4 -0
- package/dist/components/stream/networkCustomLayout.d.ts +8 -0
- package/dist/components/stream/networkCustomLayoutCache.d.ts +12 -0
- package/dist/components/stream/networkPipelineConfig.d.ts +0 -7
- package/dist/components/stream/physics/physicsSemanticUI.d.ts +2 -0
- package/dist/components/stream/physics/usePhysicsCanvasPointer.d.ts +3 -1
- package/dist/components/stream/physics/usePhysicsSemanticNavigation.d.ts +2 -0
- package/dist/components/stream/shallowEqual.d.ts +2 -0
- package/dist/components/stream/useEnsureCustomXYRenderers.d.ts +4 -2
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/rough.module.min.js +1 -1
- package/dist/semiotic-access.module.min.js +1 -1
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-artifact.min.js +1 -1
- package/dist/semiotic-artifact.module.min.js +1 -1
- package/dist/semiotic-atlas-core.d.ts +20 -0
- package/dist/semiotic-atlas-core.min.js +1 -0
- package/dist/semiotic-atlas-core.module.min.js +1 -0
- package/dist/semiotic-atlas-selection.module.min.js +2 -0
- package/dist/semiotic-atlas.d.ts +8 -0
- package/dist/semiotic-atlas.min.js +2 -0
- package/dist/semiotic-atlas.module.min.js +2 -0
- package/dist/semiotic-client-cjs-shared.min.js +1 -1
- package/dist/semiotic-evidence.min.js +1 -1
- package/dist/semiotic-evidence.module.min.js +1 -1
- package/dist/semiotic-experimental-auxiliary.module.min.js +1 -1
- package/dist/semiotic-experimental-node-auxiliary.module.min.js +1 -1
- package/dist/semiotic-experimental-react-shared.module.min.js +1 -1
- package/dist/semiotic-experimental-vacp.min.js +1 -1
- package/dist/semiotic-experimental-vacp.module.min.js +1 -1
- package/dist/semiotic-line.module.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-recipes-core-cjs-base.min.js +1 -1
- package/dist/semiotic-recipes-core.d.ts +9 -0
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-server-edge-node.module.min.js +1 -1
- package/dist/semiotic-server-edge.min.js +1 -1
- package/dist/semiotic-server-edge.module.min.js +1 -1
- package/dist/semiotic-server-node.min.js +1 -1
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-text.min.js +1 -1
- package/dist/semiotic-text.module.min.js +1 -1
- package/dist/semiotic-utils-core.min.js +1 -1
- package/dist/semiotic-utils-core.module.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +16 -1
- package/dist/c-447VIMRO.min.js +0 -1
- package/dist/c-553QUDKA.min.js +0 -1
- package/dist/c-7HP7MB2I.min.js +0 -1
- package/dist/c-7NBU5ZKS.min.js +0 -1
- package/dist/c-CCTGN5CK.min.js +0 -1
- package/dist/c-GSZRZRD6.min.js +0 -1
- package/dist/c-GWX7JGMF.min.js +0 -1
- package/dist/c-ITKX3RC5.min.js +0 -1
- package/dist/c-JG2JCQLP.min.js +0 -1
- package/dist/c-LYVKDBQJ.min.js +0 -1
- package/dist/c-NG7BLZTR.min.js +0 -1
- package/dist/c-PYNW54D2.min.js +0 -1
- package/dist/c-TIXX5CAU.min.js +0 -1
- /package/dist/{c-OOVX2JPQ.min.js → c-UC7SIU2W.min.js} +0 -0
package/dist/c-ITKX3RC5.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t={}){let r=!0===t.showRetractedAnnotations,n=!0===t.showSupersededAnnotations,a=new Set;for(let t of e){let e=t?.lifecycle?.supersedes;e&&"retracted"!==t?.lifecycle?.status&&a.add(e)}return e.filter(e=>{if("retracted"===e?.lifecycle?.status&&!r)return!1;let t=e?.provenance?.stableId;return!(t&&a.has(t)&&!n)})}function t(e){return"string"==typeof e?e:"value"}function r(e){return null==e?"–":"number"==typeof e?Math.abs(e)>9999?e.toLocaleString():e+"":e instanceof Date?e.toLocaleDateString():e+""}function n(e,t){if(!t)return r(e);try{return t(e)??r(e)}catch{return r(e)}}function a(e,t){return"function"==typeof t?t(e):e[t]}function o(e,t){if(!e)return[];let r=[];return(Array.isArray(e)?e:[e]).forEach((e,n)=>{let a="string"==typeof e?.y0Accessor?e.y0Accessor:"low",o="string"==typeof e?.y1Accessor?e.y1Accessor:"high";r.push({label:a,accessor:e=>e.bands?.[n]?.y0??(0===n?e.band?.y0:void 0),format:t}),r.push({label:o,accessor:e=>e.bands?.[n]?.y1??(0===n?e.band?.y1:void 0),format:t})}),r}function l(e){let t=e.find(e=>"title"===e.role),r=e.filter(e=>"title"!==e.role);return e=>{let o=e.data;if(!o)return null;let l=t?n(a(o,t.accessor),t.format):null;return Se("div",{className:"semiotic-tooltip",style:be,children:[null!=l&&Ie("div",{style:{fontWeight:"bold",marginBottom:r.length>0?4:0},children:l}),r.map((e,t)=>{let r=n("y"===e.role&&null!=o.__aggregateValue?o.__aggregateValue:a(o,e.accessor),e.format);return Se("div",{style:t>0?{marginTop:2}:void 0,children:[Se("span",{style:{opacity:.7},children:[e.label,": "]}),Ie("span",{children:r})]},t)})]})}}function i({categoryAccessor:e,valueAccessor:o,groupAccessor:l,groupLabel:i,pieData:u=!1,valueFormat:c}){return s=>{let f=u?s.data?.[0]||s.data||s:s.data||s,d=a(f,e),h=a(f,o),p=l?a(f,l):void 0;return Se("div",{className:"semiotic-tooltip",style:be,children:[Ie("div",{style:{fontWeight:"bold"},children:r(d)}),Ie("div",{style:{marginTop:4},children:n(h,c)}),null!=p&&Se("div",{style:{marginTop:2,opacity:.8},children:[i||t(l),": ",r(p)]})]})}}function u(...e){let t=e.filter(e=>null!=e);return 0===t.length?null:1===t.length?t[0]:Oe.createElement(Oe.Fragment,null,...t)}function c(e,t,r,n){Ee(()=>{e.current?.updateConfig(t),r.current=!0,n()},[t,n,e,r])}function s(e,t,r,n){let a=De(null);Ee(()=>{let o=e.current;if(!o)return;let l=t??null;a.current!==l&&(a.current=l,o.setLayoutSelection(l),o.hasCustomRestyle?o.restyleScene(l):r.current=!0,n())},[t,n,e,r])}function f(e,t){if(!e||0>=t)return Be;let r=null!=e.threshold&&e.threshold>0?e.threshold:5e3,n=e.graded;if(n){let e="object"==typeof n?n:{},a=xe(t,r,e.thresholds);return{alpha:{...Re,...e.opacities??{}}[a],band:a,isStale:"fresh"!==a}}return t>r?{alpha:e.dimOpacity??.5,band:"stale",isStale:!0}:Be}function d(e,t,r,n,a,o,l){let i=Pe("fresh");Le(()=>{if(!e)return void(i.current="fresh");let u=setInterval(()=>{let u=t.current;if(!u||0===u.lastIngestTime)return;let c=f(e,a()-u.lastIngestTime);(c.band!==i.current||c.isStale!==o)&&(i.current=c.band,c.isStale!==o&&l(c.isStale),r.current=!0,n())},1e3);return()=>clearInterval(u)},[e,o,n,a,t,l,r])}function h({isStale:e,position:t}){return je("div",{className:"stream-staleness-badge",style:{position:"absolute",..."top-left"===t?{top:4,left:4}:"bottom-left"===t?{bottom:4,left:4}:"bottom-right"===t?{bottom:4,right:4}:{top:4,right:4},padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,pointerEvents:"none",zIndex:3,background:e?"#dc3545":"#28a745",color:"white"},children:e?"STALE":"LIVE"})}function p(e){let t=Ce(e);return function(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return g(e,t);if(!m(e)||!m(t))return!1;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r){if(!Object.prototype.hasOwnProperty.call(t,n))return!1;let r=e[n],a=t[n];if(!Object.is(r,a)){if(Array.isArray(r)&&Array.isArray(a)){if(!g(r,a))return!1;continue}if(!m(r)||!m(a)||!y(r,a))return!1}}return!0}(t.current,e)||(t.current=e),t.current}function y(e,t){let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||!Object.is(e[n],t[n]))return!1;return!0}function g(e,t){if(e.length!==t.length)return!1;for(let r=0;e.length>r;r++)if(!Object.is(e[r],t[r]))return!1;return!0}function m(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function x(e){let{background:t,hasBackgroundGraphics:r=!1,themeBackground:n=""}=e;return"transparent"===t?null:r?t||null:t||(n&&"transparent"!==n?n:"")||null}function b(e){let{background:t,hasBackgroundGraphics:r=!1,themeBackground:n=""}=e;return"transparent"===t||r?null:t||(n&&"transparent"!==n?n:"")||null}function v(e,t){let{background:r,hasBackgroundGraphics:n=!1,themeBackground:a="",x:o=0,y:l=0,width:i,height:u}=t,c=b({background:r,hasBackgroundGraphics:n,themeBackground:a});if(!c)return!1;let s=_e(e,c);return!(!s||"transparent"===s.trim().toLowerCase()||(e.fillStyle=s,e.fillRect(o,l,i,u),0))}function w(e,t,r,n){return"function"==typeof e?e({size:t,margin:r,scales:n}):e}function k({foregroundGraphics:e,backgroundGraphics:t,size:r,margin:n,scales:a,background:o,themeBackgroundColor:l,resolveScaleAwareGraphics:i=!0}){let u=`var(--semiotic-bg, ${l})`;return{resolvedForeground:i||"function"!=typeof e?w(e,r,n,a):null,resolvedBackground:i||"function"!=typeof t?w(t,r,n,a):null,themeBackground:u,surfaceBackground:x({background:o,hasBackgroundGraphics:!!t,themeBackground:u})}}function A(e,t){if(!t)return[];let r=new Set,n=[];for(let a of e){if(!a||"object"!=typeof a)continue;let e=("function"==typeof t?t(a):a[t])+"";r.has(e)||(r.add(e),n.push(e))}return n}function M(e,t,r,n){let a=$e({accessor:t,onChange:r,readData:n}),o=$e([]);a.current={accessor:t,onChange:r,readData:n};let l=Te(()=>{let{accessor:t,onChange:r,readData:n}=a.current;if(!r||!t)return;let l=A(e.current?n(e.current):[],t);(function(e,t){if(e.length!==t.length)return!1;for(let r=0;e.length>r;r++)if(e[r]!==t[r])return!1;return!0})(l,o.current)||(o.current=l,r(l))},[e]);return Ge(()=>{o.current=[],l()},[t,l,r]),l}function _(e,t){let r="function"==typeof e?e(t.datum??null,t):e;return(n=r)&&"object"==typeof n&&"string"==typeof n.id&&"function"==typeof n.cacheKey&&"function"==typeof n.drawCanvas&&"function"==typeof n.renderStaticSVG?r:void 0;var n}function I(e,t){if("u">typeof process&&"production"===process.env?.NODE_ENV)return;let r=`${e}:${t}`;ze.has(r)||(ze.add(r),console.warn(`[Semiotic] Render backend "${e}" does not support scene node "${t}"; using the built-in renderer.`))}function S(e){let{context:t,nodes:r,renderMode:n,pixelRatio:a,paintBuiltIn:o}=e;if(!n||"sketchy"===n)return void o(r);let l=[],i=()=>{l.length&&(o(l),l=[])};for(let e of r){let r,u=_(n,e);if(u){i(),t.save();try{r=u.drawCanvas({context:t,node:e,style:e.style??{},pixelRatio:a})}finally{t.restore()}r||(I(u.id,e.type??"unknown"),o([e]))}else l.push(e)}i()}function O(e){let{node:t,index:r,renderMode:n,fallback:a}=e,o=_(n,t);if(!o)return{element:a(),renderedByBackend:!1};let l=o.renderStaticSVG({node:t,style:t.style??{},key:`${o.id}-${r}`});return null!=l?{element:Ae(l,t,`${o.id}-${r}-cursor`),renderedByBackend:!0}:(I(o.id,t.type??"unknown"),{element:a(),renderedByBackend:!1})}function E(e){return O(e).element}function D(e){let t=[];return e.nodes.forEach((r,n)=>{let a=O({node:r,index:n,renderMode:e.renderMode,fallback:()=>e.fallback(r,n)});null!=a.element&&!1!==a.element&&t.push({node:r,index:n,...a})}),t}function R(e){let t=new Map;for(let r of e){let e=r.group??"_default",n=t.get(e);n||(n=[],t.set(e,n)),n.push(r)}for(let e of t.values()){e.sort((e,t)=>e.x-t.x||e.y-t.y);for(let t=0;e.length>t;t++)e[t]._groupIndex=t}let r=Array.from(t.keys()).sort((e,r)=>{let n=t.get(e),a=t.get(r);return(n.length>0?n[0].y:0)-(a.length>0?a[0].y:0)}),n=Array.from(t.values()).flat();n.sort((e,t)=>e.x-t.x||e.y-t.y);let a=new Map;for(let e=0;n.length>e;e++){n[e]._flatIndex=e;let t=n[e].datum?.id;null!=t&&a.set(t+"",e)}return{flat:n,groups:r,byGroup:t,idToIdx:a}}function B(e,t){if(0===e.flat.length)return{flatIndex:-1,group:"_default",indexInGroup:-1};let r=Math.max(0,Math.min(t,e.flat.length-1)),n=e.flat[r];return{flatIndex:r,group:n.group??"_default",indexInGroup:n._groupIndex??0}}function L(e,t,r){let{group:n,indexInGroup:a}=t,o=r.byGroup.get(n);switch(e){case"ArrowRight":return o.length-1>a?o[a+1]._flatIndex:t.flatIndex;case"ArrowLeft":return a>0?o[a-1]._flatIndex:t.flatIndex;case"ArrowDown":{let e=r.groups.indexOf(n);return r.groups.length-1>e?P(r,r.groups[e+1],o[a]):t.flatIndex}case"ArrowUp":{let e=r.groups.indexOf(n);return e>0?P(r,r.groups[e-1],o[a]):t.flatIndex}case"PageDown":return Math.min(t.flatIndex+Math.max(1,Math.floor(.1*r.flat.length)),r.flat.length-1);case"PageUp":return Math.max(t.flatIndex-Math.max(1,Math.floor(.1*r.flat.length)),0);case"Home":return 0;case"End":return r.flat.length-1;case"Escape":return-1;default:return null}}function P(e,t,r){let n=e.byGroup.get(t),a=0,o=Math.abs(n[0].x-r.x);for(let e=1;n.length>e;e++){let t=Math.abs(n[e].x-r.x);o>t&&(o=t,a=e)}return n[a]._flatIndex}function j(e){let t=[];for(let r of e)switch(r.type){case"point":if(!1===r.interactive)break;t.push({x:r.x,y:r.y,datum:r.datum,shape:"circle",group:"_default"});break;case"symbol":if(0>=r.size)break;t.push({x:r.x,y:r.y,datum:r.datum,shape:"circle",group:"_default"});break;case"glyph":{if(0>=r.size||null==r.datum)break;let e=Me(r.glyph,r.size);t.push({x:r.x+e.centerDx,y:r.y+e.centerDy,datum:r.datum,shape:"rect",w:2*e.halfWidth,h:2*e.halfHeight,group:"_default"});break}case"line":{let e=r,n=Array.isArray(e.datum)?e.datum:[],a=e.group??"_default";for(let r=0;e.path.length>r&&n.length>r;r++)t.push({x:e.path[r][0],y:e.path[r][1],datum:n[r],shape:"circle",group:a});break}case"area":{if(!1===r.interactive)break;let e=r,n=Array.isArray(e.datum)?e.datum:[],a=e.group??"_default";for(let r=0;e.topPath.length>r&&n.length>r;r++)t.push({x:e.topPath[r][0],y:e.topPath[r][1],datum:n[r],shape:"circle",group:a});break}case"rect":t.push({x:r.x+r.w/2,y:r.y+r.h/2,datum:r.datum,shape:"rect",w:r.w,h:r.h,group:r.group??"_default"});break;case"heatcell":t.push({x:r.x+r.w/2,y:r.y+r.h/2,datum:r.datum,shape:"rect",w:r.w,h:r.h,group:"_default"})}return t.sort((e,t)=>e.x-t.x||e.y-t.y),t}function C(e){let t=[];for(let r of e)if("rect"===r.type&&null!=r.x){if(null==r.datum)continue;t.push({x:r.x+r.w/2,y:r.y+r.h/2,datum:r.datum,shape:"rect",w:r.w,h:r.h,group:r.group??r.datum?.category??""})}else if("point"===r.type){if(!1===r.interactive)continue;t.push({x:r.x,y:r.y,datum:r.datum,shape:"circle",group:"_default"})}else if("symbol"===r.type){if(0>=r.size)continue;t.push({x:r.x,y:r.y,datum:r.datum,shape:"circle",group:"_default"})}else if("glyph"===r.type){if(0>=r.size||null==r.datum)continue;let e=Me(r.glyph,r.size);t.push({x:r.x+e.centerDx,y:r.y+e.centerDy,datum:r.datum,shape:"rect",w:2*e.halfWidth,h:2*e.halfHeight,group:"_default"})}else if("wedge"===r.type&&null!=r.cx){if(null===r.datum)continue;let e=((r.startAngle||0)+(r.endAngle||0))/2,n=((r.innerRadius||0)+(r.outerRadius||50))/2;t.push({x:r.cx+Math.cos(e)*n,y:r.cy+Math.sin(e)*n,datum:r.datum,shape:"wedge",group:"_default"})}return t.sort((e,t)=>e.x-t.x||e.y-t.y),t}function T(e){let t=[];for(let r of e)if(r.datum)if("circle"===r.type&&null!=r.cx){if(0>=r.r)continue;t.push({x:r.cx,y:r.cy,datum:r.datum,shape:"circle",group:r.datum.id??"_default"})}else if("rect"===r.type&&null!=r.x){if(0>=r.w||0>=r.h)continue;t.push({x:r.x+r.w/2,y:r.y+r.h/2,datum:r.datum,shape:"rect",w:r.w,h:r.h,group:r.datum.id??"_default"})}else if("arc"===r.type&&null!=r.cx)t.push({x:r.cx,y:r.cy,datum:r.datum,shape:"circle",group:r.datum.id??"_default"});else if("symbol"===r.type&&null!=r.cx){if(0>=r.size)continue;t.push({x:r.cx,y:r.cy,datum:r.datum,shape:"circle",group:r.datum.id??"_default"})}else if("glyph"===r.type&&null!=r.cx){if(0>=r.size)continue;let e=Me(r.glyph,r.size);t.push({x:r.cx+e.centerDx,y:r.cy+e.centerDy,datum:r.datum,shape:"rect",w:2*e.halfWidth,h:2*e.halfHeight,group:r.datum.id??"_default"})}return t.sort((e,t)=>e.x-t.x||e.y-t.y),t}function G(e,t,r,n,a){let o=r.flat[t.flatIndex];if(!o)return L(e,t,r);let l=o.datum?.id;switch(e){case"ArrowRight":case"ArrowLeft":case"ArrowDown":case"ArrowUp":{let n=function(e,t,r){let n=null,a=1/0;for(let o=0;e.flat.length>o;o++){let l=e.flat[o];if(l===t)continue;let i=l.x-t.x,u=l.y-t.y,c=!1;switch(r){case"right":c=i>0&&Math.abs(i)>=Math.abs(u);break;case"left":c=0>i&&Math.abs(i)>=Math.abs(u);break;case"down":c=u>0&&Math.abs(u)>=Math.abs(i);break;case"up":c=0>u&&Math.abs(u)>=Math.abs(i)}if(!c)continue;let s=i*i+u*u;a>s&&(a=s,n=o)}return n}(r,o,"ArrowRight"===e?"right":"ArrowLeft"===e?"left":"ArrowDown"===e?"down":"up")??t.flatIndex;return n!==t.flatIndex&&(a.current=-1),n}case"Enter":{if(null==l)return t.flatIndex;let e=function(e,t){let r=e+"",n=[];for(let e of t){let t=e.datum??e,a=$(t.source),o=$(t.target),l=null!=a,i=null!=o;l&&a+""===r&&i?n.push(o+""):i&&o+""===r&&l&&n.push(a+"")}return n}(l,n);if(0===e.length)return t.flatIndex;let o=r.idToIdx.get(e[(a.current+1)%e.length])??-1;return 0>o?t.flatIndex:(a.current=-1,o)}default:{let n=L(e,t,r);return null!==n&&n!==t.flatIndex&&(a.current=-1),n}}}function $(e){return"object"==typeof e&&null!==e&&"id"in e?e.id:e}function z(e){let t=[];for(let r of e)if("point"===r.type&&null!=r.x&&!1!==r.interactive)t.push({x:r.x,y:r.y,datum:r.datum,shape:"circle"});else if("glyph"===r.type){if(0>=r.size||null==r.datum)continue;let e=Me(r.glyph,r.size);t.push({x:r.x+e.centerDx,y:r.y+e.centerDy,datum:r.datum,shape:"rect",w:2*e.halfWidth,h:2*e.halfHeight})}else"geoarea"===r.type&&r.centroid&&!1!==r.interactive&&t.push({x:r.centroid[0],y:r.centroid[1],datum:r.datum,shape:"geoarea",pathData:r.pathData});return t.sort((e,t)=>e.x-t.x||e.y-t.y),t}function H(e,t,r){switch(e){case"ArrowRight":case"ArrowDown":return r-1>t?t+1:t;case"ArrowLeft":case"ArrowUp":return t>0?t-1:t;case"PageDown":return Math.min(t+Math.max(1,Math.floor(.1*r)),r-1);case"PageUp":return Math.max(t-Math.max(1,Math.floor(.1*r)),0);case"Home":return 0;case"End":return r-1;case"Escape":return-1;default:return null}}function N(e){return{data:e.datum||{},x:e.x,y:e.y,__semioticHoverData:!0}}function W(e,t,r,n,a,o){return function(e,t,r){let n=e.current;n.inside=!0,n.clientX=t.clientX,n.clientY=t.clientY,n.pointerType=t.pointerType??r}(e,t,o),!(!r&&!n||!r&&"touch"===e.current.pointerType&&(ke(a),1))}function U(e){let{title:t,description:r,summary:n,accessibleTable:a,className:o,animate:l,maxDevicePixelRatio:i,axisExtent:u,autoPlaceAnnotations:c}=e,s={};return t&&(s.title=t),r&&(s.description=r),n&&(s.summary=n),void 0!==a&&(s.accessibleTable=a),o&&(s.className=o),null!=l&&(s.animate=l),void 0!==i&&(s.maxDevicePixelRatio=i),void 0!==u&&(s.axisExtent=u),void 0!==c&&(s.autoPlaceAnnotations=c),s}function V(e){let{linkedHover:t,selection:r,onObservation:n,onClick:a,hoverRadius:o,hoverHighlight:l,forceHoverBehavior:i,forceClickBehavior:u,mobileInteraction:c,customHoverBehavior:s,customClickBehavior:f,linkedHoverInClickPredicate:d=!0}=e,h={};n&&(h.annotationObservationCallback=n);let p=c?.enabled?Math.max(o??30,Math.ceil((c.targetSize||44)/2),24):o;return(i||t||n||a||l)&&(h.customHoverBehavior=s),f&&(u||(d?n||a||t:n||a)||c?.enabled&&(c.tapToSelect||c.tapToLockTooltip)&&(t||l||r))&&(h.customClickBehavior=f),null!=p&&(h.hoverRadius=p),h}function F(e){let{tooltip:t,defaultTooltipContent:r}=e;return{tooltipContent:!1===t?()=>null:ve(t)||r}}function Y(e,t){if(!function(e){return void 0!==e.stroke||void 0!==e.strokeWidth||void 0!==e.opacity}(t))return e??((...e)=>({}));let r={};return void 0!==t.stroke&&(r.stroke=t.stroke),void 0!==t.strokeWidth&&(r.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(r.opacity=t.opacity),e?(...t)=>({...e(...t)||{},...r}):(...e)=>({...r})}function q(e,t,r){if(1>=r)return 1;let n=r-1;return we({age:n-t,extent:n,type:e.type,halfLife:e.halfLife??r/2,threshold:e.stepThreshold??.5*r,minOpacity:e.minOpacity??.1})}function K(e){let t=new Map;for(let r=0;e.length>r;r++)t.set(e[r],r);return t}function X(e,t,r,n=K(r)){let a=r.length;if(a>1)for(let r of t){if("line"===r.type){let t=Array.isArray(r.datum)?r.datum:[];if(2>t.length)continue;let o=Array(t.length),l=!1;for(let r=0;t.length>r;r++){let i=n.get(t[r]);null!=i?(o[r]=q(e,i,a),1>o[r]&&(l=!0)):o[r]=1}l&&(r._decayOpacities=o);continue}if("area"===r.type){let t=Array.isArray(r.datum)?r.datum:[],o=r.topPath?r.topPath.length:t.length;if(2>o)continue;if(t.length===o){let l=Array(o),i=!1;for(let r=0;t.length>r;r++){let o=n.get(t[r]);null!=o?(l[r]=q(e,o,a),1>l[r]&&(i=!0)):l[r]=1}i&&(r._decayOpacities=l)}else{let l=1;for(let r of t){let t=n.get(r);if(null!=t){let r=q(e,t,a);l>r&&(l=r)}}if(1>l){let e=Array(o);e.fill(l),r._decayOpacities=e}}continue}let t=n.get(r.datum);if(null==t)continue;let o=q(e,t,a);"candlestick"===r.type?r._decayOpacity=o:r.style={...r.style,opacity:(r.style?.opacity??1)*o}}}function Z(e){if("production"===process.env.NODE_ENV)return;let{label:t,nodes:r,overlays:n,warned:a}=e;Q(n)&&0===r.length&&J(a,"overlay-only",`[semiotic] ${t} returned overlays but no data-bearing scene nodes. Overlays do not participate in hover, selection, transitions, SSR evidence, or accessibility tables. Emit at least one scene node with a datum, or mark the overlay-only chart as intentionally decorative.`),r.length>0&&r.every(e=>null==e.datum)&&J(a,"null-datums",`[semiotic] ${t} returned scene nodes, but every scene-node datum is null. Hover, callbacks, selection, and tooltip helpers need data-bearing nodes. Attach a user-facing datum to each interactive node, or set interactive overlays outside the chart.`)}function Q(e){return null!=e&&!1!==e&&""!==e&&(!Array.isArray(e)||e.some(Q))}function J(e,t,r){e.has(t)||(e.add(t),console.warn(r))}function ee(e){try{return{kind:"success",result:e.run()}}catch(t){let r=e.hasPreviousResult,n=function(e,t,r,n){let a=function(e){if(e instanceof Error)return{name:e.name||"Error",message:e.message||"Custom layout threw."};if("string"==typeof e)return{name:"Error",message:e};if(null==e)return{name:"Error",message:"Custom layout threw a nullish value."};try{return{name:"Error",message:e+""}}catch{return{name:"Error",message:"Custom layout threw a non-stringifiable value."}}}(t),o="network"===e?"customNetworkLayout":"customLayout";return{code:"CUSTOM_LAYOUT_ERROR",severity:"error",phase:"layout",component:e,source:o,message:`Semiotic ${e} ${o} failed: ${a.message}`,error:a,recovery:r?"preserved-last-good-scene":"empty-scene",preservedLastGoodScene:r,affectedRevision:n}}(e.family,t,r,e.revision);"production"!==process.env.NODE_ENV&&console.error(`[semiotic] ${e.logLabel} threw:`,t);try{e.onLayoutError?.(n)}catch(e){"production"!==process.env.NODE_ENV&&console.error("[semiotic] onLayoutError threw:",e)}return{kind:"failure",diagnostic:n,preservedLastGoodScene:r}}}function te(){return this.updateResults.last}function re(){return this.updateResults.last}function ne(e){return this.updateResults.subscribe(e)}function ae(e){this.config.layoutSelection=e}function oe(){He.set(this,!0)}function le(){let e=!0===He.get(this);return He.delete(this),e}function ie(e){Object.assign(e.prototype,{getLastUpdateResult:te,getUpdateSnapshot:re,subscribeUpdateResult:ne,setLayoutSelection:ae,markStylePaintPending:oe,consumeStylePaintPending:le})}function ue(e,t,r,n,a,o){let l=a-r,i=o-n,u=l*l+i*i;if(0===u)return Math.sqrt((e-r)**2+(t-n)**2);let c=((e-r)*l+(t-n)*i)/u;return c=Math.max(0,Math.min(1,c)),Math.sqrt((e-(r+c*l))**2+(t-(n+c*i))**2)}function ce(e,t,r){return r.x>e||e>r.x+r.w||r.y>t||t>r.y+r.h?{hit:!1,cx:0,cy:0}:{hit:!0,cx:r.x+r.w/2,cy:r.y+r.h/2}}function se(e,t=30){return Math.max((e??4)+5,12,t)}function fe(e){return e instanceof Date?e:"number"==typeof e&&e>1e9?new Date(e):null}function de(e,t){let r=fe(e);if(!r)return!1;let n=fe(t);return!n||r.getFullYear()!==n.getFullYear()||r.getMonth()!==n.getMonth()}function he(e){let t=e%(2*Math.PI);return 0>t&&(t+=2*Math.PI),t}function pe(e,t,r,n,a,o=e=>e.x,l=e=>e.y,i=e=>e.r){let u=Math.max(n,a+5,12),c=t-u,s=t+u,f=r-u,d=r+u,h=null,p=1/0;return e.visit((e,a,u,y,g)=>{if(a>s||c>y||u>d||f>g)return!0;if(!e.length){let a=e;do{let e=a.data,u=o(e)-t,c=l(e)-r,s=Math.sqrt(u*u+c*c);se(i(e),n)>=s&&p>s&&(h=e,p=s),a=a.next}while(a)}return!1}),h?{node:h,distance:p}:null}function ye(e,t){return"string"==typeof e&&e.length>0?e:t}function ge(e,t,r){return"string"==typeof t&&t.length>0?t:"string"==typeof e&&e.length>0?`${e} (${r.familyPhrase})`:r.fallback}function me(e){let t=(e+"").replace(/[^a-zA-Z0-9_-]/g,"_"),r=/^[A-Za-z_]/.test(t)?t:"c"+t,n=r+"-semiotic-title",a=r+"-semiotic-desc";return{titleId:n,descId:a,labelledBy:`${n} ${a}`}}import{bandFromAge as xe,defaultTooltipStyle as be,normalizeTooltip as ve,opacityFromAge as we,setCanvasMarkCursor as ke,withSceneMarkCursor as Ae}from"./c-LMGSSD2E.min.js";import{glyphHitGeometry as Me,resolveCSSColor as _e}from"./c-553QUDKA.min.js";import{jsx as Ie,jsxs as Se}from"react/jsx-runtime";import*as Oe from"react";import{useEffect as Ee,useRef as De}from"react";var Re={fresh:1,aging:.7,stale:.45,expired:.25},Be={alpha:1,band:"fresh",isStale:!1};import{useEffect as Le,useRef as Pe}from"react";import{jsx as je}from"react/jsx-runtime";import{useRef as Ce}from"react";import{useCallback as Te,useEffect as Ge,useRef as $e}from"react";var ze=new Set,He=new WeakMap;export{q as computeDecayOpacity,K as buildDatumIndexMap,X as applyDecay,Z as warnCustomLayoutDiagnostics,ee as runCustomLayoutAttempt,ie as attachUpdateResultStore,u as composeOverlays,c as useConfigSync,s as useLayoutSelectionSync,ue as pointToSegmentDistance,ce as hitTestRect,se as getHitRadius,de as isTimeLandmark,he as normalizeAngle,pe as findHitPointInQuadtree,f as resolveStaleness,d as useStalenessCheck,h as StalenessBadge,e as filterAnnotationsByStatus,ye as overlayAccessibleTitle,ge as overlayAccessibleDescription,me as overlayAccessibleIds,p as useStableShallow,b as resolveCanvasBackground,v as paintCanvasBackground,w as resolveFrameGraphics,k as resolveFrameLayers,A as extractCategoryDomain,M as useLegendCategoryEmission,S as paintSceneWithBackend,E as renderSceneWithBackend,D as renderSceneListWithBackend,t as accessorName,r as formatVal,o as bandTooltipFields,l as buildDefaultTooltip,i as buildOrdinalTooltip,R as buildNavGraph,B as resolvePosition,L as nextGraphIndex,j as extractXYNavPoints,C as extractOrdinalNavPoints,T as extractNetworkNavPoints,G as nextNetworkIndex,z as extractGeoNavPoints,H as nextIndex,N as navPointToHover,W as shouldHandleFramePointer,U as buildBaseMetadataProps,V as buildCustomBehaviorProps,F as buildTooltipProps,Y as mergeShapeStyle};
|
package/dist/c-JG2JCQLP.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){let{desired:t,minGaps:i,weights:n}=e,s=t.length;if(0===s)return[];if(i.length!==Math.max(0,s-1))throw Error("placeWithMinGap: minGaps must have desired.length - 1 entries");let r=Array(s).fill(0);for(let e=1;s>e;e++)r[e]=r[e-1]+Math.max(0,Number.isFinite(i[e-1])?i[e-1]:0);let o=[];for(let e=0;s>e;e++){let i=Math.max(Number.EPSILON,Number.isFinite(n?.[e])?n[e]:1),s=(Number.isFinite(t[e])?t[e]:0)-r[e];for(o.push({start:e,end:e,weight:i,mean:s});o.length>1;){let e=o[o.length-1],t=o[o.length-2];if(e.mean>=t.mean)break;let i=t.weight+e.weight;o.splice(o.length-2,2,{start:t.start,end:e.end,weight:i,mean:(t.mean*t.weight+e.mean*e.weight)/i})}}let a=Number.isFinite(e.min)?e.min:-1/0,l=Number.isFinite(e.max)?e.max-r[s-1]:1/0,d=a>l?a:l,h=Array(s);for(let e of o){let t=Math.max(a,Math.min(d,e.mean));for(let i=e.start;e.end>=i;i++)h[i]=t+r[i]}return h}function t(e,t){let i=0,n=e.length-1,s=-1;for(;n>=i;){let r=i+n>>>1;e[r].at>t?n=r-1:(s=r,i=r+1)}return 0>s?{at:t,before:0,after:0}:e[s]}function i(e,i=0){if(0===e.length)return{adjacentClearance:[],positions:[]};let n=[],s=[0];for(let r=0;e.length-1>r;r++){let o=e[r],a=e[r+1],l=[...new Set([...o.map(e=>e.at),...a.map(e=>e.at)])].sort((e,t)=>e-t),d=0;for(let e of l){let i=t(o,e),n=t(a,e);d=Math.max(d,i.after+n.before)}n.push(d),s.push(s[s.length-1]+d+i)}return{adjacentClearance:n,positions:s}}function n(e,t,i,n={}){let s=[...e];if(1>=s.length)return s;let r=[...s],o=i(s),a=1,l=Math.max(0,n.passes??6),d=Math.max(1,n.maxEvaluations??1/0);for(let e=0;l>e&&d>a;e++){let e=new Map(s.map((e,t)=>[e,t])),l=new Map,d=new Map;for(let i of t){let t=e.get(i.source),n=e.get(i.target);if(null==t||null==n)continue;let s=Number.isFinite(i.weight)&&i.weight>0?i.weight:1;l.set(i.source,(l.get(i.source)??0)+n*s),d.set(i.source,(d.get(i.source)??0)+s),l.set(i.target,(l.get(i.target)??0)+t*s),d.set(i.target,(d.get(i.target)??0)+s)}s=s.map((e,t)=>({item:e,index:t,barycenter:(l.get(e)??t)/(d.get(e)??1)})).sort((e,t)=>e.barycenter-t.barycenter||(n.compare?.(e.item,t.item)??e.index-t.index)).map(e=>e.item);let h=i(s);if(a++,o>h)o=h,r=[...s];else if(h===o)break}return r}function s(e,t,i={}){let n=[...e];if(1>=n.length)return n;let s=t(n),r=1,o=Math.max(0,i.passes??6),a=Math.max(1,i.maxEvaluations??1/0);for(let e=0;o>e&&a>r;e++){let e=!1;for(let i=0;n.length-1>i&&a>r;i++){[n[i],n[i+1]]=[n[i+1],n[i]];let o=t(n);r++,s>o?(s=o,e=!0):[n[i],n[i+1]]=[n[i+1],n[i]]}if(!e)break}return n}function r(e,t,i={}){let n=[...e],s=n.length;if(1>=s||s>(i.maxItems??8))return n;let r=Math.max(1,i.maxEvaluations??1/0),o=0,a=[...n],l=1/0,d=()=>{if(o>=r)return;let e=t(n);o++,l>e&&(l=e,a=[...n])};d();let h=Array(s).fill(0),u=0;for(;s>u&&r>o;)if(u>h[u]){let e=u%2==0?0:h[u];[n[e],n[u]]=[n[u],n[e]],d(),h[u]++,u=0}else h[u]=0,u++;return a}function o(e,t,i=()=>!0){let n=0;for(let s=0;e.length>s;s++){let[r,o]=t(e[s]);for(let a=s+1;e.length>a;a++){if(!i(e[s],e[a]))continue;let[l,d]=t(e[a]);0>(r-l)*(o-d)&&n++}}return n}function a(e){return`${e.getUTCFullYear()}-${l(e.getUTCMonth()+1)}-${l(e.getUTCDate())}`}function l(e){return 10>e?"0"+e:e+""}function d(e){return"function"==typeof e?e:t=>t[e]}function h(e,t,i){let n=e?.data,s=n?n[t]:void 0;if(null!=s)return s;let r=e?.[t];return r??i}function u(e){return null==e?null:e.data??e.datum??e}function c(e,t){let i=new Map;for(let n of e){let e=t(n),s=i.get(e);s?s.push(n):i.set(e,[n])}return i}function p(e){let t=Object.create(null);return e((e,i)=>{t[e]=i}),t}function f(e,t){if(!t)return!0;let i=Array.isArray(t)?t:[t],n=e;for(let e of i)if(null!=e.value&&n[e.field]+""!=e.value+"")return!1;return!0}function m(e,t={}){let i=t.baseOpacity??1;return t.highlight||t.predicate?!f(e,t.highlight)||t.predicate&&!t.predicate(e)?t.dimOpacity??.16:Math.min(1,i+(t.brighten??0)):i}function y(e){return e.join("|")}function x(e,t=.72){let i=zt(e,"#ffffff"),n=zt(e,"#000000"),s=zt(e,e)(0);return e=>{let r=0>e?0:e>1?1:e;return.5===r?s:.5>r?i(2*(.5-r)*t):n(2*(r-.5)*t)}}function g(e,t,i=.72){return x(e,i)(t)}function b(e){return p(t=>{for(let[i,n]of Object.entries(e))t(i,n)})}function v(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"item"}function w(e,t,i){return Math.max(t,Math.min(i,e))}function S(e){let t=Number(e);return Number.isFinite(t)?Math.max(0,t):0}function M(e){if(0===e.length)return 0;let t=0;for(let i of e)t+=i;return t/e.length}function k(e,t){let i=w(t,0,1),n=e.trim().replace(/^#/,""),s=3===n.length?n.split("").map(e=>e+e).join(""):n;return/^[0-9a-fA-F]{6}$/.test(s)?`rgba(${parseInt(s.slice(0,2),16)}, ${parseInt(s.slice(2,4),16)}, ${parseInt(s.slice(4,6),16)}, ${i})`:e}function I(e){return Ht("rect",{className:e.className,x:e.x,y:e.y,width:Math.max(0,e.width),height:Math.max(0,e.height),rx:e.radius??10,ry:e.radius??10,fill:e.fill??"none",stroke:e.stroke,strokeWidth:e.strokeWidth??1.5,strokeDasharray:e.strokeDasharray,opacity:e.opacity??.6,style:{pointerEvents:"none"}},e.keyId)}function B(e,t=0){let i=1/0,n=1/0,s=-1/0,r=-1/0;for(let t of e){let e=t.r??0;i>t.x-e&&(i=t.x-e),t.x+e>s&&(s=t.x+e),n>t.y-e&&(n=t.y-e),t.y+e>r&&(r=t.y+e)}return Number.isFinite(i)?{x:i-t,y:n-t,width:s-i+2*t,height:r-n+2*t}:null}function O(e,t=0){if(!e.length)return null;let i="number"==typeof t?t:t.x??0,n="number"==typeof t?t:t.y??0,s=1/0,r=1/0,o=-1/0,a=-1/0;for(let t of e){if(!(Number.isFinite(t.x)&&Number.isFinite(t.y)&&Number.isFinite(t.width)&&Number.isFinite(t.height)))continue;let e=Math.max(0,t.width),i=Math.max(0,t.height);s>t.x&&(s=t.x),r>t.y&&(r=t.y),t.x+e>o&&(o=t.x+e),t.y+i>a&&(a=t.y+i)}return Number.isFinite(s)?{x:s-i,y:r-n,width:o-s+2*i,height:a-r+2*n}:null}function A(e){let t=e.fontSize??12;return null!=e.maxWidth&&e.text.length*t*.56>e.maxWidth?null:Ht("text",{className:e.className,x:e.x,y:e.y,textAnchor:e.anchor??"middle",dominantBaseline:e.baseline??"middle",fontSize:t,fontWeight:e.fontWeight,fill:e.color,style:{pointerEvents:"none"},children:e.text},e.keyId)}function q(e){let t=e.spacing??8;return{def:Ht("pattern",{id:e.id,width:t,height:t,patternUnits:"userSpaceOnUse",patternTransform:`rotate(${e.angle??45})`,children:Ht("line",{x1:0,y1:0,x2:0,y2:t,stroke:e.color??"currentColor",strokeWidth:e.strokeWidth??1,opacity:e.opacity??.5})},e.id),fill:`url(#${e.id})`}}function C(e){let t=e.orient??"bottom",i="bottom"===t||"top"===t,n=e.offset??0,s=e.tickLength??6,r=e.gridLength??0,o=e.labelGap??4,a=e.fontSize??11,l=e.color??"var(--semiotic-text-secondary, #888)",d=e.gridColor??l,h=e.format??(e=>e+""),u="top"===t||"left"===t?-1:1,c=e.ticks.length-1,p=e.ticks.map((p,f)=>{let m,y=e.scale(p),x=n+u*s,g=n-u*r,b=x+u*o;m=e.labelAnchor?e.labelAnchor:i?e.edgeAnchor&&0===f?"start":e.edgeAnchor&&f===c?"end":"middle":"left"===t?"end":"start";let v=i?"top"===t?"auto":"hanging":"middle",w=i?{x:y,y:b}:{x:b,y:y};return Kt("g",{children:[(s>0||r>0)&&Ht("line",{...i?{x1:y,x2:y,y1:x,y2:g}:{x1:x,x2:g,y1:y,y2:y},stroke:r>0?d:l,strokeWidth:1,strokeDasharray:r>0?e.gridDasharray:void 0,opacity:r>0?.7:1}),Ht("text",{x:w.x,y:w.y,textAnchor:m,dominantBaseline:v,fontSize:a,fontWeight:e.fontWeight,fill:l,children:h(p)})]},`tick-${p}-${f}`)});return Ht("g",{className:e.className,style:{pointerEvents:"none"},children:p},e.keyId)}function P(e){let t,i=e.stroke??"var(--semiotic-text, #f4f4f8)",n=e.strokeWidth??1,s=e.markRadius??0,r=e.labelX-e.markX,o=e.labelY-e.markY,a=Math.hypot(r,o)||1,l=e.markX+r/a*s,d=e.markY+o/a*s;return t="elbow"===e.connector?`M${l},${d} L${l},${e.labelY} L${e.labelX},${e.labelY}`:"curve"===e.connector?`M${l},${d} Q${(l+e.labelX)/2},${d} ${e.labelX},${e.labelY}`:`M${l},${d} L${e.labelX},${e.labelY}`,Kt("g",{className:e.className,style:{pointerEvents:"none"},children:[s>0&&Ht("circle",{cx:e.markX,cy:e.markY,r:s,fill:"none",stroke:i,strokeWidth:n}),Ht("path",{d:t,fill:"none",stroke:i,strokeWidth:n}),Ht("text",{x:e.labelX,y:e.labelY,textAnchor:e.labelAnchor??"middle",dominantBaseline:e.labelBaseline??"hanging",fontSize:e.fontSize??11,fontWeight:e.fontWeight,fill:e.color??i,children:e.label})]},e.keyId)}function F(e){let t=e>>>0;return function(){t=t+1831565813|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function $(e){if(!e||"object"!=typeof e)return!1;let t=e;return"string"==typeof t.id&&(null==t.label||"string"==typeof t.label)&&"number"==typeof t.count&&Number.isFinite(t.count)&&Array.isArray(t.bodyIds)&&t.bodyIds.every(e=>"string"==typeof e)}function D(e,t){if("region-enter"!==t.type)return e;let i=t.region.id,n=N(e,i),s=$(n)?n:{id:i,label:t.region.label??i,count:0,bodyIds:[]};if(s.bodyIds.includes(t.bodyId))return e;let r=[...s.bodyIds,t.bodyId];return{...e,[i]:{...s,count:r.length,bodyIds:r}}}function T(e,t){return(t??Object.keys(e)).map(t=>N(e,t)).filter($).map(e=>({label:e.label??e.id,value:e.count}))}function L(e,t){let i=t instanceof Set?t:new Set(t);return e.map(e=>{let t=e.bodyIds??[],n=t.filter(e=>!i.has(e)),s=t.length-n.length,r=e.completion?.mode??"allMembersAbsorbed",o=e.completion?.valueByBodyId,a=e=>{let t=o?N(o,e):void 0;return"number"==typeof t&&Number.isFinite(t)&&t>=0?t:1},l=t.reduce((e,t)=>e+a(t),0),d=t.reduce((e,t)=>e+(i.has(t)?a(t):0),0),h=e.completion?.threshold,u="threshold"===r?Number.isFinite(h)&&Number(h)>=0?Number(h):l:void 0;return{id:e.id,label:e.label??e.id,mode:r,complete:t.length>0&&("anyAbsorbed"===r?s>0:"threshold"===r?d>=(u??l):0===n.length),absorbed:s,total:t.length,absorbedValue:d,totalValue:l,threshold:u,missing:n}})}function j(e,t,i){return Math.max(t,Math.min(i,e))}function R(e,t,i,n,s,r={}){return{id:e,friction:r.friction,restitution:r.restitution,bodyFilter:r.bodyFilter,shape:{type:"segment",x1:t,y1:i,x2:n,y2:s,thickness:r.thickness??8}}}function W(e){let t=e.shape??"lane",i=Math.max(1,Math.round(e.width)),n=Math.max(1,Math.round(e.height)),s=e.padX??46,r=e.padY??72,o=s,a=i-s,l=r,d=n-Math.max(24,Math.round(.45*r)),h=(l+d)/2,u=Math.max(1,d-l),c=j(e.pinchRatio??.18,.06,.5),p=Number(e.pinchHeightOffset??0),f=Number.isFinite(p)?p:0,m=j(u*c+f,.06*u,.5*u),y=m/2,x=h-y,g=h+y,b=e.idPrefix??"process",v=e.friction??.58,w=e.restitution??.18,S=e.wallThickness??8,M=e.stages;if(!M.length)throw Error("processStageLayout requires at least one stage");let k=j(e.centerStageIndex??Math.floor(M.length/2),0,M.length-1),I=function(e){let t=e.reduce((e,t)=>e+(t.share??1),0);return t>0?t:e.length}(M),B=a-o,O=o,A=M.map((e,t)=>{let i=O,n=t===M.length-1?a:O+(e.share??1)/I*B;return O=n,{id:e.id,label:e.label,description:e.description,kind:e.kind??"stage",index:t,x0:i,x1:n,x:(i+n)/2,width:n-i,y:h,height:u}}),q=A[k],C=q.x0,P=q.x1,F=(e,i)=>{if("lane"===t)return"top"===i?l:d;if("funnel"===t){let t=j((e-o)/Math.max(1,a-o),0,1);return"top"===i?l+(x-l)*t:d+(g-d)*t}if(C>=e){let t=j((e-o)/Math.max(1,C-o),0,1);return"top"===i?l+(x-l)*t:d+(g-d)*t}if(P>=e)return"top"===i?x:g;let n=j((e-P)/Math.max(1,a-P),0,1);return"top"===i?x+(l-x)*n:g+(d-g)*n},N=A.map(e=>{let t=Math.min(F(e.x0,"top"),F(e.x1,"top")),i=Math.max(F(e.x0,"bottom"),F(e.x1,"bottom"));return{...e,y:(t+i)/2,height:Math.max(1,i-t)}}),$={thickness:S,friction:v,restitution:w},D=[];"lane"===t?D.push(R(b+"-top",o,l,a,l,$),R(b+"-bottom",o,d,a,d,$),R(b+"-left",o,l,o,d,{...$,thickness:Math.max(6,S-2)}),R(b+"-right",a,l,a,d,{...$,thickness:Math.max(6,S)})):"funnel"===t?D.push(R(b+"-top",o,l,a,x,$),R(b+"-bottom",o,d,a,g,$),R(b+"-left",o,l,o,d,{...$,thickness:Math.max(6,S-2)}),R(b+"-right",a,x,a,g,{...$,thickness:Math.max(6,S)})):D.push(R(b+"-left-top",o,l,C,x,$),R(b+"-left-bottom",o,d,C,g,$),R(b+"-center-top",C,x,P,x,$),R(b+"-center-bottom",C,g,P,g,$),R(b+"-right-top",P,x,a,l,$),R(b+"-right-bottom",P,g,a,d,$),R(b+"-left",o,l,o,d,{...$,thickness:Math.max(6,S-2)}),R(b+"-right",a,l,a,d,{...$,thickness:Math.max(6,S)}));let T=e.membraneDampingScale??.5,L=o,W=Math.max(1,("bowtie"===t?C:a)-L),Y=(e.membranes??[]).map(e=>{let t=L+j(e.offset,0,1)*W,i=e.width??18+18*e.cost,n=u-16,s=h+.25*(e.wobble??0);return{...e,x:t,y:s,width:i,height:n}}),E=!1===e.includeMembraneRegions?[]:Y.map(e=>X({id:e.id,label:e.label??e.id,description:e.description??(e.label??e.id)+" is a permeable region. It taxes energy and damps velocity while bodies overlap it.",x:e.x,y:e.y,width:e.width,height:e.height,cost:e.cost,dampingScale:e.dampingScale??T,bodyStyle:e.bodyStyle,metadata:e.metadata,semanticItem:e.semanticItem,color:e.color}));return{shape:t,width:i,height:n,padX:s,padY:r,left:o,right:a,topY:l,bottomY:d,midY:h,centerLeft:C,centerRight:P,pinchHeight:m,pinchTop:x,pinchBottom:g,stages:N,membranes:Y,colliders:D,regionEffects:E,boundaryY:F}}function Y(e){return{id:e.id,label:e.label,description:e.description,kind:e.kind,shape:(t=e.x,i=e.y,n=e.width,s=e.height,{type:"aabb",x:t,y:i,width:n,height:s}),bodyFilter:e.bodyFilter,collider:e.collider,colliderThickness:e.colliderThickness,friction:e.friction,restitution:e.restitution,semanticItem:e.semanticItem,metadata:e.metadata,bodyStyle:e.bodyStyle,attributes:e.attributes,onEnter:e.onEnter,onExit:e.onExit};var t,i,n,s}function E(e,t={}){let i=t.idPrefix??"stage",n=Math.max(0,t.insetX??0),s=Math.max(0,t.insetY??1);return e.stages.map(e=>{let r="function"==typeof t.metadata?t.metadata(e):t.metadata??{};return{...Y({id:i?`${i}:${e.id}`:e.id,label:e.label??e.id,description:e.description,kind:"region",x:e.x,y:e.y,width:Math.max(1,e.width-2*n),height:Math.max(1,e.height-2*s),bodyFilter:t.bodyFilter,semanticItem:t.semanticItem,attributes:{primitive:"processStage",stageId:e.id,stageIndex:e.index},metadata:{...r,primitive:"processStage",stageId:e.id,stageIndex:e.index}})}})}function X(e){let t=e.dampingScale??.5,i=e.energyScale??1,n=j(e.cost,0,2);return{...Y({...e,kind:e.kind??"membrane",attributes:{primitive:"membrane",membraneCost:n,..."object"==typeof e.attributes&&e.attributes?e.attributes:{}}}),damping:n*t,energyDelta:-n*i}}function z(e){return{...Y({...e,kind:e.kind??"charge-gate",attributes:{primitive:"chargeGate",..."object"==typeof e.attributes&&e.attributes?e.attributes:{}}}),charge:e.charge??!0,energyDelta:e.energyDelta,impulseOnEnter:e.impulseOnEnter}}function G(e){let t="number"==typeof e.force?{x:e.force,y:0}:e.force??{x:12,y:0};return{...Y({...e,kind:e.kind??"force-field",attributes:{primitive:"routeSurface",..."object"==typeof e.attributes&&e.attributes?e.attributes:{}}}),force:t,damping:e.damping??.015}}function H(e){let t=e.pressure??e.occupancy??0,i=e.baseDamping??.08,n=e.dampingPerUnit??.12,s=e.energyPerUnit??0;return{...Y({...e,kind:e.kind??"membrane",attributes:{primitive:"pressureField",pressure:t,..."object"==typeof e.attributes&&e.attributes?e.attributes:{}}}),damping:i+t*n,energyDelta:s?-t*s:void 0,force:e.force}}function K(e){let t="number"==typeof e.force?{x:e.force,y:0}:e.force;return{...Y({...e,kind:e.kind??"force-field",attributes:{primitive:"capacitatedSensor",capacity:e.capacity,unitsPerSecond:e.unitsPerSecond??e.capacity,..."object"==typeof e.attributes&&e.attributes?e.attributes:{}}}),force:t,damping:e.damping,charge:e.charge??e.capacity}}function U(e){return{...Y({...e,kind:e.kind??"force-field",attributes:{primitive:"portal",targetStage:e.targetStage,..."object"==typeof e.attributes&&e.attributes?e.attributes:{}}}),force:e.force,impulseOnEnter:e.impulseOnEnter,damping:e.damping??.08}}function _(e){let t="number"==typeof e.force?{x:e.force,y:0}:e.force??{x:24,y:0};return{...Y({...e,kind:e.kind??"sink",attributes:{primitive:"absorb",..."object"==typeof e.attributes&&e.attributes?e.attributes:{}}}),force:t,damping:e.damping??.02,charge:e.charge??"absorbed"}}function V(e){return{...Y({...e,kind:e.kind??"force-field",attributes:{primitive:"forceField",..."object"==typeof e.attributes&&e.attributes?e.attributes:{}}}),force:e.force,damping:e.damping,energyDelta:e.energyDelta}}function Q(e){let t=e.x??e.anchor?.x??0,i=e.y??e.anchor?.y??0;return{id:e.id,label:e.label,description:e.description,group:e.group,bodyIds:e.bodyIds,datum:e.datum,state:e.state,x:t,y:i,width:e.width,height:e.height,anchor:e.anchor??{x:t,y:i},completion:e.completion,tether:e.tether,semanticItem:e.semanticItem}}function J(e){let t=e.idPrefix??"lane",i={thickness:e.thickness??8,friction:e.friction??.5,restitution:e.restitution??.16},n=[R(t+"-top",e.left,e.top,e.right,e.top,i),R(t+"-bottom",e.left,e.bottom,e.right,e.bottom,i)];return e.openEnds||n.push(R(t+"-left",e.left,e.top,e.left,e.bottom,i),R(t+"-right",e.right,e.top,e.right,e.bottom,i)),n}function Z(e,t,i){return Math.max(t,Math.min(i,e))}function ee(e){return 6.2*e.length}function te(e,t,i="auto"){let n=Math.max(1,Math.floor(t/6.2)),s="compact"===i||"full"!==i&&ee(e)>t?function(e,t){let i=e.trim();if(t>=i.length)return i;if(1>=t)return i.slice(0,1);let n=i.split(/\s+/).filter(Boolean).map(e=>e[0]).join("").toUpperCase();return n.length>1&&t>=n.length?n:t>3?i.slice(0,Math.max(1,t-2))+"..":i.slice(0,t).toUpperCase()}(e,n):e;return{text:s,textLength:ee(s)>t?Math.max(4,t):void 0}}function ie(e,t={}){let{showFlowSpine:i=!0,showStageCounts:n=!0,showCapacityBadges:s=!0,showGroupSockets:r=!0,stageLabelMode:o="auto",outlineStages:a=!1,testId:l="process-flow-chrome"}=t,{width:d,height:h,left:u,right:c,topY:p,bottomY:f,midY:m,stages:y,groups:x=[]}=e,g=f-p;return Zt("svg",{"aria-hidden":"true","data-testid":l,"data-outline-stages":a?"true":void 0,width:d,height:h,viewBox:`0 0 ${d} ${h}`,style:{position:"absolute",inset:0,pointerEvents:"none"},className:["semiotic-process-chrome",a?"semiotic-process-chrome--outline-stages":null].filter(Boolean).join(" "),children:[Jt("defs",{children:Zt("linearGradient",{id:"semiotic-process-floor",x1:"0",x2:"0",y1:"0",y2:"1",children:[Jt("stop",{offset:"0%",stopColor:"var(--semiotic-process-floor, var(--semiotic-bg, #0f172a))",stopOpacity:"0.2"}),Jt("stop",{offset:"100%",stopColor:"var(--semiotic-process-lane, var(--semiotic-surface, #1e293b))",stopOpacity:"0.55"})]})}),Jt("rect",{x:0,y:0,width:d,height:h,fill:"url(#semiotic-process-floor)"}),Jt("rect",{x:u-6,y:p-8,width:c-u+12,height:g+16,rx:14,fill:"var(--semiotic-process-lane, var(--semiotic-surface, #111827))",fillOpacity:.45,stroke:"var(--semiotic-process-border, var(--semiotic-border, #334155))",strokeOpacity:.95}),i?Jt("line",{x1:u+8,x2:c-8,y1:m,y2:m,stroke:"var(--semiotic-process-border, var(--semiotic-border, #475569))",strokeWidth:2,strokeDasharray:"6 8",opacity:.55}):null,y.map((e,t)=>{let i=function(e){return e.absorb?"absorb":e.portalTarget?"portal":null!=e.capacity?"capacity":"flow"}(e),r=ei[i],l=Math.max(12,e.width-8),d=Z(l-8,22,88),u=te(e.label,Math.max(8,d-10),o),c="none"!==o&&l-8>=22,x=function(e){if(null!=e.capacity){let t=null!=e.queueDepth?" · q "+e.queueDepth:"";return e.capacityLabel?`${e.capacityLabel}${t}`:`cap ${Number.isInteger(e.capacity)?e.capacity+"":e.capacity.toFixed(1)}${t}`}return e.absorb?"absorb":e.portalTarget?"portal":"flow"}(e),b=te(x,Math.max(16,l-10),"auto"),v=s&&!1!==e.showBadge&&l>=32,w=null!=e.count?`n=${e.count}${null!=e.processed?" done "+e.processed:""}`:"",S=te(w,Math.max(16,l-8),"auto"),M=Math.max(30,p-15),k=M-13;return Zt("g",{"data-stage":e.id,"data-role":i,children:[Jt("rect",{className:"semiotic-process-chrome__stage-bay",x:e.x0+4,y:p+6,width:l,height:g-12,rx:10,fill:a?"none":r.fill,stroke:r.stroke,strokeWidth:a?1.85:"flow"===i?1:1.6}),y.length-1>t?Jt("polygon",{points:`${e.x1-2},${m-7} ${e.x1+8},${m} ${e.x1-2},${m+7}`,fill:r.accent,opacity:.85}):null,c?Zt(Qt,{children:[Jt("rect",{className:"semiotic-process-chrome__stage-label-bg",x:e.x-d/2,y:k,width:d,height:18,rx:9,fill:"var(--semiotic-bg, #0f172a)",fillOpacity:.75,stroke:r.stroke}),Zt("text",{x:e.x,y:M,textAnchor:"middle",fill:r.accent,fontSize:10,fontWeight:800,className:"semiotic-process-chrome__stage-label",textLength:u.textLength,lengthAdjust:u.textLength?"spacingAndGlyphs":void 0,children:[Jt("title",{children:e.label}),u.text]})]}):null,v?Zt("text",{x:e.x,y:p+22,textAnchor:"middle",fill:"var(--semiotic-process-muted, var(--semiotic-text-secondary, #94a3b8))",fontSize:9,fontWeight:700,textLength:b.textLength,lengthAdjust:b.textLength?"spacingAndGlyphs":void 0,children:[Jt("title",{children:x}),b.text]}):null,n&&null!=e.count?Zt("text",{x:e.x,y:Math.min(h-8,f+16),textAnchor:"middle",fill:"var(--semiotic-process-text, var(--semiotic-text, #e2e8f0))",fontSize:11,fontWeight:800,textLength:S.textLength,lengthAdjust:S.textLength?"spacingAndGlyphs":void 0,children:[Jt("title",{children:w}),S.text]}):null]},e.id)}),r?x.map((e,t)=>{let i=e.total??0,n=e.absorbed??0,s=e.complete??(i>0&&n>=i),r=!s&&i>0&&n/i>=.75,o=s?"rgba(52, 211, 153, 0.35)":r?"rgba(251, 191, 36, 0.28)":"rgba(15, 23, 42, 0.75)",a=s?"#34d399":r?"#fbbf24":"var(--semiotic-border, #64748b)",l=i>0?`${n}/${i}${s?" shipped":r?" almost":""}`:"feature "+(t+1),d=Z(Math.max(54,ee(e.label)+18,ee(l)+16),54,104),h=te(e.label,d-12,"auto"),u=te(l,d-12,"auto");return Zt("g",{"data-group":e.id,children:[Jt("rect",{x:e.x-d/2,y:e.y-22,width:d,height:44,rx:10,fill:o,stroke:a,strokeWidth:1.5}),Zt("text",{x:e.x,y:e.y-4,textAnchor:"middle",fill:"var(--semiotic-process-text, var(--semiotic-text, #f8fafc))",fontSize:10,fontWeight:800,textLength:h.textLength,lengthAdjust:h.textLength?"spacingAndGlyphs":void 0,children:[Jt("title",{children:e.label}),h.text]}),Zt("text",{x:e.x,y:e.y+12,textAnchor:"middle",fill:a,fontSize:9,fontWeight:700,textLength:u.textLength,lengthAdjust:u.textLength?"spacingAndGlyphs":void 0,children:[Jt("title",{children:l}),u.text]})]},e.id)}):null]})}function ne(e,t,i){if(i)return i;let n=e??"circle";if("chevron"===n)return function(e){let t=1.5*se(e),i=.92*t;return`M0,${-t}L${i},${(.78*t).toFixed(3)}L0,${(.28*t).toFixed(3)}L${-i},${(.78*t).toFixed(3)}Z`}(t);let s=Object.prototype.hasOwnProperty.call(di,n)?di[n]:ii;return ti(s,Math.max(1,t))()??""}function se(e){return Math.sqrt(Math.max(1,e)/Math.PI)}function re(e,t,i){if(!i&&"circle"===(e??"circle"))return se(t);let n=i?"p:"+i:`s:${e??"circle"}:${t}`,s=ci.get(n);if(null!=s)return s;let r=ne(e,t,i).match(/-?\d*\.?\d+(?:e-?\d+)?/gi),o=0;if(r)for(let e=0;r.length>e+1;e+=2){let t=+r[e],i=+r[e+1],n=Math.sqrt(t*t+i*i);n>o&&(o=n)}return o>0?(ci.size>512&&ci.clear(),ci.set(n,o),o):se(t)}function oe(e,t){let i=new Map,n=0;return s=>{let r=e(s)+"",o=t&&Object.prototype.hasOwnProperty.call(t,r)?t[r]:void 0;if(o&&hi.has(o))return o;let a=i.get(r);return a||(a=ui[n%ui.length],n++,i.set(r,a)),a}}function ae(e,t){let[i,n]=e.viewBox??pi,[s,r]=e.anchor??fi,o=n>0?n:1,a=Math.max(0,t)/o,l=(i>0?i:o)*a,d=o*a;return{width:l,height:d,scale:a,offsetX:-s*l,offsetY:-r*d}}function le(e,t){let i=ae(e,t),n=[[i.offsetX,i.offsetY],[i.offsetX+i.width,i.offsetY],[i.offsetX,i.offsetY+i.height],[i.offsetX+i.width,i.offsetY+i.height]],s=0;for(let[e,t]of n){let i=Math.sqrt(e*e+t*t);i>s&&(s=i)}return s}function de(e,t,i,n){if("none"!==e)return"color"===e||null==e?t??n:"accent"===e?i:e}function he(e){if(typeof Path2D>"u")return null;mi||(mi=new Map);let t=mi.get(e);if(t)return t;let i=new Path2D(e);return mi.size>1024&&mi.clear(),mi.set(e,i),i}function ue(e,t,i=0,n="horizontal"){let[s,r]=e.viewBox??pi,o=Math.min(1,Math.max(0,i)),a=Math.min(1,Math.max(0,t));return a>o?o>0||1>a?"vertical"===n?{x:0,y:r*(1-a),width:s,height:r*(a-o)}:{x:s*o,y:0,width:s*(a-o),height:r}:null:{x:0,y:0,width:0,height:0}}function ce(e,t){let i=ae(e,t);return{centerDx:i.offsetX+i.width/2,centerDy:i.offsetY+i.height/2,halfWidth:i.width/2,halfHeight:i.height/2,radius:Math.hypot(i.width,i.height)/2}}function pe(e,t,i,n,s,r=e=>e){for(let o of t.parts){let t=he(o.d);if(!t)continue;let a=o.opacity??1,l=e.globalAlpha;1!==a&&(e.globalAlpha=l*a);let d=s?"none"===o.fill?void 0:s:de(o.fill,i,n);d&&(e.fillStyle=r(d),e.fill(t));let h=s?o.stroke&&"none"!==o.stroke?s:void 0:de(o.stroke??"none",i,n);h&&(e.strokeStyle=r(h),e.lineWidth=o.strokeWidth??1,e.lineCap=o.strokeLinecap??"butt",e.lineJoin=o.strokeLinejoin??"miter",e.stroke(t)),1!==a&&(e.globalAlpha=l)}}function fe(e){return!!e&&"object"==typeof e&&yi.has(function(e){return"string"==typeof e?.type?e.type:""}(e))}function me(e){return"primary"===e?.emphasis||!0===e?.defensive}function ye(e,t,i={}){return"number"==typeof i.maxAnnotations&&Number.isFinite(i.maxAnnotations)?Math.max(0,Math.floor(i.maxAnnotations)):e>0&&t>0?Math.max(1,Math.round(e*t/(i.areaPerAnnotation&&i.areaPerAnnotation>0?i.areaPerAnnotation:2e4))):1/0}function xe(e){let t,i=e?.emphasis;t="primary"===i?100:"secondary"===i?10:50;let n=e?.provenance?.confidence;switch("number"==typeof n&&Number.isFinite(n)&&(t+=15*Math.max(0,Math.min(1,n))),e?.lifecycle?.freshness){case"fresh":t+=8;break;case"aging":t+=4;break;case"stale":t+=1;break;case"expired":t-=200}return t}function ge(e){let{annotations:t,width:i,height:n}=e,s=Math.max(0,e.minVisible??1),r=ye(i,n,e),o=t.map((e,t)=>{return{annotation:e,index:t,note:(i=e,fe(i))};var i}),a=o.filter(e=>e.note);if(0===a.length||r>=a.length)return{visible:t.slice(),deferred:[],budget:r};let l=a.filter(e=>me(e.annotation)),d=a.filter(e=>!me(e.annotation)).sort((e,t)=>xe(t.annotation)-xe(e.annotation)||e.index-t.index),h=Math.min(d.length,Math.max(Math.max(0,r-l.length),Math.max(0,s-l.length))),u=new Set([...l.map(e=>e.index),...d.slice(0,h).map(e=>e.index)]),c=[],p=[];for(let{annotation:e,index:t,note:i}of o)!i||u.has(t)?c.push(e):p.push(e);return{visible:c,deferred:p,budget:r}}function be(e,t){let i=t.scales?.x??t.scales?.time;return i?null!=e.x?i(e.x):t.xAccessor&&null!=e[t.xAccessor]?i(e[t.xAccessor]):null:null}function ve(e,t){let i=t.scales?.y??t.scales?.value;return i?null!=e.y?i(e.y):t.yAccessor&&null!=e[t.yAccessor]?i(e[t.yAccessor]):null:null}function we(e){return null==e?null:e+""}function Se(e,t,i){return t.stickyPositionCache?.set(e,i),i}function Me(e,t,i){let n=e.anchor||e.lifecycle?.anchor||"fixed";if("latest"===n){if(null!=e.pointId&&i.pointNodes&&i.pointNodes.length>0)for(let n=i.pointNodes.length-1;n>=0;n--){let s=i.pointNodes[n];if(s.pointId===e.pointId)return Se(t,i,{x:s.x,y:s.y})}let n=function(e){let t=e.data;if(!t||0===t.length)return null;let i=t[t.length-1],n=e.scales?.x??e.scales?.time,s=e.scales?.y??e.scales?.value;if(!n||!s)return null;let r=i[e.xAccessor||"x"],o=i[e.yAccessor||"y"];return null==r||null==o?null:{x:n(r),y:s(o)}}(i);return n?Se(t,i,n):null}if("semantic"===n){let n=function(e,t,i){let n=function(e){return we(e.provenance?.stableId??e.stableId)}(e);if(!n)return null;let s=i.pointNodes?.find(e=>we(e.pointId)===n);if(s)return Se(t,i,{x:s.x,y:s.y});let r=i.data?.find(e=>function(e){return we(e.stableId??e.id??e.provenance?.stableId)}(e)===n);if(!r)return null;let o=be(r,i),a=ve(r,i);return null==o||null==a?null:Se(t,i,{x:o,y:a})}(e,t,i);if(n)return n}let s=null,r=null;if(null!=e.pointId&&i.pointNodes){let t=i.pointNodes.find(t=>t.pointId===e.pointId);t&&(s=t.x,r=t.y)}if((null==s||null==r)&&(s=be(e,i),r=ve(e,i)),null!=s&&null!=r)return Se(t,i,{x:s,y:r});if("sticky"===n){let e=i.stickyPositionCache?.get(t);if(e)return e}return null}function ke(e,t,i,n=50){return!(-n>e||e>(i.width||0)+n||-n>t||t>(i.height||0)+n)}function Ie(e){return{label:e.label,title:e.title,wrap:e.wrap||120,noWrap:"function"==typeof e._noteLayout?e.noWrap:void 0,_noteLayout:e._noteLayout}}function Be(e){return"function"==typeof e._noteLayout?e._noteLayout(e):void 0}function Oe(e,t,i){if(!e)return[];let n=Math.max(1,Math.floor(t/i)),s=[],r="";for(let t of e.split(/\s+/))t&&(r&&r.length+1+t.length>n?(s.push(r),r=t):r=r?`${r} ${t}`:t);return r&&s.push(r),s}function Ae(e){let t=e?.provenance;if(!t||"object"!=typeof t)return e;let i="string"==typeof t.source?Object.prototype.hasOwnProperty.call(Mi,t.source)?Mi[t.source]:t.source:null,n="number"==typeof t.confidence&&Number.isFinite(t.confidence)?Math.round(100*Math.max(0,Math.min(1,t.confidence)))+"%":null;if(!i&&!n||null!=e.label&&"string"!=typeof e.label)return e;let s=[i,n].filter(Boolean).join(" · "),r="string"==typeof e.label?e.label:"";return r.includes(`(${s})`)?e:{...e,label:r?`${r} (${s})`:`(${s})`}}function qe(e){if(!Ce(e))return e;let t=("string"==typeof e.mobileText?e.mobileText:void 0)??("string"==typeof e.shortText?e.shortText:void 0);return!t||"string"!=typeof e.label&&null!=e.label?e:{...e,label:t}}function Ce(e){return fe(e)}function Pe(e,t,i,n,s){let r=e+i,o=t+n;return Math.abs(i)>Math.abs(n)?{x:0>i?r-s.width-4:r+4,y:0>n?o-s.height:o,width:s.width,height:s.height}:{x:0>i?r-s.width:r,y:0>n?o-s.height-4:o+4,width:s.width,height:s.height}}function Fe(e,t){return{x:e.x-t,y:e.y-t,width:e.width+2*t,height:e.height+2*t}}function Ne(e,t){return Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x))*Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y))}function $e(e,t,i,n,s,r,o,a){let l=Fe(e,o),d=.4*Math.hypot(t.dx,t.dy)+80*function(e,t,i,n){let s=Math.max(0,n-e.x),r=Math.max(0,n-e.y);return(s+Math.max(0,e.x+e.width-(t-n)))*e.height+(r+Math.max(0,e.y+e.height-(i-n)))*e.width}(l,s,r,a);for(let e of i)d+=12*Ne(l,e);for(let e of n)d+=4*Ne(l,e);return d}function De(e){let{annotations:t,context:i,defaultOffset:n=gi,notePadding:s=bi,markPadding:r=vi,edgePadding:o=wi,preserveManualOffsets:a=!0,routeLongConnectors:l=!0,connectorThreshold:d=Si,density:h,progressiveDisclosure:u=!1,redundantCues:c=!1,responsive:p,mobile:f,cohesion:m,audience:y}=e,x=i.width||0,g=i.height||0,b="object"==typeof f?f:{},v=b.breakpoint??480,w=!!f&&v>=x,S=w&&!1!==b.preferShortText?t.map(qe):t,M=w&&!h?{maxAnnotations:b.maxAnnotations??("callout-list"===b.strategy?1:2),minVisible:b.minVisible??1}:h,k=u||w&&(!1!==b.progressiveDisclosure||"callout-list"===b.strategy),I=w&&!p?b.responsive??{minWidth:v}:p,B=w&&!m?b.cohesion:m;if(0===S.length||0>=x||0>=g)return S.slice();let O=[],A=function(e,t){return(e.pointNodes||[]).map(e=>{let i=Math.max(1,e.r||1)+t;return{x:e.x-i,y:e.y-i,width:2*i,height:2*i}})}(i,r),q=!1,C=S.map((e,t)=>{if(!Ce(e))return e;let r=function(e,t,i){if("widget"===e.type&&"number"==typeof e.px&&"number"==typeof e.py)return{x:e.px,y:e.py};let n=e.pointId??e.nodeId;if(null!=n&&i.pointNodes){let e=i.pointNodes.find(e=>e.pointId===n);if(e)return{x:e.x,y:e.y}}let s=e.coordinates,r=i.scales?.geoProjection;if(Array.isArray(s)&&s.length>=2&&r){let e=s[0],t=s[1];if("number"==typeof e&&"number"==typeof t){let i=r([e,t]);if(i&&"number"==typeof i[0]&&"number"==typeof i[1])return{x:i[0],y:i[1]}}}return i.scales||"number"!=typeof e.x||"number"!=typeof e.y?Me(e,t,i):{x:e.x,y:e.y}}(e,t,i);if(!r)return e;let h=function(e){if("widget"===e.type)return{width:"number"==typeof e.width?e.width:32,height:"number"==typeof e.height?e.height:32};let t=Be(e);if(t)return{width:Math.max(24,t.width+10),height:Math.max(18,t.height+6)};let i="number"==typeof e.wrap?e.wrap:120,n=[...Oe("string"==typeof e.title?e.title:void 0,i,7),...Oe("string"==typeof e.label?e.label:void 0,i,7)],s=n.reduce((e,t)=>Math.max(e,t.length),0);return{width:Math.max(24,Math.min(i,7*s)+10),height:Math.max(18,16*n.length+6)}}(!0===e.defensive?Ae(e):e);if(a&&("number"==typeof(u=e).dx||"number"==typeof u.dy)){let t=function(e){return"text"===e.type||"widget"===e.type?{dx:0,dy:0}:{dx:30,dy:-30}}(e);return O.push(Fe(Pe(r.x,r.y,"number"==typeof e.dx?e.dx:t.dx,"number"==typeof e.dy?e.dy:t.dy,h),s)),e}var u;let c=null,p=1/0;for(let e of function(e){let t=1.6*e;return[{dx:e,dy:-e},{dx:-e,dy:-e},{dx:e,dy:e},{dx:-e,dy:e},{dx:e,dy:0},{dx:-e,dy:0},{dx:0,dy:-e},{dx:0,dy:e},{dx:t,dy:-t},{dx:-t,dy:-t},{dx:t,dy:t},{dx:-t,dy:t}]}(n)){let t=$e(Pe(r.x,r.y,e.dx,e.dy,h),e,O,A,x,g,s,o);p>t&&(c=e,p=t)}if(!c)return e;let f=Fe(Pe(r.x,r.y,c.dx,c.dy,h),s);O.push(f);let m=Math.hypot(c.dx,c.dy),y=l&&m>=d&&"text"!==e.type&&"widget"!==e.type?{...e.connector||{end:"arrow"},type:"curve"}:e.connector;return q=!0,{...e,dx:c.dx,dy:c.dy,...y?{connector:y}:{}}}),P=q?C:S.slice(),F=P;if(c){let e=!1,t=P.map(t=>{let i=function(e){return"text"!==e.type||"string"!=typeof e.color||8>Math.hypot("number"==typeof e.dx?e.dx:0,"number"==typeof e.dy?e.dy:0)?e:{...e,_redundantConnector:!0}}(t);return i!==t&&(e=!0),i});F=e?t:P}{let e=!1,t=F.map(t=>{if(!0!==t?.defensive)return t;let i=Ae(t);return i!==t&&(e=!0),i});F=e?t:F}let N,$=new Set;if(M){let e="object"==typeof M?M:{},t=function(e){if(!e)return 1;let t=function(e){let t=e?.familiarity;if(!t)return 3;let i=Object.values(t).filter(e=>"number"==typeof e&&Number.isFinite(e));return 0===i.length?3:i.reduce((e,t)=>e+t,0)/i.length}(e);return t>2?4>t?1:.6:1.5}(y),i=1===t?e:{...e,maxAnnotations:Math.max(0,Math.round((e.maxAnnotations??ye(x,g,e))*t))},{deferred:n}=ge({annotations:F,width:x,height:g,...i});for(let e of n)$.add(e)}if(I&&("object"==typeof I&&"number"==typeof I.minWidth?I.minWidth:480)>=x)for(let e of F)Ce(e)&&"secondary"===e.emphasis&&$.add(e);if($.size>0)for(let e of F)!0===e?.defensive&&$.delete(e);return N=0===$.size?F:k?F.map(e=>$.has(e)?{...e,_annotationDeferred:!0}:e):F.filter(e=>!$.has(e)),B?function(e,t){let i=!1,n=e.map(e=>Ce(e)&&"blended"!==e.cohesion&&"layer"!==e.cohesion?(i=!0,{...e,cohesion:t}):e);return i?n:e}(N,B):N}function Te(){let e=(Bi??(Bi=ki.createContext(null)),Bi);return ki.useContext(e)??Oi}function Le(e){let t=e.fixedPosition;Number.isFinite(t?.x)&&(e.x=e.prevX=t.x,e.vx=0),Number.isFinite(t?.y)&&(e.y=e.prevY=t.y,e.vy=0)}function je(e){if(!e)return;let t=Number.isFinite(e.x)?e.x:void 0,i=Number.isFinite(e.y)?e.y:void 0;return null==t&&null==i?void 0:{x:t,y:i}}function Re(e,t,i){let n,s="x"===i?"y":"x",r=Math.abs(t[i]-e[i]),o=t[s]-e[s],a=(e,t)=>"circle"===e.shape.type?e.shape.radius:("x"===t?e.shape.width:e.shape.height)/2;if("circle"===e.shape.type&&"circle"===t.shape.type){let i=e.shape.radius+t.shape.radius;n=Math.sqrt(Math.max(0,i*i-r*r))}else if("aabb"===e.shape.type&&"aabb"===t.shape.type)n=a(e,s)+a(t,s);else{let o="aabb"===e.shape.type?e:t,l=a("circle"===e.shape.type?e:t,i),d=Math.max(0,r-a(o,i));n=a(o,s)+Math.sqrt(Math.max(0,l*l-d*d))}let l=0>o?-1:1;return{nx:"x"===s?l:0,ny:"y"===s?l:0,penetration:Math.max(0,n-Math.abs(o))}}function We(e){return"circle"===e.type?{type:"circle",radius:e.radius}:{type:"aabb",width:e.width,height:e.height}}function Ye(e){return"aabb"===e.type?{type:"aabb",x:e.x,y:e.y,width:e.width,height:e.height}:{type:"segment",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,thickness:e.thickness}}function Ee(e){return{id:e.id,x:e.x,y:e.y,prevX:e.prevX,prevY:e.prevY,vx:e.vx,vy:e.vy,angle:e.angle,mass:e.mass,bodyCollisions:e.bodyCollisions,...e.fixedPosition?{fixedPosition:je(e.fixedPosition)}:{},shape:We(e.shape),sleeping:e.sleeping,datum:e.datum,index:e.index,sleepTime:e.sleepTime,restitution:e.restitution,friction:e.friction}}function Xe(e){return e&&"function"!=typeof e?{property:e.property,equals:e.equals,notEquals:e.notEquals,oneOf:e.oneOf?.slice(),notOneOf:e.notOneOf?.slice()}:e}function ze(e){return{id:e.id,shape:Ye(e.shape),sensor:e.sensor,restitution:e.restitution,friction:e.friction,bodyFilter:Xe(e.bodyFilter),index:e.index}}function Ge(e,t,i){return Math.max(t,Math.min(i,e))}function He(e,t,i){return Math.min(e??i,t??i)}function Ke(e,t,i){return Ge(Math.max(e??i,t??i),0,1)}function Ue(e){return 0>e?-1:1}function _e(e){if("circle"===e.shape.type){let t=e.shape.radius;return{minX:e.x-t,minY:e.y-t,maxX:e.x+t,maxY:e.y+t}}let t=e.shape.width/2,i=e.shape.height/2;return{minX:e.x-t,minY:e.y-i,maxX:e.x+t,maxY:e.y+i}}function Ve(e){let t=e.shape;if("aabb"===t.type){let e=t.width/2,i=t.height/2;return{minX:t.x-e,minY:t.y-i,maxX:t.x+e,maxY:t.y+i}}let i=(t.thickness??0)/2;return{minX:Math.min(t.x1,t.x2)-i,minY:Math.min(t.y1,t.y2)-i,maxX:Math.max(t.x1,t.x2)+i,maxY:Math.max(t.y1,t.y2)+i}}function Qe(e,t){return!(e.minX>t.maxX||t.minX>e.maxX||e.minY>t.maxY||t.minY>e.maxY)}function Je(e,t,i,n,s,r,o,a){let l=s-e,d=(i+o)/2-Math.abs(l);if(0>=d)return null;let h=r-t,u=(n+a)/2-Math.abs(h);return u>0?u>d?{nx:Ue(l),ny:0,penetration:d}:{nx:0,ny:Ue(h),penetration:u}:null}function Ze(e,t,i,n,s,r,o){let a=r/2,l=o/2,d=e-Ge(e,n-a,n+a),h=t-Ge(t,s-l,s+l),u=d*d+h*h;if(u>i*i)return null;if(qi>=u){let r=Math.abs(e-(n-a)),o=Math.abs(e-(n+a)),d=Math.abs(t-(s-l)),h=Math.abs(t-(s+l)),u=Math.min(r,o,d,h);return u===r?{nx:-1,ny:0,penetration:i+r}:u===o?{nx:1,ny:0,penetration:i+o}:u===d?{nx:0,ny:-1,penetration:i+d}:{nx:0,ny:1,penetration:i+h}}let c=Math.sqrt(u);return{nx:d/c,ny:h/c,penetration:i-c}}function et(e,t){if("circle"===e.shape.type&&"circle"===t.shape.type)return function(e,t,i,n,s,r){let o=n-e,a=s-t,l=i+r,d=o*o+a*a;if(d>=l*l)return null;if(qi>=d)return{nx:1,ny:0,penetration:l};let h=Math.sqrt(d);return{nx:o/h,ny:a/h,penetration:l-h}}(e.x,e.y,e.shape.radius,t.x,t.y,t.shape.radius);if("aabb"===e.shape.type&&"aabb"===t.shape.type)return Je(e.x,e.y,e.shape.width,e.shape.height,t.x,t.y,t.shape.width,t.shape.height);if("circle"===e.shape.type&&"aabb"===t.shape.type){let i=Ze(e.x,e.y,e.shape.radius,t.x,t.y,t.shape.width,t.shape.height);return i?{nx:-i.nx,ny:-i.ny,penetration:i.penetration}:null}return"aabb"===e.shape.type&&"circle"===t.shape.type?Ze(t.x,t.y,t.shape.radius,e.x,e.y,e.shape.width,e.shape.height):null}function tt(e,t){let i=t.shape;return"aabb"===i.type?"circle"===e.shape.type?Ze(e.x,e.y,e.shape.radius,i.x,i.y,i.width,i.height):Je(i.x,i.y,i.width,i.height,e.x,e.y,e.shape.width,e.shape.height):function(e,t,i,n,s,r,o,a=0){let l=r-n,d=o-s,h=l*l+d*d,u=h>qi?Ge(((e-n)*l+(t-s)*d)/h,0,1):0,c=i+a/2,p=e-(n+l*u),f=t-(s+d*u),m=p*p+f*f;if(m>=c*c)return null;if(qi>=m){let e=Math.sqrt(h);return e>qi?{nx:-d/e,ny:l/e,penetration:c}:{nx:1,ny:0,penetration:c}}let y=Math.sqrt(m);return{nx:p/y,ny:f/y,penetration:c-y}}(e.x,e.y,"circle"===e.shape.type?e.shape.radius:Math.sqrt(e.shape.width*e.shape.width+e.shape.height*e.shape.height)/2,i.x1,i.y1,i.x2,i.y2,i.thickness??0)}function it(e,t){return`${e}\0${t}`}function nt(e){let t=e.indexOf("\0");return{sensorId:e.slice(0,t),bodyId:e.slice(t+1)}}function st(e,t){if(!t)return;let i=e;for(let e of t.split(".")){if(null==i||"object"!=typeof i||!Object.prototype.hasOwnProperty.call(i,e))return;i=i[e]}return i}function rt(e,t){return!!t?.some(t=>Object.is(e,t))}function ot(e,t){if(!t)return!0;if("function"==typeof t)return t(e);let i=st(e,t.property);return!("equals"in t&&!Object.is(i,t.equals)||"notEquals"in t&&Object.is(i,t.notEquals)||t.oneOf&&!rt(i,t.oneOf)||t.notOneOf&&rt(i,t.notOneOf))}function at(e,t){return ot(t,e.bodyFilter)}function lt(e,t){if(!Number.isFinite(t))return;e.count+=1,e.total+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t);let i=t-e.mean;e.mean+=i/e.count,e.m2+=i*(t-e.mean)}function dt(e){return{count:e.count,total:e.total,mean:e.count>0?e.mean:0,min:e.count>0?e.min:0,max:e.count>0?e.max:0,variance:e.count>1?e.m2/(e.count-1):0}}function ht(e){return{count:e.count,total:e.total,mean:e.mean,m2:e.variance*Math.max(0,e.count-1),min:e.count>0?e.min:1/0,max:e.count>0?e.max:-1/0}}function ut(e,t){if(null!=e[t])return e[t];let i=e.datum;return i&&"object"==typeof i?i[t]:void 0}function ct(e,t,i){return"function"==typeof e?e(t,i):"string"==typeof e?ut(t,e):void 0}function pt(e){if(null==e)return;let t=e+"";return t.trim()?t:void 0}function ft(e){let t=dt(e.value);return{id:e.id,label:e.label,count:t.count,total:t.total,bodyIds:e.bodyIds.slice(),lastBodyId:e.lastBodyId,lastDatum:e.lastDatum,x:dt(e.x),y:dt(e.y),value:t}}function mt(e,t={}){let{baselineY:i=0,binWidth:n=24,gap:s=2,maxHeight:r=80,value:o="count",x:a}=t,l=Math.max(1,...e.map(e=>e[o]));return e.map((e,t)=>{let d=Math.max(0,e[o]/l*r),h=a?.(e,t)??t*(n+s);return{binId:e.id,label:e.label,index:t,count:e.count,total:e.total,x:h,y:i-d,width:n,height:d,meanX:e.x.mean,meanY:e.y.mean}})}function yt(e={},t=Di){return{chartId:e.chartId??t.chartId,chartType:e.chartType??t.chartType,sensors:e.sensors??t.sensors,onObservation:e.onObservation??t.onObservation,onSimulationStateChange:e.onSimulationStateChange??t.onSimulationStateChange}}function xt(e){return{...e,shape:{...e.shape},...e.fixedPosition?{fixedPosition:{...e.fixedPosition}}:{},datum:e.datum,springs:e.springs?.map(e=>({...e,target:{...e.target}}))}}function gt(e){if(e instanceof Date){let t=e.getTime();return Number.isFinite(t)?t:void 0}let t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}function bt(e,t){if(null!=e[t])return e[t];let i=e.datum;return i&&"object"==typeof i?i[t]:void 0}function vt(e){return{...xt(e),sequence:e.sequence,spawnAt:e.spawnAt}}function wt(e){return e.map(e=>({...e,shape:{...e.shape},bodyFilter:e.bodyFilter&&"function"!=typeof e.bodyFilter?{...e.bodyFilter,oneOf:e.bodyFilter.oneOf?.slice(),notOneOf:e.bodyFilter.notOneOf?.slice()}:e.bodyFilter}))}function St(e){return!1!==e&&{...e}}function Mt(e,t){return e.spawnAt===t.spawnAt?e.sequence-t.sequence:e.spawnAt-t.spawnAt}function kt(e){return{...e,gravity:{...e.gravity}}}function It(e,t,i,n){if("circle"===e.shape.type){let s=e.x-t,r=e.y-i,o=e.shape.radius+n,a=s*s+r*r;return a>o*o?null:a}let s=Math.max(Math.abs(t-e.x)-e.shape.width/2,0),r=Math.max(Math.abs(i-e.y)-e.shape.height/2,0),o=s*s+r*r;return o>n*n?null:o}function Bt(e){let t=e.indexOf("\0");return{sensorId:e.slice(0,t),bodyId:e.slice(t+1)}}function Ot(e,t={}){let{idPrefix:i="plot",includeFloor:n=!0,includeCeiling:s=!1,includeLeftWall:r=!0,includeRightWall:o=!0,wallThickness:a=20,floorThickness:l=a}=t,d=[],h=e.x+e.width/2,u=e.y+e.height/2;return n&&d.push({id:i+"-floor",shape:{type:"aabb",x:h,y:e.y+e.height+l/2,width:e.width+2*a,height:l}}),s&&d.push({id:i+"-ceiling",shape:{type:"aabb",x:h,y:e.y-l/2,width:e.width+2*a,height:l}}),r&&d.push({id:i+"-left-wall",shape:{type:"aabb",x:e.x-a/2,y:u,width:a,height:e.height+2*l}}),o&&d.push({id:i+"-right-wall",shape:{type:"aabb",x:e.x+e.width+a/2,y:u,width:a,height:e.height+2*l}}),d}function At(e){let{idPrefix:t="bin",count:i,domainStart:n,domainStep:s,xScale:r,yTop:o,yBottom:a,wallThickness:l=4,includeBoundaryWalls:d=!0,includeInteriorWalls:h=!0,closedBefore:u,lidY:c=o,lidThickness:p=Math.max(2,l)}=e,f=[],m=o+(a-o)/2,y=Math.abs(a-o),x=d?i:i-1;if(h||d)for(let e=d?0:1;x>=e;e+=1){if(!h&&e>0&&i>e)continue;let o=r(n+e*s);f.push({id:`${t}-wall-${e}`,shape:{type:"aabb",x:o,y:m,width:l,height:y}})}if(null!=u)for(let e=0;i>e;e+=1){let i=n+e*s,o=i+s;if(o>=u)continue;let a=r(i),d=r(o);f.push({id:`${t}-lid-${e}`,shape:{type:"segment",x1:Math.min(a,d)+l/2,y1:c,x2:Math.max(a,d)-l/2,y2:c,thickness:p}})}return f}function qt(e,t={}){return e?"function"==typeof e?e(t):(e.init(t),e):function(e={}){return new Ti(e)}(t)}function Ct(e){let t=Number(e);if(Number.isFinite(t)&&t>0)return Math.floor(t)}function Pt(e,t){let i={...e};for(let e of t)i[Li[e]]++;return i}function Ft(e,t,i){let n=new Set(t);return{changeSet:{...e,...e.keys?{keys:[...e.keys]}:{}},changed:n,revisions:Pt(i,n)}}function Nt(e){let t="preserve",i=new Set;for(let n of e){let e=Ui[n]??_i;"rebuild"===e.retainedData&&(t="rebuild");for(let t of e.invalidations)i.add(t)}return{retainedData:t,invalidations:i}}function $t(e,t){return e===t||!(!e||!t||e.gravity?.x!==t.gravity?.x||e.gravity?.y!==t.gravity?.y)&&Vi.every(i=>e[i]===t[i])}function Dt(e,t,i,n){return e||!t?"paused":i||!n?"running":"settled"}function Tt(e,t,i,n={}){let s,r=0;for(;t>r&&!n.shouldStop?.()&&(!1===n.stopAtRest||e.queueSize()>0||!e.atRest()||n.continueWhile?.());){e.step(e.fixedDt),e.advanceTime(e.fixedDt);let t=e.drainEvents();i.events&&(i.events.push(...t),e.observeKernelEvents(t,i.observations),e.observeSensorTransitions(i.observations));let o=[];if(e.spawnDue(o,i.observations),o.length>0){i.spawned.push(...o),s=e.observeBodyBudget(i.observations);let t=e.evictOverflow(i.observations);i.evicted?.push(...t.evicted),i.sedimented?.push(...t.sedimented)}r+=1,e.refreshQuiescence(e.fixedDt,o.length),n.afterStep?.()}return{steps:r,budget:s}}function Lt(e,t){let i=new Map;for(let t of e)i.set(t.id,new Set);for(let e of t)i.has(e.source)||i.set(e.source,new Set),i.has(e.target)||i.set(e.target,new Set),i.get(e.source).add(e.target);return i}function jt(e,t,i={}){let n=new Set,s=[...e.get(t)??[]];for(let t=0;s.length>t;t++){let i=s[t];n.has(i)||(n.add(i),s.push(...e.get(i)??[]))}return i.includeStart&&n.add(t),n}function Rt(e,t,i){if(i.some(e=>null!=e.__forceRadius))return e=>e.__forceRadius??8;if(null==e)return()=>8;if("number"==typeof e)return()=>e;if("function"==typeof e)return t=>e(t)||8;let n=t||[5,20],s=[];for(let t of i){let i=t.data?.[e];"number"==typeof i&&s.push(i)}if(0===s.length)return()=>n[0];let[r,o]=Wt(s);if(r===o)return()=>(n[0]+n[1])/2;let a=Zi().domain([r,o]).range(n).clamp(!0);return t=>{let i=t.data?.[e];return null==i||"number"!=typeof i?n[0]:a(i)}}import{getMinMax as Wt}from"./c-QA3HMQJP.min.js";import{interpolateRgb as Yt}from"d3-interpolate";var Et=864e5,Xt=e=>{let t=e.config,{plot:i}=e.dimensions;if(0>=i.width||0>=i.height)return{nodes:[]};let n=e=>{let i="function"==typeof t.dateAccessor?t.dateAccessor(e):e[t.dateAccessor];return i instanceof Date?i:new Date(i)},s=e=>{let i="function"==typeof t.valueAccessor?t.valueAccessor(e):e[t.valueAccessor];return Number(i)},r=new Map,o=null;for(let t of e.data){let e=n(t);if(!isFinite(e.getTime()))continue;null==o&&(o=e.getUTCFullYear());let i=a(e),l=s(t);r.set(i,(r.get(i)??0)+(Number.isFinite(l)?l:0))}let l=t.year??o??(new Date).getUTCFullYear(),d=1/0,h=-1/0;for(let e of r.values())d>e&&(d=e),e>h&&(h=e);d===1/0&&(d=0,h=0);let[u,c]=t.colorRamp??[e.theme.semantic.surface??"#ebedf0",e.theme.semantic.primary??"#216e39"],p=e=>{if(h===d)return u;let t=(e-d)/(h-d);return Yt(u,c)(t)},f=t.gutter??2,m=t.labelInset??0,y=Math.min((i.width-m-53*f)/54,(i.height-6*f)/7);if(0>=y)return{nodes:[]};let x=new Date(Date.UTC(l,0,1)),g=x.getUTCDay(),b=new Date(x.getTime()-g*Et),v=[];for(let e=0;54>e;e++)for(let t=0;7>t;t++){let n=new Date(b.getTime()+(7*e+t)*Et);if(n.getUTCFullYear()!==l)continue;let s=a(n),o=r.get(s),d=null==o?u:p(o);v.push({type:"rect",x:i.x+m+e*(y+f),y:i.y+t*(y+f),w:y,h:y,style:{fill:d,stroke:"none"},datum:{date:n,value:o??0}})}return{nodes:v}};import{interpolateLab as zt}from"d3-interpolate";var Gt=class{constructor(e=12){this.maxSize=e,this.store=new Map}get(e){return this.store.get(e)}set(e,t){this.store.size>=this.maxSize&&this.store.clear(),this.store.set(e,t)}getOrCompute(e,t){let i=this.store.get(e);if(void 0!==i)return i;let n=t();return this.set(e,n),n}clear(){this.store.clear()}get size(){return this.store.size}};import{jsx as Ht,jsxs as Kt}from"react/jsx-runtime";import*as Ut from"react";import{scaleLinear as _t}from"d3-scale";var Vt=e=>{let t=e.config,{plot:i}=e.dimensions,n=t.fields??[];if(2>n.length||0>=i.width||0>=i.height)return{nodes:[]};if(0===e.data.length)return{nodes:[]};let s=Object.create(null);for(let i of n){let n=t.domains&&Object.prototype.hasOwnProperty.call(t.domains,i)?t.domains[i]:void 0;if(Array.isArray(n)&&n.length>=2&&"number"==typeof n[0]&&Number.isFinite(n[0])&&"number"==typeof n[1]&&Number.isFinite(n[1])){s[i]=[n[0],n[1]];continue}let r=1/0,o=-1/0;for(let t of e.data){let e=Number(t[i]);Number.isFinite(e)&&(r>e&&(r=e),e>o&&(o=e))}if(Number.isFinite(r)&&Number.isFinite(o))if(r===o){let e=Math.max(.01*Math.abs(r),.5);s[i]=[r-e,o+e]}else s[i]=[r,o];else s[i]=[0,1]}let r=!1!==t.showAxes,o=r?t.axisLabelPadding??24:8,a=r?18:8,l=n.map(e=>_t().domain(s[e]).range([i.y+i.height-a,i.y+o])),d=n.map((e,t)=>1===n.length?i.x+i.width/2:i.x+t/(n.length-1)*i.width),h=t.colorBy?"function"==typeof t.colorBy?t.colorBy:e=>(e[t.colorBy]??"")+"":null,u=t.opacity??.45,c=t.strokeWidth??1.25,p=e.theme.semantic.primary??"#3b6cb1",f=t.dimmedOpacity??.08,y=t.highlightFn,x=[],g=[];for(let i of e.data){let s=h?e.resolveColor(h(i)+""):p,r=!y||y(i),o=m(i,{predicate:y,baseOpacity:u,dimOpacity:f,brighten:.4}),a=r?g:x;for(let e=0;n.length-1>e;e++){let t=Number(i[n[e]]),h=Number(i[n[e+1]]);if(!Number.isFinite(t)||!Number.isFinite(h))continue;let u={type:"connector",x1:d[e],y1:l[e](t),x2:d[e+1],y2:l[e+1](h),style:{stroke:s,strokeWidth:y&&r?c+.75:c,opacity:o,fill:"none"},datum:i};a.push(u)}if(t.showPoints)for(let e=0;n.length>e;e++){let t=Number(i[n[e]]);if(!Number.isFinite(t))continue;let r={type:"point",x:d[e],y:l[e](t),r:2.5,style:{fill:s,stroke:"none",opacity:Math.min(1,o+.3)},datum:i};a.push(r)}}let b=null;if(r){let r=`var(--semiotic-border, ${e.theme.semantic.border??"#aaa"})`,h=`var(--semiotic-text, ${e.theme.semantic.text??"currentColor"})`,u=`var(--semiotic-text-secondary, ${e.theme.semantic.textSecondary??"#888"})`,c=i.y+o,p=i.y+i.height-a,f=[];for(let e=0;n.length>e;e++){let a=n[e],m=d[e],y=t.tickFormat&&Object.prototype.hasOwnProperty.call(t.tickFormat,a)?t.tickFormat[a]:void 0,x="function"==typeof y?y:e=>e.toLocaleString();f.push(Ut.createElement("line",{key:"pc-axis-line-"+e,x1:m,x2:m,y1:c,y2:p,stroke:r,strokeWidth:1})),f.push(A({keyId:"pc-axis-label-"+e,text:a,x:m,y:i.y+o-8,anchor:"middle",baseline:"auto",fontSize:12,fontWeight:600,color:h}));let[g,b]=s[a],v=5;for(let t=0;v>t;t++){let i=g+(b-g)*t/(v-1),n=l[e](i);f.push(Ut.createElement("line",{key:`pc-tick-${e}-${t}`,x1:m-3,x2:m+3,y1:n,y2:n,stroke:r,strokeWidth:1}),A({keyId:`pc-ticktext-${e}-${t}`,text:x(i),x:m+6,y:n+3,anchor:"start",baseline:"auto",fontSize:10,color:u}))}}b=Ut.createElement(Ut.Fragment,null,...f)}return{nodes:x.concat(g),overlays:b}};import{Fragment as Qt,jsx as Jt,jsxs as Zt}from"react/jsx-runtime";var ei={flow:{fill:"rgba(59, 130, 246, 0.14)",stroke:"rgba(96, 165, 250, 0.7)",accent:"#60a5fa"},capacity:{fill:"rgba(251, 146, 60, 0.18)",stroke:"rgba(251, 146, 60, 0.85)",accent:"#fb923c"},portal:{fill:"rgba(244, 114, 182, 0.14)",stroke:"rgba(244, 114, 182, 0.7)",accent:"#f472b6"},absorb:{fill:"rgba(52, 211, 153, 0.18)",stroke:"rgba(52, 211, 153, 0.8)",accent:"#34d399"}};import{symbol as ti,symbolCircle as ii,symbolCross as ni,symbolDiamond as si,symbolSquare as ri,symbolStar as oi,symbolTriangle as ai,symbolWye as li}from"d3-shape";var di={circle:ii,square:ri,triangle:ai,diamond:si,star:oi,cross:ni,wye:li},hi=new Set(["circle","square","triangle","diamond","star","cross","wye","chevron"]),ui=["circle","triangle","diamond","star","square","chevron","cross","wye"],ci=new Map,pi=[40,40],fi=[.5,.5],mi=null,yi=new Set(["label","callout","callout-circle","callout-rect","text","widget"]),xi=(new Set(["label","callout","callout-circle","callout-rect"]),2e4),gi=32,bi=6,vi=4,wi=8,Si=72,Mi={ai:"AI",agent:"agent",watcher:"watcher",system:"system",import:"imported",computed:"computed",user:"you"};import*as ki from"react";import{jsx as Ii}from"react/jsx-runtime";var Bi,Oi={isActive:!1,predicate:()=>!0},Ai={seed:1,gravity:{x:0,y:980},fixedDt:1/120,cellSize:64,collisionIterations:6,velocityDamping:.995,sleepSpeed:8,sleepAfter:.35,restitution:.1,friction:.35,maxVelocity:1600,contactWakeSpeed:200},qi=1e-9,Ci=.005,Pi=class{constructor(e={}){this.capabilities={determinism:"strict",sensors:!0,joints:!1,ccd:!1,maxBodiesHint:5e3,worker:!1},this.bodies=new Map,this.colliders=new Map,this.springs=new Map,this.activeSensors=new Set,this.supportedThisStep=new Set,this.lastEvents=[],this.nextBodyIndex=0,this.nextColliderIndex=0,this.nextSpringIndex=0,this.options={...Ai,...e},this.random=F(this.options.seed)}init(e={}){this.options={...Ai,...e},this.random=F(this.options.seed),this.bodies.clear(),this.colliders.clear(),this.springs.clear(),this.activeSensors.clear(),this.lastEvents=[],this.nextBodyIndex=0,this.nextColliderIndex=0,this.nextSpringIndex=0}spawn(e){let t={id:e.id,x:e.x,y:e.y,prevX:e.x,prevY:e.y,vx:e.vx??0,vy:e.vy??0,angle:e.angle??0,mass:Math.max(qi,e.mass??1),bodyCollisions:e.bodyCollisions??!0,...e.fixedPosition?{fixedPosition:je(e.fixedPosition)}:{},shape:We(e.shape),sleeping:!1,datum:e.datum,restitution:e.restitution,friction:e.friction,index:this.nextBodyIndex,sleepTime:0};Le(t),this.nextBodyIndex+=1,this.bodies.set(e.id,t)}remove(e){for(let t of e){this.bodies.delete(t);for(let e of Array.from(this.activeSensors))nt(e).bodyId===t&&this.activeSensors.delete(e)}}setColliders(e){this.colliders.clear(),this.activeSensors.clear(),this.nextColliderIndex=0;for(let t of e)this.colliders.set(t.id,{...t,shape:Ye(t.shape),bodyFilter:Xe(t.bodyFilter),index:this.nextColliderIndex}),this.nextColliderIndex+=1}setConstraint(e){let t=e.id??"spring-"+this.nextSpringIndex;return this.springs.set(t,{id:t,bodyId:e.bodyId,target:e.target,restLength:e.restLength??0,stiffness:e.stiffness??40,damping:e.damping??3}),this.nextSpringIndex+=1,t}removeConstraint(e){this.springs.delete(e)}applyImpulse(e,t,i){let n=this.bodies.get(e);n&&(n.vx+=t/n.mass,n.vy+=i/n.mass,Le(n),this.wake(n))}step(e=this.options.fixedDt){let t=Math.max(0,e);if(this.lastEvents=[],0===t)return;let i=this.sortedBodies();for(let e of i)e.prevX=e.x,e.prevY=e.y;this.applySprings(t);let n=this.options.maxVelocity;for(let e of i)if(!e.sleeping){if(e.vx+=this.options.gravity.x*t,e.vy+=this.options.gravity.y*t,e.vx*=this.options.velocityDamping,e.vy*=this.options.velocityDamping,Le(e),n>0){let t=Math.sqrt(e.vx*e.vx+e.vy*e.vy);if(t>n){let i=n/t;e.vx*=i,e.vy*=i}}e.x+=e.vx*t,e.y+=e.vy*t}this.supportedThisStep.clear();let s=this.bodyPairKeys(i),r=this.sortedColliders().filter(e=>!e.sensor);for(let e=0;this.options.collisionIterations>e;e+=1)this.resolveBodyPairs(i,s,0===e),this.resolveColliders(i,r,0===e);this.updateSensors(i),this.updateSleeping(i,t)}settle(e=1200,t=this.options.fixedDt){let i=0;for(;e>i&&!this.allSleeping();)this.step(t),i+=1;return i}readState(e=[]){e.length=0;for(let t of this.sortedBodies())e.push({id:t.id,x:t.x,y:t.y,prevX:t.prevX,prevY:t.prevY,vx:t.vx,vy:t.vy,angle:t.angle,mass:t.mass,...t.fixedPosition?{fixedPosition:je(t.fixedPosition)}:{},shape:We(t.shape),sleeping:t.sleeping,datum:t.datum});return e}events(){return this.lastEvents.slice()}activeSensorPairs(){return Array.from(this.activeSensors).sort().map(nt)}allSleeping(){for(let e of this.bodies.values())if(!e.sleeping)return!1;return!0}snapshot(){return{options:{...this.options,gravity:{...this.options.gravity}},bodies:this.sortedBodies().map(Ee),colliders:this.sortedColliders().map(ze),springs:Array.from(this.springs.values()).map(e=>({...e,target:{...e.target}})),activeSensors:Array.from(this.activeSensors).sort()}}restore(e){this.options={...e.options,gravity:{...e.options.gravity}},this.random=F(this.options.seed),this.bodies.clear(),this.colliders.clear(),this.springs.clear(),this.activeSensors=new Set(e.activeSensors),this.lastEvents=[],this.nextBodyIndex=0;for(let t of e.bodies){let e=Ee(t);Le(e),this.bodies.set(e.id,e),this.nextBodyIndex=Math.max(this.nextBodyIndex,e.index+1)}this.nextColliderIndex=0;for(let t of e.colliders){let e=ze(t);this.colliders.set(e.id,e),this.nextColliderIndex=Math.max(this.nextColliderIndex,e.index+1)}this.nextSpringIndex=0;for(let t of e.springs){this.springs.set(t.id,{...t,target:{...t.target}});let e=/^spring-(\d+)$/.exec(t.id);e&&(this.nextSpringIndex=Math.max(this.nextSpringIndex,Number(e[1])+1))}}dispose(){this.bodies.clear(),this.colliders.clear(),this.springs.clear(),this.activeSensors.clear(),this.lastEvents=[]}sortedBodies(){return Array.from(this.bodies.values()).sort((e,t)=>e.index-t.index)}sortedColliders(){return Array.from(this.colliders.values()).sort((e,t)=>e.index-t.index)}applySprings(e){for(let t of Array.from(this.springs.values()).sort((e,t)=>e.id.localeCompare(t.id))){let i=this.bodies.get(t.bodyId);if(!i||i.sleeping)continue;let n="point"===t.target.type?t.target:this.bodies.get(t.target.bodyId);if(!n)continue;let s=n.x-i.x,r=n.y-i.y,o=Math.sqrt(s*s+r*r);if(qi>=o)continue;let a=s/o,l=r/o,d=(o-t.restLength)*t.stiffness+((("vx"in n?n.vx:0)-i.vx)*a+(("vy"in n?n.vy:0)-i.vy)*l)*t.damping;i.vx+=d*a*e/i.mass,i.vy+=d*l*e/i.mass}}resolveBodyPairs(e,t,i){for(let n of t){let[t,s]=n.split(":").map(Number),r=e[t],o=e[s];if(!r||!o)continue;let a=et(r,o);a&&(this.resolveDynamicCollision(r,o,a),i&&this.lastEvents.push({type:"contact",bodyId:r.id,otherId:o.id,sensor:!1}))}}bodyPairKeys(e){let t=Math.max(1,this.options.cellSize),i=new Map;for(let n=0;e.length>n;n+=1){if(!1===e[n].bodyCollisions)continue;let s=_e(e[n]),r=Math.floor(s.minX/t),o=Math.floor(s.maxX/t),a=Math.floor(s.minY/t),l=Math.floor(s.maxY/t);for(let e=r;o>=e;e+=1)for(let t=a;l>=t;t+=1){let s=`${e}:${t}`,r=i.get(s);r?r.push(n):i.set(s,[n])}}let n=new Set;for(let t of Array.from(i.keys()).sort()){let s=i.get(t)??[];s.sort((e,t)=>e-t);for(let t=0;s.length>t;t+=1)for(let i=t+1;s.length>i;i+=1){let r=s[t],o=s[i];!1===e[r].bodyCollisions||!1===e[o].bodyCollisions||Qe(_e(e[r]),_e(e[o]))&&n.add(`${r}:${o}`)}}return Array.from(n).sort((e,t)=>{let[i,n]=e.split(":").map(Number),[s,r]=t.split(":").map(Number);return i===s?n-r:i-s})}resolveDynamicCollision(e,t,i){(e.fixedPosition||t.fixedPosition)&&(!e.sleeping&&null==e.fixedPosition?.x||!t.sleeping&&null==t.fixedPosition?.x?(e.sleeping||null!=e.fixedPosition?.y)&&(t.sleeping||null!=t.fixedPosition?.y)&&(i=Re(e,t,"y")):i=Re(e,t,"x")),e.sleeping&&this.contactOpposesGravity(i.nx,i.ny)&&this.supportedThisStep.add(t.id),t.sleeping&&this.contactOpposesGravity(-i.nx,-i.ny)&&this.supportedThisStep.add(e.id);let n=e.sleeping?0:1/e.mass,s=t.sleeping?0:1/t.mass,r=null==e.fixedPosition?.x?n:0,o=null==e.fixedPosition?.y?n:0,a=null==t.fixedPosition?.x?s:0,l=null==t.fixedPosition?.y?s:0,d=e.fixedPosition||t.fixedPosition?i.nx**2*(r+a)+i.ny**2*(o+l):n+s;if(qi>=d)return;let h=Math.max(0,i.penetration-Ci)/d;e.x-=i.nx*h*r,e.y-=i.ny*h*o,t.x+=i.nx*h*a,t.y+=i.ny*h*l;let u=(t.vx-e.vx)*i.nx+(t.vy-e.vy)*i.ny;if(u>0)return;let c=Math.abs(u),p=-(1+He(e.restitution,t.restitution,this.options.restitution))*u/d,f=p*i.nx,m=p*i.ny;e.vx-=f*r,e.vy-=m*o,t.vx+=f*a,t.vy+=m*l,this.applyFriction(e,t,i,p,n,s),c>this.options.contactWakeSpeed&&(this.wake(e),this.wake(t))}applyFriction(e,t,i,n,s,r){let o=-i.ny,a=i.nx,l=(t.vx-e.vx)*o+(t.vy-e.vy)*a,d=null==e.fixedPosition?.x?s:0,h=null==e.fixedPosition?.y?s:0,u=null==t.fixedPosition?.x?r:0,c=null==t.fixedPosition?.y?r:0,p=e.fixedPosition||t.fixedPosition?o**2*(d+u)+a**2*(h+c):s+r;if(qi>=Math.abs(l)||qi>=p)return;let f=Ke(e.friction,t.friction,this.options.friction),m=Ge(-l/p,-n*f,n*f),y=m*o,x=m*a;e.vx-=y*d,e.vy-=x*h,t.vx+=y*u,t.vy+=x*c}resolveColliders(e,t,i){for(let n of e)for(let e of t){if(!at(e,n)||!Qe(_e(n),Ve(e)))continue;let t=tt(n,e);t&&(this.resolveStaticCollision(n,e,t),this.contactOpposesGravity(t.nx,t.ny)&&this.supportedThisStep.add(n.id),i&&this.lastEvents.push({type:"contact",bodyId:n.id,otherId:e.id,sensor:!1}))}}resolveStaticCollision(e,t,i){e.x+=i.nx*Math.max(0,i.penetration-Ci),e.y+=i.ny*Math.max(0,i.penetration-Ci);let n=e.vx*i.nx+e.vy*i.ny;if(0>n){let s=He(e.restitution,t.restitution,this.options.restitution);e.vx-=(1+s)*n*i.nx,e.vy-=(1+s)*n*i.ny;let r=-i.ny,o=i.nx,a=e.vx*r+e.vy*o,l=Ke(e.friction,t.friction,this.options.friction);e.vx-=a*r*l,e.vy-=a*o*l}Le(e)}updateSensors(e){let t=new Set,i=this.sortedColliders().filter(e=>e.sensor);for(let n of e){let e=_e(n);for(let s of i){if(!at(s,n)||!Qe(e,Ve(s))||!tt(n,s))continue;let i=it(s.id,n.id);t.add(i),this.activeSensors.has(i)||this.lastEvents.push({type:"sensor-enter",bodyId:n.id,sensorId:s.id})}}for(let e of Array.from(this.activeSensors).sort()){if(t.has(e))continue;let{sensorId:i,bodyId:n}=nt(e);this.lastEvents.push({type:"sensor-exit",bodyId:n,sensorId:i})}this.activeSensors=t}updateSleeping(e,t){let i=Math.hypot(this.options.gravity.x,this.options.gravity.y)>1;for(let n of e)this.options.sleepSpeed>Math.sqrt(n.vx*n.vx+n.vy*n.vy)&&this.options.sleepSpeed*t>Math.sqrt((n.x-n.prevX)*(n.x-n.prevX)+(n.y-n.prevY)*(n.y-n.prevY))&&(!i||this.supportedThisStep.has(n.id))?(n.sleepTime+=t,!n.sleeping&&n.sleepTime>=this.options.sleepAfter&&(n.sleeping=!0,n.vx=0,n.vy=0,this.lastEvents.push({type:"sleep",bodyId:n.id}))):n.sleeping?this.wake(n):n.sleepTime=0}contactOpposesGravity(e,t){let{x:i,y:n}=this.options.gravity,s=Math.hypot(i,n);return 1e-9>=s||-.2>(e*i+t*n)/s}wake(e){e.sleeping&&this.lastEvents.push({type:"wake",bodyId:e.id}),e.sleeping=!1,e.sleepTime=0}nextRandom(){return this.random()}},Fi=["binId","targetBin","category","windowIndex","lane","group"],Ni=class{constructor(e=!1){this.bins=new Map,this.nextIndex=0,this.config=e}updateConfig(e){void 0!==e&&(this.config=e,!1===e&&this.clear())}isEnabled(){return!1!==this.config}add(e){if(!1===this.config)return null;let t=this.nextIndex;this.nextIndex+=1;let i=pt(ct(this.config.binAccessor,e,t))??function(e){for(let t of Fi){let i=pt(ut(e,t));if(i)return i}return"sediment"}(e),n=pt(ct(this.config.labelAccessor,e,t))??i,s=function(e,t,i){if("number"==typeof e)return e;let n="function"==typeof e?e(t,i):"string"==typeof e?ut(t,e):1,s="number"==typeof n?n:Number(n);return Number.isFinite(s)?s:1}(this.config.valueAccessor,e,t),r=Math.max(0,Math.floor(this.config.retainBodyIds??12)),o=this.bins.get(i);return o||(o={id:i,label:n,bodyIds:[],x:{count:0,total:0,mean:0,m2:0,min:1/0,max:-1/0},y:{count:0,total:0,mean:0,m2:0,min:1/0,max:-1/0},value:{count:0,total:0,mean:0,m2:0,min:1/0,max:-1/0}},this.bins.set(i,o)),o.label=n,o.lastBodyId=e.id,o.lastDatum=e.datum,lt(o.x,e.x),lt(o.y,e.y),lt(o.value,s),r>0&&(o.bodyIds.push(e.id),o.bodyIds.length>r&&(o.bodyIds=o.bodyIds.slice(o.bodyIds.length-r))),ft(o)}clear(){this.bins.clear(),this.nextIndex=0}snapshot(){return Array.from(this.bins.values()).map(ft)}restore(e=[]){this.bins.clear();for(let t of e)this.bins.set(t.id,{id:t.id,label:t.label,bodyIds:t.bodyIds.slice(),lastBodyId:t.lastBodyId,lastDatum:t.lastDatum,x:ht(t.x),y:ht(t.y),value:ht(t.value)});this.nextIndex=e.reduce((e,t)=>e+t.count,0)}totals(){let e=this.snapshot();return{bins:e.length,count:e.reduce((e,t)=>e+t.count,0),total:e.reduce((e,t)=>e+t.total,0)}}},$i={bodyLimit:1/0,eviction:"oldest",fixedDt:1/120,maxDeltaSeconds:.1,maxSubsteps:8,settleStepLimit:1200,timeScale:1},Di={chartId:"physics",chartType:"physics",sensors:{},onObservation:void 0,onSimulationStateChange:void 0},Ti=class{constructor(e={}){this.id="builtin",this.capabilities={...(new Pi).capabilities,engine:"builtin"},this.world=new Pi(e)}init(e={}){this.world.init(e)}spawn(e){this.world.spawn(e)}remove(e){this.world.remove(e)}setColliders(e){this.world.setColliders(e)}setConstraint(e){return this.world.setConstraint(e)}removeConstraint(e){this.world.removeConstraint(e)}applyImpulse(e,t,i){this.world.applyImpulse(e,t,i)}step(e){this.world.step(e)}settle(e,t){return this.world.settle(e,t)}readState(e){return this.world.readState(e)}events(){return this.world.events()}activeSensorPairs(){return this.world.activeSensorPairs()}allSleeping(){return this.world.allSleeping()}snapshot(){return this.world.snapshot()}restore(e){this.world.restore(e)}nextRandom(){return this.world.nextRandom()}dispose(){this.world.dispose()}},Li={data:"data",domain:"domain",layout:"layout","scene-geometry":"sceneGeometry","scene-style":"sceneStyle","data-paint":"dataPaint","interaction-paint":"interactionPaint",overlay:"overlay",accessibility:"accessibility",evidence:"evidence"},ji=class{constructor(){this.revisions={data:0,domain:0,layout:0,sceneGeometry:0,sceneStyle:0,dataPaint:0,interactionPaint:0,overlay:0,accessibility:0,evidence:0},this.latest=Ft({kind:"initialize"},[],this.revisions),this.listeners=new Set}get last(){return this.latest}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}record(e,t){let i=Ft(e,t,this.revisions);this.revisions=i.revisions,this.latest=i;for(let e of[...this.listeners])e();return i}};import{quadtree as Ri}from"d3-quadtree";var Wi=class{constructor(){this.maxSearchRadius=0,this.revision=-1,this.tree=null}hitTest(e,t,i,n,s,r=0,o){let a=this.ensure(e,t);if(!a)return null;let l=null,d=1/0,h=Math.max(0,o?.searchRadius??Math.max(0,r)+this.maxSearchRadius),u=n-h,c=n+h,p=s-h,f=s+h;return a.visit((e,t,a,h,m)=>{if(u>h||t>c||p>m||a>f)return!0;if(e.length)return!1;let y=e;for(;y;){let e=y.data;if(e&&(!o?.include||o.include(e))){let t=o?.distanceSquared?o.distanceSquared(e,n,s):It(e,n,s,Math.max(0,r));null!=t&&(d>t||t===d&&i.indexOf(e.id)>i.indexOf(l?.id??""))&&(l=e,d=t)}y=y.next}return!1}),l}ensure(e,t){if(this.tree&&this.revision===t)return this.tree;let i=e.readState();return 0===i.length?(this.tree=null,this.maxSearchRadius=0,this.revision=t,null):(this.maxSearchRadius=i.reduce((e,t)=>Math.max(e,function(e){return"circle"===e.shape.type?e.shape.radius:Math.hypot(e.shape.width,e.shape.height)/2}(t)),0),this.tree=Ri().x(e=>e.x).y(e=>e.y).addAll(i),this.revision=t,this.tree)}},Yi=["data","scene-geometry","data-paint","accessibility","evidence"],Ei=["scene-geometry","data-paint","accessibility","evidence"],Xi=["overlay","accessibility","evidence"],zi=(e,t)=>({retainedData:e,invalidations:t}),Gi=["layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Hi=["scene-geometry","data-paint","accessibility","evidence"],Ki=[],Ui={engine:zi("rebuild",["scene-geometry","data-paint","accessibility","evidence"]),kernel:zi("preserve",Hi),colliders:zi("preserve",Hi),sediment:zi("preserve",Hi),bodyBudget:zi("preserve",Gi),bodyLimit:zi("preserve",Gi),eviction:zi("preserve",Gi),fixedDt:zi("preserve",Ki),maxDeltaSeconds:zi("preserve",Ki),maxSubsteps:zi("preserve",Ki),settleStepLimit:zi("preserve",Ki),timeScale:zi("preserve",Ki),observation:zi("preserve",Ki)},_i=zi("preserve",Gi),Vi=["seed","fixedDt","cellSize","collisionIterations","velocityDamping","sleepSpeed","sleepAfter","restitution","friction","maxVelocity","contactWakeSpeed"],Qi=class{constructor(){this.seconds=0,this.speed=8,this.scratch=[]}setKernelOptions(e){this.speed=function(e){let t=e?.sleepSpeed;return"number"==typeof t&&Number.isFinite(t)&&t>0?t:8}(e)}reset(){this.seconds=0}isAtRest(){return this.seconds>=.6}refresh(e,t,i){if(i>0)return void(this.seconds=0);let n=e.readState(this.scratch),s=this.speed*this.speed,r=!0;for(let e of n)if(!e.sleeping&&e.vx*e.vx+e.vy*e.vy>=s){r=!1;break}this.seconds=r?this.seconds+Math.max(0,t):0}},Ji=class{constructor(e={}){this.activeSensorPairs=new Set,this.accumulator=0,this.bodyBudgetObservationKey="ok",this.bodySpatialIndex=new Wi,this.elapsedSeconds=0,this.liveBodyOrder=[],this.nextSequence=0,this.paused=!1,this.queue=[],this.revision=0,this.updateResults=new ji,this.simulationState="settled",this.visible=!0,this.quiescence=new Qi;let{bodyBudget:t,colliders:i,engine:n,kernel:s,observation:r,sediment:o,...a}=e;this.config={...$i,...a},this.configInput={...e},this.bodyBudget=t??{},this.engineInput=n,this.observation=yt(r),this.sediment=new Ni(o??!1),this.world=qt(n,{fixedDt:this.config.fixedDt,...s}),this.quiescence.setKernelOptions(s),i&&this.world.setColliders(wt(i))}updateConfig(e){let t=function(e,t){return Object.keys(e).filter(i=>"kernel"===i?!$t(e.kernel,t.kernel):e[i]!==t[i])}(e,this.configInput),{colliders:i,bodyBudget:n,engine:s,kernel:r,observation:o,sediment:a,...l}=e;if(this.config={...this.config,...l},void 0!==n&&(this.bodyBudget=n,!1===n&&(this.bodyBudgetObservationKey="ok")),s&&s!==this.engineInput){let e=this.world.snapshot();this.world.dispose(),this.engineInput=s,this.world=qt(s,e.options),this.world.restore(e),this.revision+=1}if(r&&!$t(r,this.configInput.kernel)){let e=this.world.snapshot(),t={...e.options,...r,gravity:{...e.options.gravity,...r.gravity}};this.world.restore({...e,options:t}),this.quiescence.setKernelOptions(t),this.revision+=1}o&&(this.observation=yt(o,this.observation)),this.sediment.updateConfig(a),i&&(this.world.setColliders(wt(i)),this.revision+=1),this.configInput={...this.configInput,...e};let d=Nt(t);this.updateResults.record({kind:"config",keys:t},d.invalidations)}updateConfigWithResult(e){return this.updateConfig(e),this.updateResults.last}setColliders(e){this.world.setColliders(wt(e)),this.revision+=1,this.updateResults.record({kind:"config",keys:["colliders"]},Nt(["colliders"]).invalidations)}enqueue(e,t){let i=Array.isArray(e)?e:[e],n=t?function(e,t={}){let i=gt(t.startAt)??0,n=t.pacing??"immediate";if("arrival"===n){let n=e.map((e,i)=>function(e,t,i){return"function"==typeof i?gt(i(e,t)):"string"==typeof i?gt(bt(e,i)):gt(e.spawnAt)??gt(bt(e,"arrivalTime"))??gt(bt(e,"timestamp"))??gt(bt(e,"time"))??gt(bt(e,"eventTime"))}(e,i,t.timeAccessor)),s=n.filter(e=>null!=e),r=s.length>0?Math.min(...s):0,o=gt(t.timeScale)??1,a=o>0?o:1;return e.map((e,t)=>{let s=n[t],o=null==s?0:Math.max(0,s-r);return{...xt(e),spawnAt:i+o/a}})}if("object"==typeof n){let t=gt(n.ratePerSec);if(t&&t>0)return e.map((e,n)=>({...xt(e),spawnAt:i+n/t}))}return e.map(e=>({...xt(e),spawnAt:i}))}(i,{...t,startAt:t.startAt??this.elapsedSeconds}):i;for(let e of n)this.queue.push({...xt(e),sequence:this.nextSequence,spawnAt:e.spawnAt??this.elapsedSeconds}),this.nextSequence+=1;this.queue.sort(Mt),n.length>0&&(this.revision+=1),this.updateResults.record({kind:"enqueue",count:n.length},n.length?Yi:[])}enqueueWithResult(e,t){return this.enqueue(e,t),this.updateResults.last}spawnNow(e){this.spawnOne(xt(e)),this.nextSequence+=1,this.observeBodyBudget(),this.evictOverflow(),this.revision+=1,this.updateResults.record({kind:"enqueue",count:1},Yi)}materializeDueSpawns(){let e=this.revision,t=[],i=[];return this.spawnDue(t,i),0===t.length||(this.observeBodyBudget(i),this.evictOverflow(i),this.syncSimulationState(i),this.revision+=1,this.updateResults.record({kind:"enqueue",count:t.length},this.revision!==e?Yi:[])),t}clear(){let e=this.world.snapshot().options;this.world.init({...e,fixedDt:this.config.fixedDt}),this.activeSensorPairs.clear(),this.liveBodyOrder=[],this.queue=[],this.accumulator=0,this.elapsedSeconds=0,this.nextSequence=0,this.quiescence.reset(),this.sediment.clear(),this.bodyBudgetObservationKey="ok",this.revision+=1,this.syncSimulationState(),this.updateResults.record({kind:"clear"},Yi)}tick(e,t){let i=this.revision,n=[],s=[],r=[],o=[],a=[];if(this.paused||!this.visible){let e=this.result(0,n,s,r,o,a,!1);return this.updateResults.record({kind:"tick",count:0},[]),e}let l=Math.max(0,Math.min(Number.isFinite(e)?e:0,this.config.maxDeltaSeconds))*this.config.timeScale;this.spawnDue(n,a);let d=this.observeBodyBudget(a),h=this.evictOverflow(a);s.push(...h.evicted),r.push(...h.sedimented),this.syncSimulationState(a),n.length>0&&this.quiescence.reset(),this.accumulator+=l;let u=this.stepObserver(t,{spawned:n,evicted:s,sedimented:r,events:o,observations:a}),c=l>0?Math.floor((this.accumulator+1e-9*this.config.fixedDt)/this.config.fixedDt):0,{steps:p,budget:f}=Tt(this.settleHost(),Math.min(c,this.config.maxSubsteps),{spawned:n,evicted:s,sedimented:r,events:o,observations:a},{stopAtRest:!1,shouldStop:()=>this.paused||!this.visible,afterStep:u});this.accumulator=Math.max(0,this.accumulator-p*this.config.fixedDt),p===this.config.maxSubsteps&&(this.accumulator=Math.min(this.accumulator,this.config.fixedDt)),(p>0||n.length>0||s.length>0||r.length>0||o.length>0)&&(this.revision+=1);let m=this.result(p,n,s,r,o,a,void 0,f??d);return this.updateResults.record({kind:"tick",count:p},this.revision!==i?n.length||s.length||r.length?Yi:Ei:[]),m}settle(e=this.config.settleStepLimit){return this.runSettle(e,!1).steps}settleWithObservations(e=this.config.settleStepLimit,t){return this.runSettle(e,!0,t)}stepObserver(e,t){return function(e,t){if(!e)return;let i=["spawned","evicted","sedimented","events","observations"],n={spawned:0,evicted:0,sedimented:0,events:0,observations:0},s=s=>{let r=t(s),o={...r,spawned:r.spawned.slice(n.spawned),evicted:r.evicted.slice(n.evicted),sedimented:r.sedimented.slice(n.sedimented),events:r.events.slice(n.events),observations:r.observations.slice(n.observations)};for(let e of i)n[e]=r[e].length;e.onStep(o)};return s(0),()=>s(1)}(e,e=>(e&&(this.revision+=1),this.result(e,t.spawned,t.evicted,t.sedimented,t.events,t.observations)))}settleHost(){return{fixedDt:this.config.fixedDt,queueSize:()=>this.queue.length,atRest:()=>this.atRest(),advanceTime:e=>{this.elapsedSeconds+=e},spawnDue:(e,t)=>this.spawnDue(e,t),observeBodyBudget:e=>this.observeBodyBudget(e),evictOverflow:e=>this.evictOverflow(e),step:e=>this.world.step(e),drainEvents:()=>this.world.events(),observeKernelEvents:(e,t)=>this.observeKernelEvents(e,t),observeSensorTransitions:e=>this.observeSensorTransitions(e),refreshQuiescence:(e,t)=>this.quiescence.refresh(this.world,e,t)}}runSettle(e,t,i){let n=this.revision,s=[],r=[],o=[],a=[],l=t?[]:void 0;if(t&&(this.paused||!this.visible)){let e=this.result(0,s,r,o,a,l??[],!1);return this.updateResults.record({kind:"settle",count:0},[]),e}this.spawnDue(s,l);let d=this.observeBodyBudget(l),h=this.evictOverflow(l);r.push(...h.evicted),o.push(...h.sedimented),this.syncSimulationState(l),s.length>0&&this.quiescence.reset();let u=t?{spawned:s,evicted:r,sedimented:o,events:a,observations:l}:{spawned:s},c=this.stepObserver(i,{spawned:s,evicted:r,sedimented:o,events:a,observations:l??[]}),{steps:p,budget:f}=Tt(this.settleHost(),e,u,{afterStep:c,continueWhile:i?.continueWhile,shouldStop:t?()=>this.paused||!this.visible:void 0}),m=s.length+r.length+o.length>0;(p>0||m||a.length>0)&&(this.revision+=1);let y=this.result(p,s,r,o,a,l??[],void 0,f??d);return this.updateResults.record({kind:"settle",count:p},this.revision===n?[]:m?Yi:Ei),y}readBodies(e=[]){return this.world.readState(e)}readSediment(){return this.sediment.snapshot()}bodyBudgetStatus(){return this.evaluateBodyBudget()}sedimentTotals(){return this.sediment.totals()}sedimentHeightfield(e={}){return mt(this.readSediment(),e)}hitTest(e,t,i=0,n){return this.bodySpatialIndex.hitTest(this.world,this.revision,this.liveBodyOrder,e,t,i,n)}events(){return this.world.events()}allSleeping(){return this.world.allSleeping()}atRest(){return this.world.allSleeping()||this.quiescence.isAtRest()}hasPendingWork(){return this.queue.length>0||!this.atRest()}queueSize(){return this.queue.length}liveBodyCount(){return this.liveBodyOrder.length}elapsed(){return this.elapsedSeconds}recordObservation(e){let{timestamp:t,chartType:i,chartId:n,...s}=e,r={...s,timestamp:t??this.elapsedSeconds,chartType:i??this.observation.chartType,chartId:n??this.observation.chartId};return this.emitObservation(r),this.updateResults.record({kind:"update",count:1},["evidence"]),r}getLastUpdateResult(){return this.updateResults.last}getUpdateSnapshot(){return this.updateResults.last}subscribeUpdateResult(e){return this.updateResults.subscribe(e)}version(){return this.revision}setPaused(e){let t=this.paused!==e;this.paused=e,this.syncSimulationState(),this.updateResults.record({kind:"pause"},t?Xi:[])}setVisible(e){let t=this.visible!==e;this.visible=e,this.syncSimulationState(),this.updateResults.record({kind:"visibility"},t?Xi:[])}remove(e){let t=new Set(e),i=new Set(this.liveBodyOrder),n=new Set(this.queue.map(e=>e.id));this.queue=this.queue.filter(e=>!t.has(e.id)),this.liveBodyOrder=this.liveBodyOrder.filter(e=>!t.has(e)),this.world.remove(e),this.removeActiveSensorPairsForBodies(t);let s=e.filter(e=>i.has(e)||n.has(e));return s.length>0&&(this.revision+=1,this.syncSimulationState()),this.updateResults.record({kind:"remove",keys:s,count:s.length},s.length?Yi:[]),s}setConstraint(e){let t=this.world.setConstraint(e);return this.revision+=1,this.updateResults.record({kind:"constraint",keys:[t]},Ei),t}removeConstraint(e){this.world.removeConstraint(e),this.revision+=1,this.updateResults.record({kind:"constraint",keys:[e]},Ei)}applyImpulse(e,t,i){this.world.applyImpulse(e,t,i),this.revision+=1,this.updateResults.record({kind:"impulse",keys:[e]},Ei)}nextRandom(){return this.world.nextRandom()}controls(){return e=this,{applyImpulse:(t,i,n)=>e.applyImpulse(t,i,n),clear:()=>e.clear(),hitTest:(t,i,n)=>e.hitTest(t,i,n),pause:()=>e.setPaused(!0),push:(t,i)=>e.enqueue(t,i),pushMany:(t,i)=>e.enqueue(t,i),bodyBudgetStatus:()=>e.bodyBudgetStatus(),readBodies:t=>e.readBodies(t),readSediment:()=>e.readSediment(),recordObservation:t=>e.recordObservation(t),remove:t=>e.remove(t),restore:t=>e.restore(t),resume:()=>e.setPaused(!1),settle:t=>e.settle(t),settleWithObservations:t=>e.settleWithObservations(t),snapshot:()=>e.snapshot(),sedimentHeightfield:t=>e.sedimentHeightfield(t),sedimentTotals:()=>e.sedimentTotals(),step:t=>e.tick(t)};var e}snapshot(){let e=this.world.snapshot();return{accumulator:this.accumulator,activeSensorPairs:Array.from(this.activeSensorPairs).sort(),bodyBudget:St(this.bodyBudget),config:{...this.config,kernel:kt(e.options)},elapsedSeconds:this.elapsedSeconds,paused:this.paused,queue:this.queue.map(vt),revision:this.revision,sediment:this.readSediment(),simulationState:this.simulationState,liveBodyOrder:this.liveBodyOrder.slice(),visible:this.visible,world:e}}restore(e){let t=this.simulationState;this.config={bodyLimit:e.config.bodyLimit,eviction:e.config.eviction,fixedDt:e.config.fixedDt,maxDeltaSeconds:e.config.maxDeltaSeconds,maxSubsteps:e.config.maxSubsteps,settleStepLimit:e.config.settleStepLimit,timeScale:e.config.timeScale},this.configInput={...e.config,bodyBudget:St(e.bodyBudget??{}),kernel:kt(e.world.options)},this.bodyBudget=St(e.bodyBudget??{}),this.bodyBudgetObservationKey="ok",this.quiescence.setKernelOptions(e.world.options),this.quiescence.reset(),this.activeSensorPairs=new Set(e.activeSensorPairs),this.accumulator=e.accumulator,this.elapsedSeconds=e.elapsedSeconds,this.paused=e.paused,this.queue=e.queue.map(vt).sort(Mt),this.revision=e.revision,this.sediment.restore(e.sediment??[]),this.simulationState=e.simulationState??Dt(e.paused,e.visible,e.queue.length>0,e.world.bodies.every(e=>e.sleeping)),this.liveBodyOrder=e.liveBodyOrder.slice(),this.visible=e.visible,this.nextSequence=this.queue.reduce((e,t)=>Math.max(e,t.sequence),-1)+1,this.world.restore(e.world),this.updateResults.record({kind:"restore"},Yi),this.simulationState!==t&&this.observation.onSimulationStateChange?.(this.simulationState,t)}spawnDue(e,t){for(;this.queue.length>0&&this.elapsedSeconds+1e-9*this.config.fixedDt>=this.queue[0].spawnAt;){let i=this.queue.shift();if(!i)return;this.spawnOne(i,t),e.push(i.id)}}spawnOne(e,t){this.liveBodyOrder=this.liveBodyOrder.filter(t=>t!==e.id),this.removeActiveSensorPairsForBodies(new Set([e.id])),this.world.spawn(e),this.liveBodyOrder.push(e.id);for(let t of e.springs??[])this.world.setConstraint({...t,bodyId:e.id});let i=this.world.readState().find(t=>t.id===e.id);this.emitObservation({type:"physics-spawn",timestamp:this.elapsedSeconds,chartType:this.observation.chartType,chartId:this.observation.chartId,bodyId:e.id,datum:i?.datum??e.datum,x:i?.x??e.x,y:i?.y??e.y},t)}result(e,t,i,n,s,r,o,a=this.evaluateBodyBudget()){this.syncSimulationState(r);let l=this.world.allSleeping();return{budget:a,elapsedSeconds:this.elapsedSeconds,evicted:i,events:s,observations:r,queueSize:this.queue.length,revision:this.revision,shouldContinue:o??(!this.paused&&this.visible&&(this.queue.length>0||!this.atRest())),sleeping:l,sedimented:n,spawned:t,steps:e}}observeKernelEvents(e,t){!function(e,t,i){if(0===t.length)return;let n=new Map(e.readState().map(e=>[e.id,e]));for(let e of t){if("sleep"!==e.type)continue;let t=n.get(e.bodyId);i.emit({type:"physics-settle",timestamp:i.elapsedSeconds,chartType:i.observation.chartType,chartId:i.observation.chartId,bodyId:e.bodyId,datum:t?.datum,x:t?.x,y:t?.y})}}(this.world,e,this.observationContext(t))}observeSensorTransitions(e){this.activeSensorPairs=function(e,t,i){let n=new Set(e.activeSensorPairs().map(e=>`${e.sensorId}\0${e.bodyId}`));if(0===n.size&&0===t.size)return n;let s=new Map(e.readState().map(e=>[e.id,e])),r=(e,t)=>{let{sensorId:n,bodyId:r}=Bt(t),o=i.observation.sensors[n],a=s.get(r);i.emit({type:"enter"===e?o?.enterType??"physics-bin-enter":o?.exitType??"physics-bin-exit",timestamp:i.elapsedSeconds,chartType:i.observation.chartType,chartId:i.observation.chartId,bodyId:r,datum:a?.datum,x:a?.x,y:a?.y,sensorId:n,binId:o?.binId??n})};for(let e of Array.from(n).sort())t.has(e)||r("enter",e);for(let e of Array.from(t).sort())n.has(e)||r("exit",e);return n}(this.world,this.activeSensorPairs,this.observationContext(e))}removeActiveSensorPairsForBodies(e){!function(e,t){for(let i of e)t.has(Bt(i).bodyId)&&e.delete(i)}(this.activeSensorPairs,e)}observationContext(e){return{elapsedSeconds:this.elapsedSeconds,observation:this.observation,emit:t=>this.emitObservation(t,e)}}emitObservation(e,t){t?.push(e),this.observation.onObservation?.(e)}evaluateBodyBudget(){return function(e){let t=Math.max(0,Math.floor(e.liveBodies)),i=Math.max(0,Math.floor(e.queuedBodies??0)),n=t+i,s=Ct(e.bodyLimit),r=Ct(e.engineMaxBodiesHint),o=function(e,t,i){if(!1===i)return;let n=Ct(i?.warnAt);return null!=n?n:null!=e?Math.max(1,Math.floor(.8*e)):null!=t?Math.max(1,Math.floor(.8*t)):void 0}(s,r,e.options),a=null==s?0:Math.max(0,t-s),l=a>0?"overflow":null==o||o>n?"ok":"warning";return{action:"overflow"!==l?"continue":e.sedimentEnabled?"sediment":e.evictionEnabled?"evict":"retain",bodyLimit:s,engineMaxBodiesHint:r,liveBodies:t,overflow:a,projectedBodies:n,queuedBodies:i,state:l,warnAt:o}}({bodyLimit:this.config.bodyLimit,engineMaxBodiesHint:this.world.capabilities.maxBodiesHint,evictionEnabled:!1!==this.config.eviction,liveBodies:this.liveBodyOrder.length,queuedBodies:this.queue.length,sedimentEnabled:this.sediment.isEnabled(),options:this.bodyBudget})}observeBodyBudget(e){let t=this.evaluateBodyBudget();if("ok"===t.state||!1===this.bodyBudget)return this.bodyBudgetObservationKey="ok",t;let i=`${t.state}:${t.action}`;return i===this.bodyBudgetObservationKey||(this.bodyBudgetObservationKey=i,function(e,t){t.emit({type:"overflow"===e.state?"physics-budget-overflow":"physics-budget-warning",timestamp:t.elapsedSeconds,chartType:t.observation.chartType,chartId:t.observation.chartId,budgetAction:e.action,bodyLimit:e.bodyLimit,engineMaxBodiesHint:e.engineMaxBodiesHint,liveBodies:e.liveBodies,overflow:e.overflow,projectedBodies:e.projectedBodies,queuedBodies:e.queuedBodies,warnAt:e.warnAt})}(t,this.observationContext(e))),t}syncSimulationState(e){let t=Dt(this.paused,this.visible,this.queue.length>0,this.atRest());if(t===this.simulationState)return;let i=this.simulationState;this.simulationState=t,function(e,t,i){i.observation.onSimulationStateChange?.(t,e),("running"===t||"settled"===t)&&i.emit({type:"running"===t?"sim-active":"sim-idle",timestamp:i.elapsedSeconds,chartType:i.observation.chartType,chartId:i.observation.chartId,simulationState:t,previousSimulationState:e})}(i,t,this.observationContext(e))}evictOverflow(e){let{evicted:t,sedimented:i,liveBodyOrder:n}=function(e,t,i,n,s,r){let o={evicted:[],sedimented:[],liveBodyOrder:s};if(!1===i)return o;let a=Math.max(0,Math.floor(n));if(!Number.isFinite(a))return o;let l=s.length-a;if(0>=l)return o;let d=function(e,t,i){if("sleeping-first"!==t)return i.slice();let n=new Map(e.readState().map(e=>[e.id,e.sleeping])),s=[],r=[];for(let e of i)n.get(e)?s.push(e):r.push(e);return[...s,...r]}(e,i,s).slice(0,l);if(0===d.length)return o;let h=function(e,t,i,n){let s=new Map(e.readState().map(e=>[e.id,e])),r=[];for(let e of i){let i=s.get(e);if(!i)continue;let o=t.add(i);o&&(r.push(e),n.emit({type:"physics-sediment",timestamp:n.elapsedSeconds,chartType:n.observation.chartType,chartId:n.observation.chartId,bodyId:e,datum:i.datum,x:i.x,y:i.y,binId:o.id,count:o.count,total:o.total}))}return r}(e,t,d,r);e.remove(d);let u=new Set(d);return{evicted:d,sedimented:h,liveBodyOrder:s.filter(e=>!u.has(e))}}(this.world,this.sediment,this.config.eviction,this.config.bodyLimit,this.liveBodyOrder,this.observationContext(e));return t.length>0&&(this.liveBodyOrder=n,this.removeActiveSensorPairsForBodies(new Set(t))),{evicted:t,sedimented:i}}};import{scaleLinear as Zi}from"d3-scale";export{Te as useCustomLayoutSelection,e as placeWithMinGap,i as packBandsBySilhouette,n as orderByBarycenter,s as refineByAdjacentSwaps,r as orderExactSmall,o as countPairwiseCrossings,Xt as calendarLayout,d as resolveAccessor,h as readField,u as unwrapDatum,c as groupBy,p as createSafeDatum,f as matchesHighlight,m as dimFor,y as signatureKey,Gt as LayoutCache,x as makeShade,g as shade,b as datumFromFields,v as stableGlyphId,w as clamp,S as nonNegativeFinite,M as mean,k as withAlpha,I as roundedEnclosure,B as boundsOf,O as hullFromBoxes,A as bandLabel,q as hatchFill,C as linearAxis,P as markCallout,Vt as parallelCoordinatesLayout,F as mulberry32,st as valueAtPath,ot as matchesPhysicsBodyFilter,mt as sedimentHeightfield,Ot as collidersFromPlotBounds,At as collidersFromXScaleBins,ji as UpdateResultTracker,Ji as PhysicsPipelineStore,D as aggregateRegionCounts,T as regionCountsToProjectionRows,L as groupCompletionRows,W as processStageLayout,E as processStageRegions,X as membraneRegion,z as chargeGateRegion,G as routeSurfaceRegion,H as pressureFieldRegion,K as capacitatedRegion,U as portalRegion,_ as absorbRegion,V as forceFieldRegion,Q as bodyGroupSpec,J as processLaneWalls,ie as processChrome,ui as SYMBOL_SEQUENCE,ne as symbolPathString,se as symbolRadius,re as symbolExtent,oe as makeSymbolResolver,pi as DEFAULT_GLYPH_VIEWBOX,fi as DEFAULT_GLYPH_ANCHOR,ae as glyphPlacement,le as glyphExtent,de as resolveGlyphPaint,he as getGlyphPath2D,ue as glyphFractionClipRect,ce as glyphHitGeometry,pe as drawGlyphParts,Ie as annotationNote,Be as measureAnnotationNote,Oe as wrapAnnotationText,be as resolveX,ve as resolveY,Me as resolveAnchoredPosition,ke as isInBounds,fe as isNoteAnnotation,xi as DEFAULT_AREA_PER_ANNOTATION,ye as annotationBudget,ge as annotationDensity,De as annotationLayout,Lt as buildDirectedAdjacency,jt as reachableFrom,Rt as resolveNodeSizeFn};
|
package/dist/c-LYVKDBQJ.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{registerBuiltInXYPlugins as m}from"./c-7NBU5ZKS.min.js";import"./c-33QOXEUG.min.js";import"./c-WNGH47HF.min.js";import"./c-ZYPXQF7B.min.js";import"./c-CPSPZH6A.min.js";import"./c-NYZ2QNAM.min.js";import"./c-DK662R77.min.js";import"./c-AVO3Q7T7.min.js";import"./c-TKG2NP7G.min.js";import"./c-OO5QLMJC.min.js";import"./c-HXDKPIKR.min.js";import"./c-4FN7Q6VQ.min.js";import"./c-YLZIV3VS.min.js";import"./c-W4ZUKSEQ.min.js";import"./c-CPV4N35K.min.js";import"./c-T2V7O2LO.min.js";import"./c-553QUDKA.min.js";export{m as registerBuiltInXYPlugins};
|
package/dist/c-NG7BLZTR.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){return fe.has(e)}function t(e,t){return"number"==typeof t?`${e}[${t}]`:`${e}.${t}`}function r(e,t){return`${e}[Symbol(${t.description??""})]`}function i(e,t){if(!/^(0|[1-9][0-9]*)$/.test(e))return!1;let r=Number(e);return Number.isSafeInteger(r)&&r>=0&&t>r}function n(e,t){try{return Object.getOwnPropertyDescriptor(e,t)}catch{return}}function a(e,t,r,i){let a=n(e,t);return a&&"value"in a&&a.enumerable?o(a.value,r,i):[r]}function o(e,o="$",s=new Set){if(null===e||"string"==typeof e||"boolean"==typeof e)return[];if("number"==typeof e)return Number.isFinite(e)&&!Object.is(e,-0)?[]:[o];if("object"!=typeof e)return[o];if(s.has(e))return[o];let l,c,d;try{d=Array.isArray(e),l=Object.getPrototypeOf(e),c=Reflect.ownKeys(e)}catch{return[o]}if(l!==(d?Array.prototype:Object.prototype)&&null!==l)return[o];s.add(e);let u=[];try{if(d){let l=n(e,"length")?.value;if(!Number.isSafeInteger(l)||0>l)return[t(o,"length")];for(let e of c)"length"===e||"string"==typeof e&&i(e,l)||u.push("symbol"==typeof e?r(o,e):t(o,e));for(let r=0;l>r;r+=1)u.push(...a(e,r+"",t(o,r),s))}else for(let i of c)"symbol"!=typeof i?u.push(...a(e,i,t(o,i),s)):u.push(r(o,i));return u}catch{return[o]}finally{s.delete(e)}}function s(e,t){return`${e}[Symbol(${t.description??""})]`}function l(e,t){if(!/^(0|[1-9][0-9]*)$/.test(e))return!1;let r=Number(e);return Number.isSafeInteger(r)&&r>=0&&t>r}function c(e,t){return"number"==typeof t?`${e}[${t}]`:e?`${e}.${t}`:t}function d(e){return e.sort((e,t)=>{let r=JSON.stringify(e),i=JSON.stringify(t);return i>r?-1:r>i?1:0})}function u(e,t,r){if(null===e)return null;if(e instanceof Date){let i=e.getTime();return Number.isFinite(i)?{$type:"date",value:e.toISOString()}:void r.excluded.push(t)}switch(typeof e){case"string":case"boolean":return e;case"number":return Number.isNaN(e)?{$type:"number",value:"NaN"}:e===1/0?{$type:"number",value:"Infinity"}:e===-1/0?{$type:"number",value:"-Infinity"}:Object.is(e,-0)?{$type:"number",value:"-0"}:e;case"bigint":return{$type:"bigint",value:""+e};case"undefined":case"function":case"symbol":return void r.excluded.push(t);case"object":{let i=e;if(r.ancestors.has(i))return void r.excluded.push(t);r.ancestors.add(i);try{if(Array.isArray(e)){for(let i of Reflect.ownKeys(e))"length"===i||"string"==typeof i&&l(i,e.length)||r.excluded.push("symbol"==typeof i?s(t,i):c(t,i));return Array.from({length:e.length},(i,n)=>{let a=c(t,n),o=Object.getOwnPropertyDescriptor(e,n+"");if(!o||!("value"in o)||!o.enumerable)return r.excluded.push(a),null;let s=u(o.value,a,r);return void 0===s?null:s})}let i={},n=Object.getPrototypeOf(e);if(n!==Object.prototype&&null!==n)return void r.excluded.push(t);let a=[];for(let i of Reflect.ownKeys(e)){if("symbol"==typeof i){r.excluded.push(s(t,i));continue}let n=Object.getOwnPropertyDescriptor(e,i);n&&"value"in n&&n.enumerable?a.push(i):r.excluded.push(c(t,i))}for(let n of a.sort()){let a=Object.getOwnPropertyDescriptor(e,n),o=u(a&&"value"in a?a.value:void 0,c(t,n),r);void 0!==o&&Object.defineProperty(i,n,{value:o,enumerable:!0,configurable:!0,writable:!0})}return i}finally{r.ancestors.delete(i)}}default:return void r.excluded.push(t)}}function p(e,t=new Set){if(null===e)return["null"];if(e instanceof Date)return Number.isFinite(e.getTime())?["date",e.toISOString()]:["excluded"];switch(typeof e){case"string":return["string",e];case"boolean":return["boolean",e];case"number":return["number",Number.isNaN(e)?"NaN":e===1/0?"Infinity":e===-1/0?"-Infinity":Object.is(e,-0)?"-0":e+""];case"bigint":return["bigint",""+e];case"undefined":case"function":case"symbol":return["excluded"];case"object":if(t.has(e))return["excluded"];t.add(e);try{let r=r=>{let i="symbol"==typeof r?["symbol-key",r.description??""]:["string-key",r],n=Object.getOwnPropertyDescriptor(e,r);return n?"value"in n?[i,"data",!!n.enumerable,p(n.value,t)]:[i,"accessor",!!n.enumerable,!!n.get,!!n.set]:[i,"missing"]};if(Array.isArray(e))return["array",Array.from({length:e.length},(t,i)=>{let n=i+"";return Object.prototype.hasOwnProperty.call(e,n)?r(n):["hole"]}),d(Reflect.ownKeys(e).filter(t=>"length"!==t&&!("string"==typeof t&&l(t,e.length))).map(r))];let i=Object.getPrototypeOf(e);return[i!==Object.prototype&&null!==i?"non-json-object":"object",d(Reflect.ownKeys(e).map(r))]}finally{t.delete(e)}default:return["excluded"]}}function f(e){let t={excluded:[],ancestors:new Set},r=u(e,"$",t)??null;return{value:r,text:JSON.stringify(r),excludedPaths:t.excluded}}function m(e){let t=f(e),r=function(e){let t=[...ye],r=Array.from((new TextEncoder).encode(e)),i=8*r.length;for(r.push(128);r.length%64!=56;)r.push(0);let n=Math.floor(i/4294967296),a=i>>>0;r.push(n>>>24&255,n>>>16&255,n>>>8&255,255&n,a>>>24&255,a>>>16&255,a>>>8&255,255&a);let o=[];for(let e=0;r.length>e;e+=4)o.push((r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3])>>>0);for(let e=0;o.length>e;e+=16){let r=[...o.slice(e,e+16)];for(let e=16;64>e;e+=1){let t=me(r[e-15],7)^me(r[e-15],18)^r[e-15]>>>3,i=me(r[e-2],17)^me(r[e-2],19)^r[e-2]>>>10;r[e]=r[e-16]+t+r[e-7]+i>>>0}let[i,n,a,s,l,c,d,u]=t;for(let e=0;64>e;e+=1){let t=u+(me(l,6)^me(l,11)^me(l,25))+(l&c^~l&d)+ve[e]+r[e]>>>0,o=i&n^i&a^n&a;u=d,d=c,c=l,l=s+t>>>0,s=a,a=n,n=i,i=t+((me(i,2)^me(i,13)^me(i,22))+o>>>0)>>>0}let p=[i,n,a,s,l,c,d,u];for(let e=0;8>e;e+=1)t[e]=t[e]+p[e]>>>0}return t.map(e=>e.toString(16).padStart(8,"0")).join("")}(JSON.stringify(["semiotic-value-fingerprint","v2",p(e)]));return{...t,algorithm:"sha256",digest:r,fingerprint:"sha256:"+r}}function h(e,t,r,i){w(e,Object.keys(t),r,i);for(let[n,a]of Object.entries(t))a.values?(a.required||void 0!==e[n])&&x(e,n,r,a.values,i):a.required?A(e,n,r,i):I(e,n,r,i)}function y(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function v(e,t,r,i){void 0!==e[t]&&("number"!=typeof e[t]||!Number.isFinite(e[t]))&&i.push({path:`${r}.${t}`,message:"Expected a finite number."})}function g(e,t,r,i){void 0!==e[t]&&"boolean"!=typeof e[t]&&i.push({path:`${r}.${t}`,message:"Expected a boolean."})}function $(e){return null===e||"string"==typeof e||"boolean"==typeof e||("number"==typeof e?Number.isFinite(e):Array.isArray(e)?e.every($):y(e)&&Object.values(e).every($))}function b(e,t,r,i){void 0!==e[t]&&(!y(e[t])||!$(e[t]))&&i.push({path:`${r}.${t}`,message:"Expected a JSON object."})}function w(e,t,r,i){let n=new Set(t);for(let t of Object.keys(e))n.has(t)||i.push({path:`${r}.${t}`,message:"Unexpected property."})}function A(e,t,r,i){("string"!=typeof e[t]||!e[t])&&i.push({path:`${r}.${t}`,message:"Expected a non-empty string."})}function x(e,t,r,i,n){("string"!=typeof e[t]||!i.includes(e[t]))&&n.push({path:`${r}.${t}`,message:`Expected one of: ${i.join(", ")}.`})}function C(e,t,r,i){let n=e[t];if(void 0!==n)return y(n)?n:void i.push({path:`${r}.${t}`,message:"Expected an object."})}function j(e,t,r,i){let n=e[t];if(void 0!==n)return Array.isArray(n)?n:void i.push({path:`${r}.${t}`,message:"Expected an array."})}function S(e,t,r){e?.some(e=>"string"!=typeof e||!e)&&r.push({path:t,message:"Expected non-empty string values."})}function P(e,t,r,i,n){void 0!==e[t]&&x(e,t,r,i,n)}function I(e,t,r,i){void 0!==e[t]&&"string"!=typeof e[t]&&i.push({path:`${r}.${t}`,message:"Expected a string."})}function O(e,t,r){y(e)?(w(e,["id","name","kind"],t,r),A(e,"kind",t,r),I(e,"id",t,r),I(e,"name",t,r)):r.push({path:t,message:"Expected an actor object."})}function E(e){for(let t of Object.values(e))Object.freeze(t.suppliedBy),Object.freeze(t);return Object.freeze(e)}function B(e){try{return function(e){let t=[],r=[];if(!y(e))return{valid:!1,errors:[{path:"$",message:"Expected an object."}],warnings:r};let i=o(e);if(i.length>0)return{valid:!1,errors:i.map(e=>({path:e,message:"Expected a JSON-compatible value that survives serialization unchanged."})),warnings:r};if(w(e,["contractVersion","artifact","purpose","claims","evidence","time","reception","form","contestability","accountability","inheritance","fieldStatus","extensions"],"$",t),"0.1"!==e.contractVersion&&t.push({path:"$.contractVersion",message:"Expected contract version 0.1."}),y(e.artifact)){w(e.artifact,["id","kind","component","title","createdAt","configFingerprint","dataFingerprint","revision"],"$.artifact",t),A(e.artifact,"id","$.artifact",t),x(e.artifact,"kind","$.artifact",["chart","dashboard","story","alert","agent-answer"],t);for(let r of["component","title","createdAt","configFingerprint","dataFingerprint","revision"])I(e.artifact,r,"$.artifact",t)}else t.push({path:"$.artifact",message:"Expected an artifact identity object."});if(y(e.purpose))if(Array.isArray(e.purpose.intents)){w(e.purpose,["intents","communicativeAct","decisionContext","stakes","allowedUses","prohibitedUses"],"$.purpose",t),e.purpose.intents.forEach((e,r)=>{(!y(e)||"string"!=typeof e.id||!e.id)&&t.push({path:`$.purpose.intents[${r}].id`,message:"Expected a non-empty intent identifier."}),y(e)&&w(e,["id","strength","source","rationale"],`$.purpose.intents[${r}]`,t),y(e)&&void 0!==e.strength&&x(e,"strength",`$.purpose.intents[${r}]`,["primary","secondary"],t),y(e)&&(P(e,"source",`$.purpose.intents[${r}]`,["author","derived","model-proposal","import"],t),I(e,"rationale",`$.purpose.intents[${r}]`,t))});for(let r of["allowedUses","prohibitedUses"])S(j(e.purpose,r,"$.purpose",t),"$.purpose."+r,t);P(e.purpose,"stakes","$.purpose",["exploratory","informational","operational","high"],t),I(e.purpose,"communicativeAct","$.purpose",t),I(e.purpose,"decisionContext","$.purpose",t)}else t.push({path:"$.purpose.intents",message:"Expected an intent array."});else t.push({path:"$.purpose",message:"Expected a purpose object."});Array.isArray(e.claims)?e.claims.forEach((e,r)=>{if(!y(e))return void t.push({path:`$.claims[${r}]`,message:"Expected a claim object."});w(e,["id","text","kind","status","evidenceIds","scope","uncertainty","asOf","supersedes","authoredBy","review","tags"],`$.claims[${r}]`,t),A(e,"id",`$.claims[${r}]`,t),x(e,"kind",`$.claims[${r}]`,["description","observation","aggregation","inference","forecast","simulation","alert","recommendation","normative"],t),x(e,"status",`$.claims[${r}]`,["supported","provisional","disputed","superseded","retracted","unsupported","unknown"],t),Array.isArray(e.evidenceIds)?e.evidenceIds.some(e=>"string"!=typeof e||!e)&&t.push({path:`$.claims[${r}].evidenceIds`,message:"Expected non-empty string evidence identifiers."}):t.push({path:`$.claims[${r}].evidenceIds`,message:"Expected an evidence identifier array."}),S(j(e,"supersedes",`$.claims[${r}]`,t),`$.claims[${r}].supersedes`,t),I(e,"text",`$.claims[${r}]`,t),I(e,"asOf",`$.claims[${r}]`,t),b(e,"scope",`$.claims[${r}]`,t),S(j(e,"tags",`$.claims[${r}]`,t),`$.claims[${r}].tags`,t),void 0!==e.authoredBy&&O(e.authoredBy,`$.claims[${r}].authoredBy`,t);let i=C(e,"review",`$.claims[${r}]`,t);i&&(w(i,["status","reviewer","reviewedAt","rationale"],`$.claims[${r}].review`,t),x(i,"status",`$.claims[${r}].review`,["proposed","reviewed","approved","rejected"],t),void 0!==i.reviewer&&O(i.reviewer,`$.claims[${r}].review.reviewer`,t),I(i,"reviewedAt",`$.claims[${r}].review`,t),I(i,"rationale",`$.claims[${r}].review`,t));let n=C(e,"uncertainty",`$.claims[${r}]`,t);if(n){w(n,["kind","lower","upper","confidence","unit","description"],`$.claims[${r}].uncertainty`,t),x(n,"kind",`$.claims[${r}].uncertainty`,["interval","distribution","qualitative","unknown"],t);for(let e of["lower","upper","confidence"])v(n,e,`$.claims[${r}].uncertainty`,t);I(n,"unit",`$.claims[${r}].uncertainty`,t),I(n,"description",`$.claims[${r}].uncertainty`,t)}}):t.push({path:"$.claims",message:"Expected a claim array."}),Array.isArray(e.evidence)?e.evidence.forEach((e,r)=>{if(!y(e))return void t.push({path:`$.evidence[${r}]`,message:"Expected an evidence object."});w(e,["id","role","label","source","fingerprint","dataVersion","observedAt","scope","sample","transformation","generatedClaimId","relationship"],`$.evidence[${r}]`,t),A(e,"id",`$.evidence[${r}]`,t),x(e,"role",`$.evidence[${r}]`,["source-data","external-source","transformation","statistical-test","model-output","human-observation","policy-rule","quality-check"],t);for(let i of["label","fingerprint","dataVersion","observedAt","generatedClaimId"])I(e,i,`$.evidence[${r}]`,t);b(e,"scope",`$.evidence[${r}]`,t);let i=C(e,"source",`$.evidence[${r}]`,t);if(i){w(i,["name","uri","version","retrievedAt","publisher"],`$.evidence[${r}].source`,t);for(let e of["name","uri","version","retrievedAt","publisher"])I(i,e,`$.evidence[${r}].source`,t)}let n=C(e,"transformation",`$.evidence[${r}]`,t);if(n){w(n,["id","kind","description","inputEvidenceIds","parameters","assumptions","implementation","performedAt","performedBy"],`$.evidence[${r}].transformation`,t),A(n,"id",`$.evidence[${r}].transformation`,t),x(n,"kind",`$.evidence[${r}].transformation`,["aggregation","filter","normalization","binning","join","smoothing","forecasting","simulation","other"],t);let e=j(n,"inputEvidenceIds",`$.evidence[${r}].transformation`,t);e?S(e,`$.evidence[${r}].transformation.inputEvidenceIds`,t):t.push({path:`$.evidence[${r}].transformation.inputEvidenceIds`,message:"Expected an evidence identifier array."}),S(j(n,"assumptions",`$.evidence[${r}].transformation`,t),`$.evidence[${r}].transformation.assumptions`,t),I(n,"description",`$.evidence[${r}].transformation`,t),I(n,"implementation",`$.evidence[${r}].transformation`,t),I(n,"performedAt",`$.evidence[${r}].transformation`,t),b(n,"parameters",`$.evidence[${r}].transformation`,t),void 0!==n.performedBy&&O(n.performedBy,`$.evidence[${r}].transformation.performedBy`,t)}let a=C(e,"sample",`$.evidence[${r}]`,t);if(a){w(a,["rowCount","fields","values","truncated"],`$.evidence[${r}].sample`,t),S(j(a,"fields",`$.evidence[${r}].sample`,t),`$.evidence[${r}].sample.fields`,t);let e=j(a,"values",`$.evidence[${r}].sample`,t);e&&!function(e){return e.every($)}(e)&&t.push({path:`$.evidence[${r}].sample.values`,message:"Expected JSON values."}),v(a,"rowCount",`$.evidence[${r}].sample`,t),g(a,"truncated",`$.evidence[${r}].sample`,t)}P(e,"relationship",`$.evidence[${r}]`,["descriptive","correlational","causal","unknown"],t)}):t.push({path:"$.evidence",message:"Expected an evidence array."}),function(e,t){if(void 0===e||y(e)){if(y(e))for(let[r,i]of Object.entries(e)){let e="$.fieldStatus."+r;if(!y(i)||"string"!=typeof i.status){t.push({path:e,message:"Expected a field state with a status."});continue}w(i,["status","reason","suppliedBy","derived","reviewedBy"],e,t),["known","unknown","manual","not-applicable"].includes(i.status)||t.push({path:e+".status",message:"Expected one of: known, unknown, manual, not-applicable."}),void 0!==i.suppliedBy&&("string"!=typeof i.suppliedBy||!["author","system","model-proposal","import"].includes(i.suppliedBy))&&t.push({path:e+".suppliedBy",message:"Expected one of: author, system, model-proposal, import."}),I(i,"reason",e,t),I(i,"reviewedBy",e,t),g(i,"derived",e,t);let n=Object.prototype.hasOwnProperty.call(ge,r)?ge[r]:void 0,a="model-proposal"===i.suppliedBy,o=a&&!0===n?.modelMayPropose&&"known"!==i.status;n&&"known"===i.status&&"string"!=typeof i.suppliedBy&&t.push({path:e+".suppliedBy",message:`Known field "${r}" must identify an allowed supplier.`}),n&&"string"==typeof i.suppliedBy&&!o&&!n.suppliedBy.includes(i.suppliedBy)&&t.push({path:e+".suppliedBy",message:`Field "${r}" cannot be supplied by ${i.suppliedBy}.`}),n&&!0===i.derived&&!n.derivable&&t.push({path:e+".derived",message:`Field "${r}" cannot be marked as derived.`}),n&&a&&(!n.modelMayPropose||"known"===i.status)&&t.push({path:e+".suppliedBy",message:"known"===i.status?`A model proposal cannot finalize field "${r}" as known.`:`Field "${r}" does not accept model proposals.`}),"required"===n?.humanReview&&"known"===i.status&&("string"!=typeof i.reviewedBy||!i.reviewedBy.trim())&&t.push({path:e+".reviewedBy",message:`Known field "${r}" requires an attributable human review.`})}}else t.push({path:"$.fieldStatus",message:"Expected a field-state object."})}(e.fieldStatus,t);let n=C(e,"time","$",t);return n&&function(e,t){let r="$.time";w(e,[...we,...Object.keys(Ae),"sources"],r,t);for(let i of we)I(e,i,r,t);for(let[i,n]of Object.entries(Ae)){let a=C(e,i,r,t);a&&h(a,n,`${r}.${i}`,t)}j(e,"sources",r,t)?.forEach((e,i)=>{let n=`${r}.sources[${i}]`;y(e)?h(e,xe,n,t):t.push({path:n,message:"Expected a source object."})})}(n,t),function(e,t){(function(e,t){let r=C(e,"reception","$",t);if(!r)return;w(r,["channels","audience","strengths","risks","scaffolds","description","dataFallback","manualChecks"],"$.reception",t);let i=j(r,"channels","$.reception",t);i||t.push({path:"$.reception.channels",message:"Expected a reception-channel array."}),i?.forEach((e,r)=>{let i=`$.reception.channels[${r}]`;y(e)?(w(e,["channel","disclosure","navigation","interactionInstructions","rawData","tokenBudget","privacyNotes"],i,t),x(e,"channel",i,["visual","screen-reader","sonified","agent","print","low-bandwidth"],t),P(e,"disclosure",i,["summary","standard","detailed"],t),P(e,"rawData",i,["deny","bounded","allow"],t),g(e,"navigation",i,t),g(e,"interactionInstructions",i,t),v(e,"tokenBudget",i,t),S(j(e,"privacyNotes",i,t),i+".privacyNotes",t)):t.push({path:i,message:"Expected a channel object."})});for(let e of["strengths","risks","scaffolds","manualChecks"])S(j(r,e,"$.reception",t),"$.reception."+e,t);I(r,"audience","$.reception",t),I(r,"description","$.reception",t),g(r,"dataFallback","$.reception",t)})(e,t),function(e,t){let r=C(e,"form","$",t);r&&(w(r,["chartFamily","whyThisForm","rejectedAlternatives","risks","misuse"],"$.form",t),I(r,"chartFamily","$.form",t),I(r,"whyThisForm","$.form",t),S(j(r,"risks","$.form",t),"$.form.risks",t),S(j(r,"misuse","$.form",t),"$.form.misuse",t),j(r,"rejectedAlternatives","$.form",t)?.forEach((e,r)=>{let i=`$.form.rejectedAlternatives[${r}]`;y(e)?(w(e,["representation","reason"],i,t),A(e,"representation",i,t),A(e,"reason",i,t)):t.push({path:i,message:"Expected an alternative object."})}))}(e,t),function(e,t){let r=C(e,"contestability","$",t);r&&(w(r,["sourceRequestsAllowed","alternativeViews","challenges","corrections","editorialExceptions"],"$.contestability",t),g(r,"sourceRequestsAllowed","$.contestability",t),j(r,"challenges","$.contestability",t)?.forEach((e,r)=>{let i=`$.contestability.challenges[${r}]`;if(y(e)){w(e,["id","claimId","status","reason","raisedBy","raisedAt","counterclaimId","resolution"],i,t),A(e,"id",i,t),A(e,"claimId",i,t),A(e,"reason",i,t),x(e,"status",i,["open","accepted","declined","resolved"],t),void 0!==e.raisedBy&&O(e.raisedBy,i+".raisedBy",t);for(let r of["raisedAt","counterclaimId","resolution"])I(e,r,i,t)}else t.push({path:i,message:"Expected a challenge object."})}),j(r,"corrections","$.contestability",t)?.forEach((e,r)=>{let i=`$.contestability.corrections[${r}]`;if(!y(e))return void t.push({path:i,message:"Expected a correction object."});w(e,["id","affectedClaimIds","replacementClaimIds","reason","createdAt","createdBy"],i,t),A(e,"id",i,t),A(e,"reason",i,t);let n=j(e,"affectedClaimIds",i,t);n||t.push({path:i+".affectedClaimIds",message:"Expected an affected-claim array."}),S(n,i+".affectedClaimIds",t),S(j(e,"replacementClaimIds",i,t),i+".replacementClaimIds",t),I(e,"createdAt",i,t),void 0!==e.createdBy&&O(e.createdBy,i+".createdBy",t)}),j(r,"alternativeViews","$.contestability",t)?.forEach((e,r)=>{let i=`$.contestability.alternativeViews[${r}]`;y(e)?(w(e,["id","label","rationale"],i,t),A(e,"id",i,t),A(e,"label",i,t),I(e,"rationale",i,t)):t.push({path:i,message:"Expected an alternative-view object."})}),j(r,"editorialExceptions","$.contestability",t)?.forEach((e,r)=>{let i=`$.contestability.editorialExceptions[${r}]`;y(e)?(w(e,["ruleId","rationale","owner","reviewAt"],i,t),A(e,"ruleId",i,t),A(e,"rationale",i,t),I(e,"owner",i,t),I(e,"reviewAt",i,t)):t.push({path:i,message:"Expected an editorial-exception object."})}))}(e,t),function(e,t){let r=C(e,"accountability","$",t);r&&(w(r,["authors","generatedBy","dataSources","codeRef","reviews","actions"],"$.accountability",t),j(r,"authors","$.accountability",t)?.forEach((e,r)=>O(e,`$.accountability.authors[${r}]`,t)),S(j(r,"dataSources","$.accountability",t),"$.accountability.dataSources",t),I(r,"generatedBy","$.accountability",t),I(r,"codeRef","$.accountability",t),j(r,"reviews","$.accountability",t)?.forEach((e,r)=>{let i=`$.accountability.reviews[${r}]`;if(y(e)){w(e,["id","status","reviewer","reviewedAt","rationale","policyId"],i,t),A(e,"id",i,t),x(e,"status",i,["pending","approved","changes-requested","rejected"],t),void 0!==e.reviewer&&O(e.reviewer,i+".reviewer",t);for(let r of["reviewedAt","rationale","policyId"])I(e,r,i,t)}else t.push({path:i,message:"Expected a review object."})}),j(r,"actions","$.accountability",t)?.forEach((e,r)=>{let i=`$.accountability.actions[${r}]`;if(!y(e))return void t.push({path:i,message:"Expected an action object."});w(e,["id","action","actor","actedAt","claimIds","artifactId","artifactRevision","policyId","status","invalidatedByClaimId"],i,t),A(e,"id",i,t),A(e,"action",i,t);let n=j(e,"claimIds",i,t);n||t.push({path:i+".claimIds",message:"Expected a claim identifier array."}),S(n,i+".claimIds",t),void 0!==e.actor&&O(e.actor,i+".actor",t);for(let r of["actedAt","artifactId","artifactRevision","policyId","invalidatedByClaimId"])I(e,r,i,t);P(e,"status",i,["proposed","taken","reversed","invalidated"],t)}))}(e,t),function(e,t){let r=C(e,"inheritance","$",t);if(r){w(r,["requiredPaths","prohibitedExports","privacy","rawDataDefault","preservation","sourceArtifactIds"],"$.inheritance",t);for(let e of["requiredPaths","prohibitedExports","sourceArtifactIds"])S(j(r,e,"$.inheritance",t),"$.inheritance."+e,t);P(r,"privacy","$.inheritance",["public","restricted","confidential","unknown"],t),P(r,"rawDataDefault","$.inheritance",["exclude","bounded","include"],t),P(r,"preservation","$.inheritance",["full-fidelity","claim-evidence-preserved","visual-only","lossy","unknown"],t)}}(e,t)}(e,t),b(e,"extensions","$",t),Array.isArray(e.claims)&&0===e.claims.length&&r.push({path:"$.claims",message:"The contract declares no claims."}),Array.isArray(e.evidence)&&0===e.evidence.length&&r.push({path:"$.evidence",message:"The contract declares no evidence."}),{valid:0===t.length,errors:t,warnings:r}}(e)}catch{return{valid:!1,errors:[{path:"$",message:"Artifact contract could not be inspected safely."}],warnings:[]}}}function k(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function F(e){let t=Object.entries(e).filter(([e,t])=>Ce.includes(e)&&void 0!==t);if(0!==t.length)return 1===t.length&&"data"===t[0][0]?t[0][1]:Object.fromEntries(t)}function R(e){return Object.fromEntries(Object.entries(e).filter(([e])=>!Ce.includes(e)&&"recipeId"!==e))}function N(e,t,r){let i=function(e,t,r,i=F(t)){let n=R(t),a=0===o(n).length?m(n).fingerprint:void 0,s=void 0!==i&&0===o(i).length?function(e,t=[]){if(void 0===e)return;let r=t.filter(e=>!!e.transformation).map(({id:e,transformation:t})=>({evidenceId:e,transformation:t})).sort(({evidenceId:e},{evidenceId:t})=>t>e?-1:e>t?1:0);return m(r.length>0?{data:e,transformations:r}:e).fingerprint}(i,e.evidence):void 0,l="ChartRecipe"===r&&"string"==typeof t.recipeId?t.recipeId:r,c=[],d=[];return void 0!==l&&(void 0===e.artifact.component?d.push("artifact.component"):e.artifact.component!==l&&c.push("artifact.component")),void 0===e.artifact.configFingerprint||void 0===a?d.push("artifact.configFingerprint"):e.artifact.configFingerprint!==a&&c.push("artifact.configFingerprint"),void 0!==e.artifact.dataFingerprint&&s?e.artifact.dataFingerprint!==s&&c.push("artifact.dataFingerprint"):d.push("artifact.dataFingerprint"),{status:c.length>0?"mismatch":d.length>0?"unknown":"match",mismatchPaths:c,unknownPaths:d}}(e,t,r);return{mismatchPaths:[...i.mismatchPaths,...void 0!==r&&i.unknownPaths.includes("artifact.component")?["artifact.component"]:[]]}}function D(e,t,r,i){return m({component:t,version:i.version,createdAt:i.createdAt,...void 0!==i.recipeId?{recipeId:i.recipeId}:{},...void 0!==i.portable?{portable:i.portable}:{},...void 0!==i.manifest?{manifest:i.manifest}:{},...void 0!==i.reason?{reason:i.reason}:{},...void 0!==i.warnings?{warnings:i.warnings}:{},...void 0!==i.selections?{selections:i.selections}:{},artifactContract:r,status:e.status,omittedPaths:e.omittedPaths,warnings:e.warnings,...void 0!==e.serializedConfigFingerprint?{serializedConfigFingerprint:e.serializedConfigFingerprint}:{},...Object.prototype.hasOwnProperty.call(e,"serializedDataFingerprint")?{serializedDataFingerprint:e.serializedDataFingerprint}:{}}).fingerprint}function M(e,t,r,i,n){let a=F(r),o={...e,serializedConfigFingerprint:m(R(r)).fingerprint,serializedDataFingerprint:void 0===a?null:m(a).fingerprint};return{...o,transferFingerprint:D(o,t,i,n)}}function T(e,t,r,i,n){if(!t)return{};let a=function(e){let t=function(e,t={}){try{return function(e,t){if(!k(e))return{transfer:{status:"invalid",omittedPaths:["artifactContract"],warnings:["Artifact contract must be a JSON object."]}};let r=f(e),i=[...new Set([...r.excludedPaths,...o(e)])].sort(),n=r.value,a=function(e,t){if(!t||!k(e)||!Array.isArray(e.evidence))return[];let r=[];return e.evidence.forEach((e,t)=>{k(e)&&Object.prototype.hasOwnProperty.call(e,"sample")&&(delete e.sample,r.push(`$.evidence[${t}].sample`))}),r}(n,t.excludeEvidenceSamples),s=a.length?["Bounded evidence samples were excluded by the transfer policy."]:[],l=n?.contractVersion;if("string"!=typeof l||!l)return{contract:n,transfer:{status:"invalid",omittedPaths:[...i,...a],warnings:["Artifact contract is missing a string contractVersion.",...s]}};if("0.1"!==l)return{contract:n,transfer:{status:i.length>0?"invalid":"unsupported-version",omittedPaths:[...i,...a],warnings:[`Contract version ${l} is not interpreted by this runtime.`,...i.length>0?[`Non-JSON values could not be preserved at: ${i.join(", ")}.`]:[],...s]}};let c=B(n),d=[...c.errors.map(({path:e,message:t})=>`${e}: ${t}`),...c.warnings.map(({path:e,message:t})=>`${e}: ${t}`),...i.length?[`Non-JSON values could not be preserved at: ${i.join(", ")}.`]:[],...s];return{contract:n,transfer:{status:!c.valid||i.length>0?"invalid":a.length>0?"excluded":"preserved",omittedPaths:[...i,...a],warnings:d}}}(e,t)}catch{let t=o(e);return{transfer:{status:"invalid",omittedPaths:t.length?t:["$"],warnings:["Artifact contract could not be inspected safely."]}}}}(e);if(!t.contract||"preserved"!==t.transfer.status)throw new TypeError(t.transfer.warnings.join(" ")||"Artifact contract could not be serialized without loss.");return t}(t),s=n.recipeId??e,l=N(t,r,s),c=function(e,t){return[...new Set([...Object.keys(e),...Object.keys(t)])].filter(r=>{if(Object.prototype.hasOwnProperty.call(e,r)!==Object.prototype.hasOwnProperty.call(t,r))return!0;let i=m(e[r]),n=m(t[r]);return i.excludedPaths.length>0||i.fingerprint!==n.fingerprint}).map(e=>"props."+e).sort()}(r,i),d=N(t,i,s);return l.mismatchPaths.length>0?{artifactContract:a.contract,artifactTransfer:M({status:"invalid",omittedPaths:l.mismatchPaths,warnings:["The artifact contract fingerprints do not match the supplied chart props or data."]},e,i,a.contract,n)}:c.length>0?{artifactContract:a.contract,artifactTransfer:M({status:"excluded",omittedPaths:c,warnings:["Chart props or data were excluded from the serialized configuration."]},e,i,a.contract,n)}:d.mismatchPaths.length>0?{artifactContract:a.contract,artifactTransfer:M({status:"invalid",omittedPaths:d.mismatchPaths,warnings:["Serialized chart props or data differ from the values bound to the artifact contract."]},e,i,a.contract,n)}:{artifactContract:a.contract,artifactTransfer:M(a.transfer,e,i,a.contract,n)}}function q(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0})}function z(e,t){return!(!Pe.has(e)||"areas"===e&&"string"==typeof t)}function V(t,r,i){if(i?.selections&&o(i.selections).length>0)throw new TypeError("Serialized selection state must contain only values that survive JSON serialization unchanged.");let n=se(t)??de(r.recipe)??de(r.recipeId);if(n)return function(e,t,r){let i=!1!==r?.includeData,n=o(e);if("portable"===e.portability&&n.length>0)throw Error(`Portable recipe "${e.id}" has non-JSON definition values at: ${n.join(", ")}.`);let a=function(e,t,r){let i={};for(let[n,a]of Object.entries(e))if(null!=a&&!Se.has(n)&&"recipeId"!==n&&(t||!z(n,a))){if("function"==typeof a){if(r)throw Error(`Portable recipe prop "${n}" is not JSON-safe.`);continue}if(o(a).length>0){if(r)throw Error(`Portable recipe prop "${n}" is not JSON-safe.`);continue}q(i,n,Ie(a))}return i}(t,i,"portable"===e.portability),s=e.intents.map(ce).filter(e=>!!e),l=e.layout&&"object"==typeof e.layout&&"string"==typeof e.layout.id?e.layout.id:void 0,c=l?le(l):void 0,d=e.layout&&"object"==typeof e.layout&&"string"==typeof e.layout.version&&e.layout.version?{version:e.layout.version,...e.layout.fingerprint?{fingerprint:e.layout.fingerprint}:{}}:void 0;if(c&&d&&(c.version!==d.version||c.fingerprint!==d.fingerprint))throw Error(`Recipe layout "${l}" registry identity does not match its portable declaration.`);let u=c??d;if("portable"===e.portability&&l&&!u)throw Error(`Portable recipe layout "${l}" must be registered with an explicit version identity.`);let p={name:e.name,intents:s,...e.audience?.primary?{audience:[e.audience.primary]}:{},frameFamily:e.frameFamily,...e.version?{recipeVersion:e.version}:{},...0===n.length?{definitionFingerprint:m(e).fingerprint}:{},...l?{layoutId:l}:{},...u?{layoutVersion:u.version}:{},...u?.fingerprint?{layoutFingerprint:u.fingerprint}:{}},f=(new Date).toISOString();if("portable"===e.portability){if(o(a).length>0)throw Error(`Portable recipe "${e.id}" contains non-JSON-safe props or layoutConfig.`);let i={version:je,createdAt:f,recipeId:e.id,portable:!0,manifest:p,...r?.selections?{selections:r.selections}:{}};return{component:"ChartRecipe",recipeId:e.id,portable:!0,props:a,manifest:p,version:je,createdAt:f,...T("ChartRecipe",r?.artifactContract,t,a,i),...r?.selections?{selections:r.selections}:{}}}let h="Recipe contains or may depend on non-serializable local layout callbacks.",y=["This config is inspectable but cannot be rendered remotely by CLI or MCP."],v={version:je,createdAt:f,recipeId:e.id,portable:!1,manifest:p,reason:h,warnings:y,...r?.selections?{selections:r.selections}:{}};return{component:"ChartRecipe",recipeId:e.id,portable:!1,reason:h,warnings:y,props:a,manifest:p,version:je,createdAt:f,...T("ChartRecipe",r?.artifactContract,t,a,v),...r?.selections?{selections:r.selections}:{}}}(n,r,i);if(!e(t))throw Error(`Unknown component "${t}". Known components: ${pe.join(", ")}`);let a=!1!==i?.includeData,s={};for(let[e,t]of Object.entries(r))if(null!=t&&!Se.has(e)&&(a||!z(e,t))&&"function"!=typeof t&&0>=o(t).length)try{q(s,e,Ie(t))}catch{}let l=(new Date).toISOString(),c={version:je,createdAt:l,...i?.selections?{selections:i.selections}:{}};return{component:t,props:s,version:je,createdAt:l,...T(t,i?.artifactContract,r,s,c),...i?.selections?{selections:i.selections}:{}}}function J(e){try{if(!e||"object"!=typeof e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}catch{return!1}}function L(t){!function(e){if(!J(e))throw Error("Invalid chart config: expected a plain object");let t=o(e);if(t.length>0)throw new TypeError(`Chart config contains values that cannot survive JSON serialization at: ${t.join(", ")}.`);if(e.version!==je)throw Error(`Unsupported chart config version ${e.version+""}; expected ${je}.`);if("string"!=typeof e.component||!e.component.trim())throw Error("Invalid chart config: missing component");if(!J(e.props))throw Error("Invalid chart config: props must be a plain object");if("string"!=typeof e.createdAt||!Number.isFinite(Date.parse(e.createdAt)))throw Error("Invalid chart config: createdAt must be a valid timestamp");if(void 0!==e.recipeId&&("string"!=typeof e.recipeId||!e.recipeId.trim()))throw Error("Invalid chart config: recipeId must be a non-empty string");if(void 0!==e.portable&&"boolean"!=typeof e.portable)throw Error("Invalid chart config: portable must be a boolean");if(void 0!==e.selections&&!J(e.selections))throw Error("Invalid chart config: selections must be a plain object");if(void 0!==e.manifest){if(!J(e.manifest))throw Error("Invalid chart config: manifest must be a plain object");if("string"!=typeof e.manifest.name||!e.manifest.name.trim()||"string"!=typeof e.manifest.frameFamily||!e.manifest.frameFamily.trim()||!Array.isArray(e.manifest.intents)||e.manifest.intents.some(e=>"string"!=typeof e||!e.trim())||void 0!==e.manifest.audience&&(!Array.isArray(e.manifest.audience)||e.manifest.audience.some(e=>"string"!=typeof e||!e.trim()))||void 0!==e.manifest.recipeVersion&&("string"!=typeof e.manifest.recipeVersion||!e.manifest.recipeVersion.trim())||void 0!==e.manifest.definitionFingerprint&&("string"!=typeof e.manifest.definitionFingerprint||!e.manifest.definitionFingerprint.trim())||void 0!==e.manifest.layoutId&&("string"!=typeof e.manifest.layoutId||!e.manifest.layoutId.trim())||void 0!==e.manifest.layoutVersion&&("string"!=typeof e.manifest.layoutVersion||!e.manifest.layoutVersion.trim())||void 0!==e.manifest.layoutFingerprint&&("string"!=typeof e.manifest.layoutFingerprint||!e.manifest.layoutFingerprint.trim())||void 0!==e.manifest.layoutVersion&&void 0===e.manifest.layoutId||void 0!==e.manifest.layoutFingerprint&&void 0===e.manifest.layoutVersion)throw Error("Invalid chart config: malformed recipe manifest")}}(t);let{props:r}=t,i="LocalChartRecipe"===t.component?"ChartRecipe":t.component;if("ChartRecipe"!==i&&!e(i))throw Error(`Cannot project unknown component "${i}" to JSX.`);let n=["<"+i];t.recipeId&&n.push(` recipeId={${K(t.recipeId)}}`);for(let[e,t]of Object.entries(r)){if(!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e)){let r={};Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),n.push(` {...${K(r)}}`);continue}if("string"==typeof t)n.push(G(t)?` ${e}="${t}"`:` ${e}={${K(t)}}`);else if("boolean"==typeof t&&!0===t)n.push(" "+e);else if("boolean"==typeof t&&!1===t)n.push(` ${e}={false}`);else if("number"==typeof t)n.push(` ${e}={${t}}`);else{let r=K(t);n.push(80>r.length?` ${e}={${r}}`:` ${e}={${K(t,2)}}`)}}return n.push("/>"),n.join("\n")}function G(e){return!/["&<>{}\r\n\u2028\u2029]/.test(e)}function K(e,t){return JSON.stringify(e,null,t).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function U(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function H(e){return U(e)?e:void 0}function W(e){let t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}function Z(e){let t=W(e);return null==t?void 0:Math.max(0,Math.floor(t))}function _(...e){return e.map(H).find(Boolean)}function Q(...e){return e.find(Array.isArray)}function X(e){let t={};for(let[r,i]of Object.entries(e))void 0!==i&&(t[r]=i);return t}function Y(e,t,r){return e["string"==typeof t&&t?t:r]}function ee(e){return e instanceof Date?e.toISOString():"number"==typeof e?Number.isInteger(e)?e+"":Math.round(1e3*e)/1e3+"":(e??"—")+""}function te(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function re(e){return Number.isInteger(e)?e+"":Math.round(1e3*e)/1e3+""}function ie(e,t,r){let i=e?.filter(e=>!0===H(e)?.sensor).length,n=H(t?.observation),a=H(n?.sensors),o=Q(r?.activeSensors);return Math.max(i??0,a?Object.keys(a).length:0,o?.length??0)||void 0}function ne(e,t,r={}){let i,{capability:n,audience:a,locale:o}=r,s=r.levels??["l1","l2","l3"],l=!1!==r.includeStructure,c=ue(e,n),d=c?[...s,"l4"]:s,u=oe(e,t,{levels:d,locale:o,capability:n,audience:a}),{l4:p,...f}=u.levels,m=["l1","l2","l3"].map(e=>u.levels[e]).filter(Boolean).join(" "),h={levels:f,text:u.annotations?`${u.annotations} ${m}`.trim():m,...u.annotations?{annotations:u.annotations}:{}};if(c&&p){let e=(y=n)?"fits"in y||"buildProps"in y?{family:y.family}:{family:y.family,intentScores:y.intentScores}:{};i={act:c,sentence:p,family:e.family,intentScores:e.intentScores}}var y;let v=l?ae(e,t,{maxLeaves:r.maxLeaves,locale:o}):void 0,g=function(e,t,r){if(!1===r)return;let i=U(r)?r:void 0,n=H(t.physics),a=_(i?.snapshot,n?.snapshot,t.physicsSnapshot,function(e){let t=H(e);return!!t&&(U(t.world)||"simulationState"in t||"liveBodyOrder"in t)}(t.snapshot)?t.snapshot:void 0),o=_(i?.evidence,n?.evidence,t.physicsEvidence,t.settledEvidence),s=_(i?.config,n?.config,a?.config,t.config),l=_(H(a?.world),H(n?.world)),c=_(H(s?.kernel),H(l?.options)),d=Q(l?.bodies),u=Q(l?.colliders,s?.colliders),p=Q(a?.queue,n?.queue),f=Q(a?.liveBodyOrder),m=Q(l?.springs),h=Q(a?.activeSensorPairs),y=function(e){if(!e||0===e.length)return;let t=e.map((e,t)=>{let r=H(e);if(!r)return;let i=W(r.count??r.value??r.total??r.bodies??r.events);if(null==i)return;let n=(r.label??r.id??r.name??"container "+(t+1))+"",a=null==r.id?void 0:r.id+"",o=W(r.secondary??r.secondaryCount),s=W(r.observed??r.observedCount);return X({id:a,label:n,count:i,secondary:o,secondaryLabel:"string"==typeof r.secondaryLabel?r.secondaryLabel:void 0,observed:s})}).filter(e=>null!=e);if(0===t.length)return;let r=t.reduce((e,t)=>e+t.count,0),i=t.filter(e=>e.count>0).length,n=t.slice().sort((e,t)=>t.count-e.count)[0];return{rows:t,totalCount:r,populatedCount:i,...n?{leader:n}:{}}}(function(e,t,r,i){let n=H(e.settledProjection),a=H(t?.settledProjection);return Q(r?.projectionRows,r?.aggregates,e.settledProjectionRows,e.projectionRows,n?.rows,t?.settledProjectionRows,t?.projectionRows,a?.rows,i?.binCounts)}(t,n,i,o)),v=function(e,t){let r=e?.map((e,t)=>{let r=H(e);if(!r)return;let i=W(r.count)??0,n=W(r.total),a={label:(r.label??r.id??"sediment "+(t+1))+"",count:i};return null!=r.id&&(a.id=r.id+""),null!=n&&(a.total=n),a}).filter(e=>null!=e),i=Z(t?.bins)??r?.length??0,n=W(t?.count)??r?.reduce((e,t)=>e+t.count,0)??0,a=W(t?.total)??r?.reduce((e,t)=>e+(t.total??0),0),o=r?.slice().sort((e,t)=>t.count-e.count)[0];if(0!==i||0!==n||a)return{bins:i,count:n,...null!=a&&a>0?{total:a}:{},...o?{leader:o}:{}}}(Q(i?.sediment,n?.sediment,a?.sediment),_(i?.sedimentTotals,n?.sedimentTotals)),g=f?.length??d?.length??Z(o?.bodyCount),$=function(e){if(e)return e.filter(e=>!0===H(e)?.sleeping).length}(d)??Z(o?.sleepingCount),b=p?.length,w="string"==typeof a?.simulationState?a.simulationState:void 0,A="boolean"==typeof o?.settled?o.settled:w?"settled"===w:null!=g||null!=$||null!=b?null!=g&&$===g&&0===(b??0):void 0,x=H(c?.gravity),C=W(x?.x),j=W(x?.y),S=X({state:w,settled:A,elapsedSeconds:W(a?.elapsedSeconds),paused:"boolean"==typeof a?.paused?a.paused:void 0,visible:"boolean"==typeof a?.visible?a.visible:void 0,seed:W(c?.seed),gravity:null!=C&&null!=j?{x:C,y:j}:void 0,fixedDt:W(s?.fixedDt??c?.fixedDt),timeScale:W(s?.timeScale),maxSubsteps:Z(s?.maxSubsteps),liveBodies:g,sleepingBodies:$,queued:b,bodyLimit:W(s?.bodyLimit),eviction:"string"==typeof s?.eviction?s.eviction:void 0}),P=X({colliders:u?.length,sensors:ie(u,s,l),springs:m?.length,activeSensorPairs:h?.length}),I=Object.keys(P).length>0,O=Oe.has(e);if(!(Object.keys(S).length>0||I||y||v)||!O&&null==r)return;let E={simulation:S,...I?{geometry:P}:{},...y?{aggregates:y}:{},...v?{sediment:v}:{}},B=function(e){let t=[],r=e.simulation,i=[r.state??(r.settled?"settled":void 0),null!=r.liveBodies?`${r.liveBodies} live ${te(r.liveBodies,"body")}`:void 0,null!=r.sleepingBodies?r.sleepingBodies+" sleeping":void 0,null!=r.queued?r.queued+" queued":void 0,null!=r.seed?"seed "+re(r.seed):void 0,r.gravity?`gravity (${re(r.gravity.x)}, ${re(r.gravity.y)})`:void 0,null!=r.fixedDt?`fixed step ${re(r.fixedDt)}s`:void 0,null!=r.timeScale?re(r.timeScale)+"x time":void 0].filter(Boolean);i.length>0&&t.push(`Physics simulation: ${i.join("; ")}.`);let n=e.geometry;if(n){let e=[null!=n.colliders?`${n.colliders} ${te(n.colliders,"collider")}`:void 0,null!=n.sensors?`${n.sensors} ${te(n.sensors,"sensor")}`:void 0,null!=n.springs?`${n.springs} ${te(n.springs,"spring")}`:void 0,null!=n.activeSensorPairs?`${n.activeSensorPairs} active sensor ${te(n.activeSensorPairs,"pair")}`:void 0].filter(Boolean);e.length>0&&t.push(`Physics geometry: ${e.join("; ")}.`)}let a=e.aggregates;if(a){let e=a.leader,r=e?` Largest is ${e.label} with ${re(e.count)}.`:"";t.push(`Physics aggregates: ${re(a.totalCount)} settled ${te(a.totalCount,"body")} across ${a.rows.length} ${te(a.rows.length,"container")}; ${a.populatedCount} populated.${r}`)}let o=e.sediment;if(o){let e=null!=o.total?", value total "+re(o.total):"",r=o.leader?`; largest sediment bin is ${o.leader.label} with ${re(o.leader.count)}`:"";t.push(`Physics sediment: ${o.count} retained ${te(o.count,"body")} in ${o.bins} ${te(o.bins,"bin")}${e}${r}.`)}return t.join(" ")}(E);return{...E,text:B}}(e,t,r.physics),$=function(e,t,r){let i=[];if("GaugeChart"===e){"number"==typeof t.value&&Number.isFinite(t.value)&&i.push(`Current value is ${ee(t.value)}.`);let e="number"==typeof t.min&&Number.isFinite(t.min)?t.min:0,r="number"==typeof t.max&&Number.isFinite(t.max)?t.max:100;i.push(`The gauge scale runs from ${ee(e)} to ${ee(r)}.`)}if("SankeyDiagram"===e||"ProcessSankey"===e){let n=Array.isArray(t.edges)?t.edges:[];if("ProcessSankey"===e&&Array.isArray(t.domain)&&2===t.domain.length&&i.push(`The ProcessSankey time domain runs from ${ee(t.domain[0])} to ${ee(t.domain[1])}.`),n.length>0){i.push(`${n.length} source flow${1===n.length?"":"s"} are supplied.`);for(let a of n.slice(0,r)){let r=Y(a,t.sourceAccessor,"source"),n=Y(a,t.targetAccessor,"target"),o=Y(a,t.valueAccessor,"value");i.push("ProcessSankey"!==e||null==a.startTime&&null==a.endTime?`${ee(r)} to ${ee(n)} has value ${ee(o)}.`:`${ee(r)} to ${ee(n)} has value ${ee(o)} over ${ee(a.startTime)}–${ee(a.endTime)}.`)}}}if("Treemap"===e||"CirclePack"===e||"TreeDiagram"===e||"OrbitDiagram"===e){let e=H(t.data),n="string"==typeof t.childrenAccessor&&t.childrenAccessor?t.childrenAccessor:"children",a="string"==typeof t.valueAccessor&&t.valueAccessor?t.valueAccessor:"value",o="string"==typeof t.nodeIdAccessor&&t.nodeIdAccessor?t.nodeIdAccessor:"string"==typeof t.nodeIDAccessor&&t.nodeIDAccessor?t.nodeIDAccessor:"name",s=[],l=e=>{let t=Array.isArray(e[n])?e[n]:[];if(0!==t.length)for(let e of t){let t=H(e);t&&l(t)}else s.push(e)};if(e&&l(e),s.length>0){i.push(s.length+" hierarchy leaves are supplied.");for(let e of s.slice(0,r))i.push(`${ee(e[o])} has value ${ee(e[a])}.`)}}if(Oe.has(e)&&Array.isArray(t.data)){let r=t.data;i.push(`${r.length} observed source row${1===r.length?"":"s"} are supplied.`);let n="CollisionSwarmChart"===e?t.xAccessor:t.valueAccessor,a="CollisionSwarmChart"===e?"x":"value",o=r.map(e=>W(Y(e,n,a))).filter(e=>null!=e);o.length>0&&i.push(`Observed ${"string"==typeof n?n:a} ranges from ${ee(Math.min(...o))} to ${ee(Math.max(...o))}.`)}if(0!==i.length)return{source:"chart-props",statements:i,text:"Exact chart-prop facts: "+i.join(" ")}}(e,t,Math.max(1,r.maxLeaves??200)),b=[h.text,i?.sentence,g?.text,$?.text].filter(Boolean).join(" ");return{component:e,description:h,intent:i,structure:v,physics:g,facts:$,text:b}}import{buildNavigationTree as ae,describeChart as oe,getChartRecipe as se,getRecipeLayoutIdentity as le,recipeIntentId as ce,resolveChartRecipe as de,resolveCommunicativeAct as ue}from"./c-2WK7YJLL.min.js";var pe=["BarChart","StackedBarChart","GroupedBarChart","SwarmPlot","BoxPlot","Histogram","ViolinPlot","RidgelinePlot","DotPlot","PieChart","DonutChart","GaugeChart","FunnelChart","RadarChart","SwimlaneChart","LikertChart","LineChart","BumpChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","BubbleChart","Heatmap","QuadrantChart","MultiAxisLineChart","WaterfallChart","CandlestickChart","ConnectedScatterplot","ScatterplotMatrix","MinimapChart","ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram","TreeDiagram","Treemap","CirclePack","OrbitDiagram","ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram","RealtimeLineChart","RealtimeHistogram","TemporalHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","GauntletChart","CrucibleChart","ProcessFlowChart","PacketFlowChart","ChainReactionChart","BigNumber"],fe=new Set(pe),me=(e,t)=>(e>>>t|e<<32-t)>>>0,he=e=>Math.floor(4294967296*(e-Math.floor(e)))>>>0,[ye,ve]=(()=>{let e=[],t=[];for(let r=2;64>t.length;r+=1){let i=!0;for(let e=2;r>=e*e;e+=1)if(r%e===0){i=!1;break}i&&(8>e.length&&e.push(he(Math.sqrt(r))),t.push(he(Math.cbrt(r))))}return[e,t]})(),ge=E({"artifact.id":{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"never"},"artifact.createdAt":{suppliedBy:["author","system","import"],derivable:!1,modelMayPropose:!1,humanReview:"never"},"artifact.configFingerprint":{suppliedBy:["system"],derivable:!0,modelMayPropose:!1,humanReview:"never"},"artifact.dataFingerprint":{suppliedBy:["system"],derivable:!0,modelMayPropose:!1,humanReview:"never"},"purpose.intents":{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},"purpose.communicativeAct":{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},"purpose.stakes":{suppliedBy:["author","import"],derivable:!1,modelMayPropose:!0,humanReview:"required"},claims:{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},"claims.status":{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},evidence:{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},"evidence.source":{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},"evidence.fingerprint":{suppliedBy:["system"],derivable:!0,modelMayPropose:!1,humanReview:"never"},time:{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},"time.completeness":{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},reception:{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},form:{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},contestability:{suppliedBy:["author","system","import"],derivable:!1,modelMayPropose:!1,humanReview:"required"},accountability:{suppliedBy:["author","system","import"],derivable:!1,modelMayPropose:!1,humanReview:"policy-dependent"},inheritance:{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"}}),$e=["fresh","stale","unknown"],be=["partial","provisional","settled","unknown"],we=["observedAt","ingestedAt","processedAt","publishedAt","snapshotAt"],Ae={eventTime:{field:{},value:{},timezone:{},granularity:{}},presentation:{state:{values:["live","historical","mixed"]},label:{}},freshness:{status:{required:!0,values:$e},checkedAt:{},heartbeatAt:{},expiresAt:{},basis:{}},watermark:{value:{required:!0},policy:{},allowedLateness:{}},window:{start:{required:!0},end:{required:!0},status:{required:!0,values:["open","provisional","settled","reopened","corrected"]}},completeness:{status:{required:!0,values:be},basis:{}},revision:{status:{required:!0,values:["original","backfilled","corrected","superseded"]},previousArtifactId:{},correctionId:{},reason:{}},snapshot:{id:{},format:{values:["iceberg","delta","other"]},schemaVersion:{},catalogRef:{}}},xe={id:{required:!0},kind:{required:!0,values:["stream","processing-job","quality-check","snapshot","publication"]},label:{},observedAt:{},version:{},timezone:{},granularity:{},freshness:{values:$e},completeness:{values:be}},Ce=["data","nodes","edges","points","areas","lines","flows"],je="1",Se=new Set(["tooltip","onObservation","xFormat","yFormat","valueFormat","svgAnnotationRules","tooltipContent","onHover","tickFormatTime","tickFormatValue","edgeSort","sortGroups","centerContent","frameProps","controls","oFormat","rFormat","oSort","pieceStyle","summaryStyle","nodeStyle","edgeStyle","customHoverBehavior","customClickBehavior","customDoubleClickBehavior","onBrush","onTopologyChange","backgroundGraphics","foregroundGraphics","legend","recipe","layout"]),Pe=new Set(["data","nodes","edges","points","areas","lines","flows"]),Ie="function"==typeof structuredClone?structuredClone:e=>JSON.parse(JSON.stringify(e)),Oe=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","PhysicsCustomChart"]);export{V as toConfig,L as configToJSX,ne as buildReaderGrounding};
|