@mavea/mavea 1.0.11 → 1.0.13
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/CHANGELOG.md +18 -1
- package/README.md +33 -164
- package/dist/.vite/manifest.json +606 -606
- package/dist/assets/{AppCommandPalette-DzUPm-Qa.js → AppCommandPalette-D_g8-7C0.js} +1 -1
- package/dist/assets/{BlockEmpty-Dp9IPo4S.js → BlockEmpty-Ddhgr5pu.js} +1 -1
- package/dist/assets/{BriefingPlayer-CTab7H0c.js → BriefingPlayer-D-QhLgXI.js} +1 -1
- package/dist/assets/{CanvasSkeleton-BCq4yAAN.js → CanvasSkeleton-BIiOmCMG.js} +2 -2
- package/dist/assets/{CheckLogRail-DbGJtneK.js → CheckLogRail-ZrDqyjQ7.js} +1 -1
- package/dist/assets/{CodeOutput-DjsCJAel.js → CodeOutput-D7sVg1Nr.js} +1 -1
- package/dist/assets/{CommandPalette-Cq9mDWiI.js → CommandPalette-DNa2q8E_.js} +1 -1
- package/dist/assets/{CourseLessonReader-Dz8IhHEw.js → CourseLessonReader-BIpGjcJk.js} +2 -2
- package/dist/assets/{CourseRail-DjK_L3eD.js → CourseRail-CQaotzN0.js} +1 -1
- package/dist/assets/{CoursesApp-Dv4yt63y.js → CoursesApp-q3kZJmu1.js} +2 -2
- package/dist/assets/{CrossExamPanel-DJCn13Aa.js → CrossExamPanel-BIJslibV.js} +1 -1
- package/dist/assets/{DashPresent-pfOEJGzV.js → DashPresent-DGSE0vYM.js} +1 -1
- package/dist/assets/{DashboardDetail-BSZ3CgcK.js → DashboardDetail-BpaLNg8R.js} +2 -2
- package/dist/assets/DashboardLoopRuntime-14yzj-xx.js +1 -0
- package/dist/assets/{DashboardOverview-DpJ2BDNu.js → DashboardOverview-8x3OxX2i.js} +1 -1
- package/dist/assets/{DashboardSettings-C1rC3iTs.js → DashboardSettings-f_zxcs5j.js} +1 -1
- package/dist/assets/{DashboardsApp-DeBWrYDk.js → DashboardsApp-mvMbGmp0.js} +2 -2
- package/dist/assets/{DeepZoomApp-B91oHx2Y.js → DeepZoomApp-E7bDmzuL.js} +1 -1
- package/dist/assets/{DelegatePanel-bFmfn9-D.js → DelegatePanel-pwRk9pFf.js} +1 -1
- package/dist/assets/{DemoGallery-fYIVdHQV.js → DemoGallery-DDzX8Z7I.js} +1 -1
- package/dist/assets/{DropSelect-DbxAWKQn.js → DropSelect-BMZYAX6q.js} +1 -1
- package/dist/assets/{ExportModal-HczU1Zg1.js → ExportModal-CTMJaU1l.js} +2 -2
- package/dist/assets/{ExtractionPreview-BfjJci-N.js → ExtractionPreview-C9wq7CrK.js} +1 -1
- package/dist/assets/{FlagshipCTA-CTb5P2Ix.js → FlagshipCTA-DPNSflKv.js} +1 -1
- package/dist/assets/{FlagshipCommandPalette-DLkDmsF-.js → FlagshipCommandPalette-55zqyPFm.js} +1 -1
- package/dist/assets/{FlagshipShowcase-CrFSCHHX.js → FlagshipShowcase-BWpoPWOn.js} +1 -1
- package/dist/assets/{FlashcardsApp-CV777TGC.js → FlashcardsApp-apCj3I17.js} +1 -1
- package/dist/assets/{ForecastPanel-BfAngk8l.js → ForecastPanel-CMRD-UKn.js} +1 -1
- package/dist/assets/{GalleryApp-DLssAAhN.js → GalleryApp-CcsbirLT.js} +1 -1
- package/dist/assets/{HonestByDesign-B0o03QVw.js → HonestByDesign-DU4qmc61.js} +1 -1
- package/dist/assets/{HowItWorks-DfUsQ2xD.js → HowItWorks-CkZXftN-.js} +1 -1
- package/dist/assets/{LegalApp-CnFE80Ja.js → LegalApp-BmZpqH-6.js} +1 -1
- package/dist/assets/{LegalMarkdownDocument-BidNcrNj.js → LegalMarkdownDocument-CcbAfubz.js} +1 -1
- package/dist/assets/{LegalPageShell-CFktFKTK.js → LegalPageShell-raMATqhx.js} +1 -1
- package/dist/assets/{LeverPanel-DgfX7mTL.js → LeverPanel-DVUgGcYW.js} +1 -1
- package/dist/assets/{Library-CAnmN5YL.js → Library-D725dNcx.js} +1 -1
- package/dist/assets/{LibraryOverlay-D7Gg_GIv.js → LibraryOverlay-D7PzQIpH.js} +1 -1
- package/dist/assets/LiveApp-B8Jw1Q0h.js +61 -0
- package/dist/assets/{LiveApp-COz1ZZp9.css → LiveApp-DQhDk2ma.css} +1 -1
- package/dist/assets/{LiveSettings-5UCN5UWM.js → LiveSettings-BQ06gZB7.js} +3 -3
- package/dist/assets/{MindMapViewerDrawer-DoXy6hCD.js → MindMapViewerDrawer-CIMuABKE.js} +1 -1
- package/dist/assets/{MindShape-BJCnqyTi.js → MindShape-0KPrv0CF.js} +1 -1
- package/dist/assets/MindShape-Bel2yDqO.css +1 -0
- package/dist/assets/{PinToDashboard-Dq77a2iP.js → PinToDashboard-ML4NFCAU.js} +1 -1
- package/dist/assets/{PlanReview-DvxM1675.js → PlanReview-CbJ_7Ld1.js} +1 -1
- package/dist/assets/{Presence-LNSqCz8N.js → Presence-B_zDfiE7.js} +1 -1
- package/dist/assets/{PresentationDeck-8kT0cMtk.js → PresentationDeck-Tm3PUdh5.js} +1 -1
- package/dist/assets/{PrismApp-Jf4pIAkh.js → PrismApp-Bc-6PO_P.js} +2 -2
- package/dist/assets/{PrismAskController-QXSoZBNb.js → PrismAskController-OwqFx5Pk.js} +1 -1
- package/dist/assets/{PrismBriefingPlayer-edFfwMNP.js → PrismBriefingPlayer-Bu_ZxYdh.js} +2 -2
- package/dist/assets/{PrismOverlay-CYItOpax.js → PrismOverlay-UTsJ8R5d.js} +4 -4
- package/dist/assets/{PrivacyApp-Dqz_BgOS.js → PrivacyApp-BLXan6dm.js} +1 -1
- package/dist/assets/{Recap-Ba2qZ2lX.js → Recap-5rYrcMCC.js} +1 -1
- package/dist/assets/{ReelJelly-9SCjNeHq.js → ReelJelly-Dg3XGB0c.js} +1 -1
- package/dist/assets/{RehearsalPanel-CtYKPl6O.js → RehearsalPanel-CM4466Os.js} +3 -3
- package/dist/assets/{ReplayCard-MSWq-Mxr.js → ReplayCard-wMIMlorH.js} +2 -2
- package/dist/assets/{ReplayOverlay-ChDrwMLh.js → ReplayOverlay-BomkTonB.js} +1 -1
- package/dist/assets/{RewindOverlay-CM9d5xhh.js → RewindOverlay-Izf89nG9.js} +1 -1
- package/dist/assets/{RippleApp-B7G_jg05.js → RippleApp-8QSIEjTX.js} +2 -2
- package/dist/assets/{RippleAskController-CJjt7VG8.js → RippleAskController-Cd86GrKs.js} +1 -1
- package/dist/assets/{RippleOverlay-Cfu3ZVL1.js → RippleOverlay-SCrXZTqz.js} +2 -2
- package/dist/assets/{SeeDontRead-DHhwv6RU.js → SeeDontRead-Bp8qsF20.js} +1 -1
- package/dist/assets/ShareModal-C-sD-aia.js +32 -0
- package/dist/assets/{ShareModal-C8S7ySls.css → ShareModal-PobtP7AJ.css} +1 -1
- package/dist/assets/{ShipCascade-B6kVuilv.js → ShipCascade-Cq_I4c_v.js} +1 -1
- package/dist/assets/{ShipCourse-CerQYrsy.js → ShipCourse-CzsJyMnT.js} +1 -1
- package/dist/assets/{ShipHotspots-DOmWYgHH.js → ShipHotspots-OMjPhQWP.js} +1 -1
- package/dist/assets/{ShipIncident-D0lvmytD.js → ShipIncident-Cqn6ZmKz.js} +1 -1
- package/dist/assets/{ShipMigration-D70LbiJk.js → ShipMigration-5_ZWn7K9.js} +1 -1
- package/dist/assets/{ShipOnboarding-B_0dp9a-.js → ShipOnboarding-Yr8oKgmQ.js} +1 -1
- package/dist/assets/{ShipRead-Cp2s7bSL.js → ShipRead-Bnw7mnv3.js} +1 -1
- package/dist/assets/{ShipRollout-Bw9pvbSM.js → ShipRollout-ECsDrqAd.js} +1 -1
- package/dist/assets/{ShipSuggestions-eHLjOJL5.js → ShipSuggestions-C6oDw2F8.js} +1 -1
- package/dist/assets/{ShipWorkspace-DwdoBSix.js → ShipWorkspace-BT6gZrqd.js} +1 -1
- package/dist/assets/{SignatureLoop-Bl43npTM.js → SignatureLoop-D7sibSnc.js} +1 -1
- package/dist/assets/{SynthesisApp-BkOWv_pc.js → SynthesisApp-B768x2r_.js} +2 -2
- package/dist/assets/{SynthesisOverlay-CHlVL7sT.js → SynthesisOverlay-Ds0MhZLQ.js} +1 -1
- package/dist/assets/{TermsApp-PakIMrh0.js → TermsApp-Da8FeMj3.js} +1 -1
- package/dist/assets/{TopicCanvas-wmAsICUd.js → TopicCanvas-D64O3lvD.js} +2 -2
- package/dist/assets/{TourPrism-VQqowXpY.js → TourPrism-CTf1G-Vv.js} +1 -1
- package/dist/assets/{TrackerTile-C1mU8Zxj.js → TrackerTile-DeujTCk-.js} +2 -2
- package/dist/assets/{TwoSurfaces-SNT4AVzV.js → TwoSurfaces-kyK2yqm0.js} +1 -1
- package/dist/assets/{UnderstoodPanel-BkwhDLhW.js → UnderstoodPanel-Dgwk_Cuj.js} +1 -1
- package/dist/assets/{WhyMachineOverlay-DgYhqU53.js → WhyMachineOverlay-C4eQC0lg.js} +1 -1
- package/dist/assets/{WowFeatures-Cky9THxT.js → WowFeatures-CaBZ5WPM.js} +1 -1
- package/dist/assets/{ZoomDeck-BXwcRCO_.js → ZoomDeck-DnCtbhx1.js} +1 -1
- package/dist/assets/{alternateFinishes-Cn5LyQ0-.js → alternateFinishes-FSV_gA1A.js} +1 -1
- package/dist/assets/{annotationAuto-L2AxlJ2F.js → annotationAuto-x_dV8z65.js} +1 -1
- package/dist/assets/annotationReel-SeXzv0P-.js +1 -0
- package/dist/assets/{backup-Cw4GBHBV.js → backup-0zODkqi-.js} +1 -1
- package/dist/assets/canvas-uhcwigAL.js +1 -0
- package/dist/assets/{catalog-2srqP2Jf.js → catalog-Car_1ocN.js} +1 -1
- package/dist/assets/{dashboardEvents-S4Y2aOP_.js → dashboardEvents-BqcPN-K8.js} +2 -2
- package/dist/assets/{dist-BJbBdhc0.js → dist-BTg4yEWr.js} +1 -1
- package/dist/assets/{fit-C3MkNFdn.js → fit-I3tuibfX.js} +1 -1
- package/dist/assets/{generateLive-Ci8kqPD9.js → generateLive-Dk24OxVt.js} +1 -1
- package/dist/assets/{index-DWHIOldG.js → index-CWqRe4-B.js} +3 -3
- package/dist/assets/{jspdf.es.min-CfZM9xhl.js → jspdf.es.min-wkD3BzGZ.js} +1 -1
- package/dist/assets/kokoro-B-3GqktX.js +1 -0
- package/dist/assets/{lib-C9jT-CD8.js → lib-CwruVYU_.js} +1 -1
- package/dist/assets/{liveSchema-Dw4t_k7M.js → liveSchema-CCpVMy0H.js} +1 -1
- package/dist/assets/{motion-QSGW_vc_.js → motion-CURfDtdH.js} +1 -1
- package/dist/assets/{notes-D21K92Wx.js → notes-BG5QP-Dj.js} +1 -1
- package/dist/assets/{pdf-BP_vXBKO.js → pdf-x4qTBJIZ.js} +1 -1
- package/dist/assets/{perfProbe-DFw7brPU.js → perfProbe-BFwfpxJt.js} +1 -1
- package/dist/assets/{pin-BzDcIYD4.js → pin-DRN5H7py.js} +1 -1
- package/dist/assets/{portal-n6TW0FuE.js → portal-BYHo9LOD.js} +1 -1
- package/dist/assets/{pptxgen.es-GleD8us4.js → pptxgen.es-DGywGiaX.js} +1 -1
- package/dist/assets/{prewarm-CehIIttc.js → prewarm-CQNCE4Uq.js} +1 -1
- package/dist/assets/{quietHours-Brg4oaDf.js → quietHours-CKjQ2pGY.js} +1 -1
- package/dist/assets/{registry-CoCl26Tl.js → registry-1BWL6SXY.js} +1 -1
- package/dist/assets/registry-5a-E7vEN.css +1 -0
- package/dist/assets/{registry-mmGDT0wn.js → registry-9S6KiKjR.js} +1 -1
- package/dist/assets/{registry-BE1QBNKm.js → registry-BZQeYzgv.js} +1 -1
- package/dist/assets/{registry-CG5W7Xs6.js → registry-Bc6_RQ8l.js} +1 -1
- package/dist/assets/{registry-_mqmf4_W.js → registry-BklPTZre.js} +1 -1
- package/dist/assets/{registry-ia68k5sK.js → registry-Bl3NkU-0.js} +1 -1
- package/dist/assets/{registry-NNLA0NQi.js → registry-BpBiRe-o.js} +1 -1
- package/dist/assets/{registry-h3m1zDGt.js → registry-Bpx4VBWb.js} +1 -1
- package/dist/assets/{registry-BvEfWbB0.js → registry-BueBIP-N.js} +1 -1
- package/dist/assets/{registry-eQ4cE0zj.js → registry-CNr6L-3z.js} +1 -1
- package/dist/assets/{registry-CrpEXqNF.js → registry-CfTTYQrE.js} +1 -1
- package/dist/assets/{registry-CePhqBU6.js → registry-CqfjqOX5.js} +2 -2
- package/dist/assets/{registry-D86iln18.js → registry-D84Bs-bD.js} +1 -1
- package/dist/assets/{registry-DgIia4dY.js → registry-DBsjgIxw.js} +1 -1
- package/dist/assets/{registry-vPwth4BB.js → registry-DEgW3zel.js} +1 -1
- package/dist/assets/{registry-BPpjU0S5.js → registry-DFmFBfRz.js} +1 -1
- package/dist/assets/{registry-Cpr0zSyk.js → registry-DrqQbf_n.js} +1 -1
- package/dist/assets/{registry-VKh9QiDf.js → registry-Dw42uggW.js} +1 -1
- package/dist/assets/{registry-HB-VAc6H.js → registry-GLjcQX0n.js} +1 -1
- package/dist/assets/{registry-BYn3Bcie.js → registry-Z3TIPbYJ.js} +1 -1
- package/dist/assets/{registry-ChG5tFfx.js → registry-_T6pLDPG.js} +2 -2
- package/dist/assets/{registry-VS55xdsN.js → registry-aUZZeh27.js} +1 -1
- package/dist/assets/{registry-CFU0k7VB.js → registry-cPmSqaRu.js} +1 -1
- package/dist/assets/{relate-DDWak0Tv.js → relate-yq30L3hZ.js} +1 -1
- package/dist/assets/{shikiHighlight-SWupBCFg.js → shikiHighlight-BgZoQAHs.js} +1 -1
- package/dist/assets/src-B-t8Mww-.js +2 -0
- package/dist/assets/{useDashboardLoop-BSBGTrE2.js → useDashboardLoop-mGmJwv27.js} +3 -3
- package/dist/assets/{useLiveConfig-Cc4IKgOd.js → useLiveConfig-vMyjo2gV.js} +1 -1
- package/dist/assets/{useSpatialCanvas-D3nfHkST.js → useSpatialCanvas-CEXy6ZC2.js} +1 -1
- package/dist/assets/{useSpotlightWalk-gVilFhpa.js → useSpotlightWalk-B9XJ6OLK.js} +1 -1
- package/dist/assets/{useSrsCards-BhFfq4vc.js → useSrsCards-Vc6B2_he.js} +1 -1
- package/dist/assets/{useStudy-DRNarubG.js → useStudy-6QnY-Fw_.js} +1 -1
- package/dist/assets/{useZoomGesture-BdeFOm7j.js → useZoomGesture-BONUz5cE.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/DashboardLoopRuntime-DfnDIGFz.js +0 -1
- package/dist/assets/LiveApp-DmU3RMfZ.js +0 -61
- package/dist/assets/MindShape-Ca3MXEgK.css +0 -1
- package/dist/assets/ShareModal-d_o2hebL.js +0 -32
- package/dist/assets/annotationReel-DdHNp2IH.js +0 -1
- package/dist/assets/canvas-BwR8ltlj.js +0 -1
- package/dist/assets/kokoro-Da60jB7C.js +0 -1
- package/dist/assets/registry-CtbuZWYz.css +0 -1
- package/dist/assets/src-DbgF7cRH.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-DWHIOldG.js";import{t as r}from"./DropSelect-DbxAWKQn.js";import{n as i}from"./store-DXmC_fP2.js";import{v as a}from"./githubToken-DtcLYqwm.js";import{n as o,t as s}from"./courseStore-DfafnL-9.js";import{t as c}from"./links--u_phi0x.js";var l=e(),u=n(),d=`mavea.ripple.course.v2`,f=`mavea.ripple.course.v1`;function p(){try{let e=localStorage.getItem(f);if(!e)return{};let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t))Array.isArray(r)&&(n[e]={lessons:r.filter(e=>typeof e==`number`)});return Object.keys(n).length>0&&h(n),n}catch{return{}}}function m(){try{let e=localStorage.getItem(d);if(e===null)return p();let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}}function h(e){try{localStorage.setItem(d,JSON.stringify(e))}catch{}}function g(e){return new Set(m()[e]?.lessons??[])}function _(e,t,n){let r=m(),i=new Set(r[e]?.lessons??[]);return n?i.add(t):i.delete(t),r[e]={...r[e],lessons:[...i].sort((e,t)=>e-t)},h(r),i}function v(e){return m()[e]?.quiz}function y(e,t,n){let r=m();r[e]={lessons:r[e]?.lessons??[],quiz:{correct:t,total:n,passedAt:Date.now()}},h(r)}function b(e,t){return t>0&&e>=t-1}function x(e){return!!(!(e.lessonsTotal>0&&e.lessonsDone>=e.lessonsTotal)||e.hasQuiz&&!e.quizPassed)}var S=t();function C(e){let t=(0,u.c)(86),{course:n,lesson:r,altitude:i,fileUrl:a,loadLessonDetail:o,speak:s,onAskAboutLesson:c}=e,[d,f]=(0,l.useState)(r.detail??null),[p,m]=(0,l.useState)(`idle`),[h,g]=(0,l.useState)(null),_=(0,l.useRef)(!1),v=(0,l.useRef)(!0),y=(0,l.useRef)(null),b=(0,l.useRef)(0),x,C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>()=>{v.current=!1,y.current!==null&&clearTimeout(y.current)},C=[],t[0]=x,t[1]=C):(x=t[0],C=t[1]),(0,l.useEffect)(x,C);let k;t[2]!==i||t[3]!==n||t[4]!==r||t[5]!==o?(k=e=>{if(!o)return;y.current!==null&&clearTimeout(y.current);let t=b.current+=1;m(`loading`),f(null);let a=s=>{o(n,r,e,i).then(e=>{!v.current||t!==b.current||(e?(f(e),m(`idle`)):s>0?y.current=setTimeout(()=>a(s-1),2e3):m(`error`))})};a(1)},t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=k):k=t[6];let A=k,j;t[7]!==r.detail||t[8]!==o||t[9]!==A?(j=()=>{if(r.detail){f(r.detail);return}!o||_.current||(_.current=!0,A(!1))},t[7]=r.detail,t[8]=o,t[9]=A,t[10]=j):j=t[10];let M;t[11]!==r||t[12]!==o||t[13]!==A?(M=[r,o,A],t[11]=r,t[12]=o,t[13]=A,t[14]=M):M=t[14],(0,l.useEffect)(j,M);let N;t[15]===d?.walkthrough?N=t[16]:(N=d?.walkthrough??[],t[15]=d?.walkthrough,t[16]=N);let P=N,F,I;t[17]!==s||t[18]!==h||t[19]!==P?(F=()=>{if(h===null||!s)return;let e=P[h];e&&s(`${e.focus?e.focus+`. `:``}${e.explain}`)},I=[h,P,s],t[17]=s,t[18]=h,t[19]=P,t[20]=F,t[21]=I):(F=t[20],I=t[21]),(0,l.useEffect)(F,I);let L=r.goal,R=r.explainFor?.[i]??r.goal,z;t[22]!==n||t[23]!==L||t[24]!==r.title||t[25]!==c?(z=c&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-lesson-ask`,onClick:()=>c(`In "${n.title}" — ${r.title}: ${L||`what should I understand here?`}`),children:`Ask about this lesson`}),t[22]=n,t[23]=L,t[24]=r.title,t[25]=c,t[26]=z):z=t[26];let B=z;if(d){let e,n,r;if(t[27]!==B||t[28]!==d.overview||t[29]!==L){let i=d.overview.split(/\n\n+/).filter(te);t[33]===L?e=t[34]:(e=L&&(0,S.jsx)(`p`,{className:`ripple-course-lede`,children:L}),t[33]=L,t[34]=e),n=B,r=i.length>0&&(0,S.jsx)(`div`,{className:`ripple-lesson-overview`,children:i.map(ee)}),t[27]=B,t[28]=d.overview,t[29]=L,t[30]=e,t[31]=n,t[32]=r}else e=t[30],n=t[31],r=t[32];let i;t[35]!==a||t[36]!==h||t[37]!==P?(i=P.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsxs)(`div`,{className:`ripple-lesson-spot-head`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Spotlight — walk the real code`}),(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>g(0),"aria-label":`Step through the code one part at a time`,children:[`▶ Step through (`,P.length,`)`]})]}),h===null?(0,S.jsx)(`ol`,{className:`ripple-walk`,children:P.map((e,t)=>(0,S.jsxs)(`li`,{className:`ripple-walk-step`,children:[(0,S.jsxs)(`div`,{className:`ripple-walk-where`,children:[(0,S.jsx)(`span`,{className:`ripple-walk-num`,"aria-hidden":`true`,children:t+1}),(0,S.jsx)(O,{file:e.file,focus:e.focus,url:a(e.file)})]}),e.code&&(0,S.jsx)(`pre`,{className:`ripple-walk-code`,children:(0,S.jsx)(`code`,{children:e.code})}),(0,S.jsx)(`p`,{className:`ripple-walk-explain`,children:e.explain})]},t))}):(0,S.jsx)(ne,{steps:P,index:h,fileUrl:a,onPrev:()=>g(D),onNext:()=>g(e=>e===null?null:Math.min(P.length-1,e+1)),onClose:()=>g(null)})]}),t[35]=a,t[36]=h,t[37]=P,t[38]=i):i=t[38];let s;t[39]===d.concepts?s=t[40]:(s=d.concepts.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Key concepts`}),(0,S.jsx)(`dl`,{className:`ripple-lesson-concepts`,children:d.concepts.map(E)})]}),t[39]=d.concepts,t[40]=s);let c;t[41]===d.pitfalls?c=t[42]:(c=d.pitfalls&&d.pitfalls.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-caution`,role:`note`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Watch out for`}),(0,S.jsx)(`ul`,{className:`ripple-lesson-pitfalls`,children:d.pitfalls.map(T)})]}),t[41]=d.pitfalls,t[42]=c);let l;t[43]===d.exercise?l=t[44]:(l=d.exercise&&(0,S.jsxs)(`section`,{className:`ripple-course-group ripple-lesson-exercise`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Try it`}),(0,S.jsx)(`p`,{className:`ripple-lesson-task`,children:d.exercise.task}),d.exercise.hint&&(0,S.jsxs)(`p`,{className:`ripple-lesson-hint`,children:[`Hint — `,d.exercise.hint]}),d.exercise.check&&(0,S.jsxs)(`p`,{className:`ripple-lesson-check`,children:[`How you’ll know it worked — `,d.exercise.check]})]}),t[43]=d.exercise,t[44]=l);let u;t[45]!==o||t[46]!==A?(u=o&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-lesson-regen`,onClick:()=>A(!0),title:`Rewrite this lesson from the latest code`,children:`↻ Rewrite this lesson`}),t[45]=o,t[46]=A,t[47]=u):u=t[47];let f;return t[48]!==e||t[49]!==n||t[50]!==r||t[51]!==i||t[52]!==s||t[53]!==c||t[54]!==l||t[55]!==u?(f=(0,S.jsxs)(S.Fragment,{children:[e,n,r,i,s,c,l,u]}),t[48]=e,t[49]=n,t[50]=r,t[51]=i,t[52]=s,t[53]=c,t[54]=l,t[55]=u,t[56]=f):f=t[56],f}if(p===`loading`){let e,n;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),n=(0,S.jsx)(`div`,{className:`ripple-course-skeleton-title`,children:`Writing this lesson from the real code…`}),t[57]=e,t[58]=n):(e=t[57],n=t[58]);let i;t[59]===r.read?i=t[60]:(i=r.read.slice(0,3).join(`, `)||`the relevant files`,t[59]=r.read,t[60]=i);let a;return t[61]===i?a=t[62]:(a=(0,S.jsxs)(`div`,{className:`ripple-course-skeleton`,role:`status`,"aria-live":`polite`,children:[e,n,(0,S.jsxs)(`div`,{className:`ripple-course-skeleton-sub`,children:[`Reading `,i,` to teach it properly — with a walk through the actual code.`]})]}),t[61]=i,t[62]=a),a}if(p===`error`){let e;t[63]===L?e=t[64]:(e=L&&(0,S.jsx)(`p`,{className:`ripple-course-lede`,children:L}),t[63]=L,t[64]=e);let n;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,S.jsx)(`p`,{children:`Couldn’t write this lesson from the code just now.`}),t[65]=n):n=t[65];let r;t[66]===A?r=t[67]:(r=(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>A(!0),children:`Try again`}),t[66]=A,t[67]=r);let i;return t[68]!==e||t[69]!==r?(i=(0,S.jsxs)(`div`,{className:`ripple-course-empty`,children:[e,n,r]}),t[68]=e,t[69]=r,t[70]=i):i=t[70],i}let re;t[71]===R?re=t[72]:(re=(0,S.jsx)(`p`,{className:`ripple-course-explain`,children:R}),t[71]=R,t[72]=re);let ie;t[73]!==a||t[74]!==r.read?(ie=r.read.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Open and read`}),(0,S.jsx)(`div`,{className:`ripple-course-files`,children:r.read.map(e=>(0,S.jsx)(O,{file:e,url:a(e)},e))})]}),t[73]=a,t[74]=r.read,t[75]=ie):ie=t[75];let ae;t[76]===r.concepts?ae=t[77]:(ae=r.concepts.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Key concepts`}),(0,S.jsx)(`ul`,{className:`ripple-course-concepts`,children:r.concepts.map(w)})]}),t[76]=r.concepts,t[77]=ae);let V;t[78]===r.caution?V=t[79]:(V=r.caution&&(0,S.jsxs)(`section`,{className:`ripple-course-caution`,role:`note`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Be careful here — and why`}),(0,S.jsx)(`p`,{className:`ripple-course-caution-text`,children:r.caution})]}),t[78]=r.caution,t[79]=V);let oe;return t[80]!==B||t[81]!==re||t[82]!==ie||t[83]!==ae||t[84]!==V?(oe=(0,S.jsxs)(S.Fragment,{children:[re,B,ie,ae,V]}),t[80]=B,t[81]=re,t[82]=ie,t[83]=ae,t[84]=V,t[85]=oe):oe=t[85],oe}function w(e,t){return(0,S.jsx)(`li`,{children:e},t)}function T(e,t){return(0,S.jsx)(`li`,{children:e},t)}function E(e,t){return(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:e.term}),(0,S.jsx)(`dd`,{children:e.explain})]},t)}function D(e){return e===null?null:Math.max(0,e-1)}function ee(e,t){return(0,S.jsx)(`p`,{children:e},t)}function te(e){return e.trim().length>0}function O(e){let t=(0,u.c)(3),{file:n,focus:r,url:i}=e,a=r?`${n} · ${r}`:n,o;return t[0]!==a||t[1]!==i?(o=i?(0,S.jsxs)(`a`,{className:`ripple-course-file ripple-course-file-link`,href:i,target:`_blank`,rel:`noreferrer noopener`,children:[a,` ↗`]}):(0,S.jsx)(`code`,{className:`ripple-course-file`,children:a}),t[0]=a,t[1]=i,t[2]=o):o=t[2],o}function ne(e){let t=(0,u.c)(36),{steps:n,index:r,fileUrl:i,onPrev:a,onNext:o,onClose:s}=e,c=n[r],l=r+1,d;t[0]!==n.length||t[1]!==l?(d=(0,S.jsxs)(`span`,{className:`ripple-spotlight-count`,children:[l,` / `,n.length]}),t[0]=n.length,t[1]=l,t[2]=d):d=t[2];let f=c.file,p=c.focus,m;t[3]!==i||t[4]!==c.file?(m=i(c.file),t[3]=i,t[4]=c.file,t[5]=m):m=t[5];let h;t[6]!==c.file||t[7]!==c.focus||t[8]!==m?(h=(0,S.jsx)(O,{file:f,focus:p,url:m}),t[6]=c.file,t[7]=c.focus,t[8]=m,t[9]=h):h=t[9];let g;t[10]===s?g=t[11]:(g=(0,S.jsx)(`button`,{type:`button`,className:`ripple-spotlight-x`,onClick:s,"aria-label":`Exit spotlight`,children:`✕`}),t[10]=s,t[11]=g);let _;t[12]!==d||t[13]!==h||t[14]!==g?(_=(0,S.jsxs)(`div`,{className:`ripple-spotlight-bar`,children:[d,h,g]}),t[12]=d,t[13]=h,t[14]=g,t[15]=_):_=t[15];let v;t[16]===c.code?v=t[17]:(v=c.code&&(0,S.jsx)(`pre`,{className:`ripple-walk-code ripple-spotlight-code`,children:(0,S.jsx)(`code`,{children:c.code})}),t[16]=c.code,t[17]=v);let y;t[18]===c.explain?y=t[19]:(y=(0,S.jsx)(`p`,{className:`ripple-spotlight-explain`,children:c.explain}),t[18]=c.explain,t[19]=y);let b=r===0,x;t[20]!==a||t[21]!==b?(x=(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:a,disabled:b,children:`← Back`}),t[20]=a,t[21]=b,t[22]=x):x=t[22];let C;t[23]!==r||t[24]!==s||t[25]!==o||t[26]!==n.length?(C=r<n.length-1?(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:o,children:`Next →`}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:s,children:`Done ✓`}),t[23]=r,t[24]=s,t[25]=o,t[26]=n.length,t[27]=C):C=t[27];let w;t[28]!==x||t[29]!==C?(w=(0,S.jsxs)(`div`,{className:`ripple-spotlight-nav`,children:[x,C]}),t[28]=x,t[29]=C,t[30]=w):w=t[30];let T;return t[31]!==y||t[32]!==w||t[33]!==_||t[34]!==v?(T=(0,S.jsxs)(`div`,{className:`ripple-spotlight`,role:`group`,"aria-label":`Code spotlight`,children:[_,v,y,w]}),t[31]=y,t[32]=w,t[33]=_,t[34]=v,t[35]=T):T=t[35],T}function k(e){let t=(0,u.c)(56),{questions:n,onFinish:r,children:i}=e,[a,o]=(0,l.useState)(0),[s,c]=(0,l.useState)(`ask`),[d,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(0),[_,v]=(0,l.useState)(!1),[y,x]=(0,l.useState)(null),C=n.length,w=n[Math.min(a,C-1)],T=!!(w.choices&&w.choices.length>=2&&w.correct!==void 0),E;t[0]===s?E=t[1]:(E=e=>{s!==`graded`&&(m(e),c(`graded`),e&&g(j))},t[0]=s,t[1]=E);let D=E,ee;t[2]!==D||t[3]!==s||t[4]!==w.correct?(ee=e=>{s!==`graded`&&(f(e),D(e===w.correct))},t[2]=D,t[3]=s,t[4]=w.correct,t[5]=ee):ee=t[5];let te=ee,O;t[6]===s?O=t[7]:(O=()=>{s===`ask`&&c(`revealed`)},t[6]=s,t[7]=O);let ne=O,k;t[8]!==h||t[9]!==a||t[10]!==r||t[11]!==C?(k=()=>{if(a+1>=C){let e={correct:h,total:C};x(e),v(!0),r?.(e);return}o(A),c(`ask`),f(null),m(!1)},t[8]=h,t[9]=a,t[10]=r,t[11]=C,t[12]=k):k=t[12];let M=k;if(_&&y){let e=y.total-y.correct,n=b(y.correct,y.total),r=n?`true`:void 0,a;t[13]!==y.correct||t[14]!==y.total?(a=(0,S.jsxs)(`div`,{className:`ripple-quiz-score-num`,children:[y.correct,`/`,y.total]}),t[13]=y.correct,t[14]=y.total,t[15]=a):a=t[15];let o=n?`You know this one — nice work.`:`Worth another pass — ${e} to revisit.`,s;t[16]===o?s=t[17]:(s=(0,S.jsx)(`p`,{className:`ripple-quiz-score-text`,children:o}),t[16]=o,t[17]=s);let c;t[18]!==r||t[19]!==a||t[20]!==s?(c=(0,S.jsxs)(`div`,{className:`ripple-quiz-score`,"data-passed":r,role:`status`,children:[a,s]}),t[18]=r,t[19]=a,t[20]=s,t[21]=c):c=t[21];let l;return t[22]!==i||t[23]!==c?(l=(0,S.jsxs)(`div`,{className:`ripple-quiz-done`,children:[c,i]}),t[22]=i,t[23]=c,t[24]=l):l=t[24],l}let N=`Question ${a+1} of ${C}`,P=a+1,F;t[25]!==P||t[26]!==C?(F=(0,S.jsxs)(`div`,{className:`ripple-quiz-progress`,children:[`Question `,P,` of `,C]}),t[25]=P,t[26]=C,t[27]=F):F=t[27];let I;t[28]===w.question?I=t[29]:(I=(0,S.jsx)(`p`,{className:`ripple-course-q`,children:w.question}),t[28]=w.question,t[29]=I);let L;t[30]!==D||t[31]!==T||t[32]!==s||t[33]!==te||t[34]!==d||t[35]!==w.answer||t[36]!==w.choices||t[37]!==w.correct||t[38]!==ne?(L=T?(0,S.jsx)(`ul`,{className:`ripple-quiz-choices`,children:w.choices.map((e,t)=>{let n=`idle`;return s===`graded`&&(t===w.correct?n=`correct`:t===d&&(n=`wrong`)),(0,S.jsx)(`li`,{children:(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-choice`,"data-state":n,onClick:()=>te(t),disabled:s===`graded`,"aria-pressed":d===t,children:e})},t)})}):(0,S.jsxs)(`div`,{className:`ripple-quiz-plain`,children:[s===`ask`&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:ne,children:`Show answer`}),s!==`ask`&&(0,S.jsx)(`p`,{className:`ripple-course-a`,children:w.answer}),s===`revealed`&&(0,S.jsxs)(`div`,{className:`ripple-quiz-selfgrade`,children:[(0,S.jsx)(`span`,{className:`ripple-quiz-selfgrade-prompt`,children:`Did you get it?`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-selfgrade-btn`,"data-answer":`yes`,onClick:()=>D(!0),children:`Yes, I had it`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-selfgrade-btn`,"data-answer":`no`,onClick:()=>D(!1),children:`Not quite`})]})]}),t[30]=D,t[31]=T,t[32]=s,t[33]=te,t[34]=d,t[35]=w.answer,t[36]=w.choices,t[37]=w.correct,t[38]=ne,t[39]=L):L=t[39];let R;t[40]!==s||t[41]!==w.explain||t[42]!==p?(R=s===`graded`&&(0,S.jsxs)(`div`,{className:`ripple-quiz-feedback`,"data-right":p?`true`:void 0,children:[(0,S.jsx)(`p`,{className:`ripple-quiz-feedback-label`,children:p?`Correct`:`Not quite`}),w.explain&&(0,S.jsx)(`p`,{className:`ripple-quiz-explain`,children:w.explain})]}),t[40]=s,t[41]=w.explain,t[42]=p,t[43]=R):R=t[43];let z;t[44]!==M||t[45]!==a||t[46]!==s||t[47]!==C?(z=s===`graded`&&(0,S.jsx)(`div`,{className:`ripple-quiz-actions`,children:(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:M,children:a+1>=C?`See your score →`:`Next question →`})}),t[44]=M,t[45]=a,t[46]=s,t[47]=C,t[48]=z):z=t[48];let B;return t[49]!==R||t[50]!==z||t[51]!==N||t[52]!==F||t[53]!==I||t[54]!==L?(B=(0,S.jsxs)(`div`,{className:`ripple-quiz`,role:`group`,"aria-label":N,children:[F,I,L,R,z]}),t[49]=R,t[50]=z,t[51]=N,t[52]=F,t[53]=I,t[54]=L,t[55]=B):B=t[55],B}function A(e){return e+1}function j(e){return e+1}var M=e=>e.slice(0,7),N={beginner:`Beginner`,intermediate:`Intermediate`,expert:`Expert`};function P({title:e,sub:t,preview:n=!1}){return(0,S.jsxs)(`div`,{className:`ripple-course-skeleton`+(n?` ripple-course-skeleton--preview`:``),role:`status`,"aria-live":`polite`,children:[(0,S.jsxs)(`div`,{className:`ripple-course-skeleton-head`,children:[(0,S.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),(0,S.jsx)(`div`,{className:`ripple-course-skeleton-title`,children:e})]}),(0,S.jsx)(`div`,{className:`ripple-course-skeleton-sub`,children:t}),(0,S.jsx)(`div`,{className:`ripple-progress`,"aria-hidden":`true`}),n&&(0,S.jsx)(`div`,{className:`ripple-course-skeleton-lessons`,"aria-hidden":`true`,children:[0,1,2,3].map(e=>(0,S.jsxs)(`div`,{className:`ripple-skel-lesson`,children:[(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-step`}),(0,S.jsxs)(`span`,{className:`ripple-skel-lines`,children:[(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-line-title`}),(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-line-meta`})]})]},e))})]})}function F(e){let t=(0,u.c)(137),{model:n,altitude:d,building:f,onRegenerate:p,loadLessonDetail:m,loadCourseClosing:h,courseFocus:w,onCourseFocus:T,speak:E,commitSha:D,compareSinceBuilt:ee,openFullAnalysis:te,onAskAboutLesson:O}=e,ne;t[0]===n.courses?ne=t[1]:(ne=n.courses??[],t[0]=n.courses,t[1]=ne);let A=ne,j=n.pr.repo||``,F=n.pr.branch||`HEAD`,V=j?o(j):void 0,oe=!!(!n.provenance.example&&j&&D&&V?.commitSha&&V.commitSha!==D),[H,se]=(0,l.useState)(0),U=A[Math.min(H,Math.max(0,A.length-1))],W=U?`${j||`repo`}::${U.title}`:`repo`,ce;t[2]===W?ce=t[3]:(ce=()=>g(W),t[2]=W,t[3]=ce);let[G,le]=(0,l.useState)(ce),ue,de;t[4]===W?(ue=t[5],de=t[6]):(ue=()=>le(g(W)),de=[W],t[4]=W,t[5]=ue,t[6]=de),(0,l.useEffect)(ue,de);let fe;t[7]===W?fe=t[8]:(fe=(e,t)=>{le(new Set(_(W,e,t)))},t[7]=W,t[8]=fe);let pe=fe,[K,q]=(0,l.useState)(0),[me,he]=(0,l.useState)(!1),ge;t[9]===W?ge=t[10]:(ge=()=>v(W),t[9]=W,t[10]=ge);let[J,_e]=(0,l.useState)(ge),[ve,ye]=(0,l.useState)(0),[be,xe]=(0,l.useState)(!1),Se;t[11]!==H||t[12]!==A||t[13]!==W||t[14]!==q||t[15]!==xe?(Se=()=>{let e=g(W),t=(A[H]?.lessons??[]).findIndex((t,n)=>!e.has(n));q(t===-1?0:t),_e(v(W)),ye(0),xe(!1)},t[11]=H,t[12]=A,t[13]=W,t[14]=q,t[15]=xe,t[16]=Se):Se=t[16];let Ce;t[17]!==H||t[18]!==A||t[19]!==W?(Ce=[W,H,A],t[17]=H,t[18]=A,t[19]=W,t[20]=Ce):Ce=t[20],(0,l.useEffect)(Se,Ce);let we;t[21]===he?we=t[22]:(we=()=>he(!1),t[21]=he,t[22]=we);let Te;t[23]!==K||t[24]!==H?(Te=[K,H],t[23]=K,t[24]=H,t[25]=Te):Te=t[25],(0,l.useEffect)(we,Te);let[Ee,De]=(0,l.useState)(null),[Oe,ke]=(0,l.useState)(`idle`),[Ae,je]=(0,l.useState)(0),Me=(0,l.useRef)(null),Ne;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=()=>{De(null),ke(`idle`),Me.current=null},t[26]=Ne):Ne=t[26];let Pe;t[27]===H?Pe=t[28]:(Pe=[H],t[27]=H,t[28]=Pe),(0,l.useEffect)(Ne,Pe);let Fe,Ie;t[29]!==K||t[30]!==Ae||t[31]!==H||t[32]!==A||t[33]!==h?(Fe=()=>{let e=A[H];if(!e||!h||K<e.lessons.length||e.quiz?.length||e.capstone)return;let t=`${H}:${Ae}`;if(Me.current===t)return;Me.current=t;let n=!0;return ke(`loading`),h(e).then(e=>{n&&(e&&(e.quiz?.length||e.capstone)?(De(e),ke(`ready`)):ke(`error`))}),()=>{n=!1}},Ie=[A,H,K,h,Ae],t[29]=K,t[30]=Ae,t[31]=H,t[32]=A,t[33]=h,t[34]=Fe,t[35]=Ie):(Fe=t[34],Ie=t[35]),(0,l.useEffect)(Fe,Ie);let Le;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(Le=()=>je(ae),t[36]=Le):Le=t[36];let Re=Le,[Y,ze]=(0,l.useState)(null),[Be,Ve]=(0,l.useState)(``),[He,Ue]=(0,l.useState)(!1),[We,Ge]=(0,l.useState)(!1),[Ke,qe]=(0,l.useState)(``),Je;if(t[37]===Symbol.for(`react.memo_cache_sentinel`)?(Je=()=>{ze(null),Ve(``),Ue(!1),qe(``)},t[37]=Je):Je=t[37],(0,l.useEffect)(Je,[V?.commitSha,D]),A.length===0||!U){if(f){let e;return t[38]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(P,{title:`Building your curriculum from the code…`,sub:`Reading the README, the areas, and the real files to write a leveled course you can climb without fear.`,preview:!0}),t[38]=e):e=t[38],e}let e;return t[39]===p?e=t[40]:(e=(0,S.jsx)(`div`,{className:`ripple-course-empty`,children:p?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{children:`Couldn’t build a course from this view yet.`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:p,children:`Try again`})]}):(0,S.jsx)(`p`,{children:`Connect a model in Settings to generate a course from this code.`})}),t[39]=p,t[40]=e),e}let X=U.lessons,Z=X[Math.min(K,X.length-1)],Ye=X.reduce(ie,0),Xe;t[41]!==G.size||t[42]!==X.length?(Xe=Math.round(G.size/X.length*100),t[41]=G.size,t[42]=X.length,t[43]=Xe):Xe=t[43];let Ze=Xe,Qe;t[44]!==Ee?.quiz||t[45]!==U.quiz?(Qe=U.quiz??Ee?.quiz??[],t[44]=Ee?.quiz,t[45]=U.quiz,t[46]=Qe):Qe=t[46];let Q=Qe,$=U.capstone??Ee?.capstone,$e=X.length>0&&(Q.length>0||!!$||!!h),et=$e&&K>=X.length,tt=K<X.length-1||$e,nt;t[47]===W?nt=t[48]:(nt=e=>{y(W,e.correct,e.total),_e(v(W))},t[47]=W,t[48]=nt);let rt=nt,it;t[49]!==U.title||t[50]!==Q||t[51]!==j?(it=()=>{ye(i(Q.map(re),{deck:`Ripple · ${j||`this repo`}`,tags:[U.title],source:{topic:U.title,ts:Date.now()},origin:`auto`}).length)},t[49]=U.title,t[50]=Q,t[51]=j,t[52]=it):it=t[52];let at=it,ot;t[53]!==ve||t[54]!==at?(ot=()=>ve>0?(0,S.jsxs)(`p`,{className:`ripple-quiz-flash-saved`,children:[`+`,ve,` card`,ve===1?``:`s`,` saved to your deck`]}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:at,children:`Keep these as flashcards`}),t[53]=ve,t[54]=at,t[55]=ot):ot=t[55];let st=ot,ct=oe&&Y?s(X,Y):new Set,lt=async()=>{if(Y)return Y;if(!ee||!V?.commitSha||!D)return null;Ge(!0),qe(``);let e=await ee(V.commitSha,D);if(Ge(!1),!e.ok||!e.diff)return qe(e.detail||`Couldn’t load what changed.`),null;let t=a(e.diff).files.map(B);return ze(t),Ve(e.diff),t},ut=()=>{if(He){Ue(!1);return}lt().then(e=>{e&&Ue(!0)})},dt=()=>{lt().then(e=>{if(!e)return;let t=s(X,e);t.size>0&&q(Math.min(...t))})},ft=()=>{!Be||!te||!V||!D||te(Be,`${j} ${M(V.commitSha)}...${M(D)}`,j)},pt;t[56]===j?pt=t[57]:(pt=e=>{let t=`${j||`repo`}::${e.title}`,n=v(t);return{lessonsDone:g(t).size,lessonsTotal:e.lessons.length,hasQuiz:(e.quiz?.length??0)>0,quizPassed:!!n&&b(n.correct,n.total)}},t[56]=j,t[57]=pt);let mt=pt,ht;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,S.jsx)(`span`,{className:`ripple-course-pill`,children:`Guided curriculum`}),t[58]=ht):ht=t[58];let gt;t[59]!==f||t[60]!==w||t[61]!==n.modules||t[62]!==T?(gt=T&&n.modules.length>1&&(0,S.jsxs)(`div`,{className:`ripple-course-focus`,title:`Build the course around one area — best on a large repo, where a whole-repo course only skims. Whole repo prioritises the highest-impact areas.`,children:[(0,S.jsx)(`span`,{className:`ripple-course-focus-label`,children:`Focus`}),(0,S.jsx)(r,{ariaLabel:`Course focus`,triggerClassName:`ripple-course-focus-select`,value:w??``,onChange:e=>T(e||void 0),disabled:f,options:[{value:``,label:`Whole repo`},...n.modules.slice(0,50).map(z)]})]}),t[59]=f,t[60]=w,t[61]=n.modules,t[62]=T,t[63]=gt):gt=t[63];let _t;t[64]!==f||t[65]!==p?(_t=p&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-regen`,onClick:p,disabled:f,title:`Rebuild the curriculum from the latest code`,children:f?`Rebuilding…`:`↻ Regenerate`}),t[64]=f,t[65]=p,t[66]=_t):_t=t[66];let vt;t[67]!==gt||t[68]!==_t?(vt=(0,S.jsxs)(`div`,{className:`ripple-course-head-top`,children:[ht,gt,_t]}),t[67]=gt,t[68]=_t,t[69]=vt):vt=t[69];let yt;t[70]!==H||t[71]!==A||t[72]!==mt||t[73]!==j?(yt=A.length>1&&(0,S.jsx)(`div`,{className:`ripple-course-tracks`,role:`tablist`,"aria-label":`Courses`,children:A.map((e,t)=>{let n=g(`${j||`repo`}::${e.title}`).size,r=n>=e.lessons.length,i=t>0?A[t-1]:void 0,a=!!i&&x(mt(i));return(0,S.jsxs)(`button`,{type:`button`,role:`tab`,className:`ripple-course-track`,"data-active":t===H?`true`:void 0,"data-locked":a?`true`:void 0,"aria-selected":t===H,onClick:()=>se(t),children:[(0,S.jsxs)(`span`,{className:`ripple-course-track-top`,children:[(0,S.jsx)(`span`,{className:`ripple-course-step`,"data-done":r?`true`:void 0,children:r?`✓`:t+1}),e.level?(0,S.jsx)(`span`,{className:`ripple-course-level`,"data-level":e.level,children:N[e.level]}):(0,S.jsxs)(`span`,{className:`ripple-course-track-meta`,children:[n,`/`,e.lessons.length]})]}),(0,S.jsx)(`span`,{className:`ripple-course-track-title`,children:e.title}),a&&(0,S.jsxs)(`span`,{className:`ripple-course-track-lock`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:`🔒`}),` Usually after “`,i.title,`” —`,` `,(0,S.jsx)(`span`,{className:`ripple-course-track-skip`,children:`I already know this, skip ahead`})]})]},e.title)})}),t[70]=H,t[71]=A,t[72]=mt,t[73]=j,t[74]=yt):yt=t[74];let bt;t[75]===U.title?bt=t[76]:(bt=(0,S.jsx)(`h2`,{className:`ripple-course-title`,children:U.title}),t[75]=U.title,t[76]=bt);let xt;t[77]===U.subtitle?xt=t[78]:(xt=U.subtitle&&(0,S.jsx)(`p`,{className:`ripple-course-sub`,children:U.subtitle}),t[77]=U.subtitle,t[78]=xt);let St=Ye>0?` · ~${Ye} min`:``,Ct;t[79]!==G.size||t[80]!==X.length||t[81]!==St?(Ct=(0,S.jsxs)(`div`,{className:`ripple-course-meta`,children:[X.length,` lessons`,St,` · `,G.size,`/`,X.length,` done`]}),t[79]=G.size,t[80]=X.length,t[81]=St,t[82]=Ct):Ct=t[82];let wt=`${Ze}%`,Tt;t[83]===wt?Tt=t[84]:(Tt=(0,S.jsx)(`div`,{className:`ripple-course-bar`,"aria-hidden":`true`,children:(0,S.jsx)(`span`,{style:{width:wt}})}),t[83]=wt,t[84]=Tt);let Et;t[85]!==vt||t[86]!==yt||t[87]!==bt||t[88]!==xt||t[89]!==Ct||t[90]!==Tt?(Et=(0,S.jsxs)(`header`,{className:`ripple-course-head`,children:[vt,yt,bt,xt,Ct,Tt]}),t[85]=vt,t[86]=yt,t[87]=bt,t[88]=xt,t[89]=Ct,t[90]=Tt,t[91]=Et):Et=t[91];let Dt=oe&&V&&(0,S.jsxs)(`div`,{className:`ripple-course-stale`,role:`status`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`The code moved`}),(0,S.jsxs)(`p`,{className:`ripple-course-stale-text`,children:[`The code moved since this course was built (`,(0,S.jsx)(`code`,{children:M(V.commitSha)}),` →`,` `,(0,S.jsx)(`code`,{children:M(D)}),`).`]}),Ke&&(0,S.jsx)(`p`,{className:`ripple-course-stale-err`,children:Ke}),(0,S.jsxs)(`div`,{className:`ripple-course-stale-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:ut,disabled:We,children:We?`Loading…`:He?`Hide what changed`:`See what changed`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:dt,disabled:We,children:`Refresh stale lessons`}),p&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:p,disabled:f,children:`Rebuild course`})]}),He&&Y&&(0,S.jsxs)(`div`,{className:`ripple-course-changed-panel`,children:[(0,S.jsx)(`ul`,{children:Y.slice(0,20).map(R)}),Y.length>20&&(0,S.jsxs)(`p`,{className:`ripple-course-changed-more`,children:[`+`,Y.length-20,` more file`,Y.length-20==1?``:`s`]}),te&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:ft,children:`Open as a full analysis →`})]})]}),Ot=X.map((e,t)=>{let n=G.has(t),r=ct.has(t);return(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-item`,"data-active":t===K?`true`:void 0,"data-done":n?`true`:void 0,"data-stale":r?`true`:void 0,onClick:()=>q(t),children:[(0,S.jsx)(`span`,{className:`ripple-course-num`,"aria-hidden":`true`,children:n?`✓`:t+1}),(0,S.jsxs)(`span`,{className:`ripple-course-item-body`,children:[(0,S.jsxs)(`span`,{className:`ripple-course-item-title`,children:[e.title,r&&(0,S.jsx)(`span`,{className:`ripple-course-item-stale`,title:`Its files changed since this course was built`,children:`stale`})]}),e.minutes?(0,S.jsxs)(`span`,{className:`ripple-course-item-min`,children:[`~`,e.minutes,` min`]}):null]})]},t)}),kt;t[92]!==$e||t[93]!==$||t[94]!==X.length||t[95]!==et||t[96]!==Q.length||t[97]!==q?(kt=$e&&(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-item ripple-course-item-quiz`,"data-active":et?`true`:void 0,onClick:()=>q(X.length),children:[(0,S.jsx)(`span`,{className:`ripple-course-num`,"aria-hidden":`true`,children:`★`}),(0,S.jsxs)(`span`,{className:`ripple-course-item-body`,children:[(0,S.jsx)(`span`,{className:`ripple-course-item-title`,children:Q.length>0?`Quiz`:$?`Capstone`:`Wrap-up`}),(0,S.jsx)(`span`,{className:`ripple-course-item-min`,children:Q.length>0?`${Q.length} question${Q.length===1?``:`s`}`:$?`Closing project`:`Quiz & capstone`})]})]}),t[92]=$e,t[93]=$,t[94]=X.length,t[95]=et,t[96]=Q.length,t[97]=q,t[98]=kt):kt=t[98];let At;t[99]!==Ot||t[100]!==kt?(At=(0,S.jsxs)(`nav`,{className:`ripple-course-list`,"aria-label":`Lessons`,children:[Ot,kt]}),t[99]=Ot,t[100]=kt,t[101]=At):At=t[101];let jt;t[102]!==K||t[103]!==d||t[104]!==$||t[105]!==Oe||t[106]!==U||t[107]!==H||t[108]!==G||t[109]!==rt||t[110]!==st||t[111]!==tt||t[112]!==Z||t[113]!==X.length||t[114]!==m||t[115]!==pe||t[116]!==O||t[117]!==et||t[118]!==Q||t[119]!==J||t[120]!==F||t[121]!==j||t[122]!==be||t[123]!==Re||t[124]!==me||t[125]!==q||t[126]!==xe||t[127]!==he||t[128]!==E?(jt=(0,S.jsx)(`article`,{className:`ripple-course-lesson`,"aria-live":`polite`,children:et?(0,S.jsx)(S.Fragment,{children:Q.length===0&&!$&&Oe===`loading`?(0,S.jsx)(P,{title:`Writing the quiz & capstone for ${U.title}…`,sub:`A few end-of-week questions and a small hands-on project, grounded in what this week studied.`}):Q.length===0&&!$&&Oe===`error`?(0,S.jsxs)(`div`,{className:`ripple-course-empty`,children:[(0,S.jsx)(`p`,{children:`Couldn’t build the quiz & capstone for this course yet.`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:Re,children:`Try again`})]}):(0,S.jsxs)(S.Fragment,{children:[Q.length>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Course quiz`}),(0,S.jsx)(`h3`,{className:`ripple-course-lesson-title`,children:`Test yourself`}),(0,S.jsxs)(`p`,{className:`ripple-course-explain`,children:[`Answer these to be sure you really understood `,U.title,`.`]}),J&&!be?(0,S.jsxs)(`div`,{className:`ripple-quiz-done`,children:[(0,S.jsxs)(`div`,{className:`ripple-quiz-score`,"data-passed":b(J.correct,J.total)?`true`:void 0,role:`status`,children:[(0,S.jsxs)(`div`,{className:`ripple-quiz-score-num`,children:[J.correct,`/`,J.total]}),(0,S.jsx)(`p`,{className:`ripple-quiz-score-text`,children:b(J.correct,J.total)?`You know this one — nice work.`:`Worth another pass — ${J.total-J.correct} to revisit.`})]}),(0,S.jsx)(`div`,{className:`ripple-quiz-flashcards`,children:st()}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:()=>xe(!0),children:`Retake the quiz`})]}):(0,S.jsx)(k,{questions:Q,onFinish:e=>{rt(e),xe(!1)},children:(0,S.jsx)(`div`,{className:`ripple-quiz-flashcards`,children:st()})},`quiz:${H}`)]}),$&&(0,S.jsxs)(`section`,{className:`ripple-course-capstone`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Capstone`}),(0,S.jsx)(`h4`,{className:`ripple-course-capstone-title`,children:$.title}),(0,S.jsx)(`p`,{className:`ripple-course-capstone-brief`,children:$.brief}),$.steps.length>0&&(0,S.jsxs)(`div`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-course-capstone-label`,children:`Do this`}),(0,S.jsx)(`ol`,{className:`ripple-course-capstone-steps`,children:$.steps.map(L)})]}),$.acceptance.length>0&&(0,S.jsxs)(`div`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-course-capstone-label`,children:`You’ll know it worked when`}),(0,S.jsx)(`ul`,{className:`ripple-course-capstone-accept`,children:$.acceptance.map(I)})]})]})]})}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`ripple-eyebrow`,children:[`Lesson `,K+1,` of `,X.length,Z.minutes?` · ~${Z.minutes} min`:``]}),(0,S.jsx)(`h3`,{className:`ripple-course-lesson-title`,children:Z.title}),(0,S.jsx)(C,{course:U,lesson:Z,altitude:d,repo:j,gitRef:F,fileUrl:e=>c(j,F,e),loadLessonDetail:m,speak:E,onAskAboutLesson:O},`${H}:${K}:${d}`),Z.checkpoint&&(0,S.jsxs)(`section`,{className:`ripple-course-checkpoint`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Check yourself`}),(0,S.jsx)(`p`,{className:`ripple-course-q`,children:Z.checkpoint.question}),me?(0,S.jsx)(`p`,{className:`ripple-course-a`,children:Z.checkpoint.answer}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>he(!0),children:`Show answer`})]}),(0,S.jsxs)(`div`,{className:`ripple-course-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:()=>{let e=G.has(K);pe(K,!e),!e&&tt&&q(K+1)},children:G.has(K)?`Done ✓`:tt?`Mark done & next →`:`Mark done ✓`}),tt&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:()=>q(K+1),children:K===X.length-1?`Take the quiz →`:`Skip ahead`})]})]})}),t[102]=K,t[103]=d,t[104]=$,t[105]=Oe,t[106]=U,t[107]=H,t[108]=G,t[109]=rt,t[110]=st,t[111]=tt,t[112]=Z,t[113]=X.length,t[114]=m,t[115]=pe,t[116]=O,t[117]=et,t[118]=Q,t[119]=J,t[120]=F,t[121]=j,t[122]=be,t[123]=Re,t[124]=me,t[125]=q,t[126]=xe,t[127]=he,t[128]=E,t[129]=jt):jt=t[129];let Mt;t[130]!==At||t[131]!==jt?(Mt=(0,S.jsxs)(`div`,{className:`ripple-course-body`,children:[At,jt]}),t[130]=At,t[131]=jt,t[132]=Mt):Mt=t[132];let Nt;return t[133]!==Et||t[134]!==Dt||t[135]!==Mt?(Nt=(0,S.jsxs)(`div`,{className:`ripple-course`,children:[Et,Dt,Mt]}),t[133]=Et,t[134]=Dt,t[135]=Mt,t[136]=Nt):Nt=t[136],Nt}function I(e,t){return(0,S.jsx)(`li`,{children:e},t)}function L(e,t){return(0,S.jsx)(`li`,{children:e},t)}function R(e){return(0,S.jsx)(`li`,{children:e},e)}function z(e){return{value:e.name,label:e.name}}function B(e){return e.path}function re(e){return{front:e.question,back:e.answer}}function ie(e,t){return e+(t.minutes??0)}function ae(e){return e+1}export{F as ShipCourse};
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-CWqRe4-B.js";import{t as r}from"./DropSelect-BMZYAX6q.js";import{n as i}from"./store-DXmC_fP2.js";import{v as a}from"./githubToken-DtcLYqwm.js";import{n as o,t as s}from"./courseStore-DfafnL-9.js";import{t as c}from"./links--u_phi0x.js";var l=e(),u=n(),d=`mavea.ripple.course.v2`,f=`mavea.ripple.course.v1`;function p(){try{let e=localStorage.getItem(f);if(!e)return{};let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t))Array.isArray(r)&&(n[e]={lessons:r.filter(e=>typeof e==`number`)});return Object.keys(n).length>0&&h(n),n}catch{return{}}}function m(){try{let e=localStorage.getItem(d);if(e===null)return p();let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}}function h(e){try{localStorage.setItem(d,JSON.stringify(e))}catch{}}function g(e){return new Set(m()[e]?.lessons??[])}function _(e,t,n){let r=m(),i=new Set(r[e]?.lessons??[]);return n?i.add(t):i.delete(t),r[e]={...r[e],lessons:[...i].sort((e,t)=>e-t)},h(r),i}function v(e){return m()[e]?.quiz}function y(e,t,n){let r=m();r[e]={lessons:r[e]?.lessons??[],quiz:{correct:t,total:n,passedAt:Date.now()}},h(r)}function b(e,t){return t>0&&e>=t-1}function x(e){return!!(!(e.lessonsTotal>0&&e.lessonsDone>=e.lessonsTotal)||e.hasQuiz&&!e.quizPassed)}var S=t();function C(e){let t=(0,u.c)(86),{course:n,lesson:r,altitude:i,fileUrl:a,loadLessonDetail:o,speak:s,onAskAboutLesson:c}=e,[d,f]=(0,l.useState)(r.detail??null),[p,m]=(0,l.useState)(`idle`),[h,g]=(0,l.useState)(null),_=(0,l.useRef)(!1),v=(0,l.useRef)(!0),y=(0,l.useRef)(null),b=(0,l.useRef)(0),x,C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>()=>{v.current=!1,y.current!==null&&clearTimeout(y.current)},C=[],t[0]=x,t[1]=C):(x=t[0],C=t[1]),(0,l.useEffect)(x,C);let k;t[2]!==i||t[3]!==n||t[4]!==r||t[5]!==o?(k=e=>{if(!o)return;y.current!==null&&clearTimeout(y.current);let t=b.current+=1;m(`loading`),f(null);let a=s=>{o(n,r,e,i).then(e=>{!v.current||t!==b.current||(e?(f(e),m(`idle`)):s>0?y.current=setTimeout(()=>a(s-1),2e3):m(`error`))})};a(1)},t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=k):k=t[6];let A=k,j;t[7]!==r.detail||t[8]!==o||t[9]!==A?(j=()=>{if(r.detail){f(r.detail);return}!o||_.current||(_.current=!0,A(!1))},t[7]=r.detail,t[8]=o,t[9]=A,t[10]=j):j=t[10];let M;t[11]!==r||t[12]!==o||t[13]!==A?(M=[r,o,A],t[11]=r,t[12]=o,t[13]=A,t[14]=M):M=t[14],(0,l.useEffect)(j,M);let N;t[15]===d?.walkthrough?N=t[16]:(N=d?.walkthrough??[],t[15]=d?.walkthrough,t[16]=N);let P=N,F,I;t[17]!==s||t[18]!==h||t[19]!==P?(F=()=>{if(h===null||!s)return;let e=P[h];e&&s(`${e.focus?e.focus+`. `:``}${e.explain}`)},I=[h,P,s],t[17]=s,t[18]=h,t[19]=P,t[20]=F,t[21]=I):(F=t[20],I=t[21]),(0,l.useEffect)(F,I);let L=r.goal,R=r.explainFor?.[i]??r.goal,z;t[22]!==n||t[23]!==L||t[24]!==r.title||t[25]!==c?(z=c&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-lesson-ask`,onClick:()=>c(`In "${n.title}" — ${r.title}: ${L||`what should I understand here?`}`),children:`Ask about this lesson`}),t[22]=n,t[23]=L,t[24]=r.title,t[25]=c,t[26]=z):z=t[26];let B=z;if(d){let e,n,r;if(t[27]!==B||t[28]!==d.overview||t[29]!==L){let i=d.overview.split(/\n\n+/).filter(te);t[33]===L?e=t[34]:(e=L&&(0,S.jsx)(`p`,{className:`ripple-course-lede`,children:L}),t[33]=L,t[34]=e),n=B,r=i.length>0&&(0,S.jsx)(`div`,{className:`ripple-lesson-overview`,children:i.map(ee)}),t[27]=B,t[28]=d.overview,t[29]=L,t[30]=e,t[31]=n,t[32]=r}else e=t[30],n=t[31],r=t[32];let i;t[35]!==a||t[36]!==h||t[37]!==P?(i=P.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsxs)(`div`,{className:`ripple-lesson-spot-head`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Spotlight — walk the real code`}),(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>g(0),"aria-label":`Step through the code one part at a time`,children:[`▶ Step through (`,P.length,`)`]})]}),h===null?(0,S.jsx)(`ol`,{className:`ripple-walk`,children:P.map((e,t)=>(0,S.jsxs)(`li`,{className:`ripple-walk-step`,children:[(0,S.jsxs)(`div`,{className:`ripple-walk-where`,children:[(0,S.jsx)(`span`,{className:`ripple-walk-num`,"aria-hidden":`true`,children:t+1}),(0,S.jsx)(O,{file:e.file,focus:e.focus,url:a(e.file)})]}),e.code&&(0,S.jsx)(`pre`,{className:`ripple-walk-code`,children:(0,S.jsx)(`code`,{children:e.code})}),(0,S.jsx)(`p`,{className:`ripple-walk-explain`,children:e.explain})]},t))}):(0,S.jsx)(ne,{steps:P,index:h,fileUrl:a,onPrev:()=>g(D),onNext:()=>g(e=>e===null?null:Math.min(P.length-1,e+1)),onClose:()=>g(null)})]}),t[35]=a,t[36]=h,t[37]=P,t[38]=i):i=t[38];let s;t[39]===d.concepts?s=t[40]:(s=d.concepts.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Key concepts`}),(0,S.jsx)(`dl`,{className:`ripple-lesson-concepts`,children:d.concepts.map(E)})]}),t[39]=d.concepts,t[40]=s);let c;t[41]===d.pitfalls?c=t[42]:(c=d.pitfalls&&d.pitfalls.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-caution`,role:`note`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Watch out for`}),(0,S.jsx)(`ul`,{className:`ripple-lesson-pitfalls`,children:d.pitfalls.map(T)})]}),t[41]=d.pitfalls,t[42]=c);let l;t[43]===d.exercise?l=t[44]:(l=d.exercise&&(0,S.jsxs)(`section`,{className:`ripple-course-group ripple-lesson-exercise`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Try it`}),(0,S.jsx)(`p`,{className:`ripple-lesson-task`,children:d.exercise.task}),d.exercise.hint&&(0,S.jsxs)(`p`,{className:`ripple-lesson-hint`,children:[`Hint — `,d.exercise.hint]}),d.exercise.check&&(0,S.jsxs)(`p`,{className:`ripple-lesson-check`,children:[`How you’ll know it worked — `,d.exercise.check]})]}),t[43]=d.exercise,t[44]=l);let u;t[45]!==o||t[46]!==A?(u=o&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-lesson-regen`,onClick:()=>A(!0),title:`Rewrite this lesson from the latest code`,children:`↻ Rewrite this lesson`}),t[45]=o,t[46]=A,t[47]=u):u=t[47];let f;return t[48]!==e||t[49]!==n||t[50]!==r||t[51]!==i||t[52]!==s||t[53]!==c||t[54]!==l||t[55]!==u?(f=(0,S.jsxs)(S.Fragment,{children:[e,n,r,i,s,c,l,u]}),t[48]=e,t[49]=n,t[50]=r,t[51]=i,t[52]=s,t[53]=c,t[54]=l,t[55]=u,t[56]=f):f=t[56],f}if(p===`loading`){let e,n;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),n=(0,S.jsx)(`div`,{className:`ripple-course-skeleton-title`,children:`Writing this lesson from the real code…`}),t[57]=e,t[58]=n):(e=t[57],n=t[58]);let i;t[59]===r.read?i=t[60]:(i=r.read.slice(0,3).join(`, `)||`the relevant files`,t[59]=r.read,t[60]=i);let a;return t[61]===i?a=t[62]:(a=(0,S.jsxs)(`div`,{className:`ripple-course-skeleton`,role:`status`,"aria-live":`polite`,children:[e,n,(0,S.jsxs)(`div`,{className:`ripple-course-skeleton-sub`,children:[`Reading `,i,` to teach it properly — with a walk through the actual code.`]})]}),t[61]=i,t[62]=a),a}if(p===`error`){let e;t[63]===L?e=t[64]:(e=L&&(0,S.jsx)(`p`,{className:`ripple-course-lede`,children:L}),t[63]=L,t[64]=e);let n;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,S.jsx)(`p`,{children:`Couldn’t write this lesson from the code just now.`}),t[65]=n):n=t[65];let r;t[66]===A?r=t[67]:(r=(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>A(!0),children:`Try again`}),t[66]=A,t[67]=r);let i;return t[68]!==e||t[69]!==r?(i=(0,S.jsxs)(`div`,{className:`ripple-course-empty`,children:[e,n,r]}),t[68]=e,t[69]=r,t[70]=i):i=t[70],i}let re;t[71]===R?re=t[72]:(re=(0,S.jsx)(`p`,{className:`ripple-course-explain`,children:R}),t[71]=R,t[72]=re);let ie;t[73]!==a||t[74]!==r.read?(ie=r.read.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Open and read`}),(0,S.jsx)(`div`,{className:`ripple-course-files`,children:r.read.map(e=>(0,S.jsx)(O,{file:e,url:a(e)},e))})]}),t[73]=a,t[74]=r.read,t[75]=ie):ie=t[75];let ae;t[76]===r.concepts?ae=t[77]:(ae=r.concepts.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Key concepts`}),(0,S.jsx)(`ul`,{className:`ripple-course-concepts`,children:r.concepts.map(w)})]}),t[76]=r.concepts,t[77]=ae);let V;t[78]===r.caution?V=t[79]:(V=r.caution&&(0,S.jsxs)(`section`,{className:`ripple-course-caution`,role:`note`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Be careful here — and why`}),(0,S.jsx)(`p`,{className:`ripple-course-caution-text`,children:r.caution})]}),t[78]=r.caution,t[79]=V);let oe;return t[80]!==B||t[81]!==re||t[82]!==ie||t[83]!==ae||t[84]!==V?(oe=(0,S.jsxs)(S.Fragment,{children:[re,B,ie,ae,V]}),t[80]=B,t[81]=re,t[82]=ie,t[83]=ae,t[84]=V,t[85]=oe):oe=t[85],oe}function w(e,t){return(0,S.jsx)(`li`,{children:e},t)}function T(e,t){return(0,S.jsx)(`li`,{children:e},t)}function E(e,t){return(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:e.term}),(0,S.jsx)(`dd`,{children:e.explain})]},t)}function D(e){return e===null?null:Math.max(0,e-1)}function ee(e,t){return(0,S.jsx)(`p`,{children:e},t)}function te(e){return e.trim().length>0}function O(e){let t=(0,u.c)(3),{file:n,focus:r,url:i}=e,a=r?`${n} · ${r}`:n,o;return t[0]!==a||t[1]!==i?(o=i?(0,S.jsxs)(`a`,{className:`ripple-course-file ripple-course-file-link`,href:i,target:`_blank`,rel:`noreferrer noopener`,children:[a,` ↗`]}):(0,S.jsx)(`code`,{className:`ripple-course-file`,children:a}),t[0]=a,t[1]=i,t[2]=o):o=t[2],o}function ne(e){let t=(0,u.c)(36),{steps:n,index:r,fileUrl:i,onPrev:a,onNext:o,onClose:s}=e,c=n[r],l=r+1,d;t[0]!==n.length||t[1]!==l?(d=(0,S.jsxs)(`span`,{className:`ripple-spotlight-count`,children:[l,` / `,n.length]}),t[0]=n.length,t[1]=l,t[2]=d):d=t[2];let f=c.file,p=c.focus,m;t[3]!==i||t[4]!==c.file?(m=i(c.file),t[3]=i,t[4]=c.file,t[5]=m):m=t[5];let h;t[6]!==c.file||t[7]!==c.focus||t[8]!==m?(h=(0,S.jsx)(O,{file:f,focus:p,url:m}),t[6]=c.file,t[7]=c.focus,t[8]=m,t[9]=h):h=t[9];let g;t[10]===s?g=t[11]:(g=(0,S.jsx)(`button`,{type:`button`,className:`ripple-spotlight-x`,onClick:s,"aria-label":`Exit spotlight`,children:`✕`}),t[10]=s,t[11]=g);let _;t[12]!==d||t[13]!==h||t[14]!==g?(_=(0,S.jsxs)(`div`,{className:`ripple-spotlight-bar`,children:[d,h,g]}),t[12]=d,t[13]=h,t[14]=g,t[15]=_):_=t[15];let v;t[16]===c.code?v=t[17]:(v=c.code&&(0,S.jsx)(`pre`,{className:`ripple-walk-code ripple-spotlight-code`,children:(0,S.jsx)(`code`,{children:c.code})}),t[16]=c.code,t[17]=v);let y;t[18]===c.explain?y=t[19]:(y=(0,S.jsx)(`p`,{className:`ripple-spotlight-explain`,children:c.explain}),t[18]=c.explain,t[19]=y);let b=r===0,x;t[20]!==a||t[21]!==b?(x=(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:a,disabled:b,children:`← Back`}),t[20]=a,t[21]=b,t[22]=x):x=t[22];let C;t[23]!==r||t[24]!==s||t[25]!==o||t[26]!==n.length?(C=r<n.length-1?(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:o,children:`Next →`}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:s,children:`Done ✓`}),t[23]=r,t[24]=s,t[25]=o,t[26]=n.length,t[27]=C):C=t[27];let w;t[28]!==x||t[29]!==C?(w=(0,S.jsxs)(`div`,{className:`ripple-spotlight-nav`,children:[x,C]}),t[28]=x,t[29]=C,t[30]=w):w=t[30];let T;return t[31]!==y||t[32]!==w||t[33]!==_||t[34]!==v?(T=(0,S.jsxs)(`div`,{className:`ripple-spotlight`,role:`group`,"aria-label":`Code spotlight`,children:[_,v,y,w]}),t[31]=y,t[32]=w,t[33]=_,t[34]=v,t[35]=T):T=t[35],T}function k(e){let t=(0,u.c)(56),{questions:n,onFinish:r,children:i}=e,[a,o]=(0,l.useState)(0),[s,c]=(0,l.useState)(`ask`),[d,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(0),[_,v]=(0,l.useState)(!1),[y,x]=(0,l.useState)(null),C=n.length,w=n[Math.min(a,C-1)],T=!!(w.choices&&w.choices.length>=2&&w.correct!==void 0),E;t[0]===s?E=t[1]:(E=e=>{s!==`graded`&&(m(e),c(`graded`),e&&g(j))},t[0]=s,t[1]=E);let D=E,ee;t[2]!==D||t[3]!==s||t[4]!==w.correct?(ee=e=>{s!==`graded`&&(f(e),D(e===w.correct))},t[2]=D,t[3]=s,t[4]=w.correct,t[5]=ee):ee=t[5];let te=ee,O;t[6]===s?O=t[7]:(O=()=>{s===`ask`&&c(`revealed`)},t[6]=s,t[7]=O);let ne=O,k;t[8]!==h||t[9]!==a||t[10]!==r||t[11]!==C?(k=()=>{if(a+1>=C){let e={correct:h,total:C};x(e),v(!0),r?.(e);return}o(A),c(`ask`),f(null),m(!1)},t[8]=h,t[9]=a,t[10]=r,t[11]=C,t[12]=k):k=t[12];let M=k;if(_&&y){let e=y.total-y.correct,n=b(y.correct,y.total),r=n?`true`:void 0,a;t[13]!==y.correct||t[14]!==y.total?(a=(0,S.jsxs)(`div`,{className:`ripple-quiz-score-num`,children:[y.correct,`/`,y.total]}),t[13]=y.correct,t[14]=y.total,t[15]=a):a=t[15];let o=n?`You know this one — nice work.`:`Worth another pass — ${e} to revisit.`,s;t[16]===o?s=t[17]:(s=(0,S.jsx)(`p`,{className:`ripple-quiz-score-text`,children:o}),t[16]=o,t[17]=s);let c;t[18]!==r||t[19]!==a||t[20]!==s?(c=(0,S.jsxs)(`div`,{className:`ripple-quiz-score`,"data-passed":r,role:`status`,children:[a,s]}),t[18]=r,t[19]=a,t[20]=s,t[21]=c):c=t[21];let l;return t[22]!==i||t[23]!==c?(l=(0,S.jsxs)(`div`,{className:`ripple-quiz-done`,children:[c,i]}),t[22]=i,t[23]=c,t[24]=l):l=t[24],l}let N=`Question ${a+1} of ${C}`,P=a+1,F;t[25]!==P||t[26]!==C?(F=(0,S.jsxs)(`div`,{className:`ripple-quiz-progress`,children:[`Question `,P,` of `,C]}),t[25]=P,t[26]=C,t[27]=F):F=t[27];let I;t[28]===w.question?I=t[29]:(I=(0,S.jsx)(`p`,{className:`ripple-course-q`,children:w.question}),t[28]=w.question,t[29]=I);let L;t[30]!==D||t[31]!==T||t[32]!==s||t[33]!==te||t[34]!==d||t[35]!==w.answer||t[36]!==w.choices||t[37]!==w.correct||t[38]!==ne?(L=T?(0,S.jsx)(`ul`,{className:`ripple-quiz-choices`,children:w.choices.map((e,t)=>{let n=`idle`;return s===`graded`&&(t===w.correct?n=`correct`:t===d&&(n=`wrong`)),(0,S.jsx)(`li`,{children:(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-choice`,"data-state":n,onClick:()=>te(t),disabled:s===`graded`,"aria-pressed":d===t,children:e})},t)})}):(0,S.jsxs)(`div`,{className:`ripple-quiz-plain`,children:[s===`ask`&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:ne,children:`Show answer`}),s!==`ask`&&(0,S.jsx)(`p`,{className:`ripple-course-a`,children:w.answer}),s===`revealed`&&(0,S.jsxs)(`div`,{className:`ripple-quiz-selfgrade`,children:[(0,S.jsx)(`span`,{className:`ripple-quiz-selfgrade-prompt`,children:`Did you get it?`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-selfgrade-btn`,"data-answer":`yes`,onClick:()=>D(!0),children:`Yes, I had it`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-selfgrade-btn`,"data-answer":`no`,onClick:()=>D(!1),children:`Not quite`})]})]}),t[30]=D,t[31]=T,t[32]=s,t[33]=te,t[34]=d,t[35]=w.answer,t[36]=w.choices,t[37]=w.correct,t[38]=ne,t[39]=L):L=t[39];let R;t[40]!==s||t[41]!==w.explain||t[42]!==p?(R=s===`graded`&&(0,S.jsxs)(`div`,{className:`ripple-quiz-feedback`,"data-right":p?`true`:void 0,children:[(0,S.jsx)(`p`,{className:`ripple-quiz-feedback-label`,children:p?`Correct`:`Not quite`}),w.explain&&(0,S.jsx)(`p`,{className:`ripple-quiz-explain`,children:w.explain})]}),t[40]=s,t[41]=w.explain,t[42]=p,t[43]=R):R=t[43];let z;t[44]!==M||t[45]!==a||t[46]!==s||t[47]!==C?(z=s===`graded`&&(0,S.jsx)(`div`,{className:`ripple-quiz-actions`,children:(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:M,children:a+1>=C?`See your score →`:`Next question →`})}),t[44]=M,t[45]=a,t[46]=s,t[47]=C,t[48]=z):z=t[48];let B;return t[49]!==R||t[50]!==z||t[51]!==N||t[52]!==F||t[53]!==I||t[54]!==L?(B=(0,S.jsxs)(`div`,{className:`ripple-quiz`,role:`group`,"aria-label":N,children:[F,I,L,R,z]}),t[49]=R,t[50]=z,t[51]=N,t[52]=F,t[53]=I,t[54]=L,t[55]=B):B=t[55],B}function A(e){return e+1}function j(e){return e+1}var M=e=>e.slice(0,7),N={beginner:`Beginner`,intermediate:`Intermediate`,expert:`Expert`};function P({title:e,sub:t,preview:n=!1}){return(0,S.jsxs)(`div`,{className:`ripple-course-skeleton`+(n?` ripple-course-skeleton--preview`:``),role:`status`,"aria-live":`polite`,children:[(0,S.jsxs)(`div`,{className:`ripple-course-skeleton-head`,children:[(0,S.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),(0,S.jsx)(`div`,{className:`ripple-course-skeleton-title`,children:e})]}),(0,S.jsx)(`div`,{className:`ripple-course-skeleton-sub`,children:t}),(0,S.jsx)(`div`,{className:`ripple-progress`,"aria-hidden":`true`}),n&&(0,S.jsx)(`div`,{className:`ripple-course-skeleton-lessons`,"aria-hidden":`true`,children:[0,1,2,3].map(e=>(0,S.jsxs)(`div`,{className:`ripple-skel-lesson`,children:[(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-step`}),(0,S.jsxs)(`span`,{className:`ripple-skel-lines`,children:[(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-line-title`}),(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-line-meta`})]})]},e))})]})}function F(e){let t=(0,u.c)(137),{model:n,altitude:d,building:f,onRegenerate:p,loadLessonDetail:m,loadCourseClosing:h,courseFocus:w,onCourseFocus:T,speak:E,commitSha:D,compareSinceBuilt:ee,openFullAnalysis:te,onAskAboutLesson:O}=e,ne;t[0]===n.courses?ne=t[1]:(ne=n.courses??[],t[0]=n.courses,t[1]=ne);let A=ne,j=n.pr.repo||``,F=n.pr.branch||`HEAD`,V=j?o(j):void 0,oe=!!(!n.provenance.example&&j&&D&&V?.commitSha&&V.commitSha!==D),[H,se]=(0,l.useState)(0),U=A[Math.min(H,Math.max(0,A.length-1))],W=U?`${j||`repo`}::${U.title}`:`repo`,ce;t[2]===W?ce=t[3]:(ce=()=>g(W),t[2]=W,t[3]=ce);let[G,le]=(0,l.useState)(ce),ue,de;t[4]===W?(ue=t[5],de=t[6]):(ue=()=>le(g(W)),de=[W],t[4]=W,t[5]=ue,t[6]=de),(0,l.useEffect)(ue,de);let fe;t[7]===W?fe=t[8]:(fe=(e,t)=>{le(new Set(_(W,e,t)))},t[7]=W,t[8]=fe);let pe=fe,[K,q]=(0,l.useState)(0),[me,he]=(0,l.useState)(!1),ge;t[9]===W?ge=t[10]:(ge=()=>v(W),t[9]=W,t[10]=ge);let[J,_e]=(0,l.useState)(ge),[ve,ye]=(0,l.useState)(0),[be,xe]=(0,l.useState)(!1),Se;t[11]!==H||t[12]!==A||t[13]!==W||t[14]!==q||t[15]!==xe?(Se=()=>{let e=g(W),t=(A[H]?.lessons??[]).findIndex((t,n)=>!e.has(n));q(t===-1?0:t),_e(v(W)),ye(0),xe(!1)},t[11]=H,t[12]=A,t[13]=W,t[14]=q,t[15]=xe,t[16]=Se):Se=t[16];let Ce;t[17]!==H||t[18]!==A||t[19]!==W?(Ce=[W,H,A],t[17]=H,t[18]=A,t[19]=W,t[20]=Ce):Ce=t[20],(0,l.useEffect)(Se,Ce);let we;t[21]===he?we=t[22]:(we=()=>he(!1),t[21]=he,t[22]=we);let Te;t[23]!==K||t[24]!==H?(Te=[K,H],t[23]=K,t[24]=H,t[25]=Te):Te=t[25],(0,l.useEffect)(we,Te);let[Ee,De]=(0,l.useState)(null),[Oe,ke]=(0,l.useState)(`idle`),[Ae,je]=(0,l.useState)(0),Me=(0,l.useRef)(null),Ne;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=()=>{De(null),ke(`idle`),Me.current=null},t[26]=Ne):Ne=t[26];let Pe;t[27]===H?Pe=t[28]:(Pe=[H],t[27]=H,t[28]=Pe),(0,l.useEffect)(Ne,Pe);let Fe,Ie;t[29]!==K||t[30]!==Ae||t[31]!==H||t[32]!==A||t[33]!==h?(Fe=()=>{let e=A[H];if(!e||!h||K<e.lessons.length||e.quiz?.length||e.capstone)return;let t=`${H}:${Ae}`;if(Me.current===t)return;Me.current=t;let n=!0;return ke(`loading`),h(e).then(e=>{n&&(e&&(e.quiz?.length||e.capstone)?(De(e),ke(`ready`)):ke(`error`))}),()=>{n=!1}},Ie=[A,H,K,h,Ae],t[29]=K,t[30]=Ae,t[31]=H,t[32]=A,t[33]=h,t[34]=Fe,t[35]=Ie):(Fe=t[34],Ie=t[35]),(0,l.useEffect)(Fe,Ie);let Le;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(Le=()=>je(ae),t[36]=Le):Le=t[36];let Re=Le,[Y,ze]=(0,l.useState)(null),[Be,Ve]=(0,l.useState)(``),[He,Ue]=(0,l.useState)(!1),[We,Ge]=(0,l.useState)(!1),[Ke,qe]=(0,l.useState)(``),Je;if(t[37]===Symbol.for(`react.memo_cache_sentinel`)?(Je=()=>{ze(null),Ve(``),Ue(!1),qe(``)},t[37]=Je):Je=t[37],(0,l.useEffect)(Je,[V?.commitSha,D]),A.length===0||!U){if(f){let e;return t[38]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(P,{title:`Building your curriculum from the code…`,sub:`Reading the README, the areas, and the real files to write a leveled course you can climb without fear.`,preview:!0}),t[38]=e):e=t[38],e}let e;return t[39]===p?e=t[40]:(e=(0,S.jsx)(`div`,{className:`ripple-course-empty`,children:p?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{children:`Couldn’t build a course from this view yet.`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:p,children:`Try again`})]}):(0,S.jsx)(`p`,{children:`Connect a model in Settings to generate a course from this code.`})}),t[39]=p,t[40]=e),e}let X=U.lessons,Z=X[Math.min(K,X.length-1)],Ye=X.reduce(ie,0),Xe;t[41]!==G.size||t[42]!==X.length?(Xe=Math.round(G.size/X.length*100),t[41]=G.size,t[42]=X.length,t[43]=Xe):Xe=t[43];let Ze=Xe,Qe;t[44]!==Ee?.quiz||t[45]!==U.quiz?(Qe=U.quiz??Ee?.quiz??[],t[44]=Ee?.quiz,t[45]=U.quiz,t[46]=Qe):Qe=t[46];let Q=Qe,$=U.capstone??Ee?.capstone,$e=X.length>0&&(Q.length>0||!!$||!!h),et=$e&&K>=X.length,tt=K<X.length-1||$e,nt;t[47]===W?nt=t[48]:(nt=e=>{y(W,e.correct,e.total),_e(v(W))},t[47]=W,t[48]=nt);let rt=nt,it;t[49]!==U.title||t[50]!==Q||t[51]!==j?(it=()=>{ye(i(Q.map(re),{deck:`Ripple · ${j||`this repo`}`,tags:[U.title],source:{topic:U.title,ts:Date.now()},origin:`auto`}).length)},t[49]=U.title,t[50]=Q,t[51]=j,t[52]=it):it=t[52];let at=it,ot;t[53]!==ve||t[54]!==at?(ot=()=>ve>0?(0,S.jsxs)(`p`,{className:`ripple-quiz-flash-saved`,children:[`+`,ve,` card`,ve===1?``:`s`,` saved to your deck`]}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:at,children:`Keep these as flashcards`}),t[53]=ve,t[54]=at,t[55]=ot):ot=t[55];let st=ot,ct=oe&&Y?s(X,Y):new Set,lt=async()=>{if(Y)return Y;if(!ee||!V?.commitSha||!D)return null;Ge(!0),qe(``);let e=await ee(V.commitSha,D);if(Ge(!1),!e.ok||!e.diff)return qe(e.detail||`Couldn’t load what changed.`),null;let t=a(e.diff).files.map(B);return ze(t),Ve(e.diff),t},ut=()=>{if(He){Ue(!1);return}lt().then(e=>{e&&Ue(!0)})},dt=()=>{lt().then(e=>{if(!e)return;let t=s(X,e);t.size>0&&q(Math.min(...t))})},ft=()=>{!Be||!te||!V||!D||te(Be,`${j} ${M(V.commitSha)}...${M(D)}`,j)},pt;t[56]===j?pt=t[57]:(pt=e=>{let t=`${j||`repo`}::${e.title}`,n=v(t);return{lessonsDone:g(t).size,lessonsTotal:e.lessons.length,hasQuiz:(e.quiz?.length??0)>0,quizPassed:!!n&&b(n.correct,n.total)}},t[56]=j,t[57]=pt);let mt=pt,ht;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,S.jsx)(`span`,{className:`ripple-course-pill`,children:`Guided curriculum`}),t[58]=ht):ht=t[58];let gt;t[59]!==f||t[60]!==w||t[61]!==n.modules||t[62]!==T?(gt=T&&n.modules.length>1&&(0,S.jsxs)(`div`,{className:`ripple-course-focus`,title:`Build the course around one area — best on a large repo, where a whole-repo course only skims. Whole repo prioritises the highest-impact areas.`,children:[(0,S.jsx)(`span`,{className:`ripple-course-focus-label`,children:`Focus`}),(0,S.jsx)(r,{ariaLabel:`Course focus`,triggerClassName:`ripple-course-focus-select`,value:w??``,onChange:e=>T(e||void 0),disabled:f,options:[{value:``,label:`Whole repo`},...n.modules.slice(0,50).map(z)]})]}),t[59]=f,t[60]=w,t[61]=n.modules,t[62]=T,t[63]=gt):gt=t[63];let _t;t[64]!==f||t[65]!==p?(_t=p&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-regen`,onClick:p,disabled:f,title:`Rebuild the curriculum from the latest code`,children:f?`Rebuilding…`:`↻ Regenerate`}),t[64]=f,t[65]=p,t[66]=_t):_t=t[66];let vt;t[67]!==gt||t[68]!==_t?(vt=(0,S.jsxs)(`div`,{className:`ripple-course-head-top`,children:[ht,gt,_t]}),t[67]=gt,t[68]=_t,t[69]=vt):vt=t[69];let yt;t[70]!==H||t[71]!==A||t[72]!==mt||t[73]!==j?(yt=A.length>1&&(0,S.jsx)(`div`,{className:`ripple-course-tracks`,role:`tablist`,"aria-label":`Courses`,children:A.map((e,t)=>{let n=g(`${j||`repo`}::${e.title}`).size,r=n>=e.lessons.length,i=t>0?A[t-1]:void 0,a=!!i&&x(mt(i));return(0,S.jsxs)(`button`,{type:`button`,role:`tab`,className:`ripple-course-track`,"data-active":t===H?`true`:void 0,"data-locked":a?`true`:void 0,"aria-selected":t===H,onClick:()=>se(t),children:[(0,S.jsxs)(`span`,{className:`ripple-course-track-top`,children:[(0,S.jsx)(`span`,{className:`ripple-course-step`,"data-done":r?`true`:void 0,children:r?`✓`:t+1}),e.level?(0,S.jsx)(`span`,{className:`ripple-course-level`,"data-level":e.level,children:N[e.level]}):(0,S.jsxs)(`span`,{className:`ripple-course-track-meta`,children:[n,`/`,e.lessons.length]})]}),(0,S.jsx)(`span`,{className:`ripple-course-track-title`,children:e.title}),a&&(0,S.jsxs)(`span`,{className:`ripple-course-track-lock`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:`🔒`}),` Usually after “`,i.title,`” —`,` `,(0,S.jsx)(`span`,{className:`ripple-course-track-skip`,children:`I already know this, skip ahead`})]})]},e.title)})}),t[70]=H,t[71]=A,t[72]=mt,t[73]=j,t[74]=yt):yt=t[74];let bt;t[75]===U.title?bt=t[76]:(bt=(0,S.jsx)(`h2`,{className:`ripple-course-title`,children:U.title}),t[75]=U.title,t[76]=bt);let xt;t[77]===U.subtitle?xt=t[78]:(xt=U.subtitle&&(0,S.jsx)(`p`,{className:`ripple-course-sub`,children:U.subtitle}),t[77]=U.subtitle,t[78]=xt);let St=Ye>0?` · ~${Ye} min`:``,Ct;t[79]!==G.size||t[80]!==X.length||t[81]!==St?(Ct=(0,S.jsxs)(`div`,{className:`ripple-course-meta`,children:[X.length,` lessons`,St,` · `,G.size,`/`,X.length,` done`]}),t[79]=G.size,t[80]=X.length,t[81]=St,t[82]=Ct):Ct=t[82];let wt=`${Ze}%`,Tt;t[83]===wt?Tt=t[84]:(Tt=(0,S.jsx)(`div`,{className:`ripple-course-bar`,"aria-hidden":`true`,children:(0,S.jsx)(`span`,{style:{width:wt}})}),t[83]=wt,t[84]=Tt);let Et;t[85]!==vt||t[86]!==yt||t[87]!==bt||t[88]!==xt||t[89]!==Ct||t[90]!==Tt?(Et=(0,S.jsxs)(`header`,{className:`ripple-course-head`,children:[vt,yt,bt,xt,Ct,Tt]}),t[85]=vt,t[86]=yt,t[87]=bt,t[88]=xt,t[89]=Ct,t[90]=Tt,t[91]=Et):Et=t[91];let Dt=oe&&V&&(0,S.jsxs)(`div`,{className:`ripple-course-stale`,role:`status`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`The code moved`}),(0,S.jsxs)(`p`,{className:`ripple-course-stale-text`,children:[`The code moved since this course was built (`,(0,S.jsx)(`code`,{children:M(V.commitSha)}),` →`,` `,(0,S.jsx)(`code`,{children:M(D)}),`).`]}),Ke&&(0,S.jsx)(`p`,{className:`ripple-course-stale-err`,children:Ke}),(0,S.jsxs)(`div`,{className:`ripple-course-stale-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:ut,disabled:We,children:We?`Loading…`:He?`Hide what changed`:`See what changed`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:dt,disabled:We,children:`Refresh stale lessons`}),p&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:p,disabled:f,children:`Rebuild course`})]}),He&&Y&&(0,S.jsxs)(`div`,{className:`ripple-course-changed-panel`,children:[(0,S.jsx)(`ul`,{children:Y.slice(0,20).map(R)}),Y.length>20&&(0,S.jsxs)(`p`,{className:`ripple-course-changed-more`,children:[`+`,Y.length-20,` more file`,Y.length-20==1?``:`s`]}),te&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:ft,children:`Open as a full analysis →`})]})]}),Ot=X.map((e,t)=>{let n=G.has(t),r=ct.has(t);return(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-item`,"data-active":t===K?`true`:void 0,"data-done":n?`true`:void 0,"data-stale":r?`true`:void 0,onClick:()=>q(t),children:[(0,S.jsx)(`span`,{className:`ripple-course-num`,"aria-hidden":`true`,children:n?`✓`:t+1}),(0,S.jsxs)(`span`,{className:`ripple-course-item-body`,children:[(0,S.jsxs)(`span`,{className:`ripple-course-item-title`,children:[e.title,r&&(0,S.jsx)(`span`,{className:`ripple-course-item-stale`,title:`Its files changed since this course was built`,children:`stale`})]}),e.minutes?(0,S.jsxs)(`span`,{className:`ripple-course-item-min`,children:[`~`,e.minutes,` min`]}):null]})]},t)}),kt;t[92]!==$e||t[93]!==$||t[94]!==X.length||t[95]!==et||t[96]!==Q.length||t[97]!==q?(kt=$e&&(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-item ripple-course-item-quiz`,"data-active":et?`true`:void 0,onClick:()=>q(X.length),children:[(0,S.jsx)(`span`,{className:`ripple-course-num`,"aria-hidden":`true`,children:`★`}),(0,S.jsxs)(`span`,{className:`ripple-course-item-body`,children:[(0,S.jsx)(`span`,{className:`ripple-course-item-title`,children:Q.length>0?`Quiz`:$?`Capstone`:`Wrap-up`}),(0,S.jsx)(`span`,{className:`ripple-course-item-min`,children:Q.length>0?`${Q.length} question${Q.length===1?``:`s`}`:$?`Closing project`:`Quiz & capstone`})]})]}),t[92]=$e,t[93]=$,t[94]=X.length,t[95]=et,t[96]=Q.length,t[97]=q,t[98]=kt):kt=t[98];let At;t[99]!==Ot||t[100]!==kt?(At=(0,S.jsxs)(`nav`,{className:`ripple-course-list`,"aria-label":`Lessons`,children:[Ot,kt]}),t[99]=Ot,t[100]=kt,t[101]=At):At=t[101];let jt;t[102]!==K||t[103]!==d||t[104]!==$||t[105]!==Oe||t[106]!==U||t[107]!==H||t[108]!==G||t[109]!==rt||t[110]!==st||t[111]!==tt||t[112]!==Z||t[113]!==X.length||t[114]!==m||t[115]!==pe||t[116]!==O||t[117]!==et||t[118]!==Q||t[119]!==J||t[120]!==F||t[121]!==j||t[122]!==be||t[123]!==Re||t[124]!==me||t[125]!==q||t[126]!==xe||t[127]!==he||t[128]!==E?(jt=(0,S.jsx)(`article`,{className:`ripple-course-lesson`,"aria-live":`polite`,children:et?(0,S.jsx)(S.Fragment,{children:Q.length===0&&!$&&Oe===`loading`?(0,S.jsx)(P,{title:`Writing the quiz & capstone for ${U.title}…`,sub:`A few end-of-week questions and a small hands-on project, grounded in what this week studied.`}):Q.length===0&&!$&&Oe===`error`?(0,S.jsxs)(`div`,{className:`ripple-course-empty`,children:[(0,S.jsx)(`p`,{children:`Couldn’t build the quiz & capstone for this course yet.`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:Re,children:`Try again`})]}):(0,S.jsxs)(S.Fragment,{children:[Q.length>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Course quiz`}),(0,S.jsx)(`h3`,{className:`ripple-course-lesson-title`,children:`Test yourself`}),(0,S.jsxs)(`p`,{className:`ripple-course-explain`,children:[`Answer these to be sure you really understood `,U.title,`.`]}),J&&!be?(0,S.jsxs)(`div`,{className:`ripple-quiz-done`,children:[(0,S.jsxs)(`div`,{className:`ripple-quiz-score`,"data-passed":b(J.correct,J.total)?`true`:void 0,role:`status`,children:[(0,S.jsxs)(`div`,{className:`ripple-quiz-score-num`,children:[J.correct,`/`,J.total]}),(0,S.jsx)(`p`,{className:`ripple-quiz-score-text`,children:b(J.correct,J.total)?`You know this one — nice work.`:`Worth another pass — ${J.total-J.correct} to revisit.`})]}),(0,S.jsx)(`div`,{className:`ripple-quiz-flashcards`,children:st()}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:()=>xe(!0),children:`Retake the quiz`})]}):(0,S.jsx)(k,{questions:Q,onFinish:e=>{rt(e),xe(!1)},children:(0,S.jsx)(`div`,{className:`ripple-quiz-flashcards`,children:st()})},`quiz:${H}`)]}),$&&(0,S.jsxs)(`section`,{className:`ripple-course-capstone`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Capstone`}),(0,S.jsx)(`h4`,{className:`ripple-course-capstone-title`,children:$.title}),(0,S.jsx)(`p`,{className:`ripple-course-capstone-brief`,children:$.brief}),$.steps.length>0&&(0,S.jsxs)(`div`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-course-capstone-label`,children:`Do this`}),(0,S.jsx)(`ol`,{className:`ripple-course-capstone-steps`,children:$.steps.map(L)})]}),$.acceptance.length>0&&(0,S.jsxs)(`div`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-course-capstone-label`,children:`You’ll know it worked when`}),(0,S.jsx)(`ul`,{className:`ripple-course-capstone-accept`,children:$.acceptance.map(I)})]})]})]})}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`ripple-eyebrow`,children:[`Lesson `,K+1,` of `,X.length,Z.minutes?` · ~${Z.minutes} min`:``]}),(0,S.jsx)(`h3`,{className:`ripple-course-lesson-title`,children:Z.title}),(0,S.jsx)(C,{course:U,lesson:Z,altitude:d,repo:j,gitRef:F,fileUrl:e=>c(j,F,e),loadLessonDetail:m,speak:E,onAskAboutLesson:O},`${H}:${K}:${d}`),Z.checkpoint&&(0,S.jsxs)(`section`,{className:`ripple-course-checkpoint`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Check yourself`}),(0,S.jsx)(`p`,{className:`ripple-course-q`,children:Z.checkpoint.question}),me?(0,S.jsx)(`p`,{className:`ripple-course-a`,children:Z.checkpoint.answer}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>he(!0),children:`Show answer`})]}),(0,S.jsxs)(`div`,{className:`ripple-course-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:()=>{let e=G.has(K);pe(K,!e),!e&&tt&&q(K+1)},children:G.has(K)?`Done ✓`:tt?`Mark done & next →`:`Mark done ✓`}),tt&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:()=>q(K+1),children:K===X.length-1?`Take the quiz →`:`Skip ahead`})]})]})}),t[102]=K,t[103]=d,t[104]=$,t[105]=Oe,t[106]=U,t[107]=H,t[108]=G,t[109]=rt,t[110]=st,t[111]=tt,t[112]=Z,t[113]=X.length,t[114]=m,t[115]=pe,t[116]=O,t[117]=et,t[118]=Q,t[119]=J,t[120]=F,t[121]=j,t[122]=be,t[123]=Re,t[124]=me,t[125]=q,t[126]=xe,t[127]=he,t[128]=E,t[129]=jt):jt=t[129];let Mt;t[130]!==At||t[131]!==jt?(Mt=(0,S.jsxs)(`div`,{className:`ripple-course-body`,children:[At,jt]}),t[130]=At,t[131]=jt,t[132]=Mt):Mt=t[132];let Nt;return t[133]!==Et||t[134]!==Dt||t[135]!==Mt?(Nt=(0,S.jsxs)(`div`,{className:`ripple-course`,children:[Et,Dt,Mt]}),t[133]=Et,t[134]=Dt,t[135]=Mt,t[136]=Nt):Nt=t[136],Nt}function I(e,t){return(0,S.jsx)(`li`,{children:e},t)}function L(e,t){return(0,S.jsx)(`li`,{children:e},t)}function R(e){return(0,S.jsx)(`li`,{children:e},e)}function z(e){return{value:e.name,label:e.name}}function B(e){return e.path}function re(e){return{front:e.question,back:e.answer}}function ie(e,t){return e+(t.minutes??0)}function ae(e){return e+1}export{F as ShipCourse};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-CWqRe4-B.js";var r=e(),i=n(),a=t();function o(e){return e===`haunted`?`var(--danger)`:e===`hot`?`var(--warning)`:`var(--insight)`}function s(e){return e===`incident`?`var(--danger)`:`var(--presence)`}function c(e){let t=(0,i.c)(50),{model:n}=e,{hotspots:s}=n,[c,d]=(0,r.useState)(s[0]?.id??``),f;t[0]!==s||t[1]!==c?(f=s.find(e=>e.id===c)??s[0],t[0]=s,t[1]=c,t[2]=f):f=t[2];let p=f;if(!p){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,a.jsxs)(`div`,{className:`ripple-hot-empty`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`The story behind any line`}),(0,a.jsx)(`p`,{children:`No load-bearing lines surfaced for this change.`})]}),t[3]=e):e=t[3],e}let m;t[4]===p.cls?m=t[5]:(m=o(p.cls),t[4]=p.cls,t[5]=m);let h=m,g;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,a.jsx)(`div`,{className:`ripple-eyebrow ripple-hot-list-head`,children:`The story behind any line`}),t[6]=g):g=t[6];let _;if(t[7]!==p.id||t[8]!==s){let e;t[10]===p.id?e=t[11]:(e=e=>{let t=e.id===p.id;return(0,a.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:`ripple-hot-item`,"data-active":t,onClick:()=>d(e.id),children:[(0,a.jsx)(`span`,{className:`ripple-hot-cls`,style:{color:o(e.cls),background:`color-mix(in oklab, ${o(e.cls)} 16%, transparent)`,borderColor:`color-mix(in oklab, ${o(e.cls)} 34%, transparent)`},children:e.cls}),(0,a.jsx)(`span`,{className:`ripple-hot-symbol`,children:e.symbol}),(0,a.jsx)(`span`,{className:`ripple-hot-file`,children:e.file})]},e.id)},t[10]=p.id,t[11]=e),_=s.map(e),t[7]=p.id,t[8]=s,t[9]=_}else _=t[9];let v;t[12]===_?v=t[13]:(v=(0,a.jsxs)(`div`,{className:`ripple-hot-list`,role:`tablist`,"aria-label":`Load-bearing lines`,children:[g,_]}),t[12]=_,t[13]=v);let y=`color-mix(in oklab, ${h} 14%, transparent)`,b=`color-mix(in oklab, ${h} 30%, transparent)`,x;t[14]!==h||t[15]!==y||t[16]!==b?(x={color:h,background:y,borderColor:b},t[14]=h,t[15]=y,t[16]=b,t[17]=x):x=t[17];let S;t[18]!==p.symbol||t[19]!==x?(S=(0,a.jsx)(`code`,{className:`ripple-hot-chip`,style:x,children:p.symbol}),t[18]=p.symbol,t[19]=x,t[20]=S):S=t[20];let C;t[21]===p.file?C=t[22]:(C=(0,a.jsx)(`span`,{className:`ripple-hot-detail-file`,children:p.file}),t[21]=p.file,t[22]=C);let w;t[23]!==C||t[24]!==S?(w=(0,a.jsxs)(`div`,{className:`ripple-hot-detail-head`,children:[S,C]}),t[23]=C,t[24]=S,t[25]=w):w=t[25];let T;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Why this line exists`}),t[26]=T):T=t[26];let E;t[27]===p.whyExists?E=t[28]:(E=(0,a.jsxs)(`section`,{className:`ripple-hot-why`,children:[T,(0,a.jsx)(`p`,{children:p.whyExists})]}),t[27]=p.whyExists,t[28]=E);let D;t[29]!==h||t[30]!==p.incident?(D=p.incident&&(0,a.jsxs)(`section`,{className:`ripple-hot-incident`,style:{background:`color-mix(in oklab, ${h} 9%, transparent)`,borderColor:`color-mix(in oklab, ${h} 28%, transparent)`},children:[(0,a.jsxs)(`div`,{className:`ripple-hot-incident-head`,children:[(0,a.jsx)(`span`,{className:`ripple-hot-sev`,style:{background:h},children:p.incident.severity}),(0,a.jsx)(`code`,{className:`ripple-hot-incident-id`,children:p.incident.id})]}),(0,a.jsx)(`p`,{children:p.incident.text})]}),t[29]=h,t[30]=p.incident,t[31]=D):D=t[31];let O;t[32]===p.decisionTrail?O=t[33]:(O=p.decisionTrail&&p.decisionTrail.length>0&&(0,a.jsxs)(`section`,{className:`ripple-hot-trail`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`The decision trail`}),(0,a.jsx)(`ol`,{className:`ripple-hot-timeline`,children:p.decisionTrail.map(u)})]}),t[32]=p.decisionTrail,t[33]=O);let k;t[34]===p.ask?k=t[35]:(k=p.ask&&(0,a.jsxs)(`section`,{className:`ripple-hot-ask`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Who to actually ask`}),(0,a.jsxs)(`div`,{className:`ripple-hot-ask-card`,children:[(0,a.jsx)(`span`,{className:`ripple-hot-avatar`,"aria-hidden":`true`,children:p.ask.name.charAt(0)}),(0,a.jsxs)(`div`,{className:`ripple-hot-ask-who`,children:[(0,a.jsx)(`span`,{className:`ripple-hot-ask-name`,children:p.ask.name}),(0,a.jsx)(`span`,{className:`ripple-hot-ask-team`,children:p.ask.team})]})]}),(0,a.jsx)(`p`,{className:`ripple-hot-ask-why`,children:p.ask.why}),p.ask.note&&(0,a.jsx)(`p`,{className:`ripple-hot-ask-note`,children:p.ask.note})]}),t[34]=p.ask,t[35]=k);let A;t[36]===p.riskSignals?A=t[37]:(A=p.riskSignals&&p.riskSignals.length>0&&(0,a.jsxs)(`section`,{className:`ripple-hot-signals`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Risk signals`}),(0,a.jsx)(`dl`,{className:`ripple-hot-signal-grid`,children:p.riskSignals.map(l)})]}),t[36]=p.riskSignals,t[37]=A);let j;t[38]!==k||t[39]!==A?(j=(0,a.jsxs)(`div`,{className:`ripple-hot-cols`,children:[k,A]}),t[38]=k,t[39]=A,t[40]=j):j=t[40];let M;t[41]!==w||t[42]!==E||t[43]!==D||t[44]!==O||t[45]!==j?(M=(0,a.jsxs)(`div`,{className:`ripple-hot-detail`,role:`tabpanel`,children:[w,E,D,O,j]}),t[41]=w,t[42]=E,t[43]=D,t[44]=O,t[45]=j,t[46]=M):M=t[46];let N;return t[47]!==M||t[48]!==v?(N=(0,a.jsxs)(`div`,{className:`ripple-hot`,children:[v,M]}),t[47]=M,t[48]=v,t[49]=N):N=t[49],N}function l(e,t){return(0,a.jsxs)(`div`,{className:`ripple-hot-signal`,children:[(0,a.jsx)(`dt`,{children:e.k}),(0,a.jsx)(`dd`,{children:e.v})]},`${e.k}-${t}`)}function u(e,t){return(0,a.jsxs)(`li`,{className:`ripple-hot-event`,children:[(0,a.jsx)(`span`,{className:`ripple-hot-event-dot`,style:{background:s(e.kind)},"aria-hidden":`true`}),(0,a.jsxs)(`div`,{className:`ripple-hot-event-body`,children:[(0,a.jsxs)(`div`,{className:`ripple-hot-event-top`,children:[(0,a.jsx)(`time`,{className:`ripple-hot-event-date`,children:e.date}),(0,a.jsx)(`span`,{className:`ripple-hot-event-kind`,children:e.kind})]}),(0,a.jsx)(`span`,{className:`ripple-hot-event-label`,children:e.label})]})]},`${e.date}-${t}`)}export{c as ShipHotspots};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-CWqRe4-B.js";var r=e(),i=n(),a=t();function o(e){let t=(0,i.c)(41),{model:n}=e,o=n.incident,[p,m]=(0,r.useState)(!1),h=(0,r.useRef)(void 0),g;t[0]===o?g=t[1]:(g=()=>{o?.rollback.length&&navigator.clipboard?.writeText(o.rollback.map(f).join(`
|
|
2
2
|
`)).then(()=>{m(!0),window.clearTimeout(h.current),h.current=window.setTimeout(()=>m(!1),1800)},d)},t[0]=o,t[1]=g);let _=g,v,y;if(t[2]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>()=>window.clearTimeout(h.current),y=[],t[2]=v,t[3]=y):(v=t[2],y=t[3]),(0,r.useEffect)(v,y),!o){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,a.jsx)(`div`,{className:`ripple-inc-empty`,children:`No incident loaded.`}),t[4]=e):e=t[4],e}let b;t[5]===o.severity?b=t[6]:(b=o.severity&&(0,a.jsx)(`span`,{className:`ripple-inc-sev`,children:o.severity}),t[5]=o.severity,t[6]=b);let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`The page`}),t[7]=x):x=t[7];let S;t[8]===o.symptom?S=t[9]:(S=(0,a.jsx)(`div`,{className:`ripple-inc-symptom-line`,children:o.symptom}),t[8]=o.symptom,t[9]=S);let C;t[10]===o.service?C=t[11]:(C=o.service&&(0,a.jsx)(`div`,{className:`ripple-inc-service`,children:o.service}),t[10]=o.service,t[11]=C);let w;t[12]!==S||t[13]!==C?(w=(0,a.jsxs)(`div`,{className:`ripple-inc-symptom-text`,children:[x,S,C]}),t[12]=S,t[13]=C,t[14]=w):w=t[14];let T;t[15]!==b||t[16]!==w?(T=(0,a.jsxs)(`div`,{className:`ripple-inc-symptom`,children:[b,w]}),t[15]=b,t[16]=w,t[17]=T):T=t[17];let E;t[18]===o.chain?E=t[19]:(E=o.chain.length>0&&(0,a.jsxs)(`div`,{className:`ripple-inc-block`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`The trace back`}),(0,a.jsx)(`div`,{className:`ripple-inc-chain`,children:o.chain.map(u)})]}),t[18]=o.chain,t[19]=E);let D;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Likely root cause`}),t[20]=D):D=t[20];let O;t[21]===o.rootCause?O=t[22]:(O=(0,a.jsxs)(`div`,{className:`ripple-inc-cause`,children:[D,(0,a.jsx)(`p`,{children:o.rootCause})]}),t[21]=o.rootCause,t[22]=O);let k;t[23]!==p||t[24]!==_||t[25]!==o.rollback?(k=o.rollback.length>0&&(0,a.jsxs)(`div`,{className:`ripple-inc-rollback`,children:[(0,a.jsxs)(`div`,{className:`ripple-inc-rollback-head`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Rollback — a draft you run`}),(0,a.jsx)(`button`,{type:`button`,className:`ripple-track-btn`,onClick:_,children:p?`Copied ✓`:`Copy steps`})]}),(0,a.jsx)(`ol`,{className:`ripple-inc-steps`,children:o.rollback.map(l)}),(0,a.jsx)(`div`,{className:`ripple-inc-note`,children:`Ripple never reverts, deploys, or pages — this is yours to run.`})]}),t[23]=p,t[24]=_,t[25]=o.rollback,t[26]=k):k=t[26];let A;t[27]===o.whoToWake?A=t[28]:(A=o.whoToWake.length>0&&(0,a.jsxs)(`div`,{className:`ripple-inc-block`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Who to wake`}),(0,a.jsx)(`div`,{className:`ripple-inc-people`,children:o.whoToWake.map(c)})]}),t[27]=o.whoToWake,t[28]=A);let j;t[29]===o.timeline?j=t[30]:(j=o.timeline.length>0&&(0,a.jsxs)(`div`,{className:`ripple-inc-block`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`War-room timeline`}),(0,a.jsx)(`div`,{className:`ripple-inc-timeline`,children:o.timeline.map(s)})]}),t[29]=o.timeline,t[30]=j);let M;t[31]===o.evidence?M=t[32]:(M=o.evidence&&(0,a.jsx)(`div`,{className:`ripple-inc-evidence`,children:o.evidence}),t[31]=o.evidence,t[32]=M);let N;return t[33]!==E||t[34]!==O||t[35]!==k||t[36]!==A||t[37]!==j||t[38]!==M||t[39]!==T?(N=(0,a.jsxs)(`div`,{className:`ripple-inc`,children:[T,E,O,k,A,j,M]}),t[33]=E,t[34]=O,t[35]=k,t[36]=A,t[37]=j,t[38]=M,t[39]=T,t[40]=N):N=t[40],N}function s(e,t){return(0,a.jsxs)(`div`,{className:`ripple-inc-tl-row`,children:[(0,a.jsx)(`span`,{className:`ripple-inc-tl-time`,children:e.time}),(0,a.jsx)(`span`,{className:`ripple-inc-tl-label`,children:e.label})]},t)}function c(e,t){return(0,a.jsxs)(`div`,{className:`ripple-inc-person`,children:[(0,a.jsx)(`span`,{className:`ripple-inc-avatar`,"aria-hidden":`true`,children:e.name.charAt(0)}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`div`,{className:`ripple-inc-person-name`,children:e.name}),(0,a.jsx)(`div`,{className:`ripple-inc-person-team`,children:e.team}),(0,a.jsx)(`div`,{className:`ripple-inc-person-why`,children:e.why})]})]},t)}function l(e,t){return(0,a.jsx)(`li`,{children:e},t)}function u(e,t){return(0,a.jsxs)(`div`,{className:`ripple-inc-hop`,children:[(0,a.jsx)(`span`,{className:`ripple-inc-hop-dot`,"aria-hidden":`true`}),(0,a.jsxs)(`div`,{className:`ripple-inc-hop-body`,children:[(0,a.jsx)(`div`,{className:`ripple-inc-hop-ctx`,children:e.context}),(0,a.jsx)(`div`,{className:`ripple-inc-hop-label`,children:e.label})]})]},t)}function d(){}function f(e,t){return`${t+1}. ${e}`}export{o as ShipIncident};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-
|
|
1
|
+
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-CWqRe4-B.js";var n=t(),r=e();function i(e){let t=(0,n.c)(51),{model:i}=e,{migration:s}=i;if(!s){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,r.jsx)(`p`,{className:`ripple-mig-none`,children:`No schema migration in this change.`}),t[0]=e):e=t[0],e}let{file:c,sql:l,rows:u,lockCost:d,expand:f,note:p}=s,m;if(t[1]!==l){let e=(l??[]).join(` `);m=/\bnot\s+null\b/i.test(e)&&/\bdefault\b/i.test(e),t[1]=l,t[2]=m}else m=t[2];let h=m,g;t[3]===u?g=t[4]:(g=!!u&&/\d/.test(u),t[3]=u,t[4]=g);let _=g,v;t[5]===c?v=t[6]:(v=(0,r.jsx)(`span`,{className:`ripple-mig-code-file`,children:c}),t[5]=c,t[6]=v);let y;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,r.jsx)(`span`,{className:`ripple-mig-code-tag`,children:`looks harmless`}),t[7]=y):y=t[7];let b;t[8]===v?b=t[9]:(b=(0,r.jsxs)(`div`,{className:`ripple-mig-code-bar`,children:[v,y]}),t[8]=v,t[9]=b);let x;t[10]===l?x=t[11]:(x=l&&l.length>0&&(0,r.jsx)(`div`,{className:`ripple-mig-code-body`,"aria-label":`The migration SQL`,children:l.map(o)}),t[10]=l,t[11]=x);let S;t[12]!==b||t[13]!==x?(S=(0,r.jsxs)(`div`,{className:`ripple-mig-code`,children:[b,x]}),t[12]=b,t[13]=x,t[14]=S):S=t[14];let C;t[15]===u?C=t[16]:(C=u&&(0,r.jsxs)(`div`,{className:`ripple-mig-stat`,children:[(0,r.jsx)(`span`,{className:`ripple-mig-stat-num`,children:u}),(0,r.jsx)(`span`,{className:`ripple-mig-stat-label`,children:`rows`})]}),t[15]=u,t[16]=C);let w;t[17]===d?w=t[18]:(w=(0,r.jsx)(`span`,{className:`ripple-mig-stat-num`,children:d}),t[17]=d,t[18]=w);let T;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,r.jsx)(`span`,{className:`ripple-mig-stat-label`,children:`the cost`}),t[19]=T):T=t[19];let E;t[20]===w?E=t[21]:(E=(0,r.jsxs)(`div`,{className:`ripple-mig-stat`,children:[w,T]}),t[20]=w,t[21]=E);let D;t[22]!==E||t[23]!==C?(D=(0,r.jsxs)(`div`,{className:`ripple-mig-stats`,children:[C,E]}),t[22]=E,t[23]=C,t[24]=D):D=t[24];let O=h?`Why this locks writes`:`Why this is worth a second look`,k;t[25]===O?k=t[26]:(k=(0,r.jsx)(`div`,{className:`ripple-eyebrow`,children:O}),t[25]=O,t[26]=k);let A;t[27]!==h||t[28]!==u||t[29]!==_?(A=(0,r.jsx)(`p`,{className:`ripple-mig-explain-body`,children:h?(0,r.jsxs)(r.Fragment,{children:[`Adding a `,(0,r.jsx)(`code`,{className:`ripple-mig-inline`,children:`NOT NULL DEFAULT`}),` column forces the database to rewrite`,` `,_?`every one of the ${u} rows`:`every existing row`,` behind an exclusive lock — until that finishes, nothing can write to this table.`]}):(0,r.jsxs)(r.Fragment,{children:[`A schema change like this can hold an exclusive lock on the table while it runs, blocking writes until it’s done — whether that’s instant or an outage comes down to `,_?`its ${u} rows`:`how large the real table is`,`.`]})}),t[27]=h,t[28]=u,t[29]=_,t[30]=A):A=t[30];let j;t[31]!==k||t[32]!==A?(j=(0,r.jsxs)(`aside`,{className:`ripple-mig-explain`,children:[k,A]}),t[31]=k,t[32]=A,t[33]=j):j=t[33];let M;t[34]!==D||t[35]!==j||t[36]!==S?(M=(0,r.jsxs)(`div`,{className:`ripple-mig-left`,children:[S,D,j]}),t[34]=D,t[35]=j,t[36]=S,t[37]=M):M=t[37];let N;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,r.jsx)(`div`,{className:`ripple-eyebrow`,children:`Ship it this way instead — expand / contract`}),t[38]=N):N=t[38];let P;t[39]===f?P=t[40]:(P=f.map(a),t[39]=f,t[40]=P);let F;t[41]===P?F=t[42]:(F=(0,r.jsx)(`ol`,{className:`ripple-mig-steps`,children:P}),t[41]=P,t[42]=F);let I;t[43]===p?I=t[44]:(I=p&&(0,r.jsxs)(`div`,{className:`ripple-mig-tell`,children:[(0,r.jsx)(`span`,{className:`ripple-mig-tell-dot`,"aria-hidden":`true`}),(0,r.jsxs)(`div`,{className:`ripple-mig-tell-body`,children:[(0,r.jsx)(`span`,{className:`ripple-mig-tell-label`,children:`And tell the team:`}),(0,r.jsx)(`span`,{className:`ripple-mig-tell-text`,children:p})]})]}),t[43]=p,t[44]=I);let L;t[45]!==F||t[46]!==I?(L=(0,r.jsxs)(`div`,{className:`ripple-mig-right`,children:[N,F,I]}),t[45]=F,t[46]=I,t[47]=L):L=t[47];let R;return t[48]!==M||t[49]!==L?(R=(0,r.jsxs)(`div`,{className:`ripple-mig`,children:[M,L]}),t[48]=M,t[49]=L,t[50]=R):R=t[50],R}function a(e,t){return(0,r.jsxs)(`li`,{className:`ripple-mig-step`,children:[(0,r.jsx)(`span`,{className:`ripple-mig-step-rail`,"aria-hidden":`true`,children:(0,r.jsx)(`span`,{className:`ripple-mig-step-dot`})}),(0,r.jsxs)(`div`,{className:`ripple-mig-step-body`,children:[(0,r.jsx)(`span`,{className:`ripple-mig-step-title`,children:e.title}),(0,r.jsx)(`span`,{className:`ripple-mig-step-detail`,children:e.detail})]})]},t)}function o(e,t){return(0,r.jsxs)(`div`,{className:`ripple-mig-code-row`,children:[(0,r.jsx)(`span`,{className:`ripple-mig-code-gutter`,"aria-hidden":`true`,children:`+`}),(0,r.jsx)(`code`,{className:`ripple-mig-code-line`,children:e})]},t)}export{i as ShipMigration};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-CWqRe4-B.js";var r=e(),i=n(),a=t();function o(e){let t=(0,i.c)(24),{model:n}=e,{modules:o,onboarding:d}=n,[f,p]=(0,r.useState)(o[0]?.id),m;t[0]!==o||t[1]!==f?(m=o.find(e=>e.id===f)??o[0],t[0]=o,t[1]=f,t[2]=m):m=t[2];let h=m,g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,a.jsxs)(`header`,{className:`ripple-onb-head`,children:[(0,a.jsx)(`span`,{className:`ripple-onb-pill`,children:`No PR needed`}),(0,a.jsx)(`h2`,{className:`ripple-onb-title`,children:`Understand the whole service`})]}),t[3]=g):g=t[3];let _;t[4]===d?_=t[5]:(_=d&&d.requestLife.length>0&&(0,a.jsxs)(`section`,{className:`ripple-onb-life ripple-onb-life-top`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`A request’s life`}),(0,a.jsx)(`div`,{className:`ripple-onb-trace`,children:d.requestLife.map((e,t)=>(0,a.jsxs)(`span`,{className:`ripple-onb-trace-step`,children:[(0,a.jsx)(`code`,{className:`ripple-onb-chip`,children:e}),t<d.requestLife.length-1&&(0,a.jsx)(`span`,{className:`ripple-onb-chevron`,"aria-hidden":`true`,children:`›`})]},`${e}-${t}`))})]}),t[4]=d,t[5]=_);let v;if(t[6]!==o||t[7]!==h?.id){let e;t[9]===h?.id?e=t[10]:(e=e=>{let t=e.id===h?.id;return(0,a.jsxs)(`button`,{type:`button`,className:`ripple-onb-item`,"data-active":t,"aria-pressed":t,onClick:()=>p(e.id),children:[(0,a.jsx)(`span`,{className:`ripple-onb-item-name`,children:e.name}),(0,a.jsx)(`span`,{className:`ripple-onb-item-purpose`,children:e.purpose}),(0,a.jsxs)(`span`,{className:`ripple-onb-item-foot`,children:[(0,a.jsx)(`span`,{className:`ripple-onb-item-owner`,children:e.owner}),(0,a.jsx)(`span`,{className:`ripple-onb-item-health`,children:e.health})]})]},e.id)},t[9]=h?.id,t[10]=e),v=o.map(e),t[6]=o,t[7]=h?.id,t[8]=v}else v=t[8];let y;t[11]===v?y=t[12]:(y=(0,a.jsx)(`nav`,{className:`ripple-onb-list`,"aria-label":`Service modules`,children:v}),t[11]=v,t[12]=y);let b;t[13]===h?b=t[14]:(b=h&&(0,a.jsxs)(`article`,{className:`ripple-onb-detail`,"aria-live":`polite`,children:[(0,a.jsxs)(`div`,{className:`ripple-onb-detail-head`,children:[(0,a.jsx)(`h3`,{className:`ripple-onb-detail-name`,children:h.name}),(0,a.jsx)(`p`,{className:`ripple-onb-detail-purpose`,children:h.purpose}),(0,a.jsxs)(`div`,{className:`ripple-onb-detail-meta`,children:[(0,a.jsx)(`code`,{className:`ripple-onb-entry`,children:h.entry}),(0,a.jsxs)(`span`,{className:`ripple-onb-detail-owner`,children:[h.owner,` · `,h.health]})]})]}),(0,a.jsxs)(`div`,{className:`ripple-onb-explain`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Mavéa explains`}),(0,a.jsx)(`p`,{children:h.explain})]}),h.startHere.length>0&&(0,a.jsxs)(`section`,{className:`ripple-onb-group`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Start here`}),(0,a.jsx)(`div`,{className:`ripple-onb-chips`,children:h.startHere.map(u)})]}),h.depends.length>0&&(0,a.jsxs)(`section`,{className:`ripple-onb-group`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Depends on`}),(0,a.jsx)(`div`,{className:`ripple-onb-chips`,children:h.depends.map(l)})]}),h.usedBy.length>0&&(0,a.jsxs)(`section`,{className:`ripple-onb-group`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Used by`}),(0,a.jsx)(`div`,{className:`ripple-onb-chips`,children:h.usedBy.map(c)})]})]}),t[13]=h,t[14]=b);let x;t[15]!==y||t[16]!==b?(x=(0,a.jsxs)(`div`,{className:`ripple-onb-panes`,children:[y,b]}),t[15]=y,t[16]=b,t[17]=x):x=t[17];let S;t[18]===d?S=t[19]:(S=d&&(0,a.jsx)(`footer`,{className:`ripple-onb-foot`,children:(0,a.jsxs)(`section`,{children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Your first week, in order`}),(0,a.jsx)(`ol`,{className:`ripple-onb-week`,children:d.firstWeek.map(s)})]})}),t[18]=d,t[19]=S);let C;return t[20]!==_||t[21]!==x||t[22]!==S?(C=(0,a.jsxs)(`div`,{className:`ripple-onb`,children:[g,_,x,S]}),t[20]=_,t[21]=x,t[22]=S,t[23]=C):C=t[23],C}function s(e,t){return(0,a.jsxs)(`li`,{className:`ripple-onb-step`,children:[(0,a.jsx)(`span`,{className:`ripple-onb-step-num`,"aria-hidden":`true`,children:t+1}),(0,a.jsxs)(`span`,{className:`ripple-onb-step-body`,children:[(0,a.jsx)(`span`,{className:`ripple-eyebrow ripple-onb-step-team`,children:e.team}),(0,a.jsx)(`span`,{className:`ripple-onb-step-title`,children:e.title}),(0,a.jsx)(`span`,{className:`ripple-onb-step-sub`,children:e.sub}),(0,a.jsx)(`code`,{className:`ripple-onb-step-file`,children:e.file})]})]},`${e.title}-${t}`)}function c(e){return(0,a.jsx)(`span`,{className:`ripple-onb-chip`,children:e},e)}function l(e){return(0,a.jsx)(`span`,{className:`ripple-onb-chip`,children:e},e)}function u(e){return(0,a.jsx)(`code`,{className:`ripple-onb-chip ripple-onb-chip-go`,children:e},e)}export{o as ShipOnboarding};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-
|
|
1
|
+
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-CWqRe4-B.js";var n=t(),r=e();function i(e){return e===`breaks`?`var(--danger)`:e===`watch`?`var(--warning)`:`var(--insight)`}function a(e){let t=(0,n.c)(29),{model:i,altitude:a}=e,{pr:c,gate:l}=i,u;t[0]===i.changes?u=t[1]:(u=i.changes.filter(s),t[0]=i.changes,t[1]=u);let d=u.length,f=c.files??i.changes.length,p=f===1?`file`:`files`,m=l.decision===`block`?`Hold`:l.decision===`watch`?`Review first`:l.decision===`pass`?`Clear to ship`:`Exploring`,h=a===`principal`?`${m}.`+(d?` ${d} breaking.`:``)+` ${f} ${p} touched.`:a===`newgrad`?`Here’s the lay of the land — take it one piece at a time, you don’t need the whole system in your head.`:null,g=a===`newgrad`?c.risks.length?`The “Before you merge” notes are the questions to raise in review — you don’t need every answer yet, just to ask.`:`Nothing risky is pulling at the top, so this is a friendly one to read end to end.`:null,_;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,r.jsx)(`div`,{className:`ripple-eyebrow`,children:`What this change does`}),t[2]=_):_=t[2];let v;t[3]===h?v=t[4]:(v=h&&(0,r.jsx)(`p`,{className:`ripple-read-lead`,children:h}),t[3]=h,t[4]=v);let y;t[5]===c.summary?y=t[6]:(y=(0,r.jsx)(`p`,{className:`ripple-read-summary`,children:c.summary}),t[5]=c.summary,t[6]=y);let b;t[7]!==a||t[8]!==c.readScope?(b=a!==`principal`&&c.readScope&&(0,r.jsxs)(`p`,{className:`ripple-read-scope`,children:[c.readScope,` Mavéa paraphrases nothing it can’t cite — expand any claim to its line.`]}),t[7]=a,t[8]=c.readScope,t[9]=b):b=t[9];let x;t[10]===g?x=t[11]:(x=g&&(0,r.jsx)(`p`,{className:`ripple-read-scope`,children:g}),t[10]=g,t[11]=x);let S;t[12]!==v||t[13]!==y||t[14]!==b||t[15]!==x?(S=(0,r.jsxs)(`div`,{className:`ripple-read-main`,children:[_,v,y,b,x]}),t[12]=v,t[13]=y,t[14]=b,t[15]=x,t[16]=S):S=t[16];let C;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,r.jsx)(`div`,{className:`ripple-eyebrow`,children:`Before you merge`}),t[17]=C):C=t[17];let w;t[18]===c.risks?w=t[19]:(w=c.risks.map(o),t[18]=c.risks,t[19]=w);let T;t[20]===c.risks.length?T=t[21]:(T=c.risks.length===0&&(0,r.jsx)(`div`,{className:`ripple-risk-empty`,children:`Nothing is pulling at the top — this one reads clean.`}),t[20]=c.risks.length,t[21]=T);let E;t[22]!==T||t[23]!==w?(E=(0,r.jsxs)(`aside`,{className:`ripple-read-risks`,"aria-label":`Before you merge`,children:[C,w,T]}),t[22]=T,t[23]=w,t[24]=E):E=t[24];let D;return t[25]!==a||t[26]!==E||t[27]!==S?(D=(0,r.jsxs)(`div`,{className:`ripple-read`,"data-altitude":a,children:[S,E]}),t[25]=a,t[26]=E,t[27]=S,t[28]=D):D=t[28],D}function o(e,t){return(0,r.jsxs)(`div`,{className:`ripple-risk`,children:[(0,r.jsx)(`span`,{className:`ripple-risk-dot`,style:{background:i(e.level)},"aria-hidden":`true`}),(0,r.jsx)(`span`,{className:`ripple-risk-text`,children:e.text})]},t)}function s(e){return e.risk===`breaks`}export{a as ShipRead};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-
|
|
1
|
+
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-CWqRe4-B.js";var n=t(),r=e();function i(){let e=(0,n.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,r.jsxs)(`svg`,{className:`ripple-roll-tri`,viewBox:`0 0 24 24`,width:`18`,height:`18`,"aria-hidden":`true`,focusable:`false`,children:[(0,r.jsx)(`path`,{d:`M12 3.2 22 20.4H2L12 3.2Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinejoin:`round`}),(0,r.jsx)(`path`,{d:`M12 9.4v5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`}),(0,r.jsx)(`circle`,{cx:`12`,cy:`17.4`,r:`1.05`,fill:`currentColor`})]}),e[0]=t):t=e[0],t}function a(e){let t=(0,n.c)(5),{model:a}=e,{rollout:c}=a,l;if(t[0]!==c){let e=c.find(s),n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,r.jsxs)(`div`,{className:`ripple-roll-intro`,children:[(0,r.jsx)(`div`,{className:`ripple-eyebrow`,children:`Safe rollout order`}),(0,r.jsx)(`p`,{className:`ripple-roll-lead`,children:`Ship in this sequence and the change never breaks a caller — every consumer learns the new contract before the producer drops the old one.`})]}),t[2]=n):n=t[2];let a=c.map(o),u;t[3]===a?u=t[4]:(u=(0,r.jsx)(`ol`,{className:`ripple-roll-grid`,children:a}),t[3]=a,t[4]=u),l=(0,r.jsxs)(`div`,{className:`ripple-roll`,children:[n,u,e&&(0,r.jsxs)(`aside`,{className:`ripple-roll-trap`,"aria-label":`The trap in this rollout`,children:[(0,r.jsxs)(`div`,{className:`ripple-roll-trap-head`,children:[(0,r.jsx)(i,{}),(0,r.jsx)(`span`,{className:`ripple-eyebrow ripple-roll-trap-eyebrow`,children:`The trap`})]}),(0,r.jsxs)(`p`,{className:`ripple-roll-trap-body`,children:[`Step `,e.order,` — `,(0,r.jsx)(`strong`,{children:e.deploy.toLowerCase()}),` (`,e.team,`) — is the one you instinctively do first. Drop the old contract before its consumers are ready and every one of them breaks the moment it ships. Mavéa puts the consumer upgrades ahead of the producer: the old path stays alive until the last caller can speak the new one, then it’s removed.`]})]})]}),t[0]=c,t[1]=l}else l=t[1];return l}function o(e){return(0,r.jsxs)(`li`,{className:`ripple-roll-step`,"data-trap":e.trap?`true`:void 0,children:[(0,r.jsxs)(`div`,{className:`ripple-roll-head`,children:[(0,r.jsx)(`span`,{className:`ripple-roll-order`,"data-trap":e.trap?`true`:void 0,"aria-hidden":`true`,children:e.order}),(0,r.jsx)(`span`,{className:`ripple-eyebrow ripple-roll-team`,children:e.team})]}),(0,r.jsx)(`div`,{className:`ripple-roll-deploy`,children:e.deploy}),(0,r.jsx)(`p`,{className:`ripple-roll-note`,children:e.note})]},e.order)}function s(e){return e.trap}export{a as ShipRollout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-CWqRe4-B.js";var r=e(),i=n(),a=t(),o={CONCURRENCY:`var(--presence)`,COMPATIBILITY:`var(--warning)`,RESILIENCE:`var(--danger)`,OBSERVABILITY:`var(--insight)`,DATA:`var(--presence-deep)`};function s(e){return o[e.split(/[\s/]/)[0]?.toUpperCase()??``]??`var(--presence)`}function c(e){let t=(0,i.c)(19),{model:n}=e,{suggestions:o,suppressedNits:c}=n,[l,u]=(0,r.useState)(o[0]?.id??null),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`What a principal would flag`}),t[0]=d):d=t[0];let f;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,a.jsx)(`span`,{className:`ripple-sg-orb`,"aria-hidden":`true`}),t[1]=f):f=t[1];let p;t[2]===o.length?p=t[3]:(p=(0,a.jsxs)(`span`,{className:`ripple-sg-count`,children:[(0,a.jsx)(`strong`,{children:o.length}),` worth your time`]}),t[2]=o.length,t[3]=p);let m;t[4]===c?m=t[5]:(m=c>0&&(0,a.jsxs)(`span`,{className:`ripple-sg-muted`,children:[c,` shallow nits suppressed`]}),t[4]=c,t[5]=m);let h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,a.jsxs)(`span`,{className:`ripple-sg-grounded`,children:[(0,a.jsx)(`svg`,{viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:(0,a.jsx)(`path`,{d:`M2.5 6.4 4.8 8.8 9.5 3.4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`})}),`Every one is grounded`]}),t[6]=h):h=t[6];let g;t[7]!==p||t[8]!==m?(g=(0,a.jsxs)(`div`,{className:`ripple-sg-signal`,children:[f,p,m,h]}),t[7]=p,t[8]=m,t[9]=g):g=t[9];let _;t[10]!==l||t[11]!==o?(_=o.length===0?(0,a.jsx)(`div`,{className:`ripple-sg-empty`,children:`Nothing rose above the noise floor — this change reads clean to a principal eye.`}):(0,a.jsx)(`ul`,{className:`ripple-sg-list`,children:o.map(e=>{let t=e.id===l,n=s(e.category),r=`ripple-sg-panel-${e.id}`;return(0,a.jsxs)(`li`,{className:`ripple-sg-card`,"data-open":t,style:{"--ripple-sg-accent":n},children:[(0,a.jsxs)(`button`,{type:`button`,className:`ripple-sg-trigger`,"aria-expanded":t,"aria-controls":r,onClick:()=>u(t?null:e.id),children:[(0,a.jsx)(`span`,{className:`ripple-sg-cat`,children:e.category}),(0,a.jsx)(`span`,{className:`ripple-sg-title`,children:e.title}),(0,a.jsx)(`span`,{className:`ripple-sg-gist`,children:e.gist}),(0,a.jsx)(`svg`,{className:`ripple-sg-chev`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:(0,a.jsx)(`path`,{d:`M3 4.5 6 7.5 9 4.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),t&&(0,a.jsxs)(`div`,{className:`ripple-sg-body`,id:r,children:[(0,a.jsx)(`p`,{className:`ripple-sg-why`,children:e.why}),(0,a.jsxs)(`div`,{className:`ripple-sg-evidence`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Why you’re seeing this`}),(0,a.jsx)(`p`,{className:`ripple-sg-evidence-text`,children:e.evidence})]}),(0,a.jsxs)(`div`,{className:`ripple-sg-fix`,children:[(0,a.jsx)(`span`,{className:`ripple-sg-check`,"aria-hidden":`true`,children:(0,a.jsx)(`svg`,{viewBox:`0 0 14 14`,focusable:`false`,children:(0,a.jsx)(`path`,{d:`M3 7.4 5.8 10.2 11 4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),(0,a.jsxs)(`p`,{className:`ripple-sg-fix-text`,children:[(0,a.jsx)(`span`,{className:`ripple-sg-fix-label`,children:`Suggested:`}),` `,e.fix]})]})]})]},e.id)})}),t[10]=l,t[11]=o,t[12]=_):_=t[12];let v;t[13]===c?v=t[14]:(v=c>0&&(0,a.jsxs)(`div`,{className:`ripple-sg-suppressed`,role:`note`,children:[(0,a.jsxs)(`strong`,{children:[c,` nits suppressed`]}),` — formatting, naming, import order… Mavéa won’t spend your attention on them.`]}),t[13]=c,t[14]=v);let y;return t[15]!==g||t[16]!==_||t[17]!==v?(y=(0,a.jsxs)(`div`,{className:`ripple-sg`,children:[d,g,_,v]}),t[15]=g,t[16]=_,t[17]=v,t[18]=y):y=t[18],y}export{c as ShipSuggestions};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-CWqRe4-B.js";import{t as r}from"./colors-D49Req-e.js";var i=e(),a=n(),o=t();function s(e){switch(e){case`updated`:return`var(--insight)`;case`breaks`:return`var(--danger)`;case`affected`:return`var(--presence)`;default:return`var(--text-muted)`}}function c(e){return e===`add`?`+`:e===`del`?`−`:``}function l(e){let t=[],n=new Map;for(let r of e){let e=n.get(r.subsystem);e||(e=[],n.set(r.subsystem,e),t.push({subsystem:r.subsystem,items:e})),e.push(r)}return t}function u({model:e}){let{changes:t}=e,n=(0,i.useMemo)(()=>l(t),[t]),a=(0,i.useMemo)(()=>(t.find(e=>e.risk===`breaks`)??t[0])?.id,[t]),[s,u]=(0,i.useState)(a);(0,i.useEffect)(()=>{u(a)},[t.map(e=>e.file).join(`
|
|
2
2
|
`)]);let f=t.find(e=>e.id===s)??t[0];if(!f)return(0,o.jsx)(`div`,{className:`ripple-ws-empty`,children:`No changes in this diff — nothing for the workspace to read.`});let{diff:p}=f,m=f.blastOutside??0;return(0,o.jsxs)(`div`,{className:`ripple-ws`,children:[(0,o.jsx)(`nav`,{className:`ripple-ws-col ripple-ws-list`,"aria-label":`Changes in this pull request`,children:n.map(e=>(0,o.jsxs)(`div`,{className:`ripple-ws-group`,children:[(0,o.jsxs)(`div`,{className:`ripple-ws-group-head`,children:[(0,o.jsx)(`span`,{className:`ripple-eyebrow`,children:e.subsystem}),(0,o.jsx)(`span`,{className:`ripple-ws-group-count`,children:e.items.length})]}),e.items.map(e=>{let t=e.id===f.id,n=e.risk===`breaks`||e.risk===`watch`;return(0,o.jsxs)(`button`,{type:`button`,className:`ripple-ws-row`,"data-active":t,"aria-current":t?`true`:void 0,onClick:()=>u(e.id),children:[(0,o.jsx)(`span`,{className:`ripple-ws-row-dot`,style:{background:r(e.risk)},"aria-hidden":`true`}),(0,o.jsx)(`span`,{className:`ripple-ws-row-title`,children:e.title}),(0,o.jsx)(`span`,{className:`ripple-ws-row-file`,children:e.file}),n&&(0,o.jsx)(`span`,{className:`ripple-ws-row-badge`,style:{color:r(e.risk),background:`color-mix(in oklab, ${r(e.risk)} 15%, transparent)`},children:e.risk===`breaks`?`BREAKS`:`WATCH`})]},e.id)})]},e.subsystem))}),(0,o.jsxs)(`div`,{className:`ripple-ws-col ripple-ws-detail`,children:[(0,o.jsx)(`h3`,{className:`ripple-ws-detail-title`,children:f.title}),(0,o.jsxs)(`div`,{className:`ripple-ws-block`,children:[(0,o.jsx)(`span`,{className:`ripple-eyebrow`,children:`Mavéa’s read`}),(0,o.jsx)(`p`,{children:f.intent})]}),(0,o.jsxs)(`div`,{className:`ripple-ws-diff`,children:[(0,o.jsxs)(`div`,{className:`ripple-ws-diff-head`,children:[(0,o.jsx)(`span`,{className:`ripple-ws-diff-file`,children:p.file}),(0,o.jsxs)(`span`,{className:`ripple-ws-diff-stat`,children:[(0,o.jsxs)(`span`,{className:`ripple-ws-diff-add`,children:[`+`,p.add]}),(0,o.jsxs)(`span`,{className:`ripple-ws-diff-del`,children:[`−`,p.del]})]})]}),(0,o.jsx)(`div`,{className:`ripple-ws-diff-body`,children:p.lines.map((e,t)=>(0,o.jsxs)(`div`,{className:`ripple-ws-diff-line`,"data-t":e.t??`ctx`,children:[(0,o.jsx)(`span`,{className:`ripple-ws-diff-sign`,"aria-hidden":`true`,children:c(e.t)}),(0,o.jsx)(`span`,{className:`ripple-ws-diff-code`,children:e.c})]},t))})]}),(0,o.jsxs)(`div`,{className:`ripple-ws-block ripple-ws-why`,children:[(0,o.jsx)(`span`,{className:`ripple-eyebrow`,children:`Why it’s here`}),(0,o.jsx)(`p`,{children:f.why})]})]}),(0,o.jsxs)(`aside`,{className:`ripple-ws-col ripple-ws-aside`,"aria-label":`Cause and effect`,children:[(0,o.jsxs)(`div`,{className:`ripple-ws-section`,children:[(0,o.jsx)(`span`,{className:`ripple-eyebrow`,children:`Cause & effect`}),(0,o.jsxs)(`div`,{className:`ripple-ws-tiles`,children:[(0,o.jsxs)(`div`,{className:`ripple-ws-tile`,children:[(0,o.jsx)(`span`,{className:`ripple-ws-tile-num`,children:f.blastFiles??0}),(0,o.jsx)(`span`,{className:`ripple-ws-tile-label`,children:`files affected`})]}),(0,o.jsxs)(`div`,{className:`ripple-ws-tile`,"data-alarm":m>0,children:[(0,o.jsx)(`span`,{className:`ripple-ws-tile-num`,children:m}),(0,o.jsx)(`span`,{className:`ripple-ws-tile-label`,children:`outside this PR`})]})]})]}),(0,o.jsxs)(`div`,{className:`ripple-ws-section`,children:[(0,o.jsx)(`span`,{className:`ripple-eyebrow`,children:`What depends on this`}),f.links.length>0?(0,o.jsx)(`div`,{className:`ripple-ws-callers`,children:f.links.map(e=>(0,o.jsx)(d,{link:e},`${e.name}:${e.ref}`))}):(0,o.jsx)(`p`,{className:`ripple-ws-empty`,children:`Nothing else calls into this change — it’s a leaf.`})]}),f.risks&&f.risks.length>0&&(0,o.jsxs)(`div`,{className:`ripple-ws-section`,children:[(0,o.jsx)(`span`,{className:`ripple-eyebrow`,children:`Risk notes`}),(0,o.jsx)(`div`,{className:`ripple-ws-risks`,children:f.risks.map((e,t)=>(0,o.jsxs)(`div`,{className:`ripple-ws-risk`,style:{background:`color-mix(in oklab, ${r(e.level)} 10%, transparent)`,border:`1px solid color-mix(in oklab, ${r(e.level)} 28%, transparent)`},children:[(0,o.jsx)(`span`,{className:`ripple-ws-risk-dot`,style:{background:r(e.level)},"aria-hidden":`true`}),(0,o.jsx)(`span`,{className:`ripple-ws-risk-text`,children:e.text})]},t))})]})]})]})}function d(e){let t=(0,a.c)(21),{link:n}=e,r;t[0]===n.status?r=t[1]:(r=s(n.status),t[0]=n.status,t[1]=r);let i=r,c=n.scope===`cross-repo`,l;t[2]===n.name?l=t[3]:(l=(0,o.jsx)(`span`,{className:`ripple-ws-caller-name`,children:n.name}),t[2]=n.name,t[3]=l);let u;t[4]===n.ref?u=t[5]:(u=(0,o.jsx)(`span`,{className:`ripple-ws-caller-ref`,children:n.ref}),t[4]=n.ref,t[5]=u);let d;t[6]!==l||t[7]!==u?(d=(0,o.jsxs)(`span`,{className:`ripple-ws-caller-main`,children:[l,u]}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f=`color-mix(in oklab, ${i} 15%, transparent)`,p;t[9]!==i||t[10]!==f?(p={color:i,background:f},t[9]=i,t[10]=f,t[11]=p):p=t[11];let m;t[12]===n.status?m=t[13]:(m=n.status.toUpperCase(),t[12]=n.status,t[13]=m);let h=c?` · OUTSIDE PR`:``,g;t[14]!==p||t[15]!==m||t[16]!==h?(g=(0,o.jsxs)(`span`,{className:`ripple-ws-caller-badge`,style:p,children:[m,h]}),t[14]=p,t[15]=m,t[16]=h,t[17]=g):g=t[17];let _;return t[18]!==d||t[19]!==g?(_=(0,o.jsxs)(`div`,{className:`ripple-ws-caller`,children:[d,g]}),t[18]=d,t[19]=g,t[20]=_):_=t[20],_}export{u as ShipWorkspace};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t,ut as n}from"./index-
|
|
1
|
+
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t,ut as n}from"./index-CWqRe4-B.js";import{t as r}from"./Orb-B0NEVfqL.js";var i=t(),a=e(),o=[{title:`Chicago · 4-Day Architectu…`,time:`3:14`,snip:`help me plan a trip t…`,tone:`blue`},{title:`Chicago · 4-Day Culinary…`,time:`3:14`,snip:`what are the restaura…`,tone:`green`},{title:`Chicago · 4-Day Itinerary`,time:`3:14`,snip:`what other things sh…`,tone:`amber`,active:!0}],s=[{name:`Speakeasies`,tag:`Hidden & exclusive`,w:`48%`,tone:`presence`},{name:`Live music`,tag:`Blues & jazz`,w:`78%`,tone:`warning`},{name:`Cocktail bars`,tag:`Modern & craft`,w:`46%`,tone:`presence`}],c=[`Reservations are essential for popular speakeasies.`,`Check the music schedule for blues clubs in advance.`,`Use the “L” train or a rideshare; parking is difficult.`,`Dress codes vary; check the venue’s site before going.`],l=[{left:`62%`,top:`34%`,tone:`presence`,n:`2`},{left:`54%`,top:`66%`,tone:`warning`,n:`3`},{left:`60%`,top:`70%`,tone:`insight`,n:`1`,ring:!0}];function u(e){let t=[];for(let n=-48;n<=448;n+=24)t.push(e?`M${n},-48 V248`:`M-48,${n} H448`);return t.join(` `)}function d(){let e=(0,i.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`rect`,{className:`fl-m-land`,width:`400`,height:`200`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsx)(`path`,{className:`fl-m-minor`,d:u(!0)}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,a.jsxs)(`svg`,{className:`fl-map-art`,viewBox:`0 0 400 200`,preserveAspectRatio:`xMidYMid slice`,"aria-hidden":`true`,children:[t,(0,a.jsxs)(`g`,{className:`fl-m-streets`,transform:`rotate(-8 200 100)`,children:[n,(0,a.jsx)(`path`,{className:`fl-m-minor`,d:u(!1)}),(0,a.jsx)(`path`,{className:`fl-m-major`,d:`M88,-48 V248 M168,-48 V248 M248,-48 V248`}),(0,a.jsx)(`path`,{className:`fl-m-major`,d:`M-48,64 H448 M-48,128 H448`}),(0,a.jsx)(`path`,{className:`fl-m-major`,d:`M-10,214 L300,-14`})]}),(0,a.jsx)(`path`,{className:`fl-m-park`,d:`M196,132 C218,124 244,128 250,146 C255,162 236,176 214,174 C192,172 180,152 196,132 Z`}),(0,a.jsx)(`path`,{className:`fl-m-river`,d:`M284,36 C238,52 206,44 168,58 C136,70 104,62 70,76`}),(0,a.jsx)(`path`,{className:`fl-m-water`,d:`M285,0 C270,60 276,140 262,200 L400,200 L400,0 Z`}),(0,a.jsx)(`path`,{className:`fl-m-shore`,d:`M285,0 C270,60 276,140 262,200`}),(0,a.jsx)(`path`,{className:`fl-m-current`,d:`M310,52 C326,46 342,50 356,42`}),(0,a.jsx)(`path`,{className:`fl-m-current`,d:`M318,120 C336,114 350,120 366,110`})]}),e[2]=r):r=e[2],r}function f(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n,{eyebrow:`The signature move`,children:[`It listens. It speaks. `,(0,a.jsx)(`em`,{children:`Then it draws.`})]}),(0,a.jsxs)(`div`,{className:`fl-window`,children:[(0,a.jsxs)(`div`,{className:`fl-window-bar`,children:[(0,a.jsx)(`span`,{className:`fl-light r`}),(0,a.jsx)(`span`,{className:`fl-light y`}),(0,a.jsx)(`span`,{className:`fl-light g`}),(0,a.jsxs)(`div`,{className:`fl-window-title`,children:[(0,a.jsx)(r,{size:18,className:`fl-orb-inline`}),(0,a.jsx)(`span`,{className:`fl-window-topic`,children:`Chicago Nightlife: A Curated Guide`}),(0,a.jsx)(`span`,{className:`fl-live`,style:{color:`var(--text-muted)`},children:`Example`})]})]}),(0,a.jsxs)(`div`,{className:`fl-window-body`,children:[(0,a.jsxs)(`aside`,{className:`fl-rail`,children:[(0,a.jsxs)(`div`,{className:`fl-rail-head`,children:[(0,a.jsx)(`span`,{children:`This session`}),(0,a.jsx)(`span`,{className:`fl-rail-chip`,children:`Replay`})]}),o.map(e=>(0,a.jsxs)(`div`,{className:`fl-rail-row`+(e.active?` active`:``),children:[(0,a.jsx)(`div`,{className:`fl-rail-title tone-`+e.tone,children:e.title}),(0,a.jsxs)(`div`,{className:`fl-rail-snip`,children:[(0,a.jsx)(`span`,{className:`fl-rail-time`,children:e.time}),(0,a.jsx)(`span`,{className:`fl-rail-text`,children:e.snip})]})]},e.title))]}),(0,a.jsxs)(`div`,{className:`fl-canvas`,children:[(0,a.jsxs)(`div`,{className:`fl-finding`,children:[(0,a.jsxs)(`div`,{className:`fl-finding-kicker`,children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M12 2l1.6 6.4L20 10l-6.4 1.6L12 18l-1.6-6.4L4 10l6.4-1.6z`})}),`Finding 1`]}),(0,a.jsx)(`div`,{className:`fl-finding-title`,children:`The Chicago after-dark vibe`}),(0,a.jsxs)(`p`,{className:`fl-finding-text`,children:[`Chicago’s nightlife thrives on variety. Whether you’re after a quiet, high-end cocktail lounge or a high-energy blues bar, there’s a district for it.`,(0,a.jsx)(`span`,{className:`fl-caret`})]}),(0,a.jsx)(`span`,{className:`fl-badge inferred`,children:`Inferred`})]}),(0,a.jsxs)(`div`,{className:`fl-fig`,children:[(0,a.jsx)(`div`,{className:`fl-fig-label`,children:`Fig. 1 — Nightlife hotspots`}),(0,a.jsxs)(`div`,{className:`fl-map`,children:[(0,a.jsx)(d,{}),(0,a.jsxs)(`div`,{className:`fl-map-zoom`,children:[(0,a.jsx)(`span`,{children:`+`}),(0,a.jsx)(`span`,{children:`−`})]}),l.map((e,t)=>(0,a.jsx)(`span`,{className:`fl-pin tone-`+e.tone+(e.ring?` ring`:``),style:{left:e.left,top:e.top,"--pin-i":String(t)},children:e.n},e.n)),(0,a.jsx)(`span`,{className:`fl-map-attr`,children:`Illustrated map`})]}),(0,a.jsx)(`div`,{className:`fl-fig-note`,children:`Illustrated example · 3 locations`})]}),(0,a.jsxs)(`div`,{className:`fl-cardrow`,children:[(0,a.jsxs)(`div`,{className:`fl-mini`,children:[(0,a.jsx)(`div`,{className:`fl-mini-label`,children:`▦ Nightlife categories`}),s.map((e,t)=>(0,a.jsxs)(`div`,{className:`fl-bar`,children:[(0,a.jsxs)(`div`,{className:`fl-bar-top`,children:[(0,a.jsx)(`span`,{className:`fl-bar-name`,children:e.name}),(0,a.jsx)(`span`,{className:`fl-bar-tag`,children:e.tag})]}),(0,a.jsx)(`div`,{className:`fl-bar-track`,children:(0,a.jsx)(`div`,{className:`fl-bar-fill tone-`+e.tone,style:{"--w":e.w,"--bar-i":String(t)}})})]},e.name))]}),(0,a.jsxs)(`div`,{className:`fl-mini`,children:[(0,a.jsx)(`div`,{className:`fl-mini-label`,children:`✦ Pro-tips for Chicago nights`}),c.map((e,t)=>(0,a.jsxs)(`div`,{className:`fl-tip`,style:{"--tip-i":String(t)},children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{pathLength:1,d:`M20 6L9 17l-5-5`})}),(0,a.jsx)(`span`,{children:e})]},e))]})]}),(0,a.jsxs)(`div`,{className:`fl-dock`,children:[(0,a.jsx)(`span`,{className:`fl-dock-mic`,children:(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3zM5 11a7 7 0 0 0 14 0M12 18v3`})})}),(0,a.jsx)(`span`,{className:`fl-dock-text`,children:`Talk, or type — anything.`}),(0,a.jsxs)(`span`,{className:`fl-dock-mark`,children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M3 21l3.2-.9L18 8.3l-2.3-2.3L4 17.6 3 21z M14.7 7l2.3 2.3`})}),`Highlight`]}),(0,a.jsx)(`span`,{className:`fl-dock-send`,children:(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M5 12h14M13 6l6 6-6 6`})})})]})]})]})]})]})}export{f as SignatureLoop};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PrismOverlay-
|
|
2
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{I as n,J as r,L as i,M as a,N as o,k as s,q as c}from"./index-DWHIOldG.js";import{n as l}from"./icons-CHVz6kv_.js";import{t as u}from"./FeatureUseNotice-CoK5HkbR.js";import{a as d,g as f,o as p,p as m,u as h}from"./providers-wzm7E8Pa.js";import{t as g}from"./homeTarget-BcZYH3DY.js";import{l as _,n as v}from"./useLiveConfig-Cc4IKgOd.js";/* empty css */import{n as y,r as b}from"./officeDoc-B6nEhNp4.js";var x=e(),S=/\.(pdf|docx|pptx|xlsx|csv|tsv|txt|text|md|markdown|json|jsonl|ndjson|ya?ml|toml|xml|log|tab|js|ts|jsx|tsx|py|rb|go|rs|java|c|h|cpp|cs|sh|sql|css|html?)$/i,C=/(^|\/)(\.git|node_modules|\.DS_Store|__pycache__|\.venv|dist|build|__MACOSX)(\/|$)/i;function w(e){return e.filter(e=>{let t=e.webkitRelativePath||e.name;return S.test(e.name)&&!C.test(t)})}async function T(e,t={}){let{max:n=200,onProgress:r}=t,i=w(e),a=i.slice(0,n),o=[];for(let e=0;e<a.length;e+=1){let t=await m(a[e]);t.ok&&t.attachment&&o.push(t.attachment),r?.(e+1,a.length)}return{sources:o,skipped:i.length-o.length}}var E={docx:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,pptx:`application/vnd.openxmlformats-officedocument.presentationml.presentation`,xlsx:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`};function D(e){let t=e.split(`.`).pop()?.toLowerCase()??``;return t===`pdf`?`application/pdf`:E[t]??``}async function O(e){let t;try{t=await b(e.data?y(e.data):await p(e))}catch{return[]}if(!t)return[];let n=[];for(let[e,r]of t){if(n.length>=200)break;if(e.endsWith(`/`)||r.length===0||C.test(e))continue;let t=e.split(`/`).pop()??e;if(!t||t.startsWith(`.`))continue;let i={name:t,mime:D(t),data:``,size:r.length,bytes:Uint8Array.from(r).buffer};f(i)&&n.push(i)}return n}function k(e){return e.mime===`application/zip`||e.mime===`application/x-zip-compressed`||/\.zip$/i.test(e.name)}var A=[[`Foci et al. 2024. In the treatment arm we observed 42% improvement at 12 weeks on the primary endpoint. No serious adverse events were reported over the study period.`],[`Maso et al. 2023. Across the full cohort there was no significant effect at 24 weeks on the relapse rate, a secondary endpoint.`],[`Nyra 2024. The trial recorded 38% improvement at 12 weeks in the treatment arm, with mild adverse events in 12% of patients. Adoption remains limited outside academic centers.`],[`Cost Review 2023. The analysis finds the annual treatment cost is $18,400 per patient at list price.`],[`Ledger 2022. After rebates, the intervention costs $9,200 per patient annually.`],[`Adoption Survey 2024. Among surveyed sites, 62% of clinics adopted the protocol within the first year.`]],j={sources:[{id:`s0`,fileName:`foci-2024.pdf`,kind:`pdf`,pageCount:1,label:`Foci et al. 2024`},{id:`s1`,fileName:`maso-2023.pdf`,kind:`pdf`,pageCount:1,label:`Maso et al. 2023`},{id:`s2`,fileName:`nyra-2024.pdf`,kind:`pdf`,pageCount:1,label:`Nyra 2024`},{id:`s3`,fileName:`cost-review-2023.pdf`,kind:`pdf`,pageCount:1,label:`Cost Review 2023`},{id:`s4`,fileName:`ledger-2022.pdf`,kind:`pdf`,pageCount:1,label:`Ledger 2022`},{id:`s5`,fileName:`adoption-survey-2024.pdf`,kind:`pdf`,pageCount:1,label:`Adoption Survey 2024`}],themes:[{id:`Efficacy`,name:`Efficacy`,sourceCount:3,claimCount:3},{id:`Safety`,name:`Safety`,sourceCount:2,claimCount:2},{id:`Cost`,name:`Cost`,sourceCount:2,claimCount:2},{id:`Adoption`,name:`Adoption`,sourceCount:2,claimCount:2}],claims:[{id:`s0c0`,quote:`42% improvement at 12 weeks on the primary endpoint`,page:1,kind:`stat`,title:`42% improvement at 12 weeks`,ask:`On which endpoint?`,role:`load-bearing`,region:`Efficacy`,source:0},{id:`s1c0`,quote:`no significant effect at 24 weeks on the relapse rate`,page:1,kind:`finding`,title:`No effect at 24 weeks`,ask:`Which endpoint?`,role:`load-bearing`,region:`Efficacy`,source:1},{id:`s2c0`,quote:`38% improvement at 12 weeks in the treatment arm`,page:1,kind:`stat`,title:`38% improvement at 12 weeks`,ask:`How measured?`,role:`supporting`,region:`Efficacy`,source:2},{id:`s0c1`,quote:`No serious adverse events were reported`,page:1,kind:`finding`,title:`No serious adverse events`,ask:`Over what period?`,role:`supporting`,region:`Safety`,source:0},{id:`s2c1`,quote:`mild adverse events in 12% of patients`,page:1,kind:`risk`,title:`Mild adverse events in 12%`,ask:`Which events?`,role:`supporting`,region:`Safety`,source:2},{id:`s3c0`,quote:`annual treatment cost is $18,400 per patient`,page:1,kind:`stat`,title:`Cost $18,400 per patient`,ask:`List or net price?`,role:`load-bearing`,region:`Cost`,source:3},{id:`s4c0`,quote:`the intervention costs $9,200 per patient annually`,page:1,kind:`stat`,title:`Cost $9,200 per patient`,ask:`Before or after rebates?`,role:`load-bearing`,region:`Cost`,source:4},{id:`s5c0`,quote:`62% of clinics adopted the protocol`,page:1,kind:`stat`,title:`62% of clinics adopted`,ask:`Over what window?`,role:`supporting`,region:`Adoption`,source:5},{id:`s2c2`,quote:`Adoption remains limited outside academic centers`,page:1,kind:`finding`,title:`Limited outside academia`,ask:`Why limited?`,role:`context`,region:`Adoption`,source:2}],threads:[{a:`s0c0`,b:`s1c0`,relation:`in-tension`,crossDoc:!0},{a:`s3c0`,b:`s4c0`,relation:`contradicts`,crossDoc:!0},{a:`s0c0`,b:`s2c0`,relation:`agrees`,crossDoc:!0}],contradictions:[{id:`x0`,theme:`Efficacy`,a:`s0c0`,b:`s1c0`,relation:`in-tension`,sharedQuantity:`drug efficacy`,comparable:!1,caveat:`timeframe`,label:`Two trials disagree on efficacy`,seedQuestion:`Are these comparable? "42% improvement at 12 weeks" (12week) vs "No effect at 24 weeks" (24week) — do they measure the same endpoint, population, and timeframe?`},{id:`x1`,theme:`Cost`,a:`s3c0`,b:`s4c0`,relation:`contradicts`,sharedQuantity:`annual treatment cost`,comparable:!0,matchPhrase:`per patient`,delta:{aValue:18400,bValue:9200,unit:`$`},label:`Sources disagree on annual treatment cost`,seedQuestion:`Are these comparable? "Cost $18,400 per patient" (unspecified scope) vs "Cost $9,200 per patient" (unspecified scope) — do they measure the same endpoint, population, and timeframe?`}],gaps:[{id:`g0`,theme:`Safety`,facet:{id:`f0`,label:`Pediatric population`,surfaceForms:[`pediatric`,`paediatric`,`children`,`under 18`]},sourcesScanned:6,coveredCount:0,kind:`absent`,searchedForms:[`pediatric`,`paediatric`,`children`,`under 18`],label:`No coverage — Pediatric population`},{id:`g1`,theme:`Efficacy`,facet:{id:`f1`,label:`Long-term outcomes`,surfaceForms:[`long-term`,`long term`,`follow-up`,`5-year`]},sourcesScanned:6,coveredCount:0,kind:`absent`,searchedForms:[`long-term`,`long term`,`follow-up`,`5-year`],label:`No coverage — Long-term outcomes`}],consensus:[{id:`c0`,theme:`Efficacy`,proposition:`The treatment improves the primary endpoint at 12 weeks.`,memberClaimIds:[`s0c0`,`s2c0`],sourceCount:2,corpusSize:6,band:{unit:`%`,min:38,max:42}}],counts:{contradictions:2,gaps:2,consensus:2},pageCount:6},M=t();r();var N=n(()=>c(()=>import(`./PrismOverlay-CYItOpax.js`).then(e=>({default:e.PrismOverlay})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),P=n(()=>c(()=>import(`./SynthesisOverlay-CHlVL7sT.js`).then(e=>({default:e.SynthesisOverlay})),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,0,10,11,12,13,14,15,16,17,18,19,20]))),F=N.Component,I=P.Component,L=Math.round(d/(1024*1024));async function R(e){return{name:e.name,mime:e.type||`application/zip`,data:``,size:e.size,file:e}}function z(){let e=g();(0,x.useEffect)(()=>a(o()),[]);let[t,n]=(0,x.useState)([]),[r,c]=(0,x.useState)(null),[d,f]=(0,x.useState)(!1),[p,m]=(0,x.useState)(!1),[y,b]=(0,x.useState)(null),S=(0,x.useRef)(null),C=(0,x.useRef)(null);(0,x.useEffect)(()=>{let e=C.current;e&&(e.setAttribute(`webkitdirectory`,``),e.setAttribute(`directory`,``))},[]);let w=(0,x.useMemo)(()=>_(v()),[]),[E]=(0,x.useState)(()=>new URLSearchParams(window.location.hash.split(`?`)[1]??``).get(`demo`)===`1`),D=(0,x.useCallback)(async e=>{if(!e||e.length===0)return;P.preload().catch(()=>{}),m(!0),b(null);let r=Array.from(e),i=r.filter(e=>B(e)&&e.size<=41943040),a=r.filter(e=>B(e)&&e.size>41943040),o=r.filter(e=>!B(e));try{let e=[],r=await T(o);e.push(...r.sources);for(let t of i)try{e.push(...await O(await R(t)))}catch{}n(t=>{let n=new Set(t.map(V)),r=[...t,...e.filter(e=>!n.has(V(e)))];return r.length>200?r.slice(0,200):r}),a.length>0?b(`Archive is too large — up to ${L} MB per .zip.`):e.length===0?b(`No readable sources found. Add PDFs, docs, or text/data files.`):t.length+e.length>200&&b(`Capped at 200 sources.`)}catch{b(`Those files couldn't be read. Try PDFs, docs, or text/data files.`)}finally{m(!1),S.current&&(S.current.value=``),C.current&&(C.current.value=``)}},[t.length]),k=(0,x.useCallback)(e=>{n(t=>t.filter((t,n)=>n!==e))},[]),z=(0,x.useCallback)(e=>{e.preventDefault(),f(!1),D(e.dataTransfer.files)},[D]);return E?(0,M.jsx)(s,{label:`Synthesis world`,overlay:!0,children:(0,M.jsx)(I,{cfg:w,demo:{spec:j,corpus:A},onClose:()=>{window.location.hash=e.href}})}):r?(0,M.jsx)(s,{label:r.mode===`prism`?`Prism workbench`:`Synthesis world`,overlay:!0,children:r.mode===`prism`?(0,M.jsx)(F,{pdf:r.sources,cfg:w,onClose:()=>c(null)}):(0,M.jsx)(I,{sources:r.sources,cfg:w,onClose:()=>c(null)})}):(0,M.jsxs)(`div`,{className:`prism-app`,children:[(0,M.jsxs)(`header`,{className:`prism-app-header`,children:[(0,M.jsx)(`button`,{type:`button`,className:`prism-app-back`,onClick:()=>{window.location.hash=e.href},"aria-label":`Back to ${e.label}`,title:`Back to ${e.label}`,children:(0,M.jsx)(l.chevL,{})}),(0,M.jsx)(`span`,{className:`prism-app-brand`,children:`Synthesis`})]}),(0,M.jsxs)(`main`,{className:`prism-app-main`,children:[(0,M.jsxs)(`div`,{className:`prism-app-hero`,children:[(0,M.jsx)(`h1`,{className:`prism-app-title`,children:`Drop in 100 sources. Walk the one result.`}),(0,M.jsx)(`p`,{className:`prism-app-lede`,children:`Point Mavéa at a whole topic — a folder of papers, a data room, a quarter of notes — and it fuses them into one map: where they agree, where they fight, and where they’re silent.`}),(0,M.jsx)(u,{kind:`upload`})]}),(0,M.jsxs)(`div`,{className:`prism-dropzone${d?` prism-dropzone--over`:``}`,onDrop:z,onDragOver:e=>{e.preventDefault(),f(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||f(!1)},onClick:()=>S.current?.click(),role:`button`,tabIndex:0,"aria-label":`Add sources`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&S.current?.click()},...i(P.preload),children:[(0,M.jsx)(`input`,{ref:S,type:`file`,multiple:!0,className:`prism-dropzone-input`,onChange:e=>void D(e.target.files),"aria-hidden":`true`}),(0,M.jsx)(`input`,{ref:C,type:`file`,className:`prism-dropzone-input`,onChange:e=>void D(e.target.files),"aria-hidden":`true`}),(0,M.jsx)(l.upload,{}),(0,M.jsx)(`span`,{className:`prism-dropzone-label`,children:d?`Drop to add`:p?`Reading…`:`Drop a folder, a .zip, or files`}),(0,M.jsx)(`span`,{className:`prism-dropzone-hint`,children:`PDF · Word · Excel · PowerPoint · Text · CSV — or a whole folder / archive`}),(0,M.jsx)(`button`,{type:`button`,style:{marginTop:12,padding:`7px 16px`,whiteSpace:`nowrap`,borderRadius:`var(--r-full, 999px)`,border:`1px solid var(--line)`,background:`var(--surface-elevated)`,color:`var(--text-secondary)`,fontSize:13,cursor:`pointer`},onClick:e=>{e.stopPropagation(),C.current?.click()},children:`Choose a folder…`})]}),y&&(0,M.jsx)(`p`,{className:`prism-app-error`,role:`status`,children:y}),t.length>0&&(0,M.jsxs)(`div`,{className:`prism-staged`,children:[(0,M.jsx)(`p`,{className:`prism-staged-label`,children:t.length===1?`1 source ready`:`${t.length} sources ready`}),(0,M.jsx)(`ul`,{className:`prism-staged-list`,children:t.slice(0,60).map((e,t)=>(0,M.jsxs)(`li`,{className:`prism-staged-item`,children:[(0,M.jsx)(l.doc,{}),(0,M.jsx)(`span`,{className:`prism-staged-name`,children:h(e)}),(0,M.jsx)(`button`,{type:`button`,className:`prism-staged-remove`,onClick:e=>{e.stopPropagation(),k(t)},"aria-label":`Remove ${e.name}`,children:(0,M.jsx)(l.x,{})})]},`${V(e)}-${t}`))}),t.length>60&&(0,M.jsxs)(`p`,{className:`prism-staged-label`,children:[`+ `,t.length-60,` more`]}),(()=>{let e=e=>{(e===`prism`?N.preload():P.preload()).catch(()=>{}),c({sources:t,mode:e})},n=t.length;return n<=2?(0,M.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>e(`prism`),...i(N.preload),children:[n===1?`Open in Prism`:`Compare 2 documents`,(0,M.jsx)(l.chevR,{})]}):n===3?(0,M.jsxs)(`div`,{className:`prism-confirm-row`,children:[(0,M.jsx)(`button`,{type:`button`,className:`prism-confirm-btn prism-confirm-alt`,onClick:()=>e(`prism`),...i(N.preload),children:`Compare 3`}),(0,M.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>e(`synth`),...i(P.preload),children:[`Synthesize 3 sources`,(0,M.jsx)(l.chevR,{})]})]}):(0,M.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>e(`synth`),...i(P.preload),children:[`Synthesize `,n,` sources`,(0,M.jsx)(l.chevR,{})]})})()]})]})]})}function B(e){return k({name:e.name,mime:e.type,data:``,size:e.size})}function V(e){return`${e.name}:${e.size}`}export{z as SynthesisApp};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PrismOverlay-UTsJ8R5d.js","assets/index-CWqRe4-B.js","assets/chunk-BVpWp9h4.js","assets/jsx-runtime-DaSxXjOY.js","assets/react-BQSORdFI.js","assets/lazyRetry-D50B1UMY.js","assets/index-CepQEz75.css","assets/providers-wzm7E8Pa.js","assets/http-CJCtjYpA.js","assets/info-CiqHR5cs.js","assets/sourceHost-BV3t2XDb.js","assets/toast-BBNs2h3L.js","assets/penStrokes-9Q_l7NTt.js","assets/gesture-DabMpPcq.js","assets/citation-BcvmjKS8.js","assets/verbatim-CBMzUDlf.js","assets/officeDoc-B6nEhNp4.js","assets/search-Be63DJkp.js","assets/streamParse-DRgMHWye.js","assets/useFocusTrap-DbfG6zbM.js","assets/PrismOverlay-BTfAicBt.css","assets/SynthesisOverlay-Ds0MhZLQ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{I as n,J as r,L as i,M as a,N as o,k as s,q as c}from"./index-CWqRe4-B.js";import{n as l}from"./icons-CHVz6kv_.js";import{t as u}from"./FeatureUseNotice-CoK5HkbR.js";import{a as d,g as f,o as p,p as m,u as h}from"./providers-wzm7E8Pa.js";import{t as g}from"./homeTarget-BcZYH3DY.js";import{l as _,n as v}from"./useLiveConfig-vMyjo2gV.js";/* empty css */import{n as y,r as b}from"./officeDoc-B6nEhNp4.js";var x=e(),S=/\.(pdf|docx|pptx|xlsx|csv|tsv|txt|text|md|markdown|json|jsonl|ndjson|ya?ml|toml|xml|log|tab|js|ts|jsx|tsx|py|rb|go|rs|java|c|h|cpp|cs|sh|sql|css|html?)$/i,C=/(^|\/)(\.git|node_modules|\.DS_Store|__pycache__|\.venv|dist|build|__MACOSX)(\/|$)/i;function w(e){return e.filter(e=>{let t=e.webkitRelativePath||e.name;return S.test(e.name)&&!C.test(t)})}async function T(e,t={}){let{max:n=200,onProgress:r}=t,i=w(e),a=i.slice(0,n),o=[];for(let e=0;e<a.length;e+=1){let t=await m(a[e]);t.ok&&t.attachment&&o.push(t.attachment),r?.(e+1,a.length)}return{sources:o,skipped:i.length-o.length}}var E={docx:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,pptx:`application/vnd.openxmlformats-officedocument.presentationml.presentation`,xlsx:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`};function D(e){let t=e.split(`.`).pop()?.toLowerCase()??``;return t===`pdf`?`application/pdf`:E[t]??``}async function O(e){let t;try{t=await b(e.data?y(e.data):await p(e))}catch{return[]}if(!t)return[];let n=[];for(let[e,r]of t){if(n.length>=200)break;if(e.endsWith(`/`)||r.length===0||C.test(e))continue;let t=e.split(`/`).pop()??e;if(!t||t.startsWith(`.`))continue;let i={name:t,mime:D(t),data:``,size:r.length,bytes:Uint8Array.from(r).buffer};f(i)&&n.push(i)}return n}function k(e){return e.mime===`application/zip`||e.mime===`application/x-zip-compressed`||/\.zip$/i.test(e.name)}var A=[[`Foci et al. 2024. In the treatment arm we observed 42% improvement at 12 weeks on the primary endpoint. No serious adverse events were reported over the study period.`],[`Maso et al. 2023. Across the full cohort there was no significant effect at 24 weeks on the relapse rate, a secondary endpoint.`],[`Nyra 2024. The trial recorded 38% improvement at 12 weeks in the treatment arm, with mild adverse events in 12% of patients. Adoption remains limited outside academic centers.`],[`Cost Review 2023. The analysis finds the annual treatment cost is $18,400 per patient at list price.`],[`Ledger 2022. After rebates, the intervention costs $9,200 per patient annually.`],[`Adoption Survey 2024. Among surveyed sites, 62% of clinics adopted the protocol within the first year.`]],j={sources:[{id:`s0`,fileName:`foci-2024.pdf`,kind:`pdf`,pageCount:1,label:`Foci et al. 2024`},{id:`s1`,fileName:`maso-2023.pdf`,kind:`pdf`,pageCount:1,label:`Maso et al. 2023`},{id:`s2`,fileName:`nyra-2024.pdf`,kind:`pdf`,pageCount:1,label:`Nyra 2024`},{id:`s3`,fileName:`cost-review-2023.pdf`,kind:`pdf`,pageCount:1,label:`Cost Review 2023`},{id:`s4`,fileName:`ledger-2022.pdf`,kind:`pdf`,pageCount:1,label:`Ledger 2022`},{id:`s5`,fileName:`adoption-survey-2024.pdf`,kind:`pdf`,pageCount:1,label:`Adoption Survey 2024`}],themes:[{id:`Efficacy`,name:`Efficacy`,sourceCount:3,claimCount:3},{id:`Safety`,name:`Safety`,sourceCount:2,claimCount:2},{id:`Cost`,name:`Cost`,sourceCount:2,claimCount:2},{id:`Adoption`,name:`Adoption`,sourceCount:2,claimCount:2}],claims:[{id:`s0c0`,quote:`42% improvement at 12 weeks on the primary endpoint`,page:1,kind:`stat`,title:`42% improvement at 12 weeks`,ask:`On which endpoint?`,role:`load-bearing`,region:`Efficacy`,source:0},{id:`s1c0`,quote:`no significant effect at 24 weeks on the relapse rate`,page:1,kind:`finding`,title:`No effect at 24 weeks`,ask:`Which endpoint?`,role:`load-bearing`,region:`Efficacy`,source:1},{id:`s2c0`,quote:`38% improvement at 12 weeks in the treatment arm`,page:1,kind:`stat`,title:`38% improvement at 12 weeks`,ask:`How measured?`,role:`supporting`,region:`Efficacy`,source:2},{id:`s0c1`,quote:`No serious adverse events were reported`,page:1,kind:`finding`,title:`No serious adverse events`,ask:`Over what period?`,role:`supporting`,region:`Safety`,source:0},{id:`s2c1`,quote:`mild adverse events in 12% of patients`,page:1,kind:`risk`,title:`Mild adverse events in 12%`,ask:`Which events?`,role:`supporting`,region:`Safety`,source:2},{id:`s3c0`,quote:`annual treatment cost is $18,400 per patient`,page:1,kind:`stat`,title:`Cost $18,400 per patient`,ask:`List or net price?`,role:`load-bearing`,region:`Cost`,source:3},{id:`s4c0`,quote:`the intervention costs $9,200 per patient annually`,page:1,kind:`stat`,title:`Cost $9,200 per patient`,ask:`Before or after rebates?`,role:`load-bearing`,region:`Cost`,source:4},{id:`s5c0`,quote:`62% of clinics adopted the protocol`,page:1,kind:`stat`,title:`62% of clinics adopted`,ask:`Over what window?`,role:`supporting`,region:`Adoption`,source:5},{id:`s2c2`,quote:`Adoption remains limited outside academic centers`,page:1,kind:`finding`,title:`Limited outside academia`,ask:`Why limited?`,role:`context`,region:`Adoption`,source:2}],threads:[{a:`s0c0`,b:`s1c0`,relation:`in-tension`,crossDoc:!0},{a:`s3c0`,b:`s4c0`,relation:`contradicts`,crossDoc:!0},{a:`s0c0`,b:`s2c0`,relation:`agrees`,crossDoc:!0}],contradictions:[{id:`x0`,theme:`Efficacy`,a:`s0c0`,b:`s1c0`,relation:`in-tension`,sharedQuantity:`drug efficacy`,comparable:!1,caveat:`timeframe`,label:`Two trials disagree on efficacy`,seedQuestion:`Are these comparable? "42% improvement at 12 weeks" (12week) vs "No effect at 24 weeks" (24week) — do they measure the same endpoint, population, and timeframe?`},{id:`x1`,theme:`Cost`,a:`s3c0`,b:`s4c0`,relation:`contradicts`,sharedQuantity:`annual treatment cost`,comparable:!0,matchPhrase:`per patient`,delta:{aValue:18400,bValue:9200,unit:`$`},label:`Sources disagree on annual treatment cost`,seedQuestion:`Are these comparable? "Cost $18,400 per patient" (unspecified scope) vs "Cost $9,200 per patient" (unspecified scope) — do they measure the same endpoint, population, and timeframe?`}],gaps:[{id:`g0`,theme:`Safety`,facet:{id:`f0`,label:`Pediatric population`,surfaceForms:[`pediatric`,`paediatric`,`children`,`under 18`]},sourcesScanned:6,coveredCount:0,kind:`absent`,searchedForms:[`pediatric`,`paediatric`,`children`,`under 18`],label:`No coverage — Pediatric population`},{id:`g1`,theme:`Efficacy`,facet:{id:`f1`,label:`Long-term outcomes`,surfaceForms:[`long-term`,`long term`,`follow-up`,`5-year`]},sourcesScanned:6,coveredCount:0,kind:`absent`,searchedForms:[`long-term`,`long term`,`follow-up`,`5-year`],label:`No coverage — Long-term outcomes`}],consensus:[{id:`c0`,theme:`Efficacy`,proposition:`The treatment improves the primary endpoint at 12 weeks.`,memberClaimIds:[`s0c0`,`s2c0`],sourceCount:2,corpusSize:6,band:{unit:`%`,min:38,max:42}}],counts:{contradictions:2,gaps:2,consensus:2},pageCount:6},M=t();r();var N=n(()=>c(()=>import(`./PrismOverlay-UTsJ8R5d.js`).then(e=>({default:e.PrismOverlay})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),P=n(()=>c(()=>import(`./SynthesisOverlay-Ds0MhZLQ.js`).then(e=>({default:e.SynthesisOverlay})),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,0,10,11,12,13,14,15,16,17,18,19,20]))),F=N.Component,I=P.Component,L=Math.round(d/(1024*1024));async function R(e){return{name:e.name,mime:e.type||`application/zip`,data:``,size:e.size,file:e}}function z(){let e=g();(0,x.useEffect)(()=>a(o()),[]);let[t,n]=(0,x.useState)([]),[r,c]=(0,x.useState)(null),[d,f]=(0,x.useState)(!1),[p,m]=(0,x.useState)(!1),[y,b]=(0,x.useState)(null),S=(0,x.useRef)(null),C=(0,x.useRef)(null);(0,x.useEffect)(()=>{let e=C.current;e&&(e.setAttribute(`webkitdirectory`,``),e.setAttribute(`directory`,``))},[]);let w=(0,x.useMemo)(()=>_(v()),[]),[E]=(0,x.useState)(()=>new URLSearchParams(window.location.hash.split(`?`)[1]??``).get(`demo`)===`1`),D=(0,x.useCallback)(async e=>{if(!e||e.length===0)return;P.preload().catch(()=>{}),m(!0),b(null);let r=Array.from(e),i=r.filter(e=>B(e)&&e.size<=41943040),a=r.filter(e=>B(e)&&e.size>41943040),o=r.filter(e=>!B(e));try{let e=[],r=await T(o);e.push(...r.sources);for(let t of i)try{e.push(...await O(await R(t)))}catch{}n(t=>{let n=new Set(t.map(V)),r=[...t,...e.filter(e=>!n.has(V(e)))];return r.length>200?r.slice(0,200):r}),a.length>0?b(`Archive is too large — up to ${L} MB per .zip.`):e.length===0?b(`No readable sources found. Add PDFs, docs, or text/data files.`):t.length+e.length>200&&b(`Capped at 200 sources.`)}catch{b(`Those files couldn't be read. Try PDFs, docs, or text/data files.`)}finally{m(!1),S.current&&(S.current.value=``),C.current&&(C.current.value=``)}},[t.length]),k=(0,x.useCallback)(e=>{n(t=>t.filter((t,n)=>n!==e))},[]),z=(0,x.useCallback)(e=>{e.preventDefault(),f(!1),D(e.dataTransfer.files)},[D]);return E?(0,M.jsx)(s,{label:`Synthesis world`,overlay:!0,children:(0,M.jsx)(I,{cfg:w,demo:{spec:j,corpus:A},onClose:()=>{window.location.hash=e.href}})}):r?(0,M.jsx)(s,{label:r.mode===`prism`?`Prism workbench`:`Synthesis world`,overlay:!0,children:r.mode===`prism`?(0,M.jsx)(F,{pdf:r.sources,cfg:w,onClose:()=>c(null)}):(0,M.jsx)(I,{sources:r.sources,cfg:w,onClose:()=>c(null)})}):(0,M.jsxs)(`div`,{className:`prism-app`,children:[(0,M.jsxs)(`header`,{className:`prism-app-header`,children:[(0,M.jsx)(`button`,{type:`button`,className:`prism-app-back`,onClick:()=>{window.location.hash=e.href},"aria-label":`Back to ${e.label}`,title:`Back to ${e.label}`,children:(0,M.jsx)(l.chevL,{})}),(0,M.jsx)(`span`,{className:`prism-app-brand`,children:`Synthesis`})]}),(0,M.jsxs)(`main`,{className:`prism-app-main`,children:[(0,M.jsxs)(`div`,{className:`prism-app-hero`,children:[(0,M.jsx)(`h1`,{className:`prism-app-title`,children:`Drop in 100 sources. Walk the one result.`}),(0,M.jsx)(`p`,{className:`prism-app-lede`,children:`Point Mavéa at a whole topic — a folder of papers, a data room, a quarter of notes — and it fuses them into one map: where they agree, where they fight, and where they’re silent.`}),(0,M.jsx)(u,{kind:`upload`})]}),(0,M.jsxs)(`div`,{className:`prism-dropzone${d?` prism-dropzone--over`:``}`,onDrop:z,onDragOver:e=>{e.preventDefault(),f(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||f(!1)},onClick:()=>S.current?.click(),role:`button`,tabIndex:0,"aria-label":`Add sources`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&S.current?.click()},...i(P.preload),children:[(0,M.jsx)(`input`,{ref:S,type:`file`,multiple:!0,className:`prism-dropzone-input`,onChange:e=>void D(e.target.files),"aria-hidden":`true`}),(0,M.jsx)(`input`,{ref:C,type:`file`,className:`prism-dropzone-input`,onChange:e=>void D(e.target.files),"aria-hidden":`true`}),(0,M.jsx)(l.upload,{}),(0,M.jsx)(`span`,{className:`prism-dropzone-label`,children:d?`Drop to add`:p?`Reading…`:`Drop a folder, a .zip, or files`}),(0,M.jsx)(`span`,{className:`prism-dropzone-hint`,children:`PDF · Word · Excel · PowerPoint · Text · CSV — or a whole folder / archive`}),(0,M.jsx)(`button`,{type:`button`,style:{marginTop:12,padding:`7px 16px`,whiteSpace:`nowrap`,borderRadius:`var(--r-full, 999px)`,border:`1px solid var(--line)`,background:`var(--surface-elevated)`,color:`var(--text-secondary)`,fontSize:13,cursor:`pointer`},onClick:e=>{e.stopPropagation(),C.current?.click()},children:`Choose a folder…`})]}),y&&(0,M.jsx)(`p`,{className:`prism-app-error`,role:`status`,children:y}),t.length>0&&(0,M.jsxs)(`div`,{className:`prism-staged`,children:[(0,M.jsx)(`p`,{className:`prism-staged-label`,children:t.length===1?`1 source ready`:`${t.length} sources ready`}),(0,M.jsx)(`ul`,{className:`prism-staged-list`,children:t.slice(0,60).map((e,t)=>(0,M.jsxs)(`li`,{className:`prism-staged-item`,children:[(0,M.jsx)(l.doc,{}),(0,M.jsx)(`span`,{className:`prism-staged-name`,children:h(e)}),(0,M.jsx)(`button`,{type:`button`,className:`prism-staged-remove`,onClick:e=>{e.stopPropagation(),k(t)},"aria-label":`Remove ${e.name}`,children:(0,M.jsx)(l.x,{})})]},`${V(e)}-${t}`))}),t.length>60&&(0,M.jsxs)(`p`,{className:`prism-staged-label`,children:[`+ `,t.length-60,` more`]}),(()=>{let e=e=>{(e===`prism`?N.preload():P.preload()).catch(()=>{}),c({sources:t,mode:e})},n=t.length;return n<=2?(0,M.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>e(`prism`),...i(N.preload),children:[n===1?`Open in Prism`:`Compare 2 documents`,(0,M.jsx)(l.chevR,{})]}):n===3?(0,M.jsxs)(`div`,{className:`prism-confirm-row`,children:[(0,M.jsx)(`button`,{type:`button`,className:`prism-confirm-btn prism-confirm-alt`,onClick:()=>e(`prism`),...i(N.preload),children:`Compare 3`}),(0,M.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>e(`synth`),...i(P.preload),children:[`Synthesize 3 sources`,(0,M.jsx)(l.chevR,{})]})]}):(0,M.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>e(`synth`),...i(P.preload),children:[`Synthesize `,n,` sources`,(0,M.jsx)(l.chevR,{})]})})()]})]})]})}function B(e){return k({name:e.name,mime:e.type,data:``,size:e.size})}function V(e){return`${e.name}:${e.size}`}export{z as SynthesisApp};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-CWqRe4-B.js";import{t as r,v as i,x as a}from"./providers-wzm7E8Pa.js";import{i as o,n as s}from"./verbatim-CBMzUDlf.js";import{PrismOverlay as c,a as l,c as u,d,l as f,o as p,s as m}from"./PrismOverlay-UTsJ8R5d.js";var h=e(),g=n(),_=/[a-z0-9]{4,}/g;function v(e){return new Set(e.toLowerCase().match(_)??[])}function y(e,t){if(e.size===0||t.size===0)return 0;let n=0;for(let r of e)t.has(r)&&(n+=1);return n/(e.size+t.size-n)}function b(e,t=12){let n=new Map;for(let t of e.toLowerCase().match(_)??[])n.set(t,(n.get(t)??0)+1);return[...n.entries()].sort((e,t)=>t[1]-e[1]||(e[0]<t[0]?-1:1)).slice(0,t).map(([e])=>e)}function x(e,t=2){return e.replace(/\s+/g,` `).split(/(?<=[.!?])\s+/).map(e=>e.trim()).filter(Boolean).slice(0,t)}var S={thousand:1e3,k:1e3,million:1e6,m:1e6,billion:1e9,bn:1e9,b:1e9,trillion:0xe8d4a51000};function C(e){let t=e.toLowerCase();return t===`%`||t===`percent`||t===`pct`?`pct`:/^(week|wk|month|mo|year|yr|day)s?$/.test(t)?`time`:/^(mg|kg|µg|mcg|g|ml|l)$/.test(t)?`dose`:`count`}var w=/(\$|€|£|¥)?\s?(\d{1,3}(?:,\d{3})+|\d+)(?:\.(\d+))?\s?(thousand|million|billion|trillion|bn)?\s?(%|percent|pct|mg|kg|µg|mcg|ml|weeks?|wks?|months?|mos?|years?|yrs?|days?)?/gi;function T(e){let t=[];for(let n of e.matchAll(w)){let[e,r,i,a,o,s]=n;if(!i)continue;let c=Number(`${i.replace(/,/g,``)}${a?`.${a}`:``}`);if(!Number.isFinite(c))continue;o&&(c*=S[o.toLowerCase()]??1);let l=(r??s??``).trim(),u=r?`money`:s?C(s):`count`;t.push({value:c,unit:l,family:u,raw:e.trim()})}return t}function E(e,t){for(let n of T(e))if(!t||n.family===t)return n;return null}function D(e){let t=` ${e.toLowerCase()} `;return/\b(p[ae]diatric|children|child|adolescents?|infants?|neonat|under[\s-]?18|aged? \d{1,2})\b/.test(t)?`pediatric`:/\b(elderly|geriatric|older adults?|aged 65)\b/.test(t)?`elderly`:/\b(adults?|grown[\s-]?ups?)\b/.test(t)?`adult`:null}function O(e){let t=e.toLowerCase(),n=t.match(/\b(\d{1,3})\s?(week|wk|month|mo|year|yr|day)s?\b/);if(n)return`${n[1]}${n[2].replace(/s$/,``)}`;let r=t.match(/\bphase\s?([1-4]|i{1,3}|iv)\b/);if(r)return`phase${r[1]}`;let i=t.match(/\bby\s(20\d{2})\b/);return i?`by${i[1]}`:null}function k(e,t){let n=D(e),r=D(t);if(n&&r&&n!==r)return`population`;let i=O(e),a=O(t);return i&&a&&i!==a?`timeframe`:null}function ee(e){let t=e.slice(0,1200),n=t.match(/\b([A-Z][a-zà-ÿ]+)\s+et al\.?,?\s*(\d{4})/);if(n)return`${n[1]} et al. ${n[2]}`;let r=t.match(/\b([A-Z][a-zà-ÿ]+)\s*\(?(19|20)\d{2}\)?/);return r?`${r[1]} ${r[0].match(/\d{4}/)?.[0]??``}`.trim():``}function te(e,t={}){let{minOverlap:n=.12,topK:r=120,maxDocFraction:i=.35,crossSourceOnly:a=!0}=t,o=e.length;if(o<2)return[];let s=e.map(e=>v(e.text)),c=e.map(e=>e.source),l=new Map;s.forEach((e,t)=>{for(let n of e){let e=l.get(n);e?e.push(t):l.set(n,[t])}});let u=Math.max(6,Math.floor(o*i)),d=new Set,f=[];for(let t of l.values())if(!(t.length<2||t.length>u))for(let r=0;r<t.length;r+=1)for(let i=r+1;i<t.length;i+=1){let o=t[r],l=t[i];if(a&&c[o]===c[l])continue;let u=o<l?`${o}|${l}`:`${l}|${o}`;if(d.has(u))continue;d.add(u);let p=y(s[o],s[l]);if(p>=n){let t=e[o],n=e[l];f.push(t.id<n.id?{a:t.id,b:n.id,overlap:p}:{a:n.id,b:t.id,overlap:p})}}return f.sort((e,t)=>t.overlap-e.overlap||(e.a<t.a?-1:e.a>t.a?1:e.b<t.b?-1:1)),f.slice(0,r)}function A(e){let t=new Map,n=e=>{let n=e;for(;t.get(n)!==n;)n=t.get(n);let r=e;for(;t.get(r)!==n;){let e=t.get(r);t.set(r,n),r=e}return n},r=e=>{t.has(e)||t.set(e,e)};for(let{a:i,b:a}of e)r(i),r(a),t.set(n(i),n(a));let i=new Map;for(let e of t.keys()){let t=n(e),r=i.get(t);r?r.push(e):i.set(t,[e])}return[...i.values()].map(e=>e.slice().sort())}var j=[`pct`,`money`,`dose`,`count`];function M(e,t){let n=Math.max(1,Math.abs(e),Math.abs(t));return Math.abs(e-t)<=.005*n}function N(e,t){return t.some(t=>s(e,t))}function P(e,t,n,r,i){if(t.source===n.source)return null;let a=String(e.relation).toLowerCase();if(a!==`contradicts`&&a!==`in-tension`)return null;let o=k(t.quote,n.quote),s=(e.matchPhrase??``).trim(),c=s.length>0&&N(s,r)&&N(s,i),l,u=!1;for(let e of j){let r=E(t.quote,e),i=E(n.quote,e);if(r&&i){M(r.value,i.value)?u=!0:l={aValue:r.value,bValue:i.value,unit:r.unit||i.unit};break}}let d=!!e.comparable&&c&&!o&&!u,f=a===`contradicts`&&d?`contradicts`:`in-tension`,p;return o?p=o:!d&&!u&&a===`contradicts`&&(p=`scope`),{relation:f,comparable:d,...c?{matchPhrase:s}:{},...p?{caveat:p}:{},...l?{delta:l}:{}}}function F(e,t,n,r={}){let{minCorpus:i=3,minSurfaceForms:a=3,minCorpusForThin:o=10,thinFraction:s=.1}=r;return t<i||n<a?null:e<=0?`absent`:t>=o&&e<=Math.max(1,Math.ceil(t*s))?`thin`:null}function I(e,t){let n=new Set;for(let r of e){let e=t.get(r);e!==void 0&&n.add(e)}return n.size}function L(e,t=2){return e>=t}function R(e){if(e&&typeof e==`object`)return e;let t=String(e),n=t.indexOf(`{`);if(n<0)return null;let r=0,i=!1,a=!1;for(let e=n;e<t.length;e+=1){let o=t[e];if(i){a?a=!1:o===`\\`?a=!0:o===`"`&&(i=!1);continue}if(o===`"`)i=!0;else if(o===`{`)r+=1;else if(o===`}`&&(--r,r===0))try{return JSON.parse(t.slice(n,e+1))}catch{return null}}return null}function z(e){return typeof e==`string`?e:``}function B(e,t){if(!e)return[];let n=e[t];return Array.isArray(n)?n:[]}var V=`You compare pairs of grounded claims from different sources and return strict JSON only. You never invent a quote; a shared "matchPhrase" must be copied verbatim from the claims. When two claims measure different endpoints, populations, or timeframes you mark them "not-comparable".`;function ne(e){return`These are candidate claim pairs, each from two DIFFERENT sources in a large corpus. For each
|
|
2
2
|
pair, decide how the two claims relate on the ONE quantity they share.
|
|
3
3
|
|
|
4
4
|
Pairs:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-
|
|
1
|
+
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-CWqRe4-B.js";import{t as n}from"./LegalMarkdownDocument-CcbAfubz.js";var r=t(),i=`# Mavéa Terms of Use
|
|
2
2
|
|
|
3
3
|
Effective: July 19, 2026
|
|
4
4
|
|