test-bentoweb-ui 1.0.73 → 1.0.75

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.
@@ -0,0 +1,27 @@
1
+ import { V as c, a as i, b as a } from "./prod-DTLJXtPo.js";
2
+ const n = /,/g, u = "-->";
3
+ class o extends c {
4
+ parse(s, e) {
5
+ var h, r;
6
+ if (s === "")
7
+ this.c && (this.l.push(this.c), (r = (h = this.h).onCue) == null || r.call(h, this.c), this.c = null), this.e = i.None;
8
+ else if (this.e === i.Cue)
9
+ this.c.text += (this.c.text ? `
10
+ ` : "") + s;
11
+ else if (s.includes(u)) {
12
+ const t = this.q(s, e);
13
+ t && (this.c = new a(t[0], t[1], t[2].join(" ")), this.c.id = this.n, this.e = i.Cue);
14
+ }
15
+ this.n = s;
16
+ }
17
+ q(s, e) {
18
+ return super.q(s.replace(n, "."), e);
19
+ }
20
+ }
21
+ function l() {
22
+ return new o();
23
+ }
24
+ export {
25
+ o as SRTParser,
26
+ l as default
27
+ };
@@ -0,0 +1,209 @@
1
+ var F = Object.defineProperty;
2
+ var A = (c, t, s) => t in c ? F(c, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : c[t] = s;
3
+ var u = (c, t, s) => A(c, typeof t != "symbol" ? t + "" : t, s);
4
+ import { b as L, p as y } from "./prod-DTLJXtPo.js";
5
+ const S = /^Format:[\s\t]*/, O = /^Style:[\s\t]*/, _ = /^Dialogue:[\s\t]*/, d = /[\s\t]*,[\s\t]*/, w = /\{[^}]+\}/g, I = /\\N/g, x = /^\[(.*)[\s\t]?Styles\]$/, k = /^\[(.*)[\s\t]?Events\]$/;
6
+ class $ {
7
+ constructor() {
8
+ u(this, "h");
9
+ u(this, "O", 0);
10
+ u(this, "c", null);
11
+ u(this, "l", []);
12
+ u(this, "m", []);
13
+ u(this, "N", null);
14
+ u(this, "f");
15
+ u(this, "P", {});
16
+ }
17
+ async init(t) {
18
+ this.h = t, t.errors && (this.f = (await import("./errors-DCJKAXTz.js")).ParseErrorBuilder);
19
+ }
20
+ parse(t, s) {
21
+ var e, a;
22
+ if (this.O)
23
+ switch (this.O) {
24
+ case 1:
25
+ if (t === "")
26
+ this.O = 0;
27
+ else if (O.test(t))
28
+ if (this.N) {
29
+ const i = t.replace(O, "").split(d);
30
+ this.S(i);
31
+ } else
32
+ this.g((e = this.f) == null ? void 0 : e.T("Style", s));
33
+ else S.test(t) ? this.N = t.replace(S, "").split(d) : k.test(t) && (this.N = null, this.O = 2);
34
+ break;
35
+ case 2:
36
+ if (t === "")
37
+ this.Q();
38
+ else if (_.test(t))
39
+ if (this.Q(), this.N) {
40
+ const i = t.replace(_, "").split(d), r = this.U(i, s);
41
+ r && (this.c = r);
42
+ } else
43
+ this.g((a = this.f) == null ? void 0 : a.T("Dialogue", s));
44
+ else this.c ? this.c.text += `
45
+ ` + t.replace(w, "").replace(I, `
46
+ `) : S.test(t) ? this.N = t.replace(S, "").split(d) : x.test(t) ? (this.N = null, this.O = 1) : k.test(t) && (this.N = null);
47
+ }
48
+ else t === "" || (x.test(t) ? (this.N = null, this.O = 1) : k.test(t) && (this.N = null, this.O = 2));
49
+ }
50
+ done() {
51
+ return {
52
+ metadata: {},
53
+ cues: this.l,
54
+ regions: [],
55
+ errors: this.m
56
+ };
57
+ }
58
+ Q() {
59
+ var t, s;
60
+ this.c && (this.l.push(this.c), (s = (t = this.h).onCue) == null || s.call(t, this.c), this.c = null);
61
+ }
62
+ S(t) {
63
+ let s = "Default", e = {}, a, i = "center", r = "bottom", f, n = 1.2, o, p, h = 3, b = [];
64
+ for (let g = 0; g < this.N.length; g++) {
65
+ const M = this.N[g], l = t[g];
66
+ switch (M) {
67
+ case "Name":
68
+ s = l;
69
+ break;
70
+ case "Fontname":
71
+ e["font-family"] = l;
72
+ break;
73
+ case "Fontsize":
74
+ e["font-size"] = `calc(${l} / var(--overlay-height))`;
75
+ break;
76
+ case "PrimaryColour":
77
+ const E = N(l);
78
+ E && (e["--cue-color"] = E);
79
+ break;
80
+ case "BorderStyle":
81
+ h = parseInt(l, 10);
82
+ break;
83
+ case "BackColour":
84
+ p = N(l);
85
+ break;
86
+ case "OutlineColour":
87
+ const R = N(l);
88
+ R && (o = R);
89
+ break;
90
+ case "Bold":
91
+ parseInt(l) && (e["font-weight"] = "bold");
92
+ break;
93
+ case "Italic":
94
+ parseInt(l) && (e["font-style"] = "italic");
95
+ break;
96
+ case "Underline":
97
+ parseInt(l) && (e["text-decoration"] = "underline");
98
+ break;
99
+ case "StrikeOut":
100
+ parseInt(l) && (e["text-decoration"] = "line-through");
101
+ break;
102
+ case "Spacing":
103
+ e["letter-spacing"] = l + "px";
104
+ break;
105
+ case "AlphaLevel":
106
+ e.opacity = parseFloat(l);
107
+ break;
108
+ case "ScaleX":
109
+ b.push(`scaleX(${parseFloat(l) / 100})`);
110
+ break;
111
+ case "ScaleY":
112
+ b.push(`scaleY(${parseFloat(l) / 100})`);
113
+ break;
114
+ case "Angle":
115
+ b.push(`rotate(${l}deg)`);
116
+ break;
117
+ case "Shadow":
118
+ n = parseInt(l, 10) * 1.2;
119
+ break;
120
+ case "MarginL":
121
+ e["--cue-width"] = "auto", e["--cue-left"] = parseFloat(l) + "px";
122
+ break;
123
+ case "MarginR":
124
+ e["--cue-width"] = "auto", e["--cue-right"] = parseFloat(l) + "px";
125
+ break;
126
+ case "MarginV":
127
+ f = parseFloat(l);
128
+ break;
129
+ case "Outline":
130
+ a = parseInt(l, 10);
131
+ break;
132
+ case "Alignment":
133
+ const m = parseInt(l, 10);
134
+ switch (m >= 4 && (r = m >= 7 ? "top" : "center"), m % 3) {
135
+ case 1:
136
+ i = "start";
137
+ break;
138
+ case 2:
139
+ i = "center";
140
+ break;
141
+ case 3:
142
+ i = "end";
143
+ break;
144
+ }
145
+ }
146
+ }
147
+ if (e.R = r, e["--cue-white-space"] = "normal", e["--cue-line-height"] = "normal", e["--cue-text-align"] = i, r === "center" ? (e["--cue-top"] = "50%", b.push("translateY(-50%)")) : e[`--cue-${r}`] = (f || 0) + "px", h === 1 && (e["--cue-padding-y"] = "0"), (h === 1 || p) && (e["--cue-bg-color"] = h === 1 ? "none" : p), h === 3 && o && (e["--cue-outline"] = `${a}px solid ${o}`), h === 1 && typeof a == "number") {
148
+ const g = p ?? "#000";
149
+ e["--cue-text-shadow"] = [
150
+ o && T(a * 1.2, n * 1.2, o),
151
+ o ? T(a * (a / 2), n * (a / 2), g) : T(a, n, g)
152
+ ].filter(Boolean).join(", ");
153
+ }
154
+ b.length && (e["--cue-transform"] = b.join(" ")), this.P[s] = e;
155
+ }
156
+ U(t, s) {
157
+ const e = this.V(t), a = this.q(e.Start, e.End, s);
158
+ if (!a)
159
+ return;
160
+ const i = new L(a[0], a[1], ""), r = { ...this.P[e.Style] || {} }, f = e.Name ? `<v ${e.Name}>` : "", n = r.R, o = e.MarginL && parseFloat(e.MarginL), p = e.MarginR && parseFloat(e.MarginR), h = e.MarginV && parseFloat(e.MarginV);
161
+ return o && (r["--cue-width"] = "auto", r["--cue-left"] = o + "px"), p && (r["--cue-width"] = "auto", r["--cue-right"] = p + "px"), h && n !== "center" && (r[`--cue-${n}`] = h + "px"), i.text = f + t.slice(this.N.length - 1).join(", ").replace(w, "").replace(I, `
162
+ `), delete r.R, Object.keys(r).length && (i.style = r), i;
163
+ }
164
+ V(t) {
165
+ const s = {};
166
+ for (let e = 0; e < this.N.length; e++)
167
+ s[this.N[e]] = t[e];
168
+ return s;
169
+ }
170
+ q(t, s, e) {
171
+ var r, f, n;
172
+ const a = y(t), i = y(s);
173
+ if (a !== null && i !== null && i > a)
174
+ return [a, i];
175
+ a === null && this.g((r = this.f) == null ? void 0 : r.s(t, e)), i === null && this.g((f = this.f) == null ? void 0 : f.t(s, e)), a != null && i !== null && i > a && this.g((n = this.f) == null ? void 0 : n.u(a, i, e));
176
+ }
177
+ g(t) {
178
+ var s, e;
179
+ if (t) {
180
+ if (this.m.push(t), this.h.strict)
181
+ throw this.h.cancel(), t;
182
+ (e = (s = this.h).onError) == null || e.call(s, t);
183
+ }
184
+ }
185
+ }
186
+ function N(c) {
187
+ const t = parseInt(c.replace("&H", ""), 16);
188
+ if (t >= 0) {
189
+ const e = (t >> 24 & 255 ^ 255) / 255, a = t >> 16 & 255, i = t >> 8 & 255;
190
+ return "rgba(" + [t & 255, i, a, e].join(",") + ")";
191
+ }
192
+ return null;
193
+ }
194
+ function T(c, t, s) {
195
+ const e = Math.ceil(2 * Math.PI * c);
196
+ let a = "";
197
+ for (let i = 0; i < e; i++) {
198
+ const r = 2 * Math.PI * i / e;
199
+ a += c * Math.cos(r) + "px " + t * Math.sin(r) + "px 0 " + s + (i == e - 1 ? "" : ",");
200
+ }
201
+ return a;
202
+ }
203
+ function v() {
204
+ return new $();
205
+ }
206
+ export {
207
+ $ as SSAParser,
208
+ v as default
209
+ };
@@ -0,0 +1,55 @@
1
+ import { U as b, V as d, W as e, X as s, Y as l, Z as c, I as f, _ as a, $ as o, a0 as u, a1 as n, a2 as I, a3 as $, a4 as i, a5 as p, a6 as w, a7 as y, a8 as g, a9 as h, aa as x, ab as v, ac as q, ad as z, ae as j, af as t, ag as m, ah as k, ai as r, aj as U, ak as V, al as W } from "./index-CJNQa9oe.js";
2
+ const Y = {
3
+ airplay: b,
4
+ download: d,
5
+ play: e,
6
+ pause: s,
7
+ replay: l,
8
+ mute: c,
9
+ "google-cast": f,
10
+ "volume-low": a,
11
+ "volume-high": o,
12
+ "cc-on": u,
13
+ "cc-off": n,
14
+ "pip-enter": I,
15
+ "pip-exit": $,
16
+ "fs-enter": i,
17
+ "fs-exit": p,
18
+ "seek-forward": w,
19
+ "seek-backward": y,
20
+ "menu-chapters": g,
21
+ "menu-settings": h,
22
+ "menu-arrow-left": x,
23
+ "menu-arrow-right": v,
24
+ "menu-accessibility": q,
25
+ "menu-audio": z,
26
+ "menu-audio-boost-up": o,
27
+ "menu-audio-boost-down": a,
28
+ "menu-playback": j,
29
+ "menu-speed-up": t,
30
+ "menu-speed-down": m,
31
+ "menu-captions": n,
32
+ "menu-quality-up": k,
33
+ "menu-quality-down": r,
34
+ "menu-radio-check": U,
35
+ "menu-font-size-up": k,
36
+ "menu-font-size-down": r,
37
+ "menu-opacity-up": V,
38
+ "menu-opacity-down": W,
39
+ "kb-play": e,
40
+ "kb-pause": s,
41
+ "kb-mute": c,
42
+ "kb-volume-up": o,
43
+ "kb-volume-down": a,
44
+ "kb-fs-enter": i,
45
+ "kb-fs-exit": p,
46
+ "kb-pip-enter": I,
47
+ "kb-pip-exit": $,
48
+ "kb-cc-on": u,
49
+ "kb-cc-off": n,
50
+ "kb-seek-forward": t,
51
+ "kb-seek-backward": m
52
+ };
53
+ export {
54
+ Y as icons
55
+ };