1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9910],{9695:(t,e,r)=>{"use strict";r.d(e,{A:()=>f});var n=r(6029),s=r(97574),i=r(55729),a=r(1909),o=r(81807),c=r(52789);r(56474),r(31278),r(96502),r(46507);var l=r(16932),u=r(70796),p=r(30879);let d=t=>{switch(t){case 401:return"Incorrect password. Please try again.";case 429:return"Sorry, you have entered an incorrect document password too many times. Please get in touch with our Customer Support team for assistance.";default:return"Something went wrong. Try again later or get in touch with our Customer Support team."}},m=t=>{switch(t){case"incorrect_password":return"Incorrect password. Please try again.";case"expired_error":return"Sorry, your link has expired. Get in touch with our Customer Support team to request another.";case"attempts_error":return"Sorry, you have entered an incorrect document password too many times. Please get in touch with our Customer Support team for assistance.";default:return"Something went wrong. Try again later or get in touch with our Customer Support team."}},h=async(t,e)=>await u.A.put(null!=t?t:"",e,{headers:{Accept:"application/octet-stream","Content-Type":"application/json"}}),g=async(t,e)=>await u.A.post(null!=t?t:"",e,{headers:{Accept:"application/json","Content-Type":"application/json"}}),y=o.Ik({password:o.Yj().min(1,{message:"Please enter a password"})}).required(),w={password:""},f=()=>{let[t,e]=(0,i.useState)(),[r,o]=(0,i.useState)(),{data:u,error:f,mutate:b,isPending:x}=(()=>{let{getApiUrl:t}=(0,p.A)(),e=t("nonCustomerDocumentDownloadFormUrl"),r="";return(0,l.n)({mutationFn:t=>h(null!=e?e:"",t).then(async t=>{if(!t.ok)throw Error(d(t.status));let e=t.headers.get("Content-Disposition");if(e){let n=e.match(/filename="([^"]*)"/);return r=n?n[1]:"",t.blob()}}).then(t=>{if(t)return{url:window.URL.createObjectURL(t),filename:r}}).catch(()=>{throw Error(d(500))})})})(),{data:j,error:v,mutate:S,isPending:k}=(()=>{let{getApiUrl:t}=(0,p.A)(),e=t("documentDownloadFormUrl");return(0,l.n)({mutationFn:t=>g(null!=e?e:"",t).then(async t=>{if(!t.ok)throw Error(m((await t.json()).message));let e=JSON.parse(await (null==t?void 0:t.text())).preSignedUrl;if(e)return{url:e,filename:""}}).catch(t=>{throw Error(m(t.message))})})})();(0,i.useEffect)(()=>{var t;let r=null!=(t=null==f?void 0:f.message)?t:null==v?void 0:v.message;r&&e(r)},[f,v]),(0,i.useEffect)(()=>{let t="",e="";if(u&&(t=u.filename,e=u.url),j&&(t=j.filename,e=j.url),!e)return;let r=document.createElement("a");e&&(r.download=t,r.href=e,r.click())},[u,j]),(0,i.useEffect)(()=>{let t=new URLSearchParams(window.location.search).get("documentHash");t&&o(decodeURIComponent(t))},[]);let _=(0,a.mN)({mode:"onChange",defaultValues:w}),{register:E,formState:{errors:O},handleSubmit:C}=(0,a.mN)({resolver:(0,c.u)(y)});return(0,n.jsx)(a.Op,{..._,children:(0,n.jsxs)(s.az,{as:"form",onSubmit:C(t=>{if(e(void 0),!r)return void e("Have you used the correct link? Please check the link and try again.");r.startsWith("$argon2d$")?b({password:t.password,documentHash:r}):S({password:t.password,hash:r})}),children:[(0,n.jsxs)(s.az,{marginY:24,children:[(0,n.jsx)("label",{htmlFor:"password",children:"Password"}),(0,n.jsx)(s.pd,{...E("password"),type:"password",id:"password"}),O.password&&(0,n.jsx)(s.EY,{as:"p",className:"_1bowg0s1",children:O.password.message})]}),(0,n.jsx)(s.$n,{type:"submit",className:"_1bowg0s0",children:x||k?(0,n.jsx)(s.Rh,{size:"x-small",colour:"light"}):(0,n.jsx)(n.Fragment,{children:"Submit"})}),(0,n.jsx)(s.az,{marginTop:24,children:t&&(0,n.jsx)(s.EY,{as:"p",children:t})})]})})}},14130:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>l});var n=r(6029),s=r(97574),i=r(60711),a=r(24143),o=r(74640),c=r(9695);let l=()=>(0,n.jsx)(i.K,{children:(0,n.jsxs)(a.A,{children:[(0,n.jsx)(o.G,{noIndex:!0,title:"Document download - Starling Bank",description:"Customer download of documents"}),(0,n.jsx)(s.uV,{bgColour:"purple",children:(0,n.jsxs)(s.mc,{children:[(0,n.jsx)(s.FO,{title:"Document download",titleStyle:"title2",children:"\xa0"}),(0,n.jsx)(s.ss,{layout:"centred",textAlign:"left",children:(0,n.jsxs)(s.K8,{children:[(0,n.jsx)(s.EY,{as:"h3",textStyle:"title4",children:"Please enter the password we sent by SMS (it's case sensitive)"}),(0,n.jsx)(c.A,{})]})})]})})]})})},16932:(t,e,r)=>{"use strict";r.d(e,{n:()=>u});var n=r(55729),s=r(13448),i=r(95913),a=r(24090),o=r(4308),c=class extends a.Q{#t;#e=void 0;#r;#n;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.f8)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.EN)(e.mutationKey)!==(0,o.EN)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#s(),this.#i(t)}getCurrentResult(){return this.#e}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#s(),this.#i()}mutate(t,e){return this.#n=e,this.#r?.removeObserver(this),this.#r=this.#t.getMutationCache().build(this.#t,this.options),this.#r.addObserver(this),this.#r.execute(t)}#s(){let t=this.#r?.state??(0,s.$)();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#i(t){i.jG.batch(()=>
1{if(this.#n&&this.hasListeners()){let e=this.#e.variables,r=this.#e.context,n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#n.onSuccess?.(t.data,e,r,n)}catch(t){Promise.reject(t)}try{this.#n.onSettled?.(t.data,null,e,r,n)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#n.onError?.(t.error,e,r,n)}catch(t){Promise.reject(t)}try{this.#n.onSettled?.(void 0,t.error,e,r,n)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#e)})})}},l=r(93251);function u(t,e){let r=(0,l.jE)(e),[s]=n.useState(()=>new c(r,t));n.useEffect(()=>{s.setOptions(t)},[s,t]);let a=n.useSyncExternalStore(n.useCallback(t=>s.subscribe(i.jG.batchCalls(t)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),u=n.useCallback((t,e)=>{s.mutate(t,e).catch(o.lQ)},[s]);if(a.error&&(0,o.GU)(s.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:u,mutateAsync:a.mutate}}},30879:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var n=r(55729),s=r(76967);let i=function(){let t=(0,n.useContext)(s.L);if(!t)throw Error("useEnvConfig must be used within a EnvConfigContextProvider");let{config:e}=t,r=(0,n.useCallback)(t=>{if(e)return e[t]},[e]);return{getApiUrl:(0,n.useCallback)(t=>{if(e){let{apiUrls:r}=e;return r[t]}},[e]),getConfigSetting:r}}},44424:(t,e,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/download-document",function(){return r(14130)}])},46507:()=>{},52789:(t,e,r)=>{"use strict";r.d(e,{u:()=>c});var n=r(1909);let s=(t,e,r)=>{if(t&&"reportValidity"in t){let s=(0,n.Jt)(r,e);t.setCustomValidity(s&&s.message||""),t.reportValidity()}},i=(t,e)=>{for(let r in e.fields){let n=e.fields[r];n&&n.ref&&"reportValidity"in n.ref?s(n.ref,r,t):n.refs&&n.refs.forEach(e=>s(e,r,t))}},a=(t,e)=>t.some(t=>t.startsWith(e+"."));var o=function(t,e){for(var r={};t.length;){var s=t[0],i=s.code,a=s.message,o=s.path.join(".");if(!r[o])if("unionErrors"in s){var c=s.unionErrors[0].errors[0];r[o]={message:c.message,type:c.code}}else r[o]={message:a,type:i};if("unionErrors"in s&&s.unionErrors.forEach(function(e){return e.errors.forEach(function(e){return t.push(e)})}),e){var l=r[o].types,u=l&&l[s.code];r[o]=(0,n.Gb)(o,e,r,i,u?[].concat(u,s.message):s.message)}t.shift()}return r},c=function(t,e,r){return void 0===r&&(r={}),function(s,c,l){try{return Promise.resolve(function(n,a){try{var o=Promise.resolve(t["sync"===r.mode?"parse":"parseAsync"](s,e)).then(function(t){return l.shouldUseNativeValidation&&i({},l),{errors:{},values:r.raw?s:t}})}catch(t){return a(t)}return o&&o.then?o.then(void 0,a):o}(0,function(t){if(Array.isArray(null==t?void 0:t.errors))return{values:{},errors:((t,e)=>{e.shouldUseNativeValidation&&i(t,e);let r={};for(let s in t){let i=(0,n.Jt)(e.fields,s),o=Object.assign(t[s]||{},{ref:i&&i.ref});if(a(e.names||Object.keys(t),s)){let t=Object.assign({},(0,n.Jt)(r,s));(0,n.hZ)(t,"root",o),(0,n.hZ)(r,s,t)}else(0,n.hZ)(r,s,o)}return r})(o(t.errors,!l.shouldUseNativeValidation&&"all"===l.criteriaMode),l)};throw t}))}catch(t){return Promise.reject(t)}}}},60711:(t,e,r)=>{"use strict";r.d(e,{K:()=>a});var n=r(55729),s=("undefined"==typeof window?n.useEffect:n.useLayoutEffect,((t,e,r)=>{let n=(r=r||document.querySelector(`[data-br="${t}"]`)).parentElement,s=t=>r.style.maxWidth=t+"px";r.style.maxWidth="";let i=n.clientWidth,a=n.clientHeight,o=i/2-.25,c=i+.5,l;if(i){for(;o+1<c;)s(l=Math.round((o+c)/2)),n.clientHeight===a?c=l:o=l;s(c*e+i*(1-e))}r.__wrap_o||"undefined"!=typeof ResizeObserver&&(r.__wrap_o=new ResizeObserver(()=>{self.__wrap_b(0,+r.dataset.brr,r)})).observe(n)}).toString()),i=n.createContext(!1),a=({children:t})=>n.createElement(i.Provider,{value:!0},((t,e="")=>n.createElement("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:(t?"":`self.__wrap_b=${s};`)+e}}))(!1),t)},70796:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});let n={get:async(t,e)=>await fetch(t,{...e}).then(async t=>{if(t.ok)return await t.json()}),post:async(t,e,r)=>await fetch(t,{method:"POST",body:JSON.stringify(e),...r}),put:async(t,e,r)=>await fetch(t,{method:"PUT",body:JSON.stringify(e),...r})}},74640:(t,e,r)=>{"use strict";r.d(e,{G:()=>o});var n=r(6029),s=r(95669),i=r.n(s),a=r(81278);let o=t=>
1{let{title:e,keywords:r,canonical:s,slug:o,schemaEntities:c,type:l="website",description:u="Personal, joint, euro & business banking. Instant alerts when you spend & get paid, spending habit insights + no fees overseas. Apply in minutes.",socialImage:p="https://www.starlingbank.com/media-library/default-share-img.jpg",noIndex:d=!1}=t,m=(0,a.useRouter)(),h="/".concat(o||m.pathname,"/").replaceAll(/\/+/g,"/"),g="https://www.starlingbank.com".concat(h),y=p.startsWith("https://")?p:"https://www.starlingbank.com".concat(p),w=(null==e?void 0:e.startsWith("Starling |"))||(null==e?void 0:e.endsWith("| Starling"))?e:"".concat(e," | Starling"),f=null==c?void 0:c.bankAccount,b=null==c?void 0:c.breadcrumbList,x=null==c?void 0:c.faqs;return(0,n.jsxs)(i(),{children:[(0,n.jsx)("title",{children:w}),(0,n.jsx)("meta",{name:"title",content:w},"title"),(0,n.jsx)("meta",{name:"description",content:u},"description"),(0,n.jsx)("meta",{property:"og:title",content:w},"og:title"),(0,n.jsx)("meta",{property:"og:description",content:u},"og:description"),(0,n.jsx)("meta",{property:"og:type",content:l},"og:type"),(0,n.jsx)("meta",{property:"og:locale",content:"en_GB"},"og:locale"),(0,n.jsx)("meta",{property:"og:url",content:g},"og:url"),(0,n.jsx)("meta",{property:"og:site_name",content:"Starling Bank"},"og:site_name"),(0,n.jsx)("meta",{property:"og:image",content:y},"og:image"),(0,n.jsx)("meta",{property:"og:image:secure_url",content:y},"og:image:secure_url"),(0,n.jsx)("meta",{name:"twitter:card",content:"summary_large_image"},"twitter:card"),(0,n.jsx)("meta",{name:"twitter:site",content:"@starlingbank"},"twitter:site"),(0,n.jsx)("meta",{name:"twitter:title",content:w},"twitter:title"),(0,n.jsx)("meta",{name:"twitter:image",content:y},"twitter:image"),(0,n.jsx)("meta",{name:"twitter:description",content:u},"twitter:description"),(0,n.jsx)("meta",{property:"fb:app_id",content:"376576989343149"},"fb:app_id"),(0,n.jsx)("meta",{name:"copyright",content:"Starling Bank Limited"},"copyright"),(0,n.jsx)("meta",{name:"HandheldFriendly",content:"true"},"HandheldFriendly"),(0,n.jsx)("meta",{name:"apple-mobile-web-app-capable",content:"yes"},"apple"),(0,n.jsx)("meta",{name:"mobile-web-app-capable",content:"yes"},"mobile"),(0,n.jsx)("link",{rel:"canonical",href:s||g}),(0,n.jsx)("link",{rel:"alternate",type:"application/rss+xml",title:"Starling Bank - Blog",href:"/rss.xml"}),(0,n.jsx)("link",{rel:"alternate",type:"application/rss+xml",title:"Starling Bank - News",href:"/rss-news.xml"}),(0,n.jsx)("link",{rel:"alternate",type:"application/rss+xml",title:"Starling Bank - Business Guides",href:"/rss-business-guides.xml"}),r&&(0,n.jsx)("meta",{name:"keywords",content:r.join(", ")},"keywords"),d&&(0,n.jsx)("meta",{name:"robots",content:"noindex,nofollow"},"robots"),(0,n.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"http://schema.org","@type":"Organization","@id":"#organization",name:"Starling Bank",url:"https://www.starlingbank.com/",logo:"https://www.starlingbank.com/media-library/sb-logo.png",sameAs:["https://www.facebook.com/StarlingBankUK","https://twitter.com/starlingbank","https://www.instagram.com/starlingbank","https://www.youtube.com/c/StarlingBankApp","https://www.linkedin.com/company/starling-bank"]})}}),f&&(0,n.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@graph":[{"@type":"BankAccount",name:"".concat(f.name),brand:"Starling Bank",bankAccountType:"".concat(f.bankAccountType),offers:{"@type":"Offer",url:"".concat(f.url),price:"".concat(f.price),priceCurrency:"".concat(f.priceCurrency),priceSpecification:{"@type":"UnitPriceSpecification",price:"".concat(f.price),priceCurrency:"".concat(f.priceCurrency),unitText:"".concat(f.unitText)}},description:"".concat(f.description),provider:"Starling Bank",feesAndCommissionsSpecification:"".concat(f.feesAndCommissionsSpecification),mainEntityOfPage:"".concat(f.mainEntityOfPage),url:"".concat(f.url),areaServed:"".concat(f.areaServed),accountMinimumInflow:"".concat(f.accountMinimumInflow)}]})}}),b&&(0,n.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:b&&b.map((t,e)=>{let{name:r,url:n}=t;return{"@type":"ListItem",position:"".concat(e+1),item:{"@id":"".concat(n),name:"".concat(r)}}})})}}),x&&(0,n.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:x&&x.map((t,e)=>{let{name:r,url:n,answer:s}=t;return{"@type":"Question",url:"".concat(n),name:"".concat(r),acceptedA
1nswer:{"@type":"Answer",text:s}}})})}})]})}},95669:(t,e,r)=>{t.exports=r(8981)}},t=>{t.O(0,[5287,9156,1909,7574,4981,636,6593,8792],()=>t(t.s=44424)),_N_E=t.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.