@paydock/client-sdk 1.112.0 → 1.112.4-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +806 -22
- package/bundles/index.cjs +1572 -229
- package/bundles/index.cjs.d.ts +2505 -2056
- package/bundles/index.mjs +1566 -226
- package/bundles/index.mjs.d.ts +2505 -2056
- package/bundles/types/api/api-base.d.ts.map +1 -1
- package/bundles/types/api/api-charge-internal.d.ts +1 -0
- package/bundles/types/api/api-charge-internal.d.ts.map +1 -1
- package/bundles/types/api/api-checkout-internal.d.ts +2 -0
- package/bundles/types/api/api-checkout-internal.d.ts.map +1 -1
- package/bundles/types/checkout/checkout.d.ts.map +1 -1
- package/bundles/types/checkout/helpers/instruction-module.d.ts +1 -1
- package/bundles/types/checkout/helpers/instruction-module.d.ts.map +1 -1
- package/bundles/types/checkout/helpers/resource-helper.d.ts +4 -3
- package/bundles/types/checkout/helpers/resource-helper.d.ts.map +1 -1
- package/bundles/types/checkout/helpers/session-helper.d.ts +3 -0
- package/bundles/types/checkout/helpers/session-helper.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.afterpay_checkout_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.apple_pay_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.canvas_3ds.show.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.card_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.generic.show_message.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.google_pay_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.payment_methods.show.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.paypal_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/instructions/v1/instruction.zip_checkout_form.show.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/additionals.d.ts +1 -1
- package/bundles/types/checkout/layout-widgets/additionals.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts +3 -0
- package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/payment-methods.d.ts +1 -1
- package/bundles/types/checkout/layout-widgets/payment-methods.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/payment-template.d.ts +1 -1
- package/bundles/types/components/iframe-event.d.ts +39 -27
- package/bundles/types/components/iframe-event.d.ts.map +1 -1
- package/bundles/types/components/iframe.d.ts +2 -2
- package/bundles/types/components/iframe.d.ts.map +1 -1
- package/bundles/types/components/param.d.ts +2 -0
- package/bundles/types/components/param.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -1
- package/bundles/types/fraud-prevention/events.d.ts +44 -0
- package/bundles/types/fraud-prevention/events.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/fraud-prevention.service.d.ts +70 -0
- package/bundles/types/fraud-prevention/fraud-prevention.service.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/index.d.ts +3 -0
- package/bundles/types/fraud-prevention/index.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/providers/forter/forter-device-agent.service.d.ts +78 -0
- package/bundles/types/fraud-prevention/providers/forter/forter-device-agent.service.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/providers/forter/templates/forter-snippet-production.template.d.ts +2 -0
- package/bundles/types/fraud-prevention/providers/forter/templates/forter-snippet-production.template.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/providers/forter/templates/forter-snippet-sandbox.template.d.ts +2 -0
- package/bundles/types/fraud-prevention/providers/forter/templates/forter-snippet-sandbox.template.d.ts.map +1 -0
- package/bundles/types/helper/browser.d.ts.map +1 -1
- package/bundles/types/helper/custom-error.d.ts +8 -0
- package/bundles/types/helper/custom-error.d.ts.map +1 -0
- package/bundles/types/index-cba.d.ts +6 -1
- package/bundles/types/index-cba.d.ts.map +1 -1
- package/bundles/types/index.d.ts +4 -1
- package/bundles/types/index.d.ts.map +1 -1
- package/bundles/types/paypal-data-collector/index.d.ts +23 -0
- package/bundles/types/paypal-data-collector/index.d.ts.map +1 -0
- package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts +58 -0
- package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts.map +1 -0
- package/bundles/types/paypal-data-collector/paypal-data-collector.interfaces.d.ts +21 -0
- package/bundles/types/paypal-data-collector/paypal-data-collector.interfaces.d.ts.map +1 -0
- package/bundles/types/paypal-data-collector/paypal-data-collector.service.d.ts +17 -0
- package/bundles/types/paypal-data-collector/paypal-data-collector.service.d.ts.map +1 -0
- package/bundles/types/paypal-save-payment-source/index.d.ts +61 -0
- package/bundles/types/paypal-save-payment-source/index.d.ts.map +1 -0
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.d.ts +85 -0
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.d.ts.map +1 -0
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts +83 -0
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts.map +1 -0
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts +35 -0
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts +1 -1
- package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/index.d.ts +2 -0
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/interfaces.d.ts +8 -1
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -1
- package/bundles/types/shared/services/configuration-validation/configuration-validation.d.ts +12 -0
- package/bundles/types/shared/services/configuration-validation/configuration-validation.d.ts.map +1 -0
- package/bundles/types/shared/services/configuration-validation/types.d.ts +73 -0
- package/bundles/types/shared/services/configuration-validation/types.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/enums.d.ts +12 -0
- package/bundles/types/wallet-buttons/enums.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index.d.ts +5 -1
- package/bundles/types/wallet-buttons/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts +28 -15
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-services/wallet-service.d.ts +1 -1
- package/bundles/types/wallet-buttons/wallet-services/wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts +10 -10
- package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/index.d.ts +1 -0
- package/bundles/types/wallet-buttons-express/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/interfaces/wallet-capture-request.interface.d.ts +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/wallet-capture-request.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts +1 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts.map +1 -1
- package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts.map +1 -1
- package/bundles/types/widget/configuration.d.ts +13 -9
- package/bundles/types/widget/configuration.d.ts.map +1 -1
- package/bundles/types/widget/html-multi-widget.d.ts +1 -2
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
- package/bundles/types/widget/html-widget.d.ts +2 -1
- package/bundles/types/widget/html-widget.d.ts.map +1 -1
- package/bundles/types/widget/multi-widget.d.ts +5 -1
- package/bundles/types/widget/multi-widget.d.ts.map +1 -1
- package/bundles/widget.umd.js +1572 -229
- package/bundles/widget.umd.js.d.ts +2505 -2056
- package/bundles/widget.umd.js.min.d.ts +2505 -2056
- package/bundles/widget.umd.min.js +1 -61
- package/docs/api-widget.md +21 -16
- package/docs/click-to-pay.md +1 -0
- package/docs/fraud-prevention-examples.md +196 -0
- package/docs/fraud-prevention.md +0 -0
- package/docs/install/npm.example.md +1 -1
- package/docs/paypal-data-collector-examples.md +59 -0
- package/docs/paypal-data-collector.md +149 -0
- package/docs/paypal-save-payment-source-examples.md +63 -0
- package/docs/paypal-save-payment-source.md +256 -0
- package/docs/wallet-buttons-examples.md +1 -1
- package/docs/wallet-buttons-express-examples.md +1 -1
- package/docs/wallet-buttons-express.md +1 -0
- package/docs/wallet-buttons.md +3 -0
- package/docs/widget-examples.md +48 -3
- package/examples/multi-html-widget/extend.html +5 -0
- package/package.json +7 -7
- package/slate.md +247 -5
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for the Forter Device Agent
|
|
3
|
+
*
|
|
4
|
+
* @typedef {Object} ForterDeviceAgentConfig
|
|
5
|
+
*
|
|
6
|
+
* @property {string} siteId - Your Forter site ID or subsite merchant ID
|
|
7
|
+
* @property {boolean} csp - Set to true if your site uses Content-Security-Policy
|
|
8
|
+
* @property {'live' | 'test'} mode - Environment mode, must be either 'live' or 'test'
|
|
9
|
+
*/
|
|
10
|
+
type ForterDeviceAgentConfig = {
|
|
11
|
+
siteId: string;
|
|
12
|
+
csp: boolean;
|
|
13
|
+
mode: 'live' | 'test';
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A class that manages Forter's device fingerprinting integration.
|
|
17
|
+
* It handles script injection and token management.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
*
|
|
21
|
+
* ```js
|
|
22
|
+
* const agent = new ForterDeviceAgent({
|
|
23
|
+
* siteId: 'your-site-id',
|
|
24
|
+
* csp: false,
|
|
25
|
+
* mode: 'test'
|
|
26
|
+
* }).init();
|
|
27
|
+
*
|
|
28
|
+
* // Later, access the token
|
|
29
|
+
* const token = agent.token;
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare class ForterDeviceAgent {
|
|
33
|
+
private readonly config;
|
|
34
|
+
private cookieToken;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a new instance of ForterDeviceAgent
|
|
37
|
+
*
|
|
38
|
+
* @param {ForterDeviceAgentConfig} config - Configuration object for Forter integration
|
|
39
|
+
*/
|
|
40
|
+
constructor(config: ForterDeviceAgentConfig);
|
|
41
|
+
/**
|
|
42
|
+
* Returns the current Forter token if available
|
|
43
|
+
*
|
|
44
|
+
* @returns {string | null} The Forter token or null if not yet available
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
*
|
|
48
|
+
* ```js
|
|
49
|
+
* const token = forterAgent.token;
|
|
50
|
+
* if (token) {
|
|
51
|
+
* // Use the token
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
get token(): string | null;
|
|
56
|
+
/**
|
|
57
|
+
* Initializes the Forter Device Agent by injecting the required script
|
|
58
|
+
* and setting up event listeners.
|
|
59
|
+
*
|
|
60
|
+
* @returns {ForterDeviceAgent} The current instance for method chaining
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
*
|
|
64
|
+
* ```js
|
|
65
|
+
* const agent = new ForterDeviceAgent(config).init();
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
init(): ForterDeviceAgent;
|
|
69
|
+
private emit;
|
|
70
|
+
private emitFingerprintTokenWrongTypeError;
|
|
71
|
+
private emitFingerprintTokenReady;
|
|
72
|
+
private getLiveScriptContent;
|
|
73
|
+
private getSandboxScriptContent;
|
|
74
|
+
private injectScript;
|
|
75
|
+
private subscribeSdkEvents;
|
|
76
|
+
}
|
|
77
|
+
export { type ForterDeviceAgentConfig, ForterDeviceAgent };
|
|
78
|
+
//# sourceMappingURL=forter-device-agent.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forter-device-agent.service.d.ts","sourceRoot":"","sources":["../../../../src/fraud-prevention/providers/forter/forter-device-agent.service.ts"],"names":[],"mappings":"AAQA;;;;;;;;GAQG;AACH,KAAK,uBAAuB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,cAAM,iBAAiB;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IAEjD,OAAO,CAAC,WAAW,CAAuB;IAE1C;;;;OAIG;gBACS,MAAM,EAAE,uBAAuB;IAI3C;;;;;;;;;;;;;OAaG;IACH,IAAW,KAAK,IAAI,MAAM,GAAG,IAAI,CAEhC;IAED;;;;;;;;;;;OAWG;IACI,IAAI,IAAI,iBAAiB;IAOhC,OAAO,CAAC,IAAI;IAQZ,OAAO,CAAC,kCAAkC;IAY1C,OAAO,CAAC,yBAAyB;IAUjC,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,uBAAuB;IAO/B,OAAO,CAAC,YAAY;IAyBpB,OAAO,CAAC,kBAAkB;CAa3B;AAED,OAAO,EAAE,KAAK,uBAAuB,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const FORTER_SDK_PRODUCTION_SCRIPT_TEMPLATE = "\n(function () {\n var merchantConfig = {\n csp: %CSP%\n };\n\n var siteId = \"%SITE_ID%\";\n\n function t(t,e){for(var n=t.split(\"\"),r=0;r<n.length;++r)n[r]=String.fromCharCode(n[r].charCodeAt(0)+e);return n.join(\"\")}function e(e){return t(e,-_).replace(/%SN%/g,siteId)}function n(t){try{if(\"number\"==typeof t&&window.location&&window.location.pathname){for(var e=window.location.pathname.split(\"/\"),n=[],r=0;r<=Math.min(e.length-1,Math.abs(t));r++)n.push(e[r]);return n.join(\"/\")||\"/\"}}catch(t){}return\"/\"}function r(t){try{Q.ex=t,o()&&-1===Q.ex.indexOf(X.uB)&&(Q.ex+=X.uB),i()&&-1===Q.ex.indexOf(X.uBr)&&(Q.ex+=X.uBr),a()&&-1===Q.ex.indexOf(X.nIL)&&(Q.ex+=X.nIL),window.ftr__snp_cwc||(Q.ex+=X.s),B(Q)}catch(t){}}function o(){var t=\"no\"+\"op\"+\"fn\",e=\"g\"+\"a\",n=\"n\"+\"ame\";return window[e]&&window[e][n]===t}function i(){return!(!navigator.brave||\"function\"!=typeof navigator.brave.isBrave)}function a(){return document.currentScript&&document.currentScript.src}function c(t,e){function n(o){try{o.blockedURI===t&&(e(),document.removeEventListener(r,n))}catch(t){document.removeEventListener(r,n)}}var r=\"securitypolicyviolation\";document.addEventListener(r,n),setTimeout(function(){document.removeEventListener(r,n)},2*60*1e3)}function u(t,e,n,r){var o=!1;t=\"https://\"+t,c(t,function(){r(!0),o=!0});var i=document.createElement(\"script\");i.onerror=function(){if(!o)try{r(!1),o=!0}catch(t){}},i.onload=n,i.type=\"text/javascript\",i.id=\"ftr__script\",i.async=!0,i.src=t;var a=document.getElementsByTagName(\"script\")[0];a.parentNode.insertBefore(i,a)}function f(){tt(X.uDF),setTimeout(w,N,X.uDF)}function s(t,e,n,r){var o=!1,i=new XMLHttpRequest;if(c(\"https:\"+t,function(){n(new Error(\"CSP Violation\"),!0),o=!0}),\"//\"===t.slice(0,2)&&(t=\"https:\"+t),\"withCredentials\"in i)i.open(\"GET\",t,!0);else{if(\"undefined\"==typeof XDomainRequest)return;i=new XDomainRequest,i.open(\"GET\",t)}Object.keys(r).forEach(function(t){i.setRequestHeader(t,r[t])}),i.onload=function(){\"function\"==typeof e&&e(i)},i.onerror=function(t){if(\"function\"==typeof n&&!o)try{n(t,!1),o=!0}catch(t){}},i.onprogress=function(){},i.ontimeout=function(){\"function\"==typeof n&&n(\"tim\"+\"eo\"+\"ut\",!1)},setTimeout(function(){i.send()},0)}function d(t,siteId,e){function n(t){var e=t.toString(16);return e.length%2?\"0\"+e:e}function r(t){if(t<=0)return\"\";for(var e=\"0123456789abcdef\",n=\"\",r=0;r<t;r++)n+=e[Math.floor(Math.random()*e.length)];return n}function o(t){for(var e=\"\",r=0;r<t.length;r++)e+=n(t.charCodeAt(r));return e}function i(t){for(var e=t.split(\"\"),n=0;n<e.length;++n)e[n]=String.fromCharCode(255^e[n].charCodeAt(0));return e.join(\"\")}e=e?\"1\":\"0\";var a=[];return a.push(t),a.push(siteId),a.push(e),function(t){var e=40,n=\"\";return t.length<e/2&&(n=\",\"+r(e/2-t.length-1)),o(i(t+n))}(a.join(\",\"))}function h(){function t(){F&&(tt(X.dUAL),setTimeout(w,N,X.dUAL))}function e(t,e){r(e?X.uAS+X.uF+X.cP:X.uAS+X.uF),F=\"F\"+\"T\"+\"R\"+\"A\"+\"U\",setTimeout(w,N,X.uAS)}window.ftr__fdad(t,e)}function l(){function t(){F&&setTimeout(w,N,X.uDAD)}function e(t,e){r(e?X.uDS+X.uF+X.cP:X.uDS+X.uF),F=\"F\"+\"T\"+\"R\"+\"A\"+\"U\",setTimeout(w,N,X.uDS)}window.ftr__radd(t,e)}function w(t){try{var e;switch(t){case X.uFP:e=O;break;case X.uDF:e=M;break;default:e=F}if(!e)return;var n=function(){try{et(),r(t+X.uS)}catch(t){}},o=function(e){try{et(),Q.td=1*new Date-Q.ts,r(e?t+X.uF+X.cP:t+X.uF),t===X.uFP&&f(),t===X.uDF&&(I?l():h()),t!==X.uAS&&t!==X.dUAL||I||l(),t!==X.uDS&&t!==X.uDAD||I&&h()}catch(t){r(X.eUoe)}};if(e===\"F\"+\"T\"+\"R\"+\"A\"+\"U\")return void o();u(e,void 0,n,o)}catch(e){r(t+X.eTlu)}}var g=\"22ge:t7mj8unkn;1forxgiurqw1qhw2vwdwxv\",v=\"fort\",p=\"erTo\",m=\"ken\",_=3;window.ftr__config={m:merchantConfig,s:\"24\",si:siteId};var y=!1,U=!1,T=v+p+m,x=400*24*60,A=10,S={write:function(t,e,r,o){void 0===o&&(o=!0);var i=0;window.ftr__config&&window.ftr__config.m&&window.ftr__config.m.ckDepth&&(i=window.ftr__config.m.ckDepth);var a,c,u=n(i);if(r?(a=new Date,a.setTime(a.getTime()+60*r*1e3),c=\"; expires=\"+a.toGMTString()):c=\"\",!o)return void(document.cookie=escape(t)+\"=\"+escape(e)+c+\"; path=\"+u);for(var f=1,s=document.domain.split(\".\"),d=A,h=!0;h&&s.length>=f&&d>0;){var l=s.slice(-f).join(\".\");document.cookie=escape(t)+\"=\"+escape(e)+c+\"; path=\"+u+\"; domain=\"+l;var w=S.read(t);null!=w&&w==e||(l=\".\"+l,document.cookie=escape(t)+\"=\"+escape(e)+c+\"; path=\"+u+\"; domain=\"+l),h=-1===document.cookie.indexOf(t+\"=\"+e),f++,d--}},read:function(t){var e=null;try{for(var n=escape(t)+\"=\",r=document.cookie.split(\";\"),o=32,i=0;i<r.length;i++){for(var a=r[i];a.charCodeAt(0)===o;)a=a.substring(1,a.length);0===a.indexOf(n)&&(e=unescape(a.substring(n.length,a.length)))}}finally{return e}}},D=window.ftr__config.s;D+=\"ck\";var L=function(t){var e=!1,n=null,r=function(){try{if(!n||!e)return;n.remove&&\"function\"==typeof n.remove?n.remove():document.head.removeChild(n),e=!1}catch(t){}};document.head&&(!function(){n=document.createElement(\"link\"),n.setAttribute(\"rel\",\"pre\"+\"con\"+\"nect\"),n.setAttribute(\"cros\"+\"sori\"+\"gin\",\"anonymous\"),n.onload=r,n.onerror=r,n.setAttribute(\"href\",t),document.head.appendChild(n),e=!0}(),setTimeout(r,3e3))},E=e(g||\"22ge:t7mj8unkn;1forxgiurqw1qhw2vwdwxv\"),C=t(\"[0Uhtxhvw0LG\",-_),R=t(\"[0Fruuhodwlrq0LG\",-_),P=t(\"Li0Qrqh0Pdwfk\",-_),k=e(\"dss1vlwhshuirupdqfhwhvw1qhw\"),q=e(\"2241414142gqv0txhu|\"),F,b=\"fgq71iruwhu1frp\",M=e(\"(VQ(1\"+b+\"2vq2(VQ(2vfulsw1mv\"),V=e(\"(VQ(1\"+b+\"2vqV2(VQ(2vfulsw1mv\"),O;window.ftr__config&&window.ftr__config.m&&window.ftr__config.m.fpi&&(O=window.ftr__config.m.fpi+e(\"2vq2(VQ(2vfulsw1mv\"));var I=!1,N=10;window.ftr__startScriptLoad=1*new Date;var j=function(t){var e=\"ft\"+\"r:tok\"+\"enR\"+\"eady\";window.ftr__tt&&clearTimeout(window.ftr__tt),window.ftr__tt=setTimeout(function(){try{delete window.ftr__tt,t+=\"_tt\";var n=document.createEvent(\"Event\");n.initEvent(e,!1,!1),n.detail=t,document.dispatchEvent(n)}catch(t){}},1e3)},B=function(t){var e=function(t){return t||\"\"},n=e(t.id)+\"_\"+e(t.ts)+\"_\"+e(t.td)+\"_\"+e(t.ex)+\"_\"+e(D),r=x;!isNaN(window.ftr__config.m.ckTTL)&&window.ftr__config.m.ckTTL&&(r=window.ftr__config.m.ckTTL),S.write(T,n,r,!0),j(n),window.ftr__gt=n},G=function(){var t=S.read(T)||\"\",e=t.split(\"_\"),n=function(t){return e[t]||void 0};return{id:n(0),ts:n(1),td:n(2),ex:n(3),vr:n(4)}},H=function(){for(var t={},e=\"fgu\",n=[],r=0;r<256;r++)n[r]=(r<16?\"0\":\"\")+r.toString(16);var o=function(t,e,r,o,i){var a=i?\"-\":\"\";return n[255&t]+n[t>>8&255]+n[t>>16&255]+n[t>>24&255]+a+n[255&e]+n[e>>8&255]+a+n[e>>16&15|64]+n[e>>24&255]+a+n[63&r|128]+n[r>>8&255]+a+n[r>>16&255]+n[r>>24&255]+n[255&o]+n[o>>8&255]+n[o>>16&255]+n[o>>24&255]},i=function(){if(window.Uint32Array&&window.crypto&&window.crypto.getRandomValues){var t=new window.Uint32Array(4);return window.crypto.getRandomValues(t),{d0:t[0],d1:t[1],d2:t[2],d3:t[3]}}return{d0:4294967296*Math.random()>>>0,d1:4294967296*Math.random()>>>0,d2:4294967296*Math.random()>>>0,d3:4294967296*Math.random()>>>0}},a=function(){var t=\"\",e=function(t,e){for(var n=\"\",r=t;r>0;--r)n+=e.charAt(1e3*Math.random()%e.length);return n};return t+=e(2,\"0123456789\"),t+=e(1,\"123456789\"),t+=e(8,\"0123456789\")};return t.safeGenerateNoDash=function(){try{var t=i();return o(t.d0,t.d1,t.d2,t.d3,!1)}catch(t){try{return e+a()}catch(t){}}},t.isValidNumericalToken=function(t){return t&&t.toString().length<=11&&t.length>=9&&parseInt(t,10).toString().length<=11&&parseInt(t,10).toString().length>=9},t.isValidUUIDToken=function(t){return t&&32===t.toString().length&&/^[a-z0-9]+$/.test(t)},t.isValidFGUToken=function(t){return 0==t.indexOf(e)&&t.length>=12},t}(),X={uDF:\"UDF\",dUAL:\"dUAL\",uAS:\"UAS\",uDS:\"UDS\",uDAD:\"UDAD\",uFP:\"UFP\",mLd:\"1\",eTlu:\"2\",eUoe:\"3\",uS:\"4\",uF:\"9\",tmos:[\"T5\",\"T10\",\"T15\",\"T30\",\"T60\"],tmosSecs:[5,10,15,30,60],bIR:\"43\",uB:\"u\",uBr:\"b\",cP:\"c\",nIL:\"i\",s:\"s\"};try{var Q=G();try{Q.id&&(H.isValidNumericalToken(Q.id)||H.isValidUUIDToken(Q.id)||H.isValidFGUToken(Q.id))?window.ftr__ncd=!1:(Q.id=H.safeGenerateNoDash(),window.ftr__ncd=!0),Q.ts=window.ftr__startScriptLoad,B(Q),window.ftr__snp_cwc=!!S.read(T),window.ftr__snp_cwc||(M=V);for(var $=\"for\"+\"ter\"+\".co\"+\"m\",z=\"ht\"+\"tps://c\"+\"dn9.\"+$,J=\"ht\"+\"tps://\"+Q.id+\"-\"+siteId+\".cd\"+\"n.\"+$,K=\"http\"+\"s://cd\"+\"n3.\"+$,W=[z,J,K],Y=0;Y<W.length;Y++)L(W[Y]);var Z=new Array(X.tmosSecs.length),tt=function(t){for(var e=0;e<X.tmosSecs.length;e++)Z[e]=setTimeout(r,1e3*X.tmosSecs[e],t+X.tmos[e])},et=function(){for(var t=0;t<X.tmosSecs.length;t++)clearTimeout(Z[t])};window.ftr__fdad=function(e,n){if(!y){y=!0;var r={};r[P]=d(window.ftr__config.s,siteId,window.ftr__config.m.csp),s(E,function(n){try{var r=n.getAllResponseHeaders().toLowerCase();if(r.indexOf(R.toLowerCase())>=0){var o=n.getResponseHeader(R);window.ftr__altd2=t(atob(o),-_-1)}if(r.indexOf(C.toLowerCase())<0)return;var i=n.getResponseHeader(C),a=t(atob(i),-_-1);if(a){var c=a.split(\":\");if(c&&2===c.length){for(var u=c[0],f=c[1],s=\"\",d=0,h=0;d<20;++d)s+=d%3>0&&h<12?siteId.charAt(h++):Q.id.charAt(d);var l=f.split(\",\");if(l.length>1){var w=l[0],g=l[1];F=u+\"/\"+w+\".\"+s+\".\"+g}}}e()}catch(t){}},function(t,e){n&&n(t,e)},r)}},window.ftr__radd=function(t,e){function n(e){try{var n=e.response,r=function(t){function e(t,o,i){try{if(i>=n)return{name:\"\",nextOffsetToProcess:o,error:\"Max pointer dereference depth exceeded\"};for(var a=[],c=o,u=t.getUint8(c),f=0;f<r;){if(f++,192==(192&u)){var s=(63&u)<<8|t.getUint8(c+1),d=e(t,s,i+1);if(d.error)return d;var h=d.name;return a.push(h),{name:a.join(\".\"),nextOffsetToProcess:c+2}}if(!(u>0)){if(0!==u)return{name:\"\",nextOffsetToProcess:c,error:\"Unexpected length at the end of name: \"+u.toString()};return{name:a.join(\".\"),nextOffsetToProcess:c+1}}for(var l=\"\",w=1;w<=u;w++)l+=String.fromCharCode(t.getUint8(c+w));a.push(l),c+=u+1,u=t.getUint8(c)}return{name:\"\",nextOffsetToProcess:c,error:\"Max iterations exceeded\"}}catch(t){return{name:\"\",nextOffsetToProcess:o,error:\"Unexpected error while parsing response: \"+t.toString()}}}for(var n=4,r=100,o=16,i=new DataView(t),a=i.getUint16(0),c=i.getUint16(2),u=i.getUint16(4),f=i.getUint16(6),s=i.getUint16(8),d=i.getUint16(10),h=12,l=[],w=0;w<u;w++){var g=e(i,h,0);if(g.error)throw new Error(g.error);if(h=g.nextOffsetToProcess,!Number.isInteger(h))throw new Error(\"invalid returned offset\");var v=g.name,p=i.getUint16(h);h+=2;var m=i.getUint16(h);h+=2,l.push({qname:v,qtype:p,qclass:m})}for(var _=[],w=0;w<f;w++){var g=e(i,h,0);if(g.error)throw new Error(g.error);if(h=g.nextOffsetToProcess,!Number.isInteger(h))throw new Error(\"invalid returned offset\");var y=g.name,U=i.getUint16(h);if(U!==o)throw new Error(\"Unexpected record type: \"+U.toString());h+=2;var T=i.getUint16(h);h+=2;var x=i.getUint32(h);h+=4;var A=i.getUint16(h);h+=2;for(var S=\"\",D=h,L=0;D<h+A&&L<r;){L++;var E=i.getUint8(D);D+=1;S+=(new TextDecoder).decode(t.slice(D,D+E)),D+=E}if(L>=r)throw new Error(\"Max iterations exceeded while reading TXT data\");h+=A,_.push({name:y,type:U,class:T,ttl:x,data:S})}return{transactionId:a,flags:c,questionCount:u,answerCount:f,authorityCount:s,additionalCount:d,questions:l,answers:_}}(n);if(!r)throw new Error(\"Error parsing DNS response\");if(!(\"answers\"in r))throw new Error(\"Unexpected response\");var o=r.answers;if(0===o.length)throw new Error(\"No answers found\");var i=o[0].data;if(i=i.replace(/^\"(.*)\"$/,\"$1\"),decodedVal=function(t){var e=40,n=32,r=126;try{for(var o=atob(t),i=\"\",a=0;a<o.length;a++)i+=function(t){var o=t.charCodeAt(0),i=o-e;return i<n&&(i=r-(n-i)+1),String.fromCharCode(i)}(o[a]);return atob(i)}catch(t){return}}(i),!decodedVal)throw new Error(\"failed to decode the value\");var a=function(t){var e=\"_\"+\"D\"+\"L\"+\"M\"+\"_\",n=t.split(e);if(!(n.length<2)){var r=n[0],o=n[1];if(!(r.split(\".\").length-1<1))return{jURL:r,eURL:o}}}(decodedVal);if(!a)throw new Error(\"failed to parse the value\");var c=a.jURL,u=a.eURL;F=function(t){for(var e=\"\",n=0,r=0;n<20;++n)e+=n%3>0&&r<12?siteId.charAt(r++):Q.id.charAt(n);return t.replace(\"/PRM1\",\"\").replace(\"/PRM2\",\"/main.\").replace(\"/PRM3\",e).replace(\"/PRM4\",\".js\")}(c),window.ftr__altd3=u,t()}catch(t){}}function r(t,n){e&&e(t,n)}if(!U){window.ftr__config.m.dr===\"N\"+\"D\"+\"R\"&&e(new Error(\"N\"+\"D\"+\"R\"),!1),q&&k||e(new Error(\"D\"+\"P\"+\"P\"),!1),U=!0;try{var o=function(t){for(var e=new Uint8Array([0,0]),n=new Uint8Array([1,0]),r=new Uint8Array([0,1]),o=new Uint8Array([0,0]),i=new Uint8Array([0,0]),a=new Uint8Array([0,0]),c=t.split(\".\"),u=[],f=0;f<c.length;f++){var s=c[f];u.push(s.length);for(var d=0;d<s.length;d++)u.push(s.charCodeAt(d))}u.push(0);var h=16,l=new Uint8Array([0,h]),w=new Uint8Array([0,1]),g=new Uint8Array(e.length+n.length+r.length+o.length+i.length+a.length+u.length+l.length+w.length);return g.set(e,0),g.set(n,e.length),g.set(r,e.length+n.length),g.set(o,e.length+n.length+r.length),g.set(i,e.length+n.length+r.length+o.length),g.set(a,e.length+n.length+r.length+o.length+i.length),g.set(u,e.length+n.length+r.length+o.length+i.length+a.length),g.set(l,e.length+n.length+r.length+o.length+i.length+a.length+u.length),g.set(w,e.length+n.length+r.length+o.length+i.length+a.length+u.length+l.length),g}(k);!function(t,e,n,r,o){var i=!1,a=new XMLHttpRequest;if(c(\"https:\"+t,function(){o(new Error(\"CSP Violation\"),!0),i=!0}),\"//\"===t.slice(0,2)&&(t=\"https:\"+t),\"withCredentials\"in a)a.open(\"POST\",t,!0);else{if(\"undefined\"==typeof XDomainRequest)return;a=new XDomainRequest,a.open(\"POST\",t)}a.responseType=\"arraybuffer\",a.setRequestHeader(\"Content-Type\",e),a.onload=function(){\"function\"==typeof r&&r(a)},a.onerror=function(t){if(\"function\"==typeof o&&!i)try{o(t,!1),i=!0}catch(t){}},a.onprogress=function(){},a.ontimeout=function(){\"function\"==typeof o&&o(\"tim\"+\"eo\"+\"ut\",!1)},setTimeout(function(){a.send(n)},0)}(q,\"application/dns-message\",o,n,r)}catch(t){e(t,!1)}}};var nt=O?X.uFP:X.uDF;tt(nt),setTimeout(w,N,nt)}catch(t){r(X.mLd)}}catch(t){}}\n)();\n";
|
|
2
|
+
//# sourceMappingURL=forter-snippet-production.template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forter-snippet-production.template.d.ts","sourceRoot":"","sources":["../../../../../src/fraud-prevention/providers/forter/templates/forter-snippet-production.template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qCAAqC,qybAUjD,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const FORTER_SDK_SANDBOX_SCRIPT_TEMPLATE = "\n(function () {\n var merchantConfig = {\n csp: %CSP%\n };\n\n var siteId = \"%SITE_ID%\";\n\n function t(t,e){for(var n=t.split(\"\"),r=0;r<n.length;++r)n[r]=String.fromCharCode(n[r].charCodeAt(0)+e);return n.join(\"\")}function e(e){return t(e,-_).replace(/%SN%/g,siteId)}function n(t){try{if(\"number\"==typeof t&&window.location&&window.location.pathname){for(var e=window.location.pathname.split(\"/\"),n=[],r=0;r<=Math.min(e.length-1,Math.abs(t));r++)n.push(e[r]);return n.join(\"/\")||\"/\"}}catch(t){}return\"/\"}function r(t){try{Q.ex=t,o()&&-1===Q.ex.indexOf(X.uB)&&(Q.ex+=X.uB),i()&&-1===Q.ex.indexOf(X.uBr)&&(Q.ex+=X.uBr),a()&&-1===Q.ex.indexOf(X.nIL)&&(Q.ex+=X.nIL),window.ftr__snp_cwc||(Q.ex+=X.s),B(Q)}catch(t){}}function o(){var t=\"no\"+\"op\"+\"fn\",e=\"g\"+\"a\",n=\"n\"+\"ame\";return window[e]&&window[e][n]===t}function i(){return!(!navigator.brave||\"function\"!=typeof navigator.brave.isBrave)}function a(){return document.currentScript&&document.currentScript.src}function c(t,e){function n(o){try{o.blockedURI===t&&(e(),document.removeEventListener(r,n))}catch(t){document.removeEventListener(r,n)}}var r=\"securitypolicyviolation\";document.addEventListener(r,n),setTimeout(function(){document.removeEventListener(r,n)},2*60*1e3)}function u(t,e,n,r){var o=!1;t=\"https://\"+t,c(t,function(){r(!0),o=!0});var i=document.createElement(\"script\");i.onerror=function(){if(!o)try{r(!1),o=!0}catch(t){}},i.onload=n,i.type=\"text/javascript\",i.id=\"ftr__script\",i.async=!0,i.src=t;var a=document.getElementsByTagName(\"script\")[0];a.parentNode.insertBefore(i,a)}function f(){tt(X.uDF),setTimeout(w,N,X.uDF)}function s(t,e,n,r){var o=!1,i=new XMLHttpRequest;if(c(\"https:\"+t,function(){n(new Error(\"CSP Violation\"),!0),o=!0}),\"//\"===t.slice(0,2)&&(t=\"https:\"+t),\"withCredentials\"in i)i.open(\"GET\",t,!0);else{if(\"undefined\"==typeof XDomainRequest)return;i=new XDomainRequest,i.open(\"GET\",t)}Object.keys(r).forEach(function(t){i.setRequestHeader(t,r[t])}),i.onload=function(){\"function\"==typeof e&&e(i)},i.onerror=function(t){if(\"function\"==typeof n&&!o)try{n(t,!1),o=!0}catch(t){}},i.onprogress=function(){},i.ontimeout=function(){\"function\"==typeof n&&n(\"tim\"+\"eo\"+\"ut\",!1)},setTimeout(function(){i.send()},0)}function d(t,siteId,e){function n(t){var e=t.toString(16);return e.length%2?\"0\"+e:e}function r(t){if(t<=0)return\"\";for(var e=\"0123456789abcdef\",n=\"\",r=0;r<t;r++)n+=e[Math.floor(Math.random()*e.length)];return n}function o(t){for(var e=\"\",r=0;r<t.length;r++)e+=n(t.charCodeAt(r));return e}function i(t){for(var e=t.split(\"\"),n=0;n<e.length;++n)e[n]=String.fromCharCode(255^e[n].charCodeAt(0));return e.join(\"\")}e=e?\"1\":\"0\";var a=[];return a.push(t),a.push(siteId),a.push(e),function(t){var e=40,n=\"\";return t.length<e/2&&(n=\",\"+r(e/2-t.length-1)),o(i(t+n))}(a.join(\",\"))}function h(){function t(){F&&(tt(X.dUAL),setTimeout(w,N,X.dUAL))}function e(t,e){r(e?X.uAS+X.uF+X.cP:X.uAS+X.uF),F=\"F\"+\"T\"+\"R\"+\"A\"+\"U\",setTimeout(w,N,X.uAS)}window.ftr__fdad(t,e)}function l(){function t(){F&&setTimeout(w,N,X.uDAD)}function e(t,e){r(e?X.uDS+X.uF+X.cP:X.uDS+X.uF),F=\"F\"+\"T\"+\"R\"+\"A\"+\"U\",setTimeout(w,N,X.uDS)}window.ftr__radd(t,e)}function w(t){try{var e;switch(t){case X.uFP:e=O;break;case X.uDF:e=M;break;default:e=F}if(!e)return;var n=function(){try{et(),r(t+X.uS)}catch(t){}},o=function(e){try{et(),Q.td=1*new Date-Q.ts,r(e?t+X.uF+X.cP:t+X.uF),t===X.uFP&&f(),t===X.uDF&&(I?l():h()),t!==X.uAS&&t!==X.dUAL||I||l(),t!==X.uDS&&t!==X.uDAD||I&&h()}catch(t){r(X.eUoe)}};if(e===\"F\"+\"T\"+\"R\"+\"A\"+\"U\")return void o();u(e,void 0,n,o)}catch(e){r(t+X.eTlu)}}var g=\"22ge:t7mj8unkn;1forxgiurqw1qhw2vwdwxv\",v=\"fort\",p=\"erTo\",m=\"ken\",_=3;window.ftr__config={m:merchantConfig,s:\"24\",si:siteId};var y=!1,U=!1,T=v+p+m,x=400*24*60,A=10,S={write:function(t,e,r,o){void 0===o&&(o=!0);var i=0;window.ftr__config&&window.ftr__config.m&&window.ftr__config.m.ckDepth&&(i=window.ftr__config.m.ckDepth);var a,c,u=n(i);if(r?(a=new Date,a.setTime(a.getTime()+60*r*1e3),c=\"; expires=\"+a.toGMTString()):c=\"\",!o)return void(document.cookie=escape(t)+\"=\"+escape(e)+c+\"; path=\"+u);for(var f=1,s=document.domain.split(\".\"),d=A,h=!0;h&&s.length>=f&&d>0;){var l=s.slice(-f).join(\".\");document.cookie=escape(t)+\"=\"+escape(e)+c+\"; path=\"+u+\"; domain=\"+l;var w=S.read(t);null!=w&&w==e||(l=\".\"+l,document.cookie=escape(t)+\"=\"+escape(e)+c+\"; path=\"+u+\"; domain=\"+l),h=-1===document.cookie.indexOf(t+\"=\"+e),f++,d--}},read:function(t){var e=null;try{for(var n=escape(t)+\"=\",r=document.cookie.split(\";\"),o=32,i=0;i<r.length;i++){for(var a=r[i];a.charCodeAt(0)===o;)a=a.substring(1,a.length);0===a.indexOf(n)&&(e=unescape(a.substring(n.length,a.length)))}}finally{return e}}},D=window.ftr__config.s;D+=\"ck\";var L=function(t){var e=!1,n=null,r=function(){try{if(!n||!e)return;n.remove&&\"function\"==typeof n.remove?n.remove():document.head.removeChild(n),e=!1}catch(t){}};document.head&&(!function(){n=document.createElement(\"link\"),n.setAttribute(\"rel\",\"pre\"+\"con\"+\"nect\"),n.setAttribute(\"cros\"+\"sori\"+\"gin\",\"anonymous\"),n.onload=r,n.onerror=r,n.setAttribute(\"href\",t),document.head.appendChild(n),e=!0}(),setTimeout(r,3e3))},E=e(g||\"22ge:t7mj8unkn;1forxgiurqw1qhw2vwdwxv\"),C=t(\"[0Uhtxhvw0LG\",-_),R=t(\"[0Fruuhodwlrq0LG\",-_),P=t(\"Li0Qrqh0Pdwfk\",-_),k=e(\"dss1vlwhshuirupdqfhwhvw1qhw\"),q=e(\"2241414142gqv0txhu|\"),F,b=\"fgq71iruwhu1frp\",M=e(\"(VQ(1\"+b+\"2vq2(VQ(2vfulsw1mv\"),V=e(\"(VQ(1\"+b+\"2vqV2(VQ(2vfulsw1mv\"),O;window.ftr__config&&window.ftr__config.m&&window.ftr__config.m.fpi&&(O=window.ftr__config.m.fpi+e(\"2vq2(VQ(2vfulsw1mv\"));var I=!1,N=10;window.ftr__startScriptLoad=1*new Date;var j=function(t){var e=\"ft\"+\"r:tok\"+\"enR\"+\"eady\";window.ftr__tt&&clearTimeout(window.ftr__tt),window.ftr__tt=setTimeout(function(){try{delete window.ftr__tt,t+=\"_tt\";var n=document.createEvent(\"Event\");n.initEvent(e,!1,!1),n.detail=t,document.dispatchEvent(n)}catch(t){}},1e3)},B=function(t){var e=function(t){return t||\"\"},n=e(t.id)+\"_\"+e(t.ts)+\"_\"+e(t.td)+\"_\"+e(t.ex)+\"_\"+e(D),r=x;!isNaN(window.ftr__config.m.ckTTL)&&window.ftr__config.m.ckTTL&&(r=window.ftr__config.m.ckTTL),S.write(T,n,r,!0),j(n),window.ftr__gt=n},G=function(){var t=S.read(T)||\"\",e=t.split(\"_\"),n=function(t){return e[t]||void 0};return{id:n(0),ts:n(1),td:n(2),ex:n(3),vr:n(4)}},H=function(){for(var t={},e=\"fgu\",n=[],r=0;r<256;r++)n[r]=(r<16?\"0\":\"\")+r.toString(16);var o=function(t,e,r,o,i){var a=i?\"-\":\"\";return n[255&t]+n[t>>8&255]+n[t>>16&255]+n[t>>24&255]+a+n[255&e]+n[e>>8&255]+a+n[e>>16&15|64]+n[e>>24&255]+a+n[63&r|128]+n[r>>8&255]+a+n[r>>16&255]+n[r>>24&255]+n[255&o]+n[o>>8&255]+n[o>>16&255]+n[o>>24&255]},i=function(){if(window.Uint32Array&&window.crypto&&window.crypto.getRandomValues){var t=new window.Uint32Array(4);return window.crypto.getRandomValues(t),{d0:t[0],d1:t[1],d2:t[2],d3:t[3]}}return{d0:4294967296*Math.random()>>>0,d1:4294967296*Math.random()>>>0,d2:4294967296*Math.random()>>>0,d3:4294967296*Math.random()>>>0}},a=function(){var t=\"\",e=function(t,e){for(var n=\"\",r=t;r>0;--r)n+=e.charAt(1e3*Math.random()%e.length);return n};return t+=e(2,\"0123456789\"),t+=e(1,\"123456789\"),t+=e(8,\"0123456789\")};return t.safeGenerateNoDash=function(){try{var t=i();return o(t.d0,t.d1,t.d2,t.d3,!1)}catch(t){try{return e+a()}catch(t){}}},t.isValidNumericalToken=function(t){return t&&t.toString().length<=11&&t.length>=9&&parseInt(t,10).toString().length<=11&&parseInt(t,10).toString().length>=9},t.isValidUUIDToken=function(t){return t&&32===t.toString().length&&/^[a-z0-9]+$/.test(t)},t.isValidFGUToken=function(t){return 0==t.indexOf(e)&&t.length>=12},t}(),X={uDF:\"UDF\",dUAL:\"dUAL\",uAS:\"UAS\",uDS:\"UDS\",uDAD:\"UDAD\",uFP:\"UFP\",mLd:\"1\",eTlu:\"2\",eUoe:\"3\",uS:\"4\",uF:\"9\",tmos:[\"T5\",\"T10\",\"T15\",\"T30\",\"T60\"],tmosSecs:[5,10,15,30,60],bIR:\"43\",uB:\"u\",uBr:\"b\",cP:\"c\",nIL:\"i\",s:\"s\"};try{var Q=G();try{Q.id&&(H.isValidNumericalToken(Q.id)||H.isValidUUIDToken(Q.id)||H.isValidFGUToken(Q.id))?window.ftr__ncd=!1:(Q.id=H.safeGenerateNoDash(),window.ftr__ncd=!0),Q.ts=window.ftr__startScriptLoad,B(Q),window.ftr__snp_cwc=!!S.read(T),window.ftr__snp_cwc||(M=V);for(var $=\"for\"+\"ter\"+\".co\"+\"m\",z=\"ht\"+\"tps://c\"+\"dn9.\"+$,J=\"ht\"+\"tps://\"+Q.id+\"-\"+siteId+\".cd\"+\"n.\"+$,K=\"http\"+\"s://cd\"+\"n3.\"+$,W=[z,J,K],Y=0;Y<W.length;Y++)L(W[Y]);var Z=new Array(X.tmosSecs.length),tt=function(t){for(var e=0;e<X.tmosSecs.length;e++)Z[e]=setTimeout(r,1e3*X.tmosSecs[e],t+X.tmos[e])},et=function(){for(var t=0;t<X.tmosSecs.length;t++)clearTimeout(Z[t])};window.ftr__fdad=function(e,n){if(!y){y=!0;var r={};r[P]=d(window.ftr__config.s,siteId,window.ftr__config.m.csp),s(E,function(n){try{var r=n.getAllResponseHeaders().toLowerCase();if(r.indexOf(R.toLowerCase())>=0){var o=n.getResponseHeader(R);window.ftr__altd2=t(atob(o),-_-1)}if(r.indexOf(C.toLowerCase())<0)return;var i=n.getResponseHeader(C),a=t(atob(i),-_-1);if(a){var c=a.split(\":\");if(c&&2===c.length){for(var u=c[0],f=c[1],s=\"\",d=0,h=0;d<20;++d)s+=d%3>0&&h<12?siteId.charAt(h++):Q.id.charAt(d);var l=f.split(\",\");if(l.length>1){var w=l[0],g=l[1];F=u+\"/\"+w+\".\"+s+\".\"+g}}}e()}catch(t){}},function(t,e){n&&n(t,e)},r)}},window.ftr__radd=function(t,e){function n(e){try{var n=e.response,r=function(t){function e(t,o,i){try{if(i>=n)return{name:\"\",nextOffsetToProcess:o,error:\"Max pointer dereference depth exceeded\"};for(var a=[],c=o,u=t.getUint8(c),f=0;f<r;){if(f++,192==(192&u)){var s=(63&u)<<8|t.getUint8(c+1),d=e(t,s,i+1);if(d.error)return d;var h=d.name;return a.push(h),{name:a.join(\".\"),nextOffsetToProcess:c+2}}if(!(u>0)){if(0!==u)return{name:\"\",nextOffsetToProcess:c,error:\"Unexpected length at the end of name: \"+u.toString()};return{name:a.join(\".\"),nextOffsetToProcess:c+1}}for(var l=\"\",w=1;w<=u;w++)l+=String.fromCharCode(t.getUint8(c+w));a.push(l),c+=u+1,u=t.getUint8(c)}return{name:\"\",nextOffsetToProcess:c,error:\"Max iterations exceeded\"}}catch(t){return{name:\"\",nextOffsetToProcess:o,error:\"Unexpected error while parsing response: \"+t.toString()}}}for(var n=4,r=100,o=16,i=new DataView(t),a=i.getUint16(0),c=i.getUint16(2),u=i.getUint16(4),f=i.getUint16(6),s=i.getUint16(8),d=i.getUint16(10),h=12,l=[],w=0;w<u;w++){var g=e(i,h,0);if(g.error)throw new Error(g.error);if(h=g.nextOffsetToProcess,!Number.isInteger(h))throw new Error(\"invalid returned offset\");var v=g.name,p=i.getUint16(h);h+=2;var m=i.getUint16(h);h+=2,l.push({qname:v,qtype:p,qclass:m})}for(var _=[],w=0;w<f;w++){var g=e(i,h,0);if(g.error)throw new Error(g.error);if(h=g.nextOffsetToProcess,!Number.isInteger(h))throw new Error(\"invalid returned offset\");var y=g.name,U=i.getUint16(h);if(U!==o)throw new Error(\"Unexpected record type: \"+U.toString());h+=2;var T=i.getUint16(h);h+=2;var x=i.getUint32(h);h+=4;var A=i.getUint16(h);h+=2;for(var S=\"\",D=h,L=0;D<h+A&&L<r;){L++;var E=i.getUint8(D);D+=1;S+=(new TextDecoder).decode(t.slice(D,D+E)),D+=E}if(L>=r)throw new Error(\"Max iterations exceeded while reading TXT data\");h+=A,_.push({name:y,type:U,class:T,ttl:x,data:S})}return{transactionId:a,flags:c,questionCount:u,answerCount:f,authorityCount:s,additionalCount:d,questions:l,answers:_}}(n);if(!r)throw new Error(\"Error parsing DNS response\");if(!(\"answers\"in r))throw new Error(\"Unexpected response\");var o=r.answers;if(0===o.length)throw new Error(\"No answers found\");var i=o[0].data;if(i=i.replace(/^\"(.*)\"$/,\"$1\"),decodedVal=function(t){var e=40,n=32,r=126;try{for(var o=atob(t),i=\"\",a=0;a<o.length;a++)i+=function(t){var o=t.charCodeAt(0),i=o-e;return i<n&&(i=r-(n-i)+1),String.fromCharCode(i)}(o[a]);return atob(i)}catch(t){return}}(i),!decodedVal)throw new Error(\"failed to decode the value\");var a=function(t){var e=\"_\"+\"D\"+\"L\"+\"M\"+\"_\",n=t.split(e);if(!(n.length<2)){var r=n[0],o=n[1];if(!(r.split(\".\").length-1<1))return{jURL:r,eURL:o}}}(decodedVal);if(!a)throw new Error(\"failed to parse the value\");var c=a.jURL,u=a.eURL;F=function(t){for(var e=\"\",n=0,r=0;n<20;++n)e+=n%3>0&&r<12?siteId.charAt(r++):Q.id.charAt(n);return t.replace(\"/PRM1\",\"\").replace(\"/PRM2\",\"/main.\").replace(\"/PRM3\",e).replace(\"/PRM4\",\".js\")}(c),window.ftr__altd3=u,t()}catch(t){}}function r(t,n){e&&e(t,n)}if(!U){window.ftr__config.m.dr===\"N\"+\"D\"+\"R\"&&e(new Error(\"N\"+\"D\"+\"R\"),!1),q&&k||e(new Error(\"D\"+\"P\"+\"P\"),!1),U=!0;try{var o=function(t){for(var e=new Uint8Array([0,0]),n=new Uint8Array([1,0]),r=new Uint8Array([0,1]),o=new Uint8Array([0,0]),i=new Uint8Array([0,0]),a=new Uint8Array([0,0]),c=t.split(\".\"),u=[],f=0;f<c.length;f++){var s=c[f];u.push(s.length);for(var d=0;d<s.length;d++)u.push(s.charCodeAt(d))}u.push(0);var h=16,l=new Uint8Array([0,h]),w=new Uint8Array([0,1]),g=new Uint8Array(e.length+n.length+r.length+o.length+i.length+a.length+u.length+l.length+w.length);return g.set(e,0),g.set(n,e.length),g.set(r,e.length+n.length),g.set(o,e.length+n.length+r.length),g.set(i,e.length+n.length+r.length+o.length),g.set(a,e.length+n.length+r.length+o.length+i.length),g.set(u,e.length+n.length+r.length+o.length+i.length+a.length),g.set(l,e.length+n.length+r.length+o.length+i.length+a.length+u.length),g.set(w,e.length+n.length+r.length+o.length+i.length+a.length+u.length+l.length),g}(k);!function(t,e,n,r,o){var i=!1,a=new XMLHttpRequest;if(c(\"https:\"+t,function(){o(new Error(\"CSP Violation\"),!0),i=!0}),\"//\"===t.slice(0,2)&&(t=\"https:\"+t),\"withCredentials\"in a)a.open(\"POST\",t,!0);else{if(\"undefined\"==typeof XDomainRequest)return;a=new XDomainRequest,a.open(\"POST\",t)}a.responseType=\"arraybuffer\",a.setRequestHeader(\"Content-Type\",e),a.onload=function(){\"function\"==typeof r&&r(a)},a.onerror=function(t){if(\"function\"==typeof o&&!i)try{o(t,!1),i=!0}catch(t){}},a.onprogress=function(){},a.ontimeout=function(){\"function\"==typeof o&&o(\"tim\"+\"eo\"+\"ut\",!1)},setTimeout(function(){a.send(n)},0)}(q,\"application/dns-message\",o,n,r)}catch(t){e(t,!1)}}};var nt=O?X.uFP:X.uDF;tt(nt),setTimeout(w,N,nt)}catch(t){r(X.mLd)}}catch(t){}}\n)();\n";
|
|
2
|
+
//# sourceMappingURL=forter-snippet-sandbox.template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forter-snippet-sandbox.template.d.ts","sourceRoot":"","sources":["../../../../../src/fraud-prevention/providers/forter/templates/forter-snippet-sandbox.template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kCAAkC,qybAU9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/helper/browser.ts"],"names":[],"mappings":"AAAA,qBAAa,OAAO;
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/helper/browser.ts"],"names":[],"mappings":"AAAA,qBAAa,OAAO;WAEJ,UAAU,IAAI,OAAO;WAMrB,WAAW,IAAI,OAAO;WAMtB,cAAc,IAAI,OAAO;WAIzB,WAAW,IAAI,MAAM;WAIrB,iBAAiB,IAAI,MAAM;WAI3B,cAAc,IAAI,MAAM;WA4BxB,aAAa,IAAI,OAAO;WAIxB,aAAa,IAAI,MAAM;WAIvB,eAAe,IAAI,MAAM;WAIzB,cAAc,IAAI,MAAM;WAIxB,cAAc,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE;CA0BlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-error.d.ts","sourceRoot":"","sources":["../../src/helper/custom-error.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAY,SAAQ,KAAK;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;gBAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG;CAMzD"}
|
|
@@ -5,9 +5,14 @@ export * from './external-checkout';
|
|
|
5
5
|
export * from './payment-source-widget';
|
|
6
6
|
export * from './payment-source';
|
|
7
7
|
export * from './secure-remote-commerce';
|
|
8
|
+
export * from './checkout/index';
|
|
8
9
|
export * from './wallet-buttons';
|
|
10
|
+
export * from './wallet-buttons-express';
|
|
11
|
+
export * from './checkout/index';
|
|
9
12
|
export * from './widget';
|
|
10
|
-
export
|
|
13
|
+
export * from './paypal-data-collector';
|
|
14
|
+
export * from './paypal-save-payment-source';
|
|
15
|
+
export { ELEMENT, FORM_FIELD, STYLE, SUPPORTED_CARD_TYPES, TEXT, VAULT_DISPLAY_STYLE, type IPayPalMeta, type IStyles, type ITexts, type VaultDisplayStyle, IWalletMeta, } from './components/param';
|
|
11
16
|
export { EVENT } from './components/iframe-event';
|
|
12
17
|
export { TRIGGER } from './components/trigger';
|
|
13
18
|
//# sourceMappingURL=index-cba.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-cba.d.ts","sourceRoot":"","sources":["../src/index-cba.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index-cba.d.ts","sourceRoot":"","sources":["../src/index-cba.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,OAAO,EACH,OAAO,EACP,UAAU,EACV,KAAK,EACL,oBAAoB,EACpB,IAAI,EACJ,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,WAAW,GACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
|
package/bundles/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './api';
|
|
|
2
2
|
export * from './canvas-3ds';
|
|
3
3
|
export * from './checkout-button';
|
|
4
4
|
export * from './external-checkout';
|
|
5
|
+
export * from './fraud-prevention';
|
|
5
6
|
export * from './payment-source-widget';
|
|
6
7
|
export * from './payment-source';
|
|
7
8
|
export * from './secure-remote-commerce';
|
|
@@ -10,7 +11,9 @@ export * from './wallet-buttons';
|
|
|
10
11
|
export * from './widget';
|
|
11
12
|
export * from './checkout/index';
|
|
12
13
|
export * from './wallet-buttons-express';
|
|
13
|
-
export
|
|
14
|
+
export * from './paypal-data-collector';
|
|
15
|
+
export * from './paypal-save-payment-source';
|
|
16
|
+
export { ELEMENT, FORM_FIELD, STYLE, SUPPORTED_CARD_TYPES, TEXT, VAULT_DISPLAY_STYLE, type IPayPalMeta, type IStyles, type ITexts, type VaultDisplayStyle, type IWalletMeta, } from './components/param';
|
|
14
17
|
export { EVENT } from './components/iframe-event';
|
|
15
18
|
export { TRIGGER } from './components/trigger';
|
|
16
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,OAAO,EACH,OAAO,EACP,UAAU,EACV,KAAK,EACL,oBAAoB,EACpB,IAAI,EACJ,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { PayPalDataCollector } from './paypal-data-collector';
|
|
2
|
+
/**
|
|
3
|
+
* Interface of data used for PayPal configuration. For further information refer to [the documentation](https://developer.paypal.com/sdk/js/reference/#style).
|
|
4
|
+
* @interface PayPalDataCollectorConfig
|
|
5
|
+
*
|
|
6
|
+
* @type {object}
|
|
7
|
+
* @param {boolean} [mouse_movement] Used for indicating if is enabled mouse movement collection.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Data object with the corresponding `correlation_id`.
|
|
11
|
+
* @interface CollectedDeviceData
|
|
12
|
+
*
|
|
13
|
+
* @type {object}
|
|
14
|
+
* @param {string} [correlation_id] The correlation ID that was used on the subsecuent requests.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Interface for IOnErrorEventData
|
|
18
|
+
* @interface IOnErrorEventData
|
|
19
|
+
*
|
|
20
|
+
* @type {object}
|
|
21
|
+
* @param {string} error_code Error code. One of 'promise_not_enabled' or 'script_error'.
|
|
22
|
+
**/
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/paypal-data-collector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;;;GAMG;AAEH;;;;;;GAMG;AAEH;;;;;;IAMI"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { EventEmitter } from "../helper/event-emitter";
|
|
2
|
+
import { type CollectedDeviceData, type IOnErrorEventData, type IPayPalDataCollector, type PayPalDataCollectorConfig } from "./paypal-data-collector.interfaces";
|
|
3
|
+
/**
|
|
4
|
+
* PayPal Data Collector Widget constructor
|
|
5
|
+
*
|
|
6
|
+
* @param {string} [flowId] - This string identifies the source website of the FraudNet request.
|
|
7
|
+
* @param {PayPalDataCollectorConfig} [config] - Extra configuration for the widget.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* var payPalDataCollector = new PayPalDataCollector('FLOW_ID', {});
|
|
11
|
+
*/
|
|
12
|
+
declare class PayPalDataCollector {
|
|
13
|
+
protected service: IPayPalDataCollector;
|
|
14
|
+
protected eventEmitter: EventEmitter;
|
|
15
|
+
/** @constructs */ constructor(flowId?: string, config?: PayPalDataCollectorConfig);
|
|
16
|
+
/**
|
|
17
|
+
* After configuring the PayPalDataCollector Widget, starts the process and returns
|
|
18
|
+
* the correlation id used among the requests asynchronously.
|
|
19
|
+
*
|
|
20
|
+
* @returns {Promise<CollectedDeviceData>} Promise when resolved, returns an object
|
|
21
|
+
* that contains the `correlation_id` key.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* const collectedDeviceData = await payPalDataCollectorWidget.collectDeviceData();
|
|
25
|
+
* console.log(collectedDeviceData.correlation_id)
|
|
26
|
+
*/
|
|
27
|
+
collectDeviceData(): Promise<CollectedDeviceData>;
|
|
28
|
+
/**
|
|
29
|
+
* Callback for onError method.
|
|
30
|
+
*
|
|
31
|
+
* @callback OnErrorCallback
|
|
32
|
+
* @param {IOnErrorEventData|null} data
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* If the process fails, the function passed as parameter will be called.
|
|
36
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* PayPalDataCollector.onError((eventData) => console.log('Some error occur'));
|
|
40
|
+
*
|
|
41
|
+
* @param {OnErrorCallback} [callback] - Function to be called when there is an error in the flow.
|
|
42
|
+
*/
|
|
43
|
+
onError(callback?: (data?: IOnErrorEventData) => void): () => void;
|
|
44
|
+
/**
|
|
45
|
+
* Current method can change environment. By default environment = test.
|
|
46
|
+
* This method does not affect Paydock's API calls or environments, is only for PayPal Data Collector
|
|
47
|
+
* script, in order to know if the script is injected on a live server or is a testing
|
|
48
|
+
* environment. The available values are `test` and `live`. This should match with the used
|
|
49
|
+
* `gateway.mode` in Paydock to process the transaction.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* PayPalDataCollector.setEnv('live');
|
|
53
|
+
* @param {string} env - test, live
|
|
54
|
+
*/
|
|
55
|
+
setEnv(env: string): void;
|
|
56
|
+
}
|
|
57
|
+
export { PayPalDataCollector };
|
|
58
|
+
//# sourceMappingURL=paypal-data-collector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paypal-data-collector.d.ts","sourceRoot":"","sources":["../../src/paypal-data-collector/paypal-data-collector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAEzB,KAAK,yBAAyB,EAC/B,MAAM,oCAAoC,CAAC;AAI5C;;;;;;;;GAQG;AACH,cAAM,mBAAmB;IACvB,SAAS,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACxC,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAErC,kBAAkB,aAEhB,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,yBAAyB;IAUpC;;;;;;;;;;OAUG;IACI,iBAAiB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IASxD;;;;;OAKG;IACH;;;;;;;;OAQG;IACI,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,iBAAiB,KAAK,IAAI;IAI5D;;;;;;;;;;OAUG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAGjC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum PAYPAL_DATA_COLLECTOR_EVENTS {
|
|
2
|
+
ON_ERROR = "ON_ERROR"
|
|
3
|
+
}
|
|
4
|
+
export declare enum ErrorCodes {
|
|
5
|
+
PROMISE_NOT_ENABLED = "promise_not_enabled",
|
|
6
|
+
SCRIPT_ERROR = "script_error"
|
|
7
|
+
}
|
|
8
|
+
export interface PayPalDataCollectorConfig {
|
|
9
|
+
mouse_movement?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface IPayPalDataCollector {
|
|
12
|
+
collectDeviceData(): Promise<CollectedDeviceData>;
|
|
13
|
+
setEnv(env: string): void;
|
|
14
|
+
}
|
|
15
|
+
export interface CollectedDeviceData {
|
|
16
|
+
correlation_id: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IOnErrorEventData {
|
|
19
|
+
error_code: ErrorCodes;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=paypal-data-collector.interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paypal-data-collector.interfaces.d.ts","sourceRoot":"","sources":["../../src/paypal-data-collector/paypal-data-collector.interfaces.ts"],"names":[],"mappings":"AAAA,oBAAY,4BAA4B;IACtC,QAAQ,aAAa;CACtB;AAED,oBAAY,UAAU;IACpB,mBAAmB,wBAAwB;IAC3C,YAAY,iBAAiB;CAC9B;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACnC,iBAAiB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAClD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,UAAU,CAAC;CACxB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EventEmitter } from "../helper/event-emitter";
|
|
2
|
+
import { type CollectedDeviceData, type IPayPalDataCollector, type PayPalDataCollectorConfig } from "./paypal-data-collector.interfaces";
|
|
3
|
+
export declare class PayPalDataCollectorService implements IPayPalDataCollector {
|
|
4
|
+
protected eventEmitter: EventEmitter;
|
|
5
|
+
protected flowId?: string;
|
|
6
|
+
protected config?: PayPalDataCollectorConfig;
|
|
7
|
+
protected correlationId: string;
|
|
8
|
+
protected isSandbox: boolean;
|
|
9
|
+
constructor(eventEmitter: EventEmitter, flowId?: string, config?: PayPalDataCollectorConfig);
|
|
10
|
+
static fromConfig(eventEmitter: EventEmitter, flowId?: string, config?: PayPalDataCollectorConfig): PayPalDataCollectorService;
|
|
11
|
+
collectDeviceData(): Promise<CollectedDeviceData>;
|
|
12
|
+
private appendPaypalSavePaymentSourceComponent;
|
|
13
|
+
private setupCallbacks;
|
|
14
|
+
onError(): void;
|
|
15
|
+
setEnv(env: string): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=paypal-data-collector.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paypal-data-collector.service.d.ts","sourceRoot":"","sources":["../../src/paypal-data-collector/paypal-data-collector.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,KAAK,mBAAmB,EAExB,KAAK,oBAAoB,EAEzB,KAAK,yBAAyB,EAC/B,MAAM,oCAAoC,CAAC;AAE5C,qBAAa,0BAA2B,YAAW,oBAAoB;IAKnE,SAAS,CAAC,YAAY,EAAE,YAAY;IACpC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IACzB,SAAS,CAAC,MAAM,CAAC,EAAE,yBAAyB;IAN9C,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC;IAChC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC;gBAGjB,YAAY,EAAE,YAAY,EAC1B,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,yBAAyB;IAG9C,MAAM,CAAC,UAAU,CACf,YAAY,EAAE,YAAY,EAC1B,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,yBAAyB;IAK7B,iBAAiB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAUxD,OAAO,CAAC,sCAAsC;IAgC9C,OAAO,CAAC,cAAc;IAsBf,OAAO;IAMP,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAGjC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export { PayPalSavePaymentSourceWidget } from './paypal-save-payment-source';
|
|
2
|
+
/**
|
|
3
|
+
* Interface of data used for PayPal configuration. For further information refer to [the documentation](https://developer.paypal.com/sdk/js/reference/#style).
|
|
4
|
+
* @interface PayPalSavePaymentSourceWidgetConfig
|
|
5
|
+
*
|
|
6
|
+
* @type {object}
|
|
7
|
+
* @param {'vertical'|'horizontal'} [style.layout] Used for indicating the PayPal Button layout.
|
|
8
|
+
* @param {'blue'|'gold'|'silver'|'black'|'white'} [style.color] Used for indicating the main color of the PayPal Button.
|
|
9
|
+
* @param {'rect'|'sharp'|'pill'} [style.shape] Used for indicating the shape of the PayPal Button.
|
|
10
|
+
* @param {'paypal'|'checkout'|'buynow'|'pay'} [style.label] Used for indicating the label of the PayPal Button.
|
|
11
|
+
* @param {boolean} [style.disableMaxWidth] Used for indicating if the max width will be disabled.
|
|
12
|
+
* @param {boolean} [style.disableMaxHeight] Used for indicating the max height will be disabled.
|
|
13
|
+
* @param {number} [style.height] Used for indicating the height of the PayPal Button, if disableMaxHeight is true.
|
|
14
|
+
* @param {number} [style.borderRadius] Used for indicating the border radius of the PayPal Button.
|
|
15
|
+
* @param {boolean} [style.tagline] Used for indicating the tagline of the PayPal Button.
|
|
16
|
+
* @param {number} [message.amount] Used for indicating an amount before the payment.
|
|
17
|
+
* @param {'center'|'left'|'right'} [message.align] Used for indicating the align of the message.
|
|
18
|
+
* @param {'black'|'white'} [message.color] Used for indicating the color of the message.
|
|
19
|
+
* @param {'top'|'bottom'} [message.position] Used for indicating the position of the message.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Interface of possible error codes inside onError event data.
|
|
23
|
+
* @interface ErrorCodes
|
|
24
|
+
*
|
|
25
|
+
* @type {object}
|
|
26
|
+
* @param {string} [unavailable] Error code when an error occurs loading the widget.
|
|
27
|
+
* @param {string} [onPaypalVaultSetupTokenError] Error code when an error occrus on PayPal side.
|
|
28
|
+
* @param {string} [onGetIdTokenError] Error code when trying to get ID token from PayPal.
|
|
29
|
+
* @param {string} [onGetWalletConfigError] Error code when trying to get wallet config from Paydock.
|
|
30
|
+
* @param {string} [onGetSetupTokenError] Error code when trying to get the setup token from PayPal.
|
|
31
|
+
* @param {string} [onOneTimeTokenError] Error code when trying to get the one time token from Paydock.
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Interface for IOnSuccessEventData
|
|
35
|
+
* @interface IOnSuccessEventData
|
|
36
|
+
*
|
|
37
|
+
* @type {object}
|
|
38
|
+
* @param {EVENTS} event - Event Name is 'ON_SUCCESS'
|
|
39
|
+
* @param {object} data Data object
|
|
40
|
+
* @param {string} data.token One Time Token to be exchanged for a Paydock Customer.
|
|
41
|
+
* @param {string} [data.email] Paypal account customer email if retrieved from Paypal servers.
|
|
42
|
+
**/
|
|
43
|
+
/**
|
|
44
|
+
* Interface for IOnErrorEventData
|
|
45
|
+
* @interface IOnErrorEventData
|
|
46
|
+
*
|
|
47
|
+
* @type {object}
|
|
48
|
+
* @param {EVENTS} event - Event Name is 'ON_ERROR'
|
|
49
|
+
* @param {object} data Error data object
|
|
50
|
+
* @param {ErrorCodes} data.error_code Error code. One of ErrorCodes.
|
|
51
|
+
* @param {string} [data.details] Error details.
|
|
52
|
+
* @param {string} [data.message] Error message.
|
|
53
|
+
**/
|
|
54
|
+
/**
|
|
55
|
+
* Interface for IOnCancelEventData
|
|
56
|
+
* @interface IOnCancelEventData
|
|
57
|
+
*
|
|
58
|
+
* @type {object}
|
|
59
|
+
* @param {EVENTS} event - Event Name is 'ON_CANCEL'
|
|
60
|
+
**/
|
|
61
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/paypal-save-payment-source/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;GAWG;AAEH;;;;;;;;;IASI;AAEJ;;;;;;;;;;IAUI;AAEJ;;;;;;IAMI"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Container } from '../components/container';
|
|
2
|
+
import { EventEmitter } from '../helper/event-emitter';
|
|
3
|
+
import { type IOnCancelEventData, type IOnErrorEventData, type IOnSuccessEventData, type IPayPalSavePaymentSourceWidget, type PayPalSavePaymentSourceWidgetConfig } from './paypal-save-payment-source.interfaces';
|
|
4
|
+
/**
|
|
5
|
+
* PayPal Save Payment Source Widget constructor
|
|
6
|
+
*
|
|
7
|
+
* @param {string} selector - Selector of html element. Container for PayPal Save Payment Source Widget.
|
|
8
|
+
* @param {string} publicKey - PayDock users public key.
|
|
9
|
+
* @param {string} gatewayId - PayDock's PayPal gatewayId.
|
|
10
|
+
* @param {PayPalSavePaymentSourceWidgetConfig} config - Extra configuration for the widget, like styles.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* var payPalSavePaymentSourceWidget = new PayPalSavePaymentSourceWidget('#paypalButton', 'public_key', 'gateway_id');
|
|
14
|
+
*/
|
|
15
|
+
declare class PayPalSavePaymentSourceWidget {
|
|
16
|
+
protected container: Container;
|
|
17
|
+
protected service: IPayPalSavePaymentSourceWidget;
|
|
18
|
+
protected eventEmitter: EventEmitter;
|
|
19
|
+
/** @constructs */ constructor(selector: string, publicKey: string, gatewayId: string, config?: PayPalSavePaymentSourceWidgetConfig);
|
|
20
|
+
/**
|
|
21
|
+
* The final method after configuring the PayPalSavePaymentSource Widget to
|
|
22
|
+
* start the load process.
|
|
23
|
+
*/
|
|
24
|
+
load(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Current method can change environment. By default environment = sandbox.
|
|
27
|
+
* Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* payPalSavePaymentSourceWidget.setEnv('production');
|
|
31
|
+
* @param {string} env - sandbox, production
|
|
32
|
+
* @param {string} [alias] - Own domain alias
|
|
33
|
+
*/
|
|
34
|
+
setEnv(env: string, alias?: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* Callback for onSuccess method.
|
|
37
|
+
*
|
|
38
|
+
* @callback OnSuccessCallback
|
|
39
|
+
* @param {IOnSuccessEventData} data
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* If the setup token was successfully approved and a OTT was generated, the function passed as parameter will be called.
|
|
43
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* payPalSavePaymentSourceWidget.onSuccess((eventData) => console.log('One time token and email obtained successfully'));
|
|
47
|
+
*
|
|
48
|
+
* @param {OnSuccessCallback} [callback] - Function to be called when the result is successful.
|
|
49
|
+
*/
|
|
50
|
+
onSuccess(callback?: (data: IOnSuccessEventData) => void): () => void;
|
|
51
|
+
/**
|
|
52
|
+
* Callback for onError method.
|
|
53
|
+
*
|
|
54
|
+
* @callback OnErrorCallback
|
|
55
|
+
* @param {IOnErrorEventData} data
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* If in the process for obtaining the setup token fails, the function passed as parameter will be called.
|
|
59
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* payPalSavePaymentSourceWidget.onError((eventData) => console.log('Some error occurred'));
|
|
63
|
+
*
|
|
64
|
+
* @param {OnErrorCallback} [callback] - Function to be called when there is an error in the flow.
|
|
65
|
+
*/
|
|
66
|
+
onError(callback?: (data: IOnErrorEventData) => void): () => void;
|
|
67
|
+
/**
|
|
68
|
+
* Callback for onCancel method.
|
|
69
|
+
*
|
|
70
|
+
* @callback OnCancelCallback
|
|
71
|
+
* @param {IOnCancelEventData} data
|
|
72
|
+
*/
|
|
73
|
+
/**
|
|
74
|
+
* If in the process for obtaining the setup token was cancelled, the function passed as parameter will be called.
|
|
75
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* payPalSavePaymentSourceWidget.onCancel(() => console.log('Operation cancelled'));
|
|
79
|
+
*
|
|
80
|
+
* @param {OnCancelCallback} [callback] - Function to be called when the operation is cancelled.
|
|
81
|
+
*/
|
|
82
|
+
onCancel(callback?: (data?: IOnCancelEventData) => void): () => void;
|
|
83
|
+
}
|
|
84
|
+
export { PayPalSavePaymentSourceWidget };
|
|
85
|
+
//# sourceMappingURL=paypal-save-payment-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paypal-save-payment-source.d.ts","sourceRoot":"","sources":["../../src/paypal-save-payment-source/paypal-save-payment-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACnC,KAAK,mCAAmC,EACzC,MAAM,yCAAyC,CAAC;AAGjD;;;;;;;;;;GAUG;AACH,cAAM,6BAA6B;IACjC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IAC/B,SAAS,CAAC,OAAO,EAAE,8BAA8B,CAAC;IAClD,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAErC,kBAAkB,aAEhB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,mCAAmC;IAY9C;;;OAGG;IACI,IAAI;IASX;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IAIzC;;;;;OAKG;IACH;;;;;;;;OAQG;IACI,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI;IAI/D;;;;;OAKG;IACH;;;;;;;;OAQG;IACI,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI;IAI3D;;;;;OAKG;IACH;;;;;;;;OAQG;IACI,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,kBAAkB,KAAK,IAAI;CAG/D;AAED,OAAO,EAAE,6BAA6B,EAAE,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { Container } from '../components/container';
|
|
2
|
+
export interface PaypalOathTokenResponse {
|
|
3
|
+
id_token: string;
|
|
4
|
+
access_token: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PaypalOAuthTokenBody {
|
|
7
|
+
gateway_id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface PaypalSetupTokenBody {
|
|
10
|
+
gateway_id: string;
|
|
11
|
+
}
|
|
12
|
+
export interface PaypalSetupTokenResponse {
|
|
13
|
+
setup_token: string;
|
|
14
|
+
}
|
|
15
|
+
export interface PaypalOttBody {
|
|
16
|
+
gateway_id: string;
|
|
17
|
+
}
|
|
18
|
+
export interface PaypalOttResponse {
|
|
19
|
+
token: string;
|
|
20
|
+
email: string;
|
|
21
|
+
}
|
|
22
|
+
export interface PayPalStyleConfig {
|
|
23
|
+
layout?: 'vertical' | 'horizontal';
|
|
24
|
+
color?: 'blue' | 'gold' | 'silver' | 'black' | 'white';
|
|
25
|
+
shape?: 'rect' | 'sharp' | 'pill';
|
|
26
|
+
label?: 'paypal' | 'checkout' | 'buynow' | 'pay';
|
|
27
|
+
disableMaxWidth?: boolean;
|
|
28
|
+
disableMaxHeight?: boolean;
|
|
29
|
+
height?: number;
|
|
30
|
+
borderRadius?: number;
|
|
31
|
+
tagline?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface PayPalMessageConfig {
|
|
34
|
+
amount?: number;
|
|
35
|
+
align?: 'center' | 'left' | 'right';
|
|
36
|
+
color?: 'black' | 'white';
|
|
37
|
+
position?: 'top' | 'bottom';
|
|
38
|
+
}
|
|
39
|
+
export interface PayPalSavePaymentSourceWidgetConfig {
|
|
40
|
+
style?: PayPalStyleConfig;
|
|
41
|
+
message?: PayPalMessageConfig;
|
|
42
|
+
}
|
|
43
|
+
export declare const PAYPAL_SAVE_PAYMENT_EVENTS: {
|
|
44
|
+
ON_SUCCESS: string;
|
|
45
|
+
ON_ERROR: string;
|
|
46
|
+
ON_CANCEL: string;
|
|
47
|
+
};
|
|
48
|
+
export interface IPayPalSavePaymentSourceWidget {
|
|
49
|
+
load(container: Container): void;
|
|
50
|
+
setEnv(env: string, alias?: string): void;
|
|
51
|
+
}
|
|
52
|
+
export declare enum ErrorCodes {
|
|
53
|
+
UNAVAILABLE = "unavailable",
|
|
54
|
+
ON_PAYPAL_VAULT_SETUP_TOKEN_ERROR = "onPaypalVaultSetupTokenError",
|
|
55
|
+
ON_GET_ID_TOKEN_ERROR = "onGetIdTokenError",
|
|
56
|
+
ON_GET_WALLET_CONFIG_ERROR = "onGetWalletConfigError",
|
|
57
|
+
ON_GET_SETUP_TOKEN_ERROR = "onGetSetupTokenError",
|
|
58
|
+
ON_ONE_TIME_TOKEN_ERROR = "onOneTimeTokenError"
|
|
59
|
+
}
|
|
60
|
+
export declare enum EVENTS {
|
|
61
|
+
ON_SUCCESS = "ON_SUCCESS",
|
|
62
|
+
ON_ERROR = "ON_ERROR",
|
|
63
|
+
ON_CANCEL = "ON_CANCEL"
|
|
64
|
+
}
|
|
65
|
+
export interface IOnSuccessEventData {
|
|
66
|
+
event: EVENTS.ON_SUCCESS;
|
|
67
|
+
data: {
|
|
68
|
+
token: string;
|
|
69
|
+
email: string;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export interface IOnErrorEventData {
|
|
73
|
+
event: EVENTS.ON_ERROR;
|
|
74
|
+
data: {
|
|
75
|
+
error_code: ErrorCodes;
|
|
76
|
+
details?: string;
|
|
77
|
+
message?: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export interface IOnCancelEventData {
|
|
81
|
+
event: EVENTS.ON_CANCEL;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=paypal-save-payment-source.interfaces.d.ts.map
|
package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paypal-save-payment-source.interfaces.d.ts","sourceRoot":"","sources":["../../src/paypal-save-payment-source/paypal-save-payment-source.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AACD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;IACvD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAClC,KAAK,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,CAAC;IACjD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AACD,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IACpC,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CAC7B;AAED,MAAM,WAAW,mCAAmC;IAClD,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B;AAED,eAAO,MAAM,0BAA0B;;;;CAItC,CAAC;AAEF,MAAM,WAAW,8BAA8B;IAC7C,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED,oBAAY,UAAU;IACpB,WAAW,gBAAgB;IAC3B,iCAAiC,iCAAiC;IAClE,qBAAqB,sBAAsB;IAC3C,0BAA0B,2BAA2B;IACrD,wBAAwB,yBAAyB;IACjD,uBAAuB,wBAAwB;CAChD;AAED,oBAAY,MAAM;IAChB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;IACzB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC;IACvB,IAAI,EAAE;QACJ,UAAU,EAAE,UAAU,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC;CACzB"}
|