PageSourceSearch

https://wnyc.org/_nuxt/CJ28Mo55.js

js wnyc.org collected 2026-09-24 08:28:57 UTC 5,132 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`21a79281-0951-4597-8c40-0e1a49b0891c`,e._sentryDebugIdIdentifier=`sentry-dbid-21a79281-0951-4597-8c40-0e1a49b0891c`)}catch{}})();import{a as e}from"./hLuMthIG.js";import{At as t,C as n,Dt as r,K as i,N as a,S as o,Tt as s,U as c,_ as l,_t as u,g as d,h as f,ht as p,l as m,ot as h,q as g,u as _,v,y}from"./CWTKM9QU.js";import{t as b}from"./GzaoxX0a.js";import{et as x}from"./BNqwFP-j.js";import{W as S}from"./C6GQoMvw.js";import{l as C}from"./DI0OfRJD.js";import{n as w}from"./B8DOmtoZ.js";import{n as T}from"./aQrEPyqh.js";import{i as E,n as D,o as O,r as k,t as A}from"./BitaN71q.js";import{n as j}from"./DdilEc4j.js";import{n as M}from"./Cu-uHNdG.js";var N={class:`flex flex-column gap-2 mb-4`},P={class:`p-error`},F={class:`flex flex-column gap-2 mb-5`},I={class:`p-error`},L=[`innerHTML`],R={__name:`SupabaseVLoginWithEmail`,props:{client:{default:null,type:Object},config:{default:null,type:Object},currentEmail:{default:null,type:String},error:{default:`There was an error logging in`,type:String},label:{default:`Log in with email`,type:String},returnRoute:{default:`/confirm`,type:String}},emits:[`submit-click`,`submit-error`,`submit-success`],setup(a,{emit:b}){let R=a,z=b,B=S(),V=u(R.client),H=u(R.config);!R.client&&!R.config&&(V.value=x(),H.value=e());let U=p({email:R.currentEmail??``,password:``}),W=u(``),G=f(()=>({email:{email:A.withMessage(`Invalid email format`,D),required:A.withMessage(`This field is required`,E)},password:{minLength:k(8),required:A.withMessage(`This field is required`,E)}})),K=O(G,U),q=async()=>{if(W.value=``,z(`submit-click`),K.value.$validate(),!K.value.$error){let e=await V.value.auth.signInWithPassword({email:U.email,password:U.password});e.error?(z(`submit-error`,e?.error?.message),console.error(`Error during sign in:`,e.error.message),e?.error?.message?.includes(`Invalid login credentials`)?W.value=R.error:W.value=e?.error?.message):(z(`submit-success`,R.returnRoute),B.push(`${R.returnRoute}`),Promise.resolve().then(async()=>{try{await C()}catch(e){console.warn(`Post-login profile bootstrap failed:`,e)}}))}};return(e,a)=>(c(),y(`div`,null,[U?(c(),y(`form`,{key:0,novalidate:``,onSubmit:m(q,[`prevent`])},[d(`div`,N,[a[3]||=d(`label`,{for:`email`},`Email`,-1),n(s(j),{modelValue:U.email,"onUpdate:modelValue":a[0]||=e=>U.email=e,type:`email`,name:`email`,class:r([`w-full`,{"p-invalid":s(K).email.$error&&s(K).email.$invalid}]),placeholder:`[email protected]`,required:``,onUpdate:s(K).email.$touch},null,8,[`modelValue`,`class`,`onUpdate`]),d(`small`,P,[(c(!0),y(_,null,i(s(K).email.$errors,e=>(c(),y(`span`,{key:e.$uid},[o(t(e.$message)+` `,1),a[2]||=d(`br`,null,null,-1)]))),128))])]),d(`div`,F,[a[5]||=d(`label`,{for:`password`},`Password`,-1),n(s(M),{modelValue:U.password,"onUpdate:modelValue":a[1]||=e=>U.password=e,type:`password`,name:`password`,class:r([`w-full`,{"p-invalid":s(K).password.$error&&s(K).password.$invalid}]),placeholder:`Enter your password`,required:``,"toggle-mask":``,feedback:!1,autofocus:R.currentEmail,onUpdate:s(K).password.$touch},null,8,[`modelValue`,`class`,`autofocus`,`onUpdate`]),d(`small`,I,[(c(!0),y(_,null,i(s(K).password.$errors,e=>(c(),y(`span`,{key:e.$uid},[o(t(e.$message)+` `,1),a[4]||=d(`br`,null,null,-1)]))),128))])]),W.value?(c(),l(s(T),{key:0,severity:`error`,sticky:!1,closable:!1,icon:`pi pi-times-circle`,class:`center mb-4`},{default:h(()=>[d(`span`,{innerHTML:W.value},null,8,L)]),_:1})):v(``,!0),n(s(w),{label:R.label,class:`w-full`,"aria-label":`${R.label} button`,type:`submit`},{icon:h(()=>[g(e.$slots,`icon`)]),_:3},8,[`label`,`aria-label`]),g(e.$slots,`belowSubmit`)],32)):v(``,!0)]))}},z=Object.assign({inheritAttrs:!1},{__name:`SupabaseVLoginWithProvider`,props:{client:{default:null,type:Object},config:{default:null,type:Object},label:{default:null,type:String},provider:{default:null,required:!0,type:String},redirectUrl:{default:`http://localhost:3000`,type:String}},emits:[`submit-click`,`submit-error`,`submit-success`],setup(i,{emit:f}){let p=u(``),m=i,_=u(m.client),S=u(m.config),{getOAuthRedirectUrl:C}=b();!m.client&&!m.config&&(_.value=x(),S.value=e());let E=f,D=async()=>{E(`submit-click`);let e=C(),t=await _.value.auth.signInWithOAuth({options:{redirectTo:e},provider:m.provider});t.error?(E(`submit-error`,t.error),p.value=t.error):E(`submit-success`)},O=e=>e[0].toUpperCase()+e.slice(1);return(e,i)=>(c(),y(`div`,null,[p.value?(c(),l(s(T),{key:0,class:`center mb-4`,severity:`error`,closable:!1,icon:`pi pi-times-circle`},{default:h(()=>[o(` Sorry, there was a problem logging in to your `+t(O(m.provider))+` account: `+t(p.value),1)]),_:1})):v(``,!0),n(s(w),a({class:`w-full`,label:m.label??`Log in with ${O(m.provider)}`,"aria-label":`${m.provider} login button`},{...e.$attrs},{onClick:D}),{icon:h(()=>[g(e.$slots,`icon`,{},()=>
1[d(`i`,{class:r(`pi pi-${m.provider}`)},null,2)])]),_:3},16,[`label`,`aria-label`])]))}});export{R as n,z as t};
2//# sourceMappingURL=CJ28Mo55.js.map

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.