feat(core): update session, security system and QR exchange
- Removed session creation and Lightning payment logic - Refactored security system: * no more restrictions * all systems enabled on session creation - Improved QR code exchange for mobile devices
This commit is contained in:
7
node_modules/html5-qrcode/es2015/camera/core-impl.d.ts
generated
vendored
Normal file
7
node_modules/html5-qrcode/es2015/camera/core-impl.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Camera, CameraRenderingOptions, RenderedCamera, RenderingCallbacks } from "./core";
|
||||
export declare class CameraImpl implements Camera {
|
||||
private readonly mediaStream;
|
||||
private constructor();
|
||||
render(parentElement: HTMLElement, options: CameraRenderingOptions, callbacks: RenderingCallbacks): Promise<RenderedCamera>;
|
||||
static create(videoConstraints: MediaTrackConstraints): Promise<Camera>;
|
||||
}
|
||||
236
node_modules/html5-qrcode/es2015/camera/core-impl.js
generated
vendored
Normal file
236
node_modules/html5-qrcode/es2015/camera/core-impl.js
generated
vendored
Normal file
@@ -0,0 +1,236 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
class AbstractCameraCapability {
|
||||
constructor(name, track) {
|
||||
this.name = name;
|
||||
this.track = track;
|
||||
}
|
||||
isSupported() {
|
||||
if (!this.track.getCapabilities) {
|
||||
return false;
|
||||
}
|
||||
return this.name in this.track.getCapabilities();
|
||||
}
|
||||
apply(value) {
|
||||
let constraint = {};
|
||||
constraint[this.name] = value;
|
||||
let constraints = { advanced: [constraint] };
|
||||
return this.track.applyConstraints(constraints);
|
||||
}
|
||||
value() {
|
||||
let settings = this.track.getSettings();
|
||||
if (this.name in settings) {
|
||||
let settingValue = settings[this.name];
|
||||
return settingValue;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
class AbstractRangeCameraCapability extends AbstractCameraCapability {
|
||||
constructor(name, track) {
|
||||
super(name, track);
|
||||
}
|
||||
min() {
|
||||
return this.getCapabilities().min;
|
||||
}
|
||||
max() {
|
||||
return this.getCapabilities().max;
|
||||
}
|
||||
step() {
|
||||
return this.getCapabilities().step;
|
||||
}
|
||||
apply(value) {
|
||||
let constraint = {};
|
||||
constraint[this.name] = value;
|
||||
let constraints = { advanced: [constraint] };
|
||||
return this.track.applyConstraints(constraints);
|
||||
}
|
||||
getCapabilities() {
|
||||
this.failIfNotSupported();
|
||||
let capabilities = this.track.getCapabilities();
|
||||
let capability = capabilities[this.name];
|
||||
return {
|
||||
min: capability.min,
|
||||
max: capability.max,
|
||||
step: capability.step,
|
||||
};
|
||||
}
|
||||
failIfNotSupported() {
|
||||
if (!this.isSupported()) {
|
||||
throw new Error(`${this.name} capability not supported`);
|
||||
}
|
||||
}
|
||||
}
|
||||
class ZoomFeatureImpl extends AbstractRangeCameraCapability {
|
||||
constructor(track) {
|
||||
super("zoom", track);
|
||||
}
|
||||
}
|
||||
class TorchFeatureImpl extends AbstractCameraCapability {
|
||||
constructor(track) {
|
||||
super("torch", track);
|
||||
}
|
||||
}
|
||||
class CameraCapabilitiesImpl {
|
||||
constructor(track) {
|
||||
this.track = track;
|
||||
}
|
||||
zoomFeature() {
|
||||
return new ZoomFeatureImpl(this.track);
|
||||
}
|
||||
torchFeature() {
|
||||
return new TorchFeatureImpl(this.track);
|
||||
}
|
||||
}
|
||||
class RenderedCameraImpl {
|
||||
constructor(parentElement, mediaStream, callbacks) {
|
||||
this.isClosed = false;
|
||||
this.parentElement = parentElement;
|
||||
this.mediaStream = mediaStream;
|
||||
this.callbacks = callbacks;
|
||||
this.surface = this.createVideoElement(this.parentElement.clientWidth);
|
||||
parentElement.append(this.surface);
|
||||
}
|
||||
createVideoElement(width) {
|
||||
const videoElement = document.createElement("video");
|
||||
videoElement.style.width = `${width}px`;
|
||||
videoElement.style.display = "block";
|
||||
videoElement.muted = true;
|
||||
videoElement.setAttribute("muted", "true");
|
||||
videoElement.playsInline = true;
|
||||
return videoElement;
|
||||
}
|
||||
setupSurface() {
|
||||
this.surface.onabort = () => {
|
||||
throw "RenderedCameraImpl video surface onabort() called";
|
||||
};
|
||||
this.surface.onerror = () => {
|
||||
throw "RenderedCameraImpl video surface onerror() called";
|
||||
};
|
||||
let onVideoStart = () => {
|
||||
const videoWidth = this.surface.clientWidth;
|
||||
const videoHeight = this.surface.clientHeight;
|
||||
this.callbacks.onRenderSurfaceReady(videoWidth, videoHeight);
|
||||
this.surface.removeEventListener("playing", onVideoStart);
|
||||
};
|
||||
this.surface.addEventListener("playing", onVideoStart);
|
||||
this.surface.srcObject = this.mediaStream;
|
||||
this.surface.play();
|
||||
}
|
||||
static create(parentElement, mediaStream, options, callbacks) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let renderedCamera = new RenderedCameraImpl(parentElement, mediaStream, callbacks);
|
||||
if (options.aspectRatio) {
|
||||
let aspectRatioConstraint = {
|
||||
aspectRatio: options.aspectRatio
|
||||
};
|
||||
yield renderedCamera.getFirstTrackOrFail().applyConstraints(aspectRatioConstraint);
|
||||
}
|
||||
renderedCamera.setupSurface();
|
||||
return renderedCamera;
|
||||
});
|
||||
}
|
||||
failIfClosed() {
|
||||
if (this.isClosed) {
|
||||
throw "The RenderedCamera has already been closed.";
|
||||
}
|
||||
}
|
||||
getFirstTrackOrFail() {
|
||||
this.failIfClosed();
|
||||
if (this.mediaStream.getVideoTracks().length === 0) {
|
||||
throw "No video tracks found";
|
||||
}
|
||||
return this.mediaStream.getVideoTracks()[0];
|
||||
}
|
||||
pause() {
|
||||
this.failIfClosed();
|
||||
this.surface.pause();
|
||||
}
|
||||
resume(onResumeCallback) {
|
||||
this.failIfClosed();
|
||||
let $this = this;
|
||||
const onVideoResume = () => {
|
||||
setTimeout(onResumeCallback, 200);
|
||||
$this.surface.removeEventListener("playing", onVideoResume);
|
||||
};
|
||||
this.surface.addEventListener("playing", onVideoResume);
|
||||
this.surface.play();
|
||||
}
|
||||
isPaused() {
|
||||
this.failIfClosed();
|
||||
return this.surface.paused;
|
||||
}
|
||||
getSurface() {
|
||||
this.failIfClosed();
|
||||
return this.surface;
|
||||
}
|
||||
getRunningTrackCapabilities() {
|
||||
return this.getFirstTrackOrFail().getCapabilities();
|
||||
}
|
||||
getRunningTrackSettings() {
|
||||
return this.getFirstTrackOrFail().getSettings();
|
||||
}
|
||||
applyVideoConstraints(constraints) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if ("aspectRatio" in constraints) {
|
||||
throw "Changing 'aspectRatio' in run-time is not yet supported.";
|
||||
}
|
||||
return this.getFirstTrackOrFail().applyConstraints(constraints);
|
||||
});
|
||||
}
|
||||
close() {
|
||||
if (this.isClosed) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
let $this = this;
|
||||
return new Promise((resolve, _) => {
|
||||
let tracks = $this.mediaStream.getVideoTracks();
|
||||
const tracksToClose = tracks.length;
|
||||
var tracksClosed = 0;
|
||||
$this.mediaStream.getVideoTracks().forEach((videoTrack) => {
|
||||
$this.mediaStream.removeTrack(videoTrack);
|
||||
videoTrack.stop();
|
||||
++tracksClosed;
|
||||
if (tracksClosed >= tracksToClose) {
|
||||
$this.isClosed = true;
|
||||
$this.parentElement.removeChild($this.surface);
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
getCapabilities() {
|
||||
return new CameraCapabilitiesImpl(this.getFirstTrackOrFail());
|
||||
}
|
||||
}
|
||||
export class CameraImpl {
|
||||
constructor(mediaStream) {
|
||||
this.mediaStream = mediaStream;
|
||||
}
|
||||
render(parentElement, options, callbacks) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return RenderedCameraImpl.create(parentElement, this.mediaStream, options, callbacks);
|
||||
});
|
||||
}
|
||||
static create(videoConstraints) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!navigator.mediaDevices) {
|
||||
throw "navigator.mediaDevices not supported";
|
||||
}
|
||||
let constraints = {
|
||||
audio: false,
|
||||
video: videoConstraints
|
||||
};
|
||||
let mediaStream = yield navigator.mediaDevices.getUserMedia(constraints);
|
||||
return new CameraImpl(mediaStream);
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=core-impl.js.map
|
||||
1
node_modules/html5-qrcode/es2015/camera/core-impl.js.map
generated
vendored
Normal file
1
node_modules/html5-qrcode/es2015/camera/core-impl.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
41
node_modules/html5-qrcode/es2015/camera/core.d.ts
generated
vendored
Normal file
41
node_modules/html5-qrcode/es2015/camera/core.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
export interface CameraDevice {
|
||||
id: string;
|
||||
label: string;
|
||||
}
|
||||
export interface CameraCapability<T> {
|
||||
isSupported(): boolean;
|
||||
apply(value: T): Promise<void>;
|
||||
value(): T | null;
|
||||
}
|
||||
export interface RangeCameraCapability extends CameraCapability<number> {
|
||||
min(): number;
|
||||
max(): number;
|
||||
step(): number;
|
||||
}
|
||||
export interface BooleanCameraCapability extends CameraCapability<boolean> {
|
||||
}
|
||||
export interface CameraCapabilities {
|
||||
zoomFeature(): RangeCameraCapability;
|
||||
torchFeature(): BooleanCameraCapability;
|
||||
}
|
||||
export type OnRenderSurfaceReady = (viewfinderWidth: number, viewfinderHeight: number) => void;
|
||||
export interface RenderingCallbacks {
|
||||
onRenderSurfaceReady: OnRenderSurfaceReady;
|
||||
}
|
||||
export interface RenderedCamera {
|
||||
getSurface(): HTMLVideoElement;
|
||||
pause(): void;
|
||||
resume(onResumeCallback: () => void): void;
|
||||
isPaused(): boolean;
|
||||
close(): Promise<void>;
|
||||
getRunningTrackCapabilities(): MediaTrackCapabilities;
|
||||
getRunningTrackSettings(): MediaTrackSettings;
|
||||
applyVideoConstraints(constraints: MediaTrackConstraints): Promise<void>;
|
||||
getCapabilities(): CameraCapabilities;
|
||||
}
|
||||
export interface CameraRenderingOptions {
|
||||
aspectRatio?: number;
|
||||
}
|
||||
export interface Camera {
|
||||
render(parentElement: HTMLElement, options: CameraRenderingOptions, callbacks: RenderingCallbacks): Promise<RenderedCamera>;
|
||||
}
|
||||
2
node_modules/html5-qrcode/es2015/camera/core.js
generated
vendored
Normal file
2
node_modules/html5-qrcode/es2015/camera/core.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=core.js.map
|
||||
1
node_modules/html5-qrcode/es2015/camera/core.js.map
generated
vendored
Normal file
1
node_modules/html5-qrcode/es2015/camera/core.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/camera/core.ts"],"names":[],"mappings":""}
|
||||
6
node_modules/html5-qrcode/es2015/camera/factories.d.ts
generated
vendored
Normal file
6
node_modules/html5-qrcode/es2015/camera/factories.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { Camera } from "./core";
|
||||
export declare class CameraFactory {
|
||||
static failIfNotSupported(): Promise<CameraFactory>;
|
||||
private constructor();
|
||||
create(videoConstraints: MediaTrackConstraints): Promise<Camera>;
|
||||
}
|
||||
27
node_modules/html5-qrcode/es2015/camera/factories.js
generated
vendored
Normal file
27
node_modules/html5-qrcode/es2015/camera/factories.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import { CameraImpl } from "./core-impl";
|
||||
export class CameraFactory {
|
||||
static failIfNotSupported() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!navigator.mediaDevices) {
|
||||
throw "navigator.mediaDevices not supported";
|
||||
}
|
||||
return new CameraFactory();
|
||||
});
|
||||
}
|
||||
constructor() { }
|
||||
create(videoConstraints) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return CameraImpl.create(videoConstraints);
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=factories.js.map
|
||||
1
node_modules/html5-qrcode/es2015/camera/factories.js.map
generated
vendored
Normal file
1
node_modules/html5-qrcode/es2015/camera/factories.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"factories.js","sourceRoot":"","sources":["../../../src/camera/factories.ts"],"names":[],"mappings":";;;;;;;;;AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,MAAM,OAAO,aAAa;IAMf,MAAM,CAAO,kBAAkB;;YAClC,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE;gBACzB,MAAM,sCAAsC,CAAC;aAChD;YAED,OAAO,IAAI,aAAa,EAAE,CAAC;QAC/B,CAAC;KAAA;IAED,gBAAqC,CAAC;IAGzB,MAAM,CAAC,gBAAuC;;YAEvD,OAAO,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC/C,CAAC;KAAA;CACJ"}
|
||||
3
node_modules/html5-qrcode/es2015/camera/permissions.d.ts
generated
vendored
Normal file
3
node_modules/html5-qrcode/es2015/camera/permissions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare class CameraPermissions {
|
||||
static hasPermissions(): Promise<boolean>;
|
||||
}
|
||||
23
node_modules/html5-qrcode/es2015/camera/permissions.js
generated
vendored
Normal file
23
node_modules/html5-qrcode/es2015/camera/permissions.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
export class CameraPermissions {
|
||||
static hasPermissions() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let devices = yield navigator.mediaDevices.enumerateDevices();
|
||||
for (const device of devices) {
|
||||
if (device.kind === "videoinput" && device.label) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=permissions.js.map
|
||||
1
node_modules/html5-qrcode/es2015/camera/permissions.js.map
generated
vendored
Normal file
1
node_modules/html5-qrcode/es2015/camera/permissions.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../../src/camera/permissions.ts"],"names":[],"mappings":";;;;;;;;;AAYC,MAAM,OAAO,iBAAiB;IAMpB,MAAM,CAAO,cAAc;;YAIhC,IAAI,OAAO,GAAG,MAAM,SAAS,CAAC,YAAY,CAAC,gBAAgB,EAAE,CAAC;YAC9D,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAG5B,IAAG,MAAM,CAAC,IAAI,KAAK,YAAY,IAAI,MAAM,CAAC,KAAK,EAAE;oBAC/C,OAAO,IAAI,CAAC;iBACb;aACF;YAED,OAAO,KAAK,CAAC;QACf,CAAC;KAAA;CACJ"}
|
||||
8
node_modules/html5-qrcode/es2015/camera/retriever.d.ts
generated
vendored
Normal file
8
node_modules/html5-qrcode/es2015/camera/retriever.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { CameraDevice } from "./core";
|
||||
export declare class CameraRetriever {
|
||||
static retrieve(): Promise<Array<CameraDevice>>;
|
||||
private static rejectWithError;
|
||||
private static isHttpsOrLocalhost;
|
||||
private static getCamerasFromMediaDevices;
|
||||
private static getCamerasFromMediaStreamTrack;
|
||||
}
|
||||
80
node_modules/html5-qrcode/es2015/camera/retriever.js
generated
vendored
Normal file
80
node_modules/html5-qrcode/es2015/camera/retriever.js
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import { Html5QrcodeStrings } from "../strings";
|
||||
export class CameraRetriever {
|
||||
static retrieve() {
|
||||
if (navigator.mediaDevices) {
|
||||
return CameraRetriever.getCamerasFromMediaDevices();
|
||||
}
|
||||
var mst = MediaStreamTrack;
|
||||
if (MediaStreamTrack && mst.getSources) {
|
||||
return CameraRetriever.getCamerasFromMediaStreamTrack();
|
||||
}
|
||||
return CameraRetriever.rejectWithError();
|
||||
}
|
||||
static rejectWithError() {
|
||||
let errorMessage = Html5QrcodeStrings.unableToQuerySupportedDevices();
|
||||
if (!CameraRetriever.isHttpsOrLocalhost()) {
|
||||
errorMessage = Html5QrcodeStrings.insecureContextCameraQueryError();
|
||||
}
|
||||
return Promise.reject(errorMessage);
|
||||
}
|
||||
static isHttpsOrLocalhost() {
|
||||
if (location.protocol === "https:") {
|
||||
return true;
|
||||
}
|
||||
const host = location.host.split(":")[0];
|
||||
return host === "127.0.0.1" || host === "localhost";
|
||||
}
|
||||
static getCamerasFromMediaDevices() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const closeActiveStreams = (stream) => {
|
||||
const tracks = stream.getVideoTracks();
|
||||
for (const track of tracks) {
|
||||
track.enabled = false;
|
||||
track.stop();
|
||||
stream.removeTrack(track);
|
||||
}
|
||||
};
|
||||
let mediaStream = yield navigator.mediaDevices.getUserMedia({ audio: false, video: true });
|
||||
let devices = yield navigator.mediaDevices.enumerateDevices();
|
||||
let results = [];
|
||||
for (const device of devices) {
|
||||
if (device.kind === "videoinput") {
|
||||
results.push({
|
||||
id: device.deviceId,
|
||||
label: device.label
|
||||
});
|
||||
}
|
||||
}
|
||||
closeActiveStreams(mediaStream);
|
||||
return results;
|
||||
});
|
||||
}
|
||||
static getCamerasFromMediaStreamTrack() {
|
||||
return new Promise((resolve, _) => {
|
||||
const callback = (sourceInfos) => {
|
||||
const results = [];
|
||||
for (const sourceInfo of sourceInfos) {
|
||||
if (sourceInfo.kind === "video") {
|
||||
results.push({
|
||||
id: sourceInfo.id,
|
||||
label: sourceInfo.label
|
||||
});
|
||||
}
|
||||
}
|
||||
resolve(results);
|
||||
};
|
||||
var mst = MediaStreamTrack;
|
||||
mst.getSources(callback);
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=retriever.js.map
|
||||
1
node_modules/html5-qrcode/es2015/camera/retriever.js.map
generated
vendored
Normal file
1
node_modules/html5-qrcode/es2015/camera/retriever.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"retriever.js","sourceRoot":"","sources":["../../../src/camera/retriever.ts"],"names":[],"mappings":";;;;;;;;;AAQA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGhD,M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