PageSourceSearch

https://app.gamony.com/_next/static/chunks/086ii84be-8ji.js?dpl=dpl_Bp6nUEZBavkur2AMW3wJBqe8nq31

js gamony.com collected 2026-10-02 01:30:31 UTC 68,873 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96093,e=>{e.v({className:"lexend_1ad0960-module__E2KT9a__className"})},96920,e=>{e.v({className:"lato_b985aad2-module__2qqbFG__className"})},49710,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(18566),i=e.i(57688);e.i(93012);var s=e.i(2389),l=e.i(9115),n=e.i(42040),o=e.i(64825);let d=({isOpen:e,onClose:a,game:r})=>{if(!e)return null;let s=r||{title:"Game",imageUrl:"/gamePopup.webp",amount:"$50.00",url:"https://gamonynew.gameskite.com/play/guns-&-bottles-online?userid=123"},l=s.amount?s.amount.startsWith("$")?s.amount:`$${s.amount}`:null;return(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,t.jsxs)("div",{className:"bg-white rounded-2xl max-w-md w-full mx-4 relative",children:[(0,t.jsx)("button",{onClick:a,className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700 text-2xl z-10",children:"×"}),(0,t.jsx)("div",{className:"text-center pt-6 pb-4",children:(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-800",children:s.title})}),(0,t.jsx)("div",{className:"px-6 pb-4",children:(0,t.jsx)("div",{className:"rounded-xl overflow-hidden relative h-48",children:(0,t.jsx)(i.default,{src:s.imageUrl,alt:s.title,fill:!0,className:"object-cover",onError:e=>{e.target.src="/gamePopup.webp"}})})}),(0,t.jsx)("div",{className:"px-6 pb-4",children:(0,t.jsx)("button",{className:"w-full bg-[#0145F2] hover:bg-green-500 text-black font-semibold py-3 rounded-xl text-lg transition-colors border-[0.5px] border-black shadow-[2px_2px_0px_0px_#000000] disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>{s?.url&&window.open(s?.url,"_blank","noopener,noreferrer")},disabled:!s.url,children:l?`Play and earn ${l}`:s.url?"Play now":"Launch unavailable"})}),(0,t.jsx)("div",{className:"px-6 pb-6",children:(0,t.jsx)("p",{className:"text-gray-600 text-sm leading-relaxed",children:"Lorem ipsum dolor sit amet consectetur. Ornare aliquam sed cursus eu at iaculis morbi non massa. Mauris eu sed lacinia laoreet tristique. In libero eros ut elementum tempor lobortis suspendisse. In at massa eu eget sed a curabitur quis."})})]})})},c=({title:e,category:r,rating:s,imageUrl:l,amount:n,url:c})=>{let[u,m]=(0,a.useState)(!1),p=n?n.trim().startsWith("$")?n.trim():`$${n.trim()}`:null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:" p-2 relative bg-white rounded-xl shadow-[3px_4px_0px_0px_rgba(0,0,0,0.80)] outline-[0.60px] outline-black inline-flex justify-between items-center cursor-pointer",onClick:()=>{m(!0)},children:[(0,t.jsxs)("div",{className:"flex justify-start items-center gap-3",children:[(0,t.jsxs)("div",{className:"w-16 h-16 relative",children:[(0,t.jsx)(i.default,{className:"rounded-2xl",src:l,alt:e,width:64,height:64}),"number"==typeof s&&(0,t.jsxs)("div",{className:"px-1 left-[12.76px] top-[55.5px] absolute bg-orange-50 rounded-[20px] outline-[0.50px] outline-yellow-500 inline-flex justify-start items-center gap-1",children:[(0,t.jsx)(o.StarIcon,{className:"w-2.5 h-2.5 fill-yellow-500 text-yellow-500"}),(0,t.jsx)("div",{className:"justify-start text-yellow-500 text-[10px] font-medium leading-none",children:s.toFixed(1)})]})]}),(0,t.jsx)("div",{className:"w-32 inline-flex flex-col justify-start items-start gap-3.5",children:(0,t.jsxs)("div",{className:"self-stretch flex flex-col justify-start items-start",children:[(0,t.jsx)("div",{className:"self-stretch justify-start text-neutral-950 text-xl font-semibold leading-7 truncate",children:e}),(0,t.jsx)("div",{className:"self-stretch opacity-80 justify-start text-neutral-950 text-sm font-normal leading-tight",children:r??"Game"})]})})]}),(0,t.jsx)("div",{className:"w-20 h-20 right-0 absolute bg-[#72FF66] rounded-tr-xl rounded-br-xl flex items-center justify-center px-2",children:p?(0,t.jsxs)("div",{className:"text-neutral-950 text-center",children:[(0,t.jsx)("div",{className:"text-sm font-normal leading-none",children:"Earn upto"}),(0,t.jsx)("div",{className:"text-lg font-bold leading-tight",children:p})]}):(0,t.jsx)("div",{className:"text-neutral-950 text-sm font-semibold leading-tight",children:"Play now"})})]}),(0,t.jsx)(d,{isOpen:u,onClose:()=>{m(!1)},game:{title:e,imageUrl:l,amount:p??void 0,url:c}})]})};var u=e.i(16352),m=e.i(36998),p=e.i(71193);async function x(e){let t,a=await fetch("https://api.eclpse.in/v2/offerwalls/ranking",{cache:"no-store",headers:{...(t=e??(window.localStorage.getItem("token")||void 0))?{tokenkey:t}:{},...t?{Authorization:`Bearer ${t}`}:{}}});if(!a.ok)throw Error(`Offer-wall ranking fetch failed: ${a.status}`);return a.json()}e.i(47167);var f=e.i(78745),f=f,g=e.i(72464),h=e.i(60833),b=e.i(93220),y=e.i(60799);let w=e=>{if(!e)return;let t=new Image;t.referrerPolicy="no-referrer-when-downgrade",t.src=e},v=({description:e,name:r,image_url:i,click_url:l,creative_url:n,events:d,rating_count:c,payout:m,onClick:p,onStartOffer:x,targetOs:v,listPixelUrl:N,detailPixelUrl:k,cardVariant:j="default",ctaPrefix:_,onIssue:F})=>{let[S,I]=(0,a.useState)(!1),[C,E]=(0,a.useState)(!1),[A,U]=(0,a.useState)(""),O=(0,a.useRef)(null),M=(0,a.useRef)(!1),P=(0,g.useAtomValue)(h.currencyAtom),{t:R}=(0,s.useI18n)(),{showToast:$}=(0,y.useToast)(),D=(0,b.formatCurrencyFromUsd)(m??0,P,{minimumFractionDigits:2,maximumFractionDigits:2}),T=(0,b.formatCurrencyFromUsd)(m??0,P,{compact:!0,minimumFractionDigits:2,maximumFractionDigits:2}),z=n?.trim()||i,V="promoted"===j,L="ANDROID"===v?"Android":"IOS"===v?"iOS":"WEB"===v?"Desktop":null,q=async()=>
1{if(C)return;if(!l)return void F?.("missing_tracking_link");let e=(()=>{if("u"<typeof navigator)return"WEB";let e=navigator.userAgent;return/android/i.test(e)?"ANDROID":/iphone|ipad|ipod/i.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1?"IOS":"WEB"})();if(v&&v!==e){F?.("unsupported_device"),$({type:"info",message:R("ANDROID"===v?"home.offerRequiresAndroid":"IOS"===v?"home.offerRequiresIos":"home.offerRequiresDesktop"),durationMs:5e3});return}U(""),E(!0);let t=window.open("about:blank","_blank");t?t.opener=null:F?.("popup_blocked");try{if(!(await x?.()??!0)){t?.close(),U(R("home.offerExpired"));return}t?t.location.href=l:window.open(l,"_blank","noopener,noreferrer")}catch{t?.close(),F?.("start_error"),U(R("home.offerExpired"))}finally{E(!1)}};return(0,a.useEffect)(()=>{if(!N||!O.current)return;let e=null,t=new IntersectionObserver(([a])=>{a.isIntersecting&&!M.current?e=setTimeout(()=>{M.current=!0,w(N),t.disconnect()},3e3):e&&(clearTimeout(e),e=null)},{threshold:.5});return t.observe(O.current),()=>{e&&clearTimeout(e),t.disconnect()}},[N]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:O,className:`p-2 relative rounded-xl inline-flex justify-between items-center ${V?"bg-[#F7F1FF] shadow-[3px_4px_0px_0px_#0A0046] outline outline-1 outline-[#7A4FE4]":"bg-white shadow-[3px_4px_0px_0px_rgba(0,0,0,0.80)] outline-[0.60px] outline-black"}`,onClick:()=>{U(""),I(!0),w(k),p&&p()},role:"button",tabIndex:0,children:[(0,t.jsxs)("div",{className:"flex justify-start items-center gap-3 cursor-pointer",children:[(0,t.jsxs)("div",{className:"w-16 h-16 relative",children:[(0,t.jsx)("div",{className:"w-16 h-16 left-0 top-0 absolute rounded-2xl border border-black/30 overflow-hidden",children:(0,t.jsx)("div",{className:"w-full h-full bg-cover bg-center",style:{backgroundImage:`url(${z})`}})}),c&&(0,t.jsxs)("div",{className:"px-1 left-[12.76px] top-[55.50px] absolute bg-orange-50 rounded-[20px] outline-[0.50px] outline-yellow-500 inline-flex justify-start items-center gap-1",children:[(0,t.jsx)(o.StarIcon,{className:"w-2.5 h-2.5 fill-yellow-500 text-yellow-500"}),(0,t.jsx)("div",{className:"justify-start text-yellow-500 text-[10px] font-medium font-['Onest'] leading-none",children:c??""})]})]}),(0,t.jsx)("div",{className:"w-32 inline-flex flex-col justify-start items-start gap-3.5",children:(0,t.jsxs)("div",{className:"self-stretch flex flex-col justify-start items-start",children:[(0,t.jsx)("div",{className:"justify-start text-neutral-950 text-base font-semibold font-['Onest'] leading-5 line-clamp-1",children:r}),(0,t.jsx)("div",{className:"self-stretch opacity-80 justify-start text-neutral-950 text-xs font-normal font-['Onest'] leading-4 line-clamp-1 overflow-hidden",children:e}),L&&(0,t.jsx)("div",{className:"text-[11px] font-semibold leading-4 text-[#0145F2]",children:L})]})})]}),(0,t.jsx)("div",{className:`w-20 h-full right-0 absolute rounded-tr-xl rounded-br-xl flex items-center justify-center px-2 ${V?"bg-[#7A4FE4]":"bg-[#72FF66]"}`,children:(0,t.jsx)("div",{className:`w-full text-center font-bold font-['Onest'] leading-tight ${V?"text-xs text-white":"truncate whitespace-nowrap text-base text-[#090909]"}`,children:T})})]}),(0,t.jsx)(u.default,{isOpen:S,onClose:()=>I(!1),title:"",variant:"default",children:(0,t.jsxs)("div",{className:"mx-auto w-full max-w-xl sm:w-[90%] md:w-[400px] flex flex-col gap-4 p-2",children:[(0,t.jsx)("div",{className:"text-center text-2xl sm:text-3xl font-semibold leading-tight",children:r??"Offer"}),L&&(0,t.jsx)("div",{className:"text-center text-xs font-semibold text-[#0145F2]",children:L}),(0,t.jsxs)("div",{className:"relative w-full h-52 sm:h-64 md:h-64 rounded-xl overflow-hidden",children:[(0,t.jsx)("img",{src:z,alt:r??"offer bg",className:"absolute inset-0 w-full h-full object-cover filter blur-md scale-105"}),(0,t.jsx)("div",{className:"relative z-10 flex items-center justify-center w-full h-full",children:(0,t.jsx)("img",{src:z,alt:r??"offer image",className:"max-h-40 sm:max-h-52 w-full object-contain"})})]}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("button",{onClick:q,disabled:C,className:`w-full cursor-pointer font-semibold py-3 rounded-md text-sm sm:text-base disabled:cursor-wait disabled:opacity-70 ${V?"bg-[#7A4FE4] text-white shadow-[3px_4px_0px_0px_#0A0046] outline outline-1 outline-[#0A0046]":"bg-[#72FF66] text-black shadow-[3px_4px_0px_0px_rgba(0,0,0,0.80)] outline-[0.6px] outline-black"}`,children:C?R("home.checkingOffer"):`${_??"Play and earn"} ${D}`}),A&&(0,t.jsx)("p",{className:"mt-2 text-sm font-medium text-red-600",role:"alert",children:A})]}),(0,t.jsx)("div",{className:"text-sm sm:text-base font-medium text-[#111012] leading-6",children:e||"No description available for this offer."}),d&&d.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-lg font-bold text-center mb-2 text-[#111012]",children:"REWARDS"}),(0,t.jsx)("div",{className:"space-y-3",children:d.map((e,a)=>{let r="adscend"===e.provider&&!0===e.isCompleted;return(0,t.jsxs)("div",{className:`flex items-center justify-between rounded-md p-3 outline gap-3 transition-colors ${r?"bg-[#F1FFF0] outline-1 outline-[#43C43B]":"bg-white shadow-[3px_4px_0px_0px_rgba(0,0,0,0.80)] outline-[0.60px] outline-black"}`,children:[(0,t.jsx)("div",{className:`w-5 h-5 rounded-sm flex items-center justify-center text-xs sm:text-sm font-medium flex-shrink-0 ${r?"bg-[#43C43B] text-white":"bg-[#2D9EFF66] text-[#090909]"}`,"aria-label":r?R("missions.card.completed"):void 0,children:r?(0,t.jsx)(f.default,{className:"h-3.5 w-3.5",
1strokeWidth:3}):a+1}),(0,t.jsx)("div",{className:`flex-1 text-xs sm:text-sm break-words ${r?"font-medium text-[#21691C]":"text-[#090909]"}`,children:e.description||e.name||"No description available for this offer."}),(0,t.jsxs)("div",{className:"flex flex-shrink-0 flex-col items-end gap-1",children:[r&&(0,t.jsx)("span",{className:"text-[10px] font-bold uppercase leading-none text-[#25851E]",children:R("missions.card.completed")}),(0,t.jsx)("div",{className:"max-w-[5.5rem] truncate whitespace-nowrap rounded bg-[#72FF6680] px-3 py-1 text-xs font-semibold text-[#3A9A32] sm:text-sm",children:(0,b.formatCurrencyFromUsd)(e.payout??0,P,{compact:!0,minimumFractionDigits:2,maximumFractionDigits:2})})]})]},e.id)})})]})]})})]})};var N=e.i(88653),k=e.i(46932),j=e.i(96093);let _={className:j.default.className,style:{fontFamily:"'Lexend', 'Lexend Fallback'",fontStyle:"normal"}};null!=j.default.variable&&(_.variable=j.default.variable);var F=e.i(96920);let S={className:F.default.className,style:{fontFamily:"'Lato', 'Lato Fallback'",fontStyle:"normal"}};null!=F.default.variable&&(S.variable=F.default.variable);var I=e.i(83086),C=e.i(64030),E=e.i(75254);let A=(0,E.default)("user-round-cog",[["path",{d:"m14.305 19.53.923-.382",key:"3m78fa"}],["path",{d:"m15.228 16.852-.923-.383",key:"npixar"}],["path",{d:"m16.852 15.228-.383-.923",key:"5xggr7"}],["path",{d:"m16.852 20.772-.383.924",key:"dpfhf9"}],["path",{d:"m19.148 15.228.383-.923",key:"1reyyz"}],["path",{d:"m19.53 21.696-.382-.924",key:"1goivc"}],["path",{d:"M2 21a8 8 0 0 1 10.434-7.62",key:"1yezr2"}],["path",{d:"m20.772 16.852.924-.383",key:"htqkph"}],["path",{d:"m20.772 19.148.924.383",key:"9w9pjp"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}]]),U=(0,E.default)("wallet-cards",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2",key:"4125el"}],["path",{d:"M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21",key:"1dpki6"}]]);var O=e.i(37727),M=e.i(57951),P=e.i(34159);let R={en:{close:"Close tutorial",skip:"Skip tour",back:"Back",next:"Next",finish:"Finish",steps:[{eyebrow:"Start earning",title:"Trending near you",body:"Featured Offers highlights offers trending in your country. Start here to find popular ways to earn."},{eyebrow:"Main balance",title:"Your Volts wallet",body:"Volts are your main wallet coins. Every 1,000 Volts equals $1."},{eyebrow:"Keep progressing",title:"Level up with XP",body:"XP is your progress currency. Earn it to level up and unlock milestone rewards."},{eyebrow:"Make it yours",title:"Your profile & settings",body:"Open Profile to change language, country, currency, and other account settings."}]},es:{close:"Cerrar tutorial",skip:"Omitir recorrido",back:"Atrás",
1next:"Siguiente",finish:"Finalizar",steps:[{eyebrow:"Empieza a ganar",title:"Tendencias cerca de ti",body:"Ofertas destacadas muestra lo más popular en tu país. Empieza aquí para encontrar formas de ganar."},{eyebrow:"Saldo principal",title:"Tu cartera de Volts",body:"Los Volts son las monedas de tu cartera principal. Cada 1.000 Volts equivalen a $1."},{eyebrow:"Sigue avanzando",title:"Sube de nivel con XP",body:"La XP mide tu progreso. Gánala para subir de nivel y desbloquear premios."},{eyebrow:"Hazlo tuyo",title:"Tu perfil y ajustes",body:"Abre Perfil para cambiar idioma, país, moneda y otros ajustes."}]},pt:{close:"Fechar tutorial",skip:"Pular tour",back:"Voltar",next:"Próximo",finish:"Concluir",steps:[{eyebrow:"Comece a ganhar",title:"Em alta perto de você",body:"Ofertas em destaque mostra o que está em alta no seu país. Comece aqui para encontrar formas populares de ganhar."},{eyebrow:"Saldo principal",title:"Sua carteira de Volts",body:"Volts são as moedas da sua carteira principal. Cada 1.000 Volts equivalem a $1."},{eyebrow:"Continue avançando",title:"Suba de nível com XP",body:"XP é sua moeda de progresso. Ganhe XP para subir de nível e liberar recompensas."},{eyebrow:"Deixe do seu jeito",title:"Seu perfil e configurações",body:"Abra o Perfil para mudar idioma, país, moeda e outras configurações."}]},de:{close:"Tutorial schließen",skip:"Tour überspringen",back:"Zurück",next:"Weiter",finish:"Fertig",steps:[{eyebrow:"Verdienen starten",title:"Trends in deiner Nähe",body:"Hervorgehobene Angebote zeigt beliebte Angebote in deinem Land. Starte hier, um zu verdienen."},{eyebrow:"Hauptguthaben",title:"Deine Volts-Wallet",body:"Volts sind die Coins deiner Haupt-Wallet. 1.000 Volts entsprechen $1."},{eyebrow:"Fortschritt machen",title:"Mit XP aufsteigen",body:"XP ist deine Fortschrittswährung. Sammle XP für Level und Meilensteinbelohnungen."},{eyebrow:"Deine Auswahl",title:"Profil & Einstellungen",body:"Öffne das Profil, um Sprache, Land, Währung und weitere Einstellungen zu ändern."}]},fr:{close:"Fermer le tutoriel",skip:"Ignorer la visite",back:"Retour",next:"Suivant",finish:"Terminer",steps:[{eyebrow:"Commencez à gagner",title:"Tendances près de vous",body:"Les Offres en vedette présentent les offres populaires dans votre pays. Commencez ici pour gagner."},{eyebrow:"Solde principal",title:"Votre portefeuille Volts",body:"Les Volts sont les pièces de votre portefeuille principal. 1 000 Volts valent $1."},{eyebrow:"Continuez à progresser",title:"Montez de niveau avec l’XP",body:"L’XP mesure votre progression. Gagnez-en pour monter de niveau et débloquer des récompenses."},{eyebrow:"Personnalisez",title:"Votre profil et vos paramètres",body:"Ouvrez Profil pour modifier langue, pays, devise et autres paramètres."}]},tr:{close:"Tanıtımı kapat",skip:"Turu atla",back:"Geri",next:"İleri",finish:"Bitir",steps:[{eyebrow:"Kazanmaya başla",title:"Yakınındaki trendler",body:"Öne Çıkan Teklifler ülkenizde popüler olan teklifleri gösterir. Kazanmaya buradan başlayın."},{eyebrow:"Ana bakiye",title:"Volts cüzdanın",body:"Volts ana cüzdan coinlerinizdir. Her 1.000 Volts $1 değerindedir."},{eyebrow:"İlerlemeye devam et",title:"XP ile seviye atla",body:"XP ilerleme para biriminizdir. Seviye atlamak ve ödülleri açmak için XP kazanın."},{eyebrow:"Sana özel",title:"Profil ve ayarların",body:"Dil, ülke, para birimi ve diğer ayarlar için Profil’i açın."}]},it:{close:"Chiudi tutorial",skip:"Salta tour",back:"Indietro",next:"Avanti",finish:"Fine",steps:[{eyebrow:"Inizia a guadagnare",title:"Tendenze vicino a te",body:"Offerte in evidenza mostra le offerte popolari nel tuo paese. Inizia qui per guadagnare."},{eyebrow:"Saldo principale",title:"Il tuo portafoglio Volts",body:"I Volts sono le monete del portafoglio principale. Ogni 1.000 Volts equivale a $1."},{eyebrow:"Continua a progredire",title:"Sali di livello con XP",body:"XP misura i tuoi progressi. Guadagnala per salire di livello e sbloccare premi."},{eyebrow:"Personalizza",title:"Profilo e impostazioni",body:"Apri Profilo per cambiare lingua, paese, valuta e altre impostazioni."}]}}
1,$=[{target:"featured-offers",icon:I.Sparkles},{target:"wallet-balance",icon:U},{target:"xp-balance",icon:C.Trophy},{target:"profile-menu",icon:A}];function D(e,t,a){return Math.min(Math.max(e,t),Math.max(t,a))}function T(e){return Array.from(document.querySelectorAll(`[data-tour="${e}"]`)).find(e=>{let t=e.getBoundingClientRect(),a=window.getComputedStyle(e);return t.width>1&&t.height>1&&t.bottom>0&&t.right>0&&t.top<window.innerHeight&&t.left<window.innerWidth&&"none"!==a.display&&"hidden"!==a.visibility&&null!==e.offsetParent})??null}function z(e){let t=T(e);if(!t)return null;let a=t.getBoundingClientRect(),r=D(a.top-10,8,window.innerHeight-16),i=D(a.left-10,8,window.innerWidth-16),s=D(a.right+10,16,window.innerWidth-8),l=D(a.bottom+10,16,window.innerHeight-8);return{top:r,left:i,right:s,bottom:l,width:Math.max(0,s-i),height:Math.max(0,l-r)}}function V(){let{language:e}=(0,s.useI18n)(),r=R[e]||R.en,i=(0,a.useMemo)(()=>$.map((e,t)=>({...e,...r.steps[t]})),[r]),{user:l}=(0,M.useAuth)(),n=(0,a.useRef)(null),[o,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)(0),[m,x]=(0,a.useState)(null),[f,g]=(0,a.useState)(!1),h=i[c];(0,a.useEffect)(()=>{g(!0)},[]),(0,a.useEffect)(()=>{if(!f)return;let e=!1,t=0,a=!1,r=l?.uid||window.localStorage.getItem("userId");if(d(!1),u(0),x(null),!r)return;let i=()=>{t&&(window.clearTimeout(t),t=0)},s=()=>{e||!a||t||(0,P.isHomeTutorialDone)(r)||"done"===window.localStorage.getItem(P.SIGNUP_BONUS_SEEN_KEY)&&(t=window.setTimeout(()=>{e||(0,P.isHomeTutorialDone)(r)||d(!0)},450))},n=async()=>{if(i(),(0,P.isHomeTutorialDone)(r)){a=!0,(0,P.notifyOnboardingReady)(),window.localStorage.getItem("token")&&(0,p.updateFirstOfferStatus)({homeTutorialDone:!0}).catch(e=>{console.error("Failed to migrate tutorial completion",e)});return}let t=window.localStorage.getItem("token");if(t||l?.emailVerified===!1){if(t)try{let i=await (0,p.fetchFirstOfferStatus)(t);if(e)return;if(i.data?.homeTutorialDone===!0){(0,P.markHomeTutorialDone)(r),a=!0,(0,P.notifyOnboardingReady)();return}}catch(e){console.error("Failed to load tutorial completion",e)}a=!0,s()}},o=()=>{a=!1,n()};return n(),window.addEventListener(P.REQUIRED_PROFILE_SETUP_EVENT,s),window.addEventListener("gamony-session-refreshed",o),()=>{e=!0,i(),window.removeEventListener(P.REQUIRED_PROFILE_SETUP_EVENT,s),window.removeEventListener("gamony-session-refreshed",o)}},[f,l]),(0,a.useEffect)(()=>{if(!o||!h)return;let e=T(h.target);e?.scrollIntoView({behavior:"smooth",block:"featured-offers"===h.target?"center":"nearest",inline:"nearest"});let t=window.requestAnimationFrame(()=>{x(z(h.target))}),a=()=>x(z(h.target)),r=e&&"u">typeof ResizeObserver?new ResizeObserver(a):null,i=window.setTimeout(()=>{t=window.requestAnimationFrame(a)},280);return e&&r&&r.observe(e),window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),()=>{window.clearTimeout(i),window.cancelAnimationFrame(t),r?.disconnect(),window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0)}},[h,o]),(0,a.useEffect)(()=>{if(!o)return;let e=window.requestAnimationFrame(()=>n.current?.focus());return()=>window.cancelAnimationFrame(e)},[o,c]);let b=(0,a.useCallback)(()=>{let e=l?.uid||window.localStorage.getItem("userId");e&&(0,P.markHomeTutorialDone)(e),d(!1),(0,P.notifyOnboardingReady)(),window.localStorage.getItem("token")&&(0,p.updateFirstOfferStatus)({homeTutorialDone:!0}).catch(e=>{console.error("Failed to save tutorial completion",e)})},[l]);if((0,a.useEffect)(()=>{if(!o)return;let e=e=>{"Escape"===e.key&&b()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[b,o]),!f||!o||!h)return null;let y=window.innerWidth,w=window.innerHeight,v=Math.min(376,Math.max(260,y-24)),j=m?D(m.left+m.width/2-v/2,12,y-v-12):Math.max(12,(y-v)/2),F=m?w-m.bottom-14:0,I=m?m.top-14:0,C=m?F>=252?m.bottom+14:I>=252?m.top-252-14:Math.max(12,w-252-12):Math.max(12,(w-252)/2),E=h.icon,A=(c+1)/i.length*100;return(0,t.jsxs)("div",{"data-email-verification-suppress-gate":"active",className:"fixed inset-0 z-[1200]",role:"dialog","aria-modal":"true","aria-labelledby":"home-tutorial-title",onClick:e=>e.stopPropagation(),children:[m?(0,t.jsx)(k.motion.div,{className:"pointer-events-none fixed rounded-2xl border-2 border-[#FCFCFC]",initial:!1,animate:{top:m.top,left
1:m.left,width:m.width,height:m.height},transition:{type:"spring",stiffness:340,damping:32},style:{boxShadow:"0 0 0 9999px rgba(10, 0, 70, 0.78), 0 0 0 4px #0145F2, 0 14px 38px rgba(10, 0, 70, 0.28)"}}):(0,t.jsx)("div",{className:"pointer-events-none fixed inset-0 bg-[#0A0046]/80"}),(0,t.jsxs)(k.motion.div,{ref:n,tabIndex:-1,className:S.className+" fixed overflow-hidden rounded-2xl border-2 border-[#0A0046] bg-[#FCFCFC] shadow-[8px_8px_0_#0A0046] outline-none",style:{top:C,left:j,width:v},initial:{opacity:0,y:10,scale:.98},animate:{opacity:1,y:0,scale:1},transition:{duration:.22,ease:"easeOut"},children:[(0,t.jsx)("div",{className:"h-1.5 w-full bg-[#FFD84E]",children:(0,t.jsx)(k.motion.div,{className:"h-full bg-[#0145F2]",animate:{width:`${A}%`},transition:{duration:.22}})}),(0,t.jsxs)("div",{className:"p-4 sm:p-5",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(k.motion.div,{className:"grid h-11 w-11 shrink-0 place-items-center rounded-xl border-2 border-[#0A0046] bg-[#FFD84E] text-[#0145F2]",initial:{scale:.82,rotate:-6},animate:{scale:1,rotate:0},transition:{type:"spring",stiffness:420,damping:24},children:(0,t.jsx)(E,{className:"h-5 w-5",strokeWidth:2.2})},h.target),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("p",{className:_.className+" text-xs font-semibold text-[#0145F2]",children:h.eyebrow}),(0,t.jsxs)("span",{className:"text-xs font-bold text-[#0A0046]",children:[c+1," / ",i.length]})]}),(0,t.jsx)(N.AnimatePresence,{mode:"wait",initial:!1,children:(0,t.jsxs)(k.motion.div,{initial:{opacity:0,x:10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.16},children:[(0,t.jsx)("h2",{id:"home-tutorial-title",className:_.className+" mt-1 text-lg font-bold leading-tight text-[#0A0046]",children:h.title}),(0,t.jsx)("p",{className:"mt-1.5 text-sm leading-5 text-[#0A0046]",children:h.body})]},h.target)})]}),(0,t.jsx)("button",{type:"button",onClick:b,className:"grid h-8 w-8 shrink-0 place-items-center rounded-full text-[#0A0046] transition-colors hover:bg-[#FFD84E] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#0145F2]","aria-label":r.close,children:(0,t.jsx)(O.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("div",{className:"mt-4 flex gap-1.5","aria-hidden":"true",children:i.map((e,a)=>(0,t.jsx)("span",{className:"h-1.5 flex-1 rounded-full transition-colors duration-200",style:{backgroundColor:a<=c?"#0145F2":"#FFD84E"}},e.target))}),(0,t.jsxs)("div",{className:"mt-4 flex items-center justify-between gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:b,className:"rounded-lg px-2 py-2 text-sm font-bold text-[#0A0046] transition-colors hover:bg-[#FFD84E] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#0145F2]",children:r.skip}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[c>0&&(0,t.jsx)("button",{type:"button",onClick:()=>u(e=>Math.max(0,e-1)),className:"rounded-lg border-2 border-[#0A0046] bg-[#FFD84E] px-3.5 py-2 text-sm font-bold text-[#0A0046] transition-colors hover:brightness-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#0145F2]",children:r.back}),(0,t.jsx)("button",{type:"button",onClick:()=>{c>=i.length-1?b():u(e=>e+1)},className:"rounded-lg border-2 border-[#0A0046] bg-[#0145F2] px-4 py-2 text-sm font-bold text-[#FCFCFC] shadow-[3px_3px_0_#0A0046] transition-[transform,filter] hover:brightness-95 active:translate-x-px active:translate-y-px active:shadow-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#FFD84E] focus-visible:ring-offset-2",children:c===i.length-1?r.finish:r.next})]})]})]})]})]})}let L=(0,E.default)("badge-check",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),q=(0,E.default)("camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]),W=(0,E.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var B=e.i(63059),G=e.i(23934);let H=(0,E.default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var Z=e.i(81418),Y=e.i(61911);let X=(0,E.default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var J=e.i(62853);function K(){if("u"<typeof navigator)return"all";let e=navigator.userAgent.toLowerCase();return/iphone|ipad|ipod/.test(e)?"ios":/android/.test(e)?"android":"desktop"}function Q(e,t){return e?new Intl.DateTimeFormat(t,{dateStyle:"medium",timeStyle:"short"}).format(new Date(e)):""}function ee({coins:e}){let a=(0,g.useAtomValue)(h.currencyAtom),{t:r}=(0,s.useI18n)(),i=(0,b.formatCurrencyFromUsd)(e*J.COIN_TO_USD_RATE,a);return(0,t.jsx)("span",{className:"inline-flex whitespace-nowrap rounded-full bg-[#38ED6B] px-3 py-1.5 text-sm font-black text-black","aria-label":r("gtasks.rewardAria",{reward:i}),children:i})}function et({status:e}){let{t:a}=(0,s.useI18n)();if(!e)return null;let r="approved"===e?{icon:W,label:a("gtasks.approved"),classes:"bg-emerald-100 text-emerald-800"}:"rejected"===e?{icon:X,label:a("gtasks.rejected"),classes:"bg-red-100 text-red-700"}
1:"pending_review"===e||"approving"===e?{icon:G.Clock3,label:a("gtasks.underReview"),classes:"bg-amber-100 text-amber-800"}:{icon:G.Clock3,label:a("gtasks.inProgress"),classes:"bg-blue-100 text-blue-800"},i=r.icon;return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-bold ${r.classes}`,children:[(0,t.jsx)(i,{className:"h-3.5 w-3.5"}),r.label]})}function ea({onAvailabilityChange:e}){let{language:r,t:i}=(0,s.useI18n)(),[l,n]=(0,a.useState)([]),[o,d]=(0,a.useState)(!0),[c,m]=(0,a.useState)(""),[x,f]=(0,a.useState)(null),[g,h]=(0,a.useState)(!1),[b,y]=(0,a.useState)(""),[w,v]=(0,a.useState)({}),[N,k]=(0,a.useState)(""),[j,_]=(0,a.useState)([]),F=(0,a.useCallback)(async()=>{d(!0),m("");try{let t=await (0,p.fetchGTasks)(K());n(t.data?.items||[]),e?.(!!t.data?.hasLiveTasks),f(e=>e&&(t.data?.items||[]).find(t=>t._id===e._id)||null)}catch(e){m(e instanceof Error?e.message:(0,s.translate)(r,"gtasks.couldNotLoad"))}finally{d(!1)}},[r,e]);(0,a.useEffect)(()=>{F()},[F]);let S=x?.myReservation?.status==="active",I=x?.mySubmission,C=S&&!I,E=(0,a.useMemo)(()=>j.map(e=>({file:e,url:URL.createObjectURL(e)})),[j]);(0,a.useEffect)(()=>()=>E.forEach(e=>URL.revokeObjectURL(e.url)),[E]);let A=async()=>{if(x){h(!0),y("");try{await (0,p.startGTask)(x._id,K()),y(i("gtasks.slotReserved")),await F()}catch(e){y(e instanceof Error?e.message:i("gtasks.unableToReserve"))}finally{h(!1)}}},U=async()=>{if(!x||!j.length)return void y(i("gtasks.proofRequired"));h(!0),y("");try{await (0,p.submitGTask)(x._id,{details:w,note:N,files:j}),y(i("gtasks.proofSubmitted")),_([]),v({}),k(""),await F()}catch(e){y(e instanceof Error?e.message:i("gtasks.unableToSubmit"))}finally{h(!1)}};return o?(0,t.jsxs)("div",{className:"mt-6 grid gap-4 sm:grid-cols-2",children:[(0,t.jsx)("div",{className:"h-44 animate-pulse rounded-2xl bg-blue-100"}),(0,t.jsx)("div",{className:"h-44 animate-pulse rounded-2xl bg-slate-100"})]}):c?(0,t.jsxs)("div",{className:"mt-6 rounded-2xl border border-red-200 bg-red-50 p-4 text-sm text-red-700",children:[c,(0,t.jsx)("button",{className:"ml-2 font-bold underline",onClick:()=>void F(),children:i("gtasks.tryAgain")})]}):(0,t.jsxs)("section",{className:"mt-6",children:[(0,t.jsx)("div",{className:"mb-4 overflow-hidden rounded-2xl bg-[#0145F2] px-5 py-5 text-white sm:px-7",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-1 flex items-center gap-2 text-xs font-black uppercase tracking-[0.12em] text-[#FFD537]",children:[(0,t.jsx)(Z.ShieldCheck,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"break-words",children:i("gtasks.verified")})]}),(0,t.jsxs)("h2",{className:"text-xl font-black leading-tight font-['Onest'] sm:text-2xl",children:[(0,t.jsx)("span",{className:"text-[#FFD537]",children:"G"}),"Tasks"]}),(0,t.jsx)("p",{className:"mt-1 max-w-xl text-sm leading-5 text-white/80",children:i("gtasks.description")})]}),(0,t.jsx)("div",{className:"hidden rounded-2xl bg-white/10 p-3 sm:block",children:(0,t.jsx)(L,{className:"h-8 w-8 text-[#38ED6B]"})})]})}),l.length?(0,t.jsx)("div",{className:"grid gap-4 sm:grid-cols-2",children:l.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{f(e),y("")},className:"group overflow-hidden rounded-2xl border border-black/10 bg-white text-left transition hover:-translate-y-0.5 hover:border-[#0145F2]/50 hover:shadow-lg",children:[e.bannerUrl&&(0,t.jsx)("img",{src:e.bannerUrl,alt:"",className:"h-24 w-full object-cover"}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center overflow-hidden rounded-xl bg-[#FFD537]",children:e.logoUrl?(0,t.jsx)("img",{src:e.logoUrl,alt:"",className:"h-full w-full object-cover"}):(0,t.jsx)("span",{className:"text-xl font-black",children:"G"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsx)("h3",{className:"line-clamp-2 font-black text-[#090909]",children:e.title}),(0,t.jsx)(B.ChevronRight,{className:"h-5 w-5 shrink-0 text-[#0145F2] transition group-hover:translate-x-0.5"})]}),(0,t.jsx)("p",{className:"mt-1 line-clamp-2 text-xs text-gray-500",children:e.shortDe
1scription})]})]}),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)(ee,{coins:e.rewardCoins}),(0,t.jsx)(et,{status:e.mySubmission?.status||e.myReservation?.status})]}),(0,t.jsxs)("div",{className:"mt-3 flex items-start gap-2 text-xs leading-5 text-gray-500",children:[(0,t.jsx)(Y.Users,{className:"mt-0.5 h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:i("gtasks.usersCompleted",{completed:e.completedCount,capacity:e.capacity})})]}),(0,t.jsx)("div",{className:"mt-2 h-2 overflow-hidden rounded-full bg-gray-100",children:(0,t.jsx)("div",{className:"h-full rounded-full bg-[#38ED6B]",style:{width:`${Math.min(100,e.completedCount/Math.max(1,e.capacity)*100)}%`}})})]})]},e._id))}):(0,t.jsxs)("div",{className:"rounded-2xl border border-dashed border-blue-300 bg-white p-8 text-center",children:[(0,t.jsx)(Z.ShieldCheck,{className:"mx-auto h-9 w-9 text-[#0145F2]"}),(0,t.jsx)("h3",{className:"mt-3 break-words font-bold leading-snug",children:i("gtasks.emptyTitle")}),(0,t.jsx)("p",{className:"mt-1 text-sm leading-5 text-gray-500",children:i("gtasks.emptyDescription")})]}),(0,t.jsx)(u.default,{isOpen:!!x,onClose:()=>f(null),title:x?.title||"GTask",className:"max-w-xl",children:x&&(0,t.jsxs)("div",{className:"pb-[calc(env(safe-area-inset-bottom,0px)+0.5rem)] md:pb-0",children:[(0,t.jsxs)("div",{className:"rounded-2xl bg-[#0145F2] p-4 text-white",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 text-sm font-bold leading-5 text-[#FFD537]",children:i("gtasks.confirmedAfterApproval")}),(0,t.jsx)(ee,{coins:x.rewardCoins})]}),(0,t.jsx)("p",{className:"mt-3 text-sm text-white/85",children:x.description||x.shortDescription}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap gap-x-4 gap-y-2 text-xs text-white/75",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(G.Clock3,{className:"h-4 w-4 shrink-0"}),i("gtasks.estimatedMinutes",{minutes:x.estimatedMinutes})]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(Y.Users,{className:"h-4 w-4 shrink-0"}),i("gtasks.usersCompleted",{completed:x.completedCount,capacity:x.capacity})]})]})]}),!!x.instructions?.length&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("h4",{className:"font-black",children:i("gtasks.instructions")}),(0,t.jsx)("ol",{className:"mt-2 space-y-2",children:x.instructions.map((e,a)=>(0,t.jsxs)("li",{className:"flex gap-3 rounded-xl bg-gray-50 p-3 text-sm leading-5",children:[(0,t.jsx)("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-[#0145F2] text-xs font-black text-white",children:a+1}),(0,t.jsx)("span",{className:"min-w-0 break-words",children:e})]},`${e}-${a}`))})]}),I?(0,t.jsxs)("div",{className:"mt-4 rounded-2xl border border-gray-200 p-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)("h4",{className:"font-black",children:i("gtasks.yourSubmission")}),(0,t.jsx)(et,{status:I.status})]}),(0,t.jsx)("p",{className:"mt-2 text-xs text-gray-500",children:i("gtasks.submittedAt",{date:Q(I.createdAt,r)})}),I.reviewReason&&(0,t.jsx)("p",{className:`mt-3 break-words rounded-xl p-3 text-sm leading-5 ${"rejected"===I.status?"bg-red-50 text-red-700":"bg-gray-50"}`,children:I.reviewReason})]}):C?(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsx)("div",{className:"rounded-xl bg-blue-50 p-3 text-xs leading-5 text-blue-800",children:i("gtasks.reservedUntil",{date:Q(x.myReservation?.expiresAt,r)})}),x.launchUrl?(0,t.jsxs)("a",{href:x.launchUrl,target:"_blank",rel:"noopener noreferrer",className:"flex min-h-12 w-full items-center justify-center gap-2 rounded-xl bg-[#0145F2] px-4 py-3 text-center text-sm font-black leading-5 text-white transition hover:bg-[#003bd1] sm:text-base",children:[i("gtasks.launchTask")," ",(0,t.jsx)(H,{className:"h-4 w-4 shrink-0"})]}):(0,t.jsx)("div",{className:"rounded-xl bg-amber-50 p-3 text-sm font-bold leading-5 text-amber-800",children:i("gtasks.launchMissing")}),(x.requiredFields||[]).map(e=>{var a,r;let s;return(0,t.jsxs)("label",{className:"block",children:[(0,t.jsxs)("span",{className:"mb-1 block break-words text-sm font-bold leading-5",children:[(a=e.key,r=e.label,(s=`${a} ${r}`.toLowerCase()).includes("screenshot")||s.includes("screen shot")?i("gtasks.fields.screenshot"):s.includes("registered")&&s.includes("email")?i("gtasks.fields.registeredEmail"):s.includes("name")?i("gtasks.fields.name"):s.includes("email")?i("gtasks.fields.email"):r),e.required?" *":""]}),(0,t.jsx)("input",{type:e.type,value:w[e.key]||"",onChange:t=>v(a=>({...a,[e.key]:t.target.value})),className:"w-full rounded-xl border border-gray-300 px-3 py-2 text-sm outline-none focus:border-[#0145F2]"})]},e.key)}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"mb-1 block text-sm font-bold",children:i("gtasks.noteToReviewer")}),(0,t.jsx)("textarea",{rows:3,value:N,onChange:e=>k(e.target.value),className:"w-full rounded-xl border border-gray-300 px-3 py-2 text-sm outline-none focus:border-[#0145F2]"})]}),(0,t.jsxs)("label",{className:"flex min-h-14 cursor-pointer items-center justify-center gap-2 rounded-xl border-2 border-dashed border-blue-300 bg-blue-50 p-4 text-center text-sm font-bold leading-5 text-[#0145F2]",children:[(0,t.jsx)(q,{className:"h-5 w-5 shrink-0"}),(0,t.jsx)("span",{children:i("gtasks.addProof")}),(0,t.jsx)("input",{className:"sr-only",type:"file",accept:"image/jpeg,image/png,image/webp",multiple:!0,onChange:e=>_(Array.from(e.target.files||[]).slice(0,3))})]}),!!E.length&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-2",children:E.map(({file:e,url:a})=>(0,t.jsx)("img",{src:a,alt:i("gtasks.proofPreview"),className:"aspect-square rounded-xl object-cover"},`${e.name}-${e.lastModified}`))}),(0,t.jsx)("button",{disabled:g,onClick:()=>void U(),className:"sticky bottom-0 z-10 min-h-12 w-full rounded-xl bg-[#38ED6B] px-4 py-3 text-center text-sm font-black leading-5 text-black shadow-[0_-8px_18px_rgba(255,255,255,0.95)] disabled:opacity-50 md:static md:text-base md:shadow-none",children:g?i("gtasks.submitting"):i("gtasks.submitForReview")})]}):(0,t.jsx)("button",{disabled:g||!x.available,onClick:()=>void A(),className:"mt-4 min-h-12 w-full rounded-xl bg-[#38ED6B] px-4 py-3 text-center text-sm font-black leading-5 text-black disabled:cursor-not-allowed disabled:bg-gray-200 disabled:text-gray-500 sm:text-base",children:g?i("gtasks.reserving"):x.available?i("gtasks.startTask"):i("gtasks.taskFull")}),b&&(0,t.jsx)("p",{className:"mt-3 rounded-xl bg-gray-100 p-3 text-sm",children:b})]})})]})}function er(){let{t:e}=(0,s.useI18n)();return(0,t.jsxs)("section",{role:"status","aria-label":e("withdrawalNotice.aria"),className:"relative mb-3 flex min-h-[88px] w-full items-start gap-3 overflow-hidden rounded-2xl border border-[#D59A00]/40 bg-gradient-to-r from-[#FFF8D9] via-[#FFF0B8] to-[#FFE39A] px-4 py-3 text-[#261B00] shadow-[2px_3px_0px_0px_rgba(0,0,0,0.72)] sm:items-center md:min-h-[104px] md:gap-4 md:px-6 md:py-4",children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"grid h-11 w-11 shrink-0 place-items-center rounded-xl bg-[#6F45D8] text-2xl font-black text-white ring-4 ring-white/60 md:h-14 md:w-14 md:text-3xl",children:"Ξ"}),(0,t.jsxs)("span",{className:"relative z-10 min-w-0 flex-1 font-['Onest']",children:[(0,t.jsx)("span",{className:"block break-words text-base font-black leading-tight tracking-[-0.01em] sm:text-lg md:text-2xl",children:e("withdrawalNotice.title")}),(0,t.jsx)("span",{className:"mt-1 block break-words text-xs font-semibold leading-relaxed text-[#5A4300] sm:text-sm md:mt-1.5 md:text-base",children:e("withdrawalNotice.reason")})]}),(0,t.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-8 -top-10 h-24 w-24 rounded-full border-[14px] border-[#6F45D8]/10 md:h-32 md:w-32"})]})}function ei({count:e=6}){return Array.from({length:e},(e,a)=>(0,t.jsxs)("div",{"aria-hidden":"true",className:"flex h-20 items-center gap-3 rounded-xl bg-white p-2 outline-[0.60px] outline-gray-200",children:[(0,t.jsx)("div",{className:"h-16 w-16 shrink-0 rounded-2xl bg-gray-100"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,t.jsx)("div",{className:"h-5 w-28 max-w-full rounded bg-gray-100"}),(0,t.jsx)("div",{className:"h-4 w-24 max-w-full rounded bg-gray-100"})]}),(0,t.jsx)("div",{className:"h-8 w-16 shrink-0 rounded bg-gray-100"})]},`offer-placeholder-${a}`))}function es({label:e}){return(0,t.jsx)("div",{role:"status","aria-label":e,children:(0,t.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6 mt-6",children:(0,t.jsx)(ei,{})})})}let el=e=>`${e.provider}:${e.targetOs??"UNKNOWN"}:${e.id}`;async function en(e,t,a){await Promise.allSettled(e.map(async({provider:e,load:r})=>{try{t(e,await r())}catch(t){a(e,t)}}))}var eo=e.i(51190);let ed=[{rating:4.6,amount:"$5.00"},{rating:4.8,amount:"$6.50"},{rating:4.5,amount:"$4.25"},{rating:4.7,amount:"$8.10"}],ec=()=>(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[(0,t.jsx)("span",{className:"text-[#0145F2]",children:"Gamony"}),(0,t.jsx)("span",{className:"text-[#090909]",children:"welcome's India"}),(0,t.jsx)("span",{"aria-hidden":"true",children:"🇮🇳"})]}),eu=e=>`gamony_offer_click_history:${e}`,em=(e,t)=>
1{try{let a=new URL(e);return Object.entries(t).forEach(([e,t])=>{void 0!==t&&""!==t&&a.searchParams.set(e,String(t))}),a.toString()}catch{return e}},ep=(e,t,a)=>e?e.replaceAll("{user_id}",encodeURIComponent(t)).replaceAll("{index}",String(a)):null,ex=18,ef=e=>{let t=Number(e);return Number.isFinite(t)?t:0},eg=e=>Math.min(1,Math.max(0,e)),eh="notik-live-feed-script",eb=({userId:e})=>{let[r,i]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(e){var t;let e,a,r,s;return document.getElementById(eh)?void i(!0):(t=()=>{if(document.getElementById(eh))return void i(!0);let e=document.createElement("script");e.id=eh,e.type="module",e.src="https://notik.me/widgets/v1/notik-live-feed.js?v=1.5",e.async=!0,e.onload=()=>i(!0),document.body.appendChild(e)},e=null,a=null,r=!1,s=()=>{if(r)return;let i=window;if(i.requestIdleCallback){a=i.requestIdleCallback(t,{timeout:2500});return}e=window.setTimeout(t,1800)},"complete"===document.readyState?s():window.addEventListener("load",s,{once:!0}),()=>{if(r=!0,window.removeEventListener("load",s),null!==e&&window.clearTimeout(e),null!==a){let e=window;e.cancelIdleCallback?.(a)}})}},[e]),(0,t.jsx)("div",{className:"mt-4 min-h-[176px] w-full overflow-x-auto overflow-y-hidden pb-2",children:e&&r?a.default.createElement("notik-live-feed",{key:e,"api-key":"u28GhdCuXrtMJ0MweJL0w6mnYnvZP4Cn","pub-id":"J1cI","app-id":"lX34oCUyCE","user-id":e,layout:"horizontal",duration:"7d",limit:"6",title:"Trending","primary-color":"#0145f2","card-bg":"#36ff73","border-color":"#ededed",radius:"15px","card-width":"120px","card-height":"160px"}):(0,t.jsx)("div",{className:"flex h-[170px] w-full gap-3 overflow-hidden","aria-hidden":"true",children:Array.from({length:6},(e,a)=>(0,t.jsx)("div",{className:"h-40 min-w-28 animate-pulse rounded-[15px] bg-gray-100 motion-reduce:animate-none"},a))})})},ey=({games:e,featuredOffers:a,loadingSurveys:r,surveyError:i,onSurveyClick:n,partners:o,onPartnerClick:d})=>{let{t:c}=(0,s.useI18n)();return(0,t.jsx)("div",{className:"space-y-10 mt-6",children:(0,t.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:0===o.length?(0,t.jsx)("div",{className:"col-span-full text-center text-gray-500",children:c("home.offerPartnersLoading")}):o.map(e=>(0,t.jsx)(l.default,{name:e.name,image:e.image,logoBackground:e.logoBackground,logoPadding:e.logoPadding,description:e.description,cta:e.cta,badge:e.badge,highlight:e.highlight,disabled:!e.url,onClick:()=>d(e)},e.id))})})},ew=({games:e})=>{let a=e.slice(0,3);return 0===a.length?(0,t.jsx)("div",{className:"mt-6 text-center text-gray-500",children:"No games available right now."}):(0,t.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6 mt-6",children:a.map(e=>(0,t.jsx)(c,{title:e.title,category:e.category??"Game",rating:e.rating,imageUrl:e.imageUrl,amount:e.amount,url:e.url},e.id))})},ev=({featuredOffers:e,loadingSurveys:a,surveyError:r,onSurveyClick:i,onOfferStart:l,onOfferIssue:n,pendingCount:o=0})=>{let{t:d}=(0,s.useI18n)();return a?(0,t.jsxs)("div",{className:"flex justify-center items-center mt-10 text-gray-500",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-600 mr-3"}),d("home.loadingSurveys")]}):r?(0,t.jsx)("div",{className:"mt-6 text-red-600 bg-red-50 border border-red-100 rounded-lg p-4",children:r}):0===e.length?(0,t.jsx)("div",{className:"mt-6 text-center text-gray-500",children:d("home.noFeaturedOffersFound")}):(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6 mt-6",children:[e.map(e=>(0,t.jsx)(v,{id:e.id,description:e.description,name:e.name,image_url:e.image_url,click_url:e.click_url,creative_url:e.creative_url,events:e.events,rating_count:e.rating_count,payout:e.payout,provider:e.provider,targetOs:e.targetOs,listPixelUrl:e.listPixelUrl,detailPixelUrl:e.detailPixelUrl,cardVariant:e.cardVariant,ctaPrefix:e.ctaPrefix,onStartOffer:()=>l(e),onIssue:t=>n(e,t)},`${e.provider}:${e.targetOs??"UNKNOWN"}:${e.id}`)),o>0&&(0,t.jsx)(ei,{count:o})]})};e.s(["default",0,()=>{let e,{t:i}=(0,s.useI18n)();(0,r.useRouter)();let[l,o]=(0,a.useState)("featured-offers"),[d,c]=(0,a.useState)(null),[f,g]=(0,a.useState)("there"),[h,b]=(0,a.useState)(null),[y,w]=(0,a.useState)({key:"",raw:[],offers:[],loading:!0}),[v,N]=(0,a.useState)(!1),[k,j]=(0,a.useState)(null),[_,F]=(0,a.useState)(null),[S,I]=(0,a.useState)(null),[C,E]=(0,a.useState)(!1),[A,U]=(0,a.useState)(null),[O,M]=(0,a.useState)([]),[P,R]=(0,a.useState)([]),[$,D]=(0,a.useState)("random"),[T,z]=(0,a.useState)("ALL"),[L,q]=(0,a.useState)(!0),[W,B]=(0,a.useState)(!1),[G,H]=(0,a.useState)(!1),[Z,Y]=(0,a.useState)(!1),[X,J]=(0,a.useState)(0),K=JSON.stringify([d,T,W]),Q=(0,a.useMemo)(()=>y.key===K?y.offers:[],[y,K]),ee=y.key!==K||y.loading,[et,ei]=(0,a.useState)(!1),[eh,eN]=(0,a.useState)({}),ek=(0,a.useMemo)(()=>{let e,t;return d?(e=`gamony-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,t="https://notik.me/api-redirect?token=eyJpdiI6IkoxUGRYQWkrT01aMkVweFZ5bTQ4NVE9PSIsInZhbHVlIjoiWnpFY0JZUFF0ZTRPcXhqR3RwdURWZmQvWm1maUxjcWFhQWhFb1BvY0FveDRRT0wwd1FZVjN2ZDZGM3hSWUhZemg1WmV4OGhMN1Q3cW9jYjZLREZ3ZnFqMEs2eDBnVDVwRld1QkFUUkxjclA5N0JEcUppSGZRMExkNzFNYUVEalZuS25mdmJpZWxQU0JGSUdja203QjZUemtUUlNpM2FRUEVSRjZ1YStwc0paYTIwVjgydWpGNk5mU2JGQ3NaUzNJeCtsQnZNWk1KemJuRnNjdGM1cXNCNVczYnpCenpzZ0RjYlJCUzFJcWJ3TVRLL3hVR2UwczNZWkQ5VWhZRFJjRVZzcndWOUg2L1dabEdyaCtmVXR1Ukx5Mkk5akg4QUkyQzBvVU43THNBcTFaVVBlZXN2U3V4dEtBR2lDM1Ztb25qWEs5TU
1dZNGpVcFdxanV2OW0vbldFOWxRbS9mNEhMeVpWRmtURTlUb2g0Y3VMWURFWU5GbUlHUEI2eW9IR3gyUXQxYytxWUEzL0RIbkZzS282WVR1TC9iZ1hQRWVQMGdPVTZ3bmVHelpFbz0iLCJtYWMiOiIxMjk1YzE1YTA1OWRkMGJmZDdjYjM1MjMzN2YwNzVkYzNiYjNkMzU2YzYxNTg5NjUwNGRjMzU4NGI1MmFhMjI3IiwidGFnIjoiIn0=&user_id=J1cI_lX34oCUyCE_[user_id]".replace("[user_id]",encodeURIComponent(d)),`${t}&s1=${encodeURIComponent(e)}`):""},[d]);(0,a.useEffect)(()=>{if(!d)return;let e=window.navigator.userAgent.toLowerCase(),t=/iphone|ipad|ipod/.test(e)?"ios":/android/.test(e)?"android":"desktop",a=!0;return(0,p.fetchGTasks)(t).then(e=>{a&&ei(!!e?.data?.hasLiveTasks)}).catch(()=>{a&&ei(!1)}),()=>{a=!1}},[d]);let ej=(0,a.useMemo)(()=>{let e,t=W?Q.filter(e=>"mychips"!==e.provider):Q,a="random"===$?t:[...t].sort((e,t)=>{let a=e.payout??0,r=t.payout??0;return"high"===$?r-a:a-r});return d&&ek&&("br"===(e=h?.trim().toLowerCase())||"bra"===e||"brazil"===e||"brasil"===e)?[{id:"gamony-amazon-prime-video-br",name:"Amazon Prime Video",description:"Acesse sua conta do Prime Video e assista ao seu primeiro conteúdo.",image_url:"/modified_offer/amazon-prime-video.png",creative_url:"/modified_offer/amazon-prime-video.png",click_url:ek,payout:1.12,provider:"direct",completionProvider:"notik",cardVariant:"promoted",ctaPrefix:"Assistir e ganhar"},...a]:a},[Q,$,W,ek,h,d]),e_="in"===(e=h?.trim().toLowerCase())||"ind"===e||"india"===e;(0,a.useEffect)(()=>{let e=window.localStorage.getItem("token");b(window.localStorage.getItem("countryCode")),B("true"===window.localStorage.getItem("africanIpDetected"));let t="true"===window.localStorage.getItem(eo.HIGH_RISK_VPN_SURVEY_RESTRICTION_KEY);H(t),t&&Y(!0);let a=()=>{let e=window.localStorage.getItem("countryCode");e&&b(e)};window.addEventListener("storage",a),window.addEventListener("gamony-country-updated",a);let r=window.setInterval(a,1e3);if(!e)return()=>{window.clearInterval(r),window.removeEventListener("storage",a),window.removeEventListener("gamony-country-updated",a)};let i=!0,s=()=>x(e).then(e=>{if(!i)return;let t={};for(let a of e.data?.items??[]){let e=Number(a.rank);a.partnerId&&Number.isFinite(e)&&(t[a.partnerId]=e)}eN(t)});s().catch(()=>void 0);let l=window.setInterval(()=>void s().catch(()=>void 0),3e5),n=()=>(0,p.fetchUserDetail)(e).then(e=>{if(!i)return;let t=e?.data?.userId??e?.data?.user_id??e?.data?._id??e?.userId??e?.user_id??e?._id,a=e?.data?.displayName??e?.data?.name??e?.data?.username??e?.data?.first_name??e?.displayName??e?.name??e?.username??e?.first_name??e?.data?.email??e?.email;a&&g(String(a).split("@")[0]),t&&(window.localStorage.setItem("userId",String(t)),c(String(t)));let r=e?.data?.country_code??e?.data?.countryCode??e?.data?.country??e?.data?.country_name??e?.data?.countryName??e?.country_code??e?.countryCode??e?.country??e?.country_name??e?.countryName;r&&(window.localStorage.setItem("countryCode",String(r)),b(String(r))),(e?.data?.african_ip_detected||e?.data?.offer_restrictions?.african_ip_detected)&&(window.localStorage.setItem("africanIpDetected","true"),B(!0)),(0,eo.hasHighRiskVpnSurveyRestriction)(e?.data)?(window.localStorage.setItem(eo.HIGH_RISK_VPN_SURVEY_RESTRICTION_KEY,"true"),H(!0)):(window.localStorage.removeItem(eo.HIGH_RISK_VPN_SURVEY_RESTRICTION_KEY),H(!1)),Y(!0)}).catch(()=>{let e=window.localStorage.getItem("userId");e&&c(e),Y(!0)});n();let o=window.setTimeout(n,4e3);return()=>{i=!1,window.clearTimeout(o),window.clearInterval(r),window.clearInterval(l),window.removeEventListener("storage",a),window.removeEventListener("gamony-country-updated",a)}},[]);let eF=(0,a.useCallback)(e=>{try{let t=window.localStorage.getItem(eu(e)),a=t?JSON.parse(t):[];return Array.isArray(a)?a:[]}catch{return[]}},[]),eS=(0,a.useCallback)((e,t,a,r,i)=>{d&&(0,p.recordFeaturedOfferAnalyticsEvent)({eventType:t,offerId:e.id,offerName:e.name,provider:e.provider,completionProvider:e.completionProvider,reason:a||void 0,country:r,os:i,payoutUsd:e.payout}).catch(e=>{console.warn("Featured offer analytics event failed",e)})},[d]),eI=(0,a.useCallback)((e,t,a)=>{if(!d)return;let r={id:`${e.provider}-${e.id}-${Date.now()}`,provider:e.provider,offerId:e.id,offerName:e.name,description:e.description,imageUrl:e.creative_url??e.image_url,payoutUsd:e.payout,status:"clicked",country:t,os:a,clickedAt:new Date().toISOString()},i=eu(d),s=[r,...eF(d)].slice(0,100);window.localStorage.setItem(i,JSON.stringify(s)),M(s),eS(e,"clicked","",t,a)},[eF,eS,d]),eC=(0,a.useMemo)(()=>
1{if("ALL"!==T)return T},[T]);(0,a.useEffect)(()=>{if(!d)return;let e=!0,t=!1,a=0,r=async(r=!1)=>{if(d&&!t&&!(!r&&Date.now()-a<6e4)){t=!0;try{q(!0);let t=localStorage.getItem("countryCode")||"",a=[{provider:"adscend",load:async()=>{let e=await (0,p.fetchAdscendOffers)(d,t,T),a=e?.offers??[];return a.map((e,t)=>{let r=`${e.requirements??""} ${e.description??""}`;return{id:String(e.offer_id??e.id??`adscend-${t}`),name:e.name,description:e.description,image_url:e.image_url,click_url:e.click_url.replace("{user_id}",d),creative_url:e.creative_url,events:(e.events||[]).map(e=>({id:`adscend-${e.event_id}`,name:e.event_name,description:e.event_description,payout:e.event_revenue,currency_count:e.currency_count,estimated_time_to_complete:e.estimated_time_to_complete,time_to_complete:e.time_to_complete,time_to_complete_unit:e.time_to_complete_unit,isCompleted:1===Number(e.iscompleted),provider:"adscend"})),rating_count:e.rating_count,payout:e.payout,provider:"adscend",targetOs:e.gamony_target_os,quality:{isCpi:!!e.mobile_app||"18"===String(e.main_category_id),requiresSpend:/\b(?:purchase|deposit|subscribe|subscription|payment|credit card)\b/i.test(r),targetMatched:void 0===e.matches_target_system_detected||!0===e.matches_target_system_detected||1===e.matches_target_system_detected,conversionRate:ef(e.conversion_rate),epc:ef(e.epc),providerScore:a.length<=1?1:1-t/(a.length-1),isProviderFeatured:1===e.featured_global||1===e.featured_profile||1===e.lootup_featured_global,isFresh:!1}}})}},...W?[]:[{provider:"mychips",load:async()=>{var e;return(e=await (0,p.fetchMyChips)(eC,t),Array.isArray(e)?e:Array.isArray(e?.offers)?e.offers:[]).map((e,a)=>{let r=e.adset?.[0],i=a+1;if(!r||!e.trackingDetail?.trackingUrl)return null;let s=e=>{let a=ep(e,d,i);return a?em(a,{user_id:d,placement_id:i,aff_sub1:"featured_offers",aff_sub2:t||void 0,aff_sub3:T}):null},l=(e.events??[]).map(e=>({id:`mychips-${e.id}`,name:e.name,description:e.description?.[0]?.step||"Complete the offer to earn rewards",payout:e.userPayout??e.payout??0,currency_count:0,estimated_time_to_complete:0,time_to_complete:null,time_to_complete_unit:null,isCompleted:!1,provider:"mychips"}));return{id:e.id,name:r.title,description:r.description,image_url:r.icon,creative_url:r.creativeUrl?.trim()||r.icon,click_url:(({rawUrl:e,userId:t,country:a,os:r,position:i})=>{let s=`gm_${Date.now()}_${i}_${Math.random().toString(36).slice(2,10)}`;return em(ep(e,t,i)??e,{user_id:t,click_id:s,placement_id:i,aff_sub1:"featured_offers",aff_sub2:a||void 0,aff_sub3:r})})({rawUrl:e.trackingDetail.trackingUrl,userId:d,country:t,os:T,position:i}),payout:Number(l.reduce((e,t)=>e+(t.payout||0),0).toFixed(2)),events:l,provider:"mychips",targetOs:e.gamony_target_os,listPixelUrl:s(e.trackingDetail.listPixelUrl),detailPixelUrl:s(e.trackingDetail.detailPixelUrl),quality:{isCpi:e.biddingModel?.toUpperCase()==="CPI"||e.category?.toUpperCase()==="APPS"||e.subCategory?.toUpperCase()==="INSTALL",requiresSpend:/\b(?:purchase|deposit|subscribe|subscription|payment|credit card)\b/i.test(`${r.description??""} ${l.map(e=>e.description).join(" ")}`),targetMatched:!0,conversionRate:0,epc:0,providerScore:ef(e.score),isProviderFeatured:!1,isFresh:!!e.updateDate&&Date.now()-new Date(e.updateDate).getTime()<=12096e5}}}).filter(e=>!!e)}}]];await en(a,(t,a)=>{e&&w(e=>{let r,i=e.key===K,s=function(e,t,a){let r=new Map(a.map(e=>[el(e),e])),i=[];for(let a of e){if(a.provider!==t){i.push(a);continue}let e=r.get(el(a));e&&(i.push(e),r.delete(el(a)))}return[...i,...r.values()]}(i?e.raw:[],t,a),l=(e=>{if(0===e.length)return[];let t=Math.max(...e.map(e=>Math.log1p(Math.max(0,e.payout??0))),1),a=Math.max(...e.map(e=>Math.max(0,e.quality.providerScore)),1),r=e.filter(e=>e.quality.targetMatched).map(e=>{let r=Math.log1p(Math.max(0,e.payout??0))/t,i=eg(e.quality.conversionRate/.25),s=eg(e.quality.epc/.08),l=eg(e.quality.providerScore/a),n=e.quality.isFresh||e.quality.isProviderFeatured?1:0,o=30*i+25*s+20*!!e.quality.isCpi+10*l+10*r+5*n-35*!!e.quality.requiresSpend;return{offer:e,qualityScore:o}}).sort((e,t)=>t.qualityScore-e.qualityScore||(t.offer.payout??0)-(e.offer.payout??0)),i=[],s=new Set,l=(e,t=ex)=>{for(let{offer:a}of e){if(i.length>=t)break;let e=`${a.provider}:${a.targetOs??"UNKNOWN"}:${a.id}`;s.has(e)||(i.push(a),s.add(e))}};return l(r.filter(({offer:e})=>
1e.quality.isCpi&&!e.quality.requiresSpend&&(e.payout??0)>=.25)),l(r.filter(({offer:e})=>!e.quality.requiresSpend&&(e.payout??0)>=.25)),l(r.filter(({offer:e})=>!e.quality.requiresSpend&&(e.payout??0)>=.1)),l((e=>{let t=[...e];for(let e=t.length-1;e>0;e-=1){let a=Math.floor(Math.random()*(e+1));[t[e],t[a]]=[t[a],t[e]]}return t})(r.filter(({offer:e})=>{let t=`${e.provider}:${e.targetOs??"UNKNOWN"}:${e.id}`;return!s.has(t)&&e.quality.isCpi&&!e.quality.requiresSpend&&(e.payout??0)>=.05})),20),l(r.filter(({offer:e})=>{let t=`${e.provider}:${e.targetOs??"UNKNOWN"}:${e.id}`;return!s.has(t)}),20),i})((r=new Map,s.forEach(e=>{let t=e.name.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/g," ").replace(/\b(?:android|ios|iphone|ipad)\b$/,"").trim(),a=e.targetOs??"UNKNOWN",i=t?`${e.provider}:${a}:${t}`:`${e.provider}:${a}:${e.id}`,s=r.get(i);(!s||(e.payout??0)>(s.payout??0))&&r.set(i,e)}),Array.from(r.values())));return{key:K,raw:s,offers:function(e,t){let a=new Map(t.map(e=>[el(e),e])),r=[];for(let t of e){let e=el(t),i=a.get(e);i&&(r.push(i),a.delete(e))}return[...r,...a.values()]}(i?e.offers:[],l),loading:!i||e.loading}})},(t,a)=>{e&&console.error(`Failed to fetch ${t} offers`,a)})}catch(e){console.error("Failed to fetch offers",e)}finally{t=!1,a=Date.now(),e&&(q(!1),w(e=>e.key===K?{...e,loading:!1}:{key:K,raw:[],offers:[],loading:!1}))}}};r(!0);let i=()=>{"visible"===document.visibilityState&&r()},s=window.setInterval(()=>void r(),18e4);return window.addEventListener("focus",i),document.addEventListener("visibilitychange",i),()=>{e=!1,window.clearInterval(s),window.removeEventListener("focus",i),document.removeEventListener("visibilitychange",i)}},[d,eC,T,W,X,K]),(0,a.useEffect)(()=>{if("offer-history"!==l||!d)return;let e=!0;M(eF(d)),E(!0),U(null);let t=window.localStorage.getItem("token")||void 0;return Promise.allSettled([(0,p.orderHistory)(d),(0,p.fetchSurveyHistory)(t)]).then(([t,a])=>{if(e){var r;if("fulfilled"===t.status&&I(t.value),"fulfilled"===a.status&&R((r=a.value,(Array.isArray(r?.data?.items)?r.data.items:[]).map((e,t)=>({id:`survey-history-${e?.id??e?.surveyId??t}`,provider:"adscend_surveys",offerId:e?.surveyId,offerName:e?.surveyName??"Adscend Survey",description:e?.description,payoutUsd:Number.isFinite(Number(e?.payoutUsd))?Number(e.payoutUsd):void 0,status:e?.status??"clicked",clickedAt:e?.clickedAt})))),"rejected"===t.status&&"rejected"===a.status)throw t.reason}}).catch(t=>{e&&U(t instanceof Error?t.message:String(t))}).finally(()=>{e&&E(!1)}),()=>{e=!1}},[l,eF,d]);let eE=(0,a.useMemo)(()=>(0,m.MOCK_GAMES)(d).map((e,t)=>{let a=ed[t%ed.length];return{id:String(e.id),title:e.title,category:e.category,rating:a.rating,amount:a.amount,imageUrl:e.image,url:e.url}}),[d]),eA=(0,a.useMemo)(()=>{let e=d??"",t="allow-scripts allow-same-origin allow-forms allow-popups";return[{id:"wannads",name:"Wannads",description:i("partners.wannadsDescription"),url:e?`https://earn.wannads.com/wall?apiKey=60b0f563216c7352800888&userId=${e}`:null,image:"/offerwall-logos/wannads.webp",logoBackground:"#FFFFFF",logoPadding:"tight",cta:i("common.tryNow"),openInModal:!0,sandbox:t},{id:"lootably",name:"Lootably",description:i("partners.lootablyDescription"),url:e?`https://wall.lootably.com/?placementID=ckp3ncbrt002g01xlbnsnaeuk&sid=${e}`:null,image:"/offerwall-logos/lootably.webp",logoBackground:"#FFFFFF",logoPadding:"tight",cta:i("common.tryNow"),openInModal:!0,sandbox:t,allow:"clipboard-write"},{id:"monlix",name:"Monlix",description:i("partners.monlixDescription"),url:e?`https://offers.monlix.com/?appid=928878cc75723f98c84af498e3016626&userid=${e}&subid=${e}`:null,image:"/offerwall-logos/monlix.webp",logoBackground:"#FFFFFF",logoPadding:"tight",cta:i("common.tryNow"),badge:i("partnerBoost.boosted"),highlight:!0,openInModal:!0,sandbox:t},{id:"torox",name:"Torox",description:i("partners.toroxDescription"),url:e?`/api/offers/torox?uid=${encodeURIComponent(e)}`:null,image:"/offerwall-logos/torox.webp",logoBackground:"#24143D",logoPadding:"tight",cta:i("common.tryNow"),openInModal:!0,sandbox:t,allow:"clipboard-write",allowFullScreen:!0},{id:"notik",name:"Notik",description:i("partners.notikDescription"),url:e?`https://notik.me/coins?api_key=u28GhdCuXrtMJ0MweJL0w6mnYnvZP4Cn&pub_id=J1cI&app_id=lX34oCUyCE&user_id=${e}
1`:null,image:"/offerwall-logos/notik.webp",logoBackground:"#FFFFFF",cta:i("common.tryNow"),badge:i("partnerBoost.boosted"),highlight:!0,openInModal:!0,sandbox:t},{id:"mychips",name:"MyChips",description:i("partners.mychipsDescription"),url:e?`https://sdk.mychips.io/content?content_id=97583c18-6df8-4009-9e52-af46aac2b809&user_id=${e}&gender=&age=`:null,image:"/offerwall-logos/mychips.webp",logoBackground:"#FFFFFF",logoPadding:"tight",cta:i("common.tryNow"),openInModal:!0,sandbox:t},{id:"timewall",name:"Timewall",description:i("partners.timewallDescription"),url:e?`https://timewall.io/users/login?oid=29a864d62d9ae517&uid=${e}`:null,image:"/offerwall-logos/timewall.webp",logoBackground:"#FFFFFF",logoPadding:"tight",cta:i("common.open"),openInModal:!1},{id:"adscend",name:"Adscend Media",description:i("partners.adscendDescription"),url:e?`https://asmwall.com/adwall/publisher/116439/profile/19804?subid1=${e}`:null,image:"/offerwall-logos/adscend.webp",logoBackground:"#FFFFFF",logoPadding:"tight",cta:i("common.tryNow"),openInModal:!0,sandbox:t,allow:"camera https://asmwall.com; clipboard-write",allowFullScreen:!0},{id:"ayet",name:"Ayet Studios",description:i("partners.ayetDescription"),url:e?`https://offerwall.ayet.io/offers?adSlot=25464&externalIdentifier=${encodeURIComponent(e)}`:null,image:"/offerwall-logos/ayet.webp",logoBackground:"#FFFFFF",cta:i("common.tryNow"),openInModal:!0,sandbox:t},{id:"hangmyads",name:"Hang My Ads",description:i("partners.hangmyadsDescription"),url:e?`https://offerwall.hangmyads.com/offerwall.php?pubid=4173&subid=${e}&percent=750`:null,image:"/offerwall-logos/hangmyads.webp",logoBackground:"#142233",logoPadding:"tight",cta:i("common.open"),openInModal:!1},{id:"bestofferwall",name:"BestOfferWall",description:i("partners.bestOfferWallDescription"),url:e?`https://offerzone.bestofferwall.com/i.php?publisher=gm5060&userid=${encodeURIComponent(e)}`:null,image:"/offerwall-logos/bestofferwall.webp",logoBackground:"#FFFFFF",cta:i("common.open"),openInModal:!1}].filter(e=>!(W&&["mychips","wannads"].includes(e.id))&&(!!Z&&!G||"timewall"!==e.id)).map((e,t)=>({partner:e,defaultRank:t})).sort((e,t)=>(eh[e.partner.id]??Number.MAX_SAFE_INTEGER)-(eh[t.partner.id]??Number.MAX_SAFE_INTEGER)||e.defaultRank-t.defaultRank).map(({partner:e})=>e)},[d,i,W,G,Z,eh]),eU=e=>{F({url:e.hrefNew,title:e.title||"Survey",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups"})},eO=(0,a.useCallback)((e,t)=>{e.provider&&eS(e,"issue",t,window.localStorage.getItem("countryCode")||"",e.targetOs??T)},[T,eS]),eM=(0,a.useCallback)(async e=>{if(!e.provider||!e.click_url||!d)return!1;let t=window.localStorage.getItem("countryCode")||"";try{if("direct"!==e.provider&&!(await (0,p.validateFeaturedOfferAvailability)({provider:e.provider,offerId:e.id,userId:d,country:t,os:e.targetOs??T})).available)return eO(e,"offer_unavailable"),J(e=>e+1),!1}catch(t){eO(e,"availability_check_failed"),console.warn("Offer availability check failed",t)}return eI({id:String(e.id),name:e.name,description:e.description,image_url:e.image_url,click_url:e.click_url,creative_url:e.creative_url,events:e.events,rating_count:e.rating_count,payout:e.payout,provider:e.provider,targetOs:e.targetOs,listPixelUrl:e.listPixelUrl,detailPixelUrl:e.detailPixelUrl,completionProvider:e.completionProvider},t,e.targetOs??T),!0},[eO,eI,T,d]),eP=e=>{if(e.url){if(!1===e.openInModal)return void window.open(e.url,"_blank","noopener,noreferrer");F({url:e.url,title:e.name,sandbox:e.sandbox,allow:e.allow,allowFullScreen:e.allowFullScreen})}},eR=[{id:"featured-offers",label:i("home.featuredOffers")},{id:"all-offers",label:i("home.allOffers")},{id:"gtasks",label:i("home.gtasks"),live:et},{id:"offer-history",label:i("home.offerHistory")}],e$=(0,a.useMemo)(()=>{let e=new Set;return[...O,...P,...(Array.isArray(S)?S:Array.isArray(S?.transactions)?S.transactions:Array.isArray(S?.data)?S.data:[]).map((e,t)=>{let a=Number(e?.payout??e?.event_revenue??e?.revenue??e?.amount??0);return{id:`adscend-history-${e?.id??e?.transaction_id??t}`,provider:"adscend",offerId:e?.offer_id??e?.oid??e?.id,offerName:e?.offer_name??e?.name??e?.event_name??"Adscend offer",payoutUsd:Number.isFinite(a)?a:void 0,status:e?.
1status??e?.state??"credited",completedAt:e?.created_at??e?.credited_at??e?.date??e?.datetime}})].sort((e,t)=>{let a=new Date(e.clickedAt??e.completedAt??0).getTime();return new Date(t.clickedAt??t.completedAt??0).getTime()-a}).filter(t=>{let a=`${t.provider}:${t.offerId??t.id}`;return!e.has(a)&&(e.add(a),!0)})},[O,S,P]);return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"container",children:(0,t.jsx)("div",{className:"row",children:(0,t.jsxs)("div",{className:"col-md-12 pr-4 pl-4 md:pl-0",children:[(0,t.jsxs)("div",{className:"py-3 md:py-4",children:[(0,t.jsx)("p",{className:"text-sm font-medium leading-5 text-[#090909] md:text-base font-['Onest']",children:i("home.greeting",{name:f})}),e_?(0,t.jsx)("h1",{className:"mt-0.5 text-xl font-bold leading-tight md:text-3xl font-['Onest']",children:(0,t.jsx)(ec,{})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h1",{className:"mt-0.5 text-xl font-bold leading-tight text-[#0145F2] md:text-3xl font-['Onest']",children:i("home.welcome")}),(0,t.jsx)("p",{className:"mt-1 text-sm font-semibold leading-5 text-[#090909] md:text-lg font-['Onest']",children:i("home.tagline")})]})]}),(0,t.jsx)(er,{}),(0,t.jsx)(eb,{userId:d}),(0,t.jsxs)("div",{className:"mt-2 pb-8","data-tour":"featured-offers",children:[(0,t.jsx)(n.default,{tabs:eR,activeTab:l,onTabChange:o,tabtype:"home",sortOrder:$,setSortOrder:D,selectedOs:T,setSelectedOs:z,onRefreshOffers:()=>J(e=>e+1),refreshingOffers:L}),(()=>{switch(l){case"all-offers":return(0,t.jsx)(ey,{games:eE,featuredOffers:Q,loadingSurveys:v,surveyError:k,onSurveyClick:eU,partners:eA,onPartnerClick:eP});case"popular-games":return(0,t.jsx)(ew,{games:eE});case"gtasks":return(0,t.jsx)(ea,{onAvailabilityChange:ei});case"featured-offers":if(ee&&0===ej.length)return(0,t.jsx)(es,{label:i("home.loadingFeaturedOffers")});if(!ee&&0===ej.length)return(0,t.jsx)("div",{className:"text-gray-500 text-center mt-10",children:i("home.noFeaturedOffers")});return(0,t.jsx)(ev,{featuredOffers:ej,pendingCount:ee?Math.max(0,6-ej.length):0,loadingSurveys:v,surveyError:k,onSurveyClick:eU,onOfferStart:eM,onOfferIssue:eO});case"offer-history":return(0,t.jsx)("div",{className:"mt-6",children:C?(0,t.jsxs)("div",{className:"flex justify-center items-center gap-2 text-gray-500",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-blue-600"}),i("home.loadingOrderHistory")]}):A?(0,t.jsx)("div",{className:"text-red-600 bg-red-50 border border-red-100 rounded-lg p-4",children:A}):e$.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e$.map(e=>{let a;return(0,t.jsxs)("div",{className:"bg-white rounded-xl p-3 sm:p-4 shadow-[3px_4px_0px_0px_rgba(0,0,0,0.80)] outline-[0.6px] outline-black",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.imageUrl?(0,t.jsx)("img",{src:e.imageUrl,alt:e.offerName,className:"h-12 w-12 rounded-lg object-cover border border-black/10"}):(0,t.jsx)("div",{className:"h-12 w-12 rounded-lg bg-[#0145f2]/10 flex items-center justify-center text-[#0145f2] font-bold",children:"mychips"===e.provider?"M":"adscend_surveys"===e.provider?"S":"direct"===e.provider?"G":"A"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"font-semibold text-[#090909] line-clamp-1",children:e.offerName}),(0,t.jsxs)("div",{className:"text-xs sm:text-sm text-gray-500 capitalize",children:["direct"===e.provider?"Gamony":e.provider," • ",e.status]})]}),(0,t.jsxs)("div",{className:"text-right",children:[(0,t.jsx)("div",{className:"text-[#0145f2] font-bold",children:"number"==typeof(a=e.payoutUsd)&&Number.isFinite(a)?`$${a.toFixed(2)}`:"-"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:e.country||e.os?[e.country,e.os].filter(Boolean).join(" / "):"Offer"})]})]}),(0,t.jsx)("div",{className:"mt-2 text-xs text-gray-500",children:(e=>{if(!e)return"-";let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()})(e.clickedAt??e.completedAt)})]},e.id)})}):(0,t.jsx)("div",{className:"text-gray-500 text-center",children:i("home.noOrderHistory")})});default:return null}})()]})]})})}),(0,t.jsx)(u.default,{isOpen:!!_,onClose:()=>F(null),title:_?.title||"",variant:"fullscreen",children:_&&(0,t.jsx)("div",{className:"flex-1 min-h-0",children:(0,t.jsx)("iframe",{src:_.url,className:"w-full h-full min-h-[60vh] rounded-2xl border",sandbox:_.sandbox,allow:_.allow,allowFullScreen:_.allowFullScreen})})}),(0,t.jsx)(V,{})]})}],49710)}]);

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.