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C8L,EAAeA,U","sources":["webpack://_N_E/?c68a","webpack://_N_E/./src/components/Icon/IconArrow.tsx","webpack://_N_E/./src/components/PageHeader/BackButton.tsx","webpack://_N_E/./src/modules/Account/accountApi.ts","webpack://_N_E/./src/modules/Nav/directionStepStore.ts","webpack://_N_E/./src/components/Icon/IconWhatsapp.tsx","webpack://_N_E/./src/modules/Auth/AuthProvinceLoginApp.tsx","webpack://_N_E/./src/modules/Auth/AuthLoginForm.tsx","webpack://_N_E/./src/modules/Nav/BottomDirection.tsx","webpack://_N_E/./src/pages/login/index.tsx"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/login\",\n function () {\n return require(\"private-next-pages/login/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/login\"])\n });\n }\n ","import { useSystemStore } from \"components/PageHeader/systemStore\";\nimport React from \"react\";\n\ntype Props = {\n size?: number;\n color?: string;\n direction?: \"left\" | \"right\" | \"bottom\" | \"up\";\n isCaret?: boolean;\n isCircle?: boolean;\n className?: string;\n};\n\nexport const IconArrow: React.FC = ({\n size = 20,\n color = \"#19093A\",\n direction = \"left\",\n isCaret = false,\n isCircle = false,\n className = \"fill-purple50_to_white\",\n}) => {\n const theme = useSystemStore((state) => state.theme);\n switch (direction) {\n case \"left\":\n className = \"rotate-180\";\n break;\n case \"bottom\":\n className = \"rotate-90\";\n break;\n\n case \"up\":\n className = \"-rotate-90\";\n break;\n }\n return (\n \n {isCaret ? (\n \n ) : isCircle ? (\n \n ) : (\n \n )}\n \n );\n};\n","import React from \"react\";\n\nimport { IconArrow } from \"../Icon/IconArrow\";\n\nexport const BackButton: React.FC<{\n size?: number;\n backTo?: any;\n customClassName?: any;\n color?: string;\n}> = ({ size = 24, backTo = \"\", customClassName = \"\", color = \"#19093A\" }) => {\n return (\n \n \n \n );\n};\n","import { useApi } from \"lib/apiFetcher\";\n\nexport const useAccountGetProfileApi = () => useApi(\"get\", \"/profile\");\nexport const useAccountUpdateProfileApi = () => useApi(\"put\", \"/profile\");\nexport const useAccountUpdatePasswordApi = () =>\n useApi(\"put\", \"/profile/password\");\nexport const useAccountDeleteProfileApi = () => useApi(\"delete\", \"/profile\");\n","import createStore from \"zustand\";\n\nexport type DirectionStepStore = {\n // state\n step: number;\n data: any;\n\n // actions\n setStep: (b: number) => void;\n setData: (b: any) => void;\n};\n\nexport const useDirectionStepStore = createStore((set) => ({\n // state\n step: 1,\n data: {\n name: \"\",\n village: \"\",\n },\n\n // actions\n setStep(num) {\n set({ step: num });\n },\n setData(item) {\n set({ data: item });\n },\n}));\n","type Props = {\n size?: number;\n color?: string;\n};\n\nexport const IconWhatsapp: React.FC = ({\n size = 32,\n color = \"#FFFFFF\",\n}) => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { useEffect, useState } from \"react\";\nimport * as z from \"zod\";\nimport { useForm } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport FieldText from \"components/Form/FieldText\";\nimport Button from \"components/Button\";\nimport { useAuthSetLogin, useRedirectPreviousPath } from \"./authHooks\";\nimport { useRouter } from \"next/router\";\nimport { useAuthStore } from \"./authStore\";\nimport { useUserGetProfile } from \"modules/User/userApi\";\nimport useTranslation from \"next-translate/useTranslation\";\nimport { isBrowser } from \"lib/ssr\";\nimport { getSubDomain, isGateURL, useIsSubdomain, useIsTenant } from \"lib/host\";\nimport { AuthSocialButtonNew } from \"./AuthSocialButtonNew\";\nimport {\n useAuthAccountApi,\n useAuthMoodleApi,\n useAuthV2LoginApi,\n} from \"./authApi\";\nimport { useToastStore } from \"components/Toast/toastStore\";\nimport Autocomplete from \"react-autocomplete\";\nimport Modal from \"components/Modal\";\nimport { useDirectionStepStore } from \"modules/Nav/directionStepStore\";\nimport { BackButton } from \"components/PageHeader/BackButton\";\nimport { deleteCookie, getCookie, parseTokenSha1, setCookie } from \"lib/helper\";\nimport { useAccountUpdateProfileApi } from \"modules/Account/accountApi\";\nimport { useGetVillages } from \"modules/Tenant/homeTenantApi\";\nimport InputBase, { style as inputBaseStyle } from \"components/Form/InputBase\";\nimport { IconCheck } from \"components/Icon/IconCheck\";\nimport { IconWhatsapp } from \"components/Icon/IconWhatsapp\";\nimport { CONST } from \"lib/const\";\n\n// Ask id province from backend (add by hard code in frontend)\nconst ProvinceID = [\n {\n tenant: \"pesawarankab\",\n id: 18,\n regency_id: 1809,\n },\n {\n tenant: \"trenggalekkab\",\n id: 35,\n regency_id: 3503,\n },\n {\n tenant: \"maluku-gate\",\n id: 81,\n regency_id: 8102,\n },\n {\n tenant: \"muarojambikab\",\n id: 15,\n regency_id: 1505,\n },\n {\n tenant: \"jambikota\",\n id: 15,\n regency_id: 1571,\n },\n];\n\nexport const b2cSubdomain = [\"www\", \"localhost\"];\n// For Apple submission purpose (25 June 2024)\n// export const listSubdomainNoGoogleSignIn = ['gate','ares-gate']\nexport const listSubdomainNoGoogleSignIn = [\"gate\"];\n\n// TODO: Check the usage since make error\n// Hydration failed because the initial UI does not match what was rendered on the server.\nexport const AuthProvinceLoginApp: React.FC<{\n useRegister?: boolean;\n domainName?: string;\n useFieldOrganization?: boolean;\n ip_address?: string;\n userAgent?: string;\n}> = ({\n useRegister = true,\n domainName = \"\",\n useFieldOrganization = false,\n ...props\n}) => {\n const [isShowForgot, showForgot] = useState(false);\n const [isShowVerify, showVerify] = useState(false);\n const [step, setStep] = useState(1);\n const [currentLogin, setCurrentLogin] = useState({});\n const [totalErrorPwd, setTotalError] = useState(0);\n\n const LoginSchema: any = z.object({\n username: z.string().min(1, { message: \"Masukkan email/no.hp kamu\" }),\n password: z.string().min(8, { message: \"Kata sandi minimal 8 karakter\" }),\n });\n\n type FormData = z.infer;\n\n const hookLoginForm = useForm({\n resolver: zodResolver(LoginSchema),\n });\n\n return (\n
\n {\n {\n 1: (\n \n ),\n }[step]\n }\n
\n );\n};\n\nexport const FormLogin: React.FC<{\n showForgot?: any;\n setCurrentLogin?: any;\n handleUpdateStep?: any;\n domainName?: any;\n setTotalError?: any;\n totalErrorPwd?: any;\n showVerify?: any;\n}> = () => {\n const router = useRouter();\n const { t } = useTranslation(\"common\");\n\n const [currentToken, setCurrentToken] = useState(\"\");\n const [village, setVillage] = useState(\"\");\n const [messageError, setMessageError] = useState(null);\n const [villages, setVillages] = useState([]);\n const [isShow, setIsShow] = useState(false);\n const [isOpen, setIsOpen] = useState(false);\n const [step, setStep, data, setData] = useDirectionStepStore((state) => [\n state.step,\n state.setStep,\n state.data,\n state.setData,\n ]);\n const setLogin = useAuthStore((state) => state.setLogin);\n\n const authLoginRegisterApi = useAuthMoodleApi();\n const authSetLogin = useAuthSetLogin();\n const authStore = useAuthStore();\n const userGetProfile = useUserGetProfile();\n const accountUpdateProfile = useAccountUpdateProfileApi();\n const currentUser = useAuthStore((state) => state.currentUser);\n const isGate =\n typeof window !== \"undefined\" && isGateURL(window.location.hostname);\n\n const LoginSchema: any =\n step == 1\n ? z.object({\n username: z\n .string()\n .min(1, { message: \"Masukkan email/no.hp kamu\" })\n .refine(\n (value) => {\n const isPhoneValid = /^[0-9]{10,15}$/.test(value);\n const isEmailValid = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value);\n return isPhoneValid || isEmailValid;\n },\n {\n message: \"Mohon masukkan No.HP / Email yang benar.\",\n }\n ),\n })\n : step == 2\n ? z.object({\n name: z.string().min(1, { message: \"Masukkan nama kamu\" }),\n })\n : z.object({\n village: z.string().min(1, { message: \"Masukkan nama desa kamu\" }),\n });\n type FormData = z.infer;\n const hookLoginForm = useForm({\n resolver: zodResolver({ ...LoginSchema, mode: \"onChange\" }),\n });\n\n const { handleSubmit, watch } = hookLoginForm;\n const subDomain = isBrowser() ? getSubDomain(window.location.hostname) : null;\n\n const referralCode =\n getCookie(\"ref_code_gk\") && getCookie(\"ref_code_gk\") !== \"null\"\n ? getCookie(\"ref_code_gk\")\n : typeof window !== \"undefined\"\n ? new URLSearchParams(window.location.search).get(\"referral\")\n : \"\";\n\n useEffect(() => {\n if (watch(\"name\")) {\n setData({ ...data, name: watch(\"name\") });\n } else {\n setData({ ...data, name: \"\" });\n }\n }, [watch(\"name\")]);\n\n // STEP 1 : login/register user\n const loginRegisterUser = (data: FormData) => {\n let user = null;\n let userSplit = data?.username.split(\"\");\n if (userSplit[0] === \"6\" && userSplit[1] === \"2\") {\n user = data?.username.replace(\"62\", \"0\");\n } else {\n user = data?.username;\n }\n const tokenGenerated = parseTokenSha1(\n `${user}|4D6351655468576D5A7134743777217A25432A462D4A614E645267556A586E32`\n );\n const dataForm = !user.includes(\"08\")\n ? {\n referral:\n // referralCode == \"trenggalekkab\" ? referralCode\n // :\n subDomain,\n email: user,\n name: \"\",\n token: tokenGenerated,\n }\n : {\n referral:\n // referralCode == \"trenggalekkab\" ? referralCode\n // :\n subDomain,\n phone: user,\n name: \"\",\n token: tokenGenerated,\n };\n\n // @ts-ignore\n authLoginRegisterApi.doFetch(dataForm, {\n onSuccess(result: any) {\n if (result.is_register) {\n setCurrentToken(result?.token);\n getVillages();\n setStep(step + 1);\n } else {\n localStorage.setItem(\"token\", result.token);\n setCookie(\"token\", currentToken, 7, \"domain=gokampus.com\");\n userGetProfile.doFetch(\n {},\n {\n onSuccess(res: any) {\n if (res?.data?.name) {\n authStore.setLogin(res.data);\n router.push(\"/\");\n setStep(1);\n } else {\n setCurrentToken(result?.token);\n getVillages();\n setStep(step + 1);\n }\n },\n }\n );\n }\n },\n onError(err) {\n const error = err.getActualType();\n if ([409, 404, 403].includes(error?.status)) {\n hookLoginForm.setError(\"username\", {\n message: error.data?.message,\n });\n }\n },\n });\n };\n\n // STEP 3 : update profile if new registration\n const updateProfile = (f: FormData) => {\n setData({ ...data, name: f?.name });\n setStep(step + 1);\n };\n\n // STEP 4 : update profile village if new registration\n const updateProfileVillage = () => {\n if (!data.village) {\n setMessageError(\"Masukkan nama desa kamu\");\n } else {\n localStorage.setItem(\"token\", currentToken);\n setCookie(\"token\", currentToken, 7, \"domain=gokampus.com\");\n\n accountUpdateProfile.doFetch(data, {\n onSuccess(res: any) {\n authStore.setLogin(res.data);\n router.push(\"/\");\n setStep(1);\n },\n onError(err) {\n const error = err.getActualType();\n if ([409, 404, 403].includes(error?.status)) {\n hookLoginForm.setError(\"village\", {\n message: error.data?.message,\n });\n }\n },\n });\n }\n };\n\n const villageApi = useGetVillages();\n const getVillages = () => {\n villageApi.doFetch(\n {\n slug:\n window.location.hostname === \"e-learning.bluebirdgroup.com\"\n ? \"bluebird\"\n : // : referralCode == \"trenggalekkab\"\n // ? referralCode\n subDomain,\n province:\n // referralCode == \"trenggalekkab\"\n // ? ProvinceID.find((z) => z.tenant == referralCode)?.id\n // :\n ProvinceID.find((z) => z.tenant == subDomain)?.id,\n },\n {\n onSuccess(data: any) {\n const regency_id =\n // referralCode == \"trenggalekkab\"\n // ? ProvinceID.find((z) => z.tenant == referralCode)?.regency_id\n // :\n ProvinceID.find((z) => z.tenant == subDomain)?.regency_id;\n\n // if (referralCode == \"trenggalekkab\") {\n // if (\n // ProvinceID.find((z) => z.tenant == referralCode)?.id == 35 ||\n // ProvinceID.find((z) => z.tenant == referralCode)?.id == 18 ||\n // ProvinceID.find((z) => z.tenant == referralCode)?.id == 81 ||\n // ProvinceID.find((z) => z.tenant == referralCode)?.id == 15\n // ) {\n // setVillages(\n // data.data.filter((a) => a.district.regency.id == regency_id)\n // );\n // } else {\n // setVillages(data.data);\n // }\n // } else {\n if (\n ProvinceID.find((z) => z.tenant == subDomain)?.id == 35 ||\n ProvinceID.find((z) => z.tenant == subDomain)?.id == 18 ||\n ProvinceID.find((z) => z.tenant == subDomain)?.id == 81 ||\n ProvinceID.find((z) => z.tenant == subDomain)?.id == 15\n ) {\n setVillages(\n data.data.filter((a) => a.district.regency.id == regency_id)\n );\n } else {\n setVillages(data.data);\n }\n // }\n },\n }\n );\n };\n\n return (\n
\n {step === 1 && (\n <>\n
\n

Akses Kelas & Raih Sertifikat!

\n \n Masuk untuk mulai belajar.\n \n
\n\n {/* {listSubdomainNoGoogleSignIn.includes(subDomain) ? (\n <>\n ) : (\n
\n \n
\n )} */}\n \n )}\n
\n {step === 1 && (\n
\n
\n }\n inputStyle=\"!pl-42\"\n validator={{\n hook: hookLoginForm,\n }}\n />\n\n
\n
\n \n Oke\n \n
\n
\n \n\n {!isGate && (\n
\n \n
\n )}\n \n {listSubdomainNoGoogleSignIn.includes(subDomain) ? (\n <>\n ) : (\n
\n {/* */}\n
\n )}\n
\n )}\n\n {step === 2 && (\n
\n

\n Step {step - 1}/2\n

\n \n
\n
\n \n Oke\n \n
\n
\n \n )}\n\n {step === 3 && (\n
\n
\n

\n Step {step - 1}/2\n

\n setIsShow(true)}\n messageError={messageError}\n // validator={{\n // hook: hookLoginForm,\n // }}\n />\n
\n
\n \n Mulai Belajar\n \n
\n
\n
\n\n
\n

\n Step {step - 1}/2\n

\n {/* setIsOpen(true)}\n messageError={messageError}\n // validator={{\n // hook: hookLoginForm,\n // }}\n /> */}\n\n
\n \n
\n\n
\n b.name) {\n return 1;\n }\n return 0;\n })}\n getItemValue={(item) =>\n `${item.name}, ${item.district.name}, ${item.district.regency.name}`\n }\n shouldItemRender={(s, val) =>\n s.name.toLowerCase().indexOf(val.toLowerCase()) !== -1\n }\n renderMenu={(item) =>
{item}
}\n renderItem={(item, isHighlighted) => (\n \n {item.name}, {item.district.name},{\" \"}\n {item.district.regency.name}\n {isHighlighted && (\n
\n {/*
\n \n
*/}\n
\n )}\n
\n )}\n wrapperStyle={{ style: \"width:100%\" }}\n renderInput={(props) => (\n
\n setIsOpen(true)}\n placeholder=\"Ketik nama desa atau pilih opsi\"\n {...props}\n />\n
\n )}\n onChange={(e) => {\n setVillage(e.target.value);\n\n if (!e.target.value) {\n setData({\n ...data,\n village: \"\",\n });\n }\n }}\n onSelect={(val) => {\n const splittedValue = val.split(\",\")[0];\n setVillage(val);\n\n setData({\n ...data,\n village: villages.find((a) => a.name === splittedValue)\n ?.id,\n });\n // setIsShow(false);\n }}\n />\n
\n\n
\n
\n \n Mulai Belajar\n \n
\n
\n
\n
\n )}\n\n \n
\n
\n b.name) {\n return 1;\n }\n return 0;\n })}\n open\n getItemValue={(item) =>\n `${item.name}, ${item.district.name}, ${item.district.regency.name}`\n }\n shouldItemRender={(s, val) =>\n s.name.toLowerCase().indexOf(val.toLowerCase()) !== -1\n }\n renderMenu={(item) =>
{item}
}\n renderItem={(item, isHighlighted) => (\n \n {item.name}, {item.district.name},{\" \"}\n {item.district.regency.name}\n {isHighlighted && (\n
\n {/*
\n \n
*/}\n
\n )}\n
\n )}\n wrapperStyle={{ style: \"width:100%\" }}\n renderInput={(props) => (\n
\n setIsShow(false)} />\n \n
\n )}\n onChange={(e) => {\n setVillage(e.target.value);\n\n if (!e.target.value) {\n setData({\n ...data,\n village: \"\",\n });\n }\n }}\n onSelect={(val) => {\n const splittedValue = val.split(\",\")[0];\n setVillage(val);\n\n setData({\n ...data,\n village: villages.find((a) => a.name === splittedValue)?.id,\n });\n setIsShow(false);\n }}\n />\n
\n
\n \n \n \n );\n};\n","import { useState } from \"react\";\nimport * as z from \"zod\";\nimport { useForm } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\n\nimport FieldText from \"components/Form/FieldText\";\nimport FieldPassword from \"components/Form/FieldPassword\";\nimport Button from \"components/Button\";\nimport { AuthForgotPassword } from \"./AuthForgotPassword\";\nimport { useAuthV2LoginApi } from \"./authApi\";\nimport { useAuthSetLogin, useRedirectPreviousPath } from \"./authHooks\";\nimport Link from \"next/link\";\nimport { trackEvent, useTrackScreen } from \"lib/amplitude\";\nimport { AuthVerifyReset } from \"./AuthVerifyReset\";\nimport { AuthSocialButtonNew } from \"./AuthSocialButtonNew\";\nimport { useRouter } from \"next/router\";\nimport { useAuthStore } from \"./authStore\";\nimport { useUserGetProfile } from \"modules/User/userApi\";\nimport {\n getSubDomain,\n isGateURL,\n isMalukuURL,\n isPesawaranURL,\n useIsSubdomain,\n useIsTenant,\n} from \"lib/host\";\nimport { getCookie, setCookie } from \"lib/helper\";\nimport useTranslation from \"next-translate/useTranslation\";\nimport { isBrowser } from \"lib/ssr\";\nimport { CONST } from \"lib/const\";\nimport { AuthLoginApp } from \"./AuthLoginApp\";\nimport { AuthProvinceLoginApp } from \"./AuthProvinceLoginApp\";\nimport { BottomNav } from \"modules/Nav/BottomNav\";\n\n// TODO: Check the usage since make error\n// Hydration failed because the initial UI does not match what was rendered on the server.\nexport const AuthLoginForm: React.FC<{\n useRegister?: boolean;\n domainName?: string;\n ip_address?: string;\n userAgent?: string;\n}> = ({\n useRegister = true,\n domainName = \"\",\n ip_address = \"\",\n userAgent = \"\",\n}) => {\n const router = useRouter();\n const { redirect_uri } = router.query;\n\n const [isShowForgot, showForgot] = useState(false);\n const [isShowVerify, showVerify] = useState(false);\n const [totalErrorPwd, setTotalError] = useState(0);\n const isSubdomainTenant = useIsSubdomain();\n\n const authLoginApi = useAuthV2LoginApi();\n const authStore = useAuthStore();\n const userGetProfile = useUserGetProfile();\n\n // useTrackScreen({ event: \"signin_s\" });\n\n const { encodedPath } = useRedirectPreviousPath();\n\n const subDomain = isBrowser() ? getSubDomain(window.location.hostname) : null;\n const slug: string = CONST.IS_DEV ? \"ares-gate\" : \"gate\";\n\n const LoginSchema: any =\n subDomain !== slug\n ? z.object({\n username: z.string().min(1, { message: \"Masukkan email/no.hp kamu\" }),\n password: z\n .string()\n .min(8, { message: \"Kata sandi minimal 8 karakter\" }),\n })\n : z.object({\n username: z.string().min(1, { message: \"Masukkan email/no.hp kamu\" }),\n password: z\n .string()\n .min(8, { message: \"Kata sandi minimal 8 karakter\" }),\n referral: z.string().min(1, { message: \"Masukkan referral kamu\" }),\n });\n\n type FormData = z.infer;\n\n const hookForm = useForm({\n resolver: zodResolver(LoginSchema),\n });\n\n const { handleSubmit } = hookForm;\n\n const authSetLogin = useAuthSetLogin();\n const isB2B = useIsTenant() || useIsSubdomain();\n\n /**\n * onSubmit\n */\n const onSubmit = (data: FormData) => {\n let origin = \"reguler\";\n if (isB2B) {\n origin = \"business\";\n }\n\n trackEvent({ event: \"signin_a\", property: { is_success: undefined } });\n\n let body = {\n username: data.username,\n password: data.password,\n origin,\n };\n\n if (domainName && subDomain !== slug) {\n // should update object with 'referral' when subdomain customized,\n // if no have subdomain, it will login to gokampus's account\n (body as any).referral = domainName;\n } else if (subDomain === slug) {\n (body as any).referral = data.referral;\n }\n\n if (redirect_uri) {\n //@ts-ignore\n body.redirect_uri = redirect_uri;\n //@ts-ignore\n localStorage.setItem(\"redirect_uri\", redirect_uri);\n }\n\n authLoginApi.doFetch(body, {\n onSuccess(data) {\n //@ts-ignore\n if (data.redirect_uri) {\n //@ts-ignore\n localStorage.setItem(\"token\", data.access_token);\n //@ts-ignore\n setCookie(\"token\", data.access_token, 7);\n authStore.setLoading();\n userGetProfile.doFetch(\n {},\n {\n onSuccess(res) {\n authStore.setLogin(res.data);\n\n //@ts-ignore\n const directURL = data.redirect_uri + \"?code=\" + data.code;\n //@ts-ignore\n router.replace(directURL);\n },\n }\n );\n } else {\n authSetLogin(\n //@ts-ignore\n data.access_token,\n \"username\",\n \"signin_success_a\",\n null,\n domainName ? \"domain=gokampus.com\" : null\n );\n }\n },\n onError(err) {\n if (err instanceof authLoginApi.fetcher.Error) {\n const error = err.getActualType();\n\n if (error.status == 401) {\n setTotalError(totalErrorPwd + 1);\n\n if (totalErrorPwd == 3) {\n showVerify(true);\n } else {\n hookForm.setError(\"password\", {\n //@ts-ignore\n message: error.data?.message,\n });\n }\n } else if (error.status == 404 || 422) {\n // @ts-ignore\n if (error.data?.errors?.referral) {\n hookForm.setError(\"referral\", {\n //@ts-ignore\n message: error.data?.message,\n });\n } else {\n hookForm.setError(\"username\", {\n //@ts-ignore\n message: error.data?.message,\n });\n }\n }\n }\n },\n });\n // console.log('onSubmit', data);\n };\n\n const { t } = useTranslation(\"common\");\n\n const isGate =\n typeof window !== \"undefined\" && isGateURL(window.location.hostname);\n\n /* Allow user to input Referral manually */\n const listDomainShowReferralFieldOnSignUp = [\"zicare\", \"bluebird\"];\n\n // only for maluku tenant\n const isMalukuTenant =\n typeof window !== \"undefined\" && isMalukuURL(window.location.hostname);\n\n // only for pesawaran tenant\n const isPesawaranTenant =\n typeof window !== \"undefined\" && isPesawaranURL(window.location.hostname);\n\n /* Tenant subdomain new login v3 */\n const listProvince = [\n \"trenggalekkab\",\n \"pesawarankab\",\n \"muarojambikab\",\n \"jambikota\",\n ];\n\n const referralCode =\n getCookie(\"ref_code_gk\") && getCookie(\"ref_code_gk\") !== \"null\"\n ? getCookie(\"ref_code_gk\")\n : typeof window !== \"undefined\"\n ? new URLSearchParams(window.location.search).get(\"referral\")\n : \"\";\n\n return (\n \n {isMalukuTenant || listProvince.includes(subDomain) ? (\n // ||\n // referralCode == \"trenggalekkab\"\n \n ) : (\n \n )}\n \n );\n};\n","import Button from \"components/Button\";\nimport { IconArrow } from \"components/Icon/IconArrow\";\nimport { IconDashboard } from \"components/Icon/IconDashboard\";\nimport { IconHome } from \"components/Icon/IconHome\";\nimport { IconPlayCircle } from \"components/Icon/IconPlayCircle\";\nimport { IconSearch } from \"components/Icon/IconSearch\";\nimport { SkeletonRect, SkeletonWrapper } from \"components/Skeleton/Skeleton\";\nimport { trackEvent } from \"lib/amplitude\";\nimport { useIsSubdomain, useIsTenant } from \"lib/host\";\nimport { ReduceArrayFromDuplicate } from \"lib/object\";\nimport { useAccountUpdateProfileApi } from \"modules/Account/accountApi\";\nimport { useAuthStore } from \"modules/Auth/authStore\";\nimport useTranslation from \"next-translate/useTranslation\";\nimport { useRouter } from \"next/router\";\nimport { useEffect, useState } from \"react\";\nimport { useDirectionStepStore } from \"./directionStepStore\";\nimport { AuthLogoMaluku } from \"modules/Auth/AuthLogo\";\nimport { useSystemStore } from \"components/PageHeader/systemStore\";\n\nexport const iconColor = {\n default: \"#817E8C\",\n selected: \"#19093A\",\n};\n\nconst labelColor = {\n default: \"text-neutral-50 text-c1 font-light text-center\",\n selected: \"text-purple-80 text-c1 font-bold text-center\",\n};\n\nexport const BottomDirection = () => {\n const loginState = useAuthStore((state) => state.loginState);\n const [step, data, setStep] = useDirectionStepStore((state) => [\n state.step,\n state.data,\n state.setStep,\n ]);\n\n const { t } = useTranslation(\"common\");\n const accountUpdateProfile = useAccountUpdateProfileApi();\n const authStore = useAuthStore();\n const router = useRouter();\n const [theme] = useSystemStore((state) => [state.theme]);\n\n // STEP 4 : update profile village if new registration\n const updateProfileVillage = () => {\n accountUpdateProfile.doFetch(data, {\n onSuccess(res: any) {\n // localStorage.setItem(\"token\", currentToken);\n // setCookie(\"token\", currentToken, 7, \"domain=gokampus.com\");\n authStore.setLogin(res.data);\n setStep(1);\n router.push(\"/\");\n },\n });\n };\n\n return (\n <>\n \n \n );\n};\n","import {\n useTrackScreen,\n useTrackScreenGA,\n useTrackScreenGTM,\n} from \"lib/amplitude\";\nimport { useIsDesktop } from \"lib/device\";\nimport { AuthLayoutDesktop } from \"modules/Auth/AuthLayoutDesktop\";\nimport { GetServerSideProps } from \"next\";\nimport { AuthLoginForm } from \"modules/Auth/AuthLoginForm\";\nimport { getSubDomain } from \"lib/host\";\nimport { useAuthRedirectHomeWhenLogin } from \"modules/Auth/authHooks\";\nimport { SocialMeta } from \"modules/Meta/SocialMeta\";\nimport { isBrowser } from \"lib/ssr\";\nimport { checkTawkTo } from \"lib/tawk-to\";\nimport { useEffect } from \"react\";\nimport { useAuthStore } from \"modules/Auth/authStore\";\nimport { BottomDirection } from \"modules/Nav/BottomDirection\";\nimport { useDirectionStepStore } from \"modules/Nav/directionStepStore\";\nimport { getCookie } from \"lib/helper\";\n\nexport const getServerSideProps: GetServerSideProps = async (context) => {\n let ip: any;\n\n const { req } = context;\n\n const forwardedFor = req.headers[\"x-forwarded-for\"];\n const userAgent = req.headers[\"user-agent\"];\n\n if (forwardedFor) {\n if (Array.isArray(forwardedFor)) {\n ip = forwardedFor.at(0);\n } else {\n ip = forwardedFor?.split(\",\").at(0) ?? null;\n }\n } else if (req.headers[\"x-real-ip\"]) {\n ip = req.connection.remoteAddress;\n } else {\n ip = req.connection.remoteAddress;\n }\n\n return {\n props: {\n ip,\n userAgent,\n },\n };\n};\n\nconst Login: React.FC = (props) => {\n const isDesktop = useIsDesktop();\n useAuthRedirectHomeWhenLogin();\n //@ts-ignore\n const { ip, userAgent } = props;\n\n useTrackScreen({\n event: \"signin_s\",\n });\n useTrackScreenGTM({\n event: \"signin_s\",\n });\n useTrackScreenGA({\n event: \"signin_s\",\n });\n\n const subDomain = isBrowser() && getSubDomain(window.location.hostname);\n const currentUser = useAuthStore((state) => state.currentUser);\n const loginState = useAuthStore((state) => state.loginState);\n const step = useDirectionStepStore((state) => state.step);\n\n useEffect(() => {\n checkTawkTo(currentUser);\n }, []);\n\n const domain = typeof window !== \"undefined\" && window.location.hostname;\n const noRegisterSubdomain = [\"interagroup\", \"arwanacitra\", \"smartdesa\"];\n // const domain = typeof window !== \"undefined\" && window.location.hostname;\n // const noRegisterSubdomain = [\"interagroup\", \"arwanacitra\", \"smartdesa\"];\n\n const referralCode =\n getCookie(\"ref_code_gk\") && getCookie(\"ref_code_gk\") !== \"null\"\n ? getCookie(\"ref_code_gk\")\n : typeof window !== \"undefined\"\n ? new URLSearchParams(window.location.search).get(\"referral\")\n : \"\";\n\n return (\n
\n \n\n \n subDomain.includes(a))\n }\n domainName={\n // referralCode == \"trenggalekkab\" ? referralCode :\n subDomain\n }\n // useRegister={!noRegisterSubdomain.some((a) => domain.includes(a))}\n // domainName={getSubDomain(domain)}\n ip_address={ip}\n userAgent={userAgent}\n />\n \n {[2, 3].includes(step) && }\n
\n );\n};\n\nexport default Login;\n"],"names":["window","__NEXT_P","push","IconArrow","size","color","direction","isCaret","isCircle","className","theme","useSystemStore","state","svg","width","height","viewBox","fill","xmlns","path","d","stroke","strokeWidth","BackButton","backTo","customClassName","a","onClick","useAccountUpdateProfileApi","useApi","useAccountUpdatePasswordApi","useAccountDeleteProfileApi","useDirectionStepStore","createStore","set","step","data","name","village","setStep","num","setData","item","IconWhatsapp","g","clipPath","defs","id","rect","transform","ProvinceID","tenant","regency_id","listSubdomainNoGoogleSignIn","AuthProvinceLoginApp","useRegister","domainName","useFieldOrganization","props","isShowForgot","showForgot","useState","isShowVerify","showVerify","currentLogin","setCurrentLogin","totalErrorPwd","setTotalError","LoginSchema","z","username","min","message","password","useForm","resolver","zodResolver","div","FormLogin","handleUpdateStep","router","useRouter","t","useTranslation","currentToken","setCurrentToken","setVillage","messageError","setMessageError","villages","setVillages","isShow","setIsShow","isOpen","setIsOpen","authLoginRegisterApi","useAuthStore","setLogin","useAuthMoodleApi","authStore","useAuthSetLogin","userGetProfile","useUserGetProfile","accountUpdateProfile","isGate","currentUser","isGateURL","location","hostname","refine","value","isPhoneValid","test","isEmailValid","hookLoginForm","mode","handleSubmit","watch","subDomain","isBrowser","getSubDomain","getCookie","URLSearchParams","search","get","useEffect","updateProfileVillage","localStorage","setItem","setCookie","doFetch","onSuccess","res","onError","err","error","getActualType","includes","status","setError","villageApi","useGetVillages","getVillages","slug","province","find","filter","district","regency","p","span","form","onSubmit","user","userSplit","split","replace","tokenGenerated","parseTokenSha1","dataForm","referral","phone","token","email","result","is_register","FieldText","label","placeholder","iconBeforeInput","inputStyle","validator","hook","Button","type","isFull","isLoading","AuthSocialButtonNew","trackerId","f","additionalInfo","onFocus","Autocomplete","items","sort","b","getItemValue","shouldItemRender","s","val","toLowerCase","indexOf","renderMenu","renderItem","isHighlighted","wrapperStyle","style","renderInput","input","autoFocus","onChange","e","target","onSelect","splittedValue","Modal","contentClassName","open","AuthLoginForm","ip_address","userAgent","redirect_uri","query","encodedPath","useIsSubdomain","useAuthV2LoginApi","useRedirectPreviousPath","CONST","hookForm","useIsTenant","listDomainShowReferralFieldOnSignUp","isMalukuTenant","isMalukuURL","isPesawaranURL","AuthLoginApp","BottomDirection","loginState","nav","variant","undefined","useIsDesktop","useAuthRedirectHomeWhenLogin","ip","useTrackScreen","event","useTrackScreenGTM","useTrackScreenGA","checkTawkTo","SocialMeta","title","AuthLayoutDesktop","some"],"sourceRoot":""}