// diagrams2.jsx, comparison animation + remote attestation handshake
const { useEffect: useEffect2, useState: useState2, useRef: useRef2 } = React;
// ────────────────────────────────────────────────────────────────────────────
// ComparisonAnimated, three panels side-by-side showing the same prompt flow
// through 3 deployment modes. Trust boundary differs in each.
// ────────────────────────────────────────────────────────────────────────────
function ComparisonPanel({ L, mode, modeLabel }) {
const isOnPrem = mode === "onprem";
const isCloud = mode === "cloud";
const isTEE = mode === "tee";
// outer trust boundary
// on-prem: surrounds the whole flow (client + processing both yours)
// cloud: surrounds only the cloud zone (operator-owned)
// tee: cloud zone is operator-owned, but enclave inside is yours
return (
);
}
// ────────────────────────────────────────────────────────────────────────────
// AttestationFlow, 4-step animated handshake. Step auto-advances; can also
// be controlled by the user via a stepper at the bottom.
// ────────────────────────────────────────────────────────────────────────────
function AttestationFlow({ L }) {
const [step, setStep] = useState2(0);
const [auto, setAuto] = useState2(true);
useEffect2(() => {
if (!auto) return;
const t = setInterval(() => setStep(s => (s + 1) % 5), 2400);
return () => clearInterval(t);
}, [auto]);
const onPick = (i) => { setAuto(false); setStep(i); };
// step 0 = idle, 1..4 = active
const isActive = (i) => step === i;
const isPast = (i) => step >= i;
return (
{/* stepper */}
{L.stepsBadge}
{[1, 2, 3, 4].map(i => (
))}
);
}
window.ComparisonPanel = ComparisonPanel;
window.AttestationFlow = AttestationFlow;