UNPKG

@fleek-platform/agents-ui

Version:

The Fleek Platform Agents UI provides a simple interface for deploying, monitoring, and configuring your agents––making management straightforward

15 lines 74.7 kB
var qt=Object.defineProperty;var $t=(e,t)=>{for(var r in t)qt(e,r,{get:t[r],enumerable:!0})};var pt={};$t(pt,{changeAgentStatus:()=>ur,createAgentDraft:()=>nr,createApiToken:()=>Er,createCreditsCheckout:()=>We,createSubscription:()=>qe,createSubscriptionCheckout:()=>sr,deleteAgent:()=>dr,deleteApiToken:()=>fr,deployAgent:()=>ar,generateCharacterfile:()=>Pr,getAgentAttestation:()=>cr,getAgentLogs:()=>lr,getAgentStatus:()=>pr,getAgentsByProjectId:()=>Ye,getApiTokens:()=>mr,getCredits:()=>je,getElizaAgent:()=>Ar,getElizaOsVersions:()=>_r,getModels:()=>Tr,getPlans:()=>He,getProjects:()=>yr,getSubscriptions:()=>Fe,sendAssistantMessageStream:()=>Ir,sendMessageAgent:()=>br,updateAgentById:()=>gr,updateSubscription:()=>hr,updateSubscriptionQuantity:()=>$e});var Xt={PUBLIC_FLEEK_REST_API_HOST:"api.fleek.xyz",PUBLIC_DASHBOARD_APP_URL:"https://fleek.xyz/dashboard",PUBLIC_BEEHIIV_PROXY_SERVER_URL:"https://faas-lon1-917a94a7.doserverless.co/api/v1/web/fn-5aaf2a72-1b5b-4ac6-8c42-a2e735a32d8b/main/create-subscription",PUBLIC_AUTOFUN_CALLBACK_URL:"https://auto.fun/callback",PUBLIC_GRAPHQL_API_URL:"https://graphql.service.fleek.xyz/graphql",PUBLIC_DYNAMIC_ENVIRONMENT_ID:"de23a5f0-aaa5-412e-8212-4fb056a3b30d",PUBLIC_AGENTS_BASE_PATH:"/agents",PUBLIC_REDIRECT_URL_UNAUTHENTICATED:"https://fleek.xyz",PUBLIC_PERSONA_GENERATOR_API_URL:"https://persona-generator.flkservices.io"},M=e=>{let t=Xt[e];if(t==null)throw new Error(`Expected key "${e}" to be defined but got ${typeof t}`);if(typeof t!="string")throw new Error(`Expected key "${e}" to be string but got ${typeof t}`);return t};import Zt from"url-join";import{compile as Qt}from"path-to-regexp";import Jt from"query-string";var fe=(...e)=>Zt(...e),er=(e,t={})=>Qt(e,{encode:encodeURIComponent})(t),tr=(e,t={})=>!t||Object.keys(t).length===0?e:Jt.stringifyUrl({url:e,query:t},{skipNull:!0,skipEmptyString:!0}),he=(e,t,r)=>{let o=r?.pathParams??{},i=r?.queryParams??{};return tr(fe(e,er(t,o)),i)},Pe=e=>(t,{pathParams:r={},queryParams:o={}}={})=>{let i=typeof e=="function"?e():e;return he(i,t,{pathParams:r,queryParams:o})};var f={endpoints:{aiAgents:"/ai-agents",aiAgentUpdate:"/ai-agents/:id",aiAgentPublish:"/ai-agents/:id/publish",aiAgentLogs:"/ai-agents/:id/logs",aiAgentAttestation:"/ai-agents/:id/attestation",aiAgentStatus:"/ai-agents/:id/status",aiAgentStatusUpdate:"/ai-agents/:id/:action",aiAgentDelete:"/ai-agents/:id",aiAgentDraftCreate:"/ai-agents",projects:"/projects",teams:"/teams",subscriptions:"/subscriptions",subscriptionUpdate:"/subscriptions/:id",subscriptionCheckout:"/subscriptions/checkout",subscriptionUpdateQuantity:"/subscriptions/:id/quantity",plans:"/plans",tokens:"/tokens",tokenDelete:"/tokens/:id",aiAgentMessage:"/ai-agents/:id/api/:elizaId/message",aiAgentMessageV2:"/ai-agents/:id/api/api/agents/:elizaId/message",proxyAiAgents:"/ai-agents/:id/api/agents",proxyAiAgentsV2:"/ai-agents/:id/api/api/agents",elizaOsVersions:"/machines/images/eliza",llmModels:"/llm/models",credits:"/credits",createCreditsCheckout:"/credits/checkout"},agentsDashboardPage:"/projects/:projectId/agents/"};var st="ai agent",lt="ai agent (standard)";var ct=e=>{let t=e.match(/^https?:\/\//i)?e:`https://${e}`,r=new URL(t);return r.protocol="https:",r.toString()};var Ge=({route:e,version:t="v1"})=>he(M("PUBLIC_PERSONA_GENERATOR_API_URL"),fe(t,e));var rr=Pe(()=>ct(M("PUBLIC_FLEEK_REST_API_HOST"))),b=(e,t,r)=>rr(fe("/api",`v${t}`,e),r);var h=e=>async(r,o)=>{try{let i=await e(r);return o?.throwOnError?i:{ok:!0,data:i}}catch(i){let a=i instanceof Error?i:new Error("Unknown error");if(o?.throwOnError)throw a;return{ok:!1,error:a}}};import{jwtDecode as or}from"jwt-decode";var ir=e=>{try{return or(e)}catch(t){console.error("Failed to decode access token",t);return}},j=(e,t)=>ir(e)?.projectId===t;var nr=h(async({projectId:e,characterfile:t,accessToken:r,name:o,avatar:i,frameworkVersion:a})=>{if(!r||!e||!t)throw new Error("Missing required parameters");if(!j(r,e))throw new Error("The access token does not match the project");let s=b(f.endpoints.aiAgentDraftCreate,2),l=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({config:t,projectId:e,name:o,avatar:i,frameworkVersion:a})});if(!l.ok){let c=await l.text();throw new Error(`HTTP Error ${l.status}: ${c}`)}return l.json()}),ar=h(async({projectId:e,characterfile:t,avatar:r,accessToken:o,draftId:i,frameworkVersion:a,managedModelName:s,tee:l=!1})=>{if(!o||!e||!i)throw new Error("Missing required parameters");if(!j(o,e))throw new Error("The access token does not match the project");let c;t&&(c=JSON.parse(t).name);let g=b(f.endpoints.aiAgentUpdate,1,{pathParams:{id:i}}),u=await fetch(g,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`},body:JSON.stringify({config:t,projectId:e,name:c,avatar:r,frameworkVersion:a,managedModelName:s,tee:l})});if(!u.ok){let T=await u.text();throw new Error(`HTTP Error ${u.status}: ${T}`)}let A=b(f.endpoints.aiAgentPublish,1,{pathParams:{id:i}}),R=await fetch(A,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`}});if(!R.ok){let T=await R.text();throw new Error(`HTTP Error ${R.status}: ${T}`)}return i}),Ye=h(async({projectId:e,accessToken:t})=>{if(!t||!e)throw new Error("Missing required parameters");if(!j(t,e))throw new Error("The access token does not match the project");let r=b(f.endpoints.aiAgents,1,{queryParams:{projectId:e}}),o=await fetch(r,{method:"GET",headers:{authorization:`Bearer ${t}`,"Content-Type":"application/json"}});if(!o.ok){let i=await o.text();throw new Error(`HTTP Error ${o.status}: ${i}`)}return(await o.json()).data}),Fe=h(async({projectId:e,accessToken:t})=>{if(!e||!t)throw new Error("Missing required parameters");if(!j(t,e))throw new Error("The access token does not match the project");let r=b(f.endpoints.subscriptions,1,{queryParams:{projectId:e}}),o=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",authorization:`Bearer ${t}`}});if(!o.ok&&o.status===404)return[];if(!o.ok){let i=await o.text();throw new Error(`HTTP Error ${o.status}: ${i}`)}return o.json()}),sr=h(async({projectId:e,productId:t,accessToken:r,referralId:o})=>{if(!e||!r||!t)throw new Error("Missing required parameters");if(!j(r,e))throw new Error("The access token does not match the project");let i=b(f.endpoints.subscriptionCheckout,1),a=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({projectId:e,product:{id:t,quantity:1},metadata:{referralId:o}})});if(!a.ok){let s=await a.text();throw new Error(`HTTP Error ${a.status}: ${s}`)}return(await a.json()).url}),He=h(async({accessToken:e})=>{if(!e)throw new Error("Missing required parameters");let t=b(f.endpoints.plans,1),r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",authorization:`Bearer ${e}`}});if(!r.ok){let o=await r.text();throw new Error(`HTTP Error ${r.status}: ${o}`)}return r.json()}),lr=h(async({agentId:e,accessToken:t,pageCursor:r,pageSize:o=25})=>{if(!e||!t)throw new Error("Missing required parameters");let i=b(f.endpoints.aiAgentLogs,1,{pathParams:{id:e},queryParams:{cursor:r,size:o}}),a=await fetch(i,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});if(!a.ok){let s=await a.text();throw new Error(`HTTP Error ${a.status}: ${s}`)}return a.json()}),cr=h(async({agentId:e})=>{let t=b(f.endpoints.aiAgentAttestation,1,{pathParams:{id:e}}),r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){let o=await r.text();throw new Error(`HTTP Error ${r.status}: ${o}`)}return r.bytes()}),pr=h(async({accessToken:e,agentId:t})=>{if(!e||!t)throw new Error("Missing required parameters");let r=b(f.endpoints.aiAgentStatus,1,{pathParams:{id:t}}),o=await fetch(r,{method:"GET",headers:{authorization:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let i=await o.text();throw new Error(`HTTP Error ${o.status}: ${i}`)}return(await o.json()).status}),gr=h(async({accessToken:e,agentId:t,payload:r})=>{if(!e||!t||!r)throw new Error("Missing required parameters");let o=b(f.endpoints.aiAgentUpdate,1,{pathParams:{id:t}}),i=await fetch(o,{method:"PUT",headers:{authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:r});if(!i.ok){let a=await i.text();throw new Error(`HTTP Error ${i.status}: ${a}`)}return i.json()}),ur=h(async({agentId:e,accessToken:t,action:r})=>{if(!e||!t||!r)throw new Error("Missing required parameters");let o=b(f.endpoints.aiAgentStatusUpdate,1,{pathParams:{id:e,action:r}}),i=await fetch(o,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});if(!i.ok){let a=await i.text();throw new Error(`HTTP Error ${i.status}: ${a}`)}}),dr=h(async({id:e,accessToken:t})=>{if(!t||!e)throw new Error("Missing required parameters");let r=b(f.endpoints.aiAgentDelete,1,{pathParams:{id:e}}),o=await fetch(r,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});if(!o.ok){let i=await o.text();throw new Error(`HTTP Error ${o.status}: ${i}`)}return(await o.json()).id}),mr=h(async({accessToken:e})=>{if(!e)throw new Error("Missing required parameters");let t=b(f.endpoints.tokens,1),r=await fetch(t,{method:"GET",headers:{authorization:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let o=await r.text();throw new Error(`HTTP Error ${r.status}: ${o}`)}return r.json()}),Er=h(async({accessToken:e,payload:t})=>{if(!e||!t)throw new Error("Missing required parameters");let r=b(f.endpoints.tokens,1),o=await fetch(r,{method:"POST",headers:{authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let i=await o.text();throw new Error(`HTTP Error ${o.status}: ${i}`)}return o.json()}),fr=h(async({accessToken:e,tokenId:t})=>{if(!e||!t)throw new Error("Missing required parameters");let r=b(f.endpoints.tokenDelete,1,{pathParams:{id:t}}),o=await fetch(r,{method:"DELETE",headers:{authorization:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let i=await o.text();throw new Error(`HTTP Error ${o.status}: ${i}`)}}),hr=h(async({projectId:e,subscriptionId:t,productId:r,accessToken:o,quantity:i})=>{if(!o||!e||!t||!r||i===void 0)throw new Error("Missing required parameters");if(!j(o,e))throw new Error("The access token does not match the project");let a=b(f.endpoints.subscriptionUpdate,1,{pathParams:{id:t}}),s=await fetch(a,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`},body:JSON.stringify({projectId:e,product:{id:r,quantity:i}})});if(!s.ok){let l=await s.text();throw new Error(`HTTP Error ${s.status}: ${l}`)}return s.json()}),Ar=h(async({agentId:e,accessToken:t,timeout:r=3e4,version:o="v1"})=>{if(!e||!t)throw new Error("Missing required parameters");let i=o==="v1"?f.endpoints.proxyAiAgents:f.endpoints.proxyAiAgentsV2,a=b(i,1,{pathParams:{id:e}}),s=await fetch(a,{signal:AbortSignal.timeout(r),method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});if(!s.ok){let c=await s.text();throw new Error(`HTTP Error ${s.status}: ${c}`)}let l=await s.json();return l.data?l.data:l}),br=h(async({agentId:e,agentElizaId:t,accessToken:r,message:o,version:i="v1"})=>{if(!e||!r||!t||!o)throw new Error("Missing required parameters");let a=i==="v1"?f.endpoints.aiAgentMessage:f.endpoints.aiAgentMessageV2,s=b(a,1,{pathParams:{id:e,elizaId:t}}),l=await fetch(s,{method:"POST",headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"},body:JSON.stringify({text:o})});if(!l.ok){let c=await l.text();throw new Error(`HTTP Error ${l.status}: ${c}`)}return l.json()}),_r=h(async({accessToken:e})=>{if(!e)throw new Error("Missing required parameters");let t=b(f.endpoints.elizaOsVersions,1),r=await fetch(t,{method:"GET",headers:{authorization:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let o=await r.text();throw new Error(`HTTP Error ${r.status}: ${o}`)}return r.json()}),yr=h(async({accessToken:e})=>{if(!e)throw new Error("Missing required parameters");let r=await fetch(M("PUBLIC_GRAPHQL_API_URL"),{method:"POST",headers:{"Content-Type":"application/json",authorization:`Bearer ${e}`},body:JSON.stringify({operationName:"projects",query:`query projects($filter: ProjectsPaginationInput) { projects(filter: $filter) { data { id name avatar } } }`,variables:{}})});if(!r.ok){let o=await r.text();throw new Error(`HTTP Error ${r.status}: ${o}`)}return(await r.json()).data.projects.data}),Tr=h(async({accessToken:e})=>{if(!e)throw new Error("Missing required parameters");let t=b(f.endpoints.llmModels,1),r=await fetch(t,{method:"GET",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let o=await r.text();throw new Error(`HTTP Error ${r.status}: ${o}`)}return r.json()}),je=h(async({accessToken:e,projectId:t})=>{if(!e||!t)throw new Error("Missing required parameters");let r=b(f.endpoints.credits,1,{queryParams:{projectId:t}}),o=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",authorization:`Bearer ${e}`}});if(!o.ok){let i=await o.text();throw new Error(`HTTP Error ${o.status}: ${i}`)}return o.json()}),We=h(async({accessToken:e,projectId:t})=>{if(!e||!t)throw new Error("Missing required parameters");let r=b(f.endpoints.createCreditsCheckout,1),o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",authorization:`Bearer ${e}`},body:JSON.stringify({projectId:t})});if(!o.ok){let i=await o.text();throw new Error(`HTTP Error ${o.status}: ${i}`)}return o.json()}),qe=h(async({projectId:e,productId:t,accessToken:r,referralId:o})=>{if(!e||!r||!t)throw new Error("Missing required parameters");if(!j(r,e))throw new Error("The access token does not match the project");let i=b(f.endpoints.subscriptions,1),a=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({projectId:e,product:{id:t,quantity:1},metadata:{referralId:o}})});if(!a.ok){let s=await a.text();throw new Error(`HTTP Error ${a.status}: ${s}`)}return await a.json()}),$e=h(async({subscriptionId:e,updateBy:t,projectId:r,accessToken:o})=>{if(!r||!o||!t||!e)throw new Error("Missing required parameters");if(!j(o,r))throw new Error("The access token does not match the project");let i=b(f.endpoints.subscriptionUpdateQuantity,1,{pathParams:{id:e}}),a=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",authorization:`Bearer ${o}`},body:JSON.stringify({projectId:r,updateBy:t})});if(!a.ok){let s=await a.text();throw new Error(`HTTP Error ${a.status}: ${s}`)}return await a.json()}),Ir=h(async({content:e,messages:t,accessToken:r,version:o="v1"})=>{if(!r||!e)throw new Error("Missing required parameters");let i=Ge({route:"/assistant/stream",version:o}),a=t.map(l=>`${l.senderRole}: ${l.content}`).join(` `),s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({content:e,messages:a})});if(!s.ok){let l=await s.text();throw new Error(`HTTP Error ${s.status}: ${l}`)}return s.body?.getReader()}),Pr=h(async({messages:e,accessToken:t,version:r="v1"})=>{if(!t||!e)throw new Error("Missing required parameters");let o=Ge({route:"/generate",version:r}),i=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",authorization:`Bearer ${t}`},body:JSON.stringify({content:JSON.stringify(e)})}),a=await i.json();if(a.status==="error"){let s=a.error;throw new Error(`HTTP Error ${i.status}: ${s}`)}return a});import{clsx as ro}from"clsx";var Qe="-",Sr=e=>{let t=Cr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{let l=s.split(Qe);return l[0]===""&&l.length!==1&&l.shift(),dt(l,t)||Rr(s)},getConflictingClassGroupIds:(s,l)=>{let c=r[s]||[];return l&&o[s]?[...c,...o[s]]:c}}},dt=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),i=o?dt(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;let a=e.join(Qe);return t.validators.find(({validator:s})=>s(a))?.classGroupId},gt=/^\[(.+)\]$/,Rr=e=>{if(gt.test(e)){let t=gt.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Cr=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return wr(Object.entries(e.classGroups),r).forEach(([a,s])=>{Ze(s,o,a,t)}),o},Ze=(e,t,r,o)=>{e.forEach(i=>{if(typeof i=="string"){let a=i===""?t:ut(t,i);a.classGroupId=r;return}if(typeof i=="function"){if(xr(i)){Ze(i(o),t,r,o);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,s])=>{Ze(s,ut(t,a),r,o)})})},ut=(e,t)=>{let r=e;return t.split(Qe).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},xr=e=>e.isThemeGetter,wr=(e,t)=>t?e.map(([r,o])=>{let i=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,l])=>[t+s,l])):a);return[r,i]}):e,zr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,i=(a,s)=>{r.set(a,s),t++,t>e&&(t=0,o=r,r=new Map)};return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=o.get(a))!==void 0)return i(a,s),s},set(a,s){r.has(a)?r.set(a,s):i(a,s)}}},mt="!",vr=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,i=t[0],a=t.length,s=l=>{let c=[],g=0,u=0,A;for(let _=0;_<l.length;_++){let S=l[_];if(g===0){if(S===i&&(o||l.slice(_,_+a)===t)){c.push(l.slice(u,_)),u=_+a;continue}if(S==="/"){A=_;continue}}S==="["?g++:S==="]"&&g--}let R=c.length===0?l:l.substring(u),T=R.startsWith(mt),v=T?R.substring(1):R,P=A&&A>u?A-u:void 0;return{modifiers:c,hasImportantModifier:T,baseClassName:v,maybePostfixModifierPosition:P}};return r?l=>r({className:l,parseClassName:s}):s},Lr=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Nr=e=>({cache:zr(e.cacheSize),parseClassName:vr(e),...Sr(e)}),Or=/\s+/,kr=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:i}=t,a=[],s=e.trim().split(Or),l="";for(let c=s.length-1;c>=0;c-=1){let g=s[c],{modifiers:u,hasImportantModifier:A,baseClassName:R,maybePostfixModifierPosition:T}=r(g),v=!!T,P=o(v?R.substring(0,T):R);if(!P){if(!v){l=g+(l.length>0?" "+l:l);continue}if(P=o(R),!P){l=g+(l.length>0?" "+l:l);continue}v=!1}let _=Lr(u).join(":"),S=A?_+mt:_,w=S+P;if(a.includes(w))continue;a.push(w);let G=i(P,v);for(let B=0;B<G.length;++B){let q=G[B];a.push(S+q)}l=g+(l.length>0?" "+l:l)}return l};function Mr(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Et(t))&&(o&&(o+=" "),o+=r);return o}var Et=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Et(e[o]))&&(r&&(r+=" "),r+=t);return r};function Dr(e,...t){let r,o,i,a=s;function s(c){let g=t.reduce((u,A)=>A(u),e());return r=Nr(g),o=r.cache.get,i=r.cache.set,a=l,l(c)}function l(c){let g=o(c);if(g)return g;let u=kr(c,r);return i(c,u),u}return function(){return a(Mr.apply(null,arguments))}}var y=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},ft=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ur=/^\d+\/\d+$/,Br=new Set(["px","full","screen"]),Vr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Gr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Yr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,W=e=>pe(e)||Br.has(e)||Ur.test(e),X=e=>ge(e,"length",Qr),pe=e=>!!e&&!Number.isNaN(Number(e)),Xe=e=>ge(e,"number",pe),Ae=e=>!!e&&Number.isInteger(Number(e)),Hr=e=>e.endsWith("%")&&pe(e.slice(0,-1)),d=e=>ft.test(e),Z=e=>Vr.test(e),jr=new Set(["length","size","percentage"]),Wr=e=>ge(e,jr,ht),qr=e=>ge(e,"position",ht),$r=new Set(["image","url"]),Xr=e=>ge(e,$r,eo),Zr=e=>ge(e,"",Jr),be=()=>!0,ge=(e,t,r)=>{let o=ft.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},Qr=e=>Kr.test(e)&&!Gr.test(e),ht=()=>!1,Jr=e=>Yr.test(e),eo=e=>Fr.test(e);var to=()=>{let e=y("colors"),t=y("spacing"),r=y("blur"),o=y("brightness"),i=y("borderColor"),a=y("borderRadius"),s=y("borderSpacing"),l=y("borderWidth"),c=y("contrast"),g=y("grayscale"),u=y("hueRotate"),A=y("invert"),R=y("gap"),T=y("gradientColorStops"),v=y("gradientColorStopPositions"),P=y("inset"),_=y("margin"),S=y("opacity"),w=y("padding"),G=y("saturate"),B=y("scale"),q=y("sepia"),ce=y("skew"),re=y("space"),Ee=y("translate"),D=()=>["auto","contain","none"],p=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto",d,t],m=()=>[d,t],oe=()=>["",W,X],$=()=>["auto",pe,d],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",d],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[pe,d];return{cacheSize:500,separator:":",theme:{colors:[be],spacing:[W,X],blur:["none","",Z,d],brightness:L(),borderColor:[e],borderRadius:["none","","full",Z,d],borderSpacing:m(),borderWidth:oe(),contrast:L(),grayscale:H(),hueRotate:L(),invert:H(),gap:m(),gradientColorStops:[e],gradientColorStopPositions:[Hr,X],inset:C(),margin:C(),opacity:L(),padding:m(),saturate:L(),scale:L(),sepia:H(),skew:L(),space:m(),translate:m()},classGroups:{aspect:[{aspect:["auto","square","video",d]}],container:["container"],columns:[{columns:[Z]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ie(),d]}],overflow:[{overflow:p()}],"overflow-x":[{"overflow-x":p()}],"overflow-y":[{"overflow-y":p()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ae,d]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",d]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",Ae,d]}],"grid-cols":[{"grid-cols":[be]}],"col-start-end":[{col:["auto",{span:["full",Ae,d]},d]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[be]}],"row-start-end":[{row:["auto",{span:[Ae,d]},d]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",d]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",d]}],gap:[{gap:[R]}],"gap-x":[{"gap-x":[R]}],"gap-y":[{"gap-y":[R]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[re]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[re]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",d,t]}],"min-w":[{"min-w":[d,t,"min","max","fit"]}],"max-w":[{"max-w":[d,t,"none","full","min","max","fit","prose",{screen:[Z]},Z]}],h:[{h:[d,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[d,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[d,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Z,X]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xe]}],"font-family":[{font:[be]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",d]}],"line-clamp":[{"line-clamp":["none",pe,Xe]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",W,d]}],"list-image":[{"list-image":["none",d]}],"list-style-type":[{list:["none","disc","decimal",d]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",W,X]}],"underline-offset":[{"underline-offset":["auto",W,d]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:m()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),qr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Wr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Xr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[T]}],"gradient-via":[{via:[T]}],"gradient-to":[{to:[T]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...Y(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:Y()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Y()]}],"outline-offset":[{"outline-offset":[W,d]}],"outline-w":[{outline:[W,X]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[W,X]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Z,Zr]}],"shadow-color":[{shadow:[be]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...ne(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ne()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Z,d]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[A]}],saturate:[{saturate:[G]}],sepia:[{sepia:[q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[A]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[G]}],"backdrop-sepia":[{"backdrop-sepia":[q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",d]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",d]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",d]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[B]}],"scale-x":[{"scale-x":[B]}],"scale-y":[{"scale-y":[B]}],rotate:[{rotate:[Ae,d]}],"translate-x":[{"translate-x":[Ee]}],"translate-y":[{"translate-y":[Ee]}],"skew-x":[{"skew-x":[ce]}],"skew-y":[{"skew-y":[ce]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",d]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",d]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":m()}],"scroll-mx":[{"scroll-mx":m()}],"scroll-my":[{"scroll-my":m()}],"scroll-ms":[{"scroll-ms":m()}],"scroll-me":[{"scroll-me":m()}],"scroll-mt":[{"scroll-mt":m()}],"scroll-mr":[{"scroll-mr":m()}],"scroll-mb":[{"scroll-mb":m()}],"scroll-ml":[{"scroll-ml":m()}],"scroll-p":[{"scroll-p":m()}],"scroll-px":[{"scroll-px":m()}],"scroll-py":[{"scroll-py":m()}],"scroll-ps":[{"scroll-ps":m()}],"scroll-pe":[{"scroll-pe":m()}],"scroll-pt":[{"scroll-pt":m()}],"scroll-pr":[{"scroll-pr":m()}],"scroll-pb":[{"scroll-pb":m()}],"scroll-pl":[{"scroll-pl":m()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",d]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[W,X,Xe]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var At=Dr(to);var I=(...e)=>At(ro(e));import{cva as oo}from"class-variance-authority";import io from"react";import{jsx as ao}from"react/jsx-runtime";var no=oo("flex flex-col",{variants:{variant:{container:"bg-elz-neutral-1 p-16 gap-16 rounded-12 border border-elz-neutral-6 overflow-hidden"}}}),E=io.forwardRef(({children:e,variant:t,className:r,...o},i)=>ao("div",{ref:i,className:I(no({variant:t}),r),...o,children:e}));import{forwardRef as po}from"react";import{cva as go}from"class-variance-authority";import{forwardRef as so}from"react";import{jsx as co}from"react/jsx-runtime";var lo=so(({children:e,...t},r)=>co("a",{ref:r,rel:t.target==="_blank"?"noopener noreferrer":void 0,...t,children:e})),ae=lo;import{jsx as _t}from"react/jsx-runtime";var bt=go("flex min-w-fit font-medium no-underline gap-4 select-none font-elz-plex-sans cursor-pointer items-center justify-center transition-all ring-0 outline-none focus-visible:ring-2 disabled:cursor-not-allowed disabled:bg-elz-neutral-3 disabled:text-elz-neutral-8",{variants:{variant:{neutral:"text-elz-neutral-11 bg-elz-neutral-3 hover:bg-elz-neutral-4 active:bg-elz-neutral-5 focus-visible:ring-elz-neutral-8",accent:"text-elz-accent-11 bg-elz-accent-3 hover:bg-elz-accent-4 active:bg-elz-accent-5 focus-visible:ring-elz-accent-8",success:"text-elz-success-11 bg-elz-success-3 hover:bg-elz-success-4 active:bg-elz-success-5 focus-visible:ring-elz-success-8",warning:"text-elz-warning-11 bg-elz-warning-3 hover:bg-elz-warning-4 active:bg-elz-warning-5 focus-visible:ring-elz-warning-8",danger:"text-elz-danger-11 bg-elz-danger-3 hover:bg-elz-danger-4 active:bg-elz-danger-5 focus-visible:ring-elz-danger-8",ghost:"text-elz-neutral-11 bg-transparent hover:bg-elz-neutral-4 active:bg-elz-neutral-5 disabled:bg-transparent focus-visible:ring-elz-neutral-8","ghost-bordered":"text-elz-neutral-11 bg-transparent hover:bg-elz-neutral-4 active:bg-elz-neutral-5 disabled:bg-transparent focus-visible:ring-elz-neutral-8 border border-elz-neutral-6",primary:"bg-elz-accent-9 hover:bg-elz-accent-10 active:bg-elz-accent-9 text-elz-accent-1 ring-elz-accent-8 disabled:bg-elz-neutral-3 disabled:text-elz-neutral-8 disabled:ring-elz-neutral-3 disabled:cursor-not-allowed",outline:"text-elz-neutral-11 bg-transparent hover:bg-elz-neutral-4 active:bg-elz-neutral-5 disabled:bg-transparent focus-visible:ring-elz-neutral-8 border border-elz-neutral-8"},size:{xs:"h-24 gap-4 px-8 rounded-8 text-[1.4rem]",sm:"h-32 gap-4 px-8 rounded-8 text-[1.4rem]",md:"h-40 gap-8 px-16 rounded-12 text-[1.6rem]",lg:"h-44 gap-8 px-16 rounded-12 text-[1.6rem]"}},defaultVariants:{variant:"accent",size:"sm"}}),Q=po(({id:e,children:t,href:r,target:o,rel:i,onClick:a,variant:s,size:l,className:c,...g},u)=>r?_t(ae,{ref:u,id:e,href:r,target:o,rel:i,className:I(bt({variant:s,size:l}),c),children:t}):_t("button",{ref:u,id:e,onClick:a,className:I(bt({variant:s,size:l}),c),...g,children:t}));import{useRef as Tt,useState as Je,useEffect as It}from"react";import{FaSpinner as Po}from"react-icons/fa6";import{IoCheckmark as So,IoClose as Ro,IoPaperPlane as Co}from"react-icons/io5";import{BsFileEarmarkText as mo}from"react-icons/bs";import{IoClose as Eo}from"react-icons/io5";import{jsx as se,jsxs as uo}from"react/jsx-runtime";var Se=({variant:e})=>e==="small"?se("svg",{role:"img","aria-label":"small bolt icon",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:se("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.7365 0.0440924C19.8713 -0.0831111 20.0763 0.0903391 19.9709 0.242402L15.2549 7.04263C15.1807 7.14964 15.2656 7.29399 15.3961 7.28267L18.1684 7.04222C18.3064 7.03025 18.3897 7.19022 18.2998 7.29482L13.5419 12.835C13.4521 12.9397 13.5353 13.0996 13.6733 13.0876L16.6586 12.8287C16.8046 12.8161 16.8851 12.9929 16.7789 13.093L5.26353 23.9559C5.12868 24.0831 4.92364 23.9096 5.0291 23.7576L9.8071 16.8679C9.88131 16.7609 9.79642 16.6165 9.66594 16.6278L6.83434 16.8734C6.69677 16.8854 6.61339 16.7264 6.70226 16.6216L11.3202 11.1762C11.4091 11.0714 11.3257 10.9123 11.1881 10.9243L8.34145 11.1712C8.19545 11.1839 8.11499 11.007 8.22117 10.9069L19.7365 0.0440924Z",fill:"#B4B4B4"})}):se("svg",{role:"img","aria-label":"bolt icon",width:"22",height:"45",viewBox:"0 0 22 45",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:se("path",{d:"M20.3695 13.0981L12.7018 24.2968L18.54 23.1037C18.6552 23.2863 18.7704 23.469 18.8856 23.6516L0.661202 45H0L7.49488 31.1342L1.98736 32.2587C1.81079 32.01 1.79577 31.992 1.61919 31.7433L9.0502 20.7429L3.46755 21.8819C3.29098 21.6115 3.29474 21.6115 3.11817 21.3376L21.3313 0H22L14.6066 13.6856L20.0014 12.5827C20.1817 12.8314 20.193 12.8494 20.3695 13.0981Z",fill:"white"})}),ue=()=>uo("svg",{role:"img",width:"34",height:"33",viewBox:"0 0 34 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{animation:"spin 1s linear infinite"},"aria-label":"Loading spinner",children:[se("path",{d:"M32 16.5C32 24.7843 25.2843 31.5 17 31.5C8.71573 31.5 2 24.7843 2 16.5C2 8.21573 8.71573 1.5 17 1.5C25.2843 1.5 32 8.21573 32 16.5Z",stroke:"#606060",strokeWidth:"2.42308"}),se("path",{d:"M2 16.5C2 8.21573 8.71573 1.5 17 1.5",stroke:"white",strokeWidth:"2.42308",strokeLinecap:"round"}),se("style",{children:` @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } `})]});import{useState as fo}from"react";import{Fragment as bo,jsx as V,jsxs as Re}from"react/jsx-runtime";var ho=({file:e,onRemove:t})=>{let r=e.type.startsWith("image/")&&e.preview,o=e.name.split(".").pop()?.toLowerCase()||"",i=e.name.split(".").slice(0,-1).join("."),[a,s]=fo(!0);return Re(E,{className:`relative group rounded-7 flex-shrink-0 overflow-hidden border border-elz-neutral-6 ${r?"size-[48px]":"w-[96px] h-[48px]"}`,children:[r?Re(bo,{children:[a&&V(E,{className:"absolute inset-0 flex items-center justify-center bg-elz-neutral-3",children:V(ue,{})}),V("img",{src:e.preview,alt:e.name,className:`w-full h-full object-cover transition-opacity duration-200 ${a?"opacity-0":"opacity-100"}`,onLoad:()=>s(!1)})]}):Re(E,{className:"flex flex-col size-full items-start justify-center bg-elz-neutral-3 p-2 gap-2",children:[Re("div",{className:"flex flex-row gap-1",children:[V(mo,{className:"size-15 text-elz-neutral-8"}),V("span",{className:"text-elz-neutral-11 text-[10px]",children:o})]}),V("span",{title:i,className:"text-elz-neutral-11 text-[10px] max-w-full truncate px-1",children:i})]}),V("button",{type:"button",onClick:t,className:"absolute top-0 right-0 size-15 rounded-full bg-elz-neutral-12 text-elz-neutral-2 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:V(Eo,{className:"size-10"})})]})},Ao=({files:e,onRemoveFile:t})=>e.length===0?null:V(E,{className:"flex flex-row gap-6 overflow-x-auto pb-2",children:e.map((r,o)=>V(ho,{file:r,onRemove:()=>t(o)},`${r.name}-${o}`))}),yt=Ao;import et from"react-hot-toast";import{cva as _o}from"class-variance-authority";import{createElement as yo,forwardRef as To}from"react";var Io=_o("font-elz-plex-sans",{variants:{variant:{title:"text-balance text-[3.6rem] font-semibold text-elz-neutral-12",description:"text-[1.6rem] font-medium text-elz-neutral-11",subtitle:"text-[1.6rem] text-elz-neutral-12 font-semibold",feature:"text-[1.2rem] font-medium uppercase tracking-[0.256rem] text-elz-neutral-11",primary:"text-elz-neutral-12",secondary:"text-elz-neutral-11"},size:{"2xs":"text-[1rem]",xs:"text-[1.2rem]",sm:"text-[1.4rem]",md:"text-[1.6rem]",lg:"text-[1.8rem]",xl:"text-[2.0rem]","2xl":"text-[2.6rem]","3xl":"text-[3.4rem]","4xl":"text-[5.8rem]"},weight:{400:"font-normal",500:"font-medium",700:"font-bold"}},defaultVariants:{variant:"title"}});var N=To(({children:e,as:t="p",variant:r,size:o,weight:i,className:a,...s},l)=>yo(t,{ref:l,className:I(Io({variant:r,size:o,weight:i}),a),...s},e));import{jsx as J,jsxs as _e}from"react/jsx-runtime";var Pt=["text/plain","application/pdf","application/json","text/markdown","image/jpeg","image/png","image/gif"],tt=20,xo=10*1024*1024,wo=({onSubmit:e,onSuccess:t,onError:r,onDescriptionChange:o,onFilesChange:i,maxFileSize:a=xo,showCTALabel:s=!0})=>{let[l,c]=Je(""),[g,u]=Je([]),[A,R]=Je(!1),T=Tt(null),v=Tt(null);It(()=>()=>{for(let p of g)p.preview&&URL.revokeObjectURL(p.preview)},[g]),It(()=>{A||!T.current||T.current.focus()},[A]);let P=()=>{let p=T.current;if(p){p.style.height="auto";let C=Math.min(Math.max(40,p.scrollHeight),200);p.style.height=`${C}px`}},_=p=>{c(p.target.value),P(),typeof o=="function"&&o(p.target.value)},S=p=>{if(p.size>a){let C=a/1048576;return et.error(`File ${p.name} is too large. Maximum size is ${C}MB`),!1}return Pt.includes(p.type)?!0:(et.error(`File type ${p.type} is not supported`),!1)},w=p=>(p.type.startsWith("image/")&&(p.preview=URL.createObjectURL(p)),p),G=p=>{if(p.target.files){let C=Array.from(p.target.files).filter(S).map(m=>w(m));u(m=>(typeof i=="function"&&i([...m,...C]),[...m,...C]))}p.target.value=""},B=()=>{v.current?.click()},q=p=>{u(C=>{let m=C[p];m.preview&&URL.revokeObjectURL(m.preview);let oe=C.filter(($,ie)=>ie!==p);return typeof i=="function"&&i(oe),oe})},ce=p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),re())},re=async()=>{if(!(A||!D))try{R(!0),await e(l,g),typeof t=="function"&&t(),u(C=>{for(let m of C)m.preview&&URL.revokeObjectURL(m.preview);return[]})}catch(p){typeof r=="function"&&r(p),et.error(p instanceof Error?p.message:"Failed to create agent")}finally{R(!1)}},D=l.trim().length>=tt;return J(E,{className:"flex flex-col gap-4 max-w-[700px] self-center w-full",children:_e(E,{"data-testid":"chat-input-container",className:"gap-2 sm:gap-4 m-auto w-full flex-shrink-0 min-h-[5rem] max-h-[calc(100vh-8rem)] relative flex flex-col p-6 sm:p-8 rounded-[8px] bg-elz-neutral-100 border border-elz-neutral-6 bg-elz-neutral-2",children:[J(yt,{files:g,onRemoveFile:q}),J("textarea",{ref:T,className:"min-h-[6rem] sm:min-h-[8rem] w-full bg-transparent resize-none border-none outline-none overflow-y-auto placeholder:text-elz-neutral-8 text-elz-neutral-12 text-sm sm:text-base",placeholder:`What do you want your AI agent to do? Write at least ${tt} characters.`,value:l,onChange:_,onKeyDown:ce,disabled:A}),J("input",{type:"file",ref:v,onChange:G,className:"hidden",multiple:!0,accept:Pt.join(",")}),_e(E,{className:"w-full flex flex-row justify-between items-center gap-12",children:[_e(E,{className:I("gap-6 items-center flex-row text-elz-neutral-11",D&&"text-elz-success-10"),children:[D?J(So,{className:"size-16"}):J(Ro,{className:"size-16"}),_e(N,{variant:"secondary",size:"xs",className:I(D&&"text-elz-success-10"),children:["Minimum ",tt," characters"]})]}),_e(Q,{variant:"accent",disabled:!D||A,onClick:re,className:"text-sm sm:text-base",children:[A?J(Po,{className:"size-16 animate-spin"}):J(Co,{className:"size-16"}),s&&"Create agent"]})]})]})})};import{useMemo as Ei,useState as jt}from"react";import Ke from"react-hot-toast";var St=()=>{let e=M("PUBLIC_BEEHIIV_PROXY_SERVER_URL");return{subscribeNewUser:async o=>{if(!e)throw Error("Missing PUBLIC_BEEHIIV_PROXY_SERVER_URL env variable");if(o)try{await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:o,utmSource:"eliza"})})}catch(i){console.error({status:"user could not be subscribed",error:i})}},updateUser:async({email:o,abandonedCart:i})=>{if(!e)throw Error("Missing PUBLIC_BEEHIIV_PROXY_SERVER_URL env variable");if(o)try{await fetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:o,customFields:[{name:"abandonedCart",value:`${i}`}]})})}catch(a){console.error({status:"user could not be updated",error:a})}}}};import{create as zo}from"zustand";var Rt=zo((e,t)=>({captureEvent:void 0,setCaptureEvent:r=>{e({captureEvent:r})},dispatchEvent:(r,o)=>{let{captureEvent:i}=t();i&&i(r,o)}}));var vo="agent_ui_wizard",U=e=>`${vo}.${e}`,de={JOURNEY_INIT:U("journey_init"),NAVIGATION:{TRIGGERED:U("navigation")},FILE_UPLOAD:{TRIGGERED:U("file_upload")},SUBSCRIPTION:{PURCHASE_POLLING:{STARTED:U("subscription_purchase_polling_started"),COMPLETED:U("subscription_purchase_polling_completed")}},DEPLOYMENT:{VALIDATION:{STARTED:U("deployment_validation_started"),FAILED:U("deployment_validation_failed"),SUCCESS:U("deployment_validation_success")},PROCESSING:{STARTED:U("deployment_status_processing_started"),FAILED:U("deplayment_status_processing_failed"),COMPLETED:U("deployment_status_processing_completed")}}};import{create as Lo}from"zustand";import{persist as No,createJSONStorage as Oo}from"zustand/middleware";var le=Lo()(No((e,t)=>({authStoreInstance:{},setAuthStoreInstance:r=>{let o={authStoreInstance:r};(r.userProfile?.username||r.userProfile?.avatar)&&(o.userProfile={username:r.userProfile?.username,avatar:r.userProfile?.avatar}),e(o)},triggerLogin:()=>{let{authStoreInstance:r}=t(),o=r?.triggerLoginModal;try{if(typeof o!="function"){console.warn(`Expected triggerLoginModal to be a ready function but got ${typeof o}. If this issue persists, please contact support at https://fleek.xyz/support`);return}o(!0)}catch(i){console.error("Failed to trigger login modal",i)}}}),{name:"user-profile-storage",storage:Oo(()=>localStorage),partialize:e=>({userProfile:e.userProfile})}));import{FaArrowRight as fi}from"react-icons/fa6";function me(e,t="USD",r=navigator.language){return new Intl.NumberFormat(r||"en-US",{style:"currency",currency:t}).format(e)}import{create as hi}from"zustand";import{useAuthStore as ko}from"@fleek-platform/login-button";import{useQuery as Mo}from"@tanstack/react-query";var Ce=()=>{let{accessToken:e,projectId:t}=ko();return Mo({queryKey:["subscriptions"],queryFn:async()=>Fe({accessToken:e,projectId:t},{throwOnError:!0})})};import{useAuthStore as Do}from"@fleek-platform/login-button";import{useQuery as Uo}from"@tanstack/react-query";var Ct=()=>{let{accessToken:e}=Do();return Uo({queryKey:["plans"],queryFn:async()=>He({accessToken:e},{throwOnError:!0})})};var xt=(e,t)=>{let r=e.find(o=>o.name.toLowerCase()===t);if(r)return{...r,price:r.price/100}},xe=({planName:e})=>{let{data:t=[],isPending:r,refetch:o}=Ct();return{data:xt(t,e),isPending:r,refetch:async()=>{let i=await o();return{data:xt(i.data??[],e)}}}};var we=()=>xe({planName:st});var ze=()=>xe({planName:lt});var ve=(e,t)=>{if(!t)return;let r=e.filter(s=>["active","trialing"].includes(s.status.toLowerCase())).find(s=>s.productId===t?.id);if(!r)return;let o=r.items.find(s=>s.productId===t?.id);if(!o)return;let i=o.quantity,a=o.unitAmount/100;return{renewalDate:new Date(r.periodS