PageSourceSearch

https://polyblink.com/build/assets/Login-DKTFopny.js

js polyblink.com collected 2026-10-02 01:42:11 UTC 4,564 bytes, 1 lines download raw bytes

1import{u as P,V as k,Z as c,j as x,aA as l,q as o,ai as e,E as v,l as f,i as s,aa as r,k as p,w as T,N,p as u,a1 as j}from"./vendor-vue-DO5-hTFl.js";import{_ as z}from"./index-Cmtz8jH3.js";import{_ as B}from"./Checkbox.vue_vue_type_script_setup_true_lang-DU5Dl9Mw.js";import{_ as b}from"./Input.vue_vue_type_script_setup_true_lang-Cw7YPM7c.js";import{_ as h}from"./Label.vue_vue_type_script_setup_true_lang-CiYG77dI.js";import{_ as w}from"./Spinner.vue_vue_type_script_setup_true_lang-B8PlFPa3.js";import{k as A}from"./app-D-CGn2-d.js";import{_ as V}from"./AuthLayout.vue_vue_type_script_setup_true_lang-DPNoLF-C.js";import{u as $}from"./index-CxAerfZN.js";import{u as C}from"./vendor-i18n-Xzp14jpf.js";import"./useForwardPropsEmits-BTi8H-c7.js";import"./AppToast-CX48UtwE.js";import"./createLucideIcon-CvPmzaXe.js";import"./x-BhLyuTBD.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useFormControl-DN1TdFF0.js";import"./VisuallyHiddenInput-DjgtSXkG.js";import"./RovingFocusGroup-D8QkvX7M.js";import"./index-DkPg2_AP.js";import"./check-BOXqqf8S.js";import"./vendor-realtime-Dh3oqtlr.js";const E={key:0,class:"flex items-center justify-center gap-3 rounded-md border border-zinc-200 bg-zinc-50 px-4 py-3 text-sm text-zinc-600 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300"},S={key:1,class:"mb-4 text-center text-sm font-medium text-green-600"},D={class:"grid gap-6"},L={class:"grid gap-2"},O={class:"grid gap-2"},U={class:"flex items-center justify-between"},q={href:"/forgot-password",class:"text-sm text-foreground underline-offset-4 hover:underline",tabindex:5},F={class:"flex items-center justify-between"},I={key:0,class:"text-center text-sm text-muted-foreground"},R=["href"],me=P({__name:"Login",props:{status:{},telegramBotUrl:{}},setup(d){const{t}=C(),{toast:_}=A(),g=j(!1);async function y(m){g.value=!0;try{const n=decodeURIComponent((document.cookie.match(/XSRF-TOKEN=([^;]+)/)??[])[1]??""),a=await fetch("/auth/telegram-webapp",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json","X-XSRF-TOKEN":n},body:JSON.stringify({init_data:m})}),i=await a.json().catch(()=>null);if(a.ok&&i?.ok&&typeof i.redirect=="string"){window.location.href=i.redirect;return}_(i?.message??t("panel.authPages.login.telegramLoginFailed"),"error")}catch{_(t("panel.authPages.login.telegramNetworkError"),"error")}finally{g.value=!1}}return k(()=>{let m=20;const n=()=>{const a=window.Telegram?.WebApp;if(a?.initData&&a.initData.length>0){try{a.ready?.()}catch{}try{a.expand?.()}catch{}y(a.initData);return}--m>0&&setTimeout(n,100)};n()}),(m,n)=>(c(),x(V,{title:e(t)("panel.authPages.login.title"),description:e(t)("panel.authPages.login.description")},{default:l(()=>[o(e(v),{title:e(t)("panel.authPages.login.headTitle")},null,8,["title"]),g.value?(c(),f("div",E,[o(e(w),{class:"size-4"}),s("span",null,r(e(t)("panel.authPages.login.signingInTelegram")),1)])):p("",!0),d.status?(c(),f("div",S,r(d.status),1)):p("",!0),o(e(T),N(e($).form(),{"reset-on-success":["password"],class:"flex flex-col gap-6"}),{default:l(({processing:a})=>[s("div",D,[s("div",L,[o(e(h),{for:"email"},{default:l(()=>[u(r(e(t)("panel.authPages.login.login")),1)]),_:1}),o(e(b),{id:"login",type:"login",name:"login",required:"",autofocus:"",tabindex:1,autocomplete:"login",placeholder:e(t)("panel.authPages.login.loginPlaceholder")},null,8,["placeholder"])]),s("div",O,[s("div",U,[o(e(h),{for:"password"},{default:l(()=>[u(r(e(t)("panel.authPages.login.password")),1)]),_:1}),s("a",q,r(e(t)("panel.authPages.login.forgotPassword")),1)]),o(e(b),{id:"password",type:"password",name:"password",required:"",tabindex:2,autocomplete:"current-password",placeholder:e(t)("panel.authPages.login.passwordPlaceholder")},null,8,["placeholder"])]),s("div",F,[o(e(h),{for:"remember",class:"flex items-center space-x-2"},{default:l(()=>[o(e(B),{id:"remember",name:"remember",tabindex:3}),s("span",null,r(e(t)("panel.authPages.login.remember")),1)]),_:1})]),o(e(z),{type:"submit",class:"mt-4 w-full",tabindex:4,disabled:a,"data-test":"login-button"},{default:l(()=>[a?(c(),x(e(w),{key:0})):p("",!0),u(" "+r(e(t)("panel.authPages.login.submit")),1)]),_:2},1032,["disabled"])]),d.telegramBotUrl?(c(),f("div",I,[u(r(e(t)("panel.authPages.login.noAccount"))+" ",1),s("a",{href:d.telegramBotUrl,target:"_blank",rel:"noopener noreferrer",class:"text-foreground underline-offset-4 hover:underline",tabindex:5},r(e(t)("panel.authPages.login.createViaTelegram")),9,R)])):p("",!0)]),_:1},16)]),_:1},8,["title","description"]))}});
1export{me as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.