PageSourceSearch

https://alpha-engine-zama.vercel.app/_next/static/chunks/app/layout-de15f2b1b67d075f.js

js alpha-engine-zama.vercel.app collected 2026-10-03 06:15:27 UTC 12,316 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{4249:(e,t,i)=>{"use strict";i.d(t,{Toaster:()=>o});var s=i(95155),n=i(5379),r=i(18720);let o=e=>{let{...t}=e,{theme:i="system"}=(0,n.D)();return(0,s.jsx)(r.l$,{theme:i,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})}},11169:(e,t,i)=>{Promise.resolve().then(i.t.bind(i,28963,23)),Promise.resolve().then(i.bind(i,69582)),Promise.resolve().then(i.bind(i,89379)),Promise.resolve().then(i.bind(i,53671)),Promise.resolve().then(i.bind(i,48614)),Promise.resolve().then(i.bind(i,4249)),Promise.resolve().then(i.bind(i,33627)),Promise.resolve().then(i.bind(i,85283)),Promise.resolve().then(i.bind(i,22764)),Promise.resolve().then(i.t.bind(i,93836,23))},48614:(e,t,i)=>{"use strict";i.d(t,{Web3Provider:()=>c});var s=i(95155),n=i(74852),r=i(99776),o=i(65465),a=i(56293),l=i(12115);function c(e){let{children:t}=e,[i]=(0,l.useState)(()=>new n.E({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}));return(0,s.jsx)(o.x,{config:a.G,children:(0,s.jsx)(r.Ht,{client:i,children:t})})}},53671:(e,t,i)=>{"use strict";i.d(t,{NetworkWarning:()=>c});var s=i(95155),n=i(18332),r=i(3998),o=i(25813),a=i(93195),l=i(52056);function c(){let{isConnected:e,requiresNetworkSwitch:t,targetChainId:i,currentChainId:c}=(0,o.v)(),{switchChain:d,isPending:h,error:g}=(0,a.R)();return e&&t?(0,s.jsx)("div",{className:"px-6 pb-6",children:(0,s.jsxs)(n.Fc,{className:"flex flex-col gap-3 rounded-lg border border-[#03DAC6]/30 bg-[#03DAC6]/10 px-5 py-4 shadow-sm backdrop-blur-sm",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)(l.A,{className:"mt-0.5 h-4 w-4 text-[#03DAC6]"}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(n.XL,{className:"text-sm font-semibold text-foreground",children:"Switch to Sepolia"}),(0,s.jsxs)(n.TN,{className:"text-sm text-muted-foreground leading-relaxed",children:["AlphaEngine is configured for the Sepolia testnet (chain ID 11155111).",c&&c!==i&&(0,s.jsxs)("span",{className:"ml-1 text-xs text-[#03DAC6]/80",children:["Detected chain: ",c,"."]})," ","Switch networks before requesting tokens or signing encrypted transactions."]})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 pl-7",children:[(0,s.jsx)(r.$,{size:"sm",variant:"outline",className:"border-[#03DAC6]/40 text-[#03DAC6] hover:bg-[#03DAC6]/10",onClick:()=>{try{d({chainId:i})}catch(e){console.error("Failed to trigger chain switch:",e)}},disabled:h,children:h?"Switching...":"Switch to Sepolia"}),g&&(0,s.jsx)("span",{className:"text-xs text-[#03DAC6]/70",children:g instanceof Error?g.message:"Switch request declined."})]})]})}):null}},69582:(e,t,i)=>{"use strict";i.d(t,{ActivityLoggerClient:()=>o});var s=i(12115);let n="next-api-call";class r{generateSessionId(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,10))}getCorrelationId(){return"corr-".concat(this.correlationCounter++,"-").concat(Date.now())}consumePendingCorrelation(){let e=this.pendingCorrelations.get(n);return e&&this.pendingCorrelations.delete(n),e}setupInterceptors(){this.setupClickInterceptor(),this.setupFetchInterceptor(),this.config.captureErrors&&this.setupErrorInterceptor()}setupClickInterceptor(){let e=e=>{var t;if(!this.isActive)return;let i=e.target;if(!i)return;let s=this.getCorrelationId();this.pendingCorrelations.set(n,s),setTimeout(()=>this.pendingCorrelations.delete(n),1500);let r={type:"click",timestamp:new Date().toISOString(),sessionId:this.sessionId,page:window.location.pathname,element:{tag:i.tagName.toLowerCase(),id:i.id||void 0,className:i.className||void 0,text:(null==(t=i.innerText)?void 0:t.slice(0,120))||void 0,href:(null==i?void 0:i.href)||void 0,dataset:i.dataset?Object.fromEntries(Object.entries(i.dataset).filter(e=>{let[,t]=e;return void 0!==t})):void 0,position:{x:e.clientX,y:e.clientY}},viewport:{width:window.innerWidth,height:window.innerHeight},correlationId:s};this.log(r)};document.addEventListener("click",e,!0)}setupFetchInterceptor(){var e=this;let t=e=>e.includes(this.config.logEndpoint);window.fetch=async function(){for(var i,s=arguments.length,n=Array(s),r=0;r<s;r++)n[r]=arguments[r];if(!e.isActive)return e.originalFetch(...n);let[o,a]=n,l="string"==typeof o?o:o instanceof URL?o.toString():o instanceof Request?o.url:String(o);if(t(l))return e.originalFetch(...n);let c=null!=(i=null==a?void 0:a.method)?i:"GET",d=Date.now(),h=e.consumePendingCorrelation(),g={url:l,method:c,headers:e.serializeHeaders(null==a?void 0:a.headers),body:e.config.captureNetworkBodies?null==a?void 0:a.body:void 0,timestamp:d};try{let t,i=await e.originalFetch(...n),s=Date.now()-d,r=i.clone();if(e.config.captureNetworkBodies)try{let e=i.headers.get("content-type");t=(null==e?void 0:e.includes("application/json"))?await r.json():await r.text()}catch(e){t="[body parse failed: ".concat(e.message,"]")}let o={type:"api",timestamp:new Date().toISOString(),sessionId:e.sessionId,page:window.location.pathname,request:g,response:{status:i.status,statusText:i.statusText,headers:Object.fromEntries(i.headers.entries()),body:t,timestamp:Date.now(),duration:s},correlationId:h};return e.log(o),i}catch(i){let t={type:"api",timestamp:new Date().toISOString(),sessionId:e.sessionId,page:window.location.pathname,request:g,error:i instanceof Error?i.message:String(i),correlationId:h};throw e.log(t),i}};let i=XMLHttpRequest,s=i.prototype.open,n=i.prototype.send,r=()=>this;i.prototype.open=function(){for(var e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];let[r,o]=i;return this._method=r,this._url=o,this._startTime=Date.now(),this._skipLogging=t(o),s.apply(this,i)},i.prototype.send=function(){for(var e,t,i,s=arguments.length,o=Array(s),a=0;a<s;a++)o[a]=arguments[a];let[l]=o,c=this,d=r();if(c._skipLogging)return n.apply(this,o);let h=d.consumePendingCorrelation(),g={url:null!=(e=c._url)?e:"",method:null!=(t=c._method)?t:"GET",body:d.config.captureNetworkBodies&&null!=l?l:void 0,timestamp:null!=(i=c._startTime)?i:Date.now()};return this.addEventListener("load",()=>{if(!d.isActive||c._skipLogging)return;let e={status:this.status,statusText:this.statusText,body:d.config.captureNetworkBodies?this.responseText:void 0,headers:{},timestamp:Date.now(),duration:c._startTime?Date.now()-c._startTime:0},t={type:"api",timestamp:new Date().toISOString(),sessionId:d.sessionId,page:window.location.pathname,request:g,response:e,correlationId:h};d.log(t)}),this.addEventListener("error",()=>{if(!d.isActive||c._skipLogging)return;let e={type:"api",timestamp:new Date().toISOString(),sessionId:d.sessionId,page:window.location.pathname,request:g,error:"XMLHttpRequest failed",correlationId:h};d.log(e)}),n.apply(this,o)}}setupErrorInterceptor(){window.addEventListener("error",e=>{var t;if(!this.isActive)return;let i={type:"error",timestamp:new Date().toISOString(),sessionId:this.sessionId,page:window.location.pathname,error:{message:e.message,stack:null==(t=e.error)?void 0:t.stack,source:"".concat(e.filename,":").concat(e.lineno,":").concat(e.colno)}};this.log(i)}),window.addEventListener("unhandledrejection",e=>{if(!this.isActive)return;let t=e.reason,i={type:"error",timestamp:new Date().toISOString(),sessionId:this.sessionId,page:window.location.pathname,error:{message:"string"==typeof t?"Unhandled rejection: ".concat(t):"Unhandled rejection: ".concat(t.message),stack:"string"==typeof t?void 0:t.stack}};this.log(i)})}serializeHeaders(e){if(e)return e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):Object.fromEntries(Object.entries(e).map(e=>{let[t,i]=e;return[t,String(i)]}))}log(e){this.isActive&&(this.config.debug&&console.debug("[ActivityLogger]",e.type,e),this.buffer.push(e),this.buffer.length>=this.config.batchSize&&this.flush())}logCustom(e,t,i,s,n){let r={type:"custom",timestamp:new Date().toISOString(),sessionId:this.sessionId,page:window.location.pathname,data:{level:e,category:t,message:i,context:s},correlationId:n};this.log(r)}async flush(){if(0===this.buffer.length)return;let e=[...this.buffer];this.buffer=[];try{let t=JSON.stringify({sessionId:this.sessionId,logs:e},r.safeJsonReplacer);
1if(navigator.sendBeacon){let e=new Blob([t],{type:"application/json"});navigator.sendBeacon(this.config.logEndpoint,e)}else await this.originalFetch(this.config.logEndpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:t,keepalive:!0})}catch(t){this.config.debug&&console.error("[ActivityLogger] flush failed",t),this.buffer.unshift(...e)}}startFlushTimer(){this.flushTimer&&clearInterval(this.flushTimer),this.flushTimer=setInterval(()=>{this.buffer.length>0&&this.flush()},this.config.flushInterval)}pause(){this.isActive=!1}resume(){this.isActive=!0}destroy(){this.flushTimer&&clearInterval(this.flushTimer),window.fetch=this.originalFetch,window.__ALPHA_ACTIVITY_LOGGER__=void 0,this.flush()}getSessionId(){return this.sessionId}static safeJsonReplacer(e,t){return"bigint"==typeof t?t.toString():t instanceof Map?Object.fromEntries(t.entries()):t instanceof Set?Array.from(t.values()):t instanceof Error?{name:t.name,message:t.message,stack:void 0}:t}constructor(e){this.buffer=[],this.flushTimer=null,this.isActive=!0,this.correlationCounter=0,this.pendingCorrelations=new Map,this.config={flushInterval:4e3,batchSize:40,sessionId:this.generateSessionId(),logEndpoint:"/api/activity-logs",captureNetworkBodies:!0,captureErrors:!0,debug:!1,...e},this.sessionId=this.config.sessionId,this.originalFetch=window.fetch.bind(window),this.setupInterceptors(),this.startFlushTimer(),window.__ALPHA_ACTIVITY_LOGGER__=this,this.config.debug&&console.log("[ActivityLogger] Initialized",{sessionId:this.sessionId,logEndpoint:this.config.logEndpoint})}}function o(){var e;return e=(0,s.useMemo)(()=>({logEndpoint:"/api/activity-logs",captureNetworkBodies:!0,captureErrors:!0}),[]),(0,s.useEffect)(()=>{let t=(window.__ALPHA_ACTIVITY_LOGGER__||(window.__ALPHA_ACTIVITY_LOGGER__=new r(e)),window.__ALPHA_ACTIVITY_LOGGER__),i=()=>{"hidden"===document.visibilityState&&t.flush()},s=()=>{t.flush()};return window.addEventListener("visibilitychange",i),window.addEventListener("beforeunload",s),()=>{window.removeEventListener("visibilitychange",i),window.removeEventListener("beforeunload",s)}},[e]),null}},89379:(e,t,i)=>{"use strict";i.d(t,{Navigation:()=>g});var s=i(95155),n=i(12115),r=i(3998),o=i(52619),a=i.n(o),l=i(20063),c=i(15239),d=i(25813),h=i(35299);function g(){let e=(0,l.usePathname)(),{address:t,isConnected:i,connect:o,disconnect:g,isInitializing:p,isCofheReady:u}=(0,d.v)(),[m,f]=(0,n.useState)(!1);(0,n.useEffect)(()=>{f(!0)},[]);let v=m&&i&&t?"".concat(t.slice(0,6),"...").concat(t.slice(-4)):"Connect Wallet",w=m&&p,b=m&&i&&u;return(0,s.jsx)("nav",{className:"border-b border-border/50 bg-card/50 backdrop-blur-sm sticky top-0 z-50",children:(0,s.jsxs)("div",{className:"container mx-auto px-6 h-16 flex items-center justify-between",children:[(0,s.jsxs)(a(),{href:"/",className:"flex items-center gap-2",children:[(0,s.jsx)(c.default,{src:"/logo.png",alt:"AlphaEngine Logo",width:60,height:60,className:"w-12 h-12"}),(0,s.jsx)("span",{className:"tracking-tight text-foreground",children:"AlphaEngine"})]}),(0,s.jsx)("div",{className:"flex items-center gap-1",children:[{id:"/",label:"Overview"},{id:"/swap",label:"Private Swap"},{id:"/strategies",label:"Private Strategy"}].map(t=>(0,s.jsxs)(a(),{href:t.id,className:"px-4 py-2 relative transition-colors ".concat(e===t.id?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[t.label,e===t.id&&(0,s.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-[#03DAC6]"})]},t.id))}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[w&&(0,s.jsxs)("span",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[(0,s.jsx)(h.A,{className:"w-3 h-3 animate-spin"}),"Initializing FHE..."]}),b&&(0,s.jsx)("span",{className:"text-xs text-[#03DAC6]",children:"FHE Ready"}),(0,s.jsx)(r.$,{variant:"outline",className:"border-[#03DAC6]/30 text-[#03DAC6] hover:bg-[#03DAC6]/10 hover:text-[#03DAC6]",onClick:()=>{m&&(i?g():o())},disabled:!m,children:v})]})]})})}},93836:()=>{}},e=>{e.O(0,[557,475,620,304,239,473,619,329,50,3,441,255,358],()=>e(e.s=11169)),_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.