From c6d1fa7c363d95a3a30bf6b527be036b0dcab448 Mon Sep 17 00:00:00 2001 From: Philipp Kewisch Date: Wed, 26 Apr 2023 14:54:47 +0200 Subject: [PATCH] Update minified file --- lib/sepa.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sepa.min.js b/lib/sepa.min.js index 142b1bb..f8a056d 100644 --- a/lib/sepa.min.js +++ b/lib/sepa.min.js @@ -1 +1 @@ -(function(t){var a="http://www.w3.org/2001/XMLSchema-instance";var s="urn:iso:std:iso:20022:tech:xsd:";var n="1.0";var e="UTF-8";var r="pain.008.001.02";var i=".";function o(t){i=t}var c=true;function d(t){c=!!t}var u={"pain.001.001.02":"pain.001.001.02","pain.001.003.02":"pain.001.003.02","pain.001.001.03":"CstmrCdtTrfInitn","pain.001.003.03":"CstmrCdtTrfInitn","pain.008.001.01":"pain.008.001.01","pain.008.003.01":"pain.008.003.01","pain.008.001.02":"CstmrDrctDbtInitn","pain.008.003.02":"CstmrDrctDbtInitn"};function l(t){var n=t.indexOf("pain.008")===0?1:0;return parseInt(t.substr(-2),10)+n}function h(t){this._painFormat=t||r;this._type=u[this._painFormat];this._paymentInfo=[];this._xmlVersion=n;this._xmlEncoding=e;this.grpHdr=new m(this._painFormat)}h.Types=u;h.prototype={_painFormat:null,grpHdr:null,_paymentInfo:[],_type:null,_xmlVersion:null,_xmlEncoding:null,addPaymentInfo:function(t){if(!(t instanceof p)){throw new Error("Given payment is not member of the PaymentInfo class")}if(t.id){t.id=this.grpHdr.id+i+t.id}else{t.id=this.grpHdr.id+i+this._paymentInfo.length}this._paymentInfo.push(t)},createPaymentInfo:function(){return new p(this._painFormat)},normalize:function(){var t=0;var n=0;for(var e=0,r=this._paymentInfo.length;e';return n+L(t)}};function m(t){this._painFormat=t}m.prototype={_painFormat:null,id:"",created:"",transactionCount:0,initiatorName:"",controlSum:0,batchBooking:false,grouping:"MIXD",toXML:function(t){var n=M(t,true,true);var e=t.createElementNS(t.documentElement.namespaceURI,"GrpHdr");var r=l(this._painFormat);n(e,"MsgId",this.id);n(e,"CreDtTm",this.created.toISOString());if(r===2){n(e,"BtchBookg",this.batchBooking.toString())}n(e,"NbOfTxs",this.transactionCount);n(e,"CtrlSum",this.controlSum.toFixed(2));if(r===2){n(e,"Grpg",this.grouping)}n(e,"InitgPty","Nm",this.initiatorName);return e},toString:function(){return L(this.toXML())}};var f={DirectDebit:"DD",Transfer:"TRF"};function p(t){this._painFormat=t;this.method=t.indexOf("pain.001")===0?f.Transfer:f.DirectDebit;this._payments=[]}p.PaymentInfoTypes=f;p.prototype={_painFormat:null,_payments:null,id:"",method:null,batchBooking:false,grouping:"MIXD",controlSum:0,localInstrumentation:"CORE",sequenceType:"FRST",collectionDate:null,requestedExecutionDate:null,creditorId:"",creditorName:"",creditorStreet:null,creditorCity:null,creditorCountry:null,creditorIBAN:"",creditorBIC:"",debtorId:"",debtorName:"",debtorStreet:null,debtorCity:null,debtorCountry:null,debtorIBAN:"",debtorBIC:"",instructionPriority:"NORM",get transactionCount(){return this._payments.length},normalize:function(){var t=0;for(var n=0,e=this._payments.length;n=65&&i<=90){n+=(i-55).toString()}else if(i>=97&&i<=122){n+=(i-87).toString()}else if(i>=48&&i<=57){n+=t[e]}}return n}function v(t){var n=0;for(var e=0,r=t.length;ee){throw new Error(r+" has invalid string length, expected "+n+" < "+t+" < "+e)}}function N(t,n,e,r){if(te){throw new Error(r+" does not match range "+n+" < "+t+" < "+e)}}function E(t,n){if(!g(t)){throw new Error(n+' has invalid IBAN "'+t+'"')}}function x(t,n){if(!D(t)){throw new Error(n+' is invalid "'+t+'"')}}function T(t,n){if(!t||isNaN(t.getTime())){throw new Error(n+" has invalid date "+t)}}function w(t,n){if(t&&!t.match(/([A-Za-z0-9]|[+|?|/|\-|:|(|)|.|,|'| ]){1,35}/)){throw new Error(n+" doesn't match sepa id charset type 1 (found: "+'"'+t+'")')}}function F(t,n){if(t&&!t.match(/([A-Za-z0-9]|[+|?|/|\-|:|(|)|.|,|']){1,35}/)){throw new Error(n+" doesn't match sepa id charset type 2 (found: "+'"'+t+'")')}}function O(t,n){if(typeof document!=="undefined"&&typeof document.implementation!=="undefined"){return document.implementation.createDocument(t,n)}else{var e=require("@xmldom/xmldom").DOMImplementation;return(new e).createDocument(t,n)}}function L(t){var n;if(typeof window==="undefined"){var e=require("@xmldom/xmldom").XMLSerializer;n=new e}else{n=new window.XMLSerializer}return n.serializeToString(t)}function M(i,o,a){return function(){var t=arguments[0];var n=a&&arguments[arguments.length-1];var e=a?arguments.length-1:arguments.length;if(o||n||n===0){for(var r=1;r';return n+L(t)}};function m(t){this._painFormat=t}m.prototype={_painFormat:null,id:"",created:"",transactionCount:0,initiatorName:"",controlSum:0,batchBooking:false,grouping:"MIXD",toXML:function(t){var n=M(t,true,true);var e=t.createElementNS(t.documentElement.namespaceURI,"GrpHdr");var r=c(this._painFormat);n(e,"MsgId",this.id);n(e,"CreDtTm",this.created.toISOString().substr(0,19));if(r===2){n(e,"BtchBookg",this.batchBooking.toString())}n(e,"NbOfTxs",this.transactionCount);n(e,"CtrlSum",this.controlSum.toFixed(2));if(r===2){n(e,"Grpg",this.grouping)}n(e,"InitgPty","Nm",this.initiatorName);return e},toString:function(){return L(this.toXML())}};var f={DirectDebit:"DD",Transfer:"TRF"};function p(t){this._painFormat=t;this.method=t.indexOf("pain.001")===0?f.Transfer:f.DirectDebit;this._payments=[]}p.PaymentInfoTypes=f;p.prototype={_painFormat:null,_payments:null,id:"",method:null,batchBooking:false,grouping:"MIXD",controlSum:0,localInstrumentation:"CORE",sequenceType:"FRST",collectionDate:null,requestedExecutionDate:null,creditorId:"",creditorName:"",creditorStreet:null,creditorCity:null,creditorCountry:null,creditorIBAN:"",creditorBIC:"",debtorId:"",debtorName:"",debtorStreet:null,debtorCity:null,debtorCountry:null,debtorIBAN:"",debtorBIC:"",instructionPriority:"NORM",get transactionCount(){return this._payments.length},normalize:function(){var t=0;for(var n=0,e=this._payments.length;n=65&&i<=90){n+=(i-55).toString()}else if(i>=97&&i<=122){n+=(i-87).toString()}else if(i>=48&&i<=57){n+=t[e]}}return n}function v(t){var n=0;for(var e=0,r=t.length;ee){throw new Error(r+" has invalid string length, expected "+n+" < "+t+" < "+e)}}function N(t,n,e,r){if(te){throw new Error(r+" does not match range "+n+" < "+t+" < "+e)}}function x(t,n){if(!g(t)){throw new Error(n+' has invalid IBAN "'+t+'"')}}function E(t,n){if(!D(t)){throw new Error(n+' is invalid "'+t+'"')}}function T(t,n){if(!t||isNaN(t.getTime())){throw new Error(n+" has invalid date "+t)}}function w(t,n){if(t&&!t.match(/([A-Za-z0-9]|[+|?|/|\-|:|(|)|.|,|'| ]){1,35}/)){throw new Error(n+" doesn't match sepa id charset type 1 (found: "+'"'+t+'")')}}function F(t,n){if(t&&!t.match(/([A-Za-z0-9]|[+|?|/|\-|:|(|)|.|,|']){1,35}/)){throw new Error(n+" doesn't match sepa id charset type 2 (found: "+'"'+t+'")')}}function O(t,n){if(typeof document!=="undefined"&&typeof document.implementation!=="undefined"){return document.implementation.createDocument(t,n)}else{var e=require("@xmldom/xmldom").DOMImplementation;return(new e).createDocument(t,n)}}function L(t){var n;if(typeof window==="undefined"){var e=require("@xmldom/xmldom").XMLSerializer;n=new e}else{n=new window.XMLSerializer}return n.serializeToString(t)}function M(i,o,a){return function(){var t=arguments[0];var n=a&&arguments[arguments.length-1];var e=a?arguments.length-1:arguments.length;if(o||n||n===0){for(var r=1;r