@lalalic/markcut 2.8.0 → 3.0.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/B] +2 -0
- package/README.md +29 -0
- package/package.json +1 -1
- package/skills/markcut/SKILL.md +12 -45
- package/skills/markcut/docs/components.md +89 -0
- package/skills/markcut/docs/markdown-descriptive.md +17 -2
- package/skills/markcut/docs/sound-effects.md +45 -0
- package/src/components/Markdown.tsx +138 -24
- package/src/components/Mermaid.tsx +223 -22
- package/src/config.mjs +2 -2
- package/src/context/EventContext.tsx +3 -0
- package/src/descriptive/compiler.ts +68 -29
- package/src/descriptive/markdown.ts +20 -0
- package/src/player/browser.tsx +95 -5
- package/src/player/bundle/player.js +1078 -629
- package/src/player/components/EditControls.tsx +6 -3
- package/src/player/components/EditMessagePanel.tsx +96 -0
- package/src/player/components/HeaderBar.tsx +9 -11
- package/src/player/components/index.ts +1 -0
- package/src/player/pipeline.mjs +72 -21
- package/src/player/server-shared.mjs +4 -1
- package/src/player/server.mjs +202 -42
- package/src/render/cli.mjs +1 -1
- package/src/schema/index.ts +4 -1
- package/src/types/Component.tsx +27 -1
- package/src/types/Effect.tsx +13 -6
- package/src/types/Folder.tsx +1 -1
- package/src/types/Map.tsx +51 -1
- package/src/utils/index.ts +14 -2
- package/tests/fixtures/md/animate-diagrams.md +40 -0
- package/tests/fixtures/md/electricity-grow.md +130 -0
- package/tests/tmp/vision-1785081637127-video/videos/.normalized/segments/test-clip_0to3_seg_1100to3000.mp4 +0 -0
- package/tests/tmp/vision-1785081637127-video/videos/.normalized/test-clip_0to3.mp4 +0 -0
- package/tests/tmp/vision-1785081637127-video/videos/.normalized/test-clip_audio.mp3 +0 -0
- package/tests/tmp/vision-1785081637127-video/videos/metadata.json +9 -0
- package/tests/tmp/vision-1785081637127-video/videos/test-clip.mp4 +0 -0
- package/tests/tmp/vision-1785081637127-video/videos/test-clip.vtt +5 -0
- package/tests/tmp/vision-1784830584961/images/.normalized/test-photo_384.jpg +0 -0
- package/tests/tmp/vision-1784830584961/images/metadata.json +0 -8
- package/tests/tmp/vision-1784830584961/images/test-photo.png +0 -0
- package/tmp/frontmatter-test.ts +0 -21
|
@@ -122,7 +122,7 @@ var require_react_production = __commonJS({
|
|
|
122
122
|
function cloneAndReplaceKey(oldElement, newKey) {
|
|
123
123
|
return ReactElement(oldElement.type, newKey, oldElement.props);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function isValidElement2(object4) {
|
|
126
126
|
return "object" === typeof object4 && null !== object4 && object4.$$typeof === REACT_ELEMENT_TYPE;
|
|
127
127
|
}
|
|
128
128
|
function escape3(key) {
|
|
@@ -189,7 +189,7 @@ var require_react_production = __commonJS({
|
|
|
189
189
|
if (invokeCallback)
|
|
190
190
|
return callback = callback(children2), invokeCallback = "" === nameSoFar ? "." + getElementKey(children2, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array5, escapedPrefix, "", function(c5) {
|
|
191
191
|
return c5;
|
|
192
|
-
})) : null != callback && (
|
|
192
|
+
})) : null != callback && (isValidElement2(callback) && (callback = cloneAndReplaceKey(
|
|
193
193
|
callback,
|
|
194
194
|
escapedPrefix + (null == callback.key || children2 && children2.key === callback.key ? "" : ("" + callback.key).replace(
|
|
195
195
|
userProvidedKeyEscapeRegex,
|
|
@@ -298,7 +298,7 @@ var require_react_production = __commonJS({
|
|
|
298
298
|
}) || [];
|
|
299
299
|
},
|
|
300
300
|
only: function(children2) {
|
|
301
|
-
if (!
|
|
301
|
+
if (!isValidElement2(children2))
|
|
302
302
|
throw Error(
|
|
303
303
|
"React.Children.only expected to receive a single React element child."
|
|
304
304
|
);
|
|
@@ -385,7 +385,7 @@ var require_react_production = __commonJS({
|
|
|
385
385
|
exports2.forwardRef = function(render8) {
|
|
386
386
|
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render8 };
|
|
387
387
|
};
|
|
388
|
-
exports2.isValidElement =
|
|
388
|
+
exports2.isValidElement = isValidElement2;
|
|
389
389
|
exports2.lazy = function(ctor) {
|
|
390
390
|
return {
|
|
391
391
|
$$typeof: REACT_LAZY_TYPE,
|
|
@@ -781,7 +781,7 @@ var require_scheduler = __commonJS({
|
|
|
781
781
|
var require_react_dom_production = __commonJS({
|
|
782
782
|
"node_modules/react-dom/cjs/react-dom.production.js"(exports2) {
|
|
783
783
|
"use strict";
|
|
784
|
-
var
|
|
784
|
+
var React59 = require_react();
|
|
785
785
|
function formatProdErrorMessage(code4) {
|
|
786
786
|
var url2 = "https://react.dev/errors/" + code4;
|
|
787
787
|
if (1 < arguments.length) {
|
|
@@ -821,7 +821,7 @@ var require_react_dom_production = __commonJS({
|
|
|
821
821
|
implementation
|
|
822
822
|
};
|
|
823
823
|
}
|
|
824
|
-
var ReactSharedInternals =
|
|
824
|
+
var ReactSharedInternals = React59.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
825
825
|
function getCrossOriginStringAs(as, input) {
|
|
826
826
|
if ("font" === as) return "";
|
|
827
827
|
if ("string" === typeof input)
|
|
@@ -957,7 +957,7 @@ var require_react_dom_client_production = __commonJS({
|
|
|
957
957
|
"node_modules/react-dom/cjs/react-dom-client.production.js"(exports2) {
|
|
958
958
|
"use strict";
|
|
959
959
|
var Scheduler = require_scheduler();
|
|
960
|
-
var
|
|
960
|
+
var React59 = require_react();
|
|
961
961
|
var ReactDOM3 = require_react_dom();
|
|
962
962
|
function formatProdErrorMessage(code4) {
|
|
963
963
|
var url2 = "https://react.dev/errors/" + code4;
|
|
@@ -1148,7 +1148,7 @@ var require_react_dom_client_production = __commonJS({
|
|
|
1148
1148
|
return null;
|
|
1149
1149
|
}
|
|
1150
1150
|
var isArrayImpl = Array.isArray;
|
|
1151
|
-
var ReactSharedInternals =
|
|
1151
|
+
var ReactSharedInternals = React59.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
1152
1152
|
var ReactDOMSharedInternals = ReactDOM3.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
1153
1153
|
var sharedNotPendingObject = {
|
|
1154
1154
|
pending: false,
|
|
@@ -12594,7 +12594,7 @@ var require_react_dom_client_production = __commonJS({
|
|
|
12594
12594
|
0 === i5 && attemptExplicitHydrationTarget(target);
|
|
12595
12595
|
}
|
|
12596
12596
|
};
|
|
12597
|
-
var isomorphicReactPackageVersion$jscomp$inline_1840 =
|
|
12597
|
+
var isomorphicReactPackageVersion$jscomp$inline_1840 = React59.version;
|
|
12598
12598
|
if ("19.2.5" !== isomorphicReactPackageVersion$jscomp$inline_1840)
|
|
12599
12599
|
throw Error(
|
|
12600
12600
|
formatProdErrorMessage(
|
|
@@ -195443,7 +195443,7 @@ var require_fast_deep_equal = __commonJS({
|
|
|
195443
195443
|
});
|
|
195444
195444
|
|
|
195445
195445
|
// src/player/browser.tsx
|
|
195446
|
-
var
|
|
195446
|
+
var React58 = __toESM(require_react(), 1);
|
|
195447
195447
|
var import_client = __toESM(require_client(), 1);
|
|
195448
195448
|
var ReactDOM2 = __toESM(require_react_dom(), 1);
|
|
195449
195449
|
|
|
@@ -210595,9 +210595,331 @@ var ReactDOM = __toESM(require_react_dom(), 1);
|
|
|
210595
210595
|
var components_exports = {};
|
|
210596
210596
|
__export(components_exports, {
|
|
210597
210597
|
Markdown: () => Markdown2,
|
|
210598
|
-
Mermaid: () => Mermaid
|
|
210598
|
+
Mermaid: () => Mermaid,
|
|
210599
|
+
StoryboardCaption: () => StoryboardCaption,
|
|
210600
|
+
StoryboardInfo: () => StoryboardInfo,
|
|
210601
|
+
StoryboardSlot: () => StoryboardSlot
|
|
210599
210602
|
});
|
|
210600
210603
|
|
|
210604
|
+
// src/components/StoryboardSlot.tsx
|
|
210605
|
+
var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
|
|
210606
|
+
function StoryboardSlot({ kind, prompt }) {
|
|
210607
|
+
const isVideo = kind === "video";
|
|
210608
|
+
const bgGrad = isVideo ? "linear-gradient(135deg,#7c2d12,#b91c1c)" : "linear-gradient(135deg,#1e3a8a,#6d28d9)";
|
|
210609
|
+
const accentColor = isVideo ? "#fbbf24" : "#93c5fd";
|
|
210610
|
+
const label3 = isVideo ? "Video" : "Image";
|
|
210611
|
+
const emoji3 = isVideo ? "\u{1F3AC}" : "\u{1F5BC}\uFE0F";
|
|
210612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
210613
|
+
"div",
|
|
210614
|
+
{
|
|
210615
|
+
style: {
|
|
210616
|
+
position: "absolute",
|
|
210617
|
+
inset: 0,
|
|
210618
|
+
overflow: "hidden",
|
|
210619
|
+
display: "flex",
|
|
210620
|
+
flexDirection: "column",
|
|
210621
|
+
alignItems: "center",
|
|
210622
|
+
justifyContent: "center",
|
|
210623
|
+
background: bgGrad,
|
|
210624
|
+
color: "#fff",
|
|
210625
|
+
fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
|
|
210626
|
+
padding: "6%",
|
|
210627
|
+
boxSizing: "border-box"
|
|
210628
|
+
},
|
|
210629
|
+
children: [
|
|
210630
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
210631
|
+
"div",
|
|
210632
|
+
{
|
|
210633
|
+
style: {
|
|
210634
|
+
position: "absolute",
|
|
210635
|
+
inset: "4%",
|
|
210636
|
+
border: "3px dashed rgba(255,255,255,0.35)",
|
|
210637
|
+
borderRadius: 24,
|
|
210638
|
+
pointerEvents: "none"
|
|
210639
|
+
}
|
|
210640
|
+
}
|
|
210641
|
+
),
|
|
210642
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
210643
|
+
"div",
|
|
210644
|
+
{
|
|
210645
|
+
style: {
|
|
210646
|
+
display: "flex",
|
|
210647
|
+
alignItems: "center",
|
|
210648
|
+
gap: "0.5em",
|
|
210649
|
+
background: "rgba(0,0,0,0.35)",
|
|
210650
|
+
border: `2px solid ${accentColor}`,
|
|
210651
|
+
borderRadius: 999,
|
|
210652
|
+
padding: "0.5em 1.1em",
|
|
210653
|
+
fontSize: "2.2vh",
|
|
210654
|
+
fontWeight: 800,
|
|
210655
|
+
letterSpacing: "0.12em",
|
|
210656
|
+
marginBottom: "3vh"
|
|
210657
|
+
},
|
|
210658
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { fontSize: "3.4vh", lineHeight: 1 }, children: emoji3 })
|
|
210659
|
+
}
|
|
210660
|
+
),
|
|
210661
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
210662
|
+
"div",
|
|
210663
|
+
{
|
|
210664
|
+
style: {
|
|
210665
|
+
position: "relative",
|
|
210666
|
+
maxWidth: "88%",
|
|
210667
|
+
textAlign: "center",
|
|
210668
|
+
fontSize: "3.4vh",
|
|
210669
|
+
lineHeight: 1.4,
|
|
210670
|
+
fontWeight: 600,
|
|
210671
|
+
textShadow: "0 2px 8px rgba(0,0,0,0.5)",
|
|
210672
|
+
whiteSpace: "pre-wrap",
|
|
210673
|
+
wordBreak: "break-word"
|
|
210674
|
+
},
|
|
210675
|
+
children: prompt ?? (isVideo ? "(no video prompt)" : "(no image prompt)")
|
|
210676
|
+
}
|
|
210677
|
+
)
|
|
210678
|
+
]
|
|
210679
|
+
}
|
|
210680
|
+
);
|
|
210681
|
+
}
|
|
210682
|
+
|
|
210683
|
+
// src/components/StoryboardCaption.tsx
|
|
210684
|
+
var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
|
|
210685
|
+
function StoryboardCaption({ script: script2, speaker }) {
|
|
210686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
210687
|
+
"div",
|
|
210688
|
+
{
|
|
210689
|
+
style: {
|
|
210690
|
+
position: "absolute",
|
|
210691
|
+
bottom: "10%",
|
|
210692
|
+
left: "5%",
|
|
210693
|
+
right: "5%",
|
|
210694
|
+
display: "flex",
|
|
210695
|
+
flexDirection: "column",
|
|
210696
|
+
alignItems: "center",
|
|
210697
|
+
pointerEvents: "none"
|
|
210698
|
+
},
|
|
210699
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
210700
|
+
"div",
|
|
210701
|
+
{
|
|
210702
|
+
style: {
|
|
210703
|
+
maxWidth: "90%",
|
|
210704
|
+
background: "rgba(0,0,0,0.7)",
|
|
210705
|
+
backdropFilter: "blur(4px)",
|
|
210706
|
+
borderRadius: 16,
|
|
210707
|
+
padding: "2.5vh 4vh",
|
|
210708
|
+
textAlign: "center",
|
|
210709
|
+
color: "#fff",
|
|
210710
|
+
fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif"
|
|
210711
|
+
},
|
|
210712
|
+
children: [
|
|
210713
|
+
speaker && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
210714
|
+
"div",
|
|
210715
|
+
{
|
|
210716
|
+
style: {
|
|
210717
|
+
fontSize: "2vh",
|
|
210718
|
+
fontWeight: 700,
|
|
210719
|
+
color: "#93c5fd",
|
|
210720
|
+
marginBottom: "0.6vh",
|
|
210721
|
+
letterSpacing: "0.04em"
|
|
210722
|
+
},
|
|
210723
|
+
children: speaker
|
|
210724
|
+
}
|
|
210725
|
+
),
|
|
210726
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
210727
|
+
"div",
|
|
210728
|
+
{
|
|
210729
|
+
style: {
|
|
210730
|
+
fontSize: "2.6vh",
|
|
210731
|
+
lineHeight: 1.5,
|
|
210732
|
+
fontWeight: 500,
|
|
210733
|
+
textShadow: "0 1px 4px rgba(0,0,0,0.4)",
|
|
210734
|
+
whiteSpace: "pre-wrap",
|
|
210735
|
+
wordBreak: "break-word"
|
|
210736
|
+
},
|
|
210737
|
+
children: script2
|
|
210738
|
+
}
|
|
210739
|
+
)
|
|
210740
|
+
]
|
|
210741
|
+
}
|
|
210742
|
+
)
|
|
210743
|
+
}
|
|
210744
|
+
);
|
|
210745
|
+
}
|
|
210746
|
+
|
|
210747
|
+
// src/components/StoryboardInfo.tsx
|
|
210748
|
+
var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
|
|
210749
|
+
function StoryboardInfo({ config: config4, variants, frontmatter }) {
|
|
210750
|
+
const parts = (config4 ?? "").split(" \xB7 ").filter(Boolean);
|
|
210751
|
+
const variantList = (variants ?? "").split(/,\s*/).filter(Boolean);
|
|
210752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
210753
|
+
"div",
|
|
210754
|
+
{
|
|
210755
|
+
style: {
|
|
210756
|
+
position: "absolute",
|
|
210757
|
+
inset: 0,
|
|
210758
|
+
display: "flex",
|
|
210759
|
+
flexDirection: "column",
|
|
210760
|
+
alignItems: "center",
|
|
210761
|
+
justifyContent: "center",
|
|
210762
|
+
background: "linear-gradient(135deg,#0f172a,#1e293b,#334155)",
|
|
210763
|
+
color: "#fff",
|
|
210764
|
+
fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
|
|
210765
|
+
padding: "8%",
|
|
210766
|
+
boxSizing: "border-box"
|
|
210767
|
+
},
|
|
210768
|
+
children: [
|
|
210769
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210770
|
+
"div",
|
|
210771
|
+
{
|
|
210772
|
+
style: {
|
|
210773
|
+
position: "absolute",
|
|
210774
|
+
inset: "5%",
|
|
210775
|
+
border: "2px solid rgba(255,255,255,0.08)",
|
|
210776
|
+
borderRadius: "50%"
|
|
210777
|
+
}
|
|
210778
|
+
}
|
|
210779
|
+
),
|
|
210780
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210781
|
+
"div",
|
|
210782
|
+
{
|
|
210783
|
+
style: {
|
|
210784
|
+
position: "absolute",
|
|
210785
|
+
inset: "12%",
|
|
210786
|
+
border: "1px solid rgba(255,255,255,0.05)",
|
|
210787
|
+
borderRadius: "50%"
|
|
210788
|
+
}
|
|
210789
|
+
}
|
|
210790
|
+
),
|
|
210791
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { style: { fontSize: "6vh", marginBottom: "2.5vh", opacity: 0.7 }, children: "\u{1F3AC}" }),
|
|
210792
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210793
|
+
"div",
|
|
210794
|
+
{
|
|
210795
|
+
style: {
|
|
210796
|
+
fontSize: "4.2vh",
|
|
210797
|
+
fontWeight: 800,
|
|
210798
|
+
letterSpacing: "0.02em",
|
|
210799
|
+
marginBottom: "3vh",
|
|
210800
|
+
textAlign: "center",
|
|
210801
|
+
textShadow: "0 2px 12px rgba(0,0,0,0.5)"
|
|
210802
|
+
},
|
|
210803
|
+
children: "Storyboard Preview"
|
|
210804
|
+
}
|
|
210805
|
+
),
|
|
210806
|
+
parts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210807
|
+
"div",
|
|
210808
|
+
{
|
|
210809
|
+
style: {
|
|
210810
|
+
display: "flex",
|
|
210811
|
+
flexWrap: "wrap",
|
|
210812
|
+
justifyContent: "center",
|
|
210813
|
+
gap: "1.2vh",
|
|
210814
|
+
maxWidth: "85%",
|
|
210815
|
+
marginBottom: variantList.length > 0 ? "2.5vh" : 0
|
|
210816
|
+
},
|
|
210817
|
+
children: parts.map((entry) => {
|
|
210818
|
+
const colonIdx = entry.indexOf(":");
|
|
210819
|
+
const label3 = colonIdx > 0 ? entry.slice(0, colonIdx).trim() : "";
|
|
210820
|
+
const value2 = colonIdx > 0 ? entry.slice(colonIdx + 1).trim() : entry;
|
|
210821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
210822
|
+
"div",
|
|
210823
|
+
{
|
|
210824
|
+
style: {
|
|
210825
|
+
background: "rgba(255,255,255,0.07)",
|
|
210826
|
+
border: "1px solid rgba(255,255,255,0.12)",
|
|
210827
|
+
borderRadius: 12,
|
|
210828
|
+
padding: "1.2vh 2.2vh",
|
|
210829
|
+
textAlign: "center",
|
|
210830
|
+
minWidth: "16vh"
|
|
210831
|
+
},
|
|
210832
|
+
children: [
|
|
210833
|
+
label3 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210834
|
+
"div",
|
|
210835
|
+
{
|
|
210836
|
+
style: {
|
|
210837
|
+
fontSize: "1.6vh",
|
|
210838
|
+
fontWeight: 600,
|
|
210839
|
+
color: "#93c5fd",
|
|
210840
|
+
letterSpacing: "0.08em",
|
|
210841
|
+
textTransform: "uppercase",
|
|
210842
|
+
marginBottom: "0.4vh"
|
|
210843
|
+
},
|
|
210844
|
+
children: label3
|
|
210845
|
+
}
|
|
210846
|
+
),
|
|
210847
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210848
|
+
"div",
|
|
210849
|
+
{
|
|
210850
|
+
style: {
|
|
210851
|
+
fontSize: "2.2vh",
|
|
210852
|
+
fontWeight: 700,
|
|
210853
|
+
whiteSpace: "pre-wrap",
|
|
210854
|
+
wordBreak: "break-word",
|
|
210855
|
+
opacity: value2.startsWith("http") ? 0.8 : 1
|
|
210856
|
+
},
|
|
210857
|
+
children: value2
|
|
210858
|
+
}
|
|
210859
|
+
)
|
|
210860
|
+
]
|
|
210861
|
+
},
|
|
210862
|
+
label3 || entry
|
|
210863
|
+
);
|
|
210864
|
+
})
|
|
210865
|
+
}
|
|
210866
|
+
),
|
|
210867
|
+
frontmatter && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210868
|
+
"div",
|
|
210869
|
+
{
|
|
210870
|
+
style: {
|
|
210871
|
+
maxWidth: "85%",
|
|
210872
|
+
background: "rgba(255,255,255,0.05)",
|
|
210873
|
+
border: "1px solid rgba(255,255,255,0.1)",
|
|
210874
|
+
borderRadius: 12,
|
|
210875
|
+
padding: "1.5vh 2.5vh",
|
|
210876
|
+
marginBottom: "2.5vh",
|
|
210877
|
+
fontFamily: "monospace",
|
|
210878
|
+
fontSize: "1.8vh",
|
|
210879
|
+
lineHeight: 1.6,
|
|
210880
|
+
color: "rgba(255,255,255,0.8)",
|
|
210881
|
+
whiteSpace: "pre-wrap",
|
|
210882
|
+
wordBreak: "break-word",
|
|
210883
|
+
textAlign: "left",
|
|
210884
|
+
maxHeight: "28vh",
|
|
210885
|
+
overflow: "auto"
|
|
210886
|
+
},
|
|
210887
|
+
children: frontmatter
|
|
210888
|
+
}
|
|
210889
|
+
),
|
|
210890
|
+
variantList.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210891
|
+
"div",
|
|
210892
|
+
{
|
|
210893
|
+
style: {
|
|
210894
|
+
display: "flex",
|
|
210895
|
+
flexWrap: "wrap",
|
|
210896
|
+
justifyContent: "center",
|
|
210897
|
+
gap: "1vh"
|
|
210898
|
+
},
|
|
210899
|
+
children: variantList.map((v5) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
210900
|
+
"div",
|
|
210901
|
+
{
|
|
210902
|
+
style: {
|
|
210903
|
+
background: "rgba(251,191,36,0.15)",
|
|
210904
|
+
border: "1px solid rgba(251,191,36,0.35)",
|
|
210905
|
+
borderRadius: 999,
|
|
210906
|
+
padding: "0.8vh 2vh",
|
|
210907
|
+
fontSize: "1.8vh",
|
|
210908
|
+
fontWeight: 600,
|
|
210909
|
+
color: "#fbbf24",
|
|
210910
|
+
letterSpacing: "0.04em"
|
|
210911
|
+
},
|
|
210912
|
+
children: v5
|
|
210913
|
+
},
|
|
210914
|
+
v5
|
|
210915
|
+
))
|
|
210916
|
+
}
|
|
210917
|
+
)
|
|
210918
|
+
]
|
|
210919
|
+
}
|
|
210920
|
+
);
|
|
210921
|
+
}
|
|
210922
|
+
|
|
210601
210923
|
// src/components/Markdown.tsx
|
|
210602
210924
|
var React9 = __toESM(require_react(), 1);
|
|
210603
210925
|
|
|
@@ -212236,11 +212558,11 @@ function addChildren(props, children2) {
|
|
|
212236
212558
|
}
|
|
212237
212559
|
}
|
|
212238
212560
|
}
|
|
212239
|
-
function productionCreate(_3, jsx84,
|
|
212561
|
+
function productionCreate(_3, jsx84, jsxs25) {
|
|
212240
212562
|
return create5;
|
|
212241
212563
|
function create5(_4, type3, props, key) {
|
|
212242
212564
|
const isStaticChildren = Array.isArray(props.children);
|
|
212243
|
-
const fn3 = isStaticChildren ?
|
|
212565
|
+
const fn3 = isStaticChildren ? jsxs25 : jsx84;
|
|
212244
212566
|
return key ? fn3(type3, props, key) : fn3(type3, props);
|
|
212245
212567
|
}
|
|
212246
212568
|
}
|
|
@@ -212485,7 +212807,7 @@ var urlAttributes = {
|
|
|
212485
212807
|
};
|
|
212486
212808
|
|
|
212487
212809
|
// node_modules/react-markdown/lib/index.js
|
|
212488
|
-
var
|
|
212810
|
+
var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
|
|
212489
212811
|
var import_react113 = __toESM(require_react(), 1);
|
|
212490
212812
|
|
|
212491
212813
|
// node_modules/mdast-util-to-string/lib/index.js
|
|
@@ -220157,11 +220479,11 @@ function post(tree, options2) {
|
|
|
220157
220479
|
}
|
|
220158
220480
|
visit(tree, transform9);
|
|
220159
220481
|
return toJsxRuntime(tree, {
|
|
220160
|
-
Fragment:
|
|
220482
|
+
Fragment: import_jsx_runtime59.Fragment,
|
|
220161
220483
|
components: components3,
|
|
220162
220484
|
ignoreInvalidStyle: true,
|
|
220163
|
-
jsx:
|
|
220164
|
-
jsxs:
|
|
220485
|
+
jsx: import_jsx_runtime59.jsx,
|
|
220486
|
+
jsxs: import_jsx_runtime59.jsxs,
|
|
220165
220487
|
passKeys: true,
|
|
220166
220488
|
passNode: true
|
|
220167
220489
|
});
|
|
@@ -225092,12 +225414,102 @@ var mermaid = {
|
|
|
225092
225414
|
var mermaid_default = mermaid;
|
|
225093
225415
|
|
|
225094
225416
|
// src/components/Mermaid.tsx
|
|
225095
|
-
var
|
|
225417
|
+
var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
|
|
225096
225418
|
var initialized = false;
|
|
225097
|
-
function
|
|
225419
|
+
function extractText(x7) {
|
|
225420
|
+
if (typeof x7 === "string") return x7;
|
|
225421
|
+
if (Array.isArray(x7)) return x7.map(extractText).join("");
|
|
225422
|
+
if (x7 && typeof x7 === "object" && "props" in x7) {
|
|
225423
|
+
return extractText(x7.props?.children);
|
|
225424
|
+
}
|
|
225425
|
+
return "";
|
|
225426
|
+
}
|
|
225427
|
+
function findNodeGroup(svg4, name2) {
|
|
225428
|
+
const byId = svg4.querySelector(`[id*="-${CSS.escape(name2)}-"]`);
|
|
225429
|
+
if (byId) {
|
|
225430
|
+
let el = byId;
|
|
225431
|
+
while (el && el.tagName !== "g") el = el.parentElement;
|
|
225432
|
+
return el || byId;
|
|
225433
|
+
}
|
|
225434
|
+
for (const t4 of svg4.querySelectorAll("text")) {
|
|
225435
|
+
const text10 = t4.textContent?.trim() ?? "";
|
|
225436
|
+
if (text10.startsWith(name2)) {
|
|
225437
|
+
let el = t4;
|
|
225438
|
+
while (el && el.tagName !== "g") el = el.parentElement;
|
|
225439
|
+
return el || t4;
|
|
225440
|
+
}
|
|
225441
|
+
}
|
|
225442
|
+
for (const t4 of svg4.querySelectorAll("title")) {
|
|
225443
|
+
if ((t4.textContent?.trim() ?? "").startsWith(name2) && t4.parentElement) {
|
|
225444
|
+
return t4.parentElement;
|
|
225445
|
+
}
|
|
225446
|
+
}
|
|
225447
|
+
return null;
|
|
225448
|
+
}
|
|
225449
|
+
function applyEdgeAnimation(svg4, spec) {
|
|
225450
|
+
if (!spec) return;
|
|
225451
|
+
const allEdges = Array.from(svg4.querySelectorAll(
|
|
225452
|
+
'path[id*="-L_"]'
|
|
225453
|
+
));
|
|
225454
|
+
if (spec === true) {
|
|
225455
|
+
for (const path5 of allEdges) {
|
|
225456
|
+
path5.classList.add("edge-animated");
|
|
225457
|
+
}
|
|
225458
|
+
return;
|
|
225459
|
+
}
|
|
225460
|
+
for (const pattern of spec) {
|
|
225461
|
+
const match3 = pattern.match(/^(\w+)\s*->\s*(\w+)$/);
|
|
225462
|
+
if (!match3) continue;
|
|
225463
|
+
const source = match3[1];
|
|
225464
|
+
const target = match3[2];
|
|
225465
|
+
const suffix = `L_${source}_${target}_`;
|
|
225466
|
+
for (const path5 of allEdges) {
|
|
225467
|
+
if (path5.id.includes(suffix)) {
|
|
225468
|
+
path5.classList.add("edge-animated");
|
|
225469
|
+
}
|
|
225470
|
+
}
|
|
225471
|
+
}
|
|
225472
|
+
}
|
|
225473
|
+
function Mermaid({
|
|
225474
|
+
children: children2,
|
|
225475
|
+
source: sourceProp,
|
|
225476
|
+
theme = "dark",
|
|
225477
|
+
className: className2,
|
|
225478
|
+
style: style4,
|
|
225479
|
+
highlight,
|
|
225480
|
+
animateEdges
|
|
225481
|
+
}) {
|
|
225098
225482
|
const ref2 = React8.useRef(null);
|
|
225099
|
-
const
|
|
225483
|
+
const renderedRef = React8.useRef(false);
|
|
225484
|
+
const styleRef = React8.useRef(null);
|
|
225485
|
+
React8.useEffect(() => {
|
|
225486
|
+
if (!styleRef.current) {
|
|
225487
|
+
const el = document.createElement("style");
|
|
225488
|
+
el.textContent = `
|
|
225489
|
+
@keyframes mermaid-edge-flow {
|
|
225490
|
+
to { stroke-dashoffset: -24; }
|
|
225491
|
+
}
|
|
225492
|
+
.edge-animated {
|
|
225493
|
+
stroke-dasharray: 8 6 !important;
|
|
225494
|
+
animation: mermaid-edge-flow 0.5s linear infinite !important;
|
|
225495
|
+
}
|
|
225496
|
+
`;
|
|
225497
|
+
document.head.appendChild(el);
|
|
225498
|
+
styleRef.current = el;
|
|
225499
|
+
}
|
|
225500
|
+
return () => {
|
|
225501
|
+
if (styleRef.current) {
|
|
225502
|
+
styleRef.current.remove();
|
|
225503
|
+
styleRef.current = null;
|
|
225504
|
+
}
|
|
225505
|
+
};
|
|
225506
|
+
}, []);
|
|
225507
|
+
const source = React8.useMemo(
|
|
225508
|
+
() => extractText(sourceProp ?? children2),
|
|
225509
|
+
[sourceProp, children2]
|
|
225510
|
+
);
|
|
225100
225511
|
React8.useEffect(() => {
|
|
225512
|
+
let cancelled = false;
|
|
225101
225513
|
if (!source || !ref2.current) return;
|
|
225102
225514
|
if (!initialized) {
|
|
225103
225515
|
mermaid_default.initialize({
|
|
@@ -225109,50 +225521,186 @@ function Mermaid({ children: children2, source = children2, theme = "dark", clas
|
|
|
225109
225521
|
}
|
|
225110
225522
|
const id39 = "mmd-" + Math.random().toString(36).slice(2, 10);
|
|
225111
225523
|
mermaid_default.render(id39, source).then((result) => {
|
|
225112
|
-
if (ref2.current)
|
|
225113
|
-
|
|
225524
|
+
if (cancelled || !ref2.current) return;
|
|
225525
|
+
ref2.current.innerHTML = result.svg;
|
|
225526
|
+
const svg4 = ref2.current.querySelector("svg");
|
|
225527
|
+
if (svg4) {
|
|
225528
|
+
svg4.removeAttribute("width");
|
|
225529
|
+
svg4.removeAttribute("height");
|
|
225530
|
+
svg4.style.width = "100%";
|
|
225531
|
+
svg4.style.height = "100%";
|
|
225532
|
+
if (highlight) {
|
|
225533
|
+
const names = Array.isArray(highlight) ? highlight : [highlight];
|
|
225534
|
+
for (const name2 of names) {
|
|
225535
|
+
const node3 = findNodeGroup(svg4, name2);
|
|
225536
|
+
if (node3) node3.classList.add("highlight");
|
|
225537
|
+
}
|
|
225538
|
+
}
|
|
225539
|
+
applyEdgeAnimation(svg4, animateEdges);
|
|
225540
|
+
}
|
|
225541
|
+
renderedRef.current = true;
|
|
225114
225542
|
}).catch((err) => {
|
|
225543
|
+
if (cancelled) return;
|
|
225115
225544
|
console.error("Mermaid error:", err);
|
|
225116
225545
|
if (ref2.current) {
|
|
225117
225546
|
ref2.current.innerHTML = `<div style="color:#f87171;padding:1em;border:2px dashed #f87171;border-radius:8px;font-family:monospace;font-size:14px;">
|
|
225118
225547
|
<strong>\u26A0 Mermaid Error</strong><br/>${String(err).replace(/</g, "<").replace(/>/g, ">")}
|
|
225119
225548
|
</div>`;
|
|
225120
225549
|
}
|
|
225121
|
-
continueRender(handle2);
|
|
225122
225550
|
});
|
|
225123
|
-
|
|
225124
|
-
|
|
225125
|
-
|
|
225126
|
-
|
|
225127
|
-
|
|
225128
|
-
|
|
225551
|
+
return () => {
|
|
225552
|
+
cancelled = true;
|
|
225553
|
+
};
|
|
225554
|
+
}, [source, theme]);
|
|
225555
|
+
React8.useEffect(() => {
|
|
225556
|
+
const svg4 = ref2.current?.querySelector("svg");
|
|
225557
|
+
if (!svg4) return;
|
|
225558
|
+
svg4.querySelectorAll(".highlight").forEach((el) => {
|
|
225559
|
+
el.classList.remove("highlight");
|
|
225560
|
+
});
|
|
225561
|
+
const names = Array.isArray(highlight) ? highlight : highlight ? [highlight] : [];
|
|
225562
|
+
for (const name2 of names) {
|
|
225563
|
+
const node3 = findNodeGroup(svg4, name2);
|
|
225564
|
+
if (node3) {
|
|
225565
|
+
node3.classList.add("highlight");
|
|
225566
|
+
}
|
|
225129
225567
|
}
|
|
225130
|
-
);
|
|
225568
|
+
}, [highlight]);
|
|
225569
|
+
React8.useEffect(() => {
|
|
225570
|
+
const svg4 = ref2.current?.querySelector("svg");
|
|
225571
|
+
if (!svg4) return;
|
|
225572
|
+
svg4.querySelectorAll(".edge-animated").forEach((el) => {
|
|
225573
|
+
el.classList.remove("edge-animated");
|
|
225574
|
+
});
|
|
225575
|
+
applyEdgeAnimation(svg4, animateEdges);
|
|
225576
|
+
}, [animateEdges]);
|
|
225577
|
+
const containerStyle3 = {
|
|
225578
|
+
display: "flex",
|
|
225579
|
+
justifyContent: "center",
|
|
225580
|
+
alignItems: "center",
|
|
225581
|
+
width: "100%",
|
|
225582
|
+
height: "100%",
|
|
225583
|
+
...style4
|
|
225584
|
+
};
|
|
225585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { ref: ref2, className: className2, style: containerStyle3 });
|
|
225131
225586
|
}
|
|
225132
225587
|
|
|
225133
225588
|
// src/components/Markdown.tsx
|
|
225134
|
-
var
|
|
225135
|
-
|
|
225136
|
-
|
|
225589
|
+
var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
|
|
225590
|
+
var ListCtx = React9.createContext([]);
|
|
225591
|
+
function OrderedList({
|
|
225592
|
+
children: children2,
|
|
225593
|
+
...props
|
|
225594
|
+
}) {
|
|
225595
|
+
const hl = React9.useContext(ListCtx);
|
|
225596
|
+
const items = React9.Children.toArray(children2).filter(
|
|
225597
|
+
(c5) => React9.isValidElement(c5) && c5.type === "li"
|
|
225598
|
+
);
|
|
225599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("ol", { ...props, children: items.map((child, i5) => {
|
|
225600
|
+
if (hl.includes(i5)) {
|
|
225601
|
+
return React9.cloneElement(child, { className: "highlight-list-item", key: child.key });
|
|
225602
|
+
}
|
|
225603
|
+
return child;
|
|
225604
|
+
}) });
|
|
225605
|
+
}
|
|
225606
|
+
function UnorderedList({
|
|
225607
|
+
children: children2,
|
|
225608
|
+
...props
|
|
225609
|
+
}) {
|
|
225610
|
+
const hl = React9.useContext(ListCtx);
|
|
225611
|
+
const items = React9.Children.toArray(children2).filter(
|
|
225612
|
+
(c5) => React9.isValidElement(c5) && c5.type === "li"
|
|
225613
|
+
);
|
|
225614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("ul", { ...props, children: items.map((child, i5) => {
|
|
225615
|
+
if (hl.includes(i5)) {
|
|
225616
|
+
return React9.cloneElement(child, { className: "highlight-list-item", key: child.key });
|
|
225617
|
+
}
|
|
225618
|
+
return child;
|
|
225619
|
+
}) });
|
|
225620
|
+
}
|
|
225621
|
+
function Markdown2({
|
|
225622
|
+
children: children2,
|
|
225623
|
+
source = children2,
|
|
225624
|
+
className: className2,
|
|
225625
|
+
plugins,
|
|
225626
|
+
components: propComponents,
|
|
225627
|
+
highlight
|
|
225628
|
+
}) {
|
|
225629
|
+
const hl = React9.useMemo(() => highlight ?? [], [highlight]);
|
|
225630
|
+
React9.useEffect(() => {
|
|
225631
|
+
const id39 = "markcut-markdown-defaults";
|
|
225632
|
+
if (document.getElementById(id39)) return;
|
|
225633
|
+
const el = document.createElement("style");
|
|
225634
|
+
el.id = id39;
|
|
225635
|
+
el.textContent = `
|
|
225636
|
+
.highlight-list-item {
|
|
225637
|
+
background: rgba(255, 215, 0, 0.15);
|
|
225638
|
+
border-left: 3px solid #ffd700;
|
|
225639
|
+
padding-left: 8px;
|
|
225640
|
+
border-radius: 0 4px 4px 0;
|
|
225641
|
+
}
|
|
225642
|
+
.slide {
|
|
225643
|
+
display: flex;
|
|
225644
|
+
flex-direction: column;
|
|
225645
|
+
align-items: center;
|
|
225646
|
+
justify-content: center;
|
|
225647
|
+
padding: 24px;
|
|
225648
|
+
text-align: center;
|
|
225649
|
+
}
|
|
225650
|
+
.slide h1 { font-size: 2em; margin: 0.4em 0; font-weight: 700; }
|
|
225651
|
+
.slide h2 { font-size: 1.6em; margin: 0.35em 0; font-weight: 600; }
|
|
225652
|
+
.slide h3 { font-size: 1.3em; margin: 0.3em 0; font-weight: 600; }
|
|
225653
|
+
.slide p { margin: 0.6em 0; line-height: 1.6; }
|
|
225654
|
+
.slide ul, .slide ol { margin: 0.5em 0; padding-left: 1.5em; text-align: left; }
|
|
225655
|
+
.slide li { margin: 0.3em 0; }
|
|
225656
|
+
.slide blockquote {
|
|
225657
|
+
margin: 0.6em 0;
|
|
225658
|
+
padding: 0.4em 1em;
|
|
225659
|
+
border-left: 3px solid rgba(255,255,255,.3);
|
|
225660
|
+
font-style: italic;
|
|
225661
|
+
opacity: .85;
|
|
225662
|
+
}
|
|
225663
|
+
.slide code {
|
|
225664
|
+
background: rgba(255,255,255,.08);
|
|
225665
|
+
padding: 0.15em 0.4em;
|
|
225666
|
+
border-radius: 4px;
|
|
225667
|
+
font-size: 0.9em;
|
|
225668
|
+
}
|
|
225669
|
+
.slide pre { margin: 0.6em 0; text-align: left; width: 100%; }
|
|
225670
|
+
.slide a { color: #4a9eff; text-decoration: none; }
|
|
225671
|
+
.slide a:hover { text-decoration: underline; }
|
|
225672
|
+
`;
|
|
225673
|
+
document.head.appendChild(el);
|
|
225674
|
+
return () => {
|
|
225675
|
+
document.getElementById(id39)?.remove();
|
|
225676
|
+
};
|
|
225677
|
+
}, []);
|
|
225678
|
+
const mergedComponents = React9.useMemo(
|
|
225679
|
+
() => ({
|
|
225680
|
+
...propComponents,
|
|
225681
|
+
ol: OrderedList,
|
|
225682
|
+
ul: UnorderedList,
|
|
225683
|
+
pre: ({ children: preChildren }) => {
|
|
225684
|
+
const code4 = React9.Children.toArray(preChildren)[0];
|
|
225685
|
+
if (code4?.props?.className === "language-mermaid") {
|
|
225686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Mermaid, { source: String(code4.props.children) });
|
|
225687
|
+
}
|
|
225688
|
+
if (propComponents?.pre) {
|
|
225689
|
+
return propComponents.pre({ children: preChildren });
|
|
225690
|
+
}
|
|
225691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("pre", { children: preChildren });
|
|
225692
|
+
}
|
|
225693
|
+
}),
|
|
225694
|
+
[propComponents]
|
|
225695
|
+
);
|
|
225696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ListCtx.Provider, { value: hl, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: className2, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
225137
225697
|
Markdown,
|
|
225138
225698
|
{
|
|
225139
225699
|
remarkPlugins: React9.useMemo(() => [remarkGfm, ...plugins || []], [plugins]),
|
|
225140
|
-
components:
|
|
225141
|
-
() => ({
|
|
225142
|
-
pre: ({ children: children3 }) => {
|
|
225143
|
-
const code4 = React9.Children.toArray(children3)[0];
|
|
225144
|
-
if (code4?.props?.className === "language-mermaid") {
|
|
225145
|
-
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Mermaid, { source: String(code4.props.children) });
|
|
225146
|
-
}
|
|
225147
|
-
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("pre", { children: children3 });
|
|
225148
|
-
},
|
|
225149
|
-
...components3
|
|
225150
|
-
}),
|
|
225151
|
-
[components3]
|
|
225152
|
-
),
|
|
225700
|
+
components: mergedComponents,
|
|
225153
225701
|
children: source
|
|
225154
225702
|
}
|
|
225155
|
-
) });
|
|
225703
|
+
) }) });
|
|
225156
225704
|
}
|
|
225157
225705
|
|
|
225158
225706
|
// src/utils/component-import-map.ts
|
|
@@ -225228,7 +225776,7 @@ var React18 = __toESM(require_react(), 1);
|
|
|
225228
225776
|
|
|
225229
225777
|
// src/context/EventContext.tsx
|
|
225230
225778
|
var React16 = __toESM(require_react(), 1);
|
|
225231
|
-
var
|
|
225779
|
+
var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
|
|
225232
225780
|
var EventContext = React16.createContext(null);
|
|
225233
225781
|
function createComponentProxy(target, setState) {
|
|
225234
225782
|
return new Proxy(target, {
|
|
@@ -225264,6 +225812,8 @@ function EventProvider({ children: children2 }) {
|
|
|
225264
225812
|
const keys4 = Object.keys(scope);
|
|
225265
225813
|
const vals = Object.values(scope);
|
|
225266
225814
|
try {
|
|
225815
|
+
const codeChars = Array.from(code4).map((c5) => c5.charCodeAt(0));
|
|
225816
|
+
console.log(`EventContext.debug: keys=${JSON.stringify(keys4)}, codeLen=${code4.length}, codeChars=${JSON.stringify(codeChars)}, codeStr=${JSON.stringify(code4)}`);
|
|
225267
225817
|
const fn3 = new Function(...keys4, code4);
|
|
225268
225818
|
fn3(...vals);
|
|
225269
225819
|
console.info(`Event evaluation succeeded: "${code4}"`);
|
|
@@ -225275,7 +225825,7 @@ function EventProvider({ children: children2 }) {
|
|
|
225275
225825
|
() => ({ register, unregister, evaluate: evaluate2 }),
|
|
225276
225826
|
[register, unregister, evaluate2]
|
|
225277
225827
|
);
|
|
225278
|
-
return /* @__PURE__ */ (0,
|
|
225828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EventContext.Provider, { value: value2, children: children2 });
|
|
225279
225829
|
}
|
|
225280
225830
|
function useEventContext() {
|
|
225281
225831
|
const ctx = React16.useContext(EventContext);
|
|
@@ -225315,8 +225865,8 @@ function useFrameEvents(on3, durationInFrames) {
|
|
|
225315
225865
|
}
|
|
225316
225866
|
|
|
225317
225867
|
// src/context/index.tsx
|
|
225318
|
-
var
|
|
225319
|
-
var DefaultContainer = ({ children: children2, style: style4 }) => /* @__PURE__ */ (0,
|
|
225868
|
+
var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
|
|
225869
|
+
var DefaultContainer = ({ children: children2, style: style4 }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { style: { position: "absolute", inset: 0, ...style4 }, children: children2 });
|
|
225320
225870
|
var ComposeContext = React18.createContext({
|
|
225321
225871
|
Container: DefaultContainer
|
|
225322
225872
|
});
|
|
@@ -225327,14 +225877,14 @@ var React47 = __toESM(require_react(), 1);
|
|
|
225327
225877
|
|
|
225328
225878
|
// node_modules/@remotion/transitions/dist/esm/index.mjs
|
|
225329
225879
|
var import_react114 = __toESM(require_react(), 1);
|
|
225330
|
-
var
|
|
225880
|
+
var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
|
|
225331
225881
|
var import_react115 = __toESM(require_react(), 1);
|
|
225332
|
-
var
|
|
225882
|
+
var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
|
|
225333
225883
|
var import_react116 = __toESM(require_react(), 1);
|
|
225334
225884
|
var import_react117 = __toESM(require_react(), 1);
|
|
225335
|
-
var
|
|
225885
|
+
var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
|
|
225336
225886
|
var import_react118 = __toESM(require_react(), 1);
|
|
225337
|
-
var
|
|
225887
|
+
var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
|
|
225338
225888
|
var import_react119 = __toESM(require_react(), 1);
|
|
225339
225889
|
var epsilon6 = 0.01;
|
|
225340
225890
|
var SlidePresentation = ({
|
|
@@ -225398,7 +225948,7 @@ var SlidePresentation = ({
|
|
|
225398
225948
|
...presentationDirection === "entering" ? enterStyle : exitStyle
|
|
225399
225949
|
};
|
|
225400
225950
|
}, [directionStyle, enterStyle, exitStyle, presentationDirection]);
|
|
225401
|
-
return /* @__PURE__ */ (0,
|
|
225951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(AbsoluteFill, {
|
|
225402
225952
|
style: style4,
|
|
225403
225953
|
children: children2
|
|
225404
225954
|
});
|
|
@@ -225547,8 +226097,8 @@ var HtmlInCanvasPresentation = ({
|
|
|
225547
226097
|
if (passThrough) {
|
|
225548
226098
|
return children2;
|
|
225549
226099
|
}
|
|
225550
|
-
return /* @__PURE__ */ (0,
|
|
225551
|
-
children: /* @__PURE__ */ (0,
|
|
226100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(AbsoluteFill, {
|
|
226101
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("canvas", {
|
|
225552
226102
|
ref: canvasRef,
|
|
225553
226103
|
style: canvasSubtreeStyle,
|
|
225554
226104
|
children: children2
|
|
@@ -225559,7 +226109,7 @@ var makeHtmlInCanvasPresentation = (shader) => {
|
|
|
225559
226109
|
const CompWithShader = (props) => {
|
|
225560
226110
|
const { passedProps, ...otherProps } = props;
|
|
225561
226111
|
const { effects, ...restPassedProps } = props.passedProps;
|
|
225562
|
-
return /* @__PURE__ */ (0,
|
|
226112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(HtmlInCanvasPresentation, {
|
|
225563
226113
|
shader,
|
|
225564
226114
|
passedProps: restPassedProps,
|
|
225565
226115
|
effects,
|
|
@@ -226386,7 +226936,7 @@ var WrapInEnteringProgressContext = ({ presentationProgress, children: children2
|
|
|
226386
226936
|
enteringProgress: presentationProgress
|
|
226387
226937
|
};
|
|
226388
226938
|
}, [presentationProgress]);
|
|
226389
|
-
return /* @__PURE__ */ (0,
|
|
226939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(EnteringContext.Provider, {
|
|
226390
226940
|
value: value2,
|
|
226391
226941
|
children: children2
|
|
226392
226942
|
});
|
|
@@ -226397,7 +226947,7 @@ var WrapInExitingProgressContext = ({ presentationProgress, children: children2
|
|
|
226397
226947
|
exitingProgress: presentationProgress
|
|
226398
226948
|
};
|
|
226399
226949
|
}, [presentationProgress]);
|
|
226400
|
-
return /* @__PURE__ */ (0,
|
|
226950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ExitingContext.Provider, {
|
|
226401
226951
|
value: value2,
|
|
226402
226952
|
children: children2
|
|
226403
226953
|
});
|
|
@@ -226420,7 +226970,7 @@ var SeriesOverlay = () => {
|
|
|
226420
226970
|
return null;
|
|
226421
226971
|
};
|
|
226422
226972
|
var SeriesSequence2 = ({ children: children2 }) => {
|
|
226423
|
-
return /* @__PURE__ */ (0,
|
|
226973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, {
|
|
226424
226974
|
children: children2
|
|
226425
226975
|
});
|
|
226426
226976
|
};
|
|
@@ -226608,13 +227158,13 @@ var TransitionSeriesChildren = ({
|
|
|
226608
227158
|
const prevPresentation = prev2.props.presentation ?? slide();
|
|
226609
227159
|
const UppercaseNextPresentation = nextPresentation.component;
|
|
226610
227160
|
const UppercasePrevPresentation = prevPresentation.component;
|
|
226611
|
-
return /* @__PURE__ */ (0,
|
|
227161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Sequence, {
|
|
226612
227162
|
from: actualStartFrame,
|
|
226613
227163
|
durationInFrames: durationInFramesProp,
|
|
226614
227164
|
...passedProps,
|
|
226615
227165
|
name: passedProps.name || "<TS.Sequence>",
|
|
226616
227166
|
_remotionInternalDocumentationLink: passedProps.name ? void 0 : "https://www.remotion.dev/docs/transitions/transitionseries",
|
|
226617
|
-
children: /* @__PURE__ */ (0,
|
|
227167
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(UppercaseNextPresentation, {
|
|
226618
227168
|
passedProps: nextPresentation.props ?? {},
|
|
226619
227169
|
presentationDirection: "exiting",
|
|
226620
227170
|
presentationProgress: nextProgress,
|
|
@@ -226626,9 +227176,9 @@ var TransitionSeriesChildren = ({
|
|
|
226626
227176
|
throw new Error("Should not call when exiting");
|
|
226627
227177
|
},
|
|
226628
227178
|
bothEnteringAndExiting: true,
|
|
226629
|
-
children: /* @__PURE__ */ (0,
|
|
227179
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(WrapInExitingProgressContext, {
|
|
226630
227180
|
presentationProgress: nextProgress,
|
|
226631
|
-
children: /* @__PURE__ */ (0,
|
|
227181
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(UppercasePrevPresentation, {
|
|
226632
227182
|
passedProps: prevPresentation.props ?? {},
|
|
226633
227183
|
presentationDirection: "entering",
|
|
226634
227184
|
presentationProgress: prevProgress,
|
|
@@ -226642,7 +227192,7 @@ var TransitionSeriesChildren = ({
|
|
|
226642
227192
|
onNextElementImage(null, null, null, i5 - 1);
|
|
226643
227193
|
},
|
|
226644
227194
|
bothEnteringAndExiting: true,
|
|
226645
|
-
children: /* @__PURE__ */ (0,
|
|
227195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(WrapInEnteringProgressContext, {
|
|
226646
227196
|
presentationProgress: prevProgress,
|
|
226647
227197
|
children: child
|
|
226648
227198
|
})
|
|
@@ -226654,13 +227204,13 @@ var TransitionSeriesChildren = ({
|
|
|
226654
227204
|
if (prevProgress !== null && prev2) {
|
|
226655
227205
|
const prevPresentation = prev2.props.presentation ?? slide();
|
|
226656
227206
|
const UppercasePrevPresentation = prevPresentation.component;
|
|
226657
|
-
return /* @__PURE__ */ (0,
|
|
227207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Sequence, {
|
|
226658
227208
|
from: actualStartFrame,
|
|
226659
227209
|
durationInFrames: durationInFramesProp,
|
|
226660
227210
|
...passedProps,
|
|
226661
227211
|
name: passedProps.name || "<TS.Sequence>",
|
|
226662
227212
|
_remotionInternalDocumentationLink: passedProps.name ? void 0 : "https://www.remotion.dev/docs/transitions/transitionseries",
|
|
226663
|
-
children: /* @__PURE__ */ (0,
|
|
227213
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(UppercasePrevPresentation, {
|
|
226664
227214
|
passedProps: prevPresentation.props ?? {},
|
|
226665
227215
|
presentationDirection: "entering",
|
|
226666
227216
|
presentationProgress: prevProgress,
|
|
@@ -226670,7 +227220,7 @@ var TransitionSeriesChildren = ({
|
|
|
226670
227220
|
onNextElementImage(null, null, null, i5 - 1);
|
|
226671
227221
|
},
|
|
226672
227222
|
bothEnteringAndExiting: false,
|
|
226673
|
-
children: /* @__PURE__ */ (0,
|
|
227223
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(WrapInEnteringProgressContext, {
|
|
226674
227224
|
presentationProgress: prevProgress,
|
|
226675
227225
|
children: child
|
|
226676
227226
|
})
|
|
@@ -226680,13 +227230,13 @@ var TransitionSeriesChildren = ({
|
|
|
226680
227230
|
if (nextProgress !== null && next3) {
|
|
226681
227231
|
const nextPresentation = next3.props.presentation ?? slide();
|
|
226682
227232
|
const UppercaseNextPresentation = nextPresentation.component;
|
|
226683
|
-
return /* @__PURE__ */ (0,
|
|
227233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Sequence, {
|
|
226684
227234
|
from: actualStartFrame,
|
|
226685
227235
|
durationInFrames: durationInFramesProp,
|
|
226686
227236
|
...passedProps,
|
|
226687
227237
|
name: passedProps.name || "<TS.Sequence>",
|
|
226688
227238
|
_remotionInternalDocumentationLink: passedProps.name ? void 0 : "https://www.remotion.dev/docs/transitions/transitionseries",
|
|
226689
|
-
children: /* @__PURE__ */ (0,
|
|
227239
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(UppercaseNextPresentation, {
|
|
226690
227240
|
passedProps: nextPresentation.props ?? {},
|
|
226691
227241
|
presentationDirection: "exiting",
|
|
226692
227242
|
presentationProgress: nextProgress,
|
|
@@ -226696,14 +227246,14 @@ var TransitionSeriesChildren = ({
|
|
|
226696
227246
|
onPrevElementImage(null, null, null, i5 + 1);
|
|
226697
227247
|
},
|
|
226698
227248
|
bothEnteringAndExiting: false,
|
|
226699
|
-
children: /* @__PURE__ */ (0,
|
|
227249
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(WrapInExitingProgressContext, {
|
|
226700
227250
|
presentationProgress: nextProgress,
|
|
226701
227251
|
children: child
|
|
226702
227252
|
})
|
|
226703
227253
|
})
|
|
226704
227254
|
}, i5);
|
|
226705
227255
|
}
|
|
226706
|
-
return /* @__PURE__ */ (0,
|
|
227256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Sequence, {
|
|
226707
227257
|
from: actualStartFrame,
|
|
226708
227258
|
durationInFrames: durationInFramesProp,
|
|
226709
227259
|
...passedProps,
|
|
@@ -226714,7 +227264,7 @@ var TransitionSeriesChildren = ({
|
|
|
226714
227264
|
});
|
|
226715
227265
|
const overlayElements = overlayRenders.map((overlayInfo) => {
|
|
226716
227266
|
const info3 = overlayInfo;
|
|
226717
|
-
return /* @__PURE__ */ (0,
|
|
227267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Sequence, {
|
|
226718
227268
|
from: Math.round(info3.overlayFrom),
|
|
226719
227269
|
durationInFrames: info3.durationInFrames,
|
|
226720
227270
|
name: "<TS.Overlay>",
|
|
@@ -226726,7 +227276,7 @@ var TransitionSeriesChildren = ({
|
|
|
226726
227276
|
});
|
|
226727
227277
|
return [...mainChildren || [], ...overlayElements];
|
|
226728
227278
|
}, [flattedChildren, fps, frame2, onPrevElementImage, onNextElementImage]);
|
|
226729
|
-
return /* @__PURE__ */ (0,
|
|
227279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, {
|
|
226730
227280
|
children: childrenValue
|
|
226731
227281
|
});
|
|
226732
227282
|
};
|
|
@@ -226736,12 +227286,12 @@ var TransitionSeries = ({ children: children2, name: name2, layout: passedLayout
|
|
|
226736
227286
|
if (NoReactInternals.ENABLE_V5_BREAKING_CHANGES && layout7 !== "absolute-fill") {
|
|
226737
227287
|
throw new TypeError(`The "layout" prop of <TransitionSeries /> is not supported anymore in v5. TransitionSeries' must be absolutely positioned.`);
|
|
226738
227288
|
}
|
|
226739
|
-
return /* @__PURE__ */ (0,
|
|
227289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Sequence, {
|
|
226740
227290
|
name: displayName,
|
|
226741
227291
|
layout: layout7,
|
|
226742
227292
|
_remotionInternalDocumentationLink: name2 === void 0 ? "https://www.remotion.dev/docs/transitions/transitionseries" : void 0,
|
|
226743
227293
|
...otherProps,
|
|
226744
|
-
children: /* @__PURE__ */ (0,
|
|
227294
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TransitionSeriesChildren, {
|
|
226745
227295
|
children: children2
|
|
226746
227296
|
})
|
|
226747
227297
|
});
|
|
@@ -226755,7 +227305,7 @@ Internals.addSequenceStackTraces(SeriesOverlay);
|
|
|
226755
227305
|
|
|
226756
227306
|
// node_modules/@remotion/transitions/dist/esm/fade.mjs
|
|
226757
227307
|
var import_react120 = __toESM(require_react(), 1);
|
|
226758
|
-
var
|
|
227308
|
+
var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
|
|
226759
227309
|
var FadePresentation = ({ children: children2, presentationDirection, presentationProgress, passedProps }) => {
|
|
226760
227310
|
const isEntering = presentationDirection === "entering";
|
|
226761
227311
|
const style4 = (0, import_react120.useMemo)(() => {
|
|
@@ -226771,7 +227321,7 @@ var FadePresentation = ({ children: children2, presentationDirection, presentati
|
|
|
226771
227321
|
presentationDirection,
|
|
226772
227322
|
presentationProgress
|
|
226773
227323
|
]);
|
|
226774
|
-
return /* @__PURE__ */ (0,
|
|
227324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(AbsoluteFill, {
|
|
226775
227325
|
style: style4,
|
|
226776
227326
|
children: children2
|
|
226777
227327
|
});
|
|
@@ -226785,7 +227335,7 @@ var fade4 = (props) => {
|
|
|
226785
227335
|
|
|
226786
227336
|
// node_modules/@remotion/transitions/dist/esm/slide.mjs
|
|
226787
227337
|
var import_react121 = __toESM(require_react(), 1);
|
|
226788
|
-
var
|
|
227338
|
+
var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
|
|
226789
227339
|
var epsilon7 = 0.01;
|
|
226790
227340
|
var SlidePresentation2 = ({
|
|
226791
227341
|
children: children2,
|
|
@@ -226848,7 +227398,7 @@ var SlidePresentation2 = ({
|
|
|
226848
227398
|
...presentationDirection === "entering" ? enterStyle : exitStyle
|
|
226849
227399
|
};
|
|
226850
227400
|
}, [directionStyle, enterStyle, exitStyle, presentationDirection]);
|
|
226851
|
-
return /* @__PURE__ */ (0,
|
|
227401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(AbsoluteFill, {
|
|
226852
227402
|
style: style4,
|
|
226853
227403
|
children: children2
|
|
226854
227404
|
});
|
|
@@ -226862,7 +227412,7 @@ var slide2 = (props) => {
|
|
|
226862
227412
|
|
|
226863
227413
|
// node_modules/@remotion/transitions/dist/esm/wipe.mjs
|
|
226864
227414
|
var import_react122 = __toESM(require_react(), 1);
|
|
226865
|
-
var
|
|
227415
|
+
var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
|
|
226866
227416
|
var makePolygonIn = (progress2, direction2) => {
|
|
226867
227417
|
const p4 = progress2 * 100;
|
|
226868
227418
|
switch (direction2) {
|
|
@@ -226936,9 +227486,9 @@ var WipePresentation = ({
|
|
|
226936
227486
|
const outerStyle = (0, import_react122.useMemo)(() => {
|
|
226937
227487
|
return presentationDirection === "entering" ? outerEnterStyle : outerExitStyle;
|
|
226938
227488
|
}, [outerEnterStyle, outerExitStyle, presentationDirection]);
|
|
226939
|
-
return /* @__PURE__ */ (0,
|
|
227489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(AbsoluteFill, {
|
|
226940
227490
|
style: outerStyle,
|
|
226941
|
-
children: /* @__PURE__ */ (0,
|
|
227491
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(AbsoluteFill, {
|
|
226942
227492
|
style: style4,
|
|
226943
227493
|
children: children2
|
|
226944
227494
|
})
|
|
@@ -226953,7 +227503,7 @@ var wipe = (props) => {
|
|
|
226953
227503
|
|
|
226954
227504
|
// node_modules/@remotion/transitions/dist/esm/flip.mjs
|
|
226955
227505
|
var import_react123 = __toESM(require_react(), 1);
|
|
226956
|
-
var
|
|
227506
|
+
var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
|
|
226957
227507
|
var Flip = ({
|
|
226958
227508
|
children: children2,
|
|
226959
227509
|
presentationDirection,
|
|
@@ -226994,9 +227544,9 @@ var Flip = ({
|
|
|
226994
227544
|
...presentationDirection === "entering" ? outerEnterStyle : outerExitStyle
|
|
226995
227545
|
};
|
|
226996
227546
|
}, [outerEnterStyle, outerExitStyle, perspective, presentationDirection]);
|
|
226997
|
-
return /* @__PURE__ */ (0,
|
|
227547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(AbsoluteFill, {
|
|
226998
227548
|
style: outer,
|
|
226999
|
-
children: /* @__PURE__ */ (0,
|
|
227549
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(AbsoluteFill, {
|
|
227000
227550
|
style: style4,
|
|
227001
227551
|
children: children2
|
|
227002
227552
|
})
|
|
@@ -227416,9 +227966,6 @@ var translatePath = (path5, x7, y7) => {
|
|
|
227416
227966
|
// node_modules/@remotion/shapes/dist/esm/index.mjs
|
|
227417
227967
|
var import_react124 = __toESM(require_react(), 1);
|
|
227418
227968
|
var import_react_dom2 = __toESM(require_react_dom(), 1);
|
|
227419
|
-
var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
|
|
227420
|
-
var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
|
|
227421
|
-
var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
|
|
227422
227969
|
var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
|
|
227423
227970
|
var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
|
|
227424
227971
|
var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -227426,6 +227973,9 @@ var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
|
|
|
227426
227973
|
var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
|
|
227427
227974
|
var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
|
|
227428
227975
|
var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
|
|
227976
|
+
var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
|
|
227977
|
+
var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
|
|
227978
|
+
var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
|
|
227429
227979
|
var getCoord = ({
|
|
227430
227980
|
counterClockwise,
|
|
227431
227981
|
actualProgress,
|
|
@@ -227534,7 +228084,7 @@ var makePie = ({
|
|
|
227534
228084
|
|
|
227535
228085
|
// node_modules/@remotion/transitions/dist/esm/clock-wipe.mjs
|
|
227536
228086
|
var import_react125 = __toESM(require_react(), 1);
|
|
227537
|
-
var
|
|
228087
|
+
var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
|
|
227538
228088
|
var ClockWipePresentation = ({ children: children2, presentationDirection, presentationProgress, passedProps }) => {
|
|
227539
228089
|
const finishedRadius = Math.sqrt(passedProps.width ** 2 + passedProps.height ** 2) / 2;
|
|
227540
228090
|
const { path: path5 } = makePie({
|
|
@@ -227562,9 +228112,9 @@ var ClockWipePresentation = ({ children: children2, presentationDirection, prese
|
|
|
227562
228112
|
passedProps.outerExitStyle,
|
|
227563
228113
|
presentationDirection
|
|
227564
228114
|
]);
|
|
227565
|
-
return /* @__PURE__ */ (0,
|
|
228115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(AbsoluteFill, {
|
|
227566
228116
|
style: outerStyle,
|
|
227567
|
-
children: /* @__PURE__ */ (0,
|
|
228117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(AbsoluteFill, {
|
|
227568
228118
|
style: style4,
|
|
227569
228119
|
children: children2
|
|
227570
228120
|
})
|
|
@@ -227576,7 +228126,13 @@ var clockWipe = (props) => {
|
|
|
227576
228126
|
|
|
227577
228127
|
// src/utils/index.ts
|
|
227578
228128
|
function uid() {
|
|
227579
|
-
|
|
228129
|
+
const raw = Math.random().toString(36).slice(2, 10);
|
|
228130
|
+
const first3 = raw[0];
|
|
228131
|
+
if (/^[0-9]/.test(first3)) {
|
|
228132
|
+
const letter = String.fromCharCode(97 + Math.floor(Math.random() * 26));
|
|
228133
|
+
return letter + raw;
|
|
228134
|
+
}
|
|
228135
|
+
return raw;
|
|
227580
228136
|
}
|
|
227581
228137
|
var KEBAB = /[^a-zA-Z0-9_-]+/g;
|
|
227582
228138
|
function toClassName(s3) {
|
|
@@ -227642,7 +228198,7 @@ function getDurationInSeconds(stream3, update2 = true) {
|
|
|
227642
228198
|
for (const child of stream3.children) {
|
|
227643
228199
|
getDurationInSeconds(child, update2);
|
|
227644
228200
|
}
|
|
227645
|
-
const visible = stream3.children.filter((c5) => !c5.isBackground);
|
|
228201
|
+
const visible = stream3.type === "effect" ? stream3.children : stream3.children.filter((c5) => !c5.isBackground);
|
|
227646
228202
|
if (stream3.isSeries) {
|
|
227647
228203
|
const overlap = stream3.transition ? stream3.transitionTime ?? 0.5 : 0;
|
|
227648
228204
|
for (let i5 = 0; i5 < visible.length; i5++) {
|
|
@@ -227687,7 +228243,7 @@ var React26 = __toESM(require_react(), 1);
|
|
|
227687
228243
|
|
|
227688
228244
|
// src/types/FrameSyncStyle.tsx
|
|
227689
228245
|
var React25 = __toESM(require_react(), 1);
|
|
227690
|
-
var
|
|
228246
|
+
var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
|
|
227691
228247
|
function FrameSyncStyle({
|
|
227692
228248
|
style: style4,
|
|
227693
228249
|
children: children2
|
|
@@ -227704,7 +228260,7 @@ function FrameSyncStyle({
|
|
|
227704
228260
|
animationDelay: `-${currentTime}s`
|
|
227705
228261
|
};
|
|
227706
228262
|
}, [style4, hasAnimation, frame2, fps]);
|
|
227707
|
-
return /* @__PURE__ */ (0,
|
|
228263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
227708
228264
|
"div",
|
|
227709
228265
|
{
|
|
227710
228266
|
style: {
|
|
@@ -227719,7 +228275,7 @@ function FrameSyncStyle({
|
|
|
227719
228275
|
}
|
|
227720
228276
|
|
|
227721
228277
|
// src/types/Video.tsx
|
|
227722
|
-
var
|
|
228278
|
+
var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
|
|
227723
228279
|
function resolveVideoSrc(src) {
|
|
227724
228280
|
if (/^(https?:|data:|blob:|file:|\/)/.test(src)) return src;
|
|
227725
228281
|
return staticFile(src);
|
|
@@ -227739,14 +228295,14 @@ function VideoLeaf({ stream: stream3 }) {
|
|
|
227739
228295
|
const playbackRate = Math.min(1, toPlaybackRate((endAt - startFrom) / (end2 - start4)));
|
|
227740
228296
|
const streamStyle = cssJS(stream3.style);
|
|
227741
228297
|
const hasAnimation = "animation" in streamStyle;
|
|
227742
|
-
return /* @__PURE__ */ (0,
|
|
228298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
227743
228299
|
Sequence,
|
|
227744
228300
|
{
|
|
227745
228301
|
durationInFrames: Math.max(1, Math.floor(fps * (end2 - start4))),
|
|
227746
228302
|
from: Math.floor(fps * start4),
|
|
227747
228303
|
layout: "none",
|
|
227748
228304
|
showInTimeline: false,
|
|
227749
|
-
children: hasAnimation ? /* @__PURE__ */ (0,
|
|
228305
|
+
children: hasAnimation ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(FrameSyncStyle, { style: streamStyle, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
227750
228306
|
OffthreadVideo,
|
|
227751
228307
|
{
|
|
227752
228308
|
src: resolvedSrc,
|
|
@@ -227758,7 +228314,7 @@ function VideoLeaf({ stream: stream3 }) {
|
|
|
227758
228314
|
showInTimeline: false,
|
|
227759
228315
|
style: { width: "100%", height: "100%" }
|
|
227760
228316
|
}
|
|
227761
|
-
) }) : /* @__PURE__ */ (0,
|
|
228317
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
227762
228318
|
OffthreadVideo,
|
|
227763
228319
|
{
|
|
227764
228320
|
src: resolvedSrc,
|
|
@@ -227777,7 +228333,7 @@ function VideoLeaf({ stream: stream3 }) {
|
|
|
227777
228333
|
|
|
227778
228334
|
// src/types/Audio.tsx
|
|
227779
228335
|
var React27 = __toESM(require_react(), 1);
|
|
227780
|
-
var
|
|
228336
|
+
var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
|
|
227781
228337
|
function resolveAudioSrc(src) {
|
|
227782
228338
|
if (/^(https?:|data:|blob:|file:|\/)/.test(src)) return src;
|
|
227783
228339
|
return staticFile(src);
|
|
@@ -227797,7 +228353,7 @@ function AudioLeaf({ stream: stream3 }) {
|
|
|
227797
228353
|
const endAt = stream3.endAt ?? totalDur;
|
|
227798
228354
|
const volume = stream3.volume ?? 1;
|
|
227799
228355
|
const playbackRate = toPlaybackRate((endAt - startFrom) / (end2 - start4));
|
|
227800
|
-
return /* @__PURE__ */ (0,
|
|
228356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
227801
228357
|
Sequence,
|
|
227802
228358
|
{
|
|
227803
228359
|
name: stream3.src ?? "audio",
|
|
@@ -227805,7 +228361,7 @@ function AudioLeaf({ stream: stream3 }) {
|
|
|
227805
228361
|
from: Math.floor(fps * start4),
|
|
227806
228362
|
layout: "none",
|
|
227807
228363
|
showInTimeline: false,
|
|
227808
|
-
children: /* @__PURE__ */ (0,
|
|
228364
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
227809
228365
|
Audio,
|
|
227810
228366
|
{
|
|
227811
228367
|
src: resolvedSrc,
|
|
@@ -227822,7 +228378,7 @@ function AudioLeaf({ stream: stream3 }) {
|
|
|
227822
228378
|
}
|
|
227823
228379
|
|
|
227824
228380
|
// src/types/Image.tsx
|
|
227825
|
-
var
|
|
228381
|
+
var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
|
|
227826
228382
|
function resolveImageSrc(src) {
|
|
227827
228383
|
if (/^(https?:|data:|blob:|file:|\/)/.test(src)) return src;
|
|
227828
228384
|
return staticFile(src);
|
|
@@ -227835,13 +228391,13 @@ function ImageLeaf({ stream: stream3 }) {
|
|
|
227835
228391
|
useFrameEvents(stream3.on, Math.max(1, Math.floor(totalDur * fps)));
|
|
227836
228392
|
if (!stream3.src) return null;
|
|
227837
228393
|
const resolvedSrc = resolveImageSrc(stream3.src);
|
|
227838
|
-
return /* @__PURE__ */ (0,
|
|
228394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
227839
228395
|
Sequence,
|
|
227840
228396
|
{
|
|
227841
228397
|
durationInFrames: Math.max(1, Math.floor(fps * (end2 - start4))),
|
|
227842
228398
|
from: Math.floor(fps * start4),
|
|
227843
228399
|
layout: "none",
|
|
227844
|
-
children: /* @__PURE__ */ (0,
|
|
228400
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(FrameSyncStyle, { style: cssJS(stream3.style), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
227845
228401
|
Img,
|
|
227846
228402
|
{
|
|
227847
228403
|
src: resolvedSrc,
|
|
@@ -239304,7 +239860,7 @@ function useTweenBindings(action) {
|
|
|
239304
239860
|
}
|
|
239305
239861
|
|
|
239306
239862
|
// src/types/Component.tsx
|
|
239307
|
-
var
|
|
239863
|
+
var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
|
|
239308
239864
|
function TweenedJsxParser({
|
|
239309
239865
|
jsx: jsx84,
|
|
239310
239866
|
components: components3,
|
|
@@ -239312,7 +239868,7 @@ function TweenedJsxParser({
|
|
|
239312
239868
|
action
|
|
239313
239869
|
}) {
|
|
239314
239870
|
const tweenBindings = useTweenBindings(action);
|
|
239315
|
-
return /* @__PURE__ */ (0,
|
|
239871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_jsx_runtime87.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
239316
239872
|
source_default,
|
|
239317
239873
|
{
|
|
239318
239874
|
components: components3,
|
|
@@ -239321,7 +239877,7 @@ function TweenedJsxParser({
|
|
|
239321
239877
|
renderInWrapper: false,
|
|
239322
239878
|
blacklistedAttrs: [],
|
|
239323
239879
|
disableKeyGeneration: true,
|
|
239324
|
-
renderError: ({ error: error51 }) => /* @__PURE__ */ (0,
|
|
239880
|
+
renderError: ({ error: error51 }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { style: { color: "red", padding: 20, fontSize: "larger" }, children: error51 })
|
|
239325
239881
|
}
|
|
239326
239882
|
) });
|
|
239327
239883
|
}
|
|
@@ -239343,17 +239899,40 @@ function ComponentLeaf({ stream: stream3 }) {
|
|
|
239343
239899
|
() => ({ ...components3, ...stream3.data, ...eventState }),
|
|
239344
239900
|
[stream3.data, components3, eventState]
|
|
239345
239901
|
);
|
|
239346
|
-
if (!stream3.jsx)
|
|
239902
|
+
if (!stream3.jsx) {
|
|
239903
|
+
const start5 = stream3.start ?? 0;
|
|
239904
|
+
const end3 = stream3.end ?? start5 + (stream3.duration ?? 1);
|
|
239905
|
+
const durFrames2 = Math.max(1, Math.floor(fps * (end3 - start5)));
|
|
239906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
239907
|
+
Sequence,
|
|
239908
|
+
{
|
|
239909
|
+
durationInFrames: durFrames2,
|
|
239910
|
+
from: Math.floor(fps * start5),
|
|
239911
|
+
layout: "none",
|
|
239912
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
239913
|
+
EventAwareComponent,
|
|
239914
|
+
{
|
|
239915
|
+
jsx: "",
|
|
239916
|
+
components: components3,
|
|
239917
|
+
data: bindings,
|
|
239918
|
+
action: { start: start5, end: end3 },
|
|
239919
|
+
durFrames: durFrames2,
|
|
239920
|
+
on: stream3.on
|
|
239921
|
+
}
|
|
239922
|
+
)
|
|
239923
|
+
}
|
|
239924
|
+
);
|
|
239925
|
+
}
|
|
239347
239926
|
const start4 = stream3.start ?? 0;
|
|
239348
239927
|
const end2 = stream3.end ?? start4 + (stream3.duration ?? 1);
|
|
239349
239928
|
const durFrames = Math.max(1, Math.floor(fps * (end2 - start4)));
|
|
239350
|
-
return /* @__PURE__ */ (0,
|
|
239929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
239351
239930
|
Sequence,
|
|
239352
239931
|
{
|
|
239353
239932
|
durationInFrames: durFrames,
|
|
239354
239933
|
from: Math.floor(fps * start4),
|
|
239355
239934
|
layout: "none",
|
|
239356
|
-
children: /* @__PURE__ */ (0,
|
|
239935
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
239357
239936
|
EventAwareComponent,
|
|
239358
239937
|
{
|
|
239359
239938
|
jsx: stream3.jsx,
|
|
@@ -239376,7 +239955,8 @@ function EventAwareComponent({
|
|
|
239376
239955
|
on: on3
|
|
239377
239956
|
}) {
|
|
239378
239957
|
useFrameEvents(on3, durFrames);
|
|
239379
|
-
|
|
239958
|
+
if (!jsx84) return null;
|
|
239959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
239380
239960
|
TweenedJsxParser,
|
|
239381
239961
|
{
|
|
239382
239962
|
jsx: jsx84,
|
|
@@ -239388,7 +239968,7 @@ function EventAwareComponent({
|
|
|
239388
239968
|
}
|
|
239389
239969
|
|
|
239390
239970
|
// src/types/Rhythm.tsx
|
|
239391
|
-
var
|
|
239971
|
+
var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
|
|
239392
239972
|
function resolveAudioSrc2(src) {
|
|
239393
239973
|
if (/^(https?:|data:|blob:|file:|\/)/.test(src)) return src;
|
|
239394
239974
|
return staticFile(src);
|
|
@@ -239403,7 +239983,7 @@ function RhythmLeaf({ stream: stream3 }) {
|
|
|
239403
239983
|
if (!stream3.src || environment.isStudio) return null;
|
|
239404
239984
|
const resolvedSrc = resolveAudioSrc2(stream3.src);
|
|
239405
239985
|
const volume = stream3.volume ?? 1;
|
|
239406
|
-
return /* @__PURE__ */ (0,
|
|
239986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
239407
239987
|
Sequence,
|
|
239408
239988
|
{
|
|
239409
239989
|
name: stream3.src ?? "rhythm",
|
|
@@ -239411,7 +239991,7 @@ function RhythmLeaf({ stream: stream3 }) {
|
|
|
239411
239991
|
from: Math.floor(fps * start4),
|
|
239412
239992
|
layout: "none",
|
|
239413
239993
|
showInTimeline: false,
|
|
239414
|
-
children: /* @__PURE__ */ (0,
|
|
239994
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
239415
239995
|
Audio,
|
|
239416
239996
|
{
|
|
239417
239997
|
src: resolvedSrc,
|
|
@@ -241748,7 +242328,7 @@ var Rectangle = (0, import_react127.forwardRef)((props, ref2) => {
|
|
|
241748
242328
|
Rectangle.displayName = "Rectangle";
|
|
241749
242329
|
|
|
241750
242330
|
// src/types/Map.tsx
|
|
241751
|
-
var
|
|
242331
|
+
var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
|
|
241752
242332
|
function resolveApiKey(stream3) {
|
|
241753
242333
|
if (stream3.googleMapsApiKey) return stream3.googleMapsApiKey;
|
|
241754
242334
|
if (typeof process !== "undefined" && typeof process.env !== "undefined" && process.env.GOOGLE_MAPS_API_KEY) {
|
|
@@ -241756,6 +242336,14 @@ function resolveApiKey(stream3) {
|
|
|
241756
242336
|
}
|
|
241757
242337
|
return "";
|
|
241758
242338
|
}
|
|
242339
|
+
function resolveMapLocale(language, region) {
|
|
242340
|
+
if (!language) return { language: void 0, region };
|
|
242341
|
+
const lang = language.trim().toLowerCase();
|
|
242342
|
+
if (lang === "zh") return { language: "zh-CN", region: region ?? "CN" };
|
|
242343
|
+
if (lang === "en") return { language: "en", region: region ?? "US" };
|
|
242344
|
+
if (lang.startsWith("zh-")) return { language, region: region ?? "CN" };
|
|
242345
|
+
return { language, region };
|
|
242346
|
+
}
|
|
241759
242347
|
function MapLeaf({ stream: stream3 }) {
|
|
241760
242348
|
const { fps } = useVideoConfig();
|
|
241761
242349
|
const waypoints = stream3.waypoints ?? [];
|
|
@@ -241771,35 +242359,74 @@ function MapLeaf({ stream: stream3 }) {
|
|
|
241771
242359
|
const mapType = stream3.mapType ?? "roadmap";
|
|
241772
242360
|
const travelMode = stream3.travelMode ?? "DRIVING";
|
|
241773
242361
|
const markerEmoji = stream3.routeMarker ?? "\u{1F697}";
|
|
241774
|
-
|
|
242362
|
+
const mapLocale = import_react128.default.useMemo(
|
|
242363
|
+
() => resolveMapLocale(stream3.language, stream3.region),
|
|
242364
|
+
[stream3.language, stream3.region]
|
|
242365
|
+
);
|
|
242366
|
+
const mapLoadHandleRef = import_react128.default.useRef(null);
|
|
242367
|
+
const mapLoadContinuedRef = import_react128.default.useRef(false);
|
|
242368
|
+
import_react128.default.useEffect(() => {
|
|
242369
|
+
mapLoadHandleRef.current = delayRender("Waiting for map tiles to load...");
|
|
242370
|
+
mapLoadContinuedRef.current = false;
|
|
242371
|
+
const fallbackTimer = window.setTimeout(() => {
|
|
242372
|
+
if (!mapLoadContinuedRef.current && mapLoadHandleRef.current !== null) {
|
|
242373
|
+
continueRender(mapLoadHandleRef.current);
|
|
242374
|
+
mapLoadContinuedRef.current = true;
|
|
242375
|
+
}
|
|
242376
|
+
}, 8e3);
|
|
242377
|
+
return () => {
|
|
242378
|
+
window.clearTimeout(fallbackTimer);
|
|
242379
|
+
if (!mapLoadContinuedRef.current && mapLoadHandleRef.current !== null) {
|
|
242380
|
+
continueRender(mapLoadHandleRef.current);
|
|
242381
|
+
mapLoadContinuedRef.current = true;
|
|
242382
|
+
}
|
|
242383
|
+
mapLoadHandleRef.current = null;
|
|
242384
|
+
};
|
|
242385
|
+
}, [stream3.id, start4, end2]);
|
|
242386
|
+
const handleTilesLoaded = import_react128.default.useCallback(() => {
|
|
242387
|
+
if (!mapLoadContinuedRef.current && mapLoadHandleRef.current !== null) {
|
|
242388
|
+
continueRender(mapLoadHandleRef.current);
|
|
242389
|
+
mapLoadContinuedRef.current = true;
|
|
242390
|
+
}
|
|
242391
|
+
}, []);
|
|
242392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
241775
242393
|
Sequence,
|
|
241776
242394
|
{
|
|
241777
242395
|
durationInFrames: durFrames,
|
|
241778
242396
|
from: Math.floor(fps * start4),
|
|
241779
242397
|
layout: "none",
|
|
241780
|
-
children: /* @__PURE__ */ (0,
|
|
241781
|
-
|
|
242398
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
242399
|
+
APIProvider,
|
|
241782
242400
|
{
|
|
241783
|
-
|
|
241784
|
-
|
|
241785
|
-
|
|
241786
|
-
|
|
241787
|
-
|
|
241788
|
-
disableDefaultUI: true,
|
|
241789
|
-
zoomControl: false
|
|
241790
|
-
},
|
|
241791
|
-
style: { width: "100%", height: "100%", position: "absolute" },
|
|
241792
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
241793
|
-
RouteWithMarker,
|
|
242401
|
+
apiKey,
|
|
242402
|
+
language: mapLocale.language,
|
|
242403
|
+
region: mapLocale.region,
|
|
242404
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
242405
|
+
Map4,
|
|
241794
242406
|
{
|
|
241795
|
-
|
|
241796
|
-
|
|
241797
|
-
|
|
241798
|
-
|
|
242407
|
+
mapId: String(stream3.id ?? "map"),
|
|
242408
|
+
defaultCenter: center4,
|
|
242409
|
+
defaultZoom: zoom2,
|
|
242410
|
+
defaultOptions: {
|
|
242411
|
+
mapTypeId: mapType,
|
|
242412
|
+
disableDefaultUI: true,
|
|
242413
|
+
zoomControl: false
|
|
242414
|
+
},
|
|
242415
|
+
onTilesLoaded: handleTilesLoaded,
|
|
242416
|
+
style: { width: "100%", height: "100%", position: "absolute" },
|
|
242417
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
242418
|
+
RouteWithMarker,
|
|
242419
|
+
{
|
|
242420
|
+
waypoints,
|
|
242421
|
+
travelMode,
|
|
242422
|
+
markerEmoji,
|
|
242423
|
+
actionDuration: end2 - start4
|
|
242424
|
+
}
|
|
242425
|
+
)
|
|
241799
242426
|
}
|
|
241800
242427
|
)
|
|
241801
242428
|
}
|
|
241802
|
-
)
|
|
242429
|
+
)
|
|
241803
242430
|
}
|
|
241804
242431
|
);
|
|
241805
242432
|
}
|
|
@@ -241842,8 +242469,8 @@ function RouteWithMarker({
|
|
|
241842
242469
|
setRouteIndex((prev2) => prev2);
|
|
241843
242470
|
}, [routeIndex]);
|
|
241844
242471
|
const position7 = useAnimatedPosition({ leg, actionDuration, waypoints });
|
|
241845
|
-
return /* @__PURE__ */ (0,
|
|
241846
|
-
waypoints.map((wp, i5) => /* @__PURE__ */ (0,
|
|
242472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_jsx_runtime89.Fragment, { children: [
|
|
242473
|
+
waypoints.map((wp, i5) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(AdvancedMarker, { position: wp, children: wp.label ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
241847
242474
|
"div",
|
|
241848
242475
|
{
|
|
241849
242476
|
style: {
|
|
@@ -241860,7 +242487,7 @@ function RouteWithMarker({
|
|
|
241860
242487
|
children: wp.label
|
|
241861
242488
|
}
|
|
241862
242489
|
) : null }, i5)),
|
|
241863
|
-
position7 ? /* @__PURE__ */ (0,
|
|
242490
|
+
position7 ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(AdvancedMarker, { position: position7, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Pin, { glyphText: markerEmoji, scale: 4 }) }) : null
|
|
241864
242491
|
] });
|
|
241865
242492
|
}
|
|
241866
242493
|
function useAnimatedPosition({
|
|
@@ -241925,7 +242552,7 @@ function getCurrentStep(leg, currentInSecond) {
|
|
|
241925
242552
|
|
|
241926
242553
|
// src/types/Include.tsx
|
|
241927
242554
|
var React44 = __toESM(require_react(), 1);
|
|
241928
|
-
var
|
|
242555
|
+
var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
|
|
241929
242556
|
function isSceneBased(data7) {
|
|
241930
242557
|
if (!data7 || typeof data7 !== "object") return false;
|
|
241931
242558
|
const d4 = data7;
|
|
@@ -242040,7 +242667,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242040
242667
|
const renderExternalContent = React44.useCallback(() => {
|
|
242041
242668
|
if (!externalData) return null;
|
|
242042
242669
|
if (loadError) {
|
|
242043
|
-
return /* @__PURE__ */ (0,
|
|
242670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { style: { color: "#ff4444", fontSize: 24, padding: 40 }, children: [
|
|
242044
242671
|
"\u26A0 Include load error: ",
|
|
242045
242672
|
loadError
|
|
242046
242673
|
] });
|
|
@@ -242049,19 +242676,19 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242049
242676
|
const vj = externalData;
|
|
242050
242677
|
const vjFps = vj.meta.fps ?? parentFps;
|
|
242051
242678
|
const dims = { width: parentWidth, height: parentHeight };
|
|
242052
|
-
return /* @__PURE__ */ (0,
|
|
242053
|
-
vj.bgm && /* @__PURE__ */ (0,
|
|
242679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(AbsoluteFill, { style: { backgroundColor: "#0a0a0a", width: dims.width, height: dims.height }, children: [
|
|
242680
|
+
vj.bgm && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Audio, { src: vj.bgm.src, volume: vj.bgm.baseVolume }),
|
|
242054
242681
|
vj.scenes.map((scene2) => {
|
|
242055
242682
|
const startFrame = Math.round((scene2.start ?? 0) * vjFps);
|
|
242056
242683
|
const durFrames2 = Math.round((scene2.duration ?? 1) * vjFps);
|
|
242057
|
-
return /* @__PURE__ */ (0,
|
|
242684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
242058
242685
|
Sequence,
|
|
242059
242686
|
{
|
|
242060
242687
|
from: startFrame,
|
|
242061
242688
|
durationInFrames: durFrames2,
|
|
242062
242689
|
name: `${scene2.id}:${scene2.component}`,
|
|
242063
242690
|
children: [
|
|
242064
|
-
/* @__PURE__ */ (0,
|
|
242691
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
242065
242692
|
AbsoluteFill,
|
|
242066
242693
|
{
|
|
242067
242694
|
style: {
|
|
@@ -242072,7 +242699,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242072
242699
|
padding: 60
|
|
242073
242700
|
},
|
|
242074
242701
|
children: [
|
|
242075
|
-
/* @__PURE__ */ (0,
|
|
242702
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
242076
242703
|
"div",
|
|
242077
242704
|
{
|
|
242078
242705
|
style: {
|
|
@@ -242086,7 +242713,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242086
242713
|
children: scene2.props?.headline ?? scene2.id
|
|
242087
242714
|
}
|
|
242088
242715
|
),
|
|
242089
|
-
scene2.props?.subhead && /* @__PURE__ */ (0,
|
|
242716
|
+
scene2.props?.subhead && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
242090
242717
|
"div",
|
|
242091
242718
|
{
|
|
242092
242719
|
style: {
|
|
@@ -242101,7 +242728,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242101
242728
|
]
|
|
242102
242729
|
}
|
|
242103
242730
|
),
|
|
242104
|
-
scene2.voiceover?.audio && /* @__PURE__ */ (0,
|
|
242731
|
+
scene2.voiceover?.audio && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Audio, { src: scene2.voiceover.audio, volume: 1 })
|
|
242105
242732
|
]
|
|
242106
242733
|
},
|
|
242107
242734
|
scene2.id
|
|
@@ -242116,7 +242743,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242116
242743
|
height: streamTree.height ?? parentHeight,
|
|
242117
242744
|
fps: streamTree.fps ?? parentFps
|
|
242118
242745
|
};
|
|
242119
|
-
return /* @__PURE__ */ (0,
|
|
242746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
242120
242747
|
"div",
|
|
242121
242748
|
{
|
|
242122
242749
|
style: {
|
|
@@ -242125,7 +242752,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242125
242752
|
overflow: "hidden",
|
|
242126
242753
|
position: "relative"
|
|
242127
242754
|
},
|
|
242128
|
-
children: /* @__PURE__ */ (0,
|
|
242755
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(FolderLeaf, { stream: merged })
|
|
242129
242756
|
}
|
|
242130
242757
|
);
|
|
242131
242758
|
}, [externalData, loadError, parentFps, parentWidth, parentHeight]);
|
|
@@ -242133,7 +242760,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242133
242760
|
const durFrames = Math.max(1, Math.floor(parentFps * dur));
|
|
242134
242761
|
let innerNode;
|
|
242135
242762
|
if (!stream3.src && stream3.children?.length) {
|
|
242136
|
-
innerNode = /* @__PURE__ */ (0,
|
|
242763
|
+
innerNode = /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
242137
242764
|
Container,
|
|
242138
242765
|
{
|
|
242139
242766
|
id: stream3.id,
|
|
@@ -242146,11 +242773,11 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242146
242773
|
position: "relative"
|
|
242147
242774
|
},
|
|
242148
242775
|
className: `include ${toClassName(stream3.id ?? "")}`,
|
|
242149
|
-
children: /* @__PURE__ */ (0,
|
|
242776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(FolderLeaf, { stream: stream3 })
|
|
242150
242777
|
}
|
|
242151
242778
|
);
|
|
242152
242779
|
} else if (externalData || loadError) {
|
|
242153
|
-
innerNode = /* @__PURE__ */ (0,
|
|
242780
|
+
innerNode = /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
242154
242781
|
"div",
|
|
242155
242782
|
{
|
|
242156
242783
|
style: {
|
|
@@ -242163,7 +242790,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242163
242790
|
}
|
|
242164
242791
|
);
|
|
242165
242792
|
} else {
|
|
242166
|
-
innerNode = /* @__PURE__ */ (0,
|
|
242793
|
+
innerNode = /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
242167
242794
|
"div",
|
|
242168
242795
|
{
|
|
242169
242796
|
style: {
|
|
@@ -242183,7 +242810,7 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242183
242810
|
}
|
|
242184
242811
|
);
|
|
242185
242812
|
}
|
|
242186
|
-
const sequence = /* @__PURE__ */ (0,
|
|
242813
|
+
const sequence = /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
242187
242814
|
Sequence,
|
|
242188
242815
|
{
|
|
242189
242816
|
durationInFrames: durFrames,
|
|
@@ -242194,16 +242821,16 @@ function IncludeLeaf({ stream: stream3 }) {
|
|
|
242194
242821
|
}
|
|
242195
242822
|
);
|
|
242196
242823
|
const needsNestedContext = subRegistry !== null && subRegistry !== parentCompose.components;
|
|
242197
|
-
const inner3 = /* @__PURE__ */ (0,
|
|
242824
|
+
const inner3 = /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(AudioContext2.Provider, { value: audioCtx, children: sequence });
|
|
242198
242825
|
if (needsNestedContext && subRegistryLoaded) {
|
|
242199
|
-
return /* @__PURE__ */ (0,
|
|
242826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ComposeContext.Provider, { value: mergedCompose, children: inner3 });
|
|
242200
242827
|
}
|
|
242201
242828
|
return inner3;
|
|
242202
242829
|
}
|
|
242203
242830
|
|
|
242204
242831
|
// src/types/Scene.tsx
|
|
242205
242832
|
var React45 = __toESM(require_react(), 1);
|
|
242206
|
-
var
|
|
242833
|
+
var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
|
|
242207
242834
|
function SceneLeaf({ stream: stream3 }) {
|
|
242208
242835
|
const { Container } = React45.useContext(ComposeContext);
|
|
242209
242836
|
const parentAudio = React45.useContext(AudioContext2);
|
|
@@ -242213,14 +242840,14 @@ function SceneLeaf({ stream: stream3 }) {
|
|
|
242213
242840
|
() => ({ id: stream3.id, parent: parentAudio }),
|
|
242214
242841
|
[stream3.id, parentAudio]
|
|
242215
242842
|
);
|
|
242216
|
-
return /* @__PURE__ */ (0,
|
|
242843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(AudioContext2.Provider, { value: audioCtx, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
242217
242844
|
Container,
|
|
242218
242845
|
{
|
|
242219
242846
|
id: stream3.id,
|
|
242220
242847
|
type: "scene",
|
|
242221
242848
|
style: cssJS(stream3.style),
|
|
242222
242849
|
className: `scene ${toClassName(stream3.name ?? "")}`,
|
|
242223
|
-
children: /* @__PURE__ */ (0,
|
|
242850
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Folder, { name: stream3.name ?? "", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(FolderLeaf, { stream: stream3 }) })
|
|
242224
242851
|
}
|
|
242225
242852
|
) });
|
|
242226
242853
|
}
|
|
@@ -242612,7 +243239,7 @@ var builtinAnimations = {
|
|
|
242612
243239
|
};
|
|
242613
243240
|
|
|
242614
243241
|
// src/types/Effect.tsx
|
|
242615
|
-
var
|
|
243242
|
+
var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
|
|
242616
243243
|
function EffectWrapper({
|
|
242617
243244
|
stream: stream3,
|
|
242618
243245
|
children: children2
|
|
@@ -242628,15 +243255,17 @@ function EffectWrapper({
|
|
|
242628
243255
|
const end2 = Math.ceil(endSec * fps);
|
|
242629
243256
|
const durationInFrames = end2 - start4;
|
|
242630
243257
|
if (durationInFrames <= 0) return [];
|
|
243258
|
+
const animDurationSec = stream3.animationDurationSeconds ?? stream3.durationInSeconds ?? durationInFrames / fps;
|
|
243259
|
+
const animDurationFrames = Math.ceil(animDurationSec * fps);
|
|
242631
243260
|
const animation2 = stream3.animation;
|
|
242632
243261
|
const timingFn = stream3.animationTimingFunction;
|
|
242633
243262
|
const iterCount = stream3.animationIterationCount ?? 1;
|
|
242634
243263
|
const style4 = cssJS(stream3.style) ?? {};
|
|
242635
243264
|
let currentFrame = frame2;
|
|
242636
|
-
if (iterCount > 0 &&
|
|
242637
|
-
const iteration = Math.floor((frame2 - start4) /
|
|
243265
|
+
if (iterCount > 0 && animDurationFrames > 0) {
|
|
243266
|
+
const iteration = Math.floor((frame2 - start4) / animDurationFrames);
|
|
242638
243267
|
if (iteration < iterCount) {
|
|
242639
|
-
currentFrame = start4 + (frame2 - start4) %
|
|
243268
|
+
currentFrame = start4 + (frame2 - start4) % animDurationFrames;
|
|
242640
243269
|
}
|
|
242641
243270
|
}
|
|
242642
243271
|
if (currentFrame >= start4 && currentFrame < end2) {
|
|
@@ -242646,7 +243275,7 @@ function EffectWrapper({
|
|
|
242646
243275
|
if (config4) {
|
|
242647
243276
|
const animStyle = interpolateKeyframes(config4, actionFrame, {
|
|
242648
243277
|
fps,
|
|
242649
|
-
durationInSeconds:
|
|
243278
|
+
durationInSeconds: animDurationSec,
|
|
242650
243279
|
timingFunction: timingFn
|
|
242651
243280
|
});
|
|
242652
243281
|
if (animStyle) Object.assign(style4, animStyle);
|
|
@@ -242654,9 +243283,9 @@ function EffectWrapper({
|
|
|
242654
243283
|
}
|
|
242655
243284
|
}
|
|
242656
243285
|
return Object.keys(style4).length > 0 ? [style4] : [];
|
|
242657
|
-
}, [frame2, fps, startSec, endSec, stream3.animation, stream3.animationTimingFunction, stream3.animationIterationCount, stream3.customKeyframes, stream3.style]);
|
|
242658
|
-
if (styles7.length === 0) return /* @__PURE__ */ (0,
|
|
242659
|
-
return /* @__PURE__ */ (0,
|
|
243286
|
+
}, [frame2, fps, startSec, endSec, stream3.animation, stream3.animationTimingFunction, stream3.animationIterationCount, stream3.customKeyframes, stream3.style, stream3.animationDurationSeconds, stream3.durationInSeconds]);
|
|
243287
|
+
if (styles7.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_jsx_runtime92.Fragment, { children: children2 });
|
|
243288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
242660
243289
|
"div",
|
|
242661
243290
|
{
|
|
242662
243291
|
style: Object.assign({ width: width3, height: height2, position: "absolute", inset: 0 }, ...styles7),
|
|
@@ -242667,7 +243296,7 @@ function EffectWrapper({
|
|
|
242667
243296
|
}
|
|
242668
243297
|
|
|
242669
243298
|
// src/types/Folder.tsx
|
|
242670
|
-
var
|
|
243299
|
+
var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
|
|
242671
243300
|
var Leaves = {
|
|
242672
243301
|
video: VideoLeaf,
|
|
242673
243302
|
audio: AudioLeaf,
|
|
@@ -242685,8 +243314,8 @@ var TransitionPresets = {
|
|
|
242685
243314
|
flip,
|
|
242686
243315
|
clockWipe
|
|
242687
243316
|
};
|
|
242688
|
-
var NotSeries = ({ children: children2 }) => /* @__PURE__ */ (0,
|
|
242689
|
-
NotSeries.Sequence = ({ children: children2 }) => /* @__PURE__ */ (0,
|
|
243317
|
+
var NotSeries = ({ children: children2 }) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_jsx_runtime93.Fragment, { children: children2 });
|
|
243318
|
+
NotSeries.Sequence = ({ children: children2 }) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_jsx_runtime93.Fragment, { children: children2 });
|
|
242690
243319
|
function FolderLeaf({ stream: stream3 }) {
|
|
242691
243320
|
const { fps, width: width3, height: height2 } = useVideoConfig();
|
|
242692
243321
|
const { Container } = React47.useContext(ComposeContext);
|
|
@@ -242699,7 +243328,7 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242699
243328
|
const isRoot = stream3.id === "root";
|
|
242700
243329
|
const visibleChildren = stream3.children.filter((c5) => c5.visible !== false);
|
|
242701
243330
|
const bgChildren = visibleChildren.filter((c5) => c5.isBackground);
|
|
242702
|
-
const seriesChildren =
|
|
243331
|
+
const seriesChildren = visibleChildren.filter((c5) => !c5.isBackground);
|
|
242703
243332
|
const allAudio = seriesChildren.length > 0 && seriesChildren.every((c5) => c5.type === "audio");
|
|
242704
243333
|
const effectiveTransition = allAudio ? void 0 : transition2;
|
|
242705
243334
|
const TypedSeries = React47.useMemo(() => {
|
|
@@ -242711,7 +243340,7 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242711
243340
|
const presentation = TransitionPresets[transition2]?.(
|
|
242712
243341
|
transition2 === "clockWipe" ? { width: width3, height: height2 } : void 0
|
|
242713
243342
|
);
|
|
242714
|
-
return /* @__PURE__ */ (0,
|
|
243343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
242715
243344
|
TransitionSeries.Transition,
|
|
242716
243345
|
{
|
|
242717
243346
|
presentation,
|
|
@@ -242724,8 +243353,8 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242724
243353
|
const durFrames = Math.max(1, Math.floor(dur * fps));
|
|
242725
243354
|
const SequenceWrap = TypedSeries.Sequence ?? Sequence;
|
|
242726
243355
|
const isLeaf = child.type !== "folder" && child.type !== "root" && child.type !== "effect";
|
|
242727
|
-
const childContent = isLeaf ? React47.createElement(Leaves[child.type] ?? (() => null), { stream: child }) : child.type === "effect" ? /* @__PURE__ */ (0,
|
|
242728
|
-
return /* @__PURE__ */ (0,
|
|
243356
|
+
const childContent = isLeaf ? React47.createElement(Leaves[child.type] ?? (() => null), { stream: child }) : child.type === "effect" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(EffectWrapper, { stream: child, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FolderLeaf, { stream: child }) }) : React47.createElement(FolderLeaf, { stream: child });
|
|
243357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(SequenceWrap, { durationInFrames: durFrames, layout: "none", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
242729
243358
|
Container,
|
|
242730
243359
|
{
|
|
242731
243360
|
id: child.id,
|
|
@@ -242736,12 +243365,12 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242736
243365
|
}
|
|
242737
243366
|
) }, child.id);
|
|
242738
243367
|
}).filter(Boolean);
|
|
242739
|
-
const bgContent = bgChildren.length > 0 && /* @__PURE__ */ (0,
|
|
243368
|
+
const bgContent = bgChildren.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: bgChildren.map((child) => {
|
|
242740
243369
|
const dur = child.durationInSeconds ?? 0;
|
|
242741
243370
|
const durFrames = Math.max(1, Math.floor(dur * fps));
|
|
242742
243371
|
const isLeaf = child.type !== "folder" && child.type !== "root" && child.type !== "effect";
|
|
242743
|
-
const childContent = isLeaf ? React47.createElement(Leaves[child.type] ?? (() => null), { stream: child }) : child.type === "effect" ? /* @__PURE__ */ (0,
|
|
242744
|
-
const wrapped = /* @__PURE__ */ (0,
|
|
243372
|
+
const childContent = isLeaf ? React47.createElement(Leaves[child.type] ?? (() => null), { stream: child }) : child.type === "effect" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(EffectWrapper, { stream: child, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FolderLeaf, { stream: child }) }) : React47.createElement(FolderLeaf, { stream: child });
|
|
243373
|
+
const wrapped = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
242745
243374
|
Container,
|
|
242746
243375
|
{
|
|
242747
243376
|
id: child.id,
|
|
@@ -242752,7 +243381,7 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242752
243381
|
}
|
|
242753
243382
|
);
|
|
242754
243383
|
const times = Math.max(1, Math.ceil(stream3.durationInSeconds * fps / durFrames));
|
|
242755
|
-
return /* @__PURE__ */ (0,
|
|
243384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Loop, { durationInFrames: durFrames, times, showInTimeline: false, children: wrapped }, child.id);
|
|
242756
243385
|
}) });
|
|
242757
243386
|
if (isSeries && transEl) {
|
|
242758
243387
|
for (let i5 = 1; i5 < sequences.length; i5 += 2) {
|
|
@@ -242766,7 +243395,7 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242766
243395
|
if (visibleChildren.length === 0 || stream3.visible === false) return null;
|
|
242767
243396
|
const containerStyle3 = cssJS(stream3.style);
|
|
242768
243397
|
const orientation = isRoot ? width3 > height2 ? "landscape" : "portrait" : "";
|
|
242769
|
-
return /* @__PURE__ */ (0,
|
|
243398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(AudioContext2.Provider, { value: audioCtx, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
242770
243399
|
Container,
|
|
242771
243400
|
{
|
|
242772
243401
|
id: stream3.id,
|
|
@@ -242775,7 +243404,7 @@ function FolderLeaf({ stream: stream3 }) {
|
|
|
242775
243404
|
className: `${orientation} ${stream3.type}`.trim(),
|
|
242776
243405
|
children: [
|
|
242777
243406
|
bgContent,
|
|
242778
|
-
isSeries ? /* @__PURE__ */ (0,
|
|
243407
|
+
isSeries ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TypedSeries, { children: sequences }) : sequences
|
|
242779
243408
|
]
|
|
242780
243409
|
}
|
|
242781
243410
|
) });
|
|
@@ -243034,7 +243663,7 @@ var P3 = function(t4) {
|
|
|
243034
243663
|
};
|
|
243035
243664
|
|
|
243036
243665
|
// src/types/Subtitle.tsx
|
|
243037
|
-
var
|
|
243666
|
+
var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
|
|
243038
243667
|
var { SubtitleSequence: _SubtitleSeq, ...CaptionComponents } = index_esm_exports;
|
|
243039
243668
|
function resolveSubtitleSrc(src) {
|
|
243040
243669
|
if (src.startsWith("http://") || src.startsWith("https://") || src.startsWith("data:") || src.startsWith("/")) {
|
|
@@ -243067,7 +243696,7 @@ function resolveCaption(type3) {
|
|
|
243067
243696
|
return CaptionComponents[key] ?? CaptionComponents.Caption;
|
|
243068
243697
|
}
|
|
243069
243698
|
function supportHtml(text10) {
|
|
243070
|
-
const el = { .../* @__PURE__ */ (0,
|
|
243699
|
+
const el = { .../* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { dangerouslySetInnerHTML: { __html: text10 } }) };
|
|
243071
243700
|
Object.assign(el, {
|
|
243072
243701
|
length: text10.length,
|
|
243073
243702
|
slice(start4, end2) {
|
|
@@ -243091,7 +243720,7 @@ function supportHtml(text10) {
|
|
|
243091
243720
|
counter++;
|
|
243092
243721
|
}
|
|
243093
243722
|
}
|
|
243094
|
-
return /* @__PURE__ */ (0,
|
|
243723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { dangerouslySetInnerHTML: { __html: chars.join("") } });
|
|
243095
243724
|
},
|
|
243096
243725
|
split(separator, limit2) {
|
|
243097
243726
|
const stripped = text10.replace(/<.*?>/g, "");
|
|
@@ -243144,7 +243773,7 @@ function CueFrame({
|
|
|
243144
243773
|
}),
|
|
243145
243774
|
[subtitle.fontSize, subtitle.fontFamily, subtitle.fontStyle]
|
|
243146
243775
|
);
|
|
243147
|
-
return /* @__PURE__ */ (0,
|
|
243776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Sequence, { layout: "none", durationInFrames, from: from2, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243148
243777
|
GroupedCueInner,
|
|
243149
243778
|
{
|
|
243150
243779
|
group: group2,
|
|
@@ -243170,7 +243799,7 @@ function GroupedCueInner({
|
|
|
243170
243799
|
}
|
|
243171
243800
|
}
|
|
243172
243801
|
const captionText = React48.useMemo(() => supportHtml(activeCue.text), [activeCue.text]);
|
|
243173
|
-
return /* @__PURE__ */ (0,
|
|
243802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(CaptionComponent, { text: captionText, style: textStyle });
|
|
243174
243803
|
}
|
|
243175
243804
|
function SubtitleOverlay({ subtitle }) {
|
|
243176
243805
|
const { fps } = useVideoConfig();
|
|
@@ -243219,7 +243848,7 @@ function SubtitleOverlay({ subtitle }) {
|
|
|
243219
243848
|
const cueGroups = React48.useMemo(() => cues ? groupConsecutiveCues(cues) : [], [cues]);
|
|
243220
243849
|
if (!cues) return null;
|
|
243221
243850
|
const boxCss = subtitle.style ? cssJS(subtitle.style) : {};
|
|
243222
|
-
return /* @__PURE__ */ (0,
|
|
243851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `${subtitle.type || "default"} subtitle-overlay`, style: { ...DEFAULT_BOX_STYLE, ...boxCss }, children: cueGroups.map((group2, gi) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243223
243852
|
CueFrame,
|
|
243224
243853
|
{
|
|
243225
243854
|
cue: group2[0],
|
|
@@ -243232,325 +243861,6 @@ function SubtitleOverlay({ subtitle }) {
|
|
|
243232
243861
|
)) });
|
|
243233
243862
|
}
|
|
243234
243863
|
|
|
243235
|
-
// src/components/StoryboardSlot.tsx
|
|
243236
|
-
var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
|
|
243237
|
-
function StoryboardSlot({ kind, prompt }) {
|
|
243238
|
-
const isVideo = kind === "video";
|
|
243239
|
-
const bgGrad = isVideo ? "linear-gradient(135deg,#7c2d12,#b91c1c)" : "linear-gradient(135deg,#1e3a8a,#6d28d9)";
|
|
243240
|
-
const accentColor = isVideo ? "#fbbf24" : "#93c5fd";
|
|
243241
|
-
const label3 = isVideo ? "Video" : "Image";
|
|
243242
|
-
const emoji3 = isVideo ? "\u{1F3AC}" : "\u{1F5BC}\uFE0F";
|
|
243243
|
-
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
243244
|
-
"div",
|
|
243245
|
-
{
|
|
243246
|
-
style: {
|
|
243247
|
-
position: "absolute",
|
|
243248
|
-
inset: 0,
|
|
243249
|
-
overflow: "hidden",
|
|
243250
|
-
display: "flex",
|
|
243251
|
-
flexDirection: "column",
|
|
243252
|
-
alignItems: "center",
|
|
243253
|
-
justifyContent: "center",
|
|
243254
|
-
background: bgGrad,
|
|
243255
|
-
color: "#fff",
|
|
243256
|
-
fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
|
|
243257
|
-
padding: "6%",
|
|
243258
|
-
boxSizing: "border-box"
|
|
243259
|
-
},
|
|
243260
|
-
children: [
|
|
243261
|
-
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
243262
|
-
"div",
|
|
243263
|
-
{
|
|
243264
|
-
style: {
|
|
243265
|
-
position: "absolute",
|
|
243266
|
-
inset: "4%",
|
|
243267
|
-
border: "3px dashed rgba(255,255,255,0.35)",
|
|
243268
|
-
borderRadius: 24,
|
|
243269
|
-
pointerEvents: "none"
|
|
243270
|
-
}
|
|
243271
|
-
}
|
|
243272
|
-
),
|
|
243273
|
-
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
243274
|
-
"div",
|
|
243275
|
-
{
|
|
243276
|
-
style: {
|
|
243277
|
-
display: "flex",
|
|
243278
|
-
alignItems: "center",
|
|
243279
|
-
gap: "0.5em",
|
|
243280
|
-
background: "rgba(0,0,0,0.35)",
|
|
243281
|
-
border: `2px solid ${accentColor}`,
|
|
243282
|
-
borderRadius: 999,
|
|
243283
|
-
padding: "0.5em 1.1em",
|
|
243284
|
-
fontSize: "2.2vh",
|
|
243285
|
-
fontWeight: 800,
|
|
243286
|
-
letterSpacing: "0.12em",
|
|
243287
|
-
marginBottom: "3vh"
|
|
243288
|
-
},
|
|
243289
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { style: { fontSize: "3.4vh", lineHeight: 1 }, children: emoji3 })
|
|
243290
|
-
}
|
|
243291
|
-
),
|
|
243292
|
-
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
243293
|
-
"div",
|
|
243294
|
-
{
|
|
243295
|
-
style: {
|
|
243296
|
-
position: "relative",
|
|
243297
|
-
maxWidth: "88%",
|
|
243298
|
-
textAlign: "center",
|
|
243299
|
-
fontSize: "3.4vh",
|
|
243300
|
-
lineHeight: 1.4,
|
|
243301
|
-
fontWeight: 600,
|
|
243302
|
-
textShadow: "0 2px 8px rgba(0,0,0,0.5)",
|
|
243303
|
-
whiteSpace: "pre-wrap",
|
|
243304
|
-
wordBreak: "break-word"
|
|
243305
|
-
},
|
|
243306
|
-
children: prompt ?? (isVideo ? "(no video prompt)" : "(no image prompt)")
|
|
243307
|
-
}
|
|
243308
|
-
)
|
|
243309
|
-
]
|
|
243310
|
-
}
|
|
243311
|
-
);
|
|
243312
|
-
}
|
|
243313
|
-
|
|
243314
|
-
// src/components/StoryboardCaption.tsx
|
|
243315
|
-
var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
|
|
243316
|
-
function StoryboardCaption({ script: script2, speaker }) {
|
|
243317
|
-
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
243318
|
-
"div",
|
|
243319
|
-
{
|
|
243320
|
-
style: {
|
|
243321
|
-
position: "absolute",
|
|
243322
|
-
bottom: "10%",
|
|
243323
|
-
left: "5%",
|
|
243324
|
-
right: "5%",
|
|
243325
|
-
display: "flex",
|
|
243326
|
-
flexDirection: "column",
|
|
243327
|
-
alignItems: "center",
|
|
243328
|
-
pointerEvents: "none"
|
|
243329
|
-
},
|
|
243330
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
243331
|
-
"div",
|
|
243332
|
-
{
|
|
243333
|
-
style: {
|
|
243334
|
-
maxWidth: "90%",
|
|
243335
|
-
background: "rgba(0,0,0,0.7)",
|
|
243336
|
-
backdropFilter: "blur(4px)",
|
|
243337
|
-
borderRadius: 16,
|
|
243338
|
-
padding: "2.5vh 4vh",
|
|
243339
|
-
textAlign: "center",
|
|
243340
|
-
color: "#fff",
|
|
243341
|
-
fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif"
|
|
243342
|
-
},
|
|
243343
|
-
children: [
|
|
243344
|
-
speaker && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
243345
|
-
"div",
|
|
243346
|
-
{
|
|
243347
|
-
style: {
|
|
243348
|
-
fontSize: "2vh",
|
|
243349
|
-
fontWeight: 700,
|
|
243350
|
-
color: "#93c5fd",
|
|
243351
|
-
marginBottom: "0.6vh",
|
|
243352
|
-
letterSpacing: "0.04em"
|
|
243353
|
-
},
|
|
243354
|
-
children: speaker
|
|
243355
|
-
}
|
|
243356
|
-
),
|
|
243357
|
-
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
243358
|
-
"div",
|
|
243359
|
-
{
|
|
243360
|
-
style: {
|
|
243361
|
-
fontSize: "2.6vh",
|
|
243362
|
-
lineHeight: 1.5,
|
|
243363
|
-
fontWeight: 500,
|
|
243364
|
-
textShadow: "0 1px 4px rgba(0,0,0,0.4)",
|
|
243365
|
-
whiteSpace: "pre-wrap",
|
|
243366
|
-
wordBreak: "break-word"
|
|
243367
|
-
},
|
|
243368
|
-
children: script2
|
|
243369
|
-
}
|
|
243370
|
-
)
|
|
243371
|
-
]
|
|
243372
|
-
}
|
|
243373
|
-
)
|
|
243374
|
-
}
|
|
243375
|
-
);
|
|
243376
|
-
}
|
|
243377
|
-
|
|
243378
|
-
// src/components/StoryboardInfo.tsx
|
|
243379
|
-
var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
|
|
243380
|
-
function StoryboardInfo({ config: config4, variants, frontmatter }) {
|
|
243381
|
-
const parts = (config4 ?? "").split(" \xB7 ").filter(Boolean);
|
|
243382
|
-
const variantList = (variants ?? "").split(/,\s*/).filter(Boolean);
|
|
243383
|
-
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
243384
|
-
"div",
|
|
243385
|
-
{
|
|
243386
|
-
style: {
|
|
243387
|
-
position: "absolute",
|
|
243388
|
-
inset: 0,
|
|
243389
|
-
display: "flex",
|
|
243390
|
-
flexDirection: "column",
|
|
243391
|
-
alignItems: "center",
|
|
243392
|
-
justifyContent: "center",
|
|
243393
|
-
background: "linear-gradient(135deg,#0f172a,#1e293b,#334155)",
|
|
243394
|
-
color: "#fff",
|
|
243395
|
-
fontFamily: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif",
|
|
243396
|
-
padding: "8%",
|
|
243397
|
-
boxSizing: "border-box"
|
|
243398
|
-
},
|
|
243399
|
-
children: [
|
|
243400
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243401
|
-
"div",
|
|
243402
|
-
{
|
|
243403
|
-
style: {
|
|
243404
|
-
position: "absolute",
|
|
243405
|
-
inset: "5%",
|
|
243406
|
-
border: "2px solid rgba(255,255,255,0.08)",
|
|
243407
|
-
borderRadius: "50%"
|
|
243408
|
-
}
|
|
243409
|
-
}
|
|
243410
|
-
),
|
|
243411
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243412
|
-
"div",
|
|
243413
|
-
{
|
|
243414
|
-
style: {
|
|
243415
|
-
position: "absolute",
|
|
243416
|
-
inset: "12%",
|
|
243417
|
-
border: "1px solid rgba(255,255,255,0.05)",
|
|
243418
|
-
borderRadius: "50%"
|
|
243419
|
-
}
|
|
243420
|
-
}
|
|
243421
|
-
),
|
|
243422
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { style: { fontSize: "6vh", marginBottom: "2.5vh", opacity: 0.7 }, children: "\u{1F3AC}" }),
|
|
243423
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243424
|
-
"div",
|
|
243425
|
-
{
|
|
243426
|
-
style: {
|
|
243427
|
-
fontSize: "4.2vh",
|
|
243428
|
-
fontWeight: 800,
|
|
243429
|
-
letterSpacing: "0.02em",
|
|
243430
|
-
marginBottom: "3vh",
|
|
243431
|
-
textAlign: "center",
|
|
243432
|
-
textShadow: "0 2px 12px rgba(0,0,0,0.5)"
|
|
243433
|
-
},
|
|
243434
|
-
children: "Storyboard Preview"
|
|
243435
|
-
}
|
|
243436
|
-
),
|
|
243437
|
-
parts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243438
|
-
"div",
|
|
243439
|
-
{
|
|
243440
|
-
style: {
|
|
243441
|
-
display: "flex",
|
|
243442
|
-
flexWrap: "wrap",
|
|
243443
|
-
justifyContent: "center",
|
|
243444
|
-
gap: "1.2vh",
|
|
243445
|
-
maxWidth: "85%",
|
|
243446
|
-
marginBottom: variantList.length > 0 ? "2.5vh" : 0
|
|
243447
|
-
},
|
|
243448
|
-
children: parts.map((entry) => {
|
|
243449
|
-
const colonIdx = entry.indexOf(":");
|
|
243450
|
-
const label3 = colonIdx > 0 ? entry.slice(0, colonIdx).trim() : "";
|
|
243451
|
-
const value2 = colonIdx > 0 ? entry.slice(colonIdx + 1).trim() : entry;
|
|
243452
|
-
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
243453
|
-
"div",
|
|
243454
|
-
{
|
|
243455
|
-
style: {
|
|
243456
|
-
background: "rgba(255,255,255,0.07)",
|
|
243457
|
-
border: "1px solid rgba(255,255,255,0.12)",
|
|
243458
|
-
borderRadius: 12,
|
|
243459
|
-
padding: "1.2vh 2.2vh",
|
|
243460
|
-
textAlign: "center",
|
|
243461
|
-
minWidth: "16vh"
|
|
243462
|
-
},
|
|
243463
|
-
children: [
|
|
243464
|
-
label3 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243465
|
-
"div",
|
|
243466
|
-
{
|
|
243467
|
-
style: {
|
|
243468
|
-
fontSize: "1.6vh",
|
|
243469
|
-
fontWeight: 600,
|
|
243470
|
-
color: "#93c5fd",
|
|
243471
|
-
letterSpacing: "0.08em",
|
|
243472
|
-
textTransform: "uppercase",
|
|
243473
|
-
marginBottom: "0.4vh"
|
|
243474
|
-
},
|
|
243475
|
-
children: label3
|
|
243476
|
-
}
|
|
243477
|
-
),
|
|
243478
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243479
|
-
"div",
|
|
243480
|
-
{
|
|
243481
|
-
style: {
|
|
243482
|
-
fontSize: "2.2vh",
|
|
243483
|
-
fontWeight: 700,
|
|
243484
|
-
whiteSpace: "pre-wrap",
|
|
243485
|
-
wordBreak: "break-word",
|
|
243486
|
-
opacity: value2.startsWith("http") ? 0.8 : 1
|
|
243487
|
-
},
|
|
243488
|
-
children: value2
|
|
243489
|
-
}
|
|
243490
|
-
)
|
|
243491
|
-
]
|
|
243492
|
-
},
|
|
243493
|
-
label3 || entry
|
|
243494
|
-
);
|
|
243495
|
-
})
|
|
243496
|
-
}
|
|
243497
|
-
),
|
|
243498
|
-
frontmatter && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243499
|
-
"div",
|
|
243500
|
-
{
|
|
243501
|
-
style: {
|
|
243502
|
-
maxWidth: "85%",
|
|
243503
|
-
background: "rgba(255,255,255,0.05)",
|
|
243504
|
-
border: "1px solid rgba(255,255,255,0.1)",
|
|
243505
|
-
borderRadius: 12,
|
|
243506
|
-
padding: "1.5vh 2.5vh",
|
|
243507
|
-
marginBottom: "2.5vh",
|
|
243508
|
-
fontFamily: "monospace",
|
|
243509
|
-
fontSize: "1.8vh",
|
|
243510
|
-
lineHeight: 1.6,
|
|
243511
|
-
color: "rgba(255,255,255,0.8)",
|
|
243512
|
-
whiteSpace: "pre-wrap",
|
|
243513
|
-
wordBreak: "break-word",
|
|
243514
|
-
textAlign: "left",
|
|
243515
|
-
maxHeight: "28vh",
|
|
243516
|
-
overflow: "auto"
|
|
243517
|
-
},
|
|
243518
|
-
children: frontmatter
|
|
243519
|
-
}
|
|
243520
|
-
),
|
|
243521
|
-
variantList.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243522
|
-
"div",
|
|
243523
|
-
{
|
|
243524
|
-
style: {
|
|
243525
|
-
display: "flex",
|
|
243526
|
-
flexWrap: "wrap",
|
|
243527
|
-
justifyContent: "center",
|
|
243528
|
-
gap: "1vh"
|
|
243529
|
-
},
|
|
243530
|
-
children: variantList.map((v5) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
243531
|
-
"div",
|
|
243532
|
-
{
|
|
243533
|
-
style: {
|
|
243534
|
-
background: "rgba(251,191,36,0.15)",
|
|
243535
|
-
border: "1px solid rgba(251,191,36,0.35)",
|
|
243536
|
-
borderRadius: 999,
|
|
243537
|
-
padding: "0.8vh 2vh",
|
|
243538
|
-
fontSize: "1.8vh",
|
|
243539
|
-
fontWeight: 600,
|
|
243540
|
-
color: "#fbbf24",
|
|
243541
|
-
letterSpacing: "0.04em"
|
|
243542
|
-
},
|
|
243543
|
-
children: v5
|
|
243544
|
-
},
|
|
243545
|
-
v5
|
|
243546
|
-
))
|
|
243547
|
-
}
|
|
243548
|
-
)
|
|
243549
|
-
]
|
|
243550
|
-
}
|
|
243551
|
-
);
|
|
243552
|
-
}
|
|
243553
|
-
|
|
243554
243864
|
// node_modules/zod/v4/classic/external.js
|
|
243555
243865
|
var external_exports = {};
|
|
243556
243866
|
__export(external_exports, {
|
|
@@ -257405,11 +257715,12 @@ var image3 = base.extend({
|
|
|
257405
257715
|
var component2 = base.extend({
|
|
257406
257716
|
type: external_exports.literal("component").default("component"),
|
|
257407
257717
|
jsx: external_exports.string().describe("usage JSX expression compiled at runtime; tag names resolved from imports"),
|
|
257408
|
-
data: external_exports.record(external_exports.string(), external_exports.
|
|
257718
|
+
data: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe("extra variables (e.g. from ~~~md source code fences) available in JSX scope")
|
|
257409
257719
|
});
|
|
257410
257720
|
var effect = base.extend({
|
|
257411
257721
|
type: external_exports.literal("effect").default("effect"),
|
|
257412
257722
|
animation: external_exports.string().optional().describe("builtin keyframe name or 'custom'"),
|
|
257723
|
+
animationDurationSeconds: external_exports.number().optional().describe("animation duration (separate from wrapper durationInSeconds which getDurationInSeconds may overwrite)"),
|
|
257413
257724
|
animationTimingFunction: external_exports.enum(["linear", "ease", "ease-in", "ease-out", "ease-in-out"]).optional(),
|
|
257414
257725
|
animationIterationCount: external_exports.number().default(1),
|
|
257415
257726
|
customKeyframes: external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.string())).optional().describe('inline keyframes: { "0": { opacity: "0" }, "100": { opacity: "1" } }'),
|
|
@@ -257451,6 +257762,8 @@ var mapStream = base.extend({
|
|
|
257451
257762
|
zoom: external_exports.number().default(10),
|
|
257452
257763
|
center: external_exports.object({ lat: external_exports.number(), lng: external_exports.number() }).optional().describe("map view center (defaults to first waypoint)"),
|
|
257453
257764
|
mapType: external_exports.enum(["roadmap", "satellite", "hybrid", "terrain"]).default("roadmap").describe("Google Maps style"),
|
|
257765
|
+
language: external_exports.string().optional().describe("Google Maps UI/label language, e.g. zh-CN"),
|
|
257766
|
+
region: external_exports.string().optional().describe("Google Maps region code, e.g. CN"),
|
|
257454
257767
|
travelMode: external_exports.enum(["DRIVING", "WALKING", "BICYCLING", "TRANSIT"]).default("DRIVING").describe("Directions API travel mode"),
|
|
257455
257768
|
routeMarker: external_exports.string().default("\u{1F697}").describe("emoji/character for the animated traveling marker"),
|
|
257456
257769
|
googleMapsApiKey: external_exports.string().optional().describe("injected by compiler from GOOGLE_MAPS_API_KEY env var")
|
|
@@ -257472,13 +257785,7 @@ var stream2 = external_exports.discriminatedUnion("type", [
|
|
|
257472
257785
|
// src/entry.tsx
|
|
257473
257786
|
var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
|
|
257474
257787
|
var DefaultContainer2 = ({ children: children2, style: style4, className: className2 }) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: className2, style: { position: "absolute", inset: 0, ...style4 }, children: children2 });
|
|
257475
|
-
var BUILTIN_COMPONENTS =
|
|
257476
|
-
StoryboardSlot,
|
|
257477
|
-
StoryboardCaption,
|
|
257478
|
-
StoryboardInfo,
|
|
257479
|
-
Markdown: Markdown2,
|
|
257480
|
-
Mermaid
|
|
257481
|
-
};
|
|
257788
|
+
var BUILTIN_COMPONENTS = components_exports;
|
|
257482
257789
|
function useComponentRegistry(imports) {
|
|
257483
257790
|
const [registry2, setRegistry] = React49.useState(null);
|
|
257484
257791
|
const handleRef = React49.useRef(null);
|
|
@@ -257561,20 +257868,20 @@ function MarkCut({ root: root8, compose, background = "#000" }) {
|
|
|
257561
257868
|
// src/player/components/HeaderBar.tsx
|
|
257562
257869
|
var React50 = __toESM(require_react(), 1);
|
|
257563
257870
|
var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
|
|
257564
|
-
function HeaderBar({ mode, sceneInfo,
|
|
257871
|
+
function HeaderBar({ mode, sceneInfo, sseConnected, locale: locale3 = "en" }) {
|
|
257872
|
+
const isZh = locale3 === "zh";
|
|
257565
257873
|
const handleClose = React50.useCallback(() => {
|
|
257566
257874
|
navigator.sendBeacon("/api/shutdown", "{}");
|
|
257567
|
-
document.body.innerHTML =
|
|
257568
|
-
}, []);
|
|
257875
|
+
document.body.innerHTML = `<div style='display:flex;align-items:center;justify-content:center;height:100vh;background:#0a0a0a;color:#555;font-family:sans-serif;font-size:16px'>\u2B61 ${isZh ? "\u64AD\u653E\u5668\u5DF2\u5173\u95ED\uFF0C\u8FD4\u56DE\u7EC8\u7AEF" : "player closed \u2014 return to terminal"}</div>`;
|
|
257876
|
+
}, [isZh]);
|
|
257569
257877
|
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { id: "header", children: [
|
|
257570
257878
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { style: { flex: 1, display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
257571
257879
|
mode === "label" && sceneInfo && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { id: "scene-info", children: sceneInfo }),
|
|
257572
|
-
mode === "edit" && editStatus && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { id: "edit-status", children: editStatus }),
|
|
257573
257880
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
257574
257881
|
"span",
|
|
257575
257882
|
{
|
|
257576
257883
|
id: "sse-indicator",
|
|
257577
|
-
title: sseConnected ? "Connected \u2014 auto-reload ready" : "Disconnected",
|
|
257884
|
+
title: sseConnected ? isZh ? "\u5DF2\u8FDE\u63A5\uFF0C\u53EF\u81EA\u52A8\u5237\u65B0" : "Connected \u2014 auto-reload ready" : isZh ? "\u8FDE\u63A5\u65AD\u5F00" : "Disconnected",
|
|
257578
257885
|
style: {
|
|
257579
257886
|
display: "inline-block",
|
|
257580
257887
|
width: 8,
|
|
@@ -257586,16 +257893,17 @@ function HeaderBar({ mode, sceneInfo, editStatus, sseConnected }) {
|
|
|
257586
257893
|
}
|
|
257587
257894
|
)
|
|
257588
257895
|
] }),
|
|
257589
|
-
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { id: "header-actions", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("button", { id: "close-btn", title: "Close player and return to terminal", onClick: handleClose, children: "\u2715" }) })
|
|
257896
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { id: "header-actions", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("button", { id: "close-btn", title: isZh ? "\u5173\u95ED\u64AD\u653E\u5668\u5E76\u8FD4\u56DE\u7EC8\u7AEF" : "Close player and return to terminal", onClick: handleClose, children: "\u2715" }) })
|
|
257590
257897
|
] });
|
|
257591
257898
|
}
|
|
257592
257899
|
|
|
257593
257900
|
// src/player/components/EditControls.tsx
|
|
257594
257901
|
var React51 = __toESM(require_react(), 1);
|
|
257595
257902
|
var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
|
|
257596
|
-
function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeScene }) {
|
|
257903
|
+
function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeScene, locale: locale3 = "en" }) {
|
|
257597
257904
|
const [busy, setBusy] = React51.useState(false);
|
|
257598
257905
|
const inputRef = React51.useRef(null);
|
|
257906
|
+
const isZh = locale3 === "zh";
|
|
257599
257907
|
const handleApplyEdit = React51.useCallback(
|
|
257600
257908
|
async (text10) => {
|
|
257601
257909
|
if (!text10 || busy) return;
|
|
@@ -257644,7 +257952,7 @@ function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeSc
|
|
|
257644
257952
|
{
|
|
257645
257953
|
ref: inputRef,
|
|
257646
257954
|
id: "edit-input",
|
|
257647
|
-
placeholder: "What should change? e.g. make text bigger",
|
|
257955
|
+
placeholder: isZh ? "\u60F3\u6539\u4EC0\u4E48\uFF1F\u4F8B\u5982\uFF1A\u628A\u6587\u5B57\u653E\u5927\u4E00\u4E9B" : "What should change? e.g. make text bigger",
|
|
257648
257956
|
onKeyDown: handleKeyDown
|
|
257649
257957
|
}
|
|
257650
257958
|
),
|
|
@@ -257652,7 +257960,7 @@ function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeSc
|
|
|
257652
257960
|
"button",
|
|
257653
257961
|
{
|
|
257654
257962
|
id: "edit-btn",
|
|
257655
|
-
title: "Apply edit",
|
|
257963
|
+
title: isZh ? "\u5E94\u7528\u4FEE\u6539" : "Apply edit",
|
|
257656
257964
|
disabled: busy,
|
|
257657
257965
|
onClick: () => handleApplyEdit(inputRef.current?.value || ""),
|
|
257658
257966
|
children: "\u2728"
|
|
@@ -257661,9 +257969,72 @@ function EditControls({ onStatusChange, suppressReloadRef, currentTime, activeSc
|
|
|
257661
257969
|
] });
|
|
257662
257970
|
}
|
|
257663
257971
|
|
|
257664
|
-
// src/player/components/
|
|
257972
|
+
// src/player/components/EditMessagePanel.tsx
|
|
257665
257973
|
var React54 = __toESM(require_react(), 1);
|
|
257666
257974
|
var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
|
|
257975
|
+
function EditMessagePanel({ entries: entries2, minimized, locale: locale3 = "en", onToggleMinimize }) {
|
|
257976
|
+
const listRef = React54.useRef(null);
|
|
257977
|
+
const isZh = locale3 === "zh";
|
|
257978
|
+
React54.useEffect(() => {
|
|
257979
|
+
if (listRef.current) {
|
|
257980
|
+
listRef.current.scrollTop = listRef.current.scrollHeight;
|
|
257981
|
+
}
|
|
257982
|
+
}, [entries2]);
|
|
257983
|
+
if (minimized) {
|
|
257984
|
+
const latest = entries2[entries2.length - 1];
|
|
257985
|
+
const label3 = entries2.length === 0 ? isZh ? "\u2728 \u7F16\u8F91" : "\u2728 Edit" : isZh ? `\u2728 ${entries2.length} \u6761\u7F16\u8F91${latest?.status === "thinking" ? " \u23F3" : ""}` : `\u2728 ${entries2.length} edit${entries2.length > 1 ? "s" : ""}${latest?.status === "thinking" ? " \u23F3" : ""}`;
|
|
257986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("button", { id: "edit-message-bar", onClick: onToggleMinimize, title: isZh ? "\u663E\u793A\u7F16\u8F91\u5386\u53F2" : "Show edit history", children: label3 });
|
|
257987
|
+
}
|
|
257988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { id: "edit-message-panel", children: [
|
|
257989
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { id: "edit-message-header", children: [
|
|
257990
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: isZh ? "\u2728 \u7F16\u8F91\u5386\u53F2" : "\u2728 Edit History" }),
|
|
257991
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
257992
|
+
"button",
|
|
257993
|
+
{
|
|
257994
|
+
id: "edit-message-minimize",
|
|
257995
|
+
onClick: onToggleMinimize,
|
|
257996
|
+
title: isZh ? "\u6700\u5C0F\u5316" : "Minimize",
|
|
257997
|
+
"aria-label": isZh ? "\u6700\u5C0F\u5316\u7F16\u8F91\u9762\u677F" : "Minimize edit panel",
|
|
257998
|
+
children: "\u2500"
|
|
257999
|
+
}
|
|
258000
|
+
)
|
|
258001
|
+
] }),
|
|
258002
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { id: "edit-message-list", ref: listRef, children: [
|
|
258003
|
+
entries2.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "edit-message-empty", children: isZh ? "\u6682\u65E0\u7F16\u8F91\u8BB0\u5F55\u3002\u8BF7\u5728\u4E0B\u65B9\u8F93\u5165\u4FEE\u6539\u8BF7\u6C42\u3002" : "No edits yet. Type a request below." }),
|
|
258004
|
+
entries2.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `edit-message-entry ${entry.status}`, children: [
|
|
258005
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "edit-message-request", children: [
|
|
258006
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "edit-role", children: isZh ? "\u4F60:" : "You:" }),
|
|
258007
|
+
" ",
|
|
258008
|
+
entry.request
|
|
258009
|
+
] }),
|
|
258010
|
+
entry.status === "thinking" && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "edit-message-thinking", children: [
|
|
258011
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "edit-role", children: isZh ? "\u52A9\u624B:" : "Assistant:" }),
|
|
258012
|
+
" ",
|
|
258013
|
+
isZh ? "\u601D\u8003\u4E2D" : "Thinking",
|
|
258014
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { className: "edit-dots", children: [
|
|
258015
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: "." }),
|
|
258016
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: "." }),
|
|
258017
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: "." })
|
|
258018
|
+
] })
|
|
258019
|
+
] }),
|
|
258020
|
+
entry.status === "done" && entry.progress && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "edit-message-response", children: [
|
|
258021
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "edit-role", children: isZh ? "\u52A9\u624B:" : "Assistant:" }),
|
|
258022
|
+
" ",
|
|
258023
|
+
entry.progress
|
|
258024
|
+
] }),
|
|
258025
|
+
entry.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "edit-message-error", children: [
|
|
258026
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "edit-role", children: isZh ? "\u9519\u8BEF:" : "Error:" }),
|
|
258027
|
+
" ",
|
|
258028
|
+
entry.error || entry.progress || (isZh ? "\u7F16\u8F91\u5931\u8D25" : "Edit failed")
|
|
258029
|
+
] })
|
|
258030
|
+
] }, entry.id))
|
|
258031
|
+
] })
|
|
258032
|
+
] });
|
|
258033
|
+
}
|
|
258034
|
+
|
|
258035
|
+
// src/player/components/LabelControls.tsx
|
|
258036
|
+
var React55 = __toESM(require_react(), 1);
|
|
258037
|
+
var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
|
|
257667
258038
|
var VIDEO_EXT = {
|
|
257668
258039
|
".mov": 1,
|
|
257669
258040
|
".mp4": 1,
|
|
@@ -257682,14 +258053,14 @@ function formatTime2(sec) {
|
|
|
257682
258053
|
return mm + ":" + String(ss).padStart(2, "0");
|
|
257683
258054
|
}
|
|
257684
258055
|
function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
257685
|
-
const [videoInfo, setVideoInfo] =
|
|
257686
|
-
const [labelData, setLabelData] =
|
|
257687
|
-
const [currentSceneIdx, setCurrentSceneIdx] =
|
|
257688
|
-
const [selectedOverride, setSelectedOverride] =
|
|
257689
|
-
const [inputText, setInputText] =
|
|
257690
|
-
const [saving, setSaving] =
|
|
257691
|
-
const inputRef =
|
|
257692
|
-
|
|
258056
|
+
const [videoInfo, setVideoInfo] = React55.useState(null);
|
|
258057
|
+
const [labelData, setLabelData] = React55.useState({});
|
|
258058
|
+
const [currentSceneIdx, setCurrentSceneIdx] = React55.useState(0);
|
|
258059
|
+
const [selectedOverride, setSelectedOverride] = React55.useState(-1);
|
|
258060
|
+
const [inputText, setInputText] = React55.useState("");
|
|
258061
|
+
const [saving, setSaving] = React55.useState(false);
|
|
258062
|
+
const inputRef = React55.useRef(null);
|
|
258063
|
+
React55.useEffect(() => {
|
|
257693
258064
|
fetch("/api/video-info").then((r2) => r2.json()).then((info3) => {
|
|
257694
258065
|
setVideoInfo(info3);
|
|
257695
258066
|
if (info3.scenes?.[0]) {
|
|
@@ -257720,7 +258091,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257720
258091
|
const scenes = videoInfo?.scenes || [];
|
|
257721
258092
|
const effectiveIdx = selectedOverride >= 0 ? selectedOverride : currentSceneIdx;
|
|
257722
258093
|
const currentScene = scenes[effectiveIdx];
|
|
257723
|
-
|
|
258094
|
+
React55.useEffect(() => {
|
|
257724
258095
|
if (selectedOverride >= 0) return;
|
|
257725
258096
|
for (let i5 = 0; i5 < scenes.length; i5++) {
|
|
257726
258097
|
if (currentTime >= scenes[i5].start && currentTime < scenes[i5].end) {
|
|
@@ -257729,7 +258100,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257729
258100
|
}
|
|
257730
258101
|
}
|
|
257731
258102
|
}, [currentTime, scenes, selectedOverride]);
|
|
257732
|
-
|
|
258103
|
+
React55.useEffect(() => {
|
|
257733
258104
|
if (selectedOverride >= 0 && currentScene) {
|
|
257734
258105
|
const scene2 = scenes[selectedOverride];
|
|
257735
258106
|
if (scene2 && (currentTime < scene2.start || currentTime >= scene2.end)) {
|
|
@@ -257737,7 +258108,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257737
258108
|
}
|
|
257738
258109
|
}
|
|
257739
258110
|
}, [currentTime, selectedOverride, scenes, currentScene]);
|
|
257740
|
-
|
|
258111
|
+
React55.useEffect(() => {
|
|
257741
258112
|
if (!currentScene) {
|
|
257742
258113
|
onSceneChange?.(currentTime.toFixed(1) + "s");
|
|
257743
258114
|
} else if (selectedOverride >= 0) {
|
|
@@ -257746,7 +258117,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257746
258117
|
onSceneChange?.(currentScene.name + " (" + currentTime.toFixed(1) + "s)");
|
|
257747
258118
|
}
|
|
257748
258119
|
}, [currentScene, currentTime, selectedOverride, onSceneChange]);
|
|
257749
|
-
const seekToScene =
|
|
258120
|
+
const seekToScene = React55.useCallback(
|
|
257750
258121
|
(index2) => {
|
|
257751
258122
|
setSelectedOverride(index2);
|
|
257752
258123
|
setCurrentSceneIdx(index2);
|
|
@@ -257758,11 +258129,11 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257758
258129
|
},
|
|
257759
258130
|
[scenes, playerRef]
|
|
257760
258131
|
);
|
|
257761
|
-
|
|
258132
|
+
React55.useEffect(() => {
|
|
257762
258133
|
const entry = labelData[effectiveIdx];
|
|
257763
258134
|
setInputText(entry && entry.overall || "");
|
|
257764
258135
|
}, [effectiveIdx, labelData]);
|
|
257765
|
-
const saveLabel =
|
|
258136
|
+
const saveLabel = React55.useCallback(() => {
|
|
257766
258137
|
const text10 = inputText.trim();
|
|
257767
258138
|
if (!text10 || saving) return;
|
|
257768
258139
|
setSaving(true);
|
|
@@ -257804,7 +258175,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257804
258175
|
}).catch(() => {
|
|
257805
258176
|
}).finally(() => setSaving(false));
|
|
257806
258177
|
}, [inputText, saving, effectiveIdx, currentTime, scenes]);
|
|
257807
|
-
const deleteTimed =
|
|
258178
|
+
const deleteTimed = React55.useCallback(
|
|
257808
258179
|
(key) => {
|
|
257809
258180
|
const sceneIdx = effectiveIdx;
|
|
257810
258181
|
setLabelData((prev2) => {
|
|
@@ -257830,7 +258201,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257830
258201
|
[effectiveIdx]
|
|
257831
258202
|
);
|
|
257832
258203
|
const renderThumbnails = () => {
|
|
257833
|
-
return /* @__PURE__ */ (0,
|
|
258204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { id: "thumbnails", children: scenes.map((scene2, i5) => {
|
|
257834
258205
|
const isActive = i5 === effectiveIdx;
|
|
257835
258206
|
const entry = labelData[i5];
|
|
257836
258207
|
const hasLabel = entry && (entry.overall || Object.keys(entry.timed).length > 0);
|
|
@@ -257838,9 +258209,9 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257838
258209
|
const ext = scene2.src.substring(scene2.src.lastIndexOf(".")).toLowerCase();
|
|
257839
258210
|
const isVideo = !!VIDEO_EXT[ext];
|
|
257840
258211
|
if (scene2.src && !isVideo) {
|
|
257841
|
-
thumbContent = /* @__PURE__ */ (0,
|
|
258212
|
+
thumbContent = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("img", { src: scene2.src, alt: "", loading: "lazy" });
|
|
257842
258213
|
} else if (scene2.src && isVideo) {
|
|
257843
|
-
thumbContent = /* @__PURE__ */ (0,
|
|
258214
|
+
thumbContent = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
257844
258215
|
"video",
|
|
257845
258216
|
{
|
|
257846
258217
|
src: scene2.src,
|
|
@@ -257850,7 +258221,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257850
258221
|
}
|
|
257851
258222
|
);
|
|
257852
258223
|
} else {
|
|
257853
|
-
thumbContent = /* @__PURE__ */ (0,
|
|
258224
|
+
thumbContent = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
257854
258225
|
"div",
|
|
257855
258226
|
{
|
|
257856
258227
|
style: {
|
|
@@ -257868,7 +258239,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257868
258239
|
}
|
|
257869
258240
|
);
|
|
257870
258241
|
}
|
|
257871
|
-
return /* @__PURE__ */ (0,
|
|
258242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
257872
258243
|
"div",
|
|
257873
258244
|
{
|
|
257874
258245
|
className: "thumb-item" + (isActive ? " active" : ""),
|
|
@@ -257876,7 +258247,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257876
258247
|
onClick: () => seekToScene(i5),
|
|
257877
258248
|
children: [
|
|
257878
258249
|
thumbContent,
|
|
257879
|
-
/* @__PURE__ */ (0,
|
|
258250
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "thumb-badge" + (hasLabel ? " has-label" : "") })
|
|
257880
258251
|
]
|
|
257881
258252
|
},
|
|
257882
258253
|
i5
|
|
@@ -257887,12 +258258,12 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257887
258258
|
const entry = labelData[effectiveIdx];
|
|
257888
258259
|
const timed = entry && entry.timed || {};
|
|
257889
258260
|
const keys4 = Object.keys(timed).sort();
|
|
257890
|
-
return /* @__PURE__ */ (0,
|
|
258261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { id: "timed-labels", children: keys4.map((k4) => {
|
|
257891
258262
|
const sec = parseInt(k4.replace("at_", "")) / 1e3;
|
|
257892
|
-
return /* @__PURE__ */ (0,
|
|
257893
|
-
/* @__PURE__ */ (0,
|
|
257894
|
-
/* @__PURE__ */ (0,
|
|
257895
|
-
/* @__PURE__ */ (0,
|
|
258263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "timed-label", "data-key": k4, children: [
|
|
258264
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "tl-time", children: formatTime2(sec) }),
|
|
258265
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "tl-text", dangerouslySetInnerHTML: { __html: escHtml(timed[k4]) } }),
|
|
258266
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("button", { className: "tl-del", title: "Remove", onClick: () => deleteTimed(k4), children: "\xD7" })
|
|
257896
258267
|
] }, k4);
|
|
257897
258268
|
}) });
|
|
257898
258269
|
};
|
|
@@ -257904,12 +258275,12 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257904
258275
|
sceneInfoText = currentScene.name + " (" + currentTime.toFixed(1) + "s)";
|
|
257905
258276
|
}
|
|
257906
258277
|
}
|
|
257907
|
-
return /* @__PURE__ */ (0,
|
|
258278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
|
|
257908
258279
|
renderThumbnails(),
|
|
257909
258280
|
renderTimedLabels(),
|
|
257910
|
-
/* @__PURE__ */ (0,
|
|
257911
|
-
/* @__PURE__ */ (0,
|
|
257912
|
-
/* @__PURE__ */ (0,
|
|
258281
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { id: "saved-toast", children: "\u2713 Label saved" }),
|
|
258282
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { id: "bottom-bar", children: [
|
|
258283
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
257913
258284
|
"input",
|
|
257914
258285
|
{
|
|
257915
258286
|
ref: inputRef,
|
|
@@ -257925,7 +258296,7 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257925
258296
|
}
|
|
257926
258297
|
}
|
|
257927
258298
|
),
|
|
257928
|
-
/* @__PURE__ */ (0,
|
|
258299
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
257929
258300
|
"button",
|
|
257930
258301
|
{
|
|
257931
258302
|
id: "label-btn",
|
|
@@ -257940,11 +258311,11 @@ function LabelControls({ playerRef, currentTime, onSceneChange }) {
|
|
|
257940
258311
|
}
|
|
257941
258312
|
|
|
257942
258313
|
// src/player/components/SceneThumbnails.tsx
|
|
257943
|
-
var
|
|
257944
|
-
var
|
|
258314
|
+
var React56 = __toESM(require_react(), 1);
|
|
258315
|
+
var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
|
|
257945
258316
|
function SceneThumbnails({ currentTime, onSeek }) {
|
|
257946
|
-
const [scenes, setScenes] =
|
|
257947
|
-
|
|
258317
|
+
const [scenes, setScenes] = React56.useState([]);
|
|
258318
|
+
React56.useEffect(() => {
|
|
257948
258319
|
const variant = window.VARIANT || "default";
|
|
257949
258320
|
const url2 = variant !== "default" ? `/api/video-info?variant=${variant}` : "/api/video-info";
|
|
257950
258321
|
fetch(url2).then((r2) => r2.json()).then((info3) => {
|
|
@@ -257960,9 +258331,9 @@ function SceneThumbnails({ currentTime, onSeek }) {
|
|
|
257960
258331
|
break;
|
|
257961
258332
|
}
|
|
257962
258333
|
}
|
|
257963
|
-
return /* @__PURE__ */ (0,
|
|
258334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { id: "scene-thumbnails", children: scenes.map((scene2, i5) => {
|
|
257964
258335
|
const isActive = i5 === activeIdx;
|
|
257965
|
-
return /* @__PURE__ */ (0,
|
|
258336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
257966
258337
|
"span",
|
|
257967
258338
|
{
|
|
257968
258339
|
className: "scene-pill" + (isActive ? " active" : ""),
|
|
@@ -257975,12 +258346,12 @@ function SceneThumbnails({ currentTime, onSeek }) {
|
|
|
257975
258346
|
}
|
|
257976
258347
|
|
|
257977
258348
|
// src/player/components/VariantBar.tsx
|
|
257978
|
-
var
|
|
257979
|
-
var
|
|
258349
|
+
var React57 = __toESM(require_react(), 1);
|
|
258350
|
+
var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
|
|
257980
258351
|
function VariantBar() {
|
|
257981
|
-
const [variants, setVariants] =
|
|
258352
|
+
const [variants, setVariants] = React57.useState([]);
|
|
257982
258353
|
const currentVariant = (typeof window !== "undefined" ? window.VARIANT : null) || "default";
|
|
257983
|
-
|
|
258354
|
+
React57.useEffect(() => {
|
|
257984
258355
|
fetch("/api/video-info").then((r2) => r2.json()).then((info3) => {
|
|
257985
258356
|
if (info3.variants && info3.variants.length > 1) {
|
|
257986
258357
|
setVariants(info3.variants);
|
|
@@ -257989,7 +258360,7 @@ function VariantBar() {
|
|
|
257989
258360
|
});
|
|
257990
258361
|
}, []);
|
|
257991
258362
|
if (variants.length <= 1) return null;
|
|
257992
|
-
return /* @__PURE__ */ (0,
|
|
258363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { id: "variant-bar", children: variants.map((v5) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
257993
258364
|
"a",
|
|
257994
258365
|
{
|
|
257995
258366
|
href: `/${v5 === "default" ? "" : v5}`,
|
|
@@ -258001,10 +258372,10 @@ function VariantBar() {
|
|
|
258001
258372
|
}
|
|
258002
258373
|
|
|
258003
258374
|
// src/player/browser.tsx
|
|
258004
|
-
var
|
|
258375
|
+
var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
|
|
258005
258376
|
if (typeof window !== "undefined") {
|
|
258006
258377
|
globalThis.__remotionShared = {
|
|
258007
|
-
"react":
|
|
258378
|
+
"react": React58,
|
|
258008
258379
|
"react-dom": ReactDOM2,
|
|
258009
258380
|
"remotion": esm_exports,
|
|
258010
258381
|
"@remotion/player": { Player },
|
|
@@ -258068,17 +258439,17 @@ if (typeof window !== "undefined") {
|
|
|
258068
258439
|
}
|
|
258069
258440
|
}
|
|
258070
258441
|
function PlayerApp() {
|
|
258071
|
-
const playerRef =
|
|
258072
|
-
const [ready4, setReady] =
|
|
258073
|
-
const [error51, setError] =
|
|
258074
|
-
const [data7, setData] =
|
|
258075
|
-
const [muted, setMuted] =
|
|
258076
|
-
const [volume, setVolume] =
|
|
258077
|
-
const mountedRef =
|
|
258078
|
-
const currentFrameRef =
|
|
258079
|
-
const [currentTime, setCurrentTime] =
|
|
258080
|
-
const [activeScene, setActiveScene] =
|
|
258081
|
-
|
|
258442
|
+
const playerRef = React58.useRef(null);
|
|
258443
|
+
const [ready4, setReady] = React58.useState(false);
|
|
258444
|
+
const [error51, setError] = React58.useState(null);
|
|
258445
|
+
const [data7, setData] = React58.useState(null);
|
|
258446
|
+
const [muted, setMuted] = React58.useState(false);
|
|
258447
|
+
const [volume, setVolume] = React58.useState(1);
|
|
258448
|
+
const mountedRef = React58.useRef(true);
|
|
258449
|
+
const currentFrameRef = React58.useRef(0);
|
|
258450
|
+
const [currentTime, setCurrentTime] = React58.useState(0);
|
|
258451
|
+
const [activeScene, setActiveScene] = React58.useState("");
|
|
258452
|
+
React58.useEffect(() => {
|
|
258082
258453
|
const variant = window.VARIANT || "default";
|
|
258083
258454
|
const url2 = variant !== "default" ? `/api/video-info?variant=${variant}` : "/api/video-info";
|
|
258084
258455
|
fetch(url2).then((r2) => r2.json()).then((info3) => {
|
|
@@ -258088,7 +258459,7 @@ function PlayerApp() {
|
|
|
258088
258459
|
}).catch(() => {
|
|
258089
258460
|
});
|
|
258090
258461
|
}, []);
|
|
258091
|
-
|
|
258462
|
+
React58.useEffect(() => {
|
|
258092
258463
|
const scenes = window.__scenes;
|
|
258093
258464
|
if (!scenes) return;
|
|
258094
258465
|
let found = "";
|
|
@@ -258100,15 +258471,22 @@ function PlayerApp() {
|
|
|
258100
258471
|
}
|
|
258101
258472
|
setActiveScene(found);
|
|
258102
258473
|
}, [currentTime]);
|
|
258103
|
-
const pendingSeekRef =
|
|
258474
|
+
const pendingSeekRef = React58.useRef(null);
|
|
258104
258475
|
const urlParams = new URLSearchParams(typeof window !== "undefined" ? window.location.search : "");
|
|
258105
258476
|
const autoPlay = urlParams.get("autoplay") === "true";
|
|
258106
258477
|
const startAt = parseFloat(urlParams.get("start") || urlParams.get("t") || "0") || 0;
|
|
258478
|
+
const locale3 = (() => {
|
|
258479
|
+
const raw = (urlParams.get("lang") || "").toLowerCase();
|
|
258480
|
+
if (raw === "zh" || raw.startsWith("zh-")) return "zh";
|
|
258481
|
+
if (raw === "en" || raw.startsWith("en-")) return "en";
|
|
258482
|
+
if (typeof navigator !== "undefined" && navigator.language.toLowerCase().startsWith("zh")) return "zh";
|
|
258483
|
+
return "en";
|
|
258484
|
+
})();
|
|
258107
258485
|
const fps = data7?.fps ?? 30;
|
|
258108
258486
|
const durationInSeconds = data7 ? getDurationInSeconds(data7, true) || 5 : 5;
|
|
258109
258487
|
const durationInFrames = Math.max(1, Math.ceil(durationInSeconds * fps));
|
|
258110
|
-
const inputProps =
|
|
258111
|
-
const loadData =
|
|
258488
|
+
const inputProps = React58.useMemo(() => ({ root: data7, compose: {} }), [data7]);
|
|
258489
|
+
const loadData = React58.useCallback((initial2 = false) => {
|
|
258112
258490
|
if (initial2) setReady(false);
|
|
258113
258491
|
const variant = window.VARIANT || "default";
|
|
258114
258492
|
const url2 = variant !== "default" ? `/api/video-data?variant=${variant}` : "/api/video-data";
|
|
@@ -258118,13 +258496,13 @@ function PlayerApp() {
|
|
|
258118
258496
|
if (initial2) setReady(true);
|
|
258119
258497
|
}).catch((e3) => setError(e3.message));
|
|
258120
258498
|
}, []);
|
|
258121
|
-
|
|
258499
|
+
React58.useEffect(() => {
|
|
258122
258500
|
loadData(true);
|
|
258123
258501
|
return () => {
|
|
258124
258502
|
mountedRef.current = false;
|
|
258125
258503
|
};
|
|
258126
258504
|
}, [loadData]);
|
|
258127
|
-
|
|
258505
|
+
React58.useEffect(() => {
|
|
258128
258506
|
const handler = () => {
|
|
258129
258507
|
if (playerRef.current) {
|
|
258130
258508
|
pendingSeekRef.current = playerRef.current.getCurrentFrame();
|
|
@@ -258134,7 +258512,7 @@ function PlayerApp() {
|
|
|
258134
258512
|
window.addEventListener("refresh-player", handler);
|
|
258135
258513
|
return () => window.removeEventListener("refresh-player", handler);
|
|
258136
258514
|
}, [loadData]);
|
|
258137
|
-
|
|
258515
|
+
React58.useEffect(() => {
|
|
258138
258516
|
if (!ready4 || !data7 || !playerRef.current) return;
|
|
258139
258517
|
const targetFrame = pendingSeekRef.current ?? Math.round(startAt * fps);
|
|
258140
258518
|
if (targetFrame > 0) {
|
|
@@ -258147,14 +258525,14 @@ function PlayerApp() {
|
|
|
258147
258525
|
}
|
|
258148
258526
|
pendingSeekRef.current = null;
|
|
258149
258527
|
}, [ready4, data7, startAt, fps]);
|
|
258150
|
-
const handleFrameUpdate =
|
|
258528
|
+
const handleFrameUpdate = React58.useCallback((frame2) => {
|
|
258151
258529
|
currentFrameRef.current = frame2;
|
|
258152
258530
|
setCurrentTime((prev2) => {
|
|
258153
258531
|
const newTime = frame2 / fps;
|
|
258154
258532
|
return Math.abs(newTime - prev2) > 0.1 ? newTime : prev2;
|
|
258155
258533
|
});
|
|
258156
258534
|
}, [fps]);
|
|
258157
|
-
|
|
258535
|
+
React58.useEffect(() => {
|
|
258158
258536
|
const p4 = playerRef.current;
|
|
258159
258537
|
if (!p4 || typeof p4.addEventListener !== "function") return;
|
|
258160
258538
|
const listener = (e3) => {
|
|
@@ -258164,7 +258542,7 @@ function PlayerApp() {
|
|
|
258164
258542
|
p4.addEventListener("frameupdate", listener);
|
|
258165
258543
|
return () => p4.removeEventListener("frameupdate", listener);
|
|
258166
258544
|
}, [ready4, data7, handleFrameUpdate]);
|
|
258167
|
-
|
|
258545
|
+
React58.useEffect(() => {
|
|
258168
258546
|
if (!ready4 || !playerRef.current) return;
|
|
258169
258547
|
const FWD_SECONDS = 5;
|
|
258170
258548
|
const BACK_SECONDS = 5;
|
|
@@ -258278,11 +258656,27 @@ function PlayerApp() {
|
|
|
258278
258656
|
return () => window.removeEventListener("keydown", onKey);
|
|
258279
258657
|
}, [ready4, data7, fps, durationInFrames, volume]);
|
|
258280
258658
|
const mode = (typeof window !== "undefined" ? window.MODE : null) || "preview";
|
|
258281
|
-
const [
|
|
258282
|
-
const [
|
|
258283
|
-
const [
|
|
258284
|
-
const
|
|
258285
|
-
|
|
258659
|
+
const [sseConnected, setSseConnected] = React58.useState(false);
|
|
258660
|
+
const [labelSceneInfo, setLabelSceneInfo] = React58.useState("");
|
|
258661
|
+
const [editEntries, setEditEntries] = React58.useState([]);
|
|
258662
|
+
const [showEditOverlay, setShowEditOverlay] = React58.useState(false);
|
|
258663
|
+
const nextEditIdRef = React58.useRef(1);
|
|
258664
|
+
const hideEditOverlayTimerRef = React58.useRef(null);
|
|
258665
|
+
const clearHideOverlayTimer = React58.useCallback(() => {
|
|
258666
|
+
if (hideEditOverlayTimerRef.current !== null) {
|
|
258667
|
+
window.clearTimeout(hideEditOverlayTimerRef.current);
|
|
258668
|
+
hideEditOverlayTimerRef.current = null;
|
|
258669
|
+
}
|
|
258670
|
+
}, []);
|
|
258671
|
+
const scheduleHideEditOverlay = React58.useCallback(() => {
|
|
258672
|
+
clearHideOverlayTimer();
|
|
258673
|
+
hideEditOverlayTimerRef.current = window.setTimeout(() => {
|
|
258674
|
+
setShowEditOverlay(false);
|
|
258675
|
+
hideEditOverlayTimerRef.current = null;
|
|
258676
|
+
}, 5e3);
|
|
258677
|
+
}, [clearHideOverlayTimer]);
|
|
258678
|
+
const suppressReloadRef = React58.useRef(false);
|
|
258679
|
+
React58.useEffect(() => {
|
|
258286
258680
|
let evtSource = null;
|
|
258287
258681
|
try {
|
|
258288
258682
|
evtSource = new EventSource("/api/events");
|
|
@@ -258292,6 +258686,49 @@ function PlayerApp() {
|
|
|
258292
258686
|
const msg = JSON.parse(e3.data);
|
|
258293
258687
|
if (msg.type === "reload" && !suppressReloadRef.current) {
|
|
258294
258688
|
window.dispatchEvent(new Event("refresh-player"));
|
|
258689
|
+
return;
|
|
258690
|
+
}
|
|
258691
|
+
if (msg.type === "edit:start") {
|
|
258692
|
+
clearHideOverlayTimer();
|
|
258693
|
+
setShowEditOverlay(true);
|
|
258694
|
+
const id39 = nextEditIdRef.current++;
|
|
258695
|
+
setEditEntries((prev2) => [
|
|
258696
|
+
...prev2,
|
|
258697
|
+
{ id: id39, request: msg.request || "", progress: "", status: "thinking" }
|
|
258698
|
+
]);
|
|
258699
|
+
return;
|
|
258700
|
+
}
|
|
258701
|
+
if (msg.type === "edit:progress") {
|
|
258702
|
+
setEditEntries((prev2) => {
|
|
258703
|
+
const last4 = prev2[prev2.length - 1];
|
|
258704
|
+
if (!last4 || last4.status !== "thinking") return prev2;
|
|
258705
|
+
return prev2.map(
|
|
258706
|
+
(e4) => e4.id === last4.id ? { ...e4, progress: msg.text || "" } : e4
|
|
258707
|
+
);
|
|
258708
|
+
});
|
|
258709
|
+
return;
|
|
258710
|
+
}
|
|
258711
|
+
if (msg.type === "edit:done") {
|
|
258712
|
+
setEditEntries((prev2) => {
|
|
258713
|
+
const last4 = prev2[prev2.length - 1];
|
|
258714
|
+
if (!last4) return prev2;
|
|
258715
|
+
return prev2.map(
|
|
258716
|
+
(e4) => e4.id === last4.id ? { ...e4, status: "done", progress: e4.progress || msg.summary || "" } : e4
|
|
258717
|
+
);
|
|
258718
|
+
});
|
|
258719
|
+
scheduleHideEditOverlay();
|
|
258720
|
+
return;
|
|
258721
|
+
}
|
|
258722
|
+
if (msg.type === "edit:error") {
|
|
258723
|
+
setEditEntries((prev2) => {
|
|
258724
|
+
const last4 = prev2[prev2.length - 1];
|
|
258725
|
+
if (!last4) return prev2;
|
|
258726
|
+
return prev2.map(
|
|
258727
|
+
(e4) => e4.id === last4.id ? { ...e4, status: "error", error: msg.error } : e4
|
|
258728
|
+
);
|
|
258729
|
+
});
|
|
258730
|
+
scheduleHideEditOverlay();
|
|
258731
|
+
return;
|
|
258295
258732
|
}
|
|
258296
258733
|
} catch {
|
|
258297
258734
|
}
|
|
@@ -258301,22 +258738,23 @@ function PlayerApp() {
|
|
|
258301
258738
|
setSseConnected(false);
|
|
258302
258739
|
}
|
|
258303
258740
|
return () => {
|
|
258741
|
+
clearHideOverlayTimer();
|
|
258304
258742
|
evtSource?.close();
|
|
258305
258743
|
setSseConnected(false);
|
|
258306
258744
|
};
|
|
258307
|
-
}, []);
|
|
258745
|
+
}, [clearHideOverlayTimer, scheduleHideEditOverlay]);
|
|
258308
258746
|
if (error51) {
|
|
258309
|
-
return /* @__PURE__ */ (0,
|
|
258747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { style: { color: "red", padding: 40, fontFamily: "sans-serif" }, children: [
|
|
258310
258748
|
"Error: ",
|
|
258311
258749
|
error51
|
|
258312
258750
|
] });
|
|
258313
258751
|
}
|
|
258314
258752
|
if (!ready4) {
|
|
258315
|
-
return /* @__PURE__ */ (0,
|
|
258753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { style: { color: "#888", padding: 40, fontFamily: "sans-serif" }, children: "Loading..." });
|
|
258316
258754
|
}
|
|
258317
258755
|
const width3 = data7.width || 1080;
|
|
258318
258756
|
const height2 = data7.height || 1920;
|
|
258319
|
-
return /* @__PURE__ */ (0,
|
|
258757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
258320
258758
|
"div",
|
|
258321
258759
|
{
|
|
258322
258760
|
style: {
|
|
@@ -258328,36 +258766,47 @@ function PlayerApp() {
|
|
|
258328
258766
|
alignItems: "center"
|
|
258329
258767
|
},
|
|
258330
258768
|
children: [
|
|
258331
|
-
/* @__PURE__ */ (0,
|
|
258769
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
258332
258770
|
HeaderBar,
|
|
258333
258771
|
{
|
|
258334
258772
|
mode,
|
|
258335
|
-
editStatus,
|
|
258336
258773
|
sseConnected,
|
|
258337
|
-
sceneInfo: mode === "label" ? labelSceneInfo : void 0
|
|
258774
|
+
sceneInfo: mode === "label" ? labelSceneInfo : void 0,
|
|
258775
|
+
locale: locale3
|
|
258338
258776
|
}
|
|
258339
258777
|
),
|
|
258340
|
-
/* @__PURE__ */ (0,
|
|
258341
|
-
/* @__PURE__ */ (0,
|
|
258342
|
-
|
|
258343
|
-
|
|
258344
|
-
|
|
258345
|
-
|
|
258346
|
-
|
|
258347
|
-
|
|
258348
|
-
|
|
258349
|
-
|
|
258350
|
-
|
|
258351
|
-
|
|
258352
|
-
|
|
258353
|
-
|
|
258354
|
-
|
|
258355
|
-
|
|
258356
|
-
|
|
258357
|
-
|
|
258358
|
-
|
|
258359
|
-
|
|
258360
|
-
|
|
258778
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(VariantBar, {}),
|
|
258779
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { id: "player-frame", style: { flex: 1, width: "100%", maxWidth: 480, minHeight: 0 }, children: [
|
|
258780
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
258781
|
+
Player,
|
|
258782
|
+
{
|
|
258783
|
+
ref: playerRef,
|
|
258784
|
+
component: MarkCut,
|
|
258785
|
+
inputProps,
|
|
258786
|
+
durationInFrames,
|
|
258787
|
+
fps,
|
|
258788
|
+
compositionWidth: width3,
|
|
258789
|
+
compositionHeight: height2,
|
|
258790
|
+
style: { width: "100%", height: "100%" },
|
|
258791
|
+
controls: true,
|
|
258792
|
+
showPlaybackRateControl: true,
|
|
258793
|
+
allowFullscreen: true,
|
|
258794
|
+
clickToPlay: false,
|
|
258795
|
+
doubleClickToFullscreen: true,
|
|
258796
|
+
autoPlay
|
|
258797
|
+
}
|
|
258798
|
+
),
|
|
258799
|
+
mode === "edit" && showEditOverlay && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { id: "edit-message-overlay", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
258800
|
+
EditMessagePanel,
|
|
258801
|
+
{
|
|
258802
|
+
entries: editEntries,
|
|
258803
|
+
minimized: false,
|
|
258804
|
+
locale: locale3,
|
|
258805
|
+
onToggleMinimize: () => setShowEditOverlay(false)
|
|
258806
|
+
}
|
|
258807
|
+
) })
|
|
258808
|
+
] }),
|
|
258809
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
258361
258810
|
SceneThumbnails,
|
|
258362
258811
|
{
|
|
258363
258812
|
currentTime,
|
|
@@ -258370,16 +258819,16 @@ function PlayerApp() {
|
|
|
258370
258819
|
}
|
|
258371
258820
|
}
|
|
258372
258821
|
),
|
|
258373
|
-
mode === "edit" && /* @__PURE__ */ (0,
|
|
258822
|
+
mode === "edit" && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
258374
258823
|
EditControls,
|
|
258375
258824
|
{
|
|
258376
|
-
onStatusChange: setEditStatus,
|
|
258377
258825
|
suppressReloadRef,
|
|
258378
258826
|
currentTime,
|
|
258379
|
-
activeScene
|
|
258827
|
+
activeScene,
|
|
258828
|
+
locale: locale3
|
|
258380
258829
|
}
|
|
258381
258830
|
),
|
|
258382
|
-
mode === "label" && /* @__PURE__ */ (0,
|
|
258831
|
+
mode === "label" && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
258383
258832
|
LabelControls,
|
|
258384
258833
|
{
|
|
258385
258834
|
playerRef,
|
|
@@ -258394,7 +258843,7 @@ function PlayerApp() {
|
|
|
258394
258843
|
var container3 = document.getElementById("root");
|
|
258395
258844
|
if (container3) {
|
|
258396
258845
|
const root8 = (0, import_client.createRoot)(container3);
|
|
258397
|
-
root8.render(
|
|
258846
|
+
root8.render(React58.createElement(PlayerApp));
|
|
258398
258847
|
}
|
|
258399
258848
|
/*! Bundled license information:
|
|
258400
258849
|
|