PageSourceSearch

https://shikutoku.me/_next/static/chunks/loginModal-T1N6BXYd.js

js shikutoku.me collected 2026-10-04 18:41:32 UTC 9,468 bytes, 1 lines download raw bytes

1import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,n,r}from"./framework-A1pNZAzD.js";import{t as i}from"./link-CahsMRsB.js";import{t as a}from"./logger-8m57PhxA.js";import{n as o,r as s}from"./initSupabase-ZWBC2I09.js";import{t as c}from"./XMarkIcon-D8Z0ohbs.js";import{t as l}from"./useModalBehavior-CEllQgNX.js";import{n as u}from"./constants-B8um8hoi.js";var d=e(t());function f({title:e,titleId:t,...n},r){return d.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?d.createElement(`title`,{id:t},e):null,d.createElement(`path`,{d:`M3.478 2.404a.75.75 0 0 0-.926.941l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.404Z`}))}var p=d.forwardRef(f),m=e(n(),1),h=()=>{let e=navigator.userAgent||navigator.vendor||``,t=/iPhone|iPod|iPad/i.test(e)&&(/FBAN|FBAV|FBIOS|FB_IAB|FBLC|Line|Twitter/i.test(e)||!/Version\/[\d\.]+.*Safari/i.test(e)&&!/CriOS/i.test(e)),n=/Android/i.test(e)&&(/wv|Version\/[\d\.]+/i.test(e)||/Chrome\/[\d\.]+.*Mobile/i.test(e)&&!/Chrome\/[\d\.]+.*Mobile Safari/i.test(e)||/FBAN|FBAV|FBIOS|FB_IAB|FBLC|Line/i.test(e));return t||n},g=r(),_=(0,d.memo)(e=>{let t=e.isOpen,n=e.setIsOpen,[r,f]=(0,d.useState)(!1),[_,v]=(0,d.useState)(``),[y,b]=(0,d.useState)(!0),[x,S]=(0,d.useState)(!1),C=(0,d.useCallback)(()=>{try{window.localStorage.setItem(`pendingNewsletterPreference`,x?`subscribed`:`unsubscribed`)}catch{}},[x]),w=(0,d.useCallback)(()=>{n(!1),f(!1)},[n]),{overlayRef:T,handleOverlayClick:E}=l(t,w);return t?(0,m.createPortal)((0,g.jsxs)(`div`,{className:`adsense-anchor-viewport-safe fixed inset-0 z-[10000] isolate`,role:`dialog`,"aria-modal":`true`,children:[(0,g.jsx)(`div`,{className:`absolute inset-0 bg-black/30`,"aria-hidden":`true`}),(0,g.jsx)(`div`,{ref:T,className:`absolute inset-0 flex items-center justify-center overflow-y-auto p-4`,onClick:E,children:(0,g.jsxs)(`div`,{className:`relative mx-auto max-w-sm rounded-2xl bg-white p-6 text-gray-700 shadow-xl dark:bg-slate-800 dark:text-white`,children:[(0,g.jsx)(`button`,{type:`button`,"aria-label":`ログイン画面を閉じる`,onClick:w,className:`absolute right-1 top-1 flex size-11 items-center justify-center rounded-full text-gray-500 hover:text-gray-700 focus:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-300 dark:text-gray-400 dark:hover:text-gray-200`,children:(0,g.jsx)(c,{className:`w-5`,"aria-hidden":`true`})}),(0,g.jsxs)(`div`,{className:`text-center`,children:[(0,g.jsx)(`div`,{className:`dark:hidden`,children:(0,g.jsx)(`img`,{src:`${u}/assets/logo-s.png`,alt:`Shikutoku`,loading:`lazy`,decoding:`async`})}),(0,g.jsx)(`div`,{className:`hidden dark:block`,children:(0,g.jsx)(`img`,{src:`${u}/assets/logo-s-light.png`,alt:`Shikutoku`,loading:`lazy`,decoding:`async`})})]}),(0,g.jsx)(`p`,{className:`my-4 text-sm text-gray-700 dark:text-gray-300`,children:`Shikutokuは淑女のための優しい世界(コミュニティ)です。ログインすることでより平和にShikutokuを楽しむことができます。`}),(0,g.jsxs)(`div`,{className:`flex gap-3`,children:[(0,g.jsxs)(`button`,{className:`flex flex-1 items-center justify-center gap-2 rounded-xl bg-gray-100 px-4 py-3 font-semibold text-gray-700 transition-colors hover:bg-gray-200 dark:bg-slate-700 dark:text-white dark:hover:bg-slate-600`,onClick:async()=>{try{if(!y){alert(`利用規約とプライバシーポリシーをご確認ください。`);return}if(h()){alert(`ログインするには、SafariやChromeなどのブラウザでshikutoku.meを開いてください。`);return}C();let e=window.location.pathname+window.location.search,{error:t}=await o.auth.signInWithOAuth({provider:`google`,options:{redirectTo:`${window.location.origin}/auth/callback?next=${encodeURIComponent(e)}`,queryParams:{prompt:`select_account`}}});if(t)throw t}catch(e){e instanceof s?(a.error(`Google login error:`,e.message),alert(`ログインエラー: ${e.message}`)):(a.error(`An unexpected error occurred:`,e),alert(`予期せぬエラーが発生しました`))}},children:[(0,g.jsx)(`img`,{src:`${u}/assets/google_logo.svg`,alt:`Googleロゴ`,loading:`lazy`,decoding:`async`,className:`h-5 w-5`}),(0,g.jsx)(`span`,{children:`Googleでログイン`})]}),(0,g.jsxs)(`button`,{className:`flex flex-1 items-center justify-center gap-2 rounded-xl bg-gray-100 px-4 py-3 font-semibold text-gray-700 transition-colors hover:bg-gray-200 dark:bg-slate-700 dark:text-white dark:hover:bg-slate-600`,onClick:async()=>{try{if(!y){alert(`利用規約とプライバシーポリシーをご確認ください。`);return}if(h()){alert(`ログインするには、SafariやChromeなどのブラウザでshikutoku.meを開いてください。`);return}C();let e=window.location.pathname+window.location.search,{error:t}=await o.auth.signInWithOAuth({provider:`twitter`,options:{redirectTo:`${window.location.origin}/auth/callback?next=${encodeURIComponent(e)}`}});if(t)throw t}catch(e){e instanceof s?a.error(e.message):a.error(`An unexpected error occurred`)}},children:[(0,g.jsx)(`svg`,{className:`h-5 w-5`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,g.jsx)(`path`,{d:`M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z`})}),(0,g.jsx)(`span`,{children:`Xでログイン`})]})]}),(0,g.jsxs)(`div`,{className:`relative flex items-center py-4`,children:[(0,g.jsx)(`div`,{className:`grow border-t border-gray-300 dark:border-gray-400`}),(0,g.jsx)(`span`,{className:`mx-4 shrink text-gray-500 dark:text-gray-400`,children:`もしくは`}),(0,g.jsx)(`div`,{className:`grow border-t border-gray-300 dark:border-gray-400`})]}),(0,g.jsxs)(`div`,{className:`text-left`,children:[(0,g.jsx)(`label`,{htmlFor:`mail`,className:`text-sm font-bold text-gray-900 dark:text-white`,children:`マジックリンクでログイン`}),(0,g.jsx)(`input`,{type:`email`,inputMode:`email`,autoComplete:`email`,autoCapitalize:`off`,spell
1Check:!1,placeholder:`Email`,name:`email`,value:_,onChange:e=>{v(e.target.value)},className:`focus:shadow-outline mt-1 w-full rounded-2xl border-2 border-gray-200 px-2 py-2 leading-relaxed text-gray-700 caret-blue-500 focus:border-transparent focus:ring-2 focus:ring-blue-300 sm:focus:outline-hidden dark:border-slate-500 dark:bg-slate-700 dark:text-white`}),(0,g.jsx)(`p`,{className:`mt-2 text-xs text-gray-700 dark:text-gray-300`,children:`マジックリンクをメールで受け取りリンクをクリックするとすぐにログインできます。`})]}),(0,g.jsxs)(`div`,{className:`mt-4 text-center`,children:[(0,g.jsxs)(`button`,{className:`inline-flex items-center rounded-lg bg-gray-100 px-4 py-2 font-semibold text-gray-700 drop-shadow duration-300 hover:bg-gray-200 dark:bg-slate-700 dark:text-white dark:hover:bg-slate-600`,onClick:async e=>{e.preventDefault();try{if(!y){alert(`利用規約とプライバシーポリシーをご確認ください。`);return}if(h()){alert(`ログインするには、SafariやChromeなどのブラウザでshikutoku.meを開いてください。`);return}let e=_.normalize(`NFKC`).replace(/[​-‍]/g,``).trim().toLowerCase();if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)){alert(`メールアドレスの形式が正しくありません。半角英数字で入力してください。`);return}C();let t=window.location.pathname+window.location.search,{error:n}=await o.auth.signInWithOtp({email:e,options:{emailRedirectTo:`${window.location.origin}/auth/callback?next=${encodeURIComponent(t)}`}});if(n)throw n;alert(`マジックリンクを送信しました。メールをご確認ください。`)}catch(e){e instanceof s?alert(e.message):alert(`予期せぬエラーが発生しました`)}},children:[(0,g.jsx)(p,{className:`w-5`}),(0,g.jsx)(`span`,{className:`ml-2`,children:`マジックリンクを送る`})]}),r&&(0,g.jsx)(`div`,{className:`mt-1 text-sm text-green-400`,children:`✓ メールを送信しました`})]}),(0,g.jsxs)(`div`,{className:`mt-4 space-y-2 rounded-2xl border border-gray-200 bg-gray-50 p-3 text-left text-xs text-gray-700 dark:border-slate-600 dark:bg-slate-700/60 dark:text-gray-200`,children:[(0,g.jsxs)(`label`,{className:`flex items-start gap-2`,children:[(0,g.jsx)(`input`,{type:`checkbox`,checked:y,onChange:e=>b(e.target.checked),className:`mt-0.5 h-4 w-4 rounded border-gray-300 text-red-500 focus:ring-red-400`}),(0,g.jsxs)(`span`,{children:[`アカウントを作成・ログインすると、`,(0,g.jsx)(i,{href:`/terms`,className:`underline`,children:`利用規約`}),`と`,(0,g.jsx)(i,{href:`/privacy`,className:`underline`,children:`プライバシーポリシー`}),`を確認し、同意したものとします。`]})]}),(0,g.jsxs)(`label`,{className:`flex items-start gap-2`,children:[(0,g.jsx)(`input`,{type:`checkbox`,checked:x,onChange:e=>S(e.target.checked),className:`mt-0.5 h-4 w-4 rounded border-gray-300 text-red-500 focus:ring-red-400`}),(0,g.jsx)(`span`,{children:`新機能などのお知らせメールを受け取る(任意)`})]}),(0,g.jsx)(`p`,{className:`pl-6 text-[11px] text-gray-500 dark:text-gray-400`,children:`アカウントに関する重要なお知らせは、この設定にかかわらず送信する場合があります。`})]})]})})]}),document.body):null});export{_ as LoginModal};

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.