@webitel/ui-sdk 26.6.34 → 26.6.36

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.
Files changed (182) hide show
  1. package/dist/AgentStatus.enum-C3IGHtvR.js +9 -0
  2. package/dist/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
  3. package/dist/caseConverters-DXegZoCt.js +27 -0
  4. package/dist/chunk-CY3AvKd6.js +20 -0
  5. package/dist/clients-A6MHYfOX.js +36118 -0
  6. package/dist/components-DFOWyAAb.js +5395 -0
  7. package/dist/composables-DnDH-KUv.js +263 -0
  8. package/dist/convertDuration-1K7fuEpO.js +8 -0
  9. package/dist/debounce-DrmECuJ2.js +128 -0
  10. package/dist/deep-copy-CQw5yeEH.js +41 -0
  11. package/dist/displayText-CtaxzaBz.js +3 -0
  12. package/dist/dist-05Bf47Wg.js +87 -0
  13. package/dist/dist-BYiYpK00.js +7 -0
  14. package/dist/dist-Dz55hlwp.js +1371 -0
  15. package/dist/engineCallFileType-D7QVFOac.js +11 -0
  16. package/dist/enums-pbYAJNeb.js +158 -0
  17. package/dist/errors-SUXKojVW.js +69 -0
  18. package/dist/floating-ui.dom-n2j9PKCB.js +842 -0
  19. package/dist/generateInstance-ppTIeLX4.js +2582 -0
  20. package/dist/isObject-Dgs_L5xI.js +11 -0
  21. package/dist/logger-hl3ueNok.js +47 -0
  22. package/dist/prod-Cp0BjuxI.js +775 -0
  23. package/dist/prod-DSuxcp5t.js +2 -0
  24. package/dist/side-channel-Cyte-MzW.js +833 -0
  25. package/dist/sortQueryAdapters-CyYXvnDN.js +14 -0
  26. package/dist/srt-parser-DdH5U08c.js +21 -0
  27. package/dist/ssa-parser-Bjs7yDD1.js +184 -0
  28. package/dist/ui-sdk.css +2 -1
  29. package/dist/ui-sdk.js +34567 -4
  30. package/dist/ui-sdk.umd.cjs +7748 -7606
  31. package/dist/useExpansion-DVdIpoOn.js +24 -0
  32. package/dist/useValidation-DG0tifBv.js +37 -0
  33. package/dist/useVidstackSrc-DfNrFbOO.js +155 -0
  34. package/dist/useWtTable-tqmVOvve.js +12 -0
  35. package/dist/vidstack-B01xzxC4-DeYSgDZy.js +7 -0
  36. package/dist/vidstack-BGSTndAW-CyKM_CM4.js +957 -0
  37. package/dist/vidstack-BQlOPwOu-ChhdffAJ.js +43 -0
  38. package/dist/vidstack-Bq6c3Bam-3dCf_D36.js +398 -0
  39. package/dist/vidstack-C2US-gSO-DeIgENrW.js +127 -0
  40. package/dist/vidstack-C9vIqaYT-C1EgPq17.js +9 -0
  41. package/dist/vidstack-CTojmhKq-D7sZJxgm.js +30 -0
  42. package/dist/vidstack-ChQTHmIQ-nTO94M6P.js +51 -0
  43. package/dist/vidstack-Ci54COQW-CAAXpwzv.js +208 -0
  44. package/dist/vidstack-D2pY00kU-DoW028io.js +70 -0
  45. package/dist/vidstack-D5EzK014-DOe01V3H.js +14 -0
  46. package/dist/vidstack-DDXt6fpN-Don_e6LS.js +42 -0
  47. package/dist/vidstack-D_-9AA6_-Dq3APB0-.js +19 -0
  48. package/dist/vidstack-Dihypf8P-ibWMCHK-.js +12 -0
  49. package/dist/vidstack-Dm1xEU9Q-VlefmrP8.js +31 -0
  50. package/dist/vidstack-DqAw8m9J-Dk1GT3Oe.js +22 -0
  51. package/dist/vidstack-audio-B58bvsna.js +23 -0
  52. package/dist/vidstack-dash-CX-LTHx3.js +332 -0
  53. package/dist/vidstack-google-cast-Co5Q_rfL.js +361 -0
  54. package/dist/vidstack-hls-CLzdTFu6.js +269 -0
  55. package/dist/vidstack-krOAtKMi-DN1WZC3p.js +30 -0
  56. package/dist/vidstack-video-XtP8iTBc.js +151 -0
  57. package/dist/vidstack-vimeo-EzzPpggD.js +386 -0
  58. package/dist/vidstack-youtube-C1_NAfWa.js +205 -0
  59. package/dist/vue-i18n-B8Px6VcD.js +2201 -0
  60. package/dist/wt-action-bar-Ba1ZJjE_.js +85 -0
  61. package/dist/wt-button-DENbrKdy.js +785 -0
  62. package/dist/wt-button-select-BnRHgJ4i.js +80 -0
  63. package/dist/wt-call-media-action-Bkyppnsm.js +42 -0
  64. package/dist/wt-chat-emoji-D3SBme6f.js +2208 -0
  65. package/dist/wt-confirm-dialog-DCUitG2v.js +70 -0
  66. package/dist/wt-context-menu-yW52oF-2.js +89 -0
  67. package/dist/wt-copy-action-d9gVzAsB.js +38 -0
  68. package/dist/wt-datepicker-Cnbarx_j.js +5774 -0
  69. package/dist/wt-display-chip-items-DagfTTIq.js +34 -0
  70. package/dist/wt-dual-panel-DAhTYFS_.js +49 -0
  71. package/dist/wt-dummy-CLjhRWZ6.js +59 -0
  72. package/dist/wt-error-page-vhu4lIyF.js +62 -0
  73. package/dist/wt-expand-transition-C2p9bR4j.js +39 -0
  74. package/dist/wt-expansion-card-qsxvbtZm.js +47 -0
  75. package/dist/wt-expansion-panel-C_EXvx1d.js +40 -0
  76. package/dist/wt-filters-panel-wrapper-Cc9b3aci.js +51 -0
  77. package/dist/wt-galleria-CWXKuZTD.js +224 -0
  78. package/dist/wt-icon-action-CQlZHMDB.js +100 -0
  79. package/dist/wt-icon-btn-CjjI4cgE.js +107 -0
  80. package/dist/wt-icon-pxO7IjwV.js +1026 -0
  81. package/dist/wt-inline-add-panel-B0E4Vk2l.js +43 -0
  82. package/dist/wt-navigation-menu-CenQi_-T.js +126 -0
  83. package/dist/wt-notifications-bar-Ep1QuFZi.js +52 -0
  84. package/dist/wt-page-header-CDbd4aOh.js +59 -0
  85. package/dist/wt-pagination-BA_PZPIE.js +94 -0
  86. package/dist/wt-player-uidPXSTe.js +287 -0
  87. package/dist/wt-popover-CJZH3wMl.js +98 -0
  88. package/dist/wt-screen-recordings-action-Dg7Ts2Jt.js +37 -0
  89. package/dist/wt-search-bar-CWZdvAOf.js +123 -0
  90. package/dist/wt-selection-popup-B77UY7Yu.js +79 -0
  91. package/dist/wt-send-message-popup-CltYZA9D.js +77 -0
  92. package/dist/wt-slider-BS3SoGht.js +68 -0
  93. package/dist/wt-start-page-eN1PEokc.js +86 -0
  94. package/dist/wt-status-select-A5t6Vjm4.js +101 -0
  95. package/dist/wt-stepper-B6zpd1Uh.js +41 -0
  96. package/dist/wt-table-D0FynxIE.js +364 -0
  97. package/dist/wt-table-actions-4-peSVkc.js +63 -0
  98. package/dist/wt-table-column-select-DFF6z3a3.js +100 -0
  99. package/dist/wt-tabs-DuOgj-lZ.js +60 -0
  100. package/dist/wt-time-input-CO2cop3y.js +62 -0
  101. package/dist/wt-timepicker-BltFF1QD.js +145 -0
  102. package/dist/wt-tree-ZyoPrNOl.js +1206 -0
  103. package/dist/wt-tree-table-MLET4gIv.js +221 -0
  104. package/dist/wt-type-extension-value-input-028o8xRF.js +104 -0
  105. package/dist/wt-vidstack-player-B-WSB_Be.js +7440 -0
  106. package/package.json +5 -5
  107. package/src/components/wt-multi-select/wt-multi-select.vue +3 -0
  108. package/src/components/wt-single-select/wt-single-select.vue +5 -0
  109. package/src/components/wt-table-column-select/__tests__/WtTableColumnSelect.spec.js +3 -3
  110. package/src/plugins/primevue/theme/components/multi-select/multi-select.js +4 -0
  111. package/src/plugins/primevue/theme/components/single-select/single-select.js +4 -0
  112. package/types/plugins/primevue/theme/components/multi-select/multi-select.d.ts +2 -0
  113. package/types/plugins/primevue/theme/components/single-select/single-select.d.ts +2 -0
  114. package/dist/contacts-DzLKP4GQ.js +0 -49654
  115. package/dist/displayText-Cbh4IOfM.js +0 -5
  116. package/dist/engineCallFileType-yaadA7-2.js +0 -8
  117. package/dist/errors-CTL-RV3B.js +0 -70
  118. package/dist/index-BgLoxAyu.js +0 -50
  119. package/dist/install-Cm-8fwtB.js +0 -53489
  120. package/dist/isObject-BSIwu4UO.js +0 -28
  121. package/dist/prod-BoQuiIB3.js +0 -973
  122. package/dist/srt-parser-CsN7bp5E.js +0 -26
  123. package/dist/ssa-parser-BJOOPeQF.js +0 -200
  124. package/dist/useExpansion-BrQ40HiR.js +0 -24
  125. package/dist/useVidstackSrc-DKXY5f7v.js +0 -1341
  126. package/dist/vidstack-Bq6c3Bam-BHF-0bv4.js +0 -426
  127. package/dist/vidstack-D2pY00kU-B8Mhvp0m.js +0 -136
  128. package/dist/vidstack-DDXt6fpN-D0eou9h7.js +0 -51
  129. package/dist/vidstack-D_-9AA6_-DYAfclN7.js +0 -21
  130. package/dist/vidstack-Dm1xEU9Q-CXHNvShT.js +0 -30
  131. package/dist/vidstack-DqAw8m9J-b5BHkhrw.js +0 -22
  132. package/dist/vidstack-audio-CPu_TbjK.js +0 -28
  133. package/dist/vidstack-dash-VYriMjws.js +0 -393
  134. package/dist/vidstack-google-cast-Byp1cemB.js +0 -383
  135. package/dist/vidstack-hls-DdUQcmEx.js +0 -310
  136. package/dist/vidstack-krOAtKMi-C50BTxmn.js +0 -28
  137. package/dist/vidstack-video-BpSKQ3wb.js +0 -164
  138. package/dist/vidstack-vimeo-CgVJJm06.js +0 -452
  139. package/dist/vidstack-youtube-DuES80MV.js +0 -233
  140. package/dist/wt-action-bar-TMuck-q1.js +0 -102
  141. package/dist/wt-button-select-D1NP5Xw9.js +0 -105
  142. package/dist/wt-call-media-action-BsepfSVy.js +0 -60
  143. package/dist/wt-chat-emoji-B00dUXbP.js +0 -2909
  144. package/dist/wt-confirm-dialog-1hO851Da.js +0 -92
  145. package/dist/wt-context-menu-BrzRmoDw.js +0 -104
  146. package/dist/wt-copy-action-CEMOiYzN.js +0 -60
  147. package/dist/wt-datepicker-DHqZIkg2.js +0 -5660
  148. package/dist/wt-display-chip-items-D7kEAcOo.js +0 -47
  149. package/dist/wt-dual-panel-DEWR3-k-.js +0 -66
  150. package/dist/wt-dummy-DfgxciHw.js +0 -104
  151. package/dist/wt-error-page-DUSVxkXq.js +0 -89
  152. package/dist/wt-expansion-card-B8JKBMLa.js +0 -56
  153. package/dist/wt-expansion-panel-DL3eoj_b.js +0 -54
  154. package/dist/wt-filters-panel-wrapper-CGXQiRvh.js +0 -75
  155. package/dist/wt-galleria-Bahv6Mgq.js +0 -323
  156. package/dist/wt-inline-add-panel-B4RjHVDI.js +0 -49
  157. package/dist/wt-navigation-menu-DqCXAV8E.js +0 -159
  158. package/dist/wt-notifications-bar-CRIKdVai.js +0 -79
  159. package/dist/wt-page-header-DdsnoLgd.js +0 -115
  160. package/dist/wt-pagination-C_b3WmH1.js +0 -144
  161. package/dist/wt-player-B4GWEqdu.js +0 -291
  162. package/dist/wt-popover-Di-7_rDL.js +0 -4
  163. package/dist/wt-popover.vue_vue_type_style_index_0_lang-DMDTlCgv.js +0 -81
  164. package/dist/wt-screen-recordings-action-B4OpN5kl.js +0 -54
  165. package/dist/wt-search-bar-B_0_YwCn.js +0 -144
  166. package/dist/wt-selection-popup-Boyw9_V_.js +0 -109
  167. package/dist/wt-send-message-popup-0C23Zocu.js +0 -579
  168. package/dist/wt-slider-BEkw4KGp.js +0 -4
  169. package/dist/wt-slider.vue_vue_type_script_setup_true_lang-DlaRDHxo.js +0 -55
  170. package/dist/wt-start-page-HQMIG05a.js +0 -99
  171. package/dist/wt-status-select-H_me1xwA.js +0 -138
  172. package/dist/wt-stepper-hJxqyiyo.js +0 -65
  173. package/dist/wt-table-Du6mtkPw.js +0 -426
  174. package/dist/wt-table-actions-ah_H6LY9.js +0 -79
  175. package/dist/wt-table-column-select-C2Nbic5-.js +0 -128
  176. package/dist/wt-tabs-D4aGEd_t.js +0 -74
  177. package/dist/wt-time-input-DYiW0ijt.js +0 -42
  178. package/dist/wt-timepicker-BE8POMhF.js +0 -118
  179. package/dist/wt-tree-table-BJxaXqKl.js +0 -285
  180. package/dist/wt-tree-u0Zp8nb5.js +0 -2777
  181. package/dist/wt-type-extension-value-input-C1VlNa4K.js +0 -121
  182. package/dist/wt-vidstack-player-C1eyCEzP.js +0 -9094
@@ -1,973 +0,0 @@
1
- const J = {
2
- LoadFail: 0,
3
- BadSignature: 1,
4
- BadTimestamp: 2,
5
- BadSettingValue: 3,
6
- BadFormat: 4,
7
- UnknownSetting: 5
8
- };
9
- class Q extends Error {
10
- code;
11
- line;
12
- constructor(t) {
13
- super(t.reason), this.code = t.code, this.line = t.line;
14
- }
15
- }
16
- const B = /\r?\n|\r/gm;
17
- class Z {
18
- writable;
19
- readable;
20
- constructor(t) {
21
- const e = new U(t);
22
- this.writable = new WritableStream({
23
- write(s) {
24
- e.transform(s);
25
- },
26
- close() {
27
- e.close();
28
- }
29
- }), this.readable = new ReadableStream({
30
- start(s) {
31
- e.onLine = (a) => s.enqueue(a), e.onClose = () => s.close();
32
- }
33
- });
34
- }
35
- }
36
- class U {
37
- a = "";
38
- b;
39
- onLine;
40
- onClose;
41
- constructor(t) {
42
- this.b = new TextDecoder(t);
43
- }
44
- transform(t) {
45
- this.a += this.b.decode(t, { stream: !0 });
46
- const e = this.a.split(B);
47
- this.a = e.pop() || "";
48
- for (let s = 0; s < e.length; s++)
49
- this.onLine(e[s].trim());
50
- }
51
- close() {
52
- this.a && this.onLine(this.a.trim()), this.a = "", this.onClose();
53
- }
54
- }
55
- async function tt(i, t) {
56
- const e = new ReadableStream({
57
- start(s) {
58
- const a = i.split(B);
59
- for (const r of a)
60
- s.enqueue(r);
61
- s.close();
62
- }
63
- });
64
- return N(e, t);
65
- }
66
- async function N(i, t) {
67
- const e = t?.type ?? "vtt";
68
- let s;
69
- if (typeof e == "string")
70
- switch (e) {
71
- case "srt":
72
- s = (await import("./srt-parser-CsN7bp5E.js")).default;
73
- break;
74
- case "ssa":
75
- case "ass":
76
- s = (await import("./ssa-parser-BJOOPeQF.js")).default;
77
- break;
78
- default:
79
- s = (await Promise.resolve().then(function() {
80
- return vt;
81
- })).default;
82
- }
83
- else
84
- s = e;
85
- let a;
86
- const r = i.getReader(), n = s(), o = !!t?.strict || !!t?.errors;
87
- await n.init({
88
- strict: !1,
89
- ...t,
90
- errors: o,
91
- type: e,
92
- cancel() {
93
- r.cancel(), a = n.done(!0);
94
- }
95
- });
96
- let l = 1;
97
- for (; ; ) {
98
- const { value: h, done: c } = await r.read();
99
- if (c) {
100
- n.parse("", l), a = n.done(!1);
101
- break;
102
- }
103
- n.parse(h, l), l++;
104
- }
105
- return a;
106
- }
107
- async function et(i, t) {
108
- const e = await i;
109
- if (!e.ok || !e.body)
110
- return {
111
- metadata: {},
112
- cues: [],
113
- regions: [],
114
- errors: [void 0]
115
- };
116
- const s = e.headers.get("content-type") || "", a = s.match(/text\/(.*?)(?:;|$)/)?.[1], r = s.match(/charset=(.*?)(?:;|$)/)?.[1];
117
- return z(e.body, { type: a, encoding: r, ...t });
118
- }
119
- async function z(i, { encoding: t = "utf-8", ...e } = {}) {
120
- const s = i.pipeThrough(new Z(t));
121
- return N(s, e);
122
- }
123
- class $ extends EventTarget {
124
- /**
125
- * A string that identifies the cue.
126
- *
127
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextTrackCue/id}
128
- */
129
- id = "";
130
- /**
131
- * A `double` that represents the video time that the cue will start being displayed, in seconds.
132
- *
133
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextTrackCue/startTime}
134
- */
135
- startTime;
136
- /**
137
- * A `double` that represents the video time that the cue will stop being displayed, in seconds.
138
- *
139
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextTrackCue/endTime}
140
- */
141
- endTime;
142
- /**
143
- * Returns a string with the contents of the cue.
144
- *
145
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/text}
146
- */
147
- text;
148
- /**
149
- * A `boolean` for whether the video will pause when this cue stops being displayed.
150
- *
151
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextTrackCue/pauseOnExit}
152
- */
153
- pauseOnExit = !1;
154
- constructor(t, e, s) {
155
- super(), this.startTime = t, this.endTime = e, this.text = s;
156
- }
157
- addEventListener(t, e, s) {
158
- super.addEventListener(t, e, s);
159
- }
160
- removeEventListener(t, e, s) {
161
- super.removeEventListener(t, e, s);
162
- }
163
- }
164
- const _ = typeof document > "u", it = _ ? $ : window.VTTCue;
165
- class j extends it {
166
- /**
167
- * A `VTTRegion` object describing the video's sub-region that the cue will be drawn onto,
168
- * or `null` if none is assigned.
169
- *
170
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/region}
171
- */
172
- region = null;
173
- /**
174
- * The cue writing direction.
175
- *
176
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/vertical}
177
- */
178
- vertical = "";
179
- /**
180
- * Returns `true` if the `VTTCue.line` attribute is an integer number of lines or a percentage
181
- * of the video size.
182
- *
183
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/snapToLines}
184
- */
185
- snapToLines = !0;
186
- /**
187
- * Returns the line positioning of the cue. This can be the string `'auto'` or a number whose
188
- * interpretation depends on the value of `VTTCue.snapToLines`.
189
- *
190
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/line}
191
- */
192
- line = "auto";
193
- /**
194
- * Returns an enum representing the alignment of the `VTTCue.line`.
195
- *
196
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/lineAlign}
197
- */
198
- lineAlign = "start";
199
- /**
200
- * Returns the indentation of the cue within the line. This can be the string `'auto'` or a
201
- * number representing the percentage of the `VTTCue.region`, or the video size if `VTTCue`.region`
202
- * is `null`.
203
- *
204
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/position}
205
- */
206
- position = "auto";
207
- /**
208
- * Returns an enum representing the alignment of the cue. This is used to determine what
209
- * the `VTTCue.position` is anchored to. The default is `'auto'`.
210
- *
211
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/positionAlign}
212
- */
213
- positionAlign = "auto";
214
- /**
215
- * Returns a double representing the size of the cue, as a percentage of the video size.
216
- *
217
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/size}
218
- */
219
- size = 100;
220
- /**
221
- * Returns an enum representing the alignment of all the lines of text within the cue box.
222
- *
223
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/align}
224
- */
225
- align = "center";
226
- /**
227
- * Additional styles associated with the cue.
228
- */
229
- style;
230
- }
231
- class G {
232
- /**
233
- * A string that identifies the region.
234
- */
235
- id = "";
236
- /**
237
- * A `double` representing the width of the region, as a percentage of the video.
238
- */
239
- width = 100;
240
- /**
241
- * A `double` representing the height of the region, in number of lines.
242
- */
243
- lines = 3;
244
- /**
245
- * A `double` representing the region anchor X offset, as a percentage of the region.
246
- */
247
- regionAnchorX = 0;
248
- /**
249
- * A `double` representing the region anchor Y offset, as a percentage of the region.
250
- */
251
- regionAnchorY = 100;
252
- /**
253
- * A `double` representing the viewport anchor X offset, as a percentage of the video.
254
- */
255
- viewportAnchorX = 0;
256
- /**
257
- * A `double` representing the viewport anchor Y offset, as a percentage of the video.
258
- */
259
- viewportAnchorY = 100;
260
- /**
261
- * An enum representing how adding new cues will move existing cues.
262
- */
263
- scroll = "";
264
- }
265
- const M = ",", st = "%";
266
- function rt(i) {
267
- const t = parseInt(i, 10);
268
- return Number.isNaN(t) ? null : t;
269
- }
270
- function w(i) {
271
- const t = parseInt(i.replace(st, ""), 10);
272
- return !Number.isNaN(t) && t >= 0 && t <= 100 ? t : null;
273
- }
274
- function x(i) {
275
- if (!i.includes(M))
276
- return null;
277
- const [t, e] = i.split(M).map(w);
278
- return t !== null && e !== null ? [t, e] : null;
279
- }
280
- function nt(i) {
281
- const t = parseFloat(i);
282
- return Number.isNaN(t) ? null : t;
283
- }
284
- const at = "WEBVTT", P = ",", ot = "%", g = /[:=]/, lt = /^[\s\t]*(region|vertical|line|position|size|align)[:=]/, ht = "NOTE", ct = "REGION", ut = /^REGION:?[\s\t]+/, T = /[\s\t]+/, ft = "-->", dt = /[\s\t]*-->[\s\t]+/, pt = /start|center|end|left|right/, gt = /start|center|end/, mt = /line-(?:left|right)|center|auto/, Tt = /^(?:(\d{1,2}):)?(\d{2}):(\d{2})(?:\.(\d{1,3}))?$/;
285
- var H = /* @__PURE__ */ ((i) => (i[i.None = 0] = "None", i[i.Header = 1] = "Header", i[i.Cue = 2] = "Cue", i[i.Region = 3] = "Region", i[i.Note = 4] = "Note", i))(H || {});
286
- class V {
287
- h;
288
- e = 0;
289
- i = {};
290
- j = {};
291
- l = [];
292
- c = null;
293
- d = null;
294
- m = [];
295
- f;
296
- n = "";
297
- async init(t) {
298
- this.h = t, t.strict && (this.e = 1), t.errors && (this.f = (await import("./errors-CTL-RV3B.js")).ParseErrorBuilder);
299
- }
300
- parse(t, e) {
301
- if (t === "")
302
- this.c ? (this.l.push(this.c), this.h.onCue?.(this.c), this.c = null) : this.d ? (this.j[this.d.id] = this.d, this.h.onRegion?.(this.d), this.d = null) : this.e === 1 && (this.k(t, e), this.h.onHeaderMetadata?.(this.i)), this.e = 0;
303
- else if (this.e)
304
- switch (this.e) {
305
- case 1:
306
- this.k(t, e);
307
- break;
308
- case 2:
309
- if (this.c) {
310
- const s = this.c.text.length > 0;
311
- !s && lt.test(t) ? this.o(t.split(T), e) : this.c.text += (s ? `
312
- ` : "") + t;
313
- }
314
- break;
315
- case 3:
316
- this.p(t.split(T), e);
317
- break;
318
- }
319
- else if (t.startsWith(ht))
320
- this.e = 4;
321
- else if (t.startsWith(ct))
322
- this.e = 3, this.d = new G(), this.p(t.replace(ut, "").split(T), e);
323
- else if (t.includes(ft)) {
324
- const s = this.q(t, e);
325
- s && (this.c = new j(s[0], s[1], ""), this.c.id = this.n, this.o(s[2], e)), this.e = 2;
326
- } else e === 1 && this.k(t, e);
327
- this.n = t;
328
- }
329
- done() {
330
- return {
331
- metadata: this.i,
332
- cues: this.l,
333
- regions: Object.values(this.j),
334
- errors: this.m
335
- };
336
- }
337
- k(t, e) {
338
- if (e > 1) {
339
- if (g.test(t)) {
340
- const [s, a] = t.split(g);
341
- s && (this.i[s] = (a || "").replace(T, ""));
342
- }
343
- } else t.startsWith(at) ? this.e = 1 : this.g(this.f?.r());
344
- }
345
- q(t, e) {
346
- const [s, a = ""] = t.split(dt), [r, ...n] = a.split(T), o = y(s), l = y(r);
347
- if (o !== null && l !== null && l > o)
348
- return [o, l, n];
349
- o === null && this.g(this.f?.s(s, e)), l === null && this.g(this.f?.t(r, e)), o != null && l !== null && l > o && this.g(this.f?.u(o, l, e));
350
- }
351
- /**
352
- * @see {@link https://www.w3.org/TR/webvtt1/#region-settings-parsing}
353
- */
354
- p(t, e) {
355
- let s;
356
- for (let a = 0; a < t.length; a++)
357
- if (g.test(t[a])) {
358
- s = !1;
359
- const [r, n] = t[a].split(g);
360
- switch (r) {
361
- case "id":
362
- this.d.id = n;
363
- break;
364
- case "width":
365
- const o = w(n);
366
- o !== null ? this.d.width = o : s = !0;
367
- break;
368
- case "lines":
369
- const l = rt(n);
370
- l !== null ? this.d.lines = l : s = !0;
371
- break;
372
- case "regionanchor":
373
- const h = x(n);
374
- h !== null ? (this.d.regionAnchorX = h[0], this.d.regionAnchorY = h[1]) : s = !0;
375
- break;
376
- case "viewportanchor":
377
- const c = x(n);
378
- c !== null ? (this.d.viewportAnchorX = c[0], this.d.viewportAnchorY = c[1]) : s = !0;
379
- break;
380
- case "scroll":
381
- n === "up" ? this.d.scroll = "up" : s = !0;
382
- break;
383
- default:
384
- this.g(this.f?.v(r, n, e));
385
- }
386
- s && this.g(this.f?.w(r, n, e));
387
- }
388
- }
389
- /**
390
- * @see {@link https://www.w3.org/TR/webvtt1/#cue-timings-and-settings-parsing}
391
- */
392
- o(t, e) {
393
- let s;
394
- for (let a = 0; a < t.length; a++)
395
- if (s = !1, g.test(t[a])) {
396
- const [r, n] = t[a].split(g);
397
- switch (r) {
398
- case "region":
399
- const o = this.j[n];
400
- o && (this.c.region = o);
401
- break;
402
- case "vertical":
403
- n === "lr" || n === "rl" ? (this.c.vertical = n, this.c.region = null) : s = !0;
404
- break;
405
- case "line":
406
- const [l, h] = n.split(P);
407
- if (l.includes(ot)) {
408
- const m = w(l);
409
- m !== null ? (this.c.line = m, this.c.snapToLines = !1) : s = !0;
410
- } else {
411
- const m = nt(l);
412
- m !== null ? this.c.line = m : s = !0;
413
- }
414
- gt.test(h) ? this.c.lineAlign = h : h && (s = !0), this.c.line !== "auto" && (this.c.region = null);
415
- break;
416
- case "position":
417
- const [c, f] = n.split(P), b = w(c);
418
- b !== null ? this.c.position = b : s = !0, f && mt.test(f) ? this.c.positionAlign = f : f && (s = !0);
419
- break;
420
- case "size":
421
- const S = w(n);
422
- S !== null ? (this.c.size = S, S < 100 && (this.c.region = null)) : s = !0;
423
- break;
424
- case "align":
425
- pt.test(n) ? this.c.align = n : s = !0;
426
- break;
427
- default:
428
- this.g(this.f?.x(r, n, e));
429
- }
430
- s && this.g(this.f?.y(r, n, e));
431
- }
432
- }
433
- g(t) {
434
- if (t) {
435
- if (this.m.push(t), this.h.strict)
436
- throw this.h.cancel(), t;
437
- this.h.onError?.(t);
438
- }
439
- }
440
- }
441
- function y(i) {
442
- const t = i.match(Tt);
443
- if (!t)
444
- return null;
445
- const e = t[1] ? parseInt(t[1], 10) : 0, s = parseInt(t[2], 10), a = parseInt(t[3], 10), r = t[4] ? parseInt(t[4].padEnd(3, "0"), 10) : 0, n = e * 3600 + s * 60 + a + r / 1e3;
446
- return e < 0 || s < 0 || a < 0 || r < 0 || s > 59 || a > 59 ? null : n;
447
- }
448
- function wt() {
449
- return new V();
450
- }
451
- var vt = /* @__PURE__ */ Object.freeze({
452
- __proto__: null,
453
- VTTBlock: H,
454
- VTTParser: V,
455
- default: wt,
456
- parseVTTTimestamp: y
457
- });
458
- const yt = /[0-9]/, bt = /[\s\t]+/, F = {
459
- c: "span",
460
- i: "i",
461
- b: "b",
462
- u: "u",
463
- ruby: "ruby",
464
- rt: "rt",
465
- v: "span",
466
- lang: "span",
467
- timestamp: "span"
468
- }, At = {
469
- "&amp;": "&",
470
- "&lt;": "<",
471
- "&gt;": ">",
472
- "&quot;": '"',
473
- "&#39;": "'",
474
- "&nbsp;": " ",
475
- "&lrm;": "‎",
476
- "&rlm;": "‏"
477
- }, Et = /&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g, St = /* @__PURE__ */ new Set([
478
- "white",
479
- "lime",
480
- "cyan",
481
- "red",
482
- "yellow",
483
- "magenta",
484
- "blue",
485
- "black"
486
- ]), kt = /* @__PURE__ */ new Set(Object.keys(F));
487
- function D(i) {
488
- let t = "", e = 1, s = [], a = [], r;
489
- for (let h = 0; h < i.text.length; h++) {
490
- const c = i.text[h];
491
- switch (e) {
492
- case 1:
493
- c === "<" ? (l(), e = 2) : t += c;
494
- break;
495
- case 2:
496
- switch (c) {
497
- case `
498
- `:
499
- case " ":
500
- case " ":
501
- n(), e = 4;
502
- break;
503
- case ".":
504
- n(), e = 3;
505
- break;
506
- case "/":
507
- e = 5;
508
- break;
509
- case ">":
510
- n(), e = 1;
511
- break;
512
- default:
513
- !t && yt.test(c) && (e = 6), t += c;
514
- break;
515
- }
516
- break;
517
- case 3:
518
- switch (c) {
519
- case " ":
520
- case " ":
521
- case `
522
- `:
523
- o(), r && r.class?.trim(), e = 4;
524
- break;
525
- case ".":
526
- o();
527
- break;
528
- case ">":
529
- o(), r && r.class?.trim(), e = 1;
530
- break;
531
- default:
532
- t += c;
533
- }
534
- break;
535
- case 4:
536
- c === ">" ? (t = t.replace(bt, " "), r?.type === "v" ? r.voice = k(t) : r?.type === "lang" && (r.lang = k(t)), t = "", e = 1) : t += c;
537
- break;
538
- case 5:
539
- c === ">" && (t = "", r = a.pop(), e = 1);
540
- break;
541
- case 6:
542
- if (c === ">") {
543
- const f = y(t);
544
- f !== null && f >= i.startTime && f <= i.endTime && (t = "timestamp", n(), r.time = f), t = "", e = 1;
545
- } else
546
- t += c;
547
- break;
548
- }
549
- }
550
- function n() {
551
- if (kt.has(t)) {
552
- const h = r;
553
- r = Nt(t), h ? (a[a.length - 1] !== h && a.push(h), h.children.push(r)) : s.push(r);
554
- }
555
- t = "", e = 1;
556
- }
557
- function o() {
558
- if (r && t) {
559
- const h = t.replace("bg_", "");
560
- St.has(h) ? r[t.startsWith("bg_") ? "bgColor" : "color"] = h : r.class = r.class ? r.class + " " + t : t;
561
- }
562
- t = "";
563
- }
564
- function l() {
565
- if (!t)
566
- return;
567
- const h = { type: "text", data: k(t) };
568
- r ? r.children.push(h) : s.push(h), t = "";
569
- }
570
- return e === 1 && l(), s;
571
- }
572
- function Nt(i) {
573
- return {
574
- tagName: F[i],
575
- type: i,
576
- children: []
577
- };
578
- }
579
- function k(i) {
580
- return i.replace(Et, (t) => At[t] || "'");
581
- }
582
- function u(i, t, e) {
583
- i.style.setProperty(`--${t}`, e + "");
584
- }
585
- function d(i, t, e = !0) {
586
- i.setAttribute(`data-${t}`, e === !0 ? "" : e + "");
587
- }
588
- function A(i, t) {
589
- i.setAttribute("data-part", t);
590
- }
591
- function _t(i) {
592
- return parseFloat(getComputedStyle(i).lineHeight) || 0;
593
- }
594
- function Ct(i) {
595
- if (_)
596
- throw Error(
597
- "[media-captions] called `createVTTCueTemplate` on the server - use `renderVTTCueString`"
598
- );
599
- const t = document.createElement("template");
600
- return t.innerHTML = C(i), { cue: i, content: t.content };
601
- }
602
- function C(i, t = 0) {
603
- return R(D(i), t);
604
- }
605
- function R(i, t = 0) {
606
- let e, s = "";
607
- for (const a of i)
608
- if (a.type === "text")
609
- s += a.data;
610
- else {
611
- const r = a.type === "timestamp";
612
- e = {}, e.class = a.class, e.title = a.type === "v" && a.voice, e.lang = a.type === "lang" && a.lang, e["data-part"] = a.type === "v" && "voice", r && (e["data-part"] = "timed", e["data-time"] = a.time, e["data-future"] = a.time > t, e["data-past"] = a.time < t), e.style = `${a.color ? `color: ${a.color};` : ""}${a.bgColor ? `background-color: ${a.bgColor};` : ""}`;
613
- const n = Object.entries(e).filter((o) => o[1]).map((o) => `${o[0]}="${o[1] === !0 ? "" : o[1]}"`).join(" ");
614
- s += `<${a.tagName}${n ? " " + n : ""}>${R(
615
- a.children
616
- )}</${a.tagName}>`;
617
- }
618
- return s;
619
- }
620
- function W(i, t) {
621
- if (!_)
622
- for (const e of i.querySelectorAll('[data-part="timed"]')) {
623
- const s = Number(e.getAttribute("data-time"));
624
- Number.isNaN(s) || (s > t ? d(e, "future") : e.removeAttribute("data-future"), s < t ? d(e, "past") : e.removeAttribute("data-past"));
625
- }
626
- }
627
- function Rt(i, t) {
628
- let e = null, s;
629
- function a() {
630
- r(), i(...s), s = void 0;
631
- }
632
- function r() {
633
- clearTimeout(e), e = null;
634
- }
635
- function n() {
636
- s = [].slice.call(arguments), r(), e = setTimeout(a, t);
637
- }
638
- return n;
639
- }
640
- const p = /* @__PURE__ */ Symbol(0);
641
- function I(i) {
642
- return i instanceof HTMLElement ? {
643
- top: i.offsetTop,
644
- width: i.clientWidth,
645
- height: i.clientHeight,
646
- left: i.offsetLeft,
647
- right: i.offsetLeft + i.clientWidth,
648
- bottom: i.offsetTop + i.clientHeight
649
- } : { ...i };
650
- }
651
- function E(i, t, e) {
652
- switch (t) {
653
- case "+x":
654
- i.left += e, i.right += e;
655
- break;
656
- case "-x":
657
- i.left -= e, i.right -= e;
658
- break;
659
- case "+y":
660
- i.top += e, i.bottom += e;
661
- break;
662
- case "-y":
663
- i.top -= e, i.bottom -= e;
664
- break;
665
- }
666
- }
667
- function It(i, t) {
668
- return i.left <= t.right && i.right >= t.left && i.top <= t.bottom && i.bottom >= t.top;
669
- }
670
- function Lt(i, t) {
671
- for (let e = 0; e < t.length; e++)
672
- if (It(i, t[e]))
673
- return t[e];
674
- return null;
675
- }
676
- function O(i, t) {
677
- return t.top >= 0 && t.bottom <= i.height && t.left >= 0 && t.right <= i.width;
678
- }
679
- function Mt(i, t, e) {
680
- switch (e) {
681
- case "+x":
682
- return t.left < 0;
683
- case "-x":
684
- return t.right > i.width;
685
- case "+y":
686
- return t.top < 0;
687
- case "-y":
688
- return t.bottom > i.height;
689
- }
690
- }
691
- function xt(i, t) {
692
- const e = Math.max(0, Math.min(i.width, t.right) - Math.max(0, t.left)), s = Math.max(0, Math.min(i.height, t.bottom) - Math.max(0, t.top));
693
- return e * s / (i.height * i.width);
694
- }
695
- function L(i, t) {
696
- return {
697
- top: t.top / i.height,
698
- left: t.left / i.width,
699
- right: (i.width - t.right) / i.width,
700
- bottom: (i.height - t.bottom) / i.height
701
- };
702
- }
703
- function q(i, t) {
704
- return t.top = t.top * i.height, t.left = t.left * i.width, t.right = i.width - t.right * i.width, t.bottom = i.height - t.bottom * i.height, t;
705
- }
706
- const X = ["top", "left", "right", "bottom"];
707
- function Y(i, t, e, s) {
708
- const a = L(t, e);
709
- for (const r of X)
710
- u(i, `${s}-${r}`, a[r] * 100 + "%");
711
- }
712
- function K(i, t, e, s) {
713
- let a = 1, r, n = { ...t };
714
- for (let o = 0; o < s.length; o++) {
715
- for (; Mt(i, t, s[o]) || O(i, t) && Lt(t, e); )
716
- E(t, s[o], 1);
717
- if (O(i, t))
718
- return t;
719
- const l = xt(i, t);
720
- a > l && (r = { ...t }, a = l), t = { ...n };
721
- }
722
- return r || n;
723
- }
724
- const v = /* @__PURE__ */ Symbol(0);
725
- function Pt(i, t, e, s) {
726
- let a = e.firstElementChild, r = zt(t), n, o = [];
727
- if (e[p] || (e[p] = Ot(i, e)), n = q(i, { ...e[p] }), e[v])
728
- o = [e[v] === "top" ? "+y" : "-y", "+x", "-x"];
729
- else if (t.snapToLines) {
730
- let l;
731
- switch (t.vertical) {
732
- case "":
733
- o = ["+y", "-y"], l = "height";
734
- break;
735
- case "rl":
736
- o = ["+x", "-x"], l = "width";
737
- break;
738
- case "lr":
739
- o = ["-x", "+x"], l = "width";
740
- break;
741
- }
742
- let h = _t(a), c = h * Math.round(r), f = i[l] + h, b = o[0];
743
- Math.abs(c) > f && (c = c < 0 ? -1 : 1, c *= Math.ceil(f / h) * h), r < 0 && (c += t.vertical === "" ? i.height : i.width, o = o.reverse()), E(n, b, c);
744
- } else {
745
- const l = t.vertical === "", h = l ? "+y" : "+x", c = l ? n.height : n.width;
746
- E(
747
- n,
748
- h,
749
- (l ? i.height : i.width) * r / 100
750
- ), E(
751
- n,
752
- h,
753
- t.lineAlign === "center" ? c / 2 : t.lineAlign === "end" ? c : 0
754
- ), o = l ? ["-y", "+y", "-x", "+x"] : ["-x", "+x", "-y", "+y"];
755
- }
756
- return n = K(i, n, s, o), Y(e, i, n, "cue"), n;
757
- }
758
- function Ot(i, t) {
759
- const e = I(t), s = Bt(t);
760
- if (t[v] = !1, s.top && (e.top = s.top, e.bottom = s.top + e.height, t[v] = "top"), s.bottom) {
761
- const a = i.height - s.bottom;
762
- e.top = a - e.height, e.bottom = a, t[v] = "bottom";
763
- }
764
- return s.left && (e.left = s.left), s.right && (e.right = i.width - s.right), L(i, e);
765
- }
766
- function Bt(i) {
767
- const t = {};
768
- for (const e of X)
769
- t[e] = parseFloat(i.style.getPropertyValue(`--cue-${e}`));
770
- return t;
771
- }
772
- function zt(i) {
773
- return i.line === "auto" ? i.snapToLines ? -1 : 100 : i.line;
774
- }
775
- function $t(i) {
776
- if (i.position === "auto")
777
- switch (i.align) {
778
- case "start":
779
- case "left":
780
- return 0;
781
- case "right":
782
- case "end":
783
- return 100;
784
- default:
785
- return 50;
786
- }
787
- return i.position;
788
- }
789
- function jt(i, t) {
790
- if (i.positionAlign === "auto")
791
- switch (i.align) {
792
- case "start":
793
- return t === "ltr" ? "line-left" : "line-right";
794
- case "end":
795
- return t === "ltr" ? "line-right" : "line-left";
796
- case "center":
797
- return "center";
798
- default:
799
- return `line-${i.align}`;
800
- }
801
- return i.positionAlign;
802
- }
803
- const Gt = ["-y", "+y", "-x", "+x"];
804
- function Ht(i, t, e, s) {
805
- let a = Array.from(e.querySelectorAll('[data-part="cue-display"]')), r = 0, n = Math.max(0, a.length - t.lines);
806
- for (let l = a.length - 1; l >= n; l--)
807
- r += a[l].offsetHeight;
808
- u(e, "region-height", r + "px"), e[p] || (e[p] = L(i, I(e)));
809
- let o = { ...e[p] };
810
- return o = q(i, o), o.width = e.clientWidth, o.height = r, o.right = o.left + o.width, o.bottom = o.top + r, o = K(i, o, s, Gt), Y(e, i, o, "region"), o;
811
- }
812
- class Vt {
813
- overlay;
814
- z;
815
- A = 0;
816
- C = "ltr";
817
- B = [];
818
- D = !1;
819
- E;
820
- j = /* @__PURE__ */ new Map();
821
- l = /* @__PURE__ */ new Map();
822
- /* Text direction. */
823
- get dir() {
824
- return this.C;
825
- }
826
- set dir(t) {
827
- this.C = t, d(this.overlay, "dir", t);
828
- }
829
- get currentTime() {
830
- return this.A;
831
- }
832
- set currentTime(t) {
833
- this.A = t, this.update();
834
- }
835
- constructor(t, e) {
836
- this.overlay = t, this.dir = e?.dir ?? "ltr", t.setAttribute("translate", "yes"), t.setAttribute("aria-live", "off"), t.setAttribute("aria-atomic", "true"), A(t, "captions"), this.G(), this.E = new ResizeObserver(this.I.bind(this)), this.E.observe(t);
837
- }
838
- changeTrack({ regions: t, cues: e }) {
839
- this.reset(), this.J(t);
840
- for (const s of e)
841
- this.l.set(s, null);
842
- this.update();
843
- }
844
- addCue(t) {
845
- this.l.set(t, null), this.update();
846
- }
847
- removeCue(t) {
848
- this.l.delete(t), this.update();
849
- }
850
- update(t = !1) {
851
- this.H(t);
852
- }
853
- reset() {
854
- this.l.clear(), this.j.clear(), this.B = [], this.overlay.textContent = "";
855
- }
856
- destroy() {
857
- this.reset(), this.E.disconnect();
858
- }
859
- I() {
860
- this.D = !0, this.K();
861
- }
862
- K = Rt(() => {
863
- this.D = !1, this.G();
864
- for (const t of this.j.values())
865
- t[p] = null;
866
- for (const t of this.l.values())
867
- t && (t[p] = null);
868
- this.H(!0);
869
- }, 50);
870
- G() {
871
- this.z = I(this.overlay), u(this.overlay, "overlay-width", this.z.width + "px"), u(this.overlay, "overlay-height", this.z.height + "px");
872
- }
873
- H(t = !1) {
874
- if (!this.l.size || this.D)
875
- return;
876
- let e, s = [...this.l.keys()].filter((r) => this.A >= r.startTime && this.A <= r.endTime).sort(
877
- (r, n) => r.startTime !== n.startTime ? r.startTime - n.startTime : r.endTime - n.endTime
878
- ), a = s.map((r) => r.region);
879
- for (let r = 0; r < this.B.length; r++) {
880
- if (e = this.B[r], s[r] === e)
881
- continue;
882
- if (e.region && !a.includes(e.region)) {
883
- const o = this.j.get(e.region.id);
884
- o && (o.removeAttribute("data-active"), t = !0);
885
- }
886
- const n = this.l.get(e);
887
- n && (n.remove(), t = !0);
888
- }
889
- for (let r = 0; r < s.length; r++) {
890
- e = s[r];
891
- let n = this.l.get(e);
892
- n || this.l.set(e, n = this.L(e));
893
- const o = this.F(e) && this.j.get(e.region.id);
894
- o && !o.hasAttribute("data-active") && (requestAnimationFrame(() => d(o, "active")), t = !0), n.isConnected || ((o || this.overlay).append(n), t = !0);
895
- }
896
- if (t) {
897
- const r = [], n = /* @__PURE__ */ new Set();
898
- for (let o = s.length - 1; o >= 0; o--) {
899
- if (e = s[o], n.has(e.region || e))
900
- continue;
901
- const l = this.F(e), h = l ? this.j.get(e.region.id) : this.l.get(e);
902
- l ? r.push(Ht(this.z, e.region, h, r)) : r.push(Pt(this.z, e, h, r)), n.add(l ? e.region : e);
903
- }
904
- }
905
- W(this.overlay, this.A), this.B = s;
906
- }
907
- J(t) {
908
- if (t)
909
- for (const e of t) {
910
- const s = this.M(e);
911
- this.j.set(e.id, s), this.overlay.append(s);
912
- }
913
- }
914
- M(t) {
915
- const e = document.createElement("div");
916
- return A(e, "region"), d(e, "id", t.id), d(e, "scroll", t.scroll), u(e, "region-width", t.width + "%"), u(e, "region-anchor-x", t.regionAnchorX), u(e, "region-anchor-y", t.regionAnchorY), u(e, "region-viewport-anchor-x", t.viewportAnchorX), u(e, "region-viewport-anchor-y", t.viewportAnchorY), u(e, "region-lines", t.lines), e;
917
- }
918
- L(t) {
919
- const e = document.createElement("div"), s = $t(t), a = jt(t, this.C);
920
- if (A(e, "cue-display"), t.vertical !== "" && d(e, "vertical"), u(e, "cue-text-align", t.align), t.style)
921
- for (const n of Object.keys(t.style))
922
- e.style.setProperty(n, t.style[n]);
923
- if (this.F(t))
924
- u(
925
- e,
926
- "cue-offset",
927
- `${s - (a === "line-right" ? 100 : a === "center" ? 50 : 0)}%`
928
- );
929
- else if (u(
930
- e,
931
- "cue-writing-mode",
932
- t.vertical === "" ? "horizontal-tb" : t.vertical === "lr" ? "vertical-lr" : "vertical-rl"
933
- ), !t.style?.["--cue-width"]) {
934
- let n = s;
935
- a === "line-left" ? n = 100 - s : a === "center" && s <= 50 ? n = s * 2 : a === "center" && s > 50 && (n = (100 - s) * 2);
936
- const o = t.size < n ? t.size : n;
937
- t.vertical === "" ? u(e, "cue-width", o + "%") : u(e, "cue-height", o + "%");
938
- }
939
- const r = document.createElement("div");
940
- return A(r, "cue"), t.id && d(r, "id", t.id), r.innerHTML = C(t), e.append(r), e;
941
- }
942
- F(t) {
943
- return t.region && t.size === 100 && t.vertical === "" && t.line === "auto";
944
- }
945
- }
946
- const Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
947
- __proto__: null,
948
- CaptionsRenderer: Vt,
949
- ParseError: Q,
950
- ParseErrorCode: J,
951
- TextCue: $,
952
- VTTCue: j,
953
- VTTRegion: G,
954
- createVTTCueTemplate: Ct,
955
- parseByteStream: z,
956
- parseResponse: et,
957
- parseText: tt,
958
- parseTextStream: N,
959
- parseVTTTimestamp: y,
960
- renderVTTCueString: C,
961
- renderVTTTokensString: R,
962
- tokenizeVTTCue: D,
963
- updateTimedVTTCueNodes: W
964
- }, Symbol.toStringTag, { value: "Module" }));
965
- export {
966
- Q as P,
967
- V,
968
- H as a,
969
- j as b,
970
- J as c,
971
- Ft as d,
972
- y as p
973
- };