screenshotone-api-sdk 1.0.2 → 1.0.5

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/dist/main.js ADDED
@@ -0,0 +1,341 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __generator = (this && this.__generator) || function (thisArg, body) {
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
+ function verb(n) { return function (v) { return step([n, v]); }; }
38
+ function step(op) {
39
+ if (f) throw new TypeError("Generator is already executing.");
40
+ while (_) try {
41
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
42
+ if (y = 0, t) op = [op[0] & 2, t.value];
43
+ switch (op[0]) {
44
+ case 0: case 1: t = op; break;
45
+ case 4: _.label++; return { value: op[1], done: false };
46
+ case 5: _.label++; y = op[1]; op = [0]; continue;
47
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
48
+ default:
49
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
50
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
51
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
53
+ if (t[2]) _.ops.pop();
54
+ _.trys.pop(); continue;
55
+ }
56
+ op = body.call(thisArg, _);
57
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
+ }
60
+ };
61
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
62
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
63
+ if (ar || !(i in from)) {
64
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
65
+ ar[i] = from[i];
66
+ }
67
+ }
68
+ return to.concat(ar || Array.prototype.slice.call(from));
69
+ };
70
+ var __importDefault = (this && this.__importDefault) || function (mod) {
71
+ return (mod && mod.__esModule) ? mod : { "default": mod };
72
+ };
73
+ Object.defineProperty(exports, "__esModule", { value: true });
74
+ exports.TakeOptions = exports.Client = void 0;
75
+ var crypto = __importStar(require("crypto"));
76
+ var big_js_1 = __importDefault(require("big.js"));
77
+ var node_fetch_1 = __importDefault(require("node-fetch"));
78
+ /**
79
+ * Represents an API client for the screenshotone.com API.
80
+ */
81
+ var Client = /** @class */ (function () {
82
+ function Client(accessKey, secretKey) {
83
+ this.API_BASE_URL = "https://api.screenshotone.com";
84
+ this.API_TAKE_PATH = "/take";
85
+ this.accessKey = accessKey;
86
+ this.secretKey = secretKey;
87
+ }
88
+ Client.prototype.generateTakeURL = function (options) {
89
+ var query = options.toQuery();
90
+ query.append("access_key", this.accessKey);
91
+ var queryString = query.toString();
92
+ var signature = crypto.createHmac("sha256", this.secretKey)
93
+ .update(queryString, 'utf-8')
94
+ .digest('hex');
95
+ queryString += '&signature=' + signature;
96
+ return "".concat(this.API_BASE_URL).concat(this.API_TAKE_PATH, "?").concat(queryString);
97
+ };
98
+ Client.prototype.take = function (options) {
99
+ return __awaiter(this, void 0, void 0, function () {
100
+ var url, response;
101
+ return __generator(this, function (_a) {
102
+ switch (_a.label) {
103
+ case 0:
104
+ url = this.generateTakeURL(options);
105
+ return [4 /*yield*/, (0, node_fetch_1.default)(url)];
106
+ case 1:
107
+ response = _a.sent();
108
+ if (!response.ok) return [3 /*break*/, 3];
109
+ return [4 /*yield*/, response.blob()];
110
+ case 2: return [2 /*return*/, _a.sent()];
111
+ case 3: throw new Error("failed to take screenshot, response returned ".concat(response.status, " ").concat(response.statusText));
112
+ }
113
+ });
114
+ });
115
+ };
116
+ return Client;
117
+ }());
118
+ exports.Client = Client;
119
+ /**
120
+ * Represents options for taking screenshots.
121
+ */
122
+ var TakeOptions = /** @class */ (function () {
123
+ function TakeOptions(url) {
124
+ var query = new URLSearchParams();
125
+ query.append("url", url);
126
+ this.query = query;
127
+ }
128
+ /**
129
+ * Initializes take screenshot options with provided website URL.
130
+ */
131
+ TakeOptions.url = function (url) {
132
+ return new TakeOptions(url);
133
+ };
134
+ TakeOptions.prototype.put = function (key) {
135
+ var values = [];
136
+ for (var _i = 1; _i < arguments.length; _i++) {
137
+ values[_i - 1] = arguments[_i];
138
+ }
139
+ for (var _a = 0, values_1 = values; _a < values_1.length; _a++) {
140
+ var value = values_1[_a];
141
+ this.query.append(key, value);
142
+ }
143
+ };
144
+ ;
145
+ /**
146
+ * Renders the full page.
147
+ */
148
+ TakeOptions.prototype.fullPage = function (fullPage) {
149
+ this.put("full_page", fullPage ? "true" : "false");
150
+ return this;
151
+ };
152
+ /**
153
+ * Sets response format, one of: "png", "jpeg", "webp" or "jpg".
154
+ */
155
+ TakeOptions.prototype.format = function (format) {
156
+ this.put("format", format);
157
+ return this;
158
+ };
159
+ /**
160
+ * Renders image with the specified quality. Available for the next formats: "jpeg" ("jpg"), "webp".
161
+ */
162
+ TakeOptions.prototype.imageQuality = function (imageQuality) {
163
+ this.put("image_quality", imageQuality.toString());
164
+ return this;
165
+ };
166
+ /**
167
+ * Renders a transparent background for the image. Works only if the site has not defined background color.
168
+ * Available for the following response formats: "png", "webp".
169
+ */
170
+ TakeOptions.prototype.omitBackground = function (omitBackground) {
171
+ this.put("omit_background", omitBackground ? "true" : "false");
172
+ return this;
173
+ };
174
+ /**
175
+ * Sets the width of the browser viewport (pixels).
176
+ */
177
+ TakeOptions.prototype.viewportWidth = function (viewportWidth) {
178
+ this.put("viewport_width", viewportWidth.toString());
179
+ return this;
180
+ };
181
+ /**
182
+ * Sets the height of the browser viewport (pixels).
183
+ */
184
+ TakeOptions.prototype.viewportHeight = function (viewportHeight) {
185
+ this.put("viewport_height", viewportHeight.toString());
186
+ return this;
187
+ };
188
+ /**
189
+ * Sets the device scale factor. Acceptable value is one of: 1, 2 or 3.
190
+ */
191
+ TakeOptions.prototype.deviceScaleFactor = function (deviceScaleFactor) {
192
+ this.put("device_scale_factor", deviceScaleFactor.toString());
193
+ return this;
194
+ };
195
+ /**
196
+ * Sets geolocation latitude for the request.
197
+ * Both latitude and longitude are required if one of them is set.
198
+ */
199
+ TakeOptions.prototype.geolocationLatitude = function (latitude) {
200
+ this.put("geolocation_latitude", new big_js_1.default(latitude).toFixed(20).replace(/0+$/, ""));
201
+ return this;
202
+ };
203
+ /**
204
+ * Sets geolocation longitude for the request. Both latitude and longitude are required if one of them is set.
205
+ */
206
+ TakeOptions.prototype.geolocationLongitude = function (longitude) {
207
+ this.put("geolocation_longitude", new big_js_1.default(longitude).toFixed(20).replace(/0+$/, ""));
208
+ return this;
209
+ };
210
+ /**
211
+ * Sets the geolocation accuracy in meters.
212
+ */
213
+ TakeOptions.prototype.geolocationAccuracy = function (accuracy) {
214
+ this.put("geolocation_accuracy", accuracy.toString());
215
+ return this;
216
+ };
217
+ /**
218
+ * Blocks ads.
219
+ */
220
+ TakeOptions.prototype.blockAds = function (blockAds) {
221
+ this.put("block_ads", blockAds ? "true" : "false");
222
+ return this;
223
+ };
224
+ /**
225
+ * Blocks trackers.
226
+ */
227
+ TakeOptions.prototype.blockTrackers = function (blockTrackers) {
228
+ this.put("block_trackers", blockTrackers ? "true" : "false");
229
+ return this;
230
+ };
231
+ /**
232
+ * Blocks requests by specifying URL, domain, or even a simple pattern.
233
+ */
234
+ TakeOptions.prototype.blockRequests = function () {
235
+ var blockRequests = [];
236
+ for (var _i = 0; _i < arguments.length; _i++) {
237
+ blockRequests[_i] = arguments[_i];
238
+ }
239
+ this.put.apply(this, __spreadArray(["block_requests"], blockRequests, false));
240
+ return this;
241
+ };
242
+ /**
243
+ * Blocks loading resources by type. Available resource types are: "document", "stylesheet", "image", "media",
244
+ * "font", "script", "texttrack", "xhr", "fetch", "eventsource", "websocket", "manifest", "other".
245
+ */
246
+ TakeOptions.prototype.blockResources = function () {
247
+ var blockResources = [];
248
+ for (var _i = 0; _i < arguments.length; _i++) {
249
+ blockResources[_i] = arguments[_i];
250
+ }
251
+ this.put.apply(this, __spreadArray(["block_resources"], blockResources, false));
252
+ return this;
253
+ };
254
+ /**
255
+ * Enables caching.
256
+ */
257
+ TakeOptions.prototype.cache = function (cache) {
258
+ this.put("cache", cache ? "true" : "false");
259
+ return this;
260
+ };
261
+ /**
262
+ * Sets cache TTL.
263
+ */
264
+ TakeOptions.prototype.cacheTtl = function (cacheTTL) {
265
+ this.put("cache_ttl", cacheTTL.toString());
266
+ return this;
267
+ };
268
+ /**
269
+ * Sets cache key.
270
+ */
271
+ TakeOptions.prototype.cacheKey = function (cacheKey) {
272
+ this.put("cache_key", cacheKey);
273
+ return this;
274
+ };
275
+ /**
276
+ * Sets a user agent for the request.
277
+ */
278
+ TakeOptions.prototype.userAgent = function (userAgent) {
279
+ this.put("user_agent", userAgent);
280
+ return this;
281
+ };
282
+ /**
283
+ * Sets an authorization header for the request.
284
+ */
285
+ TakeOptions.prototype.authorization = function (authorization) {
286
+ this.put("authorization", authorization);
287
+ return this;
288
+ };
289
+ /**
290
+ * Set cookies for the request.
291
+ */
292
+ TakeOptions.prototype.cookies = function () {
293
+ var cookies = [];
294
+ for (var _i = 0; _i < arguments.length; _i++) {
295
+ cookies[_i] = arguments[_i];
296
+ }
297
+ this.put.apply(this, __spreadArray(["cookies"], cookies, false));
298
+ return this;
299
+ };
300
+ /**
301
+ * Sets extra headers for the request.
302
+ */
303
+ TakeOptions.prototype.headers = function () {
304
+ var headers = [];
305
+ for (var _i = 0; _i < arguments.length; _i++) {
306
+ headers[_i] = arguments[_i];
307
+ }
308
+ this.put.apply(this, __spreadArray(["headers"], headers, false));
309
+ return this;
310
+ };
311
+ /**
312
+ * TimeZone sets time zone for the request.
313
+ * Available time zones are: "America/Santiago", "Asia/Shanghai", "Europe/Berlin", "America/Guayaquil",
314
+ * "Europe/Madrid", "Pacific/Majuro", "Asia/Kuala_Lumpur", "Pacific/Auckland", "Europe/Lisbon", "Europe/Kiev",
315
+ * "Asia/Tashkent", "Europe/London".
316
+ */
317
+ TakeOptions.prototype.timeZone = function (timeZone) {
318
+ this.put("time_zone", timeZone);
319
+ return this;
320
+ };
321
+ /**
322
+ * Sets delay.
323
+ */
324
+ TakeOptions.prototype.delay = function (delay) {
325
+ this.put("delay", delay.toString());
326
+ return this;
327
+ };
328
+ /**
329
+ * Sets timeout.
330
+ */
331
+ TakeOptions.prototype.timeout = function (timeout) {
332
+ this.put("timeout", timeout.toString());
333
+ return this;
334
+ };
335
+ TakeOptions.prototype.toQuery = function () {
336
+ return new URLSearchParams(this.query.toString());
337
+ };
338
+ return TakeOptions;
339
+ }());
340
+ exports.TakeOptions = TakeOptions;
341
+ //# sourceMappingURL=main.js.map
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "screenshotone-api-sdk",
3
- "version": "1.0.2",
3
+ "homepage": "https://screenshotone.com",
4
+ "version": "1.0.5",
4
5
  "description": "Use ScreenshotOne.com API to generate screenshots of any website.",
5
6
  "repository": {
6
7
  "type": "git",
@@ -21,12 +22,12 @@
21
22
  "render"
22
23
  ],
23
24
  "author": "Dmytro Krasun",
24
- "license": "MIT",
25
+ "license": "MIT",
25
26
  "bugs": {
27
+ "email": "support@screenshotone.com",
26
28
  "url": "https://github.com/screenshotone/tssdk/issues"
27
29
  },
28
- "type": "module",
29
- "main": "./lib/main.js",
30
+ "main": "dist/main.js",
30
31
  "types": "dist/index.d.ts",
31
32
  "devDependencies": {
32
33
  "typescript": "^4.7.3",
@@ -38,7 +39,8 @@
38
39
  "node-fetch": "^3.2.5"
39
40
  },
40
41
  "scripts": {
41
- "prepublish": "tsc --build",
42
+ "prepublish": "npm run build",
43
+ "prepare" : "npm run build",
42
44
  "build": "tsc --build"
43
45
  }
44
46
  }
File without changes
package/tsconfig.json CHANGED
@@ -1,14 +1,18 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "module": "es2022",
4
- "target": "es2017",
3
+ "target": "es5",
4
+ "module": "commonjs",
5
+ "outDir": "./dist",
6
+ "strict": true,
5
7
  "noImplicitAny": true,
6
- "removeComments": true,
8
+ "removeComments": false,
7
9
  "preserveConstEnums": true,
8
10
  "sourceMap": true,
9
11
  "moduleResolution": "node",
10
12
  "declaration": true,
13
+ "esModuleInterop": true
14
+
11
15
  },
12
- "include": ["lib/**/*"],
13
- "exclude": ["node_modules", "**/*.spec.ts"]
16
+ "include": ["src/**/*"],
17
+ "exclude": ["node_modules"]
14
18
  }
package/lib/main.d.ts DELETED
@@ -1,40 +0,0 @@
1
- export declare class Client {
2
- private readonly API_BASE_URL;
3
- private readonly API_TAKE_PATH;
4
- private readonly accessKey;
5
- private readonly secretKey;
6
- constructor(accessKey: string, secretKey: string);
7
- generateTakeURL(options: TakeOptions): string;
8
- take(options: TakeOptions): Promise<Blob>;
9
- }
10
- export declare class TakeOptions {
11
- private readonly query;
12
- private constructor();
13
- static url(url: string): TakeOptions;
14
- private put;
15
- fullPage(fullPage: boolean): TakeOptions;
16
- format(format: string): TakeOptions;
17
- imageQuality(imageQuality: number): TakeOptions;
18
- omitBackground(omitBackground: boolean): TakeOptions;
19
- viewportWidth(viewportWidth: number): TakeOptions;
20
- viewportHeight(viewportHeight: number): TakeOptions;
21
- deviceScaleFactor(deviceScaleFactor: number): TakeOptions;
22
- geolocationLatitude(latitude: number): TakeOptions;
23
- geolocationLongitude(longitude: number): TakeOptions;
24
- geolocationAccuracy(accuracy: number): TakeOptions;
25
- blockAds(blockAds: boolean): TakeOptions;
26
- blockTrackers(blockTrackers: boolean): TakeOptions;
27
- blockRequests(...blockRequests: string[]): TakeOptions;
28
- blockResources(...blockResources: string[]): TakeOptions;
29
- cache(cache: boolean): TakeOptions;
30
- cacheTtl(cacheTTL: number): TakeOptions;
31
- cacheKey(cacheKey: string): TakeOptions;
32
- userAgent(userAgent: string): TakeOptions;
33
- authorization(authorization: string): TakeOptions;
34
- cookies(...cookies: string[]): TakeOptions;
35
- headers(...headers: string[]): this;
36
- timeZone(timeZone: string): TakeOptions;
37
- delay(delay: number): TakeOptions;
38
- timeout(timeout: number): TakeOptions;
39
- toQuery(): URLSearchParams;
40
- }
package/lib/main.js DELETED
@@ -1,145 +0,0 @@
1
- import * as crypto from 'crypto';
2
- import Big from 'big.js';
3
- import fetch from 'node-fetch';
4
- export class Client {
5
- constructor(accessKey, secretKey) {
6
- this.API_BASE_URL = "https://api.screenshotone.com";
7
- this.API_TAKE_PATH = "/take";
8
- this.accessKey = accessKey;
9
- this.secretKey = secretKey;
10
- }
11
- generateTakeURL(options) {
12
- const query = options.toQuery();
13
- query.append("access_key", this.accessKey);
14
- let queryString = query.toString();
15
- const signature = crypto.createHmac("sha256", this.secretKey)
16
- .update(queryString, 'utf-8')
17
- .digest('hex');
18
- queryString += '&signature=' + signature;
19
- return `${this.API_BASE_URL}${this.API_TAKE_PATH}?${queryString}`;
20
- }
21
- async take(options) {
22
- const url = this.generateTakeURL(options);
23
- const response = await fetch(url);
24
- if (response.ok) {
25
- return await response.blob();
26
- }
27
- throw new Error(`failed to take screenshot, response returned ${response.status} ${response.statusText}`);
28
- }
29
- }
30
- export class TakeOptions {
31
- constructor(url) {
32
- const query = new URLSearchParams();
33
- query.append("url", url);
34
- this.query = query;
35
- }
36
- static url(url) {
37
- return new TakeOptions(url);
38
- }
39
- put(key, ...values) {
40
- for (const value of values) {
41
- this.query.append(key, value);
42
- }
43
- }
44
- ;
45
- fullPage(fullPage) {
46
- this.put("full_page", fullPage ? "true" : "false");
47
- return this;
48
- }
49
- format(format) {
50
- this.put("format", format);
51
- return this;
52
- }
53
- imageQuality(imageQuality) {
54
- this.put("image_quality", imageQuality.toString());
55
- return this;
56
- }
57
- omitBackground(omitBackground) {
58
- this.put("omit_background", omitBackground ? "true" : "false");
59
- return this;
60
- }
61
- viewportWidth(viewportWidth) {
62
- this.put("viewport_width", viewportWidth.toString());
63
- return this;
64
- }
65
- viewportHeight(viewportHeight) {
66
- this.put("viewport_height", viewportHeight.toString());
67
- return this;
68
- }
69
- deviceScaleFactor(deviceScaleFactor) {
70
- this.put("device_scale_factor", deviceScaleFactor.toString());
71
- return this;
72
- }
73
- geolocationLatitude(latitude) {
74
- this.put("geolocation_latitude", new Big(latitude).toFixed(20).replace(/0+$/, ""));
75
- return this;
76
- }
77
- geolocationLongitude(longitude) {
78
- this.put("geolocation_longitude", new Big(longitude).toFixed(20).replace(/0+$/, ""));
79
- return this;
80
- }
81
- geolocationAccuracy(accuracy) {
82
- this.put("geolocation_accuracy", accuracy.toString());
83
- return this;
84
- }
85
- blockAds(blockAds) {
86
- this.put("block_ads", blockAds ? "true" : "false");
87
- return this;
88
- }
89
- blockTrackers(blockTrackers) {
90
- this.put("block_trackers", blockTrackers ? "true" : "false");
91
- return this;
92
- }
93
- blockRequests(...blockRequests) {
94
- this.put("block_requests", ...blockRequests);
95
- return this;
96
- }
97
- blockResources(...blockResources) {
98
- this.put("block_resources", ...blockResources);
99
- return this;
100
- }
101
- cache(cache) {
102
- this.put("cache", cache ? "true" : "false");
103
- return this;
104
- }
105
- cacheTtl(cacheTTL) {
106
- this.put("cache_ttl", cacheTTL.toString());
107
- return this;
108
- }
109
- cacheKey(cacheKey) {
110
- this.put("cache_key", cacheKey);
111
- return this;
112
- }
113
- userAgent(userAgent) {
114
- this.put("user_agent", userAgent);
115
- return this;
116
- }
117
- authorization(authorization) {
118
- this.put("authorization", authorization);
119
- return this;
120
- }
121
- cookies(...cookies) {
122
- this.put("cookies", ...cookies);
123
- return this;
124
- }
125
- headers(...headers) {
126
- this.put("headers", ...headers);
127
- return this;
128
- }
129
- timeZone(timeZone) {
130
- this.put("time_zone", timeZone);
131
- return this;
132
- }
133
- delay(delay) {
134
- this.put("delay", delay.toString());
135
- return this;
136
- }
137
- timeout(timeout) {
138
- this.put("timeout", timeout.toString());
139
- return this;
140
- }
141
- toQuery() {
142
- return new URLSearchParams(this.query.toString());
143
- }
144
- }
145
- //# sourceMappingURL=main.js.map
package/lib/main.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,GAAG,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