1var M=Object.defineProperty,$=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var D=(n,o,i)=>o in n?M(n,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[o]=i,p=(n,o)=>{for(var i in o||(o={}))G.call(o,i)&&D(n,i,o[i]);if(E)for(var i of E(o))x.call(o,i)&&D(n,i,o[i]);return n},B=(n,o)=>$(n,q(o));var F=(n,o,i)=>new Promise((l,c)=>{var m=r=>{try{f(i.next(r))}catch(d){c(d)}},k=r=>{try{f(i.throw(r))}catch(d){c(d)}},f=r=>r.done?l(r.value):Promise.resolve(r.value).then(m,k);f((i=i.apply(n,o)).next())});import{j as s,a6 as L,a0 as Q,P as z,B as U}from"./npm.sellpy-design-system.DdsWMDHW.bundle.js";import{c as H,r as J,F as W}from"./npm.react-hook-form.HNw-giVQ.bundle.js";import{b as Y,a as K}from"./npm.react-router.BDfxye5A.bundle.js";import{u as Z,an as X,y as g,as as ee,aI as ne,z as ie,aJ as ae,ag as V,ah as T}from"./index.DWkcZ-_z.bundle.js";import{h as R,i as te}from"./npm.apollo-client.CXJpJPbe.bundle.js";import{B as oe}from"./BankPayoutInput.DE35_Y9Z.bundle.js";import"./npm.lodash.DxN61Y-S.bundle.js";import{h as re}from"./errors.dMazk1gb.bundle.js";import{G as de,B as ue,a as le,C as ce}from"./styles.C1YrSDWe.bundle.js";import{_ as se,a as me}from"./automaticPayout.vSbmlX3Z.bundle.js";import{u as ke}from"./npm.react-i18next.BwOa93YU.bundle.js";import{R as P,h as ve,J as fe}from"./npm.sellpy-commons.B413ARrd.bundle.js";import"./npm.react-dom.DlIYrMBD.bundle.js";import"./npm.styled-components.CzYR6Qdp.bundle.js";import"./npm.luxon.3NOFZn7k.bundle.js";import"./npm.zod.DEnjmUYT.bundle.js";import"./npm.parse.BcWrqAIh.bundle.js";import"./npm.sentry-react.Z7tY98T1.bundle.js";import"./npm.swr.CiJqMJM6.bundle.js";import"./npm.algolia.BDObKZ-5.bundle.js";import"./npm.i18next.B74d65Th.bundle.js";import"./translations.B5c9TvV-.bundle.js";import"./npm.graphql.ClDiDpi3.bundle.js";import"./npm.immutable.DTQZtUT4.bundle.js";import"./utils.DGZXBK23.bundle.js";try{let n=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},o=new n.Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="9a39e4c0-0abe-4178-9b63-1a2d2a875ea1",n._sentryDebugIdIdentifier="sentry-dbid-9a39e4c0-0abe-4178-9b63-1a2d2a875ea1")}catch(n){}{let n=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{};n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[new n.Error().stack]=Object.assign({},n._sentryModuleMetadata[new n.Error().stack],{"_sentryBundlerPluginAppKey:sellpy-market":!0})}const be={definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"bankAccountFragment"},variableDefinitions:[],typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"objectId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"BIC"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"skip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"SE_REGION"}}}]}]},{kind:"Field",name:{kind:"Name",value:"IBAN"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"skip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"SE_REGION"}}}]}]},{kind:"Field",name:{kind:"Name",value:"accountNumber"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"SE_REGION"}}}]}]},{kind:"Field",name:{kind:"Name",value:"clearingNumber"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"SE_REGION"}}}]}]}]}}]},ge=`#import "./bankAccount.fragment.gql" 2 3query automaticPayoutConfigForBankAccount($automaticPayoutId: ID!, $SE_REGION: Boolean!) { 4 automaticPayoutConfig(id: $automaticPayoutId) { 5 bankAccount { 6 ...bankAccountFragment 7 } 8 } 9} 10 11query getLatestBankAccountForAutomaticPayout($SE_REGION: Boolean!, $userId: ID!) { 12 bankAccounts(where: { user: { have: { objectId: { equalTo: $userId } } } }, order: createdAt_DESC, first: 1) { 13 edges { 14 node { 15 ...bankAccountFragment 16 } 17 } 18 } 19} 20`,N={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"automaticPayoutConfigForBankAccount"}
20,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"automaticPayoutId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"SE_REGION"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"automaticPayoutConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"automaticPayoutId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bankAccount"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"bankAccountFragment"},directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getLatestBankAccountForAutomaticPayout"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"SE_REGION"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bankAccounts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"where"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"user"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"have"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"objectId"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"equalTo"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}}]}}]}}]}}]}},{kind:"Argument",name:{kind:"Name",value:"order"},value:{kind:"EnumValue",value:"createdAt_DESC"}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"bankAccountFragment"},directives:[]}]}}]}}]}}]}}],loc:{start:0,end:549,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:ge}}},Ne=n=>{const o={};return n.filter(function(i){if(i.kind!=="FragmentDefinition")return!0;const l=i.name.value;return o[l]?!1:(o[l]=!0,!0)})};N.definitions=Ne(N.definitions.concat(be.definitions));const C=(n,o)=>{const i=(e,a)=>{if(e.kind==="FragmentSpread")a.add(e.name.value);else if(e.kind==="VariableDefinition"){const t=e.type;t.kind==="NamedType"&&a.add(t.name.value)}return e&&"selectionSet"in e&&e.selectionSet&&e.selectionSet.selections.forEach(t=>{i(t,a)}),e&&"variableDefinitions"in e&&e.variableDefinitions&&e.variableDefinitions.forEach(t=>{i(t,a)}),e&&"definitions"in e&&e.definitions&&e.definitions.forEach(t=>{i(t,a)}),a},l=e=>{const a={};return e.definitions.forEach(function(t){"name"in t&&t.name&&(a[t.name.value]=i(t,new Set))}),a},c=(e,a)=>{for(let t=0;t<e.definitions.length;t++){const u=e.definitions[t];if(u&&"name"in u&&u.name&&u.name.value==a)return u}},m=l(n),k=Object.assign({},n,{definitions:[c(n,o)]}),f=m[o]||new Set,r=new Set;let d=new Set;for(f.forEach(e=>{d.add(e)});d.size>0;){const e=d;d=new Set,e.forEach(a=>{r.has(a)||(r.add(a),(m[a]||new Set).forEach(u=>{d.add(u)}))})}return r.forEach(e=>{const a=c(n,e);a&&k.definitions.push(a)}),k},pe=C(N,"automaticPayoutConfigForBankAccount"),ye=C(N,"getLatestBankAccountForAutomaticPayout"),Se=`#import "./automaticPayout.fragment.gql" 21 22mutation setAutomaticPayoutMethodToBankAccountMutation( 23 $method: String 24 $accountNumber: String 25 $clearingNumber: String 26 $BIC: String 27 $IBAN: String 28 $region: String! 29 $origin: String! 30) { 31 setAutomaticPayoutMethod( 32 method: $method 33 accountNumber: $accountNumber 34 clearingNumber: $clearingNumber 35 BIC: $BIC 36 IBAN: $IBAN 37 region: $region 38 origin: $origin 39 ) { 40 ...automaticPayoutConfigFragment 41 } 42} 43`,y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"setAutomaticPayoutMethodToBankAccountMutation"}
43,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"method"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountNumber"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clearingNumber"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"BIC"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"IBAN"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"region"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"origin"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setAutomaticPayoutMethod"},arguments:[{kind:"Argument",name:{kind:"Name",value:"method"},value:{kind:"Variable",name:{kind:"Name",value:"method"}}},{kind:"Argument",name:{kind:"Name",value:"accountNumber"},value:{kind:"Variable",name:{kind:"Name",value:"accountNumber"}}},{kind:"Argument",name:{kind:"Name",value:"clearingNumber"},value:{kind:"Variable",name:{kind:"Name",value:"clearingNumber"}}},{kind:"Argument",name:{kind:"Name",value:"BIC"},value:{kind:"Variable",name:{kind:"Name",value:"BIC"}}},{kind:"Argument",name:{kind:"Name",value:"IBAN"},value:{kind:"Variable",name:{kind:"Name",value:"IBAN"}}},{kind:"Argument",name:{kind:"Name",value:"region"},value:{kind:"Variable",name:{kind:"Name",value:"region"}}},{kind:"Argument",name:{kind:"Name",value:"origin"},value:{kind:"Variable",name:{kind:"Name",value:"origin"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"automaticPayoutConfigFragment"},directives:[]}]}}]}}],loc:{start:0,end:515,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Se}}},he=n=>{const o={};return n.filter(function(i){if(i.kind!=="FragmentDefinition")return!0;const l=i.name.value;return o[l]?!1:(o[l]=!0,!0)})};y.definitions=he(y.definitions.concat(se.definitions));const Ae=(n,o)=>{const i=(e,a)=>{if(e.kind==="FragmentSpread")a.add(e.name.value);else if(e.kind==="VariableDefinition"){const t=e.type;t.kind==="NamedType"&&a.add(t.name.value)}return e&&"selectionSet"in e&&e.selectionSet&&e.selectionSet.selections.forEach(t=>{i(t,a)}),e&&"variableDefinitions"in e&&e.variableDefinitions&&e.variableDefinitions.forEach(t=>{i(t,a)}),e&&"definitions"in e&&e.definitions&&e.definitions.forEach(t=>{i(t,a)}),a},l=e=>{const a={};return e.definitions.forEach(function(t){"name"in t&&t.name&&(a[t.name.value]=i(t,new Set))}),a},c=(e,a)=>{for(let t=0;t<e.definitions.length;t++){const u=e.definitions[t];if(u&&"name"in u&&u.name&&u.name.value==a)return u}},m=l(n),k=Object.assign({},n,{definitions:[c(n,o)]}),f=m[o]||new Set,r=new Set;let d=new Set;for(f.forEach(e=>{d.add(e)});d.size>0;){const e=d;d=new Set,e.forEach(a=>{r.has(a)||(r.add(a),(m[a]||new Set).forEach(u=>{d.add(u)}))})}return r.forEach(e=>{const a=c(n,e);a&&k.definitions.push(a)}),k},Ie=Ae(y,"setAutomaticPayoutMethodToBankAccountMutation"),Ee=(n,o)=>[{link:"/sell",label:o?n("breadcrumbs.sell",{firstName:o}):n("breadcrumbs.bankAccountHome")},{link:"/my-share",label:n("breadcrumbs.bankAccountMyShare")},{link:"/my-share/automatic-payout",label:n("breadcrumbs.bankAccountAutomaticPayout")},{label:n("breadcrumbs.bankAccount")}],Ze=()=>{var h,A;const n=Y(),{automaticPayoutId:o}=K(),{t:i}=ke(["automaticPayout","balance","common"]),{isMobile:l}=Z(),c=X(),{data:m}=R(pe,{variables:{automaticPayoutId:o,SE_REGION:g()===P.SE}
43}),{data:k}=R(ye,{variables:{SE_REGION:g()===P.SE,userId:c.objectId}}),[f]=te(Ie,{refetchQueries:[{query:me,variables:{currency:fe[g()]}}],onError:v=>{V({header:i("common:errorToast.header"),body:re(v,"rejectedAccount")?i("balance:errorToast.body.rejectedAccount"):i("common:errorToast.body"),type:T.ERROR})},onCompleted:v=>{var I;const b=v==null?void 0:v.setAutomaticPayoutMethod;(I=b==null?void 0:b.bankAccount)!=null&&I.validTo?n("/my-share/automatic-payout/confirmation?method=bankAccount"):b&&!b.bankAccount.validTo&&(V({header:i("bankAccount.verification.toast.header"),body:i("bankAccount.verification.toast.body"),type:T.INFO}),n("/payoutVerificationInfo"))}}),{BIC:r,IBAN:d,accountNumber:e,clearingNumber:a}=((h=m==null?void 0:m.automaticPayoutConfig)==null?void 0:h.bankAccount)||ee(k==null?void 0:k.bankAccounts)||{},t=ve(g()),u=H({defaultValues:{BIC:r,IBAN:d,accountNumber:e,clearingNumber:a}}),{reset:_,handleSubmit:w,formState:{isValid:O,isSubmitting:S}}=u;J.useEffect(()=>{_({BIC:r,IBAN:d,accountNumber:e,clearingNumber:a})},[r,d,e,a]);const j=v=>F(null,null,function*(){const b=t?{BIC:v.BIC,IBAN:v.IBAN}:{accountNumber:v.accountNumber,clearingNumber:v.clearingNumber};yield f({variables:p({method:"bankAccount",region:g(),origin:window.location.origin},b)}),ae({payoutType:"bank",clickSource:"profile",settingAction:o?"change":"signup"})});return s.jsxs(de,{children:[s.jsx(ue,{children:s.jsx(L,{color:"black",variant:l?"collapsed":"full",options:Ee(i,(A=c==null?void 0:c.address)==null?void 0:A.firstName)})}),s.jsx(le,{children:s.jsxs(ce,{children:[s.jsxs("div",{children:[s.jsx(Q,{children:i("choice.bankAccount.header")}),s.jsx(z,{design:"body3",noMargin:!0,children:i("bankAccount.pageDescription.body")})]}),s.jsx(W,B(p({},u),{children:s.jsxs(ne,{style:{marginTop:"20px"},onSubmit:w(j),children:[s.jsx(oe,{}),s.jsx(U,{type:"submit",style:{marginTop:"20px"},variant:"filled",size:ie.SMALL,fullWidth:!0,label:i("completeButton.label"),disabled:!O||S,loading:S})]})}))]})})]})};export{Ze as default}; 44//# sourceMappingURL=BankAccount.CmRoW5qr.bundle.js.map
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.