tonder-web-sdk 1.4.0
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/.env-example +1 -0
- package/.htaccess +1 -0
- package/README.md +204 -0
- package/cypress/e2e/1-getting-started/todo.cy.js +143 -0
- package/cypress/e2e/2-advanced-examples/actions.cy.js +299 -0
- package/cypress/e2e/2-advanced-examples/aliasing.cy.js +39 -0
- package/cypress/e2e/2-advanced-examples/assertions.cy.js +176 -0
- package/cypress/e2e/2-advanced-examples/connectors.cy.js +98 -0
- package/cypress/e2e/2-advanced-examples/cookies.cy.js +118 -0
- package/cypress/e2e/2-advanced-examples/cypress_api.cy.js +185 -0
- package/cypress/e2e/2-advanced-examples/files.cy.js +85 -0
- package/cypress/e2e/2-advanced-examples/location.cy.js +32 -0
- package/cypress/e2e/2-advanced-examples/misc.cy.js +104 -0
- package/cypress/e2e/2-advanced-examples/navigation.cy.js +56 -0
- package/cypress/e2e/2-advanced-examples/network_requests.cy.js +163 -0
- package/cypress/e2e/2-advanced-examples/querying.cy.js +114 -0
- package/cypress/e2e/2-advanced-examples/spies_stubs_clocks.cy.js +201 -0
- package/cypress/e2e/2-advanced-examples/storage.cy.js +110 -0
- package/cypress/e2e/2-advanced-examples/traversal.cy.js +121 -0
- package/cypress/e2e/2-advanced-examples/utilities.cy.js +108 -0
- package/cypress/e2e/2-advanced-examples/viewport.cy.js +58 -0
- package/cypress/e2e/2-advanced-examples/waiting.cy.js +30 -0
- package/cypress/e2e/2-advanced-examples/window.cy.js +22 -0
- package/cypress/fixtures/example.json +5 -0
- package/cypress/support/commands.js +25 -0
- package/cypress/support/e2e.js +20 -0
- package/cypress.config.js +9 -0
- package/index.html +178 -0
- package/index.js.example +50 -0
- package/package.json +29 -0
- package/samples/react/README.md +70 -0
- package/samples/react/build/asset-manifest.json +16 -0
- package/samples/react/build/favicon.ico +0 -0
- package/samples/react/build/index.html +1 -0
- package/samples/react/build/logo192.png +0 -0
- package/samples/react/build/logo512.png +0 -0
- package/samples/react/build/manifest.json +25 -0
- package/samples/react/build/robots.txt +3 -0
- package/samples/react/build/static/css/main.073c9b0a.css +2 -0
- package/samples/react/build/static/css/main.073c9b0a.css.map +1 -0
- package/samples/react/build/static/js/787.b83ed06f.chunk.js +2 -0
- package/samples/react/build/static/js/787.b83ed06f.chunk.js.map +1 -0
- package/samples/react/build/static/js/main.0a848807.js +3 -0
- package/samples/react/build/static/js/main.0a848807.js.LICENSE.txt +39 -0
- package/samples/react/build/static/js/main.0a848807.js.map +1 -0
- package/samples/react/build/static/media/sdk-icons.b491623214b2af4cccdb.png +0 -0
- package/samples/react/package-lock.json +28973 -0
- package/samples/react/package.json +44 -0
- package/samples/react/public/favicon.ico +0 -0
- package/samples/react/public/index.html +43 -0
- package/samples/react/public/logo192.png +0 -0
- package/samples/react/public/logo512.png +0 -0
- package/samples/react/public/manifest.json +25 -0
- package/samples/react/public/robots.txt +3 -0
- package/samples/react/src/App.css +38 -0
- package/samples/react/src/App.js +22 -0
- package/samples/react/src/App.test.js +8 -0
- package/samples/react/src/assets/img/sdk-icons.png +0 -0
- package/samples/react/src/components/Cart.js +29 -0
- package/samples/react/src/components/ProductCard.js +27 -0
- package/samples/react/src/context/CartContext.js +116 -0
- package/samples/react/src/index.css +13 -0
- package/samples/react/src/index.js +17 -0
- package/samples/react/src/logo.svg +1 -0
- package/samples/react/src/reportWebVitals.js +13 -0
- package/samples/react/src/screens/Checkout.js +82 -0
- package/samples/react/src/screens/Store.js +21 -0
- package/samples/react/src/setupTests.js +5 -0
- package/samples/react/src/storeProducts.js +30 -0
- package/src/classes/3dsHandler.js +203 -0
- package/src/classes/checkout.js +125 -0
- package/src/classes/inlineCheckout.js +349 -0
- package/src/data/api.js +109 -0
- package/src/helpers/skyflow.js +139 -0
- package/src/helpers/styles.js +61 -0
- package/src/helpers/template.js +112 -0
- package/src/helpers/utils.js +68 -0
- package/src/index-dev.js +129 -0
- package/src/index.html +58 -0
- package/src/index.js +7 -0
- package/success.html +22 -0
- package/v1/bundle.min.js +18 -0
- package/webpack.config.js +66 -0
package/index.html
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<style>
|
|
8
|
+
#checkout-container {
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
}
|
|
12
|
+
#pay-button {
|
|
13
|
+
padding: 10px 20px;
|
|
14
|
+
margin-top: 30px;
|
|
15
|
+
background-color: #4a90e2;
|
|
16
|
+
color: white;
|
|
17
|
+
border: none;
|
|
18
|
+
border-radius: 5px;
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
transition: background-color 0.3s;
|
|
22
|
+
}
|
|
23
|
+
#payButton:hover {
|
|
24
|
+
background-color: #357abd;
|
|
25
|
+
}
|
|
26
|
+
.cart-details {
|
|
27
|
+
font-size: 3rem;
|
|
28
|
+
font-weight: bold;
|
|
29
|
+
padding: 2rem;
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
}
|
|
33
|
+
.button-container {
|
|
34
|
+
width: 100%;
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
39
|
+
</head>
|
|
40
|
+
|
|
41
|
+
<body>
|
|
42
|
+
<div class="checkout-container">
|
|
43
|
+
<div class="cart-details">
|
|
44
|
+
<span>Total </span>
|
|
45
|
+
<div id="cart-total">$100</div>
|
|
46
|
+
</div>
|
|
47
|
+
<form id="payment-form">
|
|
48
|
+
<div id="tonder-checkout"></div>
|
|
49
|
+
</form>
|
|
50
|
+
<div class="button-container">
|
|
51
|
+
<button id="pay-button">Pagar</button>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</body>
|
|
55
|
+
<script src="https://js.skyflow.com/v1/index.js"></script>
|
|
56
|
+
<script src="https://openpay.s3.amazonaws.com/openpay.v1.min.js"></script>
|
|
57
|
+
<script src="https://openpay.s3.amazonaws.com/openpay-data.v1.min.js"></script>
|
|
58
|
+
<script src="./v1/bundle.min.js"></script>
|
|
59
|
+
<script>
|
|
60
|
+
const customStyles = {
|
|
61
|
+
inputStyles: {
|
|
62
|
+
base: {
|
|
63
|
+
border: "2px dashed #4a90e2",
|
|
64
|
+
padding: "12px 8px",
|
|
65
|
+
borderRadius: "8px",
|
|
66
|
+
color: "#333333",
|
|
67
|
+
backgroundColor: "#f0f0f0",
|
|
68
|
+
fontFamily: '"Arial", sans-serif',
|
|
69
|
+
fontSize: '14px',
|
|
70
|
+
'&::placeholder': {
|
|
71
|
+
color: "#888888",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
cardIcon: {
|
|
75
|
+
position: 'absolute',
|
|
76
|
+
left: '6px',
|
|
77
|
+
bottom: 'calc(50% - 12px)',
|
|
78
|
+
},
|
|
79
|
+
complete: {
|
|
80
|
+
color: "#4caf50",
|
|
81
|
+
},
|
|
82
|
+
empty: {},
|
|
83
|
+
focus: {},
|
|
84
|
+
invalid: {
|
|
85
|
+
border: "1px solid #f44336",
|
|
86
|
+
},
|
|
87
|
+
global: {
|
|
88
|
+
'@import': 'url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap")',
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
labelStyles: {
|
|
92
|
+
base: {
|
|
93
|
+
fontSize: '14px',
|
|
94
|
+
fontWeight: 'bold',
|
|
95
|
+
fontFamily: '"Inter", sans-serif',
|
|
96
|
+
color: "#4a90e2",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
errorTextStyles: {
|
|
100
|
+
base: {
|
|
101
|
+
fontSize: '12px',
|
|
102
|
+
fontWeight: '500',
|
|
103
|
+
color: "#e74c3c",
|
|
104
|
+
fontFamily: '"Inter", sans-serif',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
labels: {
|
|
108
|
+
nameLabel: 'Nombre de la tarjeta',
|
|
109
|
+
cardLabel: 'Número de Tarjeta Personalizado',
|
|
110
|
+
cvvLabel: 'Código de Seguridad',
|
|
111
|
+
expiryMonthLabel: 'Mes de Expiración',
|
|
112
|
+
expiryYearLabel: 'Año de Expiración'
|
|
113
|
+
},
|
|
114
|
+
placeholders: {
|
|
115
|
+
cardPlaceholder: '0000 0000 0000 0000',
|
|
116
|
+
cvvPlaceholder: '123',
|
|
117
|
+
expiryMonthPlaceholder: 'MM',
|
|
118
|
+
expiryYearPlaceholder: 'AA'
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const checkoutData = {
|
|
123
|
+
customer: {
|
|
124
|
+
firstName: "Adrian",
|
|
125
|
+
lastName: "Martinez",
|
|
126
|
+
country: "Mexico",
|
|
127
|
+
address: "Pinos 507, Col El Tecuan",
|
|
128
|
+
city: "Durango",
|
|
129
|
+
state: "Durango",
|
|
130
|
+
postCode: "34105",
|
|
131
|
+
email: "adrian@email.com",
|
|
132
|
+
phone: "8161234567",
|
|
133
|
+
},
|
|
134
|
+
currency: 'mxn',
|
|
135
|
+
cart: {
|
|
136
|
+
total: 399,
|
|
137
|
+
items: [
|
|
138
|
+
{
|
|
139
|
+
description: "Black T-Shirt",
|
|
140
|
+
quantity: 1,
|
|
141
|
+
price_unit: 1,
|
|
142
|
+
discount: 0,
|
|
143
|
+
taxes: 0,
|
|
144
|
+
product_reference: 1,
|
|
145
|
+
name: "T-Shirt",
|
|
146
|
+
amount_total: 399,
|
|
147
|
+
},
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const apiKey = "00d17d61e9240c6e0611fbdb1558e636ed6389db";
|
|
153
|
+
const returnUrl = "http://web-sdk.tonderdemo.website/"
|
|
154
|
+
const inlineCheckout = new TonderSdk.InlineCheckout({
|
|
155
|
+
apiKey,
|
|
156
|
+
returnUrl,
|
|
157
|
+
styles: customStyles
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
inlineCheckout.injectCheckout();
|
|
161
|
+
|
|
162
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
163
|
+
const payButton = document.getElementById('pay-button');
|
|
164
|
+
payButton.addEventListener('click', async function() {
|
|
165
|
+
try {
|
|
166
|
+
payButton.textContent = 'Procesando...';
|
|
167
|
+
const response = await inlineCheckout.payment(checkoutData);
|
|
168
|
+
console.log(response)
|
|
169
|
+
alert('Pago realizado con éxito');
|
|
170
|
+
} catch (error) {
|
|
171
|
+
alert('Error al realizar el pago')
|
|
172
|
+
} finally {
|
|
173
|
+
payButton.textContent = 'Pagar';
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
</script>
|
|
178
|
+
</html>
|
package/index.js.example
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Checkout } from './classes/checkout'
|
|
2
|
+
export {
|
|
3
|
+
Checkout,
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const config = {
|
|
7
|
+
url: "http://localhost:8081/#/",
|
|
8
|
+
apiKey: "e0f89d5328398b93634f56ba06c9474ec9388d5e",
|
|
9
|
+
type: "payment",
|
|
10
|
+
backgroundColor: "#F34616",
|
|
11
|
+
color: "#F3F7F6"
|
|
12
|
+
}
|
|
13
|
+
const tonderCheckout = new Checkout(config)
|
|
14
|
+
const params = {
|
|
15
|
+
shippingCost: "129.99",
|
|
16
|
+
email: "fuentesc91@gmail.com"
|
|
17
|
+
}
|
|
18
|
+
tonderCheckout.setOrder(params)
|
|
19
|
+
|
|
20
|
+
let products = {products: [
|
|
21
|
+
{
|
|
22
|
+
name: 'first product',
|
|
23
|
+
price_unit: 120.99,
|
|
24
|
+
quantity: 1
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'second product',
|
|
28
|
+
price_unit: 12.99,
|
|
29
|
+
}
|
|
30
|
+
]}
|
|
31
|
+
|
|
32
|
+
tonderCheckout.setOrder(products)
|
|
33
|
+
|
|
34
|
+
products = {products: [
|
|
35
|
+
{
|
|
36
|
+
name: 'first product',
|
|
37
|
+
price_unit: 120.99,
|
|
38
|
+
quantity: 3
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'second product',
|
|
42
|
+
price_unit: 12.99,
|
|
43
|
+
}
|
|
44
|
+
]}
|
|
45
|
+
|
|
46
|
+
tonderCheckout.setOrder(products)
|
|
47
|
+
|
|
48
|
+
console.log(tonderCheckout.getUrlParams())
|
|
49
|
+
|
|
50
|
+
tonderCheckout.mountButton({ buttonText: 'Proceder al pago' })
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tonder-web-sdk",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "tonder sdk for integrations",
|
|
5
|
+
"main": "src/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "webpack-dev-server",
|
|
8
|
+
"build": "webpack --config webpack.config.js --mode production"
|
|
9
|
+
},
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"crypto-js": "^4.1.1",
|
|
14
|
+
"dotenv": "^16.3.1"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@babel/core": "^7.20.12",
|
|
18
|
+
"@babel/preset-env": "^7.20.2",
|
|
19
|
+
"babel-loader": "^9.1.2",
|
|
20
|
+
"css-loader": "^6.7.3",
|
|
21
|
+
"cypress": "^13.6.2",
|
|
22
|
+
"html-webpack-plugin": "^5.5.3",
|
|
23
|
+
"style-loader": "^3.3.1",
|
|
24
|
+
"terser-webpack-plugin": "^5.3.10",
|
|
25
|
+
"webpack": "^5.75.0",
|
|
26
|
+
"webpack-cli": "^5.0.1",
|
|
27
|
+
"webpack-dev-server": "^4.11.1"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Getting Started with Create React App
|
|
2
|
+
|
|
3
|
+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
|
4
|
+
|
|
5
|
+
## Available Scripts
|
|
6
|
+
|
|
7
|
+
In the project directory, you can run:
|
|
8
|
+
|
|
9
|
+
### `npm start`
|
|
10
|
+
|
|
11
|
+
Runs the app in the development mode.\
|
|
12
|
+
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
|
|
13
|
+
|
|
14
|
+
The page will reload when you make changes.\
|
|
15
|
+
You may also see any lint errors in the console.
|
|
16
|
+
|
|
17
|
+
### `npm test`
|
|
18
|
+
|
|
19
|
+
Launches the test runner in the interactive watch mode.\
|
|
20
|
+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
|
21
|
+
|
|
22
|
+
### `npm run build`
|
|
23
|
+
|
|
24
|
+
Builds the app for production to the `build` folder.\
|
|
25
|
+
It correctly bundles React in production mode and optimizes the build for the best performance.
|
|
26
|
+
|
|
27
|
+
The build is minified and the filenames include the hashes.\
|
|
28
|
+
Your app is ready to be deployed!
|
|
29
|
+
|
|
30
|
+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
|
31
|
+
|
|
32
|
+
### `npm run eject`
|
|
33
|
+
|
|
34
|
+
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
|
|
35
|
+
|
|
36
|
+
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
|
37
|
+
|
|
38
|
+
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
|
|
39
|
+
|
|
40
|
+
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
|
|
41
|
+
|
|
42
|
+
## Learn More
|
|
43
|
+
|
|
44
|
+
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
|
45
|
+
|
|
46
|
+
To learn React, check out the [React documentation](https://reactjs.org/).
|
|
47
|
+
|
|
48
|
+
### Code Splitting
|
|
49
|
+
|
|
50
|
+
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
|
|
51
|
+
|
|
52
|
+
### Analyzing the Bundle Size
|
|
53
|
+
|
|
54
|
+
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
|
|
55
|
+
|
|
56
|
+
### Making a Progressive Web App
|
|
57
|
+
|
|
58
|
+
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
|
|
59
|
+
|
|
60
|
+
### Advanced Configuration
|
|
61
|
+
|
|
62
|
+
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
|
|
63
|
+
|
|
64
|
+
### Deployment
|
|
65
|
+
|
|
66
|
+
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
|
|
67
|
+
|
|
68
|
+
### `npm run build` fails to minify
|
|
69
|
+
|
|
70
|
+
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": {
|
|
3
|
+
"main.css": "/react-example-use-tonder-sdk/static/css/main.073c9b0a.css",
|
|
4
|
+
"main.js": "/react-example-use-tonder-sdk/static/js/main.0a848807.js",
|
|
5
|
+
"static/js/787.b83ed06f.chunk.js": "/react-example-use-tonder-sdk/static/js/787.b83ed06f.chunk.js",
|
|
6
|
+
"static/media/sdk-icons.png": "/react-example-use-tonder-sdk/static/media/sdk-icons.b491623214b2af4cccdb.png",
|
|
7
|
+
"index.html": "/react-example-use-tonder-sdk/index.html",
|
|
8
|
+
"main.073c9b0a.css.map": "/react-example-use-tonder-sdk/static/css/main.073c9b0a.css.map",
|
|
9
|
+
"main.0a848807.js.map": "/react-example-use-tonder-sdk/static/js/main.0a848807.js.map",
|
|
10
|
+
"787.b83ed06f.chunk.js.map": "/react-example-use-tonder-sdk/static/js/787.b83ed06f.chunk.js.map"
|
|
11
|
+
},
|
|
12
|
+
"entrypoints": [
|
|
13
|
+
"static/css/main.073c9b0a.css",
|
|
14
|
+
"static/js/main.0a848807.js"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/react-example-use-tonder-sdk/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/react-example-use-tonder-sdk/logo192.png"/><link rel="manifest" href="/react-example-use-tonder-sdk/manifest.json"/><title>React App</title><script defer="defer" src="/react-example-use-tonder-sdk/static/js/main.0a848807.js"></script><link href="/react-example-use-tonder-sdk/static/css/main.073c9b0a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="inlinesdk.js"></script><script>const form=document.querySelector("#payment-form"),apiKey="00d17d61e9240c6e0611fbdb1558e636ed6389db",totalElement=document.querySelector("#cart-total"),inlineCheckout=new InlineCheckout({form:form,apiKey:apiKey,totalElementId:"cart-total"});inlineCheckout.injectCheckout()</script></body></html>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"short_name": "React App",
|
|
3
|
+
"name": "Create React App Sample",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "favicon.ico",
|
|
7
|
+
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
+
"type": "image/x-icon"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "logo192.png",
|
|
12
|
+
"type": "image/png",
|
|
13
|
+
"sizes": "192x192"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "logo512.png",
|
|
17
|
+
"type": "image/png",
|
|
18
|
+
"sizes": "512x512"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"start_url": ".",
|
|
22
|
+
"display": "standalone",
|
|
23
|
+
"theme_color": "#000000",
|
|
24
|
+
"background_color": "#ffffff"
|
|
25
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion:no-preference){.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite}}.App-header{align-items:center;background-color:#282c34;color:#fff;display:flex;flex-direction:column;font-size:calc(10px + 2vmin);justify-content:center;min-height:100vh}.App-link{color:#61dafb}@-webkit-keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
|
|
2
|
+
/*# sourceMappingURL=main.073c9b0a.css.map*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/css/main.073c9b0a.css","mappings":"AAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAEY,CAHZ,QAMF,CAEA,KACE,uEAEF,CCZA,KACE,iBACF,CAEA,UACE,aAAc,CACd,mBACF,CAEA,8CACE,UACE,mDAA4C,CAA5C,2CACF,CACF,CAEA,YAKE,kBAAmB,CAJnB,wBAAyB,CAOzB,UAAY,CALZ,YAAa,CACb,qBAAsB,CAGtB,4BAA6B,CAD7B,sBAAuB,CAJvB,gBAOF,CAEA,UACE,aACF,CAEA,iCACE,GACE,8BAAuB,CAAvB,sBACF,CACA,GACE,+BAAyB,CAAzB,uBACF,CACF,CAPA,yBACE,GACE,8BAAuB,CAAvB,sBACF,CACA,GACE,+BAAyB,CAAzB,uBACF,CACF","sources":["index.css","App.css"],"sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n",".App {\n text-align: center;\n}\n\n.App-logo {\n height: 40vmin;\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .App-logo {\n animation: App-logo-spin infinite 20s linear;\n }\n}\n\n.App-header {\n background-color: #282c34;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: calc(10px + 2vmin);\n color: white;\n}\n\n.App-link {\n color: #61dafb;\n}\n\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunksdk_test=self.webpackChunksdk_test||[]).push([[787],{787:function(e,t,n){n.r(t),n.d(t,{getCLS:function(){return y},getFCP:function(){return g},getFID:function(){return F},getLCP:function(){return P},getTTFB:function(){return D}});var i,r,a,o,u=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},f=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},s=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},m=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},v=-1,d=function(){return"hidden"===document.visibilityState?0:1/0},p=function(){f((function(e){var t=e.timeStamp;v=t}),!0)},l=function(){return v<0&&(v=d(),p(),s((function(){setTimeout((function(){v=d(),p()}),0)}))),{get firstHiddenTime(){return v}}},g=function(e,t){var n,i=l(),r=u("FCP"),a=function(e){"first-contentful-paint"===e.name&&(f&&f.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=e.startTime,r.entries.push(e),n(!0)))},o=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],f=o?null:c("paint",a);(o||f)&&(n=m(e,r,t),o&&a(o),s((function(i){r=u("FCP"),n=m(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,n(!0)}))}))})))},h=!1,T=-1,y=function(e,t){h||(g((function(e){T=e.value})),h=!0);var n,i=function(t){T>-1&&e(t)},r=u("CLS",0),a=0,o=[],v=function(e){if(!e.hadRecentInput){var t=o[0],i=o[o.length-1];a&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e]),a>r.value&&(r.value=a,r.entries=o,n())}},d=c("layout-shift",v);d&&(n=m(i,r,t),f((function(){d.takeRecords().map(v),n(!0)})),s((function(){a=0,T=-1,r=u("CLS",0),n=m(i,r,t)})))},E={passive:!0,capture:!0},w=new Date,L=function(e,t){i||(i=t,r=e,a=new Date,k(removeEventListener),S())},S=function(){if(r>=0&&r<a-w){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+r};o.forEach((function(t){t(e)})),o=[]}},b=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){L(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,E),removeEventListener("pointercancel",i,E)};addEventListener("pointerup",n,E),addEventListener("pointercancel",i,E)}(t,e):L(t,e)}},k=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,b,E)}))},F=function(e,t){var n,a=l(),v=u("FID"),d=function(e){e.startTime<a.firstHiddenTime&&(v.value=e.processingStart-e.startTime,v.entries.push(e),n(!0))},p=c("first-input",d);n=m(e,v,t),p&&f((function(){p.takeRecords().map(d),p.disconnect()}),!0),p&&s((function(){var a;v=u("FID"),n=m(e,v,t),o=[],r=-1,i=null,k(addEventListener),a=d,o.push(a),S()}))},C={},P=function(e,t){var n,i=l(),r=u("LCP"),a=function(e){var t=e.startTime;t<i.firstHiddenTime&&(r.value=t,r.entries.push(e),n())},o=c("largest-contentful-paint",a);if(o){n=m(e,r,t);var v=function(){C[r.id]||(o.takeRecords().map(a),o.disconnect(),C[r.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,v,{once:!0,capture:!0})})),f(v,!0),s((function(i){r=u("LCP"),n=m(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,C[r.id]=!0,n(!0)}))}))}))}},D=function(e){var t,n=u("TTFB");t=function(){try{var t=performance.getEntriesByType("navigation")[0]||function(){var e=performance.timing,t={entryType:"navigation",startTime:0};for(var n in e)"navigationStart"!==n&&"toJSON"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();if(n.value=n.delta=t.responseStart,n.value<0||n.value>performance.now())return;n.entries=[t],e(n)}catch(e){}},"complete"===document.readyState?setTimeout(t,0):addEventListener("load",(function(){return setTimeout(t,0)}))}}}]);
|
|
2
|
+
//# sourceMappingURL=787.b83ed06f.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/js/787.b83ed06f.chunk.js","mappings":"qQAAA,IAAIA,EAAEC,EAAEC,EAAEC,EAAEC,EAAE,SAASJ,EAAEC,GAAG,MAAM,CAACI,KAAKL,EAAEM,WAAM,IAASL,GAAG,EAAEA,EAAEM,MAAM,EAAEC,QAAQ,GAAGC,GAAG,MAAMC,OAAOC,KAAKC,MAAM,KAAKF,OAAOG,KAAKC,MAAM,cAAcD,KAAKE,UAAU,MAAM,EAAEC,EAAE,SAAShB,EAAEC,GAAG,IAAI,GAAGgB,oBAAoBC,oBAAoBC,SAASnB,GAAG,CAAC,GAAG,gBAAgBA,KAAK,2BAA2BoB,MAAM,OAAO,IAAIlB,EAAE,IAAIe,qBAAqB,SAASjB,GAAG,OAAOA,EAAEqB,aAAaC,IAAIrB,EAAE,IAAI,OAAOC,EAAEqB,QAAQ,CAACC,KAAKxB,EAAEyB,UAAS,IAAKvB,CAAC,CAAW,CAAT,MAAMF,GAAG,CAAC,EAAE0B,EAAE,SAAS1B,EAAEC,GAAG,IAAIC,EAAE,SAASA,EAAEC,GAAG,aAAaA,EAAEqB,MAAM,WAAWG,SAASC,kBAAkB5B,EAAEG,GAAGF,IAAI4B,oBAAoB,mBAAmB3B,GAAE,GAAI2B,oBAAoB,WAAW3B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IAAI,IAAIA,EAAE6C,YAAY2B,iBAAiB,cAAc,IAAI,WAAW,IAAIzE,EAAE8C,YAAY4B,OAAOzE,EAAE,CAAC6D,UAAU,aAAanB,UAAU,GAAG,IAAI,IAAIzC,KAAKF,EAAE,oBAAoBE,GAAG,WAAWA,IAAID,EAAEC,GAAGW,KAAK8D,IAAI3E,EAAEE,GAAGF,EAAE4E,gBAAgB,IAAI,OAAO3E,CAAC,CAAjL,GAAqL,GAAGC,EAAEI,MAAMJ,EAAEK,MAAMN,EAAE4E,cAAc3E,EAAEI,MAAM,GAAGJ,EAAEI,MAAMwC,YAAYlC,MAAM,OAAOV,EAAEM,QAAQ,CAACP,GAAGD,EAAEE,EAAY,CAAT,MAAMF,GAAG,CAAC,EAAE,aAAa2B,SAASmD,WAAWvC,WAAWtC,EAAE,GAAG6B,iBAAiB,QAAQ,WAAW,OAAOS,WAAWtC,EAAE,EAAE,GAAG,C","sources":["../node_modules/web-vitals/dist/web-vitals.js"],"sourcesContent":["var e,t,n,i,r=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:\"v2-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12)}},a=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if(\"first-input\"===e&&!(\"PerformanceEventTiming\"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},o=function(e,t){var n=function n(i){\"pagehide\"!==i.type&&\"hidden\"!==document.visibilityState||(e(i),t&&(removeEventListener(\"visibilitychange\",n,!0),removeEventListener(\"pagehide\",n,!0)))};addEventListener(\"visibilitychange\",n,!0),addEventListener(\"pagehide\",n,!0)},u=function(e){addEventListener(\"pageshow\",(function(t){t.persisted&&e(t)}),!0)},c=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},f=-1,s=function(){return\"hidden\"===document.visibilityState?0:1/0},m=function(){o((function(e){var t=e.timeStamp;f=t}),!0)},v=function(){return f<0&&(f=s(),m(),u((function(){setTimeout((function(){f=s(),m()}),0)}))),{get firstHiddenTime(){return f}}},d=function(e,t){var n,i=v(),o=r(\"FCP\"),f=function(e){\"first-contentful-paint\"===e.name&&(m&&m.disconnect(),e.startTime<i.firstHiddenTime&&(o.value=e.startTime,o.entries.push(e),n(!0)))},s=window.performance&&performance.getEntriesByName&&performance.getEntriesByName(\"first-contentful-paint\")[0],m=s?null:a(\"paint\",f);(s||m)&&(n=c(e,o,t),s&&f(s),u((function(i){o=r(\"FCP\"),n=c(e,o,t),requestAnimationFrame((function(){requestAnimationFrame((function(){o.value=performance.now()-i.timeStamp,n(!0)}))}))})))},p=!1,l=-1,h=function(e,t){p||(d((function(e){l=e.value})),p=!0);var n,i=function(t){l>-1&&e(t)},f=r(\"CLS\",0),s=0,m=[],v=function(e){if(!e.hadRecentInput){var t=m[0],i=m[m.length-1];s&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,m.push(e)):(s=e.value,m=[e]),s>f.value&&(f.value=s,f.entries=m,n())}},h=a(\"layout-shift\",v);h&&(n=c(i,f,t),o((function(){h.takeRecords().map(v),n(!0)})),u((function(){s=0,l=-1,f=r(\"CLS\",0),n=c(i,f,t)})))},T={passive:!0,capture:!0},y=new Date,g=function(i,r){e||(e=r,t=i,n=new Date,w(removeEventListener),E())},E=function(){if(t>=0&&t<n-y){var r={entryType:\"first-input\",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};i.forEach((function(e){e(r)})),i=[]}},S=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,t){var n=function(){g(e,t),r()},i=function(){r()},r=function(){removeEventListener(\"pointerup\",n,T),removeEventListener(\"pointercancel\",i,T)};addEventListener(\"pointerup\",n,T),addEventListener(\"pointercancel\",i,T)}(t,e):g(t,e)}},w=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(t){return e(t,S,T)}))},L=function(n,f){var s,m=v(),d=r(\"FID\"),p=function(e){e.startTime<m.firstHiddenTime&&(d.value=e.processingStart-e.startTime,d.entries.push(e),s(!0))},l=a(\"first-input\",p);s=c(n,d,f),l&&o((function(){l.takeRecords().map(p),l.disconnect()}),!0),l&&u((function(){var a;d=r(\"FID\"),s=c(n,d,f),i=[],t=-1,e=null,w(addEventListener),a=p,i.push(a),E()}))},b={},F=function(e,t){var n,i=v(),f=r(\"LCP\"),s=function(e){var t=e.startTime;t<i.firstHiddenTime&&(f.value=t,f.entries.push(e),n())},m=a(\"largest-contentful-paint\",s);if(m){n=c(e,f,t);var d=function(){b[f.id]||(m.takeRecords().map(s),m.disconnect(),b[f.id]=!0,n(!0))};[\"keydown\",\"click\"].forEach((function(e){addEventListener(e,d,{once:!0,capture:!0})})),o(d,!0),u((function(i){f=r(\"LCP\"),n=c(e,f,t),requestAnimationFrame((function(){requestAnimationFrame((function(){f.value=performance.now()-i.timeStamp,b[f.id]=!0,n(!0)}))}))}))}},P=function(e){var t,n=r(\"TTFB\");t=function(){try{var t=performance.getEntriesByType(\"navigation\")[0]||function(){var e=performance.timing,t={entryType:\"navigation\",startTime:0};for(var n in e)\"navigationStart\"!==n&&\"toJSON\"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();if(n.value=n.delta=t.responseStart,n.value<0||n.value>performance.now())return;n.entries=[t],e(n)}catch(e){}},\"complete\"===document.readyState?setTimeout(t,0):addEventListener(\"load\",(function(){return setTimeout(t,0)}))};export{h as getCLS,d as getFCP,L as getFID,F as getLCP,P as getTTFB};\n"],"names":["e","t","n","i","r","name","value","delta","entries","id","concat","Date","now","Math","floor","random","a","PerformanceObserver","supportedEntryTypes","includes","self","getEntries","map","observe","type","buffered","o","document","visibilityState","removeEventListener","addEventListener","u","persisted","c","f","s","m","timeStamp","v","setTimeout","firstHiddenTime","d","disconnect","startTime","push","window","performance","getEntriesByName","requestAnimationFrame","p","l","h","hadRecentInput","length","takeRecords","T","passive","capture","y","g","w","E","entryType","target","cancelable","processingStart","forEach","S","L","b","F","once","P","getEntriesByType","timing","max","navigationStart","responseStart","readyState"],"sourceRoot":""}
|