@smoove/core 0.2.0 → 0.3.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/dist/engine/composition.d.ts.map +1 -1
- package/dist/engine/composition.js +1 -1
- package/dist/engine/composition.js.map +1 -1
- package/dist/engine/runtime-defaults.d.ts +5 -5
- package/dist/engine/runtime-defaults.d.ts.map +1 -1
- package/dist/engine/runtime-defaults.js +12 -9
- package/dist/engine/runtime-defaults.js.map +1 -1
- package/dist/engine/sequence.js +1 -1
- package/dist/engine/sequence.js.map +1 -1
- package/dist/index.d.ts +4 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/dist/layout/group.js +1 -1
- package/dist/layout/group.js.map +1 -1
- package/dist/layout/image.js +1 -1
- package/dist/layout/image.js.map +1 -1
- package/dist/layout/text/font.js +1 -1
- package/dist/layout/text/font.js.map +1 -1
- package/dist/layout/text/text.js +1 -1
- package/dist/layout/text/text.js.map +1 -1
- package/dist/markers.d.ts +43 -0
- package/dist/markers.d.ts.map +1 -0
- package/dist/markers.js +46 -0
- package/dist/markers.js.map +1 -0
- package/package.json +2 -3
- package/dist/media/audio/audio-driver.d.ts +0 -34
- package/dist/media/audio/audio-driver.d.ts.map +0 -1
- package/dist/media/audio/audio-driver.js +0 -2
- package/dist/media/audio/audio-driver.js.map +0 -1
- package/dist/media/audio/audio-for-preview.d.ts +0 -47
- package/dist/media/audio/audio-for-preview.d.ts.map +0 -1
- package/dist/media/audio/audio-for-preview.js +0 -232
- package/dist/media/audio/audio-for-preview.js.map +0 -1
- package/dist/media/audio/audio-for-rendering.d.ts +0 -16
- package/dist/media/audio/audio-for-rendering.d.ts.map +0 -1
- package/dist/media/audio/audio-for-rendering.js +0 -32
- package/dist/media/audio/audio-for-rendering.js.map +0 -1
- package/dist/media/audio/audio-source-browser.d.ts +0 -30
- package/dist/media/audio/audio-source-browser.d.ts.map +0 -1
- package/dist/media/audio/audio-source-browser.js +0 -139
- package/dist/media/audio/audio-source-browser.js.map +0 -1
- package/dist/media/audio/audio-source-mediabunny.d.ts +0 -45
- package/dist/media/audio/audio-source-mediabunny.d.ts.map +0 -1
- package/dist/media/audio/audio-source-mediabunny.js +0 -79
- package/dist/media/audio/audio-source-mediabunny.js.map +0 -1
- package/dist/media/audio/index.d.ts +0 -57
- package/dist/media/audio/index.d.ts.map +0 -1
- package/dist/media/audio/index.js +0 -176
- package/dist/media/audio/index.js.map +0 -1
- package/dist/media/audio/shared-audio-context.d.ts +0 -30
- package/dist/media/audio/shared-audio-context.d.ts.map +0 -1
- package/dist/media/audio/shared-audio-context.js +0 -68
- package/dist/media/audio/shared-audio-context.js.map +0 -1
- package/dist/media/audio/types.d.ts +0 -48
- package/dist/media/audio/types.d.ts.map +0 -1
- package/dist/media/audio/types.js +0 -2
- package/dist/media/audio/types.js.map +0 -1
- package/dist/media/media-marker.d.ts +0 -34
- package/dist/media/media-marker.d.ts.map +0 -1
- package/dist/media/media-marker.js +0 -34
- package/dist/media/media-marker.js.map +0 -1
- package/dist/media/video/driver.d.ts +0 -31
- package/dist/media/video/driver.d.ts.map +0 -1
- package/dist/media/video/driver.js +0 -3
- package/dist/media/video/driver.js.map +0 -1
- package/dist/media/video/index.d.ts +0 -66
- package/dist/media/video/index.d.ts.map +0 -1
- package/dist/media/video/index.js +0 -372
- package/dist/media/video/index.js.map +0 -1
- package/dist/media/video/types.d.ts +0 -36
- package/dist/media/video/types.d.ts.map +0 -1
- package/dist/media/video/types.js +0 -2
- package/dist/media/video/types.js.map +0 -1
- package/dist/media/video/video-for-preview.d.ts +0 -17
- package/dist/media/video/video-for-preview.d.ts.map +0 -1
- package/dist/media/video/video-for-preview.js +0 -30
- package/dist/media/video/video-for-preview.js.map +0 -1
- package/dist/media/video/video-for-rendering.d.ts +0 -17
- package/dist/media/video/video-for-rendering.d.ts.map +0 -1
- package/dist/media/video/video-for-rendering.js +0 -59
- package/dist/media/video/video-for-rendering.js.map +0 -1
- package/dist/media/video/video-source-browser.d.ts +0 -37
- package/dist/media/video/video-source-browser.d.ts.map +0 -1
- package/dist/media/video/video-source-browser.js +0 -171
- package/dist/media/video/video-source-browser.js.map +0 -1
- package/dist/media/video/video-source-mediabunny.d.ts +0 -69
- package/dist/media/video/video-source-mediabunny.d.ts.map +0 -1
- package/dist/media/video/video-source-mediabunny.js +0 -236
- package/dist/media/video/video-source-mediabunny.js.map +0 -1
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { AudioSourceFactory } from "./audio-source.js";
|
|
2
|
-
/**
|
|
3
|
-
* Config for {@link Audio}. Mirrors Remotion's `<Audio>` playback props
|
|
4
|
-
* (`trimBefore`/`trimAfter`/`loop`/`muted`/`volume`/`playbackRate`) plus a
|
|
5
|
-
* `sourceFactory` dependency-injection seam. Unlike {@link VideoConfig} there
|
|
6
|
-
* are no visual/layout props — audio produces no pixels.
|
|
7
|
-
*/
|
|
8
|
-
export type AudioConfig = {
|
|
9
|
-
src: string;
|
|
10
|
-
/** Stable id used for the Konva node and rendered {@link AudioAsset}s. */
|
|
11
|
-
id?: string;
|
|
12
|
-
/** Human label for the audio mixer channel / UIs. Defaults to {@link src}. */
|
|
13
|
-
name?: string;
|
|
14
|
-
/** Frames trimmed from the start of the media (composition fps). Remotion v4 name. */
|
|
15
|
-
trimBefore?: number;
|
|
16
|
-
/** Exclusive frame bound — media past this offset is trimmed (composition fps). */
|
|
17
|
-
trimAfter?: number;
|
|
18
|
-
/**
|
|
19
|
-
* Play-window trim: a friendlier form of {@link trimBefore}/{@link trimAfter}
|
|
20
|
-
* expressed as "start here, play this many frames" instead of two absolute
|
|
21
|
-
* bounds you subtract by hand. `{ start, play }` maps to
|
|
22
|
-
* `trimBefore = start`, `trimAfter = start + play`. Wins over
|
|
23
|
-
* `trimBefore`/`trimAfter`/`startFrom`/`endAt` for the fields it sets; a
|
|
24
|
-
* `trim` without `play` leaves the end bound to `trimAfter`/`endAt` (natural
|
|
25
|
-
* end). All in composition fps.
|
|
26
|
-
*/
|
|
27
|
-
trim?: {
|
|
28
|
-
start?: number;
|
|
29
|
-
play?: number;
|
|
30
|
-
};
|
|
31
|
-
/** @deprecated alias of {@link trimBefore} (Remotion's pre-v4.0.319 name). */
|
|
32
|
-
startFrom?: number;
|
|
33
|
-
/** @deprecated alias of {@link trimAfter} (Remotion's pre-v4.0.319 name). */
|
|
34
|
-
endAt?: number;
|
|
35
|
-
/** Repeat the trimmed clip within its sequence window instead of freezing on the last frame. */
|
|
36
|
-
loop?: boolean;
|
|
37
|
-
muted?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Playback level. `1` is unity; `0` is silent. Values above `1` amplify —
|
|
40
|
-
* honored by the default preview path (Web Audio `GainNode`) and the render
|
|
41
|
-
* mux. The legacy `HTMLAudioElement` source physically caps at `1`.
|
|
42
|
-
*/
|
|
43
|
-
volume?: number;
|
|
44
|
-
playbackRate?: number;
|
|
45
|
-
/** Inject an alternative AudioSource. Defaults to BrowserAudioSource. */
|
|
46
|
-
sourceFactory?: AudioSourceFactory;
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/media/audio/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,0EAA0E;IAC1E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gGAAgG;IAChG,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,aAAa,CAAC,EAAE,kBAAkB,CAAC;CACpC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/media/audio/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Marker attrs stamped on media nodes ({@link Video}, {@link Audio}) and
|
|
3
|
-
* inspected by `Sequence`/`Composition`. Kept in a dependency-free leaf so
|
|
4
|
-
* `composition.ts` can discover media by string without importing `video/` or
|
|
5
|
-
* `audio/` (which would create an import cycle).
|
|
6
|
-
*/
|
|
7
|
-
/** Set by every tickable media node — drives Sequence discovery + mixer registration. */
|
|
8
|
-
export declare const MEDIA_MARK = "__kmIsMedia";
|
|
9
|
-
/** Additionally set by {@link Video} — backs `isVideoNode`. */
|
|
10
|
-
export declare const VIDEO_MARK = "__kmIsVideo";
|
|
11
|
-
/** Additionally set by {@link Audio} — backs `isAudioNode`. */
|
|
12
|
-
export declare const AUDIO_MARK = "__kmIsAudio";
|
|
13
|
-
/**
|
|
14
|
-
* Set by non-media nodes that still want a per-frame `_kmTick` callback (e.g.
|
|
15
|
-
* {@link Text}'s typewriter). Discovered by `Sequence` alongside media, but
|
|
16
|
-
* NOT registered with the audio mixer.
|
|
17
|
-
*/
|
|
18
|
-
export declare const TICK_MARK = "__kmIsTick";
|
|
19
|
-
/**
|
|
20
|
-
* Set by {@link Font} nodes. Walked by `Composition.add` so a scene-declared
|
|
21
|
-
* font is loaded (and buffered on) before playback. Kept here, like the other
|
|
22
|
-
* markers, so `composition.ts` discovers fonts by string without importing
|
|
23
|
-
* `layout/text/` (avoiding an import cycle).
|
|
24
|
-
*/
|
|
25
|
-
export declare const FONT_MARK = "__kmIsFont";
|
|
26
|
-
/**
|
|
27
|
-
* Set by smoove's {@link Group} container — distinguishes an author-created
|
|
28
|
-
* grouping node from the internal `Konva.Group`s smoove builds inside `Text`,
|
|
29
|
-
* `Flex`, etc. Not consumed by the engine today; stamped so tooling (studio
|
|
30
|
-
* tree, serialization, layout passes) can identify author groups later. Backs
|
|
31
|
-
* `isGroupNode`.
|
|
32
|
-
*/
|
|
33
|
-
export declare const GROUP_MARK = "__kmIsGroup";
|
|
34
|
-
//# sourceMappingURL=media-marker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-marker.d.ts","sourceRoot":"","sources":["../../src/media/media-marker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yFAAyF;AACzF,eAAO,MAAM,UAAU,gBAAgB,CAAC;AACxC,+DAA+D;AAC/D,eAAO,MAAM,UAAU,gBAAgB,CAAC;AACxC,+DAA+D;AAC/D,eAAO,MAAM,UAAU,gBAAgB,CAAC;AACxC;;;;GAIG;AACH,eAAO,MAAM,SAAS,eAAe,CAAC;AACtC;;;;;GAKG;AACH,eAAO,MAAM,SAAS,eAAe,CAAC;AACtC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,gBAAgB,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Marker attrs stamped on media nodes ({@link Video}, {@link Audio}) and
|
|
3
|
-
* inspected by `Sequence`/`Composition`. Kept in a dependency-free leaf so
|
|
4
|
-
* `composition.ts` can discover media by string without importing `video/` or
|
|
5
|
-
* `audio/` (which would create an import cycle).
|
|
6
|
-
*/
|
|
7
|
-
/** Set by every tickable media node — drives Sequence discovery + mixer registration. */
|
|
8
|
-
export const MEDIA_MARK = "__kmIsMedia";
|
|
9
|
-
/** Additionally set by {@link Video} — backs `isVideoNode`. */
|
|
10
|
-
export const VIDEO_MARK = "__kmIsVideo";
|
|
11
|
-
/** Additionally set by {@link Audio} — backs `isAudioNode`. */
|
|
12
|
-
export const AUDIO_MARK = "__kmIsAudio";
|
|
13
|
-
/**
|
|
14
|
-
* Set by non-media nodes that still want a per-frame `_kmTick` callback (e.g.
|
|
15
|
-
* {@link Text}'s typewriter). Discovered by `Sequence` alongside media, but
|
|
16
|
-
* NOT registered with the audio mixer.
|
|
17
|
-
*/
|
|
18
|
-
export const TICK_MARK = "__kmIsTick";
|
|
19
|
-
/**
|
|
20
|
-
* Set by {@link Font} nodes. Walked by `Composition.add` so a scene-declared
|
|
21
|
-
* font is loaded (and buffered on) before playback. Kept here, like the other
|
|
22
|
-
* markers, so `composition.ts` discovers fonts by string without importing
|
|
23
|
-
* `layout/text/` (avoiding an import cycle).
|
|
24
|
-
*/
|
|
25
|
-
export const FONT_MARK = "__kmIsFont";
|
|
26
|
-
/**
|
|
27
|
-
* Set by smoove's {@link Group} container — distinguishes an author-created
|
|
28
|
-
* grouping node from the internal `Konva.Group`s smoove builds inside `Text`,
|
|
29
|
-
* `Flex`, etc. Not consumed by the engine today; stamped so tooling (studio
|
|
30
|
-
* tree, serialization, layout passes) can identify author groups later. Backs
|
|
31
|
-
* `isGroupNode`.
|
|
32
|
-
*/
|
|
33
|
-
export const GROUP_MARK = "__kmIsGroup";
|
|
34
|
-
//# sourceMappingURL=media-marker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-marker.js","sourceRoot":"","sources":["../../src/media/media-marker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yFAAyF;AACzF,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC;AACxC,+DAA+D;AAC/D,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC;AACxC,+DAA+D;AAC/D,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC;AACxC;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;AACtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;AACtC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Composition } from "../../engine/composition.js";
|
|
2
|
-
import type { MediaTiming } from "../media-time.js";
|
|
3
|
-
import { getMediaTime } from "../media-time.js";
|
|
4
|
-
import type { VideoSource } from "./video-source.js";
|
|
5
|
-
/** Resolved per-video timing — alias of the shared {@link MediaTiming}. */
|
|
6
|
-
export type VideoTiming = MediaTiming;
|
|
7
|
-
export { getMediaTime };
|
|
8
|
-
/**
|
|
9
|
-
* What a driver needs from the host {@link Video}: the media source, the
|
|
10
|
-
* resolved timing, the owning composition (for the render gate + play state),
|
|
11
|
-
* and a redraw hook (relayout + batchDraw).
|
|
12
|
-
*/
|
|
13
|
-
export type VideoDriverContext = {
|
|
14
|
-
readonly source: VideoSource;
|
|
15
|
-
readonly timing: VideoTiming;
|
|
16
|
-
readonly comp: Composition;
|
|
17
|
-
redraw(): void;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Strategy that maps the composition's current frame onto the media. Mirrors
|
|
21
|
-
* Remotion's split between `VideoForRendering` and `VideoForPreview`.
|
|
22
|
-
*/
|
|
23
|
-
export interface VideoDriver {
|
|
24
|
-
/** Called by Sequence each tick while the video is on-stage (`localFrame` = frame - sequence.from). */
|
|
25
|
-
tick(localFrame: number): void;
|
|
26
|
-
/** Called by Sequence when the video leaves range. */
|
|
27
|
-
deactivate(): void;
|
|
28
|
-
/** Release any subscriptions; called on `Video.destroy()`. */
|
|
29
|
-
dispose(): void;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../src/media/video/driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,2EAA2E;AAC3E,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,MAAM,IAAI,IAAI,CAAC;CAChB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,uGAAuG;IACvG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,sDAAsD;IACtD,UAAU,IAAI,IAAI,CAAC;IACnB,8DAA8D;IAC9D,OAAO,IAAI,IAAI,CAAC;CACjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../../src/media/video/driver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMhD,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import Konva from "konva";
|
|
2
|
-
import { type ReadonlySignal } from "../../engine/signal.js";
|
|
3
|
-
import type { KMLayoutNode, LayoutBox } from "../../layout/contract.js";
|
|
4
|
-
import { type FlexilyNode } from "../../layout/flex/engine.js";
|
|
5
|
-
import type { AudioChannel, AudioMixer } from "../audio/mixer.js";
|
|
6
|
-
import type { VideoConfig } from "./types.js";
|
|
7
|
-
/**
|
|
8
|
-
* Timeline-driven video. API mirrors {@link Image} (`new Video({src, ...ImageProps})`)
|
|
9
|
-
* but the frame source is a runtime-agnostic {@link VideoSource} and playback is
|
|
10
|
-
* driven by the composition's frame clock. Picks a {@link RenderingVideoDriver}
|
|
11
|
-
* or {@link PreviewVideoDriver} based on the composition's {@link Environment}.
|
|
12
|
-
*/
|
|
13
|
-
export declare class Video extends Konva.Group implements AudioChannel, KMLayoutNode {
|
|
14
|
-
readonly _kmRole: "leaf";
|
|
15
|
-
/** Human label for mixer UIs — `config.name`, falling back to `config.src`. */
|
|
16
|
-
readonly label: string;
|
|
17
|
-
/** Intrinsic audio level, 0..1 — scaled by the composition mixer's master. */
|
|
18
|
-
readonly volume: ReadonlySignal<number>;
|
|
19
|
-
readonly muted: ReadonlySignal<boolean>;
|
|
20
|
-
private readonly _img;
|
|
21
|
-
private _source;
|
|
22
|
-
private readonly _env;
|
|
23
|
-
private readonly _factory;
|
|
24
|
-
private _suspended;
|
|
25
|
-
private readonly _trimBefore;
|
|
26
|
-
private readonly _trimAfter?;
|
|
27
|
-
private readonly _loop;
|
|
28
|
-
private readonly _playbackRate;
|
|
29
|
-
private readonly _volume;
|
|
30
|
-
private readonly _muted;
|
|
31
|
-
private _mixer;
|
|
32
|
-
private _driver;
|
|
33
|
-
private _audioDriver;
|
|
34
|
-
private readonly _src;
|
|
35
|
-
constructor(config: VideoConfig);
|
|
36
|
-
/**
|
|
37
|
-
* Create the media source and start loading it. Called once at construction
|
|
38
|
-
* and again by {@link _kmResume} after {@link _kmSuspend} dropped it.
|
|
39
|
-
*/
|
|
40
|
-
private _acquireSource;
|
|
41
|
-
/** @internal — {@link Composition.suspend}: drop the source to stop downloading/decoding. */
|
|
42
|
-
_kmSuspend(): void;
|
|
43
|
-
/** @internal — {@link Composition.resume}: re-acquire the dropped source. */
|
|
44
|
-
_kmResume(): void;
|
|
45
|
-
/** @internal — called by Sequence on each tick while this video is on-stage. */
|
|
46
|
-
_kmTick(localFrame: number): void;
|
|
47
|
-
/** @internal — called by Sequence when it goes out of range. */
|
|
48
|
-
_kmDeactivate(): void;
|
|
49
|
-
/** @internal — {@link KMLayoutNode}: size from explicit width/height (cover/contain handle the rest). */
|
|
50
|
-
_kmMeasure(node: FlexilyNode): void;
|
|
51
|
-
/** @internal — {@link KMLayoutNode}: write the computed box back + re-fit the frame. */
|
|
52
|
-
_kmPlace(box: LayoutBox): void;
|
|
53
|
-
private _ensureDriver;
|
|
54
|
-
setMuted(muted: boolean): void;
|
|
55
|
-
setVolume(volume: number): void;
|
|
56
|
-
/** @internal — {@link AudioMixer} hands us the bus (or null on unregister). */
|
|
57
|
-
_bindMixer(mixer: AudioMixer | null): void;
|
|
58
|
-
/** @internal — push effective level (master × intrinsic) to the source. */
|
|
59
|
-
_applyAudio(): void;
|
|
60
|
-
setPlaybackRate(rate: number): void;
|
|
61
|
-
destroy(): this;
|
|
62
|
-
/** @internal */
|
|
63
|
-
_layoutImage(): void;
|
|
64
|
-
}
|
|
65
|
-
export declare function isVideoNode(node: Konva.Node): node is Video;
|
|
66
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/media/video/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAgB,KAAK,cAAc,EAAe,MAAM,wBAAwB,CAAC;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAa,KAAK,WAAW,EAAa,MAAM,6BAA6B,CAAC;AAOrF,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGlE,OAAO,KAAK,EAAE,WAAW,EAAE,MAA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IAAI,EAAE,WAAW,GAAG,IAAI;IAQnC,wFAAwF;IACxF,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI;IAQ9B,OAAO,CAAC,aAAa;IAyErB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAK9B,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK/B,+EAA+E;IAC/E,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,IAAI;IAK1C,2EAA2E;IAC3E,WAAW,IAAI,IAAI;IAQnB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI1B,OAAO,IAAI,IAAI;IAWxB,gBAAgB;IAChB,YAAY,IAAI,IAAI;CAyCrB;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,GAAG,IAAI,IAAI,KAAK,CAE3D"}
|
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
import Konva from "konva";
|
|
2
|
-
import { getComposition } from "../../engine/composition.js";
|
|
3
|
-
import { detectEnvironment, getEnvironment } from "../../engine/environment.js";
|
|
4
|
-
import { getDefaultVideoSourceFactory } from "../../engine/runtime-defaults.js";
|
|
5
|
-
import { createSignal } from "../../engine/signal.js";
|
|
6
|
-
import { applySize, parseSize } from "../../layout/flex/engine.js";
|
|
7
|
-
import { PreviewAudioDriver } from "../audio/audio-for-preview.js";
|
|
8
|
-
import { RenderingAudioDriver } from "../audio/audio-for-rendering.js";
|
|
9
|
-
import { isSchedulable } from "../audio/audio-source-mediabunny.js";
|
|
10
|
-
import { MEDIA_MARK, VIDEO_MARK } from "../media-marker.js";
|
|
11
|
-
import { PreviewVideoDriver } from "./video-for-preview.js";
|
|
12
|
-
import { RenderingVideoDriver } from "./video-for-rendering.js";
|
|
13
|
-
const VIDEO_KEYS = [
|
|
14
|
-
"src",
|
|
15
|
-
"trimBefore",
|
|
16
|
-
"trimAfter",
|
|
17
|
-
"startFrom",
|
|
18
|
-
"endAt",
|
|
19
|
-
"loop",
|
|
20
|
-
"muted",
|
|
21
|
-
"volume",
|
|
22
|
-
"playbackRate",
|
|
23
|
-
"objectFit",
|
|
24
|
-
"objectPosition",
|
|
25
|
-
"flexGrow",
|
|
26
|
-
"flexShrink",
|
|
27
|
-
"flexBasis",
|
|
28
|
-
"alignSelf",
|
|
29
|
-
"margin",
|
|
30
|
-
"sourceFactory",
|
|
31
|
-
];
|
|
32
|
-
function pickKonvaConfig(config) {
|
|
33
|
-
const out = { ...config };
|
|
34
|
-
for (const k of VIDEO_KEYS)
|
|
35
|
-
delete out[k];
|
|
36
|
-
const w = parseSize(config.width);
|
|
37
|
-
const h = parseSize(config.height);
|
|
38
|
-
out.width = w?.kind === "px" ? w.value : undefined;
|
|
39
|
-
out.height = h?.kind === "px" ? h.value : undefined;
|
|
40
|
-
out.cornerRadius = undefined;
|
|
41
|
-
return out;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Timeline-driven video. API mirrors {@link Image} (`new Video({src, ...ImageProps})`)
|
|
45
|
-
* but the frame source is a runtime-agnostic {@link VideoSource} and playback is
|
|
46
|
-
* driven by the composition's frame clock. Picks a {@link RenderingVideoDriver}
|
|
47
|
-
* or {@link PreviewVideoDriver} based on the composition's {@link Environment}.
|
|
48
|
-
*/
|
|
49
|
-
export class Video extends Konva.Group {
|
|
50
|
-
_kmRole = "leaf";
|
|
51
|
-
/** Human label for mixer UIs — `config.name`, falling back to `config.src`. */
|
|
52
|
-
label;
|
|
53
|
-
/** Intrinsic audio level, 0..1 — scaled by the composition mixer's master. */
|
|
54
|
-
volume;
|
|
55
|
-
muted;
|
|
56
|
-
_img;
|
|
57
|
-
// Reassigned on suspend/resume, so not readonly; `!` = set via _acquireSource().
|
|
58
|
-
_source;
|
|
59
|
-
_env;
|
|
60
|
-
_factory;
|
|
61
|
-
_suspended = false;
|
|
62
|
-
_trimBefore;
|
|
63
|
-
_trimAfter;
|
|
64
|
-
_loop;
|
|
65
|
-
_playbackRate;
|
|
66
|
-
_volume;
|
|
67
|
-
_muted;
|
|
68
|
-
_mixer = null;
|
|
69
|
-
_driver = null;
|
|
70
|
-
_audioDriver = null;
|
|
71
|
-
_src;
|
|
72
|
-
constructor(config) {
|
|
73
|
-
super(pickKonvaConfig(config));
|
|
74
|
-
this.setAttr(MEDIA_MARK, true);
|
|
75
|
-
this.setAttr(VIDEO_MARK, true);
|
|
76
|
-
this._src = config.src;
|
|
77
|
-
this._trimBefore = config.trimBefore ?? config.startFrom ?? 0;
|
|
78
|
-
this._trimAfter = config.trimAfter ?? config.endAt;
|
|
79
|
-
this._loop = config.loop ?? false;
|
|
80
|
-
this._playbackRate = config.playbackRate ?? 1;
|
|
81
|
-
this.label = config.name ?? config.src;
|
|
82
|
-
this._volume = createSignal(config.volume ?? 1);
|
|
83
|
-
this._muted = createSignal(config.muted ?? false);
|
|
84
|
-
this.volume = this._volume;
|
|
85
|
-
this.muted = this._muted;
|
|
86
|
-
this._img = new Konva.Image({ image: undefined, listening: false });
|
|
87
|
-
super.add(this._img);
|
|
88
|
-
this.setAttrs({
|
|
89
|
-
flexGrow: config.flexGrow,
|
|
90
|
-
flexShrink: config.flexShrink,
|
|
91
|
-
flexBasis: config.flexBasis,
|
|
92
|
-
alignSelf: config.alignSelf,
|
|
93
|
-
margin: config.margin,
|
|
94
|
-
objectFit: config.objectFit ?? "cover",
|
|
95
|
-
objectPosition: config.objectPosition ?? "center",
|
|
96
|
-
cornerRadius: config.cornerRadius,
|
|
97
|
-
flexWidth: config.width,
|
|
98
|
-
flexHeight: config.height,
|
|
99
|
-
});
|
|
100
|
-
if (config.cornerRadius !== undefined) {
|
|
101
|
-
const cr = normalizeCorners(config.cornerRadius);
|
|
102
|
-
this.clipFunc((ctx) => roundRectPath(ctx, 0, 0, this.width(), this.height(), cr));
|
|
103
|
-
}
|
|
104
|
-
this.on("widthChange heightChange", () => this._layoutImage());
|
|
105
|
-
// Build the source eagerly so loading starts immediately. The driver (which
|
|
106
|
-
// needs the attached stage's composition) is resolved lazily on first tick.
|
|
107
|
-
this._env = detectEnvironment();
|
|
108
|
-
this._factory = config.sourceFactory ?? getDefaultVideoSourceFactory();
|
|
109
|
-
this._acquireSource();
|
|
110
|
-
this._layoutImage();
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Create the media source and start loading it. Called once at construction
|
|
114
|
-
* and again by {@link _kmResume} after {@link _kmSuspend} dropped it.
|
|
115
|
-
*/
|
|
116
|
-
_acquireSource() {
|
|
117
|
-
this._source = this._factory(this._env);
|
|
118
|
-
this._applyAudio(); // honor config/mixer volume+muted before playback
|
|
119
|
-
this._source.setPlaybackRate(this._playbackRate);
|
|
120
|
-
this._source.onReady(() => {
|
|
121
|
-
const el = this._source.element;
|
|
122
|
-
if (el)
|
|
123
|
-
this._img.image(el);
|
|
124
|
-
this._layoutImage();
|
|
125
|
-
this.getLayer()?.batchDraw();
|
|
126
|
-
});
|
|
127
|
-
this._source.onFrame(() => {
|
|
128
|
-
this.getLayer()?.batchDraw();
|
|
129
|
-
});
|
|
130
|
-
this._source.load(this._src).catch((err) => {
|
|
131
|
-
console.error("[smoove] Video load failed:", err);
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
/** @internal — {@link Composition.suspend}: drop the source to stop downloading/decoding. */
|
|
135
|
-
_kmSuspend() {
|
|
136
|
-
if (this._suspended)
|
|
137
|
-
return;
|
|
138
|
-
this._suspended = true;
|
|
139
|
-
this._driver?.dispose();
|
|
140
|
-
this._driver = null;
|
|
141
|
-
this._audioDriver?.dispose();
|
|
142
|
-
this._audioDriver = null;
|
|
143
|
-
this._source.destroy();
|
|
144
|
-
this._img.image(undefined);
|
|
145
|
-
this.getLayer()?.batchDraw();
|
|
146
|
-
}
|
|
147
|
-
/** @internal — {@link Composition.resume}: re-acquire the dropped source. */
|
|
148
|
-
_kmResume() {
|
|
149
|
-
if (!this._suspended)
|
|
150
|
-
return;
|
|
151
|
-
this._suspended = false;
|
|
152
|
-
this._acquireSource();
|
|
153
|
-
}
|
|
154
|
-
/** @internal — called by Sequence on each tick while this video is on-stage. */
|
|
155
|
-
_kmTick(localFrame) {
|
|
156
|
-
const driver = this._ensureDriver();
|
|
157
|
-
driver?.tick(localFrame);
|
|
158
|
-
this._audioDriver?.tick(localFrame);
|
|
159
|
-
}
|
|
160
|
-
/** @internal — called by Sequence when it goes out of range. */
|
|
161
|
-
_kmDeactivate() {
|
|
162
|
-
this._driver?.deactivate();
|
|
163
|
-
this._audioDriver?.deactivate();
|
|
164
|
-
}
|
|
165
|
-
/** @internal — {@link KMLayoutNode}: size from explicit width/height (cover/contain handle the rest). */
|
|
166
|
-
_kmMeasure(node) {
|
|
167
|
-
applySize(node, this.attrs.flexWidth, this.attrs.flexHeight);
|
|
168
|
-
}
|
|
169
|
-
/** @internal — {@link KMLayoutNode}: write the computed box back + re-fit the frame. */
|
|
170
|
-
_kmPlace(box) {
|
|
171
|
-
this.x(box.left);
|
|
172
|
-
this.y(box.top);
|
|
173
|
-
this.width(box.width);
|
|
174
|
-
this.height(box.height);
|
|
175
|
-
this._layoutImage();
|
|
176
|
-
}
|
|
177
|
-
_ensureDriver() {
|
|
178
|
-
if (this._driver)
|
|
179
|
-
return this._driver;
|
|
180
|
-
const stage = this.getStage();
|
|
181
|
-
if (!stage)
|
|
182
|
-
return null;
|
|
183
|
-
const comp = getComposition(stage);
|
|
184
|
-
if (!comp)
|
|
185
|
-
return null;
|
|
186
|
-
// Lazy fallback for videos added after their sequence was registered.
|
|
187
|
-
comp.mixer.register(this);
|
|
188
|
-
const timing = {
|
|
189
|
-
fps: comp.fps,
|
|
190
|
-
trimBefore: this._trimBefore,
|
|
191
|
-
trimAfter: this._trimAfter,
|
|
192
|
-
loop: this._loop,
|
|
193
|
-
playbackRate: this._playbackRate,
|
|
194
|
-
};
|
|
195
|
-
const ctx = {
|
|
196
|
-
source: this._source,
|
|
197
|
-
timing,
|
|
198
|
-
comp,
|
|
199
|
-
redraw: () => {
|
|
200
|
-
this._layoutImage();
|
|
201
|
-
this.getLayer()?.batchDraw();
|
|
202
|
-
},
|
|
203
|
-
};
|
|
204
|
-
if (getEnvironment(stage).isRendering) {
|
|
205
|
-
this._driver = new RenderingVideoDriver(ctx);
|
|
206
|
-
// Record the file's soundtrack as audio assets so the server mux can decode
|
|
207
|
-
// and mix it (videos with no audio track simply yield no audible PCM).
|
|
208
|
-
const audioCtx = {
|
|
209
|
-
source: this._source,
|
|
210
|
-
timing,
|
|
211
|
-
comp,
|
|
212
|
-
id: this.id() || `video-${this._id}`,
|
|
213
|
-
src: this._src,
|
|
214
|
-
effectiveVolume: () => {
|
|
215
|
-
const m = this._mixer;
|
|
216
|
-
return (m ? m.volume.get() : 1) * this._volume.get();
|
|
217
|
-
},
|
|
218
|
-
effectiveMuted: () => {
|
|
219
|
-
const m = this._mixer;
|
|
220
|
-
return (m ? m.muted.get() : false) || this._muted.get();
|
|
221
|
-
},
|
|
222
|
-
};
|
|
223
|
-
this._audioDriver = new RenderingAudioDriver(audioCtx);
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
this._driver = new PreviewVideoDriver(ctx);
|
|
227
|
-
// In preview, schedule the file's own soundtrack through the shared Web
|
|
228
|
-
// Audio context — same scheduler the standalone Audio node uses. (The
|
|
229
|
-
// rendering branch above records it as audio assets for the server mux.)
|
|
230
|
-
if (isSchedulable(this._source)) {
|
|
231
|
-
const audioCtx = {
|
|
232
|
-
source: this._source,
|
|
233
|
-
timing,
|
|
234
|
-
comp,
|
|
235
|
-
id: this.id() || `video-${this._id}`,
|
|
236
|
-
src: this._src,
|
|
237
|
-
effectiveVolume: () => {
|
|
238
|
-
const m = this._mixer;
|
|
239
|
-
return (m ? m.volume.get() : 1) * this._volume.get();
|
|
240
|
-
},
|
|
241
|
-
effectiveMuted: () => {
|
|
242
|
-
const m = this._mixer;
|
|
243
|
-
return (m ? m.muted.get() : false) || this._muted.get();
|
|
244
|
-
},
|
|
245
|
-
};
|
|
246
|
-
this._audioDriver = new PreviewAudioDriver(audioCtx);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return this._driver;
|
|
250
|
-
}
|
|
251
|
-
setMuted(muted) {
|
|
252
|
-
this._muted.set(muted);
|
|
253
|
-
this._applyAudio();
|
|
254
|
-
}
|
|
255
|
-
setVolume(volume) {
|
|
256
|
-
this._volume.set(Math.max(0, Math.min(1, volume)));
|
|
257
|
-
this._applyAudio();
|
|
258
|
-
}
|
|
259
|
-
/** @internal — {@link AudioMixer} hands us the bus (or null on unregister). */
|
|
260
|
-
_bindMixer(mixer) {
|
|
261
|
-
this._mixer = mixer;
|
|
262
|
-
this._applyAudio();
|
|
263
|
-
}
|
|
264
|
-
/** @internal — push effective level (master × intrinsic) to the source. */
|
|
265
|
-
_applyAudio() {
|
|
266
|
-
const m = this._mixer;
|
|
267
|
-
const master = m ? m.volume.get() : 1;
|
|
268
|
-
const masterMuted = m ? m.muted.get() : false;
|
|
269
|
-
this._source.setVolume(master * this._volume.get());
|
|
270
|
-
this._source.setMuted(masterMuted || this._muted.get());
|
|
271
|
-
}
|
|
272
|
-
setPlaybackRate(rate) {
|
|
273
|
-
this._source.setPlaybackRate(rate);
|
|
274
|
-
}
|
|
275
|
-
destroy() {
|
|
276
|
-
this._mixer?.unregister(this);
|
|
277
|
-
this._mixer = null;
|
|
278
|
-
this._driver?.dispose();
|
|
279
|
-
this._driver = null;
|
|
280
|
-
this._audioDriver?.dispose();
|
|
281
|
-
this._audioDriver = null;
|
|
282
|
-
this._source.destroy();
|
|
283
|
-
return super.destroy();
|
|
284
|
-
}
|
|
285
|
-
/** @internal */
|
|
286
|
-
_layoutImage() {
|
|
287
|
-
const w = this.width();
|
|
288
|
-
const h = this.height();
|
|
289
|
-
if (w <= 0 || h <= 0)
|
|
290
|
-
return;
|
|
291
|
-
const fit = (this.attrs.objectFit ?? "cover");
|
|
292
|
-
const pos = (this.attrs.objectPosition ?? "center");
|
|
293
|
-
const nw = this._source.naturalWidth;
|
|
294
|
-
const nh = this._source.naturalHeight;
|
|
295
|
-
if (!this._source.isReady || nw === 0 || nh === 0)
|
|
296
|
-
return;
|
|
297
|
-
if (fit === "fill") {
|
|
298
|
-
this._img.position({ x: 0, y: 0 });
|
|
299
|
-
this._img.size({ width: w, height: h });
|
|
300
|
-
this._img.crop({ x: 0, y: 0, width: nw, height: nh });
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
if (fit === "none") {
|
|
304
|
-
const { x, y } = positionOffset(pos, w - nw, h - nh);
|
|
305
|
-
this._img.position({ x, y });
|
|
306
|
-
this._img.size({ width: nw, height: nh });
|
|
307
|
-
this._img.crop({ x: 0, y: 0, width: nw, height: nh });
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
if (fit === "contain") {
|
|
311
|
-
const scale = Math.min(w / nw, h / nh);
|
|
312
|
-
const dw = nw * scale;
|
|
313
|
-
const dh = nh * scale;
|
|
314
|
-
const { x, y } = positionOffset(pos, w - dw, h - dh);
|
|
315
|
-
this._img.position({ x, y });
|
|
316
|
-
this._img.size({ width: dw, height: dh });
|
|
317
|
-
this._img.crop({ x: 0, y: 0, width: nw, height: nh });
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
const scale = Math.max(w / nw, h / nh);
|
|
321
|
-
const cropW = w / scale;
|
|
322
|
-
const cropH = h / scale;
|
|
323
|
-
const { x: cx, y: cy } = positionOffset(pos, nw - cropW, nh - cropH);
|
|
324
|
-
this._img.position({ x: 0, y: 0 });
|
|
325
|
-
this._img.size({ width: w, height: h });
|
|
326
|
-
this._img.crop({ x: cx, y: cy, width: cropW, height: cropH });
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
export function isVideoNode(node) {
|
|
330
|
-
return node.getAttr(VIDEO_MARK) === true;
|
|
331
|
-
}
|
|
332
|
-
function positionOffset(pos, freeX, freeY) {
|
|
333
|
-
let fx = 0.5;
|
|
334
|
-
let fy = 0.5;
|
|
335
|
-
if (pos.includes("left"))
|
|
336
|
-
fx = 0;
|
|
337
|
-
else if (pos.includes("right"))
|
|
338
|
-
fx = 1;
|
|
339
|
-
if (pos.includes("top"))
|
|
340
|
-
fy = 0;
|
|
341
|
-
else if (pos.includes("bottom"))
|
|
342
|
-
fy = 1;
|
|
343
|
-
if (pos === "center") {
|
|
344
|
-
fx = 0.5;
|
|
345
|
-
fy = 0.5;
|
|
346
|
-
}
|
|
347
|
-
return { x: freeX * fx, y: freeY * fy };
|
|
348
|
-
}
|
|
349
|
-
function normalizeCorners(c) {
|
|
350
|
-
if (typeof c === "number")
|
|
351
|
-
return [c, c, c, c];
|
|
352
|
-
if (c.length === 1)
|
|
353
|
-
return [c[0] ?? 0, c[0] ?? 0, c[0] ?? 0, c[0] ?? 0];
|
|
354
|
-
if (c.length === 2)
|
|
355
|
-
return [c[0] ?? 0, c[1] ?? 0, c[0] ?? 0, c[1] ?? 0];
|
|
356
|
-
return [c[0] ?? 0, c[1] ?? 0, c[2] ?? 0, c[3] ?? 0];
|
|
357
|
-
}
|
|
358
|
-
function roundRectPath(ctx, x, y, w, h, r) {
|
|
359
|
-
const [tl, tr, br, bl] = r;
|
|
360
|
-
ctx.beginPath();
|
|
361
|
-
ctx.moveTo(x + (tl ?? 0), y);
|
|
362
|
-
ctx.lineTo(x + w - (tr ?? 0), y);
|
|
363
|
-
ctx.quadraticCurveTo(x + w, y, x + w, y + (tr ?? 0));
|
|
364
|
-
ctx.lineTo(x + w, y + h - (br ?? 0));
|
|
365
|
-
ctx.quadraticCurveTo(x + w, y + h, x + w - (br ?? 0), y + h);
|
|
366
|
-
ctx.lineTo(x + (bl ?? 0), y + h);
|
|
367
|
-
ctx.quadraticCurveTo(x, y + h, x, y + h - (bl ?? 0));
|
|
368
|
-
ctx.lineTo(x, y + (tl ?? 0));
|
|
369
|
-
ctx.quadraticCurveTo(x, y, x + (tl ?? 0), y);
|
|
370
|
-
ctx.closePath();
|
|
371
|
-
}
|
|
372
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0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