1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[98450],{10969:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(13996).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},18599:(e,t,a)=>{"use strict";a.d(t,{b:()=>K});var r,n,l,s,o,i,c,u,d,m,_,p,h,g,f,E,v,b,y,A,T,w,I,k,S,P,L,O,C,N,x,U,M,R,D,B=a(55036);let K={app_url:"https://palmscannerai.com",app_name:"PalmScanner AI",app_description:null!=(r=B.env.NEXT_PUBLIC_APP_DESCRIPTION)?r:"Upload your palm photo for a personalized AI palm reading report. Discover insights about personality, love, career, and life path. New users get 1 free credit.",app_logo:null!=(n=B.env.NEXT_PUBLIC_APP_LOGO)?n:"/logo.webp",app_favicon:null!=(l=B.env.NEXT_PUBLIC_APP_FAVICON)?l:"/favicon.ico",app_preview_image:null!=(s=B.env.NEXT_PUBLIC_APP_PREVIEW_IMAGE)?s:"/preview.png",log_level:null!=(o=B.env.LOG_LEVEL)?o:"",palm_debug_logs:null!=(i=B.env.PALM_DEBUG_LOGS)?i:"",theme:"default",appearance:"system",locale:null!=(c=B.env.NEXT_PUBLIC_DEFAULT_LOCALE)?c:"en",openai_api_key:null!=(u=B.env.OPENAI_API_KEY)?u:"",openai_text_api_key:null!=(d=B.env.OPENAI_TEXT_API_KEY)?d:"",openai_image_api_key:null!=(m=B.env.OPENAI_IMAGE_API_KEY)?m:"",openai_base_url:null!=(_=B.env.OPENAI_BASE_URL)?_:"",ai_text_model:null!=(p=B.env.AI_TEXT_MODEL)?p:"",ai_image_model:null!=(h=B.env.AI_IMAGE_MODEL)?h:"",ai_mock_mode:null!=(g=B.env.AI_MOCK_MODE)?g:"",kie_api_key:null!=(f=B.env.KIE_API_KEY)?f:"",kie_api_base_url:null!=(E=B.env.KIE_API_BASE_URL)?E:"https://api.kie.ai",kie_image_model:null!=(v=B.env.KIE_IMAGE_MODEL)?v:"gpt-image-2-image-to-image",kie_text_model:null!=(b=B.env.KIE_TEXT_MODEL)?b:"gpt-5-4",kie_callback_url:null!=(y=B.env.KIE_CALLBACK_URL)?y:"",kie_webhook_hmac_key:null!=(A=B.env.KIE_WEBHOOK_HMAC_KEY)?A:"",kie_file_upload_base_url:null!=(T=B.env.KIE_FILE_UPLOAD_BASE_URL)?T:"https://kieai.redpandaai.co",kie_upload_path:null!=(w=B.env.KIE_UPLOAD_PATH)?w:"images/palm",kie_default_reasoning_effort:null!=(I=B.env.KIE_DEFAULT_REASONING_EFFORT)?I:"low",kie_request_timeout_ms:null!=(k=B.env.KIE_REQUEST_TIMEOUT_MS)?k:"120000",kie_webhook_timestamp_tolerance_seconds:null!=(S=B.env.KIE_WEBHOOK_TIMESTAMP_TOLERANCE_SECONDS)?S:"300",database_url:null!=(P=B.env.DATABASE_URL)?P:"",database_auth_token:null!=(L=B.env.DATABASE_AUTH_TOKEN)?L:"",database_provider:null!=(O=B.env.DATABASE_PROVIDER)?O:"postgresql",db_schema_file:null!=(C=B.env.DB_SCHEMA_FILE)?C:"./src/config/db/schema.ts",db_schema:null!=(N=B.env.DB_SCHEMA)?N:"public",db_migrations_table:null!=(x=B.env.DB_MIGRATIONS_TABLE)?x:"__drizzle_migrations",db_migrations_schema:null!=(U=B.env.DB_MIGRATIONS_SCHEMA)?U:"drizzle",db_migrations_out:null!=(M=B.env.DB_MIGRATIONS_OUT)?M:"./src/config/db/migrations",db_singleton_enabled:B.env.DB_SINGLETON_ENABLED||"false",db_max_connections:B.env.DB_MAX_CONNECTIONS||"1",auth_url:B.env.AUTH_URL||"https://palmscannerai.com",auth_secret:null!=(R=B.env.AUTH_SECRET)?R:"",version:"1.0.0",locale_detect_enabled:null!=(D=B.env.NEXT_PUBLIC_LOCALE_DETECT_ENABLED)?D:"false"}},20252:(e,t,a)=>{"use strict";a.d(t,{D:()=>u,N:()=>d});var r=a(71500),n=(e,t,a,r,n,l,s,o)=>{let i=document.documentElement,c=["light","dark"];function u(t){var a;(Array.isArray(e)?e:[e]).forEach(e=>{let a="class"===e,r=a&&l?n.map(e=>l[e]||e):n;a?(i.classList.remove(...r),i.classList.add(l&&l[t]?l[t]:t)):i.setAttribute(e,t)}),a=t,o&&c.includes(a)&&(i.style.colorScheme=a)}if(r)u(r);else try{let e=localStorage.getItem(t)||a,r=s&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;u(r)}catch(e){}},l=["light","dark"],s="(prefers-color-scheme: dark)",o="undefined"==typeof window,i=r.createContext(void 0),c={setTheme:e=>{},themes:[]},u=()=>{var e;return null!=(e=r.useContext(i))?e:c},d=e=>r.useContext(i)?r.createElement(r.Fragment,null,e.children):r.createElement(_,{...e}),m=["light","dark"],_=e=>{let{forcedTheme:t,disableTransitionOnChange:a=!1,enableSystem:n=!0,enableColorScheme:o=!0,storageKey:c="theme",themes:u=m,defaultTheme:d=n?"system":"light",attribute:_="data-theme",value:E,children:v,nonce:b,scriptProps:y}=e,[A,T]=r.useState(()=>h(c,d)),[w,I]=r.useState(()=>"system"===A?f():A),k=E?Object.values(E):u,S=r.useCallback(e=>{let t=e;if(!t)return;"system"===e&&n&&(t=f());let r=E?E[t]:t,s=a?g(b):null,i=document.documentElement,c=e=>{"class"===e?(i.classList.remove(...k),r&&i.classList.add(r)):e.startsWith("data-")&&(r?i.setAttribute(e,r):i.removeAttribute(e))};if(Array.isArray(_)?_.forEach(c):c(_),o){let e=l.includes(d)?d:null,a=l.includes(t)?t:e;i.style.colorScheme=a}null==s||s()},[b]),P=r.useCallback(e=>{let t="function"==typeof e?e(A):e;T(t);try{localStorage.setItem(c,t)}catch(e){}},[A]),L=r.useCallback(e=>{I(f(e)),"system"===A&&n&&!t&&S("system")},[A,t]);r.useEffect(()=>{let e=window.matchMedia(s);return e.addListener(L),L(e),()=>e.removeListener(L)},[L]),r.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?T(e.newValue):P(d))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[P]),r.useEffect(()=>{S(null!=t?t:A)},[t,A]);let O=r.useMemo(()=>({theme:A,setTheme:P,forcedTheme:t,resolvedTheme:"system"===A?w:A,themes:n?[...u,"system"]:u,systemTheme:n?w:void 0}),[A,P,t,w,n,u]);return r.createElement(i.Provider,{value:O},r.createElement(p,{forcedTheme:t,storageKey:c,attribute:_,enableSystem:n,enableColorScheme:o,defaultTheme:d,value:E,themes:u,nonce:b,scriptProps:y}),v)},p=r.memo(e=>{let{forcedTheme:t,storageKey:a,attribute:l,enableSystem:s,enableColorScheme:o,defaultTheme:i,value:c,themes:u,nonce:d,scriptProps:m}=e,_=JSON.stringify([l,a,i,t,u,c,s,o]).slice(1,-1);return r.createElement("script",{...m,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?d:"",dangerouslySetInnerHTML:{__html:"(".concat(n.toString(),")(").concat(_,")")}})}),h=(e,t)=>{let a;if(!o){try{a=localStorage.getItem(e)||void 0}catch(e){}return a||t}},g=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},f=e=>
1(e||(e=window.matchMedia(s)),e.matches?"dark":"light")},25893:(e,t,a)=>{"use strict";a.d(t,{Toaster:()=>o});var r=a(47808),n=a(20252),l=a(31963),s=a(71500);let o=e=>{let{...t}=e,{theme:a="system"}=(0,n.D)(),[o,i]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{i(!0)},[]),o)?(0,r.jsx)(l.l$,{theme:a,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t}):null}},28684:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(13996).A)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},33791:(e,t,a)=>{"use strict";a.d(t,{ToastProvider:()=>m,dj:()=>_,w1:()=>f});var r=a(47808),n=a(71500),l=a(28684),s=a(50207),o=a(10969),i=a(79934),c=a(85170),u=a(57169);let d=(0,n.createContext)(void 0);function m(e){let{children:t}=e,[a,l]=(0,n.useState)([]),s=(0,n.useCallback)(e=>{let t=Math.random().toString(36).substring(2,9),a={...e,id:t};l(e=>[...e,a]),setTimeout(()=>{l(e=>e.filter(e=>e.id!==t))},e.duration||5e3)},[]),o=(0,n.useCallback)(e=>{l(t=>t.filter(t=>t.id!==e))},[]);return(0,r.jsxs)(d.Provider,{value:{showToast:s,removeToast:o},children:[t,(0,r.jsx)(g,{toasts:a,onRemove:o})]})}function _(){let e=(0,n.useContext)(d);if(!e)throw Error("useToast must be used within a ToastProvider");return e}function p(e){let{type:t}=e;return({success:(0,r.jsx)(l.A,{className:"size-5 text-green-600 dark:text-green-400"}),error:(0,r.jsx)(s.A,{className:"size-5 text-red-600 dark:text-red-400"}),warning:(0,r.jsx)(o.A,{className:"size-5 text-yellow-600 dark:text-yellow-400"}),info:(0,r.jsx)(i.A,{className:"size-5 text-blue-600 dark:text-blue-400"})})[t]}function h(e){let{toast:t,onRemove:a}=e,[l,s]=(0,n.useState)(!1);return(0,r.jsxs)("div",{className:(0,u.cn)("flex w-full items-start gap-3 rounded-lg border p-4 shadow-lg transition-all duration-300",{success:"bg-green-50 dark:bg-green-900/20",error:"bg-red-50 dark:bg-red-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",info:"bg-blue-50 dark:bg-blue-900/20"}[t.type],{success:"border-green-200 dark:border-green-800",error:"border-red-200 dark:border-red-800",warning:"border-yellow-200 dark:border-yellow-800",info:"border-blue-200 dark:border-blue-800"}[t.type],l?"translate-x-full opacity-0":"translate-x-0 opacity-100"),role:"alert","aria-live":"polite",children:[(0,r.jsx)(p,{type:t.type}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h4",{className:"font-medium text-foreground",children:t.title}),t.message&&(0,r.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:t.message})]}),(0,r.jsx)("button",{onClick:()=>{s(!0),setTimeout(()=>{a()},300)},className:"rounded p-1 hover:bg-black/5 dark:hover:bg-white/10","aria-label":"Close notification",children:(0,r.jsx)(c.A,{className:"size-4"})})]})}function g(e){let{toasts:t,onRemove:a}=e;return 0===t.length?null:(0,r.jsx)("div",{className:"fixed top-4 right-4 z-[100] flex w-full max-w-sm flex-col gap-2",children:t.map(e=>(0,r.jsx)(h,{toast:e,onRemove:()=>a(e.id)},e.id))})}let f={UPLOAD_SUCCESS:{type:"success",title:"Upload successful!",message:"Your palm photo has been uploaded."},REPORT_GENERATED:{type:"success",title:"Report generated!",message:"Your palm reading is ready."},CREDIT_PURCHASED:{type:"success",title:"Credits added!",message:"Your credits have been added to your account."},UPLOAD_FAILED:{type:"error",title:"Upload failed",message:"Please try again or contact support if the problem persists."},FILE_TOO_LARGE:{type:"error",title:"File too large",message:"Please upload an image smaller than 10MB."},INVALID_FILE_TYPE:{type:"error",title:"Invalid file type",message:"Please upload a JPG, PNG, or WebP image."},NETWORK_ERROR:{type:"error",title:"Connection error",message:"Please check your internet connection and try again."},INSUFFICIENT_CREDITS:{type:"error",title:"Insufficient credits",message:"Please purchase more credits to continue."},SLOW_UPLOAD:{type:"warning",title:"Upload taking longer than usual",message:"Please wait while we process your image..."},SESSION_TIMEOUT:{type:"warning",title:"Session timeout",message:"Please sign in again to continue."},UPLOAD_START:{type:"info",title:"Upload started",message:"Your palm photo is being uploaded..."}
1,ANALYSIS_START:{type:"info",title:"Analysis started",message:"Your palm is being analyzed by our AI..."}}},45753:(e,t,a)=>{"use strict";a.d(t,{default:()=>l});var r=a(97326),n=a(47808);function l(e){let{locale:t,...a}=e;if(!t)throw Error(void 0);return(0,n.jsx)(r.Dk,{locale:t,...a})}},49873:(e,t,a)=>{"use strict";a.d(t,{ThemeProvider:()=>i});var r=a(47808),n=a(71500),l=a(97326),s=a(20252),o=a(18599);function i(e){let{children:t}=e,a=(0,l.Ym)();return(0,n.useEffect)(()=>{"undefined"!=typeof document&&a&&(document.documentElement.lang=a)},[a]),(0,r.jsx)(s.N,{attribute:"class",defaultTheme:o.b.appearance,enableSystem:!0,disableTransitionOnChange:!0,children:t})}},50207:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(13996).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},51078:(e,t,a)=>{Promise.resolve().then(a.bind(a,45753)),Promise.resolve().then(a.bind(a,49873)),Promise.resolve().then(a.bind(a,25893)),Promise.resolve().then(a.bind(a,33791)),Promise.resolve().then(a.bind(a,89602))},57169:(e,t,a)=>{"use strict";a.d(t,{cn:()=>l});var r=a(57305),n=a(43753);function l(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,n.QP)((0,r.$)(t))}},64630:(e,t,a)=>{"use strict";a.d(t,{CI:()=>_,Hh:()=>m,Jv:()=>d,ep:()=>p,wV:()=>u,yK:()=>c});var r=a(82551),n=a(24784),l=a(18599);function s(){var e;return(null==(e=window.location)?void 0:e.origin)?window.location.origin:l.b.auth_url||l.b.app_url}function o(e){let{minIntervalMs:t}=e,a=new Map,r=0;return async(e,n)=>{if(!t||!function(e,t){var a,r,n,l;if("GET"!==(null!=(l=null==(r=null!=(n=null==t?void 0:t.method)?n:e instanceof Request?e.method:"GET")||null==(a=r.toUpperCase)?void 0:a.call(r))?l:"GET"))return!1;let s="string"==typeof e?e:e instanceof URL?e.toString():e.url;return new URL(s,window.location.origin).pathname.endsWith("/get-session")}(e,n))return fetch(e,n);let l=function(e){let t="string"==typeof e?e:e instanceof URL?e.toString():e.url,a=new URL(t,window.location.origin);return"GET ".concat(a.origin).concat(a.pathname)}(e),s=a.get(l);if(s)return s;let o=Date.now(),i=Math.max(0,r+t-o),c=(async()=>(i>0&&await new Promise(e=>
1setTimeout(e,i)),r=Date.now(),fetch(e,n)))().finally(()=>{a.delete(l)});return a.set(l,c),c}}let i=Number(a(55036).env.NEXT_PUBLIC_AUTH_GET_SESSION_MIN_INTERVAL_MS)||2e3,c=(0,n.MB)({baseURL:s(),fetchOptions:{retry:0,customFetchImpl:o({minIntervalMs:i})}}),{useSession:u,signIn:d,signUp:m,signOut:_}=c;function p(e){return(0,n.MB)({baseURL:s(),plugins:function(e){let t=[];return e.google_client_id&&"true"===e.google_one_tap_enabled&&t.push((0,r.ll)({clientId:e.google_client_id,autoSelect:!1,cancelOnTapOutside:!1,context:"signin",additionalOptions:{},promptOptions:{baseDelay:1e3,maxAttempts:1}})),t}(e),fetchOptions:{retry:0,customFetchImpl:o({minIntervalMs:i})}})}},79934:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(13996).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},85170:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(13996).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},89602:(e,t,a)=>{"use strict";a.d(t,{AppContextProvider:()=>c,U:()=>i});var r=a(47808),n=a(71500),l=a(64630),s=a(18599);let o=(0,n.createContext)({}),i=()=>(0,n.useContext)(o),c=e=>{let{children:t}=e,[a,i]=(0,n.useState)({}
1),[c,u]=(0,n.useState)(null),d=(0,n.useRef)(null),[m,_]=(0,n.useState)(!!s.b.auth_secret),[p,h]=(0,n.useState)(!1),[g,f]=(0,n.useState)(!1),E=(0,n.useCallback)(async()=>{try{let e=await fetch("/api/config/get-configs",{method:"POST"});if(!e.ok)throw Error("fetch failed with status: ".concat(e.status));let{code:t,message:a,data:r}=await e.json();if(0!==t)throw Error(a);i(r)}catch(e){}},[]),v=(0,n.useCallback)(async()=>{try{if(!d.current)return;let e=await fetch("/api/user/get-user-credits",{method:"POST"});if(!e.ok)throw Error("fetch failed with status: ".concat(e.status));let{code:t,message:a,data:r}=await e.json();if(0!==t)throw Error(a);u(e=>e?{...e,credits:r}:e)}catch(e){}},[]),b=(0,n.useCallback)(async()=>{try{let e=await fetch("/api/user/get-user-info",{method:"POST"});if(!e.ok)throw Error("fetch failed with status: ".concat(e.status));let{code:t,message:a,data:r}=await e.json();if(0!==t)throw Error(a);u(r)}catch(e){}},[]),y=(0,n.useCallback)(async e=>{try{let t=(0,l.ep)(e);await t.oneTap({callbackURL:"/",onPromptNotification:e=>{}})}catch(e){}},[]);(0,n.useEffect)(()=>{d.current=c},[c]),(0,n.useEffect)(()=>{E(),b()},[E,b]);let A=(0,n.useMemo)(()=>({user:c,setUser:u,isCheckSign:m,setIsCheckSign:_,isShowSignModal:p,setIsShowSignModal:h,isShowPaymentModal:g,setIsShowPaymentModal:f,configs:a,fetchConfigs:E,fetchUserCredits:v,fetchUserInfo:b,showOneTap:y}),[c,m,p,g,a,E,v,b,y]);return(0,r.jsx)(o.Provider,{value:A,children:t})}}},e=>{e.O(0,[34247,97326,34065,10034,93605,89883,47714,77358],()=>e(e.s=51078)),_N_E=e.O()}]);
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.