PageSourceSearch

https://vb24.md/web/_next/static/chunks/6771-0bd030db95726f86.js

js vb24.md collected 2026-10-07 23:16:59 UTC 25,145 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6771],{98025:function(n,e,t){t.d(e,{x:function(){return d}});var a=t(73235),u=t(89130),i=t(33379);function l(){let n=(0,a._)(["\n  mutation TopUpDepositPayment($accountId: ID!, $input: TopUpDepositPaymentInput!) {\n    topUpDepositPayment(accountId: $accountId, input: $input) {\n      id\n      entityTimestamp\n      status {\n        code\n      }\n    }\n  }\n"]);return l=function(){return n},n}let o={},r=(0,u.Ps)(l());function d(n){let e={...o,...n};return i.D(r,e)}},55278:function(n,e,t){t.d(e,{n:function(){return d}});var a=t(73235),u=t(89130),i=t(33379);function l(){let n=(0,a._)(["\n  mutation WithdrawalDepositPayment($accountId: ID!, $input: WithdrawalDepositPaymentInput!) {\n    withdrawalDepositPayment(accountId: $accountId, input: $input) {\n      id\n      entityTimestamp\n      status {\n        code\n      }\n    }\n  }\n"]);return l=function(){return n},n}let o={},r=(0,u.Ps)(l());function d(n){let e={...o,...n};return i.D(r,e)}},89913:function(n,e,t){t.d(e,{d5:function(){return c},kq:function(){return m}});var a=t(73235),u=t(89130),i=t(40794);function l(){let n=(0,a._)(["\n  query Deposit($id: ID!) {\n    deposit(id: $id) {\n      id\n      arrangementId\n      iban\n      bisAccountId\n      balanceAccount\n      currency {\n        id\n      }\n      topUpPolicy {\n        id\n      }\n      withdrawalPolicy {\n        id\n      }\n      outstandingAmount\n      topUpMinValue\n      withdrawalMinValue\n      withdrawalMaxValue\n      withdrawalMinimumOutstanding\n    }\n  }\n"]);return l=function(){return n},n}function o(){let n=(0,a._)(["\n  query DepositAccounts {\n    neo_deposits {\n      id\n      bisAccountId\n      iban\n      name\n      friendlyName\n      outstandingAmount\n      topUpPolicy {\n        id\n      }\n      topUpAllowed\n      topUpMinValue\n      withdrawalPolicy {\n        id\n      }\n      withdrawalAllowed\n      withdrawalMinValue\n      withdrawalMaxValue\n      withdrawalMinimumOutstanding\n      currency {\n        id\n        text\n      }\n      status {\n        id\n      }\n    }\n  }\n"]);return o=function(){return n},n}let r={},d=(0,u.Ps)(l());function c(n){let e={...r,...n};return i.aM(d,e)}let s=(0,u.Ps)(o());function m(n){let e={...r,...n};return i.aM(s,e)}},61126:function(n,e,t){t.d(e,{h:function(){return z}});var a=t(52322),u=t(9099),i=t(45277),l=t(59052),o=t(17582),r=t(13847),d=t(15103),c=t(25358),s=t(78805),m=t(12678),p=t(5632),v=t(2784),y=t(98614),f=t(56559),h=t(99086),b=t(99963),w=t(52142),A=t(34565),g=t(62009),x=t(84507),C=t(91542),I=t(69088),D=t(36383),N=t(32112);let O=n=>{let{happyHourFlag:e}=n,{clientLegalCategory:t}=(0,A.s)();return e?f.Tb.happyhour:"C"===t?f.Tb.corporate:f.Tb.standard};var P=t(53150);let _=n=>{var e,t,i,l,o,r,d,c,s,m,p,y,h;let{form:g,creditCurrency:x,debitCurrency:_,required:V,accountId:j,onExchangeRateError:F}=n,{t:R}=(0,w.q)(),{formatMoney:M}=(0,b.z)(),{clientLegalCategory:S}=(0,A.s)(),T=g.watch("amount"),E=g.watch("currency"),U=g.watch("exchangeRate"),$=!!g.watch("happyHourFlag"),[H,Z]=(0,D.nj)(T,500);(0,v.useEffect)(()=>{Z(T)},[T,Z]),(0,v.useEffect)(()=>{g.setValue("disableSign",T!==H)},[T,H,g]);let k=(0,N.PS)({variables:{id:j},skip:!j}),q=E===x,z=O({happyHourFlag:$}),W=(0,N.aF)({variables:{creditCurrency:x,debitCurrency:_,amount:H,amountSource:q?f.$7.credit:f.$7.debit,customExchangeRate:U,conversionExchangeRateSetId:z},skip:!x||!_||null===H||x===_||null===U,onError:n=>{var e,t,a;let u=null===(a=n.graphQLErrors)||void 0===a?void 0:null===(t=a[0])||void 0===t?void 0:null===(e=t.extensions)||void 0===e?void 0:e.message;u?(g.setError("exchangeRate",{message:u}),F(u)):(g.clearErrors("exchangeRate"),F(null))},onCompleted:()=>{g.clearErrors("exchangeRate"),F(null)}}),[B]=(0,N.LS)({fetchPolicy:"network-only"});(0,v.useEffect)(()=>{null!==g.getValues("amount")&&g.trigger("amount")},[g,$]);let L=(0,v.useMemo)(()=>{let n=[];return x&&n.push(x),_&&_!==x&&n.push(_),n.sort((n,e)=>"MDL"===n?-1:"MDL"===e?1:n.localeCompare(e))},[x,_]);(0,v.useEffect)(()=>{var n,e;let t=null,a=null!==(n=g.getValues("currency"))&&void 0!==n?n:null;0===L.length&&(t=null),1===L.length&&(t=L[0]),2===L.length&&(t=L.includes(null!=a?a:"")?a:null!==(e=L[0])&&void 0!==e?e:null),t!==a&&null!==t&&g.setValue("currency",t)},[g,L]);let G=q?null!==(s=null===(e=W.data)||void 0===e?void 0:e.currencyConversion.debitAmount)&&void 0!==s?s:null:null!==(m=null===(t=W.data)||void 0===t?void 0:t.currencyConversion.creditAmount)&&void 0!==m?m:null,K=null!==(p=null===(l=k.data)||void 0===l?void 0:null===(i=l.account)||void 0===i?void 0:i.availableBalance)&&void 0!==p?p:NaN,
1X=K-(x===_?null!=H?H:NaN:null!==(h=null!==(y=null===(o=W.data)||void 0===o?void 0:o.currencyConversion.debitAmount)&&void 0!==y?y:null===(r=W.previousData)||void 0===r?void 0:r.currencyConversion.debitAmount)&&void 0!==h?h:NaN),Q=(0,v.useCallback)(()=>{var n,e,t,a;let u=x===_?H:null;return{creditedAmount:null!==(t=null===(n=W.data)||void 0===n?void 0:n.currencyConversion.creditAmount)&&void 0!==t?t:u,debitedAmount:null!==(a=null===(e=W.data)||void 0===e?void 0:e.currencyConversion.debitAmount)&&void 0!==a?a:u}},[H,x,null===(d=W.data)||void 0===d?void 0:d.currencyConversion.creditAmount,null===(c=W.data)||void 0===c?void 0:c.currencyConversion.debitAmount,_]);(0,v.useEffect)(()=>{let{creditedAmount:n,debitedAmount:e}=Q();null!==n&&g.setValue("creditedAmount",n),null!==e&&g.setValue("debitedAmount",e)},[g,Q]);let J=(0,P.X)({clientLegalCategory:S,finalBalance:X}),Y=(0,v.useRef)(!1);return(0,v.useEffect)(()=>{J?(g.trigger("amount"),Y.current=!0):!0!==Y.current||J?Y.current=!1:g.trigger("amount")},[g,J]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C.ut,{form:g,name:"amount",label:R("payment:payment.form.label.amount"),endAdornment:2===L.length?(0,a.jsx)(C.ut.Select,{onChange:async()=>{if(null!==g.getValues("amount")){try{await W.refetch()}catch(n){}g.trigger("amount")}},form:g,name:"currency",items:L}):(0,a.jsx)(C.ut.Text,{"data-testid":"amount-currency",children:E}),showAsterisk:V,hint:x&&_&&x!==_?W.loading?"...":(0,I.Rw)(G)?"-":M(G,{currency:q?_:x}):void 0,validate:[async n=>{if(!0!==g.getValues("happyHourFlag")||!n||!_)return!0;try{var e,t,a,u;let i=await W.refetch({amount:n}),l=null===(e=i.data)||void 0===e?void 0:e.currencyConversion.debitAmount;if((0,I.Rw)(l))return!0;let o=await B({variables:{amount:l,currencyId:_}}),r=null===(t=o.data)||void 0===t?void 0:t.tpmHappyHourLimit;if(null==r?void 0:r.errorCode)return R("payment:payment.form.label.amount.happyHourLimit",{amount:M(null!==(a=r.limitAmount)&&void 0!==a?a:0,{currency:null!==(u=r.limitCurrency)&&void 0!==u?u:"EUR"})})}catch(n){return console.error(n),!0}},n=>!V||null!==n||R("payment:payment.form.label.amount.required"),()=>{var n;return!(V&&(0,P.X)({clientLegalCategory:S,finalBalance:K-(null!==(n=g.getValues("debitedAmount"))&&void 0!==n?n:NaN)}))||""},n=>{let e=g.getValues("creditedAmount"),t=g.getValues("debitedAmount");return(null===e||!(e<.01))&&(null===t||!(t<.01))||null===n||R("payment:payment.form.label.amount.tooLow")}],min:0,padFractionalZeros:!0,preventPastingInvalidValues:!0,"data-testid":"amount"}),V&&J&&(0,a.jsx)(u.Z,{severity:"error",sx:{mt:1},children:R("payment:payment.create.validation.amountExceedBalance")})]})};var V=t(25892);let j=n=>{var e,t;let{form:u,happyHourFlag:i,creditedAmount:l,creditCurrency:o,debitCurrency:r,exchangeRateError:d}=n;(0,V.I)(u,"exchangeRate");let{t:c}=(0,w.q)(),{clientLegalCategory:s}=(0,A.s)(),m=O({happyHourFlag:!!i});(0,v.useEffect)(()=>()=>{u.resetField("exchangeRate",{defaultValue:null})},[]);let p=(0,v.useMemo)(()=>u.getValues("exchangeRate"),[]),y=(0,N.aF)({variables:{creditCurrency:o,debitCurrency:"EUR",amount:l,amountSource:f.$7.credit,customExchangeRate:null,conversionExchangeRateSetId:m},skip:!o||!l}),h=(0,N.aF)({variables:{creditCurrency:o,debitCurrency:r,amount:1,amountSource:f.$7.credit,customExchangeRate:null,conversionExchangeRateSetId:m},skip:!o||!r,onCompleted:n=>
1{(Object.keys(u.formState.dirtyFields).length>0||null===p||null===u.getValues("exchangeRate"))&&u.resetField("exchangeRate",{defaultValue:n.currencyConversion.rate})}}),b=(0,v.useMemo)(()=>{var n,e;return void 0===(null===(n=y.data)||void 0===n?void 0:n.currencyConversion.debitAmount)?null!==(e=y.previousData)&&void 0!==e&&!!e.currencyConversion.debitAmount&&y.previousData.currencyConversion.debitAmount>=2e4:y.data.currencyConversion.debitAmount>=2e4},[null===(e=y.data)||void 0===e?void 0:e.currencyConversion.debitAmount,null===(t=y.previousData)||void 0===t?void 0:t.currencyConversion.debitAmount]),g="C"===s?!!i:"P"!==s||!b;return(0,v.useEffect)(()=>{g&&(u.resetField("exchangeRate",{defaultValue:null}),h.refetch())},[g]),(0,v.useEffect)(()=>{u.resetField("exchangeRate",{defaultValue:null}),h.refetch()},[i]),(0,a.jsx)(C.ut,{form:u,name:"exchangeRate",max:9999.9999,numberOfFractionalDigits:4,label:c(i?"payment:payment.form.label.officialExchangeRate":"payment:payment.form.label.exchangeRate"),validate:[()=>d||!0],disabled:g,"data-testid":"exchangeRate"})},F=n=>{var e;let{form:t}=n,{t:u}=(0,w.q)(),{data:i,loading:l}=(0,N.cH)({pollInterval:6e4}),o=!!(null==i?void 0:null===(e=i.tpmVbHappyHourConfiguration)||void 0===e?void 0:e.id);return(0,v.useEffect)(()=>{o||l||t.resetField("happyHourFlag",{defaultValue:!1})},[t,o,l]),(0,a.jsx)(C.mE,{hidden:!o,form:t,name:"happyHourFlag",label:u("payment:payment.form.label.happyHour"),"data-testid":"happyHourFlag"})};var R=t(89913);let M=n=>{var e,t,u,i,l;let{form:o,name:r,filterResults:d=()=>!0,required:c,showHint:s,onAccountSelected:m,onNoAccountAvailable:p,autofillFirstAccountNumber:y=!0,label:f,placeholder:h,makeEmptySpaceForHint:A,validateAvailableBalance:g=!0,validate:x=[],renderNullItem:D=!0,disabled:O=!1,includeDepositAccounts:P=!1}=n,{t:_}=(0,w.q)(),V=null!=f?f:_("payment:payment.form.label.".concat(r)),j=!1===h?void 0:null!=h?h:_("payment:payment.form.label.".concat(r,".placeholder")),{formatMoney:F}=(0,b.z)(),M=(0,N.qb)(),T=(0,R.kq)({skip:!P}),E=M.loading||T.loading,U=(0,v.useMemo)(()=>{var n,e,t,a;return[...null!==(t=null===(n=M.data)||void 0===n?void 0:n.neo_accounts)&&void 0!==t?t:[],...null!==(a=null===(e=T.data)||void 0===e?void 0:e.neo_deposits)&&void 0!==a?a:[]]},[null===(e=M.data)||void 0===e?void 0:e.neo_accounts,null===(t=T.data)||void 0===t?void 0:t.neo_deposits]),$=o.watch(r),H=(0,v.useMemo)(()=>U.find(n=>n.iban===$),[$,U]),Z=null!==(i=S(H))&&void 0!==i?i:0,k=null==H?void 0:null===(u=H.currency)||void 0===u?void 0:u.id,[q,z]=(0,v.useState)(!1);(0,v.useEffect)(()=>{null==m||m(H,$||null),g&&(null===S(H)?(z(!0),o.trigger(r)):z(!1))},[H]);let W=null!==(l=U.filter(d).map(n=>n.iban))&&void 0!==l?l:[];return(0,v.useEffect)(()=>{if(!E){if($&&!U.find(n=>n.iban===$)){o.setValue(r,null);return}if(0===W.length)null==p||p();else if(W.length>0){var n,e;if((null!==(e=null===(n=o.getValues())||void 0===n?void 0:n[r])&&void 0!==e?e:{})||!y)return;o.resetField(r,{defaultValue:W[0]})}}},[E,W.length]),(0,a.jsx)(C.iZ,{form:o,name:r,label:V,placeholder:j,hint:s&&!(0,I.Rw)(Z)?_("payment:payment.form.label.".concat(r,".hint"),{balance:F(Z,{currency:k})}):void 0,loading:E,items:W,renderItem:n=>{var e,t;let a=U.find(e=>e.iban===n);return"".concat(null!==(t=null==a?void 0:a.friendlyName)&&void 0!==t?t:null==a?void 0:a.name," | ").concat(null==a?void 0:a.iban," | ").concat(null==a?void 0:null===(e=a.currency)||void 0===e?void 0:e.id)},validate:[n=>!c||!!n||_("payment:payment.form.label.".concat(r,".required")),()=>!q||!g||_("account:account.error.failedToLoadAvailableBalance"),...x],renderNullItem:D,showAsterisk:c,"data-testid":r,makeEmptySpaceForHint:A,disabled:O})},S=n=>{var e,t;return n?"availableBalance"in n?null!==(e=n.availableBalance)&&void 0!==e?e:null:"outstandingAmount"in n&&null!==(t=n.outstandingAmount)&&void 0!==t?t:null:null};var T=t(82550),E=t(69338),U=t(34686),$=t(96413),H=t(56099);
1let Z=["bonusStarCard","bonusOrange","ticheteVbLunch"],k=["active","blocked"],q=n=>{let{accountStatusId:e,accountGroupId:t,accountTypeId:a}=n;return!!e&&!!t&&!!a&&!("account"!==t&&"deposits"!==t&&("cards"!==t||Z.includes(a)))&&k.includes(e)},z=n=>{var e,t,C,I,D;let{form:N,isDraft:O,isTemplate:P,isBulk:V,fromScratch:R}=n,{clientLegalCategory:S}=(0,A.s)(),[Z,k]=(0,v.useState)(!1),[z,W]=(0,v.useState)(null),{t:B}=(0,w.q)(),{formatMoney:L}=(0,b.z)(),{hasPermissions:G}=(0,g.TE)(),K=(0,p.useRouter)(),X=N.watch("account"),Q=N.watch("partnerAccount"),J=N.watch("type"),Y="topUp"===J,nn="withdrawal"===J,ne=N.watch("happyHourFlag"),nt=N.watch("creditedAmount"),na=N.watch("currency"),nu=null===(e=N.watch("account"))||void 0===e?void 0:e.id,ni=null===(C=N.watch("account"))||void 0===C?void 0:null===(t=C.currency)||void 0===t?void 0:t.id,nl=null===(D=N.watch("partnerAccount"))||void 0===D?void 0:null===(I=D.currency)||void 0===I?void 0:I.id,no=N.watch("remittanceInformation"),nr="P"===S,nd=Y||nn,nc=!V&&R,ns=(n,e)=>{N.setValue("type",n),no||N.setValue("remittanceInformation",e)};(0,v.useEffect)(()=>{(null==X?void 0:X.__typename)==="Deposit"?ns("withdrawal",B("deposit:deposit.form.defaultValue.details.depositWithdrawal")):(null==Q?void 0:Q.__typename)==="Deposit"?ns("topUp",B("deposit:deposit.form.defaultValue.details.depositTopUp")):ns(null,B("payment:payment.own-accounts.defaultRemittanceInformation"))},[X,Q]),(0,v.useEffect)(()=>{nd&&N.setValue("valueDate",new Date)},[nd]);let nm=(0,v.useMemo)(()=>nd?Y?f.dN.TopUpDepositPaymentOrder:f.dN.WithdrawalDepositPaymentOrder:"P"===S?f.dN.OwnAccountPaymentOrder:f.dN.CorpOwnAccountPaymentOrder,[Y,nd,S]);return(0,a.jsxs)(a.Fragment,{children:[Z&&(0,a.jsx)(s.Z,{size:{xs:12},children:(0,a.jsx)(u.Z,{severity:"error",children:B("payment:payment.own-accounts.noOptionAvailable")})}),(0,a.jsx)(s.Z,{size:{xs:6},children:(0,a.jsx)(M,{form:N,name:"accountNumber",autofillFirstAccountNumber:R,onNoAccountAvailable:()=>k(!0),required:!P,showHint:!0,filterResults:n=>{var e,t,a,u,i,l,o;if(n.iban===(null==Q?void 0:Q.iban))return!1;let r=!Q||(null===(e=Q.currency)||void 0===e?void 0:e.id)===(null===(t=n.currency)||void 0===t?void 0:t.id);return"Deposit"===n.__typename?!!r&&(null==Q?void 0:Q.__typename)!=="Deposit"&&((null==Q?void 0:Q.__typename)!=="Account"||null!==(a=Q.type)&&void 0!==a&&!!a.depositWithdrawalAllowed)&&n.withdrawalAllowed:"Account"===n.__typename&&((null==Q?void 0:Q.__typename)!=="Deposit"||!!r&&null!==(u=n.type)&&void 0!==u&&!!u.depositWithdrawalAllowed)&&(0,H.F)({accountStatusId:null!==(l=null===(i=n.status)||void 0===i?void 0:i.id)&&void 0!==l?l:null,permissions:null!==(o=n.permissions)&&void 0!==o?o:null,legalCategoryId:S})},onAccountSelected:n=>{var e;N.setValue("account",null!=n?n:null),N.setValue("accountId",null!==(e=null==n?void 0:n.id)&&void 0!==e?e:null)},validateAvailableBalance:!P,includeDepositAccounts:nc&&G("WithdrawalDepositPaymentOrder:create")})}),(0,a.jsx)(s.Z,{size:{xs:6},sx:{display:nr?"none":void 0},children:!P&&(0,a.jsx)(T.j,{form:N,instructionTypeCodes:(0,$.LZ)($.F6.OWN_ACCOUNTS).instructionTypeCodes,required:!O&&!P})}),(0,a.jsx)(s.Z,{size:{xs:6},children:(0,a.jsx)(M,{form:N,name:"partnerAccountNumber",onNoAccountAvailable:()=>k(!0),required:!P,filterResults:n=>{var e,t,a,u,i,l,o,r,d,c,s;if(n.iban===(null==X?void 0:X.iban))return!1;let m=!X||(null===(e=X.currency)||void 0===e?void 0:e.id)===(null===(t=n.currency)||void 0===t?void 0:t.id);return"Deposit"===n.__typename?!!m&&(null==X?void 0:X.__typename)!=="Deposit"&&((null==X?void 0:X.__typename)!=="Account"||null!==(a=X.type)&&void 0!==a&&!!a.depositTopUpAllowed)&&n.topUpAllowed:"Account"===n.__typename&&((null==X?void 0:X.__typename)!=="Deposit"||!!m&&null!==(u=n.type)&&void 0!==u&&!!u.depositTopUpAllowed)&&q({accountStatusId:null!==(d=null===(i=n.status)||void 0===i?void 0:i.id)&&void 0!==d?d:null,accountGroupId:null!==(c=null===(o=n.type)||void 0===o?void 0:null===(l=o.accountGroup)||void 0===l?void 0:l.id)&&void 0!==c?c:null,accountTypeId:null!==(s=null===(r=n.type)||void 0===r?void 0:r.id)&&void 0!==s?s:null})},onAccountSelected:n=>{N.setValue("partnerAccount",null!=n?n:null)},validateAvailableBalance:!1,includeDepositAccounts:nc&&G("TopUpDepositPaymentOrder:create"),showHint:!0})}),(0,a.jsx)(i.Z,{width:"100%"}),na&&nl&&ni&&nl!==ni&&!P&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Z,{size:{xs:6},children:(0,a.jsx)(j,{form:N,happyHourFlag:ne,creditedAmount:nt,credit
1Currency:nl,debitCurrency:ni,exchangeRateError:z})}),(0,a.jsx)(s.Z,{size:{xs:6},children:(0,a.jsx)(F,{form:N})})]}),(0,a.jsx)(s.Z,{size:{xs:12},children:(0,a.jsx)(c.Z,{})}),(0,a.jsxs)(s.Z,{size:{xs:6},children:[!J&&(0,a.jsx)(_,{form:N,creditCurrency:nl,debitCurrency:ni,required:!P,accountId:nu,onExchangeRateError:W,showHint:!0}),Y&&(0,a.jsx)(x.$,{form:N,accountId:null==X?void 0:X.id,validate:[n=>{var e;return(null==Q?void 0:Q.__typename)!=="Deposit"||(null==Q?void 0:null===(e=Q.topUpPolicy)||void 0===e?void 0:e.id)!=="limited"||!(n<(Q.topUpMinValue||0))||B("deposit:deposit.form.amount.minAmount",{minAmount:L(Q.topUpMinValue||0,{currency:na||""})})}],makeEmptySpaceForHint:!0,required:!0}),nn&&(0,a.jsx)(x.$,{form:N,accountId:null==X?void 0:X.id,validate:[n=>{var e,t,a;if((null==X?void 0:X.__typename)==="Deposit"&&(null==X?void 0:X.withdrawalPolicy)&&(null===(e=X.withdrawalPolicy)||void 0===e?void 0:e.id)!=="unlimited"){let e=null!==(t=X.withdrawalMinValue)&&void 0!==t?t:0,u=null!==(a=X.withdrawalMaxValue)&&void 0!==a?a:h.lr;if(n<e)return B("deposit:deposit.form.amount.minAmount",{minAmount:L(e,{currency:na||""})});if(n>u)return B("deposit:deposit.form.amount.maxAmount",{maxAmount:L(u,{currency:na||""})})}return!0}],checkAvailableBalance:!1,makeEmptySpaceForHint:!0,required:!0})]}),(0,a.jsx)(s.Z,{size:{xs:12},children:(0,a.jsx)(c.Z,{})}),(0,a.jsx)(s.Z,{size:{xs:12},sx:{display:nr?"none":void 0},children:(0,a.jsx)(E.n,{form:N,required:!O&&!P,length:140,allowRussianCharacters:!0})}),!P&&(0,a.jsx)(s.Z,{size:{xs:6},children:(0,a.jsx)(U.C,{form:N,disabled:nl!==ni||nd,instructionTypeCode:nm,currency:N.watch("currency"),required:!O&&!P})}),(null==X?void 0:X.__typename)==="Deposit"&&N.watch("overMinimumOutstanding")&&(0,a.jsxs)(o.Z,{open:!0,onClose:()=>N.setValue("overMinimumOutstanding",!1),children:[(0,a.jsx)(d.Z,{children:(0,a.jsx)(y.cC,{i18nKey:"deposit:deposit.withdrawal.earlyTermination",values:{limit:L(X.withdrawalMinimumOutstanding||0,{currency:na||""})}})}),(0,a.jsx)(r.Z,{children:(0,a.jsx)(m.KN,{endButtons:(0,a.jsx)(l.Z,{"data-testid":"earlyTermination-continue-button",onClick:()=>K.push("/deposits/".concat(null==X?void 0:X.id,"/?terminate=true")),children:B("common:common.button.continue")}),startButtons:(0,a.jsx)(l.Z,{"data-testid":"earlyTermination-cancel-button",variant:"outlined",onClick:()=>N.setValue("overMinimumOutstanding",!1),children:B("common:common.button.cancel")})})})]})]})}},95802:function(n,e,t){t.d(e,{P:function(){return I},y:function(){return D}});var a=t(20262),u=t(2784),i=t(73235),l=t(89130),o=t(33379);function r(){let n=(0,i._)(["\n  mutation CreateOwnAccountPayment($input: OwnAccountPaymentInput!, $accountId: String!) {\n    createOwnAccountPayment(input: $input, accountId: $accountId) {\n      id\n      entityTimestamp\n    }\n  }\n"]);return r=function(){return n},n}function d(){let n=(0,i._)(["\n  mutation UpdateOwnAccountPayment(\n    $id: ID!\n    $accountId: String!\n    $entityTimestamp: String!\n    $input: OwnAccountPaymentInput!\n  ) {\n    updateOwnAccountPayment(\n      id: $id\n      accountId: $accountId\n      entityTimestamp: $entityTimestamp\n      input: $input\n    ) {\n      id\n      entityTimestamp\n      status {\n        code\n      }\n    }\n  }\n"]);return d=function(){return n},n}let c={},s=(0,l.Ps)(r()),m=(0,l.Ps)(d());var p=t(56559),v=t(98025),y=t(55278),f=t(49434),h=t(52142),b=t(84996),w=t(34565),A=t(3564),g=t(23651),x=t(62862);let C=()=>{let{currentContext:n}=(0,w.s)();return(e,t)=>{var u;return{amount:e.amount,clientName:null!==(u=null==n?void 0:n.description)&&void 0!==u?u:"-",creditedAccountCurrency:e.partnerAccount.currency.id,creditedAmount:e.creditedAmount,currency:e.currency,debitedAccountCurrency:e.account.currency.id,debitedAmount:e.debitedAmount,exchangeRate:e.exchangeRate,happyHourFlag:!!e.happyHourFlag,individualRateUsed:!!t.formState.dirtyFields.exchangeRate,partnerAccount:e.partnerAccount.id,partnerAccountNumber:e.partnerAccountNumber,paymentOrderNumber:e.paymentOrderNumber,remittanceInformation:e.remittanceInformation,valueDate:e.valueDate?(0,a.WU)(e.valueDate,"yyyy-MM-dd"):""}}},I=()=>{let{t:n}=(0,h.q)();return e=>{var t,a,u,i,l,o,r,d,c,s;return{...e,account:null,accountId:"",accountNumber:null!==(t=null==e?void 0:e.accountNumber)&&void 0!==t?t:"",amount:null!==(a=null==e?void 0:e.amount)&&void 0!==a?a:null,creditedAmount:null!==(u=null==e?void 0:e.creditedAmount)&&void 0!==u?u:null,currency:null!==(i=null==e?void 0:e.currency)&&void 0!==i?i:"",debitedAmount:null!==(l=null==e?void 0:e.debitedAmount)&&void 0!==l?l:null,exchangeRate:null!==(o=null==e?void 0:e.exchangeRate)&&void 0!==o?o:null,happyHourFlag:null!==(r=null==e?void 0:e.happyHourFlag)&&void 0!==r&&r,partnerAccount:null,partnerAccountNumber:null!==(d=null==e?void 0:e.partnerAccountNumber)&&void 0!==d?d:null,paymentOrderNumber:null!==(c=null==e?void 0:e.paymentOrderNumber)&&void 0!==c?c:null,remittanceInformation:null!==(s=null==e?void 0:e.remittanceInformation)&&void 0!==s?s:n("payment:payment.own-accounts.defaultRemittanceInformation"),valueDate:(null==e?void 0:e.valueDate)?new Date(e.valueDate):null,disableSign:!1,t
1ype:null,overMinimumOutstanding:!1}}},D=function(){let{defaultValues:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=I(),{clientLegalCategory:t}=(0,w.s)(),[i,l]=(0,u.useState)(!1),r=(0,x.H)({instructionTypeCode:"P"===t?p.dN.OwnAccountPaymentOrder:p.dN.CorpOwnAccountPaymentOrder,defaultValues:{...e(),...n}}),[d,h]=(0,A.M)(r),D=async()=>d(n=>{let{accountNumber:e,amount:u,currency:i,partnerAccountNumber:l,remittanceInformation:o,valueDate:r,paymentOrderNumber:d}=n;return{OwnAccountPaymentOrder:{instructionTypeCode:"P"===t?p.dN.OwnAccountPaymentOrder:p.dN.CorpOwnAccountPaymentOrder,accountNumber:e,amount:u,currency:i,partnerAccountNumber:l,remittanceInformation:o,valueDate:r?(0,a.WU)(r,"yyyy-MM-dd"):null,paymentOrderNumber:d}}}),N=(0,f.F)(),O=C(),P=(0,g.p)(),[_]=function(n){let e={...c};return o.D(s,e)}(),[V]=function(n){let e={...c};return o.D(m,e)}(),[j]=(0,b.I3)(),[F]=(0,v.x)(),[R]=(0,y.n)(),M=async n=>{var e;let{data:t}=n,u=await N(F({variables:{accountId:t.partnerAccount.bisAccountId,input:{account:t.account.bisAccountId,accountNumber:t.accountNumber,partnerAccountNumber:t.partnerAccountNumber,amount:t.amount,currency:t.currency,valueDate:(0,a.WU)(t.valueDate,"yyyy-MM-dd"),paymentOrderNumber:t.paymentOrderNumber,remittanceInformation:t.remittanceInformation}}}),r);if(u.data)return null===(e=(await N(j({variables:{input:{id:u.data.topUpDepositPayment.id,entityTimestamp:u.data.topUpDepositPayment.entityTimestamp,instructionStatusFlowCode:p.Cz.FOR_SIGN}}}),r)).data)||void 0===e?void 0:e.setInstructionStatus},S=async n=>{var e,t;let{data:u}=n,i=(null===(e=u.account)||void 0===e?void 0:e.__typename)==="Deposit"?u.account:null,l=r.watch("amount")||0;if(((null==i?void 0:i.outstandingAmount)||0)-l<=((null==i?void 0:i.withdrawalMinimumOutstanding)||0)){r.setValue("overMinimumOutstanding",!0);return}let o=await N(R({variables:{accountId:u.account.bisAccountId,input:{accountNumber:u.accountNumber,partnerAccount:u.partnerAccount.bisAccountId,partnerAccountNumber:u.partnerAccountNumber,amount:u.amount,currency:u.currency,valueDate:(0,a.WU)(u.valueDate,"yyyy-MM-dd"),paymentOrderNumber:u.paymentOrderNumber,remittanceInformation:u.remittanceInformation}}}),r);if(o.data)return null===(t=(await N(j({variables:{input:{id:o.data.withdrawalDepositPayment.id,entityTimestamp:o.data.withdrawalDepositPayment.entityTimestamp,instructionStatusFlowCode:p.Cz.FOR_SIGN}}}),r)).data)||void 0===t?void 0:t.setInstructionStatus},T=async n=>{let{data:e}=n;try{var t;l(!0);let n=await N(_({variables:{accountId:e.accountId,input:O(e,r)}}),r);if(!n.data)return;let a=await N(j({variables:{input:{id:n.data.createOwnAccountPayment.id,entityTimestamp:n.data.createOwnAccountPayment.entityTimestamp,instructionStatusFlowCode:p.Cz.FOR_SIGN}},onCompleted:async()=>{await P()}}),r);return null===(t=a.data)||void 0===t?void 0:t.setInstructionStatus}finally{l(!1)}},E=async n=>{let{id:e,entityTimestamp:t,data:a}=n;try{var u;l(!0);let n=await N(V({variables:{id:e,accountId:a.accountId,entityTimestamp:t,input:O(a,r)}}),r);return null===(u=n.data)||void 0===u?void 0:u.updateOwnAccountPayment}finally{l(!1)}}
1,U=r.watch("creditedAmount"),$=r.watch("debitedAmount"),H=r.watch("disableSign");return{form:r,forSign:T,update:E,mapDataToInput:O,isSaving:i,saveDraft:D,isSavingDraft:h,disableSign:0===U||0===$||H,createTopUpPayment:M,createWithdrawalPayment:S}}},56099:function(n,e,t){t.d(e,{F:function(){return i}});var a=t(80352),u=t(96413);let i=n=>{let{accountStatusId:e,permissions:t,legalCategoryId:i}=n;if(!e||!["active"].includes(e))return!1;let{canCreate:l}=(0,a.u)({payment:u.F6.OWN_ACCOUNTS,permissions:t,legalCategoryId:i});return l}}}]);

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.