PageSourceSearch

https://styleart.ai/_next/static/chunks/350-4bb05bdabb9bf4fa.js

js styleart.ai collected 2026-10-05 12:41:05 UTC 9,973 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[350],{350:(e,t,o)=>{o.d(t,{A:()=>m});var r=o(5155),i=o(8803),a=o.n(i),n=o(2115),l=o(7650);function s(e){let{children:t,onClose:o,title:i,className:a}=e,s=(0,n.useRef)(null),d=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&o()},t=e=>{s.current===e.target&&o()};return document.addEventListener("keydown",e),document.addEventListener("mousedown",t),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.removeEventListener("mousedown",t),document.body.style.overflow=""}},[o]),(0,l.createPortal)((0,r.jsx)("div",{ref:s,className:"fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:(0,r.jsxs)("div",{ref:d,className:"rounded-2xl shadow-xl max-w-md w-full animate-fadeIn relative overflow-hidden ".concat(a||"bg-white"),children:[i&&(0,r.jsx)("div",{className:"px-6 pt-6 pb-0",children:(0,r.jsx)("h3",{className:"text-xl font-medium text-gray-800",children:i})}),(0,r.jsx)("button",{onClick:o,className:"absolute top-4 right-4 p-2 rounded-full text-gray-500 hover:bg-gray-100 transition-colors cursor-pointer","aria-label":"关闭",children:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,r.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),t]})}),document.body)}var d=o(9584),c=o(4833),u=o(3804),b=o(3878);function m(e){let{isOpen:t,onClose:o,onLoginSuccess:i}=e,{supabase:l,user:m}=(0,c.A)(),[x,p]=(0,n.useState)("sign_in"),f=(0,u.rd)(),h=(0,b.c3)("Auth.loginModal"),g=(0,b.c3)("Auth.loginModal.signIn"),w=(0,b.c3)("Auth.loginModal.signUp"),k=(0,b.c3)("Auth.loginModal.forgotPassword");return((0,n.useEffect)(()=>{m&&(i&&i(),o(),f.push("/"))},[m,i,o,f]),(0,n.useEffect)(()=>{t||p("sign_in")},[t]),(0,n.useEffect)(()=>{let e=()=>{let e=document.querySelector(".auth-button");if(e&&"string"==typeof e.textContent){let t=e.textContent.trim();t===w("buttonLabel")?p("sign_up"):t===g("buttonLabel")?p("sign_in"):t===k("buttonLabel")&&p("forgotten_password")}};e();let t=new MutationObserver(()=>{e()}),o=document.querySelector(".auth-form-container");o&&t.observe(o,{childList:!0,subtree:!0});let r=t=>{let o=t.target;(null==o?void 0:o.tagName)==="A"&&("#auth-forgot-password"===o.getAttribute("href")?setTimeout(()=>e(),100):o.className.includes("auth-anchor")&&setTimeout(()=>e(),100))};return document.addEventListener("click",r),()=>{t.disconnect(),document.removeEventListener("click",r)}},[t,g,w,k]),t)?(0,r.jsx)(s,{onClose:o,className:"bg-[#F8F6F1]",children:(0,r.jsxs)("div",{className:"jsx-bee1f794610c4a0c w-full max-w-sm mx-auto bg-[#F8F6F1] rounded-xl overflow-hidden",children:[(0,r.jsx)("div",{className:"jsx-bee1f794610c4a0c pt-6 pb-2 px-6",children:(0,r.jsx)("h2",{className:"jsx-bee1f794610c4a0c text-xl font-medium text-center text-gray-800 ghibli-font",children:h("welcome")})}),(0,r.jsx)("div",{className:"jsx-bee1f794610c4a0c px-6 pb-10",children:(0,r.jsx)(d.Nj,{supabaseClient:l,appearance:{theme:{default:{colors:{brand:"#333333",brandAccent:"#333333",brandButtonText:"#333333",inputBorder:"#E2E8F0",inputBorderHover:"#CBD5E0",inputBorderFocus:"#718096",inputText:"#2D3748",inputPlaceholder:"#718096",dividerBackground:"#E2E8F0"}}},style:{button:{fontWeight:"500",padding:"0.625rem 1rem",height:"42px",backgroundColor:"white",border:"1px solid #E2E8F0",color:"#333333",transition:"background-color 0.2s ease"},anchor:{color:"#4A5568",fontWeight:"500",fontSize:"0.875rem",transition:"color 0.2s ease",cursor:"pointer"},container:{margin:"0",width:"100%"},divider:{margin:"1.25rem 0",fontSize:"0.875rem",color:"#94A3B8"},input:{padding:"0.625rem 0.75rem",height:"42px",fontSize:"0.875rem",backgroundColor:"white"},label:{fontSize:"0.875rem",margin:"0 0 0.25rem 0",color:"#4A5568"},message:{fontSize:"0.813rem",padding:"0.5rem 0.75rem",margin:"0.5rem 0"},loader:{color:"#4A5568"}},className:{container:"auth-form-container",button:"auth-button",divider:"auth-divider",input:"auth-input",label:"auth-label",message:"auth-message",anchor:"auth-anchor"}},view:x,showLinks:!0,providers:["google"],redirectTo:"https://styleart.ai/",localization:{variables:{sign_in:{email_label:g("emailLabel"),password_label:g("passwordLabel"),email_input_placeholder:g("emailPlaceholder"),password_input_placeholder:g("passwordPlaceholder"),button_label:g("buttonLabel"),loading_button_label:g("loadingLabel"),social_provider_text:g("socialText"),link_text:g("linkText")},sign_up:{email_label:w("emailLabel"),password_label:w("passwordLabel"),email_input_placeholder:w("emailPlaceholder"),password_input_placeholder:w("passwordPlaceholder"),button_label:w("buttonLabel"),loading_button_label:w("loadingLabel"),social_provider_text:w("socialText"),link_text:w("linkText"),confirmation_text:w("confirmationText")},forgotten_password:{email_label:k("emailLabel"),email_input_placeholder:k("emailPlaceholder"),button_label:k("buttonLabel"),loading_button_label:k("loadingLabel"),confirmation_text:k("confirmationText"),link_text:k("linkText")}}}})}),(0,r.jsx)(a(),{id:"bee1f794610c4a0c",children:'@import url("https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@500&display=swap");.ghibli-font{font-family:"M PLUS Rounded 1c",sans-serif;font-size:1.5rem;font-weight:500;color:#4b5563;margin-bottom:1.5rem}.auth-form-container>div>form>div>div:first-of-type{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;
1-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center}.auth-form-container>div>form>div>div:first-of-type>button{width:100%;border:1px solid#e2e8f0;background-color:white;color:#333;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:8px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;-webkit-transition:background-color.2s ease;-moz-transition:background-color.2s ease;-o-transition:background-color.2s ease;transition:background-color.2s ease}.auth-form-container>div>form>div>div:first-of-type>button:hover{background-color:#f3f4f6}.auth-button{width:100%;background-color:white;color:#333;font-weight:500;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05);-webkit-transition:background-color.2s ease;-moz-transition:background-color.2s ease;-o-transition:background-color.2s ease;transition:background-color.2s ease;border:1px solid#e2e8f0}.auth-button:hover{background-color:#f3f4f6}.auth-input{width:100%;border:1px solid#e2e8f0;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;-webkit-transition:all.2s;-moz-transition:all.2s;-o-transition:all.2s;transition:all.2s;background-color:white}.auth-input:focus{border-color:#718096;-webkit-box-shadow:0 0 0 1px#718096;-moz-box-shadow:0 0 0 1px#718096;box-shadow:0 0 0 1px#718096}.auth-divider{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;color:#94a3b8;font-size:.875rem;margin:1rem 0}.auth-divider:before,.auth-divider:after{content:"";-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;border-bottom:1px solid#e2e8f0}.auth-divider:before{margin-right:.5rem}.auth-divider:after{margin-left:.5rem}.auth-anchor{color:#4a5568;font-weight:500;text-align:center;display:block;margin-top:.75rem;cursor:pointer}.auth-anchor:hover{color:#2d3748}.auth-message{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;font-size:.813rem;background:#f8f9fa;border:1px solid#e9ecef;color:#4a5568}.auth-form-container a[href="#auth-forgot-password"]{display:block;font-size:.875rem;color:#4a5568;text-align:right;margin-top:.5rem;margin-bottom:1rem;cursor:pointer}.auth-form-container a[href="#auth-forgot-password"]:hover{color:#2d3748}'})]})}):null}},4833:(e,t,o)=>{o.d(t,{O:()=>l,A:()=>s});var r=o(5155),i=o(2115),a=o(9956);let n=(0,i.createContext)(void 0);function l(e){let{children:t}=e,o=(0,a.createBrowserClient)("https://wxjtamjyolctypaqvmbf.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Ind4anRhbWp5b2xjdHlwYXF2bWJmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDQ4MDI2MjIsImV4cCI6MjA2MDM3ODYyMn0.kqaDAJ39G8TYaVgZ2lPJk4Fv9YAp9Ha-tHy56hRVh2k"),[l,s]=(0,i.useState)(null),[d,c]=(0,i.useState)(null),[u,b]=(0,i.useState)(!0);(0,i.useEffect)(()=>{b(!0),(async()=>{try{var e;let{data:{session:t},error:r}=await o.auth.getSession();if(r)throw r;s(t),c(null!==(e=null==t?void 0:t.user)&&void 0!==e?e:null)}catch(e){console.error("Error fetching session:",e)}finally{b(!1)}})();let{data:{subscription:e}}=o.auth.onAuthStateChange((e,t)=>{var o;s(t),c(null!==(o=null==t?void 0:t.user)&&void 0!==o?o:null),b(!1)});return()=>{null==e||e.unsubscribe()}},[o]);let m=async()=>{await o.auth.signOut()};return(0,r.jsx)(n.Provider,{value:{supabase:o,session:l,user:d,isLoading:u,signOut:m},children:t})}function s(){let e=(0,i.useContext)(n);if(void 0===e)throw Error("useAuth 必须在 AuthProvider 内部使用");return e}}}]);

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.