PageSourceSearch

https://www.xstable.ai/_next/static/chunks/512.114bf1b6c164fd24.js

js xstable.ai collected 2026-10-05 14:38:02 UTC 8,431 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[512],{70512:(e,t,s)=>{s.r(t),s.d(t,{default:()=>A});var l,a,r,i=s(80069),n=s(95702),c=s(87671),x=s(58205),d=s(20801),o=s(66926),m=s(70140);function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var l in s)({}).hasOwnProperty.call(s,l)&&(e[l]=s[l])}return e}).apply(null,arguments)}let h=function(e){return d.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,fill:"none"},e),l||(l=d.createElement("path",{fill:"#EA941D",d:"M10.6 6A4.6 4.6 0 1 0 6 10.6V12A6 6 0 1 1 6 0a6 6 0 0 1 0 12v-1.4A4.6 4.6 0 0 0 10.6 6"})),a||(a=d.createElement("path",{fill:"#EA941D",fillRule:"evenodd",d:"M6 3.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5m0 6A.75.75 0 0 1 5.25 9V5.25a.75.75 0 0 1 1.5 0V9a.75.75 0 0 1-.75.75",clipRule:"evenodd"})))};function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var l in s)({}).hasOwnProperty.call(s,l)&&(e[l]=s[l])}return e}).apply(null,arguments)}let f=function(e){return d.createElement("svg",u({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),r||(r=d.createElement("path",{fill:"#8D8E92",d:"M3.331 8.332a1.667 1.667 0 1 1-.001 3.333 1.667 1.667 0 0 1 .001-3.333M10.003 8.332a1.667 1.667 0 1 1-.001 3.333 1.667 1.667 0 0 1 0-3.333M16.667 8.332a1.667 1.667 0 1 1-.001 3.333 1.667 1.667 0 0 1 .001-3.333"})))};var j=s(79477),b=s(74649),N=s(34202),g=s(83046),v=s(76055),k=s(41886),y=s(83548),w=s(85784),C=s(42351),_=s(34733);function A(){let{t:e,i18n:t}=(0,o.Bd)(),s=(0,y.l)(e=>e.isMobile),l=(0,w.OJ)(e=>{var t;return null==(t=e.userConfig)?void 0:t.apiKeyMaxCount}),[a,r]=(0,d.useState)([]),[p,u]=(0,d.useState)(!0),[A,E]=(0,d.useState)(!1),{showDeleteApikeyDialog:K,showApikeyActionDialog:V}=(0,v.s)(),O=(0,n.useRouter)(),M=e=>{K(e,()=>{u(!0),T()})},S=e=>{sessionStorage.setItem(C.VX,JSON.stringify(e)),O.push("/api/create")},T=()=>{(0,m.oP)().then(e=>{e&&r(e)}).finally(()=>{u(!1)})};(0,d.useEffect)(()=>{T()},[]);let D=a.length<(null!=l?l:0),P=D?"bg-text-dark opacity-100 text-affiliate-search-text cursor-pointer":"bg-text-dark opacity-40 text-affiliate-search-text cursor-not-allowed",R=()=>{if(!D)return void(0,k.P0)("warn",e("api.create_limit_toast",{num:null!=l?l:0}),k.KW);sessionStorage.removeItem(C.VX),O.push("/api/create")};return(0,i.jsx)("div",{className:"w-full flex justify-center h-[calc(100svh-122px)] md:h-[calc(100vh-112px)] overflow-y-scroll",children:(0,i.jsxs)("div",{className:"w-full md:w-[1316px] mt-4 md:mt-8 relative px-4 ",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center",children:[(0,i.jsx)("span",{className:"text-[24px] md:text-[32px] font-semibold text-text-dark",children:e("api.key_manager")}),(0,i.jsx)("div",{className:"hidden md:flex items-center font-medium text-base rounded-[20px] h-10 px-6 ".concat(P),onClick:R,children:e("api.create_key")})]}),s&&!A?(0,i.jsxs)("div",{className:"flex items-center bg-block-background rounded-[12px] p-4 text-text-dark text-sm md:text-[13px] mt-4 md:mt-8 cursor-pointer",onClick:()=>E(!0),children:[(0,i.jsx)(h,{className:"shrink-0"}),(0,i.jsx)("div",{className:"ml-1.5 min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,i.jsx)(o.x6,{i18nKey:"api.hint_content",components:{white:(0,i.jsx)("span",{className:"text-main-color cursor-pointer",onClick:_.LH})}})}),(0,i.jsx)(j.A,{className:"ml-2 shrink-0 fill-current text-text-light"})]}):(0,i.jsxs)("div",{className:"relative flex flex-col bg-block-background rounded-[12px] p-4 text-text-dark text-sm md:text-[13px] leading-tight gap-0.5 mt-4 md:mt-8",children:[(0,i.jsxs)("div",{className:"flex ",children:[(0,i.jsx)(h,{className:"shrink-0 mt-0.5"}),(0,i.jsx)("div",{className:" ml-1.5 ",children:(0,i.jsx)(o.x6,{i18nKey:"api.hint_content",components:{white:(0,i.jsx)("span",{className:"text-main-color cursor-pointer",onClick:_.LH})}})})]}),(0,i.jsxs)("div",{className:"flex ml-4",children:[(0,i.jsx)("span",{children:"1."}),(0,i.jsx)("span",{children:e("api.hint_des1",{num:null!=l?l:0})})]}),(0,i.jsxs)("div",{className:"flex ml-4",children:[(0,i.jsx)("span",{children:"2."}),(0,i.jsx)("span",{children:e("api.hint_des2")})]}),(0,i.jsxs)("div",{className:"flex ml-4",children:[(0,i.jsx)("span",{children:"3."}),(0,i.jsx)("span",{children:e("api.hint_des3")})]}),s&&(0,i.jsx)(j.A,{className:"absolute right-4 bottom-4 shrink-0 rotate-180 fill-current text-text-light cursor-pointer",onClick:()=>E(!1)})]}),s&&(0,i.jsx)("div",{className:"flex items-center justify-center font-medium text-base rounded-[8px] h-10 px-6 mt-4 ".concat(P),onClick:R,children:e("api.create_key")}),p?(0,i.jsx)("div",{className:"text-text-dark h-[200px] flex items-center justify-center",children:(0,i.jsx)(g.A,{className:"w-12 h-12"})}):a.length<=0?(0,i.jsx)("div",{className:"text-text-dark w-full h-[200px] mt-[6%] flex items-center justify-center",children:(0,i.jsx)(N.A,{text:e("api.no_data")})}):s?(0,i.jsx)("div",{className:"w-full flex flex-col items-center gap-4 mt-10 pb-4",children:a.map(t=>(0,i.jsxs)("div",{className:"w-full flex flex-col border border-panel-border-color roun
1ded-[12px] p-4",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("span",{className:"text-sm text-text-dark font-medium",children:t.name}),(0,i.jsx)(f,{onClick:()=>{V(t,()=>{T()})}})]}),(0,i.jsx)("div",{className:"border-t border-panel-border-color w-full mt-4"}),(0,i.jsxs)("div",{className:"flex items-center justify-between mt-4",children:[(0,i.jsx)("span",{className:"text-text-light text-sm",children:e("api.create_time")}),(0,i.jsx)("span",{className:"text-text-dark text-sm",children:(0,_._b)(t.createdTime)})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between mt-4",children:[(0,i.jsx)("span",{className:"text-text-light text-sm",children:"Key"}),(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("span",{className:"text-text-dark text-sm",children:(0,_.oF)(t.apiKey)}),(0,i.jsx)(b.A,{className:"cursor-pointer text-text-light",onClick:()=>(0,_.Dk)(t.apiKey)})]})]})]},t.id))}):(0,i.jsx)("div",{className:"relative h-full w-full customer-table mt-8",children:(0,i.jsxs)(x.b,{value:a,pt:{wrapper:()=>({className:"border border-panel-border-color rounded-[12px]"}),thead:()=>({className:"!bg-main-background !border-b !border-panel-border-color"})},children:[(0,i.jsx)(c.V,{body:e=>(0,i.jsx)("div",{className:"flex text-text-dark",children:e.name}),header:e("api.api_remark"),style:{width:"20%"},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !rounded-tl-lg !rounded-bl-lg !pl-4 !pr-2"}),bodyCell:()=>({className:"text-text-light text-sm !h-[70px] !pl-4 !pr-2"})}}),(0,i.jsx)(c.V,{body:e=>(0,i.jsx)("div",{className:"flex relative h-[50px] items-center text-text-dark",children:(0,_._b)(e.createdTime)}),header:e("api.create_time"),style:{width:"30%"},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !p-2"}),bodyCell:()=>({className:"text-text-light text-sm !h-[70px] !p-2"})}}),(0,i.jsx)(c.V,{body:e=>(0,i.jsxs)("div",{className:"flex items-center text-text-dark gap-1.5",children:[(0,_.oF)(e.apiKey),(0,i.jsx)(b.A,{className:"cursor-pointer text-text-light",onClick:()=>(0,_.Dk)(e.apiKey)})]}),header:"Key",pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !p-2"}),bodyCell:()=>({className:"text-text-light text-sm !h-[70px] !p-2"})}}),(0,i.jsx)(c.V,{body:t=>(0,i.jsxs)("div",{className:"flex items-center text-xs text-text-dark font-medium w-full justify-end gap-2.5",children:[(0,i.jsx)("span",{className:"bg-block-background rounded-full px-4 py-1.5 cursor-pointer",onClick:()=>M(t),children:e("api.action_delete")}),(0,i.jsx)("span",{className:"bg-block-background rounded-full px-4 py-1.5 flex-shrink-0 cursor-pointer",onClick:()=>S(t),children:e("api.action_detail")})]}),header:e("trade.action"),style:{width:"15%"},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !rounded-tr-lg !rounded-br-lg !pr-4 !pl-2"}),headerContent:()=>({className:"flex justify-end"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px] !pr-4 !pl-2"})}})]},t.language)})]})})}}}]);

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.