@wangeditor-next/video-module 1.3.17-beta.0 → 1.3.18
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/css/style.css +1 -11
- package/dist/index.js +2 -1281
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1279
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,1279 +1,2 @@
|
|
|
1
|
-
import { i18nAddResources, t, DomEditor, genModalInputElems, genModalButtonElems, createUploader } from '@wangeditor-next/core';
|
|
2
|
-
|
|
3
|
-
import { Transforms, Range } from 'slate';
|
|
4
|
-
import { nanoid } from 'nanoid';
|
|
5
|
-
import { jsx, h } from 'snabbdom';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @description i18n en
|
|
9
|
-
* @author wangfupeng
|
|
10
|
-
*/
|
|
11
|
-
var enResources = {
|
|
12
|
-
videoModule: {
|
|
13
|
-
delete: 'Delete',
|
|
14
|
-
uploadVideo: 'Upload video',
|
|
15
|
-
insertVideo: 'Insert video',
|
|
16
|
-
videoSrc: 'Video source',
|
|
17
|
-
videoSrcPlaceHolder: 'Video file url, or third-party <iframe>',
|
|
18
|
-
videoPoster: 'Video poster',
|
|
19
|
-
videoPosterPlaceHolder: 'Poster image url',
|
|
20
|
-
ok: 'Ok',
|
|
21
|
-
editSize: 'Edit size',
|
|
22
|
-
edit: 'Edit video',
|
|
23
|
-
width: 'Width',
|
|
24
|
-
height: 'Height',
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @description i18n zh-CN
|
|
30
|
-
* @author wangfupeng
|
|
31
|
-
*/
|
|
32
|
-
var zhResources = {
|
|
33
|
-
videoModule: {
|
|
34
|
-
delete: '删除视频',
|
|
35
|
-
uploadVideo: '上传视频',
|
|
36
|
-
insertVideo: '插入视频',
|
|
37
|
-
videoSrc: '视频地址',
|
|
38
|
-
videoSrcPlaceHolder: '视频文件 url 或第三方 <iframe>',
|
|
39
|
-
videoPoster: '视频封面',
|
|
40
|
-
videoPosterPlaceHolder: '封面图片 url',
|
|
41
|
-
ok: '确定',
|
|
42
|
-
editSize: '修改尺寸',
|
|
43
|
-
edit: '编辑视频',
|
|
44
|
-
width: '宽度',
|
|
45
|
-
height: '高度',
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @description i18n entry
|
|
51
|
-
* @author wangfupeng
|
|
52
|
-
*/
|
|
53
|
-
i18nAddResources('en', enResources);
|
|
54
|
-
i18nAddResources('zh-CN', zhResources);
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @description DOM 操作
|
|
58
|
-
* @author wangfupeng
|
|
59
|
-
*/
|
|
60
|
-
if (append) {
|
|
61
|
-
$.fn.append = append;
|
|
62
|
-
}
|
|
63
|
-
if (on) {
|
|
64
|
-
$.fn.on = on;
|
|
65
|
-
}
|
|
66
|
-
if (focus) {
|
|
67
|
-
$.fn.focus = focus;
|
|
68
|
-
}
|
|
69
|
-
if (attr) {
|
|
70
|
-
$.fn.attr = attr;
|
|
71
|
-
}
|
|
72
|
-
if (val) {
|
|
73
|
-
$.fn.val = val;
|
|
74
|
-
}
|
|
75
|
-
if (html) {
|
|
76
|
-
$.fn.html = html;
|
|
77
|
-
}
|
|
78
|
-
if (parent) {
|
|
79
|
-
$.fn.parent = parent;
|
|
80
|
-
}
|
|
81
|
-
if (hasClass) {
|
|
82
|
-
$.fn.hasClass = hasClass;
|
|
83
|
-
}
|
|
84
|
-
if (empty) {
|
|
85
|
-
$.fn.empty = empty;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* 获取 tagName lower-case
|
|
89
|
-
* @param $elem $elem
|
|
90
|
-
*/
|
|
91
|
-
function getTagName($elem) {
|
|
92
|
-
if ($elem.length) {
|
|
93
|
-
return $elem[0].tagName.toLowerCase();
|
|
94
|
-
}
|
|
95
|
-
return '';
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* 生成带 size 样式的 iframe html
|
|
99
|
-
* @param iframeHtml iframe html string
|
|
100
|
-
* @param width width
|
|
101
|
-
* @param height height
|
|
102
|
-
* @returns iframe html string with size style
|
|
103
|
-
*/
|
|
104
|
-
function genSizeStyledIframeHtml(iframeHtml, width, height, style) {
|
|
105
|
-
if (width === void 0) { width = 'auto'; }
|
|
106
|
-
if (height === void 0) { height = 'auto'; }
|
|
107
|
-
if (style === void 0) { style = {}; }
|
|
108
|
-
var $iframe = $(iframeHtml);
|
|
109
|
-
var _a = style.width, styleWidth = _a === void 0 ? '' : _a, _b = style.height, styleHeight = _b === void 0 ? '' : _b;
|
|
110
|
-
var styleStr = '';
|
|
111
|
-
if (styleWidth) {
|
|
112
|
-
styleStr += "width: ".concat(styleWidth, ";");
|
|
113
|
-
}
|
|
114
|
-
if (styleHeight) {
|
|
115
|
-
styleStr += "height: ".concat(styleHeight, ";");
|
|
116
|
-
}
|
|
117
|
-
$iframe.attr('width', width);
|
|
118
|
-
$iframe.attr('height', height);
|
|
119
|
-
$iframe.attr('style', styleStr);
|
|
120
|
-
return $iframe[0].outerHTML;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* @description to html
|
|
125
|
-
* @author wangfupeng
|
|
126
|
-
*/
|
|
127
|
-
function videoToHtml(elemNode, _childrenHtml) {
|
|
128
|
-
var _a = elemNode, _b = _a.src, src = _b === void 0 ? '' : _b, _c = _a.poster, poster = _c === void 0 ? '' : _c, _d = _a.width, width = _d === void 0 ? 'auto' : _d, _e = _a.height, height = _e === void 0 ? 'auto' : _e, _f = _a.style, style = _f === void 0 ? {} : _f, _g = _a.textAlign, textAlign = _g === void 0 ? 'center' : _g;
|
|
129
|
-
var res = "<div data-w-e-type=\"video\" data-w-e-is-void style=\"text-align: ".concat(textAlign, ";\">\n");
|
|
130
|
-
if (src.trim().indexOf('<iframe ') === 0) {
|
|
131
|
-
// iframe 形式
|
|
132
|
-
var iframeHtml = genSizeStyledIframeHtml(src, width, height, style);
|
|
133
|
-
res += iframeHtml;
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
// 其他,mp4 等 url 格式
|
|
137
|
-
var _h = style.width, styleWidth = _h === void 0 ? '' : _h, _j = style.height, styleHeight = _j === void 0 ? '' : _j;
|
|
138
|
-
var styleStr = '';
|
|
139
|
-
if (styleWidth) {
|
|
140
|
-
styleStr += "width: ".concat(styleWidth, ";");
|
|
141
|
-
}
|
|
142
|
-
if (styleHeight) {
|
|
143
|
-
styleStr += "height: ".concat(styleHeight, ";");
|
|
144
|
-
}
|
|
145
|
-
res += "<video poster=\"".concat(poster, "\" controls=\"true\" width=\"").concat(width, "\" height=\"").concat(height, "\" style=\"").concat(styleStr, "\"><source src=\"").concat(src, "\" type=\"video/mp4\"/></video>");
|
|
146
|
-
}
|
|
147
|
-
res += '\n</div>';
|
|
148
|
-
return res;
|
|
149
|
-
}
|
|
150
|
-
var videoToHtmlConf = {
|
|
151
|
-
type: 'video',
|
|
152
|
-
elemToHtml: videoToHtml,
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* @description video menu config
|
|
157
|
-
* @author wangfupeng
|
|
158
|
-
*/
|
|
159
|
-
function genUploadVideoMenuConfig() {
|
|
160
|
-
return {
|
|
161
|
-
server: '', // server API 地址,需用户配置
|
|
162
|
-
fieldName: 'wangeditor-uploaded-video', // formData 中,文件的 key
|
|
163
|
-
maxFileSize: 10 * 1024 * 1024, // 10M
|
|
164
|
-
maxNumberOfFiles: 5, // 最多上传 xx 个视频
|
|
165
|
-
allowedFileTypes: ['video/*'],
|
|
166
|
-
meta: {
|
|
167
|
-
// 自定义上传参数,例如传递验证的 token 等。参数会被添加到 formData 中,一起上传到服务端。
|
|
168
|
-
// 例如:token: 'xxxxx', x: 100
|
|
169
|
-
},
|
|
170
|
-
metaWithUrl: false,
|
|
171
|
-
// headers: {
|
|
172
|
-
// // 自定义 http headers
|
|
173
|
-
// // 例如:Accept: 'text/x-json', a: 100,
|
|
174
|
-
// },
|
|
175
|
-
withCredentials: false,
|
|
176
|
-
timeout: 30 * 1000, // 30s
|
|
177
|
-
onBeforeUpload: function (files) { return files; }, // 返回 false 则终止上传
|
|
178
|
-
onProgress: function (_progress) {
|
|
179
|
-
/* on progress */
|
|
180
|
-
},
|
|
181
|
-
onSuccess: function (_file, _res) {
|
|
182
|
-
/* on success */
|
|
183
|
-
},
|
|
184
|
-
onFailed: function (file, res) {
|
|
185
|
-
/* on failed */
|
|
186
|
-
console.error("'".concat(file.name, "' upload failed"), res);
|
|
187
|
-
},
|
|
188
|
-
onError: function (file, err, res) {
|
|
189
|
-
/* on error */
|
|
190
|
-
/* on timeout */
|
|
191
|
-
console.error("'".concat(file.name, " upload error"), err, res);
|
|
192
|
-
},
|
|
193
|
-
// 自定义插入视频,用户配置
|
|
194
|
-
// customInsert: (res, insertFn) => {},
|
|
195
|
-
// 自定义上传视频,用户配置
|
|
196
|
-
// customUpload: (file, insertFn) => {},
|
|
197
|
-
// 自定义选择,并上传视频,如:图床 (用户配置)
|
|
198
|
-
// customBrowseAndUpload: insertFn => {},
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* 生成插入网络视频的配置
|
|
203
|
-
*/
|
|
204
|
-
function genInsertVideoMenuConfig() {
|
|
205
|
-
return {
|
|
206
|
-
onInsertedVideo: function (_node) {
|
|
207
|
-
// 插入视频之后的 callback
|
|
208
|
-
},
|
|
209
|
-
/**
|
|
210
|
-
* 检查 video ,支持 async
|
|
211
|
-
* @param src src
|
|
212
|
-
* @param poster poster
|
|
213
|
-
*/
|
|
214
|
-
checkVideo: function (_src, _poster) {
|
|
215
|
-
// 1. 返回 true ,说明检查通过
|
|
216
|
-
// 2. 返回一个字符串,说明检查未通过,编辑器会阻止插入。会 alert 出错误信息(即返回的字符串)
|
|
217
|
-
// 3. 返回 undefined(即没有任何返回),说明检查未通过,编辑器会阻止插入
|
|
218
|
-
return true;
|
|
219
|
-
},
|
|
220
|
-
/**
|
|
221
|
-
* 转换 video src
|
|
222
|
-
* @param src src
|
|
223
|
-
* @returns new src
|
|
224
|
-
*/
|
|
225
|
-
parseVideoSrc: function (src) {
|
|
226
|
-
return src;
|
|
227
|
-
},
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/******************************************************************************
|
|
232
|
-
Copyright (c) Microsoft Corporation.
|
|
233
|
-
|
|
234
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
235
|
-
purpose with or without fee is hereby granted.
|
|
236
|
-
|
|
237
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
238
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
239
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
240
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
241
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
242
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
243
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
244
|
-
***************************************************************************** */
|
|
245
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
var __assign = function() {
|
|
249
|
-
__assign = Object.assign || function __assign(t) {
|
|
250
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
251
|
-
s = arguments[i];
|
|
252
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
253
|
-
}
|
|
254
|
-
return t;
|
|
255
|
-
};
|
|
256
|
-
return __assign.apply(this, arguments);
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
260
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
261
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
262
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
263
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
264
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
265
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
function __generator(thisArg, body) {
|
|
270
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
271
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
272
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
273
|
-
function step(op) {
|
|
274
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
275
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
276
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
277
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
278
|
-
switch (op[0]) {
|
|
279
|
-
case 0: case 1: t = op; break;
|
|
280
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
281
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
282
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
283
|
-
default:
|
|
284
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
285
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
286
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
287
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
288
|
-
if (t[2]) _.ops.pop();
|
|
289
|
-
_.trys.pop(); continue;
|
|
290
|
-
}
|
|
291
|
-
op = body.call(thisArg, _);
|
|
292
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
293
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
function __values(o) {
|
|
298
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
299
|
-
if (m) return m.call(o);
|
|
300
|
-
if (o && typeof o.length === "number") return {
|
|
301
|
-
next: function () {
|
|
302
|
-
if (o && i >= o.length) o = void 0;
|
|
303
|
-
return { value: o && o[i++], done: !o };
|
|
304
|
-
}
|
|
305
|
-
};
|
|
306
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
function __read(o, n) {
|
|
310
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
311
|
-
if (!m) return o;
|
|
312
|
-
var i = m.call(o), r, ar = [], e;
|
|
313
|
-
try {
|
|
314
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
315
|
-
}
|
|
316
|
-
catch (error) { e = { error: error }; }
|
|
317
|
-
finally {
|
|
318
|
-
try {
|
|
319
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
320
|
-
}
|
|
321
|
-
finally { if (e) throw e.error; }
|
|
322
|
-
}
|
|
323
|
-
return ar;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
function __asyncValues(o) {
|
|
327
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
328
|
-
var m = o[Symbol.asyncIterator], i;
|
|
329
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
330
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
331
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
335
|
-
var e = new Error(message);
|
|
336
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* @description 工具函数
|
|
341
|
-
* @author wangfupeng
|
|
342
|
-
*/
|
|
343
|
-
/**
|
|
344
|
-
* 获取随机数字符串
|
|
345
|
-
* @param prefix 前缀
|
|
346
|
-
* @returns 随机数字符串
|
|
347
|
-
*/
|
|
348
|
-
function genRandomStr(prefix) {
|
|
349
|
-
if (prefix === void 0) { prefix = 'r'; }
|
|
350
|
-
return "".concat(prefix, "-").concat(nanoid());
|
|
351
|
-
}
|
|
352
|
-
function replaceSymbols(str) {
|
|
353
|
-
return str.replace(/</g, '<').replace(/>/g, '>');
|
|
354
|
-
}
|
|
355
|
-
function styleStringToObject(styleString) {
|
|
356
|
-
var styleObject = {};
|
|
357
|
-
// 去掉字符串两端的空格,然后按分号分割
|
|
358
|
-
var styles = styleString.trim().split(';');
|
|
359
|
-
// 迭代每一个样式属性对
|
|
360
|
-
styles.forEach(function (style) {
|
|
361
|
-
if (style) {
|
|
362
|
-
// 忽略空字符串
|
|
363
|
-
var _a = __read(style.split(':'), 2), property = _a[0], value = _a[1];
|
|
364
|
-
if (property && value) {
|
|
365
|
-
// 去掉两端的空格并将结果存储在对象中
|
|
366
|
-
styleObject[property.trim()] = value.trim();
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
});
|
|
370
|
-
return styleObject;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* @description 修改视频尺寸
|
|
375
|
-
* @author wangfupeng
|
|
376
|
-
*/
|
|
377
|
-
/**
|
|
378
|
-
* 生成唯一的 DOM ID
|
|
379
|
-
*/
|
|
380
|
-
function genDomID$2() {
|
|
381
|
-
return genRandomStr('w-e-insert-video');
|
|
382
|
-
}
|
|
383
|
-
var EditorVideoSizeMenu = /** @class */ (function () {
|
|
384
|
-
function EditorVideoSizeMenu() {
|
|
385
|
-
this.title = t('videoModule.editSize');
|
|
386
|
-
this.tag = 'button';
|
|
387
|
-
this.showModal = true; // 点击 button 时显示 modal
|
|
388
|
-
this.modalWidth = 320;
|
|
389
|
-
this.$content = null;
|
|
390
|
-
this.widthInputId = genDomID$2();
|
|
391
|
-
this.heightInputId = genDomID$2();
|
|
392
|
-
this.buttonId = genDomID$2();
|
|
393
|
-
}
|
|
394
|
-
EditorVideoSizeMenu.prototype.getSelectedVideoNode = function (editor) {
|
|
395
|
-
return DomEditor.getSelectedNodeByType(editor, 'video');
|
|
396
|
-
};
|
|
397
|
-
EditorVideoSizeMenu.prototype.getValue = function (_editor) {
|
|
398
|
-
// 插入菜单,不需要 value
|
|
399
|
-
return '';
|
|
400
|
-
};
|
|
401
|
-
EditorVideoSizeMenu.prototype.isActive = function (_editor) {
|
|
402
|
-
// 任何时候,都不用激活 menu
|
|
403
|
-
return false;
|
|
404
|
-
};
|
|
405
|
-
EditorVideoSizeMenu.prototype.exec = function (_editor, _value) {
|
|
406
|
-
// 点击菜单时,弹出 modal 之前,不需要执行其他代码
|
|
407
|
-
// 此处空着即可
|
|
408
|
-
};
|
|
409
|
-
EditorVideoSizeMenu.prototype.isDisabled = function (editor) {
|
|
410
|
-
if (editor.selection == null) {
|
|
411
|
-
return true;
|
|
412
|
-
}
|
|
413
|
-
var videoNode = this.getSelectedVideoNode(editor);
|
|
414
|
-
if (videoNode == null) {
|
|
415
|
-
// 选区未处于 video node ,则禁用
|
|
416
|
-
return true;
|
|
417
|
-
}
|
|
418
|
-
return false;
|
|
419
|
-
};
|
|
420
|
-
EditorVideoSizeMenu.prototype.getModalPositionNode = function (editor) {
|
|
421
|
-
return this.getSelectedVideoNode(editor);
|
|
422
|
-
};
|
|
423
|
-
EditorVideoSizeMenu.prototype.getModalContentElem = function (editor) {
|
|
424
|
-
var _a = this, widthInputId = _a.widthInputId, heightInputId = _a.heightInputId, buttonId = _a.buttonId;
|
|
425
|
-
var _b = __read(genModalInputElems(t('videoModule.width'), widthInputId, 'auto'), 2), widthContainerElem = _b[0], inputWidthElem = _b[1];
|
|
426
|
-
var $inputWidth = $(inputWidthElem);
|
|
427
|
-
var _c = __read(genModalInputElems(t('videoModule.height'), heightInputId, 'auto'), 2), heightContainerElem = _c[0], inputHeightElem = _c[1];
|
|
428
|
-
var $inputHeight = $(inputHeightElem);
|
|
429
|
-
var _d = __read(genModalButtonElems(buttonId, t('videoModule.ok')), 1), buttonContainerElem = _d[0];
|
|
430
|
-
var videoNode = this.getSelectedVideoNode(editor);
|
|
431
|
-
if (this.$content == null) {
|
|
432
|
-
// 第一次渲染
|
|
433
|
-
var $content_1 = $('<div></div>');
|
|
434
|
-
// 绑定事件(第一次渲染时绑定,不要重复绑定)
|
|
435
|
-
$content_1.on('click', "#".concat(buttonId), function (e) {
|
|
436
|
-
e.preventDefault();
|
|
437
|
-
var rawWidth = $content_1.find("#".concat(widthInputId)).val().trim();
|
|
438
|
-
var rawHeight = $content_1.find("#".concat(heightInputId)).val().trim();
|
|
439
|
-
var isPercentage = function (value) { return /^\d+(\.\d+)?%$/.test(value); }; // 检查是否为合法的百分比字符串
|
|
440
|
-
var isNumeric = function (value) { return /^\d+(\.\d+)?$/.test(value); }; // 检查是否为合法的数字
|
|
441
|
-
var width = 'auto';
|
|
442
|
-
var height = 'auto';
|
|
443
|
-
if (isPercentage(rawWidth)) {
|
|
444
|
-
width = rawWidth;
|
|
445
|
-
}
|
|
446
|
-
else if (isNumeric(rawWidth)) {
|
|
447
|
-
width = "".concat(parseInt(rawWidth, 10), "px");
|
|
448
|
-
}
|
|
449
|
-
if (isPercentage(rawHeight)) {
|
|
450
|
-
height = rawHeight;
|
|
451
|
-
}
|
|
452
|
-
else if (isNumeric(rawHeight)) {
|
|
453
|
-
height = "".concat(parseInt(rawHeight, 10), "px");
|
|
454
|
-
}
|
|
455
|
-
var _a = videoNode.style, style = _a === void 0 ? {} : _a;
|
|
456
|
-
editor.restoreSelection();
|
|
457
|
-
var props = {
|
|
458
|
-
style: __assign(__assign({}, style), { width: width, height: height }),
|
|
459
|
-
};
|
|
460
|
-
// 修改尺寸
|
|
461
|
-
Transforms.setNodes(editor, props, {
|
|
462
|
-
match: function (n) { return DomEditor.checkNodeType(n, 'video'); },
|
|
463
|
-
});
|
|
464
|
-
editor.hidePanelOrModal(); // 隐藏 modal
|
|
465
|
-
});
|
|
466
|
-
this.$content = $content_1;
|
|
467
|
-
}
|
|
468
|
-
var $content = this.$content;
|
|
469
|
-
// 先清空,再重新添加 DOM 内容
|
|
470
|
-
$content.empty();
|
|
471
|
-
$content.append(widthContainerElem);
|
|
472
|
-
$content.append(heightContainerElem);
|
|
473
|
-
$content.append(buttonContainerElem);
|
|
474
|
-
if (videoNode == null) {
|
|
475
|
-
return $content[0];
|
|
476
|
-
}
|
|
477
|
-
// 初始化 input 值
|
|
478
|
-
var _e = videoNode.style, style = _e === void 0 ? {} : _e;
|
|
479
|
-
var _f = style.width, width = _f === void 0 ? '' : _f, _g = style.height, height = _g === void 0 ? '' : _g;
|
|
480
|
-
$inputWidth.val(width);
|
|
481
|
-
$inputHeight.val(height);
|
|
482
|
-
setTimeout(function () {
|
|
483
|
-
$inputWidth.focus();
|
|
484
|
-
});
|
|
485
|
-
return $content[0];
|
|
486
|
-
};
|
|
487
|
-
return EditorVideoSizeMenu;
|
|
488
|
-
}());
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* @description icon svg
|
|
492
|
-
* @author wangfupeng
|
|
493
|
-
*/
|
|
494
|
-
/**
|
|
495
|
-
* 【注意】svg 字符串的长度 ,否则会导致代码体积过大
|
|
496
|
-
* 尽量选择 https://www.iconfont.cn/collections/detail?spm=a313x.7781069.0.da5a778a4&cid=20293
|
|
497
|
-
* 找不到再从 iconfont.com 搜索
|
|
498
|
-
*/
|
|
499
|
-
// 视频
|
|
500
|
-
var VIDEO_SVG = '<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>';
|
|
501
|
-
// 上传视频
|
|
502
|
-
var UPLOAD_VIDEO_SVG = '<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>';
|
|
503
|
-
// 编辑
|
|
504
|
-
var PENCIL_SVG = '<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>';
|
|
505
|
-
// // 垃圾桶(删除)
|
|
506
|
-
// export const TRASH_SVG =
|
|
507
|
-
// '<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>'
|
|
508
|
-
|
|
509
|
-
/**
|
|
510
|
-
* @description editor video menu
|
|
511
|
-
* @author
|
|
512
|
-
*/
|
|
513
|
-
/**
|
|
514
|
-
* 生成唯一的 DOM ID
|
|
515
|
-
*/
|
|
516
|
-
function genDomID$1() {
|
|
517
|
-
return genRandomStr('w-e-edit-video');
|
|
518
|
-
}
|
|
519
|
-
var Editvideo = /** @class */ (function () {
|
|
520
|
-
function Editvideo() {
|
|
521
|
-
this.title = t('videoModule.edit');
|
|
522
|
-
this.iconSvg = PENCIL_SVG;
|
|
523
|
-
this.tag = 'button';
|
|
524
|
-
this.showModal = true; // 点击 button 时显示 modal
|
|
525
|
-
this.modalWidth = 300;
|
|
526
|
-
this.$content = null;
|
|
527
|
-
this.srcInputId = genDomID$1();
|
|
528
|
-
this.posterInputId = genDomID$1();
|
|
529
|
-
this.buttonId = genDomID$1();
|
|
530
|
-
}
|
|
531
|
-
Editvideo.prototype.getSelectedVideoNode = function (editor) {
|
|
532
|
-
return DomEditor.getSelectedNodeByType(editor, 'video');
|
|
533
|
-
};
|
|
534
|
-
Editvideo.prototype.getValue = function (_editor) {
|
|
535
|
-
// 编辑视频,用不到 getValue
|
|
536
|
-
return '';
|
|
537
|
-
};
|
|
538
|
-
Editvideo.prototype.isActive = function (_editor) {
|
|
539
|
-
// 无需 active
|
|
540
|
-
return false;
|
|
541
|
-
};
|
|
542
|
-
Editvideo.prototype.exec = function (_editor, _value) {
|
|
543
|
-
// 点击菜单时,弹出 modal 之前,不需要执行其他代码
|
|
544
|
-
// 此处空着即可
|
|
545
|
-
};
|
|
546
|
-
Editvideo.prototype.isDisabled = function (editor) {
|
|
547
|
-
if (editor.selection == null) {
|
|
548
|
-
return true;
|
|
549
|
-
}
|
|
550
|
-
var videoNode = this.getSelectedVideoNode(editor);
|
|
551
|
-
if (videoNode == null) {
|
|
552
|
-
// 选区未处于 video node ,则禁用
|
|
553
|
-
return true;
|
|
554
|
-
}
|
|
555
|
-
return false;
|
|
556
|
-
};
|
|
557
|
-
Editvideo.prototype.getModalPositionNode = function (editor) {
|
|
558
|
-
return this.getSelectedVideoNode(editor);
|
|
559
|
-
};
|
|
560
|
-
Editvideo.prototype.getModalContentElem = function (editor) {
|
|
561
|
-
var _this = this;
|
|
562
|
-
var _a = this, srcInputId = _a.srcInputId, posterInputId = _a.posterInputId, buttonId = _a.buttonId;
|
|
563
|
-
// 获取 input button elem
|
|
564
|
-
var _b = __read(genModalInputElems(t('videoModule.videoSrc'), srcInputId, t('videoModule.videoSrcPlaceHolder')), 2), srcContainerElem = _b[0], inputSrcElem = _b[1];
|
|
565
|
-
var _c = __read(genModalInputElems(t('videoModule.videoPoster'), posterInputId, t('videoModule.videoPosterPlaceHolder')), 2), posterContainerElem = _c[0], inputPosterElem = _c[1];
|
|
566
|
-
var $inputSrc = $(inputSrcElem);
|
|
567
|
-
var $inputPoster = $(inputPosterElem);
|
|
568
|
-
var _d = __read(genModalButtonElems(buttonId, t('videoModule.ok')), 1), buttonContainerElem = _d[0];
|
|
569
|
-
if (this.$content == null) {
|
|
570
|
-
// 第一次渲染
|
|
571
|
-
var $content_1 = $('<div></div>');
|
|
572
|
-
// 绑定事件(第一次渲染时绑定,不要重复绑定)
|
|
573
|
-
$content_1.on('click', "#".concat(buttonId), function (e) { return __awaiter(_this, void 0, void 0, function () {
|
|
574
|
-
var src, poster, videoId, props;
|
|
575
|
-
return __generator(this, function (_a) {
|
|
576
|
-
e.preventDefault();
|
|
577
|
-
src = $content_1.find("#".concat(srcInputId)).val().trim();
|
|
578
|
-
poster = $content_1.find("#".concat(posterInputId)).val().trim();
|
|
579
|
-
videoId = genRandomStr('video-');
|
|
580
|
-
props = {
|
|
581
|
-
src: src,
|
|
582
|
-
poster: poster,
|
|
583
|
-
key: videoId,
|
|
584
|
-
};
|
|
585
|
-
editor.restoreSelection();
|
|
586
|
-
// 修改尺寸
|
|
587
|
-
Transforms.setNodes(editor, props, {
|
|
588
|
-
match: function (n) { return DomEditor.checkNodeType(n, 'video'); },
|
|
589
|
-
});
|
|
590
|
-
editor.hidePanelOrModal(); // 隐藏 modal
|
|
591
|
-
return [2 /*return*/];
|
|
592
|
-
});
|
|
593
|
-
}); });
|
|
594
|
-
// 记录属性,重要
|
|
595
|
-
this.$content = $content_1;
|
|
596
|
-
}
|
|
597
|
-
var $content = this.$content;
|
|
598
|
-
$content.empty(); // 先清空内容
|
|
599
|
-
// append inputs and button
|
|
600
|
-
$content.append(srcContainerElem);
|
|
601
|
-
$content.append(posterContainerElem);
|
|
602
|
-
$content.append(buttonContainerElem);
|
|
603
|
-
var videoNode = this.getSelectedVideoNode(editor);
|
|
604
|
-
if (videoNode == null) {
|
|
605
|
-
return $content[0];
|
|
606
|
-
}
|
|
607
|
-
// 初始化 input 值
|
|
608
|
-
var _e = videoNode.src, src = _e === void 0 ? '' : _e, _f = videoNode.poster, poster = _f === void 0 ? '' : _f;
|
|
609
|
-
$inputSrc.val(src);
|
|
610
|
-
$inputPoster.val(poster);
|
|
611
|
-
// focus 一个 input(异步,此时 DOM 尚未渲染)
|
|
612
|
-
setTimeout(function () {
|
|
613
|
-
$inputSrc.focus();
|
|
614
|
-
});
|
|
615
|
-
return $content[0];
|
|
616
|
-
};
|
|
617
|
-
return Editvideo;
|
|
618
|
-
}());
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
* @description insert video
|
|
622
|
-
* @author wangfupeng
|
|
623
|
-
*/
|
|
624
|
-
/**
|
|
625
|
-
* 插入视频
|
|
626
|
-
* @param editor editor
|
|
627
|
-
* @param src video src
|
|
628
|
-
* @param poster video poster
|
|
629
|
-
*/
|
|
630
|
-
function insertVideo (editor_1, src_1) {
|
|
631
|
-
return __awaiter(this, arguments, void 0, function (editor, src, poster, width, height) {
|
|
632
|
-
var _a, onInsertedVideo, checkVideo, parseVideoSrc, checkRes, parsedSrc, video;
|
|
633
|
-
if (poster === void 0) { poster = ''; }
|
|
634
|
-
if (width === void 0) { width = ''; }
|
|
635
|
-
if (height === void 0) { height = ''; }
|
|
636
|
-
return __generator(this, function (_b) {
|
|
637
|
-
switch (_b.label) {
|
|
638
|
-
case 0:
|
|
639
|
-
if (!src) {
|
|
640
|
-
return [2 /*return*/];
|
|
641
|
-
}
|
|
642
|
-
// 还原选区
|
|
643
|
-
editor.restoreSelection();
|
|
644
|
-
_a = editor.getMenuConfig('insertVideo'), onInsertedVideo = _a.onInsertedVideo, checkVideo = _a.checkVideo, parseVideoSrc = _a.parseVideoSrc;
|
|
645
|
-
return [4 /*yield*/, checkVideo(src, poster)];
|
|
646
|
-
case 1:
|
|
647
|
-
checkRes = _b.sent();
|
|
648
|
-
if (typeof checkRes === 'string') {
|
|
649
|
-
// 校验失败,给出提示
|
|
650
|
-
editor.alert(checkRes, 'error');
|
|
651
|
-
return [2 /*return*/];
|
|
652
|
-
}
|
|
653
|
-
if (checkRes == null) {
|
|
654
|
-
// 校验失败,不给提示
|
|
655
|
-
return [2 /*return*/];
|
|
656
|
-
}
|
|
657
|
-
return [4 /*yield*/, parseVideoSrc(src)];
|
|
658
|
-
case 2:
|
|
659
|
-
parsedSrc = _b.sent();
|
|
660
|
-
if (parsedSrc.trim().indexOf('<iframe ') !== 0) {
|
|
661
|
-
parsedSrc = replaceSymbols(parsedSrc);
|
|
662
|
-
}
|
|
663
|
-
video = {
|
|
664
|
-
type: 'video',
|
|
665
|
-
src: parsedSrc,
|
|
666
|
-
poster: poster,
|
|
667
|
-
children: [{ text: '' }],
|
|
668
|
-
style: {
|
|
669
|
-
width: width,
|
|
670
|
-
height: height,
|
|
671
|
-
},
|
|
672
|
-
};
|
|
673
|
-
// 插入视频
|
|
674
|
-
// 不使用此方式会比正常的选区选取先执行
|
|
675
|
-
Promise.resolve().then(function () {
|
|
676
|
-
if (DomEditor.isSelectedEmptyParagraph(editor)) {
|
|
677
|
-
Transforms.removeNodes(editor, { mode: 'highest' });
|
|
678
|
-
}
|
|
679
|
-
Transforms.insertNodes(editor, video, { mode: 'highest' });
|
|
680
|
-
});
|
|
681
|
-
// 调用 callback
|
|
682
|
-
onInsertedVideo(video);
|
|
683
|
-
return [2 /*return*/];
|
|
684
|
-
}
|
|
685
|
-
});
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* @description insert video menu
|
|
691
|
-
* @author wangfupeng
|
|
692
|
-
*/
|
|
693
|
-
/**
|
|
694
|
-
* 生成唯一的 DOM ID
|
|
695
|
-
*/
|
|
696
|
-
function genDomID() {
|
|
697
|
-
return genRandomStr('w-e-insert-video');
|
|
698
|
-
}
|
|
699
|
-
var InsertVideoMenu = /** @class */ (function () {
|
|
700
|
-
function InsertVideoMenu() {
|
|
701
|
-
this.title = t('videoModule.insertVideo');
|
|
702
|
-
this.iconSvg = VIDEO_SVG;
|
|
703
|
-
this.tag = 'button';
|
|
704
|
-
this.showModal = true; // 点击 button 时显示 modal
|
|
705
|
-
this.modalWidth = 320;
|
|
706
|
-
this.$content = null;
|
|
707
|
-
this.srcInputId = genDomID();
|
|
708
|
-
this.posterInputId = genDomID();
|
|
709
|
-
this.buttonId = genDomID();
|
|
710
|
-
}
|
|
711
|
-
InsertVideoMenu.prototype.getValue = function (_editor) {
|
|
712
|
-
// 插入菜单,不需要 value
|
|
713
|
-
return '';
|
|
714
|
-
};
|
|
715
|
-
InsertVideoMenu.prototype.isActive = function (_editor) {
|
|
716
|
-
// 任何时候,都不用激活 menu
|
|
717
|
-
return false;
|
|
718
|
-
};
|
|
719
|
-
InsertVideoMenu.prototype.exec = function (_editor, _value) {
|
|
720
|
-
// 点击菜单时,弹出 modal 之前,不需要执行其他代码
|
|
721
|
-
// 此处空着即可
|
|
722
|
-
};
|
|
723
|
-
InsertVideoMenu.prototype.isDisabled = function (editor) {
|
|
724
|
-
var selection = editor.selection;
|
|
725
|
-
if (selection == null) {
|
|
726
|
-
return true;
|
|
727
|
-
}
|
|
728
|
-
if (!Range.isCollapsed(selection)) {
|
|
729
|
-
return true;
|
|
730
|
-
} // 选区非折叠,禁用
|
|
731
|
-
var selectedElems = DomEditor.getSelectedElems(editor);
|
|
732
|
-
var hasVoidOrPre = selectedElems.some(function (elem) {
|
|
733
|
-
var type = DomEditor.getNodeType(elem);
|
|
734
|
-
if (type === 'pre') {
|
|
735
|
-
return true;
|
|
736
|
-
}
|
|
737
|
-
if (type === 'list-item') {
|
|
738
|
-
return true;
|
|
739
|
-
}
|
|
740
|
-
if (editor.isVoid(elem)) {
|
|
741
|
-
return true;
|
|
742
|
-
}
|
|
743
|
-
return false;
|
|
744
|
-
});
|
|
745
|
-
if (hasVoidOrPre) {
|
|
746
|
-
return true;
|
|
747
|
-
} // void 或 pre ,禁用
|
|
748
|
-
return false;
|
|
749
|
-
};
|
|
750
|
-
InsertVideoMenu.prototype.getModalPositionNode = function (_editor) {
|
|
751
|
-
return null; // modal 依据选区定位
|
|
752
|
-
};
|
|
753
|
-
InsertVideoMenu.prototype.getModalContentElem = function (editor) {
|
|
754
|
-
var _this = this;
|
|
755
|
-
var _a = this, srcInputId = _a.srcInputId, posterInputId = _a.posterInputId, buttonId = _a.buttonId;
|
|
756
|
-
// 获取 input button elem
|
|
757
|
-
var _b = __read(genModalInputElems(t('videoModule.videoSrc'), srcInputId, t('videoModule.videoSrcPlaceHolder')), 2), srcContainerElem = _b[0], inputSrcElem = _b[1];
|
|
758
|
-
var _c = __read(genModalInputElems(t('videoModule.videoPoster'), posterInputId, t('videoModule.videoPosterPlaceHolder')), 2), posterContainerElem = _c[0], inputPosterElem = _c[1];
|
|
759
|
-
var $inputSrc = $(inputSrcElem);
|
|
760
|
-
var $inputPoster = $(inputPosterElem);
|
|
761
|
-
var _d = __read(genModalButtonElems(buttonId, t('videoModule.ok')), 1), buttonContainerElem = _d[0];
|
|
762
|
-
if (this.$content == null) {
|
|
763
|
-
// 第一次渲染
|
|
764
|
-
var $content_1 = $('<div></div>');
|
|
765
|
-
// 绑定事件(第一次渲染时绑定,不要重复绑定)
|
|
766
|
-
$content_1.on('click', "#".concat(buttonId), function (e) { return __awaiter(_this, void 0, void 0, function () {
|
|
767
|
-
var src, poster;
|
|
768
|
-
return __generator(this, function (_a) {
|
|
769
|
-
switch (_a.label) {
|
|
770
|
-
case 0:
|
|
771
|
-
e.preventDefault();
|
|
772
|
-
src = $content_1.find("#".concat(srcInputId)).val().trim();
|
|
773
|
-
poster = $content_1.find("#".concat(posterInputId)).val().trim();
|
|
774
|
-
return [4 /*yield*/, insertVideo(editor, src, poster)];
|
|
775
|
-
case 1:
|
|
776
|
-
_a.sent();
|
|
777
|
-
editor.hidePanelOrModal(); // 隐藏 modal
|
|
778
|
-
return [2 /*return*/];
|
|
779
|
-
}
|
|
780
|
-
});
|
|
781
|
-
}); });
|
|
782
|
-
// 记录属性,重要
|
|
783
|
-
this.$content = $content_1;
|
|
784
|
-
}
|
|
785
|
-
var $content = this.$content;
|
|
786
|
-
$content.empty(); // 先清空内容
|
|
787
|
-
// append inputs and button
|
|
788
|
-
$content.append(srcContainerElem);
|
|
789
|
-
$content.append(posterContainerElem);
|
|
790
|
-
$content.append(buttonContainerElem);
|
|
791
|
-
// 设置 input val
|
|
792
|
-
$inputSrc.val('');
|
|
793
|
-
$inputPoster.val('');
|
|
794
|
-
// focus 一个 input(异步,此时 DOM 尚未渲染)
|
|
795
|
-
setTimeout(function () {
|
|
796
|
-
$inputSrc.focus();
|
|
797
|
-
});
|
|
798
|
-
return $content[0];
|
|
799
|
-
};
|
|
800
|
-
return InsertVideoMenu;
|
|
801
|
-
}());
|
|
802
|
-
|
|
803
|
-
/**
|
|
804
|
-
* @description upload video
|
|
805
|
-
* @author wangfupeng
|
|
806
|
-
*/
|
|
807
|
-
function getMenuConfig(editor) {
|
|
808
|
-
// 获取配置,见 `./config.js`
|
|
809
|
-
return editor.getMenuConfig('uploadVideo');
|
|
810
|
-
}
|
|
811
|
-
// 存储 editor uppy 的关系 - 缓存 uppy ,不重复创建
|
|
812
|
-
var EDITOR_TO_UPPY_MAP = new WeakMap();
|
|
813
|
-
/**
|
|
814
|
-
* 获取 uppy 实例(并通过 editor 缓存)
|
|
815
|
-
* @param editor editor
|
|
816
|
-
*/
|
|
817
|
-
function getUppy(editor) {
|
|
818
|
-
// 从缓存中获取
|
|
819
|
-
var uppy = EDITOR_TO_UPPY_MAP.get(editor);
|
|
820
|
-
if (uppy != null) {
|
|
821
|
-
return uppy;
|
|
822
|
-
}
|
|
823
|
-
var menuConfig = getMenuConfig(editor);
|
|
824
|
-
var onSuccess = menuConfig.onSuccess, onProgress = menuConfig.onProgress, onFailed = menuConfig.onFailed, customInsert = menuConfig.customInsert, onError = menuConfig.onError;
|
|
825
|
-
// 上传完成之后
|
|
826
|
-
var successHandler = function (file, res) {
|
|
827
|
-
// 预期 res 格式:
|
|
828
|
-
// 成功:{ errno: 0, data: { url, poster } }
|
|
829
|
-
// 失败:{ errno: !0, message: '失败信息' }
|
|
830
|
-
if (customInsert) {
|
|
831
|
-
// 用户自定义插入视频,此时 res 格式可能不符合预期
|
|
832
|
-
customInsert(res, function (src, poster) { return insertVideo(editor, src, poster); });
|
|
833
|
-
// success 回调
|
|
834
|
-
onSuccess(file, res);
|
|
835
|
-
return;
|
|
836
|
-
}
|
|
837
|
-
var _a = res.errno, errno = _a === void 0 ? 1 : _a, _b = res.data, data = _b === void 0 ? {} : _b;
|
|
838
|
-
if (errno !== 0) {
|
|
839
|
-
// failed 回调
|
|
840
|
-
onFailed(file, res);
|
|
841
|
-
return;
|
|
842
|
-
}
|
|
843
|
-
var _c = data.url, url = _c === void 0 ? '' : _c, _d = data.poster, poster = _d === void 0 ? '' : _d;
|
|
844
|
-
insertVideo(editor, url, poster);
|
|
845
|
-
// success 回调
|
|
846
|
-
onSuccess(file, res);
|
|
847
|
-
};
|
|
848
|
-
// progress 显示进度条
|
|
849
|
-
var progressHandler = function (progress) {
|
|
850
|
-
editor.showProgressBar(progress);
|
|
851
|
-
// 回调函数
|
|
852
|
-
if (onProgress) {
|
|
853
|
-
onProgress(progress);
|
|
854
|
-
}
|
|
855
|
-
};
|
|
856
|
-
// onError 提示错误
|
|
857
|
-
var errorHandler = function (file, err, res) {
|
|
858
|
-
onError(file, err, res);
|
|
859
|
-
};
|
|
860
|
-
// 创建 uppy
|
|
861
|
-
uppy = createUploader(__assign(__assign({}, menuConfig), { onProgress: progressHandler, onSuccess: successHandler, onError: errorHandler }));
|
|
862
|
-
// 缓存 uppy
|
|
863
|
-
EDITOR_TO_UPPY_MAP.set(editor, uppy);
|
|
864
|
-
return uppy;
|
|
865
|
-
}
|
|
866
|
-
/**
|
|
867
|
-
* 上传视频文件
|
|
868
|
-
* @param editor editor
|
|
869
|
-
* @param file file
|
|
870
|
-
*/
|
|
871
|
-
function uploadFile(editor, files) {
|
|
872
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
873
|
-
var uppy, uploadList;
|
|
874
|
-
return __generator(this, function (_a) {
|
|
875
|
-
switch (_a.label) {
|
|
876
|
-
case 0:
|
|
877
|
-
uppy = getUppy(editor);
|
|
878
|
-
uploadList = files.map(function (file) { return ({
|
|
879
|
-
name: file.name,
|
|
880
|
-
type: file.type,
|
|
881
|
-
size: file.size,
|
|
882
|
-
data: file,
|
|
883
|
-
}); });
|
|
884
|
-
uppy.addFiles(uploadList);
|
|
885
|
-
return [4 /*yield*/, uppy.upload()];
|
|
886
|
-
case 1:
|
|
887
|
-
_a.sent();
|
|
888
|
-
return [2 /*return*/];
|
|
889
|
-
}
|
|
890
|
-
});
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
function uploadVideos (editor, files) {
|
|
894
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
895
|
-
var fileList, uploadFileList, customUpload, _a, fileList_1, fileList_1_1, file, e_1_1;
|
|
896
|
-
var _b, e_1, _c, _d;
|
|
897
|
-
return __generator(this, function (_e) {
|
|
898
|
-
switch (_e.label) {
|
|
899
|
-
case 0:
|
|
900
|
-
if (files == null) {
|
|
901
|
-
return [2 /*return*/];
|
|
902
|
-
}
|
|
903
|
-
fileList = Array.prototype.slice.call(files);
|
|
904
|
-
uploadFileList = [];
|
|
905
|
-
customUpload = getMenuConfig(editor).customUpload;
|
|
906
|
-
_e.label = 1;
|
|
907
|
-
case 1:
|
|
908
|
-
_e.trys.push([1, 8, 9, 14]);
|
|
909
|
-
_a = true, fileList_1 = __asyncValues(fileList);
|
|
910
|
-
_e.label = 2;
|
|
911
|
-
case 2: return [4 /*yield*/, fileList_1.next()];
|
|
912
|
-
case 3:
|
|
913
|
-
if (!(fileList_1_1 = _e.sent(), _b = fileList_1_1.done, !_b)) return [3 /*break*/, 7];
|
|
914
|
-
_d = fileList_1_1.value;
|
|
915
|
-
_a = false;
|
|
916
|
-
file = _d;
|
|
917
|
-
if (!customUpload) return [3 /*break*/, 5];
|
|
918
|
-
// 自定义上传
|
|
919
|
-
return [4 /*yield*/, customUpload(file, function (src, poster) { return insertVideo(editor, src, poster); })];
|
|
920
|
-
case 4:
|
|
921
|
-
// 自定义上传
|
|
922
|
-
_e.sent();
|
|
923
|
-
return [3 /*break*/, 6];
|
|
924
|
-
case 5:
|
|
925
|
-
uploadFileList.push(file);
|
|
926
|
-
_e.label = 6;
|
|
927
|
-
case 6:
|
|
928
|
-
_a = true;
|
|
929
|
-
return [3 /*break*/, 2];
|
|
930
|
-
case 7: return [3 /*break*/, 14];
|
|
931
|
-
case 8:
|
|
932
|
-
e_1_1 = _e.sent();
|
|
933
|
-
e_1 = { error: e_1_1 };
|
|
934
|
-
return [3 /*break*/, 14];
|
|
935
|
-
case 9:
|
|
936
|
-
_e.trys.push([9, , 12, 13]);
|
|
937
|
-
if (!(!_a && !_b && (_c = fileList_1.return))) return [3 /*break*/, 11];
|
|
938
|
-
return [4 /*yield*/, _c.call(fileList_1)];
|
|
939
|
-
case 10:
|
|
940
|
-
_e.sent();
|
|
941
|
-
_e.label = 11;
|
|
942
|
-
case 11: return [3 /*break*/, 13];
|
|
943
|
-
case 12:
|
|
944
|
-
if (e_1) throw e_1.error;
|
|
945
|
-
return [7 /*endfinally*/];
|
|
946
|
-
case 13: return [7 /*endfinally*/];
|
|
947
|
-
case 14:
|
|
948
|
-
if (!(uploadFileList.length > 0)) return [3 /*break*/, 16];
|
|
949
|
-
return [4 /*yield*/, uploadFile(editor, uploadFileList)];
|
|
950
|
-
case 15:
|
|
951
|
-
_e.sent();
|
|
952
|
-
_e.label = 16;
|
|
953
|
-
case 16: return [2 /*return*/];
|
|
954
|
-
}
|
|
955
|
-
});
|
|
956
|
-
});
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
/**
|
|
960
|
-
* @description upload video menu
|
|
961
|
-
* @author wangfupeng
|
|
962
|
-
*/
|
|
963
|
-
var UploadVideoMenu = /** @class */ (function () {
|
|
964
|
-
function UploadVideoMenu() {
|
|
965
|
-
this.title = t('videoModule.uploadVideo');
|
|
966
|
-
this.iconSvg = UPLOAD_VIDEO_SVG;
|
|
967
|
-
this.tag = 'button';
|
|
968
|
-
}
|
|
969
|
-
UploadVideoMenu.prototype.getValue = function (_editor) {
|
|
970
|
-
// 无需获取 val
|
|
971
|
-
return '';
|
|
972
|
-
};
|
|
973
|
-
UploadVideoMenu.prototype.isActive = function (_editor) {
|
|
974
|
-
// 任何时候,都不用激活 menu
|
|
975
|
-
return false;
|
|
976
|
-
};
|
|
977
|
-
UploadVideoMenu.prototype.exec = function (editor, _value) {
|
|
978
|
-
var _a = this.getMenuConfig(editor), _b = _a.allowedFileTypes, allowedFileTypes = _b === void 0 ? [] : _b, customBrowseAndUpload = _a.customBrowseAndUpload;
|
|
979
|
-
// 自定义选择图片,并上传,如图床
|
|
980
|
-
if (customBrowseAndUpload) {
|
|
981
|
-
customBrowseAndUpload(function (src, poster) { return insertVideo(editor, src, poster); });
|
|
982
|
-
return;
|
|
983
|
-
}
|
|
984
|
-
// 设置选择文件的类型
|
|
985
|
-
var acceptAttr = '';
|
|
986
|
-
if (allowedFileTypes.length > 0) {
|
|
987
|
-
acceptAttr = "accept=\"".concat(allowedFileTypes.join(', '), "\"");
|
|
988
|
-
}
|
|
989
|
-
// 添加 file input(每次重新创建 input)
|
|
990
|
-
var $body = $('body');
|
|
991
|
-
var $inputFile = $("<input type=\"file\" ".concat(acceptAttr, " multiple/>"));
|
|
992
|
-
$inputFile.hide();
|
|
993
|
-
$body.append($inputFile);
|
|
994
|
-
$inputFile.click();
|
|
995
|
-
// 选中文件
|
|
996
|
-
$inputFile.on('change', function () {
|
|
997
|
-
var files = $inputFile[0].files;
|
|
998
|
-
uploadVideos(editor, files); // 上传文件
|
|
999
|
-
});
|
|
1000
|
-
};
|
|
1001
|
-
UploadVideoMenu.prototype.isDisabled = function (editor) {
|
|
1002
|
-
var selection = editor.selection;
|
|
1003
|
-
if (selection == null) {
|
|
1004
|
-
return true;
|
|
1005
|
-
}
|
|
1006
|
-
if (!Range.isCollapsed(selection)) {
|
|
1007
|
-
return true;
|
|
1008
|
-
} // 选区非折叠,禁用
|
|
1009
|
-
var selectedElems = DomEditor.getSelectedElems(editor);
|
|
1010
|
-
var hasVoidOrPre = selectedElems.some(function (elem) {
|
|
1011
|
-
var type = DomEditor.getNodeType(elem);
|
|
1012
|
-
if (type === 'pre') {
|
|
1013
|
-
return true;
|
|
1014
|
-
}
|
|
1015
|
-
if (type === 'list-item') {
|
|
1016
|
-
return true;
|
|
1017
|
-
}
|
|
1018
|
-
if (editor.isVoid(elem)) {
|
|
1019
|
-
return true;
|
|
1020
|
-
}
|
|
1021
|
-
return false;
|
|
1022
|
-
});
|
|
1023
|
-
if (hasVoidOrPre) {
|
|
1024
|
-
return true;
|
|
1025
|
-
} // void 或 pre ,禁用
|
|
1026
|
-
return false;
|
|
1027
|
-
};
|
|
1028
|
-
UploadVideoMenu.prototype.getMenuConfig = function (editor) {
|
|
1029
|
-
// 获取配置,见 `./config.js`
|
|
1030
|
-
return editor.getMenuConfig('uploadVideo');
|
|
1031
|
-
};
|
|
1032
|
-
return UploadVideoMenu;
|
|
1033
|
-
}());
|
|
1034
|
-
|
|
1035
|
-
/**
|
|
1036
|
-
* @description video menu
|
|
1037
|
-
* @author wangfupeng
|
|
1038
|
-
*/
|
|
1039
|
-
var insertVideoMenuConf = {
|
|
1040
|
-
key: 'insertVideo',
|
|
1041
|
-
factory: function () {
|
|
1042
|
-
return new InsertVideoMenu();
|
|
1043
|
-
},
|
|
1044
|
-
// 默认的菜单菜单配置,将存储在 editorConfig.MENU_CONF[key] 中
|
|
1045
|
-
// 创建编辑器时,可通过 editorConfig.MENU_CONF[key] = {...} 来修改
|
|
1046
|
-
config: genInsertVideoMenuConfig(),
|
|
1047
|
-
};
|
|
1048
|
-
var uploadVideoMenuConf = {
|
|
1049
|
-
key: 'uploadVideo',
|
|
1050
|
-
factory: function () {
|
|
1051
|
-
return new UploadVideoMenu();
|
|
1052
|
-
},
|
|
1053
|
-
// 默认的菜单菜单配置,将存储在 editorConfig.MENU_CONF[key] 中
|
|
1054
|
-
// 创建编辑器时,可通过 editorConfig.MENU_CONF[key] = {...} 来修改
|
|
1055
|
-
config: genUploadVideoMenuConfig(),
|
|
1056
|
-
};
|
|
1057
|
-
var editorVideoSizeMenuConf = {
|
|
1058
|
-
key: 'editVideoSize',
|
|
1059
|
-
factory: function () {
|
|
1060
|
-
return new EditorVideoSizeMenu();
|
|
1061
|
-
},
|
|
1062
|
-
};
|
|
1063
|
-
var editorVideoSrcMenuConf = {
|
|
1064
|
-
key: 'editVideoSrc',
|
|
1065
|
-
factory: function () {
|
|
1066
|
-
return new Editvideo();
|
|
1067
|
-
},
|
|
1068
|
-
};
|
|
1069
|
-
// export const deleteVideoMenuConf = {
|
|
1070
|
-
// key: 'deleteVideo',
|
|
1071
|
-
// factory() {
|
|
1072
|
-
// return new DeleteVideoMenu()
|
|
1073
|
-
// },
|
|
1074
|
-
// }
|
|
1075
|
-
// 键盘能删除 video 了,注释掉这个菜单 wangfupeng 22.02.23
|
|
1076
|
-
|
|
1077
|
-
/**
|
|
1078
|
-
* @description parse html
|
|
1079
|
-
* @author wangfupeng
|
|
1080
|
-
*/
|
|
1081
|
-
function genVideoElem(src, poster, width, height, style) {
|
|
1082
|
-
if (poster === void 0) { poster = ''; }
|
|
1083
|
-
if (width === void 0) { width = 'auto'; }
|
|
1084
|
-
if (height === void 0) { height = 'auto'; }
|
|
1085
|
-
if (style === void 0) { style = {}; }
|
|
1086
|
-
return {
|
|
1087
|
-
type: 'video',
|
|
1088
|
-
src: src,
|
|
1089
|
-
poster: poster,
|
|
1090
|
-
width: width,
|
|
1091
|
-
height: height,
|
|
1092
|
-
style: style,
|
|
1093
|
-
children: [{ text: '' }], // void 元素有一个空 text
|
|
1094
|
-
};
|
|
1095
|
-
}
|
|
1096
|
-
function parseHtml(elem, _children, _editor) {
|
|
1097
|
-
var $elem = $(elem);
|
|
1098
|
-
var src = '';
|
|
1099
|
-
var poster = '';
|
|
1100
|
-
var width = 'auto';
|
|
1101
|
-
var height = 'auto';
|
|
1102
|
-
var style = {};
|
|
1103
|
-
// <iframe> 形式
|
|
1104
|
-
var $iframe = $elem.find('iframe');
|
|
1105
|
-
if ($iframe.length > 0) {
|
|
1106
|
-
width = $iframe.attr('width') || 'auto';
|
|
1107
|
-
height = $iframe.attr('height') || 'auto';
|
|
1108
|
-
style = $iframe.attr('style') || '';
|
|
1109
|
-
style = styleStringToObject(style);
|
|
1110
|
-
src = $iframe[0].outerHTML;
|
|
1111
|
-
return genVideoElem(src, poster, width, height, style);
|
|
1112
|
-
}
|
|
1113
|
-
// <video> 形式
|
|
1114
|
-
var $video = $elem.find('video');
|
|
1115
|
-
src = $video.attr('src') || '';
|
|
1116
|
-
if (!src) {
|
|
1117
|
-
if ($video.length > 0) {
|
|
1118
|
-
var $source = $video.find('source');
|
|
1119
|
-
src = $source.attr('src') || '';
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
width = $video.attr('width') || 'auto';
|
|
1123
|
-
height = $video.attr('height') || 'auto';
|
|
1124
|
-
poster = $video.attr('poster') || '';
|
|
1125
|
-
style = $video.attr('style') || '';
|
|
1126
|
-
style = styleStringToObject(style);
|
|
1127
|
-
return genVideoElem(src, poster, width, height, style);
|
|
1128
|
-
}
|
|
1129
|
-
var parseHtmlConf = {
|
|
1130
|
-
selector: 'div[data-w-e-type="video"]',
|
|
1131
|
-
parseElemHtml: parseHtml,
|
|
1132
|
-
};
|
|
1133
|
-
|
|
1134
|
-
/**
|
|
1135
|
-
* @description editor 插件,重写 editor API
|
|
1136
|
-
* @author wangfupeng
|
|
1137
|
-
*/
|
|
1138
|
-
function withVideo(editor) {
|
|
1139
|
-
var isVoid = editor.isVoid, normalizeNode = editor.normalizeNode;
|
|
1140
|
-
var newEditor = editor;
|
|
1141
|
-
// 重写 isVoid
|
|
1142
|
-
newEditor.isVoid = function (elem) {
|
|
1143
|
-
var type = elem.type;
|
|
1144
|
-
if (type === 'video') {
|
|
1145
|
-
return true;
|
|
1146
|
-
}
|
|
1147
|
-
return isVoid(elem);
|
|
1148
|
-
};
|
|
1149
|
-
// 重写 normalizeNode
|
|
1150
|
-
newEditor.normalizeNode = function (_a) {
|
|
1151
|
-
var _b = __read(_a, 2), node = _b[0], path = _b[1];
|
|
1152
|
-
var type = DomEditor.getNodeType(node);
|
|
1153
|
-
// ----------------- video 后面必须跟一个 p header blockquote -----------------
|
|
1154
|
-
if (type === 'video') {
|
|
1155
|
-
// -------------- video 是 editor 最后一个节点,需要后面插入 p --------------
|
|
1156
|
-
var isLast = DomEditor.isLastNode(newEditor, node);
|
|
1157
|
-
if (isLast) {
|
|
1158
|
-
Transforms.insertNodes(newEditor, DomEditor.genEmptyParagraph(), { at: [path[0] + 1] });
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
// 执行默认的 normalizeNode ,重要!!!
|
|
1162
|
-
return normalizeNode([node, path]);
|
|
1163
|
-
};
|
|
1164
|
-
// 返回 editor ,重要!
|
|
1165
|
-
return newEditor;
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
/**
|
|
1169
|
-
* @description pre parse html
|
|
1170
|
-
* @author wangfupeng
|
|
1171
|
-
*/
|
|
1172
|
-
/**
|
|
1173
|
-
* pre-prase video ,兼容 V4
|
|
1174
|
-
* @param elem elem
|
|
1175
|
-
*/
|
|
1176
|
-
function preParse(elem) {
|
|
1177
|
-
var $elem = $(elem);
|
|
1178
|
-
var $video = $elem;
|
|
1179
|
-
var elemTagName = getTagName($elem);
|
|
1180
|
-
if (elemTagName === 'p') {
|
|
1181
|
-
// v4 的 video 或 iframe 是被 p 包裹的
|
|
1182
|
-
var children = $elem.children();
|
|
1183
|
-
if (children.length === 1) {
|
|
1184
|
-
var firstChild = children[0];
|
|
1185
|
-
var firstChildTagName = firstChild.tagName.toLowerCase();
|
|
1186
|
-
if (['iframe', 'video'].includes(firstChildTagName)) {
|
|
1187
|
-
// p 下面包含 iframe 或 video
|
|
1188
|
-
$video = $(firstChild);
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
var videoTagName = getTagName($video);
|
|
1193
|
-
if (videoTagName !== 'iframe' && videoTagName !== 'video') {
|
|
1194
|
-
return $video[0];
|
|
1195
|
-
}
|
|
1196
|
-
// 已经符合 V5 格式
|
|
1197
|
-
var $parent = $video.parent();
|
|
1198
|
-
if ($parent.attr('data-w-e-type') === 'video') {
|
|
1199
|
-
return $video[0];
|
|
1200
|
-
}
|
|
1201
|
-
var $container = $('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');
|
|
1202
|
-
$container.append($video);
|
|
1203
|
-
return $container[0];
|
|
1204
|
-
}
|
|
1205
|
-
var preParseHtmlConf = {
|
|
1206
|
-
selector: 'iframe,video,p',
|
|
1207
|
-
preParseHtml: preParse,
|
|
1208
|
-
};
|
|
1209
|
-
|
|
1210
|
-
/**
|
|
1211
|
-
* @description video render elem
|
|
1212
|
-
* @author wangfupeng
|
|
1213
|
-
*/
|
|
1214
|
-
function renderVideo(elemNode, children, editor) {
|
|
1215
|
-
var _a = elemNode, _b = _a.src, src = _b === void 0 ? '' : _b, _c = _a.poster, poster = _c === void 0 ? '' : _c, _d = _a.key, key = _d === void 0 ? '' : _d, _e = _a.width, width = _e === void 0 ? 'auto' : _e, _f = _a.height, height = _f === void 0 ? 'auto' : _f, _g = _a.style, style = _g === void 0 ? {} : _g, _h = _a.textAlign, textAlign = _h === void 0 ? 'center' : _h;
|
|
1216
|
-
// 是否选中
|
|
1217
|
-
var selected = DomEditor.isNodeSelected(editor, elemNode);
|
|
1218
|
-
var vnode;
|
|
1219
|
-
if (src.trim().indexOf('<iframe ') === 0) {
|
|
1220
|
-
// 增加尺寸样式
|
|
1221
|
-
var iframeHtml = genSizeStyledIframeHtml(src, width, height, style);
|
|
1222
|
-
// iframe 形式,第三方视频
|
|
1223
|
-
vnode = (jsx("div", { className: "w-e-textarea-video-container", "data-selected": selected ? 'true' : '', style: { textAlign: textAlign }, innerHTML: iframeHtml }));
|
|
1224
|
-
}
|
|
1225
|
-
else {
|
|
1226
|
-
// 其他,mp4 格式
|
|
1227
|
-
var videoVnode = (jsx("video", { key: key, poster: poster, controls: true, style: style },
|
|
1228
|
-
jsx("source", { src: src, type: "video/mp4" }),
|
|
1229
|
-
'Sorry, your browser doesn\'t support embedded videos.\n 抱歉,浏览器不支持 video 视频'));
|
|
1230
|
-
// @ts-ignore 添加尺寸
|
|
1231
|
-
if (width !== 'auto') {
|
|
1232
|
-
videoVnode.data.width = width;
|
|
1233
|
-
}
|
|
1234
|
-
// @ts-ignore
|
|
1235
|
-
if (height !== 'auto') {
|
|
1236
|
-
videoVnode.data.height = height;
|
|
1237
|
-
}
|
|
1238
|
-
vnode = (jsx("div", { className: "w-e-textarea-video-container", "data-selected": selected ? 'true' : '', style: { textAlign: textAlign } }, videoVnode));
|
|
1239
|
-
}
|
|
1240
|
-
// 【注意】void node 中,renderElem 不用处理 children 。core 会统一处理。
|
|
1241
|
-
var containerVnode = h('div', {
|
|
1242
|
-
props: {
|
|
1243
|
-
contentEditable: false,
|
|
1244
|
-
},
|
|
1245
|
-
on: {
|
|
1246
|
-
mousedown: function (e) { return e.preventDefault(); },
|
|
1247
|
-
},
|
|
1248
|
-
}, vnode);
|
|
1249
|
-
return containerVnode;
|
|
1250
|
-
}
|
|
1251
|
-
var renderVideoConf = {
|
|
1252
|
-
type: 'video', // 和 elemNode.type 一致
|
|
1253
|
-
renderElem: renderVideo,
|
|
1254
|
-
};
|
|
1255
|
-
|
|
1256
|
-
/**
|
|
1257
|
-
* @description video module
|
|
1258
|
-
* @author wangfupeng
|
|
1259
|
-
*/
|
|
1260
|
-
var video = {
|
|
1261
|
-
renderElems: [renderVideoConf],
|
|
1262
|
-
elemsToHtml: [videoToHtmlConf],
|
|
1263
|
-
preParseHtml: [preParseHtmlConf],
|
|
1264
|
-
parseElemsHtml: [parseHtmlConf],
|
|
1265
|
-
menus: [
|
|
1266
|
-
insertVideoMenuConf,
|
|
1267
|
-
uploadVideoMenuConf,
|
|
1268
|
-
editorVideoSizeMenuConf,
|
|
1269
|
-
editorVideoSrcMenuConf,
|
|
1270
|
-
],
|
|
1271
|
-
editorPlugin: withVideo,
|
|
1272
|
-
};
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
* @description video module
|
|
1276
|
-
* @author wangfupeng
|
|
1277
|
-
*/
|
|
1278
|
-
|
|
1279
|
-
export { video as default };
|
|
1
|
+
import{i18nAddResources as t,t as r,DomEditor as e,genModalInputElems as n,genModalButtonElems as o,createUploader as i}from"@wangeditor-next/core";import u,{append as c,on as a,focus as f,attr as s,val as l,html as v,parent as d,hasClass as p,empty as h}from"dom7";import{Transforms as y,Range as g}from"slate";import{nanoid as m}from"nanoid";import{jsx as b,h as w}from"snabbdom";t("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),t("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}});var S,O,x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},E={};function I(){if(O)return S;O=1;var t=function(t){return t&&t.Math===Math&&t};return S=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof x&&x)||t("object"==typeof S&&S)||function(){return this}()||Function("return this")()}var P,j,T,M,A,N,R,C,k={};function L(){return j?P:(j=1,P=function(t){try{return!!t()}catch(t){return!0}})}function V(){if(M)return T;M=1;var t=L();return T=!t((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function z(){if(N)return A;N=1;var t=L();return A=!t((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function D(){if(C)return R;C=1;var t=z(),r=Function.prototype.call;return R=t?r.bind(r):function(){return r.apply(r,arguments)},R}var F,_,$,B,U,H,W,G,K,X,Y,q,J,Q,Z,tt,rt,et,nt,ot,it,ut,ct,at,ft,st,lt,vt,dt,pt,ht,yt,gt,mt,bt,wt,St,Ot,xt,Et,It,Pt={};function jt(){return $?_:($=1,_=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}})}function Tt(){if(U)return B;U=1;var t=z(),r=Function.prototype,e=r.call,n=t&&r.bind.bind(e,e);return B=t?n:function(t){return function(){return e.apply(t,arguments)}},B}function Mt(){if(W)return H;W=1;var t=Tt(),r=t({}.toString),e=t("".slice);return H=function(t){return e(r(t),8,-1)}}function At(){if(K)return G;K=1;var t=Tt(),r=L(),e=Mt(),n=Object,o=t("".split);return G=r((function(){return!n("z").propertyIsEnumerable(0)}))?function(t){return"String"===e(t)?o(t,""):n(t)}:n}function Nt(){return Y?X:(Y=1,X=function(t){return null==t})}function Rt(){if(J)return q;J=1;var t=Nt(),r=TypeError;return q=function(e){if(t(e))throw new r("Can't call method on "+e);return e}}function Ct(){if(Z)return Q;Z=1;var t=At(),r=Rt();return Q=function(e){return t(r(e))}}function kt(){if(rt)return tt;rt=1;var t="object"==typeof document&&document.all;return tt=void 0===t&&void 0!==t?function(r){return"function"==typeof r||r===t}:function(t){return"function"==typeof t}}function Lt(){if(nt)return et;nt=1;var t=kt();return et=function(r){return"object"==typeof r?null!==r:t(r)}}function Vt(){if(it)return ot;it=1;var t=I(),r=kt();return ot=function(e,n){return arguments.length<2?(o=t[e],r(o)?o:void 0):t[e]&&t[e][n];var o},ot}function zt(){if(ct)return ut;ct=1;var t=Tt();return ut=t({}.isPrototypeOf)}function Dt(){if(ft)return at;ft=1;var t=I().navigator,r=t&&t.userAgent;return at=r?String(r):""}function Ft(){if(lt)return st;lt=1;var t,r,e=I(),n=Dt(),o=e.process,i=e.Deno,u=o&&o.versions||i&&i.version,c=u&&u.v8;return c&&(r=(t=c.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!r&&n&&(!(t=n.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=n.match(/Chrome\/(\d+)/))&&(r=+t[1]),st=r}function _t(){if(dt)return vt;dt=1;var t=Ft(),r=L(),e=I().String;return vt=!!Object.getOwnPropertySymbols&&!r((function(){var r=Symbol("symbol detection");return!e(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&t&&t<41}))}function $t(){if(ht)return pt;ht=1;var t=_t();return pt=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function Bt(){if(gt)return yt;gt=1;var t=Vt(),r=kt(),e=zt(),n=$t(),o=Object;return yt=n?function(t){return"symbol"==typeof t}:function(n){var i=t("Symbol");return r(i)&&e(i.prototype,o(n))}}function Ut(){if(bt)return mt;bt=1;var t=String;return mt=function(r){try{return t(r)}catch(t){return"Object"}}}function Ht(){if(St)return wt;St=1;var t=kt(),r=Ut(),e=TypeError;return wt=function(n){if(t(n))return n;throw new e(r(n)+" is not a function")}}function Wt(){if(xt)return Ot;xt=1;var t=Ht(),r=Nt();return Ot=function(e,n){var o=e[n];return r(o)?void 0:t(o)}}function Gt(){if(It)return Et;It=1;var t=D(),r=kt(),e=Lt(),n=TypeError;return Et=function(o,i){var u,c;if("string"===i&&r(u=o.toString)&&!e(c=t(u,o)))return c;if(r(u=o.valueOf)&&!e(c=t(u,o)))return c;if("string"!==i&&r(u=o.toString)&&!e(c=t(u,o)))return c;throw new n("Can't convert object to primitive value")},Et}var Kt,Xt,Yt,qt,Jt,Qt,Zt,tr,rr,er,nr,or,ir,ur,cr,ar,fr,sr,lr,vr,dr,pr,hr,yr,gr={exports:{}};function mr(){return Xt?Kt:(Xt=1,Kt=!1)}function br(){if(qt)return Yt;qt=1;var t=I(),r=Object.defineProperty;return Yt=function(e,n){try{r(t,e,{value:n,configurable:!0,writable:!0})}catch(r){t[e]=n}return n}}function wr(){if(Jt)return gr.exports;Jt=1;var t=mr(),r=I(),e=br(),n="__core-js_shared__",o=gr.exports=r[n]||e(n,{});return(o.versions||(o.versions=[])).push({version:"3.38.1",mode:t?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"}),gr.exports}function Sr(){if(Zt)return Qt;Zt=1;var t=wr();return Qt=function(r,e){return t[r]||(t[r]=e||{})}}function Or(){if(rr)return tr;rr=1;var t=Rt(),r=Object;return tr=function(e){return r(t(e))}}function xr(){if(nr)return er;nr=1;var t=Tt(),r=Or(),e=t({}.hasOwnProperty);return er=Object.hasOwn||function(t,n){return e(r(t),n)}}function Er(){if(ir)return or;ir=1;var t=Tt(),r=0,e=Math.random(),n=t(1..toString);return or=function(t){return"Symbol("+(void 0===t?"":t)+")_"+n(++r+e,36)}}function Ir(){if(cr)return ur;cr=1;var t=I(),r=Sr(),e=xr(),n=Er(),o=_t(),i=$t(),u=t.Symbol,c=r("wks"),a=i?u.for||u:u&&u.withoutSetter||n;return ur=function(t){return e(c,t)||(c[t]=o&&e(u,t)?u[t]:a("Symbol."+t)),c[t]}}function Pr(){if(fr)return ar;fr=1;var t=D(),r=Lt(),e=Bt(),n=Wt(),o=Gt(),i=Ir(),u=TypeError,c=i("toPrimitive");return ar=function(i,a){if(!r(i)||e(i))return i;var f,s=n(i,c);if(s){if(void 0===a&&(a="default"),f=t(s,i,a),!r(f)||e(f))return f;throw new u("Can't convert object to primitive value")}return void 0===a&&(a="number"),o(i,a)}}function jr(){if(lr)return sr;lr=1;var t=Pr(),r=Bt();return sr=function(e){var n=t(e,"string");return r(n)?n:n+""}}function Tr(){if(dr)return vr;dr=1;var t=I(),r=Lt(),e=t.document,n=r(e)&&r(e.createElement);return vr=function(t){return n?e.createElement(t):{}}}function Mr(){if(hr)return pr;hr=1;var t=V(),r=L(),e=Tr();return pr=!t&&!r((function(){return 7!==Object.defineProperty(e("div"),"a",{get:function(){return 7}}).a}))}function Ar(){if(yr)return k;yr=1;var t=V(),r=D(),e=function(){if(F)return Pt;F=1;var t={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,e=r&&!t.call({1:2},1);return Pt.f=e?function(t){var e=r(this,t);return!!e&&e.enumerable}:t,Pt}(),n=jt(),o=Ct(),i=jr(),u=xr(),c=Mr(),a=Object.getOwnPropertyDescriptor;return k.f=t?a:function(t,f){if(t=o(t),f=i(f),c)try{return a(t,f)}catch(t){}if(u(t,f))return n(!r(e.f,t,f),t[f])},k}var Nr,Rr,Cr,kr,Lr,Vr,zr,Dr={};function Fr(){if(Rr)return Nr;Rr=1;var t=V(),r=L();return Nr=t&&r((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function _r(){if(kr)return Cr;kr=1;var t=Lt(),r=String,e=TypeError;return Cr=function(n){if(t(n))return n;throw new e(r(n)+" is not an object")}}function $r(){if(Lr)return Dr;Lr=1;var t=V(),r=Mr(),e=Fr(),n=_r(),o=jr(),i=TypeError,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,a="enumerable",f="configurable",s="writable";return Dr.f=t?e?function(t,r,e){if(n(t),r=o(r),n(e),"function"==typeof t&&"prototype"===r&&"value"in e&&s in e&&!e[s]){var i=c(t,r);i&&i[s]&&(t[r]=e.value,e={configurable:f in e?e[f]:i[f],enumerable:a in e?e[a]:i[a],writable:!1})}return u(t,r,e)}:u:function(t,e,c){if(n(t),e=o(e),n(c),r)try{return u(t,e,c)}catch(t){}if("get"in c||"set"in c)throw new i("Accessors not supported");return"value"in c&&(t[e]=c.value),t},Dr}function Br(){if(zr)return Vr;zr=1;var t=V(),r=$r(),e=jt();return Vr=t?function(t,n,o){return r.f(t,n,e(1,o))}:function(t,r,e){return t[r]=e,t}}var Ur,Hr,Wr,Gr,Kr,Xr,Yr,qr,Jr,Qr,Zr,te,re,ee,ne,oe={exports:{}};function ie(){if(Hr)return Ur;Hr=1;var t=V(),r=xr(),e=Function.prototype,n=t&&Object.getOwnPropertyDescriptor,o=r(e,"name"),i=o&&"something"===function(){}.name,u=o&&(!t||t&&n(e,"name").configurable);return Ur={EXISTS:o,PROPER:i,CONFIGURABLE:u}}function ue(){if(Gr)return Wr;Gr=1;var t=Tt(),r=kt(),e=wr(),n=t(Function.toString);return r(e.inspectSource)||(e.inspectSource=function(t){return n(t)}),Wr=e.inspectSource}function ce(){if(Xr)return Kr;Xr=1;var t=I(),r=kt(),e=t.WeakMap;return Kr=r(e)&&/native code/.test(String(e))}function ae(){if(qr)return Yr;qr=1;var t=Sr(),r=Er(),e=t("keys");return Yr=function(t){return e[t]||(e[t]=r(t))}}function fe(){return Qr?Jr:(Qr=1,Jr={})}function se(){if(te)return Zr;te=1;var t,r,e,n=ce(),o=I(),i=Lt(),u=Br(),c=xr(),a=wr(),f=ae(),s=fe(),l="Object already initialized",v=o.TypeError,d=o.WeakMap;if(n||a.state){var p=a.state||(a.state=new d);p.get=p.get,p.has=p.has,p.set=p.set,t=function(t,r){if(p.has(t))throw new v(l);return r.facade=t,p.set(t,r),r},r=function(t){return p.get(t)||{}},e=function(t){return p.has(t)}}else{var h=f("state");s[h]=!0,t=function(t,r){if(c(t,h))throw new v(l);return r.facade=t,u(t,h,r),r},r=function(t){return c(t,h)?t[h]:{}},e=function(t){return c(t,h)}}return Zr={set:t,get:r,has:e,enforce:function(n){return e(n)?r(n):t(n,{})},getterFor:function(t){return function(e){var n;if(!i(e)||(n=r(e)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}}}}function le(){if(re)return oe.exports;re=1;var t=Tt(),r=L(),e=kt(),n=xr(),o=V(),i=ie().CONFIGURABLE,u=ue(),c=se(),a=c.enforce,f=c.get,s=String,l=Object.defineProperty,v=t("".slice),d=t("".replace),p=t([].join),h=o&&!r((function(){return 8!==l((function(){}),"length",{value:8}).length})),y=String(String).split("String"),g=oe.exports=function(t,r,e){"Symbol("===v(s(r),0,7)&&(r="["+d(s(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(r="get "+r),e&&e.setter&&(r="set "+r),(!n(t,"name")||i&&t.name!==r)&&(o?l(t,"name",{value:r,configurable:!0}):t.name=r),h&&e&&n(e,"arity")&&t.length!==e.arity&&l(t,"length",{value:e.arity});try{e&&n(e,"constructor")&&e.constructor?o&&l(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var u=a(t);return n(u,"source")||(u.source=p(y,"string"==typeof r?r:"")),t};return Function.prototype.toString=g((function(){return e(this)&&f(this).source||u(this)}),"toString"),oe.exports}function ve(){if(ne)return ee;ne=1;var t=kt(),r=$r(),e=le(),n=br();return ee=function(o,i,u,c){c||(c={});var a=c.enumerable,f=void 0!==c.name?c.name:i;if(t(u)&&e(u,f,c),c.global)a?o[i]=u:n(i,u);else{try{c.unsafe?o[i]&&(a=!0):delete o[i]}catch(t){}a?o[i]=u:r.f(o,i,{value:u,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return o}}var de,pe,he,ye,ge,me,be,we,Se,Oe,xe,Ee,Ie,Pe,je,Te,Me,Ae={};function Ne(){if(ye)return he;ye=1;var t=function(){if(pe)return de;pe=1;var t=Math.ceil,r=Math.floor;return de=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}}();return he=function(r){var e=+r;return e!=e||0===e?0:t(e)}}function Re(){if(me)return ge;me=1;var t=Ne(),r=Math.max,e=Math.min;return ge=function(n,o){var i=t(n);return i<0?r(i+o,0):e(i,o)}}function Ce(){if(we)return be;we=1;var t=Ne(),r=Math.min;return be=function(e){var n=t(e);return n>0?r(n,9007199254740991):0}}function ke(){if(Oe)return Se;Oe=1;var t=Ce();return Se=function(r){return t(r.length)}}function Le(){if(Ee)return xe;Ee=1;var t=Ct(),r=Re(),e=ke(),n=function(n){return function(o,i,u){var c=t(o),a=e(c);if(0===a)return!n&&-1;var f,s=r(u,a);if(n&&i!=i){for(;a>s;)if((f=c[s++])!=f)return!0}else for(;a>s;s++)if((n||s in c)&&c[s]===i)return n||s||0;return!n&&-1}};return xe={includes:n(!0),indexOf:n(!1)}}function Ve(){if(Pe)return Ie;Pe=1;var t=Tt(),r=xr(),e=Ct(),n=Le().indexOf,o=fe(),i=t([].push);return Ie=function(t,u){var c,a=e(t),f=0,s=[];for(c in a)!r(o,c)&&r(a,c)&&i(s,c);for(;u.length>f;)r(a,c=u[f++])&&(~n(s,c)||i(s,c));return s}}function ze(){return Te?je:(Te=1,je=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function De(){if(Me)return Ae;Me=1;var t=Ve(),r=ze().concat("length","prototype");return Ae.f=Object.getOwnPropertyNames||function(e){return t(e,r)},Ae}var Fe,_e,$e,Be,Ue,He,We,Ge,Ke,Xe,Ye,qe,Je,Qe,Ze,tn,rn,en,nn,on,un,cn,an,fn,sn,ln,vn,dn,pn={};function hn(){if($e)return _e;$e=1;var t=Vt(),r=Tt(),e=De(),n=(Fe||(Fe=1,pn.f=Object.getOwnPropertySymbols),pn),o=_r(),i=r([].concat);return _e=t("Reflect","ownKeys")||function(t){var r=e.f(o(t)),u=n.f;return u?i(r,u(t)):r}}function yn(){if(Ue)return Be;Ue=1;var t=xr(),r=hn(),e=Ar(),n=$r();return Be=function(o,i,u){for(var c=r(i),a=n.f,f=e.f,s=0;s<c.length;s++){var l=c[s];t(o,l)||u&&t(u,l)||a(o,l,f(i,l))}}}function gn(){if(We)return He;We=1;var t=L(),r=kt(),e=/#|\.prototype\./,n=function(e,n){var a=i[o(e)];return a===c||a!==u&&(r(n)?t(n):!!n)},o=n.normalize=function(t){return String(t).replace(e,".").toLowerCase()},i=n.data={},u=n.NATIVE="N",c=n.POLYFILL="P";return He=n}function mn(){if(Ke)return Ge;Ke=1;var t=I(),r=Ar().f,e=Br(),n=ve(),o=br(),i=yn(),u=gn();return Ge=function(c,a){var f,s,l,v,d,p=c.target,h=c.global,y=c.stat;if(f=h?t:y?t[p]||o(p,{}):t[p]&&t[p].prototype)for(s in a){if(v=a[s],l=c.dontCallGetSet?(d=r(f,s))&&d.value:f[s],!u(h?s:p+(y?".":"#")+s,c.forced)&&void 0!==l){if(typeof v==typeof l)continue;i(v,l)}(c.sham||l&&l.sham)&&e(v,"sham",!0),n(f,s,v,c)}}}function bn(){if(Ye)return Xe;Ye=1;var t=Mt();return Xe=Array.isArray||function(r){return"Array"===t(r)}}function wn(){if(Je)return qe;Je=1;var t=TypeError;return qe=function(r){if(r>9007199254740991)throw t("Maximum allowed index exceeded");return r}}function Sn(){if(Ze)return Qe;Ze=1;var t=V(),r=$r(),e=jt();return Qe=function(n,o,i){t?r.f(n,o,e(0,i)):n[o]=i}}function On(){if(rn)return tn;rn=1;var t={};return t[Ir()("toStringTag")]="z",tn="[object z]"===String(t)}function xn(){if(nn)return en;nn=1;var t=On(),r=kt(),e=Mt(),n=Ir()("toStringTag"),o=Object,i="Arguments"===e(function(){return arguments}());return en=t?e:function(t){var u,c,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(c=function(t,r){try{return t[r]}catch(t){}}(u=o(t),n))?c:i?e(u):"Object"===(a=e(u))&&r(u.callee)?"Arguments":a}}function En(){if(un)return on;un=1;var t=Tt(),r=L(),e=kt(),n=xn(),o=Vt(),i=ue(),u=function(){},c=o("Reflect","construct"),a=/^\s*(?:class|function)\b/,f=t(a.exec),s=!a.test(u),l=function(t){if(!e(t))return!1;try{return c(u,[],t),!0}catch(t){return!1}},v=function(t){if(!e(t))return!1;switch(n(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return s||!!f(a,i(t))}catch(t){return!0}};return v.sham=!0,on=!c||r((function(){var t;return l(l.call)||!l(Object)||!l((function(){t=!0}))||t}))?v:l}function In(){if(an)return cn;an=1;var t=bn(),r=En(),e=Lt(),n=Ir()("species"),o=Array;return cn=function(i){var u;return t(i)&&(u=i.constructor,(r(u)&&(u===o||t(u.prototype))||e(u)&&null===(u=u[n]))&&(u=void 0)),void 0===u?o:u}}function Pn(){if(sn)return fn;sn=1;var t=In();return fn=function(r,e){return new(t(r))(0===e?0:e)}}function jn(){if(vn)return ln;vn=1;var t=L(),r=Ir(),e=Ft(),n=r("species");return ln=function(r){return e>=51||!t((function(){var t=[];return(t.constructor={})[n]=function(){return{foo:1}},1!==t[r](Boolean).foo}))}}!function(){if(dn)return E;dn=1;var t=mn(),r=L(),e=bn(),n=Lt(),o=Or(),i=ke(),u=wn(),c=Sn(),a=Pn(),f=jn(),s=Ir(),l=Ft(),v=s("isConcatSpreadable"),d=l>=51||!r((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),p=function(t){if(!n(t))return!1;var r=t[v];return void 0!==r?!!r:e(t)};t({target:"Array",proto:!0,arity:1,forced:!d||!f("concat")},{concat:function(t){var r,e,n,f,s,l=o(this),v=a(l,0),d=0;for(r=-1,n=arguments.length;r<n;r++)if(p(s=-1===r?l:arguments[r]))for(f=i(s),u(d+f),e=0;e<f;e++,d++)e in s&&c(v,d,s[e]);else u(d+1),c(v,d++,s);return v.length=d,v}})}();var Tn,Mn,An,Nn,Rn,Cn,kn,Ln,Vn,zn={};function Dn(){if(Mn)return Tn;Mn=1;var t=xn(),r=String;return Tn=function(e){if("Symbol"===t(e))throw new TypeError("Cannot convert a Symbol value to a string");return r(e)}}function Fn(){return Nn?An:(Nn=1,An="\t\n\v\f\r \u2028\u2029\ufeff")}!function(){if(Vn)return zn;Vn=1;var t=mn(),r=function(){if(Cn)return Rn;Cn=1;var t=Tt(),r=Rt(),e=Dn(),n=Fn(),o=t("".replace),i=RegExp("^["+n+"]+"),u=RegExp("(^|[^"+n+"])["+n+"]+$"),c=function(t){return function(n){var c=e(r(n));return 1&t&&(c=o(c,i,"")),2&t&&(c=o(c,u,"$1")),c}};return Rn={start:c(1),end:c(2),trim:c(3)}}().trim,e=function(){if(Ln)return kn;Ln=1;var t=ie().PROPER,r=L(),e=Fn();return kn=function(n){return r((function(){return!!e[n]()||"
"!=="
"[n]()||t&&e[n].name!==n}))}}();t({target:"String",proto:!0,forced:e("trim")},{trim:function(){return r(this)}})}();var _n,$n,Bn={};function Un(t){return t.length?t[0].tagName.toLowerCase():""}function Hn(t,r,e,n){void 0===r&&(r="auto"),void 0===e&&(e="auto"),void 0===n&&(n={});var o=u(t),i=n.width,c=void 0===i?"":i,a=n.height,f=void 0===a?"":a,s="";return c&&(s+="width: ".concat(c,";")),f&&(s+="height: ".concat(f,";")),o.attr("width",r),o.attr("height",e),o.attr("style",s),o[0].outerHTML}$n||($n=1,function(){if(_n)return Bn;_n=1;var t=mn(),r=I();t({global:!0,forced:r.globalThis!==r},{globalThis:r})}()),c&&(u.fn.append=c),a&&(u.fn.on=a),f&&(u.fn.focus=f),s&&(u.fn.attr=s),l&&(u.fn.val=l),v&&(u.fn.html=v),d&&(u.fn.parent=d),p&&(u.fn.hasClass=p),h&&(u.fn.empty=h);var Wn,Gn,Kn,Xn={type:"video",elemToHtml:function(t,r){var e=t,n=e.src,o=void 0===n?"":n,i=e.poster,u=void 0===i?"":i,c=e.width,a=void 0===c?"auto":c,f=e.height,s=void 0===f?"auto":f,l=e.style,v=void 0===l?{}:l,d=e.textAlign,p='<div data-w-e-type="video" data-w-e-is-void style="text-align: '.concat(void 0===d?"center":d,';">\n');if(0===o.trim().indexOf("<iframe ")){p+=Hn(o,a,s,v)}else{var h=v.width,y=void 0===h?"":h,g=v.height,m=void 0===g?"":g,b="";y&&(b+="width: ".concat(y,";")),m&&(b+="height: ".concat(m,";")),p+='<video poster="'.concat(u,'" controls="true" width="').concat(a,'" height="').concat(s,'" style="').concat(b,'"><source src="').concat(o,'" type="video/mp4"/></video>')}return p+="\n</div>"}},Yn={};function qn(){if(Gn)return Wn;Gn=1;var t=le(),r=$r();return Wn=function(e,n,o){return o.get&&t(o.get,n,{getter:!0}),o.set&&t(o.set,n,{setter:!0}),r.f(e,n,o)}}!function(){if(Kn)return Yn;Kn=1;var t=V(),r=ie().EXISTS,e=Tt(),n=qn(),o=Function.prototype,i=e(o.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,c=e(u.exec);t&&!r&&n(o,"name",{configurable:!0,get:function(){try{return c(u,i(this))[1]}catch(t){return""}}})}();var Jn,Qn,Zn,to,ro,eo,no={};function oo(){if(to)return Zn;to=1;var t=function(){if(Qn)return Jn;Qn=1;var t=Mt(),r=Tt();return Jn=function(e){if("Function"===t(e))return r(e)}}(),r=Ht(),e=z(),n=t(t.bind);return Zn=function(t,o){return r(t),void 0===o?t:e?n(t,o):function(){return t.apply(o,arguments)}},Zn}function io(){if(eo)return ro;eo=1;var t=oo(),r=Tt(),e=At(),n=Or(),o=ke(),i=Pn(),u=r([].push),c=function(r){var c=1===r,a=2===r,f=3===r,s=4===r,l=6===r,v=7===r,d=5===r||l;return function(p,h,y,g){for(var m,b,w=n(p),S=e(w),O=o(S),x=t(h,y),E=0,I=g||i,P=c?I(p,O):a||v?I(p,0):void 0;O>E;E++)if((d||E in S)&&(b=x(m=S[E],E,w),r))if(c)P[E]=b;else if(b)switch(r){case 3:return!0;case 5:return m;case 6:return E;case 2:u(P,m)}else switch(r){case 4:return!1;case 7:u(P,m)}return l?-1:f||s?s:P}};return ro={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}}var uo,co,ao,fo,so,lo,vo,po,ho,yo,go={};function mo(){if(co)return uo;co=1;var t=Ve(),r=ze();return uo=Object.keys||function(e){return t(e,r)}}function bo(){if(so)return fo;so=1;var t=Vt();return fo=t("document","documentElement")}function wo(){if(vo)return lo;vo=1;var t,r=_r(),e=function(){if(ao)return go;ao=1;var t=V(),r=Fr(),e=$r(),n=_r(),o=Ct(),i=mo();return go.f=t&&!r?Object.defineProperties:function(t,r){n(t);for(var u,c=o(r),a=i(r),f=a.length,s=0;f>s;)e.f(t,u=a[s++],c[u]);return t},go}(),n=ze(),o=fe(),i=bo(),u=Tr(),c=ae(),a="prototype",f="script",s=c("IE_PROTO"),l=function(){},v=function(t){return"<"+f+">"+t+"</"+f+">"},d=function(t){t.write(v("")),t.close();var r=t.parentWindow.Object;return t=null,r},p=function(){try{t=new ActiveXObject("htmlfile")}catch(t){}var r,e,o;p="undefined"!=typeof document?document.domain&&t?d(t):(e=u("iframe"),o="java"+f+":",e.style.display="none",i.appendChild(e),e.src=String(o),(r=e.contentWindow.document).open(),r.write(v("document.F=Object")),r.close(),r.F):d(t);for(var c=n.length;c--;)delete p[a][n[c]];return p()};return o[s]=!0,lo=Object.create||function(t,n){var o;return null!==t?(l[a]=r(t),o=new l,l[a]=null,o[s]=t):o=p(),void 0===n?o:e.f(o,n)}}function So(){if(ho)return po;ho=1;var t=Ir(),r=wo(),e=$r().f,n=t("unscopables"),o=Array.prototype;return void 0===o[n]&&e(o,n,{configurable:!0,value:r(null)}),po=function(t){o[n][t]=!0}}!function(){if(yo)return no;yo=1;var t=mn(),r=io().find,e=So(),n="find",o=!0;n in[]&&Array(1)[n]((function(){o=!1})),t({target:"Array",proto:!0,forced:o},{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),e(n)}();var Oo,xo,Eo,Io={};!function(){if(Eo)return Io;Eo=1;var t=On(),r=ve(),e=function(){if(xo)return Oo;xo=1;var t=On(),r=xn();return Oo=t?{}.toString:function(){return"[object "+r(this)+"]"}}();t||r(Object.prototype,"toString",e,{unsafe:!0})}();var Po,jo,To,Mo,Ao,No,Ro,Co,ko,Lo,Vo,zo={};function Do(){if(jo)return Po;jo=1;var t=_r();return Po=function(){var r=t(this),e="";return r.hasIndices&&(e+="d"),r.global&&(e+="g"),r.ignoreCase&&(e+="i"),r.multiline&&(e+="m"),r.dotAll&&(e+="s"),r.unicode&&(e+="u"),r.unicodeSets&&(e+="v"),r.sticky&&(e+="y"),e}}function Fo(){if(Lo)return ko;Lo=1;var t,r,e=D(),n=Tt(),o=Dn(),i=Do(),u=function(){if(Mo)return To;Mo=1;var t=L(),r=I().RegExp,e=t((function(){var t=r("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),n=e||t((function(){return!r("a","y").sticky})),o=e||t((function(){var t=r("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));return To={BROKEN_CARET:o,MISSED_STICKY:n,UNSUPPORTED_Y:e}}(),c=Sr(),a=wo(),f=se().get,s=function(){if(No)return Ao;No=1;var t=L(),r=I().RegExp;return Ao=t((function(){var t=r(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))}(),l=function(){if(Co)return Ro;Co=1;var t=L(),r=I().RegExp;return Ro=t((function(){var t=r("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))}(),v=c("native-string-replace",String.prototype.replace),d=RegExp.prototype.exec,p=d,h=n("".charAt),y=n("".indexOf),g=n("".replace),m=n("".slice),b=(r=/b*/g,e(d,t=/a/,"a"),e(d,r,"a"),0!==t.lastIndex||0!==r.lastIndex),w=u.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];return(b||S||w||s||l)&&(p=function(t){var r,n,u,c,s,l,O,x=this,E=f(x),I=o(t),P=E.raw;if(P)return P.lastIndex=x.lastIndex,r=e(p,P,I),x.lastIndex=P.lastIndex,r;var j=E.groups,T=w&&x.sticky,M=e(i,x),A=x.source,N=0,R=I;if(T&&(M=g(M,"y",""),-1===y(M,"g")&&(M+="g"),R=m(I,x.lastIndex),x.lastIndex>0&&(!x.multiline||x.multiline&&"\n"!==h(I,x.lastIndex-1))&&(A="(?: "+A+")",R=" "+R,N++),n=new RegExp("^(?:"+A+")",M)),S&&(n=new RegExp("^"+A+"$(?!\\s)",M)),b&&(u=x.lastIndex),c=e(d,T?n:x,R),T?c?(c.input=m(c.input,N),c[0]=m(c[0],N),c.index=x.lastIndex,x.lastIndex+=c[0].length):x.lastIndex=0:b&&c&&(x.lastIndex=x.global?c.index+c[0].length:u),S&&c&&c.length>1&&e(v,c[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(c[s]=void 0)})),c&&j)for(c.groups=l=a(null),s=0;s<j.length;s++)l[(O=j[s])[0]]=c[O[1]];return c}),ko=p}function _o(){if(Vo)return zo;Vo=1;var t=mn(),r=Fo();return t({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r}),zo}_o();var $o=function(){return $o=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},$o.apply(this,arguments)};function Bo(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{a(n.next(t))}catch(t){i(t)}}function c(t){try{a(n.throw(t))}catch(t){i(t)}}function a(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,c)}a((n=n.apply(t,r||[])).next())}))}function Uo(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(a){return function(c){if(e)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(u=0)),u;)try{if(e=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return u.label++,{value:c[1],done:!1};case 5:u.label++,n=c[1],c=[0];continue;case 7:c=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){u=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){u.label=c[1];break}if(6===c[0]&&u.label<o[1]){u.label=o[1],o=c;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(c);break}o[2]&&u.ops.pop(),u.trys.pop();continue}c=r.call(t,u)}catch(t){c=[6,t],n=0}finally{e=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}function Ho(t){var r="function"==typeof Symbol&&Symbol.iterator,e=r&&t[r],n=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function Wo(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,o,i=e.call(t),u=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return u}function Go(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,e=t[Symbol.asyncIterator];return e?e.call(t):(t=Ho(t),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(e){r[e]=t[e]&&function(r){return new Promise((function(n,o){(function(t,r,e,n){Promise.resolve(n).then((function(r){t({value:r,done:e})}),r)})(n,o,(r=t[e](r)).done,r.value)}))}}}"function"==typeof SuppressedError&&SuppressedError;var Ko,Xo,Yo,qo,Jo,Qo,Zo,ti,ri,ei,ni,oi,ii,ui={};function ci(){if(Xo)return Ko;Xo=1;var t=z(),r=Function.prototype,e=r.apply,n=r.call;return Ko="object"==typeof Reflect&&Reflect.apply||(t?n.bind(e):function(){return n.apply(e,arguments)}),Ko}function ai(){if(Qo)return Jo;Qo=1;var t=Tt(),r=Ne(),e=Dn(),n=Rt(),o=t("".charAt),i=t("".charCodeAt),u=t("".slice),c=function(t){return function(c,a){var f,s,l=e(n(c)),v=r(a),d=l.length;return v<0||v>=d?t?"":void 0:(f=i(l,v))<55296||f>56319||v+1===d||(s=i(l,v+1))<56320||s>57343?t?o(l,v):f:t?u(l,v,v+2):s-56320+(f-55296<<10)+65536}};return Jo={codeAt:c(!1),charAt:c(!0)}}function fi(){if(ti)return Zo;ti=1;var t=ai().charAt;return Zo=function(r,e,n){return e+(n?t(r,e).length:1)}}function si(){if(ei)return ri;ei=1;var t=Tt(),r=Or(),e=Math.floor,n=t("".charAt),o=t("".replace),i=t("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;return ri=function(t,a,f,s,l,v){var d=f+t.length,p=s.length,h=c;return void 0!==l&&(l=r(l),h=u),o(v,h,(function(r,o){var u;switch(n(o,0)){case"$":return"$";case"&":return t;case"`":return i(a,0,f);case"'":return i(a,d);case"<":u=l[i(o,1,-1)];break;default:var c=+o;if(0===c)return r;if(c>p){var v=e(c/10);return 0===v?r:v<=p?void 0===s[v-1]?n(o,1):s[v-1]+n(o,1):r}u=s[c-1]}return void 0===u?"":u}))}}!function(){if(ii)return ui;ii=1;var t=ci(),r=D(),e=Tt(),n=function(){if(qo)return Yo;qo=1,_o();var t=D(),r=ve(),e=Fo(),n=L(),o=Ir(),i=Br(),u=o("species"),c=RegExp.prototype;return Yo=function(a,f,s,l){var v=o(a),d=!n((function(){var t={};return t[v]=function(){return 7},7!==""[a](t)})),p=d&&!n((function(){var t=!1,r=/a/;return"split"===a&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[v]=/./[v]),r.exec=function(){return t=!0,null},r[v](""),!t}));if(!d||!p||s){var h=/./[v],y=f(v,""[a],(function(r,n,o,i,u){var a=n.exec;return a===e||a===c.exec?d&&!u?{done:!0,value:t(h,n,o,i)}:{done:!0,value:t(r,o,n,i)}:{done:!1}}));r(String.prototype,a,y[0]),r(c,v,y[1])}l&&i(c[v],"sham",!0)}}(),o=L(),i=_r(),u=kt(),c=Nt(),a=Ne(),f=Ce(),s=Dn(),l=Rt(),v=fi(),d=Wt(),p=si(),h=function(){if(oi)return ni;oi=1;var t=D(),r=_r(),e=kt(),n=Mt(),o=Fo(),i=TypeError;return ni=function(u,c){var a=u.exec;if(e(a)){var f=t(a,u,c);return null!==f&&r(f),f}if("RegExp"===n(u))return t(o,u,c);throw new i("RegExp#exec called on incompatible receiver")}}(),y=Ir()("replace"),g=Math.max,m=Math.min,b=e([].concat),w=e([].push),S=e("".indexOf),O=e("".slice),x="$0"==="a".replace(/./,"$0"),E=!!/./[y]&&""===/./[y]("a","$0");n("replace",(function(e,n,o){var x=E?"$":"$0";return[function(t,e){var o=l(this),i=c(t)?void 0:d(t,y);return i?r(i,t,o,e):r(n,s(o),t,e)},function(r,e){var c=i(this),l=s(r);if("string"==typeof e&&-1===S(e,x)&&-1===S(e,"$<")){var d=o(n,c,l,e);if(d.done)return d.value}var y=u(e);y||(e=s(e));var E,I=c.global;I&&(E=c.unicode,c.lastIndex=0);for(var P,j=[];null!==(P=h(c,l))&&(w(j,P),I);){""===s(P[0])&&(c.lastIndex=v(l,f(c.lastIndex),E))}for(var T,M="",A=0,N=0;N<j.length;N++){for(var R,C=s((P=j[N])[0]),k=g(m(a(P.index),l.length),0),L=[],V=1;V<P.length;V++)w(L,void 0===(T=P[V])?T:String(T));var z=P.groups;if(y){var D=b([C],L,k,l);void 0!==z&&w(D,z),R=s(t(e,void 0,D))}else R=p(C,l,k,L,z,e);k>=A&&(M+=O(l,A,k)+R,A=k+C.length)}return M+O(l,A)}]}),!!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!x||E)}();var li,vi,di,pi,hi,yi,gi,mi,bi,wi={};function Si(){return vi?li:(vi=1,li={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})}function Oi(){if(pi)return di;pi=1;var t=Tr()("span").classList,r=t&&t.constructor&&t.constructor.prototype;return di=r===Object.prototype?void 0:r}function xi(){if(yi)return hi;yi=1;var t=L();return hi=function(r,e){var n=[][r];return!!n&&t((function(){n.call(null,e||function(){return 1},1)}))}}function Ei(t){return void 0===t&&(t="r"),"".concat(t,"-").concat(m())}function Ii(t){var r={};return t.trim().split(";").forEach((function(t){if(t){var e=Wo(t.split(":"),2),n=e[0],o=e[1];n&&o&&(r[n.trim()]=o.trim())}})),r}function Pi(){return Ei("w-e-insert-video")}!function(){if(bi)return wi;bi=1;var t=I(),r=Si(),e=Oi(),n=function(){if(mi)return gi;mi=1;var t=io().forEach,r=xi()("forEach");return gi=r?[].forEach:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)},gi}(),o=Br(),i=function(t){if(t&&t.forEach!==n)try{o(t,"forEach",n)}catch(r){t.forEach=n}};for(var u in r)r[u]&&i(t[u]&&t[u].prototype);i(e)}();var ji=function(){function t(){this.title=r("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=Pi(),this.heightInputId=Pi(),this.buttonId=Pi()}return t.prototype.getSelectedVideoNode=function(t){return e.getSelectedNodeByType(t,"video")},t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){return!1},t.prototype.exec=function(t,r){},t.prototype.isDisabled=function(t){return null==t.selection||null==this.getSelectedVideoNode(t)},t.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},t.prototype.getModalContentElem=function(t){var i=this,c=i.widthInputId,a=i.heightInputId,f=i.buttonId,s=Wo(n(r("videoModule.width"),c,"auto"),2),l=s[0],v=s[1],d=u(v),p=Wo(n(r("videoModule.height"),a,"auto"),2),h=p[0],g=p[1],m=u(g),b=Wo(o(f,r("videoModule.ok")),1)[0],w=this.getSelectedVideoNode(t);if(null==this.$content){var S=u("<div></div>");S.on("click","#".concat(f),(function(r){r.preventDefault();var n=S.find("#".concat(c)).val().trim(),o=S.find("#".concat(a)).val().trim(),i=function(t){return/^\d+(\.\d+)?%$/.test(t)},u=function(t){return/^\d+(\.\d+)?$/.test(t)},f="auto",s="auto";i(n)?f=n:u(n)&&(f="".concat(parseInt(n,10),"px")),i(o)?s=o:u(o)&&(s="".concat(parseInt(o,10),"px"));var l=w.style,v=void 0===l?{}:l;t.restoreSelection();var d={style:$o($o({},v),{width:f,height:s})};y.setNodes(t,d,{match:function(t){return e.checkNodeType(t,"video")}}),t.hidePanelOrModal()})),this.$content=S}var O=this.$content;if(O.empty(),O.append(l),O.append(h),O.append(b),null==w)return O[0];var x=w.style,E=void 0===x?{}:x,I=E.width,P=void 0===I?"":I,j=E.height,T=void 0===j?"":j;return d.val(P),m.val(T),setTimeout((function(){d.focus()})),O[0]},t}();function Ti(){return Ei("w-e-edit-video")}var Mi,Ai,Ni,Ri,Ci,ki,Li,Vi,zi,Di,Fi,_i,$i,Bi,Ui,Hi,Wi,Gi,Ki,Xi,Yi,qi,Ji,Qi,Zi,tu,ru,eu,nu,ou,iu,uu,cu,au,fu,su,lu,vu,du,pu,hu,yu,gu,mu,bu,wu,Su,Ou,xu=function(){function t(){this.title=r("videoModule.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=Ti(),this.posterInputId=Ti(),this.buttonId=Ti()}return t.prototype.getSelectedVideoNode=function(t){return e.getSelectedNodeByType(t,"video")},t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){return!1},t.prototype.exec=function(t,r){},t.prototype.isDisabled=function(t){return null==t.selection||null==this.getSelectedVideoNode(t)},t.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},t.prototype.getModalContentElem=function(t){var i=this,c=this,a=c.srcInputId,f=c.posterInputId,s=c.buttonId,l=Wo(n(r("videoModule.videoSrc"),a,r("videoModule.videoSrcPlaceHolder")),2),v=l[0],d=l[1],p=Wo(n(r("videoModule.videoPoster"),f,r("videoModule.videoPosterPlaceHolder")),2),h=p[0],g=p[1],m=u(d),b=u(g),w=Wo(o(s,r("videoModule.ok")),1)[0];if(null==this.$content){var S=u("<div></div>");S.on("click","#".concat(s),(function(r){return Bo(i,void 0,void 0,(function(){var n,o,i,u;return Uo(this,(function(c){return r.preventDefault(),n=S.find("#".concat(a)).val().trim(),o=S.find("#".concat(f)).val().trim(),i=Ei("video-"),u={src:n,poster:o,key:i},t.restoreSelection(),y.setNodes(t,u,{match:function(t){return e.checkNodeType(t,"video")}}),t.hidePanelOrModal(),[2]}))}))})),this.$content=S}var O=this.$content;O.empty(),O.append(v),O.append(h),O.append(w);var x=this.getSelectedVideoNode(t);if(null==x)return O[0];var E=x.src,I=void 0===E?"":E,P=x.poster,j=void 0===P?"":P;return m.val(I),b.val(j),setTimeout((function(){m.focus()})),O[0]},t}(),Eu={};function Iu(){if(Ai)return Mi;Ai=1;var t=I(),r=Dt(),e=Mt(),n=function(t){return r.slice(0,t.length)===t};return Mi=n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":t.Bun&&"string"==typeof Bun.version?"BUN":t.Deno&&"object"==typeof Deno.version?"DENO":"process"===e(t.process)?"NODE":t.window&&t.document?"BROWSER":"REST"}function Pu(){if(Ri)return Ni;Ri=1;var t=Iu();return Ni="NODE"===t}function ju(){if(Vi)return Li;Vi=1;var t=Lt();return Li=function(r){return t(r)||null===r}}function Tu(){if(Di)return zi;Di=1;var t=ju(),r=String,e=TypeError;return zi=function(n){if(t(n))return n;throw new e("Can't set "+r(n)+" as a prototype")}}function Mu(){if(_i)return Fi;_i=1;var t=function(){if(ki)return Ci;ki=1;var t=Tt(),r=Ht();return Ci=function(e,n,o){try{return t(r(Object.getOwnPropertyDescriptor(e,n)[o]))}catch(t){}}}(),r=Lt(),e=Rt(),n=Tu();return Fi=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,u={};try{(o=t(Object.prototype,"__proto__","set"))(u,[]),i=u instanceof Array}catch(t){}return function(t,u){return e(t),n(u),r(t)?(i?o(t,u):t.__proto__=u,t):t}}():void 0)}function Au(){if(Bi)return $i;Bi=1;var t=$r().f,r=xr(),e=Ir()("toStringTag");return $i=function(n,o,i){n&&!i&&(n=n.prototype),n&&!r(n,e)&&t(n,e,{configurable:!0,value:o})}}function Nu(){if(Hi)return Ui;Hi=1;var t=Vt(),r=qn(),e=Ir(),n=V(),o=e("species");return Ui=function(e){var i=t(e);n&&i&&!i[o]&&r(i,o,{configurable:!0,get:function(){return this}})}}function Ru(){if(Gi)return Wi;Gi=1;var t=zt(),r=TypeError;return Wi=function(e,n){if(t(n,e))return e;throw new r("Incorrect invocation")}}function Cu(){if(Xi)return Ki;Xi=1;var t=En(),r=Ut(),e=TypeError;return Ki=function(n){if(t(n))return n;throw new e(r(n)+" is not a constructor")}}function ku(){if(qi)return Yi;qi=1;var t=_r(),r=Cu(),e=Nt(),n=Ir()("species");return Yi=function(o,i){var u,c=t(o).constructor;return void 0===c||e(u=t(c)[n])?i:r(u)}}function Lu(){if(Qi)return Ji;Qi=1;var t=Tt();return Ji=t([].slice)}function Vu(){if(tu)return Zi;tu=1;var t=TypeError;return Zi=function(r,e){if(r<e)throw new t("Not enough arguments");return r}}function zu(){if(eu)return ru;eu=1;var t=Dt();return ru=/(?:ipad|iphone|ipod).*applewebkit/i.test(t)}function Du(){if(ou)return nu;ou=1;var t,r,e,n,o=I(),i=ci(),u=oo(),c=kt(),a=xr(),f=L(),s=bo(),l=Lu(),v=Tr(),d=Vu(),p=zu(),h=Pu(),y=o.setImmediate,g=o.clearImmediate,m=o.process,b=o.Dispatch,w=o.Function,S=o.MessageChannel,O=o.String,x=0,E={},P="onreadystatechange";f((function(){t=o.location}));var j=function(t){if(a(E,t)){var r=E[t];delete E[t],r()}},T=function(t){return function(){j(t)}},M=function(t){j(t.data)},A=function(r){o.postMessage(O(r),t.protocol+"//"+t.host)};return y&&g||(y=function(t){d(arguments.length,1);var e=c(t)?t:w(t),n=l(arguments,1);return E[++x]=function(){i(e,void 0,n)},r(x),x},g=function(t){delete E[t]},h?r=function(t){m.nextTick(T(t))}:b&&b.now?r=function(t){b.now(T(t))}:S&&!p?(n=(e=new S).port2,e.port1.onmessage=M,r=u(n.postMessage,n)):o.addEventListener&&c(o.postMessage)&&!o.importScripts&&t&&"file:"!==t.protocol&&!f(A)?(r=A,o.addEventListener("message",M,!1)):r=P in v("script")?function(t){s.appendChild(v("script"))[P]=function(){s.removeChild(this),j(t)}}:function(t){setTimeout(T(t),0)}),nu={set:y,clear:g}}function Fu(){if(uu)return iu;uu=1;var t=I(),r=V(),e=Object.getOwnPropertyDescriptor;return iu=function(n){if(!r)return t[n];var o=e(t,n);return o&&o.value}}function _u(){if(au)return cu;au=1;var t=function(){this.head=null,this.tail=null};return t.prototype={add:function(t){var r={item:t,next:null},e=this.tail;e?e.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},cu=t}function $u(){if(pu)return du;pu=1;var t,r,e,n,o,i=I(),u=Fu(),c=oo(),a=Du().set,f=_u(),s=zu(),l=function(){if(su)return fu;su=1;var t=Dt();return fu=/ipad|iphone|ipod/i.test(t)&&"undefined"!=typeof Pebble}(),v=function(){if(vu)return lu;vu=1;var t=Dt();return lu=/web0s(?!.*chrome)/i.test(t)}(),d=Pu(),p=i.MutationObserver||i.WebKitMutationObserver,h=i.document,y=i.process,g=i.Promise,m=u("queueMicrotask");if(!m){var b=new f,w=function(){var r,e;for(d&&(r=y.domain)&&r.exit();e=b.get();)try{e()}catch(r){throw b.head&&t(),r}r&&r.enter()};s||d||v||!p||!h?!l&&g&&g.resolve?((n=g.resolve(void 0)).constructor=g,o=c(n.then,n),t=function(){o(w)}):d?t=function(){y.nextTick(w)}:(a=c(a,i),t=function(){a(w)}):(r=!0,e=h.createTextNode(""),new p(w).observe(e,{characterData:!0}),t=function(){e.data=r=!r}),m=function(r){b.head||t(),b.add(r)}}return du=m}function Bu(){return yu||(yu=1,hu=function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(t){}}),hu}function Uu(){return mu?gu:(mu=1,gu=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}})}function Hu(){if(wu)return bu;wu=1;var t=I();return bu=t.Promise}function Wu(){if(Ou)return Su;Ou=1;var t=I(),r=Hu(),e=kt(),n=gn(),o=ue(),i=Ir(),u=Iu(),c=mr(),a=Ft(),f=r&&r.prototype,s=i("species"),l=!1,v=e(t.PromiseRejectionEvent),d=n("Promise",(function(){var t=o(r),e=t!==String(r);if(!e&&66===a)return!0;if(c&&(!f.catch||!f.finally))return!0;if(!a||a<51||!/native code/.test(t)){var n=new r((function(t){t(1)})),i=function(t){t((function(){}),(function(){}))};if((n.constructor={})[s]=i,!(l=n.then((function(){}))instanceof i))return!0}return!(e||"BROWSER"!==u&&"DENO"!==u||v)}));return Su={CONSTRUCTOR:d,REJECTION_EVENT:v,SUBCLASSING:l}}var Gu,Ku,Xu={};function Yu(){if(Gu)return Xu;Gu=1;var t=Ht(),r=TypeError,e=function(e){var n,o;this.promise=new e((function(t,e){if(void 0!==n||void 0!==o)throw new r("Bad Promise constructor");n=t,o=e})),this.resolve=t(n),this.reject=t(o)};return Xu.f=function(t){return new e(t)},Xu}var qu,Ju,Qu,Zu,tc,rc,ec,nc,oc,ic,uc,cc,ac,fc,sc,lc,vc,dc={};function pc(){return Ju?qu:(Ju=1,qu={})}function hc(){if(Zu)return Qu;Zu=1;var t=Ir(),r=pc(),e=t("iterator"),n=Array.prototype;return Qu=function(t){return void 0!==t&&(r.Array===t||n[e]===t)}}function yc(){if(rc)return tc;rc=1;var t=xn(),r=Wt(),e=Nt(),n=pc(),o=Ir()("iterator");return tc=function(i){if(!e(i))return r(i,o)||r(i,"@@iterator")||n[t(i)]}}function gc(){if(nc)return ec;nc=1;var t=D(),r=Ht(),e=_r(),n=Ut(),o=yc(),i=TypeError;return ec=function(u,c){var a=arguments.length<2?o(u):c;if(r(a))return e(t(a,u));throw new i(n(u)+" is not iterable")},ec}function mc(){if(ic)return oc;ic=1;var t=D(),r=_r(),e=Wt();return oc=function(n,o,i){var u,c;r(n);try{if(!(u=e(n,"return"))){if("throw"===o)throw i;return i}u=t(u,n)}catch(t){c=!0,u=t}if("throw"===o)throw i;if(c)throw u;return r(u),i}}function bc(){if(cc)return uc;cc=1;var t=oo(),r=D(),e=_r(),n=Ut(),o=hc(),i=ke(),u=zt(),c=gc(),a=yc(),f=mc(),s=TypeError,l=function(t,r){this.stopped=t,this.result=r},v=l.prototype;return uc=function(d,p,h){var y,g,m,b,w,S,O,x=h&&h.that,E=!(!h||!h.AS_ENTRIES),I=!(!h||!h.IS_RECORD),P=!(!h||!h.IS_ITERATOR),j=!(!h||!h.INTERRUPTED),T=t(p,x),M=function(t){return y&&f(y,"normal",t),new l(!0,t)},A=function(t){return E?(e(t),j?T(t[0],t[1],M):T(t[0],t[1])):j?T(t,M):T(t)};if(I)y=d.iterator;else if(P)y=d;else{if(!(g=a(d)))throw new s(n(d)+" is not iterable");if(o(g)){for(m=0,b=i(d);b>m;m++)if((w=A(d[m]))&&u(v,w))return w;return new l(!1)}y=c(d,g)}for(S=I?d.next:y.next;!(O=r(S,y)).done;){try{w=A(O.value)}catch(t){f(y,"throw",t)}if("object"==typeof w&&w&&u(v,w))return w}return new l(!1)}}function wc(){if(fc)return ac;fc=1;var t=Ir()("iterator"),r=!1;try{var e=0,n={next:function(){return{done:!!e++}},return:function(){r=!0}};n[t]=function(){return this},Array.from(n,(function(){throw 2}))}catch(t){}return ac=function(e,n){try{if(!n&&!r)return!1}catch(t){return!1}var o=!1;try{var i={};i[t]=function(){return{next:function(){return{done:o=!0}}}},e(i)}catch(t){}return o}}function Sc(){if(lc)return sc;lc=1;var t=Hu(),r=wc(),e=Wu().CONSTRUCTOR;return sc=e||!r((function(r){t.all(r).then(void 0,(function(){}))}))}var Oc,xc={};var Ec,Ic={};var Pc,jc={};var Tc,Mc,Ac,Nc,Rc={};function Cc(){if(Mc)return Tc;Mc=1;var t=_r(),r=Lt(),e=Yu();return Tc=function(n,o){if(t(n),r(o)&&o.constructor===n)return o;var i=e.f(n);return(0,i.resolve)(o),i.promise}}function kc(t,r){return Bo(this,arguments,void 0,(function(t,r,n,o,i){var u,c,a,f,s,l,v;return void 0===n&&(n=""),void 0===o&&(o=""),void 0===i&&(i=""),Uo(this,(function(d){switch(d.label){case 0:return r?(t.restoreSelection(),u=t.getMenuConfig("insertVideo"),c=u.onInsertedVideo,a=u.checkVideo,f=u.parseVideoSrc,[4,a(r,n)]):[2];case 1:return"string"==typeof(s=d.sent())?(t.alert(s,"error"),[2]):null==s?[2]:[4,f(r)];case 2:return 0!==(l=d.sent()).trim().indexOf("<iframe ")&&(l=l.replace(/</g,"<").replace(/>/g,">")),v={type:"video",src:l,poster:n,children:[{text:""}],style:{width:o,height:i}},Promise.resolve().then((function(){e.isSelectedEmptyParagraph(t)&&y.removeNodes(t,{mode:"highest"}),y.insertNodes(t,v,{mode:"highest"})})),c(v),[2]}}))}))}function Lc(){return Ei("w-e-insert-video")}Nc||(Nc=1,function(){if(Ku)return Eu;Ku=1;var t,r,e,n=mn(),o=mr(),i=Pu(),u=I(),c=D(),a=ve(),f=Mu(),s=Au(),l=Nu(),v=Ht(),d=kt(),p=Lt(),h=Ru(),y=ku(),g=Du().set,m=$u(),b=Bu(),w=Uu(),S=_u(),O=se(),x=Hu(),E=Wu(),P=Yu(),j="Promise",T=E.CONSTRUCTOR,M=E.REJECTION_EVENT,A=E.SUBCLASSING,N=O.getterFor(j),R=O.set,C=x&&x.prototype,k=x,L=C,V=u.TypeError,z=u.document,F=u.process,_=P.f,$=_,B=!!(z&&z.createEvent&&u.dispatchEvent),U="unhandledrejection",H=function(t){var r;return!(!p(t)||!d(r=t.then))&&r},W=function(t,r){var e,n,o,i=r.value,u=1===r.state,a=u?t.ok:t.fail,f=t.resolve,s=t.reject,l=t.domain;try{a?(u||(2===r.rejection&&q(r),r.rejection=1),!0===a?e=i:(l&&l.enter(),e=a(i),l&&(l.exit(),o=!0)),e===t.promise?s(new V("Promise-chain cycle")):(n=H(e))?c(n,e,f,s):f(e)):s(i)}catch(t){l&&!o&&l.exit(),s(t)}},G=function(t,r){t.notified||(t.notified=!0,m((function(){for(var e,n=t.reactions;e=n.get();)W(e,t);t.notified=!1,r&&!t.rejection&&X(t)})))},K=function(t,r,e){var n,o;B?((n=z.createEvent("Event")).promise=r,n.reason=e,n.initEvent(t,!1,!0),u.dispatchEvent(n)):n={promise:r,reason:e},!M&&(o=u["on"+t])?o(n):t===U&&b("Unhandled promise rejection",e)},X=function(t){c(g,u,(function(){var r,e=t.facade,n=t.value;if(Y(t)&&(r=w((function(){i?F.emit("unhandledRejection",n,e):K(U,e,n)})),t.rejection=i||Y(t)?2:1,r.error))throw r.value}))},Y=function(t){return 1!==t.rejection&&!t.parent},q=function(t){c(g,u,(function(){var r=t.facade;i?F.emit("rejectionHandled",r):K("rejectionhandled",r,t.value)}))},J=function(t,r,e){return function(n){t(r,n,e)}},Q=function(t,r,e){t.done||(t.done=!0,e&&(t=e),t.value=r,t.state=2,G(t,!0))},Z=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw new V("Promise can't be resolved itself");var n=H(r);n?m((function(){var e={done:!1};try{c(n,r,J(Z,e,t),J(Q,e,t))}catch(r){Q(e,r,t)}})):(t.value=r,t.state=1,G(t,!1))}catch(r){Q({done:!1},r,t)}}};if(T&&(L=(k=function(r){h(this,L),v(r),c(t,this);var e=N(this);try{r(J(Z,e),J(Q,e))}catch(t){Q(e,t)}}).prototype,(t=function(t){R(this,{type:j,done:!1,notified:!1,parent:!1,reactions:new S,rejection:!1,state:0,value:null})}).prototype=a(L,"then",(function(t,r){var e=N(this),n=_(y(this,k));return e.parent=!0,n.ok=!d(t)||t,n.fail=d(r)&&r,n.domain=i?F.domain:void 0,0===e.state?e.reactions.add(n):m((function(){W(n,e)})),n.promise})),r=function(){var r=new t,e=N(r);this.promise=r,this.resolve=J(Z,e),this.reject=J(Q,e)},P.f=_=function(t){return t===k||void 0===t?new r(t):$(t)},!o&&d(x)&&C!==Object.prototype)){e=C.then,A||a(C,"then",(function(t,r){var n=this;return new k((function(t,r){c(e,n,t,r)})).then(t,r)}),{unsafe:!0});try{delete C.constructor}catch(t){}f&&f(C,L)}n({global:!0,constructor:!0,wrap:!0,forced:T},{Promise:k}),s(k,j,!1,!0),l(j)}(),function(){if(vc)return dc;vc=1;var t=mn(),r=D(),e=Ht(),n=Yu(),o=Uu(),i=bc();t({target:"Promise",stat:!0,forced:Sc()},{all:function(t){var u=this,c=n.f(u),a=c.resolve,f=c.reject,s=o((function(){var n=e(u.resolve),o=[],c=0,s=1;i(t,(function(t){var e=c++,i=!1;s++,r(n,u,t).then((function(t){i||(i=!0,o[e]=t,--s||a(o))}),f)})),--s||a(o)}));return s.error&&f(s.value),c.promise}})}(),function(){if(Oc)return xc;Oc=1;var t=mn(),r=mr(),e=Wu().CONSTRUCTOR,n=Hu(),o=Vt(),i=kt(),u=ve(),c=n&&n.prototype;if(t({target:"Promise",proto:!0,forced:e,real:!0},{catch:function(t){return this.then(void 0,t)}}),!r&&i(n)){var a=o("Promise").prototype.catch;c.catch!==a&&u(c,"catch",a,{unsafe:!0})}}(),function(){if(Ec)return Ic;Ec=1;var t=mn(),r=D(),e=Ht(),n=Yu(),o=Uu(),i=bc();t({target:"Promise",stat:!0,forced:Sc()},{race:function(t){var u=this,c=n.f(u),a=c.reject,f=o((function(){var n=e(u.resolve);i(t,(function(t){r(n,u,t).then(c.resolve,a)}))}));return f.error&&a(f.value),c.promise}})}(),function(){if(Pc)return jc;Pc=1;var t=mn(),r=Yu();t({target:"Promise",stat:!0,forced:Wu().CONSTRUCTOR},{reject:function(t){var e=r.f(this);return(0,e.reject)(t),e.promise}})}(),function(){if(Ac)return Rc;Ac=1;var t=mn(),r=Vt(),e=mr(),n=Hu(),o=Wu().CONSTRUCTOR,i=Cc(),u=r("Promise"),c=e&&!o;t({target:"Promise",stat:!0,forced:e||o},{resolve:function(t){return i(c&&this===u?n:this,t)}})}());var Vc,zc,Dc,Fc,_c,$c,Bc,Uc,Hc,Wc,Gc,Kc,Xc,Yc,qc,Jc=function(){function t(){this.title=r("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=Lc(),this.posterInputId=Lc(),this.buttonId=Lc()}return t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){return!1},t.prototype.exec=function(t,r){},t.prototype.isDisabled=function(t){var r=t.selection;return null==r||(!g.isCollapsed(r)||!!e.getSelectedElems(t).some((function(r){var n=e.getNodeType(r);return"pre"===n||("list-item"===n||!!t.isVoid(r))})))},t.prototype.getModalPositionNode=function(t){return null},t.prototype.getModalContentElem=function(t){var e=this,i=this,c=i.srcInputId,a=i.posterInputId,f=i.buttonId,s=Wo(n(r("videoModule.videoSrc"),c,r("videoModule.videoSrcPlaceHolder")),2),l=s[0],v=s[1],d=Wo(n(r("videoModule.videoPoster"),a,r("videoModule.videoPosterPlaceHolder")),2),p=d[0],h=d[1],y=u(v),g=u(h),m=Wo(o(f,r("videoModule.ok")),1)[0];if(null==this.$content){var b=u("<div></div>");b.on("click","#".concat(f),(function(r){return Bo(e,void 0,void 0,(function(){var e,n;return Uo(this,(function(o){switch(o.label){case 0:return r.preventDefault(),e=b.find("#".concat(c)).val().trim(),n=b.find("#".concat(a)).val().trim(),[4,kc(t,e,n)];case 1:return o.sent(),t.hidePanelOrModal(),[2]}}))}))})),this.$content=b}var w=this.$content;return w.empty(),w.append(l),w.append(p),w.append(m),y.val(""),g.val(""),setTimeout((function(){y.focus()})),w[0]},t}(),Qc={};function Zc(){if(_c)return Fc;_c=1;var t=xr(),r=kt(),e=Or(),n=ae(),o=function(){if(Dc)return zc;Dc=1;var t=L();return zc=!t((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))}(),i=n("IE_PROTO"),u=Object,c=u.prototype;return Fc=o?u.getPrototypeOf:function(n){var o=e(n);if(t(o,i))return o[i];var a=o.constructor;return r(a)&&o instanceof a?a.prototype:o instanceof u?c:null}}function ta(){if(Bc)return $c;Bc=1;var t,r,e,n=L(),o=kt(),i=Lt(),u=wo(),c=Zc(),a=ve(),f=Ir(),s=mr(),l=f("iterator"),v=!1;return[].keys&&("next"in(e=[].keys())?(r=c(c(e)))!==Object.prototype&&(t=r):v=!0),!i(t)||n((function(){var r={};return t[l].call(r)!==r}))?t={}:s&&(t=u(t)),o(t[l])||a(t,l,(function(){return this})),$c={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:v}}function ra(){if(Gc)return Wc;Gc=1;var t=mn(),r=D(),e=mr(),n=ie(),o=kt(),i=function(){if(Hc)return Uc;Hc=1;var t=ta().IteratorPrototype,r=wo(),e=jt(),n=Au(),o=pc(),i=function(){return this};return Uc=function(u,c,a,f){var s=c+" Iterator";return u.prototype=r(t,{next:e(+!f,a)}),n(u,s,!1,!0),o[s]=i,u}}(),u=Zc(),c=Mu(),a=Au(),f=Br(),s=ve(),l=Ir(),v=pc(),d=ta(),p=n.PROPER,h=n.CONFIGURABLE,y=d.IteratorPrototype,g=d.BUGGY_SAFARI_ITERATORS,m=l("iterator"),b="keys",w="values",S="entries",O=function(){return this};return Wc=function(n,l,d,x,E,I,P){i(d,l,x);var j,T,M,A=function(t){if(t===E&&L)return L;if(!g&&t&&t in C)return C[t];switch(t){case b:case w:case S:return function(){return new d(this,t)}}return function(){return new d(this)}},N=l+" Iterator",R=!1,C=n.prototype,k=C[m]||C["@@iterator"]||E&&C[E],L=!g&&k||A(E),V="Array"===l&&C.entries||k;if(V&&(j=u(V.call(new n)))!==Object.prototype&&j.next&&(e||u(j)===y||(c?c(j,y):o(j[m])||s(j,m,O)),a(j,N,!0,!0),e&&(v[N]=O)),p&&E===w&&k&&k.name!==w&&(!e&&h?f(C,"name",w):(R=!0,L=function(){return r(k,this)})),E)if(T={values:A(w),keys:I?L:A(b),entries:A(S)},P)for(M in T)(g||R||!(M in C))&&s(C,M,T[M]);else t({target:l,proto:!0,forced:g||R},T);return e&&!P||C[m]===L||s(C,m,L,{name:E}),v[l]=L,T}}function ea(){return Xc?Kc:(Xc=1,Kc=function(t,r){return{value:t,done:r}})}function na(){if(qc)return Yc;qc=1;var t=Ct(),r=So(),e=pc(),n=se(),o=$r().f,i=ra(),u=ea(),c=mr(),a=V(),f="Array Iterator",s=n.set,l=n.getterFor(f);Yc=i(Array,"Array",(function(r,e){s(this,{type:f,target:t(r),index:0,kind:e})}),(function(){var t=l(this),r=t.target,e=t.index++;if(!r||e>=r.length)return t.target=null,u(void 0,!0);switch(t.kind){case"keys":return u(e,!1);case"values":return u(r[e],!1)}return u([e,r[e]],!1)}),"values");var v=e.Arguments=e.Array;if(r("keys"),r("values"),r("entries"),!c&&a&&"values"!==v.name)try{o(v,"name",{value:"values"})}catch(t){}return Yc}!function(){if(Vc)return Qc;Vc=1;var t=mn(),r=Tt(),e=At(),n=Ct(),o=xi(),i=r([].join);t({target:"Array",proto:!0,forced:e!==Object||!o("join",",")},{join:function(t){return i(n(this),void 0===t?",":t)}})}(),na();var oa,ia={};!function(){if(oa)return ia;oa=1;var t=mn(),r=io().map;t({target:"Array",proto:!0,forced:!jn()("map")},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})}();var ua,ca={};!function(){if(ua)return ca;ua=1;var t=mn(),r=bn(),e=En(),n=Lt(),o=Re(),i=ke(),u=Ct(),c=Sn(),a=Ir(),f=jn(),s=Lu(),l=f("slice"),v=a("species"),d=Array,p=Math.max;t({target:"Array",proto:!0,forced:!l},{slice:function(t,a){var f,l,h,y=u(this),g=i(y),m=o(t,g),b=o(void 0===a?g:a,g);if(r(y)&&(f=y.constructor,(e(f)&&(f===d||r(f.prototype))||n(f)&&null===(f=f[v]))&&(f=void 0),f===d||void 0===f))return s(y,m,b);for(l=new(void 0===f?d:f)(p(b-m,0)),h=0;m<b;m++,h++)m in y&&c(l,h,y[m]);return l.length=h,l}})}();var aa,fa={};!function(){if(aa)return fa;aa=1;var t=ai().charAt,r=Dn(),e=se(),n=ra(),o=ea(),i="String Iterator",u=e.set,c=e.getterFor(i);n(String,"String",(function(t){u(this,{type:i,string:r(t),index:0})}),(function(){var r,e=c(this),n=e.string,i=e.index;return i>=n.length?o(void 0,!0):(r=t(n,i),e.index+=r.length,o(r,!1))}))}();var sa,la,va,da,pa={};function ha(){if(la)return sa;la=1;var t=L();return sa=!t((function(){return Object.isExtensible(Object.preventExtensions({}))}))}function ya(){if(da)return va;da=1;var t=ve();return va=function(r,e,n){for(var o in e)t(r,o,e[o],n);return r}}var ga,ma,ba,wa,Sa,Oa,xa,Ea,Ia,Pa,ja,Ta,Ma,Aa,Na={exports:{}},Ra={};function Ca(){if(ga)return Ra;ga=1;var t=Mt(),r=Ct(),e=De().f,n=Lu(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Ra.f=function(i){return o&&"Window"===t(i)?function(t){try{return e(t)}catch(t){return n(o)}}(i):e(r(i))},Ra}function ka(){if(Sa)return wa;Sa=1;var t=L(),r=Lt(),e=Mt(),n=function(){if(ba)return ma;ba=1;var t=L();return ma=t((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))}(),o=Object.isExtensible,i=t((function(){}));return wa=i||n?function(t){return!!r(t)&&((!n||"ArrayBuffer"!==e(t))&&(!o||o(t)))}:o}function La(){if(Oa)return Na.exports;Oa=1;var t=mn(),r=Tt(),e=fe(),n=Lt(),o=xr(),i=$r().f,u=De(),c=Ca(),a=ka(),f=Er(),s=ha(),l=!1,v=f("meta"),d=0,p=function(t){i(t,v,{value:{objectID:"O"+d++,weakData:{}}})},h=Na.exports={enable:function(){h.enable=function(){},l=!0;var e=u.f,n=r([].splice),o={};o[v]=1,e(o).length&&(u.f=function(t){for(var r=e(t),o=0,i=r.length;o<i;o++)if(r[o]===v){n(r,o,1);break}return r},t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},fastKey:function(t,r){if(!n(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,v)){if(!a(t))return"F";if(!r)return"E";p(t)}return t[v].objectID},getWeakData:function(t,r){if(!o(t,v)){if(!a(t))return!0;if(!r)return!1;p(t)}return t[v].weakData},onFreeze:function(t){return s&&l&&a(t)&&!o(t,v)&&p(t),t}};return e[v]=!0,Na.exports}function Va(){if(Ea)return xa;Ea=1;var t=kt(),r=Lt(),e=Mu();return xa=function(n,o,i){var u,c;return e&&t(u=o.constructor)&&u!==i&&r(c=u.prototype)&&c!==i.prototype&&e(n,c),n}}function za(){if(Pa)return Ia;Pa=1;var t=mn(),r=I(),e=Tt(),n=gn(),o=ve(),i=La(),u=bc(),c=Ru(),a=kt(),f=Nt(),s=Lt(),l=L(),v=wc(),d=Au(),p=Va();return Ia=function(h,y,g){var m=-1!==h.indexOf("Map"),b=-1!==h.indexOf("Weak"),w=m?"set":"add",S=r[h],O=S&&S.prototype,x=S,E={},I=function(t){var r=e(O[t]);o(O,t,"add"===t?function(t){return r(this,0===t?0:t),this}:"delete"===t?function(t){return!(b&&!s(t))&&r(this,0===t?0:t)}:"get"===t?function(t){return b&&!s(t)?void 0:r(this,0===t?0:t)}:"has"===t?function(t){return!(b&&!s(t))&&r(this,0===t?0:t)}:function(t,e){return r(this,0===t?0:t,e),this})};if(n(h,!a(S)||!(b||O.forEach&&!l((function(){(new S).entries().next()})))))x=g.getConstructor(y,h,m,w),i.enable();else if(n(h,!0)){var P=new x,j=P[w](b?{}:-0,1)!==P,T=l((function(){P.has(1)})),M=v((function(t){new S(t)})),A=!b&&l((function(){for(var t=new S,r=5;r--;)t[w](r,r);return!t.has(-0)}));M||((x=y((function(t,r){c(t,O);var e=p(new S,t,x);return f(r)||u(r,e[w],{that:e,AS_ENTRIES:m}),e}))).prototype=O,O.constructor=x),(T||A)&&(I("delete"),I("has"),m&&I("get")),(A||j)&&I(w),b&&O.clear&&delete O.clear}return E[h]=x,t({global:!0,constructor:!0,forced:x!==S},E),d(x,h),b||g.setStrong(x,h,m),x}}function Da(){if(Ta)return ja;Ta=1;var t=Tt(),r=ya(),e=La().getWeakData,n=Ru(),o=_r(),i=Nt(),u=Lt(),c=bc(),a=io(),f=xr(),s=se(),l=s.set,v=s.getterFor,d=a.find,p=a.findIndex,h=t([].splice),y=0,g=function(t){return t.frozen||(t.frozen=new m)},m=function(){this.entries=[]},b=function(t,r){return d(t.entries,(function(t){return t[0]===r}))};return m.prototype={get:function(t){var r=b(this,t);if(r)return r[1]},has:function(t){return!!b(this,t)},set:function(t,r){var e=b(this,t);e?e[1]=r:this.entries.push([t,r])},delete:function(t){var r=p(this.entries,(function(r){return r[0]===t}));return~r&&h(this.entries,r,1),!!~r}},ja={getConstructor:function(t,a,s,d){var p=t((function(t,r){n(t,h),l(t,{type:a,id:y++,frozen:null}),i(r)||c(r,t[d],{that:t,AS_ENTRIES:s})})),h=p.prototype,m=v(a),b=function(t,r,n){var i=m(t),u=e(o(r),!0);return!0===u?g(i).set(r,n):u[i.id]=n,t};return r(h,{delete:function(t){var r=m(this);if(!u(t))return!1;var n=e(t);return!0===n?g(r).delete(t):n&&f(n,r.id)&&delete n[r.id]},has:function(t){var r=m(this);if(!u(t))return!1;var n=e(t);return!0===n?g(r).has(t):n&&f(n,r.id)}}),r(h,s?{get:function(t){var r=m(this);if(u(t)){var n=e(t);if(!0===n)return g(r).get(t);if(n)return n[r.id]}},set:function(t,r){return b(this,t,r)}}:{add:function(t){return b(this,t,!0)}}),p}}}Aa||(Aa=1,function(){if(Ma)return pa;Ma=1;var t,r=ha(),e=I(),n=Tt(),o=ya(),i=La(),u=za(),c=Da(),a=Lt(),f=se().enforce,s=L(),l=ce(),v=Object,d=Array.isArray,p=v.isExtensible,h=v.isFrozen,y=v.isSealed,g=v.freeze,m=v.seal,b=!e.ActiveXObject&&"ActiveXObject"in e,w=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},S=u("WeakMap",w,c),O=S.prototype,x=n(O.set);if(l)if(b){t=c.getConstructor(w,"WeakMap",!0),i.enable();var E=n(O.delete),P=n(O.has),j=n(O.get);o(O,{delete:function(r){if(a(r)&&!p(r)){var e=f(this);return e.frozen||(e.frozen=new t),E(this,r)||e.frozen.delete(r)}return E(this,r)},has:function(r){if(a(r)&&!p(r)){var e=f(this);return e.frozen||(e.frozen=new t),P(this,r)||e.frozen.has(r)}return P(this,r)},get:function(r){if(a(r)&&!p(r)){var e=f(this);return e.frozen||(e.frozen=new t),P(this,r)?j(this,r):e.frozen.get(r)}return j(this,r)},set:function(r,e){if(a(r)&&!p(r)){var n=f(this);n.frozen||(n.frozen=new t),P(this,r)?x(this,r,e):n.frozen.set(r,e)}else x(this,r,e);return this}})}else r&&s((function(){var t=g([]);return x(new S,t,1),!h(t)}))&&o(O,{set:function(t,r){var e;return d(t)&&(h(t)?e=g:y(t)&&(e=m)),x(this,t,r),e&&e(t),this}})}());var Fa,_a={};function $a(t){return t.getMenuConfig("uploadVideo")}!function(){if(Fa)return _a;Fa=1;var t=I(),r=Si(),e=Oi(),n=na(),o=Br(),i=Au(),u=Ir()("iterator"),c=n.values,a=function(t,e){if(t){if(t[u]!==c)try{o(t,u,c)}catch(r){t[u]=c}if(i(t,e,!0),r[e])for(var a in n)if(t[a]!==n[a])try{o(t,a,n[a])}catch(r){t[a]=n[a]}}};for(var f in r)a(t[f]&&t[f].prototype,f);a(e,"DOMTokenList")}();var Ba=new WeakMap;function Ua(t,r){return Bo(this,void 0,void 0,(function(){var e,n;return Uo(this,(function(o){switch(o.label){case 0:return e=function(t){var r=Ba.get(t);if(null!=r)return r;var e=$a(t),n=e.onSuccess,o=e.onProgress,u=e.onFailed,c=e.customInsert,a=e.onError;return r=i($o($o({},e),{onProgress:function(r){t.showProgressBar(r),o&&o(r)},onSuccess:function(r,e){if(c)return c(e,(function(r,e){return kc(t,r,e)})),void n(r,e);var o=e.errno,i=void 0===o?1:o,a=e.data,f=void 0===a?{}:a;if(0===i){var s=f.url,l=void 0===s?"":s,v=f.poster;kc(t,l,void 0===v?"":v),n(r,e)}else u(r,e)},onError:function(t,r,e){a(t,r,e)}})),Ba.set(t,r),r}(t),n=r.map((function(t){return{name:t.name,type:t.type,size:t.size,data:t}})),e.addFiles(n),[4,e.upload()];case 1:return o.sent(),[2]}}))}))}var Ha=function(){function t(){this.title=r("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){return!1},t.prototype.exec=function(t,r){var e=this.getMenuConfig(t),n=e.allowedFileTypes,o=void 0===n?[]:n,i=e.customBrowseAndUpload;if(i)i((function(r,e){return kc(t,r,e)}));else{var c="";o.length>0&&(c='accept="'.concat(o.join(", "),'"'));var a=u("body"),f=u('<input type="file" '.concat(c," multiple/>"));f.hide(),a.append(f),f.click(),f.on("change",(function(){var r=f[0].files;!function(t,r){Bo(this,void 0,void 0,(function(){var e,n,o,i,u,c,a,f,s,l,v,d;return Uo(this,(function(p){switch(p.label){case 0:if(null==r)return[2];e=Array.prototype.slice.call(r),n=[],o=$a(t).customUpload,p.label=1;case 1:p.trys.push([1,8,9,14]),i=!0,u=Go(e),p.label=2;case 2:return[4,u.next()];case 3:return c=p.sent(),(s=c.done)?[3,7]:(d=c.value,i=!1,a=d,o?[4,o(a,(function(r,e){return kc(t,r,e)}))]:[3,5]);case 4:return p.sent(),[3,6];case 5:n.push(a),p.label=6;case 6:return i=!0,[3,2];case 7:return[3,14];case 8:return f=p.sent(),l={error:f},[3,14];case 9:return p.trys.push([9,,12,13]),i||s||!(v=u.return)?[3,11]:[4,v.call(u)];case 10:p.sent(),p.label=11;case 11:return[3,13];case 12:if(l)throw l.error;return[7];case 13:return[7];case 14:return n.length>0?[4,Ua(t,n)]:[3,16];case 15:p.sent(),p.label=16;case 16:return[2]}}))}))}(t,r)}))}},t.prototype.isDisabled=function(t){var r=t.selection;return null==r||(!g.isCollapsed(r)||!!e.getSelectedElems(t).some((function(r){var n=e.getNodeType(r);return"pre"===n||("list-item"===n||!!t.isVoid(r))})))},t.prototype.getMenuConfig=function(t){return t.getMenuConfig("uploadVideo")},t}(),Wa={key:"insertVideo",factory:function(){return new Jc},config:{onInsertedVideo:function(t){},checkVideo:function(t,r){return!0},parseVideoSrc:function(t){return t}}},Ga={key:"uploadVideo",factory:function(){return new Ha},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(t){return t},onProgress:function(t){},onSuccess:function(t,r){},onFailed:function(t,r){console.error("'".concat(t.name,"' upload failed"),r)},onError:function(t,r,e){console.error("'".concat(t.name," upload error"),r,e)}}},Ka={key:"editVideoSize",factory:function(){return new ji}},Xa={key:"editVideoSrc",factory:function(){return new xu}};function Ya(t,r,e,n,o){return void 0===r&&(r=""),void 0===e&&(e="auto"),void 0===n&&(n="auto"),void 0===o&&(o={}),{type:"video",src:t,poster:r,width:e,height:n,style:o,children:[{text:""}]}}var qa={selector:'div[data-w-e-type="video"]',parseElemHtml:function(t,r,e){var n=u(t),o="",i="",c="auto",a="auto",f={},s=n.find("iframe");if(s.length>0)return c=s.attr("width")||"auto",a=s.attr("height")||"auto",f=Ii(f=s.attr("style")||""),Ya(o=s[0].outerHTML,i,c,a,f);var l=n.find("video");return(o=l.attr("src")||"")||l.length>0&&(o=l.find("source").attr("src")||""),c=l.attr("width")||"auto",a=l.attr("height")||"auto",Ya(o,i=l.attr("poster")||"",c,a,f=Ii(f=l.attr("style")||""))}};var Ja,Qa={};!function(){if(Ja)return Qa;Ja=1;var t=mn(),r=Le().includes,e=L(),n=So();t({target:"Array",proto:!0,forced:e((function(){return!Array(1).includes()}))},{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n("includes")}();var Za={renderElems:[{type:"video",renderElem:function(t,r,n){var o,i=t,u=i.src,c=void 0===u?"":u,a=i.poster,f=void 0===a?"":a,s=i.key,l=void 0===s?"":s,v=i.width,d=void 0===v?"auto":v,p=i.height,h=void 0===p?"auto":p,y=i.style,g=void 0===y?{}:y,m=i.textAlign,S=void 0===m?"center":m,O=e.isNodeSelected(n,t);if(0===c.trim().indexOf("<iframe ")){var x=Hn(c,d,h,g);o=b("div",{className:"w-e-textarea-video-container","data-selected":O?"true":"",style:{textAlign:S},innerHTML:x})}else{var E=b("video",{key:l,poster:f,controls:!0,style:g},b("source",{src:c,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==d&&(E.data.width=d),"auto"!==h&&(E.data.height=h),o=b("div",{className:"w-e-textarea-video-container","data-selected":O?"true":"",style:{textAlign:S}},E)}return w("div",{props:{contentEditable:!1},on:{mousedown:function(t){return t.preventDefault()}}},o)}}],elemsToHtml:[Xn],preParseHtml:[{selector:"iframe,video,p",preParseHtml:function(t){var r=u(t),e=r;if("p"===Un(r)){var n=r.children();if(1===n.length){var o=n[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(e=u(o))}}var c=Un(e);if("iframe"!==c&&"video"!==c)return e[0];if("video"===e.parent().attr("data-w-e-type"))return e[0];var a=u('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return a.append(e),a[0]}}],parseElemsHtml:[qa],menus:[Wa,Ga,Ka,Xa],editorPlugin:function(t){var r=t.isVoid,n=t.normalizeNode,o=t;return o.isVoid=function(t){return"video"===t.type||r(t)},o.normalizeNode=function(t){var r=Wo(t,2),i=r[0],u=r[1];"video"===e.getNodeType(i)&&(e.isLastNode(o,i)&&y.insertNodes(o,e.genEmptyParagraph(),{at:[u[0]+1]}));return n([i,u])},o}};export{Za as default};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|