/
opt
/
canhelp
/
apps
/
web
/
.next
/
static
/
chunks
/
app
/
support
/
/opt/canhelp/apps/web/.next/static/chunks/app/support
mkdir
upload
Name
Size
Mode
Actions
page-f2d20ef0302d4794.js
14822
0644
edit
dl
rm
Edit:
/opt/canhelp/apps/web/.next/static/chunks/app/support/page-f2d20ef0302d4794.js
(14822B)
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6174],{2928:(e,r,t)=>{"use strict";t.d(r,{l:()=>f,$:()=>h});var n=t(4568),a=t(7620),o=(0,a.forwardRef)((e,r)=>{let{as:t="div",...a}=e;return(0,n.jsx)(t,{...a,ref:r})});let i="onloadTurnstileCallback",l=e=>!!document.getElementById(e),s={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}},c="unloaded",u,d=new Promise((e,r)=>{u={resolve:e,reject:r},"ready"===c&&e(void 0)}),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;return"unloaded"===c&&(c="loading",window[e]=()=>{u.resolve(),c="ready",delete window[e]}),d},p=(0,a.forwardRef)((e,r)=>{let{scriptOptions:t,options:u={},siteKey:d,onWidgetLoad:p,onSuccess:x,onExpire:f,onError:h,onBeforeInteractive:g,onAfterInteractive:v,onUnsupported:b,onTimeout:y,onLoadScript:w,id:j,style:E,as:N="div",injectScript:k=!0,rerenderOnCallbackChange:S=!1,...T}=e,C=u.size,I=(0,a.useCallback)(()=>void 0===C?{}:"execute"===u.execution?s.invisible:"interaction-only"===u.appearance?s.interactionOnly:s[C],[u.execution,C,u.appearance]),[A,P]=(0,a.useState)(I()),L=(0,a.useRef)(null),[R,O]=(0,a.useState)(!1),F=(0,a.useRef)(void 0),_=(0,a.useRef)(!1),B=j||"cf-turnstile",q=(0,a.useRef)({onSuccess:x,onError:h,onExpire:f,onBeforeInteractive:g,onAfterInteractive:v,onUnsupported:b,onTimeout:y});(0,a.useEffect)(()=>{S||(q.current={onSuccess:x,onError:h,onExpire:f,onBeforeInteractive:g,onAfterInteractive:v,onUnsupported:b,onTimeout:y})});let D=(null==t?void 0:t.id)||"cf-turnstile-script",H=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cf-turnstile-script",[r,t]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let r=()=>{l(e)&&t(!0)},n=new MutationObserver(r);return n.observe(document,{childList:!0,subtree:!0}),r(),()=>{n.disconnect()}},[e]),r}(D),W=(null==t?void 0:t.onLoadCallbackName)||"onloadTurnstileCallback",U=u.appearance||"always",z=(0,a.useMemo)(()=>{var e;return{sitekey:d,action:u.action,cData:u.cData,theme:u.theme||"auto",language:u.language||"auto",tabindex:u.tabIndex,"response-field":u.responseField,"response-field-name":u.responseFieldName,size:function(e){if("invisible"!==e&&"interactionOnly"!==e)return e}(C),retry:u.retry||"auto","retry-interval":u.retryInterval||8e3,"refresh-expired":u.refreshExpired||"auto","refresh-timeout":u.refreshTimeout||"auto",execution:u.execution||"render",appearance:u.appearance||"always","feedback-enabled":null==(e=u.feedbackEnabled)||e,callback:e=>{var r,t;_.current=!0,S?null==x||x(e):null==(r=(t=q.current).onSuccess)||r.call(t,e)},"error-callback":S?h:function(){for(var e,r,t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];return null==(e=(r=q.current).onError)?void 0:e.call(r,...n)},"expired-callback":S?f:function(){for(var e,r,t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];return null==(e=(r=q.current).onExpire)?void 0:e.call(r,...n)},"before-interactive-callback":S?g:function(){for(var e,r,t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];return null==(e=(r=q.current).onBeforeInteractive)?void 0:e.call(r,...n)},"after-interactive-callback":S?v:function(){for(var e,r,t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];return null==(e=(r=q.current).onAfterInteractive)?void 0:e.call(r,...n)},"unsupported-callback":S?b:function(){for(var e,r,t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];return null==(e=(r=q.current).onUnsupported)?void 0:e.call(r,...n)},"timeout-callback":S?y:function(){for(var e,r,t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];return null==(e=(r=q.current).onTimeout)?void 0:e.call(r,...n)}}},[u.action,u.appearance,u.cData,u.execution,u.language,u.refreshExpired,u.responseField,u.responseFieldName,u.retry,u.retryInterval,u.tabIndex,u.theme,u.feedbackEnabled,u.refreshTimeout,d,C,S,S?x:null,S?h:null,S?f:null,S?g:null,S?v:null,S?b:null,S?y:null]),M=(0,a.useCallback)(()=>"u">typeof window&&!!window.turnstile,[]);return(0,a.useEffect)(function(){k&&!R&&(m(W),(e=>{let{render:r="explicit",onLoadCallbackName:t=i,scriptOptions:{nonce:n="",defer:a=!0,async:o=!0,id:s="",appendTo:c,onError:u,crossOrigin:d=""}={}}=e,m=s||"cf-turnstile-script";if(l(m))return;let p=document.createElement("script");p.id=m,p.src="".concat("https://challenges.cloudflare.com/turnstile/v0/api.js","?onload=").concat(t,"&render=").concat(r),document.querySelector('script[src="'.concat(p.src,'"]'))||(p.defer=!!a,p.async=!!o,n&&(p.nonce=n),d&&(p.crossOrigin=d),u&&(p.onerror=u,delete window[t]),("body"===c?document.body:document.getElementsByTagName("head")[0]).appendChild(p))})({onLoadCallbackName:W,scriptOptions:{...t,id:D}}))},[k,R,t,D,W]),(0,a.useEffect)(function(){"ready"!==c&&m(W).then(()=>O(!0)).catch(console.error)},[W]),(0,a.useEffect)(function(){if(!L.current||!R)return;let e=!1;return(async()=>{e||!L.current||(F.current=window.turnstile.render(L.current,z),F.current&&(null==p||p(F.current)))})(),()=>{e=!0,F.current&&(window.turnstile.remove(F.current),_.current=!1)}},[B,R,z]),(0,a.useImperativeHandle)(r,()=>{let{turnstile:e}=window;return{getResponse:()=>(null==e?void 0:e.getResponse)&&F.current&&M()?e.getResponse(F.current):void console.warn("Turnstile has not been loaded"),async getResponsePromise(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return new Promise((t,n)=>{let a,o=async()=>{if(_.current&&window.turnstile&&F.current)try{let e=window.turnstile.getResponse(F.current);return a&&clearTimeout(a),e?t(e):n(Error("No response received"))}catch(e){return a&&clearTimeout(a),console.warn("Failed to get response",e),n(Error("Failed to get response"))}a||(a=setTimeout(()=>{a&&clearTimeout(a),n(Error("Timeout"))},e)),await new Promise(e=>setTimeout(e,r)),await o()};o()})},reset(){if(!(null==e?void 0:e.reset)||!F.current||!M())return void console.warn("Turnstile has not been loaded");"execute"===u.execution&&P(s.invisible);try{_.current=!1,e.reset(F.current)}catch(e){console.warn("Failed to reset Turnstile widget ".concat(F.current),e)}},remove(){if(!(null==e?void 0:e.remove)||!F.current||!M())return void console.warn("Turnstile has not been loaded");P(s.invisible),_.current=!1,e.remove(F.current),F.current=null},render(){if(!(null==e?void 0:e.render)||!L.current||!M()||F.current)return void console.warn("Turnstile has not been loaded or container not found");let r=e.render(L.current,z);return F.current=r,F.current&&(null==p||p(F.current)),"execute"!==u.execution&&P(C?s[C]:{}),r},execute:()=>"execute"!==u.execution?void console.warn('Execution mode is not set to "execute"'):(null==e?void 0:e.execute)&&L.current&&F.current&&M()?void(e.execute(L.current,z),P(C?s[C]:{})):void console.warn("Turnstile has not been loaded or container not found"),isExpired:()=>(null==e?void 0:e.isExpired)&&F.current&&M()?e.isExpired(F.current):(console.warn("Turnstile has not been loaded"),!1)}},[F,u.execution,C,z,L,M,R,p]),(0,a.useEffect)(()=>{if(R||!H)return;if(window.turnstile)return void O(!0);let e=setInterval(()=>{window.turnstile&&(O(!0),clearInterval(e))},50);return()=>{clearInterval(e)}},[R,H]),(0,a.useEffect)(()=>{P(I())},[u.execution,C,U]),(0,a.useEffect)(()=>{H&&"function"==typeof w&&w()},[H]),(0,n.jsx)(o,{ref:L,as:N,id:B,style:{...A,...E},...T})});p.displayName="Turnstile";let x="0x4AAAAAAC_FtTQJ0_6Cp9-9",f=!!x;function h(e){let{onSuccess:r,onError:t,onExpire:a}=e;return x?(0,n.jsx)(p,{siteKey:x,onSuccess:r,onError:t,onExpire:a,options:{theme:"light",language:"auto"}}):null}},5739:(e,r,t)=>{Promise.resolve().then(t.bind(t,9633))},7541:(e,r,t)=>{"use strict";var n=t(3041);t.o(n,"useParams")&&t.d(r,{useParams:function(){return n.useParams}}),t.o(n,"usePathname")&&t.d(r,{usePathname:function(){return n.usePathname}}),t.o(n,"useRouter")&&t.d(r,{useRouter:function(){return n.useRouter}}),t.o(n,"useSearchParams")&&t.d(r,{useSearchParams:function(){return n.useSearchParams}})},9633:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>m});var n=t(4568),a=t(7620),o=t(9664),i=t.n(o),l=t(9906),s=t(2928),c=t(2982);let u="info@canhelp.gr",d={el:{title:"Υποστήριξη CanHelp",intro:"Αν χρειάζεστε βοήθεια με την εφαρμογή, στείλτε μας email ή χρησιμοποιήστε τη φόρμα επικοινωνίας μέσα στην εφαρμογή.",points:["Περιγράψτε σύντομα το πρόβλημα και, αν γίνεται, επισυνάψτε στιγμιότυπο οθόνης.","Αν το ζήτημα αφορά σύνδεση, αναφέρετε τη συσκευή και την έκδοση της εφαρμογής.","Απαντάμε συνήθως μέσα σε 1-2 εργάσιμες ημέρες."]},en:{title:"CanHelp Support",intro:"If you need help with the app, email us or use the in-app contact form.",points:["Briefly describe the issue and attach a screenshot if possible.","If it is a login problem, include your device and app version.","We usually reply within 1-2 business days."]},ru:{title:"Поддержка CanHelp",intro:"Если вам нужна помощь с приложением, напишите нам на email или используйте форму связи в приложении.",points:["Кратко опишите проблему и, если возможно, приложите скриншот.","Если проблема со входом, укажите устройство и версию приложения.","Обычно мы отвечаем в течение 1-2 рабочих дней."]},uk:{title:"Підтримка CanHelp",intro:"Якщо вам потрібна допомога з додатком, напишіть нам на email або скористайтеся формою зв’язку в додатку.",points:["Коротко опишіть проблему та, якщо можливо, додайте скріншот.","Якщо проблема зі входом, вкажіть пристрій і версію додатка.","Зазвичай ми відповідаємо протягом 1-2 робочих днів."]}};function m(){var e;let{locale:r,t}=(0,l.Y)(),o=null!=(e=d[r])?e:d.en,[m,p]=(0,a.useState)(""),[x,f]=(0,a.useState)(""),[h,g]=(0,a.useState)(""),[v,b]=(0,a.useState)(""),[y,w]=(0,a.useState)(s.l?"":"dev"),[j,E]=(0,a.useState)(!1),[N,k]=(0,a.useState)(!1),[S,T]=(0,a.useState)("");async function C(e){e.preventDefault(),T(""),E(!0);try{await (0,c.O8)({name:m.trim(),email:x.trim(),subject:h.trim(),body:v.trim(),captchaToken:y}),k(!0)}catch(e){((null==e?void 0:e.message)||"").toLowerCase().includes("captcha")?(T("Security check failed. Please try again."),w("")):T("Failed to send message. Please try again.")}finally{E(!1)}}return(0,n.jsx)("main",{className:"py-12 px-4 sm:px-6",children:(0,n.jsxs)("div",{className:"max-w-3xl mx-auto bg-white rounded-2xl shadow-sm border border-gray-100 px-6 sm:px-10 py-10",children:[(0,n.jsx)("div",{className:"mb-6",children:(0,n.jsxs)(i(),{href:"/",className:"text-sm text-green-600 hover:underline",children:["← ",t("nav.home")]})}),(0,n.jsx)("h1",{className:"text-3xl font-extrabold text-gray-900 mb-3",children:o.title}),(0,n.jsx)("p",{className:"text-gray-600 leading-relaxed",children:o.intro}),(0,n.jsx)("div",{className:"mt-8 space-y-3",children:o.points.map(e=>(0,n.jsxs)("div",{className:"flex gap-3 items-start rounded-xl border border-gray-100 bg-gray-50 px-4 py-3 text-sm text-gray-700",children:[(0,n.jsx)("span",{className:"mt-0.5 h-2 w-2 rounded-full bg-green-500 shrink-0"}),(0,n.jsx)("span",{children:e})]},e))}),(0,n.jsxs)("div",{className:"mt-8 flex flex-col sm:flex-row gap-3 sm:items-center",children:[(0,n.jsx)("a",{href:"mailto:".concat(u),className:"inline-flex items-center justify-center rounded-xl bg-green-600 px-5 py-3 text-sm font-medium text-white hover:bg-green-700 transition",children:u}),(0,n.jsx)("span",{className:"text-sm text-gray-500",children:t("nav.privacy")})]}),(0,n.jsxs)("form",{onSubmit:C,className:"mt-10 space-y-4 rounded-2xl border border-gray-100 bg-gray-50 p-5 sm:p-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-1",children:"Send a message to support"}),(0,n.jsx)("p",{className:"text-sm text-gray-500",children:"We will forward it directly to the admin team."})]}),(0,n.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name"}),(0,n.jsx)("input",{value:m,onChange:e=>p(e.target.value),required:!0,minLength:2,maxLength:100,className:"w-full rounded-xl border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Your name"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),(0,n.jsx)("input",{type:"email",value:x,onChange:e=>f(e.target.value),required:!0,maxLength:200,className:"w-full rounded-xl border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"name@example.com"})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Subject"}),(0,n.jsx)("input",{value:h,onChange:e=>g(e.target.value),required:!0,minLength:3,maxLength:200,className:"w-full rounded-xl border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"What do you need help with?"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message"}),(0,n.jsx)("textarea",{value:v,onChange:e=>b(e.target.value),required:!0,minLength:10,maxLength:5e3,rows:6,className:"w-full rounded-xl border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-green-500 resize-none",placeholder:"Describe the problem in detail"})]}),(0,n.jsx)("div",{children:(0,n.jsx)(s.$,{onSuccess:w,onError:()=>w(""),onExpire:()=>w("")})}),S&&(0,n.jsx)("p",{className:"text-sm text-red-600",children:S}),N?(0,n.jsx)("div",{className:"rounded-xl border border-green-200 bg-green-50 px-4 py-3 text-sm text-green-800",children:"Your message has been sent."}):(0,n.jsx)("button",{type:"submit",disabled:j||s.l&&!y,className:"inline-flex w-full items-center justify-center rounded-xl bg-green-600 px-5 py-3 text-sm font-medium text-white hover:bg-green-700 disabled:opacity-50",children:j?"Sending...":"Send message"})]})]})})}}},e=>{e.O(0,[9664,9906,2982,587,18,7358],()=>e(e.s=5739)),_N_E=e.O()}]);
Save
cmd:
run