@lofcz/pptist 2.0.22 → 2.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embed/agentic-manifest.json +2 -2
- package/dist/embed/pptist-embed.css +1 -1
- package/dist/embed/pptist-embed.js +703 -681
- package/dist/types/views/components/element/ProsemirrorEditor.vue.d.ts +2 -0
- package/dist/types/views/components/element/hooks/useTextFit.d.ts +1 -1
- package/package.json +1 -1
|
@@ -49073,27 +49073,31 @@ function bP(e, t = 1) {
|
|
|
49073
49073
|
let n = 10 ** t;
|
|
49074
49074
|
return Math.round(e * n) / n;
|
|
49075
49075
|
}
|
|
49076
|
-
var xP = (e) => {
|
|
49077
|
-
let { locale:
|
|
49078
|
-
let
|
|
49079
|
-
|
|
49080
|
-
|
|
49076
|
+
var xP = (e, t) => {
|
|
49077
|
+
let { locale: n } = Jd(), r = O(1), a = () => t?.value ?? e.value.content, o = i(() => {
|
|
49078
|
+
let t = e.value;
|
|
49079
|
+
return !!t.fixedHeight && !t.vertical && !!a();
|
|
49080
|
+
}), s = () => {
|
|
49081
|
+
let t = e.value, i = a();
|
|
49082
|
+
if (!t.fixedHeight || t.vertical || !i) {
|
|
49083
|
+
r.value = 1;
|
|
49081
49084
|
return;
|
|
49082
49085
|
}
|
|
49083
|
-
let
|
|
49084
|
-
sP(
|
|
49085
|
-
let { blocks:
|
|
49086
|
-
|
|
49087
|
-
innerWidth:
|
|
49088
|
-
innerHeight:
|
|
49089
|
-
lineHeight:
|
|
49090
|
-
blockSpace:
|
|
49086
|
+
let o = t.inset || fte, s = t.width - o[1] - o[3], c = t.height - o[0] - o[2];
|
|
49087
|
+
sP(n.value);
|
|
49088
|
+
let { blocks: l } = _P(i, { defaultFontFamily: t.defaultFontName || mte });
|
|
49089
|
+
r.value = uP(l, {
|
|
49090
|
+
innerWidth: s,
|
|
49091
|
+
innerHeight: c,
|
|
49092
|
+
lineHeight: t.lineHeight ?? pte,
|
|
49093
|
+
blockSpace: t.paragraphSpace ?? vP,
|
|
49091
49094
|
bulletIndent: 28,
|
|
49092
49095
|
minScale: yP
|
|
49093
49096
|
});
|
|
49094
49097
|
};
|
|
49095
49098
|
return V(() => [
|
|
49096
49099
|
e.value.content,
|
|
49100
|
+
t?.value,
|
|
49097
49101
|
e.value.width,
|
|
49098
49102
|
e.value.height,
|
|
49099
49103
|
e.value.fixedHeight,
|
|
@@ -49102,16 +49106,19 @@ var xP = (e) => {
|
|
|
49102
49106
|
e.value.paragraphSpace,
|
|
49103
49107
|
e.value.defaultFontName,
|
|
49104
49108
|
e.value.inset,
|
|
49105
|
-
|
|
49106
|
-
],
|
|
49109
|
+
n.value
|
|
49110
|
+
], s, {
|
|
49107
49111
|
immediate: !0,
|
|
49108
49112
|
deep: !0
|
|
49109
49113
|
}), w(() => {
|
|
49110
|
-
typeof document < "u" && document.fonts?.ready && document.fonts.ready.then(
|
|
49114
|
+
typeof document < "u" && document.fonts?.ready && document.fonts.ready.then(s).catch(() => {});
|
|
49111
49115
|
}), {
|
|
49112
|
-
fitScale:
|
|
49113
|
-
fittedContent: i(() =>
|
|
49114
|
-
|
|
49116
|
+
fitScale: r,
|
|
49117
|
+
fittedContent: i(() => {
|
|
49118
|
+
let e = a();
|
|
49119
|
+
return !o.value || r.value >= 1 ? e : dte(e, r.value);
|
|
49120
|
+
}),
|
|
49121
|
+
fitVars: i(() => !o.value || r.value >= 1 ? {} : { "--text-fit-base-size": `${bP(16 * r.value)}px` })
|
|
49115
49122
|
};
|
|
49116
49123
|
};
|
|
49117
49124
|
//#endregion
|
|
@@ -53868,46 +53875,51 @@ var zB = (e, t, n, r) => {
|
|
|
53868
53875
|
"focus",
|
|
53869
53876
|
"blur",
|
|
53870
53877
|
"mousedown",
|
|
53871
|
-
"emptyChange"
|
|
53878
|
+
"emptyChange",
|
|
53879
|
+
"docChange"
|
|
53872
53880
|
],
|
|
53873
53881
|
setup(e, { expose: t, emit: n }) {
|
|
53874
53882
|
let { LL: r } = Jd(), a = e, o = n, s = ls(), { handleElementId: l, textFormatPainter: u, richTextAttrs: d, activeElementIdList: f } = G(s), { ctrlOrShiftKeyActive: p } = G(Ds()), m = O(null), h, g = () => {
|
|
53875
53883
|
h && o("emptyChange", h.state.doc.textContent.trim().length === 0);
|
|
53876
|
-
}, _ =
|
|
53884
|
+
}, _ = 0, v = () => {
|
|
53885
|
+
_ || typeof requestAnimationFrame > "u" || (_ = requestAnimationFrame(() => {
|
|
53886
|
+
_ = 0, h && o("docChange", h.dom.innerHTML);
|
|
53887
|
+
}));
|
|
53888
|
+
}, y = (0, oa.debounce)(function(e = !1) {
|
|
53877
53889
|
a.value.replace(/ style=\"\"/g, "") !== h.dom.innerHTML.replace(/ style=\"\"/g, "") && o("update", {
|
|
53878
53890
|
value: h.dom.innerHTML,
|
|
53879
53891
|
ignore: e
|
|
53880
53892
|
});
|
|
53881
|
-
}, 300, { trailing: !0 }),
|
|
53893
|
+
}, 300, { trailing: !0 }), x = () => {
|
|
53882
53894
|
(!p.value || f.value.length <= 1) && s.setDisableHotkeysState(!0), o("focus");
|
|
53883
|
-
},
|
|
53895
|
+
}, S = () => {
|
|
53884
53896
|
if (s.setDisableHotkeysState(!1), h.state.doc.textContent.trim().length === 0) {
|
|
53885
|
-
|
|
53897
|
+
y.cancel();
|
|
53886
53898
|
let { doc: e, tr: t } = h.state;
|
|
53887
53899
|
e.content.size > 0 && h.dispatch(t.replaceRangeWith(0, e.content.size, PB(""))), o("update", {
|
|
53888
53900
|
value: "",
|
|
53889
53901
|
ignore: !0
|
|
53890
53902
|
});
|
|
53891
|
-
} else
|
|
53903
|
+
} else y.flush();
|
|
53892
53904
|
g(), o("blur");
|
|
53893
|
-
},
|
|
53905
|
+
}, C = (0, oa.debounce)(function() {
|
|
53894
53906
|
let e = ki(h, {
|
|
53895
53907
|
color: a.defaultColor,
|
|
53896
53908
|
fontname: a.defaultFontName
|
|
53897
53909
|
});
|
|
53898
53910
|
s.setRichtextAttrs(e);
|
|
53899
|
-
}, 30, { trailing: !0 }),
|
|
53911
|
+
}, 30, { trailing: !0 }), D = (e, t) => {
|
|
53900
53912
|
let { ctrlKey: n, shiftKey: r, metaKey: i } = t, a = n || r || i, o = t.key.toUpperCase();
|
|
53901
|
-
|
|
53902
|
-
},
|
|
53903
|
-
V(
|
|
53913
|
+
y(a && (o === zs.Z || o === zs.Y)), C();
|
|
53914
|
+
}, k = i(() => a.value);
|
|
53915
|
+
V(k, () => {
|
|
53904
53916
|
if (!h || h.hasFocus()) return;
|
|
53905
53917
|
let { doc: e, tr: t } = h.state;
|
|
53906
|
-
h.dispatch(t.replaceRangeWith(0, e.content.size, PB(
|
|
53918
|
+
h.dispatch(t.replaceRangeWith(0, e.content.size, PB(k.value)));
|
|
53907
53919
|
}), V(() => a.editable, () => {
|
|
53908
53920
|
h.setProps({ editable: () => a.editable });
|
|
53909
53921
|
}), t({ focus: () => h.focus() });
|
|
53910
|
-
let
|
|
53922
|
+
let A = ({ target: e, action: t }) => {
|
|
53911
53923
|
if (!e && l.value !== a.elementId || e && e !== a.elementId) return;
|
|
53912
53924
|
let n = "command" in t ? [t] : t;
|
|
53913
53925
|
for (let e of n) if (e.command === "fontname" && e.value !== void 0) {
|
|
@@ -54003,13 +54015,13 @@ var zB = (e, t, n, r) => {
|
|
|
54003
54015
|
title: e.value
|
|
54004
54016
|
})(h.state, h.dispatch));
|
|
54005
54017
|
} else e.command === "insert" && e.value ? h.dispatch(h.state.tr.insertText(e.value)) : e.command === "replace" && e.value && WB(h, e.value);
|
|
54006
|
-
h.focus(),
|
|
54007
|
-
},
|
|
54018
|
+
h.focus(), y(), C();
|
|
54019
|
+
}, j = (e, t, n, r) => n.type.name === "math" ? (wP.emit(CP.OPEN_INLINE_MATH_EDITOR, {
|
|
54008
54020
|
elementId: a.elementId,
|
|
54009
54021
|
pos: r,
|
|
54010
54022
|
latex: n.attrs.latex,
|
|
54011
54023
|
display: !!n.attrs.display
|
|
54012
|
-
}), !0) : !1,
|
|
54024
|
+
}), !0) : !1, M = ({ elementId: e, pos: t, latex: n, html: r, display: i }) => {
|
|
54013
54025
|
if (e !== a.elementId || !h) return;
|
|
54014
54026
|
let o = h.state.doc.nodeAt(t);
|
|
54015
54027
|
if (!o || o.type.name !== "math") return;
|
|
@@ -54018,8 +54030,8 @@ var zB = (e, t, n, r) => {
|
|
|
54018
54030
|
html: r,
|
|
54019
54031
|
display: i
|
|
54020
54032
|
});
|
|
54021
|
-
h.dispatch(s),
|
|
54022
|
-
},
|
|
54033
|
+
h.dispatch(s), y(), y.flush();
|
|
54034
|
+
}, N = () => {
|
|
54023
54035
|
if (!u.value) return;
|
|
54024
54036
|
let { keep: e, ...t } = u.value, n = [{ command: "clear" }];
|
|
54025
54037
|
for (let e of Object.keys(t)) {
|
|
@@ -54029,32 +54041,32 @@ var zB = (e, t, n, r) => {
|
|
|
54029
54041
|
value: r
|
|
54030
54042
|
});
|
|
54031
54043
|
}
|
|
54032
|
-
|
|
54044
|
+
A({ action: n }), e || s.setTextFormatPainter(null);
|
|
54033
54045
|
};
|
|
54034
54046
|
w(() => {
|
|
54035
|
-
h = FB(m.value,
|
|
54047
|
+
h = FB(m.value, k.value, {
|
|
54036
54048
|
handleDOMEvents: {
|
|
54037
|
-
focus:
|
|
54038
|
-
blur:
|
|
54039
|
-
keydown:
|
|
54040
|
-
click:
|
|
54041
|
-
mouseup:
|
|
54049
|
+
focus: x,
|
|
54050
|
+
blur: S,
|
|
54051
|
+
keydown: D,
|
|
54052
|
+
click: C,
|
|
54053
|
+
mouseup: N
|
|
54042
54054
|
},
|
|
54043
|
-
handleDoubleClickOn:
|
|
54055
|
+
handleDoubleClickOn: j,
|
|
54044
54056
|
editable: () => a.editable,
|
|
54045
54057
|
dispatchTransaction(e) {
|
|
54046
54058
|
let t = h.state.apply(e);
|
|
54047
|
-
h.updateState(t), g();
|
|
54059
|
+
h.updateState(t), g(), e.docChanged && v();
|
|
54048
54060
|
}
|
|
54049
54061
|
}), a.autoFocus && h.focus(), g();
|
|
54050
54062
|
}), T(() => {
|
|
54051
|
-
h && (h.state.doc.textContent.trim().length !== 0 &&
|
|
54063
|
+
_ && cancelAnimationFrame(_), h && (h.state.doc.textContent.trim().length !== 0 && y.flush(), h.destroy());
|
|
54052
54064
|
});
|
|
54053
|
-
let
|
|
54054
|
-
l.value === a.elementId &&
|
|
54065
|
+
let P = () => {
|
|
54066
|
+
l.value === a.elementId && C();
|
|
54055
54067
|
};
|
|
54056
|
-
return wP.on(CP.RICH_TEXT_COMMAND,
|
|
54057
|
-
wP.off(CP.RICH_TEXT_COMMAND,
|
|
54068
|
+
return wP.on(CP.RICH_TEXT_COMMAND, A), wP.on(CP.SYNC_RICH_TEXT_ATTRS_TO_STORE, P), wP.on(CP.APPLY_INLINE_MATH, M), T(() => {
|
|
54069
|
+
wP.off(CP.RICH_TEXT_COMMAND, A), wP.off(CP.SYNC_RICH_TEXT_ATTRS_TO_STORE, P), wP.off(CP.APPLY_INLINE_MATH, M);
|
|
54058
54070
|
}), (e, t) => (E(), c("div", {
|
|
54059
54071
|
class: b(["prosemirror-editor", { "format-painter": L(u) }]),
|
|
54060
54072
|
ref_key: "editorViewRef",
|
|
@@ -54062,7 +54074,7 @@ var zB = (e, t, n, r) => {
|
|
|
54062
54074
|
onMousedown: t[0] || (t[0] = (e) => o("mousedown", e))
|
|
54063
54075
|
}, null, 34));
|
|
54064
54076
|
}
|
|
54065
|
-
}), [["__scopeId", "data-v-
|
|
54077
|
+
}), [["__scopeId", "data-v-cf4c428f"]]), KB = ["data-content-type"], qB = {
|
|
54066
54078
|
key: 0,
|
|
54067
54079
|
class: "bullet"
|
|
54068
54080
|
}, JB = { class: "label" }, YB = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
@@ -54097,24 +54109,24 @@ var zB = (e, t, n, r) => {
|
|
|
54097
54109
|
contextmenus: { type: Function }
|
|
54098
54110
|
},
|
|
54099
54111
|
setup(e) {
|
|
54100
|
-
let t = e, n = ls(), r = ss(), { handleElementId: a, isScaling: u } = G(n), { currentSlide: d, theme: p } = G(r), { addHistorySnapshot: m } = pd(), h = O(null), g = O(null), _ = O(!1), { shadowStyle:
|
|
54112
|
+
let t = e, n = ls(), r = ss(), { handleElementId: a, isScaling: u } = G(n), { currentSlide: d, theme: p } = G(r), { addHistorySnapshot: m } = pd(), h = O(null), g = O(null), _ = O(!1), v = O(null), { shadowStyle: S } = wj(i(() => t.elementInfo.shadow)), C = i(() => t.elementInfo.inset || [
|
|
54101
54113
|
10,
|
|
54102
54114
|
10,
|
|
54103
54115
|
10,
|
|
54104
54116
|
10
|
|
54105
|
-
]), { fitVars:
|
|
54117
|
+
]), { fitVars: D } = xP(i(() => t.elementInfo), v), k = i(() => {
|
|
54106
54118
|
if (t.elementInfo.fixedHeight) return {
|
|
54107
54119
|
top: "flex-start",
|
|
54108
54120
|
middle: "center",
|
|
54109
54121
|
bottom: "flex-end"
|
|
54110
54122
|
}[t.elementInfo.vAlign || "top"];
|
|
54111
|
-
}),
|
|
54123
|
+
}), A = (e) => !e.replace(/<br\s*\/?>/gi, "").replace(/<[^>]+>/g, "").replace(/ /g, " ").trim(), j = O(A(t.elementInfo.content));
|
|
54112
54124
|
V(() => t.elementInfo.content, (e) => {
|
|
54113
|
-
_.value || (
|
|
54125
|
+
_.value || (j.value = A(e));
|
|
54114
54126
|
});
|
|
54115
|
-
let
|
|
54116
|
-
if (
|
|
54117
|
-
}),
|
|
54127
|
+
let M = i(() => !!t.elementInfo.placeholder && j.value), P = i(() => M.value && !_.value), F = i(() => {
|
|
54128
|
+
if (M.value) return `${t.elementInfo.placeholderFontSize ?? 20}px`;
|
|
54129
|
+
}), I = i(() => {
|
|
54118
54130
|
let e = d.value?.background, t;
|
|
54119
54131
|
if (e?.type === "solid") t = e.color;
|
|
54120
54132
|
else if (e?.type === "gradient") {
|
|
@@ -54124,8 +54136,8 @@ var zB = (e, t, n, r) => {
|
|
|
54124
54136
|
if (t || (t = p.value?.backgroundColor), !t) return null;
|
|
54125
54137
|
let n = Kc(t);
|
|
54126
54138
|
return n.isValid() ? n : null;
|
|
54127
|
-
}),
|
|
54128
|
-
let e =
|
|
54139
|
+
}), R = i(() => {
|
|
54140
|
+
let e = I.value, n = t.elementInfo.placeholderColor;
|
|
54129
54141
|
if (!e) return n ?? XB;
|
|
54130
54142
|
if (n) {
|
|
54131
54143
|
let t = Kc(n);
|
|
@@ -54133,36 +54145,36 @@ var zB = (e, t, n, r) => {
|
|
|
54133
54145
|
}
|
|
54134
54146
|
let r = Kc(t.elementInfo.defaultColor || p.value?.fontColor || "#333333");
|
|
54135
54147
|
return (r.isValid() && Kc.readability(r, e) >= ZB ? r : Kc(e.isLight() ? "#000000" : "#ffffff")).setAlpha(.5).toRgbString();
|
|
54136
|
-
}),
|
|
54148
|
+
}), z = (e, n = !0) => {
|
|
54137
54149
|
t.elementInfo.lock || (e.stopPropagation(), t.selectElement(e, t.elementInfo, n));
|
|
54138
|
-
},
|
|
54139
|
-
|
|
54150
|
+
}, B = (e) => {
|
|
54151
|
+
z(e, !1), _.value = !0, y(() => {
|
|
54140
54152
|
g.value?.focus(), t.elementInfo.textType === "content" && wP.emit(CP.RICH_TEXT_COMMAND, {
|
|
54141
54153
|
target: t.elementInfo.id,
|
|
54142
54154
|
action: { command: "bulletList" }
|
|
54143
54155
|
});
|
|
54144
54156
|
});
|
|
54145
|
-
},
|
|
54157
|
+
}, ee = O(-1), H = O(-1);
|
|
54146
54158
|
V(u, () => {
|
|
54147
|
-
a.value === t.elementInfo.id && (u.value || (!t.elementInfo.fixedHeight && !t.elementInfo.vertical &&
|
|
54159
|
+
a.value === t.elementInfo.id && (u.value || (!t.elementInfo.fixedHeight && !t.elementInfo.vertical && ee.value !== -1 && (r.updateElement({
|
|
54148
54160
|
id: t.elementInfo.id,
|
|
54149
|
-
props: { height:
|
|
54150
|
-
}),
|
|
54161
|
+
props: { height: ee.value }
|
|
54162
|
+
}), ee.value = -1), !t.elementInfo.fixedHeight && t.elementInfo.vertical && H.value !== -1 && (r.updateElement({
|
|
54151
54163
|
id: t.elementInfo.id,
|
|
54152
|
-
props: { width:
|
|
54153
|
-
}),
|
|
54164
|
+
props: { width: H.value }
|
|
54165
|
+
}), H.value = -1)));
|
|
54154
54166
|
}), V(() => t.elementInfo.inset, () => {
|
|
54155
54167
|
y(() => {
|
|
54156
54168
|
if (h.value) {
|
|
54157
54169
|
if (!t.elementInfo.fixedHeight && !t.elementInfo.vertical && t.elementInfo.height !== h.value.offsetHeight) {
|
|
54158
|
-
if (
|
|
54170
|
+
if (M.value) return;
|
|
54159
54171
|
r.updateElement({
|
|
54160
54172
|
id: t.elementInfo.id,
|
|
54161
54173
|
props: { height: h.value.offsetHeight }
|
|
54162
54174
|
});
|
|
54163
54175
|
}
|
|
54164
54176
|
if (!t.elementInfo.fixedHeight && t.elementInfo.vertical && t.elementInfo.width !== h.value.offsetWidth) {
|
|
54165
|
-
if (
|
|
54177
|
+
if (M.value) return;
|
|
54166
54178
|
r.updateElement({
|
|
54167
54179
|
id: t.elementInfo.id,
|
|
54168
54180
|
props: { width: h.value.offsetWidth }
|
|
@@ -54171,33 +54183,33 @@ var zB = (e, t, n, r) => {
|
|
|
54171
54183
|
}
|
|
54172
54184
|
});
|
|
54173
54185
|
});
|
|
54174
|
-
let
|
|
54186
|
+
let te = new ResizeObserver((e) => {
|
|
54175
54187
|
let n = e[0].contentRect;
|
|
54176
54188
|
if (!h.value) return;
|
|
54177
|
-
let i = n.height +
|
|
54178
|
-
|
|
54189
|
+
let i = n.height + C.value[0] + C.value[2], a = n.width + C.value[1] + C.value[3];
|
|
54190
|
+
M.value || (!t.elementInfo.fixedHeight && !t.elementInfo.vertical && t.elementInfo.height !== i && (u.value ? ee.value = i : r.updateElement({
|
|
54179
54191
|
id: t.elementInfo.id,
|
|
54180
54192
|
props: { height: i }
|
|
54181
|
-
})), !t.elementInfo.fixedHeight && t.elementInfo.vertical && t.elementInfo.width !== a && (u.value ?
|
|
54193
|
+
})), !t.elementInfo.fixedHeight && t.elementInfo.vertical && t.elementInfo.width !== a && (u.value ? H.value = a : r.updateElement({
|
|
54182
54194
|
id: t.elementInfo.id,
|
|
54183
54195
|
props: { width: a }
|
|
54184
54196
|
})));
|
|
54185
54197
|
});
|
|
54186
54198
|
w(() => {
|
|
54187
|
-
h.value &&
|
|
54199
|
+
h.value && te.observe(h.value);
|
|
54188
54200
|
}), T(() => {
|
|
54189
|
-
h.value &&
|
|
54201
|
+
h.value && te.unobserve(h.value);
|
|
54190
54202
|
});
|
|
54191
|
-
let
|
|
54203
|
+
let W = (e, n = !1) => {
|
|
54192
54204
|
r.updateElement({
|
|
54193
54205
|
id: t.elementInfo.id,
|
|
54194
54206
|
props: { content: e }
|
|
54195
54207
|
}), n || m();
|
|
54196
|
-
},
|
|
54208
|
+
}, ne = (0, oa.debounce)(function() {
|
|
54197
54209
|
t.elementInfo.placeholder || t.elementInfo.content.replace(/<[^>]+>/g, "") || r.deleteElement(t.elementInfo.id);
|
|
54198
|
-
}, 300, { trailing: !0 }),
|
|
54199
|
-
return V(
|
|
54200
|
-
|
|
54210
|
+
}, 300, { trailing: !0 }), re = i(() => a.value === t.elementInfo.id);
|
|
54211
|
+
return V(re, () => {
|
|
54212
|
+
re.value || ne();
|
|
54201
54213
|
}), (e, t) => {
|
|
54202
54214
|
let n = N("contextmenu");
|
|
54203
54215
|
return E(), c("div", {
|
|
@@ -54214,7 +54226,7 @@ var zB = (e, t, n, r) => {
|
|
|
54214
54226
|
}, [U((E(), c("div", {
|
|
54215
54227
|
class: b(["element-content", {
|
|
54216
54228
|
"placeholder-element": e.elementInfo.placeholder,
|
|
54217
|
-
"show-placeholder":
|
|
54229
|
+
"show-placeholder": P.value
|
|
54218
54230
|
}]),
|
|
54219
54231
|
ref_key: "elementRef",
|
|
54220
54232
|
ref: h,
|
|
@@ -54223,25 +54235,25 @@ var zB = (e, t, n, r) => {
|
|
|
54223
54235
|
height: !e.elementInfo.vertical && !e.elementInfo.fixedHeight ? "auto" : e.elementInfo.height + "px",
|
|
54224
54236
|
backgroundColor: e.elementInfo.fill,
|
|
54225
54237
|
opacity: e.elementInfo.opacity,
|
|
54226
|
-
textShadow: L(
|
|
54238
|
+
textShadow: L(S),
|
|
54227
54239
|
lineHeight: e.elementInfo.lineHeight,
|
|
54228
54240
|
letterSpacing: (e.elementInfo.wordSpace || 0) + "px",
|
|
54229
54241
|
color: e.elementInfo.defaultColor,
|
|
54230
54242
|
fontFamily: e.elementInfo.defaultFontName,
|
|
54231
|
-
fontSize:
|
|
54232
|
-
textAlign:
|
|
54243
|
+
fontSize: F.value,
|
|
54244
|
+
textAlign: M.value ? e.elementInfo.placeholderAlign ?? "center" : void 0,
|
|
54233
54245
|
writingMode: e.elementInfo.vertical ? "vertical-rl" : "horizontal-tb",
|
|
54234
|
-
padding: `${
|
|
54235
|
-
minHeight:
|
|
54246
|
+
padding: `${C.value[0]}px ${C.value[1]}px ${C.value[2]}px ${C.value[3]}px`,
|
|
54247
|
+
minHeight: M.value ? e.elementInfo.height + "px" : void 0,
|
|
54236
54248
|
display: e.elementInfo.fixedHeight ? "flex" : void 0,
|
|
54237
54249
|
flexDirection: e.elementInfo.fixedHeight ? "column" : void 0,
|
|
54238
|
-
justifyContent:
|
|
54250
|
+
justifyContent: k.value,
|
|
54239
54251
|
overflow: e.elementInfo.fixedHeight ? "hidden" : void 0,
|
|
54240
54252
|
"--paragraphSpace": `${e.elementInfo.paragraphSpace === void 0 ? 5 : e.elementInfo.paragraphSpace}px`,
|
|
54241
|
-
...L(
|
|
54253
|
+
...L(D)
|
|
54242
54254
|
}),
|
|
54243
|
-
onMousedown: t[
|
|
54244
|
-
onTouchstart: t[
|
|
54255
|
+
onMousedown: t[6] || (t[6] = (e) => z(e)),
|
|
54256
|
+
onTouchstart: t[7] || (t[7] = (e) => z(e))
|
|
54245
54257
|
}, [
|
|
54246
54258
|
f(DP, {
|
|
54247
54259
|
width: e.elementInfo.width,
|
|
@@ -54261,11 +54273,14 @@ var zB = (e, t, n, r) => {
|
|
|
54261
54273
|
value: e.elementInfo.content,
|
|
54262
54274
|
ref_key: "prosemirrorEditorRef",
|
|
54263
54275
|
ref: g,
|
|
54264
|
-
onUpdate: t[0] || (t[0] = ({ value: e, ignore: t }) =>
|
|
54265
|
-
onMousedown: t[1] || (t[1] = (e) =>
|
|
54276
|
+
onUpdate: t[0] || (t[0] = ({ value: e, ignore: t }) => W(e, t)),
|
|
54277
|
+
onMousedown: t[1] || (t[1] = (e) => z(e, !1)),
|
|
54266
54278
|
onFocus: t[2] || (t[2] = (e) => _.value = !0),
|
|
54267
|
-
onBlur: t[3] || (t[3] = (
|
|
54268
|
-
|
|
54279
|
+
onBlur: t[3] || (t[3] = () => {
|
|
54280
|
+
_.value = !1, v.value = null;
|
|
54281
|
+
}),
|
|
54282
|
+
onEmptyChange: t[4] || (t[4] = (e) => j.value = e),
|
|
54283
|
+
onDocChange: t[5] || (t[5] = (e) => v.value = e)
|
|
54269
54284
|
}, null, 8, [
|
|
54270
54285
|
"elementId",
|
|
54271
54286
|
"defaultColor",
|
|
@@ -54273,14 +54288,14 @@ var zB = (e, t, n, r) => {
|
|
|
54273
54288
|
"editable",
|
|
54274
54289
|
"value"
|
|
54275
54290
|
]),
|
|
54276
|
-
|
|
54291
|
+
P.value ? (E(), o(YB, {
|
|
54277
54292
|
key: 0,
|
|
54278
54293
|
label: e.elementInfo.placeholder,
|
|
54279
54294
|
contentType: e.elementInfo.textType ?? "content",
|
|
54280
54295
|
fontSize: e.elementInfo.placeholderFontSize ?? 20,
|
|
54281
|
-
color:
|
|
54296
|
+
color: R.value,
|
|
54282
54297
|
align: e.elementInfo.placeholderAlign ?? "center",
|
|
54283
|
-
onActivate:
|
|
54298
|
+
onActivate: B
|
|
54284
54299
|
}, null, 8, [
|
|
54285
54300
|
"label",
|
|
54286
54301
|
"contentType",
|
|
@@ -54288,12 +54303,12 @@ var zB = (e, t, n, r) => {
|
|
|
54288
54303
|
"color",
|
|
54289
54304
|
"align"
|
|
54290
54305
|
])) : s("", !0),
|
|
54291
|
-
t[
|
|
54292
|
-
t[
|
|
54306
|
+
t[8] || (t[8] = l("div", { class: "drag-handler top" }, null, -1)),
|
|
54307
|
+
t[9] || (t[9] = l("div", { class: "drag-handler bottom" }, null, -1))
|
|
54293
54308
|
], 38)), [[n, e.contextmenus]])], 4)], 6);
|
|
54294
54309
|
};
|
|
54295
54310
|
}
|
|
54296
|
-
}), [["__scopeId", "data-v-
|
|
54311
|
+
}), [["__scopeId", "data-v-91768b66"]]), $B = (e, t) => ({ fill: i(() => e.value.pattern ? `url(#${t}-pattern-${e.value.id})` : e.value.gradient ? `url(#${t}-gradient-${e.value.id})` : e.value.fill || "none") }), eV = ["id", "gradientTransform"], tV = ["offset", "stop-color"], nV = ["id"], rV = ["offset", "stop-color"], iV = /* @__PURE__ */ p({
|
|
54297
54312
|
__name: "GradientDefs",
|
|
54298
54313
|
props: {
|
|
54299
54314
|
id: {},
|
|
@@ -116634,29 +116649,36 @@ var l5e = _({
|
|
|
116634
116649
|
]);
|
|
116635
116650
|
};
|
|
116636
116651
|
}
|
|
116637
|
-
}), [["__scopeId", "data-v-51f4119c"]]), Y5e = {
|
|
116652
|
+
}), [["__scopeId", "data-v-51f4119c"]]), Y5e = {
|
|
116653
|
+
class: "pptist-embed-root",
|
|
116654
|
+
style: {
|
|
116655
|
+
position: "fixed",
|
|
116656
|
+
inset: "0",
|
|
116657
|
+
"z-index": "2147483000"
|
|
116658
|
+
}
|
|
116659
|
+
}, X5e = { class: "pptist-screen" }, Z5e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
116638
116660
|
__name: "index",
|
|
116639
116661
|
setup(e) {
|
|
116640
|
-
let
|
|
116641
|
-
|
|
116642
|
-
}, { exitScreening:
|
|
116643
|
-
|
|
116644
|
-
},
|
|
116645
|
-
e.key.toUpperCase() === zs.ESC &&
|
|
116662
|
+
let n = new URLSearchParams(window.location.search).get("mode") === "audience", r = O("base"), i = (e) => {
|
|
116663
|
+
r.value = e;
|
|
116664
|
+
}, { exitScreening: a } = sf(), c = n ? null : new BroadcastChannel("pptist-audience-sync"), u = () => {
|
|
116665
|
+
c?.postMessage({ type: "EXIT" }), a();
|
|
116666
|
+
}, d = (e) => {
|
|
116667
|
+
e.key.toUpperCase() === zs.ESC && u();
|
|
116646
116668
|
};
|
|
116647
116669
|
return w(() => {
|
|
116648
|
-
|
|
116670
|
+
n || document.addEventListener("keydown", d);
|
|
116649
116671
|
}), T(() => {
|
|
116650
|
-
|
|
116651
|
-
}), (e,
|
|
116672
|
+
n || document.removeEventListener("keydown", d), c?.close();
|
|
116673
|
+
}), (e, a) => (E(), o(t, { to: "body" }, [l("div", Y5e, [l("div", X5e, [n ? (E(), o(u8e, { key: 0 })) : r.value === "base" ? (E(), o(z5e, {
|
|
116652
116674
|
key: 1,
|
|
116653
|
-
changeViewMode:
|
|
116654
|
-
})) :
|
|
116675
|
+
changeViewMode: i
|
|
116676
|
+
})) : r.value === "presenter" ? (E(), o(J5e, {
|
|
116655
116677
|
key: 2,
|
|
116656
|
-
changeViewMode:
|
|
116657
|
-
})) : s("", !0)]));
|
|
116678
|
+
changeViewMode: i
|
|
116679
|
+
})) : s("", !0)])])]));
|
|
116658
116680
|
}
|
|
116659
|
-
}), [["__scopeId", "data-v-
|
|
116681
|
+
}), [["__scopeId", "data-v-ea518454"]]), Q5e = /* @__PURE__ */ p({
|
|
116660
116682
|
__name: "MobileEditableElement",
|
|
116661
116683
|
props: {
|
|
116662
116684
|
elementInfo: {},
|
|
@@ -116684,7 +116706,7 @@ var l5e = _({
|
|
|
116684
116706
|
contextmenus: () => null
|
|
116685
116707
|
}, null, 8, ["elementInfo", "selectElement"]))], 4));
|
|
116686
116708
|
}
|
|
116687
|
-
}),
|
|
116709
|
+
}), $5e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
116688
116710
|
__name: "MobileOperate",
|
|
116689
116711
|
props: {
|
|
116690
116712
|
elementInfo: {},
|
|
@@ -116735,14 +116757,14 @@ var l5e = _({
|
|
|
116735
116757
|
}, null, 8, ["style"]))
|
|
116736
116758
|
], 64)) : s("", !0)], 4));
|
|
116737
116759
|
}
|
|
116738
|
-
}), [["__scopeId", "data-v-8809b306"]]),
|
|
116760
|
+
}), [["__scopeId", "data-v-8809b306"]]), e7e = {
|
|
116739
116761
|
class: "i-icon",
|
|
116740
116762
|
viewBox: "0 0 48 48",
|
|
116741
116763
|
width: "1em",
|
|
116742
116764
|
height: "1em"
|
|
116743
116765
|
};
|
|
116744
|
-
function
|
|
116745
|
-
return E(), c("svg",
|
|
116766
|
+
function t7e(e, t) {
|
|
116767
|
+
return E(), c("svg", e7e, t[0] || (t[0] = [l("g", {
|
|
116746
116768
|
fill: "none",
|
|
116747
116769
|
stroke: "currentColor",
|
|
116748
116770
|
"stroke-linejoin": "round",
|
|
@@ -116752,10 +116774,10 @@ function e7e(e, t) {
|
|
|
116752
116774
|
d: "M13 12.432v-4.62A2.813 2.813 0 0 1 15.813 5h24.374A2.813 2.813 0 0 1 43 7.813v24.375A2.813 2.813 0 0 1 40.188 35h-4.672"
|
|
116753
116775
|
}), l("path", { d: "M32.188 13H7.811A2.813 2.813 0 0 0 5 15.813v24.374A2.813 2.813 0 0 0 7.813 43h24.375A2.813 2.813 0 0 0 35 40.188V15.811A2.813 2.813 0 0 0 32.188 13Z" })], -1)]));
|
|
116754
116776
|
}
|
|
116755
|
-
var
|
|
116777
|
+
var n7e = _({
|
|
116756
116778
|
name: "icon-park-outline-copy",
|
|
116757
|
-
render:
|
|
116758
|
-
}),
|
|
116779
|
+
render: t7e
|
|
116780
|
+
}), r7e = ["onClick"], i7e = { class: "label" }, a7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
116759
116781
|
__name: "MobileThumbnails",
|
|
116760
116782
|
setup(e) {
|
|
116761
116783
|
let t = ss(), { slides: n, slideIndex: r } = G(t), { sortSlides: i } = Yd(), { slidesLoadLimit: a } = G4(), s = (e) => {
|
|
@@ -116778,16 +116800,16 @@ var t7e = _({
|
|
|
116778
116800
|
item: H(({ element: e, index: t }) => [l("div", {
|
|
116779
116801
|
class: b(["thumbnail-item", { active: L(r) === t }]),
|
|
116780
116802
|
onClick: (e) => s(t)
|
|
116781
|
-
}, [l("div",
|
|
116803
|
+
}, [l("div", i7e, F(t + 1), 1), f(E0, {
|
|
116782
116804
|
class: "thumbnail",
|
|
116783
116805
|
slide: e,
|
|
116784
116806
|
size: 120,
|
|
116785
116807
|
visible: t < L(a)
|
|
116786
|
-
}, null, 8, ["slide", "visible"])], 10,
|
|
116808
|
+
}, null, 8, ["slide", "visible"])], 10, r7e)]),
|
|
116787
116809
|
_: 1
|
|
116788
116810
|
}, 8, ["modelValue"]));
|
|
116789
116811
|
}
|
|
116790
|
-
}), [["__scopeId", "data-v-2fd38eb8"]]),
|
|
116812
|
+
}), [["__scopeId", "data-v-2fd38eb8"]]), o7e = { class: "slide-toolbar" }, s7e = { class: "remark" }, c7e = ["value", "placeholder"], l7e = { class: "toolbar" }, u7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
116791
116813
|
__name: "SlideToolbar",
|
|
116792
116814
|
setup(e) {
|
|
116793
116815
|
let { LL: t } = Jd(), n = ss(), { viewportRatio: r, currentSlide: a, viewportSize: o } = G(n), { createSlide: s, copyAndPasteSlide: u, deleteSlide: p } = Yd(), { createTextElement: m, createImageElement: h, createShapeElement: g } = md(), _ = () => {
|
|
@@ -116820,14 +116842,14 @@ var t7e = _({
|
|
|
116820
116842
|
n.updateSlide({ remark: t });
|
|
116821
116843
|
};
|
|
116822
116844
|
return (e, n) => {
|
|
116823
|
-
let r = w4, i =
|
|
116824
|
-
return E(), c("div",
|
|
116825
|
-
l("div",
|
|
116845
|
+
let r = w4, i = n7e, a = d7, o = T4, m = fFe, h = l5e, g = o5e;
|
|
116846
|
+
return E(), c("div", o7e, [
|
|
116847
|
+
l("div", s7e, [l("textarea", {
|
|
116826
116848
|
value: b.value,
|
|
116827
116849
|
placeholder: L(t).mobile.slideToolbar.remarkPlaceholder(),
|
|
116828
116850
|
onInput: n[0] || (n[0] = (e) => x(e))
|
|
116829
|
-
}, null, 40,
|
|
116830
|
-
l("div",
|
|
116851
|
+
}, null, 40, c7e)]),
|
|
116852
|
+
l("div", l7e, [f(O4, { class: "row" }, {
|
|
116831
116853
|
default: H(() => [
|
|
116832
116854
|
f(o0, {
|
|
116833
116855
|
style: { flex: "1" },
|
|
@@ -116885,26 +116907,26 @@ var t7e = _({
|
|
|
116885
116907
|
]),
|
|
116886
116908
|
_: 1
|
|
116887
116909
|
})]),
|
|
116888
|
-
f(
|
|
116910
|
+
f(a7e)
|
|
116889
116911
|
]);
|
|
116890
116912
|
};
|
|
116891
116913
|
}
|
|
116892
|
-
}), [["__scopeId", "data-v-d2fff840"]]),
|
|
116914
|
+
}), [["__scopeId", "data-v-d2fff840"]]), d7e = { class: "element-toolbar" }, f7e = { class: "content" }, p7e = {
|
|
116893
116915
|
key: 0,
|
|
116894
116916
|
class: "style"
|
|
116895
|
-
},
|
|
116917
|
+
}, m7e = {
|
|
116896
116918
|
key: 1,
|
|
116897
116919
|
class: "row-block"
|
|
116898
|
-
},
|
|
116920
|
+
}, h7e = { class: "label" }, g7e = { class: "colors" }, _7e = ["onClick"], v7e = { class: "color custom" }, y7e = {
|
|
116899
116921
|
key: 2,
|
|
116900
116922
|
class: "row-block"
|
|
116901
|
-
},
|
|
116923
|
+
}, b7e = { class: "label" }, x7e = { class: "colors" }, S7e = ["onClick"], C7e = { class: "color custom" }, w7e = {
|
|
116902
116924
|
key: 3,
|
|
116903
116925
|
class: "tip"
|
|
116904
|
-
},
|
|
116926
|
+
}, T7e = {
|
|
116905
116927
|
key: 1,
|
|
116906
116928
|
class: "common"
|
|
116907
|
-
},
|
|
116929
|
+
}, E7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
116908
116930
|
__name: "ElementToolbar",
|
|
116909
116931
|
setup(t) {
|
|
116910
116932
|
let { LL: n } = Jd(), r = [
|
|
@@ -116976,8 +116998,8 @@ var t7e = _({
|
|
|
116976
116998
|
}
|
|
116977
116999
|
};
|
|
116978
117000
|
return (t, i) => {
|
|
116979
|
-
let a = R1, o = L1, p = I1, h = v8, g = T4, T = F1, O = P1, R = N1, z =
|
|
116980
|
-
return E(), c("div",
|
|
117001
|
+
let a = R1, o = L1, p = I1, h = v8, g = T4, T = F1, O = P1, R = N1, z = n7e, B = d7, V = HJe, ee = zJe, U = IJe, te = NJe, W = k8, ne = O8, re = D8, G = E8, ie = T8, ae = w8;
|
|
117002
|
+
return E(), c("div", d7e, [f(x4, {
|
|
116981
117003
|
tabs: _.value,
|
|
116982
117004
|
value: v.value,
|
|
116983
117005
|
"onUpdate:value": i[0] || (i[0] = (e) => v.value = e),
|
|
@@ -116986,7 +117008,7 @@ var t7e = _({
|
|
|
116986
117008
|
width: "30%",
|
|
116987
117009
|
margin: "0 10%"
|
|
116988
117010
|
}
|
|
116989
|
-
}, null, 8, ["tabs", "value"]), l("div",
|
|
117011
|
+
}, null, 8, ["tabs", "value"]), l("div", f7e, [v.value === "style" ? (E(), c("div", p7e, [
|
|
116990
117012
|
y.value ? (E(), c(e, { key: 0 }, [
|
|
116991
117013
|
f(O4, { class: "row" }, {
|
|
116992
117014
|
default: H(() => [
|
|
@@ -117075,14 +117097,14 @@ var t7e = _({
|
|
|
117075
117097
|
_: 1
|
|
117076
117098
|
}, 8, ["value"])
|
|
117077
117099
|
], 64)) : s("", !0),
|
|
117078
|
-
b.value ? (E(), c("div",
|
|
117100
|
+
b.value ? (E(), c("div", m7e, [l("div", h7e, F(L(n).mobile.elementToolbar.textColorLabel()), 1), l("div", g7e, [(E(), c(e, null, A(r, (e) => l("div", {
|
|
117079
117101
|
class: "color",
|
|
117080
117102
|
key: e,
|
|
117081
117103
|
onClick: (t) => N(e)
|
|
117082
117104
|
}, [l("div", {
|
|
117083
117105
|
class: "color-block",
|
|
117084
117106
|
style: x({ backgroundColor: e })
|
|
117085
|
-
}, null, 4)], 8,
|
|
117107
|
+
}, null, 4)], 8, _7e)), 64)), l("div", v7e, [f(DA, { trigger: "click" }, {
|
|
117086
117108
|
content: H(() => [f(n0, {
|
|
117087
117109
|
modelValue: M.value,
|
|
117088
117110
|
"onUpdate:modelValue": i[8] || (i[8] = (e) => N(e))
|
|
@@ -117091,14 +117113,14 @@ var t7e = _({
|
|
|
117091
117113
|
_: 1,
|
|
117092
117114
|
__: [24]
|
|
117093
117115
|
})])])])) : s("", !0),
|
|
117094
|
-
S.value ? (E(), c("div",
|
|
117116
|
+
S.value ? (E(), c("div", y7e, [l("div", b7e, F(L(n).mobile.elementToolbar.fillColorLabel()), 1), l("div", x7e, [(E(), c(e, null, A(r, (e) => l("div", {
|
|
117095
117117
|
class: "color",
|
|
117096
117118
|
key: e,
|
|
117097
117119
|
onClick: (t) => I(e)
|
|
117098
117120
|
}, [l("div", {
|
|
117099
117121
|
class: "color-block",
|
|
117100
117122
|
style: x({ backgroundColor: e })
|
|
117101
|
-
}, null, 4)], 8,
|
|
117123
|
+
}, null, 4)], 8, S7e)), 64)), l("div", C7e, [f(DA, { trigger: "click" }, {
|
|
117102
117124
|
content: H(() => [f(n0, {
|
|
117103
117125
|
modelValue: P.value,
|
|
117104
117126
|
"onUpdate:modelValue": i[9] || (i[9] = (e) => I(e))
|
|
@@ -117107,8 +117129,8 @@ var t7e = _({
|
|
|
117107
117129
|
_: 1,
|
|
117108
117130
|
__: [25]
|
|
117109
117131
|
})])])])) : s("", !0),
|
|
117110
|
-
!y.value && !b.value && !S.value ? (E(), c("div",
|
|
117111
|
-
])) : s("", !0), v.value === "common" ? (E(), c("div",
|
|
117132
|
+
!y.value && !b.value && !S.value ? (E(), c("div", w7e, F(L(n).mobile.elementToolbar.noProperties()), 1)) : s("", !0)
|
|
117133
|
+
])) : s("", !0), v.value === "common" ? (E(), c("div", T7e, [
|
|
117112
117134
|
f(O4, { class: "row" }, {
|
|
117113
117135
|
default: H(() => [f(o0, {
|
|
117114
117136
|
style: { flex: "1" },
|
|
@@ -117215,14 +117237,14 @@ var t7e = _({
|
|
|
117215
117237
|
])) : s("", !0)])]);
|
|
117216
117238
|
};
|
|
117217
117239
|
}
|
|
117218
|
-
}), [["__scopeId", "data-v-06b39efa"]]),
|
|
117240
|
+
}), [["__scopeId", "data-v-06b39efa"]]), D7e = {
|
|
117219
117241
|
class: "i-icon",
|
|
117220
117242
|
viewBox: "0 0 48 48",
|
|
117221
117243
|
width: "1em",
|
|
117222
117244
|
height: "1em"
|
|
117223
117245
|
};
|
|
117224
|
-
function
|
|
117225
|
-
return E(), c("svg",
|
|
117246
|
+
function O7e(e, t) {
|
|
117247
|
+
return E(), c("svg", D7e, t[0] || (t[0] = [l("path", {
|
|
117226
117248
|
fill: "none",
|
|
117227
117249
|
stroke: "currentColor",
|
|
117228
117250
|
"stroke-linecap": "round",
|
|
@@ -117231,17 +117253,17 @@ function D7e(e, t) {
|
|
|
117231
117253
|
d: "M23.992 6H6v36h18m9-9l9-9l-9-9m-17 8.992h26"
|
|
117232
117254
|
}, null, -1)]));
|
|
117233
117255
|
}
|
|
117234
|
-
var
|
|
117256
|
+
var k7e = _({
|
|
117235
117257
|
name: "icon-park-outline-logout",
|
|
117236
|
-
render:
|
|
117237
|
-
}),
|
|
117258
|
+
render: O7e
|
|
117259
|
+
}), A7e = { class: "mobile-editor-header" }, j7e = { class: "history" }, M7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
117238
117260
|
__name: "Header",
|
|
117239
117261
|
props: { changeMode: { type: Function } },
|
|
117240
117262
|
setup(e) {
|
|
117241
117263
|
let { LL: t } = Jd(), { canUndo: n, canRedo: r } = G(Es()), { redo: i, undo: a } = pd();
|
|
117242
117264
|
return (e, o) => {
|
|
117243
|
-
let s = VFe, u = RFe, p =
|
|
117244
|
-
return E(), c("div",
|
|
117265
|
+
let s = VFe, u = RFe, p = k7e;
|
|
117266
|
+
return E(), c("div", A7e, [l("div", j7e, [l("div", {
|
|
117245
117267
|
class: b(["history-item", { disable: !L(n) }]),
|
|
117246
117268
|
onClick: o[0] || (o[0] = W((e) => L(a)(), ["stop"]))
|
|
117247
117269
|
}, [f(s), d(" " + F(L(t).mobile.editorHeader.undo()), 1)], 2), l("div", {
|
|
@@ -117253,7 +117275,7 @@ var O7e = _({
|
|
|
117253
117275
|
}, [f(p), d(" " + F(L(t).mobile.editorHeader.exitEdit()), 1)])]);
|
|
117254
117276
|
};
|
|
117255
117277
|
}
|
|
117256
|
-
}), [["__scopeId", "data-v-a59bfd5a"]]),
|
|
117278
|
+
}), [["__scopeId", "data-v-a59bfd5a"]]), N7e = { class: "mobile-editor" }, P7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
117257
117279
|
__name: "index",
|
|
117258
117280
|
props: { changeMode: { type: Function } },
|
|
117259
117281
|
setup(t) {
|
|
@@ -117277,8 +117299,8 @@ var O7e = _({
|
|
|
117277
117299
|
}, M = () => {
|
|
117278
117300
|
r.setActiveElementIdList([]);
|
|
117279
117301
|
};
|
|
117280
|
-
return (t, n) => (E(), c("div",
|
|
117281
|
-
f(
|
|
117302
|
+
return (t, n) => (E(), c("div", N7e, [
|
|
117303
|
+
f(M7e, { changeMode: t.changeMode }, null, 8, ["changeMode"]),
|
|
117282
117304
|
l("div", {
|
|
117283
117305
|
class: "content",
|
|
117284
117306
|
ref_key: "contentRef",
|
|
@@ -117304,7 +117326,7 @@ var O7e = _({
|
|
|
117304
117326
|
"length",
|
|
117305
117327
|
"canvasScale"
|
|
117306
117328
|
]))), 128)),
|
|
117307
|
-
(E(!0), c(e, null, A(C.value, (t) => (E(), c(e, { key: t.id }, [t.type === "line" ? s("", !0) : (E(), o(
|
|
117329
|
+
(E(!0), c(e, null, A(C.value, (t) => (E(), c(e, { key: t.id }, [t.type === "line" ? s("", !0) : (E(), o($5e, {
|
|
117308
117330
|
key: 0,
|
|
117309
117331
|
elementInfo: t,
|
|
117310
117332
|
isSelected: L(m).includes(t.id),
|
|
@@ -117323,18 +117345,18 @@ var O7e = _({
|
|
|
117323
117345
|
ref_key: "viewportRef",
|
|
117324
117346
|
ref: _,
|
|
117325
117347
|
style: x({ transform: `scale(${b.value})` })
|
|
117326
|
-
}, [(E(!0), c(e, null, A(C.value, (e, t) => (E(), o(
|
|
117348
|
+
}, [(E(!0), c(e, null, A(C.value, (e, t) => (E(), o(Q5e, {
|
|
117327
117349
|
key: e.id,
|
|
117328
117350
|
elementInfo: e,
|
|
117329
117351
|
elementIndex: t + 1,
|
|
117330
117352
|
selectElement: j
|
|
117331
117353
|
}, null, 8, ["elementInfo", "elementIndex"]))), 128))], 4)
|
|
117332
117354
|
], 4)], 544),
|
|
117333
|
-
f(
|
|
117334
|
-
L(h) ? (E(), o(
|
|
117355
|
+
f(u7e),
|
|
117356
|
+
L(h) ? (E(), o(E7e, { key: 0 })) : s("", !0)
|
|
117335
117357
|
]));
|
|
117336
117358
|
}
|
|
117337
|
-
}), [["__scopeId", "data-v-f5ba0a8f"]]),
|
|
117359
|
+
}), [["__scopeId", "data-v-f5ba0a8f"]]), F7e = { class: "header" }, I7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
117338
117360
|
__name: "MobilePlayer",
|
|
117339
117361
|
props: { changeMode: { type: Function } },
|
|
117340
117362
|
setup(t) {
|
|
@@ -117365,7 +117387,7 @@ var O7e = _({
|
|
|
117365
117387
|
i > s && i > 50 && (t < 0 && o.value > 0 && r.updateSlideIndex(o.value - 1), t > 0 && o.value < a.value.length - 1 && r.updateSlideIndex(o.value + 1)), s > i && s > 50 && (n > 0 && o.value > 0 && r.updateSlideIndex(o.value - 1), n < 0 && o.value < a.value.length - 1 && r.updateSlideIndex(o.value + 1));
|
|
117366
117388
|
};
|
|
117367
117389
|
return (t, r) => {
|
|
117368
|
-
let i =
|
|
117390
|
+
let i = k7e;
|
|
117369
117391
|
return E(), c("div", {
|
|
117370
117392
|
class: "mobile-player",
|
|
117371
117393
|
style: x({
|
|
@@ -117402,20 +117424,20 @@ var O7e = _({
|
|
|
117402
117424
|
}, [f(E0, {
|
|
117403
117425
|
slide: e,
|
|
117404
117426
|
size: g.value.width
|
|
117405
|
-
}, null, 8, ["slide", "size"])], 4)) : s("", !0)], 2))), 128))], 32), m.value ? (E(), c(e, { key: 0 }, [l("div",
|
|
117427
|
+
}, null, 8, ["slide", "size"])], 4)) : s("", !0)], 2))), 128))], 32), m.value ? (E(), c(e, { key: 0 }, [l("div", F7e, [l("div", {
|
|
117406
117428
|
class: "back",
|
|
117407
117429
|
onClick: r[3] || (r[3] = (e) => t.changeMode("preview"))
|
|
117408
|
-
}, [f(i), d(" " + F(L(n).mobile.player.exitPlayback()), 1)])]), f(
|
|
117430
|
+
}, [f(i), d(" " + F(L(n).mobile.player.exitPlayback()), 1)])]), f(a7e, { class: "thumbnails" })], 64)) : s("", !0)], 4);
|
|
117409
117431
|
};
|
|
117410
117432
|
}
|
|
117411
|
-
}), [["__scopeId", "data-v-293ece02"]]),
|
|
117433
|
+
}), [["__scopeId", "data-v-293ece02"]]), L7e = {
|
|
117412
117434
|
class: "i-icon",
|
|
117413
117435
|
viewBox: "0 0 48 48",
|
|
117414
117436
|
width: "1em",
|
|
117415
117437
|
height: "1em"
|
|
117416
117438
|
};
|
|
117417
|
-
function
|
|
117418
|
-
return E(), c("svg",
|
|
117439
|
+
function R7e(e, t) {
|
|
117440
|
+
return E(), c("svg", L7e, t[0] || (t[0] = [l("g", {
|
|
117419
117441
|
fill: "none",
|
|
117420
117442
|
stroke: "currentColor",
|
|
117421
117443
|
"stroke-linejoin": "round",
|
|
@@ -117425,10 +117447,10 @@ function L7e(e, t) {
|
|
|
117425
117447
|
d: "M16 40H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h36a2 2 0 0 1 2 2v6"
|
|
117426
117448
|
}), l("path", { d: "M42 24H26a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V26a2 2 0 0 0-2-2Z" })], -1)]));
|
|
117427
117449
|
}
|
|
117428
|
-
var
|
|
117450
|
+
var z7e = _({
|
|
117429
117451
|
name: "icon-park-outline-full-screen-play",
|
|
117430
|
-
render:
|
|
117431
|
-
}),
|
|
117452
|
+
render: R7e
|
|
117453
|
+
}), B7e = { class: "thumbnail-list" }, V7e = { class: "menu" }, H7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
117432
117454
|
__name: "MobilePreview",
|
|
117433
117455
|
props: { changeMode: { type: Function } },
|
|
117434
117456
|
setup(t) {
|
|
@@ -117436,12 +117458,12 @@ var R7e = _({
|
|
|
117436
117458
|
return w(() => {
|
|
117437
117459
|
h.value && (g.value = h.value.clientWidth, _.value = document.body.clientWidth - 20);
|
|
117438
117460
|
}), (t, a) => {
|
|
117439
|
-
let v = _0, y =
|
|
117461
|
+
let v = _0, y = z7e;
|
|
117440
117462
|
return E(), c(e, null, [l("div", {
|
|
117441
117463
|
class: "mobile-preview",
|
|
117442
117464
|
ref_key: "mobileRef",
|
|
117443
117465
|
ref: h
|
|
117444
|
-
}, [l("div",
|
|
117466
|
+
}, [l("div", B7e, [(E(!0), c(e, null, A(L(r), (e, t) => (E(), c("div", {
|
|
117445
117467
|
class: "thumbnail-item",
|
|
117446
117468
|
key: e.id
|
|
117447
117469
|
}, [f(E0, {
|
|
@@ -117452,7 +117474,7 @@ var R7e = _({
|
|
|
117452
117474
|
"slide",
|
|
117453
117475
|
"size",
|
|
117454
117476
|
"visible"
|
|
117455
|
-
])]))), 128))]), l("div",
|
|
117477
|
+
])]))), 128))]), l("div", V7e, [
|
|
117456
117478
|
l("div", {
|
|
117457
117479
|
class: "menu-item",
|
|
117458
117480
|
onClick: a[0] || (a[0] = (e) => t.changeMode("editor"))
|
|
@@ -117491,22 +117513,22 @@ var R7e = _({
|
|
|
117491
117513
|
])) : s("", !0)], 64);
|
|
117492
117514
|
};
|
|
117493
117515
|
}
|
|
117494
|
-
}), [["__scopeId", "data-v-3b20a1eb"]]),
|
|
117516
|
+
}), [["__scopeId", "data-v-3b20a1eb"]]), U7e = { class: "mobile" }, W7e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
117495
117517
|
__name: "index",
|
|
117496
117518
|
setup(e) {
|
|
117497
117519
|
let t = O("preview"), n = (e) => t.value = e, r = i(() => ({
|
|
117498
|
-
editor:
|
|
117499
|
-
player:
|
|
117500
|
-
preview:
|
|
117520
|
+
editor: P7e,
|
|
117521
|
+
player: I7e,
|
|
117522
|
+
preview: H7e
|
|
117501
117523
|
})[t.value] || null);
|
|
117502
|
-
return (e, t) => (E(), c("div",
|
|
117524
|
+
return (e, t) => (E(), c("div", U7e, [(E(), o(P(r.value), { changeMode: n }))]));
|
|
117503
117525
|
}
|
|
117504
|
-
}), [["__scopeId", "data-v-d02011cb"]]),
|
|
117526
|
+
}), [["__scopeId", "data-v-d02011cb"]]), G7e = {
|
|
117505
117527
|
cs: () => Promise.resolve().then(() => wa),
|
|
117506
117528
|
en: () => Promise.resolve().then(() => Ea),
|
|
117507
117529
|
pl: () => Promise.resolve().then(() => Oa),
|
|
117508
117530
|
sk: () => Promise.resolve().then(() => Aa)
|
|
117509
|
-
},
|
|
117531
|
+
}, K7e = {
|
|
117510
117532
|
cs: {
|
|
117511
117533
|
canvas: () => Promise.resolve().then(() => Ma),
|
|
117512
117534
|
common: () => Promise.resolve().then(() => Pa),
|
|
@@ -117547,27 +117569,27 @@ var R7e = _({
|
|
|
117547
117569
|
mobile: () => Promise.resolve().then(() => zo),
|
|
117548
117570
|
screen: () => Promise.resolve().then(() => Vo)
|
|
117549
117571
|
}
|
|
117550
|
-
},
|
|
117572
|
+
}, q7e = (e, t) => ga[e] = {
|
|
117551
117573
|
...ga[e],
|
|
117552
117574
|
...t
|
|
117553
|
-
},
|
|
117554
|
-
|
|
117555
|
-
},
|
|
117556
|
-
function
|
|
117557
|
-
|
|
117575
|
+
}, J7e = async (e) => (await G7e[e]()).default, Y7e = async (e) => {
|
|
117576
|
+
q7e(e, await J7e(e)), X7e(e);
|
|
117577
|
+
}, X7e = (e) => void (_a[e] = Ca(e)), Z7e = async (e, t) => (await K7e[e][t]()).default, Q7e = async (e, t) => void q7e(e, { [t]: await Z7e(e, t) }), $7e = null;
|
|
117578
|
+
function e9e(e) {
|
|
117579
|
+
$7e = e;
|
|
117558
117580
|
}
|
|
117559
|
-
function
|
|
117560
|
-
|
|
117581
|
+
function t9e() {
|
|
117582
|
+
$7e = null;
|
|
117561
117583
|
}
|
|
117562
|
-
async function
|
|
117563
|
-
Zo(e), es(), await
|
|
117584
|
+
async function n9e(e) {
|
|
117585
|
+
Zo(e), es(), await Y7e(e), await Promise.all(ma.map((t) => Q7e(e, t))), $7e?.(e);
|
|
117564
117586
|
}
|
|
117565
117587
|
//#endregion
|
|
117566
117588
|
//#region src/embed/EmbedRoot.vue?vue&type=script&setup=true&lang.ts
|
|
117567
|
-
var
|
|
117589
|
+
var r9e = {
|
|
117568
117590
|
key: 2,
|
|
117569
117591
|
class: "pptist-empty-host-state"
|
|
117570
|
-
},
|
|
117592
|
+
}, i9e = /* @__PURE__ */ p({
|
|
117571
117593
|
__name: "EmbedRoot",
|
|
117572
117594
|
props: { init: {} },
|
|
117573
117595
|
setup(t) {
|
|
@@ -117595,17 +117617,17 @@ var n9e = {
|
|
|
117595
117617
|
p(Cd(r.value, n.init.starterPresentation));
|
|
117596
117618
|
}
|
|
117597
117619
|
return w(async () => {
|
|
117598
|
-
|
|
117620
|
+
e9e(i), n.init.templates?.length && s.setTemplates(n.init.templates), await m(), await ws(), l.initSnapshotDatabase();
|
|
117599
117621
|
}), T(() => {
|
|
117600
|
-
|
|
117601
|
-
}), (t, n) => L(d).length ? (E(), c(e, { key: 0 }, [L(f) ? (E(), o(
|
|
117622
|
+
t9e();
|
|
117623
|
+
}), (t, n) => L(d).length ? (E(), c(e, { key: 0 }, [L(f) ? (E(), o(Z5e, { key: 0 })) : L(a) ? (E(), o(K6e, { key: 1 })) : (E(), o(W7e, { key: 2 }))], 64)) : t.init.showLoadingData === !1 ? (E(), c("div", r9e)) : (E(), o(mD, {
|
|
117602
117624
|
key: 1,
|
|
117603
117625
|
tip: L(r).common.loadingData(),
|
|
117604
117626
|
loading: "",
|
|
117605
117627
|
mask: !1
|
|
117606
117628
|
}, null, 8, ["tip"]));
|
|
117607
117629
|
}
|
|
117608
|
-
}), z7 = "TOOLTIP_INSTANCE",
|
|
117630
|
+
}), z7 = "TOOLTIP_INSTANCE", a9e = {
|
|
117609
117631
|
mounted(e, t) {
|
|
117610
117632
|
let n = "", r = "top", i = [300, 0];
|
|
117611
117633
|
typeof t.value == "string" ? n = t.value : (n = t.value.content, t.value.placement !== void 0 && (r = t.value.placement), t.value.delay !== void 0 && (i = t.value.delay)), e[z7] = EA(e, {
|
|
@@ -117626,24 +117648,24 @@ var n9e = {
|
|
|
117626
117648
|
unmounted(e) {
|
|
117627
117649
|
e[z7] && e[z7].destroy();
|
|
117628
117650
|
}
|
|
117629
|
-
},
|
|
117651
|
+
}, o9e = { class: "menu-content" }, s9e = ["onClick"], c9e = { class: "text" }, l9e = {
|
|
117630
117652
|
key: 0,
|
|
117631
117653
|
class: "sub-text"
|
|
117632
|
-
},
|
|
117654
|
+
}, u9e = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
117633
117655
|
__name: "MenuContent",
|
|
117634
117656
|
props: {
|
|
117635
117657
|
menus: {},
|
|
117636
117658
|
handleClickMenuItem: { type: Function }
|
|
117637
117659
|
},
|
|
117638
117660
|
setup(t) {
|
|
117639
|
-
let n =
|
|
117661
|
+
let n = a9e, r = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), i = (e) => ({
|
|
117640
117662
|
content: e ? `<span class="contextmenu-tooltip">${r(e)}</span>` : "",
|
|
117641
117663
|
placement: "right",
|
|
117642
117664
|
delay: [400, 0]
|
|
117643
117665
|
});
|
|
117644
117666
|
return (t, r) => {
|
|
117645
117667
|
let a = M("menu-content", !0);
|
|
117646
|
-
return E(), c("ul",
|
|
117668
|
+
return E(), c("ul", o9e, [(E(!0), c(e, null, A(t.menus, (r, l) => (E(), c(e, { key: r.text || l }, [r.hide ? s("", !0) : (E(), c("li", {
|
|
117647
117669
|
key: 0,
|
|
117648
117670
|
class: b(["menu-item", {
|
|
117649
117671
|
divider: r.divider,
|
|
@@ -117657,18 +117679,18 @@ var n9e = {
|
|
|
117657
117679
|
"has-handler": r.handler
|
|
117658
117680
|
}])
|
|
117659
117681
|
}, [
|
|
117660
|
-
U((E(), c("span",
|
|
117661
|
-
r.subText && !r.children ? U((E(), c("span",
|
|
117682
|
+
U((E(), c("span", c9e, [d(F(r.text), 1)])), [[L(n), i(r.text)]]),
|
|
117683
|
+
r.subText && !r.children ? U((E(), c("span", l9e, [d(F(r.subText), 1)])), [[L(n), i(r.subText)]]) : s("", !0),
|
|
117662
117684
|
r.children && r.children.length ? (E(), o(a, {
|
|
117663
117685
|
key: 1,
|
|
117664
117686
|
class: "sub-menu",
|
|
117665
117687
|
menus: r.children,
|
|
117666
117688
|
handleClickMenuItem: t.handleClickMenuItem
|
|
117667
117689
|
}, null, 8, ["menus", "handleClickMenuItem"])) : s("", !0)
|
|
117668
|
-
], 2))], 10,
|
|
117690
|
+
], 2))], 10, s9e))], 64))), 128))]);
|
|
117669
117691
|
};
|
|
117670
117692
|
}
|
|
117671
|
-
}), [["__scopeId", "data-v-4ace596e"]]),
|
|
117693
|
+
}), [["__scopeId", "data-v-4ace596e"]]), d9e = /* @__PURE__ */ p({
|
|
117672
117694
|
__name: "index",
|
|
117673
117695
|
props: {
|
|
117674
117696
|
axis: {},
|
|
@@ -117697,12 +117719,12 @@ var n9e = {
|
|
|
117697
117719
|
top: r.value.top + "px"
|
|
117698
117720
|
}),
|
|
117699
117721
|
onContextmenu: n[2] || (n[2] = W(() => {}, ["prevent"]))
|
|
117700
|
-
}, [f(
|
|
117722
|
+
}, [f(u9e, {
|
|
117701
117723
|
menus: t.menus,
|
|
117702
117724
|
handleClickMenuItem: a
|
|
117703
117725
|
}, null, 8, ["menus"])], 36)], 64));
|
|
117704
117726
|
}
|
|
117705
|
-
}), B7 = "CTX_CONTEXTMENU_HANDLER",
|
|
117727
|
+
}), B7 = "CTX_CONTEXTMENU_HANDLER", f9e = (e, t, n) => {
|
|
117706
117728
|
t.stopPropagation(), t.preventDefault();
|
|
117707
117729
|
let r = n.value(e);
|
|
117708
117730
|
if (!r) return;
|
|
@@ -117717,47 +117739,47 @@ var n9e = {
|
|
|
117717
117739
|
menus: r,
|
|
117718
117740
|
removeContextmenu: o
|
|
117719
117741
|
};
|
|
117720
|
-
i = document.createElement("div"), k(f(
|
|
117721
|
-
},
|
|
117742
|
+
i = document.createElement("div"), k(f(d9e, s, null), i), a.appendChild(i), e.classList.add("contextmenu-active"), a.addEventListener("scroll", o), window.addEventListener("resize", o);
|
|
117743
|
+
}, p9e = {
|
|
117722
117744
|
mounted(e, t) {
|
|
117723
|
-
e[B7] = (n) =>
|
|
117745
|
+
e[B7] = (n) => f9e(e, n, t), e.addEventListener("contextmenu", e[B7]);
|
|
117724
117746
|
},
|
|
117725
117747
|
unmounted(e) {
|
|
117726
117748
|
e && e[B7] && (e.removeEventListener("contextmenu", e[B7]), delete e[B7]);
|
|
117727
117749
|
}
|
|
117728
|
-
}, V7 = "CTX_CLICK_OUTSIDE_HANDLER",
|
|
117750
|
+
}, V7 = "CTX_CLICK_OUTSIDE_HANDLER", m9e = (e, t, n) => {
|
|
117729
117751
|
let r = n.value, i = t.composedPath();
|
|
117730
117752
|
(i ? i.indexOf(e) < 0 : !e.contains(t.target)) && r(t);
|
|
117731
|
-
},
|
|
117753
|
+
}, h9e = {
|
|
117732
117754
|
mounted(e, t) {
|
|
117733
|
-
e[V7] = (n) =>
|
|
117755
|
+
e[V7] = (n) => m9e(e, n, t), setTimeout(() => {
|
|
117734
117756
|
document.addEventListener("click", e[V7]);
|
|
117735
117757
|
}, 0);
|
|
117736
117758
|
},
|
|
117737
117759
|
unmounted(e) {
|
|
117738
117760
|
e[V7] && (document.removeEventListener("click", e[V7]), delete e[V7]);
|
|
117739
117761
|
}
|
|
117740
|
-
},
|
|
117762
|
+
}, g9e = {
|
|
117741
117763
|
mounted(e, t) {
|
|
117742
|
-
|
|
117764
|
+
v9e(e, t.value);
|
|
117743
117765
|
},
|
|
117744
117766
|
updated(e, t) {
|
|
117745
|
-
|
|
117767
|
+
v9e(e, t.value);
|
|
117746
117768
|
},
|
|
117747
117769
|
unmounted(e) {
|
|
117748
|
-
|
|
117770
|
+
_9e(e);
|
|
117749
117771
|
}
|
|
117750
|
-
},
|
|
117772
|
+
}, _9e = (e) => {
|
|
117751
117773
|
let t = e.querySelector(".directive-loading-overlay");
|
|
117752
117774
|
t && t.remove(), e._vLoadingAddedPosition && (e.style.removeProperty("position"), delete e._vLoadingAddedPosition);
|
|
117753
|
-
},
|
|
117775
|
+
}, v9e = (e, t) => {
|
|
117754
117776
|
let n = !1, r = "";
|
|
117755
117777
|
typeof t == "boolean" ? n = t : (t.text && (r = t.text), n = t.state);
|
|
117756
117778
|
let i = e.querySelector(".directive-loading-overlay");
|
|
117757
117779
|
n ? (getComputedStyle(e).position === "static" && (e.style.position = "relative", e._vLoadingAddedPosition = !0), i || (i = document.createElement("div"), i.className = "directive-loading-overlay", e.appendChild(i)), r ? (i.classList.add("has-text"), i.style.setProperty("--directive-loading-text", `"${r}"`)) : (i.classList.remove("has-text"), i.style.removeProperty("--directive-loading-text"))) : (i && i.remove(), e._vLoadingAddedPosition && (e.style.removeProperty("position"), delete e._vLoadingAddedPosition));
|
|
117758
|
-
},
|
|
117759
|
-
e.directive("contextmenu",
|
|
117760
|
-
} },
|
|
117780
|
+
}, y9e = { install(e) {
|
|
117781
|
+
e.directive("contextmenu", p9e), e.directive("click-outside", h9e), e.directive("tooltip", a9e), e.directive("loading", g9e);
|
|
117782
|
+
} }, b9e = [
|
|
117761
117783
|
"text",
|
|
117762
117784
|
"image",
|
|
117763
117785
|
"shape",
|
|
@@ -117767,7 +117789,7 @@ var n9e = {
|
|
|
117767
117789
|
"latex",
|
|
117768
117790
|
"video",
|
|
117769
117791
|
"audio"
|
|
117770
|
-
],
|
|
117792
|
+
], x9e = new Set([
|
|
117771
117793
|
"backcolor",
|
|
117772
117794
|
"backgroundColor",
|
|
117773
117795
|
"borderColor",
|
|
@@ -117778,8 +117800,8 @@ var n9e = {
|
|
|
117778
117800
|
"fontColor",
|
|
117779
117801
|
"lineColor",
|
|
117780
117802
|
"textColor"
|
|
117781
|
-
]),
|
|
117782
|
-
function
|
|
117803
|
+
]), S9e = /^(#[0-9a-f]{3,8}|(?:rgb|hsl)a?\([^;{}<>]+\)|var\(--[a-z0-9_-]+\)|transparent|currentColor|none|[a-z]+)$/i;
|
|
117804
|
+
function C9e(e) {
|
|
117783
117805
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
117784
117806
|
}
|
|
117785
117807
|
function H7(e, t) {
|
|
@@ -117794,10 +117816,10 @@ function U7(e, t, n = !1) {
|
|
|
117794
117816
|
function W7(e, t = "id") {
|
|
117795
117817
|
return U7(e, t);
|
|
117796
117818
|
}
|
|
117797
|
-
function
|
|
117819
|
+
function w9e(e, t) {
|
|
117798
117820
|
if (e !== void 0) return W7(e, t);
|
|
117799
117821
|
}
|
|
117800
|
-
function
|
|
117822
|
+
function T9e(e, t = "id") {
|
|
117801
117823
|
let n = Array.isArray(e) ? e : [e];
|
|
117802
117824
|
if (!n.length) throw Error(`${t} must include at least one ID`);
|
|
117803
117825
|
return n.map((n, r) => W7(n, `${t}${Array.isArray(e) ? `[${r}]` : ""}`));
|
|
@@ -117817,16 +117839,16 @@ function q7(e, t, n = "index") {
|
|
|
117817
117839
|
if (i < 0 || i >= t) throw Error(`${n} is out of bounds`);
|
|
117818
117840
|
return i;
|
|
117819
117841
|
}
|
|
117820
|
-
function
|
|
117842
|
+
function E9e(e, t, n = "index") {
|
|
117821
117843
|
if (e === void 0) return t;
|
|
117822
117844
|
let r = G7(e, n), i = Math.trunc(r);
|
|
117823
117845
|
if (i !== r) throw Error(`${n} must be an integer`);
|
|
117824
117846
|
if (i < 0 || i > t) throw Error(`${n} is out of bounds`);
|
|
117825
117847
|
return i;
|
|
117826
117848
|
}
|
|
117827
|
-
function
|
|
117849
|
+
function D9e(e, t = "color") {
|
|
117828
117850
|
let n = U7(e, t);
|
|
117829
|
-
if (!
|
|
117851
|
+
if (!S9e.test(n.trim())) throw Error(`${t} must be a valid color string`);
|
|
117830
117852
|
return n;
|
|
117831
117853
|
}
|
|
117832
117854
|
function J7(e, t = "value") {
|
|
@@ -117837,64 +117859,64 @@ function J7(e, t = "value") {
|
|
|
117837
117859
|
}
|
|
117838
117860
|
for (let [n, r] of Object.entries(e)) {
|
|
117839
117861
|
let e = `${t}.${n}`;
|
|
117840
|
-
|
|
117862
|
+
x9e.has(n) && r !== void 0 ? D9e(r, e) : n === "themeColors" && Array.isArray(r) ? r.forEach((t, n) => D9e(t, `${e}[${n}]`)) : r && typeof r == "object" && J7(r, e);
|
|
117841
117863
|
}
|
|
117842
117864
|
}
|
|
117843
117865
|
}
|
|
117844
|
-
function
|
|
117845
|
-
if (!
|
|
117866
|
+
function O9e(e, t = "element.type") {
|
|
117867
|
+
if (!b9e.includes(e)) throw Error(`${t} is not supported`);
|
|
117846
117868
|
return e;
|
|
117847
117869
|
}
|
|
117848
117870
|
function Y7(e, t = "element") {
|
|
117849
117871
|
"left" in e && e.left !== void 0 && G7(e.left, `${t}.left`), "top" in e && e.top !== void 0 && G7(e.top, `${t}.top`), "width" in e && e.width !== void 0 && K7(e.width, `${t}.width`), "height" in e && e.height !== void 0 && K7(e.height, `${t}.height`), "rotate" in e && e.rotate !== void 0 && G7(e.rotate, `${t}.rotate`);
|
|
117850
117872
|
}
|
|
117851
|
-
function
|
|
117873
|
+
function k9e(e, t) {
|
|
117852
117874
|
if (!Array.isArray(e) || e.length !== 2) throw Error(`${t} must be a two-value point`);
|
|
117853
117875
|
G7(e[0], `${t}[0]`), G7(e[1], `${t}[1]`);
|
|
117854
117876
|
}
|
|
117855
|
-
function
|
|
117877
|
+
function A9e(e, t) {
|
|
117856
117878
|
if (!Array.isArray(e) || e.length !== 2) throw Error(`${t} must be a two-value viewBox`);
|
|
117857
117879
|
K7(e[0], `${t}[0]`), K7(e[1], `${t}[1]`);
|
|
117858
117880
|
}
|
|
117859
|
-
function
|
|
117860
|
-
let n =
|
|
117881
|
+
function j9e(e, t = "element") {
|
|
117882
|
+
let n = O9e(e.type, `${t}.type`);
|
|
117861
117883
|
if (n === "text") U7(H7(e.content, `${t}.content`), `${t}.content`, !0);
|
|
117862
117884
|
else if (n === "image" || n === "video" || n === "audio") U7(H7(e.src, `${t}.src`), `${t}.src`);
|
|
117863
|
-
else if (n === "shape")
|
|
117864
|
-
else if (n === "line")
|
|
117885
|
+
else if (n === "shape") A9e(H7(e.viewBox, `${t}.viewBox`), `${t}.viewBox`), U7(H7(e.path, `${t}.path`), `${t}.path`);
|
|
117886
|
+
else if (n === "line") k9e(H7(e.start, `${t}.start`), `${t}.start`), k9e(H7(e.end, `${t}.end`), `${t}.end`);
|
|
117865
117887
|
else if (n === "chart") {
|
|
117866
|
-
if (U7(H7(e.chartType, `${t}.chartType`), `${t}.chartType`), !
|
|
117888
|
+
if (U7(H7(e.chartType, `${t}.chartType`), `${t}.chartType`), !C9e(e.data)) throw Error(`${t}.data is required`);
|
|
117867
117889
|
} else if (n === "table") {
|
|
117868
117890
|
if (!Array.isArray(e.data)) throw Error(`${t}.data is required`);
|
|
117869
117891
|
} else n === "latex" && (U7(H7(e.latex, `${t}.latex`), `${t}.latex`, !0), U7(H7(e.path, `${t}.path`), `${t}.path`));
|
|
117870
117892
|
}
|
|
117871
117893
|
function X7(e, t = "element") {
|
|
117872
|
-
e.id !== void 0 && W7(e.id, `${t}.id`), Y7(e, t),
|
|
117894
|
+
e.id !== void 0 && W7(e.id, `${t}.id`), Y7(e, t), j9e(e, t), J7(e, t);
|
|
117873
117895
|
}
|
|
117874
|
-
function
|
|
117896
|
+
function M9e(e, t, n = "patch") {
|
|
117875
117897
|
if (e.type !== void 0 && e.type !== t.type) throw Error(`${n}.type cannot change element type from ${t.type} to ${e.type}`);
|
|
117876
117898
|
Y7(e, n), J7(e, n);
|
|
117877
117899
|
}
|
|
117878
117900
|
//#endregion
|
|
117879
117901
|
//#region src/embed/agentic/helpers.ts
|
|
117880
|
-
var
|
|
117902
|
+
var N9e = /^[a-z][A-Za-z0-9]*\.[a-z][A-Za-z0-9]*$/, P9e = 2, F9e = 2, I9e = 100, L9e = 36, R9e = {
|
|
117881
117903
|
width: 2,
|
|
117882
117904
|
style: "solid",
|
|
117883
117905
|
color: "#eeece1"
|
|
117884
|
-
},
|
|
117906
|
+
}, z9e = {
|
|
117885
117907
|
color: "#5b9bd5",
|
|
117886
117908
|
rowHeader: !0,
|
|
117887
117909
|
rowFooter: !1,
|
|
117888
117910
|
colHeader: !1,
|
|
117889
117911
|
colFooter: !1
|
|
117890
|
-
},
|
|
117912
|
+
}, B9e = [
|
|
117891
117913
|
"#5b9bd5",
|
|
117892
117914
|
"#ed7d31",
|
|
117893
117915
|
"#a5a5a5",
|
|
117894
117916
|
"#ffc000",
|
|
117895
117917
|
"#4472c4",
|
|
117896
117918
|
"#70ad47"
|
|
117897
|
-
],
|
|
117919
|
+
], V9e = "#333", H9e = "#e8ecf4", U9e = "#000000", W9e = 2, G9e = {
|
|
117898
117920
|
"image/avif": "avif",
|
|
117899
117921
|
"image/bmp": "bmp",
|
|
117900
117922
|
"image/gif": "gif",
|
|
@@ -117903,11 +117925,11 @@ var M9e = /^[a-z][A-Za-z0-9]*\.[a-z][A-Za-z0-9]*$/, N9e = 2, P9e = 2, F9e = 100,
|
|
|
117903
117925
|
"image/svg+xml": "svg",
|
|
117904
117926
|
"image/webp": "webp",
|
|
117905
117927
|
"image/x-icon": "ico"
|
|
117906
|
-
},
|
|
117928
|
+
}, K9e = {
|
|
117907
117929
|
...uf,
|
|
117908
|
-
...
|
|
117930
|
+
...G9e
|
|
117909
117931
|
}, Z7 = {};
|
|
117910
|
-
for (let [e, t] of Object.entries(
|
|
117932
|
+
for (let [e, t] of Object.entries(K9e)) Z7[t] = e;
|
|
117911
117933
|
Z7.aiff = "audio/x-aiff", Z7.jpeg = "image/jpeg", Z7.m4a = "audio/mp4", Z7.m4v = "video/mp4", Z7.midi = "audio/midi", Z7.mp3 = "audio/mpeg", Z7.ogg = "audio/ogg", Z7.svg = "image/svg+xml";
|
|
117912
117934
|
function $(e) {
|
|
117913
117935
|
return JSON.parse(JSON.stringify(e));
|
|
@@ -117931,21 +117953,21 @@ function e9(e, t, n, r = !1) {
|
|
|
117931
117953
|
recoverable: r
|
|
117932
117954
|
};
|
|
117933
117955
|
}
|
|
117934
|
-
function
|
|
117956
|
+
function q9e(e) {
|
|
117935
117957
|
return e?.trim().replace(/^\./, "").toLowerCase() || void 0;
|
|
117936
117958
|
}
|
|
117937
|
-
function
|
|
117959
|
+
function J9e(e) {
|
|
117938
117960
|
let t = e?.trim().toLowerCase();
|
|
117939
|
-
return t ?
|
|
117961
|
+
return t ? K9e[t] : void 0;
|
|
117940
117962
|
}
|
|
117941
|
-
function
|
|
117942
|
-
let t =
|
|
117963
|
+
function Y9e(e) {
|
|
117964
|
+
let t = q9e(e);
|
|
117943
117965
|
return t ? Z7[t] : void 0;
|
|
117944
117966
|
}
|
|
117945
|
-
function
|
|
117967
|
+
function X9e(e) {
|
|
117946
117968
|
return /^data:([^;,]+)/i.exec(e.trim())?.[1]?.toLowerCase();
|
|
117947
117969
|
}
|
|
117948
|
-
function
|
|
117970
|
+
function Z9e(e) {
|
|
117949
117971
|
let t = e.trim();
|
|
117950
117972
|
if (!t || t.startsWith("data:")) return "";
|
|
117951
117973
|
try {
|
|
@@ -117954,19 +117976,19 @@ function X9e(e) {
|
|
|
117954
117976
|
return t.split(/[?#]/)[0];
|
|
117955
117977
|
}
|
|
117956
117978
|
}
|
|
117957
|
-
function
|
|
117958
|
-
let n =
|
|
117979
|
+
function Q9e(e, t) {
|
|
117980
|
+
let n = J9e(t || X9e(e));
|
|
117959
117981
|
if (n) return n;
|
|
117960
|
-
let r =
|
|
117961
|
-
return
|
|
117982
|
+
let r = Z9e(e).replace(/\\/g, "/").split("/").pop() || "";
|
|
117983
|
+
return q9e(/\.([a-z0-9]+)$/i.exec(r)?.[1]);
|
|
117962
117984
|
}
|
|
117963
|
-
function
|
|
117964
|
-
return
|
|
117985
|
+
function $9e(e, t) {
|
|
117986
|
+
return X9e(e) || Y9e(t || Q9e(e));
|
|
117965
117987
|
}
|
|
117966
117988
|
function t9(e, t) {
|
|
117967
117989
|
let n = typeof e == "string" ? e : e.src;
|
|
117968
117990
|
if (typeof n != "string" || !n.trim()) throw Error("Media asset src is required");
|
|
117969
|
-
let r = typeof e == "string" ? {} : $(e), i = n.trim(), a =
|
|
117991
|
+
let r = typeof e == "string" ? {} : $(e), i = n.trim(), a = q9e(r.ext) || Q9e(i, r.mimeType) || (r.filename ? Q9e(r.filename, r.mimeType) : void 0), o = r.mimeType?.trim().toLowerCase() || $9e(i, a) || (r.filename ? $9e(r.filename, a) : void 0);
|
|
117970
117992
|
return $({
|
|
117971
117993
|
...r,
|
|
117972
117994
|
src: i,
|
|
@@ -117975,20 +117997,20 @@ function t9(e, t) {
|
|
|
117975
117997
|
...o ? { mimeType: o } : {}
|
|
117976
117998
|
});
|
|
117977
117999
|
}
|
|
117978
|
-
function
|
|
117979
|
-
return
|
|
118000
|
+
function eet(e) {
|
|
118001
|
+
return N9e.test(e);
|
|
117980
118002
|
}
|
|
117981
118003
|
function n9(e) {
|
|
117982
|
-
return
|
|
118004
|
+
return T9e(e);
|
|
117983
118005
|
}
|
|
117984
118006
|
function r9(e, t) {
|
|
117985
118007
|
return !Number.isFinite(e) || t <= 0 ? 0 : Math.max(0, Math.min(Math.trunc(e), t - 1));
|
|
117986
118008
|
}
|
|
117987
118009
|
function i9(e, t) {
|
|
117988
|
-
return
|
|
118010
|
+
return E9e(e, t);
|
|
117989
118011
|
}
|
|
117990
118012
|
function a9(e, t, n = 0) {
|
|
117991
|
-
let r =
|
|
118013
|
+
let r = w9e(t, "slideId");
|
|
117992
118014
|
if (r) {
|
|
117993
118015
|
let t = e.findIndex((e) => e.id === r);
|
|
117994
118016
|
if (t === -1) throw Error(`Slide not found: ${r}`);
|
|
@@ -118005,7 +118027,7 @@ function a9(e, t, n = 0) {
|
|
|
118005
118027
|
};
|
|
118006
118028
|
}
|
|
118007
118029
|
function o9(e, t, n, r = 0) {
|
|
118008
|
-
let i = W7(t, "elementId"), a =
|
|
118030
|
+
let i = W7(t, "elementId"), a = w9e(n, "slideId");
|
|
118009
118031
|
if (a) {
|
|
118010
118032
|
let { slide: t, index: n } = a9(e, a, r), o = t.elements.findIndex((e) => e.id === i);
|
|
118011
118033
|
if (o === -1) throw Error(`Element not found: ${i}`);
|
|
@@ -118031,16 +118053,16 @@ function s9(e, t) {
|
|
|
118031
118053
|
let n = W7(t, "elementId");
|
|
118032
118054
|
if (!e.elements.some((e) => e.id === n)) throw Error(`Element not found on slide ${e.id}: ${n}`);
|
|
118033
118055
|
}
|
|
118034
|
-
function
|
|
118056
|
+
function tet(e) {
|
|
118035
118057
|
return e.reduce((e, t) => (e[t.id] = $7("slide"), e), {});
|
|
118036
118058
|
}
|
|
118037
|
-
function
|
|
118059
|
+
function net(e) {
|
|
118038
118060
|
return e.reduce((e, t) => (e.elementIdMap[t.id] = $7("el"), t.groupId && !e.groupIdMap[t.groupId] && (e.groupIdMap[t.groupId] = $7("group")), e), {
|
|
118039
118061
|
elementIdMap: {},
|
|
118040
118062
|
groupIdMap: {}
|
|
118041
118063
|
});
|
|
118042
118064
|
}
|
|
118043
|
-
function
|
|
118065
|
+
function ret(e, t, n) {
|
|
118044
118066
|
if (!e) return;
|
|
118045
118067
|
if (e.type !== "slide") return $(e);
|
|
118046
118068
|
let r = t[e.target];
|
|
@@ -118049,7 +118071,7 @@ function net(e, t, n) {
|
|
|
118049
118071
|
target: r
|
|
118050
118072
|
} : n ? $(e) : void 0;
|
|
118051
118073
|
}
|
|
118052
|
-
function
|
|
118074
|
+
function iet(e, t) {
|
|
118053
118075
|
if (!e) return;
|
|
118054
118076
|
let n = U7(e.target, "link.target").trim();
|
|
118055
118077
|
if (!n) throw Error("Link target is required");
|
|
@@ -118074,7 +118096,7 @@ function ret(e, t) {
|
|
|
118074
118096
|
}
|
|
118075
118097
|
throw Error(`Unsupported link type: ${e.type}`);
|
|
118076
118098
|
}
|
|
118077
|
-
function
|
|
118099
|
+
function aet(e, t) {
|
|
118078
118100
|
let n = [];
|
|
118079
118101
|
for (let r of e) for (let e of r.elements) e.link?.type === "slide" && (t && !t.has(e.link.target) || n.push({
|
|
118080
118102
|
slideId: r.id,
|
|
@@ -118083,7 +118105,7 @@ function iet(e, t) {
|
|
|
118083
118105
|
}));
|
|
118084
118106
|
return n;
|
|
118085
118107
|
}
|
|
118086
|
-
function
|
|
118108
|
+
function oet(e) {
|
|
118087
118109
|
return typeof e.offset == "number" ? {
|
|
118088
118110
|
left: e.offset,
|
|
118089
118111
|
top: e.offset
|
|
@@ -118092,19 +118114,19 @@ function aet(e) {
|
|
|
118092
118114
|
top: e.offset?.top ?? 0
|
|
118093
118115
|
};
|
|
118094
118116
|
}
|
|
118095
|
-
function
|
|
118096
|
-
let r =
|
|
118117
|
+
function set(e, t = [], n = {}) {
|
|
118118
|
+
let r = net(e), i = {
|
|
118097
118119
|
...r.elementIdMap,
|
|
118098
118120
|
...n.elementIdMap
|
|
118099
118121
|
}, a = {
|
|
118100
118122
|
...r.groupIdMap,
|
|
118101
118123
|
...n.groupIdMap
|
|
118102
|
-
}, o = { ...n.animationIdMap || {} }, s = n.slideIdMap || {}, c = n.preserveExternalSlideLinks ?? !0, l =
|
|
118124
|
+
}, o = { ...n.animationIdMap || {} }, s = n.slideIdMap || {}, c = n.preserveExternalSlideLinks ?? !0, l = oet(n);
|
|
118103
118125
|
return {
|
|
118104
118126
|
elements: e.map((e) => {
|
|
118105
118127
|
let t = $(e);
|
|
118106
118128
|
t.id = i[e.id] || $7("el"), t.left += l.left, t.top += l.top, t.groupId && (t.groupId = a[t.groupId] || $7("group"));
|
|
118107
|
-
let n =
|
|
118129
|
+
let n = ret(t.link, s, c);
|
|
118108
118130
|
return n ? t.link = n : delete t.link, t;
|
|
118109
118131
|
}),
|
|
118110
118132
|
animations: t.flatMap((e) => {
|
|
@@ -118118,12 +118140,12 @@ function oet(e, t = [], n = {}) {
|
|
|
118118
118140
|
animationIdMap: o
|
|
118119
118141
|
};
|
|
118120
118142
|
}
|
|
118121
|
-
function
|
|
118143
|
+
function cet(e, t = {}) {
|
|
118122
118144
|
let n = {
|
|
118123
|
-
...
|
|
118145
|
+
...tet(e),
|
|
118124
118146
|
...t.slideIdMap
|
|
118125
118147
|
}, r = {}, i = {}, a = {}, o = e.map((e) => {
|
|
118126
|
-
let o = $(e), s =
|
|
118148
|
+
let o = $(e), s = set(o.elements, o.animations || [], {
|
|
118127
118149
|
animationIdMap: a,
|
|
118128
118150
|
elementIdMap: r,
|
|
118129
118151
|
groupIdMap: i,
|
|
@@ -118141,7 +118163,7 @@ function set(e, t = {}) {
|
|
|
118141
118163
|
id: $7("reply")
|
|
118142
118164
|
}))), t;
|
|
118143
118165
|
});
|
|
118144
|
-
return
|
|
118166
|
+
return uet({
|
|
118145
118167
|
...o,
|
|
118146
118168
|
id: n[e.id],
|
|
118147
118169
|
elements: s.elements,
|
|
@@ -118159,7 +118181,7 @@ function set(e, t = {}) {
|
|
|
118159
118181
|
animations: o.flatMap((e) => e.animations || [])
|
|
118160
118182
|
};
|
|
118161
118183
|
}
|
|
118162
|
-
function
|
|
118184
|
+
function uet(e = {}) {
|
|
118163
118185
|
return e.id !== void 0 && W7(e.id, "slide.id"), J7(e, "slide"), {
|
|
118164
118186
|
id: e.id || $7("slide"),
|
|
118165
118187
|
elements: $(e.elements || []),
|
|
@@ -118172,7 +118194,7 @@ function cet(e = {}) {
|
|
|
118172
118194
|
...e.type ? { type: e.type } : {}
|
|
118173
118195
|
};
|
|
118174
118196
|
}
|
|
118175
|
-
function
|
|
118197
|
+
function det(e, t) {
|
|
118176
118198
|
let n = e.chartType || "bar", r = e.outline ? {
|
|
118177
118199
|
...t?.outline || {},
|
|
118178
118200
|
...e.outline
|
|
@@ -118195,26 +118217,26 @@ function uet(e, t) {
|
|
|
118195
118217
|
},
|
|
118196
118218
|
...e.fill === void 0 ? {} : { fill: e.fill },
|
|
118197
118219
|
...r ? { outline: r } : {},
|
|
118198
|
-
themeColors: $(e.themeColors || t?.themeColors ||
|
|
118199
|
-
textColor: e.textColor ?? t?.fontColor ??
|
|
118200
|
-
lineColor: e.lineColor ??
|
|
118220
|
+
themeColors: $(e.themeColors || t?.themeColors || B9e),
|
|
118221
|
+
textColor: e.textColor ?? t?.fontColor ?? V9e,
|
|
118222
|
+
lineColor: e.lineColor ?? H9e
|
|
118201
118223
|
});
|
|
118202
118224
|
}
|
|
118203
118225
|
function c9(e, t) {
|
|
118204
|
-
if (
|
|
118205
|
-
let t =
|
|
118226
|
+
if (O9e(e.type), Y7(e), J7(e, "element"), e.type === "line") {
|
|
118227
|
+
let t = Det(e);
|
|
118206
118228
|
return X7(t), t;
|
|
118207
118229
|
}
|
|
118208
118230
|
if (e.type === "table") {
|
|
118209
|
-
let n =
|
|
118231
|
+
let n = zet(e, t);
|
|
118210
118232
|
return X7(n), n;
|
|
118211
118233
|
}
|
|
118212
118234
|
if (e.type === "latex") {
|
|
118213
|
-
let t =
|
|
118235
|
+
let t = Cet(e);
|
|
118214
118236
|
return X7(t), t;
|
|
118215
118237
|
}
|
|
118216
118238
|
if (e.type === "chart") {
|
|
118217
|
-
let n =
|
|
118239
|
+
let n = det(e, t);
|
|
118218
118240
|
return X7(n), n;
|
|
118219
118241
|
}
|
|
118220
118242
|
let n = e, r = e, i = e.type === "text" ? {
|
|
@@ -118236,15 +118258,15 @@ function c9(e, t) {
|
|
|
118236
118258
|
});
|
|
118237
118259
|
return X7(o), o;
|
|
118238
118260
|
}
|
|
118239
|
-
function
|
|
118261
|
+
function fet(e) {
|
|
118240
118262
|
let { transform: t, ...n } = e;
|
|
118241
118263
|
return Q7({
|
|
118242
118264
|
...n,
|
|
118243
118265
|
...t || {}
|
|
118244
118266
|
});
|
|
118245
118267
|
}
|
|
118246
|
-
function
|
|
118247
|
-
let n = e.source ? t9(e.source, "audio") : void 0, { source: r, slideId: i, index: a, select: o, ...s } =
|
|
118268
|
+
function pet(e, t) {
|
|
118269
|
+
let n = e.source ? t9(e.source, "audio") : void 0, { source: r, slideId: i, index: a, select: o, ...s } = fet({
|
|
118248
118270
|
...e,
|
|
118249
118271
|
src: n?.src ?? e.src,
|
|
118250
118272
|
ext: n?.ext ?? e.ext
|
|
@@ -118261,11 +118283,11 @@ function fet(e, t) {
|
|
|
118261
118283
|
color: s.color ?? t
|
|
118262
118284
|
});
|
|
118263
118285
|
}
|
|
118264
|
-
function
|
|
118265
|
-
return
|
|
118286
|
+
function met(e) {
|
|
118287
|
+
return fet(e);
|
|
118266
118288
|
}
|
|
118267
|
-
var
|
|
118268
|
-
function
|
|
118289
|
+
var het = [200, 200], get = "M 0 0 L 200 0 L 200 200 L 0 200 Z";
|
|
118290
|
+
function _et(e) {
|
|
118269
118291
|
if (!e.pathFormula) return $(e);
|
|
118270
118292
|
let t = ed[e.pathFormula];
|
|
118271
118293
|
if (!t) throw Error(`Shape path formula not found: ${e.pathFormula}`);
|
|
@@ -118278,17 +118300,17 @@ function get(e) {
|
|
|
118278
118300
|
};
|
|
118279
118301
|
return n && (r.keypoints = $(n)), $(r);
|
|
118280
118302
|
}
|
|
118281
|
-
function
|
|
118282
|
-
return
|
|
118303
|
+
function vet(e = {}) {
|
|
118304
|
+
return _et(c9({
|
|
118283
118305
|
type: "shape",
|
|
118284
|
-
viewBox:
|
|
118285
|
-
path:
|
|
118306
|
+
viewBox: het,
|
|
118307
|
+
path: get,
|
|
118286
118308
|
fixedRatio: !1,
|
|
118287
118309
|
fill: "#ffffff",
|
|
118288
118310
|
...e
|
|
118289
118311
|
}));
|
|
118290
118312
|
}
|
|
118291
|
-
function
|
|
118313
|
+
function yet(e, t) {
|
|
118292
118314
|
let n = {
|
|
118293
118315
|
...e,
|
|
118294
118316
|
...Q7(t),
|
|
@@ -118300,11 +118322,11 @@ function vet(e, t) {
|
|
|
118300
118322
|
} : void 0), "text" in t && (n.text = t.text ? {
|
|
118301
118323
|
...e.text || {},
|
|
118302
118324
|
...$(t.text)
|
|
118303
|
-
} : void 0), "gradient" in t && (n.gradient = t.gradient ? $(t.gradient) : void 0), "pattern" in t && (n.pattern = t.pattern), "path" in t && !("pathFormula" in t) && (n.pathFormula = void 0, n.keypoints = void 0), n.pathFormula && ("pathFormula" in t || "keypoints" in t || "width" in t || "height" in t) ?
|
|
118325
|
+
} : void 0), "gradient" in t && (n.gradient = t.gradient ? $(t.gradient) : void 0), "pattern" in t && (n.pattern = t.pattern), "path" in t && !("pathFormula" in t) && (n.pathFormula = void 0, n.keypoints = void 0), n.pathFormula && ("pathFormula" in t || "keypoints" in t || "width" in t || "height" in t) ? _et(n) : $(n);
|
|
118304
118326
|
}
|
|
118305
|
-
var
|
|
118306
|
-
function
|
|
118307
|
-
let t = new H4(e), n = t.pathd({}), r = t.box({}), i = r.w +
|
|
118327
|
+
var bet = 32;
|
|
118328
|
+
function xet(e) {
|
|
118329
|
+
let t = new H4(e), n = t.pathd({}), r = t.box({}), i = r.w + bet, a = r.h + bet;
|
|
118308
118330
|
return {
|
|
118309
118331
|
path: n,
|
|
118310
118332
|
viewBox: [i, a],
|
|
@@ -118312,13 +118334,13 @@ function bet(e) {
|
|
|
118312
118334
|
height: a
|
|
118313
118335
|
};
|
|
118314
118336
|
}
|
|
118315
|
-
function
|
|
118337
|
+
function Cet(e) {
|
|
118316
118338
|
e.id !== void 0 && W7(e.id, "element.id"), Y7(e, "element"), J7(e, "element");
|
|
118317
118339
|
let t = typeof e.latex == "string" ? e.latex.trim() : "", n = typeof e.path == "string" ? e.path.trim() : "", r = null;
|
|
118318
118340
|
if (t && !n) {
|
|
118319
118341
|
if (typeof window > "u") throw Error("LaTeX rendering is only available in the browser runtime.");
|
|
118320
118342
|
try {
|
|
118321
|
-
r =
|
|
118343
|
+
r = xet(t);
|
|
118322
118344
|
} catch (e) {
|
|
118323
118345
|
throw Error(`Failed to render LaTeX "${t}": ${e instanceof Error ? e.message : String(e)}`);
|
|
118324
118346
|
}
|
|
@@ -118334,14 +118356,14 @@ function xet(e) {
|
|
|
118334
118356
|
rotate: e.rotate ?? 0,
|
|
118335
118357
|
latex: t,
|
|
118336
118358
|
path: o,
|
|
118337
|
-
color: e.color ??
|
|
118338
|
-
strokeWidth: e.strokeWidth ??
|
|
118359
|
+
color: e.color ?? U9e,
|
|
118360
|
+
strokeWidth: e.strokeWidth ?? W9e,
|
|
118339
118361
|
viewBox: $(s),
|
|
118340
118362
|
fixedRatio: e.fixedRatio ?? !0
|
|
118341
118363
|
});
|
|
118342
118364
|
return X7(c), c;
|
|
118343
118365
|
}
|
|
118344
|
-
var
|
|
118366
|
+
var wet = new Set([
|
|
118345
118367
|
"lock",
|
|
118346
118368
|
"groupId",
|
|
118347
118369
|
"link",
|
|
@@ -118356,13 +118378,13 @@ var Cet = new Set([
|
|
|
118356
118378
|
function l9(e, t) {
|
|
118357
118379
|
return e ? [e[0], e[1]] : [...t];
|
|
118358
118380
|
}
|
|
118359
|
-
function
|
|
118381
|
+
function Tet(e) {
|
|
118360
118382
|
if (e) return [l9(e[0], [0, 0]), l9(e[1], [0, 0])];
|
|
118361
118383
|
}
|
|
118362
|
-
function
|
|
118384
|
+
function Eet(e) {
|
|
118363
118385
|
return e ? [e[0], e[1]] : ["", ""];
|
|
118364
118386
|
}
|
|
118365
|
-
function
|
|
118387
|
+
function Det(e) {
|
|
118366
118388
|
e.id !== void 0 && W7(e.id, "element.id"), Y7(e, "element"), J7(e, "element");
|
|
118367
118389
|
let t = {
|
|
118368
118390
|
id: e.id || $7("el"),
|
|
@@ -118374,37 +118396,37 @@ function Eet(e) {
|
|
|
118374
118396
|
end: l9(e.end, [200, 0]),
|
|
118375
118397
|
style: e.style ?? "solid",
|
|
118376
118398
|
color: e.color ?? "#000000",
|
|
118377
|
-
points:
|
|
118399
|
+
points: Eet(e.points)
|
|
118378
118400
|
};
|
|
118379
|
-
return e.lock !== void 0 && (t.lock = e.lock), e.groupId !== void 0 && (t.groupId = e.groupId), e.link !== void 0 && (t.link = $(e.link)), e.name !== void 0 && (t.name = e.name), e.shadow !== void 0 && (t.shadow = $(e.shadow)), e.broken !== void 0 && (t.broken = l9(e.broken, [0, 0])), e.broken2 !== void 0 && (t.broken2 = l9(e.broken2, [0, 0])), e.broken2Direction !== void 0 && (t.broken2Direction = e.broken2Direction), e.curve !== void 0 && (t.curve = l9(e.curve, [0, 0])), e.cubic !== void 0 && (t.cubic =
|
|
118401
|
+
return e.lock !== void 0 && (t.lock = e.lock), e.groupId !== void 0 && (t.groupId = e.groupId), e.link !== void 0 && (t.link = $(e.link)), e.name !== void 0 && (t.name = e.name), e.shadow !== void 0 && (t.shadow = $(e.shadow)), e.broken !== void 0 && (t.broken = l9(e.broken, [0, 0])), e.broken2 !== void 0 && (t.broken2 = l9(e.broken2, [0, 0])), e.broken2Direction !== void 0 && (t.broken2Direction = e.broken2Direction), e.curve !== void 0 && (t.curve = l9(e.curve, [0, 0])), e.cubic !== void 0 && (t.cubic = Tet(e.cubic)), X7(t), t;
|
|
118380
118402
|
}
|
|
118381
|
-
function
|
|
118403
|
+
function Oet(e, t) {
|
|
118382
118404
|
Y7(t, "patch"), J7(t, "patch");
|
|
118383
118405
|
let n = $(e);
|
|
118384
118406
|
for (let e of Object.keys(t)) {
|
|
118385
118407
|
if (e === "id" || e === "type") continue;
|
|
118386
118408
|
let r = t[e];
|
|
118387
118409
|
if (r === void 0) {
|
|
118388
|
-
|
|
118410
|
+
wet.has(e) && delete n[e];
|
|
118389
118411
|
continue;
|
|
118390
118412
|
}
|
|
118391
118413
|
Object.assign(n, { [e]: $(r) });
|
|
118392
118414
|
}
|
|
118393
|
-
return
|
|
118415
|
+
return Det(n);
|
|
118394
118416
|
}
|
|
118395
|
-
var
|
|
118417
|
+
var ket = [
|
|
118396
118418
|
"in",
|
|
118397
118419
|
"out",
|
|
118398
118420
|
"attention"
|
|
118399
|
-
],
|
|
118421
|
+
], Aet = [
|
|
118400
118422
|
"click",
|
|
118401
118423
|
"meantime",
|
|
118402
118424
|
"auto"
|
|
118403
118425
|
];
|
|
118404
|
-
function
|
|
118405
|
-
if (e.id !== void 0 && W7(e.id, "animation.id"), W7(e.elId, "animation.elId"), U7(e.effect, "animation.effect"), !
|
|
118426
|
+
function jet(e) {
|
|
118427
|
+
if (e.id !== void 0 && W7(e.id, "animation.id"), W7(e.elId, "animation.elId"), U7(e.effect, "animation.effect"), !ket.includes(e.type)) throw Error(`Invalid animation type: ${String(e.type)}`);
|
|
118406
118428
|
let t = e.trigger ?? "click";
|
|
118407
|
-
if (!
|
|
118429
|
+
if (!Aet.includes(t)) throw Error(`Invalid animation trigger: ${String(t)}`);
|
|
118408
118430
|
return {
|
|
118409
118431
|
id: e.id || $7("anim"),
|
|
118410
118432
|
elId: e.elId,
|
|
@@ -118414,21 +118436,21 @@ function Aet(e) {
|
|
|
118414
118436
|
trigger: t
|
|
118415
118437
|
};
|
|
118416
118438
|
}
|
|
118417
|
-
function
|
|
118439
|
+
function Met(e) {
|
|
118418
118440
|
return e.id !== void 0 && W7(e.id, "note.id"), U7(e.content, "note.content"), U7(e.user, "note.user"), {
|
|
118419
118441
|
id: e.id || $7("note"),
|
|
118420
118442
|
content: e.content,
|
|
118421
118443
|
user: e.user,
|
|
118422
118444
|
time: e.time ?? Date.now(),
|
|
118423
118445
|
...e.elId ? { elId: e.elId } : {},
|
|
118424
|
-
...e.replies ? { replies: e.replies.map((e) =>
|
|
118446
|
+
...e.replies ? { replies: e.replies.map((e) => Pet(e)) } : {}
|
|
118425
118447
|
};
|
|
118426
118448
|
}
|
|
118427
|
-
function
|
|
118449
|
+
function Net(e) {
|
|
118428
118450
|
let t = $(e);
|
|
118429
|
-
return e.replies && (t.replies = e.replies.map((e) =>
|
|
118451
|
+
return e.replies && (t.replies = e.replies.map((e) => Pet(e))), t;
|
|
118430
118452
|
}
|
|
118431
|
-
function
|
|
118453
|
+
function Pet(e) {
|
|
118432
118454
|
return e.id !== void 0 && W7(e.id, "reply.id"), U7(e.content, "reply.content"), U7(e.user, "reply.user"), {
|
|
118433
118455
|
id: e.id || $7("reply"),
|
|
118434
118456
|
content: e.content,
|
|
@@ -118436,7 +118458,7 @@ function Net(e) {
|
|
|
118436
118458
|
time: e.time ?? Date.now()
|
|
118437
118459
|
};
|
|
118438
118460
|
}
|
|
118439
|
-
function
|
|
118461
|
+
function Fet(e = "", t) {
|
|
118440
118462
|
return U7(e, "cell.text", !0), t && J7(t, "cell.style"), {
|
|
118441
118463
|
id: $7("cell"),
|
|
118442
118464
|
colspan: 1,
|
|
@@ -118445,7 +118467,7 @@ function Pet(e = "", t) {
|
|
|
118445
118467
|
...t ? { style: $(t) } : {}
|
|
118446
118468
|
};
|
|
118447
118469
|
}
|
|
118448
|
-
function
|
|
118470
|
+
function Iet(e, t) {
|
|
118449
118471
|
return e?.id !== void 0 && W7(e.id, "cell.id"), e?.colspan !== void 0 && K7(e.colspan, "cell.colspan"), e?.rowspan !== void 0 && K7(e.rowspan, "cell.rowspan"), e?.style ? J7(e.style, "cell.style") : t && J7(t, "cell.defaultStyle"), {
|
|
118450
118472
|
id: e?.id || $7("cell"),
|
|
118451
118473
|
colspan: e?.colspan ?? 1,
|
|
@@ -118454,7 +118476,7 @@ function Fet(e, t) {
|
|
|
118454
118476
|
...e?.style ? { style: $(e.style) } : t ? { style: $(t) } : {}
|
|
118455
118477
|
};
|
|
118456
118478
|
}
|
|
118457
|
-
function
|
|
118479
|
+
function Let(e, t) {
|
|
118458
118480
|
K7(t, "colCount"), e?.forEach((e, t) => K7(e, `colWidths[${t}]`));
|
|
118459
118481
|
let n = Math.max(1, Math.trunc(t));
|
|
118460
118482
|
if (!e?.length) return Array(n).fill(1 / n);
|
|
@@ -118463,13 +118485,13 @@ function Iet(e, t) {
|
|
|
118463
118485
|
let i = r.reduce((e, t) => e + t, 0);
|
|
118464
118486
|
return i <= 0 ? Array(n).fill(1 / n) : r.map((e) => e / i);
|
|
118465
118487
|
}
|
|
118466
|
-
function
|
|
118488
|
+
function Ret(e, t, n, r) {
|
|
118467
118489
|
let i = Math.max(1, Math.trunc(t)), a = Math.max(1, Math.trunc(n));
|
|
118468
|
-
return Array.from({ length: i }, (t, n) => Array.from({ length: a }, (t, i) =>
|
|
118490
|
+
return Array.from({ length: i }, (t, n) => Array.from({ length: a }, (t, i) => Iet(e?.[n]?.[i], r)));
|
|
118469
118491
|
}
|
|
118470
|
-
function
|
|
118492
|
+
function zet(e = {}, t) {
|
|
118471
118493
|
e.id !== void 0 && W7(e.id, "element.id"), Y7(e, "element"), J7(e, "element"), e.cellMinHeight !== void 0 && K7(e.cellMinHeight, "element.cellMinHeight");
|
|
118472
|
-
let n = e.colWidths?.length || 0, r = Math.max(...e.data?.map((e) => e.length) || [0]), i = Math.max(e.data?.length ||
|
|
118494
|
+
let n = e.colWidths?.length || 0, r = Math.max(...e.data?.map((e) => e.length) || [0]), i = Math.max(e.data?.length || P9e, 1), a = Math.max(n, r, F9e, 1), o = e.cellMinHeight ?? L9e, s = e.width ?? a * I9e, c = {
|
|
118473
118495
|
fontname: t?.fontName ?? "",
|
|
118474
118496
|
color: t?.fontColor ?? "#333"
|
|
118475
118497
|
}, l = $({
|
|
@@ -118485,41 +118507,41 @@ function Ret(e = {}, t) {
|
|
|
118485
118507
|
name: e.name,
|
|
118486
118508
|
link: e.link ? $(e.link) : void 0,
|
|
118487
118509
|
outline: {
|
|
118488
|
-
...
|
|
118510
|
+
...R9e,
|
|
118489
118511
|
...e.outline || {}
|
|
118490
118512
|
},
|
|
118491
118513
|
theme: {
|
|
118492
|
-
...
|
|
118493
|
-
color: t?.themeColors[0] ??
|
|
118514
|
+
...z9e,
|
|
118515
|
+
color: t?.themeColors[0] ?? z9e.color,
|
|
118494
118516
|
...e.theme || {}
|
|
118495
118517
|
},
|
|
118496
|
-
colWidths:
|
|
118518
|
+
colWidths: Let(e.colWidths, a),
|
|
118497
118519
|
cellMinHeight: o,
|
|
118498
|
-
data:
|
|
118520
|
+
data: Ret(e.data, i, a, c)
|
|
118499
118521
|
});
|
|
118500
118522
|
return X7(l), l;
|
|
118501
118523
|
}
|
|
118502
|
-
function
|
|
118524
|
+
function Bet(e, t) {
|
|
118503
118525
|
let n = $(t);
|
|
118504
118526
|
t.outline && (n.outline = {
|
|
118505
118527
|
...e.outline,
|
|
118506
118528
|
...t.outline
|
|
118507
118529
|
}), t.theme && (n.theme = {
|
|
118508
|
-
...e.theme ||
|
|
118530
|
+
...e.theme || z9e,
|
|
118509
118531
|
...t.theme
|
|
118510
118532
|
});
|
|
118511
118533
|
let r = t.data;
|
|
118512
118534
|
if (r) {
|
|
118513
118535
|
let t = Math.max(r.length, 1), i = Math.max(...r.map((e) => e.length), n.colWidths?.length || e.colWidths.length, 1);
|
|
118514
|
-
n.data =
|
|
118536
|
+
n.data = Ret(r, t, i), !n.colWidths && i !== e.colWidths.length && (n.colWidths = Let(e.colWidths, i));
|
|
118515
118537
|
}
|
|
118516
118538
|
if (t.colWidths) {
|
|
118517
118539
|
let r = Math.max(t.colWidths.length, n.data?.[0]?.length || e.data[0]?.length || 1);
|
|
118518
|
-
n.colWidths =
|
|
118540
|
+
n.colWidths = Let(t.colWidths, r);
|
|
118519
118541
|
}
|
|
118520
118542
|
return n;
|
|
118521
118543
|
}
|
|
118522
|
-
function
|
|
118544
|
+
function Vet(e, t) {
|
|
118523
118545
|
return J7(t, "theme"), t.shadow?.blur !== void 0 && K7(t.shadow.blur, "theme.shadow.blur"), $({
|
|
118524
118546
|
...e,
|
|
118525
118547
|
...t,
|
|
@@ -118535,30 +118557,30 @@ function Bet(e, t) {
|
|
|
118535
118557
|
}
|
|
118536
118558
|
//#endregion
|
|
118537
118559
|
//#region src/embed/agentic/templates.ts
|
|
118538
|
-
var
|
|
118560
|
+
var Het = [
|
|
118539
118561
|
"cover",
|
|
118540
118562
|
"contents",
|
|
118541
118563
|
"transition",
|
|
118542
118564
|
"content",
|
|
118543
118565
|
"end"
|
|
118544
|
-
],
|
|
118545
|
-
function Uet(e) {
|
|
118546
|
-
return e.replace(/<br\s*\/?>/gi, " ").replace(/<[^>]+>/g, " ").replace(/ /g, " ").replace(/\s+/g, " ").trim();
|
|
118547
|
-
}
|
|
118566
|
+
], Uet = /* @__PURE__ */ new Map();
|
|
118548
118567
|
function Wet(e) {
|
|
118549
|
-
|
|
118550
|
-
if (e.type === "shape" && e.text?.content) return Uet(e.text.content) || void 0;
|
|
118568
|
+
return e.replace(/<br\s*\/?>/gi, " ").replace(/<[^>]+>/g, " ").replace(/ /g, " ").replace(/\s+/g, " ").trim();
|
|
118551
118569
|
}
|
|
118552
118570
|
function Get(e) {
|
|
118553
|
-
|
|
118571
|
+
if (e.type === "text") return Wet(e.content) || void 0;
|
|
118572
|
+
if (e.type === "shape" && e.text?.content) return Wet(e.text.content) || void 0;
|
|
118573
|
+
}
|
|
118574
|
+
function Ket(e) {
|
|
118575
|
+
let t = e.elements.map(Get).filter((e) => !!e).slice(0, 3);
|
|
118554
118576
|
if (t.length) return t.join(" · ");
|
|
118555
118577
|
let n = e.type ?? "content", r = e.elements.some((e) => e.type === "image"), i = e.elements.some((e) => e.type === "chart"), a = [`${n} layout`, `${e.elements.length} elements`];
|
|
118556
118578
|
return r && a.push("includes image"), i && a.push("includes chart"), a.join(", ");
|
|
118557
118579
|
}
|
|
118558
|
-
function
|
|
118580
|
+
function qet(e, t) {
|
|
118559
118581
|
return `${e}_${t}`;
|
|
118560
118582
|
}
|
|
118561
|
-
function
|
|
118583
|
+
function Jet() {
|
|
118562
118584
|
return is().map((e) => ({
|
|
118563
118585
|
id: e.id,
|
|
118564
118586
|
name: e.name,
|
|
@@ -118566,17 +118588,17 @@ function qet() {
|
|
|
118566
118588
|
...e.origin ? { origin: e.origin } : {}
|
|
118567
118589
|
}));
|
|
118568
118590
|
}
|
|
118569
|
-
async function
|
|
118570
|
-
let t =
|
|
118591
|
+
async function Yet(e) {
|
|
118592
|
+
let t = Uet.get(e);
|
|
118571
118593
|
if (t) return t;
|
|
118572
118594
|
let n = pVe(e).then(async (t) => {
|
|
118573
118595
|
if (!t) throw Error(`Unknown template "${e}". Call templates.catalog for valid ids.`);
|
|
118574
118596
|
return bVe(t, $o());
|
|
118575
118597
|
});
|
|
118576
|
-
return
|
|
118598
|
+
return Uet.set(e, n), n;
|
|
118577
118599
|
}
|
|
118578
|
-
async function
|
|
118579
|
-
let t = await
|
|
118600
|
+
async function Xet(e) {
|
|
118601
|
+
let t = await Yet(e), n = Jet().find((t) => t.id === e)?.name ?? e, r = {
|
|
118580
118602
|
cover: 0,
|
|
118581
118603
|
contents: 0,
|
|
118582
118604
|
transition: 0,
|
|
@@ -118590,13 +118612,13 @@ async function Yet(e) {
|
|
|
118590
118612
|
end: []
|
|
118591
118613
|
};
|
|
118592
118614
|
for (let e of t.slides) {
|
|
118593
|
-
let t = e.type &&
|
|
118615
|
+
let t = e.type && Het.includes(e.type) ? e.type : "content";
|
|
118594
118616
|
r[t] += 1;
|
|
118595
|
-
let n =
|
|
118617
|
+
let n = qet(t, r[t]);
|
|
118596
118618
|
i[t].push({
|
|
118597
118619
|
slug: n,
|
|
118598
118620
|
type: t,
|
|
118599
|
-
description:
|
|
118621
|
+
description: Ket(e),
|
|
118600
118622
|
elementCount: e.elements.length
|
|
118601
118623
|
});
|
|
118602
118624
|
}
|
|
@@ -118607,7 +118629,7 @@ async function Yet(e) {
|
|
|
118607
118629
|
byType: i
|
|
118608
118630
|
};
|
|
118609
118631
|
}
|
|
118610
|
-
function
|
|
118632
|
+
function Zet(e, t) {
|
|
118611
118633
|
let n = {
|
|
118612
118634
|
cover: 0,
|
|
118613
118635
|
contents: 0,
|
|
@@ -118616,47 +118638,47 @@ function Xet(e, t) {
|
|
|
118616
118638
|
end: 0
|
|
118617
118639
|
};
|
|
118618
118640
|
for (let r of e.slides) {
|
|
118619
|
-
let e = r.type &&
|
|
118620
|
-
if (n[e] += 1,
|
|
118641
|
+
let e = r.type && Het.includes(r.type) ? r.type : "content";
|
|
118642
|
+
if (n[e] += 1, qet(e, n[e]) === t) return {
|
|
118621
118643
|
slide: structuredClone(r),
|
|
118622
118644
|
type: e
|
|
118623
118645
|
};
|
|
118624
118646
|
}
|
|
118625
118647
|
throw Error(`Slide slug "${t}" not found in template. Call templates.slidesCatalog for valid slugs.`);
|
|
118626
118648
|
}
|
|
118627
|
-
function
|
|
118649
|
+
function Qet(e) {
|
|
118628
118650
|
if (!dVe(e)) throw Error(`Unknown template "${e}". Use a built-in id from templates.catalog (template_1 … template_8).`);
|
|
118629
118651
|
}
|
|
118630
|
-
function
|
|
118652
|
+
function $et(e) {
|
|
118631
118653
|
return e.theme ? structuredClone(e.theme) : void 0;
|
|
118632
118654
|
}
|
|
118633
118655
|
//#endregion
|
|
118634
118656
|
//#region src/embed/agentic/layouts.ts
|
|
118635
118657
|
var u9 = Math.round;
|
|
118636
|
-
function $et(e) {
|
|
118637
|
-
return typeof e == "string" ? w1(e) : Array.isArray(e) ? e.some($et) : e && typeof e == "object" ? Object.values(e).some($et) : !1;
|
|
118638
|
-
}
|
|
118639
118658
|
function ett(e) {
|
|
118640
|
-
return Object.values(e).some(
|
|
118659
|
+
return typeof e == "string" ? w1(e) : Array.isArray(e) ? e.some(ett) : e && typeof e == "object" ? Object.values(e).some(ett) : !1;
|
|
118660
|
+
}
|
|
118661
|
+
function ttt(e) {
|
|
118662
|
+
return Object.values(e).some(ett);
|
|
118641
118663
|
}
|
|
118642
|
-
function
|
|
118664
|
+
function ntt(e, t) {
|
|
118643
118665
|
let n = t.bold ? `<strong>${ITe(e)}</strong>` : ITe(e);
|
|
118644
118666
|
return `<span style="font-size:${u9(t.size)}px;color:${t.color};font-family:${t.font}">${n}</span>`;
|
|
118645
118667
|
}
|
|
118646
|
-
function
|
|
118668
|
+
function rtt(e) {
|
|
118647
118669
|
return MTe(e).map((e) => e.trim()).filter(Boolean);
|
|
118648
118670
|
}
|
|
118649
|
-
function
|
|
118650
|
-
let n =
|
|
118671
|
+
function itt(e, t) {
|
|
118672
|
+
let n = rtt(e);
|
|
118651
118673
|
if (!n.length) return "";
|
|
118652
118674
|
let r = t.align ?? "left";
|
|
118653
|
-
return n.map((e) => `<p style="text-align:${r}">${
|
|
118675
|
+
return n.map((e) => `<p style="text-align:${r}">${ntt(e, t)}</p>`).join("");
|
|
118654
118676
|
}
|
|
118655
|
-
function
|
|
118677
|
+
function att(e, t, n = !1) {
|
|
118656
118678
|
let r = n ? "ol" : "ul";
|
|
118657
|
-
return `<${r}>${e.map((e) => `<li>${
|
|
118679
|
+
return `<${r}>${e.map((e) => `<li>${ntt(e, t)}</li>`).join("")}</${r}>`;
|
|
118658
118680
|
}
|
|
118659
|
-
function
|
|
118681
|
+
function ott(e) {
|
|
118660
118682
|
return Array.isArray(e) ? e.map((e) => String(e).trim()).filter(Boolean) : e == null ? [] : MTe(String(e)).map((e) => e.replace(/^\s*(?:[-*•]\s+|\d+[.)]\s+)/, "").trim()).filter(Boolean);
|
|
118661
118683
|
}
|
|
118662
118684
|
function d9(e, t, n) {
|
|
@@ -118668,8 +118690,8 @@ function f9(e, t) {
|
|
|
118668
118690
|
let n = e[t];
|
|
118669
118691
|
return n == null || String(n).trim() === "" ? void 0 : String(n);
|
|
118670
118692
|
}
|
|
118671
|
-
var
|
|
118672
|
-
function
|
|
118693
|
+
var stt = 10, ctt = 28, ltt = 6, utt = 4;
|
|
118694
|
+
function dtt(e, t, n, r) {
|
|
118673
118695
|
return lP(e.map((e) => ({
|
|
118674
118696
|
text: e,
|
|
118675
118697
|
size: t,
|
|
@@ -118682,11 +118704,11 @@ function utt(e, t, n, r) {
|
|
|
118682
118704
|
blockSpace: r.blockSpace
|
|
118683
118705
|
});
|
|
118684
118706
|
}
|
|
118685
|
-
function
|
|
118686
|
-
let t = Math.max(1, u9(e.maxSize)), n = Math.max(1, Math.min(t, u9(e.minSize ?? Math.min(t, 12)))), r = e.blocks.map((e) => e.trim()).filter(Boolean), i = e.width -
|
|
118707
|
+
function ftt(e) {
|
|
118708
|
+
let t = Math.max(1, u9(e.maxSize)), n = Math.max(1, Math.min(t, u9(e.minSize ?? Math.min(t, 12)))), r = e.blocks.map((e) => e.trim()).filter(Boolean), i = e.width - stt * 2 - (e.bulletIndent ?? 0), a = e.height - stt * 2;
|
|
118687
118709
|
if (!r.length || i <= 2 || a <= 2) return t;
|
|
118688
118710
|
try {
|
|
118689
|
-
let o = (t) =>
|
|
118711
|
+
let o = (t) => dtt(r, t, i, e) <= a;
|
|
118690
118712
|
if (o(t)) return t;
|
|
118691
118713
|
let s = n, c = t - 1, l = n;
|
|
118692
118714
|
for (; s <= c;) {
|
|
@@ -118699,7 +118721,7 @@ function dtt(e) {
|
|
|
118699
118721
|
}
|
|
118700
118722
|
}
|
|
118701
118723
|
function p9(e, t, n) {
|
|
118702
|
-
return Math.ceil(e * n) * t +
|
|
118724
|
+
return Math.ceil(e * n) * t + stt * 2;
|
|
118703
118725
|
}
|
|
118704
118726
|
function m9(e) {
|
|
118705
118727
|
let t = e.preset.palette;
|
|
@@ -118721,7 +118743,7 @@ function m9(e) {
|
|
|
118721
118743
|
onAccent: t.onAccent
|
|
118722
118744
|
};
|
|
118723
118745
|
}
|
|
118724
|
-
function
|
|
118746
|
+
function ptt(e) {
|
|
118725
118747
|
return {
|
|
118726
118748
|
type: "text",
|
|
118727
118749
|
left: u9(e.left),
|
|
@@ -118738,8 +118760,8 @@ function ftt(e) {
|
|
|
118738
118760
|
};
|
|
118739
118761
|
}
|
|
118740
118762
|
function h9(e, t, n) {
|
|
118741
|
-
let r =
|
|
118742
|
-
blocks:
|
|
118763
|
+
let r = ftt({
|
|
118764
|
+
blocks: rtt(t),
|
|
118743
118765
|
width: e.width,
|
|
118744
118766
|
height: e.height,
|
|
118745
118767
|
fontFamily: n.font,
|
|
@@ -118748,11 +118770,11 @@ function h9(e, t, n) {
|
|
|
118748
118770
|
lineHeight: n.lineHeight,
|
|
118749
118771
|
maxSize: n.maxSize,
|
|
118750
118772
|
minSize: n.minSize,
|
|
118751
|
-
blockSpace:
|
|
118773
|
+
blockSpace: ltt
|
|
118752
118774
|
});
|
|
118753
|
-
return
|
|
118775
|
+
return ptt({
|
|
118754
118776
|
...e,
|
|
118755
|
-
content:
|
|
118777
|
+
content: itt(t, {
|
|
118756
118778
|
size: r,
|
|
118757
118779
|
color: n.color,
|
|
118758
118780
|
font: n.font,
|
|
@@ -118765,8 +118787,8 @@ function h9(e, t, n) {
|
|
|
118765
118787
|
vAlign: n.vAlign
|
|
118766
118788
|
});
|
|
118767
118789
|
}
|
|
118768
|
-
function
|
|
118769
|
-
let r =
|
|
118790
|
+
function mtt(e, t, n) {
|
|
118791
|
+
let r = ftt({
|
|
118770
118792
|
blocks: t,
|
|
118771
118793
|
width: e.width,
|
|
118772
118794
|
height: e.height,
|
|
@@ -118774,12 +118796,12 @@ function ptt(e, t, n) {
|
|
|
118774
118796
|
lineHeight: n.lineHeight,
|
|
118775
118797
|
maxSize: n.maxSize,
|
|
118776
118798
|
minSize: n.minSize,
|
|
118777
|
-
bulletIndent:
|
|
118778
|
-
blockSpace:
|
|
118799
|
+
bulletIndent: ctt,
|
|
118800
|
+
blockSpace: utt
|
|
118779
118801
|
});
|
|
118780
|
-
return
|
|
118802
|
+
return ptt({
|
|
118781
118803
|
...e,
|
|
118782
|
-
content:
|
|
118804
|
+
content: att(t, {
|
|
118783
118805
|
size: r,
|
|
118784
118806
|
color: n.color,
|
|
118785
118807
|
font: n.font
|
|
@@ -118790,7 +118812,7 @@ function ptt(e, t, n) {
|
|
|
118790
118812
|
vAlign: n.vAlign
|
|
118791
118813
|
});
|
|
118792
118814
|
}
|
|
118793
|
-
var
|
|
118815
|
+
var htt = [200, 200], gtt = "M 0 0 L 200 0 L 200 200 L 0 200 Z";
|
|
118794
118816
|
function g9(e) {
|
|
118795
118817
|
return {
|
|
118796
118818
|
type: "shape",
|
|
@@ -118799,13 +118821,13 @@ function g9(e) {
|
|
|
118799
118821
|
width: u9(e.width),
|
|
118800
118822
|
height: u9(e.height),
|
|
118801
118823
|
rotate: 0,
|
|
118802
|
-
viewBox:
|
|
118803
|
-
path:
|
|
118824
|
+
viewBox: htt,
|
|
118825
|
+
path: gtt,
|
|
118804
118826
|
fixedRatio: !1,
|
|
118805
118827
|
fill: e.fill
|
|
118806
118828
|
};
|
|
118807
118829
|
}
|
|
118808
|
-
function
|
|
118830
|
+
function _tt(e) {
|
|
118809
118831
|
return {
|
|
118810
118832
|
type: "image",
|
|
118811
118833
|
left: u9(e.left),
|
|
@@ -118817,7 +118839,7 @@ function gtt(e) {
|
|
|
118817
118839
|
fixedRatio: !1
|
|
118818
118840
|
};
|
|
118819
118841
|
}
|
|
118820
|
-
function
|
|
118842
|
+
function vtt(e) {
|
|
118821
118843
|
let t = Math.max(11, u9(e.size * .44));
|
|
118822
118844
|
return {
|
|
118823
118845
|
...g9({
|
|
@@ -118933,11 +118955,11 @@ function v9(e, t, n, r) {
|
|
|
118933
118955
|
}
|
|
118934
118956
|
return s;
|
|
118935
118957
|
}
|
|
118936
|
-
function
|
|
118937
|
-
let { elements: n, contentTop: r } = _9(e, t, "bullets"), i = m9(e), a = e.preset.scale, o =
|
|
118958
|
+
function ytt(e, t) {
|
|
118959
|
+
let { elements: n, contentTop: r } = _9(e, t, "bullets"), i = m9(e), a = e.preset.scale, o = ott(t.bullets);
|
|
118938
118960
|
if (!o.length) throw Error("Layout \"bullets\" requires a non-empty \"bullets\" slot (array or newline-separated string).");
|
|
118939
118961
|
let s = t.ordered === !0;
|
|
118940
|
-
return n.push(
|
|
118962
|
+
return n.push(mtt({
|
|
118941
118963
|
left: e.m,
|
|
118942
118964
|
top: r,
|
|
118943
118965
|
width: e.cw,
|
|
@@ -118951,7 +118973,7 @@ function vtt(e, t) {
|
|
|
118951
118973
|
ordered: s
|
|
118952
118974
|
})), n;
|
|
118953
118975
|
}
|
|
118954
|
-
function
|
|
118976
|
+
function btt(e, t, n, r, i, a, o) {
|
|
118955
118977
|
let s = m9(e), c = e.preset.scale, l = e.preset.fonts, u = [], d = i, f = f9(t, `${n}Heading`);
|
|
118956
118978
|
if (f) {
|
|
118957
118979
|
let e = p9(c.sectionHeader, 2, 1.2);
|
|
@@ -118969,8 +118991,8 @@ function ytt(e, t, n, r, i, a, o) {
|
|
|
118969
118991
|
minSize: 18
|
|
118970
118992
|
})), d += e;
|
|
118971
118993
|
}
|
|
118972
|
-
let p =
|
|
118973
|
-
return p.length ? u.push(
|
|
118994
|
+
let p = ott(t[`${n}Bullets`]), m = f9(t, `${n}Body`), h = i + o - d;
|
|
118995
|
+
return p.length ? u.push(mtt({
|
|
118974
118996
|
left: r,
|
|
118975
118997
|
top: d,
|
|
118976
118998
|
width: a,
|
|
@@ -118994,14 +119016,14 @@ function ytt(e, t, n, r, i, a, o) {
|
|
|
118994
119016
|
minSize: 13
|
|
118995
119017
|
})), u;
|
|
118996
119018
|
}
|
|
118997
|
-
function
|
|
119019
|
+
function xtt(e, t) {
|
|
118998
119020
|
let { elements: n, contentTop: r } = _9(e, t, "twoColumn"), i = u9(e.W * .04), a = u9((e.cw - i) / 2), o = e.H - e.m - r;
|
|
118999
|
-
return n.push(...
|
|
119021
|
+
return n.push(...btt(e, t, "left", e.m, r, a, o)), n.push(...btt(e, t, "right", e.m + a + i, r, a, o)), n;
|
|
119000
119022
|
}
|
|
119001
|
-
function
|
|
119023
|
+
function Stt(e, t, n) {
|
|
119002
119024
|
let { elements: r, contentTop: i } = _9(e, t, "imageText"), a = m9(e), o = e.preset.scale, s = e.preset.fonts, c = u9(e.W * .04), l = e.H - e.m - i, u = f9(t, "image") ?? f9(t, "imageSrc") ?? f9(t, "src"), d = f9(t, "imageSide") === "left" ? "left" : "right", f = (e, n, c) => {
|
|
119003
|
-
let l =
|
|
119004
|
-
l.length ? r.push(
|
|
119025
|
+
let l = ott(t.bullets), u = f9(t, "body");
|
|
119026
|
+
l.length ? r.push(mtt({
|
|
119005
119027
|
left: e,
|
|
119006
119028
|
top: i,
|
|
119007
119029
|
width: n,
|
|
@@ -119027,7 +119049,7 @@ function xtt(e, t, n) {
|
|
|
119027
119049
|
};
|
|
119028
119050
|
if (!u) return n.push("Layout \"imageText\" has no \"image\" src — rendering text full width. Add an image url to use the split layout."), f(e.m, e.cw, l), r;
|
|
119029
119051
|
let p = u9(e.cw * .44), m = e.cw - p - c, h = f9(t, "caption"), g = h ? u9(o.caption * 2) : 0, _ = l - g - (h ? 8 : 0), v = d === "left" ? e.m : e.m + m + c, y = d === "left" ? e.m + p + c : e.m;
|
|
119030
|
-
return r.push(
|
|
119052
|
+
return r.push(_tt({
|
|
119031
119053
|
left: v,
|
|
119032
119054
|
top: i,
|
|
119033
119055
|
width: p,
|
|
@@ -119046,7 +119068,7 @@ function xtt(e, t, n) {
|
|
|
119046
119068
|
minSize: 10
|
|
119047
119069
|
})), f(y, m, l), r;
|
|
119048
119070
|
}
|
|
119049
|
-
function
|
|
119071
|
+
function Ctt(e) {
|
|
119050
119072
|
if (Array.isArray(e.stats)) return e.stats.map((e) => {
|
|
119051
119073
|
let t = e ?? {}, n = t.value ?? t.stat ?? t.number;
|
|
119052
119074
|
return {
|
|
@@ -119060,8 +119082,8 @@ function Stt(e) {
|
|
|
119060
119082
|
label: f9(e, "statLabel") ?? f9(e, "label")
|
|
119061
119083
|
}] : [];
|
|
119062
119084
|
}
|
|
119063
|
-
function
|
|
119064
|
-
let n =
|
|
119085
|
+
function wtt(e, t) {
|
|
119086
|
+
let n = Ctt(t);
|
|
119065
119087
|
if (!n.length) throw Error("Layout \"bigStat\" requires a \"stat\" string or a \"stats\" array of { value, label }.");
|
|
119066
119088
|
let r = m9(e), i = e.preset.scale, a = e.preset.fonts, o = [], s = e.m, c = f9(t, "title");
|
|
119067
119089
|
if (c) {
|
|
@@ -119113,7 +119135,7 @@ function Ctt(e, t) {
|
|
|
119113
119135
|
minSize: 10
|
|
119114
119136
|
})), o;
|
|
119115
119137
|
}
|
|
119116
|
-
function
|
|
119138
|
+
function Ttt(e, t) {
|
|
119117
119139
|
let n = d9(t, "quote", "quote"), r = m9(e), i = e.preset.scale, a = e.preset.fonts, o = [], s = u9(i.sectionHeader * 1.15), c = u9(e.cw * .82), l = e.m + u9((e.cw - c) / 2), u = u9(e.H * .26), d = u9(i.sectionHeader * 4.5);
|
|
119118
119140
|
o.push(g9({
|
|
119119
119141
|
left: l,
|
|
@@ -119147,7 +119169,7 @@ function wtt(e, t) {
|
|
|
119147
119169
|
minSize: 13
|
|
119148
119170
|
})), o;
|
|
119149
119171
|
}
|
|
119150
|
-
var
|
|
119172
|
+
var Ett = {
|
|
119151
119173
|
bar: "bar",
|
|
119152
119174
|
column: "column",
|
|
119153
119175
|
line: "line",
|
|
@@ -119158,14 +119180,14 @@ var Ttt = {
|
|
|
119158
119180
|
radar: "radar",
|
|
119159
119181
|
scatter: "scatter"
|
|
119160
119182
|
};
|
|
119161
|
-
function
|
|
119183
|
+
function Dtt(e, t) {
|
|
119162
119184
|
let { elements: n, contentTop: r } = _9(e, t, "chart"), i = m9(e), a = e.preset.scale, o = e.preset.fonts, s = Array.isArray(t.labels) ? t.labels.map(String) : [];
|
|
119163
119185
|
if (!s.length) throw Error("Layout \"chart\" requires a non-empty \"labels\" array.");
|
|
119164
119186
|
let c = t.series, l;
|
|
119165
119187
|
if (Array.isArray(c) && c.length && Array.isArray(c[0])) l = c.map((e) => e.map((e) => Number(e) || 0));
|
|
119166
119188
|
else if (Array.isArray(c)) l = [c.map((e) => Number(e) || 0)];
|
|
119167
119189
|
else throw Error("Layout \"chart\" requires a \"series\" array of numbers (or array of number arrays for multi-series).");
|
|
119168
|
-
let u = Array.isArray(t.legends) && t.legends.length ? t.legends.map(String) : l.map((e, t) => `Series ${t + 1}`), d =
|
|
119190
|
+
let u = Array.isArray(t.legends) && t.legends.length ? t.legends.map(String) : l.map((e, t) => `Series ${t + 1}`), d = Ett[String(t.chartType ?? "column").toLowerCase()] ?? "column", f = f9(t, "caption"), p = f ? u9(a.caption * 2.2) : 0, m = e.H - e.m - r - p - (f ? 8 : 0), h = {
|
|
119169
119191
|
labels: s,
|
|
119170
119192
|
legends: u,
|
|
119171
119193
|
series: l
|
|
@@ -119194,7 +119216,7 @@ function Ett(e, t) {
|
|
|
119194
119216
|
minSize: 10
|
|
119195
119217
|
})), n;
|
|
119196
119218
|
}
|
|
119197
|
-
function
|
|
119219
|
+
function Ott(e, t) {
|
|
119198
119220
|
let { elements: n, contentTop: r } = _9(e, t, "comparison"), i = m9(e), a = e.preset.scale, o = e.preset.fonts, s = Array.isArray(t.headers) ? t.headers.map(String) : [], c = Array.isArray(t.rows) ? t.rows.map((e) => Array.isArray(e) ? e.map(String) : [String(e)]) : [];
|
|
119199
119221
|
if (!c.length) throw Error("Layout \"comparison\" requires a non-empty \"rows\" array of row arrays.");
|
|
119200
119222
|
let l = Math.max(s.length, ...c.map((e) => e.length), 1), u = {
|
|
@@ -119231,7 +119253,7 @@ function Dtt(e, t) {
|
|
|
119231
119253
|
colWidths: Array(l).fill(1 / l)
|
|
119232
119254
|
}), n;
|
|
119233
119255
|
}
|
|
119234
|
-
function
|
|
119256
|
+
function ktt(e) {
|
|
119235
119257
|
return Array.isArray(e) ? e.map((e) => {
|
|
119236
119258
|
if (e == null) return null;
|
|
119237
119259
|
if (typeof e == "string") {
|
|
@@ -119245,8 +119267,8 @@ function Ott(e) {
|
|
|
119245
119267
|
};
|
|
119246
119268
|
}).filter((e) => e != null) : [];
|
|
119247
119269
|
}
|
|
119248
|
-
function
|
|
119249
|
-
let { elements: n, contentTop: r } = _9(e, t, "cards"), i =
|
|
119270
|
+
function Att(e, t) {
|
|
119271
|
+
let { elements: n, contentTop: r } = _9(e, t, "cards"), i = ktt(t.cards ?? t.items ?? t.columns);
|
|
119250
119272
|
if (!i.length) throw Error("Layout \"cards\" requires a non-empty \"cards\" array of { heading, body } (or strings).");
|
|
119251
119273
|
let a = m9(e), o = e.preset.scale, s = e.preset.fonts, c = e.preset.palette, l = Math.min(i.length, 6), u = i.slice(0, l), d = l <= 3 ? l : Math.ceil(l / 2), f = Math.ceil(l / d), p = u9(e.W * .025), m = e.H - e.m - r, h = u9((e.cw - p * (d - 1)) / d), g = u9((m - p * (f - 1)) / f), _ = Math.max(12, u9(Math.min(h, g) * .1));
|
|
119252
119274
|
return u.forEach((t, i) => {
|
|
@@ -119295,13 +119317,13 @@ function ktt(e, t) {
|
|
|
119295
119317
|
}));
|
|
119296
119318
|
}), n;
|
|
119297
119319
|
}
|
|
119298
|
-
function
|
|
119299
|
-
let { elements: n, contentTop: r } = _9(e, t, "numbered"), i =
|
|
119320
|
+
function jtt(e, t) {
|
|
119321
|
+
let { elements: n, contentTop: r } = _9(e, t, "numbered"), i = ktt(t.steps ?? t.items ?? t.bullets);
|
|
119300
119322
|
if (!i.length) throw Error("Layout \"numbered\" requires a non-empty \"steps\" array of { heading, body } (or strings).");
|
|
119301
119323
|
let a = m9(e), o = e.preset.scale, s = e.preset.fonts, c = Math.min(i.length, 6), l = i.slice(0, c), u = e.H - e.m - r, d = u9(u * .035), f = u9((u - d * (c - 1)) / c), p = Math.min(f, u9(o.title * 1.3)), m = e.m + p + u9(e.W * .022), h = e.m + e.cw - m;
|
|
119302
119324
|
return l.forEach((t, i) => {
|
|
119303
119325
|
let c = r + i * (f + d);
|
|
119304
|
-
n.push(
|
|
119326
|
+
n.push(vtt({
|
|
119305
119327
|
left: e.m,
|
|
119306
119328
|
top: c,
|
|
119307
119329
|
size: p,
|
|
@@ -119341,11 +119363,11 @@ function Att(e, t) {
|
|
|
119341
119363
|
}));
|
|
119342
119364
|
}), n;
|
|
119343
119365
|
}
|
|
119344
|
-
function
|
|
119366
|
+
function Mtt(e, t, n) {
|
|
119345
119367
|
let r = f9(t, "image") ?? f9(t, "imageSrc") ?? f9(t, "src");
|
|
119346
119368
|
if (!r) return n.push("Layout \"imageFull\" has no \"image\" src — falling back to a text-only feature slide. Add an image url for the full-bleed cover."), v9(e, t, "section", u9(e.preset.scale.display * .86));
|
|
119347
119369
|
let i = e.preset.scale, a = e.preset.fonts, o = e.preset.palette, s = [];
|
|
119348
|
-
s.push(
|
|
119370
|
+
s.push(_tt({
|
|
119349
119371
|
left: 0,
|
|
119350
119372
|
top: 0,
|
|
119351
119373
|
width: e.W,
|
|
@@ -119392,21 +119414,21 @@ function jtt(e, t, n) {
|
|
|
119392
119414
|
minSize: 12
|
|
119393
119415
|
})), s;
|
|
119394
119416
|
}
|
|
119395
|
-
var
|
|
119417
|
+
var Ntt = {
|
|
119396
119418
|
title: (e, t) => v9(e, t, "title", e.preset.scale.display),
|
|
119397
119419
|
section: (e, t) => v9(e, t, "section", u9(e.preset.scale.display * .86)),
|
|
119398
119420
|
closing: (e, t) => v9(e, t, "closing", u9(e.preset.scale.display * .9)),
|
|
119399
|
-
bullets:
|
|
119400
|
-
twoColumn:
|
|
119401
|
-
imageText:
|
|
119402
|
-
bigStat:
|
|
119403
|
-
quote:
|
|
119404
|
-
chart:
|
|
119405
|
-
comparison:
|
|
119406
|
-
cards:
|
|
119407
|
-
numbered:
|
|
119408
|
-
imageFull:
|
|
119409
|
-
},
|
|
119421
|
+
bullets: ytt,
|
|
119422
|
+
twoColumn: xtt,
|
|
119423
|
+
imageText: Stt,
|
|
119424
|
+
bigStat: wtt,
|
|
119425
|
+
quote: Ttt,
|
|
119426
|
+
chart: Dtt,
|
|
119427
|
+
comparison: Ott,
|
|
119428
|
+
cards: Att,
|
|
119429
|
+
numbered: jtt,
|
|
119430
|
+
imageFull: Mtt
|
|
119431
|
+
}, Ptt = [
|
|
119410
119432
|
{
|
|
119411
119433
|
id: "title",
|
|
119412
119434
|
label: "Title",
|
|
@@ -119827,18 +119849,18 @@ var Mtt = {
|
|
|
119827
119849
|
}
|
|
119828
119850
|
]
|
|
119829
119851
|
}
|
|
119830
|
-
],
|
|
119831
|
-
function
|
|
119832
|
-
return
|
|
119852
|
+
], Ftt = new Map(Ptt.map((e) => [e.id, e]));
|
|
119853
|
+
function Itt() {
|
|
119854
|
+
return Ptt.map((e) => ({
|
|
119833
119855
|
...e,
|
|
119834
119856
|
slots: e.slots.map((e) => ({ ...e }))
|
|
119835
119857
|
}));
|
|
119836
119858
|
}
|
|
119837
|
-
async function
|
|
119838
|
-
let a =
|
|
119859
|
+
async function Ltt(e, t, n, r, i = "auto") {
|
|
119860
|
+
let a = Ftt.get(e);
|
|
119839
119861
|
if (!a) throw Error(`Unknown layout "${e}". Call layouts.catalog to list available layouts.`);
|
|
119840
|
-
|
|
119841
|
-
let o =
|
|
119862
|
+
ttt(t) && await PTe();
|
|
119863
|
+
let o = Ntt[e], s = r.width, c = r.height, l = u9(s * .06), u = i === "feature" ? !0 : i === "plain" ? !1 : a.feature, d = {
|
|
119842
119864
|
W: s,
|
|
119843
119865
|
H: c,
|
|
119844
119866
|
m: l,
|
|
@@ -119857,7 +119879,7 @@ async function Itt(e, t, n, r, i = "auto") {
|
|
|
119857
119879
|
warnings: f
|
|
119858
119880
|
};
|
|
119859
119881
|
}
|
|
119860
|
-
var
|
|
119882
|
+
var Rtt = [
|
|
119861
119883
|
{
|
|
119862
119884
|
id: "academic",
|
|
119863
119885
|
label: "Academic",
|
|
@@ -120022,15 +120044,15 @@ var Ltt = [
|
|
|
120022
120044
|
"#7FB069"
|
|
120023
120045
|
]
|
|
120024
120046
|
}
|
|
120025
|
-
],
|
|
120026
|
-
function ztt(e) {
|
|
120027
|
-
if (e) return Rtt.get(e);
|
|
120028
|
-
}
|
|
120047
|
+
], ztt = new Map(Rtt.map((e) => [e.id, e]));
|
|
120029
120048
|
function Btt(e) {
|
|
120030
|
-
|
|
120049
|
+
if (e) return ztt.get(e);
|
|
120050
|
+
}
|
|
120051
|
+
function Vtt(e) {
|
|
120052
|
+
return Btt(e) ?? ztt.get("academic");
|
|
120031
120053
|
}
|
|
120032
|
-
function
|
|
120033
|
-
return
|
|
120054
|
+
function Htt() {
|
|
120055
|
+
return Rtt.map((e) => ({
|
|
120034
120056
|
id: e.id,
|
|
120035
120057
|
label: e.label,
|
|
120036
120058
|
description: e.description,
|
|
@@ -120044,7 +120066,7 @@ function Vtt() {
|
|
|
120044
120066
|
}
|
|
120045
120067
|
}));
|
|
120046
120068
|
}
|
|
120047
|
-
function
|
|
120069
|
+
function Utt(e) {
|
|
120048
120070
|
return {
|
|
120049
120071
|
backgroundColor: e.palette.background,
|
|
120050
120072
|
themeColors: [...e.chartColors],
|
|
@@ -120401,20 +120423,20 @@ var y9 = {
|
|
|
120401
120423
|
}
|
|
120402
120424
|
]
|
|
120403
120425
|
};
|
|
120404
|
-
function
|
|
120426
|
+
function Wtt(e) {
|
|
120405
120427
|
return JSON.parse(JSON.stringify(e));
|
|
120406
120428
|
}
|
|
120407
|
-
function
|
|
120429
|
+
function Gtt(e, t) {
|
|
120408
120430
|
let n = y9.commands[t], r = e.has(t);
|
|
120409
120431
|
return !n && !r ? null : {
|
|
120410
120432
|
name: t,
|
|
120411
120433
|
domain: t.includes(".") ? t.split(".")[0] : t,
|
|
120412
120434
|
registered: r,
|
|
120413
120435
|
mutates: e.get(t)?.mutates ?? !1,
|
|
120414
|
-
...n ?
|
|
120436
|
+
...n ? Wtt(n) : {}
|
|
120415
120437
|
};
|
|
120416
120438
|
}
|
|
120417
|
-
function
|
|
120439
|
+
function Ktt(e) {
|
|
120418
120440
|
let t = /* @__PURE__ */ new Map(), n = (e) => {
|
|
120419
120441
|
if (!e.includes(".")) return;
|
|
120420
120442
|
let n = e.split(".")[0];
|
|
@@ -120439,7 +120461,7 @@ function Gtt(e) {
|
|
|
120439
120461
|
}
|
|
120440
120462
|
//#endregion
|
|
120441
120463
|
//#region src/embed/agentic/createAgenticApi.ts
|
|
120442
|
-
var
|
|
120464
|
+
var qtt = new Set([
|
|
120443
120465
|
"text",
|
|
120444
120466
|
"image",
|
|
120445
120467
|
"shape",
|
|
@@ -120449,18 +120471,18 @@ var Ktt = new Set([
|
|
|
120449
120471
|
"latex",
|
|
120450
120472
|
"video",
|
|
120451
120473
|
"audio"
|
|
120452
|
-
]),
|
|
120474
|
+
]), Jtt = [
|
|
120453
120475
|
"text",
|
|
120454
120476
|
"image",
|
|
120455
120477
|
"shape",
|
|
120456
120478
|
"chart",
|
|
120457
120479
|
"table"
|
|
120458
|
-
],
|
|
120480
|
+
], Ytt = [
|
|
120459
120481
|
"text",
|
|
120460
120482
|
"image",
|
|
120461
120483
|
"shape",
|
|
120462
120484
|
"line"
|
|
120463
|
-
],
|
|
120485
|
+
], Xtt = [
|
|
120464
120486
|
"text",
|
|
120465
120487
|
"shape",
|
|
120466
120488
|
"chart"
|
|
@@ -120469,10 +120491,10 @@ var Ktt = new Set([
|
|
|
120469
120491
|
super(t), zT(this, "code", void 0), zT(this, "path", void 0), zT(this, "recoverable", void 0), this.code = e, this.path = n, this.recoverable = r, this.name = e;
|
|
120470
120492
|
}
|
|
120471
120493
|
};
|
|
120472
|
-
function
|
|
120494
|
+
function Ztt(e) {
|
|
120473
120495
|
return e instanceof b9 ? e9(e.code, e.message, e.path, e.recoverable) : e9(e instanceof Error && e.name || "CommandError", e instanceof Error ? e.message : String(e));
|
|
120474
120496
|
}
|
|
120475
|
-
function
|
|
120497
|
+
function Qtt(e) {
|
|
120476
120498
|
return {
|
|
120477
120499
|
slides: ss(e),
|
|
120478
120500
|
main: ls(e),
|
|
@@ -120480,16 +120502,16 @@ function Ztt(e) {
|
|
|
120480
120502
|
screen: Os(e)
|
|
120481
120503
|
};
|
|
120482
120504
|
}
|
|
120483
|
-
function
|
|
120505
|
+
function $tt(e) {
|
|
120484
120506
|
return {
|
|
120485
120507
|
size: e.slides.viewportSize,
|
|
120486
120508
|
ratio: e.slides.viewportRatio
|
|
120487
120509
|
};
|
|
120488
120510
|
}
|
|
120489
120511
|
function x9(e, t) {
|
|
120490
|
-
return t ?
|
|
120512
|
+
return t ? Vet(e, t) : $(e);
|
|
120491
120513
|
}
|
|
120492
|
-
var
|
|
120514
|
+
var ent = 6;
|
|
120493
120515
|
function S9(e, t, n) {
|
|
120494
120516
|
let r = t?.trim(), i = r?.toLowerCase();
|
|
120495
120517
|
!r || i === "#00000000" || i === "transparent" || (e[r] = (e[r] || 0) + Math.max(n, 1));
|
|
@@ -120497,27 +120519,27 @@ function S9(e, t, n) {
|
|
|
120497
120519
|
function C9(e) {
|
|
120498
120520
|
return Object.keys(e).sort((t, n) => e[n] - e[t]);
|
|
120499
120521
|
}
|
|
120500
|
-
function
|
|
120522
|
+
function tnt(e) {
|
|
120501
120523
|
let t = Number.isFinite(e.width) ? e.width : 1, n = "height" in e && Number.isFinite(e.height) ? e.height : 1;
|
|
120502
120524
|
return Math.max(t * n, 1);
|
|
120503
120525
|
}
|
|
120504
|
-
function
|
|
120526
|
+
function nnt(e, t) {
|
|
120505
120527
|
if (!e) return [];
|
|
120506
120528
|
let n = [], r = RegExp(`${t}\\s*:\\s*([^;"']+)`, "gi"), i = r.exec(e);
|
|
120507
120529
|
for (; i;) n.push(i[1].trim().replace(/^['"]|['"]$/g, "")), i = r.exec(e);
|
|
120508
120530
|
return n;
|
|
120509
120531
|
}
|
|
120510
|
-
function
|
|
120532
|
+
function rnt(e, t, n, r, i, a) {
|
|
120511
120533
|
S9(i, t, r), S9(a, n, r);
|
|
120512
|
-
for (let t of
|
|
120513
|
-
for (let t of
|
|
120534
|
+
for (let t of nnt(e, "color")) S9(i, t, r);
|
|
120535
|
+
for (let t of nnt(e, "font-family")) S9(a, t, r);
|
|
120514
120536
|
}
|
|
120515
|
-
function
|
|
120516
|
-
let i =
|
|
120537
|
+
function int(e, t, n, r) {
|
|
120538
|
+
let i = tnt(e);
|
|
120517
120539
|
if (e.type === "shape") {
|
|
120518
120540
|
if (S9(t, e.fill, i), e.gradient) for (let n of e.gradient.colors) S9(t, n.color, i / Math.max(e.gradient.colors.length, 1));
|
|
120519
|
-
|
|
120520
|
-
} else if (e.type === "text") S9(t, e.fill, i),
|
|
120541
|
+
rnt(e.text?.content, e.text?.defaultColor, e.text?.defaultFontName, i, n, r);
|
|
120542
|
+
} else if (e.type === "text") S9(t, e.fill, i), rnt(e.content, e.defaultColor, e.defaultFontName, i, n, r);
|
|
120521
120543
|
else if (e.type === "image") S9(t, e.colorMask, i);
|
|
120522
120544
|
else if (e.type === "table") {
|
|
120523
120545
|
S9(t, e.theme?.color, i);
|
|
@@ -120528,17 +120550,17 @@ function rnt(e, t, n, r) {
|
|
|
120528
120550
|
S9(n, e.textColor, i);
|
|
120529
120551
|
} else e.type === "line" || e.type === "audio" ? S9(t, e.color, i) : e.type === "latex" && S9(n, e.color, i);
|
|
120530
120552
|
}
|
|
120531
|
-
function
|
|
120553
|
+
function ant(e, t = {}) {
|
|
120532
120554
|
let n = t.slideIds?.length ? t.slideIds.map((t) => a9(e.slides.slides, t, e.slides.slideIndex).slide) : e.slides.slides, r = {}, i = {}, a = {}, o = {};
|
|
120533
120555
|
for (let e of n) {
|
|
120534
120556
|
if (e.background?.type === "solid") S9(r, e.background.color, 1);
|
|
120535
120557
|
else if (e.background?.type === "gradient" && e.background.gradient) for (let t of e.background.gradient.colors) S9(r, t.color, 1 / Math.max(e.background.gradient.colors.length, 1));
|
|
120536
|
-
for (let t of e.elements)
|
|
120558
|
+
for (let t of e.elements) int(t, i, a, o);
|
|
120537
120559
|
}
|
|
120538
|
-
let s = Math.max(1, Math.trunc(t.maxThemeColors ||
|
|
120560
|
+
let s = Math.max(1, Math.trunc(t.maxThemeColors || ent)), c = $(e.slides.theme), [l] = C9(r), u = C9(i).slice(0, s), [d] = C9(a), [f] = C9(o);
|
|
120539
120561
|
return l && (c.backgroundColor = l), u.length && (c.themeColors = u), d && (c.fontColor = d), f && (c.fontName = f), $(c);
|
|
120540
120562
|
}
|
|
120541
|
-
function
|
|
120563
|
+
function ont(e, t) {
|
|
120542
120564
|
t && (t.size !== void 0 && e.slides.setViewportSize(t.size), t.ratio !== void 0 && e.slides.setViewportRatio(t.ratio));
|
|
120543
120565
|
}
|
|
120544
120566
|
function w9(e) {
|
|
@@ -120546,13 +120568,13 @@ function w9(e) {
|
|
|
120546
120568
|
title: e.slides.title,
|
|
120547
120569
|
slides: $(e.slides.slides),
|
|
120548
120570
|
theme: $(e.slides.theme),
|
|
120549
|
-
viewport:
|
|
120571
|
+
viewport: $tt(e),
|
|
120550
120572
|
templates: $(e.slides.templates)
|
|
120551
120573
|
};
|
|
120552
120574
|
}
|
|
120553
|
-
function
|
|
120575
|
+
function snt(e, t, n = 0) {
|
|
120554
120576
|
let r = $(t);
|
|
120555
|
-
e.slides.setTitle(r.title), e.slides.setSlides($(r.slides), x9(e.slides.theme, r.theme)),
|
|
120577
|
+
e.slides.setTitle(r.title), e.slides.setSlides($(r.slides), x9(e.slides.theme, r.theme)), ont(e, r.viewport), r.templates && e.slides.setTemplates($(r.templates)), e.slides.updateSlideIndex(r9(n, e.slides.slides.length)), e.main.setActiveElementIdList([]), e.main.setActiveGroupElementId("");
|
|
120556
120578
|
}
|
|
120557
120579
|
function T9(e) {
|
|
120558
120580
|
return {
|
|
@@ -120571,9 +120593,9 @@ function T9(e) {
|
|
|
120571
120593
|
};
|
|
120572
120594
|
}
|
|
120573
120595
|
function E9(e, t) {
|
|
120574
|
-
|
|
120596
|
+
snt(e, t.document, t.slideIndex), e.main.updateSelectedSlidesIndex([...t.selectedSlidesIndex]), e.main.setActiveElementIdList([...t.activeElementIdList]), e.main.setHandleElementId(t.handleElementId), e.main.setActiveGroupElementId(t.activeGroupElementId), e.main.setHiddenElementIdList([...t.hiddenElementIdList]), e.main.setCanvasScale(t.canvasScale), e.main.setCanvasPercentage(t.canvasPercentage), e.screen.setScreening(t.screening), e.snapshot.setSnapshotCursor(t.snapshotCursor), e.snapshot.setSnapshotLength(t.snapshotLength);
|
|
120575
120597
|
}
|
|
120576
|
-
function
|
|
120598
|
+
function cnt(e) {
|
|
120577
120599
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
120578
120600
|
}
|
|
120579
120601
|
function D9(e, t) {
|
|
@@ -120585,8 +120607,8 @@ function D9(e, t) {
|
|
|
120585
120607
|
throw new b9("InvalidDocument", "Document payload must be JSON-serializable", t);
|
|
120586
120608
|
}
|
|
120587
120609
|
}
|
|
120588
|
-
function
|
|
120589
|
-
return
|
|
120610
|
+
function lnt(e) {
|
|
120611
|
+
return cnt(e) && Object.prototype.hasOwnProperty.call(e, "document") ? {
|
|
120590
120612
|
document: e.document,
|
|
120591
120613
|
path: "payload.document"
|
|
120592
120614
|
} : {
|
|
@@ -120595,12 +120617,12 @@ function cnt(e) {
|
|
|
120595
120617
|
};
|
|
120596
120618
|
}
|
|
120597
120619
|
function O9(e, t) {
|
|
120598
|
-
if (!
|
|
120620
|
+
if (!cnt(e)) throw new b9("InvalidDocument", "Document payload must be an object", t);
|
|
120599
120621
|
return e;
|
|
120600
120622
|
}
|
|
120601
120623
|
function k9(e, t) {
|
|
120602
120624
|
if (e !== void 0) {
|
|
120603
|
-
if (!
|
|
120625
|
+
if (!cnt(e)) throw new b9("InvalidDocument", "Expected an object", t);
|
|
120604
120626
|
return e;
|
|
120605
120627
|
}
|
|
120606
120628
|
}
|
|
@@ -120610,21 +120632,21 @@ function A9(e, t) {
|
|
|
120610
120632
|
return e;
|
|
120611
120633
|
}
|
|
120612
120634
|
}
|
|
120613
|
-
function
|
|
120635
|
+
function unt(e, t) {
|
|
120614
120636
|
let n = O9(e, t);
|
|
120615
120637
|
if (n.id !== void 0 && typeof n.id != "string") throw new b9("InvalidDocument", "Element id must be a string when provided", `${t}.id`);
|
|
120616
|
-
if (typeof n.type != "string" || !
|
|
120638
|
+
if (typeof n.type != "string" || !qtt.has(n.type)) throw new b9("InvalidDocument", "Element type must be a supported string", `${t}.type`);
|
|
120617
120639
|
return c9(n);
|
|
120618
120640
|
}
|
|
120619
|
-
function
|
|
120641
|
+
function dnt(e, t) {
|
|
120620
120642
|
if (!Array.isArray(e)) throw new b9("InvalidDocument", "Document slides must be an array", t);
|
|
120621
120643
|
return e.map((e, n) => {
|
|
120622
120644
|
let r = `${t}[${n}]`, i = O9(e, r);
|
|
120623
120645
|
if (i.id !== void 0 && typeof i.id != "string") throw new b9("InvalidDocument", "Slide id must be a string when provided", `${r}.id`);
|
|
120624
120646
|
if (i.remark !== void 0 && typeof i.remark != "string") throw new b9("InvalidDocument", "Slide remark must be a string when provided", `${r}.remark`);
|
|
120625
120647
|
k9(i.background, `${r}.background`), k9(i.sectionTag, `${r}.sectionTag`), A9(i.notes, `${r}.notes`), A9(i.animations, `${r}.animations`);
|
|
120626
|
-
let a = (A9(i.elements, `${r}.elements`) || []).map((e, t) =>
|
|
120627
|
-
return
|
|
120648
|
+
let a = (A9(i.elements, `${r}.elements`) || []).map((e, t) => unt(e, `${r}.elements[${t}]`));
|
|
120649
|
+
return uet({
|
|
120628
120650
|
...i,
|
|
120629
120651
|
elements: a
|
|
120630
120652
|
});
|
|
@@ -120634,7 +120656,7 @@ function j9(e, t) {
|
|
|
120634
120656
|
let n = k9(e, t);
|
|
120635
120657
|
return n ? $(n) : void 0;
|
|
120636
120658
|
}
|
|
120637
|
-
function
|
|
120659
|
+
function fnt(e, t) {
|
|
120638
120660
|
let n = k9(e, t);
|
|
120639
120661
|
if (!n) return;
|
|
120640
120662
|
let r = {};
|
|
@@ -120648,7 +120670,7 @@ function dnt(e, t) {
|
|
|
120648
120670
|
}
|
|
120649
120671
|
return r;
|
|
120650
120672
|
}
|
|
120651
|
-
function
|
|
120673
|
+
function pnt(e, t) {
|
|
120652
120674
|
let n = A9(e, t);
|
|
120653
120675
|
if (n) return n.map((e, n) => {
|
|
120654
120676
|
let r = `${t}[${n}]`, i = O9(e, r);
|
|
@@ -120664,10 +120686,10 @@ function fnt(e, t) {
|
|
|
120664
120686
|
};
|
|
120665
120687
|
});
|
|
120666
120688
|
}
|
|
120667
|
-
function
|
|
120689
|
+
function mnt(e, t = "payload") {
|
|
120668
120690
|
let n = O9(D9(e, t), t);
|
|
120669
120691
|
if (typeof n.title != "string") throw new b9("InvalidDocument", "Document title must be a string", `${t}.title`);
|
|
120670
|
-
let r =
|
|
120692
|
+
let r = dnt(n.slides, `${t}.slides`), i = j9(n.theme, `${t}.theme`), a = fnt(n.viewport, `${t}.viewport`), o = pnt(n.templates, `${t}.templates`);
|
|
120671
120693
|
return {
|
|
120672
120694
|
title: n.title,
|
|
120673
120695
|
slides: r,
|
|
@@ -120676,17 +120698,17 @@ function pnt(e, t = "payload") {
|
|
|
120676
120698
|
...o ? { templates: o } : {}
|
|
120677
120699
|
};
|
|
120678
120700
|
}
|
|
120679
|
-
function
|
|
120701
|
+
function hnt(e) {
|
|
120680
120702
|
let t = O9(D9(e, "payload"), "payload"), n = {};
|
|
120681
120703
|
if (t.title !== void 0) {
|
|
120682
120704
|
if (typeof t.title != "string") throw new b9("InvalidDocument", "Document title must be a string", "payload.title");
|
|
120683
120705
|
n.title = t.title;
|
|
120684
120706
|
}
|
|
120685
|
-
return t.slides !== void 0 && (n.slides =
|
|
120707
|
+
return t.slides !== void 0 && (n.slides = dnt(t.slides, "payload.slides")), t.theme !== void 0 && (n.theme = j9(t.theme, "payload.theme")), t.viewport !== void 0 && (n.viewport = fnt(t.viewport, "payload.viewport")), t.templates !== void 0 && (n.templates = pnt(t.templates, "payload.templates")), n;
|
|
120686
120708
|
}
|
|
120687
|
-
function
|
|
120688
|
-
let t =
|
|
120689
|
-
return
|
|
120709
|
+
function gnt(e) {
|
|
120710
|
+
let t = lnt(e);
|
|
120711
|
+
return mnt(t.document, t.path);
|
|
120690
120712
|
}
|
|
120691
120713
|
function M9(e, t) {
|
|
120692
120714
|
let n = e.slides.slides[e.slides.slideIndex];
|
|
@@ -120723,14 +120745,14 @@ function N9(e, t, n) {
|
|
|
120723
120745
|
function P9(e, t, n, r) {
|
|
120724
120746
|
let i = $(e.slides.slides), a = i[t], o = a?.elements[n];
|
|
120725
120747
|
if (!a || !o) throw Error("Element location is invalid");
|
|
120726
|
-
|
|
120748
|
+
M9e(r, o);
|
|
120727
120749
|
let s = {
|
|
120728
120750
|
...o,
|
|
120729
120751
|
...Q7(r)
|
|
120730
120752
|
};
|
|
120731
120753
|
return a.elements[n] = s, e.slides.setSlides(i), $(s);
|
|
120732
120754
|
}
|
|
120733
|
-
var
|
|
120755
|
+
var _nt = [[0, 0], [100, 100]];
|
|
120734
120756
|
function F9(e, t, n) {
|
|
120735
120757
|
let r = o9(e.slides.slides, t, n, e.slides.slideIndex);
|
|
120736
120758
|
if (r.element.type !== "image") throw Error(`Element is not an image: ${t}`);
|
|
@@ -120747,12 +120769,12 @@ function I9(e, t, n, r, i = []) {
|
|
|
120747
120769
|
for (let e of i) delete c[e];
|
|
120748
120770
|
return o.elements[n] = c, e.slides.setSlides(a), $(c);
|
|
120749
120771
|
}
|
|
120750
|
-
function
|
|
120772
|
+
function vnt(e, t) {
|
|
120751
120773
|
if (typeof t == "string") return t;
|
|
120752
120774
|
if (!Number.isFinite(t)) throw Error(`Image filter ${String(e)} must be finite`);
|
|
120753
120775
|
return e === "blur" ? `${t}px` : e === "hue-rotate" ? `${t}deg` : `${e === "opacity" && t >= 0 && t <= 1 ? t * 100 : t}%`;
|
|
120754
120776
|
}
|
|
120755
|
-
function
|
|
120777
|
+
function ynt(e, t, n, r) {
|
|
120756
120778
|
let i = $(e.slides.slides), a = i[t];
|
|
120757
120779
|
if (!a || !a.elements[n]) throw Error("Element location is invalid");
|
|
120758
120780
|
return a.elements[n] = $(r), e.slides.setSlides(i), $(a.elements[n]);
|
|
@@ -120790,11 +120812,11 @@ function z9(e, t) {
|
|
|
120790
120812
|
}
|
|
120791
120813
|
return n;
|
|
120792
120814
|
}
|
|
120793
|
-
function
|
|
120815
|
+
function bnt(e, t) {
|
|
120794
120816
|
let n = {};
|
|
120795
120817
|
return t.left === void 0 ? t.dx !== void 0 && (n.left = e.left + t.dx) : n.left = t.left, t.top === void 0 ? t.dy !== void 0 && (n.top = e.top + t.dy) : n.top = t.top, n;
|
|
120796
120818
|
}
|
|
120797
|
-
function
|
|
120819
|
+
function xnt(e, t) {
|
|
120798
120820
|
let n = {};
|
|
120799
120821
|
if (t.width === void 0 ? t.dw !== void 0 && (n.width = e.width + t.dw) : n.width = t.width, t.height !== void 0) {
|
|
120800
120822
|
if (!("height" in e)) throw Error(`Element does not support height: ${e.id}`);
|
|
@@ -120808,33 +120830,33 @@ function bnt(e, t) {
|
|
|
120808
120830
|
function B9(e, t, n = "", r = "") {
|
|
120809
120831
|
e.main.setActiveElementIdList(t), n && e.main.setHandleElementId(n), e.main.setActiveGroupElementId(r);
|
|
120810
120832
|
}
|
|
120811
|
-
function
|
|
120833
|
+
function Snt(e, t) {
|
|
120812
120834
|
let n = n9(t.elementId);
|
|
120813
120835
|
for (let r of n) o9(e.slides.slides, r, t.slideId, e.slides.slideIndex);
|
|
120814
120836
|
B9(e, n, n[0] || "");
|
|
120815
120837
|
}
|
|
120816
|
-
function
|
|
120838
|
+
function Cnt(e, t) {
|
|
120817
120839
|
let { slide: n } = a9(e.slides.slides, t.slideId, e.slides.slideIndex), r = n.elements.find((e) => e.id === t.groupIdOrElementId), i = r?.groupId || t.groupIdOrElementId, a = n.elements.filter((e) => e.groupId === i);
|
|
120818
120840
|
if (!a.length) throw Error(`Element group not found: ${t.groupIdOrElementId}`);
|
|
120819
120841
|
let o = r?.id || a[0].id;
|
|
120820
120842
|
B9(e, a.map((e) => e.id), o, o);
|
|
120821
120843
|
}
|
|
120822
|
-
function
|
|
120844
|
+
function wnt(e, t) {
|
|
120823
120845
|
let n = o9(e.slides.slides, t.elementId, t.slideId, e.slides.slideIndex), r = $(n.slide.elements), [i] = r.splice(n.elementIndex, 1);
|
|
120824
120846
|
if (!i) throw Error(`Element not found: ${t.elementId}`);
|
|
120825
120847
|
return r.splice(i9(t.toIndex, r.length), 0, i), N9(e, n.slideIndex, { elements: r }), r;
|
|
120826
120848
|
}
|
|
120827
120849
|
function V9(e, t, n) {
|
|
120828
120850
|
let r = o9(e.slides.slides, t.elementId, t.slideId, e.slides.slideIndex), i = r.slide.elements.length - 1, a = n === "front" ? i : n === "back" ? 0 : n === "forward" ? Math.min(r.elementIndex + 1, i) : Math.max(r.elementIndex - 1, 0);
|
|
120829
|
-
return
|
|
120851
|
+
return wnt(e, {
|
|
120830
120852
|
...t,
|
|
120831
120853
|
toIndex: a
|
|
120832
120854
|
});
|
|
120833
120855
|
}
|
|
120834
|
-
function
|
|
120856
|
+
function Tnt(e) {
|
|
120835
120857
|
if (e) return J7(e, "background"), $(e);
|
|
120836
120858
|
}
|
|
120837
|
-
function
|
|
120859
|
+
function Ent(e) {
|
|
120838
120860
|
return td.filter((t) => !e || t.categoryKey === e).flatMap((e) => e.children.map((t, n) => ({
|
|
120839
120861
|
...$(t),
|
|
120840
120862
|
id: `${e.categoryKey}.${n}`,
|
|
@@ -120842,7 +120864,7 @@ function Tnt(e) {
|
|
|
120842
120864
|
index: n
|
|
120843
120865
|
})));
|
|
120844
120866
|
}
|
|
120845
|
-
function
|
|
120867
|
+
function Dnt(e = {}) {
|
|
120846
120868
|
if (e.preset) return $(e.preset);
|
|
120847
120869
|
if (e.presetId) {
|
|
120848
120870
|
let t = e.presetId.lastIndexOf(".");
|
|
@@ -120859,7 +120881,7 @@ function Ent(e = {}) {
|
|
|
120859
120881
|
return $(n);
|
|
120860
120882
|
}
|
|
120861
120883
|
}
|
|
120862
|
-
function
|
|
120884
|
+
function Ont(e, ...t) {
|
|
120863
120885
|
let n = Object.assign({}, ...t.filter(Boolean));
|
|
120864
120886
|
if (Object.keys(n).length) return {
|
|
120865
120887
|
content: n.content ?? "",
|
|
@@ -120869,7 +120891,7 @@ function Dnt(e, ...t) {
|
|
|
120869
120891
|
...n
|
|
120870
120892
|
};
|
|
120871
120893
|
}
|
|
120872
|
-
function
|
|
120894
|
+
function knt(e) {
|
|
120873
120895
|
return typeof e == "string" ? {
|
|
120874
120896
|
fill: e,
|
|
120875
120897
|
gradient: void 0,
|
|
@@ -120880,32 +120902,32 @@ function Ont(e) {
|
|
|
120880
120902
|
pattern: void 0
|
|
120881
120903
|
} : Q7(e);
|
|
120882
120904
|
}
|
|
120883
|
-
function
|
|
120905
|
+
function Ant(e, t, n) {
|
|
120884
120906
|
let { slide: r } = a9(e.slides.slides, t, e.slides.slideIndex), i = r.animations || [];
|
|
120885
120907
|
return $(n ? i.filter((e) => e.elId === n) : i);
|
|
120886
120908
|
}
|
|
120887
|
-
var
|
|
120909
|
+
var jnt = [
|
|
120888
120910
|
"click",
|
|
120889
120911
|
"meantime",
|
|
120890
120912
|
"auto"
|
|
120891
120913
|
];
|
|
120892
|
-
function
|
|
120914
|
+
function Mnt(e) {
|
|
120893
120915
|
let t = $(e);
|
|
120894
|
-
if (t.trigger !== void 0 && !
|
|
120916
|
+
if (t.trigger !== void 0 && !jnt.includes(t.trigger)) throw Error(`Invalid animation trigger: ${String(t.trigger)}`);
|
|
120895
120917
|
if (t.duration !== void 0 && (typeof t.duration != "number" || !Number.isFinite(t.duration) || t.duration < 0)) throw Error("Animation duration must be a non-negative finite number");
|
|
120896
120918
|
return t;
|
|
120897
120919
|
}
|
|
120898
|
-
function
|
|
120920
|
+
function Nnt(e, t, n, r) {
|
|
120899
120921
|
let { slide: i, index: a } = a9(e.slides.slides, t, e.slides.slideIndex), o = $(i.animations || []), s = o.findIndex((e) => e.id === n);
|
|
120900
120922
|
if (s === -1) throw Error(`Animation not found: ${n}`);
|
|
120901
|
-
let c =
|
|
120923
|
+
let c = jet({
|
|
120902
120924
|
...o[s],
|
|
120903
|
-
...
|
|
120925
|
+
...Mnt(H9(r))
|
|
120904
120926
|
});
|
|
120905
120927
|
return s9(i, c.elId), o[s] = c, N9(e, a, { animations: o }), $(c);
|
|
120906
120928
|
}
|
|
120907
|
-
function
|
|
120908
|
-
let n =
|
|
120929
|
+
function Pnt(e, t) {
|
|
120930
|
+
let n = Ant(e, t), r = [];
|
|
120909
120931
|
for (let e of n) {
|
|
120910
120932
|
let t = $(e);
|
|
120911
120933
|
if (t.trigger === "click" || !r.length) r.push({
|
|
@@ -120930,7 +120952,7 @@ function Nnt(e, t) {
|
|
|
120930
120952
|
function H9(e) {
|
|
120931
120953
|
return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
|
|
120932
120954
|
}
|
|
120933
|
-
function
|
|
120955
|
+
function Fnt() {
|
|
120934
120956
|
return $({
|
|
120935
120957
|
enter: I8,
|
|
120936
120958
|
exit: L8,
|
|
@@ -120938,22 +120960,22 @@ function Pnt() {
|
|
|
120938
120960
|
slide: z8
|
|
120939
120961
|
});
|
|
120940
120962
|
}
|
|
120941
|
-
var
|
|
120942
|
-
function Int(e) {
|
|
120943
|
-
return typeof e == "string" && Fnt.includes(e);
|
|
120944
|
-
}
|
|
120963
|
+
var Int = z8.map((e) => e.value);
|
|
120945
120964
|
function Lnt(e) {
|
|
120965
|
+
return typeof e == "string" && Int.includes(e);
|
|
120966
|
+
}
|
|
120967
|
+
function Rnt(e) {
|
|
120946
120968
|
if (e !== void 0) {
|
|
120947
|
-
if (
|
|
120969
|
+
if (Lnt(e)) return e;
|
|
120948
120970
|
throw Error(`Invalid turningMode: ${String(e)}`);
|
|
120949
120971
|
}
|
|
120950
120972
|
}
|
|
120951
|
-
function
|
|
120973
|
+
function znt(e, t = {}) {
|
|
120952
120974
|
if (!e) throw Error("Search query is required");
|
|
120953
120975
|
let n = t.regex ? e : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
120954
120976
|
return new RegExp(n, t.caseSensitive ? "g" : "gi");
|
|
120955
120977
|
}
|
|
120956
|
-
function
|
|
120978
|
+
function Bnt(e, t, n) {
|
|
120957
120979
|
let r = [];
|
|
120958
120980
|
t.lastIndex = 0;
|
|
120959
120981
|
let i = t.exec(e);
|
|
@@ -120965,7 +120987,7 @@ function znt(e, t, n) {
|
|
|
120965
120987
|
}), i.index === t.lastIndex && t.lastIndex++, i = t.exec(e);
|
|
120966
120988
|
return t.lastIndex = 0, r;
|
|
120967
120989
|
}
|
|
120968
|
-
function
|
|
120990
|
+
function Vnt(e, t) {
|
|
120969
120991
|
let n = e[t];
|
|
120970
120992
|
if (!n?.sectionTag) throw Error(`Section start not found at slide index: ${t}`);
|
|
120971
120993
|
let r = e.findIndex((e, n) => n > t && !!e.sectionTag), i = r === -1 ? e.length - 1 : r - 1;
|
|
@@ -120978,11 +121000,11 @@ function Bnt(e, t) {
|
|
|
120978
121000
|
slideIds: e.slice(t, i + 1).map((e) => e.id)
|
|
120979
121001
|
};
|
|
120980
121002
|
}
|
|
120981
|
-
function
|
|
120982
|
-
return e.flatMap((t, n) => t.sectionTag ? [
|
|
121003
|
+
function Hnt(e) {
|
|
121004
|
+
return e.flatMap((t, n) => t.sectionTag ? [Vnt(e, n)] : []);
|
|
120983
121005
|
}
|
|
120984
121006
|
function U9(e, t) {
|
|
120985
|
-
let n =
|
|
121007
|
+
let n = Hnt(e).find((e) => e.section.id === t || e.slideId === t);
|
|
120986
121008
|
if (!n) throw Error(`Section not found: ${t}`);
|
|
120987
121009
|
return n;
|
|
120988
121010
|
}
|
|
@@ -120999,7 +121021,7 @@ function G9(e, t) {
|
|
|
120999
121021
|
function K9(e, t) {
|
|
121000
121022
|
return e.map((e) => {
|
|
121001
121023
|
let n = [...e];
|
|
121002
|
-
for (; n.length < t;) n.push(
|
|
121024
|
+
for (; n.length < t;) n.push(Fet());
|
|
121003
121025
|
return n.length > t && (n.length = t), n;
|
|
121004
121026
|
});
|
|
121005
121027
|
}
|
|
@@ -121013,7 +121035,7 @@ function q9(e, t, n = e.colWidths) {
|
|
|
121013
121035
|
function J9(e) {
|
|
121014
121036
|
return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : 1;
|
|
121015
121037
|
}
|
|
121016
|
-
function
|
|
121038
|
+
function Unt(e, t, n) {
|
|
121017
121039
|
for (let r = 0; r < e.length; r++) for (let i = 0; i < e[r].length; i++) {
|
|
121018
121040
|
let a = e[r][i], o = J9(a.rowspan), s = J9(a.colspan);
|
|
121019
121041
|
if (r <= t && t < r + o && i <= n && n < i + s) return {
|
|
@@ -121024,7 +121046,7 @@ function Hnt(e, t, n) {
|
|
|
121024
121046
|
}
|
|
121025
121047
|
return null;
|
|
121026
121048
|
}
|
|
121027
|
-
function
|
|
121049
|
+
function Wnt(e, t) {
|
|
121028
121050
|
if (typeof document > "u") throw Error("Paragraph attrs require a DOM environment");
|
|
121029
121051
|
let n = document.createElement("template");
|
|
121030
121052
|
n.innerHTML = e;
|
|
@@ -121046,7 +121068,7 @@ function Unt(e, t) {
|
|
|
121046
121068
|
}
|
|
121047
121069
|
return n.innerHTML;
|
|
121048
121070
|
}
|
|
121049
|
-
function
|
|
121071
|
+
function Gnt(e, t, n, r, i, a) {
|
|
121050
121072
|
let o = [];
|
|
121051
121073
|
t.lastIndex = 0;
|
|
121052
121074
|
let s = e.replace(t, (e, ...t) => {
|
|
@@ -121071,7 +121093,7 @@ function Y9(e, t) {
|
|
|
121071
121093
|
noteIndex: n
|
|
121072
121094
|
};
|
|
121073
121095
|
}
|
|
121074
|
-
function
|
|
121096
|
+
function Knt(e, t) {
|
|
121075
121097
|
let n = e.findIndex((e) => e.id === t);
|
|
121076
121098
|
if (n === -1) throw Error(`Note reply not found: ${t}`);
|
|
121077
121099
|
return {
|
|
@@ -121079,13 +121101,13 @@ function Gnt(e, t) {
|
|
|
121079
121101
|
replyIndex: n
|
|
121080
121102
|
};
|
|
121081
121103
|
}
|
|
121082
|
-
function
|
|
121104
|
+
function qnt(e) {
|
|
121083
121105
|
return typeof e != "object" || !e ? e : e.slideIdOrIndex ?? e.slideId ?? e.index;
|
|
121084
121106
|
}
|
|
121085
121107
|
function X9(e, t) {
|
|
121086
121108
|
let n = e.slides.slides, r = t && typeof t == "object" && t.slideIdOrIndex === void 0 ? t.slideId === void 0 ? t.index === void 0 ? "slideIdOrIndex" : "index" : "slideId" : "slideIdOrIndex";
|
|
121087
121109
|
if (!n.length) throw new b9("SlideUnavailable", "No slide is available", r);
|
|
121088
|
-
let i =
|
|
121110
|
+
let i = qnt(t);
|
|
121089
121111
|
if (i === void 0) return r9(e.slides.slideIndex, n.length);
|
|
121090
121112
|
if (typeof i == "number") return q7(i, n.length, r);
|
|
121091
121113
|
if (!i) throw new b9("InvalidSlideId", "Slide ID is required", r);
|
|
@@ -121101,28 +121123,28 @@ function Z9(e, t) {
|
|
|
121101
121123
|
index: n
|
|
121102
121124
|
};
|
|
121103
121125
|
}
|
|
121104
|
-
function
|
|
121126
|
+
function Jnt(e) {
|
|
121105
121127
|
let t = $(e || {});
|
|
121106
|
-
return
|
|
121128
|
+
return uet({
|
|
121107
121129
|
...t,
|
|
121108
121130
|
elements: (t.elements || []).map((e) => c9(e))
|
|
121109
121131
|
});
|
|
121110
121132
|
}
|
|
121111
|
-
function
|
|
121133
|
+
function Ynt(e) {
|
|
121112
121134
|
let t = $(e);
|
|
121113
121135
|
return t.elements && (t.elements = t.elements.map((e) => c9(e))), t;
|
|
121114
121136
|
}
|
|
121115
|
-
function
|
|
121137
|
+
function Xnt(e) {
|
|
121116
121138
|
return e ? e.replace(/<br\s*\/?>/gi, " ").replace(/<[^>]+>/g, " ").replace(/ /g, " ").replace(/\s+/g, " ").trim() : "";
|
|
121117
121139
|
}
|
|
121118
|
-
function
|
|
121140
|
+
function Znt(e) {
|
|
121119
121141
|
let t = e?.elements ?? [];
|
|
121120
|
-
return t.length === 0 ? !0 : t.every((e) => e.type === "text" &&
|
|
121142
|
+
return t.length === 0 ? !0 : t.every((e) => e.type === "text" && Xnt(e.content) === "");
|
|
121121
121143
|
}
|
|
121122
|
-
function
|
|
121144
|
+
function Qnt(e, t, n) {
|
|
121123
121145
|
if (t !== n && e.some((e) => e.id === t)) throw new b9("DuplicateSlideId", `Slide ID already exists: ${t}`, "slide.id");
|
|
121124
121146
|
}
|
|
121125
|
-
function
|
|
121147
|
+
function $nt(e) {
|
|
121126
121148
|
let t = n9(e);
|
|
121127
121149
|
if (!t.length) throw new b9("InvalidSlideId", "At least one slide ID is required", "slideId");
|
|
121128
121150
|
let n = [], r = /* @__PURE__ */ new Set();
|
|
@@ -121131,15 +121153,15 @@ function Qnt(e) {
|
|
|
121131
121153
|
r.has(e) || (r.add(e), n.push(e));
|
|
121132
121154
|
}), n;
|
|
121133
121155
|
}
|
|
121134
|
-
function
|
|
121135
|
-
return
|
|
121156
|
+
function ert(e) {
|
|
121157
|
+
return cet([e], { preserveExternalSlideLinks: !0 }).slides[0];
|
|
121136
121158
|
}
|
|
121137
121159
|
function Q9(e, t) {
|
|
121138
121160
|
let n = X9(e, t);
|
|
121139
121161
|
e.slides.updateSlideIndex(n), e.main.updateSelectedSlidesIndex([n]), e.main.setActiveElementIdList([]);
|
|
121140
121162
|
}
|
|
121141
|
-
function
|
|
121142
|
-
let r =
|
|
121163
|
+
function trt(e, t, n = {}) {
|
|
121164
|
+
let r = Qtt(e), i = /* @__PURE__ */ new Set(), a = [], o = !1, s = 0, c = 0, l = null, u = (e) => {
|
|
121143
121165
|
if (o && e.type !== "destroyed") return;
|
|
121144
121166
|
let t = {
|
|
121145
121167
|
...e,
|
|
@@ -121168,7 +121190,7 @@ function ert(e, t, n = {}) {
|
|
|
121168
121190
|
type: e.type,
|
|
121169
121191
|
changed: !1,
|
|
121170
121192
|
documentVersion: s,
|
|
121171
|
-
errors: [
|
|
121193
|
+
errors: [Ztt(t)]
|
|
121172
121194
|
}), g = (e) => ({
|
|
121173
121195
|
ok: !1,
|
|
121174
121196
|
commandId: e.id,
|
|
@@ -121251,14 +121273,14 @@ function ert(e, t, n = {}) {
|
|
|
121251
121273
|
"view.exitPresentation",
|
|
121252
121274
|
"view.setLocale"
|
|
121253
121275
|
]), T = (e) => e.endsWith(".get") || e.endsWith(".list") || C.has(e), E = (e) => !w.has(e.type), D = /* @__PURE__ */ new Map(), O = (e, t) => {
|
|
121254
|
-
if (
|
|
121276
|
+
if (!eet(e)) throw Error(`Command type must use domain.action format: ${e}`);
|
|
121255
121277
|
if (D.has(e)) throw Error(`Duplicate command registration: ${e}`);
|
|
121256
121278
|
D.set(e, {
|
|
121257
121279
|
type: e,
|
|
121258
121280
|
handler: t,
|
|
121259
121281
|
mutates: !T(e)
|
|
121260
121282
|
});
|
|
121261
|
-
}, k = (e) =>
|
|
121283
|
+
}, k = (e) => eet(String(e.type)) ? D.has(e.type) ? null : h(e, new b9("UnsupportedCommand", `Unsupported command: ${e.type}`, "type")) : h(e, new b9("InvalidCommandType", `Command type must use domain.action format: ${String(e.type)}`, "type")), A = (e, t) => {
|
|
121262
121284
|
let n = o9(r.slides.slides, e, t, r.slides.slideIndex);
|
|
121263
121285
|
if (n.element.type !== "text" && n.element.type !== "shape") throw Error(`Element does not support rich text: ${e}`);
|
|
121264
121286
|
return n;
|
|
@@ -121293,45 +121315,45 @@ function ert(e, t, n = {}) {
|
|
|
121293
121315
|
return P9(r, t.slideIndex, t.elementIndex, { text: n });
|
|
121294
121316
|
}, I = (e) => {
|
|
121295
121317
|
let t = A(e.elementId, e.slideId);
|
|
121296
|
-
if (t.element.type === "text") return P9(r, t.slideIndex, t.elementIndex, { content:
|
|
121318
|
+
if (t.element.type === "text") return P9(r, t.slideIndex, t.elementIndex, { content: Wnt(t.element.content, e.attrs) });
|
|
121297
121319
|
let n = {
|
|
121298
121320
|
...j(),
|
|
121299
121321
|
...t.element.text
|
|
121300
121322
|
}, i = {
|
|
121301
121323
|
...n,
|
|
121302
|
-
content:
|
|
121324
|
+
content: Wnt(n.content, e.attrs)
|
|
121303
121325
|
};
|
|
121304
121326
|
return P9(r, t.slideIndex, t.elementIndex, { text: i });
|
|
121305
121327
|
};
|
|
121306
|
-
O("deck.get", () => w9(r)), O("deck.set", (e) => (
|
|
121307
|
-
let L = (e) => (
|
|
121328
|
+
O("deck.get", () => w9(r)), O("deck.set", (e) => (snt(r, mnt(e)), w9(r)));
|
|
121329
|
+
let L = (e) => (snt(r, gnt(e)), w9(r));
|
|
121308
121330
|
O("import.json", L), O("import.pptist", L), O("import.pptxSafe", L), O("export.json", () => w9(r)), O("deck.patch", (e) => {
|
|
121309
|
-
let t =
|
|
121310
|
-
return t.title !== void 0 && r.slides.setTitle(t.title), t.slides ? r.slides.setSlides($(t.slides), t.theme ? x9(r.slides.theme, t.theme) : void 0) : t.theme && r.slides.setTheme(x9(r.slides.theme, t.theme)),
|
|
121331
|
+
let t = hnt(e);
|
|
121332
|
+
return t.title !== void 0 && r.slides.setTitle(t.title), t.slides ? r.slides.setSlides($(t.slides), t.theme ? x9(r.slides.theme, t.theme) : void 0) : t.theme && r.slides.setTheme(x9(r.slides.theme, t.theme)), ont(r, t.viewport), t.templates && r.slides.setTemplates($(t.templates)), w9(r);
|
|
121311
121333
|
}), O("deck.setTitle", (e) => (r.slides.setTitle(e.title), { title: r.slides.title })), O("deck.setTheme", (e) => {
|
|
121312
121334
|
let t = j9(e.theme, "payload.theme") || {};
|
|
121313
121335
|
return r.slides.setTheme(x9(r.slides.theme, t)), $(r.slides.theme);
|
|
121314
121336
|
}), O("deck.applyTemplate", async (e = { templateId: "" }) => {
|
|
121315
121337
|
if (!e?.templateId) throw new b9("InvalidTemplate", "templateId is required. Call templates.catalog.", "payload.templateId");
|
|
121316
|
-
|
|
121317
|
-
let t = await
|
|
121338
|
+
Qet(e.templateId);
|
|
121339
|
+
let t = await Yet(e.templateId), n = $et(t);
|
|
121318
121340
|
return n && r.slides.setTheme(x9(r.slides.theme, n)), t.width && r.slides.setViewportSize(t.width), t.width && t.height && r.slides.setViewportRatio(t.height / t.width), {
|
|
121319
121341
|
templateId: e.templateId,
|
|
121320
121342
|
theme: $(r.slides.theme)
|
|
121321
121343
|
};
|
|
121322
|
-
}), O("templates.catalog", () =>
|
|
121344
|
+
}), O("templates.catalog", () => Jet()), O("templates.slidesCatalog", async (e = { templateId: "" }) => {
|
|
121323
121345
|
if (!e?.templateId) throw new b9("InvalidTemplate", "templateId is required. Call templates.catalog.", "payload.templateId");
|
|
121324
|
-
return
|
|
121325
|
-
}), O("styles.catalog", () =>
|
|
121346
|
+
return Qet(e.templateId), Xet(e.templateId);
|
|
121347
|
+
}), O("styles.catalog", () => Htt()), O("layouts.catalog", () => Itt()), O("deck.applyStyle", (e = { styleId: "" }) => {
|
|
121326
121348
|
if (!e?.styleId) throw new b9("InvalidStyle", "styleId is required. Call styles.catalog.", "payload.styleId");
|
|
121327
|
-
|
|
121328
|
-
let t =
|
|
121329
|
-
return r.slides.setTheme(x9(r.slides.theme,
|
|
121349
|
+
Btt(e.styleId) || _(e9("UnknownStyle", `Unknown style "${e.styleId}"; falling back to the default style. Call styles.catalog for valid ids.`, "payload.styleId", !0));
|
|
121350
|
+
let t = Vtt(e.styleId);
|
|
121351
|
+
return r.slides.setTheme(x9(r.slides.theme, Utt(t))), {
|
|
121330
121352
|
styleId: t.id,
|
|
121331
121353
|
theme: $(r.slides.theme)
|
|
121332
121354
|
};
|
|
121333
|
-
}), O("deck.setViewport", (e) => (
|
|
121334
|
-
let t =
|
|
121355
|
+
}), O("deck.setViewport", (e) => (ont(r, fnt(D9(e, "payload"), "payload")), M9(r, s))), O("deck.setTemplates", (e) => {
|
|
121356
|
+
let t = pnt(O9(D9(e, "payload"), "payload").templates, "payload.templates");
|
|
121335
121357
|
if (!t) throw new b9("InvalidDocument", "Templates must be an array", "payload.templates");
|
|
121336
121358
|
return r.slides.setTemplates(t), $(r.slides.templates);
|
|
121337
121359
|
}), O("slides.list", () => $(r.slides.slides)), O("slides.get", (e = {}) => {
|
|
@@ -121344,20 +121366,20 @@ function ert(e, t, n = {}) {
|
|
|
121344
121366
|
let t = Z9(r, e);
|
|
121345
121367
|
return t ? $(t.slide) : null;
|
|
121346
121368
|
}), O("slides.create", (e = {}) => {
|
|
121347
|
-
let t =
|
|
121348
|
-
|
|
121369
|
+
let t = Jnt(e.slide), n = $(r.slides.slides);
|
|
121370
|
+
Qnt(n, t.id);
|
|
121349
121371
|
let i = i9(e.index, n.length);
|
|
121350
121372
|
return n.splice(i, 0, t), r.slides.setSlides(n), e.select !== !1 && Q9(r, i), $(t);
|
|
121351
121373
|
}), O("slides.createFromLayout", async (e = { layoutId: "" }) => {
|
|
121352
121374
|
if (!e?.layoutId) throw new b9("InvalidLayout", "layoutId is required. Call layouts.catalog.", "payload.layoutId");
|
|
121353
|
-
let t =
|
|
121375
|
+
let t = Vtt(r.slides.theme.styleId), n = $tt(r), i = await Ltt(e.layoutId, e.slots ?? {}, t, {
|
|
121354
121376
|
width: n.size,
|
|
121355
121377
|
height: n.size * n.ratio
|
|
121356
121378
|
}, e.backgroundMode ?? "auto");
|
|
121357
121379
|
for (let e of i.warnings) _(e9("LayoutContent", e, void 0, !0));
|
|
121358
|
-
let a =
|
|
121359
|
-
|
|
121360
|
-
let s = e.index === void 0 && o.length === 1 &&
|
|
121380
|
+
let a = Jnt(i.slide), o = $(r.slides.slides);
|
|
121381
|
+
Qnt(o, a.id);
|
|
121382
|
+
let s = e.index === void 0 && o.length === 1 && Znt(o[0]), c;
|
|
121361
121383
|
s ? (c = 0, o.splice(0, 1, a)) : (c = i9(e.index, o.length), o.splice(c, 0, a)), r.slides.setSlides(o), e.select !== !1 && Q9(r, c);
|
|
121362
121384
|
let l = a.elements.filter((e) => e.type === "text").map((e) => e.id);
|
|
121363
121385
|
return {
|
|
@@ -121373,16 +121395,16 @@ function ert(e, t, n = {}) {
|
|
|
121373
121395
|
}) => {
|
|
121374
121396
|
if (!e?.templateId) throw new b9("InvalidTemplate", "templateId is required.", "payload.templateId");
|
|
121375
121397
|
if (!e?.slug) throw new b9("InvalidTemplateSlide", "slug is required. Call templates.slidesCatalog.", "payload.slug");
|
|
121376
|
-
|
|
121377
|
-
let t = await
|
|
121398
|
+
Qet(e.templateId);
|
|
121399
|
+
let t = await Yet(e.templateId);
|
|
121378
121400
|
if (e.applyTemplateTheme !== !1 && r.slides.slides.length === 0) {
|
|
121379
|
-
let e =
|
|
121401
|
+
let e = $et(t);
|
|
121380
121402
|
e && r.slides.setTheme({
|
|
121381
121403
|
...r.slides.theme,
|
|
121382
121404
|
...e
|
|
121383
121405
|
});
|
|
121384
121406
|
}
|
|
121385
|
-
let { slide: n } =
|
|
121407
|
+
let { slide: n } = Zet(t, e.slug), i = Jnt(n), a = $(r.slides.slides), o = i9(e.index, a.length);
|
|
121386
121408
|
a.splice(o, 0, i), r.slides.setSlides(a), e.select !== !1 && Q9(r, o);
|
|
121387
121409
|
let s = i.elements.filter((e) => e.type === "text").map((e) => e.id), c = i.elements.filter((e) => e.type === "text" && !!e.placeholder).map((e) => e.id);
|
|
121388
121410
|
return {
|
|
@@ -121396,7 +121418,7 @@ function ert(e, t, n = {}) {
|
|
|
121396
121418
|
}), O("slides.insert", (e) => {
|
|
121397
121419
|
let t = Array.isArray(e.slides) ? e.slides : [e.slides];
|
|
121398
121420
|
if (!t.length) throw Error("At least one slide is required");
|
|
121399
|
-
let n =
|
|
121421
|
+
let n = cet(t, { preserveExternalSlideLinks: e.preserveExternalSlideLinks }), i = $(r.slides.slides), a = i9(e.index, i.length);
|
|
121400
121422
|
return i.splice(a, 0, ...n.slides), r.slides.setSlides(i), e.select !== !1 && Q9(r, a), {
|
|
121401
121423
|
slides: n.slides,
|
|
121402
121424
|
remap: {
|
|
@@ -121407,10 +121429,10 @@ function ert(e, t, n = {}) {
|
|
|
121407
121429
|
}
|
|
121408
121430
|
};
|
|
121409
121431
|
}), O("slides.update", (e) => {
|
|
121410
|
-
let t = X9(r, { slideId: e.slideId }), n =
|
|
121411
|
-
return n.id &&
|
|
121432
|
+
let t = X9(r, { slideId: e.slideId }), n = Ynt(e.patch);
|
|
121433
|
+
return n.id && Qnt(r.slides.slides, n.id, e.slideId), N9(r, t, n);
|
|
121412
121434
|
}), O("slides.delete", (e) => {
|
|
121413
|
-
let t =
|
|
121435
|
+
let t = $nt(e.slideId), n = t.map((e) => X9(r, { slideId: e })), i = r.slides.currentSlide?.id, a = new Set(t), o = aet(r.slides.slides.filter((e) => !a.has(e.id)), a);
|
|
121414
121436
|
r.slides.deleteSlide(t);
|
|
121415
121437
|
let s = i ? r.slides.slides.findIndex((e) => e.id === i) : -1, c = r.slides.slides.length ? s >= 0 ? s : r9(Math.min(...n), r.slides.slides.length) : 0;
|
|
121416
121438
|
r.slides.updateSlideIndex(c), r.main.setActiveElementIdList([]), r.main.updateSelectedSlidesIndex(r.slides.slides.length ? [c] : []);
|
|
@@ -121423,20 +121445,20 @@ function ert(e, t, n = {}) {
|
|
|
121423
121445
|
}), O("slides.duplicate", (e = {}) => {
|
|
121424
121446
|
let t = Z9(r, e);
|
|
121425
121447
|
if (!t) throw new b9("SlideUnavailable", "No slide is available", "slideIdOrIndex");
|
|
121426
|
-
let { slide: n, index: i } = t, a =
|
|
121448
|
+
let { slide: n, index: i } = t, a = ert(n), o = $(r.slides.slides), s = i9(i + 1, o.length);
|
|
121427
121449
|
return o.splice(s, 0, a), r.slides.setSlides(o), e.select !== !1 && Q9(r, s), a;
|
|
121428
121450
|
}), O("slides.move", (e) => {
|
|
121429
121451
|
let t = $(r.slides.slides), n = X9(r, e), [i] = t.splice(n, 1);
|
|
121430
121452
|
if (!i) throw Error(`Slide index not found: ${n}`);
|
|
121431
121453
|
let a = i9(e.toIndex, t.length);
|
|
121432
121454
|
return t.splice(a, 0, i), r.slides.setSlides(t), Q9(r, a), $(t);
|
|
121433
|
-
}), O("slides.select", (e) => (Q9(r,
|
|
121455
|
+
}), O("slides.select", (e) => (Q9(r, qnt(e) ?? r.slides.slideIndex), M9(r, s))), O("slides.setBackground", (e) => {
|
|
121434
121456
|
let { index: t } = a9(r.slides.slides, e.slideId, r.slides.slideIndex);
|
|
121435
|
-
return N9(r, t, { background:
|
|
121457
|
+
return N9(r, t, { background: Tnt(e.background) });
|
|
121436
121458
|
}), O("slides.applyBackground", (e) => {
|
|
121437
121459
|
let t = $(r.slides.slides), n = e.slideIds?.length ? new Set(e.slideIds) : null, i = t.map((t) => n && !n.has(t.id) ? t : {
|
|
121438
121460
|
...t,
|
|
121439
|
-
background:
|
|
121461
|
+
background: Tnt(e.background)
|
|
121440
121462
|
});
|
|
121441
121463
|
return r.slides.setSlides(i), i;
|
|
121442
121464
|
}), O("slides.getTransition", (e = {}) => {
|
|
@@ -121447,7 +121469,7 @@ function ert(e, t, n = {}) {
|
|
|
121447
121469
|
};
|
|
121448
121470
|
}), O("slides.setTransition", (e) => {
|
|
121449
121471
|
let { index: t } = a9(r.slides.slides, e.slideId, r.slides.slideIndex);
|
|
121450
|
-
return N9(r, t, { turningMode:
|
|
121472
|
+
return N9(r, t, { turningMode: Rnt(e.turningMode) });
|
|
121451
121473
|
}), O("slides.getRemark", (e = {}) => {
|
|
121452
121474
|
let { slide: t } = a9(r.slides.slides, e.slideId, r.slides.slideIndex);
|
|
121453
121475
|
return t.remark || "";
|
|
@@ -121460,7 +121482,7 @@ function ert(e, t, n = {}) {
|
|
|
121460
121482
|
}), O("elements.insert", (e) => {
|
|
121461
121483
|
let t = Array.isArray(e.elements) ? e.elements : [e.elements];
|
|
121462
121484
|
if (!t.length) throw Error("At least one element is required");
|
|
121463
|
-
let { slide: n, index: i } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), a =
|
|
121485
|
+
let { slide: n, index: i } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), a = set(t, e.animations || [], {
|
|
121464
121486
|
offset: e.offset,
|
|
121465
121487
|
preserveExternalSlideLinks: e.preserveExternalSlideLinks,
|
|
121466
121488
|
slideIdMap: e.slideIdMap
|
|
@@ -121486,7 +121508,7 @@ function ert(e, t, n = {}) {
|
|
|
121486
121508
|
n.push(P9(r, t.slideIndex, t.elementIndex, e.patch));
|
|
121487
121509
|
}
|
|
121488
121510
|
return n;
|
|
121489
|
-
}), O("elements.setTransform", (e) => L9(r, e, (t) => z9(t, e.transform))), O("elements.move", (e) => L9(r, e, (t) =>
|
|
121511
|
+
}), O("elements.setTransform", (e) => L9(r, e, (t) => z9(t, e.transform))), O("elements.move", (e) => L9(r, e, (t) => bnt(t, e.position))), O("elements.resize", (e) => L9(r, e, (t) => xnt(t, e.size))), O("elements.rotate", (e) => L9(r, e, (t) => z9(t, { rotate: e.rotate }))), O("elements.setOpacity", (e) => L9(r, e, (t) => z9(t, { opacity: e.opacity }))), O("elements.setFlip", (e) => L9(r, e, (t) => z9(t, e.flip))), O("elements.delete", (e) => {
|
|
121490
121512
|
let t = n9(e.elementId), n = /* @__PURE__ */ new Map();
|
|
121491
121513
|
for (let i of t) {
|
|
121492
121514
|
let t = o9(r.slides.slides, i, e.slideId, r.slides.slideIndex), a = n.get(t.slideIndex) || /* @__PURE__ */ new Set();
|
|
@@ -121499,7 +121521,7 @@ function ert(e, t, n = {}) {
|
|
|
121499
121521
|
n.elements = n.elements.filter((e) => !t.has(e.id));
|
|
121500
121522
|
}
|
|
121501
121523
|
return r.slides.setSlides(i), r.main.setActiveElementIdList(r.main.activeElementIdList.filter((e) => !t.includes(e))), t.includes(r.main.activeGroupElementId) && r.main.setActiveGroupElementId(""), { deleted: t };
|
|
121502
|
-
}), O("elements.reorder", (e) =>
|
|
121524
|
+
}), O("elements.reorder", (e) => wnt(r, e)), O("elements.bringForward", (e) => V9(r, e, "forward")), O("elements.sendBackward", (e) => V9(r, e, "backward")), O("elements.bringToFront", (e) => V9(r, e, "front")), O("elements.sendToBack", (e) => V9(r, e, "back")), O("elements.select", (e) => (Snt(r, e), M9(r, s))), O("elements.selectGroup", (e) => (Cnt(r, e), M9(r, s))), O("elements.clearSelection", () => (B9(r, []), M9(r, s))), O("elements.setHandle", (e) => (o9(r.slides.slides, e.elementId, e.slideId, r.slides.slideIndex), r.main.activeElementIdList.includes(e.elementId) || Snt(r, e), r.main.setHandleElementId(e.elementId), r.main.activeElementIdList.includes(r.main.activeGroupElementId) || r.main.setActiveGroupElementId(""), M9(r, s))), O("elements.group", (e) => {
|
|
121503
121525
|
let t = [...new Set(e.elementIds)];
|
|
121504
121526
|
if (!t.length) throw new b9("InvalidElementId", "At least one element ID is required", "elementIds");
|
|
121505
121527
|
let n = o9(r.slides.slides, t[0], e.slideId, r.slides.slideIndex), i = e.groupId || $7("group"), a = $(n.slide.elements), o = [];
|
|
@@ -121545,7 +121567,7 @@ function ert(e, t, n = {}) {
|
|
|
121545
121567
|
slideId: e.slideId,
|
|
121546
121568
|
hidden: !1
|
|
121547
121569
|
})), O("elements.setLink", (e) => {
|
|
121548
|
-
let t = o9(r.slides.slides, e.elementId, e.slideId, r.slides.slideIndex), n =
|
|
121570
|
+
let t = o9(r.slides.slides, e.elementId, e.slideId, r.slides.slideIndex), n = iet(e.link, r.slides.slides);
|
|
121549
121571
|
if (!n) {
|
|
121550
121572
|
let e = $(r.slides.slides), n = e[t.slideIndex]?.elements[t.elementIndex];
|
|
121551
121573
|
if (!n) throw Error("Element location is invalid");
|
|
@@ -121558,7 +121580,7 @@ function ert(e, t, n = {}) {
|
|
|
121558
121580
|
if (n.element.type !== "shape") throw Error(`Element is not a shape: ${e}`);
|
|
121559
121581
|
return n;
|
|
121560
121582
|
}, ee = (e = {}) => {
|
|
121561
|
-
let { slideId: t, index: n, select: i, presetId: a, categoryKey: o, presetIndex: s, preset: c, element: l, ...u } = e, d =
|
|
121583
|
+
let { slideId: t, index: n, select: i, presetId: a, categoryKey: o, presetIndex: s, preset: c, element: l, ...u } = e, d = Dnt(e), f = d ? {
|
|
121562
121584
|
viewBox: $(d.viewBox),
|
|
121563
121585
|
path: d.path,
|
|
121564
121586
|
...d.special ? { special: !0 } : {},
|
|
@@ -121567,8 +121589,8 @@ function ert(e, t, n = {}) {
|
|
|
121567
121589
|
...h || {},
|
|
121568
121590
|
...l?.outline || {},
|
|
121569
121591
|
...u.outline
|
|
121570
|
-
} : void 0 : l?.outline || h, _ = m ? u.text ?
|
|
121571
|
-
return
|
|
121592
|
+
} : void 0 : l?.outline || h, _ = m ? u.text ? Ont(r.slides.theme, l?.text, u.text) : void 0 : Ont(r.slides.theme, l?.text);
|
|
121593
|
+
return vet({
|
|
121572
121594
|
fill: r.slides.theme.themeColors[0] || "#ffffff",
|
|
121573
121595
|
fixedRatio: !1,
|
|
121574
121596
|
...f,
|
|
@@ -121579,9 +121601,9 @@ function ert(e, t, n = {}) {
|
|
|
121579
121601
|
});
|
|
121580
121602
|
}, H = (e, t, n) => {
|
|
121581
121603
|
let i = B(e, t), a = Q7(n);
|
|
121582
|
-
"text" in n && (a.text = n.text ?
|
|
121583
|
-
let o =
|
|
121584
|
-
return
|
|
121604
|
+
"text" in n && (a.text = n.text ? Ont(r.slides.theme, i.element.text, n.text) : void 0);
|
|
121605
|
+
let o = yet(i.element, a);
|
|
121606
|
+
return ynt(r, i.slideIndex, i.elementIndex, o);
|
|
121585
121607
|
}, U = (e, t) => {
|
|
121586
121608
|
let n = o9(r.slides.slides, e, t, r.slides.slideIndex);
|
|
121587
121609
|
if (n.element.type !== "latex") throw Error(`Element is not a LaTeX element: ${e}`);
|
|
@@ -121591,7 +121613,7 @@ function ert(e, t, n = {}) {
|
|
|
121591
121613
|
let t = o9(r.slides.slides, e.elementId, e.slideId, r.slides.slideIndex).element;
|
|
121592
121614
|
return t.type === "latex" ? $(t) : null;
|
|
121593
121615
|
}), O("latex.create", (e) => {
|
|
121594
|
-
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i =
|
|
121616
|
+
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = Cet(e.element), a = $(t.elements);
|
|
121595
121617
|
return a.splice(i9(e.index, a.length), 0, i), N9(r, n, { elements: a }), e.select !== !1 && r.main.setActiveElementIdList([i.id]), i;
|
|
121596
121618
|
}), O("latex.update", (e) => {
|
|
121597
121619
|
let t = U(e.elementId, e.slideId), n = {
|
|
@@ -121599,13 +121621,13 @@ function ert(e, t, n = {}) {
|
|
|
121599
121621
|
type: "latex"
|
|
121600
121622
|
}, i = typeof n.latex == "string" ? n.latex.trim() : "", a = typeof n.path == "string" && n.path.trim().length > 0;
|
|
121601
121623
|
if (i && i !== t.element.latex && !a) {
|
|
121602
|
-
let e =
|
|
121624
|
+
let e = xet(i);
|
|
121603
121625
|
n.latex = i, n.path = e.path, n.viewBox === void 0 && (n.viewBox = e.viewBox);
|
|
121604
121626
|
}
|
|
121605
121627
|
return P9(r, t.slideIndex, t.elementIndex, n);
|
|
121606
|
-
}), O("elements.setOutline", (e) => n9(e.elementId).map((t) => R9(r, t, e.slideId,
|
|
121628
|
+
}), O("elements.setOutline", (e) => n9(e.elementId).map((t) => R9(r, t, e.slideId, Jtt, "Outline", { outline: e.outline }))), O("elements.setShadow", (e) => n9(e.elementId).map((t) => R9(r, t, e.slideId, Ytt, "Shadow", { shadow: e.shadow }))), O("elements.setFill", (e) => n9(e.elementId).map((t) => {
|
|
121607
121629
|
let n = o9(r.slides.slides, t, e.slideId, r.slides.slideIndex);
|
|
121608
|
-
if (!
|
|
121630
|
+
if (!Xtt.includes(n.element.type)) throw Error(`Fill is not supported for ${n.element.type} element: ${t}`);
|
|
121609
121631
|
let i = n.element.type === "shape" ? {
|
|
121610
121632
|
fill: e.fill,
|
|
121611
121633
|
gradient: void 0,
|
|
@@ -121669,24 +121691,24 @@ function ert(e, t, n = {}) {
|
|
|
121669
121691
|
if (n.element.type !== "line") throw Error(`Element is not a line: ${e}`);
|
|
121670
121692
|
return n;
|
|
121671
121693
|
}, re = (e, t, n) => {
|
|
121672
|
-
let i = ne(e, t), a =
|
|
121673
|
-
return
|
|
121694
|
+
let i = ne(e, t), a = Oet(i.element, n);
|
|
121695
|
+
return ynt(r, i.slideIndex, i.elementIndex, a);
|
|
121674
121696
|
};
|
|
121675
121697
|
O("lines.get", (e) => {
|
|
121676
121698
|
let t = o9(r.slides.slides, e.elementId, e.slideId, r.slides.slideIndex).element;
|
|
121677
121699
|
return t.type === "line" ? $(t) : null;
|
|
121678
121700
|
}), O("lines.create", (e) => {
|
|
121679
|
-
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i =
|
|
121701
|
+
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = Det(e.element), a = $(t.elements);
|
|
121680
121702
|
return a.splice(i9(e.index, a.length), 0, i), N9(r, n, { elements: a }), e.select !== !1 && r.main.setActiveElementIdList([i.id]), i;
|
|
121681
121703
|
}), O("lines.update", (e) => re(e.elementId, e.slideId, e.patch)), O("lines.setStyle", (e) => re(e.elementId, e.slideId, e.style)), O("lines.setArrowheads", (e) => re(e.elementId, e.slideId, { points: e.points })), O("lines.setDirection", (e) => {
|
|
121682
121704
|
let t = e.direction === "auto" ? void 0 : e.direction;
|
|
121683
121705
|
return re(e.elementId, e.slideId, { broken2Direction: t });
|
|
121684
|
-
}), O("richText.setContent", (e) => P(e)), O("richText.setStyle", (e) => F(e)), O("richText.setParagraphAttrs", (e) => I(e)), O("animations.list", (e = {}) =>
|
|
121706
|
+
}), O("richText.setContent", (e) => P(e)), O("richText.setStyle", (e) => F(e)), O("richText.setParagraphAttrs", (e) => I(e)), O("animations.list", (e = {}) => Ant(r, e.slideId, e.elementId)), O("animations.catalog", () => Fnt()), O("animations.sequence", (e = {}) => Pnt(r, e.slideId)), O("animations.create", (e) => {
|
|
121685
121707
|
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex);
|
|
121686
121708
|
s9(t, e.animation.elId);
|
|
121687
|
-
let i =
|
|
121709
|
+
let i = jet(e.animation);
|
|
121688
121710
|
return N9(r, n, { animations: [...t.animations || [], i] }), i;
|
|
121689
|
-
}), O("animations.update", (e) =>
|
|
121711
|
+
}), O("animations.update", (e) => Nnt(r, e.slideId, e.animationId, e.patch)), O("animations.setTrigger", (e) => Nnt(r, e.slideId, e.animationId, { trigger: e.trigger })), O("animations.setDuration", (e) => Nnt(r, e.slideId, e.animationId, { duration: e.duration })), O("animations.delete", (e) => {
|
|
121690
121712
|
let t = n9(e.animationId), { slide: n, index: i } = a9(r.slides.slides, e.slideId, r.slides.slideIndex);
|
|
121691
121713
|
for (let e of t) {
|
|
121692
121714
|
let t = (n.animations || []).find((t) => t.id === e);
|
|
@@ -121714,7 +121736,7 @@ function ert(e, t, n = {}) {
|
|
|
121714
121736
|
}, r.slides.theme), u = $(s.elements);
|
|
121715
121737
|
return u.splice(i9(n, u.length), 0, l), N9(r, c, { elements: u }), i !== !1 && r.main.setActiveElementIdList([l.id]), l;
|
|
121716
121738
|
}), O("tables.update", (e) => {
|
|
121717
|
-
let t = G(e.elementId, e.slideId), n =
|
|
121739
|
+
let t = G(e.elementId, e.slideId), n = Bet(t.element, e.patch);
|
|
121718
121740
|
return P9(r, t.slideIndex, t.elementIndex, n);
|
|
121719
121741
|
}), O("tables.setCell", (e) => {
|
|
121720
121742
|
let t = G(e.elementId, e.slideId), { data: n, colWidths: i } = q9(t.element, $(t.element.data)), a = q7(e.row, n.length, "row"), o = q7(e.col, n[a]?.length || 0, "col");
|
|
@@ -121736,7 +121758,7 @@ function ert(e, t, n = {}) {
|
|
|
121736
121758
|
});
|
|
121737
121759
|
}), O("tables.insertRow", (e) => {
|
|
121738
121760
|
let t = G(e.elementId, e.slideId), n = Math.max(W9(t.element), 1), i = K9($(t.element.data), n);
|
|
121739
|
-
i.splice(i9(e.rowIndex, i.length), 0, Array.from({ length: n }, () =>
|
|
121761
|
+
i.splice(i9(e.rowIndex, i.length), 0, Array.from({ length: n }, () => Fet()));
|
|
121740
121762
|
let a = G9(t.element.colWidths, n);
|
|
121741
121763
|
return P9(r, t.slideIndex, t.elementIndex, {
|
|
121742
121764
|
data: i,
|
|
@@ -121753,7 +121775,7 @@ function ert(e, t, n = {}) {
|
|
|
121753
121775
|
});
|
|
121754
121776
|
}), O("tables.insertColumn", (e) => {
|
|
121755
121777
|
let t = G(e.elementId, e.slideId), n = W9(t.element), i = i9(e.colIndex, n), a = K9($(t.element.data), n);
|
|
121756
|
-
for (let e of a) e.splice(i, 0,
|
|
121778
|
+
for (let e of a) e.splice(i, 0, Fet());
|
|
121757
121779
|
let o = G9(t.element.colWidths, n);
|
|
121758
121780
|
return o.splice(i, 0, n > 0 ? 1 / n : 1), P9(r, t.slideIndex, t.elementIndex, {
|
|
121759
121781
|
data: a,
|
|
@@ -121784,7 +121806,7 @@ function ert(e, t, n = {}) {
|
|
|
121784
121806
|
colWidths: i
|
|
121785
121807
|
});
|
|
121786
121808
|
}), O("tables.splitCell", (e) => {
|
|
121787
|
-
let t = G(e.elementId, e.slideId), { data: n, colWidths: i } = q9(t.element, $(t.element.data)), a = q7(e.row, n.length, "row"), o = q7(e.col, n[a]?.length || 0, "col"), s =
|
|
121809
|
+
let t = G(e.elementId, e.slideId), { data: n, colWidths: i } = q9(t.element, $(t.element.data)), a = q7(e.row, n.length, "row"), o = q7(e.col, n[a]?.length || 0, "col"), s = Unt(n, a, o);
|
|
121788
121810
|
if (!s) throw Error(`Table cell not found: ${a},${o}`);
|
|
121789
121811
|
return s.cell.rowspan = 1, s.cell.colspan = 1, P9(r, t.slideIndex, t.elementIndex, {
|
|
121790
121812
|
data: n,
|
|
@@ -121919,7 +121941,7 @@ function ert(e, t, n = {}) {
|
|
|
121919
121941
|
let t = F9(r, e.elementId, e.slideId), n = {
|
|
121920
121942
|
...t.element.clip || {
|
|
121921
121943
|
shape: "rect",
|
|
121922
|
-
range: $(
|
|
121944
|
+
range: $(_nt)
|
|
121923
121945
|
},
|
|
121924
121946
|
range: $(e.range),
|
|
121925
121947
|
...e.shape ? { shape: e.shape } : {}
|
|
@@ -121930,7 +121952,7 @@ function ert(e, t, n = {}) {
|
|
|
121930
121952
|
return "shape" in e.mask && (e.mask.shape === void 0 ? i.push("clip") : n.clip = {
|
|
121931
121953
|
...t.element.clip || {
|
|
121932
121954
|
shape: "rect",
|
|
121933
|
-
range: $(
|
|
121955
|
+
range: $(_nt)
|
|
121934
121956
|
},
|
|
121935
121957
|
shape: e.mask.shape
|
|
121936
121958
|
}), "radius" in e.mask && (e.mask.radius === void 0 ? i.push("radius") : n.radius = e.mask.radius), "colorMask" in e.mask && (e.mask.colorMask === void 0 ? i.push("colorMask") : n.colorMask = e.mask.colorMask), I9(r, t.slideIndex, t.elementIndex, n, i);
|
|
@@ -121942,11 +121964,11 @@ function ert(e, t, n = {}) {
|
|
|
121942
121964
|
return I9(r, t.slideIndex, t.elementIndex, e.filters === void 0 ? {} : { filters: e.filters }, e.filters === void 0 ? ["filters"] : []);
|
|
121943
121965
|
}), O("images.setFilter", (e) => {
|
|
121944
121966
|
let t = F9(r, e.elementId, e.slideId), n = { ...t.element.filters || {} };
|
|
121945
|
-
return e.value === void 0 ? delete n[e.key] : n[e.key] =
|
|
121967
|
+
return e.value === void 0 ? delete n[e.key] : n[e.key] = vnt(e.key, e.value), I9(r, t.slideIndex, t.elementIndex, { filters: n });
|
|
121946
121968
|
}), O("images.setOpacity", (e) => {
|
|
121947
121969
|
let t = F9(r, e.elementId, e.slideId), n = {
|
|
121948
121970
|
...t.element.filters || {},
|
|
121949
|
-
opacity:
|
|
121971
|
+
opacity: vnt("opacity", e.opacity)
|
|
121950
121972
|
};
|
|
121951
121973
|
return I9(r, t.slideIndex, t.elementIndex, { filters: n });
|
|
121952
121974
|
}), O("images.setFlip", (e) => {
|
|
@@ -122031,14 +122053,14 @@ function ert(e, t, n = {}) {
|
|
|
122031
122053
|
ext: t.ext
|
|
122032
122054
|
});
|
|
122033
122055
|
}, ge = (e) => {
|
|
122034
|
-
let t = me(e.elementId, e.slideId), n = H9(
|
|
122056
|
+
let t = me(e.elementId, e.slideId), n = H9(met(e.patch));
|
|
122035
122057
|
return P9(r, t.slideIndex, t.elementIndex, {
|
|
122036
122058
|
...n,
|
|
122037
122059
|
type: "audio"
|
|
122038
122060
|
});
|
|
122039
122061
|
};
|
|
122040
122062
|
O("audio.get", (e) => $(me(e.elementId, e.slideId).element)), O("audio.create", (e) => {
|
|
122041
|
-
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i =
|
|
122063
|
+
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = pet(e, r.slides.theme.themeColors[0] || "#4472c4"), a = $(t.elements);
|
|
122042
122064
|
return a.splice(i9(e.index, a.length), 0, i), N9(r, n, { elements: a }), e.select !== !1 && r.main.setActiveElementIdList([i.id]), i;
|
|
122043
122065
|
}), O("audio.update", (e) => ge(e)), O("audio.setSource", (e) => ge({
|
|
122044
122066
|
elementId: e.elementId,
|
|
@@ -122057,10 +122079,10 @@ function ert(e, t, n = {}) {
|
|
|
122057
122079
|
slideId: e.slideId,
|
|
122058
122080
|
patch: { transform: e.transform }
|
|
122059
122081
|
})), O("notes.create", (e) => {
|
|
122060
|
-
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i =
|
|
122082
|
+
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = Met(e.note);
|
|
122061
122083
|
return i.elId && s9(t, i.elId), N9(r, n, { notes: [...t.notes || [], i] }), i;
|
|
122062
122084
|
}), O("notes.update", (e) => {
|
|
122063
|
-
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = $(t.notes || []), { noteIndex: a } = Y9(i, e.noteId), o =
|
|
122085
|
+
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = $(t.notes || []), { noteIndex: a } = Y9(i, e.noteId), o = Net(e.patch);
|
|
122064
122086
|
return o.elId && s9(t, o.elId), i[a] = {
|
|
122065
122087
|
...i[a],
|
|
122066
122088
|
...o
|
|
@@ -122069,9 +122091,9 @@ function ert(e, t, n = {}) {
|
|
|
122069
122091
|
let t = n9(e.noteId), { slide: n, index: i } = a9(r.slides.slides, e.slideId, r.slides.slideIndex);
|
|
122070
122092
|
return N9(r, i, { notes: (n.notes || []).filter((e) => !t.includes(e.id)) }), { deleted: t };
|
|
122071
122093
|
}), O("notes.reply", (e) => {
|
|
122072
|
-
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = $(t.notes || []), { note: a } = Y9(i, e.noteId), o =
|
|
122094
|
+
let { slide: t, index: n } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), i = $(t.notes || []), { note: a } = Y9(i, e.noteId), o = Pet(e.reply);
|
|
122073
122095
|
return a.replies = [...a.replies || [], o], N9(r, n, { notes: i }), o;
|
|
122074
|
-
}), O("sections.list", () =>
|
|
122096
|
+
}), O("sections.list", () => Hnt(r.slides.slides)), O("sections.set", (e) => {
|
|
122075
122097
|
if (!e.section?.id) throw Error("Section id is required");
|
|
122076
122098
|
let { index: t } = a9(r.slides.slides, e.slideId, r.slides.slideIndex), n = $(r.slides.slides);
|
|
122077
122099
|
for (let r = 0; r < n.length; r++) r !== t && n[r].sectionTag?.id === e.section.id && delete n[r].sectionTag;
|
|
@@ -122103,19 +122125,19 @@ function ert(e, t, n = {}) {
|
|
|
122103
122125
|
let a = t.splice(n.startIndex, n.slideIds.length), o = i > n.startIndex ? i - a.length : i;
|
|
122104
122126
|
return t.splice(i9(o, t.length), 0, ...a), r.slides.setSlides(t), r.slides.updateSlideIndex(r9(o, t.length)), $(t);
|
|
122105
122127
|
}), O("search.find", (e) => {
|
|
122106
|
-
let t =
|
|
122107
|
-
for (let e of r.slides.slides) for (let r of e.elements) r.type === "text" ? n.push(...
|
|
122128
|
+
let t = znt(e.query, e.options), n = [];
|
|
122129
|
+
for (let e of r.slides.slides) for (let r of e.elements) r.type === "text" ? n.push(...Bnt(r.content, t, {
|
|
122108
122130
|
slideId: e.id,
|
|
122109
122131
|
elementId: r.id,
|
|
122110
122132
|
elementType: r.type,
|
|
122111
122133
|
path: "content"
|
|
122112
|
-
})) : r.type === "shape" && r.text?.content ? n.push(...
|
|
122134
|
+
})) : r.type === "shape" && r.text?.content ? n.push(...Bnt(r.text.content, t, {
|
|
122113
122135
|
slideId: e.id,
|
|
122114
122136
|
elementId: r.id,
|
|
122115
122137
|
elementType: r.type,
|
|
122116
122138
|
path: "text.content"
|
|
122117
122139
|
})) : r.type === "table" && r.data.forEach((i, a) => i.forEach((i, o) => {
|
|
122118
|
-
n.push(...
|
|
122140
|
+
n.push(...Bnt(i.text, t, {
|
|
122119
122141
|
slideId: e.id,
|
|
122120
122142
|
elementId: r.id,
|
|
122121
122143
|
elementType: r.type,
|
|
@@ -122129,8 +122151,8 @@ function ert(e, t, n = {}) {
|
|
|
122129
122151
|
results: n
|
|
122130
122152
|
};
|
|
122131
122153
|
}), O("search.replace", (e) => {
|
|
122132
|
-
let t =
|
|
122133
|
-
let a =
|
|
122154
|
+
let t = znt(e.query, e.options), n = $(r.slides.slides), i = [], a = (n, r) => {
|
|
122155
|
+
let a = Gnt(n, t, e.replacement, e.options, r, (e) => i.length + e > 0);
|
|
122134
122156
|
return i.push(...a.results), a.text;
|
|
122135
122157
|
};
|
|
122136
122158
|
for (let e of n) for (let t of e.elements) t.type === "text" ? t.content = a(t.content, {
|
|
@@ -122157,7 +122179,7 @@ function ert(e, t, n = {}) {
|
|
|
122157
122179
|
count: i.length,
|
|
122158
122180
|
results: i
|
|
122159
122181
|
};
|
|
122160
|
-
}), O("history.commit", async () => M9(r, s)), O("history.undo", async () => (await r.snapshot.unDo(), M9(r, s))), O("history.redo", async () => (await r.snapshot.reDo(), M9(r, s))), O("view.goToSlide", (e) => (Q9(r, e.slideIdOrIndex), M9(r, s))), O("view.nextSlide", () => (Q9(r, r.slides.slideIndex + 1), M9(r, s))), O("view.previousSlide", () => (Q9(r, r.slides.slideIndex - 1), M9(r, s))), O("view.setZoom", (e) => (r.main.setCanvasScale(e.scale), M9(r, s))), O("view.enterPresentation", () => (r.screen.setScreening(!0), M9(r, s))), O("view.exitPresentation", () => (r.screen.setScreening(!1), M9(r, s))), O("view.setLocale", async (e) => (await (n.setLocale ||
|
|
122182
|
+
}), O("history.commit", async () => M9(r, s)), O("history.undo", async () => (await r.snapshot.unDo(), M9(r, s))), O("history.redo", async () => (await r.snapshot.reDo(), M9(r, s))), O("view.goToSlide", (e) => (Q9(r, e.slideIdOrIndex), M9(r, s))), O("view.nextSlide", () => (Q9(r, r.slides.slideIndex + 1), M9(r, s))), O("view.previousSlide", () => (Q9(r, r.slides.slideIndex - 1), M9(r, s))), O("view.setZoom", (e) => (r.main.setCanvasScale(e.scale), M9(r, s))), O("view.enterPresentation", () => (r.screen.setScreening(!0), M9(r, s))), O("view.exitPresentation", () => (r.screen.setScreening(!1), M9(r, s))), O("view.setLocale", async (e) => (await (n.setLocale || n9e)(e.locale), { locale: e.locale }));
|
|
122161
122183
|
let _e = async (e) => {
|
|
122162
122184
|
if (o) return h(e, /* @__PURE__ */ Error("PPTist controller has been destroyed"));
|
|
122163
122185
|
let t = T9(r), n = s;
|
|
@@ -122330,8 +122352,8 @@ function ert(e, t, n = {}) {
|
|
|
122330
122352
|
},
|
|
122331
122353
|
markdownToHtml: (e) => T1(e),
|
|
122332
122354
|
docs: () => $(y9),
|
|
122333
|
-
domains: () =>
|
|
122334
|
-
describe: (e) =>
|
|
122355
|
+
domains: () => Ktt(D),
|
|
122356
|
+
describe: (e) => Gtt(D, e),
|
|
122335
122357
|
guides: (e) => $(e ? y9.guides.find((t) => t.id === e) ?? null : y9.guides),
|
|
122336
122358
|
deck: {
|
|
122337
122359
|
get: () => w9(r),
|
|
@@ -122346,7 +122368,7 @@ function ert(e, t, n = {}) {
|
|
|
122346
122368
|
theme: e,
|
|
122347
122369
|
options: t
|
|
122348
122370
|
}, n),
|
|
122349
|
-
extractTheme: (e) =>
|
|
122371
|
+
extractTheme: (e) => ant(r, e),
|
|
122350
122372
|
setViewport: (e, t) => q("deck.setViewport", e, t),
|
|
122351
122373
|
setTemplates: (e, t) => q("deck.setTemplates", { templates: e }, t)
|
|
122352
122374
|
},
|
|
@@ -122403,11 +122425,11 @@ function ert(e, t, n = {}) {
|
|
|
122403
122425
|
}, n)
|
|
122404
122426
|
},
|
|
122405
122427
|
templates: {
|
|
122406
|
-
catalog: () =>
|
|
122428
|
+
catalog: () => Jet(),
|
|
122407
122429
|
slidesCatalog: (e, t) => q("templates.slidesCatalog", { templateId: e }, t)
|
|
122408
122430
|
},
|
|
122409
|
-
styles: { catalog: () =>
|
|
122410
|
-
layouts: { catalog: () =>
|
|
122431
|
+
styles: { catalog: () => Htt() },
|
|
122432
|
+
layouts: { catalog: () => Itt() },
|
|
122411
122433
|
elements: {
|
|
122412
122434
|
list: (e) => $(a9(r.slides.slides, e, r.slides.slideIndex).slide.elements),
|
|
122413
122435
|
get: (e, t) => $(o9(r.slides.slides, e, t, r.slides.slideIndex).element),
|
|
@@ -122589,7 +122611,7 @@ function ert(e, t, n = {}) {
|
|
|
122589
122611
|
}, n)
|
|
122590
122612
|
},
|
|
122591
122613
|
shapes: {
|
|
122592
|
-
presets: (e) =>
|
|
122614
|
+
presets: (e) => Ent(e),
|
|
122593
122615
|
get: (e, t) => {
|
|
122594
122616
|
let n = o9(r.slides.slides, e, t, r.slides.slideIndex).element;
|
|
122595
122617
|
return n.type === "shape" ? $(n) : null;
|
|
@@ -122654,7 +122676,7 @@ function ert(e, t, n = {}) {
|
|
|
122654
122676
|
fill: t
|
|
122655
122677
|
},
|
|
122656
122678
|
meta: n
|
|
122657
|
-
}, () => H(e, n?.slideId,
|
|
122679
|
+
}, () => H(e, n?.slideId, knt(t))),
|
|
122658
122680
|
setOutline: (e, t, n) => S({
|
|
122659
122681
|
type: "shapes.setOutline",
|
|
122660
122682
|
payload: {
|
|
@@ -122748,9 +122770,9 @@ function ert(e, t, n = {}) {
|
|
|
122748
122770
|
audio: (e, t, n) => Se("audio", e, t, n)
|
|
122749
122771
|
},
|
|
122750
122772
|
animations: {
|
|
122751
|
-
list: (e, t) =>
|
|
122752
|
-
catalog: () =>
|
|
122753
|
-
sequence: (e) =>
|
|
122773
|
+
list: (e, t) => Ant(r, e, t),
|
|
122774
|
+
catalog: () => Fnt(),
|
|
122775
|
+
sequence: (e) => Pnt(r, e),
|
|
122754
122776
|
create: (e, t, n) => q("animations.create", {
|
|
122755
122777
|
slideId: e,
|
|
122756
122778
|
animation: t
|
|
@@ -123126,7 +123148,7 @@ function ert(e, t, n = {}) {
|
|
|
123126
123148
|
meta: a
|
|
123127
123149
|
};
|
|
123128
123150
|
try {
|
|
123129
|
-
let { note: o } = Y9(a9(r.slides.slides, e, r.slides.slideIndex).slide.notes || [], t), s = $(o.replies || []), { replyIndex: c } =
|
|
123151
|
+
let { note: o } = Y9(a9(r.slides.slides, e, r.slides.slideIndex).slide.notes || [], t), s = $(o.replies || []), { replyIndex: c } = Knt(s, n), l = {
|
|
123130
123152
|
...s[c],
|
|
123131
123153
|
...$(i)
|
|
123132
123154
|
};
|
|
@@ -123161,7 +123183,7 @@ function ert(e, t, n = {}) {
|
|
|
123161
123183
|
};
|
|
123162
123184
|
try {
|
|
123163
123185
|
let a = n9(n), { note: o } = Y9(a9(r.slides.slides, e, r.slides.slideIndex).slide.notes || [], t), s = $(o.replies || []);
|
|
123164
|
-
for (let e of a)
|
|
123186
|
+
for (let e of a) Knt(s, e);
|
|
123165
123187
|
let c = await q("notes.update", {
|
|
123166
123188
|
slideId: e,
|
|
123167
123189
|
noteId: t,
|
|
@@ -123201,7 +123223,7 @@ function ert(e, t, n = {}) {
|
|
|
123201
123223
|
sectionId: e,
|
|
123202
123224
|
toIndex: t
|
|
123203
123225
|
}, n),
|
|
123204
|
-
list: () =>
|
|
123226
|
+
list: () => Hnt(r.slides.slides)
|
|
123205
123227
|
},
|
|
123206
123228
|
search: {
|
|
123207
123229
|
find: (e, t) => q("search.find", {
|
|
@@ -123266,23 +123288,23 @@ function ert(e, t, n = {}) {
|
|
|
123266
123288
|
}
|
|
123267
123289
|
//#endregion
|
|
123268
123290
|
//#region src/embed/createController.ts
|
|
123269
|
-
function
|
|
123291
|
+
function nrt(e, t) {
|
|
123270
123292
|
let n, r = ((...r) => {
|
|
123271
123293
|
clearTimeout(n), n = setTimeout(() => e(...r), t);
|
|
123272
123294
|
});
|
|
123273
123295
|
return r.cancel = () => clearTimeout(n), r;
|
|
123274
123296
|
}
|
|
123275
|
-
function
|
|
123297
|
+
function rrt(e, t) {
|
|
123276
123298
|
return Number.isFinite(e) ? Math.max(0, Math.min(Math.trunc(e), Math.max(t - 1, 0))) : 0;
|
|
123277
123299
|
}
|
|
123278
|
-
async function
|
|
123300
|
+
async function irt(e) {
|
|
123279
123301
|
let t = await e;
|
|
123280
123302
|
if (!t.ok) throw Error(t.errors?.map((e) => e.message).join("; ") || "PPTist command failed");
|
|
123281
123303
|
}
|
|
123282
|
-
function
|
|
123283
|
-
let r = ss(e), i = Os(e), a =
|
|
123284
|
-
await
|
|
123285
|
-
} }), o = n.onChange ?
|
|
123304
|
+
function art(e, t, n) {
|
|
123305
|
+
let r = ss(e), i = Os(e), a = trt(e, t, { async setLocale(e) {
|
|
123306
|
+
await n9e(e), r.setTemplates(is());
|
|
123307
|
+
} }), o = n.onChange ? nrt(() => {
|
|
123286
123308
|
n.onChange?.({
|
|
123287
123309
|
title: r.title,
|
|
123288
123310
|
slides: JSON.parse(JSON.stringify(r.slides)),
|
|
@@ -123293,7 +123315,7 @@ function irt(e, t, n) {
|
|
|
123293
123315
|
r.slides,
|
|
123294
123316
|
r.theme
|
|
123295
123317
|
], () => o(), { deep: !0 }) : null, c = n.onPresentationModeChange ? V(() => i.screening, (e) => n.onPresentationModeChange?.(e)) : null, l = !1, u = (e) => {
|
|
123296
|
-
let t = typeof e == "number" ?
|
|
123318
|
+
let t = typeof e == "number" ? rrt(e, r.slides.length) : r.slides.findIndex((t) => t.id === e);
|
|
123297
123319
|
if (t < 0) throw Error(`Slide not found: ${e}`);
|
|
123298
123320
|
return t;
|
|
123299
123321
|
};
|
|
@@ -123309,7 +123331,7 @@ function irt(e, t, n) {
|
|
|
123309
123331
|
l || a.api.deck.setTitle(e, { source: "host" });
|
|
123310
123332
|
},
|
|
123311
123333
|
async setLocale(e) {
|
|
123312
|
-
l || await
|
|
123334
|
+
l || await irt(a.api.view.setLocale(e));
|
|
123313
123335
|
},
|
|
123314
123336
|
goToSlide(e) {
|
|
123315
123337
|
l || (u(e), a.api.view.goToSlide(e, { source: "host" }));
|
|
@@ -123337,7 +123359,7 @@ function irt(e, t, n) {
|
|
|
123337
123359
|
//#endregion
|
|
123338
123360
|
//#region src/embed/mount.ts
|
|
123339
123361
|
var $9 = /* @__PURE__ */ new WeakMap();
|
|
123340
|
-
function
|
|
123362
|
+
function ort(e) {
|
|
123341
123363
|
if (typeof e == "string") {
|
|
123342
123364
|
let t = document.querySelector(e);
|
|
123343
123365
|
if (!t) throw Error(`PPTist mount target not found: ${e}`);
|
|
@@ -123345,8 +123367,8 @@ function art(e) {
|
|
|
123345
123367
|
}
|
|
123346
123368
|
return e;
|
|
123347
123369
|
}
|
|
123348
|
-
async function
|
|
123349
|
-
let n =
|
|
123370
|
+
async function srt(e, t = {}) {
|
|
123371
|
+
let n = ort(e), r = $9.get(n);
|
|
123350
123372
|
if (r) try {
|
|
123351
123373
|
(await r).controller.destroy();
|
|
123352
123374
|
} catch {}
|
|
@@ -123357,10 +123379,10 @@ async function ort(e, t = {}) {
|
|
|
123357
123379
|
let r = document.createElement("div");
|
|
123358
123380
|
r.className = "pptist-embed-portal", n.appendChild(e), n.appendChild(r), Mc(r), ns(t.assetBaseUrl), Fi(t.exportTabs), lVe(t.templateLoaders);
|
|
123359
123381
|
let o = t.locale ?? Xo();
|
|
123360
|
-
Zo(o), await
|
|
123361
|
-
let s = ne(), c = a(
|
|
123362
|
-
c.use(
|
|
123363
|
-
let l =
|
|
123382
|
+
Zo(o), await n9e(o);
|
|
123383
|
+
let s = ne(), c = a(i9e, { init: t });
|
|
123384
|
+
c.use(y9e), c.use(s), c.use(qd, o), c.mount(e);
|
|
123385
|
+
let l = art(s, c, {
|
|
123364
123386
|
onChange: t.onChange,
|
|
123365
123387
|
onChangeDebounceMs: t.onChangeDebounceMs,
|
|
123366
123388
|
onPresentationModeChange: t.onPresentationModeChange
|
|
@@ -123380,8 +123402,8 @@ async function ort(e, t = {}) {
|
|
|
123380
123402
|
throw $9.get(n) === i && $9.delete(n), e;
|
|
123381
123403
|
}
|
|
123382
123404
|
}
|
|
123383
|
-
async function
|
|
123405
|
+
async function crt(e) {
|
|
123384
123406
|
e.controller.destroy();
|
|
123385
123407
|
}
|
|
123386
123408
|
//#endregion
|
|
123387
|
-
export { me as i,
|
|
123409
|
+
export { me as i, srt as mountPptist, ue as n, de as r, K as t, crt as unmountPptist };
|