{"version":3,"file":"ApiTerminal.e5RHrmA_.mjs","names":["useRef","useState","__esmMin","_e","de","p","c","init_jsx_runtime","init_npm_react_18_3_1","ce","addPropertyControls","init_framer_DKWANagr","ControlType","ApiTerminal","outer","scale","setScale","props","el","fit","observer","ref","play","setPlay","io","entries","CSS","MARKUP","init_ApiTerminal"],"sources":["https:/framerusercontent.com/modules/E69LRB52jw6jC5TcXRMv/oXiF7SBs4ET2nebxSXfV/ApiTerminal.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Moonlit /api hero terminal. Types the request and the response letter by letter.\n// Do not change the text, colours, timings or sizes. Starts playing when it scrolls into view.\nconst CSS=`\n.mlt{background:#1a191b;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:24px;display:flex;flex-direction:column;gap:0;min-height:420px;box-sizing:border-box;width:100%;overflow:hidden}\n.mlt-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,'Liberation Mono','Courier New',monospace}\n.mlt-ty{display:block;font-size:13px;line-height:20px;overflow:hidden;white-space:pre;width:0;animation:mltType var(--d) steps(var(--n)) forwards;animation-delay:var(--t);animation-play-state:paused}\n.mlt.play .mlt-ty{animation-play-state:running}\n@keyframes mltType{to{width:var(--w)}}\n.mlt-cur{display:inline-block;width:8px;height:14px;background:#D26027;vertical-align:-2px;margin-left:2px;opacity:0;animation:mltBlink 1s steps(1) infinite;animation-delay:9.5s;animation-play-state:paused}\n.mlt.play .mlt-cur{animation-play-state:running}\n@keyframes mltBlink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}\n@media (max-width:760px){.mlt{padding:16px}.mlt-ty,.mlt-mono{font-size:11px !important;line-height:18px}}\n@media (prefers-reduced-motion:reduce){.mlt-ty{animation:none;width:auto}.mlt-cur{animation:none;opacity:1}}\n`;const MARKUP='<span class=\"mlt-mono mlt-ty\" style=\"color: #84828e; margin-bottom: 8px; --n: 15; --w: 15ch; --d: 0.45s; --t: 0.3s\">POST /v1/search</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #eeeef0; --n: 1; --w: 1ch; --d: 0.05s; --t: 0.8s\">{</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #eeeef0; --n: 40; --w: 40ch; --d: 1.2s; --t: 0.9s\">  \"query\": \"rest periods for employees\",</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #eeeef0; --n: 32; --w: 32ch; --d: 0.96s; --t: 2.15s\">  \"jurisdictions\": [\"NL\", \"EU\"],</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #eeeef0; --n: 39; --w: 39ch; --d: 1.17s; --t: 3.15s\">  \"types\": [\"legislation\", \"case_law\"],</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #eeeef0; --n: 19; --w: 19ch; --d: 0.57s; --t: 4.35s\">  \"in_force\": true,</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #eeeef0; --n: 13; --w: 13ch; --d: 0.39s; --t: 4.95s\">  \"limit\": 10</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #eeeef0; margin-bottom: 12px; --n: 1; --w: 1ch; --d: 0.05s; --t: 5.4s\">}</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #b5b2bc; --n: 1; --w: 1ch; --d: 0.03s; --t: 6.0s\">{</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #b5b2bc; --n: 15; --w: 15ch; --d: 0.23s; --t: 6.1s\">  \"results\": [{</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #b5b2bc; --n: 45; --w: 45ch; --d: 0.68s; --t: 6.35s\">    \"title\": \"Arbeidstijdenwet, artikel 5:7\",</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #b5b2bc; --n: 25; --w: 25ch; --d: 0.38s; --t: 7.05s\">    \"jurisdiction\": \"NL\",</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #b5b2bc; --n: 21; --w: 21ch; --d: 0.32s; --t: 7.45s\">    \"in_force\": true,</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #b5b2bc; --n: 28; --w: 28ch; --d: 0.42s; --t: 7.8s\">    \"version\": \"2026-01-01\",</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #b5b2bc; --n: 19; --w: 19ch; --d: 0.29s; --t: 8.25s\">    \"cited_by\": 14,</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #b5b2bc; --n: 48; --w: 48ch; --d: 0.72s; --t: 8.55s\">    \"source_url\": \"https://wetten.overheid.nl/…\"</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #b5b2bc; --n: 4; --w: 4ch; --d: 0.06s; --t: 9.3s\">  }]</span>\\n<span class=\"mlt-mono mlt-ty\" style=\"color: #b5b2bc; --n: 1; --w: 1ch; --d: 0.03s; --t: 9.4s\">}</span>\\n<span class=\"mlt-mono\" style=\"font-size: 13px; line-height: 20px\"><span class=\"mlt-cur\"></span></span>';/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function ApiTerminal(props){const outer=useRef(null);const[scale,setScale]=useState(.46);useEffect(()=>{if(!props.fitToBox||!outer.current)return;const el=outer.current;const fit=()=>setScale(Math.min(1,el.clientWidth/540,el.clientHeight/450));fit();const observer=new ResizeObserver(fit);observer.observe(el);return()=>observer.disconnect();},[props.fitToBox]);const ref=useRef(null);const[play,setPlay]=useState(false);useEffect(()=>{const el=ref.current;if(!el||typeof IntersectionObserver===\"undefined\"){setPlay(true);return;}const io=new IntersectionObserver(entries=>{if(entries.some(e=>e.isIntersecting)){setPlay(true);io.disconnect();}},{threshold:.3});io.observe(el);return()=>io.disconnect();},[]);return /*#__PURE__*/_jsxs(\"div\",{ref:outer,style:{width:\"100%\",...props.style,...props.fitToBox?{height:props.style?.height||208,position:\"relative\",overflow:\"hidden\"}:{}},children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),/*#__PURE__*/_jsx(\"div\",{ref:ref,className:play?\"mlt play\":\"mlt\",style:props.fitToBox?{position:\"absolute\",width:540,height:450,left:\"50%\",top:\"50%\",transform:`translate(-50%, -50%) scale(${scale})`}:undefined,dangerouslySetInnerHTML:{__html:MARKUP}})]});}addPropertyControls(ApiTerminal,{fitToBox:{type:ControlType.Boolean,title:\"Fit preview\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ApiTerminal\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ApiTerminal.map"],"mappings":"A,+LAgBG,SAAwBa,EAAY,EAAM,CAAC,IAAMC,EAAMd,EAAO,IAAI,EAAO,CAACe,EAAMC,GAAUf,EAAS,GAAG,EAAEQ,MAAc,CAAC,GAAG,CAACQ,EAAM,UAAU,CAACH,EAAM,QAAQ,OAAO,IAAMI,EAAGJ,EAAM,QAAcK,MAAQH,EAAS,KAAK,IAAI,EAAEE,EAAG,YAAY,IAAIA,EAAG,aAAa,GAAG,CAAC,EAAEC,EAAI,EAAE,IAAMC,EAAS,IAAI,eAAeD,CAAG,EAAuB,OAArBC,EAAS,QAAQF,CAAE,MAAYE,EAAS,WAAW,CAAE,EAAE,CAACH,EAAM,QAAQ,CAAC,EAAE,IAAMI,EAAIrB,EAAO,IAAI,EAAO,CAACsB,EAAKC,GAAStB,EAAS,EAAK,EAAiS,OAA/RQ,MAAc,CAAC,IAAMS,EAAGG,EAAI,QAAQ,GAAG,CAACH,GAAI,OAAO,qBAAuB,IAAY,CAACK,EAAQ,EAAI,EAAE,MAAO,CAAC,IAAMC,EAAG,IAAI,qBAAqB,GAAS,CAAIC,EAAQ,KAAK,GAAG,EAAE,cAAc,IAAGF,EAAQ,EAAI,EAAEC,EAAG,WAAW,EAAG,EAAE,CAAC,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