PageSourceSearch

https://www.santanderconsumer.se/_next/static/chunks/3884.ecd052b0753dd13f.js

js santanderconsumer.se collected 2026-09-24 19:29:33 UTC 25,711 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3884],{7152:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(7620),o=a(63575),r=a(25654);function s(){let e=(0,n.useRef)((0,r.A)()),{query:t}=(0,o.A)();return(0,n.useCallback)(()=>"string"==typeof t.sessionId?t.sessionId:e.current,[t.sessionId])}},44150:(e,t,a)=>{a.d(t,{A:()=>b});var n=a(54568),o=a(10891),r=a(21524),s=a(70260),i=a(66562),l=a(97492),u=a(48442),c=a(39818),d=a(24775),h=a(75347),p=a(64119),m=a(42493),g=a(72258);let{component:y,element:f}=(0,u.T)("sn-step-resume");function b({id:e,texts:t,onContinue:a,disabled:u,loading:v,isAuthenticated:A=!1,resumeApplications:w,..._}){let{loading:k,handleStateChange:x}=(0,o.A)(),P=v||k,C=A&&!w?.length;return(0,n.jsxs)(c.A,{id:e,onSubmit:a,onStateChange:x,...t.step,heading:C?t.noApplicationsFound?.heading:t.step.heading,preamble:C?t.noApplicationsFound?.preamble:t.step.preamble,..._,className:y(),children:[t.message&&(0,n.jsx)(d.A,{texts:t.message,type:"warning","data-name":"message",className:f("picture-message")}),t.auth&&!A&&(0,n.jsxs)(r.A,{color:"yellow-light",children:[t.auth.title&&(0,n.jsx)("h2",{"data-name":"loginTitle",children:t.auth.title}),t.auth.description&&(0,n.jsx)(s.A,{tag:"p","data-name":"loginDescription",children:t.auth.description}),t.auth.auth.displayMode===m.q5.Navigation?(0,n.jsx)(h.A,{picture:t.auth.picture,hidePictureOnMobile:!0,"data-name":"picture",children:(0,n.jsx)(p.A,{texts:t.auth.auth,loading:P,disabled:P||u,"data-name":"auth"})}):(0,n.jsx)(p.A,{texts:t.auth.auth,loading:P,disabled:P||u,"data-name":"auth"})]}),A&&(0,n.jsx)(r.A,{className:f("authenticated-section"),children:C?(0,n.jsx)(n.Fragment,{children:t.noApplicationsFound?.image&&(0,n.jsx)("div",{className:f("not-found-picture-container"),children:(0,n.jsx)(l.A,{...t.noApplicationsFound.image,className:f("not-found-picture"),raw:!0,"data-name":"image"})})}):(0,n.jsxs)(n.Fragment,{children:[t.applicationsFoundTitle&&(0,n.jsx)("h2",{"data-name":"applicationsFoundTitle",children:t.applicationsFoundTitle}),(0,n.jsx)("ul",{className:f("resume-links"),children:w?.map((e,t)=>(0,n.jsxs)("li",{className:f("resume-link"),children:[(0,n.jsxs)("div",{className:f("resume-link-content"),children:[e.productIconType&&(0,n.jsx)(g.O,{className:f("resume-link-content-icon"),productType:e.productIconType,color:e.resumeUrl?"red":"black"}),(0,n.jsxs)("div",{className:f("resume-link-content-main"),children:[!e.resumeUrl&&(0,n.jsx)("p",{className:f("resume-link-content-main-label"),children:e.label}),e.resumeUrl&&(0,n.jsx)(i.A,{href:e.resumeUrl,target:"_self",className:f("resume-link-content-main-label"),children:e.label}),e.createdDate&&(0,n.jsx)(s.A,{tag:"p",children:e.createdDate})]})]}),e.description&&(0,n.jsx)(s.A,{className:e.productIconType&&f("resume-link-description--withIcon"),tag:"p",children:e.description})]},t))})]})})]})}},50039:(e,t,a)=>{a.d(t,{A:()=>f,h:()=>b});var n=a(54568),o=a(7620),r=a(31746),s={panel:"AuthDebugPanel-module_panel__bPz2B","panel--minimized":"AuthDebugPanel-module_panel--minimized__nC2Mj",header:"AuthDebugPanel-module_header__0W2Ke",headerHint:"AuthDebugPanel-module_headerHint__xe-PY",body:"AuthDebugPanel-module_body__IANCq",emptyNote:"AuthDebugPanel-module_emptyNote__iN6MC",tokenRow:"AuthDebugPanel-module_tokenRow__UkXEG",dot:"AuthDebugPanel-module_dot__C1U8U","dot--idle":"AuthDebugPanel-module_dot--idle__TLLza","dot--authenticating":"AuthDebugPanel-module_dot--authenticating__2QnhF","dot--authenticated":"AuthDebugPanel-module_dot--authenticated__oOwss","dot--should_retry":"AuthDebugPanel-module_dot--should_retry__DciFy","dot--failed":"AuthDebugPanel-module_dot--failed__-vt7O",tokenKey:"AuthDebugPanel-module_tokenKey__mUXI-",tokenStatus:"AuthDebugPanel-module_tokenStatus__MgfFB","tokenStatus--idle":"AuthDebugPanel-module_tokenStatus--idle__h6kua","tokenStatus--authenticating":"AuthDebugPanel-module_tokenStatus--authenticating__23RwU","tokenStatus--authenticated":"AuthDebugPanel-module_tokenStatus--authenticated__m-9i2","tokenStatus--should_retry":"AuthDebugPanel-module_tokenStatus--should_retry__nPTSE","tokenStatus--failed":"AuthDebugPanel-module_tokenStatus--failed__9uz0D",retryCount:"AuthDebugPanel-module_retryCount__s5T62",separator:"AuthDebugPanel-module_separator__m-4ck",actions:"AuthDebugPanel-module_actions__shk-5",actionBtn:"AuthDebugPanel-module_actionBtn__36nUX","actionBtn--iframe":"AuthDebugPanel-module_actionBtn--iframe__KAoXU","actionBtn--popup":"AuthDebugPanel-module_actionBtn--popup__Poiah","actionBtn--redirect":"AuthDebugPanel-module_actionBtn--redirect__M46Eg","actionBtn--reset":"AuthDebugPanel-module_actionBtn--reset__YiO41",jsonBlock:"AuthDebugPanel-module_jsonBlock__ThwK9"};function i({authState:e,ssoTokenKey:t,ssoAuthType:a,onHidden:r,onPopup:l,onRedirect:u,onLogout:c}){let[d,h]=(0,o.useState)(!0),p=Object.entries(e),m=e[t]?.status==="authenticated",g
1=[s.panel,d?s["panel--minimized"]:void 0].filter(Boolean).join(" ");return(0,n.jsxs)("div",{className:g,children:[(0,n.jsxs)("button",{className:s.header,onClick:()=>h(e=>!e),children:[(0,n.jsx)("span",{children:"\uD83D\uDD10 AuthContext"}),(0,n.jsx)("span",{className:s.headerHint,children:d?"[ expand ]":"[ collapse ]"})]}),!d&&(0,n.jsxs)("div",{className:s.body,children:[0===p.length?(0,n.jsxs)("div",{className:s.emptyNote,children:["No tokens yet — ",t," / ",a]}):p.map(([e,t])=>{let a=t.status,o=t.retryCount;return(0,n.jsxs)("div",{className:s.tokenRow,children:[(0,n.jsx)("span",{className:[s.dot,s[`dot--${a}`]].filter(Boolean).join(" ")}),(0,n.jsx)("span",{className:s.tokenKey,children:e}),(0,n.jsx)("span",{className:[s.tokenStatus,s[`tokenStatus--${a}`]].filter(Boolean).join(" "),children:a}),void 0!==o&&(0,n.jsxs)("span",{className:s.retryCount,children:["\xd7",o]})]},e)}),(0,n.jsx)("hr",{className:s.separator}),m?(0,n.jsx)("button",{className:[s.actionBtn,s["actionBtn--reset"]].join(" "),onClick:c,children:"↩ Reset"}):(0,n.jsxs)("div",{className:s.actions,children:[(0,n.jsx)("button",{className:[s.actionBtn,s["actionBtn--iframe"]].join(" "),onClick:r,title:"authWithIframe — silent iframe",children:"\uD83D\uDDBC iframe"}),(0,n.jsx)("button",{className:[s.actionBtn,s["actionBtn--popup"]].join(" "),onClick:l,title:"authWithPopup — requires user gesture",children:"\uD83E\uDE9F popup"}),(0,n.jsx)("button",{className:[s.actionBtn,s["actionBtn--redirect"]].join(" "),onClick:u,title:"authWithRedirect — full-page redirect",children:"\uD83D\uDD00 redirect"})]}),(0,n.jsx)("pre",{className:s.jsonBlock,children:JSON.stringify(e,null,2)})]})]})}var l=a(64203),u=a(70126);function c({apiBaseUrl:e,countryCode:t,sessionId:a,authType:n,tokenKey:o,redirectUrl:r,cancelUrl:s,failUrl:i}){let l=encodeURIComponent(window.location.href).replace("%20","+"),u=r?encodeURIComponent(r).replace("%20","+"):encodeURIComponent(window.location.origin).replace("%20","+"),d=s?encodeURIComponent(s).replace("%20","+"):l,h=i?encodeURIComponent(i).replace("%20","+"):l;return`${e}/v1/auth?country=${t}&type=${n}&sessionId=${a}&tokenKey=${o}&redirectUrl=${u}&failUrl=${h}&cancelUrl=${d}`}class d extends Error{constructor(){super("Session cookie was blocked by the browser (cross-site tracking prevention)"),this.name="SessionCookieBlockedError"}}
1class h extends Error{constructor(){super("Popup window was blocked by the browser"),this.name="PopupBlockedError"}}function p(e){let t=()=>void 0;return e?{log:console.log.bind(console),warn:console.warn.bind(console),group:console.group.bind(console),groupEnd:console.groupEnd.bind(console)}:{log:t,warn:t,group:t,groupEnd:t}}let m="sn_auth_pending";async function g(e,t){let{maxRetries:a,retryDelayMs:n,onBeforeRetry:o}=t,r=async t=>{try{return await e(t)}catch(e){if(void 0===a||t<a){let e=t+1;return o?.(e,a),await new Promise(e=>setTimeout(e,n)),r(e)}throw e}};return r(0)}let y=(0,o.createContext)(null);function f({children:e,settings:t,ssoAuthType:a="CurityParSso",ssoTokenKey:s="Applicant",pollIntervalMs:b=250,pollTimeoutMs:v=3e3,maxRetries:A=0,retryDelayMs:w=250}){let _=window.self!==window.top,{logError:k}=(0,u.Ul)("AuthProvider"),x=(0,o.useRef)({}),P=(0,o.useRef)(!1),{state:C}=(0,r.A)(),[j,I]=(0,o.useState)({}),{log:S,warn:N,group:T,groupEnd:R}=(0,o.useMemo)(()=>p(t.verbose),[t.verbose]),$=(0,o.useCallback)((e,t)=>{I(a=>{let n=a[e]??{status:"idle",tokenKey:e};return{...a,[e]:t(n)}})},[]),D=(0,o.useCallback)(e=>j[e],[j]),E=(0,o.useCallback)(e=>j[e]?.status==="authenticated",[j]),B=(0,o.useCallback)(e=>j[e]?.status??"idle",[j]),U=(0,o.useMemo)(()=>["authenticating","should_retry"].includes(B(l.i.Applicant)),[B]),M=(0,o.useCallback)(async(e,t,a,n)=>{if(!await e(n))return null;let o={success:!0,tokenKey:t,authType:a,sessionId:C.sessionId};return $(t,e=>({...e,status:"authenticated",lastResult:o})),o},[C.sessionId,$]),W=(0,o.useCallback)(async(e,t,a,n,o)=>{if(E(e))return S(`✅ Already authenticated — skipping ${n}`),{success:!0,tokenKey:e,authType:t,sessionId:C.sessionId};if(a){S(`🔍 Running session probe (${n})...`);let r=await M(a,e,t,o);if(r)return S(`✅ Session probe passed — skipping ${n}`),r}return null},[E,S,C.sessionId,M]),K=(0,o.useCallback)(async e=>{let n=c({apiBaseUrl:t.apiBaseUrl,countryCode:t.countryCode,sessionId:C.sessionId,authType:e.authType,tokenKey:e.tokenKey});S(`🖼️  runIframeAuth [${e.tokenKey}] authType=${e.authType}`,n);let o=e.maxRetries??A,r=e.retryDelayMs??w;S(`🖼️  maxRetries=${o} retryDelayMs=${r}`);try{return await g(async o=>{let r;$(e.tokenKey,t=>({...t,status:"authenticating",authMethod:"hidden",authType:e.authType,retryCount:o}));try{r=await function(e,t,a){let{log:n,warn:o}=p(a.verbose);return new Promise((r,s)=>{var i;let l;if(a.signal?.aborted)return void s(Error("Authentication aborted"));let u=(i=a.verbose,(l=document.createElement("iframe")).title="Authentication iframe",l.setAttribute("aria-hidden","true"),i?Object.assign(l.style,{position:"fixed",bottom:"0",right:"0",width:"400px",height:"300px",border:"2px solid #e00",zIndex:"99999"}):l.style.cssText="position:fixed;width:0;height:0;border:0;opacity:0;pointer-events:none;",l);document.body.appendChild(u);let c=null,h=null,p=()=>{c&&clearTimeout(c),h&&clearInterval(h),a.signal?.removeEventListener("abort",m);try{u.contentWindow?.location.replace("about:blank")}catch{}u.parentNode&&u.parentNode.removeChild(u)},m=()=>{p(),s(Error("Authentication aborted"))};a.signal?.addEventListener("abort",m),u.contentWindow?.location.replace(e),n("\uD83D\uDE80 ~ runHiddenAuthInIframe ~ authUrl:",e),h=setInterval(()=>{try{let e=u.contentWindow?.location.href;e?.startsWith(t)&&(e=>{var t;let n=new URL(e).searchParams.get("error");return(p(),null!==n)?r({errorParam:n}):a.sessionProbe?(t=a.sessionProbe,t(a.signal).then(e=>{e?r({errorParam:null}):s(new d)},()=>{s(new d)})):r({errorParam:null})})(e)}catch{}},a.pollIntervalMs),c=setTimeout(()=>{o("\uD83D\uDE80 ~ runHiddenAuthInIframe ~ timeout"),p(),s(Error("Authentication timeout"))},a.pollTimeoutMs)})}(n,window.location.origin,{pollIntervalMs:b,pollTimeoutMs:v,signal:e.signal,verbose:t.verbose,sessionProbe:e.sessionProbe})}catch(t){throw $(e.tokenKey,e=>({...e,status:"should_retry",error:t,retryCount:o})),t}if(r.errorParam){let t=Error(`Authentication failed: ${r.errorParam}`),n={success:!1,tokenKey:s,authType:a,sessionId:C.sessionId,error:r.errorParam};throw $(e.tokenKey,e=>({...e,status:"should_retry",lastResult:n,error:t,retryCount:o})),t}let i={success:!0,tokenKey:s,authType:a,sessionId:C.sessionId};return S(`✅ authWithIframe succeeded [${e.tokenKey}] retries=${o}`),$(e.tokenKey,e=>({...e,status:"authenticated",lastResult:i,retryCount:o})),i},{maxRetries:o,retryDelayMs:r,onBeforeRetry:e=>S(`🔁 Retrying authentication (attempt ${e+1}/${void 0!==o?o+1:"∞"})`)})}catch(t){if(t instanceof d)throw t;throw k(`Authentication failed after ${o} attempts`,Error("Authentication failed after specified number of attempts",{cause:t}),{maxRetries:o}),$(e.tokenKey,e=>({...e,status:"failed",error:t})),t}},[t,$,b,v,s,a,C.sessionId,A,w,k,S]),O=(0,o.useCallback)(async e=>{let t=e?.tokenKey??s,n=e?.authType??a,o=e?.__sessionProbe;T(`🔒 authWithIframe [${t}] authType=${n}`);let r=await W(t,n,o,"iframe",e?.signal);return(R(),r)?r:K({authType:n,tokenKey:t,signal:e?.signal,maxRetries:e?.maxRetries,retryDelayMs:e?.retryDelayMs,sessionProbe:o})},[K,a,s,T,R,W,C.sessionId]),F=(0,o.useCallback)(async e=>{let n=e?.tokenKey??s,o=e?.authType??a,r=e?.signal,i=e?.__sessionProbe,l=window.open("about:blank","sn_auth_popup","popup,width=600,height=700");if(!l){let e=new h;throw $(n,t=>({...t,status:"failed",error:e})),e}T(`🪟 authWithPopup [${n}] authType=${o}`);let u=await W(n,o,i,"popup",r);if(R(),u)return l.close(),u;let d=c({apiBaseUrl:t.apiBaseUrl,countryCode:t.countryCode,sessionId:C.sessionId,authType:o,tokenKey:n});return S("\uD83E\uDE9F Opening popup → authUrl:",d),g(async e=>{e>0&&S(`🔁 authWithPopup retry attempt ${e}`),$(n,t=>({...t,status:"authenticating",authMethod:"popup",authType:o,retryCount:e}));let a=await function(e,t,a){let{log:n,warn:o}=p(a.verbose);return new Promise((r,s)=>{let i;if(a.signal?.aborted)return void s(Error("Authentication aborted"));if(a.preOpenedPopup&&!a.preOpenedPopup.closed?((i=a.preOpenedPopup).location.href=e,n("\uD83D\uDE80 ~ runAuthInPopup ~ navigating pre-opened popup to:",e)):(i=window.open(e,"sn_auth_popup","popup,width=600,height=700"),n("\uD83D\uDE80 ~ runAuthInPopup ~ popup opened:",e)),!i||i.closed)return void s(new h);n("\uD83D\uDE80 ~ runAuthInPopup ~ popup ready:",e);let l=null,u=null,c=()=>{l&&clearTimeout(l),u&&clearInterval(u),a.signal?.removeEventListener("abort",d),i.closed||i.close()},d=()=>{c(),s(Error("Authentication aborted"))};a.signal?.addEventListener("abort",d),u=setInterval(()=>{if(i.closed){c(),s(Error("Authentication cancelled"));return}try{let e=i.location.href;if(!e?.startsWith(t))return;
1c(),r({errorParam:new URL(e).searchParams.get("error")})}catch{}},a.pollIntervalMs),l=setTimeout(()=>{o("\uD83D\uDE80 ~ runAuthInPopup ~ timeout"),c(),s(Error("Authentication timeout"))},a.pollTimeoutMs)})}(d,window.location.origin,{pollTimeoutMs:v,pollIntervalMs:b,signal:r,verbose:t.verbose,preOpenedPopup:0===e?l:void 0});if(a.errorParam){let t=Error(`Authentication failed: ${a.errorParam}`);throw N(`❌ authWithPopup IdP error: ${a.errorParam}`),$(n,a=>({...a,status:"should_retry",error:t,retryCount:e})),t}if(i){S("\uD83D\uDD0D Running post-popup session probe...");let t=await i(r);if(S(`🔍 Post-popup probe result: ${t?"✅ ok":"❌ failed"}`),!t){let t=Error("Session probe failed after popup authentication");throw $(n,a=>({...a,status:"should_retry",error:t,retryCount:e})),t}}let s={success:!0,tokenKey:n,authType:o,sessionId:C.sessionId};return S(`✅ authWithPopup succeeded [${n}]`),$(n,t=>({...t,status:"authenticated",lastResult:s,retryCount:e})),s},{maxRetries:A,retryDelayMs:w,onBeforeRetry:e=>S(`🔁 authWithPopup retrying (attempt ${e+1}/${void 0!==A?A+1:"∞"})`)})},[t,$,b,v,A,w,a,s,C.sessionId,W,S,N,T,R]),L=(0,o.useCallback)(e=>{let n=e.tokenKey??s,o=e.authType??a,r=c({apiBaseUrl:t.apiBaseUrl,countryCode:t.countryCode,sessionId:C.sessionId,authType:o,tokenKey:n,redirectUrl:e.redirectUrl,cancelUrl:e.cancelUrl,failUrl:e.failUrl});S(`🔀 authWithRedirect [${n}] authType=${o} → navigating away`,r),$(n,e=>({...e,status:"authenticating",authMethod:"redirect",authType:o})),P.current=!0;var i={authType:o,tokenKey:n,sessionId:C.sessionId};throw sessionStorage.setItem(m,JSON.stringify(i)),window.location.replace(r),Error("unreachable")},[t,$,a,s,C.sessionId,S]);(0,o.useEffect)(()=>{let e=function(){let e=sessionStorage.getItem(m);if(!e)return null;let t=new URLSearchParams(window.location.search),a=t.get("error");if(sessionStorage.removeItem(m),null!==a){t.delete("error");let e=t.toString(),a=window.location.pathname+(e?"?"+e:"")+window.location.hash;history.replaceState(null,"",a)}try{return{...JSON.parse(e),errorParam:a}}catch{return null}}();if(!e)return;let{tokenKey:t,authType:a,errorParam:n}=e;S(`↩️  authWithRedirect return detected [${t}] authType=${a} error=${n??"none"}`,e),$(t,e=>({...e,status:n?"should_retry":"authenticated",authMethod:"redirect",authType:a})),x.current[t]=!0},[]);let z=(0,o.useMemo)(()=>({authState:{},getAuthState:e=>({status:"idle",tokenKey:e}),isAuthenticated:()=>!1,getAuthStatus:()=>"idle",authWithIframe:()=>Promise.resolve({success:!1,authType:a,tokenKey:s}),authWithPopup:()=>Promise.resolve({success:!1,authType:a,tokenKey:s}),authWithRedirect:()=>{throw Error("unreachable")},authRedirecting:{current:!1},authenticating:!1}),[a,s]),H=(0,o.useMemo)(()=>({authState:j,getAuthState:D,isAuthenticated:E,getAuthStatus:B,authWithIframe:O,authWithPopup:F,authWithRedirect:L,authRedirecting:P,authenticating:U}),[j,D,E,B,O,F,L,P,U]);return _?(0,n.jsx)(y.Provider,{value:z,children:e}):(0,n.jsxs)(y.Provider,{value:H,children:[e,t.verbose&&(0,n.jsx)(i,{authState:j,ssoTokenKey:s,ssoAuthType:a,onHidden:()=>O({signal:new AbortController().signal}),onPopup:()=>F({signal:new AbortController().signal}),onRedirect:()=>L({redirectUrl:window.location.href}),onLogout:()=>$(s,()=>({status:"idle",tokenKey:s}))})]})}function b(e){let t=(0,o.useContext)(y),a=(0,o.useMemo)(()=>({authState:{},getAuthState:e=>({status:"idle",tokenKey:e}),isAuthenticated:()=>!1,getAuthStatus:()=>"idle",authWithIframe:()=>Promise.resolve({success:!1,authType:"",tokenKey:""}),authWithPopup:()=>Promise.resolve({success:!1,authType:"",tokenKey:""}),authWithRedirect:()=>{throw Error("unreachable")},authRedirecting:{current:!1},authenticating:!1}),[]),n=(0,o.useMemo)(()=>{if(t)return t;throw Error("useAuth must be used within an AuthProvider")},[t,a]),r=(0,o.useRef)(n),s=(0,o.useRef)(e);(0,o.useEffect)(()=>{r.current=n},[n]),(0,o.useEffect)(()=>{s.current=e},[e]);let i=(0,o.useCallback)(e=>r.current.authWithIframe({...e,__sessionProbe:s.current}),[]),l=(0,o.useCallback)(e=>r.current.authWithPopup({...e,__sessionProbe:s.current}),[]),u=(0,o.useMemo)(()=>({...n,authWithIframe:i,authWithPopup:l}),[i,l,n]);return e?u:n}},57742:(e,t,a)=>{a.d(t,{Ye:()=>r});var n=a(7620),o=a(80818);let r=e=>(0,n.useMemo)(()=>(e=>{let t=new o.UAParser(e),a=t.getBrowser(),n=t.getEngine(),r=t.getDevice(),s=t.getOS();switch(a.name){case"Opera Mini":case"Opera Mobi":case"Opera Tablet":a.name="Opera";break;case"Mobile Safari":a.name="Safari";break;case"Samsung Internet":a.name="Samsung Browser"}return{browser:{...a,name:a.name,major:a.version?parseInt(a.version.split(".")[0]):void 0},engine:{...n,name:n.name,major:n.version?parseInt(n.version.split(".")[0]):void 0},device:{...r,isMobile:r.type?"mobile"===r.type||"tablet"===r.type:void 0},os:{...s,name:s.name}}})(e),[e])},64119:(e,t,a)=>{a.d(t,{A:()=>g});var n=a(54568),o=a(48442),r=a(36626),s=a(31645),i=a(63204),l=a(94786),u=a(42493),c=a(57742);let{component:d,element:h}=(0,o.T)("sn-auth"),p=({authType:e,id:t,texts:a,disabled:o,loading:i,prefix:l,onClick:u,outline:c=!1})=>(0,n.jsxs)(r.default,{name:`${l}${e}`,"data-auth-type":a.authType,className:h("button","compact"),accent:a?.accent??"sky-light",noFocusIndicator:a?.noFocusIndicator??!0,fullWidth:a?.fullWidth??!1,onClick:u,loading:i,disabled:o,type:"submit",outline:c,id:t,children:[(0,n.jsx)("div",{className:h("label","compact"),children:a.label}),(0,n.jsx)("div",{className:h("icon-container","compact"),children:(a.icon?.type||a.icon?.src)&&(0,n.jsx)(s.A,{...a.icon,className:h("icon")})})]}),m=({id:e,texts:t,disabled:a,loading:o,compactMode:r,prefix:s,onClick:l,outline:u,authType:c})=>r?(0,n.jsx)(p,{authType:c,id:e,prefix:s,texts:t,disabled:a,loading:o,onClick:l,outline:u}):(0,n.jsx)(i.A,{name:`${s}${c}`,"data-auth-type":t.authType,className:h("button",t.authType),accent:t?.accent??"red",noFocusIndicator:t?.noFocusIndicator??!1,fullWidth:t?.fullWidth??!0,onClick:l,loading:o,disabled:a,type:"submit",label:t.label,icon:t.icon,outline:u,id:e});function g({texts:e,disabled:t,loading:a,displayMode:o,prefix:r,onProviderSelected:s,...i}){let h=r?`${r}.${u.Lh.AuthType}`:u.Lh.AuthType,p=(0,l.fY)(h),y=(e.displayMode??o)!==u.q5.Navigation,{device:{isMobile:f}}=(0,c.Ye)();if(!e?.providers||0===e.providers.length)throw Error("At least one auth provider must be available");return(0,n.jsx)("div",{...i,className:d(i.className,y?"compact":"navigation"),children:e.providers.map(e=>f&&e.hideOnMobile||!f&&e.hideOnDesktop?null:(0,n.jsx)(m,{authType:e.authType,id:e.id,prefix:h,texts:e,loading:a,c
1ompactMode:y,disabled:t,outline:e.outline,onClick:()=>{p.setValue(e.authType),s?.(e.authType)}},e.authType))})}},64203:(e,t,a)=>{a.d(t,{i:()=>o});var n,o=((n={}).FirstApplicant="FirstApplicant",n.SecondApplicant="SecondApplicant",n.Applicant="Applicant",n.CoApplicant="CoApplicant",n)},72258:(e,t,a)=>{a.d(t,{O:()=>s});var n=a(54568),o=a(31645);function r({productType:e,iconMap:t,...a}){return e?(0,n.jsx)(o.A,{...a,type:t[e]}):(0,n.jsx)(o.A,{...a,type:"Financing"})}function s({productType:e,...t}){return(0,n.jsx)(r,{...t,productType:e,iconMap:{ConsumerLoan:"Financing",DebtConsolidation:"RescueInvestment",Car:"Car",BoatUnder7m:"Boat",BoatOver7m:"Boat",Jetski:"Jetski",SnowScooter:"SnowScooter",Atv:"Atv",Caravan:"Caravan",Motorcycle:"Motorcycle",OldCar:"Car",CarWithoutComprehensiveInsurance:"Car",SnowScooterWithoutComprehensiveInsurance:"SnowScooter",AtvWithoutComprehensiveInsurance:"Atv",CaravanWithoutComprehensiveInsurance:"Caravan",MotorcycleWithoutComprehensiveInsurance:"Motorcycle",OldCarWithoutComprehensiveInsurance:"Car"}})}},88918:(e,t,a)=>{a.d(t,{A:()=>A});var n=a(54568),o=a(7620),r=a(48442),s=a(53447),i=a(86353),l=a(48533),u=a(78587),c=a(92237),d=a(70568),h=a(48024),p=a(18932),m=a(53444),g=a(32528),y=a(69872),f=a(66343);let{component:b,element:v}=(0,r.T)("sn-auto-complete"),A=(0,o.forwardRef)(function({id:e,name:t,label:a,sublabel:r,help:A,message:w,selectedTitle:_,removeButtonAriaLabel:k,valid:x,value:P,className:C,onValueChange:j,children:I,options:S,minChars:N=1,searchDelay:T=200,disabled:R,locked:$,"data-name":D,onSelectable:E=()=>!0,onGetText:B,onGetSelectedTemplate:U,onBlur:M,onFocus:W,formatter:K,readOnly:O,readOnlyNoValueReplacement:F,allowedCharactersRegex:L,...z},H){let q=(0,o.useMemo)(()=>R||$,[R,$]),J=(0,o.useRef)(!0),Y=(0,o.useRef)(null),X=(0,o.useRef)(null),V=(0,o.useRef)(null),[G,Q]=(0,o.useState)(!1),[Z,ee]=(0,o.useState)(!1),[et,ea]=(0,o.useState)([]),[en,eo]=(0,o.useState)(),[er,es]=(0,o.useState)(P),[ei,el]=(0,o.useState)(),eu=()=>setTimeout(()=>{let e=V.current;e&&(e.setSelectionRange(e.value.length,e.value.length),e.focus())},10),ec=(0,o.useRef)(0),ed=e=>{if(B){let t=B(e);return void 0===t&&"string"==typeof e?e:t}if(void 0===e)return"";if("string"==typeof e)return e;throw Error('AutoComplete: "onGetText" parameter is required when options are an array of custom models. \nIt can be skipped only when options are string[]')},eh=e=>e.map(e=>({key:ed(e),text:ed(e),details:e})),ep=async e=>{if(!J.current||!e||e.length<=0||e.length<N)return;let t=[];if(Q(!0),Array.isArray(S))e=e?.toLowerCase()??"",t=eh(S).filter(t=>t.text.toLowerCase().startsWith(e));else{let a=++ec.current;try{ee(!0);let a=S(e),n=a instanceof Promise?await a:a;t=eh(n)}catch{return}finally{a===ec.current&&J.current&&ee(!1)}}let a=t.find(t=>t.details&&E(t.details)&&t.text.toLowerCase()===e?.trim().toLowerCase());a&&(es(a.details),eo(a.text),j?.(a.details,{validate:!0}),1===t.length)?ea([]):ea(t=t.filter(t=>t.text!==e))},em=(0,o.useRef)((0,s.s)(ep,T)).current,eg=async e=>{eo(e),ea([]),Array.isArray(S)||0===T?await ep(e):await em(e)},ey=()=>{Q(!1),ea([]),es(void 0),eo(void 0),j?.(void 0,{touched:!1})},ef=async e=>{let t=e??"";t||ey(),t!==en&&await eg(t)},eb=async e=>{if(!G)return;let t=e.key||e.type;t?.length===1&&new RegExp(/[a-zØ-öø-ÿ]$/g).test(t)&&(eu(),await eg(en+t),e.stopPropagation(),e.preventDefault())},ev=async e=>{if(e.details&&E(e.details)){ea([]),Q(!1),es(e.details),eo(e.text),j?.(e.details,{validate:!0,touched:!0}),eu();return}eu(),await eg(e.text)},[eA,ew]=(0,h.A)(Y,W,e=>{ea([]),Q(!1),eo(er?ed(er):""),M?.(e)});return((0,o.useEffect)(()=>{if(void 0===P){es(void 0),eo(""),void 0!==er&&j?.(void 0,{validate:!0});return}let e=ed(P);e!==en&&(es(P),eo(e),j?.(P,{validate:!0}))},[P]),(0,o.useEffect)(()=>{er&&el(er)},[er]),(0,o.useEffect)(()=>(J.current=!0,()=>{J.current=!1}),[]),O)?(0,n.jsx)(m.A,{id:e??t,value:en,label:a,help:A,noValueReplacement:F}):(0,n.jsxs)("div",{ref:Y,"data-component":"AutoComplete","data-id":t,"data-name":D,className:b(C,{disabled:q,locked:$,open:G,expanded:et.length>0,loading:Z}),onFocus:eA,onBlur:ew,...(0,i.r8)(z),children:[(0,n.jsx)(g.A,{label:a,sublabel:r,help:A,message:w,valid:x,disabled:q,locked:$,className:v("field",{loading:Z}),id:e,name:t,onKeyDown:e=>{switch(e.key||e.type){case"ArrowUp":case"ArrowDown":G&&et.length>0&&setTimeout(()=>X?.current?.focus(),10),e.preventDefault();break;case"Escape":Q(!1),ea([])}},children:(0,n.jsxs)("div",{children:[I,(0,n.jsxs)(y.A,{name:t,value:en,inputClassName:v("input"),ref:(0,l.P)(H,V),onValueChange:ef,onChange:z.onChange,autoComplete:"off",spellCheck:"false",placeholder:z.placeholder,disabled:q,noCheckmark:!0,formatter:K,allowedCharactersRegex:L,children:[G&&et.length>0&&(0,n.jsx)(p.A,{ref:X,className:v("options"),externalFilter:en,options:et,onSelect:ev,onKeyDown:eb}),(0,n.jsx)(c.A,{className:v("find")}),(0,n.jsx)(u.A,{className:v("spinner")})]})]})}),U&&(0,n.jsx)(f.A,{show:!!er&&!!ei,animation:"flip",children:(0,n.jsxs)("div",{className:v("selected"),children:[(0,n.jsxs)("div",{children:[_&&(0,n.jsx)("strong",{children:_}),ei&&U(ei)]}),(0,n.jsx)("button",{type:"button",className:v("cancel"),onClick:()=>{V.current?.focus(),ey()},"aria-label":`${k||"Remove"} ${en||"selected option"}`,children:(0,n.jsx)(d.A,{className:v("delete-icon")})})]})})]})});A.displayName="AutoComplete"}}]);

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.