1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3255],{30542:function(e,t,s){s.d(t,{tp:function(){return S},hS:function(){return c}});var n=s(27573);s(88146),s(93743),s(73230);var a=s(7653),r=s(75721),l=s(8574);function c(e){let{tokenAddress:t,chain:s="base",height:c=400}=e,[o,i]=(0,a.useState)(!0),{theme:d}=(0,l.F)(),x="https://www.geckoterminal.com/".concat(s,"/pools/").concat(t,"?embed=1&info=0&swaps=0&grayscale=0&light_chart=").concat("light"===d?1:0);return(0,n.jsxs)("div",{className:"relative overflow-hidden bg-surface-2",style:{height:c},children:[o&&(0,n.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-surface-2",children:(0,n.jsx)(r.Z,{className:"h-8 w-8 animate-spin text-brand"})}),(0,n.jsx)("div",{className:"absolute inset-0",style:{transform:"scale(".concat(.9,")"),transformOrigin:"top left"},children:(0,n.jsx)("iframe",{src:x,title:"Token Chart",className:"border-0",style:{width:"".concat(111.11111111111111,"%"),height:"".concat(111.11111111111111,"%")},onLoad:()=>i(!1),sandbox:"allow-scripts allow-same-origin"})})]})}var o=s(1836),i=s(10269),d=s(87354),x=s(2966),m=s(30609);let u=(0,s(2389).Z)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);var h=s(90743),b=s(25223),p=s(51856),f=s(24875),v=s(50294),y=s(19369),j=s(24012),g=s(10606);let N=Number(s(68571).env.NEXT_PUBLIC_MIN_ORDER_VALUE)||10,w=g.V1,k=[{value:"low",label:"Low",description:"Conservative: 75% min confidence, max 3 positions"},{value:"medium",label:"Medium",description:"Balanced: 60% min confidence, max 5 positions"},{value:"high",label:"High",description:"Aggressive: 50% min confidence, max 10 positions"}],C=[{label:"1h",minutes:60},{label:"2h",minutes:120},{label:"4h",minutes:240},{label:"6h",minutes:360},{label:"12h",minutes:720},{label:"24h",minutes:1440}];function S(e){var t,s,l,c,g;let{isOpen:S,onClose:A,onSuccess:T,getAccessToken:E}=e,[P,M]=(0,a.useState)("details"),[Z,D]=(0,a.useState)(!1),[L,R]=(0,a.useState)(null),[I,O]=(0,a.useState)(!1),[U,B]=(0,a.useState)(!1),F=(0,a.useRef)(null),[_,V]=(0,a.useState)(""),[G,Y]=(0,a.useState)(""),[q,z]=(0,a.useState)(null),[$,H]=(0,a.useState)(null),[K,W]=(0,a.useState)("crypto"),[J,X]=(0,a.useState)(""),[Q,ee]=(0,a.useState)(""),[et,es]=(0,a.useState)("medium"),[en,ea]=(0,a.useState)(60),[er,el]=(0,a.useState)(N),[ec,eo]=(0,a.useState)(!1),[ei,ed]=(0,a.useState)(40),[ex,em]=(0,a.useState)(25),[eu,eh]=(0,a.useState)(10),[eb,ep]=(0,a.useState)(null),ef=async()=>{D(!0),R(null);try{let e=await E();if(!e){R("Authentication required"),D(!1);return}let t=Q||"A ".concat(et,"-risk trading agent specializing in ").concat(K," markets. Analytical, data-driven, and focused on ").concat(J.slice(0,100),"."),s={name:_,tokenSymbol:G.toUpperCase(),image:$||void 0,config:{strategyType:K,strategyDescription:J,personality:t,riskLevel:et,tradingInterval:en,minOrderAmount:er,enableAutoExit:ec,takeProfitPercent:ei,stopLossPercent:ex,wickProtectionMs:1e3*eu,tradingEnabled:!1,compoundPercentage:60,buybackPercentage:30,buybackEnabled:!0,platformFeePercentage:10,minMarketsPerLoop:5,maxMarketsPerLoop:50,twitterConfig:{enabled:!0,postOnTrade:!0,postOnBuyback:!0,postOnPnlUpdate:!1,minConfidenceToPost:60,cooldownMinutes:15}}},n=await (0,j.x_)(s,e);if(!n.success){R(n.error||"Failed to create agent"),D(!1);return}ep(n.data),M("success")}catch(e){R(e instanceof Error?e.message:"An error occurred")}finally{D(!1)}},ev=()=>{"success"===P&&T(),M("details"),V(""),Y(""),z(null),H(null),W("crypto"),X(""),ee(""),es("medium"),ea(60),el(N),eo(!1),ed(40),em(25),eh(30),B(!1),ep(null),R(null),A()},ey=_.length>=2&&G.length>=2&&G.length<=10,ej=J.length>=10;return S?(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:ev}),(0,n.jsxs)("div",{className:"relative bg-surface-1 border border-border/50 w-full max-w-2xl max-h-[90vh] overflow-y-auto",style:{clipPath:"pol
1ygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px))"},children:[(0,n.jsx)("div",{className:"absolute top-0 right-0 w-6 h-6 bg-accent/30",style:{clipPath:"polygon(0 0, 100% 100%, 100% 0)"}}),(0,n.jsx)("div",{className:"absolute bottom-0 left-0 w-6 h-6 bg-accent/20",style:{clipPath:"polygon(0 0, 0 100%, 100% 100%)"}}),(0,n.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-border/30",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"w-10 h-10 bg-accent/20 border border-accent/30 flex items-center justify-center",children:(0,n.jsx)(o.Z,{className:"w-5 h-5 text-accent"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"font-display font-bold text-xl text-content-primary",children:"success"===P?"Agent Created!":"Create Agent"}),(0,n.jsxs)("p",{className:"text-sm text-content-tertiary",children:["details"===P&&"Basic information","config"===P&&"Trading configuration","review"===P&&"Review and confirm","success"===P&&"Save your credentials"]})]})]}),(0,n.jsx)("button",{onClick:ev,className:"p-2 hover:bg-surface-2 transition-colors",children:(0,n.jsx)(i.Z,{className:"w-5 h-5 text-content-tertiary"})})]}),"success"!==P&&(0,n.jsx)("div",{className:"flex items-center gap-2 px-6 py-4 border-b border-border/30",children:["details","config","review"].map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("div",{className:(0,y.cn)("w-8 h-8 flex items-center justify-center font-mono text-sm border",P===e?"bg-accent/20 border-accent/50 text-accent":["details","config","review"].indexOf(P)>t?"bg-neon/20 border-neon/30 text-neon":"bg-surface-2 border-border/30 text-content-tertiary"),children:["details","config","review"].indexOf(P)>t?(0,n.jsx)(d.Z,{className:"w-4 h-4"}):t+1}),t<2&&(0,n.jsx)(x.Z,{className:"w-4 h-4 text-content-tertiary"})]},e))}),(0,n.jsxs)("div",{className:"p-6",children:[L&&(0,n.jsxs)("div",{className:"mb-6 p-4 bg-loss/10 border border-loss/30 flex items-start gap-3",children:[(0,n.jsx)(m.Z,{className:"w-5 h-5 text-loss flex-shrink-0"}),(0,n.jsx)("p",{className:"text-sm text-loss",children:L})]}),"details"===P&&(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-xs font-mono text-content-tertiary block mb-2",children:"AVATAR (OPTIONAL)"}),(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsx)("button",{onClick:()=>{var e;return null===(e=F.current)||void 0===e?void 0:e.click()},className:(0,y.cn)("w-20 h-20 border-2 border-dashed flex items-center justify-center transition-colors","relative",q?"border-accent/50":"border-border/50 hover:border-accent/30"),style:{clipPath:"polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%)"},children:q?(0,n.jsx)(v.default,{src:q,alt:"Preview",fill:!0,className:"object-cover"}):(0,n.jsx)(u,{className:"w-6 h-6 text-content-tertiary"})}),(0,n.jsx)("input",{ref:F,type:"file",accept:"image/*",onChange:e=>{var t;let s=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!s)return;if(s.size>5242880){R("Image must be less than 5MB");return}let n=new FileReader;n.onloadend=()=>{let e=n.result;z(e),H(e)},n.readAsDataURL(s)},className:"hidden"}),(0,n.jsxs)("div",{className:"text-sm text-content-tertiary",children:[(0,n.jsx)("p",{children:"Upload an avatar for your agent"}),(0,n.jsx)("p",{className:"text-xs",children:"PNG, JPG, max 5MB"})]})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-xs font-mono text-content-tertiary block mb-2",children:"AGENT NAME *"}),(0,n.jsx)("input",{type:"text",value:_,onChange:e=>V(e.target.value),placeholder:"e.g., CryptoAlpha",maxLength:64,className:"w-full px-4 py-3 bg-surface-0 border border-border/50 focus:border-accent/50 outline-none font-mono text-content-primary"}),(0,n.jsxs)("div",{className:"text-xs text-content-tertiary mt-1 font-mono",children:[_.length,"/64"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-xs font-mono text-content-tertiary block mb-2",children:"TOKEN SYMBOL * (2-10 chars)"}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-content-tertiary font-mono",children:"$"}),(0,n.jsx)("input",{type:"text",value:G,onChange:e=>Y(e.target.value.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,10)),placeholder:"ALPHA",className:"w-full pl-8 pr-4 py-3 bg-surface-0 border border-border/50 focus:border-accent/50 outline-none font-mono text-content-primary uppercase"})]}),(0,n.jsx)("p",{className:"text-xs text-content-tertiary mt-1",children:"This will be your agent's token on Base (deployed via Clanker)"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-xs font-mono text-content-tertiary block mb-2",children:"STRATEGY TYPE *"}),(0,n.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:w.map(e=>(0,n.jsxs)("button",{onClick:()=>W(e.value),className:(0,y.cn)("p-3 border text-left transition-colors",K===e.value?"bg-accent/10 border-accent/50 text-accent":"bg-surface-0 border-border/30 text-content-secondary hover:border-accent/30"),children:[(0,n.jsx)("div",{className:"font-mono font-bold text-sm",children:e.label}),(0,n.jsx)("div",{className:"text-xs text-content-tertiary mt-1",children:e.description})]},e.value))})]})]}),"config"===P&&(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-xs font-mono text-content-tertiary block mb-2",children:"STRATEGY DESCRIPTION *"}),(0,n.jsx)("textarea",{value:J,onChange:e=>X(e.target.value),onBlur:e=>X((0,y.j9)(e.target.value)),onPaste:e=>{var t,s;e.preventDefault();let n=e.clipboardData.getData("text"),a=(0,y.j9)(n),r=e.currentTarget,l=null!==(t=r.selectionStart)&&void 0!==t?t:r.value.length,c=null!==(s=r.selectionEnd)&&void 0!==s?s:r.value.length,o=r.value;X("".concat(o.slice(0,l)).concat(a).concat(o.slice(c)))},placeholder:"Describe your agent's trading thesis and approach...",rows:4,maxLength:500,className:"w-full px-4 py-3 bg-surface-0 border border-border/50 focus:border-accent/50 outline-none font-mono text-sm text-content-primary resize-none"}),(0,n.jsx)("p",{className:"text-xs text-content-tertiary mt-1",children:"This guides Claude's trading decisions. Be specific about your market views."}),(0,n.jsxs)("div",{className:"text-xs text-content-tertiary mt-1 font-mono",children:[J.length,"/500"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-xs font-mono text-content-tertiary block mb-2",children:"RISK LEVEL"}),(0,n.jsx)("div",{className:"space-y-2",children:k.map(e=>(0,n.jsxs)("button",{onClick:()=>es(e.value),className:(0,y.cn)("w-full p-3 border text-left transition-colors flex items-center gap-3",et===e.value?"bg-accent/10 border-accent/50":"bg-surface-0 border-border/30 hover:border-accent/30"),children:[(0,n.jsx)("div",{className:(0,y.cn)("w-4 h-4 border-2 rounded-full flex items-center justify-center",et===e.value?"border-accent":"border-border"),children:et===e.value&&(0,n.jsx)("div",{className:"w-2 h-2 bg-accent rounded-full"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-mono font-bold text-sm text-content-primary",children:e.label}),(0,n.jsx)("div",{className:"text-xs text-content-tertiary",children:e.description})]})]},e.value))})]}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-xs font-mono text-content-tertiary block mb-2",children:"TRADING INTERVAL"}),(0,n.jsx)("select",{value:String(en),onChange:e=>ea(parseInt(e.target.value,10)),className:"w-full px-4 py-2.5 bg-surface-0 border border-border/50 focus:border-accent/50 outline-none font-mono text-content-primary",children:C.map(e=>(0,n.jsx)("option",{value:e.minutes,children:e.label},e.minutes))})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-xs font-mono text-content-tertiary block mb-2",children:"MIN PER TRADE (USDC)"}
1),(0,n.jsx)("input",{type:"number",value:er,onChange:e=>{let t=parseFloat(e.target.value);Number.isFinite(t)&&el(t)},onBlur:e=>{let t=parseFloat(e.target.value);el(Number.isFinite(t)?Math.max(N,t):N)},min:N,step:1,className:"w-full px-4 py-2.5 bg-surface-0 border border-border/50 focus:border-accent/50 outline-none font-mono text-content-primary"})]})]}),(0,n.jsxs)("div",{className:"p-4 bg-surface-0/50 border border-border/30",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-mono font-bold text-sm text-content-primary",children:"Auto Exit"}),(0,n.jsx)("div",{className:"text-xs text-content-tertiary",children:"Automatically close positions at targets"})]}),(0,n.jsx)("button",{onClick:()=>eo(!ec),className:(0,y.cn)("w-12 h-6 rounded-full transition-colors relative",ec?"bg-accent":"bg-surface-2"),children:(0,n.jsx)("div",{className:(0,y.cn)("w-5 h-5 bg-white rounded-full absolute top-0.5 transition-all",ec?"left-6":"left-0.5")})})]}),ec&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-xs font-mono text-content-tertiary block mb-2",children:"TAKE PROFIT %"}),(0,n.jsx)("input",{type:"number",value:ei,onChange:e=>ed(parseInt(e.target.value)||25),min:5,max:100,className:"w-full px-4 py-2.5 bg-surface-0 border border-border/50 focus:border-accent/50 outline-none font-mono text-content-primary"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-xs font-mono text-content-tertiary block mb-2",children:"STOP LOSS %"}),(0,n.jsx)("input",{type:"number",value:ex,onChange:e=>em(parseInt(e.target.value)||15),min:5,max:50,className:"w-full px-4 py-2.5 bg-surface-0 border border-border/50 focus:border-accent/50 outline-none font-mono text-content-primary"})]})]}),(0,n.jsxs)("div",{className:"mt-3",children:[(0,n.jsx)("label",{className:"text-xs font-mono text-content-tertiary block mb-2",children:"WICK PROTECTION (SECONDS)"}),(0,n.jsx)("input",{type:"number",value:eu,onChange:e=>{let t=parseInt(e.target.value);Number.isFinite(t)&&eh(Math.min(300,Math.max(0,t)))},min:0,max:300,step:1,className:"w-full px-4 py-2.5 bg-surface-0 border border-border/50 focus:border-accent/50 outline-none font-mono text-content-primary"}),(0,n.jsx)("p",{className:"text-xs text-content-tertiary mt-1",children:"Price must sustain breach before triggering. 0 = instant."})]})]})]})]}),"review"===P&&(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{className:"p-4 bg-surface-0/50 border border-border/30",children:[(0,n.jsx)("h3",{className:"font-mono font-bold text-sm text-content-primary mb-4",children:"AGENT SUMMARY"}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)("span",{className:"text-content-tertiary",children:"Name"}),(0,n.jsx)("span",{className:"font-mono text-content-primary",children:_})]}),(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)("span",{className:"text-content-tertiary",children:"Token"}),(0,n.jsxs)("span",{className:"font-mono text-content-primary",children:["$",G]})]}),(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)("span",{className:"text-content-tertiary",children:"Strategy"}),(0,n.jsx)("span",{className:"font-mono text-content-primary capitalize",children:K})]}),(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)("span",{className:"text-content-tertiary",children:"Risk Level"}),(0,n.jsx)("span",{className:"font-mono text-content-primary capitalize",children:et})]}),(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)("span",{className:"text-content-tertiary",children:"Interval"}),(0,n.jsxs)("span",{className:"font-mono text-content-primary",children:[en," min"]})]}),(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)("span",{className:"text-content-tertiary",children:"Min Per Trade"}),(0,n.jsxs)("span",{className:"font-mono text-content-primary",children:["$",er]})]})]})]}),(0,n.jsx)("div",{className:"p-4 bg-accent/5 border border-accent/20",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)(h.Z,{className:"w-5 h-5 text-accent flex-shrink-0"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm text-content-primary font-semibold",children:"What happens next:"}),(0,n.jsxs)("ul",{className:"text-sm text-content-secondary mt-2 space-y-1",children:[(0,n.jsx)("li",{children:"⢠Your agent's token will be deployed on Base via Clanker"}),(0,n.jsx)("li",{children:"⢠A Safe wallet will be created on Polygon for trading"}),(0,n.jsx)("li",{children:"⢠You'll get a deposit address to fund your agent"}),(0,n.jsx)("li",{children:"⢠Trading starts automatically once funded ($10+ USDC)"})]})]})]})})]}),"success"===P&&eb&&(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{className:"text-center py-4",children:[(0,n.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-neon/20 border border-neon/30 flex items-center justify-center",children:(0,n.jsx)(d.Z,{className:"w-8 h-8 text-neon"})}),(0,n.jsxs)("h3",{className:"font-display font-bold text-xl text-content-primary mb-2",children:[_," is ready!"]}),(0,n.jsx)("p",{className:"text-content-secondary",children:"Fund your agent to start trading."})]}),(0,n.jsxs)("div",{className:"p-4 bg-surface-0/50 border border-border/30",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,n.jsx)(b.Z,{className:"w-4 h-4 text-accent"}),(0,n.jsx)("span",{className:"font-mono font-bold text-sm text-content-primary",children:(null===(t=eb.depositAddresses)||void 0===t?void 0:t.evm)?"DEPOSIT ADDRESS (EVM)":"WALLET ADDRESS (POLYGON)"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 p-2 bg-surface-0 border border-border/30 mb-2",children:[(0,n.jsx)("code",{className:"text-sm font-mono text-content-secondary flex-1 truncate",children:(null===(s=eb.depositAddresses)||void 0===s?void 0:s.evm)||eb.depositAddress}),(0,n.jsx)("button",{onClick:()=>{var e;let t=(null==eb?void 0:null===(e=eb.depositAddresses)||void 0===e?void 0:e.evm)||(null==eb?void 0:eb.depositAddress);t&&(navigator.clipboard.writeText(t),O(!0),setTimeout(()=>O(!1),2e3))},className:"p-1.5 hover:bg-surface-2 transition-colors",children:I?(0,n.jsx)(d.Z,{className:"w-4 h-4 text-neon"}):(0,n.jsx)(p.Z,{className:"w-4 h-4 text-content-tertiary"})})]}),(0,n.jsx)("p",{className:"text-xs text-content-tertiary",children:(null===(l=eb.depositAddresses)||void 0===l?void 0:l.evm)?"Send USDC from supported EVM chains. It will bridge to Polygon as USDC.e (min $10; small deposits wonât show immediately).":"Send USDC.e directly on Polygon only. Bridge addresses loading..."})]}),(0,n.jsxs)("div",{className:"p-4 bg-surface-0/50 border border-border/30",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"font-mono font-bold text-sm text-content-primary",children:["$",G.toUpperCase()," Token"]}),(0,n.jsx)("div",{className:"text-xs text-content-tertiary",children:(null===(c=eb.token)||void 0===c?void 0:c.address)?(0,n.jsxs)("span",{className:"font-mono",children:[eb.token.address.slice(0,6),"...",eb.token.address.slice(-4)]}):"Deployed on Base via Clanker"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-neon/10 border border-neon/30",children:[(0,n.jsx)("div",{className:"w-2 h-2 bg-neon rounded-full"}),(0,n.jsx)("span",{className:"text-xs font-mono text-neon uppercase",children:"deployed"})]})]}),(null===(g=eb.token)||void 0===g?void 0:g.clankerUrl)&&(0,n.jsxs)("a",{href:eb.token.clankerUrl,target:"_blank",rel:"noopener noreferrer",className:"mt-3 flex items-center gap-2 text-xs text-accent hover:text-accent-600 transition-colors",children:[(0,n.jsx)(f.Z,{className:"w-3 h-3"}),"View on Clanker"]})]})]})]}),(0,n.jsxs)("div",{className:"p-6 border-t border-border/30",children:["review"===P&&(0,n.jsxs)("label",{className:"mb-4 flex items-start gap-3 cursor-pointer select-none",children:[(0,n.jsx)("input",{type:"checkbox",checked:U,onChange:e=>B(e.target.checked),className:"mt-0.5 h-4 w-4 border-border/50 bg-surface-0 text-accent focus:ring-accent/40"}),(0,n.jsx)("span",{className:"text-xs text-content-tertiary",children:"I understand that Polyclaw is not responsible for any losses my autonomous agent may incur while trading."})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between",children:["success"!==P&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{onClick:()=>{"config"===P?M("details"):"review"===P?M("config"):ev()},className:"px-4 py-2.5 border border-border/50 hover:border-accent/50 text-content-primary font-mono text-sm transition-colors",children:"details"===P?"Cancel":"Back"}),(0,n.jsx)("button",{onClick:()=>{"details"===P&&ey?M("config"):"config"===P&&ej?M("review"):"review"===P&&ef()},disabled:Z||"details"===P&&!ey||"config"===P&&!ej||"review"===P&&!U,className:"px-6 py-2.5 bg-accent hover:bg-accent-600 text-white font-mono text-sm transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:Z?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.Z,{className:"w-4 h-4 animate-spin"}),"Creating..."]}):"review"===P?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.Z,{className:"w-4 h-4"}),"Create Agent"]}):(0,n.jsxs)(n.Fragment,{children:["Continue",(0,n.jsx)(x.Z,{className:"w-4 h-4"})]})})]}),"success"===P&&(0,n.jsx)("div",{className:"flex items-center gap-3 w-full",children:(0,n.jsx)("button",{onClick:ev,className:"flex-1 px-4 py-2.5 bg-accent hover:bg-accent-600 text-white font-mono text-sm transition-colors",children:"Done"})})]})]})]})]}):null}},1836:function(e,t,s){s.d(t,{Z:function(){return n}});let n=(0,s(2389).Z)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},2966:function(e,t,s){s.d(t,{Z:function(){return n}});let n=(0,s(2389).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},30609:function(e,t,s){s.d(t,{Z:function(){return n}});let n=(0,s(2389).Z)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},24875:function(e,t,s){s.d(t,{Z:function(){return n}});let n=(0,s(2389).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},12439:function(e,t,s){s.d(t,{Z:function(){return n}});let n=(0,s(2389).Z)("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]])}}]);
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.