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nE,EAAAA,EAAAA,IAAOoE,EAAAA,GAAiBsB,QACpClI,MAAO,4DACN,CACDoD,SAASoE,EAAAA,EAAAA,KAAS,IAAM,EACtBQ,EAAAA,EAAAA,KAAiBN,EAAAA,EAAAA,IAAiBtG,EAAKe,GAAG,uBAAwB,MAEpEwF,EAAG,GACF,EAAG,CAAC,QACPlG,EAAAA,EAAAA,IAAoB,IAAKuD,GAAY0C,EAAAA,EAAAA,IAAiBtG,EAAKe,GAAG,mBAAoB,QAGtFwF,EAAG,OAGPA,EAAG,OAGPA,EAAG,OAGPA,EAAG,KAEJ,GAAG,CAER,IEvPA,MAAMzE,EAAc,EAEpB,O","sources":["webpack://ziadah/./src/components/input-fields/PasswordInput.vue?3bb9","webpack://ziadah/./src/components/input-fields/PasswordInput.vue","webpack://ziadah/./src/components/input-fields/PasswordInput.vue?7e5b","webpack://ziadah/./src/components/input-fields/InputText.vue?190b","webpack://ziadah/./src/components/input-fields/InputText.vue","webpack://ziadah/./src/components/input-fields/InputText.vue?1362","webpack://ziadah/./src/types/LoginTypes.ts","webpack://ziadah/./src/utils/auth/login.ts","webpack://ziadah/./src/views/auth/LoginPage.vue?1663","webpack://ziadah/./src/views/auth/LoginPage.vue","webpack://ziadah/./src/views/auth/LoginPage.vue?2f2c"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, vModelDynamic as _vModelDynamic, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"relative mt-1\" }\nconst _hoisted_2 = [\"placeholder\", \"type\", \"dir\"]\nconst _hoisted_3 = { class: \"absolute h-full top-0 ltr:right-4 rtl:left-4 flex justify-end align-center\" }\nconst _hoisted_4 = [\"src\"]\n\nimport { ref, computed } from 'vue';\nimport { DirectionsEnum, I18nLocalesEnum } from '@/types/i18n/i18n.enum';\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'PasswordInput',\n props: ['modelValue', 'field'],\n emits: ['update:modelValue'],\n setup(__props, { emit: __emit }) {\n\nconst showPassword = ref(false);\nconst props = __props;\nconst emit = __emit;\n\nconst value = computed({\n get() {\n return props.modelValue;\n },\n set(value) {\n emit('update:modelValue', value);\n },\n});\n\nconst showOrHidePassword = () => {\n showPassword.value = !showPassword.value;\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _withDirectives(_createElementVNode(\"input\", {\n class: _normalizeClass([\"font-ReadexPro w-full py-3 rounded-main border mt-1 max-h-[42px] placeholder-main-600 text-p4 font-400 focus:ring-0\", [_ctx.$props.field.$error ? 'border-red-500 placeholder-red-500' : '']]),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((value).value = $event)),\n onBlur: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.$props.field.$touch && _ctx.$props.field.$touch(...args))),\n placeholder: _ctx.$props.field.$error ? _ctx.$t('errors.invalidPassword') : '********************',\n type: showPassword.value ? 'text' : 'password',\n dir: _ctx.$i18n.locale === _unref(I18nLocalesEnum).EN ? _unref(DirectionsEnum).LTR : _unref(DirectionsEnum).RTL\n }, null, 42, _hoisted_2), [\n [_vModelDynamic, value.value]\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"img\", {\n src: showPassword.value ? require('@/assets/icons/eye-show.png') : require('@/assets/icons/eye-off.png'),\n class: \"w-[16px] h-[16px] hover:cursor-pointer\",\n onClick: showOrHidePassword\n }, null, 8, _hoisted_4)\n ])\n ]))\n}\n}\n\n})","\n\n\n \n \n\n \n \n \n \n\n\n\n","import script from \"./PasswordInput.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./PasswordInput.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, vModelDynamic as _vModelDynamic, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"relative mt-1\" }\nconst _hoisted_2 = [\"placeholder\", \"type\", \"dir\"]\n\nimport { computed } from 'vue';\nimport { DirectionsEnum, I18nLocalesEnum } from '@/types/i18n/i18n.enum';\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'InputText',\n props: {\n modelValue: {\n type: String as any,\n default: '',\n required: true,\n },\n field: {\n type: Object as () => any,\n default: Object,\n required: true,\n },\n placeholder: {\n type: String as any,\n default: '',\n required: false,\n },\n errorMessage: {\n type: String as any,\n default: '',\n required: false,\n },\n type: {\n type: String,\n default: 'text',\n required: false,\n },\n},\n emits: ['update:modelValue'],\n setup(__props, { emit: __emit }) {\n\nconst props = __props;\nconst emit = __emit;\n\nconst value = computed({\n get() {\n return props.modelValue;\n },\n set(value) {\n emit('update:modelValue', value);\n },\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _withDirectives(_createElementVNode(\"input\", {\n class: _normalizeClass([\"font-ReadexPro w-full py-3 rounded-main border mt-1 max-h-[42px] placeholder-main-600 text-p4 font-400 focus:ring-0\", [_ctx.$props.field.$error ? 'border-red-500 placeholder-red-500' : '']]),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((value).value = $event)),\n onBlur: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.$props.field.$touch && _ctx.$props.field.$touch(...args))),\n placeholder: _ctx.$props.field.$error ? _ctx.$props.errorMessage || _ctx.$props.field.$errors[0].$message : _ctx.$props.placeholder,\n type: _ctx.$props.type || 'text',\n dir: _ctx.$i18n.locale === _unref(I18nLocalesEnum).EN ? _unref(DirectionsEnum).LTR : _unref(DirectionsEnum).RTL\n }, null, 42, _hoisted_2), [\n [_vModelDynamic, value.value]\n ])\n ]))\n}\n}\n\n})","\n\n\n \n \n \n\n","import script from \"./InputText.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./InputText.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","/* eslint-disable*/\n\nclass LoginModel {\n public email: string;\n public password: string;\n\n constructor(arg: any) {\n this.email = arg.email;\n this.password = arg.password;\n }\n}\n\nexport default LoginModel;\n","/* eslint-disable*/\nimport httpClient from '@/api/httpClient';\nimport { LoginInterface } from '@/types/auth/login-interface';\n\nconst ENDPOINT_URL = '/merchant/login';\n\nexport const loginMerchant = async (loginInformation: LoginInterface) => {\n const loginForm = new FormData();\n loginForm.append('email', loginInformation.email);\n loginForm.append('password', loginInformation.password);\n try {\n const response = await httpClient.post(ENDPOINT_URL, loginForm);\n return response;\n } catch (error) {\n return error;\n }\n};\n","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, unref as _unref, createTextVNode as _createTextVNode, withModifiers as _withModifiers, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\nimport _imports_0 from '@/assets/icons/login-right-arrow.svg'\n\n\nconst _hoisted_1 = { class: \"w-full grid place-items-center\" }\nconst _hoisted_2 = { class: \"text-xl leading-[1.3] font-500 font-ReadexPro bg-primary-gradient inline-block text-transparent bg-clip-text text-center\" }\nconst _hoisted_3 = { class: \"flex-1\" }\nconst _hoisted_4 = [\"dir\"]\nconst _hoisted_5 = { class: \"flex-1\" }\nconst _hoisted_6 = [\"dir\"]\nconst _hoisted_7 = {\n class: \"font-ReadexPro w-full bg-primary-gradient text-white text-p2 font-400 max-h-[42px] rounded-main flex justify-center align-center py-2 gap-[10px] hover:gap-[14px] transition-all duration-300 ease-in-out\",\n type: \"submit\"\n}\nconst _hoisted_8 = { class: \"flex justify-between align-center\" }\nconst _hoisted_9 = {\n href: \"https://api.whatsapp.com/send/?phone=966510131856&text&type=phone_number&app_absent=0\",\n class: \"font-ReadexPro text-p2 font-400 text-main gradient-hover\"\n}\n\nimport { DirectionsEnum, I18nLocalesEnum } from '@/types/i18n/i18n.enum';\nimport { ref, reactive } from 'vue';\nimport useVuelidate from '@vuelidate/core';\nimport { required, minLength, email } from '@vuelidate/validators';\nimport LoginModel from '@/types/LoginTypes';\nimport ErrorModel from '@/api/models/ErrorModel';\nimport { saveAuthStateToLocalStorageAndGlobalState } from '@/helpers/auth/useAuthStatus';\nimport { useStore } from 'vuex';\nimport router from '@/router/index';\nimport { RoutesNamesEnum } from '@/router/routes-names.enum';\nimport { PasswordInput, InputText } from '@/components/input-fields';\nimport { AnimationTop } from '@/components/common';\nimport { loginMerchant } from '@/utils/auth/login';\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'LoginPage',\n setup(__props) {\n\nconst loading = ref(false);\nconst finishLoading = ref(false);\nconst error = ref('');\nconst success = ref('');\nconst store = useStore();\nconst loginState = reactive({\n emailAddress: '',\n password: '',\n rememberMerchant: false,\n});\nconst rules = {\n emailAddress: {\n required,\n email,\n },\n password: {\n required,\n minLength: minLength(8),\n },\n rememberMerchant: {},\n};\n\nconst v$ = useVuelidate(rules, loginState);\n\nconst onSubmit = async () => {\n await v$.value.$validate();\n if (!v$.value.$invalid) {\n loading.value = true;\n store.commit('loading/startLoading');\n\n const loginData = new LoginModel({\n email: loginState.emailAddress,\n password: loginState.password,\n });\n\n try {\n const response = await loginMerchant(loginData);\n if (!response.data || response instanceof ErrorModel) {\n store.dispatch('loading/finishWithError', response.message || response.errors);\n error.value = response.message || response.errors;\n } else {\n store.dispatch('loading/finishSuccessfully', response.message);\n success.value = response.message;\n saveAuthStateToLocalStorageAndGlobalState(response, true);\n router.replace({ name: RoutesNamesEnum.Dashboard });\n }\n } catch (err) {\n if (err instanceof Error) {\n store.dispatch('loading/finishWithError', err.message);\n error.value = err.message;\n } else {\n store.dispatch('loading/finishWithError', 'An unknown error occurred');\n error.value = 'An unknown error occurred';\n }\n } finally {\n loading.value = false;\n store.dispatch('setAppLoading', false);\n }\n }\n};\n\nreturn (_ctx: any,_cache: any) => {\n const _component_v_col = _resolveComponent(\"v-col\")!\n const _component_v_row = _resolveComponent(\"v-row\")!\n const _component_v_container = _resolveComponent(\"v-container\")!\n const _component_RouterLink = _resolveComponent(\"RouterLink\")!\n\n return (_openBlock(), _createElementBlock(\"form\", {\n class: \"w-full font-ReadexPro\",\n onSubmit: _withModifiers(onSubmit, [\"prevent\"])\n }, [\n _createVNode(_unref(AnimationTop), null, {\n default: _withCtx(() => [\n _createVNode(_component_v_container, null, {\n default: _withCtx(() => [\n _createVNode(_component_v_row, { class: \"gap-5\" }, {\n default: _withCtx(() => [\n _createVNode(_component_v_col, {\n cols: \"12\",\n class: \"py-0\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"p\", _hoisted_2, _toDisplayString(_ctx.$t('pages.login.Login')), 1)\n ])\n ]),\n _: 1\n }),\n _createVNode(_component_v_col, {\n cols: \"12\",\n class: \"py-0\"\n }, {\n default: _withCtx(() => [\n _createVNode(_component_v_container, { class: \"px-0\" }, {\n default: _withCtx(() => [\n _createVNode(_component_v_row, { class: \"gap-3\" }, {\n default: _withCtx(() => [\n _createVNode(_component_v_col, {\n cols: \"12\",\n class: \"py-0\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"p\", {\n dir: _ctx.$i18n.locale === _unref(I18nLocalesEnum).EN ? _unref(DirectionsEnum).LTR : _unref(DirectionsEnum).RTL,\n class: \"font-ReadexPro text-p2 text-main\"\n }, _toDisplayString(_ctx.$t('common.Email')), 9, _hoisted_4),\n _createVNode(_unref(InputText), {\n modelValue: _unref(v$).emailAddress.$model,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((_unref(v$).emailAddress.$model) = $event)),\n field: _unref(v$).emailAddress,\n placeholder: \"ziadah@gmail.com\",\n errorMessage: _ctx.$t('errors.invalidEmail'),\n type: \"email\"\n }, null, 8, [\"modelValue\", \"field\", \"errorMessage\"])\n ])\n ]),\n _: 1\n }),\n _createVNode(_component_v_col, {\n cols: \"12\",\n class: \"py-0\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"p\", {\n dir: _ctx.$i18n.locale === _unref(I18nLocalesEnum).EN ? _unref(DirectionsEnum).LTR : _unref(DirectionsEnum).RTL,\n class: \"font-ReadexPro text-p2 text-main\"\n }, _toDisplayString(_ctx.$t('common.Password')), 9, _hoisted_6),\n _createVNode(_unref(PasswordInput), {\n modelValue: loginState.password,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((loginState.password) = $event)),\n field: _unref(v$).password\n }, null, 8, [\"modelValue\", \"field\"])\n ])\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(_component_v_col, {\n cols: \"12\",\n class: \"py-0\"\n }, {\n default: _withCtx(() => [\n _createVNode(_component_RouterLink, {\n to: \"/forgot-password\",\n class: \"font-ReadexPro text-p2 font-400 text-main text-center d-block gradient-hover\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('pages.login.forgetPassword')), 1)\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(_component_v_col, {\n cols: \"12\",\n class: \"py-0\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"button\", _hoisted_7, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('pages.login.Login')), 1),\n _cache[2] || (_cache[2] = _createElementVNode(\"img\", {\n src: _imports_0,\n class: \"rtl:rotate-180\"\n }, null, -1))\n ])\n ]),\n _: 1\n }),\n _createVNode(_component_v_col, {\n cols: \"12\",\n class: \"py-0\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(_component_RouterLink, {\n to: { name: _unref(RoutesNamesEnum).SignUp },\n class: \"font-ReadexPro text-p2 font-400 text-main gradient-hover\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('pages.login.signUp')), 1)\n ]),\n _: 1\n }, 8, [\"to\"]),\n _createElementVNode(\"a\", _hoisted_9, _toDisplayString(_ctx.$t('common.Support')), 1)\n ])\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ], 32))\n}\n}\n\n})","\n\n\n \n \n \n \n \n \n \n {{ $t('pages.login.Login') }}\n \n \n \n\n \n \n \n \n \n \n \n {{ $t('common.Email') }}\n \n\n \n \n \n \n \n \n {{ $t('common.Password') }}\n \n\n \n \n \n \n \n \n\n \n \n \n {{ $t('pages.login.forgetPassword') }}\n \n \n\n \n \n \n {{ $t('pages.login.Login') }}\n \n \n \n\n \n \n \n \n {{ $t('pages.login.signUp') }}\n \n \n {{ $t('common.Support') }}\n \n \n \n \n \n \n \n\n","import script from \"./LoginPage.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./LoginPage.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__"],"names":["_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_defineComponent","__name","props","emits","setup","__props","emit","__emit","showPassword","ref","value","computed","get","modelValue","set","showOrHidePassword","_ctx","_cache","_openBlock","_createElementBlock","_withDirectives","_createElementVNode","_normalizeClass","$props","field","$error","$event","onBlur","args","$touch","placeholder","$t","type","dir","$i18n","locale","_unref","I18nLocalesEnum","EN","DirectionsEnum","LTR","RTL","_vModelDynamic","src","require","onClick","__exports__","String","default","required","Object","errorMessage","$errors","$message","LoginModel","constructor","arg","_defineProperty","this","email","password","ENDPOINT_URL","loginMerchant","async","loginForm","FormData","append","loginInformation","response","httpClient","post","error","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","href","loading","success","store","useStore","loginState","reactive","emailAddress","rememberMerchant","rules","minLength","v$","useVuelidate","onSubmit","$validate","$invalid","commit","loginData","data","ErrorModel","dispatch","message","errors","saveAuthStateToLocalStorageAndGlobalState","router","replace","name","RoutesNamesEnum","Dashboard","err","Error","_component_v_col","_resolveComponent","_component_v_row","_component_v_container","_component_RouterLink","_withModifiers","_createVNode","AnimationTop","_withCtx","cols","_toDisplayString","_","InputText","$model","PasswordInput","to","_createTextVNode","_imports_0","SignUp"],"sourceRoot":""}
\n {{ $t('pages.login.Login') }}\n
\n {{ $t('common.Email') }}\n
\n {{ $t('common.Password') }}\n