PageSourceSearch

https://www.beam.cloud/_next/static/chunks/pages/playground-7aadd4e9b8f0816e.js

js beam.cloud collected 2026-09-25 14:23:26 UTC 58,399 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[311],{28114:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/playground",function(){return n(50587)}])},50587:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return t4}});var i=n(85893),o=n(28045),r=n(67294),s=n(186),a=n(461),l=n(68779),d=n(65055),c=n(54481),p=n(23328),u=n(14930);let x=[{type:"noul",label:"Noul",description:"Evaluate how true something is"},{type:"score",label:"Score",description:"Set up a rubric to grade with"},{type:"choice",label:"Choice",description:"Ask a multiple choice question"}],f={choice:"Choice",score:"Score",noul:"Noul"},h={choice:{type:"choice",instructions:"Which option best fits the state?",criteria:{option_a:"Description of an option",option_b:"Description of a different option",option_c:"Options should be mutually exclusive"}},score:{type:"score",instructions:"How well does the state meet the bar?",criteria:["Does not meet it","Partially meets it","Meets it","Clearly exceeds it"]},noul:{type:"noul",instructions:"Is this true of the state?"}},m="My running shoes arrived in the wrong size. Can I swap them for a size 10?",g={department:{type:"choice",instructions:"Which team should handle this?",criteria:{returns:"Exchanges, refunds, wrong or damaged items",shipping:"Delivery status, delays, lost packages",billing:"Charges, invoices, payment problems"}}},b=e=>JSON.stringify(e,null,2),w=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!(t>64)&&(null===e||"string"==typeof e||"boolean"==typeof e||("number"==typeof e?Number.isFinite(e):Array.isArray(e)?e.every(e=>y(e,t+1)):!!w(e)&&Object.values(e).every(e=>y(e,t+1))))}function v(e){return null==e||"string"==typeof e||(Array.isArray(e)||w(e))&&y(e)}function j(e){if(!e.trim())return{value:void 0,error:"Empty. Enter JSON."};try{return{value:JSON.parse(e),error:null}}catch(e){return{value:void 0,error:(e instanceof Error?e.message:"Invalid JSON.").replace(/^JSON\.parse: /,"")}}}function T(e){return null==e?"":"string"==typeof e?e:JSON.stringify(function e(t){return Array.isArray(t)?t.map(e):w(t)?Object.fromEntries(Object.keys(t).sort().map(n=>[n,e(t[n])])):t}(e))}function C(e){let{_meta:t,...n}=e;return void 0===t?n:{...n,_meta:t}}function k(e){return"".concat(Math.round(100*S(e)),"%")}function V(e){if(!Number.isFinite(e)||e<=0)return"Free";let t=1e6*e,n=t>=100?t.toFixed(0):I(t.toPrecision(3));return"$".concat(n," / 1M tokens")}function P(e){return!Number.isFinite(e)||e<=0?null:e>=1024&&e%1024==0?"".concat(e/1024,"K tokens"):"".concat(e.toLocaleString("en-US")," tokens")}function I(e){return e.includes(".")?e.replace(/\.?0+$/,""):e}function Z(e){return!Number.isFinite(e)||e<0?"–":e<1e3?"".concat(Math.round(e),"ms"):"".concat((e/1e3).toFixed(e<1e4?2:1),"s")}function S(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):0}let z=e=>"".concat("https://app.beam.cloud","/v1/models/").concat(e,"/invoke"),E=[{id:"curl",label:"curl"},{id:"python",label:"Python"},{id:"javascript",label:"JavaScript"}];function O(e){let t=b(e).replace(/'/g,"'\\''");return"curl ".concat(z(e.model),' \\\n  -H "Authorization: Bearer $BEAM_TOKEN" \\\n  -H "Content-Type: application/json" \\\n  -d \'').concat(t,"'")}function q(e,t){let n=" ".repeat(t);return e.split("\n").join("\n".concat(n))}let L='"Inter var", system-ui',M="#F0708A",A=s.ZP.span.withConfig({componentId:"sc-2a07aa4f-0"})(["font-family:",";font-size:12px;line-height:16px;color:",";font-variant-numeric:tabular-nums;"],d.TV.mono,e=>{let{$muted:t}=e;return t?d.TV.textLow:d.TV.textMid}),N=s.ZP.button.withConfig({componentId:"sc-2a07aa4f-1"})(["all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:7px;border:1px solid transparent;color:",";font-family:",";font-size:13px;line-height:18px;white-space:nowrap;transition:color 0.15s ease,border-color 0.15s ease,background 0.15s ease;&:hover:not(:disabled),&:focus-visible{color:",";background:",";}&:disabled{opacity:0.5;cursor:default;}"],d.TV.textMid,L,d.TV.textHi,d.TV.panelStrong);(0,s.ZP)(N).withConfig({componentId:"sc-2a07aa4f-2"})(["border-color:",";&:hover:not(:disabled),&:focus-visible{border-color:",";}"],d.TV.border,d.TV.borderStrong),(0,s.ZP)(N).withConfig({componentId:"sc-2a07aa4f-3"})(["padding:0;width:28px;height:28px;justify-content:center;flex-shrink:0;"]);let F=s.ZP.div.withConfig({componentId:"sc-2a07aa4f-4"})(["display:inline-flex;align-items:center;gap:2px;padding:2px;border-radius:8px;border:1px solid ",";"],d.TV.border),_=s.ZP.button.withConfig({componentId:"sc-2a07aa4f-5"})(["all:unset;box-sizing:border-box;
1cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:26px;height:22px;border-radius:5px;color:",";background:",";box-shadow:",";transition:color 0.15s ease,background 0.15s ease;&:hover:not(:disabled){color:",";}&:focus-visible{box-shadow:inset 0 0 0 1px ",";}"],e=>{let{$active:t}=e;return t?d.TV.textHi:d.TV.textLow},e=>{let{$active:t}=e;return t?d.TV.panelStrong:"transparent"},e=>{let{$active:t}=e;return t?"inset 0 0 0 1px ".concat(d.TV.borderStrong):"none"},d.TV.textHi,d.TV.accent),J=(0,s.F4)(["to{transform:rotate(360deg);}"]),R=s.ZP.span.withConfig({componentId:"sc-2a07aa4f-6"})(["display:inline-block;width:12px;height:12px;border-radius:50%;border:1.5px solid ",";border-top-color:",";animation:"," 0.8s linear infinite;"],d.TV.border,d.TV.accent,J),$=s.ZP.a.withConfig({componentId:"sc-2a07aa4f-7"})(["color:",";text-decoration:none;transition:color 0.15s ease;&:hover,&:active{color:",";text-decoration:underline;}"],d.TV.accent,d.TV.accent),H=s.ZP.div.withConfig({componentId:"sc-2a07aa4f-8"})(["padding:8px 12px;border-radius:8px;border:1px solid rgba(240,112,138,0.35);background:rgba(240,112,138,0.08);color:",";font-family:",";font-size:13px;line-height:19px;overflow-wrap:anywhere;"],M,L),D=s.ZP.section.withConfig({componentId:"sc-2a07aa4f-9"})(["display:flex;flex-direction:column;min-width:0;min-height:0;background:",";"],d.TV.bg),K=s.ZP.div.withConfig({componentId:"sc-2a07aa4f-10"})(["display:flex;align-items:center;justify-content:space-between;gap:12px;height:48px;padding:0 10px 0 16px;border-bottom:1px solid ",";flex-shrink:0;"],d.TV.border),B=s.ZP.div.withConfig({componentId:"sc-2a07aa4f-11"})(["display:inline-flex;align-items:center;gap:8px;min-width:0;color:",";font-family:",";font-size:13px;font-weight:500;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"],d.TV.textHi,L),U=s.ZP.span.withConfig({componentId:"sc-2a07aa4f-12"})(["color:",";font-weight:400;"],d.TV.textLow),W=s.ZP.div.withConfig({componentId:"sc-2a07aa4f-13"})(["display:inline-flex;align-items:center;gap:6px;flex-shrink:0;"]),Q=s.ZP.div.withConfig({componentId:"sc-2a07aa4f-14"})(["display:flex;align-items:center;justify-content:space-between;gap:12px;height:40px;padding:0 12px 0 16px;flex-shrink:0;"]),G=s.ZP.span.withConfig({componentId:"sc-2a07aa4f-15"})(["color:",";font-family:",";font-size:13px;line-height:18px;"],d.TV.textMid,L),X=(0,s.iv)(["border-top:1px solid ",";"],d.TV.border),Y=e=>{let{text:t,label:n="Copy",className:o}=e,[s,d]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!s)return;let e=setTimeout(()=>d(!1),1800);return()=>clearTimeout(e)},[s]);let c=async()=>{await ee(t),d(!0)};return(0,i.jsxs)(N,{type:"button",onClick:c,className:o,children:[(0,i.jsx)(a.JO,{icon:s?l.LEp:l.kZ_,size:12}),s?"Copied":n]})};async function ee(e){try{await navigator.clipboard.writeText(e)}catch{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}var et=e=>{let{models:t,value:n,onChange:o,loading:s,error:d}=e,[c,p]=(0,r.useState)(!1),u=(0,r.useRef)(null),x=(0,r.useRef)(null),f=(0,r.useRef)(null),h=t.find(e=>e.id===n);(0,r.useEffect)(()=>{if(!c)return;let e=e=>{var t;(null===(t=u.current)||void 0===t?void 0:t.contains(e.target))||p(!1)},t=e=>{var t;"Escape"===e.key&&(p(!1),null===(t=f.current)||void 0===t||t.focus())};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[c]),(0,r.useEffect)(()=>{var e,t,n;if(!c)return;let i=null===(e=x.current)||void 0===e?void 0:e.querySelector('[aria-selected="true"]');null===(t=null!=i?i:null===(n=x.current)||void 0===n?void 0:n.querySelector('[role="option"]'))||void 0===t||t.focus()},[c]);let m=e=>{var t;o(e),p(!1),null===(t=f.current)||void 0===t||t.focus()};return(0,i.jsxs)(en,{ref:u,children:[(0,i.jsxs)(ei,{ref:f,type:"button","aria-haspopup":"listbox","aria-expanded":c,"aria-label":h?"Model: ".concat(h.name):"Model",disabled:s||0===t.length,onClick:()=>p(e=>!e),children:[(0,i.jsx)(eo,{children:"Model"}),s?(0,i.jsxs)(A,{$muted:!0,children:[(0,i.jsx)(R,{})," Loading"]}):d?(0,i.jsx)(es,{children:d}):h?(0,i.jsxs)(er,{children:[h.name,!h.ready&&(0,i.jsx)(ea,{title:"Warming up"})]}):(0,i.jsx)(A,{$muted:!0,children:"No models available"}),(0,i.jsx)(a.JO,{icon:l.ptq,size:10})]}),c&&(0,i.jsx)(el,{ref:x,role:"listbox","aria-label":"Model",onKeyDown:e=>{var t,n,i;if("ArrowDown"!==e.key&&"ArrowUp"!==e.key)return;e.preventDefault();let o=Array.from(null!==(i=null===(t=x.current)||void 0===t?void 0:t.querySelectorAll('[role="option"]'))&&void 0!==i?i:[]),r=o.indexOf(document.activeElement),s="ArrowDown"===e.key?Math.min(o.length-1,r+1):Math.max(0,r-1);null===(n=o[s])||void 0===n||n.focus()},children:t.map(e=>{let t=P(e.contextLength),o=e.id===n;return(0,i.jsxs)(ed,{type:"button",role:"option","aria-selected":o,$active:o,onClick:()=>m(e.id),children:[(0,i.jsxs)(ec,{children:[(0,i.jsx)(ep,{children:e.name}),!e.ready&&(0,i.jsx)(ea,{title:"Warming up"}),(0,i.jsx)(eu,{children:e.id}),o&&(0,i.jsx)(a.JO,{icon:l.LEp,size:11})]}),e.description&&(0,i.jsx)(ex,{children:e.description}),(0,i.jsxs)(ef,{children:[t&&(0,i.jsx)("span",{children:t}),(0,i.jsx)("span",{children:V(e.pricing.prompt)})]})]},e.id)})})]})};let en=s.ZP.div.withConfig({componentId:"sc-c971afe-0"})(["position:relative;display:inline-block;"]),ei=s.ZP.button.withConfig({componentId:"sc-c971afe-1"})(["all:unset;box-sizing:border-box;
1cursor:pointer;display:inline-flex;align-items:center;gap:10px;height:36px;padding:0 12px 0 12px;border-radius:9px;border:1px solid ",";background:",";color:",';transition:border-color 0.15s ease,background 0.15s ease;&:hover:not(:disabled),&[aria-expanded="true"]{border-color:',";background:",";}&:focus-visible{box-shadow:0 0 0 2px ",",0 0 0 4px ",";}&:disabled{cursor:default;}> svg{color:",";}","{display:inline-flex;align-items:center;gap:8px;}"],d.TV.borderStrong,d.TV.bgRaised,d.TV.textHi,(0,c.Fq)(d.TV.textHi,.22),d.TV.panelStrong,d.TV.bg,d.TV.accent,d.TV.textLow,A),eo=s.ZP.span.withConfig({componentId:"sc-c971afe-2"})(["color:",";font-family:",";font-size:13px;line-height:18px;"],d.TV.textLow,L),er=s.ZP.span.withConfig({componentId:"sc-c971afe-3"})(["display:inline-flex;align-items:center;gap:8px;font-family:",";font-size:13px;line-height:18px;color:",";"],d.TV.mono,d.TV.textHi),es=s.ZP.span.withConfig({componentId:"sc-c971afe-4"})(["color:",";font-family:",";font-size:13px;line-height:18px;"],M,L),ea=s.ZP.span.withConfig({componentId:"sc-c971afe-5"})(["width:6px;height:6px;border-radius:50%;background:",";flex-shrink:0;"],"#F5B84A"),el=s.ZP.div.withConfig({componentId:"sc-c971afe-6"})(["position:absolute;z-index:30;top:calc(100% + 6px);left:0;width:min(440px,calc(100vw - 32px));max-height:min(560px,calc(100vh - 120px));overflow-y:auto;padding:6px;border-radius:12px;border:1px solid ",";background:",";box-shadow:0 16px 40px rgba(0,0,0,0.55);"],d.TV.borderStrong,d.TV.bgRaised),ed=s.ZP.button.withConfig({componentId:"sc-c971afe-7"})(["all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;gap:5px;width:100%;padding:10px 12px;border-radius:8px;text-align:left;background:",";transition:background 0.12s ease;&:hover,&:focus-visible{background:",";}&:focus-visible{box-shadow:inset 0 0 0 1px ",";}"],e=>{let{$active:t}=e;return t?d.TV.panelStrong:"transparent"},d.TV.panelStrong,d.TV.accent),ec=s.ZP.span.withConfig({componentId:"sc-c971afe-8"})(["display:flex;align-items:center;gap:8px;width:100%;color:",";> svg{margin-left:auto;color:",";}"],d.TV.textHi,d.TV.accent),ep=s.ZP.span.withConfig({componentId:"sc-c971afe-9"})(["font-family:",";font-size:13px;line-height:18px;color:",";"],d.TV.mono,d.TV.textHi),eu=s.ZP.span.withConfig({componentId:"sc-c971afe-10"})(["font-family:",";font-size:11px;line-height:16px;color:",";"],d.TV.mono,d.TV.textLow),ex=s.ZP.span.withConfig({componentId:"sc-c971afe-11"})(["color:",";font-family:",";font-size:12.5px;line-height:18px;"],d.TV.textMid,L),ef=s.ZP.span.withConfig({componentId:"sc-c971afe-12"})(["display:flex;flex-wrap:wrap;gap:4px 14px;font-family:",";font-size:11px;line-height:16px;color:",";font-variant-numeric:tabular-nums;"],d.TV.mono,d.TV.textLow),eh=e=>{let{line:t,mode:n}=e;return"text"===n?(0,i.jsx)(i.Fragment,{children:t}):(0,i.jsx)(i.Fragment,{children:(function(e){let t=[],n=(e,n)=>{let i=t[t.length-1];i&&i.kind===e&&("plain"===e||"punct"===e)?i.text+=n:t.push({kind:e,text:n})},i=0;for(;i<e.length;){let o=e[i];if('"'===o){let n=i+1;for(;n<e.length&&'"'!==e[n];)"\\"===e[n]&&(n+=1),n+=1;let o=Math.min(e.length,n+1),r=/^\s*:/.test(e.slice(o));t.push({kind:r?"key":"string",text:e.slice(i,o)}),i=o;continue}if("{}[],:".includes(o)){n("punct",o),i+=1;continue}if("-"===o||o>="0"&&o<="9"){let n=/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/.exec(e.slice(i));if(n){t.push({kind:"number",text:n[0]}),i+=n[0].length;continue}}if("t"===o||"f"===o||"n"===o){let n=/^(?:true|false|null)\b/.exec(e.slice(i));if(n){t.push({kind:"literal",text:n[0]}),i+=n[0].length;continue}}n("plain",o),i+=1}return t})(t).map((e,t)=>(0,i.jsx)(eP,{$kind:e.kind,children:e.text},t))})};function em(e,t,n){let{selectionStart:i,selectionEnd:o}=e;if(e.setRangeText(t,i,o,"end"),void 0!==n){let t=i+n;e.setSelectionRange(t,t)}}var eg=e=>{let{value:t,onChange:n,mode:o,ariaLabel:s,placeholder:a,minLines:l=3,className:d}=e,c=(0,r.useMemo)(()=>t.split("\n"),[t]),p=Math.max(c.length,l),u=""===t&&!!a;return(0,i.jsxs)(ey,{className:d,children:[(0,i.jsx)(ev,{"aria-hidden":"true",children:Array.from({length:p},(e,t)=>{var n;return(0,i.jsxs)(ej,{children:[(0,i.jsx)(eT,{children:t<c.length?t+1:""}),(0,i.jsx)(eC,{children:0===t&&u?(0,i.jsx)(ek,{children:a}):(0,i.jsx)(eh,{line:null!==(n=c[t])&&void 0!==n?n:"",mode:o})})]},t)})}),(0,i.jsx)(eI,{value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{if(e.metaKey||e.ctrlKey||e.altKey)return;let t=e.currentTarget;if("Tab"===e.key&&!e.shiftKey){e.preventDefault(),em(t,"  "),n(t.value);return}if("Enter"===e.key&&"json"===o&&!e.shiftKey){var i,r;let{selectionStart:o}=t,s=t.value.lastIndexOf("\n",o-1)+1,a=null!==(r=null===(i=/^[ \t]*/.exec(t.value.slice(s,o)))||void 0===i?void 0:i[0])&&void 0!==r?r:"",l=t.value.slice(0,o).trimEnd(),d=t.value.slice(t.selectionEnd).trimStart(),c=l.endsWith("{")||l.endsWith("["),p=d.startsWith("}")||d.startsWith("]");e.preventDefault(),c&&p?em(t,"\n".concat(a,"  \n").concat(a),a.length+3):em(t,"\n".concat(a).concat(c?"  ":"")),n(t.value)}},"aria-label":s,spellCheck:!1,autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",wrap:"soft"})]})};let eb=e=>{let{value:t,className:n}=e,o=(0,r.useMemo)(()=>t.split("\n"),[t]);return(0,i.jsx)(ey,{className:n,children:(0,i.jsx)(ev,{$static:!0,children:o.map((e,t)=>(0,i.jsxs)(ej,{children:[(0,i.jsx)(eT,{children:t+1}),(0,i.jsx)(eC,{children:(0,i.jsx)(eh,{line:e,mode:"json"})})]},t))})})},ew=(0,s.iv)(["font-family:",";font-size:13px;line-height:","px;letter-spacing:0;tab-size:2;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;"],d.TV.mono,20),ey=s.ZP.div.withConfig({componentId:"sc-53a9fb54-0"})(["position:relative;width:100%;min-width:0;"]),ev=s.ZP.div.withConfig({componentId:"sc-53a9fb54-1"})(["",";position:relative;padding:","px ","px ","px 0;color:",";pointer-events:",";user-select:",";"],ew,12,14,12,d.TV.textHi,e=>{let{$static:t}=e;return t?"auto":"none"},e=>{let{$static:t}=e;return t?"text":"none"}),ej=s.ZP.div.withConfig({componentId:"sc-53a9fb54-2"})(["display:flex;align-items:flex-start;"]),eT=s.ZP.span.withConfig({componentId:"sc-53a9fb54-3"})(["flex:0 0 ","px;width:","px;padding-right:12px;box-sizing:border-box;text-align:right;color:",";opacity:0.8;user-select:none;"],44,44,d.TV.textLow),eC=s.ZP.span.withConfig({componentId:"sc-53a9fb54-4"})(["display:block;flex:1 1 auto;min-width:0;min-height:","px;
1"],20),ek=s.ZP.span.withConfig({componentId:"sc-53a9fb54-5"})(["color:",";"],d.TV.textLow),eV={key:"#9EB3FF",string:"#F2A0B4",number:"#7ED9C4",literal:"#D5A6FF",punct:d.TV.textMid,plain:d.TV.textHi},eP=s.ZP.span.withConfig({componentId:"sc-53a9fb54-6"})(["color:",";"],e=>{let{$kind:t}=e;return eV[t]}),eI=s.ZP.textarea.withConfig({componentId:"sc-53a9fb54-7"})(["",";position:absolute;inset:0;box-sizing:border-box;width:100%;height:100%;margin:0;padding:","px ","px ","px ","px;border:0;outline:0;resize:none;overflow:hidden;background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:",";&::selection{background:",";}"],ew,12,14,12,44,d.TV.textHi,(0,c.Fq)(d.TV.accent,.28));var eZ=e=>{let{stateText:t,onStateChange:n,stateMode:o,onStateModeChange:r,stateError:s,questionsText:d,onQuestionsChange:c,questionErrors:p,onAddQuestion:u,modelName:x,running:f,canRun:h,onRun:m,onClear:g,onShare:b,shared:w}=e,y=p.length;return(0,i.jsxs)(D,{"aria-label":"Request",children:[(0,i.jsxs)(K,{children:[(0,i.jsxs)(B,{children:[(0,i.jsx)(a.JO,{icon:l.jZZ,size:12}),"Playground"]}),(0,i.jsxs)(W,{children:[(0,i.jsx)(N,{type:"button",onClick:g,children:"Clear"}),(0,i.jsxs)(N,{type:"button",onClick:b,"aria-live":"polite",children:[(0,i.jsx)(a.JO,{icon:w?l.LEp:l.nNP,size:11}),w?"Link copied":"Share"]})]})]}),(0,i.jsxs)(eE,{$grow:2,$minHeight:168,children:[(0,i.jsxs)(Q,{children:[(0,i.jsx)(G,{children:"State"}),(0,i.jsxs)(F,{role:"group","aria-label":"State format",children:[(0,i.jsx)(_,{type:"button",$active:"text"===o,"aria-pressed":"text"===o,title:"Plain text",onClick:()=>r("text"),children:(0,i.jsx)(a.JO,{icon:l.elf,size:12})}),(0,i.jsx)(_,{type:"button",$active:"json"===o,"aria-pressed":"json"===o,title:"JSON object or array",onClick:()=>r("json"),children:(0,i.jsx)(a.JO,{icon:l.dT$,size:12})})]})]}),(0,i.jsxs)(eO,{children:[(0,i.jsx)(eg,{mode:o,value:t,onChange:n,ariaLabel:"State",minLines:4,placeholder:"json"===o?'{ "order_id": "A1042", "message": "Arrived in the wrong size" }':"Describe what the model should look at: a message, a document, a record."}),s&&(0,i.jsx)(eq,{children:(0,i.jsx)(H,{children:s})})]})]}),(0,i.jsxs)(eE,{$grow:3,$minHeight:260,children:[(0,i.jsxs)(Q,{children:[(0,i.jsx)(G,{children:"Questions"}),(0,i.jsxs)(eL,{$count:y,title:y?"Problems with the questions":"No problems",children:[(0,i.jsx)(a.JO,{icon:l.DBf,size:11}),y]})]}),(0,i.jsxs)(eO,{children:[(0,i.jsx)(eg,{mode:"json",value:d,onChange:c,ariaLabel:"Questions",minLines:8,placeholder:"{ }"}),y>0&&(0,i.jsx)(eq,{children:(0,i.jsx)(eM,{role:"alert",children:p.map(e=>(0,i.jsx)("li",{children:e},e))})}),(0,i.jsx)(eA,{children:(0,i.jsx)(ez,{onAdd:u})})]})]}),(0,i.jsxs)(eD,{children:[(0,i.jsxs)(eK,{children:[(0,i.jsxs)("span",{children:["Runs on ",(0,i.jsx)(A,{children:x})]}),(0,i.jsx)(eS,{})]}),(0,i.jsx)(eU,{type:"button",onClick:m,disabled:!h,title:"Cmd/Ctrl + Enter",children:f?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(R,{}),"Running"]}):"Run"})]})]})};let eS=()=>{let[e,t]=(0,r.useState)("Ctrl");return(0,r.useEffect)(()=>{/Mac|iPhone|iPad/.test(navigator.platform)&&t("⌘")},[]),(0,i.jsxs)(eB,{"aria-label":"".concat("⌘"===e?"Command":"Control"," Enter runs the request"),children:[e," ↵"]})},ez=e=>{let{onAdd:t}=e,[n,o]=(0,r.useState)(!1),[s,d]=(0,r.useState)({left:0}),c=(0,r.useRef)(null),p=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!n)return;let e=e=>{var t;(null===(t=c.current)||void 0===t?void 0:t.contains(e.target))||o(!1)},t=e=>{"Escape"===e.key&&o(!1)},i=()=>o(!1);return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0)}},[n]),(0,i.jsxs)(eN,{ref:c,children:[(0,i.jsxs)(eF,{ref:p,type:"button","aria-haspopup":"menu","aria-expanded":n,onClick:()=>{if(!n&&p.current){let e=p.current.getBoundingClientRect();d(window.innerHeight-e.bottom<250?{left:e.left,bottom:window.innerHeight-e.top+6}:{left:e.left,top:e.bottom+6})}o(e=>!e)},children:["Add Question",(0,i.jsx)(a.JO,{icon:l.ptq,size:10})]}),n&&(0,i.jsxs)(e_,{role:"menu",style:s,children:[(0,i.jsxs)(eJ,{children:[(0,i.jsx)("span",{children:"Primitives"}),(0,i.jsxs)($,{href:"https://platform.beam.cloud/endpoints",target:"_blank",rel:"noreferrer",children:["Docs ",(0,i.jsx)(a.JO,{icon:l.nUK,size:10})]})]}),x.map(e=>(0,i.jsxs)(eR,{type:"button",role:"menuitem",onClick:()=>{t(e.type),o(!1)},children:[(0,i.jsx)(e$,{children:e.label}),(0,i.jsx)(eH,{children:e.description})]},e.type))]})]})},eE=s.ZP.div.withConfig({componentId:"sc-44fbedfd-0"})(["",";display:flex;flex-direction:column;flex:"," 1 0;min-height:","px;"],X,e=>{let{$grow:t}=e;return t},e=>{let{$minHeight:t}=e;return t}),eO=s.ZP.div.withConfig({componentId:"sc-44fbedfd-1"})(["flex:1 1 auto;min-height:0;overflow:auto;"]),eq=s.ZP.div.withConfig({componentId:"sc-44fbedfd-2"})(["padding:0 14px 12px 14px;"]),eL=s.ZP.span.withConfig({componentId:"sc-44fbedfd-3"})(["display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:999px;font-family:",";font-size:11px;line-height:16px;font-variant-numeric:tabular-nums;",""],d.TV.mono,e=>{let{$count:t}=e;return t>0?(0,s.iv)(["color:",";border:1px solid rgba(240,112,138,0.35);background:rgba(240,112,138,0.1);"],M):(0,s.iv)(["color:",";border:1px solid ",";"],d.TV.textLow,d.TV.border)}),eM=s.ZP.ul.withConfig({componentId:"sc-44fbedfd-4"})(["margin:0;padding:8px 12px 8px 28px;border-radius:8px;border:1px solid rgba(240,112,138,0.35);background:rgba(240,112,138,0.08);color:",";font-family:",";font-size:13px;line-height:19px;li{overflow-wrap:anywhere;}"],M,L),eA=s.ZP.div.withConfig({componentId:"sc-44fbedfd-5"})(["padding:0 14px 14px 44px;"]),eN=s.ZP.div.withConfig({componentId:"sc-44fbedfd-6"})(["position:relative;display:inline-block;"]),eF=(0,s.ZP)(N).withConfig({componentId:"sc-44fbedfd-7"})(["padding:5px 10px 5px 12px;border-radius:999px;border-color:",";background:",";color:",";&:hover:not(:disabled),&:focus-visible{border-color:",";}"],d.TV.border,d.TV.panelStrong,d.TV.textHi,d.TV.borderStrong),e_=s.ZP.div.withConfig({componentId:"sc-44fbedfd-8"})(["position:fixed;z-index:20;width:300px;padding:6px;border-radius:12px;border:1px solid ",";background:",";box-shadow:0 16px 40px rgba(0,0,0,0.55);"],d.TV.borderStrong,d.TV.bgRaised),eJ=s.ZP.div.withConfig({componentId:"sc-44fbedfd-9"})(["display:flex;align-items:center;justify-content:space-between;padding:8px 10px 6px;font-family:",";font-size:11px;letter-spacing:0.12em;text-transform:uppercase;color:",";","{display:inline-flex;align-items:center;gap:3px;letter-spacing:0;text-transform:none;font-family:",";font-size:12px;}"],d.TV.mono,d.TV.textLow,$,L),eR=s.ZP.button.withConfig({componentId:"sc-44fbedfd-10"})(["all:unset;box-sizing:border-box;
1cursor:pointer;display:flex;flex-direction:column;gap:2px;width:100%;padding:8px 10px;border-radius:8px;text-align:left;transition:background 0.12s ease;&:hover,&:focus-visible{background:",";}"],d.TV.panelStrong),e$=s.ZP.span.withConfig({componentId:"sc-44fbedfd-11"})(["color:",";font-family:",";font-size:14px;line-height:20px;"],d.TV.textHi,L),eH=s.ZP.span.withConfig({componentId:"sc-44fbedfd-12"})(["color:",";font-family:",";font-size:12px;line-height:16px;"],d.TV.textMid,L),eD=s.ZP.div.withConfig({componentId:"sc-44fbedfd-13"})(["",";display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 8px 8px 12px;flex-shrink:0;background:",";"],X,d.TV.bgRaised),eK=s.ZP.div.withConfig({componentId:"sc-44fbedfd-14"})(["display:flex;align-items:center;gap:10px;min-width:0;padding-left:4px;color:",";font-family:",";font-size:12px;line-height:16px;white-space:nowrap;overflow:hidden;","{color:",";}"],d.TV.textLow,L,A,d.TV.textMid),eB=s.ZP.kbd.withConfig({componentId:"sc-44fbedfd-15"})(["display:inline-flex;align-items:center;height:20px;padding:0 6px;border-radius:5px;border:1px solid ",";background:",";color:",";font-family:",";font-size:11px;line-height:16px;"],d.TV.border,d.TV.panel,d.TV.textLow,d.TV.mono),eU=s.ZP.button.withConfig({componentId:"sc-44fbedfd-16"})(["all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:96px;height:36px;padding:0 20px;border-radius:8px;background:",";color:#fff;font-family:",";font-size:14px;font-weight:500;line-height:20px;flex-shrink:0;transition:filter 0.15s ease,opacity 0.15s ease;&:hover:not(:disabled){filter:brightness(1.08);}&:focus-visible{box-shadow:0 0 0 2px ",",0 0 0 4px ",";}&:disabled{opacity:0.45;cursor:default;}","{border-color:rgba(255,255,255,0.3);border-top-color:#fff;}"],d.TV.accentSolid,L,d.TV.bg,d.TV.accent,R);var eW=e=>{var t;let{result:n,modelName:o,model:s,view:d,onViewChange:c,preview:p,modelsLoading:u}=e,x=function(e){var t;let[,n]=(0,r.useState)(0);if((0,r.useEffect)(()=>{if(!e.ranAt)return;let t=setInterval(()=>n(e=>e+1),3e4);return()=>clearInterval(t)},[e.ranAt]),"idle"===e.status)return"Not run yet";if("running"===e.status)return"Running";let i=e.ranAt?Date.now()-e.ranAt:0,o=i<6e4?"just now":i<36e5?"".concat(Math.round(i/6e4)," min ago"):"at ".concat(new Date(null!==(t=e.ranAt)&&void 0!==t?t:0).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}));return"error"===e.status?"Failed ".concat(o):"Ran ".concat(o)}(n),f="done"===n.status;return(0,i.jsxs)(D,{"aria-label":"Response",children:[(0,i.jsxs)(K,{children:[(0,i.jsxs)(B,{children:["Response",(0,i.jsxs)(U,{children:["\xb7 ",x]})]}),(0,i.jsx)(W,{children:f&&(0,i.jsxs)(F,{role:"group","aria-label":"Response view",children:[(0,i.jsx)(_,{type:"button",$active:"formatted"===d,"aria-pressed":"formatted"===d,title:"Formatted",onClick:()=>c("formatted"),children:(0,i.jsx)(a.JO,{icon:l.elf,size:12})}),(0,i.jsx)(_,{type:"button",$active:"raw"===d,"aria-pressed":"raw"===d,title:"Raw JSON",onClick:()=>c("raw"),children:(0,i.jsx)(a.JO,{icon:l.dT$,size:12})})]})})]}),(0,i.jsxs)(eY,{children:["idle"===n.status&&(0,i.jsx)(eQ,{request:p,modelsLoading:u}),"running"===n.status&&n.request&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(e2,{children:[(0,i.jsx)(R,{}),(0,i.jsxs)(A,{$muted:!0,children:["Waiting for ",o]})]}),(0,i.jsxs)(e4,{children:[(0,i.jsx)(e6,{children:(0,i.jsxs)(A,{$muted:!0,children:["POST ",z(n.request.model)]})}),(0,i.jsx)(eb,{value:b(n.request)})]})]}),"error"===n.status&&n.error&&n.request&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e0,{children:(0,i.jsxs)(H,{role:"alert",children:[(0,i.jsx)(e5,{children:422===(t=n.error.status)?"422 \xb7 Rejected by the model":429===t?"429 \xb7 At capacity":503===t?"503 \xb7 Unavailable":t>=500?"".concat(t," \xb7 Endpoint error"):t>0?"".concat(t," \xb7 Request failed"):"Request failed"}),n.error.message]})}),(0,i.jsxs)(e4,{children:[(0,i.jsxs)(e6,{children:[(0,i.jsx)(A,{$muted:!0,children:"Request"}),(0,i.jsx)(Y,{text:O(n.request),label:"Copy as curl"})]}),(0,i.jsx)(eb,{value:b(n.request)})]})]}),"done"===n.status&&n.response&&n.request&&"formatted"===d&&(0,i.jsx)(eG,{result:n,response:n.response,request:n.request,modelName:o,model:s}),"done"===n.status&&n.response&&n.request&&"raw"===d&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(e4,{children:[(0,i.jsxs)(e6,{children:[(0,i.jsx)(A,{$muted:!0,children:"Request"}),(0,i.jsx)(Y,{text:O(n.request),label:"Copy as curl"})]}),(0,i.jsx)(eb,{value:b(n.request)})]}),(0,i.jsxs)(e4,{children:[(0,i.jsxs)(e6,{children:[(0,i.jsx)(A,{$muted:!0,children:"Response"}),(0,i.jsx)(Y,{text:b(C(n.response))})]}),(0,i.jsx)(eb,{value:b(C(n.response))})]})]})]})]})};let eQ=e=>{let{request:t,modelsLoading:n}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e0,{children:(0,i.jsx)(e1,{children:t?"Run sends this request to the endpoint. The response shows up here.":n?"Loading the model catalog. The request Run will send shows up here.":"Fix the problems on the left and Run will send the request shown here."})}),t&&(0,i.jsxs)(e4,{children:[(0,i.jsxs)(e6,{children:[(0,i.jsxs)(A,{$muted:!0,children:["POST ",z(t.model)]}),(0,i.jsx)(Y,{text:O(t),label:"Copy as curl"})]}),(0,i.jsx)(eb,{value:b(t)})]})]})},eG=e=>{var t,n,o;let{result:r,response:s,request:d,modelName:c,model:p}=e,u=1e3*Number(null===(t=s._meta)||void 0===t?void 0:t.server_seconds),x=null!==(o=r.latencyMs)&&void 0!==o?o:0,f=Number.isFinite(u)&&u>0&&x>u,h=function(e,t){let n=e.usage;if(!n)return null;if(t&&null!==n.input_tokens&&void 0!==n.input_tokens){var i;let{prompt:e,completion:o,request:r}=t.pricing;return n.input_tokens*e+(null!==(i=n.output_tokens)&&void 0!==i?i:0)*o+r}let o=Number(n.cost);return void 0!==n.cost&&Number.isFinite(o)?o:null}(s,p),m=null===(n=s.usage)||void 0===n?void 0:n.input_tokens,g=p&&null!=m?"".concat(m.toLocaleStr
1ing("en-US")," input tokens at ").concat(V(p.pricing.prompt),", the catalog rate"):"As reported by the gateway";return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(e9,{children:[(0,i.jsx)(e8,{children:"Key & instructions"}),(0,i.jsxs)(e8,{$center:!0,children:[(0,i.jsx)(A,{children:c}),f?(0,i.jsxs)(e7,{children:[(0,i.jsx)(te,{title:"Time inside the model container, reported by the endpoint",children:Z(u)})," + ",(0,i.jsx)(te,{title:"Gateway and network round trip",children:Z(x-u)})]}):x>0&&(0,i.jsx)(e7,{children:Z(x)})]}),(0,i.jsxs)(e8,{$right:!0,children:["Primitive type",(0,i.jsx)(a.JO,{icon:l.DBf,size:11,title:"choice, score or noul"})]})]}),Object.entries(s.answers).map(e=>{let[t,n]=e;return(0,i.jsx)(eX,{id:t,answer:n,question:d.questions[t]},t)}),(0,i.jsxs)(tm,{children:[null!=m&&(0,i.jsxs)("span",{children:[m.toLocaleString("en-US")," input tokens"]}),null!==h&&(0,i.jsx)("span",{title:g,children:!Number.isFinite(h)||h<=0?"$0":h>=.01?"$".concat(h.toFixed(2)):"$".concat(I(h.toFixed(Math.min(10,1-Math.floor(Math.log10(h))))))}),r.retries?(0,i.jsxs)("span",{children:[r.retries," busy ",1===r.retries?"reply":"replies"," retried"]}):null,s.id&&(0,i.jsx)("span",{title:"Response id",children:s.id})]})]})},eX=e=>{var t;let{id:n,answer:o,question:s}=e,[d,c]=(0,r.useState)(!0),p=function(e,t){if("noul"===e.type){let t=S(e.noul);return[{key:"true",label:"true",probability:t,top:t>=.5},{key:"false",label:"false",probability:1-t,top:t<.5}]}if("score"===e.type){let t=String(Math.round(e.score));return Object.keys(e.legend).sort((e,t)=>Number(e)-Number(t)).map(n=>{var i;return{key:n,label:T(e.legend[n])||n,probability:S(null!==(i=e.probabilities[n])&&void 0!==i?i:0),top:n===t}})}let n=(null==t?void 0:t.type)==="choice"?Object.keys(t.criteria).filter(t=>t in e.probabilities):[],i=Object.keys(e.probabilities).filter(e=>!n.includes(e));return[...n,...i].map(t=>({key:t,label:t,probability:S(e.probabilities[t]),top:t===e.choice}))}(o,s),u=T(null==s?void 0:s.instructions),x=function(e){if(!e)return null;if("choice"===e.type){let t=Object.keys(e.criteria).length;return"".concat(t," ").concat(1===t?"option":"options")}return"score"===e.type?"".concat(e.criteria.length," levels"):null}(s),h="noul"===o.type?null:o.confidence;return(0,i.jsxs)(tt,{children:[(0,i.jsxs)(tn,{children:[(0,i.jsx)(ti,{type:"button","aria-expanded":d,"aria-label":d?"Collapse":"Expand",onClick:()=>c(e=>!e),$open:d,children:(0,i.jsx)(a.JO,{icon:l.ptq,size:10})}),(0,i.jsxs)(to,{children:[(0,i.jsx)(tr,{children:n}),u&&(0,i.jsx)(ts,{title:u,children:u})]})]}),(0,i.jsxs)(ta,{children:[d&&p.map(e=>(0,i.jsxs)(tl,{$top:e.top,children:[(0,i.jsx)(td,{title:e.label,children:e.label}),(0,i.jsx)(tc,{children:k(e.probability)}),(0,i.jsx)(tp,{$on:e.top,"aria-hidden":"true"})]},e.key)),!d&&(0,i.jsx)(tu,{children:function(e,t){var n,i;let o=t.find(e=>e.top);return"noul"===e.type?"".concat(k(e.noul)," true"):"score"===e.type?"".concat(e.score.toFixed(2)," \xb7 ").concat(null!==(n=null==o?void 0:o.label)&&void 0!==n?n:""):"".concat(e.choice," \xb7 ").concat(k(null!==(i=e.probabilities[e.choice])&&void 0!==i?i:0))}(o,p)}),(0,i.jsxs)(tx,{children:["score"===o.type&&(0,i.jsxs)("span",{children:["Score: ",o.score.toFixed(2)]}),null!==h&&(0,i.jsxs)("span",{children:["Confidence: ",k(h)]})]})]}),(0,i.jsxs)(tf,{children:[(0,i.jsx)(th,{children:null!==(t=f[o.type])&&void 0!==t?t:o.type}),x&&(0,i.jsx)(A,{$muted:!0,children:x})]})]})},eY=s.ZP.div.withConfig({componentId:"sc-df2933e0-0"})(["flex:1 1 auto;min-height:0;overflow:auto;"]),e0=s.ZP.div.withConfig({componentId:"sc-df2933e0-1"})(["padding:14px 16px 0;"]),e1=s.ZP.p.withConfig({componentId:"sc-df2933e0-2"})(["margin:0;color:",";font-family:",";font-size:13px;line-height:19px;"],d.TV.textLow,L),e2=s.ZP.div.withConfig({componentId:"sc-df2933e0-3"})(["display:flex;align-items:center;gap:10px;padding:14px 16px 0;"]),e4=s.ZP.div.withConfig({componentId:"sc-df2933e0-4"})(["padding:12px 0 4px;"]),e6=s.ZP.div.withConfig({componentId:"sc-df2933e0-5"})(["display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:28px;padding:0 8px 0 16px;","{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"],A),e5=s.ZP.span.withConfig({componentId:"sc-df2933e0-6"})(["display:block;font-family:",";font-size:11px;letter-spacing:0.06em;text-transform:uppercase;margin-bottom:4px;opacity:0.85;"],d.TV.mono),e3=(0,s.iv)(["display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1.25fr) minmax(96px,auto);gap:16px;align-items:start;"]),e8=s.ZP.div.withConfig({componentId:"sc-df2933e0-7"})(["display:flex;align-items:center;justify-content:",";gap:8px;min-width:0;color:",";font-family:",";font-size:12px;line-height:16px;white-space:nowrap;&:first-child{padding-left:28px;}"],e=>{let{$center:t,$right:n}=e;return t?"center":n?"flex-end":"flex-start"},d.TV.textLow,L),e9=s.ZP.div.withConfig({componentId:"sc-df2933e0-8"})(["",""],e=>{let{theme:t}=e;return(0,s.iv)(["",";align-items:center;height:40px;padding:0 16px 0 12px;border-bottom:1px solid ",";@media (max-width:","px){grid-template-columns:minmax(0,1fr);",":first-child,",":last-child{display:none;}","{justify-content:flex-start;}}"],e3,d.TV.border,t.breakpoints.sm,e8,e8,e8)}),e7=s.ZP.span.withConfig({componentId:"sc-df2933e0-9"})(["font-family:",";font-size:12px;color:",";font-variant-numeric:tabular-nums;"],d.TV.mono,d.TV.textMid),te=s.ZP.span.withConfig({componentId:"sc-df2933e0-10"})(["text-decoration:underline dotted;text-underline-offset:3px;
1cursor:help;"]),tt=s.ZP.div.withConfig({componentId:"sc-df2933e0-11"})(["",""],e=>{let{theme:t}=e;return(0,s.iv)(["",";padding:14px 16px 14px 12px;",";&:nth-of-type(2){border-top:none;}@media (max-width:","px){grid-template-columns:minmax(0,1fr) auto;row-gap:10px;}"],e3,X,t.breakpoints.sm)}),tn=s.ZP.div.withConfig({componentId:"sc-df2933e0-12"})(["display:flex;align-items:flex-start;gap:6px;min-width:0;@media (max-width:","px){grid-column:1 / -1;}"],e=>{let{theme:t}=e;return t.breakpoints.sm}),ti=s.ZP.button.withConfig({componentId:"sc-df2933e0-13"})(["all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:22px;height:20px;flex-shrink:0;color:",";transition:transform 0.15s ease,color 0.15s ease;transform:rotate(","deg);&:hover{color:",";}"],d.TV.textLow,e=>{let{$open:t}=e;return t?0:-90},d.TV.textHi),to=s.ZP.div.withConfig({componentId:"sc-df2933e0-14"})(["display:flex;flex-direction:column;gap:3px;min-width:0;"]),tr=s.ZP.span.withConfig({componentId:"sc-df2933e0-15"})(["font-family:",";font-size:13px;line-height:20px;color:",";overflow-wrap:anywhere;"],d.TV.mono,d.TV.textHi),ts=s.ZP.span.withConfig({componentId:"sc-df2933e0-16"})(["font-family:",";font-style:italic;font-size:12px;line-height:17px;color:",";display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;"],L,d.TV.textLow),ta=s.ZP.div.withConfig({componentId:"sc-df2933e0-17"})(["display:flex;flex-direction:column;gap:4px;min-width:0;@media (max-width:","px){grid-column:1;padding-left:28px;}"],e=>{let{theme:t}=e;return t.breakpoints.sm}),tl=s.ZP.div.withConfig({componentId:"sc-df2933e0-18"})(["display:grid;grid-template-columns:minmax(0,1fr) 44px 10px;align-items:center;gap:10px;color:",";font-family:",";font-size:12px;line-height:20px;"],e=>{let{$top:t}=e;return t?d.TV.textHi:d.TV.textLow},d.TV.mono),td=s.ZP.span.withConfig({componentId:"sc-df2933e0-19"})(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]),tc=s.ZP.span.withConfig({componentId:"sc-df2933e0-20"})(["text-align:right;font-variant-numeric:tabular-nums;"]),tp=s.ZP.span.withConfig({componentId:"sc-df2933e0-21"})(["width:8px;height:8px;border-radius:50%;border:1.5px solid ",";background:",";opacity:",";"],e=>{let{$on:t}=e;return t?d.TV.accent:d.TV.textLow},e=>{let{$on:t}=e;return t?d.TV.accent:"transparent"},e=>{let{$on:t}=e;return t?1:.6}),tu=s.ZP.span.withConfig({componentId:"sc-df2933e0-22"})(["font-family:",";font-size:12px;line-height:20px;color:",";"],d.TV.mono,d.TV.textHi),tx=s.ZP.div.withConfig({componentId:"sc-df2933e0-23"})(["display:flex;flex-wrap:wrap;gap:4px 14px;padding-top:6px;color:",";font-family:",";font-size:12px;line-height:16px;&:empty{display:none;}"],d.TV.textLow,L),tf=s.ZP.div.withConfig({componentId:"sc-df2933e0-24"})(["display:flex;flex-direction:column;align-items:flex-end;gap:6px;@media (max-width:","px){grid-column:2;flex-direction:row;align-items:center;gap:8px;}"],e=>{let{theme:t}=e;return t.breakpoints.sm}),th=s.ZP.span.withConfig({componentId:"sc-df2933e0-25"})(["padding:2px 8px;border-radius:6px;border:1px solid ",";background:",";color:",";font-family:",";font-size:12px;line-height:16px;"],d.TV.border,d.TV.panelStrong,d.TV.textMid,L),tm=s.ZP.div.withConfig({componentId:"sc-df2933e0-26"})(["display:flex;flex-wrap:wrap;gap:4px 16px;padding:12px 16px 16px;color:",";font-family:",";font-size:11px;line-height:16px;span{overflow-wrap:anywhere;}"],d.TV.textLow,d.TV.mono),tg=(e,t)=>new Promise((n,i)=>{let o=setTimeout(n,e);t.addEventListener("abort",()=>{clearTimeout(o),i(new DOMException("Aborted","AbortError"))},{once:!0})}),tb=e=>e instanceof DOMException&&"AbortError"===e.name;async function tw(e){try{var t,n;let i=await e.json();if(null==i?void 0:null===(t=i.error)||void 0===t?void 0:t.message)return{code:null!==(n=i.error.code)&&void 0!==n?n:"",message:i.error.message,status:e.status}}catch{}return{code:"",message:"Request failed (".concat(e.status,")."),status:e.status}}async function ty(e,t){let n=performance.now();for(let i=0;i<5;i+=1){let o,r;try{o=await fetch("/api/playground/invoke",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:t})}catch(e){if(tb(e))throw e;return{status:"error",error:{code:"network",message:"Network error. Check your connection and try again.",status:0}}}if(429===o.status&&i<4){let e=Number(o.headers.get("retry-after")),n=Math.min(2500,400*2**i),r=Number.isFinite(e)&&e>0?Math.min(2500,1e3*e):n;await tg(r+150*Math.random(),t);continue}if(!o.ok)return{status:"error",error:await tw(o),retries:i};let s=performance.now()-n;try{r=await o.json()}catch{return{status:"error",error:{code:"bad_response",message:"The model returned an unreadable response.",status:502}}}
1if(!r||"object"!=typeof r||!r.answers)return{status:"error",error:{code:"bad_response",message:"The model returned no answers.",status:502}};return{status:"done",response:r,latencyMs:s,retries:i}}return{status:"error",error:{code:"busy",message:"The model stayed busy. Try again in a few seconds.",status:429}}}let tv="https://platform.beam.cloud/endpoints/jev/jevlike",tj="jev/semif";var tT=()=>{var e;let[t,n]=(0,r.useState)([]),[o,s]=(0,r.useState)(!0),[d,c]=(0,r.useState)(null),[p,x]=(0,r.useState)(""),[f,T]=(0,r.useState)("text"),[C,k]=(0,r.useState)(m),[I,Z]=(0,r.useState)(()=>b(g)),[S,L]=(0,r.useState)(null),[M,A]=(0,r.useState)("formatted"),[N,F]=(0,r.useState)(!1),[_,J]=(0,r.useState)("curl"),{result:R,run:H,reset:D}=function(){let[e,t]=(0,r.useState)({status:"idle"}),n=(0,r.useRef)(null),i=(0,r.useCallback)(async e=>{var i;null===(i=n.current)||void 0===i||i.abort();let o=new AbortController;n.current=o,t({status:"running",request:e});try{let n=await ty(e,o.signal);if(o.signal.aborted)return;t({...n,request:e,ranAt:Date.now()})}catch(n){if(tb(n))return;t({status:"error",request:e,ranAt:Date.now(),error:{code:"unknown",message:"Something went wrong.",status:0}})}finally{n.current===o&&(n.current=null)}},[]),o=(0,r.useCallback)(()=>{var e;null===(e=n.current)||void 0===e||e.abort(),n.current=null,t({status:"idle"})},[]);return(0,r.useEffect)(()=>()=>{var e;return null===(e=n.current)||void 0===e?void 0:e.abort()},[]),{result:e,run:i,reset:o}}(),K="running"===R.status;(0,r.useEffect)(()=>{let e=function(e){let t=e.replace(/^#/,"");if(!t.startsWith("r="))return null;try{let e=JSON.parse(function(e){let t=atob(e.replace(/-/g,"+").replace(/_/g,"/")+"=".repeat((4-e.length%4)%4)),n=Uint8Array.from(t,e=>e.charCodeAt(0));return new TextDecoder().decode(n)}(t.slice(2)));if("object"!=typeof e||null===e||"string"!=typeof e.state||"string"!=typeof e.questions)return null;return{model:"string"==typeof e.model?e.model:"",stateMode:"json"===e.stateMode?"json":"text",state:e.state,questions:e.questions}}catch{return null}}(window.location.hash);e&&(k(e.state),T(e.stateMode),Z(e.questions),e.model&&x(e.model))},[]),(0,r.useEffect)(()=>{let e=!1;return fetch("/api/playground/models").then(async e=>{var t,n;let i=await e.json();if(!e.ok)throw Error((null===(t=i.error)||void 0===t?void 0:t.message)||"Could not load models.");return null!==(n=i.models)&&void 0!==n?n:[]}).then(t=>{e||(n(t),x(e=>{var n,i;if(e&&t.some(t=>t.id===e))return e;let o=t.find(e=>e.id===tj);return(null===(n=null!==(i=null!=o?o:t.find(e=>e.ready))&&void 0!==i?i:t[0])||void 0===n?void 0:n.id)||""}))}).catch(t=>{e||c(t.message||"Could not load models.")}).finally(()=>{e||s(!1)}),()=>{e=!0}},[]);let B=(0,r.useMemo)(()=>{if("text"===f)return C.trim()?{value:C,error:null}:{value:null,error:"Enter a state first."};let{value:e,error:t}=j(C);if(t)return{value:null,error:"State: ".concat(t)};let n="string"==typeof e||(Array.isArray(e)||w(e))&&y(e)?null:"state is required and must be a string, object or array";return n?{value:null,error:n}:{value:e,error:null}},[f,C]),U=(0,r.useMemo)(()=>{let{value:e,error:t}=j(I);if(t)return{value:null,errors:[t]};let n=function(e){let t=e=>({ok:!1,questions:null,errors:e});if(!w(e))return t(["questions must be an object of 1..".concat(32," named questions")]);let n=Object.entries(e);if(n.length<1||n.length>32)return t(["questions must contain 1..".concat(32," named questions")]);let i=[];for(let[e,t]of n){if(!e){i.push("Each question needs a nonempty ID");continue}if(!w(t)){i.push("".concat(e,": must be an object with type, instructions and criteria"));continue}let n=Object.keys(t).filter(e=>!["type","instructions","criteria"].includes(e));n.length>0&&i.push("".concat(e,": unknown fields ").concat(n.join(", "))),v(t.instructions)||i.push("".concat(e,": instructions must be a string, object, array or null"));let{type:o,criteria:r}=t;"choice"===o?!w(r)||Object.keys(r).length<1||Object.keys(r).length>255?i.push("".concat(e,": choice requires 1..").concat(255," options as an object of label: description")):Object.keys(r).some(e=>!e.trim())?i.push("".concat(e,": choice labels must be nonblank strings")):Object.values(r).every(v)||i.push("".concat(e,": option descriptions must be strings, objects, arrays or null")):"score"===o?!Array.isArray(r)||r.length<2||r.length>10?i.push("".concat(e,": score requires ").concat(2,"..").concat(10," ordered levels as an array")):r.every(v)||i.push("".concat(e,": level descriptions must be strings, objects, arrays or null")):"noul"===o?null==r||(!w(r)||Object.keys(r).some(e=>"false"!==e&&"true"!==e)?i.push("".concat(e,": noul criteria may only describe false and true")):Object.values(r).every(v)||i.push("".concat(e,": noul descriptions must be strings, objects, arrays or null"))):i.push("".concat(e,": type must be choice, score or noul"))}return i.length>0?t(i):{ok:!0,questions:e,errors:[]}}(e);return{value:n.questions,errors:n.errors}},[I]),W=(0,r.useMemo)(()=>S?[...U.errors,S]:U.errors,[U.errors,S]),Q=(0,r.useMemo)(()=>p&&null!==B.value&&U.value?{model:p,state:B.value,questions:U.value}:null,[p,B.value,U.value]),G=t.find(e=>e.id===p),X=null!==(e=null==G?void 0:G.name)&&void 0!==e?e:p?p.replace(/^jev\//,""):"the model",en=G?P(G.contextLength):null,ei=null!==Q&&!K,eo=(0,r.useCallback)(()=>{Q&&!K&&H(Q)},[Q,K,H]);(0,r.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),eo())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[eo]);let er=async()=>{var e;let t=(e={model:p,stateMode:f,state:C,questions:I},"#".concat("r=").concat(function(e){let t=new TextEncoder().encode(e),n="";
1return t.forEach(e=>{n+=String.fromCharCode(e)}),btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}(JSON.stringify(e)))),n="".concat(window.location.origin).concat(window.location.pathname).concat(t);window.history.replaceState(null,"",n),await ee(n),F(!0)};(0,r.useEffect)(()=>{if(!N)return;let e=setTimeout(()=>F(!1),1800);return()=>clearTimeout(e)},[N]);let es=(0,r.useMemo)(()=>{var e,t;return t=null!==(e=null!=Q?Q:R.request)&&void 0!==e?e:{model:p||tj,state:m,questions:g},"python"===_?'import os\nimport httpx\n\nresponse = httpx.post(\n    "'.concat(z(t.model),'",\n    headers={"Authorization": f"Bearer {os.environ[\'BEAM_TOKEN\']}"},\n    json=').concat(q(function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i="    ".repeat(n+1),o="    ".repeat(n);if(null==t)return"None";if(!0===t)return"True";if(!1===t)return"False";if("number"==typeof t)return Number.isFinite(t)?String(t):"None";if("string"==typeof t)return JSON.stringify(t);if(Array.isArray(t))return 0===t.length?"[]":"[\n".concat(t.map(t=>"".concat(i).concat(e(t,n+1),",")).join("\n"),"\n").concat(o,"]");if(w(t)){let r=Object.entries(t);return 0===r.length?"{}":"{\n".concat(r.map(t=>{let[o,r]=t;return"".concat(i).concat(JSON.stringify(o),": ").concat(e(r,n+1),",")}).join("\n"),"\n").concat(o,"}")}return"None"}(t),4),',\n    timeout=60,\n)\nresponse.raise_for_status()\nprint(response.json()["answers"])'):"javascript"===_?'const response = await fetch("'.concat(z(t.model),'", {\n  method: "POST",\n  headers: {\n    Authorization: `Bearer ${process.env.BEAM_TOKEN}`,\n    "Content-Type": "application/json",\n  },\n  body: JSON.stringify(').concat(q(b(t),2),"),\n});\nconst { answers } = await response.json();\nconsole.log(answers);"):O(t)},[_,Q,R.request,p]);
1return(0,i.jsxs)(tC,{children:[(0,i.jsx)(u.Z,{title:"Jev Playground | Open-source decision models on Beam",description:"Send a state and questions to Laya, SemIf, Kev, NanoJev and Jevlike, the open-source Jev-style decision models, and read the calibrated probabilities that come back. Served on Beam's managed endpoints."}),(0,i.jsxs)(tk,{children:[(0,i.jsxs)(tV,{children:[(0,i.jsxs)(tP,{children:[(0,i.jsxs)(tM,{children:[(0,i.jsx)(tA,{}),"Playground"]}),(0,i.jsx)(tN,{children:"Try Open-Source Jev Models"}),(0,i.jsx)(tF,{children:"Compare all the open-source alternatives to Jev, and run any of them as an API."})]}),(0,i.jsxs)(tI,{children:[(0,i.jsxs)(tS,{href:tv,target:"_blank",rel:"noreferrer",children:["Get a token ",(0,i.jsx)(a.JO,{icon:l.nUK,size:12})]}),(0,i.jsxs)(tz,{href:"https://platform.beam.cloud/endpoints",target:"_blank",rel:"noreferrer",children:["Browse hosted endpoints ",(0,i.jsx)(a.JO,{icon:l.nUK,size:12})]})]})]}),(0,i.jsxs)(tE,{children:[(0,i.jsxs)(tO,{children:[(0,i.jsx)(et,{models:t,value:p,onChange:x,loading:o,error:d}),G&&(0,i.jsxs)(tq,{children:[en&&(0,i.jsx)(tL,{title:"Rendered tokens for the state plus one question",children:en}),(0,i.jsx)(tL,{title:"Input price from the model catalog at app.beam.cloud/v1/models",children:V(G.pricing.prompt)})]})]}),(0,i.jsxs)(t_,{children:[(0,i.jsx)(eZ,{stateText:C,onStateChange:k,stateMode:f,onStateModeChange:T,stateError:B.error,questionsText:I,onQuestionsChange:e=>{Z(e),L(null)},questionErrors:W,onAddQuestion:e=>{let{value:t,error:n}=I.trim()?j(I):{value:{},error:null};if(n||!w(t)){L("Fix the JSON first, then add a question.");return}let i=function(e,t){for(let n=1;;n+=1){let i="new_".concat(t,"_").concat(n);if(!(i in e))return i}}(t,e);Z(b({...t,[i]:h[e]})),L(null)},modelName:X,running:K,canRun:ei,onRun:eo,onClear:()=>{k(""),Z("{}"),L(null),D(),window.location.hash&&window.history.replaceState(null,"",window.location.pathname)},onShare:er,shared:N}),(0,i.jsx)(eW,{result:R,modelName:X,model:G,view:M,onViewChange:A,preview:Q,modelsLoading:o})]})]}),(0,i.jsxs)(tJ,{children:[(0,i.jsxs)(tR,{children:[(0,i.jsx)(t$,{children:"Call the API"}),(0,i.jsx)(tH,{children:"Integrate any open model into your product with our OpenAI-compatible API."}),(0,i.jsxs)(tD,{children:[(0,i.jsxs)(tK,{children:[(0,i.jsx)(tB,{children:"1"}),(0,i.jsxs)(tU,{children:[(0,i.jsx)(tW,{children:(0,i.jsxs)($,{href:tv,target:"_blank",rel:"noreferrer",children:["Get a workspace token ",(0,i.jsx)(a.JO,{icon:l.nUK,size:11})]})}),(0,i.jsx)(tQ,{children:"Create an account and grab an API key."})]})]}),(0,i.jsxs)(tK,{children:[(0,i.jsx)(tB,{children:"2"}),(0,i.jsxs)(tU,{children:[(0,i.jsx)(tW,{children:"Put it in your environment"}),(0,i.jsx)(tQ,{children:(0,i.jsx)(tG,{children:"export BEAM_TOKEN=your_token"})})]})]}),(0,i.jsxs)(tK,{children:[(0,i.jsx)(tB,{children:"3"}),(0,i.jsxs)(tU,{children:[(0,i.jsx)(tW,{children:"Send the request"}),(0,i.jsx)(tQ,{children:"The snippet is the request in the editors above. The response is the same JSON the playground shows."})]})]})]})]}),(0,i.jsxs)(tX,{children:[(0,i.jsxs)(tY,{children:[(0,i.jsx)(t0,{role:"tablist","aria-label":"Snippet language",children:E.map(e=>(0,i.jsx)(t1,{type:"button",role:"tab","aria-selected":_===e.id,$active:_===e.id,onClick:()=>J(e.id),children:e.label},e.id))}),(0,i.jsx)(Y,{text:es})]}),(0,i.jsx)(t2,{children:es},_)]})]})]})]})};let tC=s.ZP.section.withConfig({componentId:"sc-7596d68c-0"})(["",""],e=>{let{theme:t}=e;return(0,s.iv)(["width:100%;background:",";border-bottom:1px solid ",";padding:64px 24px 96px;display:flex;justify-content:center;@media (max-width:","px){padding:48px 20px 72px;}@media (max-width:","px){padding:40px 16px 56px;}"],d.TV.bg,d.TV.border,t.breakpoints.md,t.breakpoints.sm)}),tk=s.ZP.div.withConfig({componentId:"sc-7596d68c-1"})(["width:100%;max-width:1200px;display:flex;flex-direction:column;gap:32px;"]),tV=s.ZP.header.withConfig({componentId:"sc-7596d68c-2"})(["",""],e=>{let{theme:t}=e;return(0,s.iv)(["display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:24px 48px;@media (max-width:","px){grid-template-columns:minmax(0,1fr);}"],t.breakpoints.md)}),tP=s.ZP.div.withConfig({componentId:"sc-7596d68c-3"})(["display:flex;flex-direction:column;align-items:flex-start;gap:16px;min-width:0;"]),tI=s.ZP.div.withConfig({componentId:"sc-7596d68c-4"})(["",""],e=>{let{theme:t}=e;return(0,s.iv)(["display:flex;flex-direction:column;align-items:stretch;gap:10px;min-width:224px;@media (max-width:","px){flex-direction:row;flex-wrap:wrap;min-width:0;}"],t.breakpoints.md)}),tZ=(0,s.iv)(["display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 18px;border-radius:10px;font-family:",";font-size:14px;font-weight:500;line-height:20px;white-space:nowrap;text-decoration:none;transition:background 0.15s ease,border-color 0.15s ease,filter 0.15s ease;&:focus-visible{outline:none;box-shadow:0 0 0 2px ",",0 0 0 4px ",";}"],L,d.TV.bg,d.TV.accent),tS=s.ZP.a.withConfig({componentId:"sc-7596d68c-5"})(["",";background:",";color:#fff;&:hover,&:active{color:#fff;filter:brightness(1.08);}"],tZ,d.TV.accentSolid),tz=s.ZP.a.withConfig({componentId:"sc-7596d68c-6"})(["",";border:1px solid ",";background:",";color:",";&:hover,&:active{color:",";background:",";border-color:",";}"],tZ,d.TV.borderStrong,d.TV.panel,d.TV.textHi,d.TV.textHi,d.TV.panelStrong,(0,c.Fq)(d.TV.textHi,.22)),tE=s.ZP.div.withConfig({componentId:"sc-7596d68c-7"})(["display:flex;flex-direction:column;gap:12px;"]),tO=s.ZP.div.withConfig({componentId:"sc-7596d68c-8"})(["",""],e=>{let{theme:t}=e;return(0,s.iv)(["display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;min-width:0;@media (max-width:","px){flex-direction:column;align-items:flex-start;}"],t.breakpoints.sm)}),tq=s.ZP.div.withConfig({componentId:"sc-7596d68c-9"})(["",""],e=>{let{theme:t}=e;return(0,s.iv)(["display:flex;flex:1 1 240px;flex-wrap:wrap;align-items:center;gap:8px 10px;min-width:0;@media (max-width:","px){flex:0 0 auto;width:100%;}"],t.breakpoints.sm)}),tL=s.ZP.span.withConfig({componentId:"sc-7596d68c-10"})(["display:inline-flex;align-items:center;height:26px;padding:0 9px;border-radius:7px;border:1px solid ",";color:",";font-family:",";font-size:12px;line-height:16px;white-space:nowrap;font-variant-numeric:tabular-nums;"],d.TV.border,d.TV.textMid,d.TV.mono),tM=s.ZP.div.withConfig({componentId:"sc-7596d68c-11"})(["display:inline-flex;align-items:center;gap:8px;font-family:",";font-size:12px;font-weight:500;letter-spacing:0.16em;text-transform:uppercase;color:",";"],d.TV.mono,d.TV.accent),tA=s.ZP.span.withConfig({componentId:"sc-7596d68c-12"})(["width:7px;height:7px;border-radius:50%;background:",";box-shadow:0 0 8px ",";"],d.TV.accent,d.TV.accent),tN=s.ZP.h1.withConfig({componentId:"sc-7596d68c-13"})(["",""],e=>{let{theme:t}=e;return(0,s.iv)(["all:unset;display:block;color:",";letter-spacing:-0.02em;",";font-weight:460;@media (min-width:","px){",";font-weight:460;letter-spacing:-0.02em;}"],d.TV.textHi,p.c.title36,t.breakpoints.sm,p.c.title44)}),tF=s.ZP.p.withConfig({componentId:"sc-7596d68c-14"})(["all:unset;display:block;max-width:720px;color:",";",";@media (min-width:","px){",";}"],d.TV.textMid,p.c.textBaseLight,e=>{let{theme:t}=e;return t.breakpoints.sm},p.c.textLgLight),t_=s.ZP.div.withConfig({componentId:"sc-7596d68c-15"})(["",""],e=>{let{theme:t}=e;return(0,s.iv)(["display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);height:680px;border-radius:16px;border:1px solid ",";background:",";overflow:hidden;> section:first-child{border-right:1px solid ",";}@media (max-width:","px){grid-template-columns:minmax(0,1fr);height:auto;> section:first-child{border-right:none;border-bottom:1px solid ",";}>
1 section:last-child{min-height:320px;max-height:640px;}}"],d.TV.border,d.TV.bg,d.TV.border,t.breakpoints.lg,d.TV.border)}),tJ=s.ZP.div.withConfig({componentId:"sc-7596d68c-16"})(["",""],e=>{let{theme:t}=e;return(0,s.iv)(["display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:40px;align-items:start;padding-top:16px;@media (max-width:","px){grid-template-columns:minmax(0,1fr);gap:24px;}"],t.breakpoints.lg)}),tR=s.ZP.div.withConfig({componentId:"sc-7596d68c-17"})(["display:flex;flex-direction:column;gap:12px;"]),t$=s.ZP.h2.withConfig({componentId:"sc-7596d68c-18"})(["all:unset;display:block;color:",";",";"],d.TV.textHi,p.c.title24),tH=s.ZP.p.withConfig({componentId:"sc-7596d68c-19"})(["all:unset;display:block;color:",";",";"],d.TV.textMid,p.c.textBaseLight),tD=s.ZP.ol.withConfig({componentId:"sc-7596d68c-20"})(["all:unset;display:flex;flex-direction:column;gap:18px;margin-top:12px;list-style:none;"]),tK=s.ZP.li.withConfig({componentId:"sc-7596d68c-21"})(["display:flex;align-items:flex-start;gap:14px;"]),tB=s.ZP.span.withConfig({componentId:"sc-7596d68c-22"})(["display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;border-radius:50%;border:1px solid ",";color:",";font-family:",";font-size:11px;line-height:1;"],d.TV.borderStrong,d.TV.textMid,d.TV.mono),tU=s.ZP.div.withConfig({componentId:"sc-7596d68c-23"})(["display:flex;flex-direction:column;gap:4px;min-width:0;padding-top:2px;"]),tW=s.ZP.span.withConfig({componentId:"sc-7596d68c-24"})(["color:",";font-family:",";font-size:14px;font-weight:500;line-height:20px;","{display:inline-flex;align-items:center;gap:4px;}"],d.TV.textHi,L,$),tQ=s.ZP.span.withConfig({componentId:"sc-7596d68c-25"})(["color:",";font-family:",";font-size:13px;line-height:19px;"],d.TV.textMid,L),tG=s.ZP.code.withConfig({componentId:"sc-7596d68c-26"})(["display:inline-block;padding:2px 7px;border-radius:6px;border:1px solid ",";background:",";color:",";font-family:",";font-size:12px;line-height:18px;overflow-wrap:anywhere;"],d.TV.border,d.TV.panel,d.TV.textHi,d.TV.mono),tX=s.ZP.div.withConfig({componentId:"sc-7596d68c-27"})(["border-radius:12px;border:1px solid ",";background:",";overflow:hidden;min-width:0;"],d.TV.border,d.TV.bgRaised),tY=s.ZP.div.withConfig({componentId:"sc-7596d68c-28"})(["display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 8px 6px 8px;border-bottom:1px solid ",";"],d.TV.border),t0=s.ZP.div.withConfig({componentId:"sc-7596d68c-29"})(["display:inline-flex;align-items:center;gap:2px;min-width:0;overflow-x:auto;"]),t1=s.ZP.button.withConfig({componentId:"sc-7596d68c-30"})(["all:unset;box-sizing:border-box;cursor:pointer;padding:5px 10px;border-radius:7px;font-family:",";font-size:12px;line-height:16px;white-space:nowrap;color:",";background:",";box-shadow:",";transition:color 0.15s ease,background 0.15s ease;&:hover{color:",";}&:focus-visible{box-shadow:inset 0 0 0 1px ",";}"],d.TV.mono,e=>{let{$active:t}=e;return t?d.TV.textHi:d.TV.textLow},e=>{let{$active:t}=e;return t?d.TV.panelStrong:"transparent"},e=>{let{$active:t}=e;return t?"inset 0 0 0 1px ".concat(d.TV.borderStrong):"none"},d.TV.textHi,d.TV.accent),t2=s.ZP.pre.withConfig({componentId:"sc-7596d68c-31"})(["margin:0;padding:16px 18px;max-height:360px;overflow:auto;font-family:",";font-size:12px;line-height:1.6;color:",";white-space:pre-wrap;overflow-wrap:anywhere;"],d.TV.mono,d.TV.textHi);var t4=()=>(0,i.jsx)(o.Z,{children:(0,i.jsx)(tT,{})})}},function(e){e.O(0,[539,687,888,774,179],function(){return e(e.s=28114)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.