1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[18883],{14734:(e,t,l)=>{l.d(t,{F:()=>n});var a=l(12115),r=l(32140);function n(e){let{notifications:t,isConnected:l,clearNotifications:n,initSocket:s,disconnectSocket:i,emit:o}=(0,r.U)();(0,a.useEffect)(()=>{e&&s(e)},[e,s]);let d=(0,a.useCallback)((e,t,l)=>{o(e,t,l)},[o]);return{socket:null,notifications:t,isConnected:l,emit:d,disconnect:(0,a.useCallback)(()=>{i()},[i]),clearNotifications:(0,a.useCallback)(()=>n(),[n])}}},17262:(e,t,l)=>{l.d(t,{EU:()=>o,Eh:()=>x,N4:()=>c,fI:()=>d});var a=l(95155),r=l(12115),n=l(67907),s=l(41968);let i=(0,r.createContext)(null),o=e=>{let{children:t}=e,l=(0,s.O)();return(0,a.jsx)(i.Provider,{value:l,children:t})},d=()=>{let e=(0,r.useContext)(i);if(!e)throw Error("useShiftSelectContext must be used within ShiftSelectProvider");return e},c=e=>{let{row:t,table:l}=e,{handleClick:r}=d();return(0,a.jsx)("div",{className:"checkbox-container","data-checkbox":!0,onClick:r(t,l),children:(0,a.jsx)(n._,{disabled:!t.getCanSelect(),checked:t.getIsSelected()})})},x=e=>{let{table:t}=e,{resetAnchor:l}=d();return(0,a.jsx)(n._,{checked:t.getIsAllRowsSelected(),onCheckedChange:e=>{t.getToggleAllRowsSelectedHandler()({target:{checked:e}}),l()}})}},18883:(e,t,l)=>{l.r(t),l.d(t,{default:()=>z});var a=l(95155),r=l(75221),n=l(87568),s=l(87415),i=l(17527),o=l(40789),d=l(26767),c=l(64269),x=l(72264),u=l(17262),m=l(50832),p=l(16688),f=l(94166);function g(e){var t,l,r,n,s;let{table:i,mutate:o,isValidating:d}=e,g=null==(s=i.getCoreRowModel().rows[0])||null==(n=s.original)||null==(r=n.proxy)||null==(l=r.ipaddress)||null==(t=l.provider)?void 0:t.trim().toUpperCase();return(0,a.jsx)(u.EU,{children:(0,a.jsx)(p.b,{table:i,heading:"Danh s\xe1ch ÄÆ¡n h\xe0ng proxy ".concat("US"===g||"CMC"===g?"Datacenter":"tÄ©nh"),WaitingProxies:function(e){let{table:t,mutate:l,isValidating:r}=e,n=t.getFilteredRowModel().rows.filter(e=>{var t,l;return 11===Number(null==(l=e.original)||null==(t=l.status)?void 0:t.id)}).length;return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-5",children:[(0,a.jsxs)("p",{className:"text-[16px] leading-[22px] font-semibold tracking-[0] text-[#535355]",children:["C\xf3 ",(0,a.jsx)("span",{className:"text-primary",children:" ".concat(n," ")}),"proxy Äang chá»"]}),(0,a.jsxs)(m.$,{type:"button",onClick:async()=>{(()=>{let{columnFilters:e,globalFilter:l}=t.getState();return!!(null==l?void 0:l.trim())||e.length>0})()||(t.resetSorting(),t.resetColumnFilters(),t.resetGlobalFilter(),t.resetPagination()),await l()},className:"!border-primary h-[36px] w-full max-w-[96px] items-center gap-2 rounded-[100px] !border-1 !bg-transparent p-2",children:[(0,a.jsx)(x.F.RefreshIcon,{className:(0,c.cn)("text-primary !h-6 !w-6 transition-transform duration-300",r&&"animate-spin")}),(0,a.jsx)("span",{className:"text-primary text-sm font-semibold whitespace-nowrap",children:"Tạo lại"})]})]})}({table:i,mutate:o,isValidating:d}),hideViewToggle:!0,cardClassName:"w-full max-w-[var(--template-3-content-max-width,1230px)]",tableContainerClassName:"h-[min(420px,calc(100dvh-20rem))] min-h-[280px] sm:min-h-[360px] sm:h-[500px] lg:h-[600px] 2xl:h-[492px]",bodyCellClassName:"py-2 sm:py-2",children:(0,a.jsx)(f.w,{table:i,toolbarCustomProxy:"proxies",className:"!rounded-none !bg-transparent !shadow-none sm:!rounded-none"})})})}var h=l(35610),v=l(97453),b=l(12115),w=l(47377),j=l(87527),y=l(70682),N=l(42348),k=l(18720),C=l(15239);let S=e=>{navigator.clipboard.writeText(e).then(()=>{k.toast.success("Copied to clipboard!",{description:e,duration:5e3})}).catch(()=>{k.toast.error("Failed to copy")})},P=e=>{var t,l,r,n,i;let{proxy:o,initialStatus:d,rowId:c,code:u,prevIp:m,createdAt:p}=e,f="proxy_new_seen_tokens",{notifications:g}=(0,s.E)(),[h,v]=(0,b.useState)(d);(0,b.useEffect)(()=>{v(d)},[d,u]);let j=g.find(e=>e.code==u);(0,b.useEffect)(()=>{(null==j?void 0:j.status)&&v(j.status)},[null==j||null==(t=j.status)?void 0:t.id,u]);let y=()=>{try{let e=localStorage.getItem(f);return e?JSON.parse(e):{}}catch(e){return{}}},[C,S]=(0,b.useState)(()=>{var e;let t=y();return null!=(e=null==t?void 0:t[u||c])?e:null}),P="".concat(null!=(i=null==o?void 0:o.ipIn)?i:null==o||null==(l=o.ipaddress)?void 0:l.ip,":").concat(null==o?void 0:o.port,":").concat(null==o?void 0:o.username,":").concat(null==o?void 0:o.password),I=(null==o||null==(r=o.ipaddress)?void 0:r.changeIpAt)?new Date(o.ipaddress.changeIpAt):null,A=p?new Date(p):null,F=!!(I&&A&&I.getTime()>A.getTime()),D=!1;if(C){let e=new Date(C);D=!!(I&&I.getTime()>e.getTime()&&A&&I.getTime()>A.getTime())}else D=!!m||F;let V=()=>
1{if(D){let e=y(),t=new Date().toISOString();e[u||c]=t;try{localStorage.setItem(f,JSON.stringify(e))}catch(e){}S(t)}};if(!o)return(0,a.jsx)("div",{className:"flex gap-2",children:(0,a.jsx)("p",{className:"text-primary",children:"Vui l\xf2ng nhấn Tạo lại Proxy Äá» tạo lại!"})});switch(null==h||null==(n=h.id)?void 0:n.toString()){case"6":return(0,a.jsxs)(w.m_,{children:[(0,a.jsx)(w.k$,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-4",onClick:V,children:[(0,a.jsx)("p",{className:"min-w-0 flex-1 overflow-hidden text-[14px] leading-5 font-normal tracking-[0] text-ellipsis whitespace-nowrap text-[#007AFF] underline decoration-solid underline-offset-2",children:P}),(0,a.jsx)(x.F.CopyIcon,{onClick:()=>(e=>{navigator.clipboard.writeText(e).then(()=>{k.toast.success("Copied to clipboard!",{description:e,duration:5e3})}).catch(()=>{k.toast.error("Failed to copy")})})(P),className:"hover:text-icon-template-3/120 text-icon-template-3 !h-6 !w-6 shrink-0 underline hover:cursor-pointer"}),D&&(0,a.jsx)("span",{className:"my-auto rounded bg-green-100 px-2 py-0.5 text-xs text-green-700",children:"new"})]})}),(0,a.jsx)(w.ZI,{side:"top",align:"center",className:"bg-[#DF3B30] text-white",arrowClassName:"bg-[#DF3B30] fill-[#DF3B30]",children:P})]});case"10":case"11":return(0,a.jsxs)("div",{className:"flex gap-2",onClick:V,children:[(0,a.jsx)("p",{className:"text-primary",children:"Vui l\xf2ng nhấn Tạo lại Proxy Äá» tạo lại!"}),D&&(0,a.jsx)("span",{className:"my-auto rounded bg-green-100 px-2 py-0.5 text-xs text-green-700",children:"new"})]});default:return(0,a.jsxs)("div",{className:"flex items-center gap-2 whitespace-nowrap",onClick:V,children:[(0,a.jsx)(N.A,{className:"text-primary size-5 shrink-0 animate-spin"}),(0,a.jsx)("div",{className:"flex flex-row gap-1",children:(0,a.jsx)("span",{children:"Vui l\xf2ng chá»"})}),D&&(0,a.jsx)("span",{className:"my-auto rounded bg-green-100 px-2 py-0.5 text-xs text-green-700",children:"new"})]})}},I=e=>{var t,l;let{proxy:r}=e,n="".concat(null!=(l=null==r?void 0:r.ipIn)?l:null==r||null==(t=r.ipaddress)?void 0:t.domain,":").concat(null==r?void 0:r.port,":").concat(null==r?void 0:r.username,":").concat(null==r?void 0:r.password);return(0,a.jsxs)(w.m_,{children:[(0,a.jsx)(w.k$,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-4",children:[(0,a.jsx)("p",{className:"min-w-0 flex-1 overflow-hidden text-[14px] leading-5 font-normal tracking-[0] text-ellipsis whitespace-nowrap text-[#007AFF] underline decoration-solid underline-offset-2",children:n}),(0,a.jsx)(x.F.CopyIcon,{onClick:()=>S(n),className:"hover:text-icon-template-3/120 text-icon-template-3 !h-6 !w-6 shrink-0 underline hover:cursor-pointer"})]})}),(0,a.jsx)(w.ZI,{side:"top",align:"center",className:"bg-[#DF3B30] text-white",arrowClassName:"bg-[#DF3B30] fill-[#DF3B30]",children:n})]})},A=[{id:"select",header:e=>{let{table:t}=e;return(0,a.jsx)(u.Eh,{table:t})},cell:e=>{let{row:t,table:l}=e;return(0,a.jsx)(u.N4,{row:t,table:l})},size:40,maxSize:40,minSize:40},{header:()=>(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full text-left text-[14px] leading-5 font-medium tracking-[0]",children:"ID"}),id:"Code",accessorKey:"code",cell:e=>{let{row:t}=e;return(0,a.jsx)("span",{className:"text-text-normal-template-3 flex w-full items-center justify-start text-[14px] leading-5 font-normal",children:t.getValue("Code")})},size:90,meta:{label:"ID",placeholder:"Nháºp ID",variant:"text"},enableColumnFilter:!0},{cell:e=>{var t,l,r;let{row:n}=e;return(0,a.jsx)("span",{className:"text-text-normal-template-3 flex w-full items-center justify-start text-[14px] leading-5 font-normal",children:null!=(r=null==(l=n.original)||null==(t=l.order)?void 0:t.code)?r:""})},id:"filter-ord.code",accessorKey:"order.code",size:130,header:()=>(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full text-left text-[14px] leading-5 font-medium tracking-[0]",children:"M\xe3 ÄÆ¡n h\xe0ng"}),meta:{label:"M\xe3 ÄÆ¡n h\xe0ng",placeholder:"Nháºp m\xe3 ÄÆ¡n h\xe0ng",variant:"text"},enableColumnFilter:!0},{header:()=>(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full text-left text-[14px] leading-5 font-medium tracking-[0]",children:"ID cÅ©"}),id:"ID cÅ©",accessorKey:"id",cell:e=>{let{row:t}=e;return(0,a.jsx)("span",{className:"text-text-normal-template-3 flex w-full items-center justify-start text-[14px] leading-5 font-normal",children:t.getValue("ID cÅ©")})},size:60},{header:()=>(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full text-left text-[14px] leading-5 font-medium tracking-[0]",children:"Nh\xe0 mạng"}),id:"Provider",accessorKey:"proxy",meta:{label:"Nh\xe0 mạng"},cell:e=>{var t,l,r;let{cell:n}
1=e,s=null==(r=n.getValue())||null==(l=r.ipaddress)||null==(t=l.provider)?void 0:t.trim().toLowerCase();if("viettel"===s)return(0,a.jsx)("span",{className:"flex h-[22px] w-full items-center justify-start text-base font-bold text-[#ed0031]",children:"VIETTEL"});if("fpt"===s)return(0,a.jsxs)("div",{className:"flex w-full items-center justify-start gap-0",children:[(0,a.jsx)("span",{className:"flex h-[22px] items-center text-base font-bold text-[#084c96]",children:"F"}),(0,a.jsx)("span",{className:"flex h-[22px] items-center text-base font-bold text-[#f37123]",children:"P"}),(0,a.jsx)("span",{className:"flex h-[22px] items-center text-base font-bold text-[#52b74a]",children:"T"})]});if("vnpt"===s)return(0,a.jsx)("span",{className:"flex h-[22px] w-full items-center justify-start text-base font-bold text-[#0066b5]",children:"VNPT"});let i="us"===s?"/images/images-template-7/ProxyUS.png":"cmc"===s?"/images/images-template-7/ProxyDataCenterVN.png":"/images/".concat(s,".png");return(0,a.jsx)("div",{className:"flex w-full items-center justify-start gap-2",children:(0,a.jsx)(C.default,{className:"h-auto w-10",src:i,alt:(null==s?void 0:s.toUpperCase())||"",sizes:"100vw",width:0,height:0})})},size:130},{header:()=>(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full text-left text-[14px] leading-5 font-medium tracking-[0]",children:"Proxy IP"}),accessorKey:"proxy",id:"ipaddress.ip;proxy.port;proxy.username;proxy.password",cell:e=>{var t,l;let{cell:r,row:n}=e,s=r.getValue();return(0,a.jsx)(P,{proxy:s,initialStatus:n.original.status,rowId:n.original.id,code:n.original.code,prevIp:null==(t=n.original)?void 0:t.prevIp,createdAt:null==(l=n.original)?void 0:l.createdAt})},enableColumnFilter:!0,meta:{label:"Proxy IP",variant:"text",placeholder:"Nháºp Proxy"},size:130,minSize:130,maxSize:130},{header:()=>(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full text-left text-[14px] leading-5 font-medium tracking-[0]",children:"Proxy trưá»c"}),accessorKey:"Proxy trưá»c",size:130,meta:{label:"Proxy trưá»c",variant:"text",placeholder:"Proxy trưá»c"},id:"prevProxy",cell:e=>{var t,l,r;let{cell:n,row:s}=e,i=n.getValue(),o=(null==(t=s.original)?void 0:t.prevIp)||((null==i||null==(l=i.ipaddress)?void 0:l.changeIpAt)&&new Date(i.ipaddress.changeIpAt).getTime()>new Date(s.original.createdAt).getTime()?null==i||null==(r=i.ipaddress)?void 0:r.prevIp:void 0);return o?(0,a.jsxs)(w.m_,{children:[(0,a.jsx)(w.k$,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-4",children:[(0,a.jsx)("p",{className:"min-w-0 flex-1 overflow-hidden text-[14px] leading-5 font-normal tracking-[0] text-ellipsis whitespace-nowrap text-[#007AFF] underline decoration-solid underline-offset-2",children:o}),(0,a.jsx)(x.F.CopyIcon,{onClick:()=>S(o),className:"hover:text-icon-template-3/120 text-icon-template-3 !h-6 !w-6 shrink-0 underline hover:cursor-pointer"})]})}),(0,a.jsx)(w.ZI,{side:"top",align:"center",children:o})]}):(0,a.jsx)("span",{className:"text-text-normal-template-3 flex w-full items-center justify-start text-[14px] leading-5 font-normal",children:"-"})},enableColumnFilter:!0},{header:()=>(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full text-left text-[14px] leading-5 font-medium tracking-[0]",children:"Proxy domain"}),accessorKey:"proxy",id:"ipaddress.domain;proxy.port;proxy.username;proxy.password",cell:e=>{let{row:t}=e;return(0,a.jsx)(I,{proxy:t.original.proxy})},size:130,enableColumnFilter:!0,meta:{label:"Proxy domain",variant:"text",placeholder:"Nháºp Proxy Domain"}},{accessorKey:"protocol",size:90,id:"type",meta:{label:"Loại"},header:()=>(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full text-left text-[14px] leading-5 font-medium tracking-[0]",children:"Loại"}),cell:e=>{var t;let{cell:l}=e;return(0,a.jsx)("span",{className:"text-text-normal-template-3 flex w-full items-center justify-start text-[14px] leading-5 font-normal tracking-[0]",children:(null==(t=l.getValue())?void 0:t.toUpperCase())==="HTTP"?l.getValue():"SOCKS5"})}},{accessorKey:"description",header:()=>(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full text-left text-[14px] leading-5 font-medium tracking-[0]",children:"Note"}),id:"note",size:90,meta:{label:"Note",variant:"text"},cell:e=>{var t,l,r;let{cell:n,row:s}=e,i=n.getValue();if(null==(l=s.original)||null==(t=l.proxy)?void 0:t.blockAt){let e=30-(null!=(r=(0,j.o)(new Date,new Date(s.original.proxy.blockAt)))?r:0);return"Proxy má» kho\xe1 sau ".concat(e," ph\xfat")}return i?(0,a.jsxs)(w.m_,{children:[(0,a.jsx)(w.k$,{asChild:!0,children:(0,a.jsx)("span",{className:"flex w-full items-center justify-start",children:(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full min-w-0 overflow-hidden text-left text-[14px] leading-5 font-normal tracking-[0] text-ellipsis whitespace-nowrap",children:i})})}),(0,a.jsx)(w.ZI,{side:"top",align:"center",className:"bg-[#DF3B30] text-white",arrowClassName:"bg-[#DF3B30] fill-[#DF3B30]",children:i})]}):(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full text-left text-[14px] leading-5 font-normal tracking-[0]",children:"-"})}},{accessorKey:"expiredAt",id:"expiredAt",header:()=>(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full text-left text-[14px] leading-5 font-medium tracking-[0]",children:"Hết hạn"}),size:130,meta:{label:"Hết hạn",variant:"text"},cell:e=>{let{cell:t}=e;return(0,a.jsxs)("p",{className:"text-text-normal-template-3 flex w-full items-center justify-start gap-1 text-[14px] leading-5 font-normal tracking-[0] whitespace-nowrap",children:[(0,a.jsx)("span",{children:(0,y.GP)(new Date(t.getValue()),"dd-MM-yyyy")}),(0,a.jsx)("span",{children:(0,y.GP)(new Date(t.getValue()),"HH:mm")}
1)]})}},{accessorKey:"createdAt",size:152,header:()=>(0,a.jsx)("span",{className:"text-text-normal-template-3 block w-full text-left text-[14px] leading-5 font-medium tracking-[0]",children:"Ng\xe0y tạo"}),meta:{label:"Ng\xe0y tạo",variant:"text"},cell:e=>{let{cell:t}=e,l=t.getValue();if(!l)return"-";try{let e=new Date(l);return(0,a.jsx)("span",{className:"block text-left whitespace-nowrap",children:(0,y.qD)(e,"UTC","dd-MM-yyyy HH:mm:ss")})}catch(e){return"-"}}},{header:"IP",accessorKey:"proxy.ipaddress.ip",id:"ip",meta:{label:"IP",variant:"text",placeholder:"Nháºp IP"},enableColumnFilter:!0}];var F=l(45368),D=l(20063),V=l(72798);function T(e){let{mutate:t,isValidating:l,queryKey:o,userProxies:d,total:c}=e,{setTable:x,rowSelection:u,setRowSelection:m}=(0,h.$)(),p=(0,F.a)(1024),[f]=(0,v.ZA)("limit",v.GJ.withDefault(50)),w=Math.ceil(c/f),{table:j}=(0,i.u)({data:d,columns:A,pageCount:w,onRowSelectionChange:m,shallow:!1,debounceMs:500,initialState:{rowSelection:u,columnVisibility:{orderId:!1,ip:!1,remainingDays:!1,isRenewal:!1,"ID cÅ©":!1,createdAt:!1}}});return b.useEffect(()=>{j&&x(j)},[j,x]),(0,a.jsx)(b.Suspense,{fallback:(0,a.jsx)(r.O,{columnCount:5,rowCount:8,filterCount:2}),children:(0,a.jsx)(s.Q,{children:l||!j?(0,a.jsx)(n.A,{}):(0,a.jsx)(g,{table:j,mutate:t,isValidating:l,isLg:p})})},o)}function z(e){let{}=e,t=(0,D.usePathname)(),[l]=(0,v.ZA)("provider"),r=(0,b.useMemo)(()=>l?["ipaddress.provider:$eq:string:".concat(l.toUpperCase())]:"/proxies-datacenter"===t?["ipaddress.provider:$in:string:US,CMC"]:"/proxies-datacenter-vn"===t?["ipaddress.provider:$eq:string:CMC"]:[],[t,l]),n=(0,V.$)({defaultPage:"1",defaultLimit:"50",persistentFilters:[...r,"categorytype.id:$eq:number:1"],defaultSort:'[{"orderBy":"createdAt","order":"desc"}]'}),s=(0,b.useMemo)(()=>{if(!l)return n;let e=new URLSearchParams(n.startsWith("?")?n.slice(1):n);e.delete("page"),e.delete("limit");let t=e.toString();return t?"?".concat(t):""},[n,l]),{userProxies:i,total:c,isValidating:x,mutate:u}=(0,o.P)(s,{suspense:!0}),m=l?i.length:c;return(0,a.jsx)(d.A,{scrollable:!0,openMarqueeTop:!0,openMarqueeBottom:!1,children:(0,a.jsx)(h.u,{children:(0,a.jsx)(T,{mutate:u,isValidating:x,queryKey:s+t,userProxies:i,total:m})})})}},32140:(e,t,l)=>{l.d(t,{U:()=>n});var a=l(25959),r=l(9829);let n=(0,a.v)()((e,t)=>({notifications:[],socket:null,isConnected:!1,currentToken:null,addNotification:t=>e(e=>({notifications:[...e.notifications,t]})),clearNotifications:()=>e({notifications:[]}),initSocket:l=>{let a=t();if(a.socket&&a.currentToken===l)return;a.socket&&a.socket.disconnect();let n=(0,r.io)("https://api.homeproxy.vn",{transports:["websocket"],auth:{token:l}});n.on("connect",()=>{e({isConnected:!0}),n.emit("register")}),n.on("connect_error",()=>{e({isConnected:!1})}),n.on("disconnect",()=>{e({isConnected:!1})}),n.on("transactionUpdate",e=>{t().addNotification(e)}),n.on("userproxyUpdate",e=>{t().addNotification(e)}),e({socket:n,currentToken:l})},disconnectSocket:()=>{let{socket:l}=t();l&&(l.disconnect(),e({socket:null,isConnected:!1,currentToken:null}))},emit:(e,l,a)=>{let{socket:r,isConnected:n}=t();r&&n&&r.emit(e,l,a)}}))},40789:(e,t,l)=>{l.d(t,{P:()=>d});var a=l(13744);function r(e){var t,l,a,r,n,s;return null!=(s=null!=(n=null!=(r=null==e||null==(t=e.ipaddress)?void 0:t.provider)?r:null==e||null==(a=e.proxy)||null==(l=a.ipaddress)?void 0:l.provider)?n:null==e?void 0:e.provider)?s:""}var n=l(96199),s=l(20063),i=l(12115),o=l(85400);function d(e,t){var l,d;let{data:c,status:x}=(0,n.wV)(),u=(0,s.usePathname)(),{data:m,mutate:p,isLoading:f,isValidating:g}=(0,o.Ay)("authenticated"===x?["/api/v1/users/proxies",e,u]:null,e=>{let[t,l]=e;return a.A.fetchApi(t+l,null==c?void 0:c.accessToken).then(e=>null!=e?e:{}).catch(()=>({}))},{suspense:null!=(l=null==t?void 0:t.suspense)&&l,revalidateOnFocus:!1,keepPreviousData:!0});return{userProxies:(0,i.useMemo)(()=>{var e,t;return t=null!=(e=null==m?void 0:m.data)?e:[],"/proxies-datacenter"===u||"/proxies-datacenter-vn"===u?t.filter(e=>{var t;let l=null==(t=r(e))?void 0:t.trim().toUpperCase();return"US"===l||"USA"===l||"CMC"===l||"USOLD"===l}):t.filter(e=>{var t;let l=null==(t=r(e))?void 0:t.trim().toUpperCase();return!function(e){let t=null==e?void 0:e.trim().toUpperCase();
1return"US"===t||"USA"===t||"USOLD"===t}(l)&&"CMC"!==l})},[null==m?void 0:m.data,u]),total:null!=(d=null==m?void 0:m.total)?d:0,isLoading:null!=f&&f,isValidating:null!=g&&g,mutate:p,status:x}}},41968:(e,t,l)=>{l.d(t,{O:()=>r});var a=l(12115);function r(){let e=(0,a.useRef)(null);return{anchorIdRef:e,handleClick:(t,l)=>a=>{if(a.stopPropagation(),a.shiftKey&&null!==e.current){let{rows:a,rowsById:r}=l.getRowModel(),n=r[e.current];if(n){let e=n.index,l=Math.min(e,t.index),r=Math.max(e,t.index);for(let e=0;e<a.length;e++){let t=e>=l&&e<=r;a[e].toggleSelected(t)}}else e.current=t.id,t.toggleSelected(!t.getIsSelected())}else t.toggleSelected(!t.getIsSelected()),e.current=t.id},resetAnchor:()=>{e.current=null}}}},45368:(e,t,l)=>{l.d(t,{a:()=>r});var a=l(12115);function r(e){let[t,l]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let t=window.matchMedia("(min-width: ".concat(e,"px)")),a=()=>l(t.matches);return a(),t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[]),t}},47377:(e,t,l)=>{l.d(t,{ZI:()=>d,k$:()=>o,m_:()=>i});var a=l(95155);l(12115);var r=l(47520),n=l(64269);function s(e){let{delayDuration:t=0,...l}=e;return(0,a.jsx)(r.Kq,{"data-slot":"tooltip-provider",delayDuration:t,...l})}function i(e){let{...t}=e;return(0,a.jsx)(s,{children:(0,a.jsx)(r.bL,{"data-slot":"tooltip",...t})})}function o(e){let{...t}=e;return(0,a.jsx)(r.l9,{"data-slot":"tooltip-trigger",...t})}function d(e){let{className:t,arrowClassName:l,sideOffset:s=0,children:i,...o}=e;return(0,a.jsx)(r.ZL,{children:(0,a.jsxs)(r.UC,{"data-slot":"tooltip-content",sideOffset:s,className:(0,n.cn)("text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md bg-[#007aff] px-3 py-1.5 text-xs text-balance",t),...o,children:[i,(0,a.jsx)(r.i3,{className:(0,n.cn)("z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-[#007aff] fill-[#007aff]",l)})]})})}},50832:(e,t,l)=>{l.d(t,{$:()=>o,r:()=>i});var a=l(95155);l(12115);var r=l(32467),n=l(83101),s=l(64269);let i=(0,n.F)("inline-flex items-center hover:cursor-pointer justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[1px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border border-primary bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 text-primary data-[active=true]:text-primary data-[active=true]:border-primary data-[active=true]:bg-primary/10",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-primary-hover hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-lg gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-lg px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:l,size:n,asChild:o=!1,...d}=e,c=o?r.DX:"button";return(0,a.jsx)(c,{"data-slot":"button",className:(0,s.cn)(i({variant:l,size:n,className:t})),...d})}},72798:(e,t,l)=>{l.d(t,{$:()=>n});var a=l(97453),r=l(12115);function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPage:t="1",defaultLimit:l="50",persistentFilters:n=[],defaultSort:s,additionalParams:i={}}=e,[o]=(0,a.ZA)("page",{defaultValue:t}),[d]=(0,a.ZA)("limit",{defaultValue:l}),[c]=(0,a.ZA)("filter",{defaultValue:""}),[x]=(0,a.ZA)("filters",{defaultValue:""}),[u]=(0,a.ZA)("sort",{defaultValue:""}),[m]=(0,a.ZA)("s",{defaultValue:""});return(0,r.useMemo)(()=>{let e=new URLSearchParams;e.set("page",o),e.set("limit",d);let t=[];if(c&&t.push(c),n.length>0&&t.push(...n),t.length>0&&e.set("filter",t.join(";")),x){let t="object"==typeof x?JSON.stringify(x):x;e.set("filters",t)}if(u){let t;t="string"==typeof u?u:"object"==typeof u?JSON.stringify((Array.isArray(u)?u:[u]).map(e=>({orderBy:e.id||e.orderBy,order:"boolean"==typeof e.desc?e.desc?"desc":"asc":e.order||"asc"}))):String(u),e.set("sort",t)}else s&&e.set("sort",s);
1return m&&e.set("s",m),Object.entries(i).forEach(t=>{let[l,a]=t;if(a)if(e.has(l))try{let t=JSON.parse(e.get(l)),r=JSON.parse(a),n={...t,...r};e.set(l,JSON.stringify(n))}catch(e){}else e.append(l,a)}),"?"+e.toString()},[o,d,c,x,u,n,s,i])}},87415:(e,t,l)=>{l.d(t,{E:()=>d,Q:()=>o});var a=l(95155),r=l(14734),n=l(96199),s=l(12115);let i=(0,s.createContext)({notifications:[],isConnected:!1});function o(e){var t;let{children:l}=e,{data:o}=(0,n.wV)(),{notifications:d,isConnected:c,emit:x}=(0,r.F)(null==o||null==(t=o.user)?void 0:t.accessToken);return(0,s.useEffect)(()=>{c&&x("user-proxies")},[c]),(0,a.jsx)(i.Provider,{value:{notifications:d,isConnected:c},children:l})}function d(){return(0,s.useContext)(i)}},87568:(e,t,l)=>{l.d(t,{A:()=>r});var a=l(95155);function r(){return(0,a.jsxs)("div",{className:"flex flex-1 w-full h-full flex-col gap-6 py-8 overflow-y-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3",children:[[void 0,void 0,void 0].map((e,t)=>(0,a.jsx)("div",{className:"h-10 w-36 animate-pulse rounded-xl bg-gradient-to-r from-from to-to"},t)),(0,a.jsx)("div",{className:"h-10 w-20 animate-pulse rounded-xl bg-gradient-to-r from-from to-to"}),(0,a.jsx)("div",{className:"h-10 w-12 animate-pulse rounded-xl bg-gradient-to-r from-from to-to"}),(0,a.jsx)("div",{className:"h-10 w-20 animate-pulse rounded-xl bg-gradient-to-r from-from to-to"})]}),(0,a.jsxs)("div",{className:"mb-3 flex gap-6 rounded-tl-4xl rounded-tr-4xl bg-white pt-14 pb-12 pl-16",children:[(0,a.jsxs)("div",{className:"mt-6 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"h-4 w-20 animate-pulse rounded-xl bg-gradient-to-r from-from to-to"}),(0,a.jsx)("div",{className:"h-12 w-64 animate-pulse rounded-xl bg-gradient-to-r from-from to-to"})]}),(0,a.jsxs)("div",{className:"mt-6 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"h-4 w-20 animate-pulse rounded-xl bg-gradient-to-r from-from to-to"}),(0,a.jsx)("div",{className:"h-12 w-64 animate-pulse rounded-xl bg-gradient-to-r from-from to-to"})]}),(0,a.jsx)("div",{className:"relative flex h-full gap-6",children:(0,a.jsx)("div",{className:"absolute bottom-0 h-11 w-32 animate-pulse rounded-full bg-gradient-to-r from-from to-to"})}),(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)("div",{className:"absolute bottom-0 h-11 w-32 translate-x-32 animate-pulse rounded-full bg-gradient-to-r from-from to-to"})})]}),(0,a.jsxs)("div",{className:"rounded-br-4xl rounded-bl-4xl bg-white px-16 pt-10 pb-14",children:[(0,a.jsxs)("div",{className:"mt-6 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"h-7 w-72 animate-pulse rounded-xl bg-gradient-to-r from-from to-to"}),(0,a.jsxs)("div",{className:"flex items-center gap-3 mt-7",children:[(0,a.jsx)("div",{className:"h-4 w-44 animate-pulse rounded-xl bg-gradient-to-r from-from to-to"}),(0,a.jsx)("div",{className:"h-9 w-24 animate-pulse rounded-xl bg-gradient-to-r from-from to-to"})]})]}),(0,a.jsxs)("div",{className:"mt-8 rounded-t-2xl rounded-b-xl border border-[#FFF8F8] bg-gradient-to-br from-rose-100 to-amber-100/60 pt-0 shadow-sm",children:[(0,a.jsx)("div",{className:"mb-2 h-10 w-full animate-pulse rounded-t-2xl bg-gradient-to-r from-from to-to"}),(0,a.jsx)("div",{className:"flex flex-col gap-4 py-2",children:[...Array(10)].map((e,t)=>(0,a.jsxs)("div",{className:"flex gap-4",children:[[...Array(12)].map((e,t)=>(0,a.jsx)("div",{className:"h-7 ".concat(0===t?"ml-5 w-6":1===t?"w-6":2===t?"w-11":3===t?"w-[72px]":4===t?"w-[218px] mr-60":8===t?"w-[218px] mr-16":10===t?"w-16 mr-[50px]":"w-[0px]"," animate-pulse rounded-sm bg-gradient-to-r from-from to-to")},t)),(0,a.jsx)("div",{className:"h-7 w-24 animate-pulse rounded-lg bg-gradient-to-r from-from to-to"})]},t))})]})]}),(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsxs)("div",{className:"mt-5 flex gap-6",children:[(0,a.jsx)("div",{className:"h-7 w-44 animate-pulse rounded-lg bg-gradient-to-r from-from to-to"}),(0,a.jsx)("div",{className:"h-7 w-44 animate-pulse rounded-lg bg-gradient-to-r from-from to-to"})]}),(0,a.jsx)("div",{className:"relative w-full",children:(0,a.jsxs)("div",{className:"absolute right-0 bottom-0 flex gap-2",children:[(0,a.jsx)("div",{className:"h-7 w-7 animate-pulse rounded-lg bg-gradient-to-r from-from to-to"}),(0,a.jsx)("div",{className:"h-7 w-[116px] animate-pulse rounded-lg bg-gradient-to-r from-from to-to"}),(0,a.jsx)("div",{className:"h-7 w-7 animate-pulse rounded-lg bg-gradient-to-r from-from to-to"}),(0,a.jsx)("div",{className:"h-7 w-7 animate-pulse rounded-lg bg-gradient-to-r from-from to-to"})]})})]})]})}l(12115)}}]);
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.