1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,30257,e=>{"use strict";let t,s,n,r;var a,i,l,o,c,d,x,h,u,m=e.i(43476),p=e.i(71645),f=e.i(18566),g=e.i(14417);e.i(47167);var b=e.i(46696),y=e.i(34161),v=e.i(92270),w=e.i(15057),j=e.i(41071),N=e.i(43432),k=e.i(31278),C=e.i(30699),S=e.i(78894),T=e.i(75254);let E=(0,T.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var P=e.i(1928),L=e.i(16715),M=e.i(78583),A=e.i(18348),R=e.i(84614),_=e.i(37727);function I(e,t,{checkForDefaultPrevented:s=!0}={}){return function(n){if(e?.(n),!1===s||!n.defaultPrevented)return t?.(n)}}function D(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function W(...e){return t=>{let s=!1,n=e.map(e=>{let n=D(e,t);return s||"function"!=typeof n||(s=!0),n});if(s)return()=>{for(let t=0;t<n.length;t++){let s=n[t];"function"==typeof s?s():D(e[t],null)}}}}function K(...e){return p.useCallback(W(...e),e)}function z(e,t=[]){let s=[],n=()=>{let t=s.map(e=>p.createContext(e));return function(s){let n=s?.[e]||t;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:n}}),[s,n])}};return n.scopeName=e,[function(t,n){let r=p.createContext(n),a=s.length;s=[...s,n];let i=t=>{let{scope:s,children:n,...i}=t,l=s?.[e]?.[a]||r,o=p.useMemo(()=>i,Object.values(i));return(0,m.jsx)(l.Provider,{value:o,children:n})};return i.displayName=t+"Provider",[i,function(s,i){let l=i?.[e]?.[a]||r,o=p.useContext(l);if(o)return o;if(void 0!==n)return n;throw Error(`\`${s}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let s=()=>{let s=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=s.reduce((t,{useScope:s,scopeName:n})=>{let r=s(e)[`__scope${n}`];return{...t,...r}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return s.scopeName=t.scopeName,s}(n,...t)]}var O=globalThis?.document?p.useLayoutEffect:()=>{},$=p["useId".toString()]||(()=>void 0),H=0;function V(e){let[t,s]=p.useState($());return O(()=>{e||s(e=>e??String(H++))},[e]),e||(t?`radix-${t}`:"")}function F(e){let t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...e)=>t.current?.(...e),[])}function B({prop:e,defaultProp:t,onChange:s=()=>{}}){let[n,r]=function({defaultProp:e,onChange:t}){let s=p.useState(e),[n]=s,r=p.useRef(n),a=F(t);return p.useEffect(()=>{r.current!==n&&(a(n),r.current=n)},[n,r,a]),s}({defaultProp:t,onChange:s}),a=void 0!==e,i=a?e:n,l=F(s);return[i,p.useCallback(t=>{if(a){let s="function"==typeof t?t(e):t;s!==e&&l(s)}else r(t)},[a,e,r,l])]}var Y=e.i(74080),G=p.forwardRef((e,t)=>{let{children:s,...n}=e,r=p.Children.toArray(s),a=r.find(X);if(a){let e=a.props.children,s=r.map(t=>t!==a?t:p.Children.count(e)>1?p.Children.only(null):p.isValidElement(e)?e.props.children:null);return(0,m.jsx)(q,{...n,ref:t,children:p.isValidElement(e)?p.cloneElement(e,void 0,s):null})}return(0,m.jsx)(q,{...n,ref:t,children:s})});G.displayName="Slot";var q=p.forwardRef((e,t)=>{let{children:s,...n}=e;if(p.isValidElement(s)){var r;let e,a,i=(r=s,(a=(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?r.ref:(a=(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?r.props.ref:r.props.ref||r.ref),l=function(e,t){let s={...t};for(let n in t){let r=e[n],a=t[n];/^on[A-Z]/.test(n)?r&&a?s[n]=(...e)=>{a(...e),r(...e)}:r&&(s[n]=r):"style"===n?s[n]={...r,...a}:"className"===n&&(s[n]=[r,a].filter(Boolean).join(" "))}return{...e,...s}}(n,s.props);return s.type!==p.Fragment&&(l.ref=t?W(t,i):i),p.cloneElement(s,l)}return p.Children.count(s)>1?p.Children.only(null):null});q.displayName="SlotClone";var U=({children:e})=>(0,m.jsx)(m.Fragment,{children:e});function X(e){return p.isValidElement(e)&&e.type===U}var Z=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>
1{let s=p.forwardRef((e,s)=>{let{asChild:n,...r}=e,a=n?G:t;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,m.jsx)(a,{...r,ref:s})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),J="dismissableLayer.update",Q=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ee=p.forwardRef((e,t)=>{let{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...o}=e,c=p.useContext(Q),[d,x]=p.useState(null),u=d?.ownerDocument??globalThis?.document,[,f]=p.useState({}),g=K(t,e=>x(e)),b=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=b.indexOf(y),w=d?b.indexOf(d):-1,j=c.layersWithOutsidePointerEventsDisabled.size>0,N=w>=v,k=function(e,t=globalThis?.document){let s=F(e),n=p.useRef(!1),r=p.useRef(()=>{});return p.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n=function(){es("dismissableLayer.pointerDownOutside",s,a,{discrete:!0})},a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",r.current),r.current=n,t.addEventListener("click",r.current,{once:!0})):n()}else t.removeEventListener("click",r.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",r.current)}},[t,s]),{onPointerDownCapture:()=>n.current=!0}}(e=>{let t=e.target,s=[...c.branches].some(e=>e.contains(t));N&&!s&&(r?.(e),i?.(e),e.defaultPrevented||l?.())},u),C=function(e,t=globalThis?.document){let s=F(e),n=p.useRef(!1);return p.useEffect(()=>{let e=e=>{e.target&&!n.current&&es("dismissableLayer.focusOutside",s,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,s]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{let t=e.target;![...c.branches].some(e=>e.contains(t))&&(a?.(e),i?.(e),e.defaultPrevented||l?.())},u);return!function(e,t=globalThis?.document){let s=F(e);p.useEffect(()=>{let e=e=>{"Escape"===e.key&&s(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[s,t])}(e=>{w===c.layers.size-1&&(n?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},u),p.useEffect(()=>{if(d)return s&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(h=u.body.style.pointerEvents,u.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),et(),()=>{s&&1===c.layersWithOutsidePointerEventsDisabled.size&&(u.body.style.pointerEvents=h)}},[d,u,s,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),et())},[d,c]),p.useEffect(()=>{let e=()=>f({});return document.addEventListener(J,e),()=>document.removeEventListener(J,e)},[]),(0,m.jsx)(Z.div,{...o,ref:g,style:{pointerEvents:j?N?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,C.onFocusCapture),onBlurCapture:I(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,k.onPointerDownCapture)})});function et(){let e=new CustomEvent(J);document.dispatchEvent(e)}function es(e,t,s,{discrete:n}){let r=s.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:s});if(t&&r.addEventListener(e,t,{once:!0}),n)r&&Y.flushSync(()=>r.dispatchEvent(a));else r.dispatchEvent(a)}ee.displayName="DismissableLayer",p.forwardRef((e,t)=>{let s=p.useContext(Q),n=p.useRef(null),r=K(t,n);return p.useEffect(()=>{let e=n.current;if(e)return s.branches.add(e),()=>{s.branches.delete(e)}},[s.branches]),(0,m.jsx)(Z.div,{...e,ref:r})}).displayName="DismissableLayerBranch";var en="focusScope.autoFocusOnMount",er="focusScope.autoFocusOnUnmount",ea={bubbles:!1,cancelable:!0},ei=p.forwardRef((e,t)=>{let{loop:s=!1,trapped:n=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...i}=e,[l,o]=p.useState(null),c=F(r),d=F(a),x=p.useRef(null),h=K(t,e=>o(e)),u=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let e=function(e){if(u.paused||!l)return;let t=e.target;l.contains(t)?x.current=t:ec(x.current,{select:!0})},t=function(e){if(u.paused||!l)return;let t=e.relatedTarget;null!==t&&(l.contains(t)||ec(x.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let s=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&ec(l)});return l&&s.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),s.disconnect()}}},[n,l,u.paused]),p.useEffect(()=>{if(l){ed.add(u);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(en,ea);l.addEventListener(en,c),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let s=document.activeElement;for(let n of e)if(ec(n,{select:t}),document.activeElement!==s)return}(el(l).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&ec(l))}return()=>{l.removeEventListener(en,c),setTimeout(()=>{let t=new CustomEvent(er,ea);l.addEventListener(er,d),l.dispatchEvent(t),t.defaultPrevented||ec(e??document.body,{select:!0}),l.removeEventListener(er,d),ed.remove(u)},0)}}},[l,c,d,u]);let f=p.useCallback(e=>{if(!s&&!n||u.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){var a;let t,n=e.currentTarget,[i,l]=[eo(t=el(a=n),a),eo(t.reverse(),a)];i&&l?e.shiftKey||r!==l?e.shiftKey&&r===i&&(e.preventDefault(),s&&ec(l,{select:!0})):(e.preventDefault(),s&&ec(i,{select:!0})):r===n&&e.preventDefault()}},[s,n,u.paused]);return(0,m.jsx)(Z.div,{tabIndex:-1,...i,ref:h,onKeyDown:f})});function el(e){let t=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t}function eo(e,t){for(let s of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(s,{upTo:t}))return s}function ec(e,{select:t=!1}={}){if(e&&e.focus){var s;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(s=e)instanceof HTMLInputElement&&"select"in s&&t&&e.select()}}ei.displayName="FocusScope";var ed=(r=[],{add(e){let t=r[0];e!==t&&t?.pause(),(r=ex(r,e)).unshift(e)},remove(e){r=ex(r,e),r[0]?.resume()}});function ex(e,t){let s=[...e],n=s.indexOf(t);return -1!==n&&s.splice(n,1),s}var eh=p.forwardRef((e,t)=>
1{let{container:s,...n}=e,[r,a]=p.useState(!1);O(()=>a(!0),[]);let i=s||r&&globalThis?.document?.body;return i?Y.default.createPortal((0,m.jsx)(Z.div,{...n,ref:t}),i):null});eh.displayName="Portal";var eu=e=>{var t;let s,n,{present:r,children:a}=e,i=function(e){var t,s;let[n,r]=p.useState(),a=p.useRef({}),i=p.useRef(e),l=p.useRef("none"),[o,c]=(t=e?"mounted":"unmounted",s={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},p.useReducer((e,t)=>s[e][t]??e,t));return p.useEffect(()=>{let e=em(a.current);l.current="mounted"===o?e:"none"},[o]),O(()=>{let t=a.current,s=i.current;if(s!==e){let n=l.current,r=em(t);e?c("MOUNT"):"none"===r||t?.display==="none"?c("UNMOUNT"):s&&n!==r?c("ANIMATION_OUT"):c("UNMOUNT"),i.current=e}},[e,c]),O(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,s=s=>{let r=em(a.current).includes(s.animationName);if(s.target===n&&r&&(c("ANIMATION_END"),!i.current)){let s=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=s)})}},r=e=>{e.target===n&&(l.current=em(a.current))};return n.addEventListener("animationstart",r),n.addEventListener("animationcancel",s),n.addEventListener("animationend",s),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",r),n.removeEventListener("animationcancel",s),n.removeEventListener("animationend",s)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:p.useCallback(e=>{e&&(a.current=getComputedStyle(e)),r(e)},[])}}(r),l="function"==typeof a?a({present:i.isPresent}):p.Children.only(a),o=K(i.ref,(t=l,(n=(s=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?t.ref:(n=(s=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof a||i.isPresent?p.cloneElement(l,{ref:o}):null};function em(e){return e?.animationName||"none"}eu.displayName="Presence";var ep=0;function ef(){p.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??eg()),document.body.insertAdjacentElement("beforeend",e[1]??eg()),ep++,()=>{1===ep&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),ep--}},[])}function eg(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var eb=function(){return(eb=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++)for(var r in t=arguments[s])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function ey(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]]);return s}var ev=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),ew="width-before-scroll-bar";function ej(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var eN="u">typeof window?p.useLayoutEffect:p.useEffect,ek=new WeakMap,eC=(void 0===a&&(a={}),(void 0===i&&(i=function(e){return e}),l=[],o=!1,c={read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:null},useMedium:function(e){var t=i(e,o);return l.push(t),function(){l=l.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(o=!0;l.length;){var t=l;l=[],t.forEach(e)}l={push:function(t){return e(t)},filter:function(){return l}}},assignMedium:function(e){o=!0;var t=[];if(l.length){var s=l;l=[],s.forEach(e),t=l}var n=function(){var s=t;t=[],s.forEach(e)},r=function(){return Promise.resolve().then(n)};r(),l={push:function(e){t.push(e),r()},filter:function(e){return t=t.filter(e),l}}}}).options=eb({async:!0,ssr:!1},a),c),eS=function(){},eT=p.forwardRef(function(e,t){var s,n,r,a,i=p.useRef(null),l=p.useState({onScrollCapture:eS,onWheelCapture:eS,onTouchMoveCapture:eS}),o=l[0],c=l[1],d=e.forwardProps,x=e.children,h=e.className,u=e.removeScrollBar,m=e.enabled,f=e.shards,g=e.sideCar,b=e.noRelative,y=e.noIsolation,v=e.inert,w=e.allowPinchZoom,j=e.as,N=e.gapMode,k=ey(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=(s=[i,t],n=function(e){return s.forEac
1h(function(t){return ej(t,e)})},(r=(0,p.useState)(function(){return{value:null,callback:n,facade:{get current(){return r.value},set current(value){var e=r.value;e!==value&&(r.value=value,r.callback(value,e))}}}})[0]).callback=n,a=r.facade,eN(function(){var e=ek.get(a);if(e){var t=new Set(e),n=new Set(s),r=a.current;t.forEach(function(e){n.has(e)||ej(e,null)}),n.forEach(function(e){t.has(e)||ej(e,r)})}ek.set(a,s)},[s]),a),S=eb(eb({},k),o);return p.createElement(p.Fragment,null,m&&p.createElement(g,{sideCar:eC,removeScrollBar:u,shards:f,noRelative:b,noIsolation:y,inert:v,setCallbacks:c,allowPinchZoom:!!w,lockRef:i,gapMode:N}),d?p.cloneElement(p.Children.only(x),eb(eb({},S),{ref:C})):p.createElement(void 0===j?"div":j,eb({},S,{className:h,ref:C}),x))});eT.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},eT.classNames={fullWidth:ew,zeroRight:ev};var eE=function(e){var t=e.sideCar,s=ey(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return p.createElement(n,eb({},s))};eE.isSideCarExport=!0;var eP=function(){var e=0,t=null;return{add:function(s){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=u||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var n,r;(n=t).styleSheet?n.styleSheet.cssText=s:n.appendChild(document.createTextNode(s)),r=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(r)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eL=function(){var e=eP();return function(t,s){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&s])}},eM=function(){var e=eL();return function(t){return e(t.styles,t.dynamic),null}},eA={left:0,top:0,right:0,gap:0},eR=function(e){return parseInt(e||"",10)||0},e_=function(e){var t=window.getComputedStyle(document.body),s=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],r=t["padding"===e?"paddingRight":"marginRight"];return[eR(s),eR(n),eR(r)]},eI=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return eA;var t=e_(e),s=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-s+t[2]-t[0])}},eD=eM(),eW="data-scroll-locked",eK=function(e,t,s,n){var r=e.left,a=e.top,i=e.right,l=e.gap;return void 0===s&&(s="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(eW,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===s&&"\n padding-left: ".concat(r,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===s&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(ev," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(ew," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(ev," .").concat(ev," {\n right: 0 ").concat(n,";\n }\n \n .").concat(ew," .").concat(ew," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(eW,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},ez=function(){var e=parseInt(document.body.getAttribute(eW)||"0",10);return isFinite(e)?e:0},eO=function(){p.useEffect(function(){return document.body.setAttribute(eW,(ez()+1).toString()),function(){var e=ez()-1;e<=0?document.body.removeAttribute(eW):document.body.setAttribute(eW,e.toString())}},[])},e$=function(e){var t=e.noRelative,s=e.noImportant,n=e.gapMode,r=void 0===n?"margin":n;eO();var a=p.useMemo(function(){return eI(r)},[r]);return p.createElement(eD,{styles:eK(a,!t,r,s?"":"!important")})},eH=!1;if("u">typeof window)try{var eV=Object.defineProperty({},"passive",{get:function(){return eH=!0,!0}});window.addEventListener("test",eV,eV),window.removeEventListener("test",eV,eV)}catch(e){eH=!1}var eF=!!eH&&{passive:!1},eB=function(e,t){if(!(e instanceof Element))return!1;var s=window.getComputedStyle(e);return"hidden"!==s[t]&&(s.overflowY!==s.overflowX||"TEXTAREA"===e.tagName||"visible"!==s[t])},eY=function(e,t){var s=t.ownerDocument,n=t;do{if("u">typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),eG(e,n)){var r=eq(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==s.body)return!1},eG=function(e,t){return"v"===e?eB(t,"overflowY"):eB(t,"overflowX")},eq=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},eU=function(e,t,s,n,r){var a,i=(a=window.getComputedStyle(t).direction,"h"===e&&"rtl"===a?-1:1),l=i*n,o=s.target,c=t.contains(o),d=!1,x=l>0,h=0,u=0;do{if(!o)break;var m=eq(e,o),p=m[0],f=m[1]-m[2]-i*p;
1(p||f)&&eG(e,o)&&(h+=f,u+=p);var g=o.parentNode;o=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&o!==document.body||c&&(t.contains(o)||t===o))return x&&(r&&1>Math.abs(h)||!r&&l>h)?d=!0:!x&&(r&&1>Math.abs(u)||!r&&-l>u)&&(d=!0),d},eX=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eZ=function(e){return[e.deltaX,e.deltaY]},eJ=function(e){return e&&"current"in e?e.current:e},eQ=0,e0=[];let e1=(d=function(e){var t=p.useRef([]),s=p.useRef([0,0]),n=p.useRef(),r=p.useState(eQ++)[0],a=p.useState(eM)[0],i=p.useRef(e);p.useEffect(function(){i.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var t=(function(e,t,s){if(s||2==arguments.length)for(var n,r=0,a=t.length;r<a;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(eJ),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=p.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var r,a=eX(e),l=s.current,o="deltaX"in e?e.deltaX:l[0]-a[0],c="deltaY"in e?e.deltaY:l[1]-a[1],d=e.target,x=Math.abs(o)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===x&&"range"===d.type)return!1;var h=window.getSelection(),u=h&&h.anchorNode;if(u&&(u===d||u.contains(d)))return!1;var m=eY(x,d);if(!m)return!0;if(m?r=x:(r="v"===x?"h":"v",m=eY(x,d)),!m)return!1;if(!n.current&&"changedTouches"in e&&(o||c)&&(n.current=r),!r)return!0;var p=n.current||r;return eU(p,t,e,"h"===p?o:c,!0)},[]),o=p.useCallback(function(e){if(e0.length&&e0[e0.length-1]===a){var s="deltaY"in e?eZ(e):eX(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta,n[0]===s[0]&&n[1]===s[1])})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var r=(i.current.shards||[]).map(eJ).filter(Boolean).filter(function(t){return t.contains(e.target)});(r.length>0?l(e,r[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=p.useCallback(function(e,s,n,r){var a={name:e,delta:s,target:n,should:r,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=p.useCallback(function(e){s.current=eX(e),n.current=void 0},[]),x=p.useCallback(function(t){c(t.type,eZ(t),t.target,l(t,e.lockRef.current))},[]),h=p.useCallback(function(t){c(t.type,eX(t),t.target,l(t,e.lockRef.current))},[]);p.useEffect(function(){return e0.push(a),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:h}),document.addEventListener("wheel",o,eF),document.addEventListener("touchmove",o,eF),document.addEventListener("touchstart",d,eF),function(){e0=e0.filter(function(e){return e!==a}),document.removeEventListener("wheel",o,eF),document.removeEventListener("touchmove",o,eF),document.removeEventListener("touchstart",d,eF)}},[]);var u=e.removeScrollBar,m=e.inert;return p.createElement(p.Fragment,null,m?p.createElement(a,{styles:"\n .block-interactivity-".concat(r," {pointer-events: none;}\n .allow-interactivity-").concat(r," {pointer-events: all;}\n")}):null,u?p.createElement(e$,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},eC.useMedium(d),eE);var e5=p.forwardRef(function(e,t){return p.createElement(eT,eb({},e,{ref:t,sideCar:e1}))});e5.classNames=eT.classNames;var e2=new WeakMap,e4=new WeakMap,e6={},e3=0,e8=function(e){return e&&(e.host||e8(e.parentNode))},e7=function(e,t,s,n){var r=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var s=e8(e);return s&&t.contains(s)?s:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});e6[s]||(e6[s]=new WeakMap);var a=e6[s],i=[],l=new Set,o=new Set(r),c=function(e){!e||l.has(e)||(l.add(e),c(e.parentNode))};r.forEach(c);var d=function(e){!e||o.has(e)||Array.prototype.forEach.call(e.children,function(e){if(l.has(e))d(e);else try{var t=e.getAttribute(n),r=null!==t&&"false"!==t,o=(e2.get(e)||0)+1,c=(a.get(e)||0)+1;e2.set(e,o),a.set(e,c),i.push(e),1===o&&r&&e4.set(e,!0),1===c&&e.setAttribute(s,"true"),r||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};
1return d(t),l.clear(),e3++,function(){i.forEach(function(e){var t=e2.get(e)-1,r=a.get(e)-1;e2.set(e,t),a.set(e,r),t||(e4.has(e)||e.removeAttribute(n),e4.delete(e)),r||e.removeAttribute(s)}),--e3||(e2=new WeakMap,e2=new WeakMap,e4=new WeakMap,e6={})}},e9=function(e,t,s){void 0===s&&(s="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),r=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return r?(n.push.apply(n,Array.from(r.querySelectorAll("[aria-live], script"))),e7(n,r,s,"aria-hidden")):function(){return null}},te="Dialog",[tt,ts]=z(te),[tn,tr]=tt(te),ta=e=>{let{__scopeDialog:t,children:s,open:n,defaultOpen:r,onOpenChange:a,modal:i=!0}=e,l=p.useRef(null),o=p.useRef(null),[c=!1,d]=B({prop:n,defaultProp:r,onChange:a});return(0,m.jsx)(tn,{scope:t,triggerRef:l,contentRef:o,contentId:V(),titleId:V(),descriptionId:V(),open:c,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(e=>!e),[d]),modal:i,children:s})};ta.displayName=te;var ti="DialogTrigger";p.forwardRef((e,t)=>{let{__scopeDialog:s,...n}=e,r=tr(ti,s),a=K(t,r.triggerRef);return(0,m.jsx)(Z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":tC(r.open),...n,ref:a,onClick:I(e.onClick,r.onOpenToggle)})}).displayName=ti;var tl="DialogPortal",[to,tc]=tt(tl,{forceMount:void 0}),td=e=>{let{__scopeDialog:t,forceMount:s,children:n,container:r}=e,a=tr(tl,t);return(0,m.jsx)(to,{scope:t,forceMount:s,children:p.Children.map(n,e=>(0,m.jsx)(eu,{present:s||a.open,children:(0,m.jsx)(eh,{asChild:!0,container:r,children:e})}))})};td.displayName=tl;var tx="DialogOverlay",th=p.forwardRef((e,t)=>{let s=tc(tx,e.__scopeDialog),{forceMount:n=s.forceMount,...r}=e,a=tr(tx,e.__scopeDialog);return a.modal?(0,m.jsx)(eu,{present:n||a.open,children:(0,m.jsx)(tu,{...r,ref:t})}):null});th.displayName=tx;var tu=p.forwardRef((e,t)=>{let{__scopeDialog:s,...n}=e,r=tr(tx,s);return(0,m.jsx)(e5,{as:G,allowPinchZoom:!0,shards:[r.contentRef],children:(0,m.jsx)(Z.div,{"data-state":tC(r.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),tm="DialogContent",tp=p.forwardRef((e,t)=>{let s=tc(tm,e.__scopeDialog),{forceMount:n=s.forceMount,...r}=e,a=tr(tm,e.__scopeDialog);return(0,m.jsx)(eu,{present:n||a.open,children:a.modal?(0,m.jsx)(tf,{...r,ref:t}):(0,m.jsx)(tg,{...r,ref:t})})});tp.displayName=tm;var tf=p.forwardRef((e,t)=>{let s=tr(tm,e.__scopeDialog),n=p.useRef(null),r=K(t,s.contentRef,n);return p.useEffect(()=>{let e=n.current;if(e)return e9(e)},[]),(0,m.jsx)(tb,{...e,ref:r,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,e=>{e.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,s=0===t.button&&!0===t.ctrlKey;(2===t.button||s)&&e.preventDefault()}),onFocusOutside:I(e.onFocusOutside,e=>e.preventDefault())})}),tg=p.forwardRef((e,t)=>{let s=tr(tm,e.__scopeDialog),n=p.useRef(!1),r=p.useRef(!1);return(0,m.jsx)(tb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||s.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,r.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(r.current=!0));let a=t.target;s.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&r.current&&t.preventDefault()}})}),tb=p.forwardRef((e,t)=>{let{__scopeDialog:s,trapFocus:n,onOpenAutoFocus:r,onCloseAutoFocus:a,...i}=e,l=tr(tm,s),o=p.useRef(null),c=K(t,o);return ef(),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(ei,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:r,onUnmountAutoFocus:a,children:(0,m.jsx)(ee,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":tC(l.open),...i,ref:c,onDismiss:()=>l.onOpenChange(!1)})}),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(tP,{titleId:l.titleId}),(0,m.jsx)(tL,{contentRef:o,descriptionId:l.descriptionId})]})]})}),ty="DialogTitle",tv=p.forwardRef((e,t)=>
1{let{__scopeDialog:s,...n}=e,r=tr(ty,s);return(0,m.jsx)(Z.h2,{id:r.titleId,...n,ref:t})});tv.displayName=ty;var tw="DialogDescription",tj=p.forwardRef((e,t)=>{let{__scopeDialog:s,...n}=e,r=tr(tw,s);return(0,m.jsx)(Z.p,{id:r.descriptionId,...n,ref:t})});tj.displayName=tw;var tN="DialogClose",tk=p.forwardRef((e,t)=>{let{__scopeDialog:s,...n}=e,r=tr(tN,s);return(0,m.jsx)(Z.button,{type:"button",...n,ref:t,onClick:I(e.onClick,()=>r.onOpenChange(!1))})});function tC(e){return e?"open":"closed"}tk.displayName=tN;var tS="DialogTitleWarning",[tT,tE]=(x={contentName:tm,titleName:ty,docsSlug:"dialog"},s=p.createContext(x),(n=e=>{let{children:t,...n}=e,r=p.useMemo(()=>n,Object.values(n));return(0,m.jsx)(s.Provider,{value:r,children:t})}).displayName=tS+"Provider",[n,function(e){let t=p.useContext(s);if(t)return t;if(void 0!==x)return x;throw Error(`\`${e}\` must be used within \`${tS}\``)}]),tP=({titleId:e})=>{let t=tE(tS),s=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 2 3If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 4 5For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(s))},[s,e]),null},tL=({contentRef:e,descriptionId:t})=>{let s=tE("DialogDescriptionWarning"),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${s.contentName}}.`;return p.useEffect(()=>{let s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},tM=e.i(41947),tM=tM,tA=e.i(7670);let tR=(e,t)=>{if(0===e.length)return t.classGroupId;let s=e[0],n=t.nextPart.get(s),r=n?tR(e.slice(1),n):void 0;if(r)return r;if(0===t.validators.length)return;let a=e.join("-");return t.validators.find(({validator:e})=>e(a))?.classGroupId},t_=/^\[(.+)\]$/,tI=(e,t,s,n)=>{e.forEach(e=>{if("string"==typeof e){(""===e?t:tD(t,e)).classGroupId=s;return}"function"==typeof e?tW(e)?tI(e(n),t,s,n):t.validators.push({validator:e,classGroupId:s}):Object.entries(e).forEach(([e,r])=>{tI(r,tD(t,e),s,n)})})},tD=(e,t)=>{let s=e;return t.split("-").forEach(e=>{s.nextPart.has(e)||s.nextPart.set(e,{nextPart:new Map,validators:[]}),s=s.nextPart.get(e)}),s},tW=e=>e.isThemeGetter,tK=/\s+/;function tz(){let e,t,s=0,n="";for(;s<arguments.length;)(e=arguments[s++])&&(t=tO(e))&&(n&&(n+=" "),n+=t);return n}let tO=e=>{let t;if("string"==typeof e)return e;let s="";for(let n=0;n<e.length;n++)e[n]&&(t=tO(e[n]))&&(s&&(s+=" "),s+=t);return s},t$=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},tH=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,tV=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tF=/^\d+\/\d+$/,tB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tY=/\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$/,tG=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,tq=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tU=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tX=e=>tF.test(e),tZ=e=>!!e&&!Number.isNaN(Number(e)),tJ=e=>!!e&&Number.isInteger(Number(e)),tQ=e=>e.endsWith("%")&&tZ(e.slice(0,-1)),t0=e=>tB.test(e),t1=()=>!0,t5=e=>tY.test(e)&&!tG.test(e),t2=()=>!1,t4=e=>tq.test(e),t6=e=>tU.test(e),t3=e=>!t7(e)&&!sr(e),t8=e=>sx(e,sp,t2),t7=e=>tH.test(e),t9=e=>sx(e,sf,t5),se=e=>sx(e,sg,tZ),st=e=>sx(e,su,t2),ss=e=>sx(e,sm,t6),sn=e=>sx(e,sy,t4),sr=e=>tV.test(e),sa=e=>sh(e,sf),si=e=>sh(e,sb),sl=e=>sh(e,su),so=e=>sh(e,sp),sc=e=>sh(e,sm),sd=e=>sh(e,sy,!0),sx=(e,t,s)=>{let n=tH.exec(e);return!!n&&(n[1]?t(n[1]):s(n[2]))},sh=(e,t,s=!1)=>{let n=tV.exec(e);return!!n&&(n[1]?t(n[1]):s)},su=e=>"position"===e||"percentage"===e,sm=e=>"image"===e||"url"===e,sp=e=>"length"===e||"size"===e||"bg-size"===e,sf=e=>"length"===e,sg=e=>"number"===e,sb=e=>"family-name"===e,sy=e=>"shadow"===e,sv=function(e,...t){let s,n,r,a=function(l){var o;let c;return n=(s={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,s=new Map,n=new Map,r=(r,a)=>{s.set(r,a),++t>e&&(t=0,n=s,s=new Map)};return{get(e){let t=s.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(r(e,t),t):void 0},set(e,t){s.has(e)?s.set(e,t):r(e,t)}}})((o=t.reduce((e,t)=>
5t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:s}=e,n=e=>{let t,s,n=[],r=0,a=0,i=0;for(let t=0;t<e.length;t++){let l=e[t];if(0===r&&0===a){if(":"===l){n.push(e.slice(i,t)),i=t+1;continue}if("/"===l){s=t;continue}}"["===l?r++:"]"===l?r--:"("===l?a++:")"===l&&a--}let l=0===n.length?e:e.substring(i),o=(t=l).endsWith("!")?t.substring(0,t.length-1):t.startsWith("!")?t.substring(1):t;return{modifiers:n,hasImportantModifier:o!==l,baseClassName:o,maybePostfixModifierPosition:s&&s>i?s-i:void 0}};if(t){let e=t+":",s=n;n=t=>t.startsWith(e)?s(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(s){let e=n;n=t=>s({className:t,parseClassName:e})}return n})(o),sortModifiers:(c=Object.fromEntries(o.orderSensitiveModifiers.map(e=>[e,!0])),e=>{if(e.length<=1)return e;let t=[],s=[];return e.forEach(e=>{"["===e[0]||c[e]?(t.push(...s.sort(),e),s=[]):s.push(e)}),t.push(...s.sort()),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:s}=e,n={nextPart:new Map,validators:[]};for(let e in s)tI(s[e],n,e,t);return n})(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{let s=e.split("-");return""===s[0]&&1!==s.length&&s.shift(),tR(s,t)||(e=>{if(t_.test(e)){let t=t_.exec(e)[1],s=t?.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}})(e)},getConflictingClassGroupIds:(e,t)=>{let r=s[e]||[];return t&&n[e]?[...r,...n[e]]:r}}})(o)}).cache.get,r=s.cache.set,a=i,i(l)};function i(e){let t=n(e);if(t)return t;let a=((e,t)=>{let{parseClassName:s,getClassGroupId:n,getConflictingClassGroupIds:r,sortModifiers:a}=t,i=[],l=e.trim().split(tK),o="";for(let e=l.length-1;e>=0;e-=1){let t=l[e],{isExternal:c,modifiers:d,hasImportantModifier:x,baseClassName:h,maybePostfixModifierPosition:u}=s(t);if(c){o=t+(o.length>0?" "+o:o);continue}let m=!!u,p=n(m?h.substring(0,u):h);if(!p){if(!m||!(p=n(h))){o=t+(o.length>0?" "+o:o);continue}m=!1}let f=a(d).join(":"),g=x?f+"!":f,b=g+p;if(i.includes(b))continue;i.push(b);let y=r(p,m);for(let e=0;e<y.length;++e){let t=y[e];i.push(g+t)}o=t+(o.length>0?" "+o:o)}return o})(e,s);return r(e,a),a}return function(){return a(tz.apply(null,arguments))}}(()=>{let e=t$("color"),t=t$("font"),s=t$("text"),n=t$("font-weight"),r=t$("tracking"),a=t$("leading"),i=t$("breakpoint"),l=t$("container"),o=t$("spacing"),c=t$("radius"),d=t$("shadow"),x=t$("inset-shadow"),h=t$("text-shadow"),u=t$("drop-shadow"),m=t$("blur"),p=t$("perspective"),f=t$("aspect"),g=t$("ease"),b=t$("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...v(),sr,t7],j=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],k=()=>[sr,t7,o],C=()=>[tX,"full","auto",...k()],S=()=>[tJ,"none","subgrid",sr,t7],T=()=>["auto",{span:["full",tJ,sr,t7]},tJ,sr,t7],E=()=>[tJ,"auto",sr,t7],P=()=>["auto","min","max","fr",sr,t7],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...k()],R=()=>[tX,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],_=()=>[e,sr,t7],I=()=>[...v(),sl,st,{position:[sr,t7]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",so,t8,{size:[sr,t7]}],K=()=>[tQ,sa,t9],z=()=>["","none","full",c,sr,t7],O=()=>["",tZ,sa,t9],$=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>[tZ,tQ,sl,st],F=()=>["","none",m,sr,t7],B=()=>["none",tZ,sr,t7],Y=()=>["none",tZ,sr,t7],G=()=>[tZ,sr,t7],q=()=>[tX,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[t0],breakpoint:[t0],color:[t1],container:[t0],"drop-shadow":[t0],ease:["in","out","in-out"],font:[t3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[t0],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[t0],shadow:[t0],spacing:["px",tZ],text:[t0],"text-shadow":[t0],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",tX,t7,sr,f]}
vendor: 12,788 bytes, line 5
5],container:["container"],columns:[{columns:[tZ,t7,sr,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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"],sr:["sr-only","not-sr-only"],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:w()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[tJ,"auto",sr,t7]}],basis:[{basis:[tX,"full","auto",l,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[tZ,tX,"auto","initial","none",t7]}],grow:[{grow:["",tZ,sr,t7]}],shrink:[{shrink:["",tZ,sr,t7]}],order:[{order:[tJ,"first","last","none",sr,t7]}],"grid-cols":[{"grid-cols":S()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":S()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:R()}],w:[{w:[l,"screen",...R()]}],"min-w":[{"min-w":[l,"screen","none",...R()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...R()]}],h:[{h:["screen",...R()]}],"min-h":[{"min-h":["screen","none",...R()]}],"max-h":[{"max-h":["screen",...R()]}],"font-size":[{text:["base",s,sa,t9]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,sr,se]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tQ,t7]}],"font-family":[{font:[si,t7,t]}],"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:[r,sr,t7]}],"line-clamp":[{"line-clamp":[tZ,"none",sr,se]}],leading:[{leading:[a,...k()]}],"list-image":[{"list-image":["none",sr,t7]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",sr,t7]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:[tZ,"from-font","auto",sr,t9]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[tZ,"auto",sr,t7]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",sr,t7]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",sr,t7]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:D()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},tJ,sr,t7],radial:["",sr,t7],conic:[tJ,sr,t7]},sc,ss]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...$(),"hidden","none"]}],"divide-style":[{divide:[...$(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...$(),"none","hidden"]}],"outline-offset":[{"outline-offset":[tZ,sr,t7]}],"outline-w":[{outline:["",tZ,sa,t9]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",d,sd,sn]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",x,sd,sn]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[tZ,t9]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",h,sd,sn]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[tZ,sr,t7]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[tZ]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[sr,t7]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[tZ]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:D()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",sr,t7]}],filter:[{filter:["","none",sr,t7]}],blur:[{blur:F()}],brightness:[{brightness:[tZ,sr,t7]}],contrast:[{contrast:[tZ,sr,t7]}],"drop-shadow":[{"drop-shadow":["","none",u,sd,sn]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",tZ,sr,t7]}],"hue-rotate":[{"hue-rotate":[tZ,sr,t7]}],invert:[{invert:["",tZ,sr,t7]}],saturate:[{saturate:[tZ,sr,t7]}],sepia:[{sepia:["",tZ,sr,t7]}],"backdrop-filter":[{"backdrop-filter":["","none",sr,t7]}],"backdrop-blur":[{"backdrop-blur":F()}],"backdrop-brightness":[{"backdrop-brightness":[tZ,sr,t7]}],"backdrop-contrast":[{"backdrop-contrast":[tZ,sr,t7]}],"backdrop-grayscale":[{"backdrop-grayscale":["",tZ,sr,t7]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tZ,sr,t7]}],"backdrop-invert":[{"backdrop-invert":["",tZ,sr,t7]}],"backdrop-opacity":[{"backdrop-opacity":[tZ,sr,t7]}],"backdrop-saturate":[{"backdrop-saturate":[tZ,sr,t7]}],"backdrop-sepia":[{"backdrop-sepia":["",tZ,sr,t7]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",sr,t7]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[tZ,"initial",sr,t7]}],ease:[{ease:["linear","initial",g,sr,t7]}],delay:[{delay:[tZ,sr,t7]}],animate:[{animate:["none",b,sr,t7]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,sr,t7]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:B()}],"rotate-x":[{"rotate-x":B()}],"rotate-y":[{"rotate-y":B()}],"rotate-z":[{"rotate-z":B()}],scale:[{scale:Y()}],"scale-x":[{"scale-x":Y()}],"scale-y":[{"scale-y":Y()}],"scale-z":[{"scale-z":Y()}],"scale-3d":["scale-3d"],skew:[{skew:G()}],"skew-x":[{"skew-x":G()}],"skew-y":[{"skew-y":G()}],transform:[{transform:[sr,t7,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:q()}],"translate-x":[{"translate-x":q()}],"translate-y":[{"translate-y":q()}],"translate-z":[{"translate-z":q()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}
vendor: 5,376 bytes, line 5
5],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",sr,t7]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",sr,t7]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[tZ,sa,t9,se]}],stroke:[{stroke:["none",..._()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function sw(...e){return sv((0,tA.clsx)(e))}function sj({...e}){return(0,m.jsx)(ta,{"data-slot":"dialog",...e})}function sN({...e}){return(0,m.jsx)(td,{"data-slot":"dialog-portal",...e})}function sk({className:e,...t}){return(0,m.jsx)(th,{"data-slot":"dialog-overlay",className:sw("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[100] bg-black/80",e),...t})}function sC({className:e,children:t,hideClose:s,...n}){return(0,m.jsxs)(sN,{"data-slot":"dialog-portal",children:[(0,m.jsx)(sk,{}),(0,m.jsxs)(tp,{"data-slot":"dialog-content",className:sw("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[100] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 roun
5ded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,!s&&(0,m.jsxs)(tk,{className:"absolute top-3 right-3 sm:top-4 sm:right-4 flex items-center justify-center w-9 h-9 rounded-full bg-white/10 hover:bg-white/20 text-white/70 hover:text-white transition-all focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 ring-offset-background disabled:pointer-events-none",children:[(0,m.jsx)(tM.default,{className:"size-5"}),(0,m.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function sS({className:e,...t}){return(0,m.jsx)("div",{"data-slot":"dialog-header",className:sw("flex flex-col gap-2 text-left",e),...t})}function sT({className:e,...t}){return(0,m.jsx)("div",{"data-slot":"dialog-footer",className:sw("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function sE({className:e,...t}){return(0,m.jsx)(tv,{"data-slot":"dialog-title",className:sw("text-lg leading-none font-semibold",e),...t})}function sP({className:e,...t}){return(0,m.jsx)(tj,{"data-slot":"dialog-description",className:sw("text-muted-foreground text-sm",e),...t})}var sL=e.i(91367),sM=e.i(83086),sA=e.i(72520),sR=e.i(9165),s_=e.i(28989),sI=e.i(87384);function sD({onCompleted:e}){let{user:t,refreshUser:s,phoneBonusGranted:n,clearPhoneBonus:r}=(0,g.useAuth)(),a=(0,s_.useTenant)(),i=(0,sI.useThemeStyle)(),l=a.primaryColor,o="light"===a.themeMode,[c,d]=(0,p.useState)(!1),[x,h]=(0,p.useState)(!1);(0,p.useEffect)(()=>{if(x)return;let e=t?.phoneNumber||"";if(e.length>=5){let t=e.slice(-5),n=`User ${t}`;(0,sR.updateProfile)({showName:n}).then(()=>{s(),h(!0)}).catch(()=>{h(!0)})}else h(!0)},[t?.phoneNumber,x,s]);let u=()=>{d(!0),r(),e()};return(0,m.jsx)("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-md flex items-center justify-center z-[9999] px-4",children:(0,m.jsxs)("div",{className:"w-full max-w-sm rounded-2xl overflow-hidden relative",style:{background:i.cardBg,border:`1px solid ${i.borderColor}`},children:[(0,m.jsx)("button",{onClick:u,className:"absolute top-3 right-3 z-10 w-8 h-8 rounded-full flex items-center justify-center transition-colors duration-150 cursor-pointer",style:{background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.12)",color:"rgba(255,255,255,0.5)"},onMouseEnter:e=>{e.currentTarget.style.background="rgba(255,255,255,0.15)",e.currentTarget.style.color="rgba(255,255,255,0.9)"},onMouseLeave:e=>{e.currentTarget.style.background="rgba(255,255,255,0.08)",e.currentTarget.style.color="rgba(255,255,255,0.5)"},children:(0,m.jsx)(_.X,{className:"w-4 h-4"})}),(0,m.jsxs)("div",{className:"px-6 pt-8 pb-6 text-center relative overflow-hidden",style:{background:`linear-gradient(135deg, ${l}25, #f59e0b20, ${l}15)`},children:[(0,m.jsx)("style",{children:` 6 @keyframes float-up { 7 0% { transform: translateY(0) scale(1); opacity: 0.6; } 8 100% { transform: translateY(-60px) scale(0.5); opacity: 0; } 9 } 10 @keyframes celebrate-pulse { 11 0%, 100% { transform: scale(1); } 12 50% { transform: scale(1.05); } 13 } 14 `}),(0,m.jsx)("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",children:[...Array(6)].map((e,t)=>(0,m.jsx)("div",{className:"absolute rounded-full",style:{width:4+t%3*2,height:4+t%3*2,left:`${15+14*t}%`,bottom:"10%",background:t%2==0?"#f59e0b":l,opacity:.4,animation:`float-up ${2+.5*t}s ease-in-out infinite`,animationDelay:`${.3*t}s`}},t))}),(0,m.jsx)("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mx-auto mb-4",style:{background:"linear-gradient(135deg, #f59e0b, #f97316)",boxShadow:"0 8px 32px rgba(245,158,11,0.35)",animation:"celebrate-pulse 2s ease-in-out infinite"},children:(0,m.jsx)(C.Gift,{className:"w-8 h-8 text-white"})}),(0,m.jsx)("h2",{className:"text-xl mb-1",style:{fontWeight:800,color:i.textPrimary},children:"ð Chúc mừng!"}),(0,m.jsx)("p",{className:"text-sm",style:{color:i.textSecondary},children:"Tà i khoản Äã ÄÆ°á»£c tạo thà nh công"})]}),(0,m.jsxs)("div",{className:"px-6 py-5",children:[(0,m.jsx)("div",{className:"p-4 rounded-xl relative overflow-hidden mb-5",style:{background:"linear-gradient(135deg, rgba(245,158,11,0.12), rgba(16,185,129,0.08))",border:"1px solid rgba(245,158,11,0.25)"},children:(0,m.jsxs)("div",{className:"flex items-center gap-3",children:[(0,m.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:"linear-gradient(135deg, #10b981, #059669)"},children:(0,m.jsx)(sM.Sparkles,{className:"w-5 h-5 text-white"})}),(0,m.jsxs)("div",{className:"flex-1",children:[(0,m.jsxs)("div",{className:"text-base",style:{fontWeight:700,color:"#f59e0b"},children:["+",(n>
140?n:22500).toLocaleString("vi-VN"),"â«"]}),(0,m.jsx)("div",{className:"text-xs mt-0.5",style:{color:i.textMuted},children:"Äã cá»ng và o tà i khoản · 3 keys trải nghiá»m"})]})]})}),(0,m.jsxs)("ul",{className:"space-y-2 mb-5 pl-0 list-none text-sm",style:{color:i.textSecondary},children:[(0,m.jsxs)("li",{className:"flex items-start gap-2",children:[(0,m.jsx)("span",{style:{color:l},children:"â¢"}),(0,m.jsx)("span",{children:"Tạo key proxy Äá» sá» dụng ngay"})]}),(0,m.jsxs)("li",{className:"flex items-start gap-2",children:[(0,m.jsx)("span",{style:{color:l},children:"â¢"}),(0,m.jsxs)("span",{children:["Xem hưá»ng dẫn sá» dụng"," ",(0,m.jsx)("a",{href:"/huong-dan",style:{color:l,fontWeight:600},children:"tại Äây"})]})]})]}),(0,m.jsx)("button",{onClick:u,disabled:c,className:"w-full py-3.5 rounded-xl transition-all duration-300 flex items-center justify-center gap-2 disabled:opacity-60 cursor-pointer border-none",style:{fontWeight:700,fontSize:15,background:`linear-gradient(135deg, ${l}, ${a.primaryColorDark})`,color:o?"#ffffff":"#09090b",boxShadow:`0 4px 20px ${l}35`},onMouseEnter:e=>!c&&(e.currentTarget.style.boxShadow=`0 0 30px ${l}50`),onMouseLeave:e=>e.currentTarget.style.boxShadow=`0 4px 20px ${l}35`,children:c?(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"}):(0,m.jsxs)(m.Fragment,{children:["Dùng Ngay",(0,m.jsx)(sA.ArrowRight,{className:"w-4 h-4"})]})})]})]})})}var sW=e.i(61911),sK=e.i(14764),sz=e.i(43531);function sO({onJoined:e,onClose:t}){let s=(0,s_.useTenant)(),n=(0,sI.useThemeStyle)(),r=s.primaryColor,a="light"===s.themeMode,[i,l]=(0,p.useState)(!1),o=()=>{t()};return(0,m.jsx)("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-md flex items-center justify-center z-[9999] px-4",children:(0,m.jsxs)("div",{className:"w-full max-w-md rounded-2xl overflow-hidden relative shadow-2xl animate-in fade-in zoom-in-95 duration-200",style:{background:n.cardBg,border:`1px solid ${n.borderColor}`},children:[(0,m.jsx)("button",{onClick:o,className:"absolute top-3 right-3 z-10 w-8 h-8 rounded-full flex items-center justify-center transition-colors duration-150 cursor-pointer",style:{background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.12)",color:"rgba(255,255,255,0.5)"},onMouseEnter:e=>{e.currentTarget.style.background="rgba(255,255,255,0.15)",e.currentTarget.style.color="rgba(255,255,255,0.9)"},onMouseLeave:e=>{e.currentTarget.style.background="rgba(255,255,255,0.08)",e.currentTarget.style.color="rgba(255,255,255,0.5)"},children:(0,m.jsx)(_.X,{className:"w-4 h-4"})}),(0,m.jsxs)("div",{className:"px-6 pt-8 pb-6 text-center relative overflow-hidden",style:{background:`linear-gradient(135deg, ${r}20, #06b6d415, ${r}10)`},children:[(0,m.jsx)("style",{children:` 15 @keyframes glow-pulse { 16 0%, 100% { transform: scale(1); opacity: 0.5; } 17 50% { transform: scale(1.08); opacity: 0.8; } 18 } 19 `}),(0,m.jsxs)("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",children:[(0,m.jsx)("div",{className:"absolute w-32 h-32 rounded-full blur-[40px] -top-10 -left-10 opacity-30",style:{background:r}}),(0,m.jsx)("div",{className:"absolute w-32 h-32 rounded-full blur-[40px] -bottom-10 -right-10 opacity-30",style:{background:"#06b6d4"}})]}),(0,m.jsx)("div",{className:"w-14 h-14 rounded-2xl flex items-center justify-center mx-auto mb-4",style:{background:`linear-gradient(135deg, ${r}, #06b6d4)`,boxShadow:`0 8px 30px ${r}40`},children:(0,m.jsx)(sW.Users,{className:"w-7 h-7 text-white"})}),(0,m.jsx)("h2",{className:"text-xl mb-1.5",style:{fontWeight:800,color:n.textPrimary},children:"Tham Gia Cá»ng Äá»ng NestProxy"}),(0,m.jsx)("p",{className:"text-sm px-4 leading-relaxed",style:{color:n.textSecondary},children:"Nháºn tin tức má»i nhất, GIFTCODE hà ng tuần vÃ ÄÆ°á»£c há» trợ nhanh nhất từ Äá»i ngÅ© Admin."})]}),(0,m.jsxs)("div",{className:"px-6 py-5 space-y-4",children:[(0,m.jsxs)("a",{href:"https://zalo.me/g/05o1nfsxmh1oc8fapmjn",target:"_blank",rel:"noopener noreferrer",className:"group flex items-center gap-4 p-4 rounded-xl border no-underline transition-all duration-300 hover:scale-[1.01] hover:bg-white/[0.03] cursor-pointer",style:{borderColor:"rgba(0, 104, 255, 0.25)",background:"linear-gradient(135deg, rgba(0, 104, 255, 0.08) 0%, rgba(0, 104, 255, 0.03) 100%)"},children:[(0,m.jsx)("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center shrink-0 shadow-md",style:{background:"#0068ff"},children:(0,m.jsx)("img",{src:"/images/icon-zalo.png",alt:"Zalo",className:"w-7 h-7 object-contain"})}),(0,m.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,m.jsxs)("div",{className:"text-sm font-bold text-white flex items-center gap-1.5",children:["Cá»ng Äá»
19ng Zalo NestProxy",(0,m.jsx)("span",{className:"text-[10px] bg-red-500/20 text-red-400 px-1.5 py-0.5 rounded font-medium",children:"HOT"})]}),(0,m.jsx)("p",{className:"text-[12px] text-white/50 mt-1 leading-snug",children:"Thảo luáºn nhóm, há»i Äáp trá»±c tiếp và sÄn GIFTCODE."})]}),(0,m.jsx)("div",{className:"w-8 h-8 rounded-full bg-white/5 flex items-center justify-center text-white/40 group-hover:text-white group-hover:bg-white/10 transition-colors",children:(0,m.jsx)(sA.ArrowRight,{className:"w-4 h-4 transition-transform group-hover:translate-x-0.5"})})]}),(0,m.jsxs)("a",{href:"https://t.me/nestgroupcompany",target:"_blank",rel:"noopener noreferrer",className:"group flex items-center gap-4 p-4 rounded-xl border no-underline transition-all duration-300 hover:scale-[1.01] hover:bg-white/[0.03] cursor-pointer",style:{borderColor:"rgba(36, 161, 222, 0.25)",background:"linear-gradient(135deg, rgba(36, 161, 222, 0.08) 0%, rgba(36, 161, 222, 0.03) 100%)"},children:[(0,m.jsx)("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center shrink-0 shadow-md",style:{background:"#24A1DE"},children:(0,m.jsx)(sK.Send,{className:"w-6 h-6 text-white -translate-x-0.5 translate-y-0.5"})}),(0,m.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,m.jsx)("div",{className:"text-sm font-bold text-white",children:"Kênh Telegram Official"}),(0,m.jsx)("p",{className:"text-[12px] text-white/50 mt-1 leading-snug",children:"Theo dõi cáºp nháºt há» thá»ng, thông báo khẩn cấp và sá»± kiá»n ưu Äãi."})]}),(0,m.jsx)("div",{className:"w-8 h-8 rounded-full bg-white/5 flex items-center justify-center text-white/40 group-hover:text-white group-hover:bg-white/10 transition-colors",children:(0,m.jsx)(sA.ArrowRight,{className:"w-4 h-4 transition-transform group-hover:translate-x-0.5"})})]}),(0,m.jsxs)("div",{className:"pt-4 flex flex-col sm:flex-row gap-3",children:[(0,m.jsx)("button",{onClick:o,className:"w-full sm:w-1/3 py-3 rounded-xl transition-all duration-200 text-sm font-medium border cursor-pointer hover:bg-white/5 flex items-center justify-center",style:{borderColor:n.borderColor,color:n.textSecondary,background:"transparent"},children:"Äá» sau"}),(0,m.jsx)("button",{onClick:()=>{l(!0),setTimeout(()=>{l(!1),e()},500)},disabled:i,className:"w-full sm:w-2/3 py-3 rounded-xl transition-all duration-300 flex items-center justify-center gap-2 disabled:opacity-60 cursor-pointer border-none",style:{fontWeight:700,fontSize:14,background:`linear-gradient(135deg, ${r}, ${s.primaryColorDark||r})`,color:a?"#ffffff":"#09090b",boxShadow:`0 4px 14px ${r}30`},onMouseEnter:e=>!i&&(e.currentTarget.style.boxShadow=`0 0 20px ${r}40`),onMouseLeave:e=>e.currentTarget.style.boxShadow=`0 4px 14px ${r}30`,children:i?(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(sz.Check,{className:"w-4 h-4"}),"Tôi Äã tham gia"]})})]})]})]})})}function s$(){let e=(0,s_.useTenant)();if(!e.announcementActive||!e.announcementTitle&&!e.announcementText)return null;let t=(0,m.jsxs)("span",{className:"inline-flex items-center gap-3 px-6 cursor-pointer",children:[e.announcementTitle&&(0,m.jsx)("span",{className:"text-[14px] text-[#c4b5fd] font-bold",children:e.announcementTitle}),e.announcementText&&(0,m.jsx)("span",{className:"text-[14px] text-white font-semibold",children:e.announcementText}),e.announcementActionText&&(0,m.jsx)("span",{className:"text-[14px] text-[#a78bfa] font-bold",children:e.announcementActionText}),(0,m.jsx)("span",{className:"text-white/20",children:"â¦"})]}),s=e.announcementLink?(0,m.jsx)("a",{href:e.announcementLink,target:"_blank",rel:"noopener noreferrer",className:"no-underline",children:t}):t;return(0,m.jsxs)("div",{className:"w-full overflow-hidden bg-[linear-gradient(90deg,#09090b_0%,#1a1040_50%,#09090b_100%)] border-b border-[#a78bfa]/10",children:[(0,m.jsx)("style",{children:` 20 @keyframes marquee-scroll { 21 0% { transform: translateX(0); } 22 100% { transform: translateX(-50%); } 23 } 24 .marquee-track { 25 display: flex; 26 width: max-content; 27 animation: marquee-scroll 90s linear infinite; 28 } 29 .marquee-track:hover { 30 animation-play-state: paused; 31 } 32 `}),(0,m.jsxs)("div",{className:"marquee-track py-1.5",children:[[...Array(8)].map((e,t)=>(0,m.jsx)("span",{children:s},t)),[...Array(8)].map((e,t)=>(0,m.jsx)("span",{children:s},`dup-${t}`))]})]})}var sH=e.i(83623),sV=e.i(74886),sF=e.i(70756),sB=e.i(86536),sY=e.i(77705);let sG=(0,T.default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);function sq(){let{user:e,refreshUser:t}=(0,g.useAuth)(),[s,n]=(0,p.useState)(!1),[r,a]=(0,p.useState)(!1),[i,l]=(0,p.useState)(!1),[o,c]=(0,p.useState)(e?.apiKey||""),[d,x]=(0,p.useState)(!1),[h,u]=(0,p.useState)(e?.showName||""),[f,y]=(0,p.useState)(!1),v=(e,t)=>
32{let s=(e||"").replace(/\s|-/g,"");return/^0\d{11}$/.test(s)?"individual":s&&s.length>=10||t&&/^(công ty|cty|cong ty|tnhh|cá» phần|co phan)/i.test(t.trim())?"business":"individual"},[w,j]=(0,p.useState)(()=>v(e?.billingTaxId,e?.billingName)),[N,C]=(0,p.useState)(e?.billingName||""),[S,T]=(0,p.useState)(e?.billingTaxId||""),[E,P]=(0,p.useState)(e?.billingAddress||""),[L,M]=(0,p.useState)(e?.billingEmail||""),[A,R]=(0,p.useState)(!1),[_,I]=(0,p.useState)(""),[D,W]=(0,p.useState)(""),[K,z]=(0,p.useState)(""),[O,$]=(0,p.useState)(!1),H=(0,p.useRef)(!1);(0,p.useEffect)(()=>{e&&!H.current&&(H.current=!0,u(e.showName||""),c(e.apiKey||""),C(e.billingName||""),T(e.billingTaxId||""),P(e.billingAddress||""),M(e.billingEmail||""),j(v(e.billingTaxId,e.billingName)))},[e]);let V="w-full px-4 py-3 rounded-xl bg-[#09090b] border border-white/[0.08] text-white placeholder-[#52525b] focus:border-[#06b6d4]/30 focus:outline-none text-sm",F="block text-xs text-[#a1a1aa] mb-1.5",B=async()=>{y(!0);try{await (0,sR.updateProfile)({showName:h}),H.current=!1,await t(),b.toast.success("Cáºp nháºt thà nh công!")}catch(e){b.toast.error(e.message||"Lá»i cáºp nháºt")}y(!1)},Y=async()=>{R(!0);try{let e="business"===w?N:"";await (0,sR.updateProfile)({billingName:e,billingTaxId:S,billingAddress:E,billingEmail:L}),H.current=!1,await t(),b.toast.success("Lưu thông tin hoá ÄÆ¡n thà nh công!")}catch(e){b.toast.error(e.message||"Lá»i lưu thông tin hoá ÄÆ¡n")}R(!1)},G=async()=>{if(D.length<8)return void b.toast.error("Máºt khẩu má»i phải có Ãt nhất 8 ký tá»±");if(D!==K)return void b.toast.error("Máºt khẩu xác nháºn không khá»p");$(!0);try{await (0,sR.changePassword)({currentPassword:_,newPassword:D}),b.toast.success("Äá»i máºt khẩu thà nh công!"),I(""),W(""),z("")}catch(e){b.toast.error(e.message||"Lá»i Äá»i máºt khẩu")}$(!1)};return(0,m.jsxs)("div",{className:"space-y-5",children:[(0,m.jsx)("h2",{className:"text-white text-xl sm:text-2xl",style:{fontWeight:700},children:"Quản lý tà i khoản"}),(0,m.jsxs)("div",{className:"p-5 rounded-xl bg-[#18181b]/60 border border-white/[0.08]",children:[(0,m.jsx)("h3",{className:"text-white text-sm mb-4",style:{fontWeight:600},children:"Thông tin cá nhân"}),(0,m.jsxs)("div",{className:"grid md:grid-cols-3 gap-4",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:F,children:"Tên hiá»n thá»"}),(0,m.jsx)("input",{type:"text",value:h,onChange:e=>u(e.target.value),className:V})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:F,children:"Email"}),(0,m.jsx)("input",{type:"email",value:e?.email||"",readOnly:!0,className:`${V} text-[#71717a] cursor-not-allowed`})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:F,children:"Ngà y ÄÄng ký"}),(0,m.jsx)("input",{type:"text",value:e?.createdAt?new Date(e.createdAt).toLocaleDateString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"}):"â",readOnly:!0,className:`${V} text-[#71717a] cursor-not-allowed`})]})]}),(0,m.jsxs)("button",{onClick:B,disabled:f,className:"mt-4 px-5 py-2.5 bg-gradient-to-r from-[#06b6d4] to-[#0891b2] text-[#09090b] rounded-xl hover:shadow-[0_0_20px_rgba(6,182,212,0.3)] transition-all text-sm flex items-center gap-2 disabled:opacity-50",style:{fontWeight:600},children:[f&&(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"}),"Lưu thay Äá»i"]})]}),(0,m.jsxs)("div",{className:"p-5 rounded-xl bg-[#18181b]/60 border border-[#8b5cf6]/10",children:[(0,m.jsx)("div",{className:"flex items-center gap-2 mb-1",children:(0,m.jsx)("h3",{className:"text-white text-sm",style:{fontWeight:600},children:"ð§¾ Thông tin hoá ÄÆ¡n"})}),(0,m.jsx)("p",{className:"text-xs text-[#a1a1aa] mb-4",children:"Cấu hình thông tin Äá» xuất hoá ÄÆ¡n Äiá»n tá» GTGT tá»± Äá»ng khi nạp tiá»n. Nếu chưa cấu hình, hoá ÄÆ¡n sẽ xuất theo tên hiá»n thá» hoặc sá» Äiá»n thoại."}),(0,m.jsxs)("div",{className:"flex items-center gap-1 p-1 rounded-xl bg-[#09090b] border border-white/[0.08] mb-5 w-fit",children:[(0,m.jsx)("button",{onClick:()=>j("individual"),className:`px-4 py-2 rounded-lg text-sm transition-all ${"individual"===w?"bg-[#8b5cf6]/20 text-[#a78bfa] shadow-sm":"text-[#71717a] hover:text-[#a1a1aa]"}`,style:{fontWeight:"individual"===w?600:400},children:"ð¤ Cá nhân"}),(0,m.jsx)("button",{onClick:()=>j("business"),className:`px-4 py-2 rounded-lg text-sm transition-all ${"business"===w?"bg-[#8b5cf6]/20 text-[#a78bfa] shadow-sm":"text-[#71717a] hover:text-[#a1a1aa]"}`,style:{fontWeight:"business"===w?600:400},children:"ð¢ Doanh nghiá»p"})]}),"individual"===w?(0,m.jsxs)("div",{className:"grid md:grid-cols-2 gap-4",children:[(0,m.jsx)("div",{className:"md:col-span-2",children:(0,m.jsx)("div",{className:"p-3 rounded-xl bg-[#8b5cf6]/5 border border-[#8b5cf6]/10 mb-1",children:(0,m.jsxs)("p",{className:"text-xs text-[#a78bfa]",style:{lineHeight:1.6},children:["ð¡ Hoá ÄÆ¡n cá nhân sẽ sá» dụng ",(0,m.jsx)("strong",{children:"tên hiá»n thá»"})," cá»§a bạn là m tên ngưá»i mua. Bạn có thá» cung cấp sá» CCCD Äá» ghi trên hoá ÄÆ¡n."]})})}),(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:F,children:"Sá» CCCD"}),(0,m.jsx)("input",{type:"text",value:S,onChange:e=>T(e.target.value),className:V,placeholder:"VD: 001234567890"})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:F,children:"Email nháºn hoá ÄÆ¡n"}),(0,m.jsx)("input",{type:"email",value:L,onChange:e=>M(e.target.value),className:V,placeholder:"Äá» trá»ng sẽ dùng email tà i khoản"})]}),(0,m.jsxs)("div",{className:"md:col-span-2",children:[(0,m.jsx)("label",{className:F,children:"Äá»a chá»"}),(0,m.jsx)("input",{type:"text",value:E,onChange:e=>P(e.target.value),className:V,placeholder:"VD: 123 Nguyá»
n Huá», Quáºn 1, TP.HCM"})]})]}):(0,m.jsxs)("div",{className:"grid md:grid-cols-2 gap-4",children:[(0,m.jsxs)("div",{children:[(0,m.jsxs)("label",{className:F,children:["Tên doanh nghiá»p ",(0,m.jsx)("span",{className:"text-[#ef4444]",children:"*"})]}),(0,m.jsx)("input",{type:"text",value:N,onChange:e=>C(e.target.value),className:V,placeholder:"VD: Công ty TNHH ABC"})]}),(0,m.jsxs)("div",{children:[(0,m.jsxs)("label",{className:F,children:["Mã sá» thuế ",(0,m.jsx)("span",{className:"text-[#ef4444]",children:"*"})]}),(0,m.jsx)("input",{type:"text",value:S,onChange:e=>T(e.target.value),className:V,placeholder:"VD: 0123456789"})]}),(0,m.jsxs)("div",{className:"md:col-span-2",children:[(0,m.jsx)("label",{className:F,children:"Äá»a chá» doanh nghiá»p"}),(0,m.jsx)("input",{type:"text",value:E,onChange:e=>P(e.target.value),className:V,placeholder:"VD: 123 Nguyá»
n Huá», Quáºn 1, TP.HCM"})]}),(0,m.jsxs)("div",{className:"md:col-span-2",children:[(0,m.jsx)("label",{className:F,children:"Email nháºn hoá ÄÆ¡n"}),(0,m.jsx)("input",{type:"email",value:L,onChange:e=>M(e.target.value),className:V,placeholder:"VD: [email protected] (Äá» trá»ng sẽ dùng email tà i khoản)"})]})]}),(0,m.jsxs)("button",{onClick:Y,disabled:A,className:"mt-4 px-5 py-2.5 bg-gradient-to-r from-[#8b5cf6] to-[#7c3aed] text-white rounded-xl hover:shadow-[0_0_20px_rgba(139,92,246,0.3)] transition-all text-sm flex items-center gap-2 disabled:opacity-50",style:{fontWeight:600},children:[A&&(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"}),"Lưu thông tin hoá ÄÆ¡n"]})]}),(0,m.jsxs)("div",{className:"p-5 rounded-xl bg-[#18181b]/60 border border-white/[0.08]",children:[(0,m.jsx)("h3",{className:"text-white text-sm mb-4",style:{fontWeight:600},children:"Äá»i máºt khẩu"}),(0,m.jsxs)("div",{className:"grid md:grid-cols-3 gap-4",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:F,children:"Máºt khẩu hiá»n tại"}),(0,m.jsxs)("div",{className:"relative",children:[(0,m.jsx)("input",{type:s?"text":"password",value:_,onCh
32ange:e=>I(e.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",className:`${V} pr-10`}),(0,m.jsx)("button",{onClick:()=>n(!s),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[#52525b] hover:text-[#a1a1aa]",children:s?(0,m.jsx)(sY.EyeOff,{className:"w-4 h-4"}):(0,m.jsx)(sB.Eye,{className:"w-4 h-4"})})]})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:F,children:"Máºt khẩu má»i"}),(0,m.jsxs)("div",{className:"relative",children:[(0,m.jsx)("input",{type:r?"text":"password",value:D,onChange:e=>W(e.target.value),placeholder:"Tá»i thiá»u 8 ký tá»±",className:`${V} pr-10`}),(0,m.jsx)("button",{onClick:()=>a(!r),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[#52525b] hover:text-[#a1a1aa]",children:r?(0,m.jsx)(sY.EyeOff,{className:"w-4 h-4"}):(0,m.jsx)(sB.Eye,{className:"w-4 h-4"})})]})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:F,children:"Xác nháºn máºt khẩu"}),(0,m.jsxs)("div",{className:"relative",children:[(0,m.jsx)("input",{type:i?"text":"password",value:K,onChange:e=>z(e.target.value),placeholder:"Nháºp lại",className:`${V} pr-10`}),(0,m.jsx)("button",{onClick:()=>l(!i),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[#52525b] hover:text-[#a1a1aa]",children:i?(0,m.jsx)(sY.EyeOff,{className:"w-4 h-4"}):(0,m.jsx)(sB.Eye,{className:"w-4 h-4"})})]})]})]}),(0,m.jsxs)("button",{onClick:G,disabled:O,className:"mt-4 px-5 py-2.5 bg-[#f59e0b]/10 text-[#f59e0b] border border-[#f59e0b]/30 rounded-xl hover:bg-[#f59e0b]/20 transition-all flex items-center gap-2 text-sm disabled:opacity-50",style:{fontWeight:600},children:[O?(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"}):(0,m.jsx)(sF.Lock,{className:"w-4 h-4"}),"Äá»i máºt khẩu"]})]}),(0,m.jsxs)("div",{className:"p-5 rounded-xl bg-[#18181b]/60 border border-white/[0.08]",children:[(0,m.jsx)("h3",{className:"text-white text-sm mb-3",style:{fontWeight:600},children:"API Key"}),(0,m.jsx)("div",{className:"px-4 py-3 rounded-xl bg-[#09090b] border border-white/[0.08] overflow-hidden mb-2",children:(0,m.jsx)("code",{className:"text-xs sm:text-sm text-[#22d3ee] break-all block",style:{fontFamily:"'JetBrains Mono', monospace"},children:o})}),(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(o),x(!0),setTimeout(()=>x(!1),2e3)},className:"flex-1 sm:flex-none px-4 py-2.5 rounded-xl bg-[#06b6d4]/10 text-[#06b6d4] hover:bg-[#06b6d4]/20 transition-all flex items-center justify-center gap-2 text-sm flex-shrink-0",style:{fontWeight:500},children:d?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(sz.Check,{className:"w-4 h-4 text-[#10b981]"})," Äã copy"]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(sV.Copy,{className:"w-4 h-4"})," Copy"]})}),(0,m.jsxs)("button",{disabled:!0,className:"flex-1 sm:flex-none px-4 py-2.5 rounded-xl bg-[#8b5cf6]/10 text-[#8b5cf6]/40 flex items-center justify-center gap-2 text-sm flex-shrink-0 cursor-not-allowed opacity-50",style:{fontWeight:500},title:"TÃnh nÄng Äang phát triá»n",children:[(0,m.jsx)(sG,{className:"w-4 h-4"})," Tạo má»i"]})]}),(0,m.jsx)("p",{className:"mt-3 text-xs text-[#f59e0b]/70",children:"Tạo key má»i sẽ vô hiá»u hoá key cÅ© ngay láºp tức."})]})]})}var sU=e.i(94983),sX=e.i(63488);let sZ=(0,T.default)("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);var sJ=e.i(3116),sQ=e.i(64659);function s0(){let e=(0,s_.useTenant)(),[t,s]=(0,p.useState)(0),[n,r]=(0,p.useState)(""),[a,i]=(0,p.useState)(""),[l,o]=(0,p.useState)(!1),[c,d]=(0,p.useState)([]),[x,h]=(0,p.useState)(!0),u={deposit:"Nạp tiá»n / Thanh toán",key:"Key proxy / Kết ná»i",api:"API / TÃch hợp",account:"Tà i khoản / Bảo máºt",other:"Khác"},f={open:{label:"Äang chá»",color:"#f59e0b"},in_progress:{label:"Äang xá» lý",color:"#06b6d4"},resolved:{label:"Äã giải quyết",color:"#10b981"},closed:{label:"Äã Äóng",color:"#71717a"}},g=(0,p.useCallback)(async()=>{try{let e=await (0,sR.getSupportTickets)();d(e)}catch{}finally{h(!1)}},[]);(0,p.useEffect)(()=>{g()},[g]);let y=async()=>
32{if(!n)return void b.toast.error("Vui lòng chá»n chá»§ Äá»");if(!a.trim())return void b.toast.error("Vui lòng nháºp ná»i dung chi tiết");o(!0);try{await (0,sR.submitSupportTicket)(n,a.trim()),b.toast.success("Gá»i yêu cầu há» trợ thà nh công!"),r(""),i(""),g()}catch(e){b.toast.error(e.message||"Lá»i gá»i yêu cầu há» trợ")}o(!1)};return(0,m.jsxs)("div",{className:"space-y-6",children:[(0,m.jsx)("h2",{className:"text-white text-lg",style:{fontWeight:600},children:"Trung tâm há» trợ"}),(0,m.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-3 md:gap-4",children:[...e.contactZalo?[{icon:sU.MessageCircle,label:"Zalo há» trợ",desc:e.contactPhone||"Zalo",color:"#0068ff",href:e.contactZalo}]:[],{icon:sU.MessageCircle,label:"Chat trá»±c tuyến",desc:"Trả lá»i ngay",color:"#06b6d4"},...e.contactEmail?[{icon:sX.Mail,label:"Email há» trợ",desc:e.contactEmail,color:"#10b981",href:`mailto:${e.contactEmail}`}]:[],...e.contactPhone?[{icon:sZ,label:"Hotline",desc:e.contactPhone,color:"#f59e0b",href:`tel:${e.contactPhone}`}]:[]].map(e=>(0,m.jsxs)("a",{href:e.href||"#",target:e.href?"_blank":void 0,rel:e.href?"noopener noreferrer":void 0,className:"p-4 md:p-5 rounded-xl bg-[#18181b]/60 border border-white/[0.08] hover:border-[#06b6d4]/25 transition-all text-left block",children:[(0,m.jsx)("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center mb-3",style:{backgroundColor:`${e.color}15`},children:(0,m.jsx)(e.icon,{className:"w-5 h-5",style:{color:e.color}})}),(0,m.jsx)("div",{className:"text-white text-sm",style:{fontWeight:600},children:e.label}),(0,m.jsx)("div",{className:"text-xs text-[#71717a] mt-1 truncate",children:e.desc})]},e.label))}),(0,m.jsxs)("div",{className:"p-5 md:p-6 rounded-xl bg-[#18181b]/60 border border-white/[0.08]",children:[(0,m.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,m.jsx)("div",{className:"w-10 h-10 rounded-xl bg-[#06b6d4]/10 flex items-center justify-center",children:(0,m.jsx)(A.HelpCircle,{className:"w-5 h-5 text-[#06b6d4]"})}),(0,m.jsxs)("div",{children:[(0,m.jsx)("h3",{className:"text-white",style:{fontWeight:600},children:"Câu há»i thưá»ng gặp"}),(0,m.jsx)("p",{className:"text-xs text-[#71717a]",children:"Tìm câu trả lá»i nhanh cho các thắc mắc phá» biến"})]})]}),(0,m.jsx)("div",{className:"space-y-2",children:[{q:"Proxy dân cư là gì? Khác gì vá»i proxy datacenter?",a:"Proxy dân cư sá» dụng IP tháºt từ nhà mạng (ISP) cá»§a ngưá»i dùng thưá»ng, giúp bạn truy cáºp web như ngưá»i dùng bình thưá»ng. Khác vá»i proxy datacenter â IP Äến từ trung tâm dữ liá»u và dá»
bá» phát hiá»n/chặn hÆ¡n."},{q:"Là m sao Äá» Äá»i IP? Có giá»i hạn sá» lần Äá»i không?",a:'Bạn có thá» Äá»i IP bằng cách nhấn nút "Äá»i IP" trên dashboard hoặc gá»i API /v1/rotate. Key Thưá»ng và Key VIP Äá»u không giá»i hạn sá» lần Äá»i IP trong thá»i gian sá» dụng.'},{q:"Key hết hạn thì dữ liá»u có bá» mất không?",a:"Không. Khi key hết hạn, bạn chá» mất quyá»n sá» dụng proxy. Tà i khoản, lá»ch sá» và sá» dư vẫn ÄÆ°á»£c giữ nguyên. Bạn có thá» mua key má»i bất cứ lúc nà o."},{q:"Tôi nạp tiá»n nhưng chưa thấy cá»ng sá» dư?",a:"Nếu bạn nạp qua chuyá»n khoản ngân hà ng, há» thá»ng xác nháºn tá»± Äá»ng trong 1-5 phút. Nếu ghi sai ná»i dung chuyá»n khoản, vui lòng liên há» há» trợ â xá» lý thá»§ công trong 1-24 giá»."},{q:"API Key dùng Äá» là m gì?",a:"API Key cho phép bạn tÃch hợp proxy và o ứng dụng cá»§a mình â tá»± Äá»ng Äá»i IP, kiá»m tra bÄng thông, quản lý key thông qua REST API. Xem chi tiết tại trang Hưá»ng dẫn."}].map((e,n)=>(0,m.jsxs)("div",{className:"rounded-xl border border-white/[0.08] overflow-hidden",children:[(0,m.jsxs)("button",{onClick:()=>s(t===n?null:n),className:"w-full flex items-center justify-between px-4 md:px-5 py-3.5 md:py-4 text-left hover:bg-[#06b6d4]/5 transition-colors",children:[(0,m.jsx)("span",{className:"text-sm text-white pr-4",style:{fontWeight:500},children:e.q}),(0,m.jsx)(sQ.ChevronDown,{className:`w-4 h-4 text-[#a1a1aa] flex-shrink-0 transition-transform ${t===n?"rotate-180":""}`})]}),t===n&&(0,m.jsx)("div",{className:"px-4 md:px-5 pb-4 border-t border-[#06b6d4]/5 pt-3",children:(0,m.jsx)("p",{className:"text-sm text-[#a1a1aa]",style:{lineHeight:1.7},children:e.a})})]},n))})]}),(0,m.jsxs)("div",{className:"p-5 md:p-6 rounded-xl bg-[#18181b]/60 border border-white/[0.08]",children:[(0,m.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,m.jsx)("div",{className:"w-10 h-10 rounded-xl bg-[#8b5cf6]/10 flex items-center justify-center",children:(0,m.jsx)(M.FileText,{className:"w-5 h-5 text-[#8b5cf6]"})}),(0,m.jsxs)("div",{children:[(0,m.jsx)("h3",{className:"text-white",style:{fontWeight:600},children:"Gá»i yêu cầu há» trợ"}),(0,m.jsx)("p",{className:"text-xs text-[#71717a]",children:"Mô tả vấn Äá», chúng tôi sẽ phản há»i trong 24 giá»"})]})]}),(0,m.jsxs)("div",{className:"space-y-4",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:"block text-sm text-[#a1a1aa] mb-2",children:"Chá»§ Äá»"}),(0,m.jsxs)("select",{value:n,onChange:e=>r(e.target.value),className:"w-full px-4 py-3 rounded-xl bg-[#09090b] border border-white/[0.08] text-white focus:border-[#06b6d4]/30 focus:outline-none text-sm",children:[(0,m.jsx)("option",{value:"",children:"-- Chá»n chá»§ Äá» --"}),(0,m.jsx)("option",{value:"deposit",children:"Nạp tiá»n / Thanh toán"}),(0,m.jsx)("option",{value:"key",children:"Key proxy / Kết ná»i"}),(0,m.jsx)("option",{value:"api",children:"API / TÃch hợp"}),(0,m.jsx)("option",{value:"account",children:"Tà i khoản / Bảo máºt"}),(0,m.jsx)("option",{value:"other",children:"Khác"})]})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:"block text-sm text-[#a1a1aa] mb-2",children:"Ná»i dung chi tiết"}),(0,m.jsx)("textarea",{value:a,onChange:e=>i(e.target.value),rows:5,placeholder:"Mô tả vấn Äá» bạn Äang gặp phải...",className:"w-full px-4 py-3 rounded-xl bg-[#09090b] border border-white/[0.08] text-white placeholder-[#52525b] focus:border-[#06b6d4]/30 focus:outline-none text-sm resize-none"})]})]}),(0,m.jsxs)("button",{onClick:y,disabled:l,className:"mt-4 px-6 py-3 bg-gradient-to-r from-[#8b5cf6] to-[#7c3aed] text-white rounded-xl hover:shadow-[0_0_20px_rgba(139,92,246,0.3)] transition-all flex items-center gap-2 text-sm disabled:opacity-50",style:{fontWeight:600},children:[l?(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"}):(0,m.jsx)(sK.Send,{className:"w-4 h-4"}),"Gá»i yêu cầu"]})]}),(0,m.jsxs)("div",{className:"p-5 md:p-6 rounded-xl bg-[#18181b]/60 border border-white/[0.08]",children:[(0,m.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,m.jsx)("div",{className:"w-10 h-10 rounded-xl bg-[#06b6d4]/10 flex items-center justify-center",children:(0,m.jsx)(sJ.Clock,{className:"w-5 h-5 text-[#06b6d4]"})}),(0,m.jsxs)("div",{children:[(0,m.jsx)("h3",{className:"text-white",style:{fontWeight:600},children:"Lá»ch sá» yêu cầu há» trợ"}),(0,m.jsx)("p",{className:"text-xs text-[#71717a]",children:"Theo dõi trạng thái các yêu cầu Äã gá»i"})]})]}),x?(0,m.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,m.jsx)(k.Loader2,{className:"w-6 h-6 animate-spin text-[#06b6d4]"})}):0===c.length?(0,m.jsxs)("div",{className:"text-center py-12 text-[#71717a]",children:[(0,m.jsx)(M.FileText,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),(0,m.jsx)("p",{className:"text-sm",children:"Chưa có yêu cầu há» trợ nà o"})]}):(0,m.jsx)("div",{className:"space-y-3",children:c.map(e=>{let t=f[e.status]||{label:e.status,color:"#71717a"};return(0,m.jsxs)("div",{className:"p-4 rounded-xl bg-[#09090b] border border-white/[0.08]",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,m.jsx)("span",{className:"text-sm text-white",style:{fontWeight:500},children:u[e.subject]||e.subject}),(0,m.jsx)("span",{className:"px-2.5 py-1 rounded-full text-xs",style:{fontWeight:500,backgroundColor:`${t.color}15`,color:t.color},children:t.label})]}),(0,m.jsx)("p",{className:"text-sm text-[#a1a1aa] mb-2",style:{lineHeight:1.6},children:e.message}),e.adminNote&&(0,m.jsxs)("div",{className:"p-3 rounded-lg bg-[#10b981]/5 border border-[#10b981]/15 mb-2",children:[(0,m.jsx)("p",{className:"text-xs text-[#10b981]",style:{fontWeight:500},children:"Phản há»i từ Admin:"}),(0,m.jsx)("p",{className:"text-sm text-[#a1a1aa] mt-1",style:{lineHeight:1.6},children:e.adminNote})]}),(0,m.jsx)("div",{className:"text-xs text-[#71717a]",children:e.createdAt?new Date(e.createdAt).toLocaleStr
32ing("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"}):""})]},e.id)})})]})]})}let s1=[10,20,30,50,100,500];function s5(e){if(!e)return"";let t=new Date(e),s=Date.now()-t.getTime();if(s<0)return t.toLocaleString("vi-VN");let n=Math.floor(s/1e3);if(n<60)return"Vừa xong";let r=Math.floor(n/60);if(r<60)return`${r} ph\xfat trưá»c`;let a=Math.floor(r/60);if(a<24)return`${a} giá» trưá»c`;let i=Math.floor(a/24);return i<7?`${i} ng\xe0y trưá»c`:t.toLocaleString("vi-VN")}function s2(){let[e,t]=(0,p.useState)([]),[s,n]=(0,p.useState)(!0),[r,a]=(0,p.useState)(1),[i,l]=(0,p.useState)(1),[o,c]=(0,p.useState)(10),[d,x]=(0,p.useState)(null),h=(0,p.useCallback)(async e=>{n(!0);try{let s=await (0,sR.userGetMyInvoices)(e,o);t(s.data),l(s.meta.totalPages),a(e)}catch(e){b.toast.error(e.message||"Lá»i tải danh sách hóa ÄÆ¡n")}n(!1)},[o]);(0,p.useEffect)(()=>{h(1)},[h]);let u=async e=>{x(e);try{let{base64pdf:t}=await (0,sR.userGetInvoicePDF)(e),s=atob(t),n=Array(s.length);for(let e=0;e<s.length;e++)n[e]=s.charCodeAt(e);let r=new Uint8Array(n),a=new Blob([r],{type:"application/pdf"}),i=URL.createObjectURL(a),l=document.createElement("a");l.href=i;let o=new Date().toISOString().slice(0,10).replace(/-/g,"");l.download=`NestGroup_HoaDon_${e}_${o}.pdf`,l.click(),URL.revokeObjectURL(i),b.toast.success("Äã tải PDF hóa ÄÆ¡n!")}catch(e){b.toast.error(e.message||"Lá»i tải PDF")}x(null)};return(0,m.jsxs)("div",{className:"space-y-4",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between",children:[(0,m.jsx)("h2",{className:"text-lg text-white",style:{fontWeight:600},children:"Hóa ÄÆ¡n Äiá»n tá»"}),(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)("span",{className:"text-xs text-[#71717a]",children:"Hiá»n thá»"}),(0,m.jsx)("select",{value:o,onChange:e=>{a(1),c(Number(e.target.value))},className:"px-2 py-1 rounded-lg bg-[#09090b] border border-white/[0.08] text-white text-xs focus:border-[#06b6d4]/30 focus:outline-none",children:s1.map(e=>(0,m.jsx)("option",{value:e,children:e},e))}),(0,m.jsx)("span",{className:"text-xs text-[#71717a]",children:"/ trang"})]})]}),(0,m.jsx)("div",{className:"p-3 rounded-xl bg-[#8b5cf6]/5 border border-[#8b5cf6]/10",children:(0,m.jsxs)("p",{className:"text-xs text-[#8b5cf6]",style:{lineHeight:1.6},children:["ð Tất cả hoá ÄÆ¡n ÄÆ°á»£c xuất tá»± Äá»ng dưá»i dạng ",(0,m.jsx)("strong",{children:"hoá ÄÆ¡n Äiá»n tá» GTGT"})," khi bạn nạp tiá»n. Äá» cấu hình thông tin xuất hoá ÄÆ¡n (tên công ty, MST, Äá»a chá», email), vui lòng và o mục ",(0,m.jsx)("strong",{children:"Tà i khoản â Thông tin hoá ÄÆ¡n"}),"."]})}),s?(0,m.jsx)("div",{className:"flex justify-center py-12",children:(0,m.jsx)(k.Loader2,{className:"w-6 h-6 animate-spin text-[#06b6d4]"})}):0===e.length?(0,m.jsxs)("div",{className:"text-center py-12 text-[#a1a1aa]",children:[(0,m.jsx)(M.FileText,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),(0,m.jsx)("p",{className:"text-sm",children:"Chưa có hóa ÄÆ¡n nà o"}),(0,m.jsx)("p",{className:"text-xs text-[#71717a] mt-1",children:"Hóa ÄÆ¡n sẽ ÄÆ°á»£c tạo tá»± Äá»ng khi bạn nạp tiá»n"})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"space-y-3",children:e.map(e=>{var t;let s;return(0,m.jsx)("div",{className:"p-4 rounded-xl bg-[#18181b] border border-white/[0.08] hover:border-[#06b6d4]/20 transition-all",children:(0,m.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[(0,m.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,m.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,m.jsxs)("span",{className:"text-sm text-white",style:{fontWeight:600},children:["#",e.id]}),(s=({pending:{label:"Chá» xuất",bg:"bg-yellow-500/10",text:"text-yellow-500"},mtt_signed:{label:"Äã xuất",bg:"bg-emerald-500/10",text:"text-emerald-500"},signed:{label:"Äã ký CQT",bg:"bg-green-500/10",text:"text-green-500"},exported:{label:"Äã xuất",bg:"bg-blue-500/10",text:"text-blue-500"},cancelled:{label:"Äã há»§y",bg:"bg-red-500/10",text:"text-red-500"},failed:{label:"Thất bại",bg:"bg-red-500/10",text:"text-red-500"}})[t=e.status]||{label:t,bg:"bg-gray-500/10",text:"text-gray-400"},(0,m.jsx)("span",{className:`px-2 py-0.5 rounded text-[10px] ${s.bg} ${s.text}`,style:{fontWeight:600},children:s.label})),(0,m.jsx)("span",{className:"px-2 py-0.5 rounded text-[10px] bg-[#8b5cf6]/10 text-[#8b5cf6]",style:{fontWeight:500},children:"HÄÄT"})]}),(0,m.jsx)("p",{className:"text-xs text-[#a1a1aa] truncate",children:e.description||"Dá»ch vụ NestProxy"}),(0,m.jsxs)("div",{className:"flex items-center gap-3 mt-1 flex-wrap",children:[(0,m.jsx)("span",{className:"text-xs text-[#71717a]",children:e.createdAt?new Date(e.createdAt).toLocaleStr
32ing("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"}):""}),e.sohoadon&&(0,m.jsxs)("span",{className:"text-xs text-[#71717a]",children:["SHÄ: ",e.sohoadon]}),e.maCQT&&(0,m.jsxs)("span",{className:"text-xs text-[#f59e0b]",children:["CQT: ",e.maCQT]})]}),e.buyerName&&(0,m.jsxs)("p",{className:"text-xs text-[#a1a1aa] mt-1",children:["ð¢ ",e.buyerName,e.buyerTaxId?` â MST: ${e.buyerTaxId}`:""]})]}),(0,m.jsxs)("div",{className:"flex items-center gap-3",children:[(0,m.jsx)("div",{className:"text-right",children:(0,m.jsxs)("div",{className:"text-sm text-[#06b6d4]",style:{fontWeight:700},children:[Number(e.amount).toLocaleString("vi-VN"),"Ä"]})}),(0,m.jsx)("div",{className:"flex items-center gap-2",children:("mtt_signed"===e.status||"signed"===e.status||"exported"===e.status)&&(0,m.jsxs)("button",{onClick:()=>u(e.id),disabled:d===e.id,className:"px-3 py-1.5 rounded-lg bg-[#06b6d4]/10 text-[#06b6d4] text-xs hover:bg-[#06b6d4]/20 transition-colors flex items-center gap-1.5 disabled:opacity-50",style:{fontWeight:500},children:[d===e.id?(0,m.jsx)(k.Loader2,{className:"w-3 h-3 animate-spin"}):(0,m.jsx)(M.FileText,{className:"w-3 h-3"}),"PDF"]})})]})]})},e.id)})}),i>1&&(0,m.jsxs)("div",{className:"flex items-center justify-center gap-2 pt-4",children:[(0,m.jsx)("button",{onClick:()=>h(Math.max(1,r-1)),disabled:1===r,className:"px-3 py-1.5 rounded-lg bg-[#27272a] text-[#a1a1aa] text-xs hover:bg-[#3f3f46] disabled:opacity-30",children:"â Trưá»c"}),(0,m.jsxs)("span",{className:"text-xs text-[#71717a]",children:["Trang ",r,"/",i]}),(0,m.jsx)("button",{onClick:()=>h(Math.min(i,r+1)),disabled:r===i,className:"px-3 py-1.5 rounded-lg bg-[#27272a] text-[#a1a1aa] text-xs hover:bg-[#3f3f46] disabled:opacity-30",children:"Sau â"})]})]})]})}var s4=e.i(7233),s6=e.i(73375),s3=e.i(63059);function s8({purchaseHistory:e,historyLoading:t,historyError:s,purchasePage:n,purchaseTotalPages:r,purchasePageSize:a,setPurchasePage:i,setPurchasePageSize:l,setActiveTab:o}){return(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 mb-6",children:[(0,m.jsx)("h2",{className:"text-white text-lg",style:{fontWeight:600},children:"Lá»ch sá» mua Key"}),(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)("span",{className:"text-xs text-[#71717a]",children:"Hiá»n thá»"}),(0,m.jsx)("select",{value:a,onChange:e=>{i(1),l(Number(e.target.value))},className:"px-2 py-1 rounded-lg bg-[#09090b] border border-white/[0.08] text-white text-xs focus:border-[#06b6d4]/30 focus:outline-none",children:s1.map(e=>(0,m.jsx)("option",{value:e,children:e},e))}),(0,m.jsx)("span",{className:"text-xs text-[#71717a]",children:"/ trang"})]})]}),s&&(0,m.jsx)("div",{className:"mb-4 p-3 rounded-lg bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:s}),t?(0,m.jsx)("div",{className:"space-y-3",children:[1,2,3,4,5].map(e=>(0,m.jsxs)("div",{className:"p-4 rounded-xl bg-[#18181b]/60 border border-white/[0.08] animate-pulse",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,m.jsx)("div",{className:"h-5 bg-[#27272a] rounded-full w-16"}),(0,m.jsx)("div",{className:"h-5 bg-[#27272a] rounded-full w-20"})]}),(0,m.jsxs)("div",{className:"flex items-center justify-between",children:[(0,m.jsx)("div",{className:"h-4 bg-[#27272a] rounded w-24"}),(0,m.jsx)("div",{className:"h-3 bg-[#27272a] rounded w-32"})]})]},e))}):0===e.length?(0,m.jsxs)("div",{className:"text-center py-12 text-[#71717a]",children:[(0,m.jsx)(P.ShoppingCart,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),(0,m.jsx)("p",{className:"text-sm mb-4",children:"Chưa có lá»ch sá» mua key"}),(0,m.jsxs)("button",{onClick:()=>o("keys"),className:"px-4 py-2 rounded-lg bg-[#06b6d4]/10 text-[#06b6d4] text-xs hover:bg-[#06b6d4]/20 transition-colors",style:{fontWeight:500},children:[(0,m.jsx)(s4.Plus,{className:"w-3.5 h-3.5 inline mr-1.5"}),"Mua key Äầu tiên"]})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"md:hidden space-y-3",children:e.map(e=>(0,m.jsxs)("div",{className:"p-4 rounded-xl bg-[#18181b]/60 border border-white/[0.08]",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,m.jsx)("span",{className:`px-2 py-0.5 rounded-full text-xs ${e.keyType===sR.KEY_TYPE.VIP?"bg-[#f59e0b]/10 text-[#f59e0b]":e.keyType===sR.KEY_TYPE.VIP_1H?"bg-[#8b5cf6]/10 text-[#8b5cf6]":"bg-[#06b6d4]/10 text-[#06b6d4]"}`,style:{fontWeight:500},children:sR.KEY_TYPE_LABELS[e.keyType]||e.keyType}),(0,m.jsx)("span",{className:`px-2 py-1 rounded-full text-xs ${"completed"===e.status?"bg-[#10b981]/10 text-[#10b981]":"bg-[#71717a]/10 text-[#71717a]"}`,style:{fontWeight:500},children:"completed"===e.status?"Hoà n thà nh":e.status})]}),(0,m.jsxs)("div",{className:"flex items-center justify-between text-xs mt-2",children:[(0,m.jsxs)("span",{className:"text-white",style:{fontWeight:500}
32,children:[Number(e.amount).toLocaleString("vi-VN"),"Ä Â· SL: ",e.quantity||1]}),(0,m.jsx)("span",{className:"text-[#a1a1aa]",children:e.createdAt?new Date(e.createdAt).toLocaleString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"}):""})]})]},e.id))}),(0,m.jsx)("div",{className:"hidden md:block rounded-xl bg-[#18181b]/60 border border-white/[0.08] overflow-hidden",children:(0,m.jsx)("div",{className:"overflow-x-auto",children:(0,m.jsxs)("table",{className:"w-full",children:[(0,m.jsx)("thead",{children:(0,m.jsxs)("tr",{className:"border-b border-white/[0.08]",children:[(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Mã ÄÆ¡n"}),(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Loại Key"}),(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Sá» lượng"}),(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Giá"}),(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Thá»i gian"}),(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Trạng thái"})]})}),(0,m.jsx)("tbody",{children:e.map(e=>(0,m.jsxs)("tr",{className:"border-b border-[#06b6d4]/5 hover:bg-[#06b6d4]/5 transition-colors",children:[(0,m.jsxs)("td",{className:"px-6 py-4 text-sm text-white",style:{fontFamily:"'JetBrains Mono', monospace",fontWeight:500},children:["#",e.id]}),(0,m.jsx)("td",{className:"px-6 py-4",children:(0,m.jsx)("span",{className:`px-2 py-0.5 rounded-full text-xs ${e.keyType===sR.KEY_TYPE.VIP?"bg-[#f59e0b]/10 text-[#f59e0b]":e.keyType===sR.KEY_TYPE.VIP_1H?"bg-[#8b5cf6]/10 text-[#8b5cf6]":"bg-[#06b6d4]/10 text-[#06b6d4]"}`,style:{fontWeight:500},children:sR.KEY_TYPE_LABELS[e.keyType]||e.keyType})}),(0,m.jsx)("td",{className:"px-6 py-4 text-sm text-[#a1a1aa]",children:e.quantity||1}),(0,m.jsxs)("td",{className:"px-6 py-4 text-sm text-white",style:{fontWeight:500},children:[Number(e.amount).toLocaleString("vi-VN"),"Ä"]}),(0,m.jsx)("td",{className:"px-6 py-4 text-sm text-[#a1a1aa]",children:e.createdAt?new Date(e.createdAt).toLocaleString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"}):""}),(0,m.jsx)("td",{className:"px-6 py-4",children:(0,m.jsx)("span",{className:`px-2 py-1 rounded-full text-xs ${"completed"===e.status?"bg-[#10b981]/10 text-[#10b981]":"bg-[#71717a]/10 text-[#71717a]"}`,style:{fontWeight:500},children:"completed"===e.status?"Hoà n thà nh":e.status})})]},e.id))})]})})}),r>1&&(0,m.jsxs)("div",{className:"flex items-center justify-between mt-4 px-2",children:[(0,m.jsxs)("button",{onClick:()=>i(Math.max(1,n-1)),disabled:1===n,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-[#27272a] text-sm text-[#a1a1aa] hover:bg-[#3f3f46] hover:text-white transition-all disabled:opacity-30 disabled:cursor-not-allowed",style:{fontWeight:500},children:[(0,m.jsx)(s6.ChevronLeft,{className:"w-4 h-4"})," Trưá»c"]}),(0,m.jsxs)("span",{className:"text-xs text-[#71717a]",children:["Trang ",(0,m.jsx)("strong",{className:"text-white",children:n})," / ",r]}),(0,m.jsxs)("button",{onClick:()=>i(Math.min(r,n+1)),disabled:n===r,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-[#27272a] text-sm text-[#a1a1aa] hover:bg-[#3f3f46] hover:text-white transition-all disabled:opacity-30 disabled:cursor-not-allowed",style:{fontWeight:500},children:["Sau ",(0,m.jsx)(s3.ChevronRight,{className:"w-4 h-4"})]})]})]})]})}var s7=e.i(46897);function s9({ipHistory:e,historyLoading:t,historyError:s,ipHistPage:n,ipHistTotalPages:r,ipHistPageSize:a,setIpHistPage:i,setIpHistPageSize:l,setActiveTab:o}){return(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 mb-6",children:[(0,m.jsx)("h2",{className:"text-white text-lg",style:{fontWeight:600},children:"Lá»ch sá» lấy IP"}),(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)("span",{className:"text-xs text-[#71717a]",children:"Hiá»n thá»"}),(0,m.jsx)("select",{value:a,onChange:e=>{i(1),l(Number(e.target.value))},className:"px-2 py-1 rounded-lg bg-[#09090b] border border-white/[0.08] text-white text-xs focus:border-[#06b6d4]/30 focus:outline-none",children:s1.map(e=>(0,m.jsx)("option",{value:e,children:e},e))}),(0,m.jsx)("span",{className:"text-xs text-[#71717a]",children:"/ trang"})]})]}),s&&(0,m.jsx)("div",{className:"mb-4 p-3 rounded-lg bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:s}),t?(0,m.jsx)("div",{className:"space-y-3",children:[1,2,3,4,5].map(e=>(0,m.jsxs)("div",{className:"p-4 rounded-xl bg-[#18181b]/60 border border-white/[0.08] animate-pulse",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,m.jsx)("div",{className:"h-4 bg-[#27272a] rounded w-28"}),(0,m.jsx)("div",{className:"h-3 bg-[#27272a] rounded w-32"})]}),(0,m.jsxs)("div",{className:"flex items-center justify-between",children:[(0,m.jsx)("div",{className:"h-3 bg-[#27272a] rounded w-20"}),(0,m.jsx)("div",{className:"h-3 bg-[#27272a] rounded w-16"})]})]},e))}):0===e.length?(0,m.jsxs)("div",{className:"text-center py-12 text-[#71717a]",children:[(0,m.jsx)(L.RefreshCw,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),(0,m.jsx)("p",{className:"text-sm mb-4",children:"Chưa có lá»ch sá» lấy IP"}),(0,m.jsxs)("button",{onClick:()=>o("keys"),className:"px-4 py-2 rounded-lg bg-[#06b6d4]/10 text-[#06b6d4] text-xs hover:bg-[#06b6d4]/20 transition-colors",style:{fontWeight:500},children:[(0,m.jsx)(y.Key,{className:"w-3.5 h-3.5 inline mr-1.5"}),"Quản lý key Äá» lấy IP"]})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"md:hidden space-y-3",children:e.map(e=>(0,m.jsxs)("div",{className:"p-4 rounded-xl bg-[#18181b]/60 border border-white/[0.08]",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,m.jsxs)("span",{className:"text-sm text-white",style:{fontFamily:"'JetBrains Mono', monospace",fontWeight:500},children:[e.ip,":",e.port]}),(0,m.jsx)("span",{className:"text-xs text-[#a1a1aa]",children:e.createdAt?new Date(e.createdAt).toLocaleStr
32ing("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"}):""})]}),(0,m.jsxs)("div",{className:"flex items-center justify-between text-xs text-[#a1a1aa]",children:[(0,m.jsxs)("span",{className:"flex items-center gap-1",children:[(0,m.jsx)(s7.MapPin,{className:"w-3 h-3"})," ",e.province||"N/A"]}),(0,m.jsxs)("span",{className:"flex items-center gap-1",style:{fontFamily:"'JetBrains Mono', monospace"},children:[e.proxyKey.substring(0,8),"..."]})]})]},e.id))}),(0,m.jsx)("div",{className:"hidden md:block rounded-xl bg-[#18181b]/60 border border-white/[0.08] overflow-hidden",children:(0,m.jsx)("div",{className:"overflow-x-auto",children:(0,m.jsxs)("table",{className:"w-full",children:[(0,m.jsx)("thead",{children:(0,m.jsxs)("tr",{className:"border-b border-white/[0.08]",children:[(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Thá»i gian"}),(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Äá»a chá» IP"}),(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Vá» trÃ"}),(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Proxy Key"})]})}),(0,m.jsx)("tbody",{children:e.map(e=>(0,m.jsxs)("tr",{className:"border-b border-[#06b6d4]/5 hover:bg-[#06b6d4]/5 transition-colors",children:[(0,m.jsx)("td",{className:"px-6 py-4 text-sm text-[#a1a1aa]",children:e.createdAt?new Date(e.createdAt).toLocaleString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"}):""}),(0,m.jsxs)("td",{className:"px-6 py-4 text-sm text-white",style:{fontFamily:"'JetBrains Mono', monospace",fontWeight:500},children:[e.ip,":",e.port]}),(0,m.jsx)("td",{className:"px-6 py-4 text-sm text-[#a1a1aa]",children:e.province||"N/A"}),(0,m.jsxs)("td",{className:"px-6 py-4 text-sm text-[#a1a1aa]",style:{fontFamily:"'JetBrains Mono', monospace"},children:[e.proxyKey.substring(0,12),"..."]})]},e.id))})]})})}),r>1&&(0,m.jsxs)("div",{className:"flex items-center justify-between mt-4 px-2",children:[(0,m.jsxs)("button",{onClick:()=>i(Math.max(1,n-1)),disabled:1===n,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-[#27272a] text-sm text-[#a1a1aa] hover:bg-[#3f3f46] hover:text-white transition-all disabled:opacity-30 disabled:cursor-not-allowed",style:{fontWeight:500},children:[(0,m.jsx)(s6.ChevronLeft,{className:"w-4 h-4"})," Trưá»c"]}),(0,m.jsxs)("span",{className:"text-xs text-[#71717a]",children:["Trang ",(0,m.jsx)("strong",{className:"text-white",children:n})," / ",r]}),(0,m.jsxs)("button",{onClick:()=>i(Math.min(r,n+1)),disabled:n===r,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-[#27272a] text-sm text-[#a1a1aa] hover:bg-[#3f3f46] hover:text-white transition-all disabled:opacity-30 disabled:cursor-not-allowed",style:{fontWeight:500},children:["Sau ",(0,m.jsx)(s3.ChevronRight,{className:"w-4 h-4"})]})]})]})]})}var ne=e.i(21345),nt=e.i(52754);function ns({referralData:e,referralLoading:t,setReferralData:s,setReferralLoading:n}){let{user:r}=(0,g.useAuth)(),[a,i]=(0,p.useState)(null),[l,o]=(0,p.useState)([]),[c,d]=(0,p.useState)([]),[x,h]=(0,p.useState)(!1),[u,f]=(0,p.useState)(!1),[y,v]=(0,p.useState)({fullName:"",phoneNumber:r?.phoneNumber||"",citizenId:"",taxCode:"",bankName:"",accountNumber:"",accountHolder:"",communityLink:"",toolOrPlatform:"",expectedRevenue:"",description:""}),[w,j]=(0,p.useState)({}),[N,S]=(0,p.useState)(""),T=async()=>{h(!0);try{let e=await (0,sR.getCollaboratorStatus)();if(i(e),e.isCollaborator){let[e,t]=await Promise.all([(0,sR.getCollaboratorCommissions)(1,10),(0,sR.getCollaboratorWithdrawals)(1,10)]);o(e.data),d(t.data)}}catch{}finally{h(!1)}};(0,p.useEffect)(()=>{T()},[]),(0,p.useEffect)(()=>{r?.phoneNumber&&!y.phoneNumber&&v(e=>({...e,phoneNumber:r.phoneNumber||""}))},[y.phoneNumber,r?.phoneNumber]);let E=r?.paymentCode||"------",P=`${window.location.origin}/login?ref=${E}`,M=a?.application,A=e=>Number(e||0).toLocaleString("vi-VN")+"Ä",R=(e,t)=>{v(s=>({...s,[e]:t})),w[e]&&j(t=>({...t,[e]:void 0}))},_=async()=>{let e;if(e={},y.fullName.trim()||(e.fullName="Vui lòng nháºp há» tên Äầy Äá»§."),y.phoneNumber.trim()?/^(0|\+84|84)\d{8,10}$/.test(y.phoneNumber.replace(/[\s.-]/g,""))||(e.phoneNumber="Sá» Äiá»n thoại chưa Äúng Äá»nh dạng."):e.phoneNumber="Vui lòng nháºp sá» Äiá»n thoại.",y.citizenId.trim()?/^\d{9,12}$/.test(y.citizenId.replace(/\s/g,""))||(e.citizenId="CCCD nên gá»m 9 Äến 12 chữ sá»."):e.citizenId="Vui lòng nháºp sá» CCCD.",y.bankName.trim()||(e.bankName="Vui lòng nháºp tên ngân hà ng."),y.accountNumber.trim()||(e.accountNumber="Vui lòng nháºp sá» tà i khoản."),y.accountHolder.trim()||(e.accountHolder="Vui lòng nháºp tên chá»
32§ tà i khoản."),j(e),0!==Object.keys(e).length)return void b.toast.error("Vui lòng kiá»m tra lại các trưá»ng Äang báo lá»i");f(!0);try{await (0,sR.applyCollaborator)(y),b.toast.success("Äã gá»i ÄÄng ký CTV. Khi ÄÆ°á»£c duyá»t, hoa há»ng sẽ cá»ng ngay và o sá» dư."),await T()}catch(e){b.toast.error(e.message||"Gá»i ÄÄng ký CTV thất bại")}finally{f(!1)}},I=async()=>{let e=Number(N);if(!M?.bankName||!M.accountNumber||!M.accountHolder)return void b.toast.error("Thiếu thông tin ngân hà ng trong há» sÆ¡ CTV");if(!e||e<5e4)return void b.toast.error("Sá» tiá»n rút tá»i thiá»u 50.000Ä");f(!0);try{await (0,sR.createCollaboratorWithdrawal)({amount:e,bankName:M.bankName,accountNumber:M.accountNumber,accountHolder:M.accountHolder}),b.toast.success("Äã tạo yêu cầu rút tiá»n. Sá» tiá»n Äã ÄÆ°á»£c giữ khá»i sá» dư Äá» chá» admin chuyá»n khoản."),S(""),await T()}catch(e){b.toast.error(e.message||"Tạo yêu cầu rút tiá»n thất bại")}finally{f(!1)}};return(0,m.jsxs)("div",{children:[(0,m.jsx)("h2",{className:"text-white text-lg mb-2",style:{fontWeight:600},children:"Cá»ng tác viên"}),(0,m.jsxs)("p",{className:"text-sm text-[#a1a1aa] mb-6",children:["CTV chÃnh thức nháºn ",(0,m.jsx)("strong",{className:"text-[#ec4899]",children:"5% sá» tiá»n nạp"})," cá»§a ngưá»i ÄÆ°á»£c giá»i thiá»u, cá»ng ngay và o sá» dư sau khi deposit thà nh công"]}),(0,m.jsxs)("div",{className:"p-5 rounded-2xl bg-[#18181b]/60 border border-white/[0.08] mb-6",children:[(0,m.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,m.jsx)(ne.Link,{className:"w-4 h-4 text-[#06b6d4]"}),(0,m.jsx)("span",{className:"text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Link giá»i thiá»u"})]}),(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)("div",{className:"flex-1 px-4 py-3 rounded-xl bg-[#09090b] border border-[#06b6d4]/20 text-[#06b6d4] text-sm truncate",style:{fontFamily:"'JetBrains Mono', monospace",fontWeight:500},children:P}),(0,m.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText(P),b.toast.success("Äã copy!")},className:"px-4 py-3 rounded-xl bg-[#06b6d4]/10 text-[#06b6d4] hover:bg-[#06b6d4]/20 transition-all flex items-center gap-2 text-sm flex-shrink-0",style:{fontWeight:600},children:[(0,m.jsx)(sV.Copy,{className:"w-4 h-4"})," Copy"]})]})]}),(0,m.jsx)("div",{className:"p-4 rounded-xl bg-[#f59e0b]/5 border border-[#f59e0b]/15 mb-6",children:(0,m.jsxs)("p",{className:"text-xs text-[#f59e0b]/80",style:{lineHeight:1.8},children:[(0,m.jsx)("strong",{className:"text-[#f59e0b]",children:"CTV chÃnh thức:"})," sau khi ÄÆ°á»£c duyá»t, hoa há»ng 5% trá»n Äá»i ÄÆ°á»£c cá»ng ngay và o sá» dư khi ngưá»i ÄÆ°á»£c giá»i thiá»u nạp tiá»n. NestGroup chuyá»n khoản các yêu cầu rút hoa há»ng từ 50.000Ä."]})}),(0,m.jsxs)("div",{className:"p-5 rounded-2xl bg-[#18181b]/60 border border-white/[0.08] mb-6",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-4",children:[(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)(nt.Wallet,{className:"w-4 h-4 text-[#10b981]"}),(0,m.jsx)("h3",{className:"text-white text-sm",style:{fontWeight:600},children:"CTV nháºn tiá»n mặt"})]}),(0,m.jsxs)("button",{onClick:T,className:"text-xs text-[#06b6d4] hover:underline flex items-center gap-1",children:[(0,m.jsx)(L.RefreshCw,{className:"w-3 h-3"})," Là m má»i"]})]}),x?(0,m.jsxs)("div",{className:"py-8 text-center",children:[(0,m.jsx)(k.Loader2,{className:"w-7 h-7 mx-auto mb-2 text-[#10b981] animate-spin"}),(0,m.jsx)("p",{className:"text-sm text-[#71717a]",children:"Äang tải há» sÆ¡ CTV..."})]}):a?.isCollaborator?(0,m.jsxs)("div",{className:"space-y-5",children:[(0,m.jsxs)("div",{className:"grid sm:grid-cols-2 gap-3",children:[(0,m.jsxs)("div",{className:"p-4 rounded-xl bg-[#09090b] border border-[#10b981]/15",children:[(0,m.jsx)("div",{className:"text-xs text-[#a1a1aa] mb-1",children:"Tá»ng hoa há»ng Äã cá»ng"}),(0,m.jsx)("div",{className:"text-xl text-[#10b981] font-bold",children:A(a.totalEarned)})]}),(0,m.jsxs)("div",{className:"p-4 rounded-xl bg-[#09090b] border border-[#06b6d4]/15",children:[(0,m.jsx)("div",{className:"text-xs text-[#a1a1aa] mb-1",children:"Sá» dư có thá» dùng/rút"}),(0,m.jsx)("div",{className:"text-xl text-[#06b6d4] font-bold",children:A(a.availableBalance)})]})]}),(0,m.jsxs)("div",{className:"grid sm:grid-cols-[1fr_auto] gap-2",children:[(0,m.jsx)("input",{value:N,onChange:e=>S(e.target.value),inputMode:"numeric",placeholder:"Sá» tiá»n muá»n rút, tá»i thiá»u 50000",className:"px-4 py-3 rounded-xl bg-[#09090b] border border-white/[0.08] text-white text-sm outline-none focus:border-[#10b981]/40"}),(0,m.jsx)("button",{onClick:I,disabled:u,className:"px-4 py-3 rounded-xl bg-[#10b981]/10 text-[#10b981] border border-[#10b981]/20 text-sm font-semibold disabled:opacity-50",children:u?"Äang gá»i...":"Rút tiá»n"})]}),(0,m.jsxs)("div",{className:"grid md:grid-cols-2 gap-4",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("h4",{className:"text-white text-xs font-semibold mb-2",children:"Hoa há»ng gần Äây"}),(0,m.jsx)("div",{className:"space-y-2",children:l.length?l.map(e=>(0,m.jsxs)("div",{className:"flex justify-between gap-3 p-3 rounded-xl bg-[#09090b] border border-white/[0.06] text-xs",children:[(0,m.jsx)("span",{className:"text-[#a1a1aa]",children:e.description||e.referee.email}),(0,m.jsxs)("span",{className:"text-[#10b981] font-semibold",children:["+",A(e.commission)]})]},e.id)):(0,m.jsx)("p",{className:"text-xs text-[#71717a]",children:"Chưa có hoa há»ng."})})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("h4",{className:"text-white text-xs font-semibold mb-2",children:"Yêu cầu rút gần Äây"}),(0,m.jsx)("div",{className:"space-y-2",children:c.length?c.map(e=>(0,m.jsxs)("div",{className:"flex justify-between gap-3 p-3 rounded-xl bg-[#09090b] border border-white/[0.06] text-xs",children:[(0,m.jsx)("span",{className:"text-[#a1a1aa]",children:e.status}),(0,m.jsx)("span",{className:"text-[#06b6d4] font-semibold",children:A(e.amount)})]},e.id)):(0,m.jsx)("p",{className:"text-xs text-[#71717a]",children:"Chưa có yêu cầu rút."})})]})]})]}):M?.status==="pending"?(0,m.jsx)("div",{className:"p-4 rounded-xl bg-[#f59e0b]/5 border border-[#f59e0b]/15 text-sm text-[#f59e0b]",children:"Há» sÆ¡ CTV cá»§a bạn Äang chá» duyá»t."}):(0,m.jsxs)("div",{className:"space-y-3",children:[(0,m.jsx)("div",{className:"grid md:grid-cols-2 gap-3",children:[{key:"fullName",label:"Há» tên Äầy Äá»§",required:!0,placeholder:"Nguyá»
n VÄn A"},{key:"phoneNumber",label:"Sá» Äiá»n thoại",required:!0,placeholder:"0912345678",inputMode:"tel"},{key:"citizenId",label:"Sá» CCCD",required:!0,placeholder:"012345678901",inputMode:"numeric"},{key:"taxCode",label:"Mã sá» thuế",placeholder:"Nếu có"},{key:"bankName",label:"Ngân hà ng",required:!0,placeholder:"Và dụ: Vietcombank"},{key:"accountNumber",label:"Sá» tà i khoản",required:!0,placeholder:"Sá» tà i khoản nháºn tiá»n",inputMode:"numeric"},{key:"accountHolder",label:"Chá»§ tà i khoản",required:!0,placeholder:"Tên Äúng theo ngân hà ng"}
32,{key:"communityLink",label:"Link cá»ng Äá»ng/kênh",placeholder:"Facebook, Zalo, Telegram..."},{key:"toolOrPlatform",label:"Tool/platform bán hà ng",placeholder:"NÆ¡i bạn dá»± kiến giá»i thiá»u"},{key:"expectedRevenue",label:"Doanh thu dá»± kiến",placeholder:"Và dụ: 10.000.000Ä/tháng"}].map(e=>{let t=e.key,s=w[t];return(0,m.jsxs)("label",{className:"block",children:[(0,m.jsxs)("span",{className:"mb-1.5 block text-xs text-[#a1a1aa]",style:{fontWeight:600},children:[e.label,e.required?(0,m.jsx)("span",{className:"text-[#ef4444]",children:" *"}):null]}),(0,m.jsx)("input",{value:y[t],onChange:e=>R(t,e.target.value),inputMode:e.inputMode,placeholder:e.placeholder,"aria-invalid":!!s,className:`w-full px-4 py-3 rounded-xl bg-[#09090b] border text-white text-sm outline-none transition-colors ${s?"border-[#ef4444]/70 focus:border-[#ef4444]":"border-white/[0.08] focus:border-[#06b6d4]/40"}`}),s?(0,m.jsx)("span",{className:"mt-1.5 block text-xs text-[#ef4444]",children:s}):null]},t)})}),(0,m.jsxs)("label",{className:"block",children:[(0,m.jsx)("span",{className:"mb-1.5 block text-xs text-[#a1a1aa]",style:{fontWeight:600},children:"Mô tả cách bạn sẽ giá»i thiá»u NestProxy"}),(0,m.jsx)("textarea",{value:y.description,onChange:e=>R("description",e.target.value),rows:3,placeholder:"Và dụ: Tôi có cá»ng Äá»ng khách hà ng MMO cần proxy...",className:"w-full px-4 py-3 rounded-xl bg-[#09090b] border border-white/[0.08] text-white text-sm outline-none focus:border-[#06b6d4]/40"})]}),(0,m.jsx)("button",{onClick:_,disabled:u,className:"px-5 py-3 rounded-xl bg-[#06b6d4]/10 text-[#06b6d4] border border-[#06b6d4]/20 text-sm font-semibold disabled:opacity-50",children:u?"Äang gá»i...":"ÄÄng ký CTV nháºn tiá»n mặt"})]})]}),(0,m.jsx)("div",{className:"grid grid-cols-2 gap-3 mb-6",children:[{label:"Bạn Äã má»i",value:e?String(e.stats.totalInvitees):"0",sub:"ngưá»i",color:"#06b6d4",icon:sW.Users},{label:"Äiá»m Äã nháºn",value:e?`${e.stats.totalEarned.toLocaleString()}Ä`:"0Ä",sub:"tá»ng cá»ng",color:"#10b981",icon:C.Gift}].map(e=>(0,m.jsxs)("div",{className:"p-4 rounded-xl bg-[#18181b]/60 border border-white/[0.08]",children:[(0,m.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,m.jsx)(e.icon,{className:"w-4 h-4",style:{color:e.color}}),(0,m.jsx)("span",{className:"text-xs text-[#a1a1aa]",style:{fontWeight:500},children:e.label})]}),(0,m.jsx)("div",{className:"text-xl text-white",style:{fontWeight:700},children:e.value}),(0,m.jsx)("div",{className:"text-xs text-[#71717a] mt-0.5",children:e.sub})]},e.label))}),(0,m.jsxs)("div",{className:"mb-6",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,m.jsx)("h3",{className:"text-white text-sm",style:{fontWeight:600},children:"Danh sách bạn Äã má»i"}),(0,m.jsxs)("button",{onClick:()=>{n(!0),(0,sR.getReferralStats)().then(s).catch(()=>{}).finally(()=>n(!1))},className:"text-xs text-[#06b6d4] hover:underline flex items-center gap-1",children:[(0,m.jsx)(L.RefreshCw,{className:"w-3 h-3"})," Là m má»i"]})]}),t?(0,m.jsxs)("div",{className:"text-center py-10 rounded-xl bg-[#18181b]/40 border border-white/[0.08]",children:[(0,m.jsx)(k.Loader2,{className:"w-8 h-8 mx-auto mb-3 text-[#06b6d4] animate-spin"}),(0,m.jsx)("p",{className:"text-sm text-[#71717a]",children:"Äang tải..."})]}):e&&e.invitees.length>0?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"hidden md:block rounded-xl bg-[#18181b]/60 border border-white/[0.08] overflow-hidden",children:(0,m.jsxs)("table",{className:"w-full",children:[(0,m.jsx)("thead",{children:(0,m.jsxs)("tr",{className:"border-b border-white/[0.08]",children:[(0,m.jsx)("th",{className:"text-left px-5 py-3 text-xs text-[#a1a1aa]",children:"Ngưá»i dùng"}),(0,m.jsx)("th",{className:"text-left px-5 py-3 text-xs text-[#a1a1aa]",children:"Email"}),(0,m.jsx)("th",{className:"text-left px-5 py-3 text-xs text-[#a1a1aa]",children:"Ngà y ÄÄng ký"})]})}),(0,m.jsx)("tbody",{children:e.invitees.map(e=>(0,m.jsxs)("tr",{className:"border-b border-[#06b6d4]/5 last:border-0",children:[(0,m.jsx)("td",{className:"px-5 py-3 text-sm text-white",children:e.showName}),(0,m.jsx)("td",{className:"px-5 py-3 text-sm text-[#a1a1aa]",children:e.email}),(0,m.jsx)("td",{className:"px-5 py-3 text-xs text-[#71717a]",children:new Date(e.createdAt).toLocaleDateString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"})})]},e.id))})]})}),(0,m.jsx)("div",{className:"md:hidden space-y-2",children:e.invitees.map(e=>(0,m.jsxs)("div",{className:"p-4 rounded-xl bg-[#18181b]/60 border border-white/[0.08]",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,m.jsx)("span",{className:"text-sm text-white",style:{fontWeight:600},children:e.showName}),(0,m.jsx)("span",{className:"text-xs text-[#71717a]",children:new Date(e.createdAt).toLocaleDateString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"})})]}),(0,m.jsx)("span",{className:"text-xs text-[#a1a1aa]",children:e.email})]},e.id))})]}):(0,m.jsxs)("div",{className:"text-center py-10 rounded-xl bg-[#18181b]/40 border border-white/[0.08]",children:[(0,m.jsx)(sW.Users,{className:"w-12 h-12 mx-auto mb-3 text-[#27272a]"}),(0,m.jsx)("p",{className:"text-sm text-[#71717a] mb-3",children:"Chưa có ngưá»i ÄÆ°á»£c giá»i thiá»u"}),(0,m.jsx)("p",{className:"text-xs text-[#52525b]",children:"Chia sẻ link giá»i thiá»u á» trên Äá» bắt Äầu nháºn thưá»ng!"})]})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,m.jsx)("h3",{className:"text-white text-sm",style:{fontWeight:600},children:"Lá»ch sá» nháºn Äiá»m"})}),e&&e.rewards.length>0?(0,m.jsx)("div",{className:"space-y-2",children:e.rewards.map(e=>(0,m.jsxs)("div",{className:"flex items-center justify-between p-4 rounded-xl bg-[#18181b]/60 border border-white/[0.08]",children:[(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{className:"text-sm text-white",children:[e.referee.showName||e.referee.email," thanh toán"]}),(0,m.jsx)("div",{className:"text-xs text-[#a1a1aa]",children:new Date(e.createdAt).toLocaleDateString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"})})]}),(0,m.jsxs)("div",{className:"text-sm text-[#10b981]",style:{fontWeight:600}
32,children:["+",Number(e.amount).toLocaleString(),"Ä"]})]},e.id))}):(0,m.jsxs)("div",{className:"text-center py-10 rounded-xl bg-[#18181b]/40 border border-white/[0.08]",children:[(0,m.jsx)(C.Gift,{className:"w-12 h-12 mx-auto mb-3 text-[#27272a]"}),(0,m.jsx)("p",{className:"text-sm text-[#71717a]",children:"Chưa có lá»ch sá» nháºn Äiá»m"})]})]})]})}var nn=e.i(95468);let nr=(0,T.default)("qr-code",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]),na=(0,T.default)("megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);var ni=e.i(76838),nl=e.i(54885),no=e.i(42522),nc=e.i(53395);function nd({selectedPackage:e,setSelectedPackage:t,customAmount:s,setCustomAmount:n,showPaymentQR:r,setShowPaymentQR:a,giftCode:i,setGiftCode:l,giftCodeLoading:o,setGiftCodeLoading:c,promotions:d,bankInfo:x,depositHistory:h,depPage:u,depTotalPages:p,depTotal:f,setDepPage:y,setDepTotalPages:v,setDepTotal:w,setDepositHistory:j,setActiveTab:N}){let{user:S,refreshUser:T}=(0,g.useAuth)(),E=(0,s_.useTenant)(),P=e=>{navigator.clipboard.writeText(e),b.toast.success("Äã copy!")},L=e??(s&&parseInt(s)||0),A=`Mua Goi DV ${E.transferKeyPrefix} ${S?.paymentCode||"------"}`,R=L>0&&S?.paymentCode&&x?`https://img.vietqr.io/image/${x.bankShortName.toLowerCase()}-${x.accountNumber}-compact2.png?amount=${L}&addInfo=${encodeURIComponent(`Mua Goi DV ${E.transferKeyPrefix} ${S.paymentCode}`)}&accountName=${encodeURIComponent(x.accountHolder)}`:null;return(0,m.jsxs)("div",{children:[(0,m.jsx)("h2",{className:"text-white text-xl sm:text-2xl mb-6",style:{fontWeight:700},children:"Mua gói dá»ch vụ Proxy"}),(0,m.jsxs)("div",{className:"grid xl:grid-cols-[minmax(0,1fr)_330px] gap-6 items-start",children:[(0,m.jsxs)("div",{className:"min-w-0",children:[x?.isMaintenance&&(0,m.jsx)("div",{className:"mb-6 p-5 rounded-2xl bg-gradient-to-r from-[#ef4444]/10 to-[#f97316]/10 border border-[#ef4444]/25 shadow-[0_0_30px_rgba(239,68,68,0.08)]",children:(0,m.jsxs)("div",{className:"flex items-start gap-3",children:[(0,m.jsx)("div",{className:"w-10 h-10 rounded-xl bg-[#ef4444]/15 flex items-center justify-center flex-shrink-0 mt-0.5",children:(0,m.jsx)("span",{className:"text-xl",children:"ð§"})}),(0,m.jsxs)("div",{className:"flex-1",children:[(0,m.jsx)("div",{className:"text-[#ef4444] text-sm mb-1",style:{fontWeight:700},children:"Ngân hà ng Äang bảo trì"}),(0,m.jsxs)("p",{className:"text-white/70 text-[13px] leading-relaxed mb-3",children:["TÃnh nÄng nạp tiá»n qua chuyá»n khoản ngân hà ng tạm thá»i không khả dụng. Vui lòng sá» dụng ",(0,m.jsx)("strong",{className:"text-[#f59e0b]",children:"Gift Code"})," bên dưá»i hoặc liên há» Admin Äá» ÄÆ°á»£c há» trợ."]}),(0,m.jsx)("a",{href:"https://zalo.me/0973990065",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-[#0068ff]/15 border border-[#0068ff]/30 text-[#60a5fa] text-sm hover:bg-[#0068ff]/25 transition-all",style:{fontWeight:600},children:"ð¬ Liên há» Admin Zalo â 0973990065"})]})]})}),d.length>0&&(0,m.jsxs)("div",{className:"mb-6 p-4 rounded-xl bg-gradient-to-r from-[#10b981]/5 to-[#06b6d4]/5 border border-[#10b981]/20",children:[(0,m.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,m.jsx)("span",{className:"text-lg",children:"ð"}),(0,m.jsx)("span",{className:"text-sm text-[#10b981]",style:{fontWeight:600},children:"Khuyến mãi Äang diá»
n ra"})]}),(0,m.jsx)("div",{className:"space-y-1.5",children:d.map((e,t)=>(0,m.jsxs)("div",{children:[(0,m.jsx)("p",{className:"text-[13px] text-white/90",style:{fontWeight:500},children:e.name}
32),e.tiers&&e.tiers.length>0&&(0,m.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:e.tiers.map((e,t)=>(0,m.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-[#10b981]/10 text-[#10b981] text-[11px]",style:{fontWeight:600},children:["Nạp từ ",Number(e.minAmount).toLocaleString("vi-VN"),"Ä â +",e.bonusPercent,"%"]},t))})]},t))})]}),(0,m.jsxs)("div",{className:"mb-6 p-3 sm:p-4 rounded-xl bg-gradient-to-r from-[#f59e0b]/5 to-[#f97316]/5 border border-[#f59e0b]/15",children:[(0,m.jsxs)("div",{className:"flex items-center gap-2 mb-2.5",children:[(0,m.jsx)(C.Gift,{className:"w-4 h-4 text-[#f59e0b]"}),(0,m.jsx)("span",{className:"text-sm text-[#f59e0b]",style:{fontWeight:600},children:"Äá»i Gift Code"})]}),(0,m.jsxs)("div",{className:"flex gap-2",children:[(0,m.jsx)("input",{value:i,onChange:e=>l(e.target.value.toUpperCase()),placeholder:"Nháºp mã Gift Code...",className:"flex-1 min-w-0 px-3 sm:px-4 py-2.5 rounded-xl bg-[#18181b]/80 border border-[#f59e0b]/20 text-white placeholder-[#52525b] focus:border-[#f59e0b]/50 focus:outline-none text-sm",style:{fontFamily:"'JetBrains Mono', monospace"},disabled:o}),(0,m.jsxs)("button",{onClick:async()=>{if(!i.trim())return void b.toast.error("Vui lòng nháºp mã Gift Code");c(!0);try{let e=await (0,sR.redeemGiftCode)(i.trim());b.toast.success(e.message),(0,sH.trackRedeemGiftCode)({code:i.trim(),success:!0,message:e.message}),l(""),T();let t=await (0,sR.getDeposits)(1,10);j(t.data),y(1),v(t.meta.totalPages),w(t.meta.total)}catch(e){b.toast.error(e.message)}finally{c(!1)}},disabled:o||!i.trim(),className:"flex-shrink-0 px-4 sm:px-6 py-2.5 rounded-xl bg-gradient-to-r from-[#f59e0b] to-[#f97316] text-white text-sm flex items-center gap-1.5 sm:gap-2 disabled:opacity-50 transition-all hover:shadow-[0_0_20px_rgba(245,158,11,0.3)] whitespace-nowrap",style:{fontWeight:600},children:[o?(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"}):(0,m.jsx)(C.Gift,{className:"w-4 h-4"}),(0,m.jsx)("span",{className:"hidden sm:inline",children:"Äá»i code"}),(0,m.jsx)("span",{className:"sm:hidden",children:"Äá»i"})]})]}),(0,m.jsx)("p",{className:"text-[10px] text-[#f59e0b]/60 mt-2",children:"Bạn cần nạp tiá»n Ãt nhất 1 lần hoặc kÃch hoạt SÄT Äá» kÃch hoạt tÃnh nÄng Gift Code"})]}),!x?.isMaintenance&&(0,m.jsxs)("div",{className:"mb-6",children:[(0,m.jsx)("p",{className:"text-sm text-[#a1a1aa] mb-3",children:"Chá»n gói nạp:"}),(0,m.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:[[2e3,5e4,2e5,5e5,1e6,2e6,5e6].map((s,r)=>{let i=e===s,l=0===r;return(0,m.jsxs)("button",{onClick:()=>{t(i?null:s),n(""),a(!1)},className:`relative px-4 py-2.5 h-[88px] rounded-xl border text-sm transition-all duration-200 flex flex-col ${l?"items-center justify-start":"items-center justify-center"} ${i?"bg-gradient-to-br from-[#06b6d4]/20 to-[#0891b2]/10 border-[#06b6d4]/50 text-[#06b6d4] shadow-[0_0_15px_rgba(6,182,212,0.15)]":"bg-[#18181b]/60 border-white/[0.08] text-[#a1a1aa] hover:border-[#06b6d4]/30 hover:text-white hover:bg-[#18181b]"}`,children:[l&&(0,m.jsx)("div",{className:"px-2.5 py-0.5 rounded-full bg-[#06b6d4] text-[#09090b] text-[10px] whitespace-nowrap",style:{fontWeight:700},children:"â¡ KÃch hoạt TK"}),i&&(0,m.jsx)("div",{className:"absolute top-2 right-2",children:(0,m.jsx)(nn.CheckCircle2,{className:"w-4 h-4 text-[#06b6d4]"})}),(0,m.jsx)("div",{className:`text-2xl sm:text-3xl ${l?"flex-1 flex items-center":""}`,style:{fontWeight:800},children:s>=1e6?`${(s/1e6).toLocaleString("vi-VN")}M`:`${(s/1e3).toLocaleString("vi-VN")}K`})]},s)}),(0,m.jsxs)("div",{className:`px-4 py-4 h-[88px] rounded-xl border text-sm transition-all duration-200 flex flex-col justify-center ${s&&!e?"bg-gradient-to-br from-[#f59e0b]/20 to-[#d97706]/10 border-[#f59e0b]/50 shadow-[0_0_15px_rgba(245,158,11,0.15)]":"bg-[#18181b]/60 border-white/[0.08]"}`,children:[(0,m.jsx)("div",{className:"text-xs text-[#a1a1aa] mb-2",style:{fontWeight:500},children:"Sá» khác"}),(0,m.jsx)("input",{type:"text",inputMode:"numeric",value:s,onChange:e=>{n(e.target.value.replace(/[^0-9]/g,"")),t(null),a(!1)},placeholder:"Nháºp sá» tiá»n",className:"w-full bg-transparent border-b border-[#06b6d4]/20 text-white placeholder-[#52525b] text-sm py-1 focus:outline-none focus:border-[#06b6d4]/50",style:{fontFamily:"'JetBrains Mono', monospace"}}),s&&(0,m.jsxs)("div",{className:"text-xs mt-1.5 text-[#f59e0b]",children:[parseInt(s).toLocaleStr
32ing("vi-VN"),"Ä"]})]})]})]}),!x?.isMaintenance&&L>0&&!r&&(0,m.jsxs)("div",{className:"text-center mb-6",children:[(0,m.jsxs)("div",{className:"mb-3 text-sm text-[#a1a1aa]",children:["Sá» tiá»n Äã chá»n: ",(0,m.jsxs)("strong",{className:"text-white text-lg",children:[L.toLocaleString("vi-VN"),"Ä"]})]}),(0,m.jsxs)("button",{onClick:()=>{let e=(0,nc.getSelectedPricingPlan)();a(!0),(0,sH.trackBeginDeposit)({value:L,planId:e?.planId,planName:e?.planName,planPriceVnd:e?.priceVnd,planUnit:e?.unit,source:e?"pricing_plan_deposit_qr":"deposit_qr"}),(0,nl.trackMetaInitiateCheckout)({value:L,content_name:e?.planName||"wallet_deposit"}),(0,sR.createCheckoutIntent)((0,no.buildCheckoutAttributionPayload)(L)).catch(()=>{})},className:"px-8 py-3.5 rounded-xl bg-gradient-to-r from-[#10b981] to-[#059669] text-white text-sm transition-all hover:shadow-[0_0_25px_rgba(16,185,129,0.3)] flex items-center justify-center gap-2 mx-auto",style:{fontWeight:600},children:[(0,m.jsx)(nr,{className:"w-5 h-5"}),"Thanh toán â ",L.toLocaleString("vi-VN"),"Ä"]})]}),!x?.isMaintenance&&r&&L>0&&(0,m.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,m.jsx)("div",{className:"p-6 rounded-2xl bg-white",children:(0,m.jsxs)("div",{className:"flex flex-col sm:flex-row gap-6 items-center",children:[(0,m.jsxs)("div",{className:"flex-1",children:[(0,m.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,m.jsx)("div",{className:"w-12 h-12 rounded-lg bg-[#003882] flex items-center justify-center text-white text-xs",style:{fontWeight:700},children:x?.bankShortName||"BANK"}),(0,m.jsx)("div",{children:(0,m.jsx)("div",{className:"text-[#003882] text-xs",style:{fontWeight:600},children:x?.bankName||""})})]}),(0,m.jsxs)("div",{className:"space-y-2 text-sm text-[#333]",children:[(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsxs)("span",{children:["Sá» tà i khoản: ",(0,m.jsx)("strong",{children:x?.accountNumber||""})]}),(0,m.jsx)("button",{onClick:()=>P(x?.accountNumber||""),className:"p-1 rounded-md hover:bg-[#e2e8f0] transition-colors",title:"Copy sá» tà i khoản",children:(0,m.jsx)(sV.Copy,{className:"w-3.5 h-3.5 text-[#71717a]"})})]}),(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsxs)("span",{children:["Ngưá»i nháºn: ",(0,m.jsx)("strong",{children:x?.accountHolder||""})]}),(0,m.jsx)("button",{onClick:()=>P(x?.accountHolder||""),className:"p-1 rounded-md hover:bg-[#e2e8f0] transition-colors",title:"Copy tên ngưá»i nháºn",children:(0,m.jsx)(sV.Copy,{className:"w-3.5 h-3.5 text-[#71717a]"})})]}),(0,m.jsxs)("div",{className:"pt-2",children:["Sá» tiá»n: ",(0,m.jsxs)("strong",{className:"text-[#003882] text-lg",children:[L.toLocaleString("vi-VN"),"Ä"]})]})]}),(0,m.jsxs)("div",{className:"mt-4 pt-4 border-t border-[#e2e8f0]",children:[(0,m.jsx)("div",{className:"text-sm text-[#71717a] mb-2",children:"Ná»i dung chuyá»n khoản:"}),(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)("div",{className:"flex-1 px-3 py-2.5 rounded-lg bg-[#f1f5f9] border border-[#e2e8f0]",children:(0,m.jsx)("span",{className:"text-[#333] text-sm",style:{fontFamily:"'JetBrains Mono', monospace",fontWeight:600},children:A})}),(0,m.jsxs)("button",{onClick:()=>P(A),className:"px-3 py-2.5 rounded-lg bg-[#06b6d4] text-white text-sm flex items-center gap-1.5 flex-shrink-0",style:{fontWeight:600},children:[(0,m.jsx)(sV.Copy,{className:"w-3.5 h-3.5"})," Copy"]})]})]})]}),(0,m.jsxs)("div",{className:"flex flex-col items-center flex-shrink-0",children:[(0,m.jsx)("p",{className:"text-xs text-[#71717a] mb-2 text-center",children:"Quét mã QR Äá» thanh toán"}),R?(0,m.jsx)("img",{src:R,alt:"VietQR",className:"w-52 h-auto rounded-lg"}):(0,m.jsx)("div",{className:"w-40 h-40 rounded-lg bg-[#f1f5f9] flex items-center justify-center",children:(0,m.jsx)(nr,{className:"w-16 h-16 text-[#a1a1aa]"})})]})]})}),(0,m.jsx)("div",{className:"mt-4 p-4 rounded-xl bg-[#f59e0b]/5 border border-[#f59e0b]/15",children:(0,m.jsxs)("p",{className:"text-xs text-[#f59e0b]/80",style:{lineHeight:1.8},children:[(0,m.jsx)("strong",{className:"text-[#f59e0b]",children:"Lưu ý:"})," Vui lòng kiá»m tra kỹ ná»i dung chuyá»n khoản trưá»c khi thá»±c hiá»n giao dá»ch. Sá» tiá»n sẽ ÄÆ°á»£c cáºp nháºt và o tà i khoản cá»§a bạn trong vòng 20 giây sau khi chuyá»n khoản thà nh công.",(0,m.jsx)("br",{}),(0,m.jsx)("br",{}),"Nếu sau 20 giây mà bạn reload lại trang không thấy cáºp nháºt sá» dư, vui lòng Äợi thêm má»t chút. Nếu vẫn không ÄÆ°á»£c, hãy ",(0,m.jsx)("span",{className:"text-[#06b6d4] cursor-pointer hover:underline",onClick:()=>N("support"),children:"Liên há» Admin"}),"."]})}),(0,m.jsx)("div",{className:"mt-4 text-center",children:(0,m.jsx)("button",{onClick:()=>a(!1),className:"px-6 py-2.5 rounded-xl bg-[#27272a] text-[#a1a1aa] text-sm transition-all hover:bg-[#3f3f46] hover:text-white",style:{fontWeight:500},children:"â Äá»i sá» tiá»n"})})]}),0===L&&!x?.isMaintenance&&(0,m.jsxs)("div",{className:"text-center py-8",children:[(0,m.jsx)(nr,{className:"w-16 h-16 mx-auto mb-4 text-[#27272a]"}),(0,m.jsx)("p",{className:"text-sm text-[#71717a]",children:"Vui lòng chá»n gói hoặc nháºp sá» tiá»n Äá» thanh toán"})]}),h.length>0&&(0,m.jsxs)("div",{className:"mt-8",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,m.jsx)("h3",{className:"text-white text-base",style:{fontWeight:600},children:"Lá»ch sá» mua dá»ch vụ"}),(0,m.jsxs)("div",{className:"flex items-center gap-3",children:[(0,m.jsxs)("button",{onClick:()=>N("invoices"),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-[#8b5cf6]/10 text-[#8b5cf6] text-xs hover:bg-[#8b5cf6]/20 transition-colors border border-[#8b5cf6]/20",style:{fontWeight:500},children:[(0,m.jsx)(M.FileText,{className:"w-3.5 h-3.5"})," Xem hóa ÄÆ¡n"]}),(0,m.jsxs)("span",{className:"text-xs text-[#71717a]",children:[f," giao dá»ch"]})]})]}),(0,m.jsx)("div",{className:"md:hidden space-y-3",children:h.map(e=>(0,m.jsxs)("div",{className:"p-4 rounded-xl bg-[#18181b]/60 border border-white/[0.08]",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,m.jsxs)("span",{className:"text-xs text-white",style:{fontFamily:"'JetBrains Mono', monospace",fontWeight:500},children:["#",e.id]}),(0,m.jsx)("span",{className:`px-2 py-1 rounded-full text-xs ${"completed"===e.status?"bg-[#10b981]/10 text-[#10b981]":"bg-[#f59e0b]/10 text-[#f59e0b]"}`,style:{fontWeight:500},children:"completed"===e.status?"Thà nh công":"Äang xá» lý"})]}),(0,m.jsxs)("div",{className:"text-lg text-[#10b981] mb-2",style:{fontWeight:600}
32,children:["+",Number(e.amount).toLocaleString("vi-VN"),"Ä",e.bonusAmount&&Number(e.bonusAmount)>0&&(0,m.jsxs)("span",{className:"ml-2 text-xs text-[#f59e0b] bg-[#f59e0b]/10 px-2 py-0.5 rounded-full",children:["+KM ",Number(e.bonusAmount).toLocaleString("vi-VN"),"Ä"]})]}),(0,m.jsxs)("div",{className:"flex items-center justify-between text-xs text-[#a1a1aa]",children:[(0,m.jsx)("span",{children:e.description||"Chuyá»n khoản"}),(0,m.jsx)("span",{children:s5(e.createdAt)})]})]},e.id))}),(0,m.jsx)("div",{className:"hidden md:block rounded-xl bg-[#18181b]/60 border border-white/[0.08] overflow-hidden",children:(0,m.jsx)("div",{className:"overflow-x-auto",children:(0,m.jsxs)("table",{className:"w-full",children:[(0,m.jsx)("thead",{children:(0,m.jsxs)("tr",{className:"border-b border-white/[0.08]",children:[(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Mã GD"}),(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Sá» tiá»n"}),(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Mô tả"}),(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Thá»i gian"}),(0,m.jsx)("th",{className:"text-left px-6 py-3 text-xs text-[#a1a1aa]",style:{fontWeight:500},children:"Trạng thái"})]})}),(0,m.jsx)("tbody",{children:h.map(e=>(0,m.jsxs)("tr",{className:"border-b border-[#06b6d4]/5 hover:bg-[#06b6d4]/5 transition-colors",children:[(0,m.jsxs)("td",{className:"px-6 py-4 text-sm text-white",style:{fontFamily:"'JetBrains Mono', monospace",fontWeight:500},children:["#",e.id]}),(0,m.jsxs)("td",{className:"px-6 py-4 text-sm text-[#10b981]",style:{fontWeight:600},children:["+",Number(e.amount).toLocaleString("vi-VN"),"Ä",e.bonusAmount&&Number(e.bonusAmount)>0&&(0,m.jsxs)("div",{className:"text-xs text-[#f59e0b] mt-0.5",children:["+KM ",Number(e.bonusAmount).toLocaleString("vi-VN"),"Ä"]})]}),(0,m.jsx)("td",{className:"px-6 py-4 text-sm text-[#a1a1aa]",children:e.description||"Chuyá»n khoản"}),(0,m.jsx)("td",{className:"px-6 py-4 text-sm text-[#a1a1aa]",children:s5(e.createdAt)}),(0,m.jsx)("td",{className:"px-6 py-4",children:(0,m.jsx)("span",{className:`px-2 py-1 rounded-full text-xs ${"completed"===e.status?"bg-[#10b981]/10 text-[#10b981]":"bg-[#f59e0b]/10 text-[#f59e0b]"}`,style:{fontWeight:500},children:"completed"===e.status?"Thà nh công":"Äang xá» lý"})})]},e.id))})]})})}),p>1&&(0,m.jsxs)("div",{className:"flex items-center justify-between mt-4 px-2",children:[(0,m.jsxs)("button",{onClick:()=>y(Math.max(1,u-1)),disabled:1===u,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-[#27272a] text-sm text-[#a1a1aa] hover:bg-[#3f3f46] hover:text-white transition-all disabled:opacity-30 disabled:cursor-not-allowed",style:{fontWeight:500},children:[(0,m.jsx)(s6.ChevronLeft,{className:"w-4 h-4"})," Trưá»c"]}),(0,m.jsxs)("span",{className:"text-xs text-[#71717a]",children:["Trang ",(0,m.jsx)("strong",{className:"text-white",children:u})," / ",p]}),(0,m.jsxs)("button",{onClick:()=>y(Math.min(p,u+1)),disabled:u===p,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-[#27272a] text-sm text-[#a1a1aa] hover:bg-[#3f3f46] hover:text-white transition-all disabled:opacity-30 disabled:cursor-not-allowed",style:{fontWeight:500},children:["Sau ",(0,m.jsx)(s3.ChevronRight,{className:"w-4 h-4"})]})]})]})]}),E.isMainSite&&(0,m.jsx)(nx,{})]})]})}function nx(){return(0,m.jsxs)("aside",{className:"space-y-4 xl:sticky xl:top-24",children:[(0,m.jsxs)("a",{href:"https://zalo.me/g/05o1nfsxmh1oc8fapmjn",target:"_blank",rel:"noopener noreferrer",className:"group block rounded-2xl border border-[#06b6d4]/20 bg-gradient-to-br from-[#06b6d4]/15 to-[#10b981]/10 p-4 no-underline shadow-[0_10px_30px_rgba(6,182,212,0.08)]",children:[(0,m.jsxs)("div",{className:"flex items-start gap-3",children:[(0,m.jsx)("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center shrink-0 bg-[#06b6d4]/15 text-[#06b6d4]",children:(0,m.jsx)(sW.Users,{className:"w-5 h-5"})}),(0,m.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,m.jsxs)("div",{className:"flex items-center gap-1.5 text-[15px] font-bold text-white",children:["Cá»ng Äá»ng NestProxy",(0,m.jsx)(w.ArrowUpRight,{className:"w-3.5 h-3.5 text-[#67e8f9] transition-transform group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]}),(0,m.jsx)("p",{className:"mt-1 text-[12px] leading-relaxed text-white/60",children:"Tham gia nhóm Zalo Äá» nháºn GIFT, cáºp nháºt ưu Äãi và chia sẻ kinh nghiá»m dùng proxy."})]}),(0,m.jsx)("img",{src:"https://group-qr.zdn.vn/1/5548230e356ddc33857c",alt:"QR Cá»ng Äá»ng NestProxy",className:"w-14 h-14 roun
32ded-lg bg-white p-1 object-contain shrink-0",loading:"lazy"})]}),(0,m.jsx)("div",{className:"mt-4 rounded-xl bg-[#06b6d4]/10 px-3 py-2.5 text-center text-[12px] font-semibold text-[#67e8f9] transition-colors group-hover:bg-[#06b6d4]/15",children:"Và o nhóm Zalo"})]}),(0,m.jsxs)("a",{href:"/lan-toa-cung-nestproxy",target:"_blank",rel:"noopener noreferrer",className:"group block rounded-2xl border border-[#f59e0b]/20 bg-gradient-to-br from-[#f59e0b]/10 to-[#ec4899]/10 p-4 no-underline",children:[(0,m.jsxs)("div",{className:"flex items-start gap-3",children:[(0,m.jsx)("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center shrink-0 bg-[#f59e0b]/15 text-[#f59e0b]",children:(0,m.jsx)(na,{className:"w-5 h-5"})}),(0,m.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,m.jsxs)("div",{className:"flex items-center gap-1.5 text-[15px] font-bold text-white",children:["Lan toả cùng NestProxy",(0,m.jsx)(w.ArrowUpRight,{className:"w-3.5 h-3.5 text-[#fbbf24] transition-transform group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]}),(0,m.jsx)("p",{className:"mt-1 text-[12px] leading-relaxed text-white/60",children:"Ngưá»i dùng viết bà i, review hoặc chia sẻ NestProxy lên diá»
n Äà n MMO/page chất lượng Äá» nháºn thưá»ng 50.000Ä/bà i hợp lá»."})]})]}),(0,m.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-2",children:[(0,m.jsxs)("div",{className:"rounded-xl bg-[#09090b]/50 border border-white/[0.06] px-3 py-2",children:[(0,m.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-white/40 font-semibold",children:"Thưá»ng"}),(0,m.jsx)("div",{className:"mt-0.5 text-[15px] font-bold text-[#f59e0b]",children:"50.000Ä"})]}),(0,m.jsxs)("div",{className:"rounded-xl bg-[#09090b]/50 border border-white/[0.06] px-3 py-2",children:[(0,m.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-white/40 font-semibold",children:"Dà nh cho"}),(0,m.jsx)("div",{className:"mt-0.5 text-[15px] font-bold text-[#67e8f9]",children:"Ngưá»i dùng"})]})]}),(0,m.jsxs)("div",{className:"mt-3 flex items-start gap-2 rounded-xl bg-[#10b981]/10 border border-[#10b981]/15 px-3 py-2.5 text-[12px] leading-relaxed text-white/60",children:[(0,m.jsx)(ni.BadgeCheck,{className:"w-4 h-4 shrink-0 text-[#10b981] mt-0.5"}),"Xem Äiá»u kiá»n duyá»t bà i, cách gá»i minh chứng và quy Äá»nh chá»ng spam."]})]})]})}let nh=(0,T.default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);var nu=e.i(53475),nm=e.i(55436),np=e.i(27612);let nf=(0,T.default)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);var ng=e.i(88699),nb=e.i(21218),ny=e.i(51737);let nv=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,nw=tA.clsx,nj=(e,t)=>s=>{var n;if((null==t?void 0:t.variants)==null)return nw(e,null==s?void 0:s.class,null==s?void 0:s.className);let{variants:r,defaultVariants:a}=t,i=Object.keys(r).map(e=>{let t=null==s?void 0:s[e],n=null==a?void 0:a[e];if(null===t)return null;let i=nv(t)||nv(n);return r[e][i]}),l=s&&Object.entries(s).reduce((e,t)=>{let[s,n]=t;return void 0===n||(e[s]=n),e},{});return nw(e,i,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:s,className:n,...r}=t;return Object.entries(r).every(e=>{let[t,s]=e;return Array.isArray(s)?s.includes({...a,...l}[t]):({...a,...l})[t]===s})?[...e,s,n]:e},[]),null==s?void 0:s.class,null==s?void 0:s.className)},nN=nj("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_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-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent 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-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9 rounded-md"}},defaultVariants:{variant:"default",size:"default"}});function nk({className:e,variant:t,size:s,asChild:n=!1,...r}){let a=n?G:"button";return(0,m.jsx)(a,{"data-slot":"button",className:sw(nN({variant:t,size:s,className:e})),...r})}function nC({className:e,type:t,...s}){return(0,m.jsx)("input",{type:t,"data-slot":"input",className:sw("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...s})}let nS=nj("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function nT({className:e,variant:t,asChild:s=!1,...n}){let r=s?G:"span";return(0,m.jsx)(r,{"data-slot":"badge",className:sw(nS({variant:t}),e),...n})}function nE(e){let t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function nP(e){let[t,s]=p.useState(void 0);return O(()=>{if(e){s({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,r;if(!Array.isArray(t)||!t.length)return;let a=t[0];if("borderBoxSize"in a){let e=a.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,r=t.blockSize}else n=e.offsetWidth,r=e.offsetHeight;s({width:n,height:r})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}s(void 0)},[e]),t}var nL="Checkbox",[nM,nA]=z(nL),[nR,n_]=nM(nL),nI=p.forwardRef((e,t)=>
32{let{__scopeCheckbox:s,name:n,checked:r,defaultChecked:a,required:i,disabled:l,value:o="on",onCheckedChange:c,form:d,...x}=e,[h,u]=p.useState(null),f=K(t,e=>u(e)),g=p.useRef(!1),b=!h||d||!!h.closest("form"),[y=!1,v]=B({prop:r,defaultProp:a,onChange:c}),w=p.useRef(y);return p.useEffect(()=>{let e=h?.form;if(e){let t=()=>v(w.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[h,v]),(0,m.jsxs)(nR,{scope:s,state:y,disabled:l,children:[(0,m.jsx)(Z.button,{type:"button",role:"checkbox","aria-checked":nz(y)?"mixed":y,"aria-required":i,"data-state":nO(y),"data-disabled":l?"":void 0,disabled:l,value:o,...x,ref:f,onKeyDown:I(e.onKeyDown,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:I(e.onClick,e=>{v(e=>!!nz(e)||!e),b&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})}),b&&(0,m.jsx)(nK,{control:h,bubbles:!g.current,name:n,value:o,checked:y,required:i,disabled:l,form:d,style:{transform:"translateX(-100%)"},defaultChecked:!nz(a)&&a})]})});nI.displayName=nL;var nD="CheckboxIndicator",nW=p.forwardRef((e,t)=>{let{__scopeCheckbox:s,forceMount:n,...r}=e,a=n_(nD,s);return(0,m.jsx)(eu,{present:n||nz(a.state)||!0===a.state,children:(0,m.jsx)(Z.span,{"data-state":nO(a.state),"data-disabled":a.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});nW.displayName=nD;var nK=e=>{let{control:t,checked:s,bubbles:n=!0,defaultChecked:r,...a}=e,i=p.useRef(null),l=nE(s),o=nP(t);p.useEffect(()=>{let e=i.current,t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(l!==s&&t){let r=new Event("click",{bubbles:n});e.indeterminate=nz(s),t.call(e,!nz(s)&&s),e.dispatchEvent(r)}},[l,s,n]);let c=p.useRef(!nz(s)&&s);return(0,m.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r??c.current,...a,tabIndex:-1,ref:i,style:{...e.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function nz(e){return"indeterminate"===e}function nO(e){return nz(e)?"indeterminate":e?"checked":"unchecked"}var n$=e.i(78745),n$=n$;function nH({className:e,...t}){return(0,m.jsx)(nI,{"data-slot":"checkbox",className:sw("peer border bg-input-background dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,m.jsx)(nW,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:(0,m.jsx)(n$.default,{className:"size-3.5"})})})}function nV({className:e,...t}){return(0,m.jsx)("div",{"data-slot":"skeleton",className:sw("bg-accent animate-pulse rounded-md",e),...t})}function nF(e,[t,s]){return Math.min(s,Math.max(t,e))}var nB=p.createContext(void 0);let nY=["top","right","bottom","left"],nG=Math.min,nq=Math.max,nU=Math.round,nX=Math.floor,nZ=e=>({x:e,y:e}),nJ={left:"right",right:"left",bottom:"top",top:"bottom"};function nQ(e,t){return"function"==typeof e?e(t):e}function n0(e){return e.split("-")[0]}function n1(e){return e.split("-")[1]}function n5(e){return"x"===e?"y":"x"}function n2(e){return"y"===e?"height":"width"}function n4(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function n6(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let n3=["left","right"],n8=["right","left"],n7=["top","bottom"],n9=["bottom","top"];function re(e){let t=n0(e);return nJ[t]+e.slice(t.length)}function rt(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function rs(e){let{x:t,y:s,width:n,height:r}=e;return{width:n,height:r,top:s,left:t,right:t+n,bottom:s+r,x:t,y:s}}function rn(e,t,s){let n,{reference:r,floating:a}=e,i=n4(t),l=n5(n4(t)),o=n2(l),c=n0(t),d="y"===i,x=r.x+r.width/2-a.width/2,h=r.y+r.height/2-a.height/2,u=r[o]/2-a[o]/2;switch(c){case"top":n={x:x,y:r.y-a.height};break;case"bottom":n={x:x,y:r.y+r.height};break;case"right":n={x:r.x+r.width,y:h};break;case"left":n={x:r.x-a.width,y:h};break;default:n={x:r.x,y:r.y}}switch(n1(t)){case"start":n[l]-=u*(s&&d?-1:1);break;case"end":n[l]+=u*(s&&d?-1:1)}return n}async function rr(e,t){var s;void 0===t&&(t={});let{x:n,y:r,platform:a,rects:i,elements:l,strategy:o}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:x="floating",altBoundary:h=!1,padding:u=0}=nQ(t,e),m=rt(u),p=l[h?"floating"===x?"reference":"floating":x],f=rs(await a.getClippingRect
32({element:null==(s=await (null==a.isElement?void 0:a.isElement(p)))||s?p:p.contextElement||await (null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:o})),g="floating"===x?{x:n,y:r,width:i.floating.width,height:i.floating.height}:i.reference,b=await (null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),y=await (null==a.isElement?void 0:a.isElement(b))&&await (null==a.getScale?void 0:a.getScale(b))||{x:1,y:1},v=rs(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:b,strategy:o}):g);return{top:(f.top-v.top+m.top)/y.y,bottom:(v.bottom-f.bottom+m.bottom)/y.y,left:(f.left-v.left+m.left)/y.x,right:(v.right-f.right+m.right)/y.x}}let ra=async(e,t,s)=>{let{placement:n="bottom",strategy:r="absolute",middleware:a=[],platform:i}=s,l=i.detectOverflow?i:{...i,detectOverflow:rr},o=await (null==i.isRTL?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:x}=rn(c,n,o),h=n,u=0,m={};for(let s=0;s<a.length;s++){let p=a[s];if(!p)continue;let{name:f,fn:g}=p,{x:b,y:y,data:v,reset:w}=await g({x:d,y:x,initialPlacement:n,placement:h,strategy:r,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});d=null!=b?b:d,x=null!=y?y:x,m[f]={...m[f],...v},w&&u<50&&(u++,"object"==typeof w&&(w.placement&&(h=w.placement),w.rects&&(c=!0===w.rects?await i.getElementRects({reference:e,floating:t,strategy:r}):w.rects),{x:d,y:x}=rn(c,h,o)),s=-1)}return{x:d,y:x,placement:h,strategy:r,middlewareData:m}};function ri(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rl(e){return nY.some(t=>e[t]>=0)}let ro=new Set(["left","top"]);async function rc(e,t){let{placement:s,platform:n,elements:r}=e,a=await (null==n.isRTL?void 0:n.isRTL(r.floating)),i=n0(s),l=n1(s),o="y"===n4(s),c=ro.has(i)?-1:1,d=a&&o?-1:1,x=nQ(t,e),{mainAxis:h,crossAxis:u,alignmentAxis:m}="number"==typeof x?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return l&&"number"==typeof m&&(u="end"===l?-1*m:m),o?{x:u*d,y:h*c}:{x:h*c,y:u*d}}function rd(){return"u">typeof window}function rx(e){return rm(e)?(e.nodeName||"").toLowerCase():"#document"}function rh(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ru(e){var t;return null==(t=(rm(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function rm(e){return!!rd()&&(e instanceof Node||e instanceof rh(e).Node)}function rp(e){return!!rd()&&(e instanceof Element||e instanceof rh(e).Element)}function rf(e){return!!rd()&&(e instanceof HTMLElement||e instanceof rh(e).HTMLElement)}function rg(e){return!(!rd()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof rh(e).ShadowRoot)}function rb(e){let{overflow:t,overflowX:s,overflowY:n,display:r}=rS(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+s)&&"inline"!==r&&"contents"!==r}function ry(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let rv=/transform|translate|scale|rotate|perspective|filter/,rw=/paint|layout|strict|content/,rj=e=>!!e&&"none"!==e;function rN(e){let t=rp(e)?rS(e):e;return rj(t.transform)||rj(t.translate)||rj(t.scale)||rj(t.rotate)||rj(t.perspective)||!rk()&&(rj(t.backdropFilter)||rj(t.filter))||rv.test(t.willChange||"")||rw.test(t.contain||"")}function rk(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function rC(e){return/^(html|body|#document)$/.test(rx(e))}function rS(e){return rh(e).getComputedStyle(e)}function rT(e){return rp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rE(e){if("html"===rx(e))return e;let t=e.assignedSlot||e.parentNode||rg(e)&&e.host||ru(e);return rg(t)?t.host:t}function rP(e,t,s){var n;void 0===t&&(t=[]),void 0===s&&(s=!0);let r=function e(t){let s=rE(t);return rC(s)?t.ownerDocument?t.ownerDocument.body:t.body:rf(s)&&rb(s)?s:e(s)}(e),a=r===(null==(n=e.ownerDocument)?void 0:n.body),i=rh(r);if(!a)return t.concat(r,rP(r,[],s));{let e=rL(i);
32return t.concat(i,i.visualViewport||[],rb(r)?r:[],e&&s?rP(e):[])}}function rL(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rM(e){let t=rS(e),s=parseFloat(t.width)||0,n=parseFloat(t.height)||0,r=rf(e),a=r?e.offsetWidth:s,i=r?e.offsetHeight:n,l=nU(s)!==a||nU(n)!==i;return l&&(s=a,n=i),{width:s,height:n,$:l}}function rA(e){return rp(e)?e:e.contextElement}function rR(e){let t=rA(e);if(!rf(t))return nZ(1);let s=t.getBoundingClientRect(),{width:n,height:r,$:a}=rM(t),i=(a?nU(s.width):s.width)/n,l=(a?nU(s.height):s.height)/r;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}let r_=nZ(0);function rI(e){let t=rh(e);return rk()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:r_}function rD(e,t,s,n){var r;void 0===t&&(t=!1),void 0===s&&(s=!1);let a=e.getBoundingClientRect(),i=rA(e),l=nZ(1);t&&(n?rp(n)&&(l=rR(n)):l=rR(e));let o=(void 0===(r=s)&&(r=!1),n&&(!r||n===rh(i))&&r)?rI(i):nZ(0),c=(a.left+o.x)/l.x,d=(a.top+o.y)/l.y,x=a.width/l.x,h=a.height/l.y;if(i){let e=rh(i),t=n&&rp(n)?rh(n):n,s=e,r=rL(s);for(;r&&n&&t!==s;){let e=rR(r),t=r.getBoundingClientRect(),n=rS(r),a=t.left+(r.clientLeft+parseFloat(n.paddingLeft))*e.x,i=t.top+(r.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,d*=e.y,x*=e.x,h*=e.y,c+=a,d+=i,r=rL(s=rh(r))}}return rs({width:x,height:h,x:c,y:d})}function rW(e,t){let s=rT(e).scrollLeft;return t?t.left+s:rD(ru(e)).left+s}function rK(e,t){let s=e.getBoundingClientRect();return{x:s.left+t.scrollLeft-rW(e,s),y:s.top+t.scrollTop}}function rz(e,t,s){var n;let r;if("viewport"===t)r=function(e,t){let s=rh(e),n=ru(e),r=s.visualViewport,a=n.clientWidth,i=n.clientHeight,l=0,o=0;if(r){a=r.width,i=r.height;let e=rk();(!e||e&&"fixed"===t)&&(l=r.offsetLeft,o=r.offsetTop)}let c=rW(n);if(c<=0){let e=n.ownerDocument,t=e.body,s=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(s.marginLeft)+parseFloat(s.marginRight)||0,i=Math.abs(n.clientWidth-t.clientWidth-r);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:l,y:o}}(e,s);else if("document"===t){let t,s,a,i,l,o,c;n=ru(e),t=ru(n),s=rT(n),a=n.ownerDocument.body,i=nq(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=nq(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),o=-s.scrollLeft+rW(n),c=-s.scrollTop,"rtl"===rS(a).direction&&(o+=nq(t.clientWidth,a.clientWidth)-i),r={width:i,height:l,x:o,y:c}}else if(rp(t)){let e,n,a,i,l,o;n=(e=rD(t,!0,"fixed"===s)).top+t.clientTop,a=e.left+t.clientLeft,i=rf(t)?rR(t):nZ(1),l=t.clientWidth*i.x,o=t.clientHeight*i.y,r={width:l,height:o,x:a*i.x,y:n*i.y}}else{let s=rI(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return rs(r)}function rO(e){return"static"===rS(e).position}function r$(e,t){if(!rf(e)||"fixed"===rS(e).position)return null;if(t)return t(e);let s=e.offsetParent;return ru(e)===s&&(s=s.ownerDocument.body),s}function rH(e,t){var s;let n=rh(e);if(ry(e))return n;if(!rf(e)){let t=rE(e);for(;t&&!rC(t);){if(rp(t)&&!rO(t))return t;t=rE(t)}return n}let r=r$(e,t);for(;r&&(s=r,/^(table|td|th)$/.test(rx(s)))&&rO(r);)r=r$(r,t);return r&&rC(r)&&rO(r)&&!rN(r)?n:r||function(e){let t=rE(e);for(;rf(t)&&!rC(t);){if(rN(t))return t;if(ry(t))break;t=rE(t)}return null}(e)||n}let rV=async function(e){let t=this.getOffsetParent||rH,s=this.getDimensions,n=await s(e.floating);return{reference:function(e,t,s){let n=rf(t),r=ru(t),a="fixed"===s,i=rD(e,!0,a,t),l={scrollLeft:0,scrollTop:0},o=nZ(0);if(n||!n&&!a)if(("body"!==rx(t)||rb(r))&&(l=rT(t)),n){let e=rD(t,!0,a,t);o.x=e.x+t.clientLeft,o.y=e.y+t.clientTop}else r&&(o.x=rW(r));a&&!n&&r&&(o.x=rW(r));let c=!r||n||a?nZ(0):rK(r,l);return{x:i.left+l.scrollLeft-o.x-c.x,y:i.top+l.scrollTop-o.y-c.y,width:i.width,height:i.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},rF={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:s,offsetParent:n,strategy:r}=e,a="fixed"===r,i=ru(n),l=!!t&&ry(t.floating);if(n===i||l&&a)return s;let o={scrollLeft:0,scrollTop:0},c=nZ(1),d=nZ(0),x=rf(n);if((x||!x&&!a)&&(("body"!==rx(n)||rb(i))&&(o=rT(n)),x)){let e=rD(n);c=rR(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}let h=!i||x||a?nZ(0):rK(i,o);return{width:s.width*c.x,height:s.height*c.y,x:s.x*c.x-o.scrollLeft*c.x+d.x+h.x,y:s.y*c.y-o.scrollTop*c.y+d.y+h.y}},getDocumentElement:ru,getClippingRect:function(e){let{element:t,boundary:s,rootBoundary:n,strategy:r}=e,a=[..."clippingAncestors"===s?ry(t)?[]:function(e,t){let s=t.get(e);if(s)return s;let n=rP(e,[],!1).filter(e=>rp(e)&&"body"!==rx(e)),r=null,a="fixed"===rS(e).position,i=a?rE(e):e;for(;rp(i)&&!rC(i);){let t=rS(i),s=rN(i);s||"fixed"!==t.position||(r=null),(a?s||r:!(!s&&"static"===t.position&&r&&("absolute"===r.position||"fixed"===r.position)||rb(i)&&!s&&function e(t,s){let n=rE(t);return!(n===s||!rp(n)||rC(n))&&("fixed"===rS(n).position||e(n,s))}(e,i)))?r=t:n=n.filter(e=>e!==i),i=rE(i)}return t.set(e,n),n}(t,this._c):[].concat(s),n],i=rz(t,a[0],r),l=i.top,o=i.right,c=i.bottom,d=i.left;for(let e=1;e<a.length;e++){let s=rz(t,a[e],r);l=nq(s.top,l),o=nG(s.right,o),c=nG(s.bottom,c),d=nq(s.left,d)}return{width:o-d,height:c-l,x:d,y:l}},getOffsetParent:rH,getElementRects:rV,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:s}=rM(e);return{width:t,height:s}},getScale:rR,isElement:rp,isRTL:function(e){return"rtl"===rS(e).direction}};function rB(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let rY=e=>({name:"arrow",options:e,async fn(t){let{x:s,y:n,placement:r,rects:a,platform:i,elements:l,middlewareData:o}=t,{element:c,padding:d=0}=nQ(e,t)||{};if(null==c)return{};let x=rt(d),h={x:s,y:n},u=n5(n4(r)),m=n2(u),p=await i.getDimensions(c),f="y"===u,g=f?"clientHeight":"clientWidth",b=a.reference[m]+a.reference[u]-h[u]-a.floating[m],y=h[u]-a.reference[u],v=await (null==i.getOffsetParent?void 0:i.getOffsetParent(c)),w=v?v[g]:0;w&&await (null==i.isElement?void 0:i.isElement(v))||(w=l.floating[g]||a.floating[m]);let j=w/2-p[m]/2-1,N=nG(x[f?"top":"left"],j),k=nG(x[f?"bottom":"right"],j),C=w-p[m]-k,S=w/2-p[m]/2+(b/2-y/2),T=nq(N,nG(S,C
32)),E=!o.arrow&&null!=n1(r)&&S!==T&&a.reference[m]/2-(S<N?N:k)-p[m]/2<0,P=E?S<N?S-N:S-C:0;return{[u]:h[u]+P,data:{[u]:T,centerOffset:S-T-P,...E&&{alignmentOffset:P}},reset:E}}});var rG="u">typeof document?p.useLayoutEffect:function(){};function rq(e,t){let s,n,r;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((s=e.length)!==t.length)return!1;for(n=s;0!=n--;)if(!rq(e[n],t[n]))return!1;return!0}if((s=(r=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=s;0!=n--;)if(!({}).hasOwnProperty.call(t,r[n]))return!1;for(n=s;0!=n--;){let s=r[n];if(("_owner"!==s||!e.$$typeof)&&!rq(e[s],t[s]))return!1}return!0}return e!=e&&t!=t}function rU(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rX(e,t){let s=rU(e);return Math.round(t*s)/s}function rZ(e){let t=p.useRef(e);return rG(()=>{t.current=e}),t}var rJ=p.forwardRef((e,t)=>{let{children:s,width:n=10,height:r=5,...a}=e;return(0,m.jsx)(Z.svg,{...a,ref:t,width:n,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:(0,m.jsx)("polygon",{points:"0,0 30,0 15,10"})})});rJ.displayName="Arrow";var rQ="Popper",[r0,r1]=z(rQ),[r5,r2]=r0(rQ),r4=e=>{let{__scopePopper:t,children:s}=e,[n,r]=p.useState(null);return(0,m.jsx)(r5,{scope:t,anchor:n,onAnchorChange:r,children:s})};r4.displayName=rQ;var r6="PopperAnchor",r3=p.forwardRef((e,t)=>{let{__scopePopper:s,virtualRef:n,...r}=e,a=r2(r6,s),i=p.useRef(null),l=K(t,i);return p.useEffect(()=>{a.onAnchorChange(n?.current||i.current)}),n?null:(0,m.jsx)(Z.div,{...r,ref:l})});r3.displayName=r6;var r8="PopperContent",[r7,r9]=r0(r8),ae=p.forwardRef((e,t)=>{var s,n,r,a,i,l,o,c,d,x,h,u,f,g,b,y,v,w,j,N,k;let C,S,T,E,P,L,{__scopePopper:M,side:A="bottom",sideOffset:R=0,align:_="center",alignOffset:I=0,arrowPadding:D=0,avoidCollisions:W=!0,collisionBoundary:z=[],collisionPadding:$=0,sticky:H="partial",hideWhenDetached:V=!1,updatePositionStrategy:B="optimized",onPlaced:G,...q}=e,U=r2(r8,M),[X,J]=p.useState(null),Q=K(t,e=>J(e)),[ee,et]=p.useState(null),es=nP(ee),en=es?.width??0,er=es?.height??0,ea="number"==typeof $?$:{top:0,right:0,bottom:0,left:0,...$},ei=Array.isArray(z)?z:[z],el=ei.length>0,eo={padding:ea,boundary:ei.filter(ar),altBoundary:el},{refs:ec,floatingStyles:ed,placement:ex,isPositioned:eh,middlewareData:eu}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:s="absolute",middleware:n=[],platform:r,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:o,open:c}=e,[d,x]=p.useState({x:0,y:0,strategy:s,placement:t,middlewareData:{},isPositioned:!1}),[h,u]=p.useState(n);rq(h,n)||u(n);let[m,f]=p.useState(null),[g,b]=p.useState(null),y=p.useCallback(e=>{e!==N.current&&(N.current=e,f(e))},[]),v=p.useCallback(e=>{e!==k.current&&(k.current=e,b(e))},[]),w=a||m,j=i||g,N=p.useRef(null),k=p.useRef(null),C=p.useRef(d),S=null!=o,T=rZ(o),E=rZ(r),P=rZ(c),L=p.useCallback(()=>{var e,n;let r,a,i;if(!N.current||!k.current)return;let l={placement:t,strategy:s,middleware:h};E.current&&(l.platform=E.current),(e=N.current,n=k.current,r=new Map,i={...(a={platform:rF,...l}).platform,_c:r},ra(e,n,{...a,platform:i})).then(e=>{let t={...e,isPositioned:!1!==P.current};M.current&&!rq(C.current,t)&&(C.current=t,Y.flushSync(()=>{x(t)}))})},[h,t,s,E,P]);rG(()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,x(e=>({...e,isPositioned:!1})))},[c]);let M=p.useRef(!1);rG(()=>(M.current=!0,()=>{M.current=!1}),[]),rG(()=>{if(w&&(N.current=w),j&&(k.current=j),w&&j){if(T.current)return T.current(w,j,L);L()}},[w,j,L,T,S]);let A=p.useMemo(()=>({reference:N,floating:k,setReference:y,setFloating:v}),[y,v]),R=p.useMemo(()=>({reference:w,floating:j}),[w,j]),_=p.useMemo(()=>{let e={position:s,left:0,top:0};if(!R.floating)return e;let t=rX(R.floating,d.x),n=rX(R.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...rU(R.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:t,top:n}},[s,l,R.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:L,refs:A,elements:R,floatingStyles:_}),[d,L,A,R,_])}({strategy:"fixed",placement:A+("center"!==_?"-"+_:""),whileElementsMounted:(...e)=>(function(e,t,s,n){let r;void 0===n&&(n={});let{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:o="function"==typeof IntersectionObserver,animationFrame:c=!1}=n,d=rA(e),x=a||i?[...d?rP(d):[],...t?rP(t):[]]:[];
32x.forEach(e=>{a&&e.addEventListener("scroll",s,{passive:!0}),i&&e.addEventListener("resize",s)});let h=d&&o?function(e,t){let s,n=null,r=ru(e);function a(){var e;clearTimeout(s),null==(e=n)||e.disconnect(),n=null}return!function i(l,o){void 0===l&&(l=!1),void 0===o&&(o=1),a();let c=e.getBoundingClientRect(),{left:d,top:x,width:h,height:u}=c;if(l||t(),!h||!u)return;let m={rootMargin:-nX(x)+"px "+-nX(r.clientWidth-(d+h))+"px "+-nX(r.clientHeight-(x+u))+"px "+-nX(d)+"px",threshold:nq(0,nG(1,o))||1},p=!0;function f(t){let n=t[0].intersectionRatio;if(n!==o){if(!p)return i();n?i(!1,n):s=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==n||rB(c,e.getBoundingClientRect())||i(),p=!1}try{n=new IntersectionObserver(f,{...m,root:r.ownerDocument})}catch(e){n=new IntersectionObserver(f,m)}n.observe(e)}(!0),a}(d,s):null,u=-1,m=null;l&&(m=new ResizeObserver(e=>{let[n]=e;n&&n.target===d&&m&&t&&(m.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),s()}),d&&!c&&m.observe(d),t&&m.observe(t));let p=c?rD(e):null;return c&&function t(){let n=rD(e);p&&!rB(p,n)&&s(),p=n,r=requestAnimationFrame(t)}(),s(),()=>{var e;x.forEach(e=>{a&&e.removeEventListener("scroll",s),i&&e.removeEventListener("resize",s)}),null==h||h(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(r)}})(...e,{animationFrame:"always"===B}),elements:{reference:U.anchor},middleware:[{name:(C={name:"offset",options:r=s={mainAxis:R+er,alignmentAxis:I},async fn(e){var t,s;let{x:n,y:a,placement:i,middlewareData:l}=e,o=await rc(e,r);return i===(null==(t=l.offset)?void 0:t.placement)&&null!=(s=l.arrow)&&s.alignmentOffset?{}:{x:n+o.x,y:a+o.y,data:{...o,placement:i}}}}).name,fn:C.fn,options:[s,n]},W&&{name:(S={name:"shift",options:d=o={mainAxis:!0,crossAxis:!1,limiter:"partial"===H?{fn:(void 0===(l=a)&&(l={}),{options:l,fn(e){let{x:t,y:s,placement:n,rects:r,middlewareData:a}=e,{offset:i=0,mainAxis:o=!0,crossAxis:c=!0}=nQ(l,e),d={x:t,y:s},x=n4(n),h=n5(x),u=d[h],m=d[x],p=nQ(i,e),f="number"==typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(o){let e="y"===h?"height":"width",t=r.reference[h]-r.floating[e]+f.mainAxis,s=r.reference[h]+r.reference[e]-f.mainAxis;u<t?u=t:u>s&&(u=s)}if(c){var g,b;let e="y"===h?"width":"height",t=ro.has(n0(n)),s=r.reference[x]-r.floating[e]+(t&&(null==(g=a.offset)?void 0:g[x])||0)+(t?0:f.crossAxis),i=r.reference[x]+r.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[x])||0)-(t?f.crossAxis:0);m<s?m=s:m>i&&(m=i)}return{[h]:u,[x]:m}}}).fn,options:[a,i]}:void 0,...eo},async fn(e){let{x:t,y:s,placement:n,platform:r}=e,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:s}=e;return{x:t,y:s}}},...o}=nQ(d,e),c={x:t,y:s},x=await r.detectOverflow(e,o),h=n4(n0(n)),u=n5(h),m=c[u],p=c[h];if(a){let e="y"===u?"top":"left",t="y"===u?"bottom":"right",s=m+x[e],n=m-x[t];m=nq(s,nG(m,n))}if(i){let e="y"===h?"top":"left",t="y"===h?"bottom":"right",s=p+x[e],n=p-x[t];p=nq(s,nG(p,n))}let f=l.fn({...e,[u]:m,[h]:p});return{...f,data:{x:f.x-t,y:f.y-s,enabled:{[u]:a,[h]:i}}}}}).name,fn:S.fn,options:[o,c]},W&&{name:(T={name:"flip",options:u=x={...eo},async fn(e){var t,s,n,r,a,i,l,o;let c,d,x,{placement:h,middlewareData:m,rects:p,initialPlacement:f,platform:g,elements:b}=e,{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:w,fallbackStrategy:j="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:k=!0,...C}=nQ(u,e);if(null!=(t=m.arrow)&&t.alignmentOffset)return{};let S=n0(h),T=n4(f),E=n0(f)===f,P=await (null==g.isRTL?void 0:g.isRTL(b.floating)),L=w||(E||!k?[re(f)]:(c=re(f),[n6(f),c,n6(c)])),M="none"!==N;!w&&M&&L.push(...(d=n1(f),x=function(e,t,s){switch(e){case"top":case"bottom":if(s)return t?n8:n3;return t?n3:n8;case"left":case"right":return t?n7:n9;default:return[]}}(n0(f),"start"===N,P),d&&(x=x.map(e=>e+"-"+d),k&&(x=x.concat(x.map(n6)))),x));let A=[f,...L],R=await g.detectOverflow(e,C),_=[],I=(null==(s=m.flip)?void 0:s.overflows)||[];if(y&&_.push(R[S]),v){let e,t,s,n,r=(i=h,l=p,void 0===(o=P)&&(o=!1),e=n1(i),s=n2(t=n5(n4(i))),n="x"===t?e===(o?"end":"start")?"right":"left":"start"===e?"bottom":"top",l.reference[s]>l.floating[s]&&(n=re(n)),[n,re(n)]);_.push(R[r[0]],R[r[1]])}if(I=[...I,{placement:h,overflows:_}],!_.every(e=>e<=0)){let e=((null==(n=m.flip)?void 0:n.index)||0)+1,t=A[e];if(t&&("alignment"!==v||T===n4(t)||I.every(e=>n4(e.placement)!==T||e.overflows[0]>0)))return{data:{index:e,overflows:I},reset:{placement:t}};let s=null==(r=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>
32e.overflows[1]-t.overflows[1])[0])?void 0:r.placement;if(!s)switch(j){case"bestFit":{let e=null==(a=I.filter(e=>{if(M){let t=n4(e.placement);return t===T||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(s=e);break}case"initialPlacement":s=f}if(h!==s)return{reset:{placement:s}}}return{}}}).name,fn:T.fn,options:[x,h]},{name:(E={name:"size",options:b=f={...eo,apply:({elements:e,rects:t,availableWidth:s,availableHeight:n})=>{let{width:r,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${s}px`),i.setProperty("--radix-popper-available-height",`${n}px`),i.setProperty("--radix-popper-anchor-width",`${r}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}},async fn(e){var t,s;let n,r,{placement:a,rects:i,platform:l,elements:o}=e,{apply:c=()=>{},...d}=nQ(b,e),x=await l.detectOverflow(e,d),h=n0(a),u=n1(a),m="y"===n4(a),{width:p,height:f}=i.floating;"top"===h||"bottom"===h?(n=h,r=u===(await (null==l.isRTL?void 0:l.isRTL(o.floating))?"start":"end")?"left":"right"):(r=h,n="end"===u?"top":"bottom");let g=f-x.top-x.bottom,y=p-x.left-x.right,v=nG(f-x[n],g),w=nG(p-x[r],y),j=!e.middlewareData.shift,N=v,k=w;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(k=y),null!=(s=e.middlewareData.shift)&&s.enabled.y&&(N=g),j&&!u){let e=nq(x.left,0),t=nq(x.right,0),s=nq(x.top,0),n=nq(x.bottom,0);m?k=p-2*(0!==e||0!==t?e+t:nq(x.left,x.right)):N=f-2*(0!==s||0!==n?s+n:nq(x.top,x.bottom))}await c({...e,availableWidth:k,availableHeight:N});let C=await l.getDimensions(o.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}).name,fn:E.fn,options:[f,g]},ee&&{name:(P={name:"arrow",options:w=y={element:ee,padding:D},fn(e){let{element:t,padding:s}="function"==typeof w?w(e):w;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?rY({element:t.current,padding:s}).fn(e):{}:t?rY({element:t,padding:s}).fn(e):{}}}).name,fn:P.fn,options:[y,v]},aa({arrowWidth:en,arrowHeight:er}),V&&{name:(L={name:"hide",options:k=j={strategy:"referenceHidden",...eo},async fn(e){let{rects:t,platform:s}=e,{strategy:n="referenceHidden",...r}=nQ(k,e);switch(n){case"referenceHidden":{let n=ri(await s.detectOverflow(e,{...r,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:rl(n)}}}case"escaped":{let n=ri(await s.detectOverflow(e,{...r,altBoundary:!0}),t.floating);return{data:{escapedOffsets:n,escaped:rl(n)}}}default:return{}}}}).name,fn:L.fn,options:[j,N]}]}),[em,ep]=ai(ex),ef=F(G);O(()=>{eh&&ef?.()},[eh,ef]);let eg=eu.arrow?.x,eb=eu.arrow?.y,ey=eu.arrow?.centerOffset!==0,[ev,ew]=p.useState();return O(()=>{X&&ew(window.getComputedStyle(X).zIndex)},[X]),(0,m.jsx)("div",{ref:ec.setFloating,"data-radix-popper-content-wrapper":"",style:{...ed,transform:eh?ed.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ev,"--radix-popper-transform-origin":[eu.transformOrigin?.x,eu.transformOrigin?.y].join(" "),...eu.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,m.jsx)(r7,{scope:M,placedSide:em,onArrowChange:et,arrowX:eg,arrowY:eb,shouldHideArrow:ey,children:(0,m.jsx)(Z.div,{"data-side":em,"data-align":ep,...q,ref:Q,style:{...q.style,animation:eh?void 0:"none"}})})})});ae.displayName=r8;var at="PopperArrow",as={top:"bottom",right:"left",bottom:"top",left:"right"},an=p.forwardRef(function(e,t){let{__scopePopper:s,...n}=e,r=r9(at,s),a=as[r.placedSide];return(0,m.jsx)("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:(0,m.jsx)(rJ,{...n,ref:t,style:{...n.style,display:"block"}})})});function ar(e){return null!==e}an.displayName=at;var aa=e=>({name:"transformOrigin",options:e,fn(t){let{placement:s,rects:n,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[o,c]=ai(s),d={start:"0%",center:"50%",end:"100%"}[c],x=(r.arrow?.x??0)+i/2,h=(r.arrow?.y??0)+l/2,u="",m="";
32return"bottom"===o?(u=a?d:`${x}px`,m=`${-l}px`):"top"===o?(u=a?d:`${x}px`,m=`${n.floating.height+l}px`):"right"===o?(u=`${-l}px`,m=a?d:`${h}px`):"left"===o&&(u=`${n.floating.width+l}px`,m=a?d:`${h}px`),{data:{x:u,y:m}}}});function ai(e){let[t,s="center"]=e.split("-");return[t,s]}var al=p.forwardRef((e,t)=>(0,m.jsx)(Z.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));al.displayName="VisuallyHidden";var ao=[" ","Enter","ArrowUp","ArrowDown"],ac=[" ","Enter"],ad="Select",[ax,ah,au]=function(e){let t=e+"CollectionProvider",[s,n]=z(t),[r,a]=s(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{let{scope:t,children:s}=e,n=p.default.useRef(null),a=p.default.useRef(new Map).current;return(0,m.jsx)(r,{scope:t,itemMap:a,collectionRef:n,children:s})};i.displayName=t;let l=e+"CollectionSlot",o=p.default.forwardRef((e,t)=>{let{scope:s,children:n}=e,r=K(t,a(l,s).collectionRef);return(0,m.jsx)(G,{ref:r,children:n})});o.displayName=l;let c=e+"CollectionItemSlot",d="data-radix-collection-item",x=p.default.forwardRef((e,t)=>{let{scope:s,children:n,...r}=e,i=p.default.useRef(null),l=K(t,i),o=a(c,s);return p.default.useEffect(()=>(o.itemMap.set(i,{ref:i,...r}),()=>void o.itemMap.delete(i))),(0,m.jsx)(G,{...{[d]:""},ref:l,children:n})});return x.displayName=c,[{Provider:i,Slot:o,ItemSlot:x},function(t){let s=a(e+"CollectionConsumer",t);return p.default.useCallback(()=>{let e=s.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(s.itemMap.values()).sort((e,s)=>t.indexOf(e.ref.current)-t.indexOf(s.ref.current))},[s.collectionRef,s.itemMap])},n]}(ad),[am,ap]=z(ad,[au,r1]),af=r1(),[ag,ab]=am(ad),[ay,av]=am(ad),aw=e=>{let t,{__scopeSelect:s,children:n,open:r,defaultOpen:a,onOpenChange:i,value:l,defaultValue:o,onValueChange:c,dir:d,name:x,autoComplete:h,disabled:u,required:f,form:g}=e,b=af(s),[y,v]=p.useState(null),[w,j]=p.useState(null),[N,k]=p.useState(!1),C=(t=p.useContext(nB),d||t||"ltr"),[S=!1,T]=B({prop:r,defaultProp:a,onChange:i}),[E,P]=B({prop:l,defaultProp:o,onChange:c}),L=p.useRef(null),M=!y||g||!!y.closest("form"),[A,R]=p.useState(new Set),_=Array.from(A).map(e=>e.props.value).join(";");return(0,m.jsx)(r4,{...b,children:(0,m.jsxs)(ag,{required:f,scope:s,trigger:y,onTriggerChange:v,valueNode:w,onValueNodeChange:j,valueNodeHasChildren:N,onValueNodeHasChildrenChange:k,contentId:V(),value:E,onValueChange:P,open:S,onOpenChange:T,dir:C,triggerPointerDownPosRef:L,disabled:u,children:[(0,m.jsx)(ax.Provider,{scope:s,children:(0,m.jsx)(ay,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(e=>{R(t=>new Set(t).add(e))},[]),onNativeOptionRemove:p.useCallback(e=>{R(t=>{let s=new Set(t);return s.delete(e),s})},[]),children:n})}),M?(0,m.jsxs)(a2,{"aria-hidden":!0,required:f,tabIndex:-1,name:x,autoComplete:h,value:E,onChange:e=>P(e.target.value),disabled:u,form:g,children:[void 0===E?(0,m.jsx)("option",{value:""}):null,Array.from(A)]},_):null]})})};aw.displayName=ad;var aj="SelectTrigger",aN=p.forwardRef((e,t)=>{let{__scopeSelect:s,disabled:n=!1,...r}=e,a=af(s),i=ab(aj,s),l=i.disabled||n,o=K(t,i.onTriggerChange),c=ah(s),d=p.useRef("touch"),[x,h,u]=a4(e=>{let t=c().filter(e=>!e.disabled),s=t.find(e=>e.value===i.value),n=a6(t,e,s);void 0!==n&&i.onValueChange(n.value)}),f=e=>{l||(i.onOpenChange(!0),u()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,m.jsx)(r3,{asChild:!0,...a,children:(0,m.jsx)(Z.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":a5(i.value)?"":void 0,...r,ref:o,onClick:I(r.onClick,e=>{e.currentTarget.focus(),"mouse"!==d.current&&f(e)}),onPointerDown:I(r.onPointerDown,e=>{d.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(f(e),e.preventDefault())}),onKeyDown:I(r.onKeyDown,e=>{let t=""!==x.current;
32e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&ao.includes(e.key)&&(f(),e.preventDefault())})})})});aN.displayName=aj;var ak="SelectValue",aC=p.forwardRef((e,t)=>{let{__scopeSelect:s,className:n,style:r,children:a,placeholder:i="",...l}=e,o=ab(ak,s),{onValueNodeHasChildrenChange:c}=o,d=void 0!==a,x=K(t,o.onValueNodeChange);return O(()=>{c(d)},[c,d]),(0,m.jsx)(Z.span,{...l,ref:x,style:{pointerEvents:"none"},children:a5(o.value)?(0,m.jsx)(m.Fragment,{children:i}):a})});aC.displayName=ak;var aS=p.forwardRef((e,t)=>{let{__scopeSelect:s,children:n,...r}=e;return(0,m.jsx)(Z.span,{"aria-hidden":!0,...r,ref:t,children:n||"â¼"})});aS.displayName="SelectIcon";var aT="SelectContent",aE=p.forwardRef((e,t)=>{let s=ab(aT,e.__scopeSelect),[n,r]=p.useState();return(O(()=>{r(new DocumentFragment)},[]),s.open)?(0,m.jsx)(aM,{...e,ref:t}):n?Y.createPortal((0,m.jsx)(aP,{scope:e.__scopeSelect,children:(0,m.jsx)(ax.Slot,{scope:e.__scopeSelect,children:(0,m.jsx)("div",{children:e.children})})}),n):null});aE.displayName=aT;var[aP,aL]=am(aT),aM=p.forwardRef((e,t)=>{let{__scopeSelect:s,position:n="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:o,align:c,alignOffset:d,arrowPadding:x,collisionBoundary:h,collisionPadding:u,sticky:f,hideWhenDetached:g,avoidCollisions:b,...y}=e,v=ab(aT,s),[w,j]=p.useState(null),[N,k]=p.useState(null),C=K(t,e=>j(e)),[S,T]=p.useState(null),[E,P]=p.useState(null),L=ah(s),[M,A]=p.useState(!1),R=p.useRef(!1);p.useEffect(()=>{if(w)return e9(w)},[w]),ef();let _=p.useCallback(e=>{let[t,...s]=L().map(e=>e.ref.current),[n]=s.slice(-1),r=document.activeElement;for(let s of e)if(s===r||(s?.scrollIntoView({block:"nearest"}),s===t&&N&&(N.scrollTop=0),s===n&&N&&(N.scrollTop=N.scrollHeight),s?.focus(),document.activeElement!==r))return},[L,N]),D=p.useCallback(()=>_([S,w]),[_,S,w]);p.useEffect(()=>{M&&D()},[M,D]);let{onOpenChange:W,triggerPointerDownPosRef:z}=v;p.useEffect(()=>{if(w){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(z.current?.y??0))}},s=s=>{e.x<=10&&e.y<=10?s.preventDefault():w.contains(s.target)||W(!1),document.removeEventListener("pointermove",t),z.current=null};return null!==z.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",s,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",s,{capture:!0})}}},[w,W,z]),p.useEffect(()=>{let e=()=>W(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[W]);let[O,$]=a4(e=>{let t=L().filter(e=>!e.disabled),s=t.find(e=>e.ref.current===document.activeElement),n=a6(t,e,s);n&&setTimeout(()=>n.ref.current.focus())}),H=p.useCallback((e,t,s)=>{let n=!R.current&&!s;(void 0!==v.value&&v.value===t||n)&&(T(e),n&&(R.current=!0))},[v.value]),V=p.useCallback(()=>w?.focus(),[w]),F=p.useCallback((e,t,s)=>{let n=!R.current&&!s;(void 0!==v.value&&v.value===t||n)&&P(e)},[v.value]),B="popper"===n?aR:aA,Y=B===aR?{side:l,sideOffset:o,align:c,alignOffset:d,arrowPadding:x,collisionBoundary:h,collisionPadding:u,sticky:f,hideWhenDetached:g,avoidCollisions:b}:{};return(0,m.jsx)(aP,{scope:s,content:w,viewport:N,onViewportChange:k,itemRefCallback:H,selectedItem:S,onItemLeave:V,itemTextRefCallback:F,focusSelectedItem:D,selectedItemText:E,position:n,isPositioned:M,searchRef:O,children:(0,m.jsx)(e5,{as:G,allowPinchZoom:!0,children:(0,m.jsx)(ei,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:I(r,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,m.jsx)(ee,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,m.jsx)(B,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:e=>e.preventDefault(),...y,...Y,onPlaced:()=>A(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:I(y.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;
32if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||$(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=L().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let s=e.target,n=t.indexOf(s);t=t.slice(n+1)}setTimeout(()=>_(t)),e.preventDefault()}})})})})})})});aM.displayName="SelectContentImpl";var aA=p.forwardRef((e,t)=>{let{__scopeSelect:s,onPlaced:n,...r}=e,a=ab(aT,s),i=aL(aT,s),[l,o]=p.useState(null),[c,d]=p.useState(null),x=K(t,e=>d(e)),h=ah(s),u=p.useRef(!1),f=p.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:y,focusSelectedItem:v}=i,w=p.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&c&&g&&b&&y){let e=a.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),s=a.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if("rtl"!==a.dir){let n=r.left-t.left,a=s.left-n,i=e.left-a,o=e.width+i,c=Math.max(o,t.width),d=nF(a,[10,Math.max(10,window.innerWidth-10-c)]);l.style.minWidth=o+"px",l.style.left=d+"px"}else{let n=t.right-r.right,a=window.innerWidth-s.right-n,i=window.innerWidth-e.right-a,o=e.width+i,c=Math.max(o,t.width),d=nF(a,[10,Math.max(10,window.innerWidth-10-c)]);l.style.minWidth=o+"px",l.style.right=d+"px"}let i=h(),o=window.innerHeight-20,d=g.scrollHeight,x=window.getComputedStyle(c),m=parseInt(x.borderTopWidth,10),p=parseInt(x.paddingTop,10),f=parseInt(x.borderBottomWidth,10),v=m+p+d+parseInt(x.paddingBottom,10)+f,w=Math.min(5*b.offsetHeight,v),j=window.getComputedStyle(g),N=parseInt(j.paddingTop,10),k=parseInt(j.paddingBottom,10),C=e.top+e.height/2-10,S=b.offsetHeight/2,T=m+p+(b.offsetTop+S);if(T<=C){let e=i.length>0&&b===i[i.length-1].ref.current;l.style.bottom="0px";let t=Math.max(o-C,S+(e?k:0)+(c.clientHeight-g.offsetTop-g.offsetHeight)+f);l.style.height=T+t+"px"}else{let e=i.length>0&&b===i[0].ref.current;l.style.top="0px";let t=Math.max(C,m+g.offsetTop+(e?N:0)+S);l.style.height=t+(v-T)+"px",g.scrollTop=T-C+g.offsetTop}l.style.margin="10px 0",l.style.minHeight=w+"px",l.style.maxHeight=o+"px",n?.(),requestAnimationFrame(()=>u.current=!0)}},[h,a.trigger,a.valueNode,l,c,g,b,y,a.dir,n]);O(()=>w(),[w]);let[j,N]=p.useState();O(()=>{c&&N(window.getComputedStyle(c).zIndex)},[c]);let k=p.useCallback(e=>{e&&!0===f.current&&(w(),v?.(),f.current=!1)},[w,v]);return(0,m.jsx)(a_,{scope:s,contentWrapper:l,shouldExpandOnScrollRef:u,onScrollButtonChange:k,children:(0,m.jsx)("div",{ref:o,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,m.jsx)(Z.div,{...r,ref:x,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});aA.displayName="SelectItemAlignedPosition";var aR=p.forwardRef((e,t)=>{let{__scopeSelect:s,align:n="start",collisionPadding:r=10,...a}=e,i=af(s);return(0,m.jsx)(ae,{...i,...a,ref:t,align:n,collisionPadding:r,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});aR.displayName="SelectPopperPosition";var[a_,aI]=am(aT,{}),aD="SelectViewport",aW=p.forwardRef((e,t)=>{let{__scopeSelect:s,nonce:n,...r}=e,a=aL(aD,s),i=aI(aD,s),l=K(t,a.onViewportChange),o=p.useRef(0);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),(0,m.jsx)(ax.Slot,{scope:s,children:(0,m.jsx)(Z.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:I(r.onScroll,e=>{let t=e.currentTarget,{contentWrapper:s,shouldExpandOnScrollRef:n}=i;if(n?.current&&s){let e=Math.abs(o.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,r=Math.max(parseFloat(s.style.minHeight),parseFloat(s.style.height));if(r<n){let a=r+e,i=Math.min(n,a),l=a-i;s.style.height=i+"px","0px"===s.style.bottom&&(t.scrollTop=l>0?l:0,s.style.justifyContent="flex-end")}}}o.current=t.scrollTop})})})]})});aW.displayName=aD;var aK="SelectGroup",[az,aO]=am(aK);p.forwardRef((e,t)=>
32{let{__scopeSelect:s,...n}=e,r=V();return(0,m.jsx)(az,{scope:s,id:r,children:(0,m.jsx)(Z.div,{role:"group","aria-labelledby":r,...n,ref:t})})}).displayName=aK;var a$="SelectLabel";p.forwardRef((e,t)=>{let{__scopeSelect:s,...n}=e,r=aO(a$,s);return(0,m.jsx)(Z.div,{id:r.id,...n,ref:t})}).displayName=a$;var aH="SelectItem",[aV,aF]=am(aH),aB=p.forwardRef((e,t)=>{let{__scopeSelect:s,value:n,disabled:r=!1,textValue:a,...i}=e,l=ab(aH,s),o=aL(aH,s),c=l.value===n,[d,x]=p.useState(a??""),[h,u]=p.useState(!1),f=K(t,e=>o.itemRefCallback?.(e,n,r)),g=V(),b=p.useRef("touch"),y=()=>{r||(l.onValueChange(n),l.onOpenChange(!1))};if(""===n)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,m.jsx)(aV,{scope:s,value:n,disabled:r,textId:g,isSelected:c,onItemTextChange:p.useCallback(e=>{x(t=>t||(e?.textContent??"").trim())},[]),children:(0,m.jsx)(ax.ItemSlot,{scope:s,value:n,disabled:r,textValue:d,children:(0,m.jsx)(Z.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,ref:f,onFocus:I(i.onFocus,()=>u(!0)),onBlur:I(i.onBlur,()=>u(!1)),onClick:I(i.onClick,()=>{"mouse"!==b.current&&y()}),onPointerUp:I(i.onPointerUp,()=>{"mouse"===b.current&&y()}),onPointerDown:I(i.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:I(i.onPointerMove,e=>{b.current=e.pointerType,r?o.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:I(i.onPointerLeave,e=>{e.currentTarget===document.activeElement&&o.onItemLeave?.()}),onKeyDown:I(i.onKeyDown,e=>{(o.searchRef?.current===""||" "!==e.key)&&(ac.includes(e.key)&&y()," "===e.key&&e.preventDefault())})})})})});aB.displayName=aH;var aY="SelectItemText",aG=p.forwardRef((e,t)=>{let{__scopeSelect:s,className:n,style:r,...a}=e,i=ab(aY,s),l=aL(aY,s),o=aF(aY,s),c=av(aY,s),[d,x]=p.useState(null),h=K(t,e=>x(e),o.onItemTextChange,e=>l.itemTextRefCallback?.(e,o.value,o.disabled)),u=d?.textContent,f=p.useMemo(()=>(0,m.jsx)("option",{value:o.value,disabled:o.disabled,children:u},o.value),[o.disabled,o.value,u]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=c;return O(()=>(g(f),()=>b(f)),[g,b,f]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Z.span,{id:o.textId,...a,ref:h}),o.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Y.createPortal(a.children,i.valueNode):null]})});aG.displayName=aY;var aq="SelectItemIndicator",aU=p.forwardRef((e,t)=>{let{__scopeSelect:s,...n}=e;return aF(aq,s).isSelected?(0,m.jsx)(Z.span,{"aria-hidden":!0,...n,ref:t}):null});aU.displayName=aq;var aX="SelectScrollUpButton",aZ=p.forwardRef((e,t)=>{let s=aL(aX,e.__scopeSelect),n=aI(aX,e.__scopeSelect),[r,a]=p.useState(!1),i=K(t,n.onScrollButtonChange);return O(()=>{if(s.viewport&&s.isPositioned){let e=function(){a(t.scrollTop>0)},t=s.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[s.viewport,s.isPositioned]),r?(0,m.jsx)(a0,{...e,ref:i,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=s;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});aZ.displayName=aX;var aJ="SelectScrollDownButton",aQ=p.forwardRef((e,t)=>{let s=aL(aJ,e.__scopeSelect),n=aI(aJ,e.__scopeSelect),[r,a]=p.useState(!1),i=K(t,n.onScrollButtonChange);return O(()=>{if(s.viewport&&s.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=s.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[s.viewport,s.isPositioned]),r?(0,m.jsx)(a0,{...e,ref:i,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=s;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});aQ.displayName=aJ;var a0=p.forwardRef((e,t)=>{let{__scopeSelect:s,onAutoScroll:n,...r}=e,a=aL("SelectScrollButton",s),i=p.useRef(null),l=ah(s),o=p.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return p.useEffect(()=>()=>o(),[o]),O(()=>{let e=l().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[l]),(0,m.jsx)(Z.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:I(r.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(n,50))}),onPointerMove:I(r.onPointerMove,()=>{a.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(n,50))}),onPointerLeave:I(r.onPointerLeave,()=>{o()})})});p.forwardRef((e,t)=>
32{let{__scopeSelect:s,...n}=e;return(0,m.jsx)(Z.div,{"aria-hidden":!0,...n,ref:t})}).displayName="SelectSeparator";var a1="SelectArrow";function a5(e){return""===e||void 0===e}p.forwardRef((e,t)=>{let{__scopeSelect:s,...n}=e,r=af(s),a=ab(a1,s),i=aL(a1,s);return a.open&&"popper"===i.position?(0,m.jsx)(an,{...r,...n,ref:t}):null}).displayName=a1;var a2=p.forwardRef((e,t)=>{let{value:s,...n}=e,r=p.useRef(null),a=K(t,r),i=nE(s);return p.useEffect(()=>{let e=r.current,t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(i!==s&&t){let n=new Event("change",{bubbles:!0});t.call(e,s),e.dispatchEvent(n)}},[i,s]),(0,m.jsx)(al,{asChild:!0,children:(0,m.jsx)("select",{...n,ref:a,defaultValue:s})})});function a4(e){let t=F(e),s=p.useRef(""),n=p.useRef(0),r=p.useCallback(e=>{let r=s.current+e;t(r),function e(t){s.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout(()=>e(""),1e3))}(r)},[t]),a=p.useCallback(()=>{s.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[s,r,a]}function a6(e,t,s){var n,r;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=s?e.indexOf(s):-1,l=(n=e,r=Math.max(i,0),n.map((e,t)=>n[(r+t)%n.length]));1===a.length&&(l=l.filter(e=>e!==s));let o=l.find(e=>e.textValue.toLowerCase().startsWith(a.toLowerCase()));return o!==s?o:void 0}a2.displayName="BubbleSelect";var n$=n$,a3=e.i(31171),a3=a3;let a8=(0,T.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function a7({...e}){return(0,m.jsx)(aw,{"data-slot":"select",...e})}function a9({...e}){return(0,m.jsx)(aC,{"data-slot":"select-value",...e})}function ie({className:e,size:t="default",children:s,...n}){return(0,m.jsxs)(aN,{"data-slot":"select-trigger","data-size":t,className:sw("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[s,(0,m.jsx)(aS,{asChild:!0,children:(0,m.jsx)(a3.default,{className:"size-4 opacity-50"})})]})}function it({className:e,children:t,position:s="popper",...n}){return(0,m.jsxs)(aE,{"data-slot":"select-content",className:sw("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 relative z-[200] max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...n,children:[(0,m.jsx)(ir,{}),(0,m.jsx)(aW,{className:sw("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),(0,m.jsx)(ia,{})]})}function is({className:e,children:t,...s}){return(0,m.jsxs)(aB,{"data-slot":"select-item",className:sw("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...s,children:[(0,m.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,m.jsx)(aU,{children:(0,m.jsx)(n$.default,{className:"size-4"})})}),(0,m.jsx)(aG,{children:t})]})}function ir({className:e,...t}){return(0,m.jsx)(aZ,{"data-slot":"select-scroll-up-button",className:sw("flex cursor-default items-center justify-center py-1",e),...t,children:(0,m.jsx)(a8,{className:"size-4"})})}function ia({className:e,...t}){return(0,m.jsx)(aQ,{"data-slot":"select-scroll-down-button",className:sw("flex cursor-default items-center justify-center py-1",e),...t,children:(0,m.jsx)(a3.default,{className:"size-4"})})}var[ii,il]=z("Tooltip",[r1]),io=r1(),ic="TooltipProvider",id="tooltip.open",[ix,ih]=ii(ic),iu=e=>{let{__scopeTooltip:t,delayDuration:s=700,skipDelayDuration:n=300,disableHoverableContent:r=!1,
32children:a}=e,[i,l]=p.useState(!0),o=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,m.jsx)(ix,{scope:t,isOpenDelayed:i,delayDuration:s,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),l(!1)},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>l(!0),n)},[n]),isPointerInTransitRef:o,onPointerInTransitChange:p.useCallback(e=>{o.current=e},[]),disableHoverableContent:r,children:a})};iu.displayName=ic;var im="Tooltip",[ip,ig]=ii(im),ib=e=>{let{__scopeTooltip:t,children:s,open:n,defaultOpen:r=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,o=ih(im,e.__scopeTooltip),c=io(t),[d,x]=p.useState(null),h=V(),u=p.useRef(0),f=i??o.disableHoverableContent,g=l??o.delayDuration,b=p.useRef(!1),[y=!1,v]=B({prop:n,defaultProp:r,onChange:e=>{e?(o.onOpen(),document.dispatchEvent(new CustomEvent(id))):o.onClose(),a?.(e)}}),w=p.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),j=p.useCallback(()=>{window.clearTimeout(u.current),u.current=0,b.current=!1,v(!0)},[v]),N=p.useCallback(()=>{window.clearTimeout(u.current),u.current=0,v(!1)},[v]),k=p.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>{b.current=!0,v(!0),u.current=0},g)},[g,v]);return p.useEffect(()=>()=>{u.current&&(window.clearTimeout(u.current),u.current=0)},[]),(0,m.jsx)(r4,{...c,children:(0,m.jsx)(ip,{scope:t,contentId:h,open:y,stateAttribute:w,trigger:d,onTriggerChange:x,onTriggerEnter:p.useCallback(()=>{o.isOpenDelayed?k():j()},[o.isOpenDelayed,k,j]),onTriggerLeave:p.useCallback(()=>{f?N():(window.clearTimeout(u.current),u.current=0)},[N,f]),onOpen:j,onClose:N,disableHoverableContent:f,children:s})})};ib.displayName=im;var iy="TooltipTrigger",iv=p.forwardRef((e,t)=>{let{__scopeTooltip:s,...n}=e,r=ig(iy,s),a=ih(iy,s),i=io(s),l=K(t,p.useRef(null),r.onTriggerChange),o=p.useRef(!1),c=p.useRef(!1),d=p.useCallback(()=>o.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,m.jsx)(r3,{asChild:!0,...i,children:(0,m.jsx)(Z.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...n,ref:l,onPointerMove:I(e.onPointerMove,e=>{"touch"!==e.pointerType&&(c.current||a.isPointerInTransitRef.current||(r.onTriggerEnter(),c.current=!0))}),onPointerLeave:I(e.onPointerLeave,()=>{r.onTriggerLeave(),c.current=!1}),onPointerDown:I(e.onPointerDown,()=>{o.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:I(e.onFocus,()=>{o.current||r.onOpen()}),onBlur:I(e.onBlur,r.onClose),onClick:I(e.onClick,r.onClose)})})});iv.displayName=iy;var iw="TooltipPortal",[ij,iN]=ii(iw,{forceMount:void 0}),ik=e=>{let{__scopeTooltip:t,forceMount:s,children:n,container:r}=e,a=ig(iw,t);return(0,m.jsx)(ij,{scope:t,forceMount:s,children:(0,m.jsx)(eu,{present:s||a.open,children:(0,m.jsx)(eh,{asChild:!0,container:r,children:n})})})};ik.displayName=iw;var iC="TooltipContent",iS=p.forwardRef((e,t)=>{let s=iN(iC,e.__scopeTooltip),{forceMount:n=s.forceMount,side:r="top",...a}=e,i=ig(iC,e.__scopeTooltip);return(0,m.jsx)(eu,{present:n||i.open,children:i.disableHoverableContent?(0,m.jsx)(iL,{side:r,...a,ref:t}):(0,m.jsx)(iT,{side:r,...a,ref:t})})}),iT=p.forwardRef((e,t)=>{let s=ig(iC,e.__scopeTooltip),n=ih(iC,e.__scopeTooltip),r=p.useRef(null),a=K(t,r),[i,l]=p.useState(null),{trigger:o,onClose:c}=s,d=r.current,{onPointerInTransitChange:x}=n,h=p.useCallback(()=>{l(null),x(!1)},[x]),u=p.useCallback((e,t)=>{let s,n=e.currentTarget,r={x:e.clientX,y:e.clientY},a=function(e,t){let s=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(s,n,r,a)){case a:return"left";case r:return"right";case s:return"top";case n:return"bottom";default:throw Error("unreachable")}}(r,n.getBoundingClientRect());l(((s=[...function(e,t,s=5){let n=[];switch(t){case"top":n.push({x:e.x-s,y:e.y+s},{x:e.x+s,y:e.y+s});break;case"bottom":n.push({x:e.x-s,y:e.y-s},{x:e.x+s,y:e.y-s});break;case"left":n.push({x:e.x+s,y:e.y-s},{x:e.x+s,y:e.y+s});break;case"right":n.push({x:e.x-s,y:e.y-s},{x:e.x-s,y:e.y+s})}return n}(r,a),...function(e){let{top:t,right:s,bottom:n,left:r}=e;return[{x:r,y:t},{x:s,y:t},{x:s,y:n},{x:r,y:n}]}(t.getBoundingClientRect())].slice()).sort((e,t)=>
32e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let s=0;s<e.length;s++){let n=e[s];for(;t.length>=2;){let e=t[t.length-1],s=t[t.length-2];if((e.x-s.x)*(n.y-s.y)>=(e.y-s.y)*(n.x-s.x))t.pop();else break}t.push(n)}t.pop();let s=[];for(let t=e.length-1;t>=0;t--){let n=e[t];for(;s.length>=2;){let e=s[s.length-1],t=s[s.length-2];if((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x))s.pop();else break}s.push(n)}return(s.pop(),1===t.length&&1===s.length&&t[0].x===s[0].x&&t[0].y===s[0].y)?t:t.concat(s)}(s))),x(!0)},[x]);return p.useEffect(()=>()=>h(),[h]),p.useEffect(()=>{if(o&&d){let e=e=>u(e,d),t=e=>u(e,o);return o.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{o.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}},[o,d,u,h]),p.useEffect(()=>{if(i){let e=e=>{let t=e.target,s={x:e.clientX,y:e.clientY},n=o?.contains(t)||d?.contains(t),r=!function(e,t){let{x:s,y:n}=e,r=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let i=t[e].x,l=t[e].y,o=t[a].x,c=t[a].y;l>n!=c>n&&s<(o-i)*(n-l)/(c-l)+i&&(r=!r)}return r}(s,i);n?h():r&&(h(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[o,d,i,c,h]),(0,m.jsx)(iL,{...e,ref:a})}),[iE,iP]=ii(im,{isInside:!1}),iL=p.forwardRef((e,t)=>{let{__scopeTooltip:s,children:n,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,o=ig(iC,s),c=io(s),{onClose:d}=o;return p.useEffect(()=>(document.addEventListener(id,d),()=>document.removeEventListener(id,d)),[d]),p.useEffect(()=>{if(o.trigger){let e=e=>{let t=e.target;t?.contains(o.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[o.trigger,d]),(0,m.jsx)(ee,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,m.jsxs)(ae,{"data-state":o.stateAttribute,...c,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,m.jsx)(U,{children:n}),(0,m.jsx)(iE,{scope:s,isInside:!0,children:(0,m.jsx)(al,{id:o.contentId,role:"tooltip",children:r||n})})]})})});iS.displayName=iC;var iM="TooltipArrow",iA=p.forwardRef((e,t)=>{let{__scopeTooltip:s,...n}=e,r=io(s);return iP(iM,s).isInside?null:(0,m.jsx)(an,{...r,...n,ref:t})});function iR({delayDuration:e=0,...t}){return(0,m.jsx)(iu,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function i_({...e}){return(0,m.jsx)(iR,{children:(0,m.jsx)(ib,{"data-slot":"tooltip",...e})})}function iI({...e}){return(0,m.jsx)(iv,{"data-slot":"tooltip-trigger",...e})}function iD({className:e,sideOffset:t=0,children:s,...n}){return(0,m.jsx)(ik,{children:(0,m.jsxs)(iS,{"data-slot":"tooltip-content",sideOffset:t,className:sw("bg-primary text-primary-foreground 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 px-3 py-1.5 text-xs text-balance",e),...n,children:[s,(0,m.jsx)(iA,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}iA.displayName=iM;let iW={thuong:sR.KEY_TYPE.NORMAL,normal:sR.KEY_TYPE.NORMAL,vip:sR.KEY_TYPE.VIP,vip1h:sR.KEY_TYPE.VIP_1H,vip_1h:sR.KEY_TYPE.VIP_1H};function iK({keys:e,setKeys:t,keysLoading:s,loadData:n,refreshUser:r}){let a=(0,f.useSearchParams)(),i=(0,s_.useTenant)(),{user:l}=(0,g.useAuth)(),o=l?.balance??0,c=Number(o).toLocaleString("vi-VN"),[d,x]=(0,p.useState)(!1),[h,u]=(0,p.useState)([]),[v,w]=(0,p.useState)(""),[j,N]=(0,p.useState)(1),[C,S]=(0,p.useState)(1),[T,E]=(0,p.useState)(!1),P=(0,p.useRef)(""),[M,A]=(0,p.useState)(!1),[R,_]=(0,p.useState)(""),[I,D]=(0,p.useState)([]),[W,K]=(0,p.useState)(void 0),[z,O]=(0,p.useState)(null),[$,H]=(0,p.useState)(!1),[V,F]=(0,p.useState)(null),[B,Y]=(0,p.useState)(!1),[G,q]=(0,p.useState)(""),[U,X]=(0,p.useState)(""),[Z,J]=(0,p.useState)(""),[Q,ee]=(0,p.useState)("newest"),[et,es]=(0,p.useState)(new Set),[en,er]=(0,p.useState)(1),[ea,ei]=(0,p.useState)(10),[el,eo]=(0,p.useState)(!1),[ec,ed]=(0,p.useState)(!1),[ex,eh]=(0,p.useState)([]),[eu,em]=(0,p.useState)(!1),[ep,ef]=(0,p.useState)(null),[eg,eb]=(0,p.useState)(!1),[ey,ev]=(0,p.useState)(void 0),[ew,ej]=(0,p.useState)([]),[eN,ek]=(0,p.useState)(!1),[eC,eS]=(0,p.useState)(!1),[eT,eE]=(0,p.useState)(""),[eP,eL]=(0,p.useState)(1),[eM,eA]=(0,p.useState)(!1),[eR,e_]=(0,p.useState)(!1),[eI,eD]=(0,p.useState)(1),[eW,eK]=(0,p.useState)(!1),[ez,eO]=(0,p.useState)(null),[e$,eH]=(0,p.useState)(""),[eV,eF]=(0,p.useState)(!1),[eB,eY]=(0,p.useState)(0),[eG,eq]=(0,p.useState)(!1),[eU,eX]=(0,p.useState)(!1),eZ=()=>{(0,sR.getLegacyKeyStats)().then(e=>eY(e.count)).catch(()=>{})};(0,p.useEffect)(eZ,[]);let eJ=async()=>{eq(!0);try{let e=await (0,sR.reissueLegacyKeys)();b.toast.success(e.message),eX(!1),eY(0),await n(),eZ()}catch(e){b.toast.error(e.message||"Thay key thất bại, vui lòng thỠlại")}eq(!1)};(0,p.useEffect)(()=>{(0,sR.getPricing)(i.isMainSite?void 0:i.id).then(e=>{e&&e.length>0&&(u(e),w(t=>t||e[0].keyType))}).catch(()=>{})},[i.id,i.isMainSite]),(0,p.useEffect)(()=>{{let e=localStorage.getItem("nestproxy_filter_search")||"",t=localStorage.getItem("nestproxy_filter_type")||"",s=localStorage.getItem("nestproxy_filter_status")||"",n=localStorage.getItem("nestproxy_filter_sort")||"newest",r=localStorage.getItem("nestproxy_filter_per_page")||"10";q(e),X(t),J(s),ee(n),ei(Number(r)),eo(!0)}},[]),(0,p.useEffect)(()=>{el&&(localStorage.setItem("nestproxy_filter_search",G),localStorage.setItem("nestproxy_filter_type",U),localStorage.setItem("nestproxy_filter_status",Z),localStorage.setItem("nestproxy_filter_sort",Q),localStorage.setItem("nestproxy_filter_per_page",String(ea))
32)},[el,G,U,Z,Q,ea]),(0,p.useEffect)(()=>{let e="pricing"===a.get("intent"),t=a.get("buy"),s=a.get("plan");if(!e||"key"!==t)return;let n=`${s||"default"}:${t}`;if(P.current===n)return;P.current=n;let r=s&&iW[s.toLowerCase()]||"";r&&w(r),N(1),S(1),x(!0);let i=new URL(window.location.href);i.searchParams.delete("intent"),i.searchParams.delete("buy"),i.searchParams.delete("plan"),window.history.replaceState({},"",i.toString())},[a]);let eQ=(0,p.useMemo)(()=>{let t=[...e];if(G.trim()){let e=G.trim().toLowerCase();t=t.filter(t=>t.proxyKey.toLowerCase().includes(e))}return U&&"all"!==U&&(t=t.filter(e=>(e.keyType||sR.KEY_TYPE.NORMAL)===U)),"active"===Z?t=t.filter(e=>e.isActive&&(!e.expiredAt||new Date(e.expiredAt)>new Date)):"expired"===Z&&(t=t.filter(e=>!e.isActive||e.expiredAt&&new Date(e.expiredAt)<=new Date)),"newest"===Q?t.sort((e,t)=>new Date(t.createdAt||0).getTime()-new Date(e.createdAt||0).getTime()):"oldest"===Q?t.sort((e,t)=>new Date(e.createdAt||0).getTime()-new Date(t.createdAt||0).getTime()):"expiry"===Q&&t.sort((e,t)=>new Date(e.expiredAt||"9999").getTime()-new Date(t.expiredAt||"9999").getTime()),t},[e,G,U,Z,Q]);(0,p.useEffect)(()=>{er(1)},[G,U,Z,Q,ea]);let e0=Math.max(1,Math.ceil(eQ.length/ea)),e1=(0,p.useMemo)(()=>{let e=(en-1)*ea;return eQ.slice(e,e+ea)},[eQ,en,ea]),e5=e1.length>0&&e1.every(e=>et.has(e.proxyKey)),e2=e=>{navigator.clipboard.writeText(e),b.toast.success("Äã copy!")},e4=async()=>{E(!0);try{await (0,sR.buyKey)({keyType:v,quantity:j,duration:C}),b.toast.success("Mua key thà nh công!"),x(!1),N(1),S(1),await n()}catch(e){b.toast.error(e.message||"Lá»i mua key")}E(!1)},e6=async s=>{eF(!0);try{await (0,sR.updateKeyNote)(s,e$),t(e.map(e=>e.proxyKey===s?{...e,note:e$||void 0}:e)),eO(null),eH(""),b.toast.success("Äã cáºp nháºt ghi chú")}catch(e){b.toast.error(e.message||"Lá»i cáºp nháºt ghi chú")}eF(!1)},e3=async e=>{_(e),O(null),F(null),K(void 0),A(!0),Y(!0);try{let t=await (0,sR.getCurrentIP)(e);F(t)}catch{}if(Y(!1),0===I.length)try{let e=await (0,sR.getProvinces)();D(e)}catch{}},e8=async()=>{H(!0);try{let e=await (0,sR.getNewIP)(R,W);O(e),e&&e.proxy&&F(e);try{let e=await (0,sR.getKeyListV2)();t(e)}catch{}}catch(e){b.toast.error(e.message||"Lá»i lấy IP")}H(!1)},e7=async()=>{if(!confirm(`Cảnh b\xe1o: H\xe0nh Äá»ng n\xe0y sẽ l\xe0m mất key ho\xe0n to\xe0n v\xe0 kh\xf4ng thá» ho\xe0n t\xe1c! 33Bạn c\xf3 chắc chắn muá»n xo\xe1 ${et.size} key Ä\xe3 chá»n?`))return;let e=b.toast.loading(`Äang xo\xe1 ${et.size} key...`),s=0,n=0;for(let e of et)try{await (0,sR.removeKey)(e),s++}catch{n++}b.toast.dismiss(e),b.toast.success(`Ä\xe3 xo\xe1 ${s} key`+(n>0?`, ${n} lá»i`:"")),es(new Set),t(await (0,sR.getKeyListV2)())},e9=async()=>{if(eb(!0),ej([]),ev(void 0),0===I.length)try{let e=await (0,sR.getProvinces)();D(e)}catch{}},te=async()=>{ek(!0),ej([]),ej(await Promise.all(Array.from(et).map(async e=>{try{let t=await (0,sR.getNewIP)(e,ey);return{key:e,proxy:t.proxy}}catch{return{key:e,proxy:null}}})));try{let e=await (0,sR.getKeyListV2)();t(e)}catch{}ek(!1)},tt=(e.find(e=>e.proxyKey===eT)?.keyType||sR.KEY_TYPE.NORMAL)===sR.KEY_TYPE.VIP_1H,ts=async()=>{eA(!0);try{await (0,sR.renewKey)({proxyKey:eT,duration:eP}),b.toast.success(`Gia hạn th\xe0nh c\xf4ng ${eP} ${tt?"giá»":"ngà y"}!`),eS(!1);let e=await (0,sR.getKeyListV2)();t(e),r()}catch(e){b.toast.error(e.message||"Lá»i gia hạn")}eA(!1)},tn=async()=>{eK(!0);let e=b.toast.loading(`Äang gia hạn ${et.size} key...`),s=0,n=0;for(let e of et)try{await (0,sR.renewKey)({proxyKey:e,duration:eI}),s++}catch{n++}b.toast.dismiss(e),b.toast.success(`Gia hạn ${s} key th\xe0nh c\xf4ng`+(n>0?`, ${n} lá»i`:"")),eK(!1),e_(!1),es(new Set),t(await (0,sR.getKeyListV2)()),r()},tr=async()=>{em(!0);try{let e=await (0,sR.getDeletedKeys)();eh(e)}catch(e){b.toast.error(e.message||"Lá»i tải danh sách key Äã xoá")}em(!1)};(0,p.useEffect)(()=>{ec&&tr()},[ec]);let ta=async e=>{ef(e);try{await (0,sR.restoreKey)(e),b.toast.success("Khôi phục key thà nh công!"),await tr();let s=await (0,sR.getKeyListV2)();t(s),await r()}catch(e){b.toast.error(e.message||"Lá»i khôi phục key")}ef(null)},ti=[...new Set(h.map(e=>e.keyType))],tl=[...new Set([...h.filter(e=>e.keyType===v).map(e=>e.duration),...v===sR.KEY_TYPE.VIP_1H?[1,6,12,24]:[1,7,30]])].sort((e,t)=>
33e-t),to=h.find(e=>e.keyType===v&&e.duration===tl[0]),tc=to?Number(to.price)/to.duration:0,td=Math.round(tc*C)*j;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"space-y-4",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)("h2",{className:"text-xl font-bold text-foreground",children:"Proxy Key"}),(0,m.jsxs)(i_,{children:[(0,m.jsx)(iI,{asChild:!0,children:(0,m.jsx)("button",{className:"w-5 h-5 rounded-full flex items-center justify-center bg-muted text-muted-foreground cursor-help text-[11px] font-bold hover:bg-accent transition-colors",children:"?"})}),(0,m.jsx)(iD,{side:"bottom",className:"max-w-xs text-xs leading-relaxed",children:"Proxy Key là mã quản lý kết ná»i proxy. Má»i key cho phép bạn lấy IP má»i, Äá»i IP theo tá»nh/thà nh, và theo dõi lá»ch sá» sá» dụng."})]})]}),(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsxs)(nk,{variant:"secondary",onClick:()=>ed(!0),className:"bg-zinc-900 border-zinc-800 text-zinc-400 hover:text-white hover:bg-zinc-800",children:[(0,m.jsx)(np.Trash2,{className:"w-4 h-4"})," Key Äã xoá"]}),(0,m.jsxs)(nk,{onClick:()=>x(!0),children:[(0,m.jsx)(s4.Plus,{className:"w-4 h-4"})," Mua Key má»i"]})]})]}),eB>0&&(0,m.jsx)("div",{className:"p-4 rounded-lg border border-amber-500/40 bg-amber-500/10",children:(0,m.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3 sm:justify-between",children:[(0,m.jsxs)("div",{className:"space-y-1",children:[(0,m.jsxs)("p",{className:"font-semibold text-amber-500 flex items-center gap-2",children:[(0,m.jsx)(ny.ShieldAlert,{className:"w-4 h-4"}),"Bạn có ",eB," key cần thay má»i"]}),(0,m.jsxs)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:["Vì lý do bảo máºt, các key nà y cần ÄÆ°á»£c thay bằng key má»i."," ",(0,m.jsx)("span",{className:"text-foreground font-medium",children:"Thá»i hạn còn lại ÄÆ°á»£c giữ nguyên"}),", bạn không mất ngà y nà o. Sau khi thay, hãy cáºp nháºt key má»i và o công cụ Äang dùng."]})]}),(0,m.jsxs)(nk,{onClick:()=>eX(!0),className:"bg-amber-500 hover:bg-amber-600 text-black font-semibold shrink-0",children:[(0,m.jsx)(L.RefreshCw,{className:"w-4 h-4"})," Thay toà n bá» key cÅ©"]})]})}),(0,m.jsx)("div",{className:"p-3 sm:p-4 rounded-lg border bg-card",children:(0,m.jsxs)("div",{className:"space-y-2.5",children:[(0,m.jsxs)("div",{className:"relative",children:[(0,m.jsx)(nm.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,m.jsx)(nC,{type:"text",placeholder:"Tìm kiếm key...",value:G,onChange:e=>q(e.target.value),className:"pl-10"})]}),(0,m.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,m.jsxs)(a7,{value:U,onValueChange:X,children:[(0,m.jsx)(ie,{className:"w-full text-xs sm:text-sm",children:(0,m.jsx)(a9,{placeholder:"Loại key"})}),(0,m.jsxs)(it,{children:[(0,m.jsx)(is,{value:"all",children:"Tất cả"}),(0,m.jsx)(is,{value:sR.KEY_TYPE.NORMAL,children:"Thưá»ng"}),(0,m.jsx)(is,{value:sR.KEY_TYPE.VIP_1H,children:"VIP 1 Giá»"}),(0,m.jsx)(is,{value:sR.KEY_TYPE.VIP,children:"VIP"})]})]}),(0,m.jsxs)(a7,{value:Z,onValueChange:J,children:[(0,m.jsx)(ie,{className:"w-full text-xs sm:text-sm",children:(0,m.jsx)(a9,{placeholder:"Trạng thái"})}),(0,m.jsxs)(it,{children:[(0,m.jsx)(is,{value:"all",children:"Tất cả"}),(0,m.jsx)(is,{value:"active",children:"Còn hiá»u lá»±c"}),(0,m.jsx)(is,{value:"expired",children:"Hết hạn"})]})]}),(0,m.jsxs)(a7,{value:Q,onValueChange:ee,children:[(0,m.jsx)(ie,{className:"w-full text-xs sm:text-sm",children:(0,m.jsx)(a9,{placeholder:"Sắp xếp"})}),(0,m.jsxs)(it,{children:[(0,m.jsx)(is,{value:"newest",children:"Má»i nhất"}),(0,m.jsx)(is,{value:"oldest",children:"CÅ© nhất"}),(0,m.jsx)(is,{value:"expiry",children:"Hạn dùng"})]})]})]})]})}),et.size>0&&(0,m.jsxs)("div",{className:"p-3 rounded-lg bg-card border space-y-2.5",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between",children:[(0,m.jsxs)("span",{className:"text-sm text-primary font-semibold",children:["Äã chá»n ",et.size," key"]}),(0,m.jsxs)(nk,{variant:"destructive",size:"sm",className:"h-8 text-xs",onClick:e7,children:[(0,m.jsx)(np.Trash2,{className:"w-3 h-3"})," Xoá"]}
33)]}),(0,m.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-1.5",children:[(0,m.jsxs)(nk,{variant:"secondary",size:"sm",className:"h-8 text-xs",onClick:()=>{navigator.clipboard.writeText(Array.from(et).join("\n")),b.toast.success(`Ä\xe3 copy ${et.size} key!`)},children:[(0,m.jsx)(sV.Copy,{className:"w-3 h-3"})," Sao chép key"]}),(0,m.jsxs)(nk,{variant:"secondary",size:"sm",onClick:()=>{let t=e.filter(e=>et.has(e.proxyKey)&&e.currentProxy).map(e=>e.currentProxy);0===t.length?b.toast.error("Không có proxy nà o Äá» copy. Hãy lấy proxy trưá»c."):(navigator.clipboard.writeText(t.join("\n")),b.toast.success(`Ä\xe3 copy ${t.length} proxy!`))},className:"h-8 text-xs bg-emerald-950 text-emerald-400 hover:bg-emerald-900 border-0",children:[(0,m.jsx)(nu.Wifi,{className:"w-3 h-3"})," Copy proxy"]}),(0,m.jsxs)(nk,{variant:"secondary",size:"sm",onClick:e9,className:"h-8 text-xs bg-blue-950 text-cyan-400 hover:bg-blue-900 border-0",children:[(0,m.jsx)(L.RefreshCw,{className:"w-3 h-3"})," Lấy proxy"]}),(0,m.jsxs)(nk,{variant:"secondary",size:"sm",onClick:()=>{eD(1),e_(!0)},className:"h-8 text-xs bg-amber-950 text-amber-400 hover:bg-amber-900 border-0",children:[(0,m.jsx)(sG,{className:"w-3 h-3"})," Gia hạn"]})]})]}),s?(0,m.jsx)("div",{className:"space-y-4",children:[1,2,3].map(e=>(0,m.jsx)("div",{className:"p-4 md:p-6 rounded-lg border bg-card",children:(0,m.jsxs)("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-4",children:[(0,m.jsxs)("div",{className:"flex items-center gap-4 min-w-0 flex-1",children:[(0,m.jsx)(nV,{className:"w-5 h-5 rounded"}),(0,m.jsxs)("div",{className:"flex-1 space-y-3",children:[(0,m.jsx)(nV,{className:"h-4 w-3/4"}),(0,m.jsxs)("div",{className:"flex gap-2",children:[(0,m.jsx)(nV,{className:"h-5 w-16 rounded-full"}),(0,m.jsx)(nV,{className:"h-5 w-20 rounded-full"})]}),(0,m.jsxs)("div",{className:"flex gap-4",children:[(0,m.jsx)(nV,{className:"h-3 w-32"}),(0,m.jsx)(nV,{className:"h-3 w-36"})]})]})]}),(0,m.jsxs)("div",{className:"flex gap-2 ml-8 lg:ml-0",children:[(0,m.jsx)(nV,{className:"h-9 w-20 rounded-md"}),(0,m.jsx)(nV,{className:"h-9 w-20 rounded-md"})]})]})},e))}):0===e.length?(0,m.jsxs)("div",{className:"text-center py-16 px-6 max-w-md mx-auto",children:[(0,m.jsx)("div",{className:"w-16 h-16 mx-auto mb-5 rounded-2xl bg-amber-950 flex items-center justify-center",children:(0,m.jsx)(y.Key,{className:"w-8 h-8 text-amber-400"})}),(0,m.jsx)("h3",{className:"text-foreground text-lg font-bold mb-6",children:"Chưa có key nà o"}),(0,m.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,m.jsxs)(nk,{onClick:()=>x(!0),children:[(0,m.jsx)(s4.Plus,{className:"w-4 h-4"})," Mua Proxy Key ngay"]}),(0,m.jsxs)(i_,{children:[(0,m.jsx)(iI,{asChild:!0,children:(0,m.jsx)("span",{className:"text-[13px] text-amber-400 font-semibold underline underline-offset-4 decoration-amber-800 cursor-help hover:decoration-amber-400 transition-colors",children:"Proxy Key là gì?"})}),(0,m.jsx)(iD,{side:"bottom",className:"max-w-xs text-xs leading-relaxed",children:"Proxy Key là m
33ã quản lý kết ná»i proxy. Má»i key cho phép bạn lấy IP má»i, Äá»i IP theo tá»nh/thà nh, và theo dõi lá»ch sá» sá» dụng."})]})]})]}):0===eQ.length?(0,m.jsxs)("div",{className:"text-center py-12 text-muted-foreground",children:[(0,m.jsx)(nf,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),(0,m.jsx)("p",{className:"text-sm mb-4",children:"Không tìm thấy key phù hợp"}),(0,m.jsx)(nk,{variant:"secondary",size:"sm",onClick:()=>{q(""),X(""),J(""),ee("newest")},children:"Xóa bá» lá»c"})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"flex items-center justify-between gap-2 px-3 sm:px-4 py-2.5",children:[(0,m.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,m.jsx)(nH,{checked:e5,onCheckedChange:()=>{e5?es(e=>{let t=new Set(e);return e1.forEach(e=>t.delete(e.proxyKey)),t}):es(e=>{let t=new Set(e);return e1.forEach(e=>t.add(e.proxyKey)),t})}}),(0,m.jsxs)("span",{className:"text-xs text-muted-foreground font-medium whitespace-nowrap",children:[en,"/",e0," · ",eQ.length," key"]}),eQ.length>e1.length&&et.size<eQ.length&&(0,m.jsx)("button",{onClick:()=>{es(new Set(eQ.map(e=>e.proxyKey)))},className:"text-[11px] text-primary hover:underline font-medium whitespace-nowrap hidden sm:inline",children:"Chá»n tất cả"})]}),(0,m.jsxs)("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[(0,m.jsxs)(a7,{value:String(ea),onValueChange:e=>ei(Number(e)),children:[(0,m.jsx)(ie,{className:"w-[60px] h-7 text-xs",children:(0,m.jsx)(a9,{})}),(0,m.jsx)(it,{children:s1.map(e=>(0,m.jsx)(is,{value:String(e),children:e},e))})]}),(0,m.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"/trang"})]})]}),e1.map(e=>{let t=e.isActive&&(!e.expiredAt||new Date(e.expiredAt)>new Date),s=et.has(e.proxyKey);return(0,m.jsx)("div",{className:`p-3 sm:p-4 md:p-5 rounded-lg border transition-all ${t?s?"bg-card border-primary":"bg-card border-border":"bg-card border-border opacity-60"}`,children:(0,m.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,m.jsx)(nH,{className:"mt-1 flex-shrink-0",checked:s,onCheckedChange:()=>{var t;return t=e.proxyKey,void es(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})}}),(0,m.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,m.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,m.jsx)("span",{className:"text-foreground text-xs sm:text-sm break-all font-semibold leading-tight",style:{fontFamily:"'JetBrains Mono', monospace"},children:e.proxyKey}),(0,m.jsx)("button",{onClick:()=>{var t;return t=e.proxyKey,void(navigator.clipboard.writeText(t),b.toast.success("Äã copy key!"))},className:"flex-shrink-0 p-1 rounded hover:bg-accent transition-colors",title:"Copy key",children:(0,m.jsx)(sV.Copy,{className:"w-3.5 h-3.5 text-muted-foreground hover:text-primary"})})]}),(0,m.jsxs)("div",{className:"flex items-center gap-1.5 mt-2",children:[(0,m.jsx)(nT,{variant:"secondary",children:sR.KEY_TYPE_LABELS[e.keyType||""]||e.keyType||sR.KEY_TYPE.NORMAL}),(0,m.jsx)(nT,{variant:t?"default":"destructive",children:t?"Còn hiá»u lá»±c":"Hết hạn"})]}),(0,m.jsxs)("div",{className:"flex items-center gap-3 mt-2 text-xs text-muted-foreground flex-wrap",children:[e.createdAt&&(0,m.jsxs)("span",{className:"flex items-center gap-1",children:[(0,m.jsx)(sJ.Clock,{className:"w-3.5 h-3.5"})," ",new Date(e.createdAt).toLocaleString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"})]}),e.expiredAt&&(0,m.jsxs)("span",{className:"flex items-center gap-1",children:[(0,m.jsx)(nh,{className:"w-3.5 h-3.5"})," Hạn: ",new Date(e.expiredAt).toLocaleString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"})]})]}),(0,m.jsx)("div",{className:"mt-2",children:ez===e.proxyKey?(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)(nC,{type:"text",value:e$,onChange:e=>eH(e.target.value),placeholder:"Nháºp ghi chú...",className:"flex-1 h-8 text-xs",autoFocus:!0,onKeyDown:t=>{"Enter"===t.key&&e6(e.proxyKey),"Escape"===t.key&&(eO(null),eH(""))}}),(0,m.jsx)(nk,{size:"sm",variant:"secondary",onClick:()=>e6(e.proxyKey),disabled:eV,className:"bg-emerald-950 text-emerald-400 hover:bg-emerald-900 border-0 h-8 text-xs px-3",children:eV?(0,m.jsx)(k.Loader2,{className:"w-3 h-3 animate-spin"}):"Lưu"}),(0,m.jsx)(nk,{size:"sm",variant:"secondary",onClick:()=>{eO(null),eH("")},className:"h-8 text-xs px-3",children:"Huá»·"})]}):(0,m.jsxs)("div",{className:"flex items-center gap-1.5 group/note",children:[e.note?(0,m.jsxs)("span",{className:"text-xs text-muted-foreground italic",children:["ð ",e.note]}
33):(0,m.jsx)("span",{className:"text-xs text-muted-foreground/50 italic group-hover/note:text-muted-foreground transition-colors",children:"+ Thêm ghi chú"}),(0,m.jsx)("button",{onClick:()=>{eO(e.proxyKey),eH(e.note||"")},className:"p-1 rounded hover:bg-accent transition-colors opacity-50 group-hover/note:opacity-100",title:"Sá»a ghi chú",children:(0,m.jsx)(ng.Pencil,{className:"w-3 h-3 text-muted-foreground hover:text-primary"})})]})}),(0,m.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 mt-3 pt-3 border-t border-white/5",children:[e.currentProxy&&(0,m.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md bg-emerald-950 border border-emerald-800",children:[(0,m.jsx)("span",{className:"text-emerald-400 text-xs sm:text-sm font-semibold",style:{fontFamily:"'JetBrains Mono', monospace"},children:e.currentProxy}),e.currentProvince&&(0,m.jsxs)("span",{className:"text-[11px] text-muted-foreground flex items-center gap-0.5",children:[(0,m.jsx)(s7.MapPin,{className:"w-3 h-3"}),e.currentProvince]}),(0,m.jsx)("button",{onClick:()=>e2(e.currentProxy),className:"p-0.5 text-emerald-400 hover:text-emerald-300",children:(0,m.jsx)(sV.Copy,{className:"w-3.5 h-3.5"})})]}),(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsxs)(nk,{size:"sm",variant:"secondary",onClick:()=>{eE(e.proxyKey),eL(1),eS(!0)},className:"h-8 text-xs bg-amber-950 text-amber-400 hover:bg-amber-900 border-0",children:[(0,m.jsx)(sG,{className:"w-3.5 h-3.5"})," Gia hạn"]}),t&&(0,m.jsxs)(nk,{size:"sm",variant:"secondary",onClick:()=>e3(e.proxyKey),className:"h-8 text-xs bg-blue-950 text-cyan-400 hover:bg-blue-900 border-0",children:[(0,m.jsx)(L.RefreshCw,{className:"w-3.5 h-3.5"})," Lấy IP"]})]})]})]})]})},e.id)}),e0>1&&(0,m.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 px-4 py-4 mt-2 rounded-lg bg-card border",children:[(0,m.jsxs)("span",{className:"text-xs text-muted-foreground",children:["Hiá»n thá» ",(en-1)*ea+1,"â",Math.min(en*ea,eQ.length)," / ",eQ.length]}),(0,m.jsxs)("div",{className:"flex items-center gap-1",children:[(0,m.jsx)(nk,{variant:"ghost",size:"sm",onClick:()=>er(1),disabled:1===en,children:"Äầu"}),(0,m.jsx)(nk,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>er(e=>Math.max(1,e-1)),disabled:1===en,children:(0,m.jsx)(s6.ChevronLeft,{className:"w-4 h-4"})}),(()=>{let e=[],t=Math.max(1,en-Math.floor(2.5)),s=Math.min(e0,t+5-1);s-t+1<5&&(t=Math.max(1,s-5+1)),t>1&&(e.push(1),t>2&&e.push("..."));for(let n=t;n<=s;n++)e.push(n);return s<e0&&(s<e0-1&&e.push("..."),e.push(e0)),e.map((e,t)=>"string"==typeof e?(0,m.jsx)("span",{className:"px-1 text-xs text-muted-foreground",children:"â¦"},`ellipsis-${t}`):(0,m.jsx)(nk,{variant:en===e?"default":"ghost",size:"sm",className:"min-w-[32px] ",onClick:()=>er(e),children:e},e))})(),(0,m.jsx)(nk,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>er(e=>Math.min(e0,e+1)),disabled:en===e0,children:(0,m.jsx)(s3.ChevronRight,{className:"w-4 h-4"})}),(0,m.jsx)(nk,{variant:"ghost",size:"sm",onClick:()=>er(e0),disabled:en===e0,children:"Cuá»i"})]})]})]})]}),(0,m.jsx)(sj,{open:d,onOpenChange:x,children:(0,m.jsxs)(sC,{className:"sm:!max-w-md p-0 gap-0 overflow-hidden border-white/10",style:{background:"#18181b"},children:[(0,m.jsx)("div",{className:"px-4 sm:px-6 pt-5 sm:pt-7 pb-4 sm:pb-5",children:(0,m.jsx)(sS,{className:"space-y-1.5",children:(0,m.jsx)(sE,{className:"text-2xl font-bold tracking-tight",children:"Mua key má»i"})})}),(0,m.jsxs)("div",{className:"px-4 sm:px-6 pb-5 sm:pb-6 space-y-4 sm:space-y-5",children:[(0,m.jsx)("div",{className:"flex rounded-xl bg-white/5 p-1.5 gap-1",children:ti.map(e=>(0,m.jsx)("button",{onClick:()=>w(e),className:`flex-1 px-4 py-2.5 rounded-lg text-[15px] font-semibold transition-all ${v===e?"bg-white/10 text-white shadow-sm":"text-white/40 hover:text-white/70"}`,children:sR.KEY_TYPE_LABELS[e]||e},e))}),(0,m.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:"block text-xs text-white/40 mb-2 uppercase tracking-widest font-medium",children:"Sá» lượng"}),(0,m.jsx)(nC,{type:"number",className:"h-12 text-lg font-bold text-center bg-white/5 border-white/10 text-white",value:j,onChange:e=>N(Math.max(1,parseInt(e.target.value)||1)),min:1})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:"block text-xs text-white/40 mb-2 uppercase tracking-widest font-medium",children:v===sR.KEY_TYPE.VIP_1H?"Sá» giá»":"Sá» ngà y"}),(0,m.jsx)(nC,{type:"number",className:"h-12 text-lg font-bold text-center bg-white/5 border-white/10 text-white",value:C,onChange:e=>S(Math.max(1,parseInt(e.target.value)||1)),min:1})]})]}),(0,m.jsx)("div",{className:"flex flex-wrap gap-2",children:tl.map(e=>{let t=v===sR.KEY_TYPE.VIP_1H?`${e} Giá»`:1===e?"1 Ngà y":7===e?"1 Tuần":30===e?"1 Tháng":90===e?"3 Tháng":365===e?"1 NÄm":`${e} Ng\xe0y`;return(0,m.jsx)("button",{type:"button",onClick:()=>S(e),className:`px-4 py-2.5 rounded-lg text-[14px] font-semibold transition-all ${C===e?"bg-primary text-primary-foreground shadow-md":"bg-white/5 text-white/50 hover:text-white hover:bg-white/10"}`,children:t},e)})}),(0,m.jsxs)("div",{className:"rounded-xl bg-white/5 border border-white/10 px-5 py-1",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between py-3.5",children:[(0,m.jsx)("span",{className:"text-[15px] text-white/50",children:"Sá» lượng key"}),(0,m.jsxs)("span",{className:"text-[15px] font-bold text-white",children:[j," key"]})]}),(0,m.jsx)("div",{className:"border-t border-dashed border-white/10"}),(0,m.jsxs)("div",{className:"flex items-center justify-between py-3.5",children:[(0,m.jsx)("span",{className:"text-[15px] text-white/50",children:"Thá»i hạn"}),(0,m.jsxs)("span",{className:"text-[15px] font-bold text-white",children:[C," ",v===sR.KEY_TYPE.VIP_1H?"giá»":"ngà y"]})]}),(0,m.jsx)("div",{className:"border-t border-dashed border-white/10"}),(0,m.jsxs)("div",{className:"flex items-center justify-between py-3.5",children:[(0,m.jsx)("span",{className:"text-[15px] text-white/50",children:"ÄÆ¡n giá"}),(0,m.jsx)("span",{className:"text-[15px] font-bold text-primary",children:tc>
330?`${Math.round(tc).toLocaleString("vi-VN")}Ä/${v===sR.KEY_TYPE.VIP_1H?"giá»":"ngà y"}`:"â"})]}),(0,m.jsx)("div",{className:"border-t border-dashed border-white/10"}),(0,m.jsxs)("div",{className:"flex items-center justify-between py-3.5",children:[(0,m.jsx)("span",{className:"text-[15px] text-white/50",children:"Tá»ng thanh toán"}),(0,m.jsx)("span",{className:"text-xl font-bold text-primary",children:td>0?`${td.toLocaleString("vi-VN")}Ä`:"â"})]}),td>o&&td>0&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"border-t border-dashed border-white/10"}),(0,m.jsxs)("div",{className:"flex items-center justify-between py-3.5",children:[(0,m.jsx)("span",{className:"text-[15px] text-white/50",children:"Sá» dư hiá»n tại"}),(0,m.jsxs)("span",{className:"text-[15px] font-bold text-destructive",children:[c,"Ä"]})]})]})]})]}),(0,m.jsxs)("div",{className:"px-4 sm:px-6 pb-5 sm:pb-6 flex flex-col gap-2.5",children:[(0,m.jsxs)(nk,{className:"w-full h-12 text-[16px] font-bold rounded-xl",onClick:e4,disabled:T||0===td,children:[T&&(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"})," Xác nháºn mua"]}),(0,m.jsx)(nk,{variant:"ghost",className:"w-full h-10 text-[14px] text-white/40 hover:text-white/70",onClick:()=>x(!1),children:"Huá»· bá»"})]})]})}),(0,m.jsx)(sj,{open:M,onOpenChange:A,children:(0,m.jsxs)(sC,{className:"sm:!max-w-md p-0 gap-0 border-white/10",style:{background:"#18181b"},children:[(0,m.jsx)("div",{className:"px-4 sm:px-6 pt-5 sm:pt-7 pb-4 sm:pb-5",children:(0,m.jsxs)(sS,{className:"space-y-1.5",children:[(0,m.jsx)(sE,{className:"text-2xl font-bold tracking-tight",children:"Lấy Proxy IP"}),(0,m.jsx)(sP,{className:"text-[15px] text-white/50",children:"Chá»n tá»nh và lấy IP má»i cho key"})]})}),(0,m.jsxs)("div",{className:"px-4 sm:px-6 pb-5 sm:pb-6 space-y-4 sm:space-y-5",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:"block text-xs text-white/40 mb-2 uppercase tracking-widest font-medium",children:"Key"}),(0,m.jsxs)("div",{className:"px-4 py-3 rounded-lg bg-white/5 border border-white/10 text-primary text-sm font-mono",children:[R.substring(0,12),"..."]})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:"block text-xs text-white/40 mb-2 uppercase tracking-widest font-medium",children:"Chá»n tá»nh"}),(0,m.jsxs)(a7,{value:String(W??""),onValueChange:e=>K(e?Number(e):void 0),children:[(0,m.jsx)(ie,{className:"w-full h-12 bg-white/5 border-white/10 text-white",children:(0,m.jsx)(a9,{placeholder:"Tất cả (ngẫu nhiên)"})}),(0,m.jsxs)(it,{children:[(0,m.jsx)(is,{value:"random",children:"Tất cả (ngẫu nhiên)"}),I.filter(e=>e.isActive).map(e=>(0,m.jsx)(is,{value:String(e.id),children:e.name},e.id))]})]})]}),(0,m.jsxs)("div",{className:"rounded-xl bg-white/5 border border-white/10 px-5 py-4",children:[(0,m.jsx)("div",{className:"text-xs text-white/40 mb-2 uppercase tracking-widest font-medium",children:"IP hiá»n tại"}),B?(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin text-primary"}),(0,m.jsx)("span",{className:"text-sm text-white/50",children:"Äang tải..."})]}):V&&V.proxy?(0,m.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,m.jsx)("span",{className:"text-[15px] text-amber-400 font-mono font-bold",children:V.proxy}),(0,m.jsxs)(nk,{size:"sm",variant:"secondary",onClick:()=>e2(V.proxy),className:"bg-amber-950 text-amber-400 hover:bg-amber-900 border-0",children:[(0,m.jsx)(sV.Copy,{className:"w-3 h-3"})," Copy"]})]}):(0,m.jsx)("span",{className:"text-sm text-white/50",children:"Chưa có IP"})]})]}),(0,m.jsxs)("div",{className:"px-4 sm:px-6 pb-5 sm:pb-6 flex flex-col gap-2.5",children:[(0,m.jsxs)(nk,{className:"w-full h-12 text-[16px] font-bold rounded-xl",onClick:e8,disabled:$,children:[$?(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"}):(0,m.jsx)(L.RefreshCw,{className:"w-4 h-4"}),"Lấy IP"]}),z&&z.proxy&&(0,m.jsxs)("div",{className:"p-4 rounded-xl border border-emerald-800 bg-emerald-950",children:[(0,m.jsx)("div",{className:"text-xs text-white/40 mb-2 uppercase tracking-widest font-medium",children:"Kết quả"}),(0,m.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("div",{className:"text-lg text-emerald-400 font-mono font-bold",children:z.proxy}
33),z.province&&(0,m.jsxs)("div",{className:"text-xs text-white/50 mt-1 flex items-center gap-1",children:[(0,m.jsx)(nb.Activity,{className:"w-3 h-3"})," ",z.province]})]}),(0,m.jsxs)(nk,{size:"sm",variant:"secondary",onClick:()=>e2(z.proxy),className:"bg-emerald-950 text-emerald-400 hover:bg-emerald-900 border-0",children:[(0,m.jsx)(sV.Copy,{className:"w-4 h-4"})," Copy"]})]})]}),z&&!z.proxy&&(0,m.jsx)("div",{className:"p-4 rounded-xl border border-destructive bg-white/5 text-center",children:(0,m.jsx)("p",{className:"text-destructive text-[15px] font-medium",children:"Không tìm thấy proxy khả dụng"})})]})]})}),(0,m.jsx)(sj,{open:eg,onOpenChange:eb,children:(0,m.jsxs)(sC,{className:"sm:!max-w-lg p-0 gap-0 border-white/10",style:{background:"#18181b"},children:[(0,m.jsx)("div",{className:"px-4 sm:px-6 pt-5 sm:pt-7 pb-4 sm:pb-5",children:(0,m.jsxs)(sS,{className:"space-y-1.5",children:[(0,m.jsx)(sE,{className:"text-2xl font-bold tracking-tight",children:"Lấy Proxy hà ng loạt"}),(0,m.jsxs)(sP,{className:"text-[15px] text-white/50",children:["Äã chá»n ",et.size," key"]})]})}),(0,m.jsxs)("div",{className:"px-4 sm:px-6 pb-5 sm:pb-6 space-y-4 sm:space-y-5",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:"block text-xs text-white/40 mb-2 uppercase tracking-widest font-medium",children:"Chá»n tá»nh"}),(0,m.jsxs)(a7,{value:String(ey??""),onValueChange:e=>ev(e&&"random"!==e?Number(e):void 0),children:[(0,m.jsx)(ie,{className:"w-full h-12 bg-white/5 border-white/10 text-white",children:(0,m.jsx)(a9,{placeholder:"Tất cả (ngẫu nhiên)"})}),(0,m.jsxs)(it,{children:[(0,m.jsx)(is,{value:"random",children:"Tất cả (ngẫu nhiên)"}),I.filter(e=>e.isActive).map(e=>(0,m.jsx)(is,{value:String(e.id),children:e.name},e.id))]})]})]}),(0,m.jsxs)(nk,{className:"w-full h-12 text-[16px] font-bold rounded-xl",onClick:te,disabled:eN,children:[eN?(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"}):(0,m.jsx)(L.RefreshCw,{className:"w-4 h-4"}),"Lấy proxy"]}),ew.length>0&&(0,m.jsxs)("div",{className:"space-y-3 max-h-[40vh] overflow-y-auto",children:[(0,m.jsxs)("div",{className:"flex items-center justify-between",children:[(0,m.jsx)("span",{className:"text-[15px] text-white/50 font-medium",children:"Kết quả"}),(0,m.jsxs)(nk,{size:"sm",variant:"secondary",onClick:()=>{let e=ew.filter(e=>e.proxy).map(e=>e.proxy);navigator.clipboard.writeText(e.join("\n")),b.toast.success(`Ä\xe3 copy ${e.length} proxy!`)},className:"bg-emerald-950 text-emerald-400 hover:bg-emerald-900 border-0",children:[(0,m.jsx)(sV.Copy,{className:"w-4 h-4"})," Copy All"]})]}),(0,m.jsx)("div",{className:"rounded-xl bg-white/5 border border-white/10 overflow-hidden",children:ew.map((e,t)=>(0,m.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-white/10 last:border-b-0",children:[(0,m.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,m.jsxs)("div",{className:"text-xs text-white/40 truncate font-mono",children:[e.key.substring(0,16),"..."]}),e.proxy?(0,m.jsx)("div",{className:"text-sm text-emerald-400 mt-0.5 font-mono font-semibold",children:e.proxy}):(0,m.jsx)("div",{className:"text-sm text-destructive mt-0.5",children:"Lá»i"})]}),e.proxy&&(0,m.jsx)(nk,{size:"icon",variant:"ghost",className:"h-8 w-8 ml-2 text-white/40 hover:text-white",onClick:()=>e2(e.proxy),children:(0,m.jsx)(sV.Copy,{className:"w-3.5 h-3.5"})})]},t))})]})]})]})}),(0,m.jsx)(sj,{open:eC,onOpenChange:eS,children:(0,m.jsxs)(sC,{className:"sm:!max-w-md p-0 gap-0 overflow-hidden border-white/10",style:{background:"#18181b"},children:[(0,m.jsx)("div",{className:"px-4 sm:px-6 pt-5 sm:pt-7 pb-4 sm:pb-5",children:(0,m.jsxs)(sS,{className:"space-y-1.5",children:[(0,m.jsx)(sE,{className:"text-2xl font-bold tracking-tight",children:"Gia hạn Key"}),(0,m.jsx)(sP,{className:"text-[15px] text-white/50",children:"Gia hạn thá»i gian sá» dụng cho key"})]})}),(0,m.jsxs)("div",{className:"px-4 sm:px-6 pb-5 sm:pb-6 space-y-4 sm:space-y-5",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:"block text-xs text-white/40 mb-2 uppercase tracking-widest font-medium",children:"Key"}),(0,m.jsx)("div",{className:"px-4 py-3 rounded-lg bg-white/5 border border-white/10 text-primary text-xs break-all font-mono",children:eT})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:"block text-xs text-white/40 mb-2 uppercase tracking-widest font-medium",children:tt?"Sá» giá» gia hạn":"Sá» ngà y gia hạn"}),(0,m.jsx)(nC,{type:"number",className:"h-12 text-lg font-bold text-center bg-white/5 border-white/10 text-white",value:eP,onChange:e=>eL(Math.max(1,parseInt(e.target.value)||1)),min:1}),(0,m.jsx)("div",{className:"flex flex-wrap gap-2 mt-3",children:(tt?[1,2,3,6,12]:[1,7,30,90,365]).map(e=>{let t=tt?`${e} Giá»`:1===e?"1 Ngà y":7===e?"1 Tuần":30===e?"1 Tháng":90===e?"3 Tháng":"1 NÄm";return(0,m.jsx)("button",{type:"button",onClick:()=>eL(e),className:`px-4 py-2.5 rounded-lg text-[14px] font-semibold transition-all ${eP===e?"bg-primary text-primary-foreground shadow-md":"bg-white/5 text-white/50 hover:text-white hover:bg-white/10"}`,children:t},e)})})]})]}),(0,m.jsxs)("div",{className:"px-4 sm:px-6 pb-5 sm:pb-6 flex flex-col gap-2.5",children:[(0,m.jsxs)(nk,{className:"w-full h-12 text-[16px] font-bold rounded-xl bg-amber-600 hover:bg-amber-700",onClick:ts,disabled:eM,children:[eM&&(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"})," Gia hạn"]}),(0,m.jsx)(nk,{variant:"ghost",className:"w-full h-10 text-[14px] text-white/40 hover:text-white/70",onClick:()=>eS(!1),children:"Huá»· bá»"})]})]})}),(0,m.jsx)(sj,{open:eR,onOpenChange:e_,children:(0,m.jsxs)(sC,{className:"sm:!max-w-md p-0 gap-0 overflow-hidden border-white/10",style:{background:"#18181b"},children:[(0,m.jsx)("div",{className:"px-4 sm:px-6 pt-5 sm:pt-7 pb-4 sm:pb-5",children:(0,m.jsxs)(sS,{className:"space-y-1.5",children:[(0,m.jsx)(sE,{className:"text-2xl font-bold tracking-tight",children:"Gia hạn hà ng loạt"}),(0,m.jsxs)(sP,{className:"text-[15px] text-white/50",children:["Äã chá»n ",et.size," key"]})]})}),(0,m.jsx)("div",{className:"px-4 sm:px-6 pb-5 sm:pb-6 space-y-4 sm:sp
33ace-y-5",children:(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:"block text-xs text-white/40 mb-2 uppercase tracking-widest font-medium",children:"Sá» ngà y/giá» gia hạn"}),(0,m.jsx)(nC,{type:"number",className:"h-12 text-lg font-bold text-center bg-white/5 border-white/10 text-white",value:eI,onChange:e=>eD(Math.max(1,parseInt(e.target.value)||1)),min:1}),(0,m.jsx)("div",{className:"flex flex-wrap gap-2 mt-3",children:[1,7,30,90,365].map(e=>{let t=1===e?"1 Ngà y":7===e?"1 Tuần":30===e?"1 Tháng":90===e?"3 Tháng":"1 NÄm";return(0,m.jsx)("button",{type:"button",onClick:()=>eD(e),className:`px-4 py-2.5 rounded-lg text-[14px] font-semibold transition-all ${eI===e?"bg-primary text-primary-foreground shadow-md":"bg-white/5 text-white/50 hover:text-white hover:bg-white/10"}`,children:t},e)})})]})}),(0,m.jsxs)("div",{className:"px-4 sm:px-6 pb-5 sm:pb-6 flex flex-col gap-2.5",children:[(0,m.jsxs)(nk,{className:"w-full h-12 text-[16px] font-bold rounded-xl bg-amber-600 hover:bg-amber-700",onClick:tn,disabled:eW,children:[eW&&(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"})," Gia hạn ",et.size," key"]}),(0,m.jsx)(nk,{variant:"ghost",className:"w-full h-10 text-[14px] text-white/40 hover:text-white/70",onClick:()=>e_(!1),children:"Huá»· bá»"})]})]})}),(0,m.jsx)(sj,{open:eU,onOpenChange:e=>!eG&&eX(e),children:(0,m.jsxs)(sC,{className:"sm:!max-w-lg p-0 gap-0 overflow-hidden border-white/10",style:{background:"#18181b"},children:[(0,m.jsx)("div",{className:"px-4 sm:px-6 pt-5 sm:pt-7 pb-4 sm:pb-5",children:(0,m.jsxs)(sS,{className:"space-y-1.5",children:[(0,m.jsxs)(sE,{className:"text-2xl font-bold tracking-tight",children:["Thay ",eB," key cÅ©"]}),(0,m.jsx)(sP,{className:"text-[15px] text-white/50",children:"Má»i key cÅ© sẽ ÄÆ°á»£c thay bằng má»t key má»i, giữ nguyên thá»i hạn còn lại"})]})}),(0,m.jsxs)("div",{className:"px-4 sm:px-6 pb-4 space-y-3",children:[(0,m.jsxs)("div",{className:"p-3 rounded-lg border border-amber-500/40 bg-amber-500/10",children:[(0,m.jsx)("p",{className:"text-sm text-amber-500 font-semibold mb-1",children:"Key cÅ© sẽ ngừng hoạt Äá»ng ngay láºp tức"}),(0,m.jsx)("p",{className:"text-sm text-white/60 leading-relaxed",children:"Công cụ nà o Äang dùng key cÅ© sẽ báo lá»i cho tá»i khi bạn dán key má»i và o. Nếu Äang chạy viá»c gấp, hãy thay và o lúc thuáºn tiá»n hÆ¡n."})]}),(0,m.jsxs)("ul",{className:"text-sm text-white/60 space-y-1.5 list-disc pl-5",children:[(0,m.jsx)("li",{children:"Thá»i hạn còn lại chuyá»n nguyên vẹn sang key má»i, bạn không mất ngà y nà o."}),(0,m.jsx)("li",{children:"Không mất phÃ."}),(0,m.jsx)("li",{children:"Key cÅ© vẫn hiá»n thá» trong danh sách á» trạng thái hết hạn Äá» bạn Äá»i chiếu."})]})]}),(0,m.jsxs)(sT,{className:"px-4 sm:px-6 pb-6 gap-2",children:[(0,m.jsx)(nk,{variant:"secondary",onClick:()=>eX(!1),disabled:eG,children:"Äá» sau"}),(0,m.jsx)(nk,{onClick:eJ,disabled:eG,className:"bg-amber-500 hover:bg-amber-600 text-black font-semibold",children:eG?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"})," Äang thay..."]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(L.RefreshCw,{className:"w-4 h-4"})," Thay ngay"]})})]})]})}),(0,m.jsx)(sj,{open:ec,onOpenChange:ed,children:(0,m.jsxs)(sC,{className:"sm:!max-w-xl p-0 gap-0 overflow-hidden border-white/10",style:{background:"#18181b"},children:[(0,m.jsx)("div",{className:"px-4 sm:px-6 pt-5 sm:pt-7 pb-4 sm:pb-5",children:(0,m.jsxs)(sS,{className:"space-y-1.5",children:[(0,m.jsx)(sE,{className:"text-2xl font-bold tracking-tight",children:"Quản lý Key Äã xoá"}),(0,m.jsx)(sP,{className:"text-[15px] text-white/50",children:"Xem lại và khôi phục các key Äã xoá cá»§a bạn"})]})}),(0,m.jsx)("div",{className:"px-4 sm:px-6 pb-6 space-y-4 max-h-[60vh] overflow-y-auto",children:eu?(0,m.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-3",children:[(0,m.jsx)(k.Loader2,{className:"w-8 h-8 animate-spin text-primary"}),(0,m.jsx)("span",{className:"text-sm text-white/50",children:"Äang tải danh sách..."})]}):0===ex.length?(0,m.jsxs)("div",{className:"text-center py-12 text-white/40",children:[(0,m.jsx)(np.Trash2,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),(0,m.jsx)("p",{className:"text-sm",children:"Không có key nà o Äã xoá"})]}):(0,m.jsx)("div",{className:"space-y-3",children:ex.map(e=>(0,m.jsxs)("div",{className:"p-4 rounded-xl bg-white/5 border border-white/10 flex flex-col md:flex-row md:items-center justify-between gap-3",children:[(0,m.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,m.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,m.jsx)("span",{className:"text-white text-xs sm:text-sm font-mono font-semibold break-all",children:e.proxyKey}),(0,m.jsx)("button",{onClick:()=>e2(e.proxyKey),className:"flex-shrink-0 p-1 rounded hover:bg-white/10 transition-colors",title:"Copy key",children:(0,m.jsx)(sV.Copy,{className:"w-3.5 h-3.5 text-white/50 hover:text-primary"})})]}),(0,m.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs",children:[(0,m.jsx)(nT,{variant:"secondary",className:"bg-white/10 text-white/80 border-0",children:sR.KEY_TYPE_LABELS[e.keyType||""]||e.keyType||sR.KEY_TYPE.NORMAL}),e.deletedAt&&(0,m.jsxs)("span",{className:"text-white/40 flex items-center gap-1",children:[(0,m.jsx)(sJ.Clock,{className:"w-3.5 h-3.5"}
33)," Xoá lúc: ",new Date(e.deletedAt).toLocaleString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh"})]})]}),e.note&&(0,m.jsxs)("p",{className:"text-xs text-white/50 italic",children:["ð ",e.note]})]}),(0,m.jsxs)(nk,{size:"sm",onClick:()=>ta(e.proxyKey),disabled:ep===e.proxyKey,className:"bg-emerald-600 hover:bg-emerald-700 text-white font-semibold flex-shrink-0 h-9 gap-1",children:[ep===e.proxyKey?(0,m.jsx)(k.Loader2,{className:"w-3.5 h-3.5 animate-spin"}):(0,m.jsx)(sG,{className:"w-3.5 h-3.5"}),"Khôi phục"]})]},e.id))})}),(0,m.jsx)("div",{className:"px-4 sm:px-6 pb-5 sm:pb-6",children:(0,m.jsx)(nk,{variant:"ghost",className:"w-full h-11 text-[14px] text-white/40 hover:text-white/70",onClick:()=>ed(!1),children:"Äóng"})})]})})]})}function iz({open:e,legacyCount:t,onDone:s}){let[n,r]=(0,p.useState)(!1),[a,i]=(0,p.useState)(null),[l,o]=(0,p.useState)(null),c=async()=>{r(!0);try{let e=await (0,sR.reissueLegacyKeys)();i(e),b.toast.success(e.message)}catch(e){b.toast.error(e.message||"Thay key thất bại, vui lòng thá» lại")}r(!1)};return(0,m.jsx)(sj,{open:e,children:(0,m.jsx)(sC,{hideClose:!0,onInteractOutside:e=>e.preventDefault(),onEscapeKeyDown:e=>e.preventDefault(),onPointerDownOutside:e=>e.preventDefault(),className:"sm:!max-w-xl p-0 gap-0 overflow-hidden border-white/10",style:{background:"#18181b"},children:a?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"px-4 sm:px-6 pt-6 pb-4",children:(0,m.jsxs)(sS,{className:"space-y-2",children:[(0,m.jsx)("div",{className:"w-12 h-12 rounded-full bg-emerald-500/15 flex items-center justify-center mb-1",children:(0,m.jsx)(sz.Check,{className:"w-6 h-6 text-emerald-400"})}),(0,m.jsxs)(sE,{className:"text-2xl font-bold tracking-tight",children:["Äã thay ",a.reissued," key"]}),(0,m.jsx)(sP,{className:"text-[15px] text-white/50 leading-relaxed",children:"Copy key má»i và cáºp nháºt và o công cụ cá»§a bạn. Danh sách nà y luôn xem lại ÄÆ°á»£c á» mục Proxy Key."})]})}),(0,m.jsx)("div",{className:"px-4 sm:px-6 pb-4 space-y-2 max-h-[45vh] overflow-y-auto",children:a.keys.map(e=>(0,m.jsx)("div",{className:"p-3 rounded-lg border border-white/10 bg-white/5",children:(0,m.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,m.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,m.jsx)("p",{className:"text-xs text-white/40 line-through truncate",children:e.oldKey}),(0,m.jsx)("p",{className:"text-sm text-white font-mono truncate",children:e.newKey})]}),(0,m.jsx)(nk,{size:"sm",variant:"secondary",onClick:()=>{var t;return t=e.newKey,void navigator.clipboard.writeText(t).then(()=>{o(t),b.toast.success("Äã copy key má»i"),setTimeout(()=>o(null),2e3)}).catch(()=>b.toast.error("Không copy ÄÆ°á»£c, vui lòng bôi Äen và copy thá»§ công"))},className:"shrink-0",children:l===e.newKey?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(sz.Check,{className:"w-3.5 h-3.5 text-emerald-400"})," Äã copy"]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(sV.Copy,{className:"w-3.5 h-3.5"})," Copy"]})})]})},e.newKey))}),(0,m.jsx)("div",{className:"px-4 sm:px-6 pb-6",children:(0,m.jsx)(nk,{onClick:s,className:"w-full h-11 font-semibold",children:"Tôi Äã cáºp nháºt xong"})})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"px-4 sm:px-6 pt-6 pb-4",children:(0,m.jsxs)(sS,{className:"space-y-2",children:[(0,m.jsx)("div",{className:"w-12 h-12 rounded-full bg-amber-500/15 flex items-center justify-center mb-1",children:(0,m.jsx)(ny.ShieldAlert,{className:"w-6 h-6 text-amber-500"})}),(0,m.jsxs)(sE,{className:"text-2xl font-bold tracking-tight",children:["Bạn cần thay ",t," key proxy"]}),(0,m.jsx)(sP,{className:"text-[15px] text-white/50 leading-relaxed",children:"Vì lý do bảo máºt, toà n bá» key cÅ© cá»§a bạn phải ÄÆ°á»£c thay bằng key má»i trưá»c khi tiếp tục sá» dụng."})]})}),(0,m.jsxs)("div",{className:"px-4 sm:px-6 pb-4 space-y-3",children:[(0,m.jsxs)("div",{className:"p-3 rounded-lg border border-emerald-500/30 bg-emerald-500/10",children:[(0,m.jsx)("p",{className:"text-sm text-emerald-400 font-semibold mb-1",children:"Bạn không mất gì cả"}),(0,m.jsx)("p",{className:"text-sm text-white/60 leading-relaxed",children:"Thá»i hạn còn lại cá»§a từng key ÄÆ°á»£c chuyá»n nguyên vẹn sang key má»i. Không mất phÃ, không mất ngà y nà o."})]}),(0,m.jsxs)("div",{className:"p-3 rounded-lg border border-amber-500/40 bg-amber-500/10",children:[(0,m.jsx)("p",{className:"text-sm text-amber-500 font-semibold mb-1",children:"Key cÅ© sẽ ngừng chạy ngay sau khi bấm"}),(0,m.jsx)("p",{className:"text-sm text-white/60 leading-relaxed",children:"Hãy chuẩn bá» cáºp nháºt key má»i và o công cụ Äang dùng. Key má»i hiá»n ra ngay á» mà n hình kế tiếp, và luôn xem lại ÄÆ°á»£c trong mục Proxy Key."})]})]}),(0,m.jsx)("div",{className:"px-4 sm:px-6 pb-6",children:(0,m.jsx)(nk,{onClick:c,disabled:n,className:"w-full bg-amber-500 hover:bg-amber-600 text-black font-semibold h-11",children:n?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"})," Äang thay key..."]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(L.RefreshCw,{className:"w-4 h-4"})," Thay ",t," key ngay"]})})})]})})})}function iO(){let e,t,s=(0,f.useRouter)(),n=(0,f.useSearchParams)(),{user:r,isLoggedIn:a,isLoading:i,logout:l,refreshUser:o,sendActivatePhoneOtp:c,verifyActivatePhone:d}=(0,g.useAuth)(),x=(0,s_.useTenant)(),h=(0,s_.useTenantReady)(),u=(0,sI.useThemeStyle)(),T=x.primaryColor,[I,D]=(0,p.useState)(()=>{let e=n.get("tab");if("profile"===e)return"account";let t=x.isMainSite?["keys","deposit","purchase-history","ip-history","account","affiliate","support","invoices"]:["keys","deposit","purchase-history","ip-history","account","support","invoices"];return e&&t.includes(e)?e:"keys"});(0,p.useEffect)(()=>{let e=n.get("tab"),t="profile"===e?"account":e,s=x.isMainSite?["keys","deposit","purchase-history","ip-history","account","affiliate","support","invoices"]:["keys","deposit","purchase-history","ip-history","account","support","invoices"];t&&s.includes(t)&&t!==I&&D(t)},[I,n,x.isMainSite]);let W=(0,p.useCallback)(e=>{if("affiliate"===e&&!x.isMainSite)return;D(e);let t=new URL(window.location.href);t.searchParams.set("tab",e),window.history.replaceState({},"",t.toString())},[x.isMainSite]),[K,z]=(0,p.useState)(5e4),[O,$]=(0,p.useState)(""),[H,V]=(0,p.useState)(!1),[F,B]=(0,p.useState)(1),[Y,G]=(0,p.useState)(1),[q,U]=(0,p.useState)(0),[X,Z]=(0,p.useState)(1),[J,Q]=(0,p.useState)(1),[ee,et]=(0,p.useState)(10),[es,en]=(0,p.useState)(1),[er,ea]=(0,p.useState)(1),[ei,el]=(0,p.useState)(10),[eo,ec]=(0,p.useState)(!1),[ed,ex]=(0,p.useState)(null),[eh,eu]=(0,p.useState)(!1),[em,ep]=(0,p.useState)(!1),[ef,eg]=(0,p.useState)("input"),[eb,ey]=(0,p.useState)(""),[ev,ew]=(0,p.useState)(""),[ej,eN]=(0,p.useState)(!1),[ek,eC]=(0,p.useState)(""),[eS,eT]=(0,p.useState)(!1),[eE,eP]=(0,p.useState)(0),[eL,eM]=(0,p.useState)(()=>"true"===localStorage.getItem("dismissedPhoneActivation")),[eA,eR]=(0,p.useState)(!1),[e_,eI]=(0,p.useState)(!1),[eD,eW]=(0,p.useState)(!1),[eK,ez]=(0,p.useState)(0),[eO,e$]=(0,p.useState)(null),[eH,eV]=(0,p.useState)(""),[eF,eB]=(0,p.useState)(!1),[eY,eG]=(0,p.useState)([]),[eq,eU]=(0,p.useState)([]),[eX,eZ]=(0,p.useState)(!0),[eJ,eQ]=(0,p.useState)([]),[e0,e1]=(0,p.useState)([]),[e5,e2]=(0,p.useState)(!1),[e4,e6]=(0,p.useState)([]);(0,p.useEffect)(()=>{i||a||s.push("/login")},[i,a,s]),(0,p.useEffect)(()=>
33{if(!i&&a&&r?.role==="agency"){let e=localStorage.getItem("accessToken");e&&(localStorage.setItem("agencyAccessToken",e),localStorage.setItem("agencyInfo",JSON.stringify(r))),s.push("/dealer")}},[i,a,r,s]);let e3=Number(r?.balance??0).toLocaleString("vi-VN"),e8=r?.showName||r?.userName||"User",e7=()=>{l(),s.push("/")},e9=eq.filter(e=>e.isActive&&(!e.expiredAt||new Date(e.expiredAt)>new Date));(0,p.useEffect)(()=>{a&&(0,sR.getLegacyKeyStats)().then(e=>ez(e.count)).catch(()=>ez(0))},[a]);let te=(0,p.useCallback)(async()=>{eZ(!0);try{let[e]=await Promise.all([(0,sR.getKeyListV2)(),o()]);eU(e)}catch{}eZ(!1)},[o]);(0,p.useEffect)(()=>{a&&te()},[a,te]),(0,p.useEffect)(()=>{"affiliate"!==I||!a||ed||eh||(eu(!0),(0,sR.getReferralStats)().then(ex).catch(()=>{}).finally(()=>eu(!1)))},[I,a,ed,eh]);let[tt,ts]=(0,p.useState)(null);(0,p.useEffect)(()=>{"purchase-history"===I&&(e2(!0),ts(null),(0,sR.getKeyOrders)(X,ee).then(e=>{eQ(e.data),Q(e.meta.totalPages)}).catch(e=>{ts(e.message||"Lá»i tải dữ liá»u")}).finally(()=>e2(!1)))},[I,X,ee]),(0,p.useEffect)(()=>{"deposit"===I&&(0,sR.getDeposits)(F).then(e=>{e1(e.data),G(e.meta.totalPages),U(e.meta.total)}).catch(()=>{})},[I,F]),(0,p.useEffect)(()=>{"deposit"===I&&(eO||((0,sR.getBankInfo)().then(e$).catch(()=>{}),(0,sR.getActivePromotions)().then(eG).catch(()=>{})))},[I,eO]),(0,p.useEffect)(()=>{"ip-history"===I&&(e2(!0),ts(null),(0,sR.getIpHistory)(es,ei).then(e=>{e6(e.data),ea(e.meta.totalPages)}).catch(e=>{ts(e.message||"Lá»i tải dữ liá»u")}).finally(()=>e2(!1)))},[I,es,ei]),(0,p.useEffect)(()=>{if("deposit"!==I)return;let e=setInterval(()=>{(0,sR.getDeposits)(F).then(e=>{e1(e.data),G(e.meta.totalPages),U(e.meta.total)}).catch(()=>{})},1e4);return()=>clearInterval(e)},[I,F]),(0,p.useEffect)(()=>{if(!a)return;let e=setInterval(()=>{o()},5e3);return()=>clearInterval(e)},[a,o]),(0,p.useEffect)(()=>{var e,t;if(!a||!r||e_)return;eI(!0),e=r.email,t=r.phoneNumber,e&&(e.endsWith("@phone.nestproxy.com")||t&&e===`${t}@nestproxy.com`)&&!localStorage.getItem("phoneWelcomeDone")&&eR(!0);let s=localStorage.getItem("phoneLoginBonus");if(s)try{let{bonusGranted:e}=JSON.parse(s);e>0&&(b.toast.success(`ð Bạn Ä\xe3 ÄÆ°á»£c tặng ${Number(e).toLocaleString("vi-VN")}â« d\xf9ng thá»!`,{duration:6e3,description:"Sá» dư Äã ÄÆ°á»£c cá»ng và o tà i khoản, tương ÄÆ°Æ¡ng 3 keys trải nghiá»m."}),localStorage.removeItem("phoneLoginBonus"))}catch{}localStorage.getItem("apiKeyRotated")&&(b.toast.warning("API key cá»§a bạn Äã ÄÆ°á»£c Äá»i vì lý do bảo máºt",{duration:12e3,description:"Key cÅ© Äã ngừng hoạt Äá»ng. Vui lòng lấy key má»i trong mục API và cáºp nháºt lại á» các ứng dụng Äang sá» dụng."}),localStorage.removeItem("apiKeyRotated"))},[a,r,e_]),(0,p.useEffect)(()=>{if(!a||i||eA||!h||!x.isMainSite||"true"===localStorage.getItem("nestproxy_community_joined"))return;let e=localStorage.getItem("nestproxy_community_last_shown"),t=Date.now();if(e){let s=parseInt(e,10);if(!isNaN(s)&&t-s>=6048e5){let e=setTimeout(()=>{eW(!0)},3e3);return()=>clearTimeout(e)}}else{let e=setTimeout(()=>{eW(!0)},3e3);return()=>clearTimeout(e)}},[a,i,eA,h,x.isMainSite]);let tn=a&&r&&r.email&&!r.phoneNumber&&!eS&&!eL,tr=a&&r&&!r.phoneNumber&&!eS,ta=async()=>{eC(""),eN(!0);try{await c(eb),eg("otp")}catch(e){eC(e.message||"Lá»i gá»i OTP")}eN(!1)},ti=async()=>{eC(""),eN(!0);try{let e=await d(eb,ev);eT(!0),eP(e.bonusGranted||0),ep(!1),b.toast.success(`K\xedch hoạt th\xe0nh c\xf4ng! +${(e.bonusGranted||0).toLocaleString("vi-VN")}Ä`),(0,sH.trackPhoneActivation)({success:!0,bonusGranted:e.bonusGranted||0})}catch(e){eC(e.message||"Mã OTP không Äúng")}eN(!1)};return i?(0,m.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,m.jsx)(k.Loader2,{className:"w-8 h-8 animate-spin text-[#06b6d4]"})}):(0,m.jsxs)("div",{className:"min-h-screen",style:{fontFamily:u.fontFamily,background:u.pageBg},children:[eA&&(0,m.jsx)(sD,{onCompleted:()=>{localStorage.setItem("phoneWelcomeDone","true"),eR(!1)}}),(0,m.jsx)(iz,{open:eK>0&&!eA,legacyCount:eK,onDone:()=>{ez(0),te()}}),eD&&(0,m.jsx)(sO,{onJoined:()=>{localStorage.setItem("nestproxy_community_joined","true"),eW(!1),b.toast.success("Cảm Æ¡n bạn Äã tham gia cá»ng Äá»
33ng NestProxy!")},onClose:()=>{localStorage.setItem("nestproxy_community_last_shown",Date.now().toString()),eW(!1)}}),(0,m.jsx)("header",{className:"sticky top-0 z-50 border-b backdrop-blur-xl",style:{borderColor:u.borderColor,background:u.navBg},children:(0,m.jsxs)("div",{className:"max-w-[1400px] mx-auto px-4 md:px-6 h-14 md:h-16 flex items-center justify-between",children:[x.isMainSite?(0,m.jsxs)("a",{href:"/",className:"flex items-center gap-2.5 no-underline",children:[(0,m.jsx)("img",{src:"/images/np-ngang.png",alt:"NestProxy",className:"h-7 w-auto object-contain"}),(0,m.jsx)("span",{style:{fontFamily:"'Space Grotesk', sans-serif",fontSize:14,fontWeight:700,letterSpacing:"0.12em",color:"#fff",textTransform:"uppercase"},children:"NESTPROXY"})]}):(0,m.jsx)(sL.Logo,{size:"sm"}),(0,m.jsxs)("div",{className:"flex items-center gap-2 md:gap-3",children:[(0,m.jsxs)("button",{onClick:()=>W("deposit"),className:"group flex items-center gap-1 sm:gap-1.5 pl-2.5 pr-2 sm:pl-3 sm:pr-2.5 py-1.5 rounded-full cursor-pointer transition-all duration-200 border-none hover:scale-[1.03] min-w-[80px] sm:min-w-[90px]",style:{background:"linear-gradient(135deg, rgba(6,182,212,0.12) 0%, rgba(6,182,212,0.06) 100%)",boxShadow:"0 0 0 1px rgba(6,182,212,0.2), 0 2px 8px rgba(6,182,212,0.08)"},children:[(0,m.jsxs)("span",{className:"flex-1 text-center text-[13px] sm:text-[14px] font-bold text-[#06b6d4] tabular-nums",children:[e3,"Ä"]}),(0,m.jsx)("span",{className:"shrink-0 flex items-center justify-center w-5 h-5 sm:w-6 sm:h-6 rounded-full bg-[#06b6d4]/20 text-[#06b6d4] transition-colors duration-150 group-hover:bg-[#06b6d4]/30",children:(0,m.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:(0,m.jsx)("path",{d:"M12 5v14M5 12h14"})})})]}),(0,m.jsx)("button",{onClick:e7,className:"p-2 rounded-lg transition-colors hover:bg-white/10",title:"ÄÄng xuất",children:(0,m.jsx)(v.LogOut,{className:"w-5 h-5 text-[#a1a1aa]"})})]})]})}),(0,m.jsx)(s$,{}),(0,m.jsx)("div",{className:"max-w-[1400px] mx-auto px-4 md:px-6 py-4 md:py-8 pb-20 lg:pb-8",children:(0,m.jsxs)("div",{className:"flex flex-col lg:flex-row gap-6 lg:gap-8",children:[(0,m.jsxs)("aside",{className:"hidden lg:block lg:w-64 flex-shrink-0",children:[(0,m.jsxs)("div",{className:`p-4 ${u.borderRadius} mb-4`,style:{background:u.cardBg,border:`1px solid ${u.borderColor}`},children:[(0,m.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,m.jsx)("div",{className:"w-10 h-10 rounded-full flex items-center justify-center text-sm font-bold shrink-0",style:{background:"linear-gradient(135deg,#2563eb,#06b6d4)",color:"#fff"},children:e8.charAt(0).toUpperCase()}),(0,m.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,m.jsx)("div",{className:"text-[14px] truncate",style:{fontWeight:600,color:u.textPrimary},children:e8}),(0,m.jsx)("div",{className:"text-xs",style:{color:u.textMuted},children:"Ngưá»i dùng"})]})]}),(0,m.jsxs)("button",{onClick:()=>W("deposit"),className:"group w-full flex items-center gap-1.5 px-3 py-2 rounded-full cursor-pointer transition-all duration-200 border-none hover:scale-[1.02] min-w-[90px]",style:{background:"linear-gradient(135deg, rgba(6,182,212,0.12) 0%, rgba(6,182,212,0.06) 100%)",boxShadow:"0 0 0 1px rgba(6,182,212,0.2), 0 2px 8px rgba(6,182,212,0.08)"},children:[(0,m.jsxs)("span",{className:"flex-1 text-center text-[13px] font-bold text-[#06b6d4] tabular-nums",children:[e3,"Ä"]}),(0,m.jsx)("span",{className:"shrink-0 flex items-center justify-center w-5 h-5 rounded-full bg-[#06b6d4]/20 text-[#06b6d4] transition-colors duration-150 group-hover:bg-[#06b6d4]/30",children:(0,m.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:(0,m.jsx)("path",{d:"M12 5v14M5 12h14"})})})]})]}),(0,m.jsxs)("nav",{className:"space-y-4",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("div",{className:"px-3 mb-1.5 text-[11px] tracking-wider uppercase",style:{fontWeight:600,color:u.textMuted},children:"ChÃnh"}),(0,m.jsx)("div",{className:"space-y-1",children:[{key:"keys",label:"Proxy Key",icon:y.Key},{key:"deposit",label:"Nạp tiá»n",icon:E}].map(e=>{let t=I===e.key;return(0,m.jsxs)("button",{onClick:()=>W(e.key),className:`group w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-[14px] transition-all duration-200 cursor-pointer border-none outline-none ${t?"bg-[#27272a] text-white shadow-[0_2px_8px_rgba(0,0,0,0.3)]":"text-[#a1a1aa] hover:bg-white/[0.06] hover:text-white/90"}`,style:{fontWeight:t?600:400},children:[(0,m.jsx)("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 transition-all duration-200 ${t?"bg-white/[0.1]":"bg-white/[0.04] group-hover:bg-white/[0.08]"}`,children:(0,m.jsx)(e.icon,{className:"w-[16px] h-[16px]"})}),(0,m.jsx)("span",{children:e.label})]},e.key)})})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("div",{className:"px-3 mb-1.5 text-[11px] tracking-wider up
33percase",style:{fontWeight:600,color:u.textMuted},children:"Lá»ch sá»"}),(0,m.jsx)("div",{className:"space-y-1",children:[{key:"purchase-history",label:"Lá»ch sá» mua Key",icon:P.ShoppingCart},{key:"ip-history",label:"Lá»ch sá» Äá»i IP",icon:L.RefreshCw},{key:"invoices",label:"Hóa ÄÆ¡n",icon:M.FileText}].map(e=>{let t=I===e.key;return(0,m.jsxs)("button",{onClick:()=>W(e.key),className:`group w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-[14px] transition-all duration-200 cursor-pointer border-none outline-none ${t?"bg-[#27272a] text-white shadow-[0_2px_8px_rgba(0,0,0,0.3)]":"text-[#a1a1aa] hover:bg-white/[0.06] hover:text-white/90"}`,style:{fontWeight:t?600:400},children:[(0,m.jsx)("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 transition-all duration-200 ${t?"bg-white/[0.1]":"bg-white/[0.04] group-hover:bg-white/[0.08]"}`,children:(0,m.jsx)(e.icon,{className:"w-[16px] h-[16px]"})}),(0,m.jsx)("span",{children:e.label})]},e.key)})})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("div",{className:"px-3 mb-1.5 text-[11px] tracking-wider uppercase",style:{fontWeight:600,color:u.textMuted},children:"Khác"}),(0,m.jsx)("div",{className:"space-y-1",children:[{key:"account",label:"Tà i khoản",icon:R.User},...x.isMainSite?[{key:"affiliate",label:"Cá»ng tác viên",icon:C.Gift}]:[],{key:"support",label:"Há» trợ",icon:A.HelpCircle}].map(e=>{let t=I===e.key;return(0,m.jsxs)("button",{onClick:()=>W(e.key),className:`group w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-[14px] transition-all duration-200 cursor-pointer border-none outline-none ${t?"bg-[#27272a] text-white shadow-[0_2px_8px_rgba(0,0,0,0.3)]":"text-[#a1a1aa] hover:bg-white/[0.06] hover:text-white/90"}`,style:{fontWeight:t?600:400},children:[(0,m.jsx)("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 transition-all duration-200 ${t?"bg-white/[0.1]":"bg-white/[0.04] group-hover:bg-white/[0.08]"}`,children:(0,m.jsx)(e.icon,{className:"w-[16px] h-[16px]"})}),(0,m.jsx)("span",{children:e.label})]},e.key)})})]})]}),(0,m.jsx)("div",{className:"mt-4 pt-4",style:{borderTop:`1px solid ${u.borderColor}`},children:(0,m.jsxs)("button",{onClick:e7,className:`w-full flex items-center gap-3 px-4 py-3 ${u.borderRadius} text-sm text-[#ef4444] hover:bg-[#ef4444]/10 transition-all border border-transparent`,style:{fontWeight:500},children:[(0,m.jsx)(v.LogOut,{className:"w-4 h-4"})," ÄÄng xuất"]})}),(0,m.jsxs)("div",{className:`mt-4 p-4 ${u.borderRadius} space-y-3`,style:{background:u.cardBg,border:`1px solid ${u.borderColor}`},children:[(0,m.jsx)("div",{className:"text-[13px]",style:{fontWeight:600,color:u.textMuted,letterSpacing:"0.05em"},children:"Tá»NG QUAN"}),(0,m.jsxs)("div",{className:"flex items-center justify-between",children:[(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)("span",{className:"text-[13px]",style:{color:u.textSecondary},children:"Key hoạt Äá»ng"}),(e=e9.filter(e=>e.expiredAt&&new Date(e.expiredAt).getTime()-Date.now()<864e5).length)>0?(0,m.jsxs)("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full bg-[#f59e0b]/15 text-[#f59e0b] text-[10px]",style:{fontWeight:600},children:[(0,m.jsx)(S.AlertTriangle,{className:"w-3 h-3"}),e," sắp hết"]}):null]}),(0,m.jsx)("span",{className:"text-[15px]",style:{fontWeight:700,color:T},children:e9.length})]}),(0,m.jsxs)("div",{className:"flex items-center justify-between",children:[(0,m.jsx)("span",{className:"text-[13px]",style:{color:u.textSecondary},children:"Tá»ng key"}),(0,m.jsx)("span",{className:"text-[15px]",style:{fontWeight:700,color:u.textPrimary},children:eq.length})]})]})]}),(0,m.jsxs)("main",{className:"flex-1 min-w-0",children:[tn&&(0,m.jsxs)("div",{className:`mb-4 ${u.borderRadius} relative overflow-hidden px-4 py-4 sm:px-6 sm:py-5 animate-[glow-pulse_3s_ease-in-out_infinite] cursor-pointer`,style:{border:"1px solid rgba(245,158,11,0.5)",background:"linear-gradient(135deg, #1c1c20 0%, #18181b 100%)"},onClick:()=>{ep(!0),eg("input"),eC(""),ew("")},children:[(0,m.jsx)("button",{onClick:e=>{e.stopPropagation(),eM(!0),localStorage.setItem("dismissedPhoneActivation","true")},className:"absolute top-3 right-3 w-7 h-7 rounded-full flex items-center justify-center bg-white/10 hover:bg-white/20 transition-colors border-none cursor-pointer text-white/60 hover:text-white z-10",title:"Ẩn thông báo",children:(0,m.jsx)(_.X,{className:"w-4 h-4"})}),(0,m.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,m.jsx)("div",{className:"w-10 h-10 sm:w-12 sm:h-12 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:"linear-gradient(135deg, #f59e0b, #f97316)",boxShadow:"0 4px 14px rgba(245,158,11,0.35)"},children:(0,m.jsx)(C.Gift,{className:"w-5 h-5 sm:w-6 sm:h-6 text-white"})}),(0,m.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,m.jsxs)("div",{className:"text-[14px] sm:text-[16
33px] font-bold text-white leading-snug",children:[(0,m.jsxs)("span",{className:"sm:hidden",children:["KÃch hoạt SÄT â Tặng ",(0,m.jsx)("span",{className:"text-[#f59e0b] font-extrabold",style:{textShadow:"0 0 12px rgba(245,158,11,0.4)"},children:"22.500â«"})]}),(0,m.jsxs)("span",{className:"hidden sm:inline",children:["ð KÃch hoạt SÄT â Tặng ",(0,m.jsx)("span",{className:"text-[#f59e0b] text-lg font-extrabold",style:{textShadow:"0 0 12px rgba(245,158,11,0.4)"},children:"22.500â«"})," (3 keys trải nghiá»m)!"]})]}),(0,m.jsxs)("div",{className:"text-[12px] sm:text-[13px] text-white/50 mt-1",children:[(0,m.jsx)("span",{className:"sm:hidden",children:"Nháºn ngay ưu Äãi trải nghiá»m"}),(0,m.jsx)("span",{className:"hidden sm:inline",children:"Liên kết sá» Äiá»n thoại Äá» nháºn ưu Äãi và bảo máºt tà i khoản"})]})]}),(0,m.jsx)("div",{className:"hidden sm:block flex-shrink-0",children:(0,m.jsxs)("div",{className:`px-5 py-3 ${u.borderRadiusBtn} text-sm flex items-center gap-2 text-white whitespace-nowrap`,style:{background:"linear-gradient(135deg, #f59e0b, #f97316)",fontWeight:700,boxShadow:"0 4px 14px rgba(245,158,11,0.3)"},children:[(0,m.jsx)(N.Phone,{className:"w-4 h-4"})," KÃch hoạt ngay"]})})]}),(0,m.jsx)("div",{className:"mt-3 sm:hidden",children:(0,m.jsxs)("div",{className:`w-full py-2.5 ${u.borderRadiusBtn} text-xs flex items-center justify-center gap-2 text-white`,style:{background:"linear-gradient(135deg, #f59e0b, #f97316)",fontWeight:700,boxShadow:"0 4px 14px rgba(245,158,11,0.3)"},children:[(0,m.jsx)(N.Phone,{className:"w-3.5 h-3.5"})," KÃch hoạt ngay"]})})]}),(0,m.jsx)(sj,{open:em,onOpenChange:ep,children:(0,m.jsxs)(sC,{className:"sm:!max-w-md p-0 gap-0 overflow-hidden border-white/10",style:{background:"#18181b"},children:[(0,m.jsx)("div",{className:"px-4 sm:px-6 pt-5 sm:pt-7 pb-4 sm:pb-5",children:(0,m.jsx)(sS,{className:"space-y-1.5",children:(0,m.jsx)(sE,{className:"text-2xl font-bold tracking-tight",children:"input"===ef?"KÃch hoạt sá» Äiá»n thoại":"Nháºp mã OTP"})})}),(0,m.jsxs)("div",{className:"px-4 sm:px-6 pb-5 sm:pb-6 space-y-4 sm:space-y-5",children:[(0,m.jsxs)("div",{className:"rounded-xl bg-white/5 border border-white/10 p-3.5 flex items-center gap-3",children:[(0,m.jsx)(C.Gift,{className:"w-5 h-5 flex-shrink-0 text-amber-400"}),(0,m.jsxs)("span",{className:"text-[15px] text-white/70",children:["KÃch hoạt SÄT Äá» nháºn ",(0,m.jsx)("strong",{className:"text-primary",children:"22.500â«"})," trải nghiá»m!"]})]}),ek&&(0,m.jsx)("div",{className:"rounded-xl bg-red-500/10 border border-red-500/20 p-3.5 text-red-400 text-[14px] text-center",children:ek}),"input"===ef?(0,m.jsx)("div",{className:"space-y-4",children:(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:"block text-xs text-white/40 mb-2 uppercase tracking-widest font-medium",children:"Sá» Äiá»n thoại"}),(0,m.jsxs)("div",{className:"relative",children:[(0,m.jsx)(N.Phone,{className:"w-4 h-4 absolute left-4 top-1/2 -translate-y-1/2 text-white/30"}),(0,m.jsx)("input",{type:"tel",value:eb,onChange:e=>ey(e.target.value),placeholder:"0912 345 678",className:"w-full pl-11 pr-4 h-12 rounded-lg text-[15px] bg-white/5 border border-white/10 text-white placeholder:text-white/20 focus:outline-none focus:border-white/25 transition-colors"})]}),(0,m.jsxs)("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg text-xs mt-3 bg-blue-500/8 border border-blue-500/15",children:[(0,m.jsx)("svg",{viewBox:"0 0 24 24",className:"w-4 h-4 flex-shrink-0",fill:"#0068FF",children:(0,m.jsx)("path",{d:"M12 2C6.48 2 2 6.04 2 11c0 2.83 1.46 5.35 3.75 6.98V22l3.88-2.13c.78.22 1.55.33 2.37.33 5.52 0 10-4.04 10-9S17.52 2 12 2z"})}),(0,m.jsxs)("span",{className:"text-blue-300/80",children:["Mã xác thá»±c OTP sẽ ÄÆ°á»£c gá»i qua ",(0,m.jsx)("strong",{className:"text-blue-300",children:"Zalo"})]})]})]})}):(0,m.jsxs)("div",{className:"space-y-4",children:[(0,m.jsxs)("p",{className:"text-[15px] text-center text-white/50",children:["Mã OTP Äã gá»i Äến ",(0,m.jsx)("strong",{className:"text-primary",children:eb})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{className:"block text-xs text-white/40 mb-2 uppercase tracking-widest font-medium",children:"Mã xác thá»±c (6 sá»)"}),(0,m.jsx)("input",{type:"text",value:ev,onChange:e=>ew(e.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"000000",maxLength:6,className:"w-full px-4 h-12 rounded-lg text-center bg-white/5 border border-white/10 text-white placeholder:text-white/20 focu
33s:outline-none focus:border-white/25 transition-colors",style:{fontFamily:"'JetBrains Mono', monospace",fontSize:"20px",letterSpacing:"0.3em"},autoFocus:!0})]})]})]}),(0,m.jsxs)("div",{className:"px-4 sm:px-6 pb-5 sm:pb-6 flex flex-col gap-2.5",children:["input"===ef?(0,m.jsxs)("button",{onClick:ta,disabled:ej||eb.length<9,className:"w-full h-12 rounded-xl text-[16px] font-bold flex items-center justify-center gap-2 disabled:opacity-60 bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",children:[ej&&(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"}),"Gá»i mã OTP"]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("button",{onClick:ti,disabled:ej||6!==ev.length,className:"w-full h-12 rounded-xl text-[16px] font-bold flex items-center justify-center gap-2 disabled:opacity-60 bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",children:[ej&&(0,m.jsx)(k.Loader2,{className:"w-4 h-4 animate-spin"}),"Xác nháºn & nháºn 22.500â«"]}),(0,m.jsx)("button",{onClick:()=>{eg("input"),ew(""),eC("")},className:"w-full h-10 rounded-xl text-[14px] text-white/40 hover:text-white/70 transition-colors",children:"â Äá»i sá» Äiá»n thoại"})]}),(0,m.jsx)("button",{onClick:()=>ep(!1),className:"w-full h-10 rounded-xl text-[14px] text-white/40 hover:text-white/70 transition-colors",children:"Huá»· bá»"})]})]})}),"keys"===I&&(0,m.jsx)(iK,{keys:eq,setKeys:eU,keysLoading:eX,loadData:te,refreshUser:o}),"deposit"===I&&(0,m.jsx)(nd,{selectedPackage:K,setSelectedPackage:z,customAmount:O,setCustomAmount:$,showPaymentQR:H,setShowPaymentQR:V,giftCode:eH,setGiftCode:eV,giftCodeLoading:eF,setGiftCodeLoading:eB,promotions:eY,bankInfo:eO,depositHistory:e0,depPage:F,depTotalPages:Y,depTotal:q,setDepPage:B,setDepTotalPages:G,setDepTotal:U,setDepositHistory:e1,setActiveTab:W}),"purchase-history"===I&&(0,m.jsx)(s8,{purchaseHistory:eJ,historyLoading:e5,historyError:tt,purchasePage:X,purchaseTotalPages:J,purchasePageSize:ee,setPurchasePage:Z,setPurchasePageSize:et,setActiveTab:W}),"ip-history"===I&&(0,m.jsx)(s9,{ipHistory:e4,historyLoading:e5,historyError:tt,ipHistPage:es,ipHistTotalPages:er,ipHistPageSize:ei,setIpHistPage:en,setIpHistPageSize:el,setActiveTab:W}),"account"===I&&(0,m.jsxs)("div",{className:"space-y-5",children:[tr&&(0,m.jsx)("div",{className:"p-4 sm:p-5 rounded-xl cursor-pointer transition-all hover:shadow-[0_0_20px_rgba(245,158,11,0.15)]",style:{border:"1px solid rgba(245,158,11,0.3)",background:"linear-gradient(135deg, #0d1d33 0%, #0a1525 100%)"},onClick:()=>{ep(!0),eg("input"),eC(""),ew("")},children:(0,m.jsxs)("div",{className:"flex items-center gap-3",children:[(0,m.jsx)("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:"linear-gradient(135deg, #f59e0b, #f97316)"},children:(0,m.jsx)(N.Phone,{className:"w-5 h-5 text-white"})}),(0,m.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,m.jsx)("div",{className:"text-[14px] sm:text-[15px] font-bold text-white",children:"KÃch hoạt sá» Äiá»n thoại"}),(0,m.jsxs)("div",{className:"text-[12px] text-white/50 mt-0.5",children:["Liên kết SÄT Äá» nháºn ",(0,m.jsx)("span",{className:"text-[#f59e0b] font-bold",children:"22.500â«"})," và bảo máºt tà i khoản"]})]}),(0,m.jsx)("div",{className:"shrink-0 text-[#f59e0b]",children:(0,m.jsx)(w.ArrowUpRight,{className:"w-5 h-5"})})]})}),(0,m.jsx)(sq,{})]}),"affiliate"===I&&x.isMainSite&&(0,m.jsx)(ns,{referralData:ed,referralLoading:eh,setReferralData:ex,setReferralLoading:eu}),"invoices"===I&&(0,m.jsx)(s2,{}),"support"===I&&(0,m.jsx)(s0,{})]})]})}),(0,m.jsxs)("nav",{className:"lg:hidden fixed bottom-0 left-0 right-0 z-50 border-t border-white/[0.08] bg-[#18181b]/95 backdrop-blur-xl",children:[eo&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-40",onClick:()=>ec(!1)}),(0,m.jsx)("div",{className:"fixed inset-x-0 bottom-0 z-50 animate-in slide-in-from-bottom duration-200",children:(0,m.jsxs)("div",{className:"max-w-lg mx-auto rounded-t-2xl bg-[#18181b] border-t border-x border-white/[0.08] shadow-[0_-8px_30px_rgba(0,0,0,0.5)] overflow-hidden",children:[(0,m.jsx)("div",{className:"flex justify-center pt-3 pb-1",children:(0,m.jsx)("div",{className:"w-10 h-1 rounded-full bg-white/15"})}),(0,m.jsxs)("div",{className:"px-5 pb-3 pt-1 flex items-center gap-3",children:[(0,m.jsx)("div",{className:"w-9 h-9 rounded-full flex items-center justify-center text-xs font-bold shrink-0",style:{background:"linear-gradient(135deg,#2563eb,#06b6d4)",color:"#fff"},children:e8.charAt(0).toUpperCase()}),(0,m.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,m.jsx)("div",{className:"text-sm text-white truncate",style:{fontWeight:600},children:e8}),(0,m.jsxs)("div",{className:"text-xs text-[#71717a]",children:[e3,"Ä"]})]}),(0,m.jsx)("button",{onClick:()=>ec(!1),className:"p-1.5 rounded-lg hover:bg-white/10 transition-colors",children:(0,m.jsx)(_.X,{className:"w-4 h-4 text-[#a1a1aa]"})})]}),(0,m.jsx)("div",{className:"border-t border-white/5"}),(0,m.jsx)("div",{className:"py-1.5 max-h-[55vh] overflow-y-auto",children:[{key:"purchase-history",label:"Lá»ch sá» mua Key",icon:P.ShoppingCart,color:"#10b981"},{key:"ip-history",label:"Lá»ch sá» Äá»i IP",icon:L.RefreshCw,color:"#8b5cf6"},{key:"invoices",label:"Hóa ÄÆ¡n",icon:M.FileText,color:"#06b6d4"},...x.isMainSite?[{key:"affiliate",label:"Cá»ng tác viên",icon:C.Gift,color:"#ec4899"}]:[],{key:"support",label:"Há» trợ",icon:A.HelpCircle,color:"#f59e0b"}].map(e=>(0,m.jsxs)("button",{onClick:()=>{W(e.key),ec(!1)},className:`w-full flex items-center gap-3.5 px-5 py-3 text-left text-[14px] transition-all ${I===e.ke
33y?"bg-[#06b6d4]/8 text-white":"text-[#cbd5e1] active:bg-white/5"}`,style:{fontWeight:I===e.key?600:400},children:[(0,m.jsx)("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:I===e.key?`${e.color}20`:`${e.color}10`},children:(0,m.jsx)(e.icon,{className:"w-4 h-4",style:{color:e.color}})}),e.label,I===e.key&&(0,m.jsx)("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-[#06b6d4]"})]},e.key))}),(0,m.jsx)("div",{className:"border-t border-white/5"}),(0,m.jsx)("div",{className:"px-5 py-3 safe-area-pb",children:(0,m.jsxs)("button",{onClick:e7,className:"w-full flex items-center gap-3.5 px-3 py-2.5 rounded-lg text-[14px] text-[#ef4444] hover:bg-[#ef4444]/10 transition-all",style:{fontWeight:500},children:[(0,m.jsx)(v.LogOut,{className:"w-4 h-4"})," ÄÄng xuất"]})})]})})]}),(0,m.jsxs)("div",{className:"max-w-lg mx-auto flex items-center justify-around px-1 pt-1.5 pb-1 safe-area-pb",children:[[{key:"keys",label:"Key",icon:y.Key,color:"#06b6d4"},{key:"deposit",label:"Nạp tiá»n",icon:E,color:"#10b981"},{key:"account",label:"Tà i khoản",icon:R.User,color:"#8b5cf6"}].map(e=>{let t=I===e.key;return(0,m.jsxs)("button",{onClick:()=>{W(e.key),ec(!1)},className:`flex flex-col items-center gap-1 px-5 py-1.5 rounded-2xl transition-all min-w-[72px] ${t?"":"text-[#71717a] active:scale-95"}`,children:[(0,m.jsx)("div",{className:`flex items-center justify-center w-10 h-7 rounded-full transition-all ${t?"bg-[#06b6d4]/15":""}`,children:(0,m.jsx)(e.icon,{className:"w-[22px] h-[22px]",style:{color:t?"#06b6d4":void 0,strokeWidth:t?2.2:1.8}})}),(0,m.jsx)("span",{className:`text-[11px] leading-tight ${t?"text-[#06b6d4] font-semibold":"font-medium"}`,children:e.label})]},e.key)}),(t=eo||["purchase-history","ip-history","invoices","support","affiliate"].includes(I),(0,m.jsxs)("button",{onClick:()=>ec(!eo),className:`flex flex-col items-center gap-1 px-5 py-1.5 rounded-2xl transition-all min-w-[72px] ${t?"":"text-[#71717a] active:scale-95"}`,children:[(0,m.jsx)("div",{className:`flex items-center justify-center w-10 h-7 rounded-full transition-all ${t?"bg-[#06b6d4]/15":""}`,children:(0,m.jsx)(j.MoreHorizontal,{className:"w-[22px] h-[22px]",style:{color:t?"#06b6d4":void 0,strokeWidth:t?2.2:1.8}})}),(0,m.jsx)("span",{className:`text-[11px] leading-tight ${t?"text-[#06b6d4] font-semibold":"font-medium"}`,children:"Thêm"})]}))]})]})]})}e.s(["default",0,function(){let e=(0,f.useRouter)(),{user:t,isLoggedIn:s,isLoading:n}=(0,g.useAuth)();return((0,p.useEffect)(()=>{if(!n){if(!s)return void e.replace("/login");if(t?.role==="admin"||t?.role==="support")return void e.replace("/admin");if(t?.role==="agency")return void e.replace("/dealer")}},[n,s,t,e]),t?.role==="admin"||t?.role==="support"||t?.role==="agency")?null:(0,m.jsx)(iO,{})}],30257)}]);
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.