1import{C as S,j as e}from"./@wbk/hooks-BlLlWTp9.js";import{P as f,I as h,d as V,a0 as K,T as p,S as U,C as $,B as A}from"./@wbk/ui-Bq7l3oiK.js";import{W as E}from"./@wbk/config-CNzyBjC_.js";import{b as z,P as H,B as O,H as W,S as x,a as k,N as D,K as v,T as w,F as X,d as G}from"./TrustCard-CkTiyWLm.js";import{u as J,C as m}from"./react-hook-form-D_m77UuM.js";import{ck as Q}from"./@wbk/queue-DaHNt4dN.js";import"./vendor-Cc9w-i99.js";import{F as g,U as Y}from"./UploadBox-XPhwk9t-.js";import{u as q,T as Z}from"./react-i18next-Dxy0wzdl.js";import"./@wbk/svg-HUfKeBgT.js";import"./@wbk/logger-DfNVpG3P.js";import"./index-CriLyxpO.js";import"./i18next-Ce0fiPMx.js";import"./i18next-http-backend-C2uFdLra.js";import"./i18next-browser-languagedetector-Bv2FoO1s.js";import"./react-helmet-BcOPeyN0.js";import"./@wbk/analytics-DE0c17Pa.js";import"./@wbk/contentful-9uMqmgoA.js";import"./@wbk/auth-AbxUcDmb.js";import"./@wbk/currency-B7PYjEev.js";import"./@wbk/api-BgBdL-BO.js";import"./@wbk/ticketing-BIN3h7yH.js";import"./@wbk/payment-CMegBHo6.js";import"./@wbk/flights-zxddM6AH.js";import"./@wbk/hotels-5c6KxmYL.js";import"./@smc/ads-x_0QwEKi.js";import"./@wbk/auction-BYo4kjve.js";const ee=({form:t})=>{const{t:l}=q(["common"]),{mutateAsync:n,isPending:o,error:u,isSuccess:y}=Q(),{control:c,handleSubmit:F,reset:T,setValue:L,watch:I}=J({defaultValues:{event_name:"",suspicious_website_url:"",social_media_profile_link:"",marketplace_listing_link:"",contact_country:S.find(r=>r.code==="SA")||S[0],whatsapp_telegram_phone:"",images:[],description:"",did_you_pay:!1,payment_method:t.payment.options[0]||"",name:"",email_or_mobile:"",agreed_to_terms:!0}}),d=I("contact_country"),N=r=>({value:r,message:l("common:validation.max_length",{max:r})}),b=r=>i=>!i||i.length<=r||l("common:validation.max_length",{max:r}),B=r=>{if(!r)return!0;try{const i=new URL(r);return["http:","https:"].includes(i.protocol)||l("common:validation.invalid_value")}catch{return l("common:validation.invalid_value")}},C=async r=>{const i=new FormData;try{Object.entries(r).forEach(([a,s])=>{a==="images"||a==="contact_country"||(a==="payment_method"?i.append(a,s===t.payment.options[0]?"":String(s)):a==="agreed_to_terms"||a==="did_you_pay"?i.append(a,s?"1":"0"):a==="whatsapp_telegram_phone"?i.append(a,s?`+${r.contact_country.dial_code}${s}`:""):i.append(a,String(s)))}),r.images.forEach(a=>{i.append("images[]",a)}),await n({body:i}),T()}catch{}};return e.jsx(f,{className:"from-paper to-body-level-1 min-w-0 bg-gradient-to-b p-6 shadow-2xl shadow-black/30 md:p-8",rounded:!0,children:e.jsxs("form",{className:"space-y-4",noValidate:!0,onSubmit:F(C),children:[e.jsx(m,{name:"event_name",control:c,rules:{required:l("common:validation.required"),maxLength:N(255)},render:({field:{onChange:r,...i},fieldState:{error:a}})=>e.jsx(h,{...i,id:"report_event",label:e.jsx(g,{field:t.event,required:!0}),placeholder:t.event.placeholder,error:a==null?void 0:a.message,onChange:r})}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(m,{name:"suspicious_website_url",control:c,rules:{maxLength:N(2048),validate:B},render:({field:{onChange:r,...i},fieldState:{error:a}})=>e.jsx(h,{...i,id:"report_website",label:t.website.label,type:"url",placeholder:t.website.placeholder,error:a==null?void 0:a.message,onChange:r})}),e.jsx(m,{name:"social_media_profile_link",control:c,rules:{validate:b(2048)},render:({field:{onChange:r,...i},fieldState:{error:a}})=>e.jsx(h,{...i,id:"report_social",label:t.social.label,placeholder:t.social.placeholder,error:a==null?void 0:a.message,onChange:r})})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(m,{name:"marketplace_listing_link",control:c,rules:{validate:b(2048)},render:({field:{onChange:r,...i},fieldState:{error:a}})=>e.jsx(h,{...i,id:"report_marketplace",label:t.marketplace.label,type:"url",placeholder:t.marketplace.placeholder,error:a==null?void 0:a.message,onChange:r})}),e.jsx(m,{name:"whatsapp_telegram_phone",control:c,rules:{validate:r=>{var s,j,_;if(!r)return!0;if(`+${d.dial_code}${r}`.length>50)return l("common:validation.max_length",{max:50});if((s=d==null?void 0:d.mobile_starts_with)==null?void 0:s.length){const M=(j=d==null?void 0:d.mobile_starts_with)==null?void 0:j.some(R=>r.startsWith(R)),P=r.length>=Number((_=d==null?void 0:d.phone_number_lengths)==null?void 0:_[0]);return M&&P||l("common:validation.invalid_mobile")}return!0}},render:({field:{value:r,onChange:i,...a},fieldState:{error:s}})=>e.jsx(V,{...a,country:d,mobile:r,label:e.jsx(g,{field:t.contact}),onChange:(j,_)=>{j==="country"?L("contact_country",_,{shouldValidate:!0}):i(_)},error:s==null?void 0:s.message,placeholder:t.contact.placeholder})}
1,d==null?void 0:d.code)]}),e.jsx(m,{name:"images",control:c,rules:{validate:r=>{if(r.length>5)return l("common:validation.max_length",{max:5});const i=10240*1024,a=["image/png","image/jpg","image/jpeg","application/pdf"];return r.every(s=>a.includes(s.type)&&s.size<=i)||l("common:validation.invalid_value")}},render:({field:{onChange:r,value:i},fieldState:{error:a}})=>e.jsx(Y,{...t.image,value:i,error:a==null?void 0:a.message,disabled:o,onChange:r})}),e.jsx(m,{name:"description",control:c,rules:{required:l("common:validation.required"),minLength:{value:10,message:l("common:validation.min_length",{min:10})}},render:({field:{onChange:r,...i},fieldState:{error:a}})=>e.jsx(K,{...i,id:"report_description",label:e.jsx(g,{field:t.description,required:!0}),placeholder:t.description.placeholder,className:"min-h-32 resize-y p-3",error:a==null?void 0:a.message,onChange:r})}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(m,{name:"did_you_pay",control:c,rules:{validate:r=>typeof r=="boolean"||l("common:validation.required")},render:({field:{onChange:r,value:i}})=>e.jsxs("div",{children:[e.jsxs(p,{variant:"label-M",className:"mb-2",children:[t.paid.label," ",e.jsx("span",{className:"text-primary",children:"*"})]}),e.jsx("div",{className:"flex gap-5",children:[{value:!0,label:t.paid.yes},{value:!1,label:t.paid.no}].map(a=>e.jsxs("label",{className:"text-text-secondary flex cursor-pointer items-center gap-2",children:[e.jsx("input",{type:"radio",name:"paid",value:String(a.value),checked:i===a.value,onChange:()=>r(a.value),className:"accent-primary"}),a.label]},String(a.value)))})]})}),e.jsx(m,{name:"payment_method",control:c,rules:{validate:r=>!r||r===t.payment.options[0]||r.length<=100||l("common:validation.max_length",{max:100})},render:({field:{onChange:r,...i},fieldState:{error:a}})=>e.jsx(U,{...i,id:"report_payment",autoComplete:"off",label:e.jsxs(e.Fragment,{children:[t.payment.label," ",e.jsx("span",{className:"text-text-tertiary font-normal",children:t.payment.optional})]}),options:t.payment.options.map(s=>({id:s,value:s,text:s})),error:a==null?void 0:a.message,onChange:s=>r((s==null?void 0:s.value)||"")})})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(m,{name:"name",control:c,rules:{validate:b(255)},render:({field:{onChange:r,...i},fieldState:{error:a}})=>e.jsx(h,{...i,id:"report_name",label:e.jsx(g,{field:t.name}),placeholder:t.name.placeholder,error:a==null?void 0:a.message,onChange:r})}),e.jsx(m,{name:"email_or_mobile",control:c,rules:{validate:b(255)},render:({field:{onChange:r,...i},fieldState:{error:a}})=>e.jsx(h,{...i,id:"report_email",label:e.jsx(g,{field:t.email}),placeholder:t.email.placeholder,error:a==null?void 0:a.message,onChange:r})})]}),e.jsx(m,{name:"agreed_to_terms",control:c,rules:{validate:r=>r||l("common:validation.required")},render:({field:{onChange:r,value:i,...a},fieldState:{error:s}})=>e.jsx($,{...a,checked:i,label:e.jsx(p,{color:"text-secondary",children:t.consent}),groupClassName:"bg-paper-level-1 border-paper rounded-S border p-3",error:s==null?void 0:s.message,onChange:r})}),(y||u)&&e.jsx(p,{color:y?"success":"error",variant:"body-S",children:y?t.success:(u==null?void 0:u.message)||l("common:unknown_error")}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-1",children:[e.jsx(A,{type:"submit",phill:!0,className:"min-h-12 px-5",loading:o,children:t.submit}),e.jsx(z,{to:"/ticket-safety",variant:"secondary",children:t.secondary}),e.jsx(p,{color:"text-tertiary",variant:"body-XS",className:"sm:ms-auto",children:t.note})]})]})})},Fe=()=>{const{t}=q(["report_black_market"]),l=n=>t(`report_black_market:${n}`,{returnObjects:!0});return e.jsxs(e.Fragment,{children:[e.jsx(H,{title:t("report_black_market:seo.title"),description:t("report_black_market:seo.description"),canonical:t("report_black_market:seo.canonical")}),e.jsx(E,{children:e.jsxs("div",{className:"bg-body text-text overflow-x-clip",children:[e.jsx(O,{home:t("report_black_market:breadcrumbs.home"),parent:t("report_black_market:breadcrumbs.parent"),current:t("report_black_market:breadcrumbs.current")}),e.jsx(W,{eyebrow:t("report_black_market:hero.eyebrow"),titleKey:"report_black_market:hero.title",description:t("report_black_market:hero.description"),primary:l("hero.primary"),secondary:l("hero.secondary")}),e.jsxs(x,{children:[e.jsx(k,{kicker:t("report_black_market:what.kicker"),title:t("report_black_market:what.title")}),e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:l("what.items").map((n,o)=>e.jsxs("div",{className:"border-paper bg-paper rounded-S grid grid-cols-[32px_1fr] gap-3 border p-4",children:[e.jsx(D,{children:String(o+1).padStart(2,"0")}),e.jsxs("div",{className:"min-w-0",children:[e.jsx(p,{as:"h3",variant:"label-M",className:"break-words",children:n.title}),e.jsx(p,{color:"text-secondary",variant:"body-S",className:"break-words",children:n.description})]})]},o))})]}),e.jsx(x,{id:"report-form",children:e.jsxs("div",{className:"grid items-start gap-8 lg:grid-cols-[1fr_1.2fr] lg:gap-12",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(v,{children:t("report_black_market:formIntro.kicker")}),e.jsx(p,{as:"h2",variant:"heading-XL",children:t("report_black_market:formIntro.title")}),e.jsx(p,{color:"text-secondary",className:"mt-3 max-w-xl",children:t("report_black_market:formIntro.description")}),e.jsxs(f,{className:"mt-6",children:[e.jsx(v,{children:t("report_black_market:formIntro.noteKicker")}),e.jsx(p,{color:"text-secondary",variant:"body-S",children:e.jsx(Z,{i18nKey:"report_black_market:formIntro.note",children:e.jsx("a",{className:"text-primary",href:"#urgent",children:e.jsx(e.Fragment,{})})})})]})]}),e.jsx("div",{className:"min-w-0",children:e.jsx(ee,{form:l("form")})})]})}),e.jsxs(x,{children:[e.jsx(k,{kicker:t("report_black_market:timeline.kicker"),title:t("report_black_market:timeline.title")}),e.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:l("timeline.steps").map((n,o)=>e.jsx(w,{...n,number:o+1},o))})]}),e.jsxs(x,{children:[e.jsx(k,{kicker:t("report_black_market:not.kicker"),title:t("report_black_market:not.title")}),e.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:l("not.items").map((n,o)=>e.jsx(f,{children:e.jsxs(p,{children:[e.jsx("span",{className:"text-primary me-2 font-bold",children:"x"}),e.jsx("strong",{children:n.title})," ",n.description]})},o))})]}),e.jsx(x,{id:"urgent",children:e.jsxs(f,{className:"border-primary/40 from-primary/10 to-primary/5 rounded-M grid gap-5 bg-gradient-to-b p-7 md:grid-cols-[46px_1fr]",children:[e.jsx("span",{className:"bg-primary text-primary-contrast rounded-S flex h-12 w-12 items-center justify-center text-2xl font-bold",children:"!"}),e.jsxs("div",{children:[e.jsx(v,{children:t("report_black_market:urgent.kicker")}),e.jsx(p,{as:"h3",variant:"heading-M",className:"mb-3",children:t("report_black_market:urgent.title")}),e.jsx(p,{color:"text-secondary",className:"mb-4",children:t("report_black_market:urgent.description")}),e.jsx("ul",{className:"text-text-secondary list-disc space-y-2 ps-5",children:l("urgent.items").map(n=>e.jsx("li",{children:n},n))})]})]})}),e.jsx(x,{children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:l("privacy.cards").map((n,o)=>e.jsx(w,{...n},o))})}),e.jsxs(x,{children:[e.jsx(k,{kicker:t("report_black_market:faq.kicker"),title:t("report_black_market:faq.title")}),e.jsx(X,{items:l("faq.items"),answerKeyPrefix:"report_black_market:faq.items"})]}),e.jsx(G,{kicker:t("report_black_market:final.kicker"),title:t("report_black_market:final.title"),description:t("report_black_market:final.description"),primary:l("final.primary"),secondary:l("final.secondary")})]})})]})};export{Fe 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.