PageSourceSearch

https://hunghoevervip.com/assets/Help-Pv8WTVfd.js

js hunghoevervip.com collected 2026-10-08 21:32:29 UTC 6,788 bytes, 1 lines download raw bytes

1import{j as e}from"./query-vendor-kvu6DCO6.js";import{d as A,r as a}from"./react-vendor-DhN5vIHY.js";import{I as V}from"./input-gazmPifC.js";import{T as D}from"./textarea-CkAUs1wr.js";import{L as h}from"./label-D3R869E6.js";import{h as F,i as Y,s as o,B as k}from"./index-x3WCjE4v.js";import{S as G,a as O,b as Q,c as U,d as $}from"./select-BfNJXqTw.js";import{A as J}from"./AdminPageHeader-B2SwnN4O.js";import{L as K}from"./loader-circle-DzDNFP_9.js";import{S as W}from"./send-CzFIWjQH.js";import{C as X}from"./chevron-right-DpjmAPyF.js";import{o as Z,s as n}from"./types-8nx8Rb0n.js";import"./index-BdQq_4o_.js";import"./index-DTcYEckS.js";import"./index-Cb3DMVot.js";import"./chevron-down-DNxMMbfW.js";import"./chevron-up-0tzgS05w.js";import"./check-CbeJ1hyh.js";import"./AppMenu-Dxo3E6_e.js";import"./EventTicketsIcon-BFiAN6uM.js";import"./log-out--eS9EmGX.js";import"./calendar-TCRS5DbI.js";import"./trophy-SiyA38pi.js";import"./user-Bq-muTRk.js";import"./handshake-CvpPpoLO.js";import"./share-2-nJsljdm-.js";import"./HeaderLogos-CcCTX1ha.js";import"./kwagi-heath-group.png.asset-DwX5yxpU.js";import"./apl-a-mark.png.asset-Dn5Bhq-r.js";import"./chevron-left-D7o3RYBl.js";const ee=Z({name:n().trim().min(1).max(100),email:n().trim().email("Invalid email").max(255),subject:n().trim().min(1,"Subject is required").max(150),request_type:n().trim().min(1,"Request type is required").max(100),message:n().trim().min(1,"Message is required").max(1e3)}),te=["Account Issue (login, functionality, etc.)","Billing (cards, subscription, etc.)","Orders (tickets, tables, etc.)"],Ee=()=>{const C=A(),{toast:l}=F(),{isReady:g,user:r}=Y(),[L,T]=a.useState(""),[E,M]=a.useState(""),[b,f]=a.useState(""),[j,w]=a.useState(""),[S,y]=a.useState(""),[m,d]=a.useState(!1),[i,N]=a.useState({}),[v,I]=a.useState([]),[_,q]=a.useState(!0),[u,B]=a.useState(5),[H,P]=a.useState(!1),p=a.useCallback(async(t,s)=>{const{data:c}=await o.from("concierge_messages").select("id,subject,status,created_at").eq("user_id",t).order("created_at",{ascending:!1}).limit(s);I(c??[]),P((c??[]).length===s),q(!1)},[]);a.useEffect(()=>{if(g){if(!r){q(!1);return}(async()=>{const{data:t}=await o.from("profiles").select("first_name,last_name,email").eq("id",r.id).maybeSingle(),s=[t?.first_name,t?.last_name].filter(Boolean).join(" ");s&&T(s),M(t?.email||r.email||"")})(),p(r.id,u)}},[g,r,p,u]);const z=async t=>{t.preventDefault();const s=ee.safeParse({name:L||"VIP Member",email:E,subject:b,request_type:j,message:S});if(!s.success){const R={};s.error.errors.forEach(x=>{x.path[0]&&(R[x.path[0]]=x.message)}),N(R);return}if(N({}),!r){l({title:"Sign in required",variant:"destructive"});return}d(!0);const{error:c}=await o.from("concierge_messages").insert({user_id:r.id,name:s.data.name,email:s.data.email,subject:s.data.subject,request_type:s.data.request_type,message:s.data.message});if(c){d(!1),l({title:"Failed to send",description:c.message,variant:"destructive"});return}o.functions.invoke("send-concierge-email",{body:{name:s.data.name,email:s.data.email,subject:s.data.subject,request_type:s.data.request_type,message:s.data.message}}).catch(()=>{}),d(!1),l({title:"Message sent",description:"Your concierge will be in touch shortly."}),f(""),w(""),y(""),p(r.id,u)};return e.jsxs("div",{className:"min-h-screen bg-[#0a1530] text-white pb-28",children:[e.jsx(J,{title:"Get Help",showBack:!1,showLogos:!0}),e.jsxs("main",{className:"px-5 py-8 max-w-[1600px] mx-auto",children:[e.jsx("p",{className:"text-white/70 text-center mb-6",children:"Have a question or special request? Send a note to your VIP concierge and we'll get back to you."}),e.jsxs("form",{onSubmit:z,className:"space-y-4 rounded-2xl bg-white/5 border border-white/10 p-5",children:[e.jsxs("div",{children:[e.jsx(h,{htmlFor:"subject",className:"text-white/80",children:"Subject"}),e.jsx(V,{id:"subject",value:b,onChange:t=>f(t.target.value),maxLength:150,className:"bg-[#0a1530] border-white/20 text-white mt-1"}),i.subject&&e.jsx("p",{className:"text-red-400 text-sm mt-1",children:i.subject})]}),e.jsxs("div",{children:[e.jsx(h,{className:"text-white/80",children:"Request Type"}),e.jsxs(G,{value:j,onValueChange:w,children:[e.jsx(O,{className:"bg-[#0a1530] border-white/20 text-white mt-1",children:e.jsx(Q,{placeholder:"Select a request type"})}),e.jsx(U,{className:"bg-[#0a1530] border-white/20 text-white",children:te.map(t=>e.jsx($,{value:t,className:"text-white focus:bg-white/10 focus:text-white",children:t},t))})]}),i.request_type&&e.jsx("p",{className:"text-red-400 text-sm mt-1",children:i.request_type})]}),e.jsxs("div",{children:[e.jsx(h,{htmlFor:"message",className:"text-white/80",children:"Message"}),e.jsx(D,{id:"message",value:S,onChange:t=>y(t.target.value),rows:5,maxLength:1e3,className:"bg-[#0a1530] border-white/20 text-white mt-1 resize-none"}),i.message&&e.jsx("p",{className:"text-red-400 text-sm mt-1",children:i.message})]}),e.jsxs(k,{type:"submit",disabled:m,className:"w-full h-12 rounded-full bg-[#f5c518] hover:bg-[#f5c518]/90 text-[#0a1530] font-bold uppercase tracking-wider",children:[m?e.jsx(K,{className:"animate-spin mr-2",size:18}):e.jsx(W,{className:"mr-2",size:18}
1),m?"Sending...":"Send Message"]})]}),e.jsxs("section",{className:"mt-8",children:[e.jsx("h2",{className:"text-lg font-bold text-[#f5c518] mb-3",children:"Recent Message"}),e.jsxs("div",{className:"rounded-2xl bg-white/5 border border-white/10 overflow-hidden",children:[e.jsxs("div",{className:"grid grid-cols-[1fr_110px_120px_24px] gap-3 px-4 py-3 text-xs uppercase tracking-wider text-white/50 border-b border-white/10",children:[e.jsx("span",{children:"Subject"}),e.jsx("span",{children:"Status"}),e.jsx("span",{children:"Created"}),e.jsx("span",{})]}),_?e.jsx("p",{className:"px-4 py-6 text-white/60 text-sm",children:"Loading..."}):v.length===0?e.jsx("p",{className:"px-4 py-6 text-white/60 text-sm",children:"No messages yet."}):v.map(t=>e.jsxs("button",{onClick:()=>C(`/messagedetails/${t.id}`),className:"w-full grid grid-cols-[1fr_110px_120px_24px] gap-3 items-center px-4 py-4 text-left border-b border-white/5 last:border-0 hover:bg-white/[0.06] transition-colors",children:[e.jsx("span",{className:"truncate text-white",children:t.subject||"(No subject)"}),e.jsx("span",{className:"text-sm",children:e.jsx("span",{className:"inline-block rounded-full bg-[#f5c518]/15 text-[#f5c518] px-2.5 py-0.5 capitalize",children:t.status||"open"})}),e.jsx("span",{className:"text-sm text-white/60",children:new Date(t.created_at).toLocaleDateString()}),e.jsx(X,{className:"w-4 h-4 text-[#f5c518]"})]},t.id))]}),H&&!_&&e.jsx(k,{onClick:()=>B(t=>t+5),className:"mt-4 w-full h-12 rounded-full bg-white/10 hover:bg-white/20 text-white font-bold uppercase tracking-wider border border-white/10",children:"Load More"})]})]})]})};export{Ee as default};

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.