@mavea/mavea 1.0.16 → 1.0.17
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/dist/.vite/manifest.json +589 -567
- package/dist/assets/{AppCommandPalette-Dzl_DbDd.js → AppCommandPalette-B3E1gTd4.js} +1 -1
- package/dist/assets/{BlockEmpty-B5Q0hgDJ.js → BlockEmpty-DQkdduUE.js} +1 -1
- package/dist/assets/{BriefingPlayer-Dy7JCGm-.js → BriefingPlayer-CRKTlKa3.js} +1 -1
- package/dist/assets/{CanvasSkeleton-CJwPWnFG.js → CanvasSkeleton-cQ6KF-6z.js} +2 -2
- package/dist/assets/{CheckLogRail-DNtXlkcR.js → CheckLogRail-C6nouD1Y.js} +1 -1
- package/dist/assets/{CodeOutput-Bg64AyKu.js → CodeOutput-H8TQzjqL.js} +1 -1
- package/dist/assets/{CommandPalette-mO1FEvlx.js → CommandPalette-CSvgbXxg.js} +1 -1
- package/dist/assets/CourseLessonReader-1KDKwxIj.js +2 -0
- package/dist/assets/{CourseRail-CRcB319H.js → CourseRail-BijCpApU.js} +1 -1
- package/dist/assets/CoursesApp-BWkdYL07.js +2 -0
- package/dist/assets/{CrossExamPanel-Deywo95y.js → CrossExamPanel-Cn7b5y7B.js} +1 -1
- package/dist/assets/{DashPresent-BEm1tGse.js → DashPresent-B025i7iJ.js} +1 -1
- package/dist/assets/DashboardDetail-CZLnxgp0.js +2 -0
- package/dist/assets/DashboardLoopRuntime-7MpMUcMg.js +1 -0
- package/dist/assets/{DashboardOverview-DrdqBgds.js → DashboardOverview-COyleu7v.js} +1 -1
- package/dist/assets/{DashboardSettings-CBhzLW0P.js → DashboardSettings-DUfUqbsp.js} +1 -1
- package/dist/assets/DashboardsApp-6xMz2qCP.js +2 -0
- package/dist/assets/{DeepZoomApp-Chz6laKc.js → DeepZoomApp-CQaTT2Uh.js} +1 -1
- package/dist/assets/{DelegatePanel-DmtTY_lE.js → DelegatePanel-D4OrMa2D.js} +1 -1
- package/dist/assets/{DemoGallery-zw3d7ap9.js → DemoGallery-Bt92vKqc.js} +1 -1
- package/dist/assets/{DropSelect-Bo2Oyi-2.js → DropSelect-Q310fTbf.js} +1 -1
- package/dist/assets/{ExportModal-DICXavg9.js → ExportModal-D0zXlC8w.js} +2 -2
- package/dist/assets/ExtractionPreview-0SZYynDs.js +18 -0
- package/dist/assets/{FlagshipCTA-B-7nH43r.js → FlagshipCTA-D845jkdt.js} +1 -1
- package/dist/assets/{FlagshipCommandPalette-DgTL_Kjj.js → FlagshipCommandPalette-DHMnyG7j.js} +1 -1
- package/dist/assets/{FlagshipShowcase-CbAC2s4X.js → FlagshipShowcase-BuR3PZvU.js} +1 -1
- package/dist/assets/{FlashcardsApp-CatYcaJJ.js → FlashcardsApp-BzWb4cRP.js} +1 -1
- package/dist/assets/{ForecastPanel-BOG361kr.js → ForecastPanel-lTnux0EB.js} +1 -1
- package/dist/assets/GalleryApp-D0NGZ1_t.js +1 -0
- package/dist/assets/{HonestByDesign-hCxc0A7b.js → HonestByDesign-CCOt31nx.js} +1 -1
- package/dist/assets/{HowItWorks-BlbQcUxx.js → HowItWorks-auW5XXCZ.js} +1 -1
- package/dist/assets/{LegalApp-sCZjJYWx.js → LegalApp-DXDomKFv.js} +1 -1
- package/dist/assets/{LegalMarkdownDocument-Bk3U7ChN.js → LegalMarkdownDocument-DBjLz9Yf.js} +1 -1
- package/dist/assets/{LegalPageShell-BsgRV7aL.js → LegalPageShell-BG5UUk-9.js} +1 -1
- package/dist/assets/{LeverPanel-CP32QcIf.js → LeverPanel-CvYnTLjh.js} +1 -1
- package/dist/assets/{Library-CJTnp1pC.js → Library-Cl1gE9Qg.js} +1 -1
- package/dist/assets/{LibraryOverlay-geQRGAzG.js → LibraryOverlay-CX4cJLqD.js} +1 -1
- package/dist/assets/LiveApp-CDckMWYX.js +61 -0
- package/dist/assets/LiveSettings-DgfIXanM.js +6 -0
- package/dist/assets/{MindMapViewerDrawer-7HLErRQF.js → MindMapViewerDrawer-ClU9wgSH.js} +1 -1
- package/dist/assets/{MindShape-Bhu4yoIj.js → MindShape-yF19n9qq.js} +1 -1
- package/dist/assets/{PinToDashboard-Cj8S9XKC.js → PinToDashboard-CpIDAcIU.js} +1 -1
- package/dist/assets/PlanReview-CPcqOxjp.js +1 -0
- package/dist/assets/{Presence-DDxb6yE5.js → Presence-CHGZ1JRp.js} +1 -1
- package/dist/assets/{PresentationDeck-B6AHRYEA.js → PresentationDeck-CrtiWjiM.js} +1 -1
- package/dist/assets/PrismApp-D7RbekoX.js +2 -0
- package/dist/assets/{PrismAskController-DUvOTeW9.js → PrismAskController-D6_7Epdb.js} +1 -1
- package/dist/assets/PrismBriefingPlayer-Dq5_KRU3.js +2 -0
- package/dist/assets/PrismOverlay-CduGpA8D.js +131 -0
- package/dist/assets/{PrivacyApp-CatB3OpJ.js → PrivacyApp-rhzy-5HG.js} +1 -1
- package/dist/assets/{Recap-DkKrrqi5.js → Recap-BPg2xEPo.js} +1 -1
- package/dist/assets/{ReelJelly-DCD4bG10.js → ReelJelly-LWeMsFpj.js} +1 -1
- package/dist/assets/ReplayCard-C3dGQfxG.js +2 -0
- package/dist/assets/{ReplayOverlay-DbJX08Kr.js → ReplayOverlay-C9W603B5.js} +1 -1
- package/dist/assets/{RewindOverlay-Bop4a63b.js → RewindOverlay-BIWmxQlx.js} +1 -1
- package/dist/assets/RippleApp-C9-KFvkn.js +2 -0
- package/dist/assets/{RippleAskController-CK4iSwT0.js → RippleAskController-DEKz-6Vn.js} +1 -1
- package/dist/assets/RippleOverlay-CfXvnUHE.js +6 -0
- package/dist/assets/{SeeDontRead-CGGKmvBV.js → SeeDontRead-DrG1qBxJ.js} +1 -1
- package/dist/assets/{ShareModal-D4En6Y3L.js → ShareModal-eJ6sdMpf.js} +1 -1
- package/dist/assets/{ShipCascade-k_GWrcau.js → ShipCascade-BP8qL0yM.js} +1 -1
- package/dist/assets/{ShipCourse-BQOY4MyI.js → ShipCourse-BoqW58VU.js} +1 -1
- package/dist/assets/{ShipHotspots-vLRK0w_b.js → ShipHotspots-_9XPhZg2.js} +1 -1
- package/dist/assets/{ShipIncident-BWxerYtX.js → ShipIncident-Xod2gbjc.js} +1 -1
- package/dist/assets/{ShipMigration-OgAGEbjm.js → ShipMigration-BdkaiJ9D.js} +1 -1
- package/dist/assets/{ShipOnboarding-B_2IEq3N.js → ShipOnboarding-CblWatXR.js} +1 -1
- package/dist/assets/{ShipRead--gGqg2SE.js → ShipRead-BBn7xkOF.js} +1 -1
- package/dist/assets/{ShipRollout-B_U2P8Yw.js → ShipRollout-i5BY3YnP.js} +1 -1
- package/dist/assets/{ShipSuggestions-D9coTmgw.js → ShipSuggestions-liytLgC-.js} +1 -1
- package/dist/assets/{ShipWorkspace-BmdcHZXa.js → ShipWorkspace-C3VQwGn1.js} +1 -1
- package/dist/assets/{SignatureLoop-KA6Cf93g.js → SignatureLoop-Ba7plTb5.js} +1 -1
- package/dist/assets/{SynthesisApp-BCBhCJhx.js → SynthesisApp-Ch0tWRBS.js} +2 -2
- package/dist/assets/{SynthesisOverlay-BuGIeaKq.js → SynthesisOverlay-DMZndCzV.js} +1 -1
- package/dist/assets/{TermsApp-CleIlDtR.js → TermsApp-Dk2jpxq-.js} +1 -1
- package/dist/assets/{TopicCanvas-BRu3xVL8.js → TopicCanvas-DX0Z1ZHv.js} +2 -2
- package/dist/assets/{TourPrism-zbVLe2ag.js → TourPrism-6fWPMU4Z.js} +1 -1
- package/dist/assets/{TrackerTile-D9Wa3CSq.js → TrackerTile-BboQpBGy.js} +2 -2
- package/dist/assets/{TwoSurfaces-TyWXgAdq.js → TwoSurfaces-Cabk1rES.js} +1 -1
- package/dist/assets/{UnderstoodPanel-BS9OhgLJ.js → UnderstoodPanel-B6jfiKx1.js} +1 -1
- package/dist/assets/{WhyMachineOverlay-B-KJhCjr.js → WhyMachineOverlay-BRNibJSf.js} +1 -1
- package/dist/assets/{WowFeatures-Bv1-PmXF.js → WowFeatures-C7f4qzIf.js} +1 -1
- package/dist/assets/{ZoomDeck-C2Q6xbgX.js → ZoomDeck-BtlVyhwv.js} +1 -1
- package/dist/assets/{alternateFinishes-BG6svkXG.js → alternateFinishes-CVUX4x0C.js} +1 -1
- package/dist/assets/{annotationAuto-BpBsjbDQ.js → annotationAuto-BjWqgseH.js} +1 -1
- package/dist/assets/{annotationReel-yzysA-Gr.js → annotationReel-B5A2RZkx.js} +1 -1
- package/dist/assets/{backup-BdeBr3wq.js → backup-d46KwktS.js} +1 -1
- package/dist/assets/cachedImport-DW0gP14h.js +1 -0
- package/dist/assets/canvas-BuMP6u6i.js +1 -0
- package/dist/assets/{catalog-DF7YTNju.js → catalog-Bv0dWU_C.js} +1 -1
- package/dist/assets/confirmAdd-CWWtX1VN.js +1 -0
- package/dist/assets/{dashboardEvents-C_XvGVLJ.js → dashboardEvents-Be4sftHN.js} +1 -1
- package/dist/assets/{dist-CBEt6Q8V.js → dist-DIKAXwpM.js} +1 -1
- package/dist/assets/{fit-B1LJWvMO.js → fit-CuHWhwsj.js} +1 -1
- package/dist/assets/{generateLive-ChhSWKbq.js → generateLive-CMbGT3eM.js} +1 -1
- package/dist/assets/index-Dbr1j8Fe.js +22 -0
- package/dist/assets/{jspdf.es.min-DutJi91O.js → jspdf.es.min-ydC1TxUW.js} +1 -1
- package/dist/assets/{kokoro-kGWf7M0e.js → kokoro-DsmNzulR.js} +1 -1
- package/dist/assets/{lib-C7zXL8h0.js → lib-B6qSkBPa.js} +1 -1
- package/dist/assets/{liveSchema-DCL21WdS.js → liveSchema-B1MGdSkK.js} +1 -1
- package/dist/assets/{motion-dfA87zbb.js → motion-luJxBPnj.js} +1 -1
- package/dist/assets/notes-3WQ6b0Mi.js +1 -0
- package/dist/assets/{pdf-DFYCstCC.js → pdf-RyoPCIGN.js} +1 -1
- package/dist/assets/{perfProbe-CCSPF3EA.js → perfProbe-Xs39DqMh.js} +1 -1
- package/dist/assets/{pin-D5_Ebl_s.js → pin-Cj-LMfpK.js} +1 -1
- package/dist/assets/{portal-BndazODr.js → portal-zyqZwnb1.js} +1 -1
- package/dist/assets/{pptxgen.es-CwCkoJdp.js → pptxgen.es-CveAizg8.js} +1 -1
- package/dist/assets/{prewarm--KODwuMi.js → prewarm-K5WcvrNh.js} +1 -1
- package/dist/assets/{quietHours-DVPplPtM.js → quietHours-BklvMqsV.js} +1 -1
- package/dist/assets/{registry-DQIm_hbI.js → registry-1h9idbfk.js} +1 -1
- package/dist/assets/{registry-Dphh5ADP.js → registry-2zthbrHC.js} +1 -1
- package/dist/assets/{registry-D7rspCZr.js → registry-4O5l9cd5.js} +1 -1
- package/dist/assets/{registry-WJE8Z0T1.js → registry-BRB85vr4.js} +1 -1
- package/dist/assets/registry-BdMZ_4cm.js +2 -0
- package/dist/assets/{registry-Ba9xMFO4.js → registry-Bnp_yh8G.js} +2 -2
- package/dist/assets/{registry-BlB0FYf0.js → registry-C1IrZBk8.js} +1 -1
- package/dist/assets/{registry-B3V5-8v0.js → registry-C5DK98Hl.js} +1 -1
- package/dist/assets/{registry-0E1uKPCI.js → registry-CK0-re_Q.js} +1 -1
- package/dist/assets/{registry-DrNMbrA_.js → registry-COrl_Heq.js} +1 -1
- package/dist/assets/{registry-wJhGGVuP.js → registry-CQUQlrSx.js} +1 -1
- package/dist/assets/{registry-COxprhRN.js → registry-CXa3qXl3.js} +1 -1
- package/dist/assets/{registry-CWkBxxsI.js → registry-C_baBbqq.js} +1 -1
- package/dist/assets/{registry-CIa1EU-G.js → registry-CjY5POtx.js} +1 -1
- package/dist/assets/{registry-C30HGS2G.js → registry-CoBAqOlY.js} +1 -1
- package/dist/assets/{registry-Dvv84L9K.js → registry-DJj-o3MQ.js} +1 -1
- package/dist/assets/{registry-DNzF-nvu.js → registry-DfCCnIfu.js} +1 -1
- package/dist/assets/{registry-D-qEhm1d.js → registry-DfgFkD3J.js} +1 -1
- package/dist/assets/{registry-M3VgAiQv.js → registry-Dhlx1mF4.js} +1 -1
- package/dist/assets/{registry-nG70-amx.js → registry-DnEh7nbX.js} +1 -1
- package/dist/assets/{registry-hsSlT6pi.js → registry-VD94nLXO.js} +1 -1
- package/dist/assets/{registry-BH6FfyZk.js → registry-mFD4P5dI.js} +1 -1
- package/dist/assets/registry-sDzDmht4.js +1 -0
- package/dist/assets/{relate-DxAi8xpo.js → relate-CEND9Qlk.js} +1 -1
- package/dist/assets/{shikiHighlight-B_TEagaE.js → shikiHighlight-SCFIB43b.js} +1 -1
- package/dist/assets/useDashboardLoop-C8Mcbcto.js +5 -0
- package/dist/assets/{useLiveConfig-Lm0cYTcu.js → useLiveConfig-BW1WkpTc.js} +1 -1
- package/dist/assets/{useSpatialCanvas-D_C8VoCy.js → useSpatialCanvas-C5TNlpeK.js} +1 -1
- package/dist/assets/{useSpotlightWalk-CCQT0-_g.js → useSpotlightWalk-dA3IdI-1.js} +1 -1
- package/dist/assets/{useSrsCards-BKCPBPYw.js → useSrsCards-C7Xni9C0.js} +1 -1
- package/dist/assets/{useStudy-Diy4ITBm.js → useStudy-DHRIx8p-.js} +1 -1
- package/dist/assets/{useZoomGesture-B82XnSfi.js → useZoomGesture-BsPXvLw2.js} +1 -1
- package/dist/index.html +2 -1
- package/package.json +1 -1
- package/dist/assets/CourseLessonReader-CKfvBMtL.js +0 -2
- package/dist/assets/CoursesApp-BbCGxAav.js +0 -2
- package/dist/assets/DashboardDetail-tK6FpgtH.js +0 -2
- package/dist/assets/DashboardLoopRuntime-Cis4WMqk.js +0 -1
- package/dist/assets/DashboardsApp-Dc43FBIi.js +0 -2
- package/dist/assets/ExtractionPreview-C636AVw-.js +0 -18
- package/dist/assets/GalleryApp-uW6b1Y0d.js +0 -1
- package/dist/assets/LiveApp-C0BN0o3_.js +0 -61
- package/dist/assets/LiveSettings-CzSXXMoo.js +0 -6
- package/dist/assets/PlanReview-3NxZD9wt.js +0 -1
- package/dist/assets/PrismApp-BlPpWxao.js +0 -2
- package/dist/assets/PrismBriefingPlayer-Bmo9tOGX.js +0 -2
- package/dist/assets/PrismOverlay-9Q_14eEO.js +0 -131
- package/dist/assets/ReplayCard-Bz69tOST.js +0 -2
- package/dist/assets/RippleApp-u3hCfb5b.js +0 -2
- package/dist/assets/RippleOverlay-BM_B9JEc.js +0 -6
- package/dist/assets/canvas-Ep2Kfupo.js +0 -1
- package/dist/assets/index-C7H7A1rW.js +0 -22
- package/dist/assets/notes-DblI4Ko_.js +0 -1
- package/dist/assets/registry-B51MhOLx.js +0 -2
- package/dist/assets/registry-Pr5IKqro.js +0 -1
- package/dist/assets/useDashboardLoop-DzbRz-V9.js +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/leaflet-src-C_xhOQY7.js","assets/chunk-BVpWp9h4.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e,r as t}from"./chunk-BVpWp9h4.js";import{t as n}from"./react-BQSORdFI.js";import{t as r}from"./jsx-runtime-DaSxXjOY.js";import{J as i,ht as a,q as o}from"./index-C7H7A1rW.js";import{n as s}from"./icons-CHVz6kv_.js";import{t as c}from"./richText-BkxJhl9N.js";import{n as l,r as u}from"./format-DlZTyeMy.js";import{r as d,t as f}from"./safeImageUrl-CUkucDUu.js";import{t as p}from"./useValidatedImage-D2fhA198.js";import{r as m,t as h}from"./scale-Bcgfo6Hp.js";import{t as g}from"./BlockEmpty-B5Q0hgDJ.js";import"./lib-C7zXL8h0.js";import{t as _}from"./registry-types-DMuK0vJ6.js";import{n as v,t as y}from"./fitText-CDFmCQzl.js";import{t as b}from"./useTimeout-BRYvu2jQ.js";import{t as x}from"./safeCssColor-di93BXgG.js";var S=n(),C=r(),w={chess:8,checkers:8,go:19,hex:8,grid:8},T=100,E=6;function D({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,board:r=`chess`,size:i,pieces:a,highlights:o,moves:l,caption:u,footer:d,delay:f}){let p=s[t]||s.layers,m=(0,S.useId)().replace(/:/g,``),h=w[r]?r:`chess`,g=Math.max(2,Math.min(25,Math.round(i??w[h]))),_=h===`go`,v=T-E*2,y=v/(_?g-1||1:g),b=e=>E+(_?e*y:(e+.5)*y),x=e=>E+(_?e*y:(e+.5)*y),D=y*(_?.4:.38),O=Math.max(.18,y*.03);return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`gb-wrap`,children:(0,C.jsxs)(`svg`,{viewBox:`0 0 ${T} ${T}`,className:`gb-svg`,role:`img`,"aria-label":e,children:[(0,C.jsx)(`rect`,{x:E,y:E,width:v,height:v,className:`gb-frame`}),(h===`chess`||h===`checkers`)&&Array.from({length:g*g},(e,t)=>{let n=Math.floor(t/g),r=t%g;return(n+r)%2==0?null:(0,C.jsx)(`rect`,{x:E+r*y,y:E+n*y,width:y,height:y,className:`gb-dark`},`sq-${t}`)}),(h===`go`||h===`grid`||h===`hex`)&&Array.from({length:_?g:g+1},(e,t)=>{let n=E+t*y;return(0,C.jsxs)(`g`,{children:[(0,C.jsx)(`line`,{x1:n,y1:E,x2:n,y2:94,className:`gb-grid`}),(0,C.jsx)(`line`,{x1:E,y1:n,x2:94,y2:n,className:`gb-grid`})]},`ln-${t}`)}),h===`hex`&&Array.from({length:g*g},(e,t)=>{let n=Math.floor(t/g),r=t%g,i=n%2*y*.5,a=E+(r+.5)*y+i;return a>94?null:(0,C.jsx)(`circle`,{cx:a,cy:E+(n+.5)*y,r:y*.06,className:`gb-hexdot`},`hx-${t}`)}),h===`go`&&g===19&&[3,9,15].flatMap(e=>[3,9,15].map(t=>(0,C.jsx)(`circle`,{cx:b(t),cy:x(e),r:y*.09,className:`gb-star`},`star-${e}-${t}`))),o?.map((e,t)=>_?(0,C.jsx)(`circle`,{cx:b(e.col),cy:x(e.row),r:D*1.25,className:`gb-hl-dot`},`hl-${t}`):(0,C.jsx)(`rect`,{x:E+e.col*y,y:E+e.row*y,width:y,height:y,className:`gb-hl`},`hl-${t}`)),a.map((e,t)=>{let n=b(e.col),r=x(e.row),i=e.glyph||e.label||``;return(0,C.jsxs)(`g`,{className:`gb-piece side-${e.side===`b`?`b`:`a`}`,children:[(0,C.jsx)(`circle`,{cx:n,cy:r,r:D,className:`gb-disc`,strokeWidth:O}),i&&(0,C.jsx)(`text`,{x:n,y:r,textAnchor:`middle`,dominantBaseline:`central`,className:`gb-glyph`,style:{fontSize:D*1.15},children:i})]},`pc-${t}`)}),(0,C.jsx)(`defs`,{children:(0,C.jsx)(`marker`,{id:`gb-arr-${m}`,markerWidth:`5`,markerHeight:`5`,refX:`3.5`,refY:`2.5`,orient:`auto`,children:(0,C.jsx)(`path`,{d:`M0,0 L0,5 L5,2.5 Z`,className:`gb-arrhead`})})}),l?.map((e,t)=>(0,C.jsx)(`line`,{x1:b(e.from[1]),y1:x(e.from[0]),x2:b(e.to[1]),y2:x(e.to[0]),className:`gb-move`,strokeWidth:Math.max(.6,y*.08),markerEnd:`url(#gb-arr-${m})`},`mv-${t}`))]})}),u&&(0,C.jsx)(`div`,{className:`gb-caption`,children:u}),d&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(d)})]})}var O=.6;function k(e,t,n){let r=Math.max(3,Math.floor(t/(n*O)));return e.length>r?e.slice(0,r-1).trimEnd()+`…`:e}var A=[`color-mix(in oklab, var(--presence) 13%, transparent)`,`color-mix(in oklab, var(--insight) 13%, transparent)`,`color-mix(in oklab, var(--warning) 15%, transparent)`,`color-mix(in oklab, var(--presence) 7%, transparent)`,`color-mix(in oklab, var(--insight) 7%, transparent)`],j=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--insight-soft)`];function M({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,fabric:r,pieces:i,unit:a=`cm`,caption:o,footer:l,delay:d}){let f=s[t]||s.edit,p=(0,S.useId)().replace(/:/g,``),m=Math.max(1,r.w),h=Math.max(1,r.h),g=Math.max(m,h)*.04,_=m+g*2,v=h+g*2,y=i.reduce((e,t)=>e+Math.max(0,Math.min(t.w,m-t.x))*Math.max(0,Math.min(t.h,h-t.y))*Math.max(1,t.qty??1),0),b=Math.min(100,Math.round(y/(m*h)*100));return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`pat-figwrap`,children:(0,C.jsxs)(`svg`,{viewBox:`0 0 ${_} ${v}`,className:`pat-svg`,role:`img`,"aria-label":e,children:[(0,C.jsx)(`defs`,{children:(0,C.jsx)(`marker`,{id:`pat-grain-${p}`,markerWidth:`6`,markerHeight:`6`,refX:`3`,refY:`3`,orient:`auto`,children:(0,C.jsx)(`path`,{d:`M0,3 L5,0.5 L4,3 L5,5.5 Z`,className:`pat-grain-head`})})}),(0,C.jsx)(`rect`,{x:g,y:g,width:m,height:h,className:`pat-fabric`}),(0,C.jsx)(`line`,{x1:g,y1:g,x2:g,y2:g+h,className:`pat-foldedge`,strokeWidth:Math.max(.4,m*.006)}),(0,C.jsx)(`text`,{className:`pat-foldlabel`,transform:`translate(${g+m*.022},${g+h/2}) rotate(-90)`,children:(0,C.jsx)(`tspan`,{x:0,y:0,children:`FOLD`})}),r.label&&(0,C.jsx)(`text`,{x:g+m-1,y:g-g*.35,textAnchor:`end`,className:`pat-fabriclabel`,children:r.label}),i.map((e,t)=>{let n=j[t%j.length],r=A[t%A.length],i=g+e.x,a=g+e.y,o=i+e.w/2,s=a+e.h/2,c=e.h*.14,l=Math.min(e.w,e.h)<Math.max(m,h)*.1,u=Math.max(1,e.qty??1);return(0,C.jsxs)(`g`,{children:[(0,C.jsx)(`rect`,{x:i,y:a,width:e.w,height:e.h,rx:Math.min(1.5,m*.005),fill:r,stroke:n,strokeWidth:m*.004,strokeDasharray:e.fold?void 0:`${m*.012} ${m*.008}`}),e.fold&&(0,C.jsx)(`line`,{x1:i,y1:a,x2:i,y2:a+e.h,className:`pat-onfold`,strokeWidth:m*.006}),(0,C.jsx)(`line`,{x1:o,y1:a+c,x2:o,y2:a+e.h-c,className:`pat-grain`,strokeWidth:Math.max(.3,m*.0035),markerStart:`url(#pat-grain-${p})`,markerEnd:`url(#pat-grain-${p})`}),!l&&(()=>{let t=Math.max(m*.026,2.4),n=k(e.label,e.w-t,t),r=n!==e.label;return(0,C.jsxs)(`text`,{x:o,y:s,textAnchor:`middle`,dominantBaseline:`middle`,className:`pat-piece-lbl`,style:{fontSize:t},children:[r&&(0,C.jsx)(`title`,{children:e.label}),(0,C.jsx)(`tspan`,{x:o,dy:`-0.5em`,children:n}),(u>1||e.fold)&&(0,C.jsx)(`tspan`,{x:o,dy:`1.4em`,className:`pat-piece-sub`,children:e.fold?`cut 1 on fold`:`cut ${u}`})]})})()]},t)})]})}),(0,C.jsxs)(`div`,{className:`pat-stats`,children:[(0,C.jsxs)(`div`,{className:`pat-stat`,children:[(0,C.jsx)(`span`,{className:`pat-stat-k`,children:`Fabric`}),(0,C.jsxs)(`span`,{className:`pat-stat-v`,children:[u(m),` × `,u(h),` `,a]})]}),(0,C.jsxs)(`div`,{className:`pat-stat`,children:[(0,C.jsx)(`span`,{className:`pat-stat-k`,children:`Yield`}),(0,C.jsxs)(`span`,{className:`pat-stat-v pat-yield`,"data-low":b<55?``:void 0,children:[b,`%`]})]})]}),o&&(0,C.jsx)(`div`,{className:`pat-caption`,children:o}),l&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(l)})]})}function N({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,src:r,candidates:i,alt:a,caption:o,footer:c,delay:l,blockId:u,onUnrenderable:d}){let f=s[t]||s.image,m=p([r,...i??[]]),h=m.state===`checking`?`loading`:m.state===`ready`?`ready`:`error`,g=a||o||e||`Photograph`,_=c||o,v=h===`error`,y=!!(e||_||a);if((0,S.useEffect)(()=>{v&&!y&&u&&d?.(u)},[v,y,u,d]),v&&!y)return null;let b={"--delay":(l||0)+`ms`};return v?(0,C.jsxs)(`div`,{className:`card reveal me-photo-card`,style:b,children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`insight-summary`,children:_||g})]}):(0,C.jsxs)(`div`,{className:`card reveal`,style:b,children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`me-photo`+(h===`ready`?` ready`:``),children:[m.src?(0,C.jsx)(`img`,{className:`me-photo-img`,src:m.src,alt:g,loading:`lazy`,decoding:`async`,referrerPolicy:`no-referrer`}):null,h===`loading`&&(0,C.jsx)(`div`,{className:`me-photo-shimmer`,"aria-hidden":`true`})]}),_&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:_})]})}var P=a();function ee({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,shapes:r,labels:i,ratio:a=1.6,footer:o,delay:l}){let u=s[t]||s.image,d=`med-diag-arrow-${(0,S.useId)().replace(/:/g,``)}`,f=Math.round(100/Math.max(.4,a)*10)/10,p=e=>e>20?2.1:e>10?2:1.9,m=i.reduce((e,t)=>{let n=t.side??`right`,r=t.text.length*p(t.text.length);return n===`top`?(e.top=Math.max(e.top,7-t.y+2.5),e.x0=Math.min(e.x0,t.x-r/2),e.x1=Math.max(e.x1,t.x+r/2)):n===`bottom`?(e.bottom=Math.max(e.bottom,t.y+7+2.5-f),e.x0=Math.min(e.x0,t.x-r/2),e.x1=Math.max(e.x1,t.x+r/2)):n===`left`?e.x0=Math.min(e.x0,t.x-7-r-1):e.x1=Math.max(e.x1,t.x+7+r+1),e},{x0:0,x1:100,top:0,bottom:0}),h=Math.min(0,Math.round(m.x0*10)/10),g=Math.round(-Math.max(0,m.top)*10)/10,_=Math.round((Math.max(100,m.x1)-h)*10)/10,v=Math.round((f+Math.max(0,m.bottom)-g)*10)/10;return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`med-diag`,children:(0,C.jsxs)(`svg`,{viewBox:`${h} ${g} ${_} ${v}`,className:`med-diag-svg`,role:`img`,children:[(0,C.jsx)(`defs`,{children:(0,C.jsx)(`marker`,{id:d,viewBox:`0 0 10 10`,refX:`8`,refY:`5`,markerWidth:`6`,markerHeight:`6`,orient:`auto-start-reverse`,children:(0,C.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`context-stroke`})})}),r.map((e,t)=>(0,C.jsx)(F,{s:e,arrowId:d},t)),i.map((e,t)=>{let n=e.side??`right`,r=n===`left`?e.x-7:n===`right`?e.x+7:e.x,i=n===`top`?e.y-7:n===`bottom`?e.y+7:e.y,a=n===`left`?`end`:n===`right`?`start`:`middle`,o=e.color||`var(--text-secondary)`;return(0,C.jsxs)(`g`,{children:[(0,C.jsx)(`line`,{x1:e.x,y1:e.y,x2:r,y2:i,className:`med-diag-lead`}),(0,C.jsx)(`circle`,{cx:e.x,cy:e.y,r:1.1,fill:o,...t===0?{"data-mark":`point`}:{}}),(0,C.jsx)(`text`,{x:r+(n===`right`?1:n===`left`?-1:0),y:i+1.1,textAnchor:a,className:`med-diag-lbl`,fill:o,children:e.text})]},`l${t}`)})]})}),o&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(o)})]})}function F(e){let t=(0,P.c)(28),{s:n,arrowId:r}=e,i=n.color||`var(--text-muted)`,a=n.fill||`none`;switch(n.kind){case`circle`:{let e;return t[0]!==a||t[1]!==n.cx||t[2]!==n.cy||t[3]!==n.r||t[4]!==i?(e=(0,C.jsx)(`circle`,{cx:n.cx,cy:n.cy,r:n.r,stroke:i,strokeWidth:.7,fill:a}),t[0]=a,t[1]=n.cx,t[2]=n.cy,t[3]=n.r,t[4]=i,t[5]=e):e=t[5],e}case`rect`:{let e;return t[6]!==a||t[7]!==n.h||t[8]!==n.w||t[9]!==n.x||t[10]!==n.y||t[11]!==i?(e=(0,C.jsx)(`rect`,{x:n.x,y:n.y,width:n.w,height:n.h,rx:1.5,stroke:i,strokeWidth:.7,fill:a}),t[6]=a,t[7]=n.h,t[8]=n.w,t[9]=n.x,t[10]=n.y,t[11]=i,t[12]=e):e=t[12],e}case`line`:{let e=n.arrow?`url(#${r})`:void 0,a;return t[13]!==n.x1||t[14]!==n.x2||t[15]!==n.y1||t[16]!==n.y2||t[17]!==i||t[18]!==e?(a=(0,C.jsx)(`line`,{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,stroke:i,strokeWidth:.7,strokeLinecap:`round`,markerEnd:e}),t[13]=n.x1,t[14]=n.x2,t[15]=n.y1,t[16]=n.y2,t[17]=i,t[18]=e,t[19]=a):a=t[19],a}case`polygon`:{let e;return t[20]!==a||t[21]!==n.points||t[22]!==i?(e=(0,C.jsx)(`polygon`,{points:n.points,stroke:i,strokeWidth:.7,fill:a}),t[20]=a,t[21]=n.points,t[22]=i,t[23]=e):e=t[23],e}case`path`:{let e;return t[24]!==a||t[25]!==n.d||t[26]!==i?(e=(0,C.jsx)(`path`,{d:n.d,stroke:i,strokeWidth:.7,fill:a}),t[24]=a,t[25]=n.d,t[26]=i,t[27]=e):e=t[27],e}default:return null}}var I={header:{col:12,rows:1},hero:{col:12,rows:3},nav:{col:12,rows:1},image:{col:6,rows:2},text:{col:6,rows:2},button:{col:3,rows:1},card:{col:4,rows:2},list:{col:6,rows:2},footer:{col:12,rows:1},input:{col:6,rows:1}};function L(e,t){return Math.min(t,Math.max(1,Math.round(e)))||1}function te(e){switch(e){case`header`:case`nav`:return(0,C.jsxs)(`div`,{className:`wf-bar`,children:[(0,C.jsx)(`span`,{className:`wf-dot`}),(0,C.jsx)(`span`,{className:`wf-spacer`}),(0,C.jsx)(`span`,{className:`wf-link`}),(0,C.jsx)(`span`,{className:`wf-link`}),(0,C.jsx)(`span`,{className:`wf-link`})]});case`hero`:return(0,C.jsxs)(`div`,{className:`wf-hero`,children:[(0,C.jsx)(`span`,{className:`wf-line wf-w70 wf-tall`}),(0,C.jsx)(`span`,{className:`wf-line wf-w50`}),(0,C.jsx)(`span`,{className:`wf-pill`})]});case`image`:return(0,C.jsxs)(`div`,{className:`wf-image`,"aria-hidden":!0,children:[(0,C.jsxs)(`svg`,{viewBox:`0 0 100 100`,preserveAspectRatio:`none`,className:`wf-image-x`,children:[(0,C.jsx)(`line`,{x1:`0`,y1:`0`,x2:`100`,y2:`100`}),(0,C.jsx)(`line`,{x1:`100`,y1:`0`,x2:`0`,y2:`100`})]}),(0,C.jsx)(s.image,{className:`wf-image-ic`})]});case`text`:return(0,C.jsxs)(`div`,{className:`wf-text`,children:[(0,C.jsx)(`span`,{className:`wf-line wf-w90`}),(0,C.jsx)(`span`,{className:`wf-line wf-w100`}),(0,C.jsx)(`span`,{className:`wf-line wf-w80`}),(0,C.jsx)(`span`,{className:`wf-line wf-w60`})]});case`button`:return(0,C.jsx)(`span`,{className:`wf-pill wf-pill-solid`});case`card`:return(0,C.jsxs)(`div`,{className:`wf-card`,children:[(0,C.jsx)(`span`,{className:`wf-thumb`}),(0,C.jsx)(`span`,{className:`wf-line wf-w70 wf-strong`}),(0,C.jsx)(`span`,{className:`wf-line wf-w90`}),(0,C.jsx)(`span`,{className:`wf-line wf-w50`})]});case`list`:return(0,C.jsx)(`div`,{className:`wf-list`,children:[0,1,2].map(e=>(0,C.jsxs)(`span`,{className:`wf-row`,children:[(0,C.jsx)(`span`,{className:`wf-row-dot`}),(0,C.jsx)(`span`,{className:`wf-line wf-w80`})]},e))});case`footer`:return(0,C.jsx)(`div`,{className:`wf-foot`,children:[0,1,2].map(e=>(0,C.jsxs)(`span`,{className:`wf-foot-col`,children:[(0,C.jsx)(`span`,{className:`wf-line wf-w60 wf-strong`}),(0,C.jsx)(`span`,{className:`wf-line wf-w90`}),(0,C.jsx)(`span`,{className:`wf-line wf-w70`})]},e))});case`input`:return(0,C.jsxs)(`div`,{className:`wf-input`,children:[(0,C.jsx)(`span`,{className:`wf-line wf-w40`}),(0,C.jsx)(`span`,{className:`wf-input-cta`})]})}}function ne({title:e,icon:t,iconColor:n=`var(--presence-soft)`,regions:r,cols:i=12,caption:a,footer:o,delay:l}){let u=L(i,12),d=t&&s[t]||s.screen,f=Array.isArray(r)?r:[];return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`wireframe`,style:{"--wf-cols":u},role:`img`,"aria-label":e?e+` wireframe`:`page wireframe`,children:f.map((e,t)=>{let n=I[e.kind]??I.card,r=L(e.col??n.col,u),i=Math.min(6,Math.max(1,Math.round(e.rows??n.rows)))||1;return(0,C.jsxs)(`div`,{className:`wf-region wf-`+e.kind,style:{gridColumn:`span `+r,"--wf-rows":i},children:[(0,C.jsx)(`div`,{className:`wf-fill`,children:te(e.kind)}),e.label&&(0,C.jsx)(`span`,{className:`wf-label`,children:e.label})]},t)})}),a&&(0,C.jsx)(`div`,{className:`wf-caption`,dangerouslySetInnerHTML:c(a)}),o&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(o)})]})}var re=e=>Math.max(3,Math.min(97,e)),ie={heart:{outline:(0,C.jsx)(`path`,{d:`M50 88 C26 70 12 54 12 37 C12 24 22 15 33 15 C42 15 48 21 50 27 C52 21 58 15 67 15 C78 15 88 24 88 37 C88 54 74 70 50 88 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-vessel`,d:`M42 18 C40 9 36 6 31 6`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M52 18 C53 8 58 5 63 6`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M59 20 C64 12 70 11 73 14`}),(0,C.jsx)(`path`,{className:`an-septum`,d:`M50 27 L50 84`}),(0,C.jsx)(`path`,{className:`an-septum`,d:`M50 50 C62 48 70 54 72 62`}),(0,C.jsx)(`path`,{className:`an-septum`,d:`M50 50 C38 48 30 54 28 62`})]})},kidney:{outline:(0,C.jsx)(`path`,{d:`M62 14 C78 14 86 30 86 50 C86 72 76 88 60 88 C50 88 46 80 44 70 C42 62 38 60 34 60 C24 60 18 70 18 50 C18 28 30 14 50 14 C55 14 58 14 62 14 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-cavity`,d:`M40 50 C46 46 52 46 56 50 C60 54 60 60 56 64 C52 68 46 68 40 64`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M40 50 C32 50 26 54 22 58`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M48 66 C48 76 50 84 52 90`})]})},nephron:{outline:(0,C.jsx)(`path`,{d:`M22 18 C12 18 8 28 16 34 C8 40 12 50 22 48`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`circle`,{className:`an-cavity`,cx:`20`,cy:`32`,r:`9`}),(0,C.jsx)(`circle`,{className:`an-node`,cx:`20`,cy:`32`,r:`5`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M28 30 C40 26 44 36 38 42 C32 48 44 52 50 46 C58 38 62 52 56 60 C50 68 60 72 66 64 C74 54 80 64 78 74 L78 92`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M78 74 C72 78 66 76 64 70`})]})},brain:{outline:(0,C.jsx)(`path`,{d:`M30 22 C22 18 12 24 14 34 C8 38 8 48 14 52 C12 60 18 68 26 66 C30 74 42 76 48 70 C54 76 66 74 70 66 C80 68 86 58 82 50 C90 44 88 32 80 30 C82 20 70 14 62 20 C56 14 42 14 38 22 C36 21 33 21 30 22 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-fold`,d:`M48 18 L48 70`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M26 34 C34 32 36 40 30 44 C36 46 34 54 28 54`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M68 34 C60 32 58 40 64 44 C58 46 60 54 66 54`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M40 30 C44 36 44 44 40 50`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M56 30 C52 36 52 44 56 50`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M44 70 C44 82 44 88 42 92`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M52 70 C52 82 52 88 54 92`})]})},lung:{outline:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{d:`M44 22 C44 40 42 58 36 74 C30 88 18 86 14 74 C10 60 14 40 26 26 C32 19 40 18 44 22 Z`}),(0,C.jsx)(`path`,{d:`M56 22 C56 40 58 58 64 74 C70 88 82 86 86 74 C90 60 86 40 74 26 C68 19 60 18 56 22 Z`})]}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-tube`,d:`M50 8 L50 30`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M50 30 C44 32 40 38 36 46`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M50 30 C56 32 60 38 64 46`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M36 46 C32 52 30 58 28 64`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M64 46 C68 52 70 58 72 64`})]})},eye:{outline:(0,C.jsx)(`path`,{d:`M8 50 C24 28 76 28 92 50 C76 72 24 72 8 50 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`circle`,{className:`an-cavity`,cx:`50`,cy:`50`,r:`20`}),(0,C.jsx)(`circle`,{className:`an-node`,cx:`50`,cy:`50`,r:`9`}),(0,C.jsx)(`circle`,{className:`an-glint`,cx:`44`,cy:`44`,r:`3`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M14 50 C20 46 26 45 30 45`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M86 50 C80 54 74 55 70 55`})]})},ear:{outline:(0,C.jsx)(`path`,{d:`M62 12 C40 8 24 24 24 46 C24 64 32 78 30 88 C28 94 34 96 40 92 C46 88 44 78 50 74 C58 68 60 58 54 54 C48 50 52 42 58 44 C66 46 72 38 70 28 C69 20 67 14 62 12 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-fold`,d:`M58 20 C46 18 36 28 36 42 C36 52 40 58 40 64`}),(0,C.jsx)(`path`,{className:`an-cavity`,d:`M50 40 C44 40 42 48 48 50 C54 52 56 44 50 40 Z`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M48 50 C40 54 36 60 34 66`})]})},neuron:{outline:(0,C.jsx)(`circle`,{cx:`42`,cy:`50`,r:`14`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`circle`,{className:`an-node`,cx:`42`,cy:`50`,r:`5`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M30 42 C20 34 14 32 8 30`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M30 50 C20 50 14 52 8 54`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M32 60 C24 66 18 70 12 74`}),(0,C.jsx)(`path`,{className:`an-axon`,d:`M56 50 L82 50`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M82 50 C88 44 92 44 96 42`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M82 50 C88 56 92 56 96 58`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M82 50 L96 50`})]})},skeleton:{outline:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{d:`M50 8 C58 8 62 16 62 22 C62 28 58 32 50 32 C42 32 38 28 38 22 C38 16 42 8 50 8 Z`}),(0,C.jsx)(`path`,{d:`M50 32 L50 66`}),(0,C.jsx)(`path`,{d:`M46 70 C46 66 54 66 54 70 L58 88 C58 92 42 92 42 88 Z`})]}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-bone`,d:`M50 38 C40 40 30 44 26 50`}),(0,C.jsx)(`path`,{className:`an-bone`,d:`M50 38 C60 40 70 44 74 50`}),(0,C.jsx)(`path`,{className:`an-bone`,d:`M50 46 C40 48 32 52 28 58`}),(0,C.jsx)(`path`,{className:`an-bone`,d:`M50 46 C60 48 68 52 72 58`}),(0,C.jsx)(`path`,{className:`an-bone`,d:`M50 54 C42 56 36 60 32 66`}),(0,C.jsx)(`path`,{className:`an-bone`,d:`M50 54 C58 56 64 60 68 66`}),(0,C.jsx)(`path`,{className:`an-bone`,d:`M44 36 L56 36 M44 44 L56 44 M44 52 L56 52`})]})},stomach:{outline:(0,C.jsx)(`path`,{d:`M30 14 C30 22 32 28 36 34 C42 42 44 54 44 64 C44 78 54 88 66 88 C80 88 86 76 84 64 C82 52 74 46 66 44 C58 42 54 36 54 28 C54 22 52 18 48 16 C42 13 34 12 30 14 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-tube`,d:`M40 6 C36 6 32 9 30 14`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M82 70 C90 70 94 78 94 86`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M48 40 C56 44 60 52 60 62`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M44 50 C52 54 56 62 56 70`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M52 62 C60 66 64 72 64 78`})]})},liver:{outline:(0,C.jsx)(`path`,{d:`M10 38 C10 30 18 26 30 26 C50 26 70 28 86 34 C92 36 92 44 88 50 C80 62 62 70 42 70 C24 70 12 60 10 48 C10 45 10 41 10 38 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-septum`,d:`M52 28 L52 66`}),(0,C.jsx)(`path`,{className:`an-cavity`,d:`M40 62 C40 70 36 76 32 76 C28 76 26 70 30 64`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M52 50 C44 52 38 56 34 60`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M52 50 C62 52 70 54 76 56`})]})}};function ae({title:e,icon:t=`spark`,iconColor:n=`var(--danger)`,organ:r,pins:i,view:a,caption:o,footer:l,delay:u}){let d=s[t]||s.spark,[f,p]=(0,S.useState)(0),m=ie[r]??ie.heart;return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`an-wrap`,children:[(0,C.jsxs)(`div`,{className:`an-figbox`,children:[a&&(0,C.jsx)(`span`,{className:`an-view`,children:a}),(0,C.jsxs)(`svg`,{viewBox:`0 0 100 100`,className:`an-svg`,role:`img`,"aria-label":e||r,children:[(0,C.jsx)(`g`,{className:`an-organ`,children:m.outline}),m.detail&&(0,C.jsx)(`g`,{className:`an-organ-detail`,children:m.detail}),i.map((e,t)=>{let n=t===f,r=re(e.x),i=re(e.y);return(0,C.jsxs)(`g`,{className:`an-pin`+(n?` on`:``),onMouseEnter:()=>p(t),onClick:()=>p(t),children:[n&&(0,C.jsx)(`circle`,{cx:r,cy:i,r:5.4,className:`an-pin-halo`}),(0,C.jsx)(`circle`,{cx:r,cy:i,r:3.4,className:`an-pin-dot`,...t===0?{"data-mark":`point`}:{}}),(0,C.jsx)(`text`,{x:r,y:i,className:`an-pin-num`,children:t+1})]},t)})]})]}),(0,C.jsx)(`div`,{className:`an-list`,children:i.map((e,t)=>(0,C.jsxs)(`button`,{className:`an-row`+(t===f?` on`:``),onMouseEnter:()=>p(t),onClick:()=>p(t),children:[(0,C.jsx)(`span`,{className:`an-rownum`,children:t+1}),(0,C.jsxs)(`span`,{className:`an-rowbody`,children:[(0,C.jsx)(`span`,{className:`an-rowtitle`,children:e.label}),e.note&&(0,C.jsx)(`span`,{className:`an-rownote`,children:e.note})]})]},t))})]}),o&&(0,C.jsx)(`div`,{className:`an-caption`,children:o}),l&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(l)})]})}var oe=[{axis:`aperture`,label:`Aperture`,x:50,y:16,trade:`depth of field`,accent:`var(--presence)`},{axis:`shutter`,label:`Shutter`,x:16,y:78,trade:`motion`,accent:`var(--insight)`},{axis:`iso`,label:`ISO`,x:84,y:78,trade:`noise`,accent:`var(--warning)`}];function se({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,aperture:r,shutter:i,iso:a,ev:o,effects:l,caption:u,footer:d,delay:f}){let p=s[t]||s.image,m={aperture:r,shutter:i,iso:`ISO ${a}`},h=e=>l?.find(t=>t.axis===e)?.note;return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`ex-figwrap`,children:(0,C.jsxs)(`svg`,{viewBox:`0 0 100 96`,className:`ex-svg`,role:`img`,"aria-label":e,children:[(0,C.jsx)(`polygon`,{points:oe.map(e=>`${e.x},${e.y}`).join(` `),className:`ex-tri`}),oe.map((e,t)=>{let n=oe[(t+1)%oe.length],r=(e.x+n.x)/2,i=(e.y+n.y)/2;return(0,C.jsx)(`line`,{x1:e.x,y1:e.y,x2:r,y2:i,className:`ex-edge`,markerEnd:`url(#ex-arrow)`},`e${t}`)}),(0,C.jsx)(`defs`,{children:(0,C.jsx)(`marker`,{id:`ex-arrow`,viewBox:`0 0 10 10`,refX:`8`,refY:`5`,markerWidth:`5`,markerHeight:`5`,orient:`auto`,children:(0,C.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`context-stroke`})})}),(0,C.jsx)(`circle`,{cx:50,cy:57,r:13,className:`ex-ev`}),(0,C.jsx)(`text`,{x:50,y:54,className:`ex-ev-k`,children:`EXPOSURE`}),(0,C.jsx)(`text`,{x:50,y:62,className:`ex-ev-v`,children:o||`balanced`}),oe.map((e,t)=>(0,C.jsxs)(`g`,{style:{"--cc":e.accent},children:[(0,C.jsx)(`circle`,{cx:e.x,cy:e.y,r:4,className:`ex-node`,...t===0?{"data-mark":`point`}:{}}),(0,C.jsx)(`text`,{x:e.x,y:e.y-7,className:`ex-node-k`,children:e.label.toUpperCase()}),(0,C.jsx)(`text`,{x:e.x,y:e.y+(e.y<40?-14:11),className:`ex-node-v`,children:m[e.axis]})]},e.axis))]})}),(0,C.jsx)(`div`,{className:`ex-cues`,children:oe.map(e=>{let t=h(e.axis);return(0,C.jsxs)(`div`,{className:`ex-cue`,style:{"--cc":e.accent},children:[(0,C.jsx)(`span`,{className:`ex-cue-dot`}),(0,C.jsxs)(`span`,{className:`ex-cue-body`,children:[(0,C.jsx)(`span`,{className:`ex-cue-k`,children:e.trade}),(0,C.jsx)(`span`,{className:`ex-cue-v`,children:t||m[e.axis]})]})]},e.axis)})}),u&&(0,C.jsx)(`div`,{className:`ex-caption`,children:u}),d&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(d)})]})}var ce=50,le=50,ue=44,de=30,fe={complementary:[0,180],analogous:[0,30,-30],triad:[0,120,240],split:[0,150,210],tetrad:[0,90,180,270]},pe=e=>(e%360+360)%360;function me(e,t){let n=(pe(e)-90)*(Math.PI/180);return[ce+t*Math.cos(n),le+t*Math.sin(n)]}function he(e,t){let[n,r]=me(e,ue),[i,a]=me(t,ue),[o,s]=me(t,de),[c,l]=me(e,de),u=+(t-e>180);return`M${n} ${r} A${ue} ${ue} 0 ${u} 1 ${i} ${a} L${o} ${s} A${de} ${de} 0 ${u} 0 ${c} ${l} Z`}function ge(e){let t=pe(e)/360,n=.8999999999999999*.72,r=n*(1-Math.abs(t*6%2-1)),i=Math.floor(t*6)%6,[a,o,s]=[[n,r,0],[r,n,0],[0,n,r],[0,r,n],[r,0,n],[n,0,r]][i],c=e=>Math.round((e+.2260000000000001)*255).toString(16).padStart(2,`0`);return`#${c(a)}${c(o)}${c(s)}`}function _e({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,baseHue:r,harmony:i=`complementary`,swatches:a,caption:o,footer:l,delay:u}){let d=s[t]||s.spark,f=fe[i]??fe.complementary,p=a&&a.length>0?a:f.map((e,t)=>({hue:pe(r+e),hex:ge(r+e),role:t===0?`base`:`accent`})),m=p.map(e=>pe(e.hue));return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`cw-wrap`,children:[(0,C.jsx)(`div`,{className:`cw-figbox`,children:(0,C.jsxs)(`svg`,{viewBox:`0 0 100 100`,className:`cw-svg`,role:`img`,"aria-label":e,children:[Array.from({length:60},(e,t)=>(0,C.jsx)(`path`,{d:he(t*6,(t+1)*6),fill:ge(t*6)},t)),(0,C.jsx)(`circle`,{cx:ce,cy:le,r:de,className:`cw-hub`}),m.map((e,t)=>{let[n,r]=me(e,de),[i,a]=me(e,48),o=p[t]?.hex??ge(e),s=t===0;return(0,C.jsxs)(`g`,{children:[(0,C.jsx)(`line`,{x1:ce,y1:le,x2:n,y2:r,className:`cw-spoke`}),(0,C.jsx)(`circle`,{cx:i,cy:a,r:s?4:3,className:`cw-marker`+(s?` base`:``),fill:o,...s?{"data-mark":`point`}:{}})]},`m${t}`)}),(0,C.jsx)(`circle`,{cx:ce,cy:le,r:2.4,className:`cw-center`})]})}),(0,C.jsxs)(`div`,{className:`cw-list`,children:[(0,C.jsx)(`div`,{className:`cw-harmony`,children:i}),p.map((e,t)=>(0,C.jsxs)(`div`,{className:`cw-chip`,children:[(0,C.jsx)(`span`,{className:`cw-chip-sw`,style:{background:e.hex}}),(0,C.jsxs)(`span`,{className:`cw-chip-body`,children:[(0,C.jsx)(`span`,{className:`cw-chip-hex tab-num`,children:e.hex}),e.role&&(0,C.jsx)(`span`,{className:`cw-chip-role`,children:e.role})]})]},t))]})]}),o&&(0,C.jsx)(`div`,{className:`cw-caption`,children:o}),l&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(l)})]})}var R=160,z=100,ve=e=>e/100*R,ye=e=>e/100*z,be=(e,t,n)=>Math.max(t,Math.min(n,e)),xe=2.6;function Se(e,t){let n=Math.max(3,Math.floor((t-5)/xe));return e.length>n?e.slice(0,n-1).trimEnd()+`…`:e}function Ce(e){switch(e){case`leadinglines`:{let e=2/3*R,t=1/3*z;return(0,C.jsxs)(`g`,{className:`art-guide`,children:[(0,C.jsx)(`line`,{x1:0,y1:z,x2:e,y2:t}),(0,C.jsx)(`line`,{x1:R,y1:z,x2:e,y2:t}),(0,C.jsx)(`line`,{x1:0,y1:0,x2:e,y2:t}),(0,C.jsx)(`circle`,{cx:e,cy:t,r:3.2,className:`art-guide-node`})]})}case`goldenratio`:{let e=1.618,t=R/e,n=z/e,r=R-t,i=t-(R-t)/e;return(0,C.jsxs)(`g`,{className:`art-guide`,children:[(0,C.jsx)(`line`,{x1:t,y1:0,x2:t,y2:z}),(0,C.jsx)(`line`,{x1:0,y1:n,x2:R,y2:n}),(0,C.jsx)(`path`,{d:`M${R} ${n} A${r} ${r} 0 0 1 ${t} ${z} A${t} ${t} 0 0 1 0 ${n} A${i} ${i} 0 0 1 ${t-i} ${z-i*e}`,className:`art-guide-arc`}),(0,C.jsx)(`circle`,{cx:t,cy:n,r:3.2,className:`art-guide-node`})]})}case`symmetry`:{let e=R/2;return(0,C.jsxs)(`g`,{className:`art-guide`,children:[(0,C.jsx)(`line`,{x1:e,y1:0,x2:e,y2:z,className:`art-guide-axis`}),[.3,.5,.7].map((t,n)=>(0,C.jsxs)(`g`,{children:[(0,C.jsx)(`line`,{x1:e-22,y1:z*t,x2:e-12,y2:z*t}),(0,C.jsx)(`line`,{x1:92,y1:z*t,x2:102,y2:z*t})]},n))]})}default:{let e=[R/3,R*2/3],t=[z/3,z*2/3];return(0,C.jsxs)(`g`,{className:`art-guide`,children:[e.map((e,t)=>(0,C.jsx)(`line`,{x1:e,y1:0,x2:e,y2:z},`c${t}`)),t.map((e,t)=>(0,C.jsx)(`line`,{x1:0,y1:e,x2:R,y2:e},`r${t}`)),e.flatMap(e=>t.map(t=>[e,t])).map(([e,t],n)=>(0,C.jsx)(`circle`,{cx:e,cy:t,r:2.4,className:`art-guide-node`},`p${n}`))]})}}}function we({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,overlay:r=`thirds`,regions:i,palette:a,notes:o,caption:l,footer:u,delay:d}){let f=s[t]||s.image;return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`art-figwrap`,children:(0,C.jsxs)(`svg`,{viewBox:`0 0 ${R} ${z}`,className:`art-svg`,role:`img`,"aria-label":e,children:[(0,C.jsx)(`defs`,{children:(0,C.jsxs)(`linearGradient`,{id:`art-field`,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,C.jsx)(`stop`,{offset:`0%`,stopColor:`color-mix(in oklab, var(--presence) 22%, var(--surface-elevated))`}),(0,C.jsx)(`stop`,{offset:`55%`,stopColor:`var(--surface-elevated)`}),(0,C.jsx)(`stop`,{offset:`100%`,stopColor:`color-mix(in oklab, var(--insight) 20%, var(--surface-elevated))`})]})}),(0,C.jsx)(`rect`,{x:0,y:0,width:R,height:z,fill:`url(#art-field)`}),Ce(r),(i??[]).map((e,t)=>{let n=ve(be(e.x,0,100)),r=ye(be(e.y,0,100)),i=Math.min(ve(e.w),R-n);return(0,C.jsxs)(`g`,{className:`art-region`,children:[(0,C.jsx)(`rect`,{x:n,y:r,width:i,height:Math.min(ye(e.h),z-r),rx:2,className:`art-region-box`,...t===0?{"data-mark":`box`}:{}}),(0,C.jsxs)(`text`,{x:n+2.5,y:r+6.5,className:`art-region-lbl`,children:[Se(e.label,i)!==e.label&&(0,C.jsx)(`title`,{children:e.label}),Se(e.label,i)]})]},t)})]})}),a&&a.length>0&&(0,C.jsx)(`div`,{className:`art-palette`,children:a.map((e,t)=>(0,C.jsxs)(`div`,{className:`art-pal-chip`,title:e.hex,children:[(0,C.jsx)(`span`,{className:`art-pal-sw`,style:{background:e.hex}}),(0,C.jsxs)(`span`,{className:`art-pal-meta`,children:[(0,C.jsx)(`span`,{className:`art-pal-hex tab-num`,children:e.hex}),e.role&&(0,C.jsx)(`span`,{className:`art-pal-role`,children:e.role})]})]},t))}),o&&o.length>0&&(0,C.jsx)(`div`,{className:`art-notes`,children:o.map((e,t)=>(0,C.jsxs)(`div`,{className:`art-note`,children:[(0,C.jsx)(`span`,{className:`art-note-k`,children:e.label}),(0,C.jsx)(`span`,{className:`art-note-v`,children:e.text})]},t))}),l&&(0,C.jsx)(`div`,{className:`art-caption`,children:l}),u&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(u)})]})}var Te=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--insight-soft)`];function Ee(e){return(e.clips??[]).reduce((e,t)=>Math.max(e,t.start+Math.max(0,t.len)),0)}function De({title:e,icon:t=`sliders`,iconColor:n=`var(--presence)`,tracks:r,bars:i,caption:a,footer:o,delay:l}){let u=s[t]||s.sliders,d=Math.max(4,i??(r.reduce((e,t)=>Math.max(e,Ee(t)),0)||4)),f=d<=16?1:Math.ceil(d/12),p=[];for(let e=0;e<=d;e+=f)p.push(e);return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`mx-board`,children:[(0,C.jsxs)(`div`,{className:`mx-ruler`,children:[(0,C.jsx)(`span`,{className:`mx-ruler-head`}),(0,C.jsx)(`div`,{className:`mx-ruler-track`,children:p.map(e=>(0,C.jsx)(`span`,{className:`mx-ruler-tick`,style:{left:e/d*100+`%`},children:e+1},e))})]}),r.map((e,t)=>{let n=e.color||Te[t%Te.length],r=Math.max(0,Math.min(100,e.volume??80)),i=Math.max(-100,Math.min(100,e.pan??0)),a=(i+100)/2,o=i===0?`C`:(i<0?`L`:`R`)+Math.round(Math.abs(i));return(0,C.jsxs)(`div`,{className:`mx-lane`+(e.mute?` muted`:``)+(e.solo?` soloed`:``),style:{"--cc":n},children:[(0,C.jsxs)(`div`,{className:`mx-head`,children:[(0,C.jsxs)(`div`,{className:`mx-head-top`,children:[(0,C.jsx)(`span`,{className:`mx-name`,children:e.name}),(0,C.jsxs)(`span`,{className:`mx-flags`,children:[(0,C.jsx)(`span`,{className:`mx-flag m`+(e.mute?` on`:``),children:`M`}),(0,C.jsx)(`span`,{className:`mx-flag s`+(e.solo?` on`:``),children:`S`})]})]}),(0,C.jsxs)(`div`,{className:`mx-controls`,children:[(0,C.jsx)(`span`,{className:`mx-vol`,title:`Volume ${r}`,children:(0,C.jsx)(`span`,{className:`mx-vol-fill`,style:{width:r+`%`}})}),(0,C.jsxs)(`span`,{className:`mx-pan`,title:`Pan ${o}`,children:[(0,C.jsx)(`span`,{className:`mx-pan-mid`}),(0,C.jsx)(`span`,{className:`mx-pan-thumb`,style:{left:a+`%`}})]}),(0,C.jsx)(`span`,{className:`mx-pan-lbl tab-num`,children:o})]})]}),(0,C.jsxs)(`div`,{className:`mx-timeline`,children:[p.map(e=>(0,C.jsx)(`span`,{className:`mx-grid`,style:{left:e/d*100+`%`},"aria-hidden":!0},e)),(e.clips??[]).map((e,n)=>{let r=Math.max(0,e.start)/d*100,i=Math.max(0,Math.min(e.len,d-e.start))/d*100;return(0,C.jsx)(`span`,{className:`mx-clip`,style:{left:r+`%`,width:i+`%`},title:e.label,...t===0&&n===0?{"data-mark":`box`}:{},children:e.label&&(0,C.jsx)(`span`,{className:`mx-clip-lbl`,children:e.label})},n)})]})]},t)})]}),a&&(0,C.jsx)(`div`,{className:`mx-caption`,children:a}),o&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(o)})]})}function Oe({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,before:r,after:i,position:a=50,footer:o,delay:c}){let l=s[t]||s.image,[u,d]=(0,S.useState)(Math.max(2,Math.min(98,a))),[p,m]=(0,S.useState)(!1),h=(0,S.useRef)(null),g=f(r.src),_=f(i.src),v=e=>{let t=h.current;if(!t)return;let n=t.getBoundingClientRect(),r=(e-n.left)/n.width*100;d(Math.max(2,Math.min(98,r)))},y=e=>{m(!0),e.target.setPointerCapture?.(e.pointerId),v(e.clientX)},b=e=>{p&&v(e.clientX)},w=()=>m(!1);return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`me-ba`+(p?` dragging`:``),ref:h,onPointerMove:b,onPointerUp:w,onPointerLeave:w,children:[(0,C.jsxs)(`div`,{className:`me-ba-plate`,style:{background:`linear-gradient(135deg, ${x(i.from,`var(--presence-deep)`)}, ${x(i.to,`var(--presence-soft)`)})`},children:[_&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:_,alt:``,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),(0,C.jsx)(`span`,{className:`me-ba-tag right`,children:i.label})]}),(0,C.jsxs)(`div`,{className:`me-ba-plate me-ba-before`,style:{background:`linear-gradient(135deg, ${x(r.from,`var(--presence-deep)`)}, ${x(r.to,`var(--presence-soft)`)})`,clipPath:`inset(0 ${100-u}% 0 0)`},children:[g&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:g,alt:``,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),(0,C.jsx)(`span`,{className:`me-ba-tag left`,children:r.label})]}),(0,C.jsx)(`div`,{className:`me-ba-divider`,style:{left:u+`%`},"data-interactive":!0,onPointerDown:y,children:(0,C.jsxs)(`span`,{className:`me-ba-handle`,children:[(0,C.jsx)(s.chevR,{className:`me-ba-arrow flip`}),(0,C.jsx)(s.chevR,{className:`me-ba-arrow`})]})})]}),(0,C.jsxs)(`div`,{className:`me-ba-caps`,children:[(0,C.jsx)(`span`,{className:`faint`,children:r.caption||`Before`}),(0,C.jsxs)(`span`,{className:`tab-num me-ba-pct`,children:[Math.round(u),`%`]}),(0,C.jsx)(`span`,{className:`faint`,children:i.caption||`After`})]}),(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:o||(0,C.jsx)(`span`,{className:`faint`,children:`Drag the divider to wipe between the two versions`})})]})}function ke({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,slides:r,start:i=0,footer:a,delay:o}){let c=s[t]||s.image,l=r.length,[u,d]=(0,S.useState)(Math.max(0,Math.min(l-1,i))),[p,m]=(0,S.useState)(0),h=(0,S.useRef)(null),g=e=>d(l>0?(e+l)%l:0),_=e=>{h.current=e.clientX,e.target.setPointerCapture?.(e.pointerId)},v=e=>{h.current!=null&&m(e.clientX-h.current)},y=()=>{Math.abs(p)>48&&g(u+(p<0?1:-1)),h.current=null,m(0)};return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(o||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`me-carousel`,children:[(0,C.jsx)(`div`,{className:`me-car-track`,style:{transform:`translateX(calc(${-u*100}% + ${p}px))`},"data-interactive":!0,onPointerDown:_,onPointerMove:v,onPointerUp:y,onPointerLeave:y,children:r.map((e,t)=>{let n=f(e.src);return(0,C.jsxs)(`div`,{className:`me-car-slide`,children:[(0,C.jsxs)(`div`,{className:`me-car-img`,style:{background:`linear-gradient(135deg, ${x(e.from,`var(--presence-deep)`)}, ${x(e.to,`var(--presence-soft)`)})`},...t===0?{"data-mark":`circle`}:{},children:[n&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:n,alt:``,loading:`lazy`,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),e.tag&&(0,C.jsx)(`span`,{className:`me-car-tag`,children:e.tag}),(0,C.jsx)(`span`,{className:`me-car-label`,children:e.label})]}),e.caption&&(0,C.jsx)(`div`,{className:`me-car-cap`,children:e.caption})]},t)})}),(0,C.jsx)(`button`,{className:`me-car-arrow left`,onClick:()=>g(u-1),"aria-label":`Previous`,children:(0,C.jsx)(s.chevR,{className:`flip`})}),(0,C.jsx)(`button`,{className:`me-car-arrow right`,onClick:()=>g(u+1),"aria-label":`Next`,children:(0,C.jsx)(s.chevR,{})})]}),(0,C.jsxs)(`div`,{className:`me-car-dots`,children:[r.map((e,t)=>(0,C.jsx)(`button`,{className:`me-dot`+(t===u?` on`:``),onClick:()=>d(t),"aria-label":`Slide ${t+1}`},t)),(0,C.jsxs)(`span`,{className:`tab-num me-car-count`,children:[u+1,`/`,l]})]}),a&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:a})]})}var Ae=e=>Math.max(2,Math.min(98,e));function je({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,image:r,callouts:i,footer:a,delay:o}){let c=s[t]||s.image,[l,u]=(0,S.useState)(0),d=f(r.src);return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(o||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`me-ico-wrap`,children:[(0,C.jsxs)(`div`,{className:`me-ico-img`,style:{background:`linear-gradient(135deg, ${x(r.from,`var(--presence-deep)`)}, ${x(r.to,`var(--presence-soft)`)})`},children:[d&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:d,alt:``,loading:`lazy`,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),r.label&&(0,C.jsx)(`span`,{className:`me-ico-imglabel`,children:r.label}),i.map((e,t)=>{let n=e.color||`var(--presence)`;return(0,C.jsx)(`button`,{className:`me-ico-pin`+(t===l?` on`:``),style:{left:Ae(e.x)+`%`,top:Ae(e.y)+`%`,"--cc":n},onMouseEnter:()=>u(t),onClick:()=>u(t),"aria-label":e.label,...t===0?{"data-mark":`circle`}:{},children:(0,C.jsx)(`span`,{className:`me-ico-num`,children:t+1})},t)})]}),(0,C.jsx)(`div`,{className:`me-ico-list`,children:i.map((e,t)=>{let n=e.color||`var(--presence)`;return(0,C.jsxs)(`button`,{className:`me-ico-row`+(t===l?` on`:``),style:{"--cc":n},onMouseEnter:()=>u(t),onClick:()=>u(t),children:[(0,C.jsx)(`span`,{className:`me-ico-rownum`,children:t+1}),(0,C.jsxs)(`span`,{className:`me-ico-rowbody`,children:[(0,C.jsx)(`span`,{className:`me-ico-rowtitle`,children:e.label}),e.detail&&(0,C.jsx)(`span`,{className:`me-ico-rowdetail`,children:e.detail})]})]},t)})})]}),a&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:a})]})}function Me(e,t){let n=(t||`0:00`).split(`:`).map(e=>parseInt(e,10)||0),r=n.length===2?n[0]*60+n[1]:n[0],i=Math.round(r*e/100);return`${Math.floor(i/60)}:${String(i%60).padStart(2,`0`)}`}function Ne({title:e,icon:t=`speaker`,iconColor:n=`var(--presence)`,bars:r,durationLabel:i=`3:24`,color:a=`var(--presence)`,position:o=32,markers:c=[],footer:l,delay:u}){let d=s[t]||s.speaker,[f,p]=(0,S.useState)(Math.max(0,Math.min(100,o))),[m,h]=(0,S.useState)(!0),[g,_]=(0,S.useState)(!1),v=(0,S.useRef)(null),y=e=>{let t=v.current;if(!t)return;let n=t.getBoundingClientRect();p(Math.max(0,Math.min(100,(e-n.left)/n.width*100)))};return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`me-wave-row`,children:[(0,C.jsx)(`button`,{className:`me-wave-play`+(m?` on`:``),style:{"--cc":a},onClick:()=>h(e=>!e),"aria-label":m?`Pause`:`Play`,children:m?(0,C.jsxs)(`span`,{className:`me-wave-pause`,children:[(0,C.jsx)(`i`,{}),(0,C.jsx)(`i`,{})]}):(0,C.jsx)(s.play,{})}),(0,C.jsxs)(`div`,{className:`me-wave`+(g?` dragging`:``),ref:v,"data-interactive":!0,onPointerDown:e=>{_(!0),e.target.setPointerCapture?.(e.pointerId),y(e.clientX)},onPointerMove:e=>g&&y(e.clientX),onPointerUp:()=>_(!1),onPointerLeave:()=>_(!1),children:[r.map((e,t)=>{let n=(r.length>1?t/(r.length-1)*100:0)<=f;return(0,C.jsx)(`span`,{className:`me-wave-bar`,style:{height:Math.max(8,e*100)+`%`,background:n?a:`var(--track)`}},t)}),c.map((e,t)=>(0,C.jsx)(`span`,{className:`me-wave-marker`,style:{left:e.at+`%`},title:e.label,...t===0?{"data-mark":`point`}:{}},t)),(0,C.jsx)(`span`,{className:`me-wave-head`,style:{left:f+`%`,"--cc":a}})]}),(0,C.jsxs)(`span`,{className:`tab-num me-wave-time`,children:[Me(f,i),` `,(0,C.jsxs)(`span`,{className:`faint`,children:[`/ `,i]})]})]}),(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:l||(0,C.jsx)(`span`,{className:`faint`,children:`Click or drag the waveform to scrub`})})]})}function Pe({title:e,icon:t=`play`,iconColor:n=`var(--presence)`,thumb:r,video:i,poster:a,durationLabel:o=`12:40`,chapters:c,active:l=0,footer:u,delay:p}){let m=s[t]||s.play,h=f(a),g=d(i),[_,v]=(0,S.useState)(Math.max(0,Math.min(c.length-1,l))),[y,b]=(0,S.useState)(!1),w=(0,S.useRef)(null),T=e=>Math.max(0,Math.min(100,c[e]?.at??0)),E=T(_),D=e=>{v(e);let t=w.current;t&&t.duration&&(t.currentTime=T(e)/100*t.duration)};return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`me-vid`,children:[g?(0,C.jsx)(`video`,{ref:w,className:`me-vid-real`,src:g,poster:h,controls:!0,preload:`metadata`,playsInline:!0,children:(0,C.jsx)(`track`,{kind:`captions`,srcLang:`en`,label:`English`,src:`data:text/vtt,WEBVTT`})}):(0,C.jsxs)(`div`,{className:`me-vid-thumb`,style:{background:`linear-gradient(135deg, ${x(r.from,`var(--presence-deep)`)}, ${x(r.to,`var(--presence-soft)`)})`},children:[r.label&&(0,C.jsx)(`span`,{className:`me-vid-overlaylabel`,children:r.label}),(0,C.jsx)(`span`,{className:`me-vid-dur tab-num`,children:o}),(0,C.jsx)(`button`,{className:`me-vid-playbtn`+(y?` playing`:``),onClick:()=>b(e=>!e),"aria-label":y?`Pause`:`Play`,children:y?(0,C.jsxs)(`span`,{className:`me-vid-pause`,children:[(0,C.jsx)(`i`,{}),(0,C.jsx)(`i`,{})]}):(0,C.jsx)(s.play,{})}),(0,C.jsxs)(`div`,{className:`me-vid-scrub`,children:[(0,C.jsx)(`span`,{className:`me-vid-scrub-fill`,style:{width:E+`%`}}),c.map((e,t)=>(0,C.jsx)(`span`,{className:`me-vid-tick`+(t===_?` on`:``),style:{left:T(t)+`%`}},t))]})]}),c.length>0&&(0,C.jsx)(`div`,{className:`me-vid-chapters`,role:`listbox`,"aria-label":`Chapters`,tabIndex:0,onKeyDown:e=>{e.key===`ArrowDown`||e.key===`ArrowRight`?(e.preventDefault(),D(Math.min(c.length-1,_+1))):(e.key===`ArrowUp`||e.key===`ArrowLeft`)&&(e.preventDefault(),D(Math.max(0,_-1)))},children:c.map((e,t)=>(0,C.jsxs)(`button`,{className:`me-vid-chap`+(t===_?` on`:``),onClick:()=>D(t),role:`option`,"aria-selected":t===_,children:[(0,C.jsx)(`span`,{className:`me-vid-chaptime tab-num`,children:e.time}),(0,C.jsx)(`span`,{className:`me-vid-chaptitle`,...t===_?{"data-mark":`underline`}:{},children:e.title}),t===_&&(0,C.jsx)(s.play,{className:`me-vid-chapnow`})]},t))})]}),(u||c.length>0)&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:u||(0,C.jsxs)(`span`,{children:[`Now at`,` `,(0,C.jsx)(`strong`,{style:{color:`var(--text-primary)`},children:c[_]?.title})]})})]})}i();var Fe=`© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> © <a href="https://carto.com/attributions">CARTO</a>`,Ie=e=>`https://{s}.basemaps.cartocdn.com/${e?`light_all`:`dark_all`}/{z}/{x}/{y}{r}.png`,Le=e=>{let t=e?.closest(`.figure-embed`);return t?t.getAttribute(`data-theme-mode`)!==`dark`:typeof document<`u`&&document.documentElement.getAttribute(`data-theme`)===`light`},Re=e=>e.replace(/[&<>"]/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`})[e]),ze=new Set([`residential`,`commercial`,`industrial`,`mixed`,`open-space`]),Be={residential:`var(--presence)`,commercial:`var(--warning)`,industrial:`var(--danger)`,mixed:`var(--presence-soft)`,"open-space":`var(--insight)`},Ve={residential:`Residential`,commercial:`Commercial`,industrial:`Industrial`,mixed:`Mixed use`,"open-space":`Open space`};function He(e){return Array.isArray(e)?e.map(e=>{let t=(Array.isArray(e?.coords)?e.coords:[]).filter(e=>Array.isArray(e)&&e.length===2&&Number.isFinite(e[0])&&Number.isFinite(e[1])&&Math.abs(e[0])<=90&&Math.abs(e[1])<=180);if(t.length<3)return null;let n=ze.has(e?.category)?e.category:`mixed`;return{coords:t,category:n,label:typeof e?.label==`string`&&e.label.trim()?e.label.trim():Ve[n]}}).filter(e=>e!==null):[]}function Ue({title:t,icon:n=`globe`,iconColor:r=`var(--presence)`,markers:i,zoom:a,zones:c,footer:l,delay:u}){let d=s[n]||s.globe,f=(0,S.useRef)(null),[p,m]=(0,S.useState)(!1),h=(i||[]).filter(e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&Math.abs(e.lat)<=90&&Math.abs(e.lng)<=180),g=JSON.stringify(h),_=He(c),v=JSON.stringify(_),y=_.reduce((e,t)=>(e.includes(t.category)||e.push(t.category),e),[]);return(0,S.useEffect)(()=>{if(!f.current||!h.length)return;let t=!1,n=null,r=null,i=null;m(!1);let s=()=>{t||m(!0)},c=window.setTimeout(s,8e3);return(async()=>{let c=await o(()=>import(`./leaflet-src-C_xhOQY7.js`).then(t=>e(t.default,1)),__vite__mapDeps([0,1])).catch(()=>null),l=c?.default??c;if(t||!f.current||!l?.map)return;n=l.map(f.current,{scrollWheelZoom:!1,attributionControl:!0,zoomAnimation:!1}),r=l.tileLayer(Ie(Le(f.current)),{subdomains:`abcd`,maxZoom:19,attribution:Fe,crossOrigin:`anonymous`}).addTo(n),r.once(`load`,s);let u=!1;r.on(`tileerror`,()=>{u||t||!n||(u=!0,n.removeLayer(r),r=l.tileLayer(`https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`,{subdomains:`abc`,maxZoom:19,attribution:`© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>`,crossOrigin:`anonymous`}).addTo(n),r.once(`load`,s))}),_.forEach(e=>{let t=Be[e.category];l.polygon(e.coords,{color:t,weight:1.5,fillColor:t,fillOpacity:.22}).addTo(n).bindPopup(`<div class="geo-pop"><b>${Re(e.label)}</b><div class="geo-pop-d">${Re(Ve[e.category])}</div></div>`)}),h.forEach((e,t)=>{let r=x(e.color),i=l.divIcon({className:`geo-divicon`,html:`<span class="geo-pin" style="--geo-c:${Re(r)}">${t+1}</span>`,iconSize:[26,26],iconAnchor:[13,13]}),a=`https://www.google.com/maps/search/?api=1&query=${e.lat},${e.lng}`,o=`<div class="geo-pop"><b>${Re(e.name)}</b>${e.detail?`<div class="geo-pop-d">${Re(e.detail)}</div>`:``}<a class="geo-pop-a" href="${a}" target="_blank" rel="noopener noreferrer">Open in Google Maps ↗</a></div>`;l.marker([e.lat,e.lng],{icon:i}).addTo(n).bindPopup(o)});let d=h.map(e=>[e.lat,e.lng]);for(let e of _)d.push(...e.coords);d.length>1?n.fitBounds(d,{padding:[34,34]}):n.setView([h[0].lat,h[0].lng],a??13),i=new MutationObserver(()=>{u||r?.setUrl(Ie(Le(f.current)))}),i.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})})(),()=>{t=!0,window.clearTimeout(c),i?.disconnect(),n&&n.remove()}},[g,v,a]),(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(d,{className:`ic`,style:{color:r}}),` `,t]}),h.length?(0,C.jsx)(`div`,{ref:f,className:`geo-map`,"data-tiles":p?`ready`:`loading`,"aria-busy":!p}):(0,C.jsx)(`div`,{className:`geo-map geo-map-empty faint`,children:`No locations to map.`}),y.length>0&&(0,C.jsx)(`div`,{className:`geo-zone-legend`,children:y.map(e=>(0,C.jsxs)(`span`,{className:`geo-zone-chip`,children:[(0,C.jsx)(`span`,{className:`geo-zone-swatch`,style:{background:Be[e]}}),Ve[e]]},e))}),(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:l||(0,C.jsxs)(`span`,{className:`faint`,children:[`Real map · `,h.length,` location`,h.length===1?``:`s`,` · drag to explore`]})})]})}function We({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,items:r,footer:i,delay:a}){let o=s[t]||s.image,[c,l]=(0,S.useState)(null),u=r.length,d=e=>l(u>0?(e%u+u)%u:null),p=c==null?null:r[c],m=p?f(p.src):void 0;return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(a||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(o,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`me-lb-grid`,children:r.map((e,t)=>{let n=f(e.src);return(0,C.jsxs)(`button`,{className:`me-lb-thumb`,style:{background:`linear-gradient(135deg, ${x(e.from,`var(--presence-deep)`)}, ${x(e.to,`var(--presence-soft)`)})`},onClick:()=>l(t),"aria-label":e.label,children:[n&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:n,alt:``,loading:`lazy`,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),(0,C.jsx)(`span`,{className:`me-lb-thumblabel`,children:e.label}),(0,C.jsx)(`span`,{className:`me-lb-expand`,children:(0,C.jsx)(s.external,{})})]},t)})}),p&&c!=null&&(0,C.jsx)(`div`,{className:`me-lb-modal`,onClick:()=>l(null),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l(null))},children:(0,C.jsxs)(`div`,{className:`me-lb-stage`,role:`presentation`,onClick:e=>e.stopPropagation(),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&e.stopPropagation()},children:[(0,C.jsxs)(`div`,{className:`me-lb-hero`,style:{background:`linear-gradient(135deg, ${x(p.from,`var(--presence-deep)`)}, ${x(p.to,`var(--presence-soft)`)})`},children:[m&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:m,alt:``,loading:`lazy`,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),(0,C.jsx)(`span`,{className:`me-lb-herolabel`,children:p.label})]}),(0,C.jsxs)(`div`,{className:`me-lb-bar`,children:[(0,C.jsxs)(`div`,{className:`me-lb-meta`,children:[(0,C.jsx)(`span`,{className:`me-lb-metatitle`,children:p.label}),p.caption&&(0,C.jsx)(`span`,{className:`me-lb-metacap faint`,children:p.caption})]}),(0,C.jsxs)(`span`,{className:`tab-num faint`,children:[c+1,` / `,u]})]}),(0,C.jsx)(`button`,{className:`me-lb-nav left`,onClick:()=>d(c-1),"aria-label":`Previous`,children:(0,C.jsx)(s.chevR,{className:`flip`})}),(0,C.jsx)(`button`,{className:`me-lb-nav right`,onClick:()=>d(c+1),"aria-label":`Next`,children:(0,C.jsx)(s.chevR,{})}),(0,C.jsx)(`button`,{className:`me-lb-close`,onClick:()=>l(null),"aria-label":`Close`,children:(0,C.jsx)(s.x,{})})]})}),(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:i||(0,C.jsxs)(`span`,{className:`faint`,children:[`Click any thumbnail to open the lightbox · `,u,` images`]})})]})}function Ge(e){let t={gridColumn:`span ${e.span===2?2:1}`,gridRow:`span ${e.rows===2?2:1}`};return e.kind===`image`?t.background=`linear-gradient(135deg, ${x(e.from)}, ${x(e.to,`var(--presence-soft)`)})`:e.kind===`color`&&(t.background=x(e.swatch)),t}function Ke({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,tiles:r,footer:i,delay:a}){let o=s[t]||s.layers,[c,l]=(0,S.useState)(null);return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(a||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(o,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`me-mood`,children:r.map((e,t)=>{let n=f(e.src);return(0,C.jsxs)(`div`,{className:`me-mood-tile k-`+e.kind+(c===t?` lift`:``)+(c!=null&&c!==t?` fade`:``),style:Ge(e),onMouseEnter:()=>l(t),onMouseLeave:()=>l(null),children:[e.kind===`image`&&n&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:n,alt:``,loading:`lazy`,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),e.kind===`text`&&(0,C.jsx)(`span`,{className:`me-mood-text`,children:e.text||e.label}),e.kind===`color`&&(0,C.jsx)(`span`,{className:`me-mood-hex tab-num`,children:e.hex||``}),e.kind===`image`&&e.label&&(0,C.jsx)(`span`,{className:`me-mood-imglabel`,children:e.label})]},t)})}),i&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:i})]})}function qe({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,swatches:r,footer:i,delay:a}){let o=s[t]||s.image,[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null);b(()=>l(null),c===null?null:900),b(()=>d(null),u?1400:null);let f=(e,t)=>{l(e);let n=window;typeof n.toast==`function`?n.toast(`Copied ${t}`):(navigator.clipboard?.writeText(t).catch(()=>{}),d(`Copied ${t}`))};return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(a||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(o,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`me-pal`,children:r.map((e,t)=>(0,C.jsxs)(`button`,{className:`me-pal-swatch`+(e.light?` light`:``)+(c===t?` copied`:``),style:{background:e.hex},onClick:()=>f(t,e.hex),title:`Copy ${e.hex}`,children:[(0,C.jsxs)(`span`,{className:`me-pal-top`,children:[e.contrast&&(0,C.jsx)(`span`,{className:`me-pal-contrast`,children:e.contrast}),(0,C.jsx)(`span`,{className:`me-pal-copyicon`,children:c===t?(0,C.jsx)(s.check,{}):(0,C.jsx)(s.layers,{})})]}),(0,C.jsxs)(`span`,{className:`me-pal-meta`,children:[(0,C.jsx)(`span`,{className:`me-pal-name`,children:e.name}),(0,C.jsx)(`span`,{className:`me-pal-hex tab-num`,children:c===t?`Copied`:e.hex})]})]},t))}),u&&(0,C.jsxs)(`div`,{className:`me-pal-toast`,children:[(0,C.jsx)(s.check,{}),` `,u]}),(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:i||(0,C.jsx)(`span`,{className:`faint`,children:`Click a swatch to copy its hex`})})]})}var Je=6e3,Ye=80,Xe=20,Ze=new Set(`svg.g.defs.title.desc.path.rect.circle.ellipse.line.polyline.polygon.text.tspan.textpath.lineargradient.radialgradient.stop.clippath.mask.pattern.marker.symbol.use.filter.fegaussianblur.feoffset.feblend.fecolormatrix.fecomposite.feflood.femerge.femergenode.femorphology.fedropshadow.fecomponenttransfer.fefuncr.fefuncg.fefuncb.fefunca.fedisplacementmap.feturbulence.fetile.fespecularlighting.fediffuselighting.fepointlight.fespotlight.fedistantlight`.split(`.`)),Qe=new Set([`href`,`xlink:href`,`src`]),$e=/url\(\s*['"]?\s*(?!#)/i,et=/javascript:/i,tt=/expression\s*\(|@import|behavior\s*:|-moz-binding/i,nt=new Set([`fill`,`stroke`,`stop-color`,`flood-color`,`lighting-color`]),rt=new Set([`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--danger)`,`var(--text-primary)`,`var(--text-secondary)`,`var(--text-muted)`,`var(--surface-card)`]),it=new Set([`none`,`currentcolor`,`transparent`,`context-fill`,`context-stroke`]),at=/^url\(#[\w-]+\)$/,ot=/\b(?:fill|stroke|color|stop-color)\s*:\s*(?!var\(--)[^;]+/i;function st(e){let t=e.trim();return rt.has(t)||it.has(t.toLowerCase())||at.test(t)}function ct(e,t){if(e===`fill`){let e=t.localName.toLowerCase();return e===`text`||e===`tspan`?`var(--text-primary)`:`var(--surface-card)`}return`var(--text-secondary)`}function lt(e){if(typeof e!=`string`)return null;let t=e.trim();if(!t||t.length>Je||/<!doctype|<!entity/i.test(t)||typeof DOMParser>`u`||typeof XMLSerializer>`u`)return null;let n;try{n=new DOMParser().parseFromString(t,`image/svg+xml`)}catch{return null}if(n.getElementsByTagName(`parsererror`).length>0)return null;let r=n.documentElement;if(!r||r.localName.toLowerCase()!==`svg`||(ut(r),r.getElementsByTagName(`*`).length>Ye)||r.getElementsByTagName(`text`).length>Xe)return null;let i=r.getAttribute(`viewBox`);if(!i)return null;let a=i.trim().split(/[\s,]+/).map(Number);if(a.length!==4||a.some(e=>!Number.isFinite(e))||a[2]<=0||a[3]<=0)return null;r.removeAttribute(`width`),r.removeAttribute(`height`),r.setAttribute(`width`,`100%`),r.getAttribute(`xmlns`)||r.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`);try{return new XMLSerializer().serializeToString(r)}catch{return null}}function ut(e){for(let t of Array.from(e.attributes)){let n=t.name.toLowerCase(),r=t.value;if(n.startsWith(`on`)){e.removeAttribute(t.name);continue}if(Qe.has(n)||n.endsWith(`:href`)){r.trim().startsWith(`#`)||e.removeAttribute(t.name);continue}if(nt.has(n)){st(r)||e.setAttribute(t.name,ct(n,e));continue}if(n===`style`){($e.test(r)||et.test(r)||tt.test(r)||ot.test(r))&&e.removeAttribute(t.name);continue}(et.test(r)||$e.test(r))&&e.removeAttribute(t.name)}for(let t of Array.from(e.childNodes)){let n=t.nodeType;if(n===1){let e=t;Ze.has(e.localName.toLowerCase())?ut(e):e.remove()}else (n===7||n===8)&&e.removeChild(t)}}function dt({title:e,icon:t=`sparkle`,iconColor:n=`var(--presence)`,svg:r,caption:i,footer:a,delay:o}){let l=s[t]||s.sparkle,u=(0,S.useMemo)(()=>lt(r),[r]);return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(o||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(l,{className:`ic`,style:{color:n}}),(0,C.jsx)(`span`,{className:`svgb-title`,children:e}),(0,C.jsxs)(`span`,{className:`svgb-badge`,children:[(0,C.jsx)(s.sparkle,{}),` Generated`]})]}),u===null?(0,C.jsx)(`p`,{className:`svgb-err`,children:`Couldn’t render this illustration.`}):(0,C.jsx)(`div`,{className:`svgb-wrap`,children:(0,C.jsx)(`div`,{className:`svgb-inner`,role:`img`,"aria-label":e,dangerouslySetInnerHTML:{__html:u}})}),i&&(0,C.jsx)(`p`,{className:`svgb-caption`,children:i}),u!==null&&(0,C.jsxs)(`p`,{className:`svgb-disclaimer`,role:`note`,children:[(0,C.jsx)(s.alert,{"aria-hidden":`true`}),(0,C.jsxs)(`span`,{children:[(0,C.jsx)(`strong`,{children:`AI-generated visual.`}),` It may be inaccurate or entirely wrong, including its labels, scale, relationships, or depictions. Verify important details with authoritative sources; do not treat it as evidence.`]})]}),a&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:8},dangerouslySetInnerHTML:c(a)})]})}var ft={soccer:{viewBox:`0 0 100 65`,bg:`#2d7a3a`,aspectRatio:65/100,markings:`
|
|
2
|
+
import{a as e,r as t}from"./chunk-BVpWp9h4.js";import{t as n}from"./react-BQSORdFI.js";import{t as r}from"./jsx-runtime-DaSxXjOY.js";import{J as i,ht as a,q as o}from"./index-Dbr1j8Fe.js";import{n as s}from"./icons-CHVz6kv_.js";import{t as c}from"./richText-BkxJhl9N.js";import{n as l,r as u}from"./format-DlZTyeMy.js";import{r as d,t as f}from"./safeImageUrl-CUkucDUu.js";import{t as p}from"./useValidatedImage-D2fhA198.js";import{r as m,t as h}from"./scale-Bcgfo6Hp.js";import{t as g}from"./BlockEmpty-DQkdduUE.js";import"./lib-B6qSkBPa.js";import{t as _}from"./registry-types-DMuK0vJ6.js";import{n as v,t as y}from"./fitText-CDFmCQzl.js";import{t as b}from"./useTimeout-BRYvu2jQ.js";import{t as x}from"./safeCssColor-di93BXgG.js";var S=n(),C=r(),w={chess:8,checkers:8,go:19,hex:8,grid:8},T=100,E=6;function D({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,board:r=`chess`,size:i,pieces:a,highlights:o,moves:l,caption:u,footer:d,delay:f}){let p=s[t]||s.layers,m=(0,S.useId)().replace(/:/g,``),h=w[r]?r:`chess`,g=Math.max(2,Math.min(25,Math.round(i??w[h]))),_=h===`go`,v=T-E*2,y=v/(_?g-1||1:g),b=e=>E+(_?e*y:(e+.5)*y),x=e=>E+(_?e*y:(e+.5)*y),D=y*(_?.4:.38),O=Math.max(.18,y*.03);return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`gb-wrap`,children:(0,C.jsxs)(`svg`,{viewBox:`0 0 ${T} ${T}`,className:`gb-svg`,role:`img`,"aria-label":e,children:[(0,C.jsx)(`rect`,{x:E,y:E,width:v,height:v,className:`gb-frame`}),(h===`chess`||h===`checkers`)&&Array.from({length:g*g},(e,t)=>{let n=Math.floor(t/g),r=t%g;return(n+r)%2==0?null:(0,C.jsx)(`rect`,{x:E+r*y,y:E+n*y,width:y,height:y,className:`gb-dark`},`sq-${t}`)}),(h===`go`||h===`grid`||h===`hex`)&&Array.from({length:_?g:g+1},(e,t)=>{let n=E+t*y;return(0,C.jsxs)(`g`,{children:[(0,C.jsx)(`line`,{x1:n,y1:E,x2:n,y2:94,className:`gb-grid`}),(0,C.jsx)(`line`,{x1:E,y1:n,x2:94,y2:n,className:`gb-grid`})]},`ln-${t}`)}),h===`hex`&&Array.from({length:g*g},(e,t)=>{let n=Math.floor(t/g),r=t%g,i=n%2*y*.5,a=E+(r+.5)*y+i;return a>94?null:(0,C.jsx)(`circle`,{cx:a,cy:E+(n+.5)*y,r:y*.06,className:`gb-hexdot`},`hx-${t}`)}),h===`go`&&g===19&&[3,9,15].flatMap(e=>[3,9,15].map(t=>(0,C.jsx)(`circle`,{cx:b(t),cy:x(e),r:y*.09,className:`gb-star`},`star-${e}-${t}`))),o?.map((e,t)=>_?(0,C.jsx)(`circle`,{cx:b(e.col),cy:x(e.row),r:D*1.25,className:`gb-hl-dot`},`hl-${t}`):(0,C.jsx)(`rect`,{x:E+e.col*y,y:E+e.row*y,width:y,height:y,className:`gb-hl`},`hl-${t}`)),a.map((e,t)=>{let n=b(e.col),r=x(e.row),i=e.glyph||e.label||``;return(0,C.jsxs)(`g`,{className:`gb-piece side-${e.side===`b`?`b`:`a`}`,children:[(0,C.jsx)(`circle`,{cx:n,cy:r,r:D,className:`gb-disc`,strokeWidth:O}),i&&(0,C.jsx)(`text`,{x:n,y:r,textAnchor:`middle`,dominantBaseline:`central`,className:`gb-glyph`,style:{fontSize:D*1.15},children:i})]},`pc-${t}`)}),(0,C.jsx)(`defs`,{children:(0,C.jsx)(`marker`,{id:`gb-arr-${m}`,markerWidth:`5`,markerHeight:`5`,refX:`3.5`,refY:`2.5`,orient:`auto`,children:(0,C.jsx)(`path`,{d:`M0,0 L0,5 L5,2.5 Z`,className:`gb-arrhead`})})}),l?.map((e,t)=>(0,C.jsx)(`line`,{x1:b(e.from[1]),y1:x(e.from[0]),x2:b(e.to[1]),y2:x(e.to[0]),className:`gb-move`,strokeWidth:Math.max(.6,y*.08),markerEnd:`url(#gb-arr-${m})`},`mv-${t}`))]})}),u&&(0,C.jsx)(`div`,{className:`gb-caption`,children:u}),d&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(d)})]})}var O=.6;function k(e,t,n){let r=Math.max(3,Math.floor(t/(n*O)));return e.length>r?e.slice(0,r-1).trimEnd()+`…`:e}var A=[`color-mix(in oklab, var(--presence) 13%, transparent)`,`color-mix(in oklab, var(--insight) 13%, transparent)`,`color-mix(in oklab, var(--warning) 15%, transparent)`,`color-mix(in oklab, var(--presence) 7%, transparent)`,`color-mix(in oklab, var(--insight) 7%, transparent)`],j=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--insight-soft)`];function M({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,fabric:r,pieces:i,unit:a=`cm`,caption:o,footer:l,delay:d}){let f=s[t]||s.edit,p=(0,S.useId)().replace(/:/g,``),m=Math.max(1,r.w),h=Math.max(1,r.h),g=Math.max(m,h)*.04,_=m+g*2,v=h+g*2,y=i.reduce((e,t)=>e+Math.max(0,Math.min(t.w,m-t.x))*Math.max(0,Math.min(t.h,h-t.y))*Math.max(1,t.qty??1),0),b=Math.min(100,Math.round(y/(m*h)*100));return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`pat-figwrap`,children:(0,C.jsxs)(`svg`,{viewBox:`0 0 ${_} ${v}`,className:`pat-svg`,role:`img`,"aria-label":e,children:[(0,C.jsx)(`defs`,{children:(0,C.jsx)(`marker`,{id:`pat-grain-${p}`,markerWidth:`6`,markerHeight:`6`,refX:`3`,refY:`3`,orient:`auto`,children:(0,C.jsx)(`path`,{d:`M0,3 L5,0.5 L4,3 L5,5.5 Z`,className:`pat-grain-head`})})}),(0,C.jsx)(`rect`,{x:g,y:g,width:m,height:h,className:`pat-fabric`}),(0,C.jsx)(`line`,{x1:g,y1:g,x2:g,y2:g+h,className:`pat-foldedge`,strokeWidth:Math.max(.4,m*.006)}),(0,C.jsx)(`text`,{className:`pat-foldlabel`,transform:`translate(${g+m*.022},${g+h/2}) rotate(-90)`,children:(0,C.jsx)(`tspan`,{x:0,y:0,children:`FOLD`})}),r.label&&(0,C.jsx)(`text`,{x:g+m-1,y:g-g*.35,textAnchor:`end`,className:`pat-fabriclabel`,children:r.label}),i.map((e,t)=>{let n=j[t%j.length],r=A[t%A.length],i=g+e.x,a=g+e.y,o=i+e.w/2,s=a+e.h/2,c=e.h*.14,l=Math.min(e.w,e.h)<Math.max(m,h)*.1,u=Math.max(1,e.qty??1);return(0,C.jsxs)(`g`,{children:[(0,C.jsx)(`rect`,{x:i,y:a,width:e.w,height:e.h,rx:Math.min(1.5,m*.005),fill:r,stroke:n,strokeWidth:m*.004,strokeDasharray:e.fold?void 0:`${m*.012} ${m*.008}`}),e.fold&&(0,C.jsx)(`line`,{x1:i,y1:a,x2:i,y2:a+e.h,className:`pat-onfold`,strokeWidth:m*.006}),(0,C.jsx)(`line`,{x1:o,y1:a+c,x2:o,y2:a+e.h-c,className:`pat-grain`,strokeWidth:Math.max(.3,m*.0035),markerStart:`url(#pat-grain-${p})`,markerEnd:`url(#pat-grain-${p})`}),!l&&(()=>{let t=Math.max(m*.026,2.4),n=k(e.label,e.w-t,t),r=n!==e.label;return(0,C.jsxs)(`text`,{x:o,y:s,textAnchor:`middle`,dominantBaseline:`middle`,className:`pat-piece-lbl`,style:{fontSize:t},children:[r&&(0,C.jsx)(`title`,{children:e.label}),(0,C.jsx)(`tspan`,{x:o,dy:`-0.5em`,children:n}),(u>1||e.fold)&&(0,C.jsx)(`tspan`,{x:o,dy:`1.4em`,className:`pat-piece-sub`,children:e.fold?`cut 1 on fold`:`cut ${u}`})]})})()]},t)})]})}),(0,C.jsxs)(`div`,{className:`pat-stats`,children:[(0,C.jsxs)(`div`,{className:`pat-stat`,children:[(0,C.jsx)(`span`,{className:`pat-stat-k`,children:`Fabric`}),(0,C.jsxs)(`span`,{className:`pat-stat-v`,children:[u(m),` × `,u(h),` `,a]})]}),(0,C.jsxs)(`div`,{className:`pat-stat`,children:[(0,C.jsx)(`span`,{className:`pat-stat-k`,children:`Yield`}),(0,C.jsxs)(`span`,{className:`pat-stat-v pat-yield`,"data-low":b<55?``:void 0,children:[b,`%`]})]})]}),o&&(0,C.jsx)(`div`,{className:`pat-caption`,children:o}),l&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(l)})]})}function N({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,src:r,candidates:i,alt:a,caption:o,footer:c,delay:l,blockId:u,onUnrenderable:d}){let f=s[t]||s.image,m=p([r,...i??[]]),h=m.state===`checking`?`loading`:m.state===`ready`?`ready`:`error`,g=a||o||e||`Photograph`,_=c||o,v=h===`error`,y=!!(e||_||a);if((0,S.useEffect)(()=>{v&&!y&&u&&d?.(u)},[v,y,u,d]),v&&!y)return null;let b={"--delay":(l||0)+`ms`};return v?(0,C.jsxs)(`div`,{className:`card reveal me-photo-card`,style:b,children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`insight-summary`,children:_||g})]}):(0,C.jsxs)(`div`,{className:`card reveal`,style:b,children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`me-photo`+(h===`ready`?` ready`:``),children:[m.src?(0,C.jsx)(`img`,{className:`me-photo-img`,src:m.src,alt:g,loading:`lazy`,decoding:`async`,referrerPolicy:`no-referrer`}):null,h===`loading`&&(0,C.jsx)(`div`,{className:`me-photo-shimmer`,"aria-hidden":`true`})]}),_&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:_})]})}var P=a();function ee({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,shapes:r,labels:i,ratio:a=1.6,footer:o,delay:l}){let u=s[t]||s.image,d=`med-diag-arrow-${(0,S.useId)().replace(/:/g,``)}`,f=Math.round(100/Math.max(.4,a)*10)/10,p=e=>e>20?2.1:e>10?2:1.9,m=i.reduce((e,t)=>{let n=t.side??`right`,r=t.text.length*p(t.text.length);return n===`top`?(e.top=Math.max(e.top,7-t.y+2.5),e.x0=Math.min(e.x0,t.x-r/2),e.x1=Math.max(e.x1,t.x+r/2)):n===`bottom`?(e.bottom=Math.max(e.bottom,t.y+7+2.5-f),e.x0=Math.min(e.x0,t.x-r/2),e.x1=Math.max(e.x1,t.x+r/2)):n===`left`?e.x0=Math.min(e.x0,t.x-7-r-1):e.x1=Math.max(e.x1,t.x+7+r+1),e},{x0:0,x1:100,top:0,bottom:0}),h=Math.min(0,Math.round(m.x0*10)/10),g=Math.round(-Math.max(0,m.top)*10)/10,_=Math.round((Math.max(100,m.x1)-h)*10)/10,v=Math.round((f+Math.max(0,m.bottom)-g)*10)/10;return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`med-diag`,children:(0,C.jsxs)(`svg`,{viewBox:`${h} ${g} ${_} ${v}`,className:`med-diag-svg`,role:`img`,children:[(0,C.jsx)(`defs`,{children:(0,C.jsx)(`marker`,{id:d,viewBox:`0 0 10 10`,refX:`8`,refY:`5`,markerWidth:`6`,markerHeight:`6`,orient:`auto-start-reverse`,children:(0,C.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`context-stroke`})})}),r.map((e,t)=>(0,C.jsx)(F,{s:e,arrowId:d},t)),i.map((e,t)=>{let n=e.side??`right`,r=n===`left`?e.x-7:n===`right`?e.x+7:e.x,i=n===`top`?e.y-7:n===`bottom`?e.y+7:e.y,a=n===`left`?`end`:n===`right`?`start`:`middle`,o=e.color||`var(--text-secondary)`;return(0,C.jsxs)(`g`,{children:[(0,C.jsx)(`line`,{x1:e.x,y1:e.y,x2:r,y2:i,className:`med-diag-lead`}),(0,C.jsx)(`circle`,{cx:e.x,cy:e.y,r:1.1,fill:o,...t===0?{"data-mark":`point`}:{}}),(0,C.jsx)(`text`,{x:r+(n===`right`?1:n===`left`?-1:0),y:i+1.1,textAnchor:a,className:`med-diag-lbl`,fill:o,children:e.text})]},`l${t}`)})]})}),o&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(o)})]})}function F(e){let t=(0,P.c)(28),{s:n,arrowId:r}=e,i=n.color||`var(--text-muted)`,a=n.fill||`none`;switch(n.kind){case`circle`:{let e;return t[0]!==a||t[1]!==n.cx||t[2]!==n.cy||t[3]!==n.r||t[4]!==i?(e=(0,C.jsx)(`circle`,{cx:n.cx,cy:n.cy,r:n.r,stroke:i,strokeWidth:.7,fill:a}),t[0]=a,t[1]=n.cx,t[2]=n.cy,t[3]=n.r,t[4]=i,t[5]=e):e=t[5],e}case`rect`:{let e;return t[6]!==a||t[7]!==n.h||t[8]!==n.w||t[9]!==n.x||t[10]!==n.y||t[11]!==i?(e=(0,C.jsx)(`rect`,{x:n.x,y:n.y,width:n.w,height:n.h,rx:1.5,stroke:i,strokeWidth:.7,fill:a}),t[6]=a,t[7]=n.h,t[8]=n.w,t[9]=n.x,t[10]=n.y,t[11]=i,t[12]=e):e=t[12],e}case`line`:{let e=n.arrow?`url(#${r})`:void 0,a;return t[13]!==n.x1||t[14]!==n.x2||t[15]!==n.y1||t[16]!==n.y2||t[17]!==i||t[18]!==e?(a=(0,C.jsx)(`line`,{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,stroke:i,strokeWidth:.7,strokeLinecap:`round`,markerEnd:e}),t[13]=n.x1,t[14]=n.x2,t[15]=n.y1,t[16]=n.y2,t[17]=i,t[18]=e,t[19]=a):a=t[19],a}case`polygon`:{let e;return t[20]!==a||t[21]!==n.points||t[22]!==i?(e=(0,C.jsx)(`polygon`,{points:n.points,stroke:i,strokeWidth:.7,fill:a}),t[20]=a,t[21]=n.points,t[22]=i,t[23]=e):e=t[23],e}case`path`:{let e;return t[24]!==a||t[25]!==n.d||t[26]!==i?(e=(0,C.jsx)(`path`,{d:n.d,stroke:i,strokeWidth:.7,fill:a}),t[24]=a,t[25]=n.d,t[26]=i,t[27]=e):e=t[27],e}default:return null}}var I={header:{col:12,rows:1},hero:{col:12,rows:3},nav:{col:12,rows:1},image:{col:6,rows:2},text:{col:6,rows:2},button:{col:3,rows:1},card:{col:4,rows:2},list:{col:6,rows:2},footer:{col:12,rows:1},input:{col:6,rows:1}};function L(e,t){return Math.min(t,Math.max(1,Math.round(e)))||1}function te(e){switch(e){case`header`:case`nav`:return(0,C.jsxs)(`div`,{className:`wf-bar`,children:[(0,C.jsx)(`span`,{className:`wf-dot`}),(0,C.jsx)(`span`,{className:`wf-spacer`}),(0,C.jsx)(`span`,{className:`wf-link`}),(0,C.jsx)(`span`,{className:`wf-link`}),(0,C.jsx)(`span`,{className:`wf-link`})]});case`hero`:return(0,C.jsxs)(`div`,{className:`wf-hero`,children:[(0,C.jsx)(`span`,{className:`wf-line wf-w70 wf-tall`}),(0,C.jsx)(`span`,{className:`wf-line wf-w50`}),(0,C.jsx)(`span`,{className:`wf-pill`})]});case`image`:return(0,C.jsxs)(`div`,{className:`wf-image`,"aria-hidden":!0,children:[(0,C.jsxs)(`svg`,{viewBox:`0 0 100 100`,preserveAspectRatio:`none`,className:`wf-image-x`,children:[(0,C.jsx)(`line`,{x1:`0`,y1:`0`,x2:`100`,y2:`100`}),(0,C.jsx)(`line`,{x1:`100`,y1:`0`,x2:`0`,y2:`100`})]}),(0,C.jsx)(s.image,{className:`wf-image-ic`})]});case`text`:return(0,C.jsxs)(`div`,{className:`wf-text`,children:[(0,C.jsx)(`span`,{className:`wf-line wf-w90`}),(0,C.jsx)(`span`,{className:`wf-line wf-w100`}),(0,C.jsx)(`span`,{className:`wf-line wf-w80`}),(0,C.jsx)(`span`,{className:`wf-line wf-w60`})]});case`button`:return(0,C.jsx)(`span`,{className:`wf-pill wf-pill-solid`});case`card`:return(0,C.jsxs)(`div`,{className:`wf-card`,children:[(0,C.jsx)(`span`,{className:`wf-thumb`}),(0,C.jsx)(`span`,{className:`wf-line wf-w70 wf-strong`}),(0,C.jsx)(`span`,{className:`wf-line wf-w90`}),(0,C.jsx)(`span`,{className:`wf-line wf-w50`})]});case`list`:return(0,C.jsx)(`div`,{className:`wf-list`,children:[0,1,2].map(e=>(0,C.jsxs)(`span`,{className:`wf-row`,children:[(0,C.jsx)(`span`,{className:`wf-row-dot`}),(0,C.jsx)(`span`,{className:`wf-line wf-w80`})]},e))});case`footer`:return(0,C.jsx)(`div`,{className:`wf-foot`,children:[0,1,2].map(e=>(0,C.jsxs)(`span`,{className:`wf-foot-col`,children:[(0,C.jsx)(`span`,{className:`wf-line wf-w60 wf-strong`}),(0,C.jsx)(`span`,{className:`wf-line wf-w90`}),(0,C.jsx)(`span`,{className:`wf-line wf-w70`})]},e))});case`input`:return(0,C.jsxs)(`div`,{className:`wf-input`,children:[(0,C.jsx)(`span`,{className:`wf-line wf-w40`}),(0,C.jsx)(`span`,{className:`wf-input-cta`})]})}}function ne({title:e,icon:t,iconColor:n=`var(--presence-soft)`,regions:r,cols:i=12,caption:a,footer:o,delay:l}){let u=L(i,12),d=t&&s[t]||s.screen,f=Array.isArray(r)?r:[];return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`wireframe`,style:{"--wf-cols":u},role:`img`,"aria-label":e?e+` wireframe`:`page wireframe`,children:f.map((e,t)=>{let n=I[e.kind]??I.card,r=L(e.col??n.col,u),i=Math.min(6,Math.max(1,Math.round(e.rows??n.rows)))||1;return(0,C.jsxs)(`div`,{className:`wf-region wf-`+e.kind,style:{gridColumn:`span `+r,"--wf-rows":i},children:[(0,C.jsx)(`div`,{className:`wf-fill`,children:te(e.kind)}),e.label&&(0,C.jsx)(`span`,{className:`wf-label`,children:e.label})]},t)})}),a&&(0,C.jsx)(`div`,{className:`wf-caption`,dangerouslySetInnerHTML:c(a)}),o&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(o)})]})}var re=e=>Math.max(3,Math.min(97,e)),ie={heart:{outline:(0,C.jsx)(`path`,{d:`M50 88 C26 70 12 54 12 37 C12 24 22 15 33 15 C42 15 48 21 50 27 C52 21 58 15 67 15 C78 15 88 24 88 37 C88 54 74 70 50 88 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-vessel`,d:`M42 18 C40 9 36 6 31 6`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M52 18 C53 8 58 5 63 6`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M59 20 C64 12 70 11 73 14`}),(0,C.jsx)(`path`,{className:`an-septum`,d:`M50 27 L50 84`}),(0,C.jsx)(`path`,{className:`an-septum`,d:`M50 50 C62 48 70 54 72 62`}),(0,C.jsx)(`path`,{className:`an-septum`,d:`M50 50 C38 48 30 54 28 62`})]})},kidney:{outline:(0,C.jsx)(`path`,{d:`M62 14 C78 14 86 30 86 50 C86 72 76 88 60 88 C50 88 46 80 44 70 C42 62 38 60 34 60 C24 60 18 70 18 50 C18 28 30 14 50 14 C55 14 58 14 62 14 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-cavity`,d:`M40 50 C46 46 52 46 56 50 C60 54 60 60 56 64 C52 68 46 68 40 64`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M40 50 C32 50 26 54 22 58`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M48 66 C48 76 50 84 52 90`})]})},nephron:{outline:(0,C.jsx)(`path`,{d:`M22 18 C12 18 8 28 16 34 C8 40 12 50 22 48`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`circle`,{className:`an-cavity`,cx:`20`,cy:`32`,r:`9`}),(0,C.jsx)(`circle`,{className:`an-node`,cx:`20`,cy:`32`,r:`5`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M28 30 C40 26 44 36 38 42 C32 48 44 52 50 46 C58 38 62 52 56 60 C50 68 60 72 66 64 C74 54 80 64 78 74 L78 92`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M78 74 C72 78 66 76 64 70`})]})},brain:{outline:(0,C.jsx)(`path`,{d:`M30 22 C22 18 12 24 14 34 C8 38 8 48 14 52 C12 60 18 68 26 66 C30 74 42 76 48 70 C54 76 66 74 70 66 C80 68 86 58 82 50 C90 44 88 32 80 30 C82 20 70 14 62 20 C56 14 42 14 38 22 C36 21 33 21 30 22 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-fold`,d:`M48 18 L48 70`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M26 34 C34 32 36 40 30 44 C36 46 34 54 28 54`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M68 34 C60 32 58 40 64 44 C58 46 60 54 66 54`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M40 30 C44 36 44 44 40 50`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M56 30 C52 36 52 44 56 50`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M44 70 C44 82 44 88 42 92`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M52 70 C52 82 52 88 54 92`})]})},lung:{outline:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{d:`M44 22 C44 40 42 58 36 74 C30 88 18 86 14 74 C10 60 14 40 26 26 C32 19 40 18 44 22 Z`}),(0,C.jsx)(`path`,{d:`M56 22 C56 40 58 58 64 74 C70 88 82 86 86 74 C90 60 86 40 74 26 C68 19 60 18 56 22 Z`})]}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-tube`,d:`M50 8 L50 30`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M50 30 C44 32 40 38 36 46`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M50 30 C56 32 60 38 64 46`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M36 46 C32 52 30 58 28 64`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M64 46 C68 52 70 58 72 64`})]})},eye:{outline:(0,C.jsx)(`path`,{d:`M8 50 C24 28 76 28 92 50 C76 72 24 72 8 50 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`circle`,{className:`an-cavity`,cx:`50`,cy:`50`,r:`20`}),(0,C.jsx)(`circle`,{className:`an-node`,cx:`50`,cy:`50`,r:`9`}),(0,C.jsx)(`circle`,{className:`an-glint`,cx:`44`,cy:`44`,r:`3`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M14 50 C20 46 26 45 30 45`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M86 50 C80 54 74 55 70 55`})]})},ear:{outline:(0,C.jsx)(`path`,{d:`M62 12 C40 8 24 24 24 46 C24 64 32 78 30 88 C28 94 34 96 40 92 C46 88 44 78 50 74 C58 68 60 58 54 54 C48 50 52 42 58 44 C66 46 72 38 70 28 C69 20 67 14 62 12 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-fold`,d:`M58 20 C46 18 36 28 36 42 C36 52 40 58 40 64`}),(0,C.jsx)(`path`,{className:`an-cavity`,d:`M50 40 C44 40 42 48 48 50 C54 52 56 44 50 40 Z`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M48 50 C40 54 36 60 34 66`})]})},neuron:{outline:(0,C.jsx)(`circle`,{cx:`42`,cy:`50`,r:`14`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`circle`,{className:`an-node`,cx:`42`,cy:`50`,r:`5`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M30 42 C20 34 14 32 8 30`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M30 50 C20 50 14 52 8 54`}),(0,C.jsx)(`path`,{className:`an-tube`,d:`M32 60 C24 66 18 70 12 74`}),(0,C.jsx)(`path`,{className:`an-axon`,d:`M56 50 L82 50`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M82 50 C88 44 92 44 96 42`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M82 50 C88 56 92 56 96 58`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M82 50 L96 50`})]})},skeleton:{outline:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{d:`M50 8 C58 8 62 16 62 22 C62 28 58 32 50 32 C42 32 38 28 38 22 C38 16 42 8 50 8 Z`}),(0,C.jsx)(`path`,{d:`M50 32 L50 66`}),(0,C.jsx)(`path`,{d:`M46 70 C46 66 54 66 54 70 L58 88 C58 92 42 92 42 88 Z`})]}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-bone`,d:`M50 38 C40 40 30 44 26 50`}),(0,C.jsx)(`path`,{className:`an-bone`,d:`M50 38 C60 40 70 44 74 50`}),(0,C.jsx)(`path`,{className:`an-bone`,d:`M50 46 C40 48 32 52 28 58`}),(0,C.jsx)(`path`,{className:`an-bone`,d:`M50 46 C60 48 68 52 72 58`}),(0,C.jsx)(`path`,{className:`an-bone`,d:`M50 54 C42 56 36 60 32 66`}),(0,C.jsx)(`path`,{className:`an-bone`,d:`M50 54 C58 56 64 60 68 66`}),(0,C.jsx)(`path`,{className:`an-bone`,d:`M44 36 L56 36 M44 44 L56 44 M44 52 L56 52`})]})},stomach:{outline:(0,C.jsx)(`path`,{d:`M30 14 C30 22 32 28 36 34 C42 42 44 54 44 64 C44 78 54 88 66 88 C80 88 86 76 84 64 C82 52 74 46 66 44 C58 42 54 36 54 28 C54 22 52 18 48 16 C42 13 34 12 30 14 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-tube`,d:`M40 6 C36 6 32 9 30 14`}),(0,C.jsx)(`path`,{className:`an-tube an-tube-dn`,d:`M82 70 C90 70 94 78 94 86`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M48 40 C56 44 60 52 60 62`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M44 50 C52 54 56 62 56 70`}),(0,C.jsx)(`path`,{className:`an-fold`,d:`M52 62 C60 66 64 72 64 78`})]})},liver:{outline:(0,C.jsx)(`path`,{d:`M10 38 C10 30 18 26 30 26 C50 26 70 28 86 34 C92 36 92 44 88 50 C80 62 62 70 42 70 C24 70 12 60 10 48 C10 45 10 41 10 38 Z`}),detail:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`path`,{className:`an-septum`,d:`M52 28 L52 66`}),(0,C.jsx)(`path`,{className:`an-cavity`,d:`M40 62 C40 70 36 76 32 76 C28 76 26 70 30 64`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M52 50 C44 52 38 56 34 60`}),(0,C.jsx)(`path`,{className:`an-vessel`,d:`M52 50 C62 52 70 54 76 56`})]})}};function ae({title:e,icon:t=`spark`,iconColor:n=`var(--danger)`,organ:r,pins:i,view:a,caption:o,footer:l,delay:u}){let d=s[t]||s.spark,[f,p]=(0,S.useState)(0),m=ie[r]??ie.heart;return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`an-wrap`,children:[(0,C.jsxs)(`div`,{className:`an-figbox`,children:[a&&(0,C.jsx)(`span`,{className:`an-view`,children:a}),(0,C.jsxs)(`svg`,{viewBox:`0 0 100 100`,className:`an-svg`,role:`img`,"aria-label":e||r,children:[(0,C.jsx)(`g`,{className:`an-organ`,children:m.outline}),m.detail&&(0,C.jsx)(`g`,{className:`an-organ-detail`,children:m.detail}),i.map((e,t)=>{let n=t===f,r=re(e.x),i=re(e.y);return(0,C.jsxs)(`g`,{className:`an-pin`+(n?` on`:``),onMouseEnter:()=>p(t),onClick:()=>p(t),children:[n&&(0,C.jsx)(`circle`,{cx:r,cy:i,r:5.4,className:`an-pin-halo`}),(0,C.jsx)(`circle`,{cx:r,cy:i,r:3.4,className:`an-pin-dot`,...t===0?{"data-mark":`point`}:{}}),(0,C.jsx)(`text`,{x:r,y:i,className:`an-pin-num`,children:t+1})]},t)})]})]}),(0,C.jsx)(`div`,{className:`an-list`,children:i.map((e,t)=>(0,C.jsxs)(`button`,{className:`an-row`+(t===f?` on`:``),onMouseEnter:()=>p(t),onClick:()=>p(t),children:[(0,C.jsx)(`span`,{className:`an-rownum`,children:t+1}),(0,C.jsxs)(`span`,{className:`an-rowbody`,children:[(0,C.jsx)(`span`,{className:`an-rowtitle`,children:e.label}),e.note&&(0,C.jsx)(`span`,{className:`an-rownote`,children:e.note})]})]},t))})]}),o&&(0,C.jsx)(`div`,{className:`an-caption`,children:o}),l&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(l)})]})}var oe=[{axis:`aperture`,label:`Aperture`,x:50,y:16,trade:`depth of field`,accent:`var(--presence)`},{axis:`shutter`,label:`Shutter`,x:16,y:78,trade:`motion`,accent:`var(--insight)`},{axis:`iso`,label:`ISO`,x:84,y:78,trade:`noise`,accent:`var(--warning)`}];function se({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,aperture:r,shutter:i,iso:a,ev:o,effects:l,caption:u,footer:d,delay:f}){let p=s[t]||s.image,m={aperture:r,shutter:i,iso:`ISO ${a}`},h=e=>l?.find(t=>t.axis===e)?.note;return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`ex-figwrap`,children:(0,C.jsxs)(`svg`,{viewBox:`0 0 100 96`,className:`ex-svg`,role:`img`,"aria-label":e,children:[(0,C.jsx)(`polygon`,{points:oe.map(e=>`${e.x},${e.y}`).join(` `),className:`ex-tri`}),oe.map((e,t)=>{let n=oe[(t+1)%oe.length],r=(e.x+n.x)/2,i=(e.y+n.y)/2;return(0,C.jsx)(`line`,{x1:e.x,y1:e.y,x2:r,y2:i,className:`ex-edge`,markerEnd:`url(#ex-arrow)`},`e${t}`)}),(0,C.jsx)(`defs`,{children:(0,C.jsx)(`marker`,{id:`ex-arrow`,viewBox:`0 0 10 10`,refX:`8`,refY:`5`,markerWidth:`5`,markerHeight:`5`,orient:`auto`,children:(0,C.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`context-stroke`})})}),(0,C.jsx)(`circle`,{cx:50,cy:57,r:13,className:`ex-ev`}),(0,C.jsx)(`text`,{x:50,y:54,className:`ex-ev-k`,children:`EXPOSURE`}),(0,C.jsx)(`text`,{x:50,y:62,className:`ex-ev-v`,children:o||`balanced`}),oe.map((e,t)=>(0,C.jsxs)(`g`,{style:{"--cc":e.accent},children:[(0,C.jsx)(`circle`,{cx:e.x,cy:e.y,r:4,className:`ex-node`,...t===0?{"data-mark":`point`}:{}}),(0,C.jsx)(`text`,{x:e.x,y:e.y-7,className:`ex-node-k`,children:e.label.toUpperCase()}),(0,C.jsx)(`text`,{x:e.x,y:e.y+(e.y<40?-14:11),className:`ex-node-v`,children:m[e.axis]})]},e.axis))]})}),(0,C.jsx)(`div`,{className:`ex-cues`,children:oe.map(e=>{let t=h(e.axis);return(0,C.jsxs)(`div`,{className:`ex-cue`,style:{"--cc":e.accent},children:[(0,C.jsx)(`span`,{className:`ex-cue-dot`}),(0,C.jsxs)(`span`,{className:`ex-cue-body`,children:[(0,C.jsx)(`span`,{className:`ex-cue-k`,children:e.trade}),(0,C.jsx)(`span`,{className:`ex-cue-v`,children:t||m[e.axis]})]})]},e.axis)})}),u&&(0,C.jsx)(`div`,{className:`ex-caption`,children:u}),d&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(d)})]})}var ce=50,le=50,ue=44,de=30,fe={complementary:[0,180],analogous:[0,30,-30],triad:[0,120,240],split:[0,150,210],tetrad:[0,90,180,270]},pe=e=>(e%360+360)%360;function me(e,t){let n=(pe(e)-90)*(Math.PI/180);return[ce+t*Math.cos(n),le+t*Math.sin(n)]}function he(e,t){let[n,r]=me(e,ue),[i,a]=me(t,ue),[o,s]=me(t,de),[c,l]=me(e,de),u=+(t-e>180);return`M${n} ${r} A${ue} ${ue} 0 ${u} 1 ${i} ${a} L${o} ${s} A${de} ${de} 0 ${u} 0 ${c} ${l} Z`}function ge(e){let t=pe(e)/360,n=.8999999999999999*.72,r=n*(1-Math.abs(t*6%2-1)),i=Math.floor(t*6)%6,[a,o,s]=[[n,r,0],[r,n,0],[0,n,r],[0,r,n],[r,0,n],[n,0,r]][i],c=e=>Math.round((e+.2260000000000001)*255).toString(16).padStart(2,`0`);return`#${c(a)}${c(o)}${c(s)}`}function _e({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,baseHue:r,harmony:i=`complementary`,swatches:a,caption:o,footer:l,delay:u}){let d=s[t]||s.spark,f=fe[i]??fe.complementary,p=a&&a.length>0?a:f.map((e,t)=>({hue:pe(r+e),hex:ge(r+e),role:t===0?`base`:`accent`})),m=p.map(e=>pe(e.hue));return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`cw-wrap`,children:[(0,C.jsx)(`div`,{className:`cw-figbox`,children:(0,C.jsxs)(`svg`,{viewBox:`0 0 100 100`,className:`cw-svg`,role:`img`,"aria-label":e,children:[Array.from({length:60},(e,t)=>(0,C.jsx)(`path`,{d:he(t*6,(t+1)*6),fill:ge(t*6)},t)),(0,C.jsx)(`circle`,{cx:ce,cy:le,r:de,className:`cw-hub`}),m.map((e,t)=>{let[n,r]=me(e,de),[i,a]=me(e,48),o=p[t]?.hex??ge(e),s=t===0;return(0,C.jsxs)(`g`,{children:[(0,C.jsx)(`line`,{x1:ce,y1:le,x2:n,y2:r,className:`cw-spoke`}),(0,C.jsx)(`circle`,{cx:i,cy:a,r:s?4:3,className:`cw-marker`+(s?` base`:``),fill:o,...s?{"data-mark":`point`}:{}})]},`m${t}`)}),(0,C.jsx)(`circle`,{cx:ce,cy:le,r:2.4,className:`cw-center`})]})}),(0,C.jsxs)(`div`,{className:`cw-list`,children:[(0,C.jsx)(`div`,{className:`cw-harmony`,children:i}),p.map((e,t)=>(0,C.jsxs)(`div`,{className:`cw-chip`,children:[(0,C.jsx)(`span`,{className:`cw-chip-sw`,style:{background:e.hex}}),(0,C.jsxs)(`span`,{className:`cw-chip-body`,children:[(0,C.jsx)(`span`,{className:`cw-chip-hex tab-num`,children:e.hex}),e.role&&(0,C.jsx)(`span`,{className:`cw-chip-role`,children:e.role})]})]},t))]})]}),o&&(0,C.jsx)(`div`,{className:`cw-caption`,children:o}),l&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(l)})]})}var R=160,z=100,ve=e=>e/100*R,ye=e=>e/100*z,be=(e,t,n)=>Math.max(t,Math.min(n,e)),xe=2.6;function Se(e,t){let n=Math.max(3,Math.floor((t-5)/xe));return e.length>n?e.slice(0,n-1).trimEnd()+`…`:e}function Ce(e){switch(e){case`leadinglines`:{let e=2/3*R,t=1/3*z;return(0,C.jsxs)(`g`,{className:`art-guide`,children:[(0,C.jsx)(`line`,{x1:0,y1:z,x2:e,y2:t}),(0,C.jsx)(`line`,{x1:R,y1:z,x2:e,y2:t}),(0,C.jsx)(`line`,{x1:0,y1:0,x2:e,y2:t}),(0,C.jsx)(`circle`,{cx:e,cy:t,r:3.2,className:`art-guide-node`})]})}case`goldenratio`:{let e=1.618,t=R/e,n=z/e,r=R-t,i=t-(R-t)/e;return(0,C.jsxs)(`g`,{className:`art-guide`,children:[(0,C.jsx)(`line`,{x1:t,y1:0,x2:t,y2:z}),(0,C.jsx)(`line`,{x1:0,y1:n,x2:R,y2:n}),(0,C.jsx)(`path`,{d:`M${R} ${n} A${r} ${r} 0 0 1 ${t} ${z} A${t} ${t} 0 0 1 0 ${n} A${i} ${i} 0 0 1 ${t-i} ${z-i*e}`,className:`art-guide-arc`}),(0,C.jsx)(`circle`,{cx:t,cy:n,r:3.2,className:`art-guide-node`})]})}case`symmetry`:{let e=R/2;return(0,C.jsxs)(`g`,{className:`art-guide`,children:[(0,C.jsx)(`line`,{x1:e,y1:0,x2:e,y2:z,className:`art-guide-axis`}),[.3,.5,.7].map((t,n)=>(0,C.jsxs)(`g`,{children:[(0,C.jsx)(`line`,{x1:e-22,y1:z*t,x2:e-12,y2:z*t}),(0,C.jsx)(`line`,{x1:92,y1:z*t,x2:102,y2:z*t})]},n))]})}default:{let e=[R/3,R*2/3],t=[z/3,z*2/3];return(0,C.jsxs)(`g`,{className:`art-guide`,children:[e.map((e,t)=>(0,C.jsx)(`line`,{x1:e,y1:0,x2:e,y2:z},`c${t}`)),t.map((e,t)=>(0,C.jsx)(`line`,{x1:0,y1:e,x2:R,y2:e},`r${t}`)),e.flatMap(e=>t.map(t=>[e,t])).map(([e,t],n)=>(0,C.jsx)(`circle`,{cx:e,cy:t,r:2.4,className:`art-guide-node`},`p${n}`))]})}}}function we({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,overlay:r=`thirds`,regions:i,palette:a,notes:o,caption:l,footer:u,delay:d}){let f=s[t]||s.image;return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`art-figwrap`,children:(0,C.jsxs)(`svg`,{viewBox:`0 0 ${R} ${z}`,className:`art-svg`,role:`img`,"aria-label":e,children:[(0,C.jsx)(`defs`,{children:(0,C.jsxs)(`linearGradient`,{id:`art-field`,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,C.jsx)(`stop`,{offset:`0%`,stopColor:`color-mix(in oklab, var(--presence) 22%, var(--surface-elevated))`}),(0,C.jsx)(`stop`,{offset:`55%`,stopColor:`var(--surface-elevated)`}),(0,C.jsx)(`stop`,{offset:`100%`,stopColor:`color-mix(in oklab, var(--insight) 20%, var(--surface-elevated))`})]})}),(0,C.jsx)(`rect`,{x:0,y:0,width:R,height:z,fill:`url(#art-field)`}),Ce(r),(i??[]).map((e,t)=>{let n=ve(be(e.x,0,100)),r=ye(be(e.y,0,100)),i=Math.min(ve(e.w),R-n);return(0,C.jsxs)(`g`,{className:`art-region`,children:[(0,C.jsx)(`rect`,{x:n,y:r,width:i,height:Math.min(ye(e.h),z-r),rx:2,className:`art-region-box`,...t===0?{"data-mark":`box`}:{}}),(0,C.jsxs)(`text`,{x:n+2.5,y:r+6.5,className:`art-region-lbl`,children:[Se(e.label,i)!==e.label&&(0,C.jsx)(`title`,{children:e.label}),Se(e.label,i)]})]},t)})]})}),a&&a.length>0&&(0,C.jsx)(`div`,{className:`art-palette`,children:a.map((e,t)=>(0,C.jsxs)(`div`,{className:`art-pal-chip`,title:e.hex,children:[(0,C.jsx)(`span`,{className:`art-pal-sw`,style:{background:e.hex}}),(0,C.jsxs)(`span`,{className:`art-pal-meta`,children:[(0,C.jsx)(`span`,{className:`art-pal-hex tab-num`,children:e.hex}),e.role&&(0,C.jsx)(`span`,{className:`art-pal-role`,children:e.role})]})]},t))}),o&&o.length>0&&(0,C.jsx)(`div`,{className:`art-notes`,children:o.map((e,t)=>(0,C.jsxs)(`div`,{className:`art-note`,children:[(0,C.jsx)(`span`,{className:`art-note-k`,children:e.label}),(0,C.jsx)(`span`,{className:`art-note-v`,children:e.text})]},t))}),l&&(0,C.jsx)(`div`,{className:`art-caption`,children:l}),u&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(u)})]})}var Te=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--insight-soft)`];function Ee(e){return(e.clips??[]).reduce((e,t)=>Math.max(e,t.start+Math.max(0,t.len)),0)}function De({title:e,icon:t=`sliders`,iconColor:n=`var(--presence)`,tracks:r,bars:i,caption:a,footer:o,delay:l}){let u=s[t]||s.sliders,d=Math.max(4,i??(r.reduce((e,t)=>Math.max(e,Ee(t)),0)||4)),f=d<=16?1:Math.ceil(d/12),p=[];for(let e=0;e<=d;e+=f)p.push(e);return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[e&&(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`mx-board`,children:[(0,C.jsxs)(`div`,{className:`mx-ruler`,children:[(0,C.jsx)(`span`,{className:`mx-ruler-head`}),(0,C.jsx)(`div`,{className:`mx-ruler-track`,children:p.map(e=>(0,C.jsx)(`span`,{className:`mx-ruler-tick`,style:{left:e/d*100+`%`},children:e+1},e))})]}),r.map((e,t)=>{let n=e.color||Te[t%Te.length],r=Math.max(0,Math.min(100,e.volume??80)),i=Math.max(-100,Math.min(100,e.pan??0)),a=(i+100)/2,o=i===0?`C`:(i<0?`L`:`R`)+Math.round(Math.abs(i));return(0,C.jsxs)(`div`,{className:`mx-lane`+(e.mute?` muted`:``)+(e.solo?` soloed`:``),style:{"--cc":n},children:[(0,C.jsxs)(`div`,{className:`mx-head`,children:[(0,C.jsxs)(`div`,{className:`mx-head-top`,children:[(0,C.jsx)(`span`,{className:`mx-name`,children:e.name}),(0,C.jsxs)(`span`,{className:`mx-flags`,children:[(0,C.jsx)(`span`,{className:`mx-flag m`+(e.mute?` on`:``),children:`M`}),(0,C.jsx)(`span`,{className:`mx-flag s`+(e.solo?` on`:``),children:`S`})]})]}),(0,C.jsxs)(`div`,{className:`mx-controls`,children:[(0,C.jsx)(`span`,{className:`mx-vol`,title:`Volume ${r}`,children:(0,C.jsx)(`span`,{className:`mx-vol-fill`,style:{width:r+`%`}})}),(0,C.jsxs)(`span`,{className:`mx-pan`,title:`Pan ${o}`,children:[(0,C.jsx)(`span`,{className:`mx-pan-mid`}),(0,C.jsx)(`span`,{className:`mx-pan-thumb`,style:{left:a+`%`}})]}),(0,C.jsx)(`span`,{className:`mx-pan-lbl tab-num`,children:o})]})]}),(0,C.jsxs)(`div`,{className:`mx-timeline`,children:[p.map(e=>(0,C.jsx)(`span`,{className:`mx-grid`,style:{left:e/d*100+`%`},"aria-hidden":!0},e)),(e.clips??[]).map((e,n)=>{let r=Math.max(0,e.start)/d*100,i=Math.max(0,Math.min(e.len,d-e.start))/d*100;return(0,C.jsx)(`span`,{className:`mx-clip`,style:{left:r+`%`,width:i+`%`},title:e.label,...t===0&&n===0?{"data-mark":`box`}:{},children:e.label&&(0,C.jsx)(`span`,{className:`mx-clip-lbl`,children:e.label})},n)})]})]},t)})]}),a&&(0,C.jsx)(`div`,{className:`mx-caption`,children:a}),o&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:c(o)})]})}function Oe({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,before:r,after:i,position:a=50,footer:o,delay:c}){let l=s[t]||s.image,[u,d]=(0,S.useState)(Math.max(2,Math.min(98,a))),[p,m]=(0,S.useState)(!1),h=(0,S.useRef)(null),g=f(r.src),_=f(i.src),v=e=>{let t=h.current;if(!t)return;let n=t.getBoundingClientRect(),r=(e-n.left)/n.width*100;d(Math.max(2,Math.min(98,r)))},y=e=>{m(!0),e.target.setPointerCapture?.(e.pointerId),v(e.clientX)},b=e=>{p&&v(e.clientX)},w=()=>m(!1);return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`me-ba`+(p?` dragging`:``),ref:h,onPointerMove:b,onPointerUp:w,onPointerLeave:w,children:[(0,C.jsxs)(`div`,{className:`me-ba-plate`,style:{background:`linear-gradient(135deg, ${x(i.from,`var(--presence-deep)`)}, ${x(i.to,`var(--presence-soft)`)})`},children:[_&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:_,alt:``,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),(0,C.jsx)(`span`,{className:`me-ba-tag right`,children:i.label})]}),(0,C.jsxs)(`div`,{className:`me-ba-plate me-ba-before`,style:{background:`linear-gradient(135deg, ${x(r.from,`var(--presence-deep)`)}, ${x(r.to,`var(--presence-soft)`)})`,clipPath:`inset(0 ${100-u}% 0 0)`},children:[g&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:g,alt:``,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),(0,C.jsx)(`span`,{className:`me-ba-tag left`,children:r.label})]}),(0,C.jsx)(`div`,{className:`me-ba-divider`,style:{left:u+`%`},"data-interactive":!0,onPointerDown:y,children:(0,C.jsxs)(`span`,{className:`me-ba-handle`,children:[(0,C.jsx)(s.chevR,{className:`me-ba-arrow flip`}),(0,C.jsx)(s.chevR,{className:`me-ba-arrow`})]})})]}),(0,C.jsxs)(`div`,{className:`me-ba-caps`,children:[(0,C.jsx)(`span`,{className:`faint`,children:r.caption||`Before`}),(0,C.jsxs)(`span`,{className:`tab-num me-ba-pct`,children:[Math.round(u),`%`]}),(0,C.jsx)(`span`,{className:`faint`,children:i.caption||`After`})]}),(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:o||(0,C.jsx)(`span`,{className:`faint`,children:`Drag the divider to wipe between the two versions`})})]})}function ke({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,slides:r,start:i=0,footer:a,delay:o}){let c=s[t]||s.image,l=r.length,[u,d]=(0,S.useState)(Math.max(0,Math.min(l-1,i))),[p,m]=(0,S.useState)(0),h=(0,S.useRef)(null),g=e=>d(l>0?(e+l)%l:0),_=e=>{h.current=e.clientX,e.target.setPointerCapture?.(e.pointerId)},v=e=>{h.current!=null&&m(e.clientX-h.current)},y=()=>{Math.abs(p)>48&&g(u+(p<0?1:-1)),h.current=null,m(0)};return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(o||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`me-carousel`,children:[(0,C.jsx)(`div`,{className:`me-car-track`,style:{transform:`translateX(calc(${-u*100}% + ${p}px))`},"data-interactive":!0,onPointerDown:_,onPointerMove:v,onPointerUp:y,onPointerLeave:y,children:r.map((e,t)=>{let n=f(e.src);return(0,C.jsxs)(`div`,{className:`me-car-slide`,children:[(0,C.jsxs)(`div`,{className:`me-car-img`,style:{background:`linear-gradient(135deg, ${x(e.from,`var(--presence-deep)`)}, ${x(e.to,`var(--presence-soft)`)})`},...t===0?{"data-mark":`circle`}:{},children:[n&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:n,alt:``,loading:`lazy`,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),e.tag&&(0,C.jsx)(`span`,{className:`me-car-tag`,children:e.tag}),(0,C.jsx)(`span`,{className:`me-car-label`,children:e.label})]}),e.caption&&(0,C.jsx)(`div`,{className:`me-car-cap`,children:e.caption})]},t)})}),(0,C.jsx)(`button`,{className:`me-car-arrow left`,onClick:()=>g(u-1),"aria-label":`Previous`,children:(0,C.jsx)(s.chevR,{className:`flip`})}),(0,C.jsx)(`button`,{className:`me-car-arrow right`,onClick:()=>g(u+1),"aria-label":`Next`,children:(0,C.jsx)(s.chevR,{})})]}),(0,C.jsxs)(`div`,{className:`me-car-dots`,children:[r.map((e,t)=>(0,C.jsx)(`button`,{className:`me-dot`+(t===u?` on`:``),onClick:()=>d(t),"aria-label":`Slide ${t+1}`},t)),(0,C.jsxs)(`span`,{className:`tab-num me-car-count`,children:[u+1,`/`,l]})]}),a&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:a})]})}var Ae=e=>Math.max(2,Math.min(98,e));function je({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,image:r,callouts:i,footer:a,delay:o}){let c=s[t]||s.image,[l,u]=(0,S.useState)(0),d=f(r.src);return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(o||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`me-ico-wrap`,children:[(0,C.jsxs)(`div`,{className:`me-ico-img`,style:{background:`linear-gradient(135deg, ${x(r.from,`var(--presence-deep)`)}, ${x(r.to,`var(--presence-soft)`)})`},children:[d&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:d,alt:``,loading:`lazy`,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),r.label&&(0,C.jsx)(`span`,{className:`me-ico-imglabel`,children:r.label}),i.map((e,t)=>{let n=e.color||`var(--presence)`;return(0,C.jsx)(`button`,{className:`me-ico-pin`+(t===l?` on`:``),style:{left:Ae(e.x)+`%`,top:Ae(e.y)+`%`,"--cc":n},onMouseEnter:()=>u(t),onClick:()=>u(t),"aria-label":e.label,...t===0?{"data-mark":`circle`}:{},children:(0,C.jsx)(`span`,{className:`me-ico-num`,children:t+1})},t)})]}),(0,C.jsx)(`div`,{className:`me-ico-list`,children:i.map((e,t)=>{let n=e.color||`var(--presence)`;return(0,C.jsxs)(`button`,{className:`me-ico-row`+(t===l?` on`:``),style:{"--cc":n},onMouseEnter:()=>u(t),onClick:()=>u(t),children:[(0,C.jsx)(`span`,{className:`me-ico-rownum`,children:t+1}),(0,C.jsxs)(`span`,{className:`me-ico-rowbody`,children:[(0,C.jsx)(`span`,{className:`me-ico-rowtitle`,children:e.label}),e.detail&&(0,C.jsx)(`span`,{className:`me-ico-rowdetail`,children:e.detail})]})]},t)})})]}),a&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:a})]})}function Me(e,t){let n=(t||`0:00`).split(`:`).map(e=>parseInt(e,10)||0),r=n.length===2?n[0]*60+n[1]:n[0],i=Math.round(r*e/100);return`${Math.floor(i/60)}:${String(i%60).padStart(2,`0`)}`}function Ne({title:e,icon:t=`speaker`,iconColor:n=`var(--presence)`,bars:r,durationLabel:i=`3:24`,color:a=`var(--presence)`,position:o=32,markers:c=[],footer:l,delay:u}){let d=s[t]||s.speaker,[f,p]=(0,S.useState)(Math.max(0,Math.min(100,o))),[m,h]=(0,S.useState)(!0),[g,_]=(0,S.useState)(!1),v=(0,S.useRef)(null),y=e=>{let t=v.current;if(!t)return;let n=t.getBoundingClientRect();p(Math.max(0,Math.min(100,(e-n.left)/n.width*100)))};return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`me-wave-row`,children:[(0,C.jsx)(`button`,{className:`me-wave-play`+(m?` on`:``),style:{"--cc":a},onClick:()=>h(e=>!e),"aria-label":m?`Pause`:`Play`,children:m?(0,C.jsxs)(`span`,{className:`me-wave-pause`,children:[(0,C.jsx)(`i`,{}),(0,C.jsx)(`i`,{})]}):(0,C.jsx)(s.play,{})}),(0,C.jsxs)(`div`,{className:`me-wave`+(g?` dragging`:``),ref:v,"data-interactive":!0,onPointerDown:e=>{_(!0),e.target.setPointerCapture?.(e.pointerId),y(e.clientX)},onPointerMove:e=>g&&y(e.clientX),onPointerUp:()=>_(!1),onPointerLeave:()=>_(!1),children:[r.map((e,t)=>{let n=(r.length>1?t/(r.length-1)*100:0)<=f;return(0,C.jsx)(`span`,{className:`me-wave-bar`,style:{height:Math.max(8,e*100)+`%`,background:n?a:`var(--track)`}},t)}),c.map((e,t)=>(0,C.jsx)(`span`,{className:`me-wave-marker`,style:{left:e.at+`%`},title:e.label,...t===0?{"data-mark":`point`}:{}},t)),(0,C.jsx)(`span`,{className:`me-wave-head`,style:{left:f+`%`,"--cc":a}})]}),(0,C.jsxs)(`span`,{className:`tab-num me-wave-time`,children:[Me(f,i),` `,(0,C.jsxs)(`span`,{className:`faint`,children:[`/ `,i]})]})]}),(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:l||(0,C.jsx)(`span`,{className:`faint`,children:`Click or drag the waveform to scrub`})})]})}function Pe({title:e,icon:t=`play`,iconColor:n=`var(--presence)`,thumb:r,video:i,poster:a,durationLabel:o=`12:40`,chapters:c,active:l=0,footer:u,delay:p}){let m=s[t]||s.play,h=f(a),g=d(i),[_,v]=(0,S.useState)(Math.max(0,Math.min(c.length-1,l))),[y,b]=(0,S.useState)(!1),w=(0,S.useRef)(null),T=e=>Math.max(0,Math.min(100,c[e]?.at??0)),E=T(_),D=e=>{v(e);let t=w.current;t&&t.duration&&(t.currentTime=T(e)/100*t.duration)};return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsxs)(`div`,{className:`me-vid`,children:[g?(0,C.jsx)(`video`,{ref:w,className:`me-vid-real`,src:g,poster:h,controls:!0,preload:`metadata`,playsInline:!0,children:(0,C.jsx)(`track`,{kind:`captions`,srcLang:`en`,label:`English`,src:`data:text/vtt,WEBVTT`})}):(0,C.jsxs)(`div`,{className:`me-vid-thumb`,style:{background:`linear-gradient(135deg, ${x(r.from,`var(--presence-deep)`)}, ${x(r.to,`var(--presence-soft)`)})`},children:[r.label&&(0,C.jsx)(`span`,{className:`me-vid-overlaylabel`,children:r.label}),(0,C.jsx)(`span`,{className:`me-vid-dur tab-num`,children:o}),(0,C.jsx)(`button`,{className:`me-vid-playbtn`+(y?` playing`:``),onClick:()=>b(e=>!e),"aria-label":y?`Pause`:`Play`,children:y?(0,C.jsxs)(`span`,{className:`me-vid-pause`,children:[(0,C.jsx)(`i`,{}),(0,C.jsx)(`i`,{})]}):(0,C.jsx)(s.play,{})}),(0,C.jsxs)(`div`,{className:`me-vid-scrub`,children:[(0,C.jsx)(`span`,{className:`me-vid-scrub-fill`,style:{width:E+`%`}}),c.map((e,t)=>(0,C.jsx)(`span`,{className:`me-vid-tick`+(t===_?` on`:``),style:{left:T(t)+`%`}},t))]})]}),c.length>0&&(0,C.jsx)(`div`,{className:`me-vid-chapters`,role:`listbox`,"aria-label":`Chapters`,tabIndex:0,onKeyDown:e=>{e.key===`ArrowDown`||e.key===`ArrowRight`?(e.preventDefault(),D(Math.min(c.length-1,_+1))):(e.key===`ArrowUp`||e.key===`ArrowLeft`)&&(e.preventDefault(),D(Math.max(0,_-1)))},children:c.map((e,t)=>(0,C.jsxs)(`button`,{className:`me-vid-chap`+(t===_?` on`:``),onClick:()=>D(t),role:`option`,"aria-selected":t===_,children:[(0,C.jsx)(`span`,{className:`me-vid-chaptime tab-num`,children:e.time}),(0,C.jsx)(`span`,{className:`me-vid-chaptitle`,...t===_?{"data-mark":`underline`}:{},children:e.title}),t===_&&(0,C.jsx)(s.play,{className:`me-vid-chapnow`})]},t))})]}),(u||c.length>0)&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:u||(0,C.jsxs)(`span`,{children:[`Now at`,` `,(0,C.jsx)(`strong`,{style:{color:`var(--text-primary)`},children:c[_]?.title})]})})]})}i();var Fe=`© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> © <a href="https://carto.com/attributions">CARTO</a>`,Ie=e=>`https://{s}.basemaps.cartocdn.com/${e?`light_all`:`dark_all`}/{z}/{x}/{y}{r}.png`,Le=e=>{let t=e?.closest(`.figure-embed`);return t?t.getAttribute(`data-theme-mode`)!==`dark`:typeof document<`u`&&document.documentElement.getAttribute(`data-theme`)===`light`},Re=e=>e.replace(/[&<>"]/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`})[e]),ze=new Set([`residential`,`commercial`,`industrial`,`mixed`,`open-space`]),Be={residential:`var(--presence)`,commercial:`var(--warning)`,industrial:`var(--danger)`,mixed:`var(--presence-soft)`,"open-space":`var(--insight)`},Ve={residential:`Residential`,commercial:`Commercial`,industrial:`Industrial`,mixed:`Mixed use`,"open-space":`Open space`};function He(e){return Array.isArray(e)?e.map(e=>{let t=(Array.isArray(e?.coords)?e.coords:[]).filter(e=>Array.isArray(e)&&e.length===2&&Number.isFinite(e[0])&&Number.isFinite(e[1])&&Math.abs(e[0])<=90&&Math.abs(e[1])<=180);if(t.length<3)return null;let n=ze.has(e?.category)?e.category:`mixed`;return{coords:t,category:n,label:typeof e?.label==`string`&&e.label.trim()?e.label.trim():Ve[n]}}).filter(e=>e!==null):[]}function Ue({title:t,icon:n=`globe`,iconColor:r=`var(--presence)`,markers:i,zoom:a,zones:c,footer:l,delay:u}){let d=s[n]||s.globe,f=(0,S.useRef)(null),[p,m]=(0,S.useState)(!1),h=(i||[]).filter(e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng)&&Math.abs(e.lat)<=90&&Math.abs(e.lng)<=180),g=JSON.stringify(h),_=He(c),v=JSON.stringify(_),y=_.reduce((e,t)=>(e.includes(t.category)||e.push(t.category),e),[]);return(0,S.useEffect)(()=>{if(!f.current||!h.length)return;let t=!1,n=null,r=null,i=null;m(!1);let s=()=>{t||m(!0)},c=window.setTimeout(s,8e3);return(async()=>{let c=await o(()=>import(`./leaflet-src-C_xhOQY7.js`).then(t=>e(t.default,1)),__vite__mapDeps([0,1])).catch(()=>null),l=c?.default??c;if(t||!f.current||!l?.map)return;n=l.map(f.current,{scrollWheelZoom:!1,attributionControl:!0,zoomAnimation:!1}),r=l.tileLayer(Ie(Le(f.current)),{subdomains:`abcd`,maxZoom:19,attribution:Fe,crossOrigin:`anonymous`}).addTo(n),r.once(`load`,s);let u=!1;r.on(`tileerror`,()=>{u||t||!n||(u=!0,n.removeLayer(r),r=l.tileLayer(`https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`,{subdomains:`abc`,maxZoom:19,attribution:`© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>`,crossOrigin:`anonymous`}).addTo(n),r.once(`load`,s))}),_.forEach(e=>{let t=Be[e.category];l.polygon(e.coords,{color:t,weight:1.5,fillColor:t,fillOpacity:.22}).addTo(n).bindPopup(`<div class="geo-pop"><b>${Re(e.label)}</b><div class="geo-pop-d">${Re(Ve[e.category])}</div></div>`)}),h.forEach((e,t)=>{let r=x(e.color),i=l.divIcon({className:`geo-divicon`,html:`<span class="geo-pin" style="--geo-c:${Re(r)}">${t+1}</span>`,iconSize:[26,26],iconAnchor:[13,13]}),a=`https://www.google.com/maps/search/?api=1&query=${e.lat},${e.lng}`,o=`<div class="geo-pop"><b>${Re(e.name)}</b>${e.detail?`<div class="geo-pop-d">${Re(e.detail)}</div>`:``}<a class="geo-pop-a" href="${a}" target="_blank" rel="noopener noreferrer">Open in Google Maps ↗</a></div>`;l.marker([e.lat,e.lng],{icon:i}).addTo(n).bindPopup(o)});let d=h.map(e=>[e.lat,e.lng]);for(let e of _)d.push(...e.coords);d.length>1?n.fitBounds(d,{padding:[34,34]}):n.setView([h[0].lat,h[0].lng],a??13),i=new MutationObserver(()=>{u||r?.setUrl(Ie(Le(f.current)))}),i.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})})(),()=>{t=!0,window.clearTimeout(c),i?.disconnect(),n&&n.remove()}},[g,v,a]),(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(d,{className:`ic`,style:{color:r}}),` `,t]}),h.length?(0,C.jsx)(`div`,{ref:f,className:`geo-map`,"data-tiles":p?`ready`:`loading`,"aria-busy":!p}):(0,C.jsx)(`div`,{className:`geo-map geo-map-empty faint`,children:`No locations to map.`}),y.length>0&&(0,C.jsx)(`div`,{className:`geo-zone-legend`,children:y.map(e=>(0,C.jsxs)(`span`,{className:`geo-zone-chip`,children:[(0,C.jsx)(`span`,{className:`geo-zone-swatch`,style:{background:Be[e]}}),Ve[e]]},e))}),(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:l||(0,C.jsxs)(`span`,{className:`faint`,children:[`Real map · `,h.length,` location`,h.length===1?``:`s`,` · drag to explore`]})})]})}function We({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,items:r,footer:i,delay:a}){let o=s[t]||s.image,[c,l]=(0,S.useState)(null),u=r.length,d=e=>l(u>0?(e%u+u)%u:null),p=c==null?null:r[c],m=p?f(p.src):void 0;return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(a||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(o,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`me-lb-grid`,children:r.map((e,t)=>{let n=f(e.src);return(0,C.jsxs)(`button`,{className:`me-lb-thumb`,style:{background:`linear-gradient(135deg, ${x(e.from,`var(--presence-deep)`)}, ${x(e.to,`var(--presence-soft)`)})`},onClick:()=>l(t),"aria-label":e.label,children:[n&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:n,alt:``,loading:`lazy`,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),(0,C.jsx)(`span`,{className:`me-lb-thumblabel`,children:e.label}),(0,C.jsx)(`span`,{className:`me-lb-expand`,children:(0,C.jsx)(s.external,{})})]},t)})}),p&&c!=null&&(0,C.jsx)(`div`,{className:`me-lb-modal`,onClick:()=>l(null),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l(null))},children:(0,C.jsxs)(`div`,{className:`me-lb-stage`,role:`presentation`,onClick:e=>e.stopPropagation(),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&e.stopPropagation()},children:[(0,C.jsxs)(`div`,{className:`me-lb-hero`,style:{background:`linear-gradient(135deg, ${x(p.from,`var(--presence-deep)`)}, ${x(p.to,`var(--presence-soft)`)})`},children:[m&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:m,alt:``,loading:`lazy`,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),(0,C.jsx)(`span`,{className:`me-lb-herolabel`,children:p.label})]}),(0,C.jsxs)(`div`,{className:`me-lb-bar`,children:[(0,C.jsxs)(`div`,{className:`me-lb-meta`,children:[(0,C.jsx)(`span`,{className:`me-lb-metatitle`,children:p.label}),p.caption&&(0,C.jsx)(`span`,{className:`me-lb-metacap faint`,children:p.caption})]}),(0,C.jsxs)(`span`,{className:`tab-num faint`,children:[c+1,` / `,u]})]}),(0,C.jsx)(`button`,{className:`me-lb-nav left`,onClick:()=>d(c-1),"aria-label":`Previous`,children:(0,C.jsx)(s.chevR,{className:`flip`})}),(0,C.jsx)(`button`,{className:`me-lb-nav right`,onClick:()=>d(c+1),"aria-label":`Next`,children:(0,C.jsx)(s.chevR,{})}),(0,C.jsx)(`button`,{className:`me-lb-close`,onClick:()=>l(null),"aria-label":`Close`,children:(0,C.jsx)(s.x,{})})]})}),(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:i||(0,C.jsxs)(`span`,{className:`faint`,children:[`Click any thumbnail to open the lightbox · `,u,` images`]})})]})}function Ge(e){let t={gridColumn:`span ${e.span===2?2:1}`,gridRow:`span ${e.rows===2?2:1}`};return e.kind===`image`?t.background=`linear-gradient(135deg, ${x(e.from)}, ${x(e.to,`var(--presence-soft)`)})`:e.kind===`color`&&(t.background=x(e.swatch)),t}function Ke({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,tiles:r,footer:i,delay:a}){let o=s[t]||s.layers,[c,l]=(0,S.useState)(null);return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(a||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(o,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`me-mood`,children:r.map((e,t)=>{let n=f(e.src);return(0,C.jsxs)(`div`,{className:`me-mood-tile k-`+e.kind+(c===t?` lift`:``)+(c!=null&&c!==t?` fade`:``),style:Ge(e),onMouseEnter:()=>l(t),onMouseLeave:()=>l(null),children:[e.kind===`image`&&n&&(0,C.jsx)(`img`,{className:`me-img-fill`,src:n,alt:``,loading:`lazy`,decoding:`async`,onError:e=>{e.currentTarget.style.display=`none`}}),e.kind===`text`&&(0,C.jsx)(`span`,{className:`me-mood-text`,children:e.text||e.label}),e.kind===`color`&&(0,C.jsx)(`span`,{className:`me-mood-hex tab-num`,children:e.hex||``}),e.kind===`image`&&e.label&&(0,C.jsx)(`span`,{className:`me-mood-imglabel`,children:e.label})]},t)})}),i&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:i})]})}function qe({title:e,icon:t=`image`,iconColor:n=`var(--presence)`,swatches:r,footer:i,delay:a}){let o=s[t]||s.image,[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null);b(()=>l(null),c===null?null:900),b(()=>d(null),u?1400:null);let f=(e,t)=>{l(e);let n=window;typeof n.toast==`function`?n.toast(`Copied ${t}`):(navigator.clipboard?.writeText(t).catch(()=>{}),d(`Copied ${t}`))};return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(a||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(o,{className:`ic`,style:{color:n}}),` `,e]}),(0,C.jsx)(`div`,{className:`me-pal`,children:r.map((e,t)=>(0,C.jsxs)(`button`,{className:`me-pal-swatch`+(e.light?` light`:``)+(c===t?` copied`:``),style:{background:e.hex},onClick:()=>f(t,e.hex),title:`Copy ${e.hex}`,children:[(0,C.jsxs)(`span`,{className:`me-pal-top`,children:[e.contrast&&(0,C.jsx)(`span`,{className:`me-pal-contrast`,children:e.contrast}),(0,C.jsx)(`span`,{className:`me-pal-copyicon`,children:c===t?(0,C.jsx)(s.check,{}):(0,C.jsx)(s.layers,{})})]}),(0,C.jsxs)(`span`,{className:`me-pal-meta`,children:[(0,C.jsx)(`span`,{className:`me-pal-name`,children:e.name}),(0,C.jsx)(`span`,{className:`me-pal-hex tab-num`,children:c===t?`Copied`:e.hex})]})]},t))}),u&&(0,C.jsxs)(`div`,{className:`me-pal-toast`,children:[(0,C.jsx)(s.check,{}),` `,u]}),(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:i||(0,C.jsx)(`span`,{className:`faint`,children:`Click a swatch to copy its hex`})})]})}var Je=6e3,Ye=80,Xe=20,Ze=new Set(`svg.g.defs.title.desc.path.rect.circle.ellipse.line.polyline.polygon.text.tspan.textpath.lineargradient.radialgradient.stop.clippath.mask.pattern.marker.symbol.use.filter.fegaussianblur.feoffset.feblend.fecolormatrix.fecomposite.feflood.femerge.femergenode.femorphology.fedropshadow.fecomponenttransfer.fefuncr.fefuncg.fefuncb.fefunca.fedisplacementmap.feturbulence.fetile.fespecularlighting.fediffuselighting.fepointlight.fespotlight.fedistantlight`.split(`.`)),Qe=new Set([`href`,`xlink:href`,`src`]),$e=/url\(\s*['"]?\s*(?!#)/i,et=/javascript:/i,tt=/expression\s*\(|@import|behavior\s*:|-moz-binding/i,nt=new Set([`fill`,`stroke`,`stop-color`,`flood-color`,`lighting-color`]),rt=new Set([`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--danger)`,`var(--text-primary)`,`var(--text-secondary)`,`var(--text-muted)`,`var(--surface-card)`]),it=new Set([`none`,`currentcolor`,`transparent`,`context-fill`,`context-stroke`]),at=/^url\(#[\w-]+\)$/,ot=/\b(?:fill|stroke|color|stop-color)\s*:\s*(?!var\(--)[^;]+/i;function st(e){let t=e.trim();return rt.has(t)||it.has(t.toLowerCase())||at.test(t)}function ct(e,t){if(e===`fill`){let e=t.localName.toLowerCase();return e===`text`||e===`tspan`?`var(--text-primary)`:`var(--surface-card)`}return`var(--text-secondary)`}function lt(e){if(typeof e!=`string`)return null;let t=e.trim();if(!t||t.length>Je||/<!doctype|<!entity/i.test(t)||typeof DOMParser>`u`||typeof XMLSerializer>`u`)return null;let n;try{n=new DOMParser().parseFromString(t,`image/svg+xml`)}catch{return null}if(n.getElementsByTagName(`parsererror`).length>0)return null;let r=n.documentElement;if(!r||r.localName.toLowerCase()!==`svg`||(ut(r),r.getElementsByTagName(`*`).length>Ye)||r.getElementsByTagName(`text`).length>Xe)return null;let i=r.getAttribute(`viewBox`);if(!i)return null;let a=i.trim().split(/[\s,]+/).map(Number);if(a.length!==4||a.some(e=>!Number.isFinite(e))||a[2]<=0||a[3]<=0)return null;r.removeAttribute(`width`),r.removeAttribute(`height`),r.setAttribute(`width`,`100%`),r.getAttribute(`xmlns`)||r.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`);try{return new XMLSerializer().serializeToString(r)}catch{return null}}function ut(e){for(let t of Array.from(e.attributes)){let n=t.name.toLowerCase(),r=t.value;if(n.startsWith(`on`)){e.removeAttribute(t.name);continue}if(Qe.has(n)||n.endsWith(`:href`)){r.trim().startsWith(`#`)||e.removeAttribute(t.name);continue}if(nt.has(n)){st(r)||e.setAttribute(t.name,ct(n,e));continue}if(n===`style`){($e.test(r)||et.test(r)||tt.test(r)||ot.test(r))&&e.removeAttribute(t.name);continue}(et.test(r)||$e.test(r))&&e.removeAttribute(t.name)}for(let t of Array.from(e.childNodes)){let n=t.nodeType;if(n===1){let e=t;Ze.has(e.localName.toLowerCase())?ut(e):e.remove()}else (n===7||n===8)&&e.removeChild(t)}}function dt({title:e,icon:t=`sparkle`,iconColor:n=`var(--presence)`,svg:r,caption:i,footer:a,delay:o}){let l=s[t]||s.sparkle,u=(0,S.useMemo)(()=>lt(r),[r]);return(0,C.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(o||0)+`ms`},children:[(0,C.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,C.jsx)(l,{className:`ic`,style:{color:n}}),(0,C.jsx)(`span`,{className:`svgb-title`,children:e}),(0,C.jsxs)(`span`,{className:`svgb-badge`,children:[(0,C.jsx)(s.sparkle,{}),` Generated`]})]}),u===null?(0,C.jsx)(`p`,{className:`svgb-err`,children:`Couldn’t render this illustration.`}):(0,C.jsx)(`div`,{className:`svgb-wrap`,children:(0,C.jsx)(`div`,{className:`svgb-inner`,role:`img`,"aria-label":e,dangerouslySetInnerHTML:{__html:u}})}),i&&(0,C.jsx)(`p`,{className:`svgb-caption`,children:i}),u!==null&&(0,C.jsxs)(`p`,{className:`svgb-disclaimer`,role:`note`,children:[(0,C.jsx)(s.alert,{"aria-hidden":`true`}),(0,C.jsxs)(`span`,{children:[(0,C.jsx)(`strong`,{children:`AI-generated visual.`}),` It may be inaccurate or entirely wrong, including its labels, scale, relationships, or depictions. Verify important details with authoritative sources; do not treat it as evidence.`]})]}),a&&(0,C.jsx)(`div`,{className:`insight-summary`,style:{marginTop:8},dangerouslySetInnerHTML:c(a)})]})}var ft={soccer:{viewBox:`0 0 100 65`,bg:`#2d7a3a`,aspectRatio:65/100,markings:`
|
|
3
3
|
<rect x="0" y="0" width="100" height="65" fill="#2d7a3a"/>
|
|
4
4
|
<rect x="1" y="1" width="98" height="63" fill="none" stroke="rgba(255,255,255,0.7)" stroke-width="0.6"/>
|
|
5
5
|
<line x1="50" y1="1" x2="50" y2="64" stroke="rgba(255,255,255,0.5)" stroke-width="0.5"/>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{ht as r}from"./index-C7H7A1rW.js";import{n as i}from"./icons-CHVz6kv_.js";import{t as a}from"./richText-BkxJhl9N.js";import{n as o,r as s}from"./format-DlZTyeMy.js";import{a as c,i as l,n as u,r as d,t as f}from"./scale-Bcgfo6Hp.js";import{n as p,t as m}from"./motion-dfA87zbb.js";import{t as h}from"./registry-types-DMuK0vJ6.js";import{n as g}from"./fitText-CDFmCQzl.js";var _=t(),v=n();function y({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,value:r,unit:o,delta:s,deltaDir:c=`up`,color:l=`var(--presence)`,points:u,footer:d,delay:f}){let p=i[t]||i.chart,[m,h]=(0,_.useState)(Math.max(0,u.length-1)),g=u.map(e=>e.v),y=g.length?Math.min(...g):0,b=(g.length?Math.max(...g):0)-y||1,x=e=>4+e/Math.max(1,u.length-1)*212,S=e=>52-(e-y)/b*48,C=u.map((e,t)=>`${x(t)},${S(e.v)}`).join(` `),w=`4,56 ${C} 216,56`,T=u[Math.min(m,u.length-1)];return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(f||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`insight-stat`,style:{marginBottom:4},children:[(0,v.jsx)(`span`,{className:`big tab-num`,"data-mark":`underline`,style:{color:l},children:r}),s&&(0,v.jsxs)(`span`,{className:`delta ${c}`,children:[(0,v.jsx)(i.arrowUp,{className:`ic`,style:{width:13,height:13,transform:c===`down`?`rotate(180deg)`:`none`}}),s]})]}),o&&(0,v.jsx)(`div`,{className:`ss-unit faint`,children:o}),(0,v.jsxs)(`div`,{className:`ss-spark`,style:{marginTop:12},children:[(0,v.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 220 56`,className:`ss-svg`,preserveAspectRatio:`none`,children:[(0,v.jsx)(`defs`,{children:(0,v.jsxs)(`linearGradient`,{id:`ssfill`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,v.jsx)(`stop`,{offset:`0%`,stopColor:l,stopOpacity:`0.22`}),(0,v.jsx)(`stop`,{offset:`100%`,stopColor:l,stopOpacity:`0`})]})}),(0,v.jsx)(`polygon`,{points:w,fill:`url(#ssfill)`}),(0,v.jsx)(`polyline`,{points:C,fill:`none`,stroke:l,strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`}),u.map((e,t)=>(0,v.jsx)(`rect`,{x:x(t)-220/u.length/2,y:0,width:220/u.length,height:56,fill:`transparent`,onMouseEnter:()=>h(t),style:{cursor:`pointer`}},t)),(0,v.jsx)(`line`,{x1:x(m),y1:0,x2:x(m),y2:56,stroke:`var(--hover-line)`,strokeWidth:`1`}),T&&(0,v.jsx)(`circle`,{cx:x(m),cy:S(T.v),r:`3.4`,fill:l,stroke:`var(--surface-elevated)`,strokeWidth:`1.5`})]}),(0,v.jsxs)(`div`,{className:`ss-tip`,children:[(0,v.jsx)(`span`,{className:`ss-tip-v tab-num`,style:{color:l},children:T?T.v.toLocaleString():`—`}),T?.label&&(0,v.jsx)(`span`,{className:`ss-tip-l faint`,children:T.label})]})]}),d&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}function b({title:e,icon:t=`spark`,iconColor:n=`var(--insight)`,value:r,prefix:o=``,suffix:s=``,decimals:c=0,label:l,delta:u,deltaDir:d=`up`,color:f=`var(--presence)`,footer:p,delay:m}){let h=i[t]||i.spark,[g,y]=(0,_.useState)(0),b=(0,_.useRef)(0);(0,_.useEffect)(()=>{if(window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches){y(r);return}let e=performance.now()+(m||0),t=n=>{let i=Math.max(0,Math.min(1,(n-e)/1100));y(r*(1-(1-i)**3)),i<1&&(b.current=requestAnimationFrame(t))};return b.current=requestAnimationFrame(t),()=>cancelAnimationFrame(b.current)},[r,m]);let x=g.toLocaleString(void 0,{minimumFractionDigits:c,maximumFractionDigits:c});return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(m||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(h,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`ct-num tab-num`,"data-mark":`underline`,style:{color:f},children:[(0,v.jsx)(`span`,{className:`ct-affix`,children:o}),x,(0,v.jsx)(`span`,{className:`ct-affix`,children:s})]}),(0,v.jsxs)(`div`,{className:`ct-row`,children:[(0,v.jsx)(`span`,{className:`ct-label`,children:l}),u&&(0,v.jsxs)(`span`,{className:`delta ${d}`,children:[(0,v.jsx)(i.arrowUp,{className:`ic`,style:{width:13,height:13,transform:d===`down`?`rotate(180deg)`:`none`}}),u]})]}),p&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(p)})]})}function x({title:e,icon:t=`sparkle`,iconColor:n=`var(--presence)`,value:r,unit:o,narrative:s,trend:c,trendDir:l=`up`,detail:u,color:d=`var(--presence)`,footer:f,delay:p}){let m=i[t]||i.sparkle,[h,g]=(0,_.useState)(!1);return(0,v.jsxs)(`div`,{className:`card reveal hero-card stats-card`,style:{"--delay":(p||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`hero-value tab-num`,"data-mark":`underline`,style:{"--hero-c":d},children:[r,o&&(0,v.jsx)(`span`,{className:`hero-unit`,children:o})]}),s&&(0,v.jsx)(`div`,{className:`hero-narrative`,dangerouslySetInnerHTML:a(s)}),c&&(0,v.jsxs)(`div`,{className:`hero-chip ${l} ${h?`open`:``}`,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),onClick:()=>g(e=>!e),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g(e=>!e))},role:`button`,tabIndex:0,children:[(0,v.jsx)(i.arrowUp,{className:`ic`,style:{width:14,height:14,transform:l===`down`?`rotate(180deg)`:`none`}}),(0,v.jsx)(`span`,{children:c}),u&&(0,v.jsx)(i.chevR,{className:`ic hero-chip-caret`,style:{width:13,height:13}})]}),u&&(0,v.jsx)(`div`,{className:`hero-detail`,"data-open":h,dangerouslySetInnerHTML:a(u)}),f&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(f)})]})}var S=130,C=56,w=1.5;function T({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,value:r,delta:o,deltaDir:s=`up`,color:c=`var(--presence)`,bars:l,footer:u,delay:d}){let f=i[t]||i.chart,p=l.length>40?l.slice(-40):l,[m,h]=(0,_.useState)(Math.max(0,p.length-1)),g=Math.max(...p,1);return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(d||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`tt-body`,children:[(0,v.jsxs)(`div`,{className:`tt-left`,children:[(0,v.jsx)(`div`,{className:`tt-value tab-num`,"data-mark":`underline`,style:{color:c},children:r}),(0,v.jsxs)(`div`,{className:`tt-delta delta ${s}`,children:[(0,v.jsx)(i.arrowUp,{className:`ic`,style:{width:14,height:14,transform:s===`down`?`rotate(180deg)`:`none`}}),o]})]}),(0,v.jsx)(`svg`,{className:`tt-bars`,viewBox:`0 0 ${S} ${C}`,width:`100%`,height:C,preserveAspectRatio:`none`,role:`group`,"aria-label":`recent trend`,children:p.map((e,t)=>{let n=S/p.length,r=Math.max(1,n-w),i=Math.min(C,Math.max(C*.08,e/g*C));return(0,v.jsx)(`rect`,{className:`tt-bar ${t===m?`on`:``}`,x:t*n+(n-r)/2,y:C-i,width:r,height:i,rx:1.5,fill:t===m?c:`var(--track)`,onMouseEnter:()=>h(t),children:(0,v.jsx)(`title`,{children:String(e)})},t)})})]}),u&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},dangerouslySetInnerHTML:a(u)})]})}function E({title:e,icon:t=`shield`,iconColor:n=`var(--insight)`,score:r,grade:o,caption:s,color:c=`var(--insight)`,components:l=[],footer:u,delay:d}){let f=i[t]||i.shield,[p,m]=(0,_.useState)(null),h=Math.max(0,Math.min(100,r))/100,g=2*Math.PI*46;return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(d||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`sb-body`,children:[(0,v.jsxs)(`div`,{className:`sb-ring`,children:[(0,v.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 120 120`,className:`sb-svg`,children:[(0,v.jsx)(`circle`,{cx:`60`,cy:`60`,r:46,fill:`none`,stroke:`var(--track)`,strokeWidth:`9`}),(0,v.jsx)(`circle`,{cx:`60`,cy:`60`,r:46,fill:`none`,stroke:c,strokeWidth:`9`,strokeLinecap:`round`,strokeDasharray:g,strokeDashoffset:g*(1-h),transform:`rotate(-90 60 60)`,className:`sb-arc`})]}),(0,v.jsxs)(`div`,{className:`sb-center`,children:[(0,v.jsx)(`div`,{className:`sb-score tab-num`,"data-mark":`underline`,style:{color:c},children:o??Math.round(r)}),o&&(0,v.jsx)(`div`,{className:`sb-sub tab-num`,children:Math.round(r)})]})]}),(0,v.jsxs)(`div`,{className:`sb-list`,children:[s&&(0,v.jsx)(`div`,{className:`sb-caption faint`,children:s}),l.map((e,t)=>{let n=e.color||c,r=p===t;return(0,v.jsxs)(`div`,{className:`sb-comp ${r?`on`:``}`,onMouseEnter:()=>m(t),onMouseLeave:()=>m(null),children:[(0,v.jsx)(`span`,{className:`sb-comp-dot`,style:{background:n}}),(0,v.jsx)(`span`,{className:`sb-comp-label`,children:e.label}),(0,v.jsx)(`span`,{className:`sb-comp-track`,children:(0,v.jsx)(`span`,{className:`sb-comp-fill`,style:{width:e.value+`%`,background:n}})}),(0,v.jsx)(`span`,{className:`sb-comp-val tab-num`,style:r?{color:n}:void 0,children:e.value})]},t)})]})]}),u&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function D({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,percentile:r,value:o,unit:s,lowLabel:c=`p0`,highLabel:l=`p100`,color:u=`var(--presence)`,footer:d,delay:f}){let p=i[t]||i.chart,[m,h]=(0,_.useState)(!1),g=Math.max(0,Math.min(100,r)),y=Math.max(1,Math.round(100-g));return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(f||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`pb-head`,children:[(0,v.jsx)(`span`,{className:`pb-value tab-num`,"data-mark":`underline`,style:{color:u},children:o}),s&&(0,v.jsx)(`span`,{className:`pb-unit faint`,children:s}),(0,v.jsxs)(`span`,{className:`pb-pct tab-num`,children:[Math.round(g),`th pct`]})]}),(0,v.jsxs)(`div`,{className:`pb-track`,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[(0,v.jsx)(`div`,{className:`pb-grad`}),[25,50,75].map(e=>(0,v.jsx)(`span`,{className:`pb-tick`,style:{left:e+`%`}},e)),(0,v.jsx)(`div`,{className:`pb-fill`,style:{width:g+`%`,background:`color-mix(in oklab, ${u} 22%, transparent)`}}),(0,v.jsx)(`div`,{className:`pb-marker`,style:{left:g+`%`,background:u},children:(0,v.jsxs)(`span`,{className:`pb-tip ${m?`on`:``}`,style:{borderColor:u,"--pb-tip-bias":`${50-g}%`},children:[`top `,y,`%`]})})]}),(0,v.jsxs)(`div`,{className:`pb-axis faint`,children:[(0,v.jsx)(`span`,{children:c}),(0,v.jsx)(`span`,{children:l})]}),d&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}function O({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,left:r,right:o,connector:s=`→`,ratioLabel:c=`ratio`,footer:l,delay:u}){let d=i[t]||i.layers,[f,p]=(0,_.useState)(null),m=r.color||`var(--presence)`,h=o.color||`var(--insight)`,g=r.weight+o.weight||1,y=o.weight===0?`—`:(r.weight/o.weight).toFixed(2),b=r.weight/g*100;return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(u||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`sp-row`,children:[(0,v.jsxs)(`div`,{className:`sp-side ${f===`left`?`on`:``}`,onMouseEnter:()=>p(`left`),onMouseLeave:()=>p(null),children:[(0,v.jsx)(`div`,{className:`sp-val tab-num`,style:{color:m},children:r.value}),(0,v.jsx)(`div`,{className:`sp-label`,children:r.label}),r.sub&&(0,v.jsx)(`div`,{className:`sp-sub faint`,children:r.sub})]}),(0,v.jsx)(`div`,{className:`sp-connector`,children:(0,v.jsx)(`span`,{className:`sp-arrow`,children:s})}),(0,v.jsxs)(`div`,{className:`sp-side right ${f===`right`?`on`:``}`,onMouseEnter:()=>p(`right`),onMouseLeave:()=>p(null),children:[(0,v.jsx)(`div`,{className:`sp-val tab-num`,style:{color:h},children:o.value}),(0,v.jsx)(`div`,{className:`sp-label`,children:o.label}),o.sub&&(0,v.jsx)(`div`,{className:`sp-sub faint`,children:o.sub})]})]}),(0,v.jsxs)(`div`,{className:`sp-bar`,children:[(0,v.jsx)(`span`,{className:`sp-bar-l`,style:{width:b+`%`,background:m}}),(0,v.jsx)(`span`,{className:`sp-bar-r`,style:{width:100-b+`%`,background:h}})]}),(0,v.jsxs)(`div`,{className:`sp-ratio`,children:[(0,v.jsx)(`span`,{className:`sp-ratio-v tab-num`,"data-mark":`underline`,children:y}),(0,v.jsx)(`span`,{className:`sp-ratio-l faint`,children:c})]}),l&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}function k({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,cols:r=2,tiles:o,footer:s,delay:c}){let l=i[t]||i.table,[u,d]=(0,_.useState)(null);return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(c||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsx)(`div`,{className:`sc-grid`,style:{"--sc-cols":r},children:o.map((e,t)=>{let n=e.icon?i[e.icon]||i.spark:null,r=e.color||`var(--presence)`,o=u===t;return(0,v.jsxs)(`div`,{className:`sc-tile ${o?`on`:``}`,onMouseEnter:()=>d(t),onMouseLeave:()=>d(null),children:[(0,v.jsxs)(`div`,{className:`sc-tile-top`,children:[n&&(0,v.jsx)(n,{className:`ic sc-tile-ic`,style:{color:r}}),(0,v.jsx)(`span`,{className:`sc-tile-label`,children:e.label})]}),(0,v.jsx)(`div`,{className:`sc-tile-val tab-num`,style:{color:r},children:e.value}),e.delta&&(0,v.jsxs)(`div`,{className:`sc-tile-delta delta ${e.deltaDir||`up`}`,children:[(0,v.jsx)(i.arrowUp,{className:`ic`,style:{width:12,height:12,transform:e.deltaDir===`down`?`rotate(180deg)`:`none`}}),e.delta]}),e.detail&&(0,v.jsx)(`div`,{className:`sc-tile-detail`,"data-open":o,dangerouslySetInnerHTML:a(e.detail)})]},t)})}),s&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function A({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,prefix:r=``,suffix:o=``,steps:s,footer:c,delay:l}){let u=i[t]||i.layers,[d,f]=(0,_.useState)(null),p=0,m=s.map(e=>(e.isBase||e.isTotal?p=e.delta:p+=e.delta,{...e,running:p})),h=Math.max(...m.map(e=>Math.abs(e.running)),1),g=e=>r+e.toLocaleString()+o,y=(()=>{let e=m.findIndex(e=>e.isTotal);return e>=0?e:m.length-1})();return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(l||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsx)(`div`,{className:`dc-list`,children:m.map((e,t)=>{let n=e.delta>=0,r=e.isBase||e.isTotal?`var(--presence)`:n?`var(--insight)`:`var(--danger)`,i=Math.abs(e.running)/h*100,o=d===t;return(0,v.jsxs)(`div`,{className:`dc-step ${e.isBase?`base`:``} ${e.isTotal?`total`:``} ${o?`on`:``}`,onMouseEnter:()=>f(t),onMouseLeave:()=>f(null),children:[(0,v.jsxs)(`div`,{className:`dc-step-head`,children:[(0,v.jsx)(`span`,{className:`dc-step-label`,children:e.label}),(0,v.jsx)(`span`,{className:`dc-step-delta tab-num`,"data-mark":t===y?`underline`:void 0,style:{color:r},children:e.isBase||e.isTotal?g(e.running):(n?`+`:``)+g(e.delta)})]}),(0,v.jsx)(`div`,{className:`dc-step-track`,children:(0,v.jsx)(`span`,{className:`dc-step-fill`,style:{width:i+`%`,background:r}})}),!e.isTotal&&(0,v.jsxs)(`div`,{className:`dc-run faint tab-num`,children:[`→ `,g(e.running)]}),e.detail&&(0,v.jsx)(`div`,{className:`dc-detail`,"data-open":o,dangerouslySetInnerHTML:a(e.detail)})]},t)})}),c&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}function j({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,rows:r,footer:o,delay:s}){let c=i[t]||i.chart,[l,u]=(0,_.useState)(null),d=(()=>{let e=0;return r.forEach((t,n)=>{t.value>r[e].value&&(e=n)}),e})();return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(s||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsx)(`div`,{className:`bk-list`,children:r.map((e,t)=>{let n=e.color||`var(--presence)`,r=e.max||1,i=Math.max(0,Math.min(100,e.value/r*100)),a=Math.max(0,Math.min(100,e.target/r*100)),o=e.value>=e.target,s=l===t,c=e.target===0?0:Math.round(e.value/e.target*100);return(0,v.jsxs)(`div`,{className:`bk-row ${s?`on`:``}`,onMouseEnter:()=>u(t),onMouseLeave:()=>u(null),children:[(0,v.jsxs)(`div`,{className:`bk-head`,children:[(0,v.jsx)(`span`,{className:`bk-label`,children:e.label}),(0,v.jsx)(`span`,{className:`bk-val tab-num`,style:{color:n},children:e.display??e.value.toLocaleString()})]}),(0,v.jsxs)(`div`,{className:`bk-track`,children:[(0,v.jsx)(`span`,{className:`bk-band`}),(0,v.jsx)(`span`,{className:`bk-fill`,"data-mark":t===d?`circle`:void 0,style:{width:i+`%`,background:o?n:`color-mix(in oklab, ${n} 60%, var(--warning))`}}),(0,v.jsx)(`span`,{className:`bk-target`,style:{left:a+`%`},title:`target ${e.target}`})]}),(0,v.jsxs)(`div`,{className:`bk-meta faint tab-num`,"data-on":s,children:[c,`% of target`,s?` · target ${e.target.toLocaleString()}`:``]})]},t)})}),o&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var M=360,ee=320,N=96,te=56,ne=16,re=20,P=30;function F(e){let t=0;for(let n of e)Number.isFinite(n)&&(t+=n);return t}function ie(e){if(!Number.isFinite(e))return`—`;let t=Math.round(e*1e3)/10;return(Number.isInteger(t)?t.toString():t.toFixed(1))+`%`}var ae=1/5.6;function oe(e,t){let n=Math.max(3,Math.floor(t*ae));return e.length>n?e.slice(0,n-1).trimEnd()+`…`:e}function se({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,classes:r,matrix:o,correctColor:s=`var(--presence)`,errorColor:c=`var(--danger)`,showTotals:u=!1,readout:d=`accuracy`,actualLabel:f=`Actual`,predictedLabel:p=`Predicted`,countLabel:m=`samples`,footer:h,delay:g}){let y=i[t]||i.table,b=(0,_.useMemo)(()=>{let e=r?.length??0;if(e<2||!o||o.length<e)return null;let t=r.map((e,t)=>{let n=o[t]??[];return r.map((e,t)=>{let r=n[t];return Number.isFinite(r)?r:0})}),n=t.reduce((e,t)=>e+F(t),0),i=t.reduce((e,t,n)=>e+(Number.isFinite(t[n])?t[n]:0),0),a=n>0?i/n:0,s=Math.max(1,...t.flat()),c=r.map((e,n)=>{let r=t.reduce((e,t)=>e+(Number.isFinite(t[n])?t[n]:0),0),i=F(t[n])>0?t[n][n]/F(t[n]):NaN;return{label:e,precision:r>0?t[n][n]/r:NaN,recall:i}}),d=M-ne-(u?P:0),f=ee-re-(u?P:0),p=Math.min(d-N,f-te),m=N,h=te;return{n:e,grid:t,total:n,correct:i,accuracy:a,perClass:c,ex:l([0,e],[m,m+p]),ey:l([0,e],[h,h+p]),cell:p/e,side:p,x0:m,y0:h,heat:e=>s>0?Math.sqrt(Math.max(0,e)/s):0,colTotals:r.map((e,n)=>t.reduce((e,t)=>e+(Number.isFinite(t[n])?t[n]:0),0)),rowTotals:t.map(e=>F(e))}},[r,o,u]);return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(g||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(y,{className:`ic`,style:{color:n}}),` `,e]}),b&&(0,v.jsxs)(`div`,{className:`cfm-wrap`,children:[(0,v.jsxs)(`svg`,{viewBox:`0 0 ${M} ${ee}`,className:`cfm-svg`,role:`img`,"aria-label":e,children:[b.grid.map((e,t)=>e.map((e,n)=>{let r=b.ex(n),i=b.ey(t),a=t===n,o=a?s:c,l=b.heat(e),u=`color-mix(in oklab, ${o} ${(8+l*80).toFixed(1)}%, transparent)`,d=l>.55;return(0,v.jsxs)(`g`,{children:[(0,v.jsx)(`rect`,{x:r+1,y:i+1,width:b.cell-2,height:b.cell-2,rx:4,fill:u,className:a?`cfm-cell cfm-cell--diag`:`cfm-cell`}),(0,v.jsx)(`text`,{x:r+b.cell/2,y:i+b.cell/2,className:d?`cfm-count cfm-count--on`:`cfm-count`,textAnchor:`middle`,dominantBaseline:`central`,"data-mark":a?`point`:void 0,children:e.toLocaleString()})]},`c${t}-${n}`)})),(0,v.jsx)(`rect`,{x:b.x0,y:b.y0,width:b.side,height:b.side,className:`cfm-frame`,fill:`none`}),r.map((e,t)=>{let n=oe(e,N-12);return(0,v.jsxs)(`text`,{x:b.x0-8,y:b.ey(t)+b.cell/2,className:`cfm-class`,textAnchor:`end`,dominantBaseline:`central`,children:[n!==e&&(0,v.jsx)(`title`,{children:e}),n]},`rl${t}`)}),r.map((e,t)=>{let n=oe(e,b.cell-4);return(0,v.jsxs)(`text`,{x:b.ex(t)+b.cell/2,y:b.y0-8,className:`cfm-class`,textAnchor:`middle`,children:[n!==e&&(0,v.jsx)(`title`,{children:e}),n]},`cl${t}`)}),(0,v.jsxs)(`text`,{x:0,y:0,transform:`translate(18, ${b.y0+b.side/2}) rotate(-90)`,className:`cfm-axis-title`,textAnchor:`middle`,children:[f,` ↓`]}),(0,v.jsxs)(`text`,{x:b.x0+b.side/2,y:18,className:`cfm-axis-title`,textAnchor:`middle`,children:[p,` →`]}),u&&(0,v.jsxs)(`g`,{className:`cfm-totals`,children:[b.rowTotals.map((e,t)=>(0,v.jsx)(`text`,{x:b.x0+b.side+P/2,y:b.ey(t)+b.cell/2,className:`cfm-total`,textAnchor:`middle`,dominantBaseline:`central`,children:e.toLocaleString()},`rt${t}`)),b.colTotals.map((e,t)=>(0,v.jsx)(`text`,{x:b.ex(t)+b.cell/2,y:b.y0+b.side+P/2,className:`cfm-total`,textAnchor:`middle`,dominantBaseline:`central`,children:e.toLocaleString()},`ct${t}`)),(0,v.jsx)(`text`,{x:b.x0+b.side+P/2,y:b.y0-8,className:`cfm-total-hd`,textAnchor:`middle`,children:`Σ`}),(0,v.jsx)(`text`,{x:b.x0-8,y:b.y0+b.side+P/2,className:`cfm-total-hd`,textAnchor:`end`,dominantBaseline:`central`,children:`Σ`})]})]}),d===`accuracy`&&(0,v.jsxs)(`div`,{className:`cfm-readout`,children:[(0,v.jsx)(`span`,{className:`cfm-acc tab-num`,style:{color:s},"data-mark":`underline`,children:ie(b.accuracy)}),(0,v.jsxs)(`span`,{className:`cfm-acc-lbl faint`,children:[`accuracy · `,b.correct.toLocaleString(),` of `,b.total.toLocaleString(),` `,m,` correct`]})]}),d===`perclass`&&(0,v.jsxs)(`div`,{className:`cfm-pc`,children:[(0,v.jsxs)(`div`,{className:`cfm-pc-row cfm-pc-head`,children:[(0,v.jsx)(`span`,{className:`cfm-pc-name`,children:`Class`}),(0,v.jsx)(`span`,{className:`cfm-pc-val`,children:`Precision`}),(0,v.jsx)(`span`,{className:`cfm-pc-val`,children:`Recall`})]}),b.perClass.map((e,t)=>(0,v.jsxs)(`div`,{className:`cfm-pc-row`,children:[(0,v.jsx)(`span`,{className:`cfm-pc-name`,children:e.label}),(0,v.jsx)(`span`,{className:`cfm-pc-val tab-num`,children:ie(e.precision)}),(0,v.jsx)(`span`,{className:`cfm-pc-val tab-num`,children:ie(e.recall)})]},`pc${t}`))]})]}),!b&&(0,v.jsx)(`div`,{className:`cfm-empty faint`,children:`Provide a class list and a square N×N matrix (matrix[i][j] = actual i predicted j).`}),h&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(h)})]})}var I=r(),L=132,R=40,z=4;function ce(e){return e===`down`?`var(--danger)`:`var(--insight)`}function le(e){let t=(0,I.c)(45),{spark:n,color:r}=e,[i,a]=(0,_.useState)(Math.max(0,n.length-1)),o=Math.min(...n),s=Math.max(...n),c=s-o||1,l;t[0]===n.length?l=t[1]:(l=e=>z+e/Math.max(1,n.length-1)*(L-z*2),t[0]=n.length,t[1]=l);let u=l,d;t[2]!==o||t[3]!==c?(d=e=>R-z-(e-o)/c*(R-z*2),t[2]=o,t[3]=c,t[4]=d):d=t[4];let f=d,p;if(t[5]!==n||t[6]!==u||t[7]!==f){let e;t[9]!==u||t[10]!==f?(e=(e,t)=>`${u(t)},${f(e)}`,t[9]=u,t[10]=f,t[11]=e):e=t[11],p=n.map(e).join(` `),t[5]=n,t[6]=u,t[7]=f,t[8]=p}else p=t[8];let m=p,h=`${z},${R} ${m} ${L-z},${R}`,g=Math.min(i,n.length-1),y;t[12]===o?y=t[13]:(y=Math.round(o),t[12]=o,t[13]=y);let b;t[14]===s?b=t[15]:(b=Math.round(s),t[14]=s,t[15]=b);let x=`kd-${y}-${b}-${n.length}`,S,C;t[16]===r?(S=t[17],C=t[18]):(S=(0,v.jsx)(`stop`,{offset:`0%`,stopColor:r,stopOpacity:`0.2`}),C=(0,v.jsx)(`stop`,{offset:`100%`,stopColor:r,stopOpacity:`0`}),t[16]=r,t[17]=S,t[18]=C);let w;t[19]!==x||t[20]!==S||t[21]!==C?(w=(0,v.jsx)(`defs`,{children:(0,v.jsxs)(`linearGradient`,{id:x,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[S,C]})}),t[19]=x,t[20]=S,t[21]=C,t[22]=w):w=t[22];let T=`url(#${x})`,E;t[23]!==h||t[24]!==T?(E=(0,v.jsx)(`polygon`,{points:h,fill:T}),t[23]=h,t[24]=T,t[25]=E):E=t[25];let D;t[26]!==r||t[27]!==m?(D=(0,v.jsx)(`polyline`,{points:m,fill:`none`,stroke:r,strokeWidth:`1.75`,strokeLinejoin:`round`,strokeLinecap:`round`}),t[26]=r,t[27]=m,t[28]=D):D=t[28];let O;if(t[29]!==n||t[30]!==u){let e;t[32]!==n.length||t[33]!==u?(e=(e,t)=>(0,v.jsx)(`rect`,{x:u(t)-L/n.length/2,y:0,width:L/n.length,height:R,fill:`transparent`,onMouseEnter:()=>a(t),style:{cursor:`pointer`}},t),t[32]=n.length,t[33]=u,t[34]=e):e=t[34],O=n.map(e),t[29]=n,t[30]=u,t[31]=O}else O=t[31];let k=u(g),A=f(n[g]),j;t[35]!==r||t[36]!==k||t[37]!==A?(j=(0,v.jsx)(`circle`,{cx:k,cy:A,r:`2.6`,fill:r,stroke:`var(--surface-elevated)`,strokeWidth:`1.4`}),t[35]=r,t[36]=k,t[37]=A,t[38]=j):j=t[38];let M;return t[39]!==E||t[40]!==D||t[41]!==O||t[42]!==j||t[43]!==w?(M=(0,v.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 ${L} ${R}`,className:`kd-spark`,preserveAspectRatio:`none`,children:[w,E,D,O,j]}),t[39]=E,t[40]=D,t[41]=O,t[42]=j,t[43]=w,t[44]=M):M=t[44],M}function ue({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,tiles:r,caption:o,footer:s,delay:c}){let l=i[t]||i.chart;return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(c||0)+`ms`},children:[e&&(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsx)(`div`,{className:`kd-grid`,children:r.map((e,t)=>{let n=e.deltaDir||`up`,r=ce(n),a=e.spark?.filter(e=>Number.isFinite(e))??[];return(0,v.jsxs)(`div`,{className:`kd-tile`,children:[(0,v.jsx)(`div`,{className:`kd-tile-label`,children:e.label}),(0,v.jsxs)(`div`,{className:`kd-tile-val tab-num`,children:[e.value,e.unit&&(0,v.jsx)(`span`,{className:`kd-tile-unit`,children:e.unit})]}),e.delta&&(0,v.jsxs)(`div`,{className:`kd-tile-delta`,style:{color:r},children:[(0,v.jsx)(i.arrowUp,{className:`ic`,style:{width:12,height:12,transform:n===`down`?`rotate(180deg)`:`none`}}),(0,v.jsx)(`span`,{className:`kd-tile-delta-t`,children:e.delta})]}),a.length>1&&(0,v.jsx)(`div`,{className:`kd-tile-spark`,children:(0,v.jsx)(le,{spark:a,color:r})}),e.conf&&(0,v.jsx)(`div`,{className:`kd-tile-conf faint`,children:e.conf})]},t)})}),o&&(0,v.jsx)(`div`,{className:`kd-caption faint`,children:o}),s&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function de(e){if(!Number.isFinite(e))return`—`;let t=e*100,n=Math.abs(t),r=n===0?0:n<1?2:+(n<10);return`${t.toFixed(r)}%`}function fe(e){return Number.isFinite(e)?Math.round(e).toLocaleString():`—`}function B(e){return`${e>=0?`+`:``}${e.toFixed(1)}%`}function pe(e){return e<.001?`p < .001`:`p = ${e.toFixed(3).replace(/^0\./,`.`)}`}function me(e,t,n){let r=Math.min(e,t),i=Math.max(e,t);if(!Number.isFinite(r)||!Number.isFinite(i))return null;let a=[r,i,0,...n!==null&&Number.isFinite(n)?[n]:[]],o=Math.min(...a),s=Math.max(...a),c=Math.max((s-o)*.14,.5),l=o-c,u=s+c-l||1,d=e=>(e-l)/u*100;return{loPct:d(r),hiPct:d(i),zeroPct:d(0),pointPct:n!==null&&Number.isFinite(n)?d(n):null}}function he({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,control:r,variant:o,pValue:s,confidenceInterval:c,significant:l,footer:u,delay:d}){let f=i[t]||i.chart,[p,h]=(0,_.useState)(null),g=r.conversionRate>0?(o.conversionRate-r.conversionRate)/r.conversionRate*100:NaN,y=Number.isFinite(g),b=m(y?g:0,{delay:(d||0)+260,format:B}),x=y?g>0?`var(--insight)`:g<0?`var(--danger)`:`var(--text-muted)`:`var(--text-muted)`,S=typeof l==`boolean`,C=typeof s==`number`&&Number.isFinite(s),w=S?l:C?s<.05:null,T=S||C,E=c&&c.length===2?me(c[0],c[1],y?g:null):null;return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(d||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),T&&(0,v.jsx)(`div`,{className:`abt-head`,children:(0,v.jsxs)(`span`,{className:`abt-badge m-scale-in ${w?`on`:``}`,children:[w&&(0,v.jsx)(i.check,{className:`ic abt-badge-ic`}),w?`Significant`:`Not significant`,C&&(0,v.jsx)(`span`,{className:`abt-badge-p`,children:pe(s)})]})}),(0,v.jsxs)(`div`,{className:`abt-row`,children:[(0,v.jsxs)(`div`,{className:`abt-side m-fade-rise m-stagger-item ${p===`control`?`on`:``}`,style:{"--i":0},onMouseEnter:()=>h(`control`),onMouseLeave:()=>h(null),children:[(0,v.jsx)(`div`,{className:`abt-name`,children:r.name}),(0,v.jsx)(`div`,{className:`abt-val tab-num`,children:de(r.conversionRate)}),(0,v.jsxs)(`div`,{className:`abt-n faint`,children:[`n = `,fe(r.n)]})]}),(0,v.jsx)(`div`,{className:`abt-connector`,children:(0,v.jsx)(`span`,{className:`abt-arrow`,children:`→`})}),(0,v.jsxs)(`div`,{className:`abt-side m-fade-rise m-stagger-item ${p===`variant`?`on`:``}`,style:{"--i":1},onMouseEnter:()=>h(`variant`),onMouseLeave:()=>h(null),children:[(0,v.jsx)(`div`,{className:`abt-name`,children:o.name}),(0,v.jsx)(`div`,{className:`abt-val tab-num`,style:{color:x},children:de(o.conversionRate)}),(0,v.jsxs)(`div`,{className:`abt-n faint`,children:[`n = `,fe(o.n)]})]})]}),(0,v.jsxs)(`div`,{className:`abt-lift m-fade-rise m-stagger-item`,style:{"--i":2},children:[(0,v.jsx)(`span`,{className:`abt-lift-v tab-num`,style:{color:x},"data-mark":`underline`,children:y?b:`—`}),(0,v.jsx)(`span`,{className:`abt-lift-l faint`,children:`relative lift`})]}),E&&c&&(0,v.jsxs)(`div`,{className:`abt-ci m-fade-rise m-stagger-item`,style:{"--i":3},children:[(0,v.jsx)(`span`,{className:`abt-ci-lbl faint`,children:`95% confidence interval`}),(0,v.jsxs)(`div`,{className:`abt-ci-track`,children:[(0,v.jsx)(`span`,{className:`abt-ci-band`,style:{left:`${E.loPct}%`,width:`${Math.max(E.hiPct-E.loPct,1.5)}%`}}),(0,v.jsx)(`span`,{className:`abt-ci-zero`,style:{left:`${E.zeroPct}%`},title:`no effect`}),E.pointPct!==null&&(0,v.jsx)(`span`,{className:`abt-ci-point`,style:{left:`${E.pointPct}%`}})]}),(0,v.jsxs)(`div`,{className:`abt-ci-labels`,children:[(0,v.jsx)(`span`,{className:`tab-num`,children:B(c[0])}),(0,v.jsx)(`span`,{className:`tab-num`,children:B(c[1])})]})]}),u&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var ge=320,_e=176,V={top:14,right:14,bottom:32,left:42},ve=[0,.25,.5,.75,1];function ye(e){let t=e<0?-1:1,n=Math.abs(e),r=1/(1+.3275911*n);return t*(1-((((1.061405429*r-1.453152027)*r+1.421413741)*r-.284496736)*r+.254829592)*r*Math.exp(-n*n))}function be(e){return .5*(1+ye(e/Math.SQRT2))}function xe(e){if(!(e>0)||!(e<1))return NaN;let t=[-39.69683028665376,220.9460984245205,-275.9285104469687,138.357751867269,-30.66479806614716,2.506628277459239],n=[-54.47609879822406,161.5858368580409,-155.6989798598866,66.80131188771972,-13.28068155288572],r=[-.007784894002430293,-.3223964580411365,-2.400758277161838,-2.549732539343734,4.374664141464968,2.938163982698783],i=[.007784695709041462,.3224671290700398,2.445134137142996,3.754408661907416];if(e<.02425){let t=Math.sqrt(-2*Math.log(e));return(((((r[0]*t+r[1])*t+r[2])*t+r[3])*t+r[4])*t+r[5])/((((i[0]*t+i[1])*t+i[2])*t+i[3])*t+1)}if(e<=.97575){let r=e-.5,i=r*r;return(((((t[0]*i+t[1])*i+t[2])*i+t[3])*i+t[4])*i+t[5])*r/(((((n[0]*i+n[1])*i+n[2])*i+n[3])*i+n[4])*i+1)}let a=Math.sqrt(-2*Math.log(1-e));return-(((((r[0]*a+r[1])*a+r[2])*a+r[3])*a+r[4])*a+r[5])/((((i[0]*a+i[1])*a+i[2])*a+i[3])*a+1)}function Se(e){return`α = ${e.toFixed(e<.01?3:2).replace(/^0\./,`.`)}`}function Ce({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,effectSize:r,alpha:s,power:h,requiredN:g,curve:y,footer:b,delay:x}){let S=i[t]||i.chart,C=(0,_.useRef)(null),w=(0,_.useMemo)(()=>{let e=Math.abs(r);if(!Number.isFinite(e)||e<=0)return null;let t=typeof s==`number`&&Number.isFinite(s)&&s>0&&s<1?s:.05,n=typeof g==`number`&&Number.isFinite(g)&&g>0?Math.max(1,Math.round(g)):null,i=typeof h==`number`&&Number.isFinite(h)&&h>0&&h<1?h:null,a=xe(1-t/2);if(n!==null){let r=i??be(Math.sqrt(n*e*e/2)-a);return{n,p:Math.min(1,Math.max(0,r)),alpha:t,d:e,mode:`evaluate`,derived:i===null}}let o=i??.8,c=xe(o);return{n:Math.ceil(2*(a+c)**2/(e*e)),p:o,alpha:t,d:e,mode:`design`,derived:!0}},[r,s,h,g]),T=m(w?.n??0,{delay:(x||0)+140,decimals:0}),E=(0,_.useMemo)(()=>{if(!w||!y||y.length===0)return null;let e=y.filter(e=>Number.isFinite(e?.n)&&e.n>0&&Number.isFinite(e?.power)).map(e=>({n:e.n,power:Math.min(1,Math.max(0,e.power))})).sort((e,t)=>e.n-t.n);if(e.length===0)return null;let t=f(e.map(e=>e.n).concat([w.n]))?.[1]??w.n,[n,r]=u(0,Math.max(t,1)),i=ge-V.left-V.right,a=_e-V.top-V.bottom,o=l([n,r],[V.left,V.left+i]),s=l([0,1],[V.top+a,V.top]);return{sx:o,sy:s,path:e.length>1?`M${e.map(e=>`${o(e.n)},${s(e.power)}`).join(`L`)}`:``,innerW:i,innerH:a,nTicks:c(n,r,d(r-n,4))}},[y,w]);if(p(C,{delay:(x||0)+220}),!w)return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(x||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(S,{className:`ic`,style:{color:n}}),` `,e||`Power analysis`]}),(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:`Provide a non-zero effect size.`})]});let D=o(w.p,{decimals:+(w.p>=.995||w.p<.1)});return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(x||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(S,{className:`ic`,style:{color:n}}),` `,e||`Power analysis`]}),(0,v.jsxs)(`div`,{className:`ps-head`,children:[(0,v.jsxs)(`div`,{className:`ps-n-row`,children:[(0,v.jsx)(`span`,{className:`ps-n tab-num`,children:T}),(0,v.jsx)(`span`,{className:`ps-n-suffix`,children:`per group`})]}),(0,v.jsx)(`div`,{className:`ps-power-line`,children:w.mode===`evaluate`&&w.derived?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`span`,{className:`ps-power-arrow`,children:`→`}),` `,(0,v.jsx)(`strong`,{children:D}),` power`,` `,(0,v.jsx)(`span`,{className:`faint`,children:`(achieved at this n)`})]}):(0,v.jsxs)(v.Fragment,{children:[`for `,(0,v.jsx)(`strong`,{children:D}),` power`]})})]}),(0,v.jsxs)(`div`,{className:`ps-stats`,children:[(0,v.jsxs)(`span`,{className:`ps-stat`,children:[(0,v.jsx)(`span`,{className:`ps-stat-k`,children:`effect size`}),(0,v.jsxs)(`span`,{className:`ps-stat-v tab-num`,children:[`d = `,r.toFixed(2)]})]}),(0,v.jsxs)(`span`,{className:`ps-stat`,children:[(0,v.jsx)(`span`,{className:`ps-stat-k`,children:`significance`}),(0,v.jsx)(`span`,{className:`ps-stat-v tab-num`,children:Se(w.alpha)})]})]}),E&&(0,v.jsx)(`div`,{className:`ps-curve-wrap`,children:(0,v.jsxs)(`svg`,{viewBox:`0 0 ${ge} ${_e}`,className:`ps-svg`,role:`img`,"aria-label":`Power vs. sample size, marked at n=${w.n}`,children:[ve.map(e=>(0,v.jsxs)(`g`,{children:[(0,v.jsx)(`line`,{className:`ps-grid`,x1:V.left,y1:E.sy(e),x2:V.left+E.innerW,y2:E.sy(e)}),(0,v.jsxs)(`text`,{className:`ps-tick`,x:V.left-6,y:E.sy(e)+3.5,textAnchor:`end`,children:[Math.round(e*100),`%`]})]},`g${e}`)),(0,v.jsx)(`line`,{className:`ps-axis`,x1:V.left,y1:V.top+E.innerH,x2:V.left+E.innerW,y2:V.top+E.innerH}),(0,v.jsx)(`line`,{className:`ps-axis`,x1:V.left,y1:V.top,x2:V.left,y2:V.top+E.innerH}),E.nTicks.map(e=>(0,v.jsx)(`text`,{className:`ps-tick`,x:E.sx(e),y:V.top+E.innerH+15,textAnchor:`middle`,children:e.toLocaleString()},`xt${e}`)),E.path&&(0,v.jsx)(`path`,{ref:C,className:`ps-line`,d:E.path,fill:`none`}),(0,v.jsx)(`line`,{className:`ps-mark-guide`,x1:E.sx(w.n),y1:E.sy(w.p),x2:E.sx(w.n),y2:V.top+E.innerH}),(0,v.jsx)(`circle`,{className:`ps-mark`,cx:E.sx(w.n),cy:E.sy(w.p),r:4.5,"data-mark":`point`})]})}),b&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(b)})]})}var we={critical:`var(--danger)`,low:`var(--warning)`,healthy:`var(--insight)`},Te={critical:`Reorder now`,low:`Below reorder point`,healthy:`Healthy`};function H(e){return Math.max(0,Math.min(100,e))}function Ee(e,t){if(!e||typeof e!=`object`)return null;let n=typeof e.sku==`string`?e.sku.trim():``,r=typeof e.label==`string`&&e.label.trim()?e.label.trim():n;if(!r)return null;let i=Number.isFinite(e.level)?Math.max(0,e.level):0,a=Number.isFinite(e.reorderPoint)?Math.max(0,e.reorderPoint):0,o=Number.isFinite(e.safetyStock)?Math.max(0,e.safetyStock):0,s=Math.max(Number.isFinite(e.max)&&e.max>0?e.max:0,i,a,o,1),c=Math.min(a,s),l=Math.min(o,c),u=Number.isFinite(e.leadTimeDays)?Math.max(0,e.leadTimeDays):null,d=i<=l?`critical`:i<=c?`low`:`healthy`;return{key:n||`row-${t}`,sku:n,label:r,level:i,max:s,safetyStock:l,reorderPoint:c,leadTimeDays:u,status:d,levelPct:H(i/s*100),safetyPct:H(l/s*100),reorderPct:H(c/s*100)}}function De({title:e,icon:t=`cart`,iconColor:n=`var(--presence)`,items:r,footer:o,delay:s}){let c=i[t]||i.cart,l=(Array.isArray(r)?r:[]).map(Ee).filter(e=>e!==null);return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(s||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),l.length===0&&(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:`Provide items with a level, a reorder point, and a max.`}),l.length>0&&(0,v.jsx)(`div`,{className:`ir-list`,children:l.map((e,t)=>(0,v.jsxs)(`div`,{className:`ir-row m-fade-rise m-stagger-item`,style:{"--i":t},children:[(0,v.jsxs)(`div`,{className:`ir-head`,children:[(0,v.jsxs)(`div`,{className:`ir-id`,children:[e.sku&&(0,v.jsx)(`span`,{className:`ir-sku`,children:e.sku}),(0,v.jsx)(`span`,{className:`ir-label`,children:e.label})]}),(0,v.jsx)(`span`,{className:`ir-status`,style:{color:we[e.status]},"data-mark":e.status===`critical`?`circle`:void 0,children:Te[e.status]})]}),(0,v.jsxs)(`div`,{className:`ir-track`,children:[(0,v.jsxs)(`div`,{className:`ir-track-inner`,children:[(0,v.jsx)(`span`,{className:`ir-zone ir-zone--danger`,style:{width:`${e.safetyPct}%`}}),(0,v.jsx)(`span`,{className:`ir-zone ir-zone--warn`,style:{left:`${e.safetyPct}%`,width:`${Math.max(0,e.reorderPct-e.safetyPct)}%`}}),(0,v.jsx)(`span`,{className:`ir-zone ir-zone--good`,style:{left:`${e.reorderPct}%`,width:`${Math.max(0,100-e.reorderPct)}%`}}),(0,v.jsx)(`span`,{className:`ir-fill`,style:{width:`${e.levelPct}%`,background:we[e.status]}})]}),(0,v.jsx)(`span`,{className:`ir-tick`,style:{left:`${e.reorderPct}%`},title:`reorder point`})]}),(0,v.jsxs)(`div`,{className:`ir-meta faint tab-num`,children:[e.level.toLocaleString(),` of `,e.max.toLocaleString(),` · reorder at`,` `,e.reorderPoint.toLocaleString(),e.leadTimeDays===null?``:` · ${e.leadTimeDays}d lead time`]})]},e.key))}),o&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}function Oe(e){let t=0;for(let n of e)n!==null&&(t+=n);return t}function ke({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,game:r,players:o,rounds:s,footer:c,delay:l}){let u=i[t]||i.table,d=Array.isArray(o)?o:[],f=Number.isFinite(s)&&s>0?Math.round(s):Math.max(0,...d.map(e=>Array.isArray(e?.roundScores)?e.roundScores.length:0)),p=d.map((e,t)=>{let n=typeof e?.name==`string`&&e.name.trim()?e.name.trim():`Player ${t+1}`,r=Array.isArray(e?.roundScores)?e.roundScores:[],i=Array.from({length:f},(e,t)=>Number.isFinite(r[t])?r[t]:null),a=Number.isFinite(e?.total)?e.total:Oe(i);return{key:`${n}-${t}`,name:n,scores:i,total:a}}),m=p.length>0,h=m?Math.max(...p.map(e=>e.total)):0,g=new Set(m?p.filter(e=>e.total===h).map(e=>e.key):[]),_=g.size===1?p.find(e=>g.has(e.key)):null,y=_&&p.length>1?_.total-Math.max(...p.filter(e=>e.key!==_.key).map(e=>e.total)):null,b=[];b.push((0,v.jsx)(`div`,{className:`bgs-cell bgs-head bgs-corner`,"aria-hidden":`true`},`corner`));for(let e of p)b.push((0,v.jsxs)(`div`,{className:`bgs-cell bgs-head bgs-player`,children:[g.has(e.key)&&(0,v.jsx)(`span`,{className:`bgs-crown`,"aria-label":`leading`,title:`Leading`,children:`●`}),(0,v.jsx)(`span`,{className:`bgs-name`,children:e.name})]},`h-${e.key}`));for(let e=0;e<f;e++){b.push((0,v.jsxs)(`div`,{className:`bgs-cell bgs-rowlabel m-fade-rise m-stagger-item`,style:{"--i":e},children:[`R`,e+1]},`rl-${e}`));for(let t of p)b.push((0,v.jsx)(`div`,{className:`bgs-cell bgs-score tab-num m-fade-rise m-stagger-item`,style:{"--i":e},children:t.scores[e]===null?`–`:t.scores[e].toLocaleString()},`s-${t.key}-${e}`))}b.push((0,v.jsx)(`div`,{className:`bgs-cell bgs-rowlabel bgs-totallabel`,children:`Total`},`tl`));for(let e of p)b.push((0,v.jsx)(`div`,{className:`bgs-cell bgs-total tab-num ${g.has(e.key)?`lead`:``}`,"data-mark":g.has(e.key)?`underline`:void 0,children:e.total.toLocaleString()},`t-${e.key}`));return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(l||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(u,{className:`ic`,style:{color:n}}),` `,e,r&&(0,v.jsx)(`span`,{className:`bgs-game faint`,children:r})]}),!m&&(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:`Provide players with round scores.`}),m&&(0,v.jsx)(`div`,{className:`bgs-scroll`,children:(0,v.jsx)(`div`,{className:`bgs-grid`,style:{"--bgs-cols":p.length,minWidth:`${64+p.length*84}px`},children:b})}),_&&y!==null&&(0,v.jsxs)(`p`,{className:`bgs-lead-note faint`,children:[_.name,` leads`,y>0?` by ${y.toLocaleString()}`:``,`.`]}),c&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var Ae=[`none`,`low`,`medium`,`high`,`critical`];function je(e){switch(e){case`critical`:case`high`:return`var(--danger)`;case`medium`:return`var(--warning)`;case`low`:return`var(--insight)`;default:return`var(--text-muted)`}}function Me(e){return e>=9?`critical`:e>=7?`high`:e>=4?`medium`:e>0?`low`:`none`}var U=132,Ne=U/2-11;function Pe({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,baseScore:r,severity:o,vector:s,cve:c,footer:l,delay:u}){let d=i[t]||i.shield,f=typeof r==`number`&&Number.isFinite(r),p=f?Math.max(0,Math.min(10,r)):0,h=Ae.includes(o)?o:Me(p),g=je(h),_=p/10,y=m(f?p:0,{delay:(u||0)+120,decimals:1}),b=(Array.isArray(s)?s:[]).filter(e=>!!e&&typeof e.label==`string`&&e.label.trim()!==``&&typeof e.value==`string`&&e.value.trim()!==``).slice(0,12),x=typeof c==`string`&&c.trim()?c.trim():null;return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(u||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(d,{className:`ic`,style:{color:n}}),` `,e,x&&(0,v.jsx)(`span`,{className:`cvss-cve`,children:x})]}),(0,v.jsxs)(`div`,{className:`cvss-body`,children:[(0,v.jsxs)(`div`,{className:`gauge-host`,style:{width:U,height:U},children:[(0,v.jsxs)(`svg`,{className:`gauge`,viewBox:`0 0 ${U} ${U}`,width:U,height:U,children:[(0,v.jsx)(`circle`,{cx:U/2,cy:U/2,r:Ne,fill:`none`,stroke:`var(--surface-glass-strong)`,strokeWidth:`10`}),f&&(0,v.jsx)(`circle`,{className:`gauge-arc`,cx:U/2,cy:U/2,r:Ne,fill:`none`,stroke:g,strokeWidth:`10`,strokeLinecap:`round`,pathLength:1,strokeDasharray:1,strokeDashoffset:1-_,transform:`rotate(-90 ${U/2} ${U/2})`})]}),(0,v.jsxs)(`div`,{className:`gauge-center`,children:[(0,v.jsx)(`div`,{className:`gauge-num tab-num`,"data-mark":f?`underline`:void 0,style:{color:g},children:f?y:`—`}),(0,v.jsx)(`div`,{className:`gauge-band`,style:{color:g},children:h})]})]}),(0,v.jsx)(`div`,{className:`cvss-side`,children:b.length>0?(0,v.jsx)(`div`,{className:`cvss-chips`,children:b.map((e,t)=>(0,v.jsxs)(`span`,{className:`cvss-chip m-fade-rise m-stagger-item`,style:{"--i":t},children:[(0,v.jsx)(`span`,{className:`cvss-chip-k`,children:e.label}),(0,v.jsx)(`span`,{className:`cvss-chip-v`,children:e.value})]},t))}):(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:f?`No vector components supplied.`:`Provide a base score 0–10.`})})]}),l&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}var Fe=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--danger)`],Ie=320,W=90,Le=14,Re=12,ze=12,Be=30,Ve=W-10,He=1/5.4;function Ue(e){let t=Math.max(3,Math.floor(Ve*He));return e.length>t?e.slice(0,t-1).trimEnd()+`…`:e}function We(e,t,n,r,i){if(!e)return null;let a=typeof e.label==`string`&&e.label.trim()?e.label.trim():`Series ${t+1}`,o=(Array.isArray(e.curve)?e.curve:[]).filter(e=>Number.isFinite(e)&&e>=0);if(o.length<2)return null;let s=Math.max(...o)||1,c=o.length,l=e=>W+e/(c-1)*i,u=e=>n-e/s*r,d=o.map((e,t)=>`${l(t).toFixed(2)},${u(e).toFixed(2)}`),f=`M${d.join(`L`)}`,p=`M${l(0).toFixed(2)},${n} L${d.join(`L`)} L${l(c-1).toFixed(2)},${n} Z`,m=e.color||Fe[t%Fe.length];return{key:`${a}-${t}`,label:a,color:m,d:p,strokeD:f,baselineY:n}}function Ge(e){let t=(0,I.c)(5),{d:n,color:r,delay:i}=e,a=(0,_.useRef)(null),o;t[0]===i?o=t[1]:(o={delay:i},t[0]=i,t[1]=o),p(a,o);let s;return t[2]!==r||t[3]!==n?(s=(0,v.jsx)(`path`,{ref:a,d:n,fill:`none`,stroke:r,className:`rp-stroke`}),t[2]=r,t[3]=n,t[4]=s):s=t[4],s}function Ke({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,categories:r,overlap:o,footer:s,delay:c}){let l=i[t]||i.chart,u=Be*(1+(Number.isFinite(o)?Math.max(0,Math.min(1,o)):.55)*1.8),d=Ie-W-Le,f=Array.isArray(r)?r:[],p=[];f.forEach((e,t)=>{let n=We(e,t,Re+u+p.length*Be,u,d);n&&p.push(n)});let m=p.length>0?Re+u+(p.length-1)*Be+ze:0;return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(c||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),p.length===0&&(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:`Provide at least one category with two or more curve values.`}),p.length>0&&(0,v.jsx)(`svg`,{viewBox:`0 0 ${Ie} ${m}`,className:`rp-svg`,role:`img`,"aria-label":e,children:p.map((e,t)=>(0,v.jsxs)(`g`,{className:`m-fade-rise m-stagger-item`,style:{"--i":t},children:[(0,v.jsx)(`line`,{x1:W,y1:e.baselineY,x2:Ie-Le,y2:e.baselineY,className:`rp-baseline`}),(0,v.jsx)(`path`,{d:e.d,fill:e.color,className:`rp-area`}),(0,v.jsx)(Ge,{d:e.strokeD,color:e.color,delay:(c||0)+t*60}),(0,v.jsxs)(`text`,{x:W-8,y:e.baselineY+3,className:`rp-label`,textAnchor:`end`,children:[Ue(e.label)!==e.label&&(0,v.jsx)(`title`,{children:e.label}),Ue(e.label)]})]},e.key))}),s&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var G=320,K=200,q={top:14,right:14,bottom:30,left:42},qe=[0,.25,.5,.75,1];function Je(e){let t=e.length,n=[],r=0,i=0;for(;r<t;){let a=e[r],o=r;for(;o<t&&e[o]===a;)o++;n.push({x:a,y:i/t}),i+=o-r,n.push({x:a,y:i/t}),r=o}return n}function Ye(e){let t=e.length,n=Math.floor(t/2);return t%2==0?(e[n-1]+e[n])/2:e[n]}function Xe({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,values:r,unit:o,color:m=`var(--presence)`,footer:h,delay:g}){let y=i[t]||i.chart,b=(0,_.useRef)(null),x=(0,_.useMemo)(()=>{let e=(Array.isArray(r)?r:[]).filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);if(e.length===0)return null;let t=f(e);if(!t)return null;let[n,i]=u(t[0],t[1]),a=l([n,i],[q.left,G-q.right]),o=l([0,1],[K-q.bottom,q.top]),s=Je(e),p=[`M${a(n).toFixed(2)},${o(0).toFixed(2)}`,...s.map(e=>`L${a(e.x).toFixed(2)},${o(e.y).toFixed(2)}`),`L${a(i).toFixed(2)},${o(1).toFixed(2)}`].join(` `),m=c(n,i,d(i-n,5)),h=Ye(e);return{n:e.length,d:p,sx:a,sy:o,xTicks:m,med:h}},[r]);return p(b,{delay:(g||0)+160}),(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(g||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(y,{className:`ic`,style:{color:n}}),` `,e]}),!x&&(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:`Provide at least one numeric value.`}),x&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`svg`,{viewBox:`0 0 ${G} ${K}`,className:`ecdf-svg`,role:`img`,"aria-label":e,children:[qe.map(e=>(0,v.jsxs)(`g`,{children:[(0,v.jsx)(`line`,{className:`ecdf-grid`,x1:q.left,y1:x.sy(e),x2:G-q.right,y2:x.sy(e)}),(0,v.jsx)(`text`,{className:`ecdf-tick`,x:q.left-6,y:x.sy(e)+3.5,textAnchor:`end`,children:e.toFixed(2)})]},`g${e}`)),(0,v.jsx)(`line`,{className:`ecdf-axis`,x1:q.left,y1:K-q.bottom,x2:G-q.right,y2:K-q.bottom}),(0,v.jsx)(`line`,{className:`ecdf-axis`,x1:q.left,y1:q.top,x2:q.left,y2:K-q.bottom}),x.xTicks.map(e=>(0,v.jsx)(`text`,{className:`ecdf-tick`,x:x.sx(e),y:K-q.bottom+15,textAnchor:`middle`,children:s(e,{unit:o||void 0})},`xt${e}`)),(0,v.jsx)(`line`,{className:`ecdf-mark-guide`,x1:x.sx(x.med),y1:K-q.bottom,x2:x.sx(x.med),y2:q.top}),(0,v.jsx)(`path`,{ref:b,className:`ecdf-line`,d:x.d,fill:`none`,stroke:m})]}),(0,v.jsxs)(`p`,{className:`ecdf-caption faint tab-num`,children:[`n = `,x.n.toLocaleString(),` · median`,` `,s(x.med,{unit:o||void 0})]})]}),h&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(h)})]})}var J=480,Ze=116,Qe=46,Y=122,X=J-Qe-10,$e=46,Z=1.959964,et={OR:`Odds ratio`,RR:`Risk ratio`,HR:`Hazard ratio`,MD:`Mean difference`,SMD:`Std. mean difference`};function Q(e){return typeof e==`number`&&Number.isFinite(e)}function $(e){if(!Number.isFinite(e))return`—`;let t=Math.abs(e);return t>=1e3?s(e,{compact:!0}):t>0&&t<.1?s(e,{decimals:3}):s(e,{decimals:t>=100?0:t>=10?1:2})}function tt(e,t,n,r){if(!e||typeof e!=`object`||!Q(e.effect)||!Q(e.ciLow)||!Q(e.ciHigh))return null;let i=Math.min(e.ciLow,e.ciHigh),a=Math.max(e.ciLow,e.ciHigh),o=Math.min(a,Math.max(i,e.effect)),s=!1;n&&(i<=0&&(i=r,s=!0),a<=0&&(a=r,s=!0),o<=0&&(o=r,s=!0),i>a&&([i,a]=[a,i]),o=Math.min(a,Math.max(i,o)));let c=n?Math.log(o):o,l=n?(Math.log(a)-Math.log(i))/(2*Z):(a-i)/(2*Z),u=!s&&Number.isFinite(l)&&l>0?1/(l*l):null,d=typeof e.label==`string`&&e.label.trim()?e.label.trim():`Study ${t+1}`,f=`${d}${Q(e.year)?` ${Math.trunc(e.year)}`:``}${s?` †`:``}`;return{key:`${d}-${t}`,label:f,effect:o,lo:i,hi:a,givenWeight:Q(e.weight)&&e.weight>=0?Math.min(100,e.weight):null,clamped:s,ivWeight:u,theta:c}}function nt(e,t){let n=Math.ceil(e/Math.LN2-1e-9),r=Math.floor(t/Math.LN2+1e-9);if(r<n)return[1];let i=Math.max(1,Math.ceil((r-n+1)/7)),a=[];for(let e=n;e<=r;e++)(e%i+i)%i===0&&a.push(2**e);return a.length?a:[1]}function rt(e){let t=(0,I.c)(14),{label:n,cy:r,maxLines:i,fontSize:a,bold:o}=e,s,c,l,u;if(t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==i){let e=g(n,{maxWidth:Ze-8,fontSize:a,minFontSize:7,maxLines:i,lineHeight:1.12,bold:o}),d=e.lines.slice(0,i),f=r-(d.length-1)*e.lineHeightPx/2;s=o?`fpl-lbl fpl-lbl--pooled`:`fpl-lbl`,c=e.fontSize,l=`start`,u=d.map((t,n)=>(0,v.jsx)(`tspan`,{x:2,y:f+n*e.lineHeightPx,dominantBaseline:`central`,children:t},n)),t[0]=o,t[1]=r,t[2]=a,t[3]=n,t[4]=i,t[5]=s,t[6]=c,t[7]=l,t[8]=u}else s=t[5],c=t[6],l=t[7],u=t[8];let d;return t[9]!==s||t[10]!==c||t[11]!==l||t[12]!==u?(d=(0,v.jsx)(`text`,{className:s,fontSize:c,textAnchor:l,children:u}),t[9]=s,t[10]=c,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function it({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,studies:r,measure:o=`OR`,pooled:f,heterogeneity:p,favorsLeft:m,favorsRight:h,footer:g,delay:y}){let b=i[t]||i.chart,x=(0,_.useMemo)(()=>{let e=et[o]?o:`OR`,t=e===`OR`||e===`RR`||e===`HR`,n=+!!t,i=Array.isArray(r)?r:[],a=1/0;for(let e of i)if(!(!e||typeof e!=`object`))for(let t of[e.effect,e.ciLow,e.ciHigh])Q(t)&&t>0&&t<a&&(a=t);if(f&&typeof f==`object`)for(let e of[f.effect,f.ciLow,f.ciHigh])Q(e)&&e>0&&e<a&&(a=e);let s=a===1/0?.01:a/10,p=[];if(i.forEach((e,n)=>{let r=tt(e,n,t,s);r&&p.push(r)}),p.length===0)return null;let m=p.reduce((e,t)=>e+(t.ivWeight??0),0),h=null;if(f&&typeof f==`object`&&Q(f.effect)&&Q(f.ciLow)&&Q(f.ciHigh)){let e=Math.min(f.ciLow,f.ciHigh),n=Math.max(f.ciLow,f.ciHigh);t&&(e=e<=0?s:e,n=n<=0?s:n);let r=Math.min(n,Math.max(e,t&&f.effect<=0?s:f.effect)),i=typeof f.label==`string`&&f.label.trim()?f.label.trim():`Pooled`;h={effect:r,lo:e,hi:n,label:i,computed:!1}}else if(m>0){let e=p.reduce((e,t)=>e+(t.ivWeight??0)*t.theta,0)/m,n=Math.sqrt(1/m),r=e=>t?Math.exp(e):e;h={effect:r(e),lo:r(e-Z*n),hi:r(e+Z*n),label:`Pooled`,computed:!0}}let g=p.map(e=>e.givenWeight===null?e.ivWeight!==null&&m>0?100*e.ivWeight/m:null:e.givenWeight),_=e=>t?Math.log(e):e,v=_(n===0?0:1),y=v,b=e=>{let t=_(e);t<v&&(v=t),t>y&&(y=t)};p.forEach(e=>{b(e.lo),b(e.hi)}),h&&(b(h.lo),b(h.hi));let x;if(t){y-v<1e-9&&(v-=Math.LN2,y+=Math.LN2);let e=(y-v)*.06;x=nt(v,y),v-=e,y+=e}else [v,y]=u(v,y),x=c(v,y,d(y-v,5));let S=l([v,y],[Y,X]),C=e=>S(_(e)),w=p.length,T=Math.max(11,Math.min(24,Math.round(320/w))),E=h?Math.max(T,20):0,D=32+w*T+3,O=D+(h?5+E:4),k=O+$e,A=Math.max(0,...g.filter(e=>e!==null)),j=Math.min(13,T-2);return{mKey:e,isRatio:t,nullValue:n,rows:p,weights:g,summary:h,x:C,axisTicks:x,rowH:T,rowsTop:32,sepY:D,axisY:O,H:k,side:e=>e===null||!(A>0)?4.5:4+(j-4)*Math.sqrt(Math.max(0,e)/A),anyClamped:p.some(e=>e.clamped)}},[r,o,f]),S=Math.min(7,x?x.rowH-4:7);return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(y||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(b,{className:`ic`,style:{color:n}}),` `,e||`Forest plot`]}),!x&&(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:`Provide at least one study with an effect and its confidence interval.`}),x&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`svg`,{viewBox:`0 0 ${J} ${x.H}`,className:`fpl-svg`,role:`img`,"aria-label":e||`Forest plot`,children:[(0,v.jsx)(`text`,{x:2,y:13,className:`fpl-colhead`,textAnchor:`start`,children:`Study`}),(0,v.jsxs)(`text`,{x:546/2,y:13,className:`fpl-colhead`,textAnchor:`middle`,children:[et[x.mKey],x.isRatio?` (log scale)`:``]}),(0,v.jsx)(`text`,{x:J-2,y:13,className:`fpl-colhead`,textAnchor:`end`,children:`Weight`}),(0,v.jsx)(`line`,{className:`fpl-null`,x1:x.x(x.nullValue),y1:26,x2:x.x(x.nullValue),y2:x.axisY}),x.rows.map((e,t)=>{let n=x.rowsTop+t*x.rowH+x.rowH/2,r=x.weights[t],i=x.side(r),a=x.rowH>=22?2:1,o=x.rowH>=18?10.5:x.rowH>=14?9.5:8.5;return(0,v.jsxs)(`g`,{className:e.clamped?`fpl-row fpl-row--clamped m-stagger-item`:`fpl-row m-stagger-item`,style:{"--i":Math.min(t,15)},children:[(0,v.jsx)(`title`,{children:`${e.label}: ${$(e.effect)} (95% CI ${$(e.lo)} to ${$(e.hi)})`+(r===null?``:`, weight ${s(r,{decimals:1})}%`)+(e.clamped?` — clamped to fit the log axis`:``)}),(0,v.jsx)(rt,{label:e.label,cy:n,maxLines:a,fontSize:o}),(0,v.jsx)(`line`,{className:`fpl-ci`,x1:x.x(e.lo),y1:n,x2:x.x(e.hi),y2:n}),(0,v.jsx)(`line`,{className:`fpl-ci`,x1:x.x(e.lo),y1:n-S/2,x2:x.x(e.lo),y2:n+S/2}),(0,v.jsx)(`line`,{className:`fpl-ci`,x1:x.x(e.hi),y1:n-S/2,x2:x.x(e.hi),y2:n+S/2}),(0,v.jsx)(`rect`,{className:`fpl-sq`,x:x.x(e.effect)-i/2,y:n-i/2,width:i,height:i}),(0,v.jsx)(`text`,{x:J-2,y:n,className:`fpl-wt`,textAnchor:`end`,dominantBaseline:`central`,children:r===null?`—`:`${s(r,{decimals:1})}%`})]},e.key)}),x.summary&&(0,v.jsxs)(`g`,{className:`fpl-row m-fade-rise m-stagger-item`,style:{"--i":Math.min(x.rows.length,16)},children:[(0,v.jsx)(`title`,{children:`${x.summary.label}: ${$(x.summary.effect)} (95% CI ${$(x.summary.lo)} to ${$(x.summary.hi)})`+(x.summary.computed?` — fixed-effect inverse-variance pool`:``)}),(0,v.jsx)(`line`,{className:`fpl-sep`,x1:2,y1:x.sepY,x2:J-2,y2:x.sepY}),(()=>{let e=x.sepY+5+Math.max(x.rowH,20)/2,t=Math.min(7,Math.max(5,x.rowH/2-1)),n=x.x(x.summary.lo),r=x.x(x.summary.hi),i=x.x(x.summary.effect);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(rt,{label:x.summary.label,cy:e,maxLines:1,fontSize:10.5,bold:!0}),(0,v.jsx)(`polygon`,{className:`fpl-diamond`,points:`${n},${e} ${i},${e-t} ${r},${e} ${i},${e+t}`}),(0,v.jsx)(`text`,{x:J-2,y:e,className:`fpl-wt fpl-wt--pooled`,textAnchor:`end`,dominantBaseline:`central`,children:`100%`})]})})()]}),(0,v.jsx)(`line`,{className:`fpl-axis`,x1:Y,y1:x.axisY,x2:X,y2:x.axisY}),x.axisTicks.map(e=>(0,v.jsxs)(`g`,{children:[(0,v.jsx)(`line`,{className:`fpl-axis`,x1:x.x(e),y1:x.axisY,x2:x.x(e),y2:x.axisY+4}),(0,v.jsx)(`text`,{className:`fpl-tick`,x:x.x(e),y:x.axisY+15,textAnchor:`middle`,children:Math.abs(e)>=1e3?s(e,{compact:!0}):s(e)})]},`t${e}`)),typeof m==`string`&&m.trim()&&(0,v.jsx)(at,{text:`← ${m.trim()}`,x:Y,anchor:`start`,y:x.axisY+28}),typeof h==`string`&&h.trim()&&(0,v.jsx)(at,{text:`${h.trim()} →`,x:X,anchor:`end`,y:x.axisY+28})]}),(0,v.jsxs)(`p`,{className:`fpl-caption faint tab-num`,children:[x.summary?`${x.summary.label} ${x.mKey} ${$(x.summary.effect)} (95% CI ${$(x.summary.lo)}–${$(x.summary.hi)})`+(x.summary.computed?` · fixed-effect, inverse-variance`:``):`${x.rows.length} ${x.rows.length===1?`study`:`studies`}`,typeof p==`string`&&p.trim()?` · ${p.trim()}`:``]}),x.anyClamped&&(0,v.jsx)(`p`,{className:`fpl-caption faint`,children:`† interval clamped — a log axis cannot place values ≤ 0.`})]}),g&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(g)})]})}function at(e){let t=(0,I.c)(13),{text:n,x:r,anchor:i,y:a}=e,o,s,c,l;if(t[0]!==i||t[1]!==n||t[2]!==r||t[3]!==a){let e=g(n,{maxWidth:(X-Y)/2-8,fontSize:9,minFontSize:7,maxLines:2,lineHeight:1.15});o=`fpl-favors`,s=e.fontSize,c=i,l=e.lines.slice(0,2).map((t,n)=>(0,v.jsx)(`tspan`,{x:r,y:a+n*e.lineHeightPx,children:t},n)),t[0]=i,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l}else o=t[4],s=t[5],c=t[6],l=t[7];let u;return t[8]!==o||t[9]!==s||t[10]!==c||t[11]!==l?(u=(0,v.jsx)(`text`,{className:o,fontSize:s,textAnchor:c,children:l}),t[8]=o,t[9]=s,t[10]=c,t[11]=l,t[12]=u):u=t[12],u}var ot=e({statsRegistry:()=>st}),st={sparkstat:h(y),counter:h(b),herostat:h(x),trendtile:h(T),scorebadge:h(E),percentilebar:h(D),statpair:h(O),scorecard:h(k),deltacascade:h(A),bulletkpi:h(j),confusionmatrix:h(se),kpidashboard:h(ue),abtestresult:h(he),powersample:h(Ce),inventoryreorder:h(De),boardgamescore:h(ke),cvssscorecard:h(Pe),ridgeplot:h(Ke),ecdf:h(Xe),forestplot:h(it)};export{st as n,ot as t};
|
|
1
|
+
import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{ht as r}from"./index-Dbr1j8Fe.js";import{n as i}from"./icons-CHVz6kv_.js";import{t as a}from"./richText-BkxJhl9N.js";import{n as o,r as s}from"./format-DlZTyeMy.js";import{a as c,i as l,n as u,r as d,t as f}from"./scale-Bcgfo6Hp.js";import{n as p,t as m}from"./motion-luJxBPnj.js";import{t as h}from"./registry-types-DMuK0vJ6.js";import{n as g}from"./fitText-CDFmCQzl.js";var _=t(),v=n();function y({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,value:r,unit:o,delta:s,deltaDir:c=`up`,color:l=`var(--presence)`,points:u,footer:d,delay:f}){let p=i[t]||i.chart,[m,h]=(0,_.useState)(Math.max(0,u.length-1)),g=u.map(e=>e.v),y=g.length?Math.min(...g):0,b=(g.length?Math.max(...g):0)-y||1,x=e=>4+e/Math.max(1,u.length-1)*212,S=e=>52-(e-y)/b*48,C=u.map((e,t)=>`${x(t)},${S(e.v)}`).join(` `),w=`4,56 ${C} 216,56`,T=u[Math.min(m,u.length-1)];return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(f||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`insight-stat`,style:{marginBottom:4},children:[(0,v.jsx)(`span`,{className:`big tab-num`,"data-mark":`underline`,style:{color:l},children:r}),s&&(0,v.jsxs)(`span`,{className:`delta ${c}`,children:[(0,v.jsx)(i.arrowUp,{className:`ic`,style:{width:13,height:13,transform:c===`down`?`rotate(180deg)`:`none`}}),s]})]}),o&&(0,v.jsx)(`div`,{className:`ss-unit faint`,children:o}),(0,v.jsxs)(`div`,{className:`ss-spark`,style:{marginTop:12},children:[(0,v.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 220 56`,className:`ss-svg`,preserveAspectRatio:`none`,children:[(0,v.jsx)(`defs`,{children:(0,v.jsxs)(`linearGradient`,{id:`ssfill`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,v.jsx)(`stop`,{offset:`0%`,stopColor:l,stopOpacity:`0.22`}),(0,v.jsx)(`stop`,{offset:`100%`,stopColor:l,stopOpacity:`0`})]})}),(0,v.jsx)(`polygon`,{points:w,fill:`url(#ssfill)`}),(0,v.jsx)(`polyline`,{points:C,fill:`none`,stroke:l,strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`}),u.map((e,t)=>(0,v.jsx)(`rect`,{x:x(t)-220/u.length/2,y:0,width:220/u.length,height:56,fill:`transparent`,onMouseEnter:()=>h(t),style:{cursor:`pointer`}},t)),(0,v.jsx)(`line`,{x1:x(m),y1:0,x2:x(m),y2:56,stroke:`var(--hover-line)`,strokeWidth:`1`}),T&&(0,v.jsx)(`circle`,{cx:x(m),cy:S(T.v),r:`3.4`,fill:l,stroke:`var(--surface-elevated)`,strokeWidth:`1.5`})]}),(0,v.jsxs)(`div`,{className:`ss-tip`,children:[(0,v.jsx)(`span`,{className:`ss-tip-v tab-num`,style:{color:l},children:T?T.v.toLocaleString():`—`}),T?.label&&(0,v.jsx)(`span`,{className:`ss-tip-l faint`,children:T.label})]})]}),d&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}function b({title:e,icon:t=`spark`,iconColor:n=`var(--insight)`,value:r,prefix:o=``,suffix:s=``,decimals:c=0,label:l,delta:u,deltaDir:d=`up`,color:f=`var(--presence)`,footer:p,delay:m}){let h=i[t]||i.spark,[g,y]=(0,_.useState)(0),b=(0,_.useRef)(0);(0,_.useEffect)(()=>{if(window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches){y(r);return}let e=performance.now()+(m||0),t=n=>{let i=Math.max(0,Math.min(1,(n-e)/1100));y(r*(1-(1-i)**3)),i<1&&(b.current=requestAnimationFrame(t))};return b.current=requestAnimationFrame(t),()=>cancelAnimationFrame(b.current)},[r,m]);let x=g.toLocaleString(void 0,{minimumFractionDigits:c,maximumFractionDigits:c});return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(m||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(h,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`ct-num tab-num`,"data-mark":`underline`,style:{color:f},children:[(0,v.jsx)(`span`,{className:`ct-affix`,children:o}),x,(0,v.jsx)(`span`,{className:`ct-affix`,children:s})]}),(0,v.jsxs)(`div`,{className:`ct-row`,children:[(0,v.jsx)(`span`,{className:`ct-label`,children:l}),u&&(0,v.jsxs)(`span`,{className:`delta ${d}`,children:[(0,v.jsx)(i.arrowUp,{className:`ic`,style:{width:13,height:13,transform:d===`down`?`rotate(180deg)`:`none`}}),u]})]}),p&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(p)})]})}function x({title:e,icon:t=`sparkle`,iconColor:n=`var(--presence)`,value:r,unit:o,narrative:s,trend:c,trendDir:l=`up`,detail:u,color:d=`var(--presence)`,footer:f,delay:p}){let m=i[t]||i.sparkle,[h,g]=(0,_.useState)(!1);return(0,v.jsxs)(`div`,{className:`card reveal hero-card stats-card`,style:{"--delay":(p||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`hero-value tab-num`,"data-mark":`underline`,style:{"--hero-c":d},children:[r,o&&(0,v.jsx)(`span`,{className:`hero-unit`,children:o})]}),s&&(0,v.jsx)(`div`,{className:`hero-narrative`,dangerouslySetInnerHTML:a(s)}),c&&(0,v.jsxs)(`div`,{className:`hero-chip ${l} ${h?`open`:``}`,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),onClick:()=>g(e=>!e),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g(e=>!e))},role:`button`,tabIndex:0,children:[(0,v.jsx)(i.arrowUp,{className:`ic`,style:{width:14,height:14,transform:l===`down`?`rotate(180deg)`:`none`}}),(0,v.jsx)(`span`,{children:c}),u&&(0,v.jsx)(i.chevR,{className:`ic hero-chip-caret`,style:{width:13,height:13}})]}),u&&(0,v.jsx)(`div`,{className:`hero-detail`,"data-open":h,dangerouslySetInnerHTML:a(u)}),f&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(f)})]})}var S=130,C=56,w=1.5;function T({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,value:r,delta:o,deltaDir:s=`up`,color:c=`var(--presence)`,bars:l,footer:u,delay:d}){let f=i[t]||i.chart,p=l.length>40?l.slice(-40):l,[m,h]=(0,_.useState)(Math.max(0,p.length-1)),g=Math.max(...p,1);return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(d||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`tt-body`,children:[(0,v.jsxs)(`div`,{className:`tt-left`,children:[(0,v.jsx)(`div`,{className:`tt-value tab-num`,"data-mark":`underline`,style:{color:c},children:r}),(0,v.jsxs)(`div`,{className:`tt-delta delta ${s}`,children:[(0,v.jsx)(i.arrowUp,{className:`ic`,style:{width:14,height:14,transform:s===`down`?`rotate(180deg)`:`none`}}),o]})]}),(0,v.jsx)(`svg`,{className:`tt-bars`,viewBox:`0 0 ${S} ${C}`,width:`100%`,height:C,preserveAspectRatio:`none`,role:`group`,"aria-label":`recent trend`,children:p.map((e,t)=>{let n=S/p.length,r=Math.max(1,n-w),i=Math.min(C,Math.max(C*.08,e/g*C));return(0,v.jsx)(`rect`,{className:`tt-bar ${t===m?`on`:``}`,x:t*n+(n-r)/2,y:C-i,width:r,height:i,rx:1.5,fill:t===m?c:`var(--track)`,onMouseEnter:()=>h(t),children:(0,v.jsx)(`title`,{children:String(e)})},t)})})]}),u&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},dangerouslySetInnerHTML:a(u)})]})}function E({title:e,icon:t=`shield`,iconColor:n=`var(--insight)`,score:r,grade:o,caption:s,color:c=`var(--insight)`,components:l=[],footer:u,delay:d}){let f=i[t]||i.shield,[p,m]=(0,_.useState)(null),h=Math.max(0,Math.min(100,r))/100,g=2*Math.PI*46;return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(d||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`sb-body`,children:[(0,v.jsxs)(`div`,{className:`sb-ring`,children:[(0,v.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 120 120`,className:`sb-svg`,children:[(0,v.jsx)(`circle`,{cx:`60`,cy:`60`,r:46,fill:`none`,stroke:`var(--track)`,strokeWidth:`9`}),(0,v.jsx)(`circle`,{cx:`60`,cy:`60`,r:46,fill:`none`,stroke:c,strokeWidth:`9`,strokeLinecap:`round`,strokeDasharray:g,strokeDashoffset:g*(1-h),transform:`rotate(-90 60 60)`,className:`sb-arc`})]}),(0,v.jsxs)(`div`,{className:`sb-center`,children:[(0,v.jsx)(`div`,{className:`sb-score tab-num`,"data-mark":`underline`,style:{color:c},children:o??Math.round(r)}),o&&(0,v.jsx)(`div`,{className:`sb-sub tab-num`,children:Math.round(r)})]})]}),(0,v.jsxs)(`div`,{className:`sb-list`,children:[s&&(0,v.jsx)(`div`,{className:`sb-caption faint`,children:s}),l.map((e,t)=>{let n=e.color||c,r=p===t;return(0,v.jsxs)(`div`,{className:`sb-comp ${r?`on`:``}`,onMouseEnter:()=>m(t),onMouseLeave:()=>m(null),children:[(0,v.jsx)(`span`,{className:`sb-comp-dot`,style:{background:n}}),(0,v.jsx)(`span`,{className:`sb-comp-label`,children:e.label}),(0,v.jsx)(`span`,{className:`sb-comp-track`,children:(0,v.jsx)(`span`,{className:`sb-comp-fill`,style:{width:e.value+`%`,background:n}})}),(0,v.jsx)(`span`,{className:`sb-comp-val tab-num`,style:r?{color:n}:void 0,children:e.value})]},t)})]})]}),u&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function D({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,percentile:r,value:o,unit:s,lowLabel:c=`p0`,highLabel:l=`p100`,color:u=`var(--presence)`,footer:d,delay:f}){let p=i[t]||i.chart,[m,h]=(0,_.useState)(!1),g=Math.max(0,Math.min(100,r)),y=Math.max(1,Math.round(100-g));return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(f||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`pb-head`,children:[(0,v.jsx)(`span`,{className:`pb-value tab-num`,"data-mark":`underline`,style:{color:u},children:o}),s&&(0,v.jsx)(`span`,{className:`pb-unit faint`,children:s}),(0,v.jsxs)(`span`,{className:`pb-pct tab-num`,children:[Math.round(g),`th pct`]})]}),(0,v.jsxs)(`div`,{className:`pb-track`,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[(0,v.jsx)(`div`,{className:`pb-grad`}),[25,50,75].map(e=>(0,v.jsx)(`span`,{className:`pb-tick`,style:{left:e+`%`}},e)),(0,v.jsx)(`div`,{className:`pb-fill`,style:{width:g+`%`,background:`color-mix(in oklab, ${u} 22%, transparent)`}}),(0,v.jsx)(`div`,{className:`pb-marker`,style:{left:g+`%`,background:u},children:(0,v.jsxs)(`span`,{className:`pb-tip ${m?`on`:``}`,style:{borderColor:u,"--pb-tip-bias":`${50-g}%`},children:[`top `,y,`%`]})})]}),(0,v.jsxs)(`div`,{className:`pb-axis faint`,children:[(0,v.jsx)(`span`,{children:c}),(0,v.jsx)(`span`,{children:l})]}),d&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}function O({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,left:r,right:o,connector:s=`→`,ratioLabel:c=`ratio`,footer:l,delay:u}){let d=i[t]||i.layers,[f,p]=(0,_.useState)(null),m=r.color||`var(--presence)`,h=o.color||`var(--insight)`,g=r.weight+o.weight||1,y=o.weight===0?`—`:(r.weight/o.weight).toFixed(2),b=r.weight/g*100;return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(u||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsxs)(`div`,{className:`sp-row`,children:[(0,v.jsxs)(`div`,{className:`sp-side ${f===`left`?`on`:``}`,onMouseEnter:()=>p(`left`),onMouseLeave:()=>p(null),children:[(0,v.jsx)(`div`,{className:`sp-val tab-num`,style:{color:m},children:r.value}),(0,v.jsx)(`div`,{className:`sp-label`,children:r.label}),r.sub&&(0,v.jsx)(`div`,{className:`sp-sub faint`,children:r.sub})]}),(0,v.jsx)(`div`,{className:`sp-connector`,children:(0,v.jsx)(`span`,{className:`sp-arrow`,children:s})}),(0,v.jsxs)(`div`,{className:`sp-side right ${f===`right`?`on`:``}`,onMouseEnter:()=>p(`right`),onMouseLeave:()=>p(null),children:[(0,v.jsx)(`div`,{className:`sp-val tab-num`,style:{color:h},children:o.value}),(0,v.jsx)(`div`,{className:`sp-label`,children:o.label}),o.sub&&(0,v.jsx)(`div`,{className:`sp-sub faint`,children:o.sub})]})]}),(0,v.jsxs)(`div`,{className:`sp-bar`,children:[(0,v.jsx)(`span`,{className:`sp-bar-l`,style:{width:b+`%`,background:m}}),(0,v.jsx)(`span`,{className:`sp-bar-r`,style:{width:100-b+`%`,background:h}})]}),(0,v.jsxs)(`div`,{className:`sp-ratio`,children:[(0,v.jsx)(`span`,{className:`sp-ratio-v tab-num`,"data-mark":`underline`,children:y}),(0,v.jsx)(`span`,{className:`sp-ratio-l faint`,children:c})]}),l&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}function k({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,cols:r=2,tiles:o,footer:s,delay:c}){let l=i[t]||i.table,[u,d]=(0,_.useState)(null);return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(c||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsx)(`div`,{className:`sc-grid`,style:{"--sc-cols":r},children:o.map((e,t)=>{let n=e.icon?i[e.icon]||i.spark:null,r=e.color||`var(--presence)`,o=u===t;return(0,v.jsxs)(`div`,{className:`sc-tile ${o?`on`:``}`,onMouseEnter:()=>d(t),onMouseLeave:()=>d(null),children:[(0,v.jsxs)(`div`,{className:`sc-tile-top`,children:[n&&(0,v.jsx)(n,{className:`ic sc-tile-ic`,style:{color:r}}),(0,v.jsx)(`span`,{className:`sc-tile-label`,children:e.label})]}),(0,v.jsx)(`div`,{className:`sc-tile-val tab-num`,style:{color:r},children:e.value}),e.delta&&(0,v.jsxs)(`div`,{className:`sc-tile-delta delta ${e.deltaDir||`up`}`,children:[(0,v.jsx)(i.arrowUp,{className:`ic`,style:{width:12,height:12,transform:e.deltaDir===`down`?`rotate(180deg)`:`none`}}),e.delta]}),e.detail&&(0,v.jsx)(`div`,{className:`sc-tile-detail`,"data-open":o,dangerouslySetInnerHTML:a(e.detail)})]},t)})}),s&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function A({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,prefix:r=``,suffix:o=``,steps:s,footer:c,delay:l}){let u=i[t]||i.layers,[d,f]=(0,_.useState)(null),p=0,m=s.map(e=>(e.isBase||e.isTotal?p=e.delta:p+=e.delta,{...e,running:p})),h=Math.max(...m.map(e=>Math.abs(e.running)),1),g=e=>r+e.toLocaleString()+o,y=(()=>{let e=m.findIndex(e=>e.isTotal);return e>=0?e:m.length-1})();return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(l||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsx)(`div`,{className:`dc-list`,children:m.map((e,t)=>{let n=e.delta>=0,r=e.isBase||e.isTotal?`var(--presence)`:n?`var(--insight)`:`var(--danger)`,i=Math.abs(e.running)/h*100,o=d===t;return(0,v.jsxs)(`div`,{className:`dc-step ${e.isBase?`base`:``} ${e.isTotal?`total`:``} ${o?`on`:``}`,onMouseEnter:()=>f(t),onMouseLeave:()=>f(null),children:[(0,v.jsxs)(`div`,{className:`dc-step-head`,children:[(0,v.jsx)(`span`,{className:`dc-step-label`,children:e.label}),(0,v.jsx)(`span`,{className:`dc-step-delta tab-num`,"data-mark":t===y?`underline`:void 0,style:{color:r},children:e.isBase||e.isTotal?g(e.running):(n?`+`:``)+g(e.delta)})]}),(0,v.jsx)(`div`,{className:`dc-step-track`,children:(0,v.jsx)(`span`,{className:`dc-step-fill`,style:{width:i+`%`,background:r}})}),!e.isTotal&&(0,v.jsxs)(`div`,{className:`dc-run faint tab-num`,children:[`→ `,g(e.running)]}),e.detail&&(0,v.jsx)(`div`,{className:`dc-detail`,"data-open":o,dangerouslySetInnerHTML:a(e.detail)})]},t)})}),c&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}function j({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,rows:r,footer:o,delay:s}){let c=i[t]||i.chart,[l,u]=(0,_.useState)(null),d=(()=>{let e=0;return r.forEach((t,n)=>{t.value>r[e].value&&(e=n)}),e})();return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(s||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsx)(`div`,{className:`bk-list`,children:r.map((e,t)=>{let n=e.color||`var(--presence)`,r=e.max||1,i=Math.max(0,Math.min(100,e.value/r*100)),a=Math.max(0,Math.min(100,e.target/r*100)),o=e.value>=e.target,s=l===t,c=e.target===0?0:Math.round(e.value/e.target*100);return(0,v.jsxs)(`div`,{className:`bk-row ${s?`on`:``}`,onMouseEnter:()=>u(t),onMouseLeave:()=>u(null),children:[(0,v.jsxs)(`div`,{className:`bk-head`,children:[(0,v.jsx)(`span`,{className:`bk-label`,children:e.label}),(0,v.jsx)(`span`,{className:`bk-val tab-num`,style:{color:n},children:e.display??e.value.toLocaleString()})]}),(0,v.jsxs)(`div`,{className:`bk-track`,children:[(0,v.jsx)(`span`,{className:`bk-band`}),(0,v.jsx)(`span`,{className:`bk-fill`,"data-mark":t===d?`circle`:void 0,style:{width:i+`%`,background:o?n:`color-mix(in oklab, ${n} 60%, var(--warning))`}}),(0,v.jsx)(`span`,{className:`bk-target`,style:{left:a+`%`},title:`target ${e.target}`})]}),(0,v.jsxs)(`div`,{className:`bk-meta faint tab-num`,"data-on":s,children:[c,`% of target`,s?` · target ${e.target.toLocaleString()}`:``]})]},t)})}),o&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var M=360,ee=320,N=96,te=56,ne=16,re=20,P=30;function F(e){let t=0;for(let n of e)Number.isFinite(n)&&(t+=n);return t}function ie(e){if(!Number.isFinite(e))return`—`;let t=Math.round(e*1e3)/10;return(Number.isInteger(t)?t.toString():t.toFixed(1))+`%`}var ae=1/5.6;function oe(e,t){let n=Math.max(3,Math.floor(t*ae));return e.length>n?e.slice(0,n-1).trimEnd()+`…`:e}function se({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,classes:r,matrix:o,correctColor:s=`var(--presence)`,errorColor:c=`var(--danger)`,showTotals:u=!1,readout:d=`accuracy`,actualLabel:f=`Actual`,predictedLabel:p=`Predicted`,countLabel:m=`samples`,footer:h,delay:g}){let y=i[t]||i.table,b=(0,_.useMemo)(()=>{let e=r?.length??0;if(e<2||!o||o.length<e)return null;let t=r.map((e,t)=>{let n=o[t]??[];return r.map((e,t)=>{let r=n[t];return Number.isFinite(r)?r:0})}),n=t.reduce((e,t)=>e+F(t),0),i=t.reduce((e,t,n)=>e+(Number.isFinite(t[n])?t[n]:0),0),a=n>0?i/n:0,s=Math.max(1,...t.flat()),c=r.map((e,n)=>{let r=t.reduce((e,t)=>e+(Number.isFinite(t[n])?t[n]:0),0),i=F(t[n])>0?t[n][n]/F(t[n]):NaN;return{label:e,precision:r>0?t[n][n]/r:NaN,recall:i}}),d=M-ne-(u?P:0),f=ee-re-(u?P:0),p=Math.min(d-N,f-te),m=N,h=te;return{n:e,grid:t,total:n,correct:i,accuracy:a,perClass:c,ex:l([0,e],[m,m+p]),ey:l([0,e],[h,h+p]),cell:p/e,side:p,x0:m,y0:h,heat:e=>s>0?Math.sqrt(Math.max(0,e)/s):0,colTotals:r.map((e,n)=>t.reduce((e,t)=>e+(Number.isFinite(t[n])?t[n]:0),0)),rowTotals:t.map(e=>F(e))}},[r,o,u]);return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(g||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(y,{className:`ic`,style:{color:n}}),` `,e]}),b&&(0,v.jsxs)(`div`,{className:`cfm-wrap`,children:[(0,v.jsxs)(`svg`,{viewBox:`0 0 ${M} ${ee}`,className:`cfm-svg`,role:`img`,"aria-label":e,children:[b.grid.map((e,t)=>e.map((e,n)=>{let r=b.ex(n),i=b.ey(t),a=t===n,o=a?s:c,l=b.heat(e),u=`color-mix(in oklab, ${o} ${(8+l*80).toFixed(1)}%, transparent)`,d=l>.55;return(0,v.jsxs)(`g`,{children:[(0,v.jsx)(`rect`,{x:r+1,y:i+1,width:b.cell-2,height:b.cell-2,rx:4,fill:u,className:a?`cfm-cell cfm-cell--diag`:`cfm-cell`}),(0,v.jsx)(`text`,{x:r+b.cell/2,y:i+b.cell/2,className:d?`cfm-count cfm-count--on`:`cfm-count`,textAnchor:`middle`,dominantBaseline:`central`,"data-mark":a?`point`:void 0,children:e.toLocaleString()})]},`c${t}-${n}`)})),(0,v.jsx)(`rect`,{x:b.x0,y:b.y0,width:b.side,height:b.side,className:`cfm-frame`,fill:`none`}),r.map((e,t)=>{let n=oe(e,N-12);return(0,v.jsxs)(`text`,{x:b.x0-8,y:b.ey(t)+b.cell/2,className:`cfm-class`,textAnchor:`end`,dominantBaseline:`central`,children:[n!==e&&(0,v.jsx)(`title`,{children:e}),n]},`rl${t}`)}),r.map((e,t)=>{let n=oe(e,b.cell-4);return(0,v.jsxs)(`text`,{x:b.ex(t)+b.cell/2,y:b.y0-8,className:`cfm-class`,textAnchor:`middle`,children:[n!==e&&(0,v.jsx)(`title`,{children:e}),n]},`cl${t}`)}),(0,v.jsxs)(`text`,{x:0,y:0,transform:`translate(18, ${b.y0+b.side/2}) rotate(-90)`,className:`cfm-axis-title`,textAnchor:`middle`,children:[f,` ↓`]}),(0,v.jsxs)(`text`,{x:b.x0+b.side/2,y:18,className:`cfm-axis-title`,textAnchor:`middle`,children:[p,` →`]}),u&&(0,v.jsxs)(`g`,{className:`cfm-totals`,children:[b.rowTotals.map((e,t)=>(0,v.jsx)(`text`,{x:b.x0+b.side+P/2,y:b.ey(t)+b.cell/2,className:`cfm-total`,textAnchor:`middle`,dominantBaseline:`central`,children:e.toLocaleString()},`rt${t}`)),b.colTotals.map((e,t)=>(0,v.jsx)(`text`,{x:b.ex(t)+b.cell/2,y:b.y0+b.side+P/2,className:`cfm-total`,textAnchor:`middle`,dominantBaseline:`central`,children:e.toLocaleString()},`ct${t}`)),(0,v.jsx)(`text`,{x:b.x0+b.side+P/2,y:b.y0-8,className:`cfm-total-hd`,textAnchor:`middle`,children:`Σ`}),(0,v.jsx)(`text`,{x:b.x0-8,y:b.y0+b.side+P/2,className:`cfm-total-hd`,textAnchor:`end`,dominantBaseline:`central`,children:`Σ`})]})]}),d===`accuracy`&&(0,v.jsxs)(`div`,{className:`cfm-readout`,children:[(0,v.jsx)(`span`,{className:`cfm-acc tab-num`,style:{color:s},"data-mark":`underline`,children:ie(b.accuracy)}),(0,v.jsxs)(`span`,{className:`cfm-acc-lbl faint`,children:[`accuracy · `,b.correct.toLocaleString(),` of `,b.total.toLocaleString(),` `,m,` correct`]})]}),d===`perclass`&&(0,v.jsxs)(`div`,{className:`cfm-pc`,children:[(0,v.jsxs)(`div`,{className:`cfm-pc-row cfm-pc-head`,children:[(0,v.jsx)(`span`,{className:`cfm-pc-name`,children:`Class`}),(0,v.jsx)(`span`,{className:`cfm-pc-val`,children:`Precision`}),(0,v.jsx)(`span`,{className:`cfm-pc-val`,children:`Recall`})]}),b.perClass.map((e,t)=>(0,v.jsxs)(`div`,{className:`cfm-pc-row`,children:[(0,v.jsx)(`span`,{className:`cfm-pc-name`,children:e.label}),(0,v.jsx)(`span`,{className:`cfm-pc-val tab-num`,children:ie(e.precision)}),(0,v.jsx)(`span`,{className:`cfm-pc-val tab-num`,children:ie(e.recall)})]},`pc${t}`))]})]}),!b&&(0,v.jsx)(`div`,{className:`cfm-empty faint`,children:`Provide a class list and a square N×N matrix (matrix[i][j] = actual i predicted j).`}),h&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(h)})]})}var I=r(),L=132,R=40,z=4;function ce(e){return e===`down`?`var(--danger)`:`var(--insight)`}function le(e){let t=(0,I.c)(45),{spark:n,color:r}=e,[i,a]=(0,_.useState)(Math.max(0,n.length-1)),o=Math.min(...n),s=Math.max(...n),c=s-o||1,l;t[0]===n.length?l=t[1]:(l=e=>z+e/Math.max(1,n.length-1)*(L-z*2),t[0]=n.length,t[1]=l);let u=l,d;t[2]!==o||t[3]!==c?(d=e=>R-z-(e-o)/c*(R-z*2),t[2]=o,t[3]=c,t[4]=d):d=t[4];let f=d,p;if(t[5]!==n||t[6]!==u||t[7]!==f){let e;t[9]!==u||t[10]!==f?(e=(e,t)=>`${u(t)},${f(e)}`,t[9]=u,t[10]=f,t[11]=e):e=t[11],p=n.map(e).join(` `),t[5]=n,t[6]=u,t[7]=f,t[8]=p}else p=t[8];let m=p,h=`${z},${R} ${m} ${L-z},${R}`,g=Math.min(i,n.length-1),y;t[12]===o?y=t[13]:(y=Math.round(o),t[12]=o,t[13]=y);let b;t[14]===s?b=t[15]:(b=Math.round(s),t[14]=s,t[15]=b);let x=`kd-${y}-${b}-${n.length}`,S,C;t[16]===r?(S=t[17],C=t[18]):(S=(0,v.jsx)(`stop`,{offset:`0%`,stopColor:r,stopOpacity:`0.2`}),C=(0,v.jsx)(`stop`,{offset:`100%`,stopColor:r,stopOpacity:`0`}),t[16]=r,t[17]=S,t[18]=C);let w;t[19]!==x||t[20]!==S||t[21]!==C?(w=(0,v.jsx)(`defs`,{children:(0,v.jsxs)(`linearGradient`,{id:x,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[S,C]})}),t[19]=x,t[20]=S,t[21]=C,t[22]=w):w=t[22];let T=`url(#${x})`,E;t[23]!==h||t[24]!==T?(E=(0,v.jsx)(`polygon`,{points:h,fill:T}),t[23]=h,t[24]=T,t[25]=E):E=t[25];let D;t[26]!==r||t[27]!==m?(D=(0,v.jsx)(`polyline`,{points:m,fill:`none`,stroke:r,strokeWidth:`1.75`,strokeLinejoin:`round`,strokeLinecap:`round`}),t[26]=r,t[27]=m,t[28]=D):D=t[28];let O;if(t[29]!==n||t[30]!==u){let e;t[32]!==n.length||t[33]!==u?(e=(e,t)=>(0,v.jsx)(`rect`,{x:u(t)-L/n.length/2,y:0,width:L/n.length,height:R,fill:`transparent`,onMouseEnter:()=>a(t),style:{cursor:`pointer`}},t),t[32]=n.length,t[33]=u,t[34]=e):e=t[34],O=n.map(e),t[29]=n,t[30]=u,t[31]=O}else O=t[31];let k=u(g),A=f(n[g]),j;t[35]!==r||t[36]!==k||t[37]!==A?(j=(0,v.jsx)(`circle`,{cx:k,cy:A,r:`2.6`,fill:r,stroke:`var(--surface-elevated)`,strokeWidth:`1.4`}),t[35]=r,t[36]=k,t[37]=A,t[38]=j):j=t[38];let M;return t[39]!==E||t[40]!==D||t[41]!==O||t[42]!==j||t[43]!==w?(M=(0,v.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 ${L} ${R}`,className:`kd-spark`,preserveAspectRatio:`none`,children:[w,E,D,O,j]}),t[39]=E,t[40]=D,t[41]=O,t[42]=j,t[43]=w,t[44]=M):M=t[44],M}function ue({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,tiles:r,caption:o,footer:s,delay:c}){let l=i[t]||i.chart;return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(c||0)+`ms`},children:[e&&(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,v.jsx)(`div`,{className:`kd-grid`,children:r.map((e,t)=>{let n=e.deltaDir||`up`,r=ce(n),a=e.spark?.filter(e=>Number.isFinite(e))??[];return(0,v.jsxs)(`div`,{className:`kd-tile`,children:[(0,v.jsx)(`div`,{className:`kd-tile-label`,children:e.label}),(0,v.jsxs)(`div`,{className:`kd-tile-val tab-num`,children:[e.value,e.unit&&(0,v.jsx)(`span`,{className:`kd-tile-unit`,children:e.unit})]}),e.delta&&(0,v.jsxs)(`div`,{className:`kd-tile-delta`,style:{color:r},children:[(0,v.jsx)(i.arrowUp,{className:`ic`,style:{width:12,height:12,transform:n===`down`?`rotate(180deg)`:`none`}}),(0,v.jsx)(`span`,{className:`kd-tile-delta-t`,children:e.delta})]}),a.length>1&&(0,v.jsx)(`div`,{className:`kd-tile-spark`,children:(0,v.jsx)(le,{spark:a,color:r})}),e.conf&&(0,v.jsx)(`div`,{className:`kd-tile-conf faint`,children:e.conf})]},t)})}),o&&(0,v.jsx)(`div`,{className:`kd-caption faint`,children:o}),s&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function de(e){if(!Number.isFinite(e))return`—`;let t=e*100,n=Math.abs(t),r=n===0?0:n<1?2:+(n<10);return`${t.toFixed(r)}%`}function fe(e){return Number.isFinite(e)?Math.round(e).toLocaleString():`—`}function B(e){return`${e>=0?`+`:``}${e.toFixed(1)}%`}function pe(e){return e<.001?`p < .001`:`p = ${e.toFixed(3).replace(/^0\./,`.`)}`}function me(e,t,n){let r=Math.min(e,t),i=Math.max(e,t);if(!Number.isFinite(r)||!Number.isFinite(i))return null;let a=[r,i,0,...n!==null&&Number.isFinite(n)?[n]:[]],o=Math.min(...a),s=Math.max(...a),c=Math.max((s-o)*.14,.5),l=o-c,u=s+c-l||1,d=e=>(e-l)/u*100;return{loPct:d(r),hiPct:d(i),zeroPct:d(0),pointPct:n!==null&&Number.isFinite(n)?d(n):null}}function he({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,control:r,variant:o,pValue:s,confidenceInterval:c,significant:l,footer:u,delay:d}){let f=i[t]||i.chart,[p,h]=(0,_.useState)(null),g=r.conversionRate>0?(o.conversionRate-r.conversionRate)/r.conversionRate*100:NaN,y=Number.isFinite(g),b=m(y?g:0,{delay:(d||0)+260,format:B}),x=y?g>0?`var(--insight)`:g<0?`var(--danger)`:`var(--text-muted)`:`var(--text-muted)`,S=typeof l==`boolean`,C=typeof s==`number`&&Number.isFinite(s),w=S?l:C?s<.05:null,T=S||C,E=c&&c.length===2?me(c[0],c[1],y?g:null):null;return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(d||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),T&&(0,v.jsx)(`div`,{className:`abt-head`,children:(0,v.jsxs)(`span`,{className:`abt-badge m-scale-in ${w?`on`:``}`,children:[w&&(0,v.jsx)(i.check,{className:`ic abt-badge-ic`}),w?`Significant`:`Not significant`,C&&(0,v.jsx)(`span`,{className:`abt-badge-p`,children:pe(s)})]})}),(0,v.jsxs)(`div`,{className:`abt-row`,children:[(0,v.jsxs)(`div`,{className:`abt-side m-fade-rise m-stagger-item ${p===`control`?`on`:``}`,style:{"--i":0},onMouseEnter:()=>h(`control`),onMouseLeave:()=>h(null),children:[(0,v.jsx)(`div`,{className:`abt-name`,children:r.name}),(0,v.jsx)(`div`,{className:`abt-val tab-num`,children:de(r.conversionRate)}),(0,v.jsxs)(`div`,{className:`abt-n faint`,children:[`n = `,fe(r.n)]})]}),(0,v.jsx)(`div`,{className:`abt-connector`,children:(0,v.jsx)(`span`,{className:`abt-arrow`,children:`→`})}),(0,v.jsxs)(`div`,{className:`abt-side m-fade-rise m-stagger-item ${p===`variant`?`on`:``}`,style:{"--i":1},onMouseEnter:()=>h(`variant`),onMouseLeave:()=>h(null),children:[(0,v.jsx)(`div`,{className:`abt-name`,children:o.name}),(0,v.jsx)(`div`,{className:`abt-val tab-num`,style:{color:x},children:de(o.conversionRate)}),(0,v.jsxs)(`div`,{className:`abt-n faint`,children:[`n = `,fe(o.n)]})]})]}),(0,v.jsxs)(`div`,{className:`abt-lift m-fade-rise m-stagger-item`,style:{"--i":2},children:[(0,v.jsx)(`span`,{className:`abt-lift-v tab-num`,style:{color:x},"data-mark":`underline`,children:y?b:`—`}),(0,v.jsx)(`span`,{className:`abt-lift-l faint`,children:`relative lift`})]}),E&&c&&(0,v.jsxs)(`div`,{className:`abt-ci m-fade-rise m-stagger-item`,style:{"--i":3},children:[(0,v.jsx)(`span`,{className:`abt-ci-lbl faint`,children:`95% confidence interval`}),(0,v.jsxs)(`div`,{className:`abt-ci-track`,children:[(0,v.jsx)(`span`,{className:`abt-ci-band`,style:{left:`${E.loPct}%`,width:`${Math.max(E.hiPct-E.loPct,1.5)}%`}}),(0,v.jsx)(`span`,{className:`abt-ci-zero`,style:{left:`${E.zeroPct}%`},title:`no effect`}),E.pointPct!==null&&(0,v.jsx)(`span`,{className:`abt-ci-point`,style:{left:`${E.pointPct}%`}})]}),(0,v.jsxs)(`div`,{className:`abt-ci-labels`,children:[(0,v.jsx)(`span`,{className:`tab-num`,children:B(c[0])}),(0,v.jsx)(`span`,{className:`tab-num`,children:B(c[1])})]})]}),u&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var ge=320,_e=176,V={top:14,right:14,bottom:32,left:42},ve=[0,.25,.5,.75,1];function ye(e){let t=e<0?-1:1,n=Math.abs(e),r=1/(1+.3275911*n);return t*(1-((((1.061405429*r-1.453152027)*r+1.421413741)*r-.284496736)*r+.254829592)*r*Math.exp(-n*n))}function be(e){return .5*(1+ye(e/Math.SQRT2))}function xe(e){if(!(e>0)||!(e<1))return NaN;let t=[-39.69683028665376,220.9460984245205,-275.9285104469687,138.357751867269,-30.66479806614716,2.506628277459239],n=[-54.47609879822406,161.5858368580409,-155.6989798598866,66.80131188771972,-13.28068155288572],r=[-.007784894002430293,-.3223964580411365,-2.400758277161838,-2.549732539343734,4.374664141464968,2.938163982698783],i=[.007784695709041462,.3224671290700398,2.445134137142996,3.754408661907416];if(e<.02425){let t=Math.sqrt(-2*Math.log(e));return(((((r[0]*t+r[1])*t+r[2])*t+r[3])*t+r[4])*t+r[5])/((((i[0]*t+i[1])*t+i[2])*t+i[3])*t+1)}if(e<=.97575){let r=e-.5,i=r*r;return(((((t[0]*i+t[1])*i+t[2])*i+t[3])*i+t[4])*i+t[5])*r/(((((n[0]*i+n[1])*i+n[2])*i+n[3])*i+n[4])*i+1)}let a=Math.sqrt(-2*Math.log(1-e));return-(((((r[0]*a+r[1])*a+r[2])*a+r[3])*a+r[4])*a+r[5])/((((i[0]*a+i[1])*a+i[2])*a+i[3])*a+1)}function Se(e){return`α = ${e.toFixed(e<.01?3:2).replace(/^0\./,`.`)}`}function Ce({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,effectSize:r,alpha:s,power:h,requiredN:g,curve:y,footer:b,delay:x}){let S=i[t]||i.chart,C=(0,_.useRef)(null),w=(0,_.useMemo)(()=>{let e=Math.abs(r);if(!Number.isFinite(e)||e<=0)return null;let t=typeof s==`number`&&Number.isFinite(s)&&s>0&&s<1?s:.05,n=typeof g==`number`&&Number.isFinite(g)&&g>0?Math.max(1,Math.round(g)):null,i=typeof h==`number`&&Number.isFinite(h)&&h>0&&h<1?h:null,a=xe(1-t/2);if(n!==null){let r=i??be(Math.sqrt(n*e*e/2)-a);return{n,p:Math.min(1,Math.max(0,r)),alpha:t,d:e,mode:`evaluate`,derived:i===null}}let o=i??.8,c=xe(o);return{n:Math.ceil(2*(a+c)**2/(e*e)),p:o,alpha:t,d:e,mode:`design`,derived:!0}},[r,s,h,g]),T=m(w?.n??0,{delay:(x||0)+140,decimals:0}),E=(0,_.useMemo)(()=>{if(!w||!y||y.length===0)return null;let e=y.filter(e=>Number.isFinite(e?.n)&&e.n>0&&Number.isFinite(e?.power)).map(e=>({n:e.n,power:Math.min(1,Math.max(0,e.power))})).sort((e,t)=>e.n-t.n);if(e.length===0)return null;let t=f(e.map(e=>e.n).concat([w.n]))?.[1]??w.n,[n,r]=u(0,Math.max(t,1)),i=ge-V.left-V.right,a=_e-V.top-V.bottom,o=l([n,r],[V.left,V.left+i]),s=l([0,1],[V.top+a,V.top]);return{sx:o,sy:s,path:e.length>1?`M${e.map(e=>`${o(e.n)},${s(e.power)}`).join(`L`)}`:``,innerW:i,innerH:a,nTicks:c(n,r,d(r-n,4))}},[y,w]);if(p(C,{delay:(x||0)+220}),!w)return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(x||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(S,{className:`ic`,style:{color:n}}),` `,e||`Power analysis`]}),(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:`Provide a non-zero effect size.`})]});let D=o(w.p,{decimals:+(w.p>=.995||w.p<.1)});return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(x||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(S,{className:`ic`,style:{color:n}}),` `,e||`Power analysis`]}),(0,v.jsxs)(`div`,{className:`ps-head`,children:[(0,v.jsxs)(`div`,{className:`ps-n-row`,children:[(0,v.jsx)(`span`,{className:`ps-n tab-num`,children:T}),(0,v.jsx)(`span`,{className:`ps-n-suffix`,children:`per group`})]}),(0,v.jsx)(`div`,{className:`ps-power-line`,children:w.mode===`evaluate`&&w.derived?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`span`,{className:`ps-power-arrow`,children:`→`}),` `,(0,v.jsx)(`strong`,{children:D}),` power`,` `,(0,v.jsx)(`span`,{className:`faint`,children:`(achieved at this n)`})]}):(0,v.jsxs)(v.Fragment,{children:[`for `,(0,v.jsx)(`strong`,{children:D}),` power`]})})]}),(0,v.jsxs)(`div`,{className:`ps-stats`,children:[(0,v.jsxs)(`span`,{className:`ps-stat`,children:[(0,v.jsx)(`span`,{className:`ps-stat-k`,children:`effect size`}),(0,v.jsxs)(`span`,{className:`ps-stat-v tab-num`,children:[`d = `,r.toFixed(2)]})]}),(0,v.jsxs)(`span`,{className:`ps-stat`,children:[(0,v.jsx)(`span`,{className:`ps-stat-k`,children:`significance`}),(0,v.jsx)(`span`,{className:`ps-stat-v tab-num`,children:Se(w.alpha)})]})]}),E&&(0,v.jsx)(`div`,{className:`ps-curve-wrap`,children:(0,v.jsxs)(`svg`,{viewBox:`0 0 ${ge} ${_e}`,className:`ps-svg`,role:`img`,"aria-label":`Power vs. sample size, marked at n=${w.n}`,children:[ve.map(e=>(0,v.jsxs)(`g`,{children:[(0,v.jsx)(`line`,{className:`ps-grid`,x1:V.left,y1:E.sy(e),x2:V.left+E.innerW,y2:E.sy(e)}),(0,v.jsxs)(`text`,{className:`ps-tick`,x:V.left-6,y:E.sy(e)+3.5,textAnchor:`end`,children:[Math.round(e*100),`%`]})]},`g${e}`)),(0,v.jsx)(`line`,{className:`ps-axis`,x1:V.left,y1:V.top+E.innerH,x2:V.left+E.innerW,y2:V.top+E.innerH}),(0,v.jsx)(`line`,{className:`ps-axis`,x1:V.left,y1:V.top,x2:V.left,y2:V.top+E.innerH}),E.nTicks.map(e=>(0,v.jsx)(`text`,{className:`ps-tick`,x:E.sx(e),y:V.top+E.innerH+15,textAnchor:`middle`,children:e.toLocaleString()},`xt${e}`)),E.path&&(0,v.jsx)(`path`,{ref:C,className:`ps-line`,d:E.path,fill:`none`}),(0,v.jsx)(`line`,{className:`ps-mark-guide`,x1:E.sx(w.n),y1:E.sy(w.p),x2:E.sx(w.n),y2:V.top+E.innerH}),(0,v.jsx)(`circle`,{className:`ps-mark`,cx:E.sx(w.n),cy:E.sy(w.p),r:4.5,"data-mark":`point`})]})}),b&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(b)})]})}var we={critical:`var(--danger)`,low:`var(--warning)`,healthy:`var(--insight)`},Te={critical:`Reorder now`,low:`Below reorder point`,healthy:`Healthy`};function H(e){return Math.max(0,Math.min(100,e))}function Ee(e,t){if(!e||typeof e!=`object`)return null;let n=typeof e.sku==`string`?e.sku.trim():``,r=typeof e.label==`string`&&e.label.trim()?e.label.trim():n;if(!r)return null;let i=Number.isFinite(e.level)?Math.max(0,e.level):0,a=Number.isFinite(e.reorderPoint)?Math.max(0,e.reorderPoint):0,o=Number.isFinite(e.safetyStock)?Math.max(0,e.safetyStock):0,s=Math.max(Number.isFinite(e.max)&&e.max>0?e.max:0,i,a,o,1),c=Math.min(a,s),l=Math.min(o,c),u=Number.isFinite(e.leadTimeDays)?Math.max(0,e.leadTimeDays):null,d=i<=l?`critical`:i<=c?`low`:`healthy`;return{key:n||`row-${t}`,sku:n,label:r,level:i,max:s,safetyStock:l,reorderPoint:c,leadTimeDays:u,status:d,levelPct:H(i/s*100),safetyPct:H(l/s*100),reorderPct:H(c/s*100)}}function De({title:e,icon:t=`cart`,iconColor:n=`var(--presence)`,items:r,footer:o,delay:s}){let c=i[t]||i.cart,l=(Array.isArray(r)?r:[]).map(Ee).filter(e=>e!==null);return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(s||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),l.length===0&&(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:`Provide items with a level, a reorder point, and a max.`}),l.length>0&&(0,v.jsx)(`div`,{className:`ir-list`,children:l.map((e,t)=>(0,v.jsxs)(`div`,{className:`ir-row m-fade-rise m-stagger-item`,style:{"--i":t},children:[(0,v.jsxs)(`div`,{className:`ir-head`,children:[(0,v.jsxs)(`div`,{className:`ir-id`,children:[e.sku&&(0,v.jsx)(`span`,{className:`ir-sku`,children:e.sku}),(0,v.jsx)(`span`,{className:`ir-label`,children:e.label})]}),(0,v.jsx)(`span`,{className:`ir-status`,style:{color:we[e.status]},"data-mark":e.status===`critical`?`circle`:void 0,children:Te[e.status]})]}),(0,v.jsxs)(`div`,{className:`ir-track`,children:[(0,v.jsxs)(`div`,{className:`ir-track-inner`,children:[(0,v.jsx)(`span`,{className:`ir-zone ir-zone--danger`,style:{width:`${e.safetyPct}%`}}),(0,v.jsx)(`span`,{className:`ir-zone ir-zone--warn`,style:{left:`${e.safetyPct}%`,width:`${Math.max(0,e.reorderPct-e.safetyPct)}%`}}),(0,v.jsx)(`span`,{className:`ir-zone ir-zone--good`,style:{left:`${e.reorderPct}%`,width:`${Math.max(0,100-e.reorderPct)}%`}}),(0,v.jsx)(`span`,{className:`ir-fill`,style:{width:`${e.levelPct}%`,background:we[e.status]}})]}),(0,v.jsx)(`span`,{className:`ir-tick`,style:{left:`${e.reorderPct}%`},title:`reorder point`})]}),(0,v.jsxs)(`div`,{className:`ir-meta faint tab-num`,children:[e.level.toLocaleString(),` of `,e.max.toLocaleString(),` · reorder at`,` `,e.reorderPoint.toLocaleString(),e.leadTimeDays===null?``:` · ${e.leadTimeDays}d lead time`]})]},e.key))}),o&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}function Oe(e){let t=0;for(let n of e)n!==null&&(t+=n);return t}function ke({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,game:r,players:o,rounds:s,footer:c,delay:l}){let u=i[t]||i.table,d=Array.isArray(o)?o:[],f=Number.isFinite(s)&&s>0?Math.round(s):Math.max(0,...d.map(e=>Array.isArray(e?.roundScores)?e.roundScores.length:0)),p=d.map((e,t)=>{let n=typeof e?.name==`string`&&e.name.trim()?e.name.trim():`Player ${t+1}`,r=Array.isArray(e?.roundScores)?e.roundScores:[],i=Array.from({length:f},(e,t)=>Number.isFinite(r[t])?r[t]:null),a=Number.isFinite(e?.total)?e.total:Oe(i);return{key:`${n}-${t}`,name:n,scores:i,total:a}}),m=p.length>0,h=m?Math.max(...p.map(e=>e.total)):0,g=new Set(m?p.filter(e=>e.total===h).map(e=>e.key):[]),_=g.size===1?p.find(e=>g.has(e.key)):null,y=_&&p.length>1?_.total-Math.max(...p.filter(e=>e.key!==_.key).map(e=>e.total)):null,b=[];b.push((0,v.jsx)(`div`,{className:`bgs-cell bgs-head bgs-corner`,"aria-hidden":`true`},`corner`));for(let e of p)b.push((0,v.jsxs)(`div`,{className:`bgs-cell bgs-head bgs-player`,children:[g.has(e.key)&&(0,v.jsx)(`span`,{className:`bgs-crown`,"aria-label":`leading`,title:`Leading`,children:`●`}),(0,v.jsx)(`span`,{className:`bgs-name`,children:e.name})]},`h-${e.key}`));for(let e=0;e<f;e++){b.push((0,v.jsxs)(`div`,{className:`bgs-cell bgs-rowlabel m-fade-rise m-stagger-item`,style:{"--i":e},children:[`R`,e+1]},`rl-${e}`));for(let t of p)b.push((0,v.jsx)(`div`,{className:`bgs-cell bgs-score tab-num m-fade-rise m-stagger-item`,style:{"--i":e},children:t.scores[e]===null?`–`:t.scores[e].toLocaleString()},`s-${t.key}-${e}`))}b.push((0,v.jsx)(`div`,{className:`bgs-cell bgs-rowlabel bgs-totallabel`,children:`Total`},`tl`));for(let e of p)b.push((0,v.jsx)(`div`,{className:`bgs-cell bgs-total tab-num ${g.has(e.key)?`lead`:``}`,"data-mark":g.has(e.key)?`underline`:void 0,children:e.total.toLocaleString()},`t-${e.key}`));return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(l||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(u,{className:`ic`,style:{color:n}}),` `,e,r&&(0,v.jsx)(`span`,{className:`bgs-game faint`,children:r})]}),!m&&(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:`Provide players with round scores.`}),m&&(0,v.jsx)(`div`,{className:`bgs-scroll`,children:(0,v.jsx)(`div`,{className:`bgs-grid`,style:{"--bgs-cols":p.length,minWidth:`${64+p.length*84}px`},children:b})}),_&&y!==null&&(0,v.jsxs)(`p`,{className:`bgs-lead-note faint`,children:[_.name,` leads`,y>0?` by ${y.toLocaleString()}`:``,`.`]}),c&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var Ae=[`none`,`low`,`medium`,`high`,`critical`];function je(e){switch(e){case`critical`:case`high`:return`var(--danger)`;case`medium`:return`var(--warning)`;case`low`:return`var(--insight)`;default:return`var(--text-muted)`}}function Me(e){return e>=9?`critical`:e>=7?`high`:e>=4?`medium`:e>0?`low`:`none`}var U=132,Ne=U/2-11;function Pe({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,baseScore:r,severity:o,vector:s,cve:c,footer:l,delay:u}){let d=i[t]||i.shield,f=typeof r==`number`&&Number.isFinite(r),p=f?Math.max(0,Math.min(10,r)):0,h=Ae.includes(o)?o:Me(p),g=je(h),_=p/10,y=m(f?p:0,{delay:(u||0)+120,decimals:1}),b=(Array.isArray(s)?s:[]).filter(e=>!!e&&typeof e.label==`string`&&e.label.trim()!==``&&typeof e.value==`string`&&e.value.trim()!==``).slice(0,12),x=typeof c==`string`&&c.trim()?c.trim():null;return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(u||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(d,{className:`ic`,style:{color:n}}),` `,e,x&&(0,v.jsx)(`span`,{className:`cvss-cve`,children:x})]}),(0,v.jsxs)(`div`,{className:`cvss-body`,children:[(0,v.jsxs)(`div`,{className:`gauge-host`,style:{width:U,height:U},children:[(0,v.jsxs)(`svg`,{className:`gauge`,viewBox:`0 0 ${U} ${U}`,width:U,height:U,children:[(0,v.jsx)(`circle`,{cx:U/2,cy:U/2,r:Ne,fill:`none`,stroke:`var(--surface-glass-strong)`,strokeWidth:`10`}),f&&(0,v.jsx)(`circle`,{className:`gauge-arc`,cx:U/2,cy:U/2,r:Ne,fill:`none`,stroke:g,strokeWidth:`10`,strokeLinecap:`round`,pathLength:1,strokeDasharray:1,strokeDashoffset:1-_,transform:`rotate(-90 ${U/2} ${U/2})`})]}),(0,v.jsxs)(`div`,{className:`gauge-center`,children:[(0,v.jsx)(`div`,{className:`gauge-num tab-num`,"data-mark":f?`underline`:void 0,style:{color:g},children:f?y:`—`}),(0,v.jsx)(`div`,{className:`gauge-band`,style:{color:g},children:h})]})]}),(0,v.jsx)(`div`,{className:`cvss-side`,children:b.length>0?(0,v.jsx)(`div`,{className:`cvss-chips`,children:b.map((e,t)=>(0,v.jsxs)(`span`,{className:`cvss-chip m-fade-rise m-stagger-item`,style:{"--i":t},children:[(0,v.jsx)(`span`,{className:`cvss-chip-k`,children:e.label}),(0,v.jsx)(`span`,{className:`cvss-chip-v`,children:e.value})]},t))}):(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:f?`No vector components supplied.`:`Provide a base score 0–10.`})})]}),l&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}var Fe=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--danger)`],Ie=320,W=90,Le=14,Re=12,ze=12,Be=30,Ve=W-10,He=1/5.4;function Ue(e){let t=Math.max(3,Math.floor(Ve*He));return e.length>t?e.slice(0,t-1).trimEnd()+`…`:e}function We(e,t,n,r,i){if(!e)return null;let a=typeof e.label==`string`&&e.label.trim()?e.label.trim():`Series ${t+1}`,o=(Array.isArray(e.curve)?e.curve:[]).filter(e=>Number.isFinite(e)&&e>=0);if(o.length<2)return null;let s=Math.max(...o)||1,c=o.length,l=e=>W+e/(c-1)*i,u=e=>n-e/s*r,d=o.map((e,t)=>`${l(t).toFixed(2)},${u(e).toFixed(2)}`),f=`M${d.join(`L`)}`,p=`M${l(0).toFixed(2)},${n} L${d.join(`L`)} L${l(c-1).toFixed(2)},${n} Z`,m=e.color||Fe[t%Fe.length];return{key:`${a}-${t}`,label:a,color:m,d:p,strokeD:f,baselineY:n}}function Ge(e){let t=(0,I.c)(5),{d:n,color:r,delay:i}=e,a=(0,_.useRef)(null),o;t[0]===i?o=t[1]:(o={delay:i},t[0]=i,t[1]=o),p(a,o);let s;return t[2]!==r||t[3]!==n?(s=(0,v.jsx)(`path`,{ref:a,d:n,fill:`none`,stroke:r,className:`rp-stroke`}),t[2]=r,t[3]=n,t[4]=s):s=t[4],s}function Ke({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,categories:r,overlap:o,footer:s,delay:c}){let l=i[t]||i.chart,u=Be*(1+(Number.isFinite(o)?Math.max(0,Math.min(1,o)):.55)*1.8),d=Ie-W-Le,f=Array.isArray(r)?r:[],p=[];f.forEach((e,t)=>{let n=We(e,t,Re+u+p.length*Be,u,d);n&&p.push(n)});let m=p.length>0?Re+u+(p.length-1)*Be+ze:0;return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(c||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),p.length===0&&(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:`Provide at least one category with two or more curve values.`}),p.length>0&&(0,v.jsx)(`svg`,{viewBox:`0 0 ${Ie} ${m}`,className:`rp-svg`,role:`img`,"aria-label":e,children:p.map((e,t)=>(0,v.jsxs)(`g`,{className:`m-fade-rise m-stagger-item`,style:{"--i":t},children:[(0,v.jsx)(`line`,{x1:W,y1:e.baselineY,x2:Ie-Le,y2:e.baselineY,className:`rp-baseline`}),(0,v.jsx)(`path`,{d:e.d,fill:e.color,className:`rp-area`}),(0,v.jsx)(Ge,{d:e.strokeD,color:e.color,delay:(c||0)+t*60}),(0,v.jsxs)(`text`,{x:W-8,y:e.baselineY+3,className:`rp-label`,textAnchor:`end`,children:[Ue(e.label)!==e.label&&(0,v.jsx)(`title`,{children:e.label}),Ue(e.label)]})]},e.key))}),s&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var G=320,K=200,q={top:14,right:14,bottom:30,left:42},qe=[0,.25,.5,.75,1];function Je(e){let t=e.length,n=[],r=0,i=0;for(;r<t;){let a=e[r],o=r;for(;o<t&&e[o]===a;)o++;n.push({x:a,y:i/t}),i+=o-r,n.push({x:a,y:i/t}),r=o}return n}function Ye(e){let t=e.length,n=Math.floor(t/2);return t%2==0?(e[n-1]+e[n])/2:e[n]}function Xe({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,values:r,unit:o,color:m=`var(--presence)`,footer:h,delay:g}){let y=i[t]||i.chart,b=(0,_.useRef)(null),x=(0,_.useMemo)(()=>{let e=(Array.isArray(r)?r:[]).filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);if(e.length===0)return null;let t=f(e);if(!t)return null;let[n,i]=u(t[0],t[1]),a=l([n,i],[q.left,G-q.right]),o=l([0,1],[K-q.bottom,q.top]),s=Je(e),p=[`M${a(n).toFixed(2)},${o(0).toFixed(2)}`,...s.map(e=>`L${a(e.x).toFixed(2)},${o(e.y).toFixed(2)}`),`L${a(i).toFixed(2)},${o(1).toFixed(2)}`].join(` `),m=c(n,i,d(i-n,5)),h=Ye(e);return{n:e.length,d:p,sx:a,sy:o,xTicks:m,med:h}},[r]);return p(b,{delay:(g||0)+160}),(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(g||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(y,{className:`ic`,style:{color:n}}),` `,e]}),!x&&(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:`Provide at least one numeric value.`}),x&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`svg`,{viewBox:`0 0 ${G} ${K}`,className:`ecdf-svg`,role:`img`,"aria-label":e,children:[qe.map(e=>(0,v.jsxs)(`g`,{children:[(0,v.jsx)(`line`,{className:`ecdf-grid`,x1:q.left,y1:x.sy(e),x2:G-q.right,y2:x.sy(e)}),(0,v.jsx)(`text`,{className:`ecdf-tick`,x:q.left-6,y:x.sy(e)+3.5,textAnchor:`end`,children:e.toFixed(2)})]},`g${e}`)),(0,v.jsx)(`line`,{className:`ecdf-axis`,x1:q.left,y1:K-q.bottom,x2:G-q.right,y2:K-q.bottom}),(0,v.jsx)(`line`,{className:`ecdf-axis`,x1:q.left,y1:q.top,x2:q.left,y2:K-q.bottom}),x.xTicks.map(e=>(0,v.jsx)(`text`,{className:`ecdf-tick`,x:x.sx(e),y:K-q.bottom+15,textAnchor:`middle`,children:s(e,{unit:o||void 0})},`xt${e}`)),(0,v.jsx)(`line`,{className:`ecdf-mark-guide`,x1:x.sx(x.med),y1:K-q.bottom,x2:x.sx(x.med),y2:q.top}),(0,v.jsx)(`path`,{ref:b,className:`ecdf-line`,d:x.d,fill:`none`,stroke:m})]}),(0,v.jsxs)(`p`,{className:`ecdf-caption faint tab-num`,children:[`n = `,x.n.toLocaleString(),` · median`,` `,s(x.med,{unit:o||void 0})]})]}),h&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(h)})]})}var J=480,Ze=116,Qe=46,Y=122,X=J-Qe-10,$e=46,Z=1.959964,et={OR:`Odds ratio`,RR:`Risk ratio`,HR:`Hazard ratio`,MD:`Mean difference`,SMD:`Std. mean difference`};function Q(e){return typeof e==`number`&&Number.isFinite(e)}function $(e){if(!Number.isFinite(e))return`—`;let t=Math.abs(e);return t>=1e3?s(e,{compact:!0}):t>0&&t<.1?s(e,{decimals:3}):s(e,{decimals:t>=100?0:t>=10?1:2})}function tt(e,t,n,r){if(!e||typeof e!=`object`||!Q(e.effect)||!Q(e.ciLow)||!Q(e.ciHigh))return null;let i=Math.min(e.ciLow,e.ciHigh),a=Math.max(e.ciLow,e.ciHigh),o=Math.min(a,Math.max(i,e.effect)),s=!1;n&&(i<=0&&(i=r,s=!0),a<=0&&(a=r,s=!0),o<=0&&(o=r,s=!0),i>a&&([i,a]=[a,i]),o=Math.min(a,Math.max(i,o)));let c=n?Math.log(o):o,l=n?(Math.log(a)-Math.log(i))/(2*Z):(a-i)/(2*Z),u=!s&&Number.isFinite(l)&&l>0?1/(l*l):null,d=typeof e.label==`string`&&e.label.trim()?e.label.trim():`Study ${t+1}`,f=`${d}${Q(e.year)?` ${Math.trunc(e.year)}`:``}${s?` †`:``}`;return{key:`${d}-${t}`,label:f,effect:o,lo:i,hi:a,givenWeight:Q(e.weight)&&e.weight>=0?Math.min(100,e.weight):null,clamped:s,ivWeight:u,theta:c}}function nt(e,t){let n=Math.ceil(e/Math.LN2-1e-9),r=Math.floor(t/Math.LN2+1e-9);if(r<n)return[1];let i=Math.max(1,Math.ceil((r-n+1)/7)),a=[];for(let e=n;e<=r;e++)(e%i+i)%i===0&&a.push(2**e);return a.length?a:[1]}function rt(e){let t=(0,I.c)(14),{label:n,cy:r,maxLines:i,fontSize:a,bold:o}=e,s,c,l,u;if(t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==i){let e=g(n,{maxWidth:Ze-8,fontSize:a,minFontSize:7,maxLines:i,lineHeight:1.12,bold:o}),d=e.lines.slice(0,i),f=r-(d.length-1)*e.lineHeightPx/2;s=o?`fpl-lbl fpl-lbl--pooled`:`fpl-lbl`,c=e.fontSize,l=`start`,u=d.map((t,n)=>(0,v.jsx)(`tspan`,{x:2,y:f+n*e.lineHeightPx,dominantBaseline:`central`,children:t},n)),t[0]=o,t[1]=r,t[2]=a,t[3]=n,t[4]=i,t[5]=s,t[6]=c,t[7]=l,t[8]=u}else s=t[5],c=t[6],l=t[7],u=t[8];let d;return t[9]!==s||t[10]!==c||t[11]!==l||t[12]!==u?(d=(0,v.jsx)(`text`,{className:s,fontSize:c,textAnchor:l,children:u}),t[9]=s,t[10]=c,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function it({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,studies:r,measure:o=`OR`,pooled:f,heterogeneity:p,favorsLeft:m,favorsRight:h,footer:g,delay:y}){let b=i[t]||i.chart,x=(0,_.useMemo)(()=>{let e=et[o]?o:`OR`,t=e===`OR`||e===`RR`||e===`HR`,n=+!!t,i=Array.isArray(r)?r:[],a=1/0;for(let e of i)if(!(!e||typeof e!=`object`))for(let t of[e.effect,e.ciLow,e.ciHigh])Q(t)&&t>0&&t<a&&(a=t);if(f&&typeof f==`object`)for(let e of[f.effect,f.ciLow,f.ciHigh])Q(e)&&e>0&&e<a&&(a=e);let s=a===1/0?.01:a/10,p=[];if(i.forEach((e,n)=>{let r=tt(e,n,t,s);r&&p.push(r)}),p.length===0)return null;let m=p.reduce((e,t)=>e+(t.ivWeight??0),0),h=null;if(f&&typeof f==`object`&&Q(f.effect)&&Q(f.ciLow)&&Q(f.ciHigh)){let e=Math.min(f.ciLow,f.ciHigh),n=Math.max(f.ciLow,f.ciHigh);t&&(e=e<=0?s:e,n=n<=0?s:n);let r=Math.min(n,Math.max(e,t&&f.effect<=0?s:f.effect)),i=typeof f.label==`string`&&f.label.trim()?f.label.trim():`Pooled`;h={effect:r,lo:e,hi:n,label:i,computed:!1}}else if(m>0){let e=p.reduce((e,t)=>e+(t.ivWeight??0)*t.theta,0)/m,n=Math.sqrt(1/m),r=e=>t?Math.exp(e):e;h={effect:r(e),lo:r(e-Z*n),hi:r(e+Z*n),label:`Pooled`,computed:!0}}let g=p.map(e=>e.givenWeight===null?e.ivWeight!==null&&m>0?100*e.ivWeight/m:null:e.givenWeight),_=e=>t?Math.log(e):e,v=_(n===0?0:1),y=v,b=e=>{let t=_(e);t<v&&(v=t),t>y&&(y=t)};p.forEach(e=>{b(e.lo),b(e.hi)}),h&&(b(h.lo),b(h.hi));let x;if(t){y-v<1e-9&&(v-=Math.LN2,y+=Math.LN2);let e=(y-v)*.06;x=nt(v,y),v-=e,y+=e}else [v,y]=u(v,y),x=c(v,y,d(y-v,5));let S=l([v,y],[Y,X]),C=e=>S(_(e)),w=p.length,T=Math.max(11,Math.min(24,Math.round(320/w))),E=h?Math.max(T,20):0,D=32+w*T+3,O=D+(h?5+E:4),k=O+$e,A=Math.max(0,...g.filter(e=>e!==null)),j=Math.min(13,T-2);return{mKey:e,isRatio:t,nullValue:n,rows:p,weights:g,summary:h,x:C,axisTicks:x,rowH:T,rowsTop:32,sepY:D,axisY:O,H:k,side:e=>e===null||!(A>0)?4.5:4+(j-4)*Math.sqrt(Math.max(0,e)/A),anyClamped:p.some(e=>e.clamped)}},[r,o,f]),S=Math.min(7,x?x.rowH-4:7);return(0,v.jsxs)(`div`,{className:`card reveal stats-card`,style:{"--delay":(y||0)+`ms`},children:[(0,v.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,v.jsx)(b,{className:`ic`,style:{color:n}}),` `,e||`Forest plot`]}),!x&&(0,v.jsx)(`p`,{className:`faint`,style:{fontSize:13,margin:0},children:`Provide at least one study with an effect and its confidence interval.`}),x&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`svg`,{viewBox:`0 0 ${J} ${x.H}`,className:`fpl-svg`,role:`img`,"aria-label":e||`Forest plot`,children:[(0,v.jsx)(`text`,{x:2,y:13,className:`fpl-colhead`,textAnchor:`start`,children:`Study`}),(0,v.jsxs)(`text`,{x:546/2,y:13,className:`fpl-colhead`,textAnchor:`middle`,children:[et[x.mKey],x.isRatio?` (log scale)`:``]}),(0,v.jsx)(`text`,{x:J-2,y:13,className:`fpl-colhead`,textAnchor:`end`,children:`Weight`}),(0,v.jsx)(`line`,{className:`fpl-null`,x1:x.x(x.nullValue),y1:26,x2:x.x(x.nullValue),y2:x.axisY}),x.rows.map((e,t)=>{let n=x.rowsTop+t*x.rowH+x.rowH/2,r=x.weights[t],i=x.side(r),a=x.rowH>=22?2:1,o=x.rowH>=18?10.5:x.rowH>=14?9.5:8.5;return(0,v.jsxs)(`g`,{className:e.clamped?`fpl-row fpl-row--clamped m-stagger-item`:`fpl-row m-stagger-item`,style:{"--i":Math.min(t,15)},children:[(0,v.jsx)(`title`,{children:`${e.label}: ${$(e.effect)} (95% CI ${$(e.lo)} to ${$(e.hi)})`+(r===null?``:`, weight ${s(r,{decimals:1})}%`)+(e.clamped?` — clamped to fit the log axis`:``)}),(0,v.jsx)(rt,{label:e.label,cy:n,maxLines:a,fontSize:o}),(0,v.jsx)(`line`,{className:`fpl-ci`,x1:x.x(e.lo),y1:n,x2:x.x(e.hi),y2:n}),(0,v.jsx)(`line`,{className:`fpl-ci`,x1:x.x(e.lo),y1:n-S/2,x2:x.x(e.lo),y2:n+S/2}),(0,v.jsx)(`line`,{className:`fpl-ci`,x1:x.x(e.hi),y1:n-S/2,x2:x.x(e.hi),y2:n+S/2}),(0,v.jsx)(`rect`,{className:`fpl-sq`,x:x.x(e.effect)-i/2,y:n-i/2,width:i,height:i}),(0,v.jsx)(`text`,{x:J-2,y:n,className:`fpl-wt`,textAnchor:`end`,dominantBaseline:`central`,children:r===null?`—`:`${s(r,{decimals:1})}%`})]},e.key)}),x.summary&&(0,v.jsxs)(`g`,{className:`fpl-row m-fade-rise m-stagger-item`,style:{"--i":Math.min(x.rows.length,16)},children:[(0,v.jsx)(`title`,{children:`${x.summary.label}: ${$(x.summary.effect)} (95% CI ${$(x.summary.lo)} to ${$(x.summary.hi)})`+(x.summary.computed?` — fixed-effect inverse-variance pool`:``)}),(0,v.jsx)(`line`,{className:`fpl-sep`,x1:2,y1:x.sepY,x2:J-2,y2:x.sepY}),(()=>{let e=x.sepY+5+Math.max(x.rowH,20)/2,t=Math.min(7,Math.max(5,x.rowH/2-1)),n=x.x(x.summary.lo),r=x.x(x.summary.hi),i=x.x(x.summary.effect);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(rt,{label:x.summary.label,cy:e,maxLines:1,fontSize:10.5,bold:!0}),(0,v.jsx)(`polygon`,{className:`fpl-diamond`,points:`${n},${e} ${i},${e-t} ${r},${e} ${i},${e+t}`}),(0,v.jsx)(`text`,{x:J-2,y:e,className:`fpl-wt fpl-wt--pooled`,textAnchor:`end`,dominantBaseline:`central`,children:`100%`})]})})()]}),(0,v.jsx)(`line`,{className:`fpl-axis`,x1:Y,y1:x.axisY,x2:X,y2:x.axisY}),x.axisTicks.map(e=>(0,v.jsxs)(`g`,{children:[(0,v.jsx)(`line`,{className:`fpl-axis`,x1:x.x(e),y1:x.axisY,x2:x.x(e),y2:x.axisY+4}),(0,v.jsx)(`text`,{className:`fpl-tick`,x:x.x(e),y:x.axisY+15,textAnchor:`middle`,children:Math.abs(e)>=1e3?s(e,{compact:!0}):s(e)})]},`t${e}`)),typeof m==`string`&&m.trim()&&(0,v.jsx)(at,{text:`← ${m.trim()}`,x:Y,anchor:`start`,y:x.axisY+28}),typeof h==`string`&&h.trim()&&(0,v.jsx)(at,{text:`${h.trim()} →`,x:X,anchor:`end`,y:x.axisY+28})]}),(0,v.jsxs)(`p`,{className:`fpl-caption faint tab-num`,children:[x.summary?`${x.summary.label} ${x.mKey} ${$(x.summary.effect)} (95% CI ${$(x.summary.lo)}–${$(x.summary.hi)})`+(x.summary.computed?` · fixed-effect, inverse-variance`:``):`${x.rows.length} ${x.rows.length===1?`study`:`studies`}`,typeof p==`string`&&p.trim()?` · ${p.trim()}`:``]}),x.anyClamped&&(0,v.jsx)(`p`,{className:`fpl-caption faint`,children:`† interval clamped — a log axis cannot place values ≤ 0.`})]}),g&&(0,v.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(g)})]})}function at(e){let t=(0,I.c)(13),{text:n,x:r,anchor:i,y:a}=e,o,s,c,l;if(t[0]!==i||t[1]!==n||t[2]!==r||t[3]!==a){let e=g(n,{maxWidth:(X-Y)/2-8,fontSize:9,minFontSize:7,maxLines:2,lineHeight:1.15});o=`fpl-favors`,s=e.fontSize,c=i,l=e.lines.slice(0,2).map((t,n)=>(0,v.jsx)(`tspan`,{x:r,y:a+n*e.lineHeightPx,children:t},n)),t[0]=i,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l}else o=t[4],s=t[5],c=t[6],l=t[7];let u;return t[8]!==o||t[9]!==s||t[10]!==c||t[11]!==l?(u=(0,v.jsx)(`text`,{className:o,fontSize:s,textAnchor:c,children:l}),t[8]=o,t[9]=s,t[10]=c,t[11]=l,t[12]=u):u=t[12],u}var ot=e({statsRegistry:()=>st}),st={sparkstat:h(y),counter:h(b),herostat:h(x),trendtile:h(T),scorebadge:h(E),percentilebar:h(D),statpair:h(O),scorecard:h(k),deltacascade:h(A),bulletkpi:h(j),confusionmatrix:h(se),kpidashboard:h(ue),abtestresult:h(he),powersample:h(Ce),inventoryreorder:h(De),boardgamescore:h(ke),cvssscorecard:h(Pe),ridgeplot:h(Ke),ecdf:h(Xe),forestplot:h(it)};export{st as n,ot as t};
|