@wangeditor-next/video-module 2.0.0 → 2.0.2
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/core/src/config/interface.d.ts +1 -1
- package/dist/core/src/editor/dom-editor.d.ts +9 -0
- package/dist/core/src/index.d.ts +11 -1
- package/dist/core/src/upload.d.ts +5 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ import type { VideoElement } from 'packages/video-module/src/module/custom-types
|
|
|
7
7
|
import type { Descendant, Node, NodeEntry, Range } from 'slate';
|
|
8
8
|
import type { IDomEditor } from '../editor/interface';
|
|
9
9
|
import type { IMenuGroup } from '../menus/interface';
|
|
10
|
-
import type { IUploadConfig } from '../upload';
|
|
10
|
+
import type { IUploadConfig } from '../upload/interface';
|
|
11
11
|
import type { DOMElement } from '../utils/dom';
|
|
12
12
|
interface IHoverbarConf {
|
|
13
13
|
[key: string]: {
|
|
@@ -54,6 +54,15 @@ export declare const DomEditor: {
|
|
|
54
54
|
* Find the native DOM element from a Slate node or editor.
|
|
55
55
|
*/
|
|
56
56
|
toDOMNode(editor: IDomEditor, node: Node): HTMLElement;
|
|
57
|
+
/**
|
|
58
|
+
* Check if a Slate node currently has a mapped DOM node.
|
|
59
|
+
* During IME/composition transitions the Slate tree can update before DOM patching finishes.
|
|
60
|
+
*/
|
|
61
|
+
hasDOMNodeBySlateNode(editor: IDomEditor, node: Node): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Check if both range endpoints can be resolved to DOM nodes right now.
|
|
64
|
+
*/
|
|
65
|
+
canResolveDOMRange(editor: IDomEditor, range: Range): boolean;
|
|
57
66
|
/**
|
|
58
67
|
* Check if a DOM node is within the editor.
|
|
59
68
|
*/
|
package/dist/core/src/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ import type { IRegisterMenuConf } from './menus/index';
|
|
|
8
8
|
import type { IParseElemHtmlConf, IPreParseHtmlConf, ParseStyleHtmlFnType } from './parse-html/index';
|
|
9
9
|
import type { IRenderElemConf, RenderStyleFnType } from './render/index';
|
|
10
10
|
import type { IElemToHtmlConf, styleToHtmlFnType } from './to-html/index';
|
|
11
|
+
import createUploaderRuntime from './upload/createUploader';
|
|
12
|
+
import type { IUploadConfig } from './upload/interface';
|
|
11
13
|
export * from './create/index';
|
|
12
14
|
export type { ClassStylePolicy, IClassStyleUnsupportedPayload, IEditorConfig, IToolbarConfig, IUploadImageConfig, IUploadVideoConfig, StyleClassTokenType, TextStyleMode, } from './config/interface';
|
|
13
15
|
export * from './config/style-mode';
|
|
@@ -17,7 +19,15 @@ export * from './render/index';
|
|
|
17
19
|
export * from './to-html/index';
|
|
18
20
|
export * from './parse-html/index';
|
|
19
21
|
export * from './menus/index';
|
|
20
|
-
export
|
|
22
|
+
export type { IUploadAdapter, IUploadAdapterContext, IUploadConfig, IUploader, IUploadFile, IUploadResultFile, } from './upload/interface';
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Please import from `@wangeditor-next/core/upload`.
|
|
25
|
+
*/
|
|
26
|
+
export declare const createUploader: typeof createUploaderRuntime;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Please import from `@wangeditor-next/core/upload`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function createUppyUploader(config: IUploadConfig): import("./upload/interface").IUploader;
|
|
21
31
|
export * from './i18n/index';
|
|
22
32
|
export * from './utils/dom';
|
|
23
33
|
export interface IModuleConf {
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("@wangeditor-next/core"),require("dom7"),require("slate"),require("nanoid"),require("snabbdom")):"function"==typeof define&&define.amd?define(["@wangeditor-next/core","dom7","slate","nanoid","snabbdom"],r):(t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorVideoModule=r(t.core,t.$,t.slate,t.nanoid,t.snabbdom)}(this,function(t,r,e,n,o){"use strict";t.i18nAddResources("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.i18nAddResources("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}});var i,u,a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},c={};function f(){if(u)return i;u=1;var t=function(t){return t&&t.Math===Math&&t};return i=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof a&&a)||t("object"==typeof i&&i)||function(){return this}()||Function("return this")()}var s,l,d,v,p,h,y,g,m={};function w(){return l?s:(l=1,s=function(t){try{return!!t()}catch(t){return!0}})}function b(){if(v)return d;v=1;var t=w();return d=!t(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function S(){if(h)return p;h=1;var t=w();return p=!t(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})}function E(){if(g)return y;g=1;var t=S(),r=Function.prototype.call;return y=t?r.bind(r):function(){return r.apply(r,arguments)},y}var x,O,I,j,T,P,M,A,R,N,C,k,D,L,V,z,F,_,B,$,U,W,H,G,q,K,Y,X,J,Q,Z,tt,rt,et,nt,ot,it,ut,at,ct,ft,st={};function lt(){return I?O:(I=1,O=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}})}function dt(){if(T)return j;T=1;var t=S(),r=Function.prototype,e=r.call,n=t&&r.bind.bind(e,e);return j=t?n:function(t){return function(){return e.apply(t,arguments)}},j}function vt(){if(M)return P;M=1;var t=dt(),r=t({}.toString),e=t("".slice);return P=function(t){return e(r(t),8,-1)}}function pt(){if(R)return A;R=1;var t=dt(),r=w(),e=vt(),n=Object,o=t("".split);return A=r(function(){return!n("z").propertyIsEnumerable(0)})?function(t){return"String"===e(t)?o(t,""):n(t)}:n}function ht(){return C?N:(C=1,N=function(t){return null==t})}function yt(){if(D)return k;D=1;var t=ht(),r=TypeError;return k=function(e){if(t(e))throw new r("Can't call method on "+e);return e}}function gt(){if(V)return L;V=1;var t=pt(),r=yt();return L=function(e){return t(r(e))}}function mt(){if(F)return z;F=1;var t="object"==typeof document&&document.all;return z=void 0===t&&void 0!==t?function(r){return"function"==typeof r||r===t}:function(t){return"function"==typeof t}}function wt(){if(B)return _;B=1;var t=mt();return _=function(r){return"object"==typeof r?null!==r:t(r)}}function bt(){if(U)return $;U=1;var t=f(),r=mt();return $=function(e,n){return arguments.length<2?(o=t[e],r(o)?o:void 0):t[e]&&t[e][n];var o},$}function St(){if(H)return W;H=1;var t=dt();return W=t({}.isPrototypeOf)}function Et(){if(q)return G;q=1;var t=f().navigator,r=t&&t.userAgent;return G=r?String(r):""}function xt(){if(Y)return K;Y=1;var t,r,e=f(),n=Et(),o=e.process,i=e.Deno,u=o&&o.versions||i&&i.version,a=u&&u.v8;return a&&(r=(t=a.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]),K=r}function Ot(){if(J)return X;J=1;var t=xt(),r=w(),e=f().String;return X=!!Object.getOwnPropertySymbols&&!r(function(){var r=Symbol("symbol detection");return!e(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&t&&t<41})}function It(){if(Z)return Q;Z=1;var t=Ot();return Q=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function jt(){if(rt)return tt;rt=1;var t=bt(),r=mt(),e=St(),n=It(),o=Object;return tt=n?function(t){return"symbol"==typeof t}:function(n){var i=t("Symbol");return r(i)&&e(i.prototype,o(n))}}function Tt(){if(nt)return et;nt=1;var t=String;return et=function(r){try{return t(r)}catch(t){return"Object"}}}function Pt(){if(it)return ot;it=1;var t=mt(),r=Tt(),e=TypeError;return ot=function(n){if(t(n))return n;throw new e(r(n)+" is not a function")}}function Mt(){if(at)return ut;at=1;var t=Pt(),r=ht();return ut=function(e,n){var o=e[n];return r(o)?void 0:t(o)}}function At(){if(ft)return ct;ft=1;var t=E(),r=mt(),e=wt(),n=TypeError;return ct=function(o,i){var u,a;if("string"===i&&r(u=o.toString)&&!e(a=t(u,o)))return a;if(r(u=o.valueOf)&&!e(a=t(u,o)))return a;if("string"!==i&&r(u=o.toString)&&!e(a=t(u,o)))return a;throw new n("Can't convert object to primitive value")}}var Rt,Nt,Ct,kt,Dt,Lt,Vt,zt,Ft,_t,Bt,$t,Ut,Wt,Ht,Gt,qt,Kt,Yt,Xt,Jt,Qt,Zt,tr,rr={exports:{}};function er(){return Nt?Rt:(Nt=1,Rt=!1)}function nr(){if(kt)return Ct;kt=1;var t=f(),r=Object.defineProperty;return Ct=function(e,n){try{r(t,e,{value:n,configurable:!0,writable:!0})}catch(r){t[e]=n}return n}}function or(){if(Dt)return rr.exports;Dt=1;var t=er(),r=f(),e=nr(),n="__core-js_shared__",o=rr.exports=r[n]||e(n,{});return(o.versions||(o.versions=[])).push({version:"3.47.0",mode:t?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"}),rr.exports}function ir(){if(Vt)return Lt;Vt=1;var t=or();return Lt=function(r,e){return t[r]||(t[r]=e||{})}}function ur(){if(Ft)return zt;Ft=1;var t=yt(),r=Object;return zt=function(e){return r(t(e))}}function ar(){if(Bt)return _t;Bt=1;var t=dt(),r=ur(),e=t({}.hasOwnProperty);return _t=Object.hasOwn||function(t,n){return e(r(t),n)}}function cr(){if(Ut)return $t;Ut=1;var t=dt(),r=0,e=Math.random(),n=t(1.1.toString);return $t=function(t){return"Symbol("+(void 0===t?"":t)+")_"+n(++r+e,36)}}function fr(){if(Ht)return Wt;Ht=1;var t=f(),r=ir(),e=ar(),n=cr(),o=Ot(),i=It(),u=t.Symbol,a=r("wks"),c=i?u.for||u:u&&u.withoutSetter||n;return Wt=function(t){return e(a,t)||(a[t]=o&&e(u,t)?u[t]:c("Symbol."+t)),a[t]}}function sr(){if(qt)return Gt;qt=1;var t=E(),r=wt(),e=jt(),n=Mt(),o=At(),i=fr(),u=TypeError,a=i("toPrimitive");return Gt=function(i,c){if(!r(i)||e(i))return i;var f,s=n(i,a);if(s){if(void 0===c&&(c="default"),f=t(s,i,c),!r(f)||e(f))return f;throw new u("Can't convert object to primitive value")}return void 0===c&&(c="number"),o(i,c)}}function lr(){if(Yt)return Kt;Yt=1;var t=sr(),r=jt();return Kt=function(e){var n=t(e,"string");return r(n)?n:n+""}}function dr(){if(Jt)return Xt;Jt=1;var t=f(),r=wt(),e=t.document,n=r(e)&&r(e.createElement);return Xt=function(t){return n?e.createElement(t):{}}}function vr(){if(Zt)return Qt;Zt=1;var t=b(),r=w(),e=dr();return Qt=!t&&!r(function(){return 7!==Object.defineProperty(e("div"),"a",{get:function(){return 7}}).a})}function pr(){if(tr)return m;tr=1;var t=b(),r=E(),e=function(){if(x)return st;x=1;var t={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,e=r&&!t.call({1:2},1);return st.f=e?function(t){var e=r(this,t);return!!e&&e.enumerable}:t,st}(),n=lt(),o=gt(),i=lr(),u=ar(),a=vr(),c=Object.getOwnPropertyDescriptor;return m.f=t?c:function(t,f){if(t=o(t),f=i(f),a)try{return c(t,f)}catch(t){}if(u(t,f))return n(!r(e.f,t,f),t[f])},m}var hr,yr,gr,mr,wr,br,Sr,Er={};function xr(){if(yr)return hr;yr=1;var t=b(),r=w();return hr=t&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}function Or(){if(mr)return gr;mr=1;var t=wt(),r=String,e=TypeError;return gr=function(n){if(t(n))return n;throw new e(r(n)+" is not an object")}}function Ir(){if(wr)return Er;wr=1;var t=b(),r=vr(),e=xr(),n=Or(),o=lr(),i=TypeError,u=Object.defineProperty,a=Object.getOwnPropertyDescriptor,c="enumerable",f="configurable",s="writable";return Er.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=a(t,r);i&&i[s]&&(t[r]=e.value,e={configurable:f in e?e[f]:i[f],enumerable:c in e?e[c]:i[c],writable:!1})}return u(t,r,e)}:u:function(t,e,a){if(n(t),e=o(e),n(a),r)try{return u(t,e,a)}catch(t){}if("get"in a||"set"in a)throw new i("Accessors not supported");return"value"in a&&(t[e]=a.value),t},Er}function jr(){if(Sr)return br;Sr=1;var t=b(),r=Ir(),e=lt();return br=t?function(t,n,o){return r.f(t,n,e(1,o))}:function(t,r,e){return t[r]=e,t}}var Tr,Pr,Mr,Ar,Rr,Nr,Cr,kr,Dr,Lr,Vr,zr,Fr,_r,Br,$r={exports:{}};function Ur(){if(Pr)return Tr;Pr=1;var t=b(),r=ar(),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 Tr={EXISTS:o,PROPER:i,CONFIGURABLE:u}}function Wr(){if(Ar)return Mr;Ar=1;var t=dt(),r=mt(),e=or(),n=t(Function.toString);return r(e.inspectSource)||(e.inspectSource=function(t){return n(t)}),Mr=e.inspectSource}function Hr(){if(Nr)return Rr;Nr=1;var t=f(),r=mt(),e=t.WeakMap;return Rr=r(e)&&/native code/.test(String(e))}function Gr(){if(kr)return Cr;kr=1;var t=ir(),r=cr(),e=t("keys");return Cr=function(t){return e[t]||(e[t]=r(t))}}function qr(){return Lr?Dr:(Lr=1,Dr={})}function Kr(){if(zr)return Vr;zr=1;var t,r,e,n=Hr(),o=f(),i=wt(),u=jr(),a=ar(),c=or(),s=Gr(),l=qr(),d="Object already initialized",v=o.TypeError,p=o.WeakMap;if(n||c.state){var h=c.state||(c.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,t=function(t,r){if(h.has(t))throw new v(d);return r.facade=t,h.set(t,r),r},r=function(t){return h.get(t)||{}},e=function(t){return h.has(t)}}else{var y=s("state");l[y]=!0,t=function(t,r){if(a(t,y))throw new v(d);return r.facade=t,u(t,y,r),r},r=function(t){return a(t,y)?t[y]:{}},e=function(t){return a(t,y)}}return Vr={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 Yr(){if(Fr)return $r.exports;Fr=1;var t=dt(),r=w(),e=mt(),n=ar(),o=b(),i=Ur().CONFIGURABLE,u=Wr(),a=Kr(),c=a.enforce,f=a.get,s=String,l=Object.defineProperty,d=t("".slice),v=t("".replace),p=t([].join),h=o&&!r(function(){return 8!==l(function(){},"length",{value:8}).length}),y=String(String).split("String"),g=$r.exports=function(t,r,e){"Symbol("===d(s(r),0,7)&&(r="["+v(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=c(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"),$r.exports}function Xr(){if(Br)return _r;Br=1;var t=mt(),r=Ir(),e=Yr(),n=nr();return _r=function(o,i,u,a){a||(a={});var c=a.enumerable,f=void 0!==a.name?a.name:i;if(t(u)&&e(u,f,a),a.global)c?o[i]=u:n(i,u);else{try{a.unsafe?o[i]&&(c=!0):delete o[i]}catch(t){}c?o[i]=u:r.f(o,i,{value:u,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return o}}var Jr,Qr,Zr,te,re,ee,ne,oe,ie,ue,ae,ce,fe,se,le,de,ve,pe={};function he(){if(te)return Zr;te=1;var t=function(){if(Qr)return Jr;Qr=1;var t=Math.ceil,r=Math.floor;return Jr=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}}();return Zr=function(r){var e=+r;return e!=e||0===e?0:t(e)}}function ye(){if(ee)return re;ee=1;var t=he(),r=Math.max,e=Math.min;return re=function(n,o){var i=t(n);return i<0?r(i+o,0):e(i,o)}}function ge(){if(oe)return ne;oe=1;var t=he(),r=Math.min;return ne=function(e){var n=t(e);return n>0?r(n,9007199254740991):0}}function me(){if(ue)return ie;ue=1;var t=ge();return ie=function(r){return t(r.length)}}function we(){if(ce)return ae;ce=1;var t=gt(),r=ye(),e=me(),n=function(n){return function(o,i,u){var a=t(o),c=e(a);if(0===c)return!n&&-1;var f,s=r(u,c);if(n&&i!=i){for(;c>s;)if((f=a[s++])!=f)return!0}else for(;c>s;s++)if((n||s in a)&&a[s]===i)return n||s||0;return!n&&-1}};return ae={includes:n(!0),indexOf:n(!1)}}function be(){if(se)return fe;se=1;var t=dt(),r=ar(),e=gt(),n=we().indexOf,o=qr(),i=t([].push);return fe=function(t,u){var a,c=e(t),f=0,s=[];for(a in c)!r(o,a)&&r(c,a)&&i(s,a);for(;u.length>f;)r(c,a=u[f++])&&(~n(s,a)||i(s,a));return s}}function Se(){return de?le:(de=1,le=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function Ee(){if(ve)return pe;ve=1;var t=be(),r=Se().concat("length","prototype");return pe.f=Object.getOwnPropertyNames||function(e){return t(e,r)},pe}var xe,Oe,Ie,je,Te,Pe,Me,Ae,Re,Ne,Ce,ke,De,Le,Ve,ze,Fe,_e,Be,$e,Ue,We,He,Ge,qe,Ke,Ye,Xe,Je={};function Qe(){if(Ie)return Oe;Ie=1;var t=bt(),r=dt(),e=Ee(),n=(xe||(xe=1,Je.f=Object.getOwnPropertySymbols),Je),o=Or(),i=r([].concat);return Oe=t("Reflect","ownKeys")||function(t){var r=e.f(o(t)),u=n.f;return u?i(r,u(t)):r}}function Ze(){if(Te)return je;Te=1;var t=ar(),r=Qe(),e=pr(),n=Ir();return je=function(o,i,u){for(var a=r(i),c=n.f,f=e.f,s=0;s<a.length;s++){var l=a[s];t(o,l)||u&&t(u,l)||c(o,l,f(i,l))}}}function tn(){if(Me)return Pe;Me=1;var t=w(),r=mt(),e=/#|\.prototype\./,n=function(e,n){var c=i[o(e)];return c===a||c!==u&&(r(n)?t(n):!!n)},o=n.normalize=function(t){return String(t).replace(e,".").toLowerCase()},i=n.data={},u=n.NATIVE="N",a=n.POLYFILL="P";return Pe=n}function rn(){if(Re)return Ae;Re=1;var t=f(),r=pr().f,e=jr(),n=Xr(),o=nr(),i=Ze(),u=tn();return Ae=function(a,c){var f,s,l,d,v,p=a.target,h=a.global,y=a.stat;if(f=h?t:y?t[p]||o(p,{}):t[p]&&t[p].prototype)for(s in c){if(d=c[s],l=a.dontCallGetSet?(v=r(f,s))&&v.value:f[s],!u(h?s:p+(y?".":"#")+s,a.forced)&&void 0!==l){if(typeof d==typeof l)continue;i(d,l)}(a.sham||l&&l.sham)&&e(d,"sham",!0),n(f,s,d,a)}}}function en(){if(Ce)return Ne;Ce=1;var t=vt();return Ne=Array.isArray||function(r){return"Array"===t(r)}}function nn(){if(De)return ke;De=1;var t=TypeError;return ke=function(r){if(r>9007199254740991)throw t("Maximum allowed index exceeded");return r}}function on(){if(Ve)return Le;Ve=1;var t=b(),r=Ir(),e=lt();return Le=function(n,o,i){t?r.f(n,o,e(0,i)):n[o]=i}}function un(){if(Fe)return ze;Fe=1;var t={};return t[fr()("toStringTag")]="z",ze="[object z]"===String(t)}function an(){if(Be)return _e;Be=1;var t=un(),r=mt(),e=vt(),n=fr()("toStringTag"),o=Object,i="Arguments"===e(function(){return arguments}());return _e=t?e:function(t){var u,a,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,r){try{return t[r]}catch(t){}}(u=o(t),n))?a:i?e(u):"Object"===(c=e(u))&&r(u.callee)?"Arguments":c}}function cn(){if(Ue)return $e;Ue=1;var t=dt(),r=w(),e=mt(),n=an(),o=bt(),i=Wr(),u=function(){},a=o("Reflect","construct"),c=/^\s*(?:class|function)\b/,f=t(c.exec),s=!c.test(u),l=function(t){if(!e(t))return!1;try{return a(u,[],t),!0}catch(t){return!1}},d=function(t){if(!e(t))return!1;switch(n(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return s||!!f(c,i(t))}catch(t){return!0}};return d.sham=!0,$e=!a||r(function(){var t;return l(l.call)||!l(Object)||!l(function(){t=!0})||t})?d:l}function fn(){if(He)return We;He=1;var t=en(),r=cn(),e=wt(),n=fr()("species"),o=Array;return We=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 sn(){if(qe)return Ge;qe=1;var t=fn();return Ge=function(r,e){return new(t(r))(0===e?0:e)}}function ln(){if(Ye)return Ke;Ye=1;var t=w(),r=fr(),e=xt(),n=r("species");return Ke=function(r){return e>=51||!t(function(){var t=[];return(t.constructor={})[n]=function(){return{foo:1}},1!==t[r](Boolean).foo})}}!function(){if(Xe)return c;Xe=1;var t=rn(),r=w(),e=en(),n=wt(),o=ur(),i=me(),u=nn(),a=on(),f=sn(),s=ln(),l=fr(),d=xt(),v=l("isConcatSpreadable"),p=d>=51||!r(function(){var t=[];return t[v]=!1,t.concat()[0]!==t}),h=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:!p||!s("concat")},{concat:function(t){var r,e,n,c,s,l=o(this),d=f(l,0),v=0;for(r=-1,n=arguments.length;r<n;r++)if(h(s=-1===r?l:arguments[r]))for(c=i(s),u(v+c),e=0;e<c;e++,v++)e in s&&a(d,v,s[e]);else u(v+1),a(d,v++,s);return d.length=v,d}})}();var dn,vn,pn,hn,yn,gn,mn,wn,bn,Sn,En={},xn={};function On(){if(vn)return dn;vn=1;var t=be(),r=Se();return dn=Object.keys||function(e){return t(e,r)}}function In(){if(yn)return hn;yn=1;var t=bt();return hn=t("document","documentElement")}function jn(){if(mn)return gn;mn=1;var t,r=Or(),e=function(){if(pn)return xn;pn=1;var t=b(),r=xr(),e=Ir(),n=Or(),o=gt(),i=On();return xn.f=t&&!r?Object.defineProperties:function(t,r){n(t);for(var u,a=o(r),c=i(r),f=c.length,s=0;f>s;)e.f(t,u=c[s++],a[u]);return t},xn}(),n=Se(),o=qr(),i=In(),u=dr(),a=Gr(),c="prototype",f="script",s=a("IE_PROTO"),l=function(){},d=function(t){return"<"+f+">"+t+"</"+f+">"},v=function(t){t.write(d("")),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?v(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(d("document.F=Object")),r.close(),r.F):v(t);for(var a=n.length;a--;)delete p[c][n[a]];return p()};return o[s]=!0,gn=Object.create||function(t,n){var o;return null!==t?(l[c]=r(t),o=new l,l[c]=null,o[s]=t):o=p(),void 0===n?o:e.f(o,n)}}function Tn(){if(bn)return wn;bn=1;var t=fr(),r=jn(),e=Ir().f,n=t("unscopables"),o=Array.prototype;return void 0===o[n]&&e(o,n,{configurable:!0,value:r(null)}),wn=function(t){o[n][t]=!0}}!function(){if(Sn)return En;Sn=1;var t=rn(),r=we().includes,e=w(),n=Tn();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 Pn,Mn,An,Rn,Nn,Cn,kn,Dn,Ln,Vn={};function zn(){if(Mn)return Pn;Mn=1;var t=an(),r=String;return Pn=function(e){if("Symbol"===t(e))throw new TypeError("Cannot convert a Symbol value to a string");return r(e)}}function Fn(){return Rn?An:(Rn=1,An="\t\n\v\f\r \u2028\u2029\ufeff")}!function(){if(Ln)return Vn;Ln=1;var t=rn(),r=function(){if(Cn)return Nn;Cn=1;var t=dt(),r=yt(),e=zn(),n=Fn(),o=t("".replace),i=RegExp("^["+n+"]+"),u=RegExp("(^|[^"+n+"])["+n+"]+$"),a=function(t){return function(n){var a=e(r(n));return 1&t&&(a=o(a,i,"")),2&t&&(a=o(a,u,"$1")),a}};return Nn={start:a(1),end:a(2),trim:a(3)}}().trim,e=function(){if(Dn)return kn;Dn=1;var t=Ur().PROPER,r=w(),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,Bn,$n={};function Un(t){return t.length?t[0].tagName.toLowerCase():""}function Wn(t,e,n,o,i){void 0===e&&(e="auto"),void 0===n&&(n="auto"),void 0===o&&(o={}),void 0===i&&(i=!1);var u=r(t),a=o.width,c=void 0===a?"":a,f=o.height,s=void 0===f?"":f,l=c?'data-w-e-style-width="'.concat(c,'"'):"",d=s?'data-w-e-style-height="'.concat(s,'"'):"";if(u.attr("width",e),u.attr("height",n),i)l&&u.attr("data-w-e-style-width",c),d&&u.attr("data-w-e-style-height",s),u.removeAttr("style");else{var v="";c&&(v+="width: ".concat(c,";")),s&&(v+="height: ".concat(s,";")),u.attr("style",v)}return u[0].outerHTML}Bn||(Bn=1,function(){if(_n)return $n;_n=1;var t=rn(),r=f();t({global:!0,forced:r.globalThis!==r},{globalThis:r})}()),r.append&&(r.fn.append=r.append),r.on&&(r.fn.on=r.on),r.focus&&(r.fn.focus=r.focus),r.attr&&(r.fn.attr=r.attr),r.val&&(r.fn.val=r.val),r.html&&(r.fn.html=r.html),r.parent&&(r.fn.parent=r.parent),r.hasClass&&(r.fn.hasClass=r.hasClass),r.empty&&(r.fn.empty=r.empty);var Hn,Gn,qn,Kn={type:"video",elemToHtml:function(r,e,n){var o=r,i=o.src,u=void 0===i?"":i,a=o.poster,c=void 0===a?"":a,f=o.width,s=void 0===f?"auto":f,l=o.height,d=void 0===l?"auto":l,v=o.style,p=void 0===v?{}:v,h=o.textAlign,y=void 0===h?"center":h,g=t.getTextStyleMode(n),m=y||"center",w=' data-w-e-text-align="'.concat(m,'"'),b="class"===g?' class="'.concat(function(t){var r=t.trim().toLowerCase();return r&&["left","center","right","justify"].includes(r)?"w-e-video-align-".concat(r):"w-e-video-align-center"}(m),'"').concat(w):' style="text-align: '.concat(m,';"'),S='<div data-w-e-type="video" data-w-e-is-void'.concat(b,">\n");if(0===u.trim().indexOf("<iframe ")){S+=Wn(u,s,d,p,"class"===g)}else{var E=p.width,x=void 0===E?"":E,O=p.height,I=void 0===O?"":O;if("class"===g){var j=x?' data-w-e-style-width="'.concat(x,'"'):"",T=I?' data-w-e-style-height="'.concat(I,'"'):"";S+='<video poster="'.concat(c,'" controls="true" width="').concat(s,'" height="').concat(d,'"').concat(j).concat(T,'><source src="').concat(u,'" type="video/mp4"/></video>')}else{var P="";x&&(P+="width: ".concat(x,";")),I&&(P+="height: ".concat(I,";")),S+='<video poster="'.concat(c,'" controls="true" width="').concat(s,'" height="').concat(d,'" style="').concat(P,'"><source src="').concat(u,'" type="video/mp4"/></video>')}}return S+="\n</div>"}},Yn={};function Xn(){if(Gn)return Hn;Gn=1;var t=Yr(),r=Ir();return Hn=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(qn)return Yn;qn=1;var t=b(),r=Ur().EXISTS,e=dt(),n=Xn(),o=Function.prototype,i=e(o.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,a=e(u.exec);t&&!r&&n(o,"name",{configurable:!0,get:function(){try{return a(u,i(this))[1]}catch(t){return""}}})}();var Jn,Qn,Zn,to,ro,eo,no,oo={};function io(){if(Qn)return Jn;Qn=1;var t=vt(),r=dt();return Jn=function(e){if("Function"===t(e))return r(e)}}function uo(){if(to)return Zn;to=1;var t=io(),r=Pt(),e=S(),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 ao(){if(eo)return ro;eo=1;var t=uo(),r=dt(),e=pt(),n=ur(),o=me(),i=sn(),u=r([].push),a=function(r){var a=1===r,c=2===r,f=3===r,s=4===r,l=6===r,d=7===r,v=5===r||l;return function(p,h,y,g){for(var m,w,b=n(p),S=e(b),E=o(S),x=t(h,y),O=0,I=g||i,j=a?I(p,E):c||d?I(p,0):void 0;E>O;O++)if((v||O in S)&&(w=x(m=S[O],O,b),r))if(a)j[O]=w;else if(w)switch(r){case 3:return!0;case 5:return m;case 6:return O;case 2:u(j,m)}else switch(r){case 4:return!1;case 7:u(j,m)}return l?-1:f||s?s:j}};return ro={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}!function(){if(no)return oo;no=1;var t=rn(),r=ao().find,e=Tn(),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 co,fo,so,lo={};!function(){if(so)return lo;so=1;var t=un(),r=Xr(),e=function(){if(fo)return co;fo=1;var t=un(),r=an();return co=t?{}.toString:function(){return"[object "+r(this)+"]"}}();t||r(Object.prototype,"toString",e,{unsafe:!0})}();var vo,po,ho,yo,go,mo,wo,bo,So,Eo,xo,Oo={};function Io(){if(po)return vo;po=1;var t=Or();return vo=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 jo(){if(yo)return ho;yo=1;var t=w(),r=f().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 ho={BROKEN_CARET:o,MISSED_STICKY:n,UNSUPPORTED_Y:e}}function To(){if(Eo)return So;Eo=1;var t,r,e=E(),n=dt(),o=zn(),i=Io(),u=jo(),a=ir(),c=jn(),s=Kr().get,l=function(){if(mo)return go;mo=1;var t=w(),r=f().RegExp;return go=t(function(){var t=r(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})}(),d=function(){if(bo)return wo;bo=1;var t=w(),r=f().RegExp;return wo=t(function(){var t=r("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})}(),v=a("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,h=p,y=n("".charAt),g=n("".indexOf),m=n("".replace),b=n("".slice),S=(r=/b*/g,e(p,t=/a/,"a"),e(p,r,"a"),0!==t.lastIndex||0!==r.lastIndex),x=u.BROKEN_CARET,O=void 0!==/()??/.exec("")[1];return(S||O||x||l||d)&&(h=function(t){var r,n,u,a,f,l,d,w=this,E=s(w),I=o(t),j=E.raw;if(j)return j.lastIndex=w.lastIndex,r=e(h,j,I),w.lastIndex=j.lastIndex,r;var T=E.groups,P=x&&w.sticky,M=e(i,w),A=w.source,R=0,N=I;if(P&&(M=m(M,"y",""),-1===g(M,"g")&&(M+="g"),N=b(I,w.lastIndex),w.lastIndex>0&&(!w.multiline||w.multiline&&"\n"!==y(I,w.lastIndex-1))&&(A="(?: "+A+")",N=" "+N,R++),n=new RegExp("^(?:"+A+")",M)),O&&(n=new RegExp("^"+A+"$(?!\\s)",M)),S&&(u=w.lastIndex),a=e(p,P?n:w,N),P?a?(a.input=b(a.input,R),a[0]=b(a[0],R),a.index=w.lastIndex,w.lastIndex+=a[0].length):w.lastIndex=0:S&&a&&(w.lastIndex=w.global?a.index+a[0].length:u),O&&a&&a.length>1&&e(v,a[0],n,function(){for(f=1;f<arguments.length-2;f++)void 0===arguments[f]&&(a[f]=void 0)}),a&&T)for(a.groups=l=c(null),f=0;f<T.length;f++)l[(d=T[f])[0]]=a[d[1]];return a}),So=h}function Po(){if(xo)return Oo;xo=1;var t=rn(),r=To();return t({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r}),Oo}Po();var Mo=function(){return Mo=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},Mo.apply(this,arguments)};function Ao(t,r,e,n){return new(e||(e=Promise))(function(o,i){function u(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e(function(t){t(r)})).then(u,a)}c((n=n.apply(t,r||[])).next())})}function Ro(t,r){var e,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=a(0),u.throw=a(1),u.return=a(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(a){return function(c){return function(a){if(e)throw new TypeError("Generator is already executing.");for(;u&&(u=0,a[0]&&(i=0)),i;)try{if(e=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=r.call(t,i)}catch(t){a=[6,t],n=0}finally{e=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function No(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 Co(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 ko(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,e=t[Symbol.asyncIterator];return e?e.call(t):(t=No(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 Do,Lo,Vo,zo,Fo,_o,Bo,$o,Uo,Wo,Ho,Go,qo,Ko,Yo,Xo,Jo,Qo={};function Zo(){if(Lo)return Do;Lo=1;var t=S(),r=Function.prototype,e=r.apply,n=r.call;return Do="object"==typeof Reflect&&Reflect.apply||(t?n.bind(e):function(){return n.apply(e,arguments)}),Do}function ti(){if(zo)return Vo;zo=1,Po();var t=E(),r=Xr(),e=To(),n=w(),o=fr(),i=jr(),u=o("species"),a=RegExp.prototype;return Vo=function(c,f,s,l){var d=o(c),v=!n(function(){var t={};return t[d]=function(){return 7},7!==""[c](t)}),p=v&&!n(function(){var t=!1,r=/a/;if("split"===c){var e={};e[u]=function(){return r},(r={constructor:e,flags:""})[d]=/./[d]}return r.exec=function(){return t=!0,null},r[d](""),!t});if(!v||!p||s){var h=/./[d],y=f(d,""[c],function(r,n,o,i,u){var c=n.exec;return c===e||c===a.exec?v&&!u?{done:!0,value:t(h,n,o,i)}:{done:!0,value:t(r,o,n,i)}:{done:!1}});r(String.prototype,c,y[0]),r(a,d,y[1])}l&&i(a[d],"sham",!0)}}function ri(){if(_o)return Fo;_o=1;var t=dt(),r=he(),e=zn(),n=yt(),o=t("".charAt),i=t("".charCodeAt),u=t("".slice),a=function(t){return function(a,c){var f,s,l=e(n(a)),d=r(c),v=l.length;return d<0||d>=v?t?"":void 0:(f=i(l,d))<55296||f>56319||d+1===v||(s=i(l,d+1))<56320||s>57343?t?o(l,d):f:t?u(l,d,d+2):s-56320+(f-55296<<10)+65536}};return Fo={codeAt:a(!1),charAt:a(!0)}}function ei(){if($o)return Bo;$o=1;var t=ri().charAt;return Bo=function(r,e,n){return e+(n?t(r,e).length:1)}}function ni(){if(Wo)return Uo;Wo=1;var t=dt(),r=ur(),e=Math.floor,n=t("".charAt),o=t("".replace),i=t("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;return Uo=function(t,c,f,s,l,d){var v=f+t.length,p=s.length,h=a;return void 0!==l&&(l=r(l),h=u),o(d,h,function(r,o){var u;switch(n(o,0)){case"$":return"$";case"&":return t;case"`":return i(c,0,f);case"'":return i(c,v);case"<":u=l[i(o,1,-1)];break;default:var a=+o;if(0===a)return r;if(a>p){var d=e(a/10);return 0===d?r:d<=p?void 0===s[d-1]?n(o,1):s[d-1]+n(o,1):r}u=s[a-1]}return void 0===u?"":u})}}function oi(){if(Ko)return qo;Ko=1;var t=E(),r=ar(),e=St(),n=function(){if(Go)return Ho;Go=1;var t=f(),r=w(),e=t.RegExp,n=!r(function(){var t=!0;try{e(".","d")}catch(r){t=!1}var r={},n="",o=t?"dgimsy":"gimsy",i=function(t,e){Object.defineProperty(r,t,{get:function(){return n+=e,!0}})},u={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in t&&(u.hasIndices="d"),u)i(a,u[a]);return Object.getOwnPropertyDescriptor(e.prototype,"flags").get.call(r)!==o||n!==o});return Ho={correct:n}}(),o=Io(),i=RegExp.prototype;return qo=n.correct?function(t){return t.flags}:function(u){return n.correct||!e(i,u)||r(u,"flags")?u.flags:t(o,u)}}function ii(){if(Xo)return Yo;Xo=1;var t=E(),r=Or(),e=mt(),n=vt(),o=To(),i=TypeError;return Yo=function(u,a){var c=u.exec;if(e(c)){var f=t(c,u,a);return null!==f&&r(f),f}if("RegExp"===n(u))return t(o,u,a);throw new i("RegExp#exec called on incompatible receiver")}}!function(){if(Jo)return Qo;Jo=1;var t=Zo(),r=E(),e=dt(),n=ti(),o=w(),i=Or(),u=mt(),a=wt(),c=he(),f=ge(),s=zn(),l=yt(),d=ei(),v=Mt(),p=ni(),h=oi(),y=ii(),g=fr()("replace"),m=Math.max,b=Math.min,S=e([].concat),x=e([].push),O=e("".indexOf),I=e("".slice),j=function(t){return void 0===t?t:String(t)},T="$0"==="a".replace(/./,"$0"),P=!!/./[g]&&""===/./[g]("a","$0");n("replace",function(e,n,o){var w=P?"$":"$0";return[function(t,e){var o=l(this),i=a(t)?v(t,g):void 0;return i?r(i,t,o,e):r(n,s(o),t,e)},function(r,e){var a=i(this),l=s(r);if("string"==typeof e&&-1===O(e,w)&&-1===O(e,"$<")){var v=o(n,a,l,e);if(v.done)return v.value}var g=u(e);g||(e=s(e));var E,T=s(h(a)),P=-1!==O(T,"g");P&&(E=-1!==O(T,"u"),a.lastIndex=0);for(var M,A=[];null!==(M=y(a,l))&&(x(A,M),P);){""===s(M[0])&&(a.lastIndex=d(l,f(a.lastIndex),E))}for(var R="",N=0,C=0;C<A.length;C++){for(var k,D=s((M=A[C])[0]),L=m(b(c(M.index),l.length),0),V=[],z=1;z<M.length;z++)x(V,j(M[z]));var F=M.groups;if(g){var _=S([D],V,L,l);void 0!==F&&x(_,F),k=s(t(e,void 0,_))}else k=p(D,l,L,V,F,e);L>=N&&(R+=I(l,N,L)+k,N=L+D.length)}return R+I(l,N)}]},!!o(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!T||P)}();var ui,ai,ci,fi,si,li,di,vi,pi,hi={};function yi(){return ai?ui:(ai=1,ui={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 gi(){if(fi)return ci;fi=1;var t=dr()("span").classList,r=t&&t.constructor&&t.constructor.prototype;return ci=r===Object.prototype?void 0:r}function mi(){if(li)return si;li=1;var t=w();return si=function(r,e){var n=[][r];return!!n&&t(function(){n.call(null,e||function(){return 1},1)})}}function wi(t){return void 0===t&&(t="r"),"".concat(t,"-").concat(n.nanoid())}function bi(t){var r={};return t.trim().split(";").forEach(function(t){if(t){var e=Co(t.split(":"),2),n=e[0],o=e[1];n&&o&&(r[n.trim()]=o.trim())}}),r}function Si(){return wi("w-e-insert-video")}!function(){if(pi)return hi;pi=1;var t=f(),r=yi(),e=gi(),n=function(){if(vi)return di;vi=1;var t=ao().forEach,r=mi()("forEach");return di=r?[].forEach:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)},di}(),o=jr(),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 Ei=function(){function n(){this.title=t.t("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=Si(),this.heightInputId=Si(),this.buttonId=Si()}return n.prototype.getSelectedVideoNode=function(r){return t.DomEditor.getSelectedNodeByType(r,"video")},n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,r){},n.prototype.isDisabled=function(t){return null==t.selection||null==this.getSelectedVideoNode(t)},n.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},n.prototype.getModalContentElem=function(n){var o=this,i=o.widthInputId,u=o.heightInputId,a=o.buttonId,c=Co(t.genModalInputElems(t.t("videoModule.width"),i,"auto"),2),f=c[0],s=c[1],l=r(s),d=Co(t.genModalInputElems(t.t("videoModule.height"),u,"auto"),2),v=d[0],p=d[1],h=r(p),y=Co(t.genModalButtonElems(a,t.t("videoModule.ok")),1)[0],g=this.getSelectedVideoNode(n);if(null==this.$content){var m=r("<div></div>");m.on("click","#".concat(a),function(r){r.preventDefault();var o=m.find("#".concat(i)).val().trim(),a=m.find("#".concat(u)).val().trim(),c=function(t){return/^\d+(\.\d+)?%$/.test(t)},f=function(t){return/^\d+(\.\d+)?$/.test(t)},s="auto",l="auto";c(o)?s=o:f(o)&&(s="".concat(parseInt(o,10),"px")),c(a)?l=a:f(a)&&(l="".concat(parseInt(a,10),"px"));var d=g.style,v=void 0===d?{}:d;n.restoreSelection();var p={style:Mo(Mo({},v),{width:s,height:l})};e.Transforms.setNodes(n,p,{match:function(r){return t.DomEditor.checkNodeType(r,"video")}}),n.hidePanelOrModal()}),this.$content=m}var w=this.$content;if(w.empty(),w.append(f),w.append(v),w.append(y),null==g)return w[0];var b=g.style,S=void 0===b?{}:b,E=S.width,x=void 0===E?"":E,O=S.height,I=void 0===O?"":O;return l.val(x),h.val(I),setTimeout(function(){l.focus()}),w[0]},n}();function xi(){return wi("w-e-edit-video")}var Oi,Ii,ji,Ti,Pi,Mi,Ai,Ri,Ni,Ci,ki,Di,Li,Vi,zi,Fi,_i,Bi,$i,Ui,Wi,Hi,Gi,qi,Ki,Yi,Xi,Ji,Qi,Zi,tu,ru,eu,nu,ou,iu,uu,au,cu,fu,su,lu,du,vu,pu,hu,yu,gu,mu,wu,bu=function(){function n(){this.title=t.t("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=xi(),this.posterInputId=xi(),this.buttonId=xi()}return n.prototype.getSelectedVideoNode=function(r){return t.DomEditor.getSelectedNodeByType(r,"video")},n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,r){},n.prototype.isDisabled=function(t){return null==t.selection||null==this.getSelectedVideoNode(t)},n.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},n.prototype.getModalContentElem=function(n){var o=this,i=this,u=i.srcInputId,a=i.posterInputId,c=i.buttonId,f=Co(t.genModalInputElems(t.t("videoModule.videoSrc"),u,t.t("videoModule.videoSrcPlaceHolder")),2),s=f[0],l=f[1],d=Co(t.genModalInputElems(t.t("videoModule.videoPoster"),a,t.t("videoModule.videoPosterPlaceHolder")),2),v=d[0],p=d[1],h=r(l),y=r(p),g=Co(t.genModalButtonElems(c,t.t("videoModule.ok")),1)[0];if(null==this.$content){var m=r("<div></div>");m.on("click","#".concat(c),function(r){return Ao(o,void 0,void 0,function(){var o,i,c,f;return Ro(this,function(s){return r.preventDefault(),o=m.find("#".concat(u)).val().trim(),i=m.find("#".concat(a)).val().trim(),c=wi("video-"),f={src:o,poster:i,key:c},n.restoreSelection(),e.Transforms.setNodes(n,f,{match:function(r){return t.DomEditor.checkNodeType(r,"video")}}),n.hidePanelOrModal(),[2]})})}),this.$content=m}var w=this.$content;w.empty(),w.append(s),w.append(v),w.append(g);var b=this.getSelectedVideoNode(n);if(null==b)return w[0];var S=b.src,E=void 0===S?"":S,x=b.poster,O=void 0===x?"":x;return h.val(E),y.val(O),setTimeout(function(){h.focus()}),w[0]},n}(),Su={};function Eu(){if(Ii)return Oi;Ii=1;var t=f(),r=Et(),e=vt(),n=function(t){return r.slice(0,t.length)===t};return Oi=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 xu(){if(Ti)return ji;Ti=1;var t=Eu();return ji="NODE"===t}function Ou(){if(Mi)return Pi;Mi=1;var t=f();return Pi=t}function Iu(){if(Ci)return Ni;Ci=1;var t=wt();return Ni=function(r){return t(r)||null===r}}function ju(){if(Di)return ki;Di=1;var t=Iu(),r=String,e=TypeError;return ki=function(n){if(t(n))return n;throw new e("Can't set "+r(n)+" as a prototype")}}function Tu(){if(Vi)return Li;Vi=1;var t=function(){if(Ri)return Ai;Ri=1;var t=dt(),r=Pt();return Ai=function(e,n,o){try{return t(r(Object.getOwnPropertyDescriptor(e,n)[o]))}catch(t){}}}(),r=wt(),e=yt(),n=ju();return Li=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 Pu(){if(Fi)return zi;Fi=1;var t=Ir().f,r=ar(),e=fr()("toStringTag");return zi=function(n,o,i){n&&!i&&(n=n.prototype),n&&!r(n,e)&&t(n,e,{configurable:!0,value:o})}}function Mu(){if(Bi)return _i;Bi=1;var t=bt(),r=Xn(),e=fr(),n=b(),o=e("species");return _i=function(e){var i=t(e);n&&i&&!i[o]&&r(i,o,{configurable:!0,get:function(){return this}})}}function Au(){if(Ui)return $i;Ui=1;var t=St(),r=TypeError;return $i=function(e,n){if(t(n,e))return e;throw new r("Incorrect invocation")}}function Ru(){if(Hi)return Wi;Hi=1;var t=cn(),r=Tt(),e=TypeError;return Wi=function(n){if(t(n))return n;throw new e(r(n)+" is not a constructor")}}function Nu(){if(qi)return Gi;qi=1;var t=Or(),r=Ru(),e=ht(),n=fr()("species");return Gi=function(o,i){var u,a=t(o).constructor;return void 0===a||e(u=t(a)[n])?i:r(u)}}function Cu(){if(Yi)return Ki;Yi=1;var t=dt();return Ki=t([].slice)}function ku(){if(Ji)return Xi;Ji=1;var t=TypeError;return Xi=function(r,e){if(r<e)throw new t("Not enough arguments");return r}}function Du(){if(Zi)return Qi;Zi=1;var t=Et();return Qi=/(?:ipad|iphone|ipod).*applewebkit/i.test(t)}function Lu(){if(ru)return tu;ru=1;var t,r,e,n,o=f(),i=Zo(),u=uo(),a=mt(),c=ar(),s=w(),l=In(),d=Cu(),v=dr(),p=ku(),h=Du(),y=xu(),g=o.setImmediate,m=o.clearImmediate,b=o.process,S=o.Dispatch,E=o.Function,x=o.MessageChannel,O=o.String,I=0,j={},T="onreadystatechange";s(function(){t=o.location});var P=function(t){if(c(j,t)){var r=j[t];delete j[t],r()}},M=function(t){return function(){P(t)}},A=function(t){P(t.data)},R=function(r){o.postMessage(O(r),t.protocol+"//"+t.host)};return g&&m||(g=function(t){p(arguments.length,1);var e=a(t)?t:E(t),n=d(arguments,1);return j[++I]=function(){i(e,void 0,n)},r(I),I},m=function(t){delete j[t]},y?r=function(t){b.nextTick(M(t))}:S&&S.now?r=function(t){S.now(M(t))}:x&&!h?(n=(e=new x).port2,e.port1.onmessage=A,r=u(n.postMessage,n)):o.addEventListener&&a(o.postMessage)&&!o.importScripts&&t&&"file:"!==t.protocol&&!s(R)?(r=R,o.addEventListener("message",A,!1)):r=T in v("script")?function(t){l.appendChild(v("script"))[T]=function(){l.removeChild(this),P(t)}}:function(t){setTimeout(M(t),0)}),tu={set:g,clear:m}}function Vu(){if(nu)return eu;nu=1;var t=f(),r=b(),e=Object.getOwnPropertyDescriptor;return eu=function(n){if(!r)return t[n];var o=e(t,n);return o&&o.value}}function zu(){if(iu)return ou;iu=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}},ou=t}function Fu(){if(lu)return su;lu=1;var t,r,e,n,o,i=f(),u=Vu(),a=uo(),c=Lu().set,s=zu(),l=Du(),d=function(){if(au)return uu;au=1;var t=Et();return uu=/ipad|iphone|ipod/i.test(t)&&"undefined"!=typeof Pebble}(),v=function(){if(fu)return cu;fu=1;var t=Et();return cu=/web0s(?!.*chrome)/i.test(t)}(),p=xu(),h=i.MutationObserver||i.WebKitMutationObserver,y=i.document,g=i.process,m=i.Promise,w=u("queueMicrotask");if(!w){var b=new s,S=function(){var r,e;for(p&&(r=g.domain)&&r.exit();e=b.get();)try{e()}catch(r){throw b.head&&t(),r}r&&r.enter()};l||p||v||!h||!y?!d&&m&&m.resolve?((n=m.resolve(void 0)).constructor=m,o=a(n.then,n),t=function(){o(S)}):p?t=function(){g.nextTick(S)}:(c=a(c,i),t=function(){c(S)}):(r=!0,e=y.createTextNode(""),new h(S).observe(e,{characterData:!0}),t=function(){e.data=r=!r}),w=function(r){b.head||t(),b.add(r)}}return su=w}function _u(){return vu||(vu=1,du=function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(t){}}),du}function Bu(){return hu?pu:(hu=1,pu=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}})}function $u(){if(gu)return yu;gu=1;var t=f();return yu=t.Promise}function Uu(){if(wu)return mu;wu=1;var t=f(),r=$u(),e=mt(),n=tn(),o=Wr(),i=fr(),u=Eu(),a=er(),c=xt(),s=r&&r.prototype,l=i("species"),d=!1,v=e(t.PromiseRejectionEvent),p=n("Promise",function(){var t=o(r),e=t!==String(r);if(!e&&66===c)return!0;if(a&&(!s.catch||!s.finally))return!0;if(!c||c<51||!/native code/.test(t)){var n=new r(function(t){t(1)}),i=function(t){t(function(){},function(){})};if((n.constructor={})[l]=i,!(d=n.then(function(){})instanceof i))return!0}return!(e||"BROWSER"!==u&&"DENO"!==u||v)});return mu={CONSTRUCTOR:p,REJECTION_EVENT:v,SUBCLASSING:d}}var Wu,Hu,Gu={};function qu(){if(Wu)return Gu;Wu=1;var t=Pt(),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 Gu.f=function(t){return new e(t)},Gu}var Ku,Yu,Xu,Ju,Qu,Zu,ta,ra,ea,na,oa,ia,ua,aa,ca,fa,sa,la={};function da(){return Yu?Ku:(Yu=1,Ku={})}function va(){if(Ju)return Xu;Ju=1;var t=fr(),r=da(),e=t("iterator"),n=Array.prototype;return Xu=function(t){return void 0!==t&&(r.Array===t||n[e]===t)}}function pa(){if(Zu)return Qu;Zu=1;var t=an(),r=Mt(),e=ht(),n=da(),o=fr()("iterator");return Qu=function(i){if(!e(i))return r(i,o)||r(i,"@@iterator")||n[t(i)]}}function ha(){if(ra)return ta;ra=1;var t=E(),r=Pt(),e=Or(),n=Tt(),o=pa(),i=TypeError;return ta=function(u,a){var c=arguments.length<2?o(u):a;if(r(c))return e(t(c,u));throw new i(n(u)+" is not iterable")},ta}function ya(){if(na)return ea;na=1;var t=E(),r=Or(),e=Mt();return ea=function(n,o,i){var u,a;r(n);try{if(!(u=e(n,"return"))){if("throw"===o)throw i;return i}u=t(u,n)}catch(t){a=!0,u=t}if("throw"===o)throw i;if(a)throw u;return r(u),i}}function ga(){if(ia)return oa;ia=1;var t=uo(),r=E(),e=Or(),n=Tt(),o=va(),i=me(),u=St(),a=ha(),c=pa(),f=ya(),s=TypeError,l=function(t,r){this.stopped=t,this.result=r},d=l.prototype;return oa=function(v,p,h){var y,g,m,w,b,S,E,x=h&&h.that,O=!(!h||!h.AS_ENTRIES),I=!(!h||!h.IS_RECORD),j=!(!h||!h.IS_ITERATOR),T=!(!h||!h.INTERRUPTED),P=t(p,x),M=function(t){return y&&f(y,"normal"),new l(!0,t)},A=function(t){return O?(e(t),T?P(t[0],t[1],M):P(t[0],t[1])):T?P(t,M):P(t)};if(I)y=v.iterator;else if(j)y=v;else{if(!(g=c(v)))throw new s(n(v)+" is not iterable");if(o(g)){for(m=0,w=i(v);w>m;m++)if((b=A(v[m]))&&u(d,b))return b;return new l(!1)}y=a(v,g)}for(S=I?v.next:y.next;!(E=r(S,y)).done;){try{b=A(E.value)}catch(t){f(y,"throw",t)}if("object"==typeof b&&b&&u(d,b))return b}return new l(!1)}}function ma(){if(aa)return ua;aa=1;var t=fr()("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 ua=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 wa(){if(fa)return ca;fa=1;var t=$u(),r=ma(),e=Uu().CONSTRUCTOR;return ca=e||!r(function(r){t.all(r).then(void 0,function(){})})}var ba,Sa={};var Ea,xa={};var Oa,Ia={};var ja,Ta,Pa,Ma,Aa={};function Ra(){if(Ta)return ja;Ta=1;var t=Or(),r=wt(),e=qu();return ja=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 Na(r,n){return Ao(this,arguments,void 0,function(r,n,o,i,u){var a,c,f,s,l,d,v;return void 0===o&&(o=""),void 0===i&&(i=""),void 0===u&&(u=""),Ro(this,function(p){switch(p.label){case 0:return n?(r.restoreSelection(),a=r.getMenuConfig("insertVideo"),c=a.onInsertedVideo,f=a.checkVideo,s=a.parseVideoSrc,[4,f(n,o)]):[2];case 1:return"string"==typeof(l=p.sent())?(r.alert(l,"error"),[2]):null==l?[2]:[4,s(n)];case 2:return 0!==(d=p.sent()).trim().indexOf("<iframe ")&&(d=d.replace(/</g,"<").replace(/>/g,">")),v={type:"video",src:d,poster:o,children:[{text:""}],style:{width:i,height:u}},Promise.resolve().then(function(){t.DomEditor.isSelectedEmptyParagraph(r)&&e.Transforms.removeNodes(r,{mode:"highest"}),e.Transforms.insertNodes(r,v,{mode:"highest"})}),c(v),[2]}})})}function Ca(){return wi("w-e-insert-video")}Ma||(Ma=1,function(){if(Hu)return Su;Hu=1;var t,r,e,n,o=rn(),i=er(),u=xu(),a=f(),c=Ou(),s=E(),l=Xr(),d=Tu(),v=Pu(),p=Mu(),h=Pt(),y=mt(),g=wt(),m=Au(),w=Nu(),b=Lu().set,S=Fu(),x=_u(),O=Bu(),I=zu(),j=Kr(),T=$u(),P=Uu(),M=qu(),A="Promise",R=P.CONSTRUCTOR,N=P.REJECTION_EVENT,C=P.SUBCLASSING,k=j.getterFor(A),D=j.set,L=T&&T.prototype,V=T,z=L,F=a.TypeError,_=a.document,B=a.process,$=M.f,U=$,W=!!(_&&_.createEvent&&a.dispatchEvent),H="unhandledrejection",G=function(t){var r;return!(!g(t)||!y(r=t.then))&&r},q=function(t,r){var e,n,o,i=r.value,u=1===r.state,a=u?t.ok:t.fail,c=t.resolve,f=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?f(new F("Promise-chain cycle")):(n=G(e))?s(n,e,c,f):c(e)):f(i)}catch(t){l&&!o&&l.exit(),f(t)}},K=function(t,r){t.notified||(t.notified=!0,S(function(){for(var e,n=t.reactions;e=n.get();)q(e,t);t.notified=!1,r&&!t.rejection&&X(t)}))},Y=function(t,r,e){var n,o;W?((n=_.createEvent("Event")).promise=r,n.reason=e,n.initEvent(t,!1,!0),a.dispatchEvent(n)):n={promise:r,reason:e},!N&&(o=a["on"+t])?o(n):t===H&&x("Unhandled promise rejection",e)},X=function(t){s(b,a,function(){var r,e=t.facade,n=t.value;if(J(t)&&(r=O(function(){u?B.emit("unhandledRejection",n,e):Y(H,e,n)}),t.rejection=u||J(t)?2:1,r.error))throw r.value})},J=function(t){return 1!==t.rejection&&!t.parent},Q=function(t){s(b,a,function(){var r=t.facade;u?B.emit("rejectionHandled",r):Y("rejectionhandled",r,t.value)})},Z=function(t,r,e){return function(n){t(r,n,e)}},tt=function(t,r,e){t.done||(t.done=!0,e&&(t=e),t.value=r,t.state=2,K(t,!0))},rt=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw new F("Promise can't be resolved itself");var n=G(r);n?S(function(){var e={done:!1};try{s(n,r,Z(rt,e,t),Z(tt,e,t))}catch(r){tt(e,r,t)}}):(t.value=r,t.state=1,K(t,!1))}catch(r){tt({done:!1},r,t)}}};if(R&&(z=(V=function(r){m(this,z),h(r),s(t,this);var e=k(this);try{r(Z(rt,e),Z(tt,e))}catch(t){tt(e,t)}}).prototype,(t=function(t){D(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new I,rejection:!1,state:0,value:null})}).prototype=l(z,"then",function(t,r){var e=k(this),n=$(w(this,V));return e.parent=!0,n.ok=!y(t)||t,n.fail=y(r)&&r,n.domain=u?B.domain:void 0,0===e.state?e.reactions.add(n):S(function(){q(n,e)}),n.promise}),r=function(){var r=new t,e=k(r);this.promise=r,this.resolve=Z(rt,e),this.reject=Z(tt,e)},M.f=$=function(t){return t===V||t===e?new r(t):U(t)},!i&&y(T)&&L!==Object.prototype)){n=L.then,C||l(L,"then",function(t,r){var e=this;return new V(function(t,r){s(n,e,t,r)}).then(t,r)},{unsafe:!0});try{delete L.constructor}catch(t){}d&&d(L,z)}o({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:V}),e=c.Promise,v(V,A,!1,!0),p(A)}(),function(){if(sa)return la;sa=1;var t=rn(),r=E(),e=Pt(),n=qu(),o=Bu(),i=ga();t({target:"Promise",stat:!0,forced:wa()},{all:function(t){var u=this,a=n.f(u),c=a.resolve,f=a.reject,s=o(function(){var n=e(u.resolve),o=[],a=0,s=1;i(t,function(t){var e=a++,i=!1;s++,r(n,u,t).then(function(t){i||(i=!0,o[e]=t,--s||c(o))},f)}),--s||c(o)});return s.error&&f(s.value),a.promise}})}(),function(){if(ba)return Sa;ba=1;var t=rn(),r=er(),e=Uu().CONSTRUCTOR,n=$u(),o=bt(),i=mt(),u=Xr(),a=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 c=o("Promise").prototype.catch;a.catch!==c&&u(a,"catch",c,{unsafe:!0})}}(),function(){if(Ea)return xa;Ea=1;var t=rn(),r=E(),e=Pt(),n=qu(),o=Bu(),i=ga();t({target:"Promise",stat:!0,forced:wa()},{race:function(t){var u=this,a=n.f(u),c=a.reject,f=o(function(){var n=e(u.resolve);i(t,function(t){r(n,u,t).then(a.resolve,c)})});return f.error&&c(f.value),a.promise}})}(),function(){if(Oa)return Ia;Oa=1;var t=rn(),r=qu();t({target:"Promise",stat:!0,forced:Uu().CONSTRUCTOR},{reject:function(t){var e=r.f(this);return(0,e.reject)(t),e.promise}})}(),function(){if(Pa)return Aa;Pa=1;var t=rn(),r=bt(),e=er(),n=$u(),o=Uu().CONSTRUCTOR,i=Ra(),u=r("Promise"),a=e&&!o;t({target:"Promise",stat:!0,forced:e||o},{resolve:function(t){return i(a&&this===u?n:this,t)}})}());var ka,Da,La,Va,za,Fa,_a,Ba,$a,Ua,Wa,Ha,Ga,qa,Ka,Ya=function(){function n(){this.title=t.t("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=Ca(),this.posterInputId=Ca(),this.buttonId=Ca()}return n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,r){},n.prototype.isDisabled=function(r){var n=r.selection;return null==n||(!e.Range.isCollapsed(n)||!!t.DomEditor.getSelectedElems(r).some(function(e){var n=t.DomEditor.getNodeType(e);return"pre"===n||("list-item"===n||!!r.isVoid(e))}))},n.prototype.getModalPositionNode=function(t){return null},n.prototype.getModalContentElem=function(e){var n=this,o=this,i=o.srcInputId,u=o.posterInputId,a=o.buttonId,c=Co(t.genModalInputElems(t.t("videoModule.videoSrc"),i,t.t("videoModule.videoSrcPlaceHolder")),2),f=c[0],s=c[1],l=Co(t.genModalInputElems(t.t("videoModule.videoPoster"),u,t.t("videoModule.videoPosterPlaceHolder")),2),d=l[0],v=l[1],p=r(s),h=r(v),y=Co(t.genModalButtonElems(a,t.t("videoModule.ok")),1)[0];if(null==this.$content){var g=r("<div></div>");g.on("click","#".concat(a),function(t){return Ao(n,void 0,void 0,function(){var r,n;return Ro(this,function(o){switch(o.label){case 0:return t.preventDefault(),r=g.find("#".concat(i)).val().trim(),n=g.find("#".concat(u)).val().trim(),[4,Na(e,r,n)];case 1:return o.sent(),e.hidePanelOrModal(),[2]}})})}),this.$content=g}var m=this.$content;return m.empty(),m.append(f),m.append(d),m.append(y),p.val(""),h.val(""),setTimeout(function(){p.focus()}),m[0]},n}(),Xa={};function Ja(){if(za)return Va;za=1;var t=ar(),r=mt(),e=ur(),n=Gr(),o=function(){if(La)return Da;La=1;var t=w();return Da=!t(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})}(),i=n("IE_PROTO"),u=Object,a=u.prototype;return Va=o?u.getPrototypeOf:function(n){var o=e(n);if(t(o,i))return o[i];var c=o.constructor;return r(c)&&o instanceof c?c.prototype:o instanceof u?a:null}}function Qa(){if(_a)return Fa;_a=1;var t,r,e,n=w(),o=mt(),i=wt(),u=jn(),a=Ja(),c=Xr(),f=fr(),s=er(),l=f("iterator"),d=!1;return[].keys&&("next"in(e=[].keys())?(r=a(a(e)))!==Object.prototype&&(t=r):d=!0),!i(t)||n(function(){var r={};return t[l].call(r)!==r})?t={}:s&&(t=u(t)),o(t[l])||c(t,l,function(){return this}),Fa={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:d}}function Za(){if(Wa)return Ua;Wa=1;var t=rn(),r=E(),e=er(),n=Ur(),o=mt(),i=function(){if($a)return Ba;$a=1;var t=Qa().IteratorPrototype,r=jn(),e=lt(),n=Pu(),o=da(),i=function(){return this};return Ba=function(u,a,c,f){var s=a+" Iterator";return u.prototype=r(t,{next:e(+!f,c)}),n(u,s,!1,!0),o[s]=i,u}}(),u=Ja(),a=Tu(),c=Pu(),f=jr(),s=Xr(),l=fr(),d=da(),v=Qa(),p=n.PROPER,h=n.CONFIGURABLE,y=v.IteratorPrototype,g=v.BUGGY_SAFARI_ITERATORS,m=l("iterator"),w="keys",b="values",S="entries",x=function(){return this};return Ua=function(n,l,v,E,O,I,j){i(v,l,E);var T,P,M,A=function(t){if(t===O&&D)return D;if(!g&&t&&t in C)return C[t];switch(t){case w:case b:case S:return function(){return new v(this,t)}}return function(){return new v(this)}},R=l+" Iterator",N=!1,C=n.prototype,k=C[m]||C["@@iterator"]||O&&C[O],D=!g&&k||A(O),L="Array"===l&&C.entries||k;if(L&&(T=u(L.call(new n)))!==Object.prototype&&T.next&&(e||u(T)===y||(a?a(T,y):o(T[m])||s(T,m,x)),c(T,R,!0,!0),e&&(d[R]=x)),p&&O===b&&k&&k.name!==b&&(!e&&h?f(C,"name",b):(N=!0,D=function(){return r(k,this)})),O)if(P={values:A(b),keys:I?D:A(w),entries:A(S)},j)for(M in P)(g||N||!(M in C))&&s(C,M,P[M]);else t({target:l,proto:!0,forced:g||N},P);return e&&!j||C[m]===D||s(C,m,D,{name:O}),d[l]=D,P}}function tc(){return Ga?Ha:(Ga=1,Ha=function(t,r){return{value:t,done:r}})}function rc(){if(Ka)return qa;Ka=1;var t=gt(),r=Tn(),e=da(),n=Kr(),o=Ir().f,i=Za(),u=tc(),a=er(),c=b(),f="Array Iterator",s=n.set,l=n.getterFor(f);qa=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 d=e.Arguments=e.Array;if(r("keys"),r("values"),r("entries"),!a&&c&&"values"!==d.name)try{o(d,"name",{value:"values"})}catch(t){}return qa}!function(){if(ka)return Xa;ka=1;var t=rn(),r=dt(),e=pt(),n=gt(),o=mi(),i=r([].join);t({target:"Array",proto:!0,forced:e!==Object||!o("join",",")},{join:function(t){return i(n(this),void 0===t?",":t)}})}(),rc();var ec,nc={};!function(){if(ec)return nc;ec=1;var t=rn(),r=ao().map;t({target:"Array",proto:!0,forced:!ln()("map")},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})}();var oc,ic={};!function(){if(oc)return ic;oc=1;var t=rn(),r=en(),e=cn(),n=wt(),o=ye(),i=me(),u=gt(),a=on(),c=fr(),f=ln(),s=Cu(),l=f("slice"),d=c("species"),v=Array,p=Math.max;t({target:"Array",proto:!0,forced:!l},{slice:function(t,c){var f,l,h,y=u(this),g=i(y),m=o(t,g),w=o(void 0===c?g:c,g);if(r(y)&&(f=y.constructor,(e(f)&&(f===v||r(f.prototype))||n(f)&&null===(f=f[d]))&&(f=void 0),f===v||void 0===f))return s(y,m,w);for(l=new(void 0===f?v:f)(p(w-m,0)),h=0;m<w;m++,h++)m in y&&a(l,h,y[m]);return l.length=h,l}})}();var uc,ac={};!function(){if(uc)return ac;uc=1;var t=ri().charAt,r=zn(),e=Kr(),n=Za(),o=tc(),i="String Iterator",u=e.set,a=e.getterFor(i);n(String,"String",function(t){u(this,{type:i,string:r(t),index:0})},function(){var r,e=a(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 cc,fc,sc,lc,dc={};function vc(){if(fc)return cc;fc=1;var t=w();return cc=!t(function(){return Object.isExtensible(Object.preventExtensions({}))})}function pc(){if(lc)return sc;lc=1;var t=Xr();return sc=function(r,e,n){for(var o in e)t(r,o,e[o],n);return r}}var hc,yc,gc,mc,wc,bc,Sc,Ec,xc,Oc,Ic,jc,Tc,Pc,Mc={exports:{}},Ac={};function Rc(){if(hc)return Ac;hc=1;var t=vt(),r=gt(),e=Ee().f,n=Cu(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Ac.f=function(i){return o&&"Window"===t(i)?function(t){try{return e(t)}catch(t){return n(o)}}(i):e(r(i))},Ac}function Nc(){if(wc)return mc;wc=1;var t=w(),r=wt(),e=vt(),n=function(){if(gc)return yc;gc=1;var t=w();return yc=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 mc=i||n?function(t){return!!r(t)&&((!n||"ArrayBuffer"!==e(t))&&(!o||o(t)))}:o}function Cc(){if(bc)return Mc.exports;bc=1;var t=rn(),r=dt(),e=qr(),n=wt(),o=ar(),i=Ir().f,u=Ee(),a=Rc(),c=Nc(),f=cr(),s=vc(),l=!1,d=f("meta"),v=0,p=function(t){i(t,d,{value:{objectID:"O"+v++,weakData:{}}})},h=Mc.exports={enable:function(){h.enable=function(){},l=!0;var e=u.f,n=r([].splice),o={};o[d]=1,e(o).length&&(u.f=function(t){for(var r=e(t),o=0,i=r.length;o<i;o++)if(r[o]===d){n(r,o,1);break}return r},t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},fastKey:function(t,r){if(!n(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,d)){if(!c(t))return"F";if(!r)return"E";p(t)}return t[d].objectID},getWeakData:function(t,r){if(!o(t,d)){if(!c(t))return!0;if(!r)return!1;p(t)}return t[d].weakData},onFreeze:function(t){return s&&l&&c(t)&&!o(t,d)&&p(t),t}};return e[d]=!0,Mc.exports}function kc(){if(Ec)return Sc;Ec=1;var t=mt(),r=wt(),e=Tu();return Sc=function(n,o,i){var u,a;return e&&t(u=o.constructor)&&u!==i&&r(a=u.prototype)&&a!==i.prototype&&e(n,a),n}}function Dc(){if(Oc)return xc;Oc=1;var t=rn(),r=f(),e=dt(),n=tn(),o=Xr(),i=Cc(),u=ga(),a=Au(),c=mt(),s=ht(),l=wt(),d=w(),v=ma(),p=Pu(),h=kc();return xc=function(f,y,g){var m=-1!==f.indexOf("Map"),w=-1!==f.indexOf("Weak"),b=m?"set":"add",S=r[f],E=S&&S.prototype,x=S,O={},I=function(t){var r=e(E[t]);o(E,t,"add"===t?function(t){return r(this,0===t?0:t),this}:"delete"===t?function(t){return!(w&&!l(t))&&r(this,0===t?0:t)}:"get"===t?function(t){return w&&!l(t)?void 0:r(this,0===t?0:t)}:"has"===t?function(t){return!(w&&!l(t))&&r(this,0===t?0:t)}:function(t,e){return r(this,0===t?0:t,e),this})};if(n(f,!c(S)||!(w||E.forEach&&!d(function(){(new S).entries().next()}))))x=g.getConstructor(y,f,m,b),i.enable();else if(n(f,!0)){var j=new x,T=j[b](w?{}:-0,1)!==j,P=d(function(){j.has(1)}),M=v(function(t){new S(t)}),A=!w&&d(function(){for(var t=new S,r=5;r--;)t[b](r,r);return!t.has(-0)});M||((x=y(function(t,r){a(t,E);var e=h(new S,t,x);return s(r)||u(r,e[b],{that:e,AS_ENTRIES:m}),e})).prototype=E,E.constructor=x),(P||A)&&(I("delete"),I("has"),m&&I("get")),(A||T)&&I(b),w&&E.clear&&delete E.clear}return O[f]=x,t({global:!0,constructor:!0,forced:x!==S},O),p(x,f),w||g.setStrong(x,f,m),x}}function Lc(){if(jc)return Ic;jc=1;var t=dt(),r=pc(),e=Cc().getWeakData,n=Au(),o=Or(),i=ht(),u=wt(),a=ga(),c=ao(),f=ar(),s=Kr(),l=s.set,d=s.getterFor,v=c.find,p=c.findIndex,h=t([].splice),y=0,g=function(t){return t.frozen||(t.frozen=new m)},m=function(){this.entries=[]},w=function(t,r){return v(t.entries,function(t){return t[0]===r})};return m.prototype={get:function(t){var r=w(this,t);if(r)return r[1]},has:function(t){return!!w(this,t)},set:function(t,r){var e=w(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}},Ic={getConstructor:function(t,c,s,v){var p=t(function(t,r){n(t,h),l(t,{type:c,id:y++,frozen:null}),i(r)||a(r,t[v],{that:t,AS_ENTRIES:s})}),h=p.prototype,m=d(c),w=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 w(this,t,r)}}:{add:function(t){return w(this,t,!0)}}),p}}}Pc||(Pc=1,function(){if(Tc)return dc;Tc=1;var t,r=vc(),e=f(),n=dt(),o=pc(),i=Cc(),u=Dc(),a=Lc(),c=wt(),s=Kr().enforce,l=w(),d=Hr(),v=Object,p=Array.isArray,h=v.isExtensible,y=v.isFrozen,g=v.isSealed,m=v.freeze,b=v.seal,S=!e.ActiveXObject&&"ActiveXObject"in e,E=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},x=u("WeakMap",E,a),O=x.prototype,I=n(O.set);if(d)if(S){t=a.getConstructor(E,"WeakMap",!0),i.enable();var j=n(O.delete),T=n(O.has),P=n(O.get);o(O,{delete:function(r){if(c(r)&&!h(r)){var e=s(this);return e.frozen||(e.frozen=new t),j(this,r)||e.frozen.delete(r)}return j(this,r)},has:function(r){if(c(r)&&!h(r)){var e=s(this);return e.frozen||(e.frozen=new t),T(this,r)||e.frozen.has(r)}return T(this,r)},get:function(r){if(c(r)&&!h(r)){var e=s(this);return e.frozen||(e.frozen=new t),T(this,r)?P(this,r):e.frozen.get(r)}return P(this,r)},set:function(r,e){if(c(r)&&!h(r)){var n=s(this);n.frozen||(n.frozen=new t),T(this,r)?I(this,r,e):n.frozen.set(r,e)}else I(this,r,e);return this}})}else r&&l(function(){var t=m([]);return I(new x,t,1),!y(t)})&&o(O,{set:function(t,r){var e;return p(t)&&(y(t)?e=m:g(t)&&(e=b)),I(this,t,r),e&&e(t),this}})}());var Vc,zc={};function Fc(t){return t.getMenuConfig("uploadVideo")}!function(){if(Vc)return zc;Vc=1;var t=f(),r=yi(),e=gi(),n=rc(),o=jr(),i=Pu(),u=fr()("iterator"),a=n.values,c=function(t,e){if(t){if(t[u]!==a)try{o(t,u,a)}catch(r){t[u]=a}if(i(t,e,!0),r[e])for(var c in n)if(t[c]!==n[c])try{o(t,c,n[c])}catch(r){t[c]=n[c]}}};for(var s in r)c(t[s]&&t[s].prototype,s);c(e,"DOMTokenList")}();var _c=new WeakMap;function Bc(r,e){return Ao(this,void 0,void 0,function(){var n,o;return Ro(this,function(i){switch(i.label){case 0:return n=function(r){var e=_c.get(r);if(null!=e)return e;var n=Fc(r),o=n.onSuccess,i=n.onProgress,u=n.onFailed,a=n.customInsert,c=n.onError;return e=t.createUploader(Mo(Mo({},n),{onProgress:function(t){r.showProgressBar(t),i&&i(t)},onSuccess:function(t,e){if(a)return a(e,function(t,e){return Na(r,t,e)}),void o(t,e);var n=e.errno,i=void 0===n?1:n,c=e.data,f=void 0===c?{}:c;if(0===i){var s=f.url,l=void 0===s?"":s,d=f.poster;Na(r,l,void 0===d?"":d),o(t,e)}else u(t,e)},onError:function(t,r,e){c(t,r,e)}}),r),_c.set(r,e),e}(r),o=e.map(function(t){return{name:t.name,type:t.type,size:t.size,data:t}}),n.addFiles(o),[4,n.upload()];case 1:return i.sent(),[2]}})})}var $c,Uc=function(){function n(){this.title=t.t("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 n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){var n=this.getMenuConfig(t),o=n.allowedFileTypes,i=void 0===o?[]:o,u=n.customBrowseAndUpload;if(u)u(function(r,e){return Na(t,r,e)});else{var a="";i.length>0&&(a='accept="'.concat(i.join(", "),'"'));var c=r("body"),f=r('<input type="file" '.concat(a," multiple/>"));f.hide(),c.append(f),f.click(),f.on("change",function(){var r=f[0].files;!function(t,r){Ao(this,void 0,void 0,function(){var e,n,o,i,u,a,c,f,s,l,d,v;return Ro(this,function(p){switch(p.label){case 0:if(null==r)return[2];e=Array.prototype.slice.call(r),n=[],o=Fc(t).customUpload,p.label=1;case 1:p.trys.push([1,8,9,14]),i=!0,u=ko(e),p.label=2;case 2:return[4,u.next()];case 3:return a=p.sent(),(s=a.done)?[3,7]:(v=a.value,i=!1,c=v,o?[4,o(c,function(r,e){return Na(t,r,e)},t)]:[3,5]);case 4:return p.sent(),[3,6];case 5:n.push(c),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||!(d=u.return)?[3,11]:[4,d.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,Bc(t,n)]:[3,16];case 15:p.sent(),p.label=16;case 16:return[2]}})})}(t,r)})}},n.prototype.isDisabled=function(r){var n=r.selection;return null==n||(!e.Range.isCollapsed(n)||!!t.DomEditor.getSelectedElems(r).some(function(e){var n=t.DomEditor.getNodeType(e);return"pre"===n||("list-item"===n||!!r.isVoid(e))}))},n.prototype.getMenuConfig=function(t){return t.getMenuConfig("uploadVideo")},n}(),Wc={key:"insertVideo",factory:function(){return new Ya},config:{onInsertedVideo:function(t){},checkVideo:function(t,r){return!0},parseVideoSrc:function(t){return t}}},Hc={key:"uploadVideo",factory:function(){return new Uc},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)}}},Gc={key:"editVideoSize",factory:function(){return new Ei}},qc={key:"editVideoSrc",factory:function(){return new bu}},Kc={};!function(){if($c)return Kc;$c=1;var t=rn(),r=ao().filter;t({target:"Array",proto:!0,forced:!ln()("filter")},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})}();var Yc,Xc={};!function(){if(Yc)return Xc;Yc=1;var t=E(),r=dt(),e=ti(),n=Or(),o=wt(),i=yt(),u=Nu(),a=ei(),c=ge(),f=zn(),s=Mt(),l=ii(),d=jo(),v=w(),p=d.UNSUPPORTED_Y,h=Math.min,y=r([].push),g=r("".slice),m=!v(function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var e="ab".split(t);return 2!==e.length||"a"!==e[0]||"b"!==e[1]}),b="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;e("split",function(r,e,d){var v="0".split(void 0,0).length?function(r,n){return void 0===r&&0===n?[]:t(e,this,r,n)}:e;return[function(e,n){var u=i(this),a=o(e)?s(e,r):void 0;return a?t(a,e,u,n):t(v,f(u),e,n)},function(t,r){var o=n(this),i=f(t);if(!b){var s=d(v,o,i,r,v!==e);if(s.done)return s.value}var m=u(o,RegExp),w=o.unicode,S=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(p?"g":"y"),E=new m(p?"^(?:"+o.source+")":o,S),x=void 0===r?4294967295:r>>>0;if(0===x)return[];if(0===i.length)return null===l(E,i)?[i]:[];for(var O=0,I=0,j=[];I<i.length;){E.lastIndex=p?0:I;var T,P=l(E,p?g(i,I):i);if(null===P||(T=h(c(E.lastIndex+(p?I:0)),i.length))===O)I=a(i,I,w);else{if(y(j,g(i,O,I)),j.length===x)return j;for(var M=1;M<=P.length-1;M++)if(y(j,P[M]),j.length===x)return j;I=O=T}}return y(j,g(i,O)),j}]},b||!m,p)}();var Jc,Qc,Zc,tf,rf,ef,nf,of={};function uf(){if(tf)return Zc;tf=1;var t=function(){if(Qc)return Jc;Qc=1;var t=wt(),r=vt(),e=fr()("match");return Jc=function(n){var o;return t(n)&&(void 0!==(o=n[e])?!!o:"RegExp"===r(n))}}(),r=TypeError;return Zc=function(e){if(t(e))throw new r("The method doesn't accept regular expressions");return e}}function af(t,r,e,n,o,i){return void 0===r&&(r=""),void 0===e&&(e="auto"),void 0===n&&(n="auto"),void 0===o&&(o={}),void 0===i&&(i="center"),{type:"video",src:t,poster:r,width:e,height:n,style:o,children:[{text:""}],textAlign:i}}function cf(t){var r=bi(t.attr("style")||"")["text-align"];if(r)return r;var e=(t.attr("data-w-e-text-align")||"").trim();if(e)return e;for(var n=(t.attr("class")||"").trim().split(/\s+/).filter(Boolean),o=0;o<n.length;o+=1){var i=n[o];if(i.startsWith("w-e-video-align-")){var u=i.replace("w-e-video-align-","");if(u)return u}}return"center"}!function(){if(nf)return of;nf=1;var t,r=rn(),e=io(),n=pr().f,o=ge(),i=zn(),u=uf(),a=yt(),c=function(){if(ef)return rf;ef=1;var t=fr()("match");return rf=function(r){var e=/./;try{"/./"[r](e)}catch(n){try{return e[t]=!1,"/./"[r](e)}catch(t){}}return!1}}(),f=er(),s=e("".slice),l=Math.min,d=c("startsWith");r({target:"String",proto:!0,forced:!!(f||d||(t=n(String.prototype,"startsWith"),!t||t.writable))&&!d},{startsWith:function(t){var r=i(a(this));u(t);var e=o(l(arguments.length>1?arguments[1]:void 0,r.length)),n=i(t);return s(r,e,e+n.length)===n}})}();var ff={renderElems:[{type:"video",renderElem:function(r,e,n){var i,u=r,a=u.src,c=void 0===a?"":a,f=u.poster,s=void 0===f?"":f,l=u.key,d=void 0===l?"":l,v=u.width,p=void 0===v?"auto":v,h=u.height,y=void 0===h?"auto":h,g=u.style,m=void 0===g?{}:g,w=u.textAlign,b=void 0===w?"center":w,S=t.DomEditor.isNodeSelected(n,r);if(0===c.trim().indexOf("<iframe ")){var E=Wn(c,p,y,m);i=o.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:b},innerHTML:E})}else{var x=o.jsx("video",{key:d,poster:s,controls:!0,style:m},o.jsx("source",{src:c,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==p&&(x.data.width=p),"auto"!==y&&(x.data.height=y),i=o.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:b}},x)}return o.h("div",{props:{contentEditable:!1},on:{mousedown:function(t){return t.preventDefault()}}},i)}}],elemsToHtml:[Kn],preParseHtml:[{selector:"iframe,video,p",preParseHtml:function(t){var e=r(t),n=e;if("p"===Un(e)){var o=e.children();if(1===o.length){var i=o[0],u=i.tagName.toLowerCase();["iframe","video"].includes(u)&&(n=r(i))}}var a=Un(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var c=r('<div data-w-e-type="video" data-w-e-is-void class="w-e-video-align-center" data-w-e-text-align="center"></div>');return c.append(n),c[0]}}],parseElemsHtml:[{selector:'div[data-w-e-type="video"]',parseElemHtml:function(t,e,n){var o=r(t),i="",u="",a="auto",c="auto",f={},s=o.find("iframe");if(s.length>0){a=s.attr("width")||"auto",c=s.attr("height")||"auto",f=bi(s.attr("style")||"");var l=s.attr("data-w-e-style-width")||"",d=s.attr("data-w-e-style-height")||"";return!f.width&&l&&(f.width=l),!f.height&&d&&(f.height=d),af(i=s[0].outerHTML,u,a,c,f,cf(o))}var v=o.find("video");(i=v.attr("src")||"")||v.length>0&&(i=v.find("source").attr("src")||""),a=v.attr("width")||"auto",c=v.attr("height")||"auto",u=v.attr("poster")||"",f=bi(v.attr("style")||"");var p=v.attr("data-w-e-style-width")||"",h=v.attr("data-w-e-style-height")||"";return!f.width&&p&&(f.width=p),!f.height&&h&&(f.height=h),af(i,u,a,c,f,cf(o))}}],menus:[Wc,Hc,Gc,qc],editorPlugin:function(r){var n=r.isVoid,o=r.normalizeNode,i=r;return i.isVoid=function(t){return"video"===t.type||n(t)},i.normalizeNode=function(r){var n=Co(r,2),u=n[0],a=n[1];"video"===t.DomEditor.getNodeType(u)&&(t.DomEditor.isLastNode(i,u)&&e.Transforms.insertNodes(i,t.DomEditor.genEmptyParagraph(),{at:[a[0]+1]}));return o([u,a])},i}};return ff});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@wangeditor-next/core"),require("dom7"),require("slate"),require("nanoid"),require("@wangeditor-next/core/upload"),require("snabbdom")):"function"==typeof define&&define.amd?define(["@wangeditor-next/core","dom7","slate","nanoid","@wangeditor-next/core/upload","snabbdom"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).WangEditorVideoModule=t(e.core,e.$,e.slate,e.nanoid,e.upload,e.snabbdom)}(this,function(e,t,o,n,r,i){"use strict";function a(e){return e.length?e[0].tagName.toLowerCase():""}function d(e,o,n,r,i){void 0===o&&(o="auto"),void 0===n&&(n="auto"),void 0===r&&(r={}),void 0===i&&(i=!1);var a=t(e),d=r.width,c=void 0===d?"":d,u=r.height,s=void 0===u?"":u,l=c?'data-w-e-style-width="'.concat(c,'"'):"",v=s?'data-w-e-style-height="'.concat(s,'"'):"";if(a.attr("width",o),a.attr("height",n),i)l&&a.attr("data-w-e-style-width",c),v&&a.attr("data-w-e-style-height",s),a.removeAttr("style");else{var f="";c&&(f+="width: ".concat(c,";")),s&&(f+="height: ".concat(s,";")),a.attr("style",f)}return a[0].outerHTML}e.i18nAddResources("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"}}),e.i18nAddResources("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}}),t.append&&(t.fn.append=t.append),t.on&&(t.fn.on=t.on),t.focus&&(t.fn.focus=t.focus),t.attr&&(t.fn.attr=t.attr),t.val&&(t.fn.val=t.val),t.html&&(t.fn.html=t.html),t.parent&&(t.fn.parent=t.parent),t.hasClass&&(t.fn.hasClass=t.hasClass),t.empty&&(t.fn.empty=t.empty);var c={type:"video",elemToHtml:function(t,o,n){var r=t,i=r.src,a=void 0===i?"":i,c=r.poster,u=void 0===c?"":c,s=r.width,l=void 0===s?"auto":s,v=r.height,f=void 0===v?"auto":v,p=r.style,h=void 0===p?{}:p,y=r.textAlign,g=void 0===y?"center":y,m=e.getTextStyleMode(n),w=g||"center",b=' data-w-e-text-align="'.concat(w,'"'),M="class"===m?' class="'.concat(function(e){var t=e.trim().toLowerCase();return t&&["left","center","right","justify"].includes(t)?"w-e-video-align-".concat(t):"w-e-video-align-center"}(w),'"').concat(b):' style="text-align: '.concat(w,';"'),S='<div data-w-e-type="video" data-w-e-is-void'.concat(M,">\n");if(0===a.trim().indexOf("<iframe ")){S+=d(a,l,f,h,"class"===m)}else{var x=h.width,I=void 0===x?"":x,E=h.height,V=void 0===E?"":E;if("class"===m){var P=I?' data-w-e-style-width="'.concat(I,'"'):"",N=V?' data-w-e-style-height="'.concat(V,'"'):"";S+='<video poster="'.concat(u,'" controls="true" width="').concat(l,'" height="').concat(f,'"').concat(P).concat(N,'><source src="').concat(a,'" type="video/mp4"/></video>')}else{var T="";I&&(T+="width: ".concat(I,";")),V&&(T+="height: ".concat(V,";")),S+='<video poster="'.concat(u,'" controls="true" width="').concat(l,'" height="').concat(f,'" style="').concat(T,'"><source src="').concat(a,'" type="video/mp4"/></video>')}}return S+="\n</div>"}};var u=function(){return u=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},u.apply(this,arguments)};function s(e,t,o,n){return new(o||(o=Promise))(function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function d(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(a,d)}c((n=n.apply(e,t||[])).next())})}function l(e,t){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=d(0),a.throw=d(1),a.return=d(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(d){return function(c){return function(d){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&d[0]?n.return:d[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,d[1])).done)return r;switch(n=0,r&&(d=[2&d[0],r.value]),d[0]){case 0:case 1:r=d;break;case 4:return i.label++,{value:d[1],done:!1};case 5:i.label++,n=d[1],d=[0];continue;case 7:d=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==d[0]&&2!==d[0])){i=0;continue}if(3===d[0]&&(!r||d[1]>r[0]&&d[1]<r[3])){i.label=d[1];break}if(6===d[0]&&i.label<r[1]){i.label=r[1],r=d;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(d);break}r[2]&&i.ops.pop(),i.trys.pop();continue}d=t.call(e,i)}catch(e){d=[6,e],n=0}finally{o=r=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([d,c])}}}function v(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],n=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a}function p(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,o=e[Symbol.asyncIterator];return o?o.call(e):(e=v(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=e[o]&&function(t){return new Promise(function(n,r){(function(e,t,o,n){Promise.resolve(n).then(function(t){e({value:t,done:o})},t)})(n,r,(t=e[o](t)).done,t.value)})}}}function h(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(n.nanoid())}function y(e){var t={};return e.trim().split(";").forEach(function(e){if(e){var o=f(e.split(":"),2),n=o[0],r=o[1];n&&r&&(t[n.trim()]=r.trim())}}),t}function g(){return h("w-e-insert-video")}"function"==typeof SuppressedError&&SuppressedError;var m=function(){function n(){this.title=e.t("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=g(),this.heightInputId=g(),this.buttonId=g()}return n.prototype.getSelectedVideoNode=function(t){return e.DomEditor.getSelectedNodeByType(t,"video")},n.prototype.getValue=function(e){return""},n.prototype.isActive=function(e){return!1},n.prototype.exec=function(e,t){},n.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},n.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},n.prototype.getModalContentElem=function(n){var r=this,i=r.widthInputId,a=r.heightInputId,d=r.buttonId,c=f(e.genModalInputElems(e.t("videoModule.width"),i,"auto"),2),s=c[0],l=c[1],v=t(l),p=f(e.genModalInputElems(e.t("videoModule.height"),a,"auto"),2),h=p[0],y=p[1],g=t(y),m=f(e.genModalButtonElems(d,e.t("videoModule.ok")),1)[0],w=this.getSelectedVideoNode(n);if(null==this.$content){var b=t("<div></div>");b.on("click","#".concat(d),function(t){t.preventDefault();var r=b.find("#".concat(i)).val().trim(),d=b.find("#".concat(a)).val().trim(),c=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},l="auto",v="auto";c(r)?l=r:s(r)&&(l="".concat(parseInt(r,10),"px")),c(d)?v=d:s(d)&&(v="".concat(parseInt(d,10),"px"));var f=w.style,p=void 0===f?{}:f;n.restoreSelection();var h={style:u(u({},p),{width:l,height:v})};o.Transforms.setNodes(n,h,{match:function(t){return e.DomEditor.checkNodeType(t,"video")}}),n.hidePanelOrModal()}),this.$content=b}var M=this.$content;if(M.empty(),M.append(s),M.append(h),M.append(m),null==w)return M[0];var S=w.style,x=void 0===S?{}:S,I=x.width,E=void 0===I?"":I,V=x.height,P=void 0===V?"":V;return v.val(E),g.val(P),setTimeout(function(){v.focus()}),M[0]},n}();function w(){return h("w-e-edit-video")}var b=function(){function n(){this.title=e.t("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=w(),this.posterInputId=w(),this.buttonId=w()}return n.prototype.getSelectedVideoNode=function(t){return e.DomEditor.getSelectedNodeByType(t,"video")},n.prototype.getValue=function(e){return""},n.prototype.isActive=function(e){return!1},n.prototype.exec=function(e,t){},n.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},n.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},n.prototype.getModalContentElem=function(n){var r=this,i=this,a=i.srcInputId,d=i.posterInputId,c=i.buttonId,u=f(e.genModalInputElems(e.t("videoModule.videoSrc"),a,e.t("videoModule.videoSrcPlaceHolder")),2),v=u[0],p=u[1],y=f(e.genModalInputElems(e.t("videoModule.videoPoster"),d,e.t("videoModule.videoPosterPlaceHolder")),2),g=y[0],m=y[1],w=t(p),b=t(m),M=f(e.genModalButtonElems(c,e.t("videoModule.ok")),1)[0];if(null==this.$content){var S=t("<div></div>");S.on("click","#".concat(c),function(t){return s(r,void 0,void 0,function(){var r,i,c,u;return l(this,function(s){return t.preventDefault(),r=S.find("#".concat(a)).val().trim(),i=S.find("#".concat(d)).val().trim(),c=h("video-"),u={src:r,poster:i,key:c},n.restoreSelection(),o.Transforms.setNodes(n,u,{match:function(t){return e.DomEditor.checkNodeType(t,"video")}}),n.hidePanelOrModal(),[2]})})}),this.$content=S}var x=this.$content;x.empty(),x.append(v),x.append(g),x.append(M);var I=this.getSelectedVideoNode(n);if(null==I)return x[0];var E=I.src,V=void 0===E?"":E,P=I.poster,N=void 0===P?"":P;return w.val(V),b.val(N),setTimeout(function(){w.focus()}),x[0]},n}();function M(t,n){return s(this,arguments,void 0,function(t,n,r,i,a){var d,c,u,s,v,f,p;return void 0===r&&(r=""),void 0===i&&(i=""),void 0===a&&(a=""),l(this,function(l){switch(l.label){case 0:return n?(t.restoreSelection(),d=t.getMenuConfig("insertVideo"),c=d.onInsertedVideo,u=d.checkVideo,s=d.parseVideoSrc,[4,u(n,r)]):[2];case 1:return"string"==typeof(v=l.sent())?(t.alert(v,"error"),[2]):null==v?[2]:[4,s(n)];case 2:return 0!==(f=l.sent()).trim().indexOf("<iframe ")&&(f=f.replace(/</g,"<").replace(/>/g,">")),p={type:"video",src:f,poster:r,children:[{text:""}],style:{width:i,height:a}},Promise.resolve().then(function(){e.DomEditor.isSelectedEmptyParagraph(t)&&o.Transforms.removeNodes(t,{mode:"highest"}),o.Transforms.insertNodes(t,p,{mode:"highest"})}),c(p),[2]}})})}function S(){return h("w-e-insert-video")}var x=function(){function n(){this.title=e.t("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=S(),this.posterInputId=S(),this.buttonId=S()}return n.prototype.getValue=function(e){return""},n.prototype.isActive=function(e){return!1},n.prototype.exec=function(e,t){},n.prototype.isDisabled=function(t){var n=t.selection;return null==n||(!o.Range.isCollapsed(n)||!!e.DomEditor.getSelectedElems(t).some(function(o){var n=e.DomEditor.getNodeType(o);return"pre"===n||("list-item"===n||!!t.isVoid(o))}))},n.prototype.getModalPositionNode=function(e){return null},n.prototype.getModalContentElem=function(o){var n=this,r=this,i=r.srcInputId,a=r.posterInputId,d=r.buttonId,c=f(e.genModalInputElems(e.t("videoModule.videoSrc"),i,e.t("videoModule.videoSrcPlaceHolder")),2),u=c[0],v=c[1],p=f(e.genModalInputElems(e.t("videoModule.videoPoster"),a,e.t("videoModule.videoPosterPlaceHolder")),2),h=p[0],y=p[1],g=t(v),m=t(y),w=f(e.genModalButtonElems(d,e.t("videoModule.ok")),1)[0];if(null==this.$content){var b=t("<div></div>");b.on("click","#".concat(d),function(e){return s(n,void 0,void 0,function(){var t,n;return l(this,function(r){switch(r.label){case 0:return e.preventDefault(),t=b.find("#".concat(i)).val().trim(),n=b.find("#".concat(a)).val().trim(),[4,M(o,t,n)];case 1:return r.sent(),o.hidePanelOrModal(),[2]}})})}),this.$content=b}var S=this.$content;return S.empty(),S.append(u),S.append(h),S.append(w),g.val(""),m.val(""),setTimeout(function(){g.focus()}),S[0]},n}();function I(e){return e.getMenuConfig("uploadVideo")}var E=new WeakMap;function V(e,t){return s(this,void 0,void 0,function(){var o,n;return l(this,function(i){switch(i.label){case 0:return o=function(e){var t=E.get(e);if(null!=t)return t;var o=I(e),n=o.onSuccess,i=o.onProgress,a=o.onFailed,d=o.customInsert,c=o.onError;return t=r.createUploader(u(u({},o),{onProgress:function(t){e.showProgressBar(t),i&&i(t)},onSuccess:function(t,o){if(d)return d(o,function(t,o){return M(e,t,o)}),void n(t,o);var r=o.errno,i=void 0===r?1:r,c=o.data,u=void 0===c?{}:c;if(0===i){var s=u.url,l=void 0===s?"":s,v=u.poster;M(e,l,void 0===v?"":v),n(t,o)}else a(t,o)},onError:function(e,t,o){c(e,t,o)}}),e),E.set(e,t),t}(e),n=t.map(function(e){return{name:e.name,type:e.type,size:e.size,data:e}}),o.addFiles(n),[4,o.upload()];case 1:return i.sent(),[2]}})})}var P=function(){function n(){this.title=e.t("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 n.prototype.getValue=function(e){return""},n.prototype.isActive=function(e){return!1},n.prototype.exec=function(e,o){var n=this.getMenuConfig(e),r=n.allowedFileTypes,i=void 0===r?[]:r,a=n.customBrowseAndUpload;if(a)a(function(t,o){return M(e,t,o)});else{var d="";i.length>0&&(d='accept="'.concat(i.join(", "),'"'));var c=t("body"),u=t('<input type="file" '.concat(d," multiple/>"));u.hide(),c.append(u),u.click(),u.on("change",function(){var t=u[0].files;!function(e,t){s(this,void 0,void 0,function(){var o,n,r,i,a,d,c,u,s,v,f,h;return l(this,function(l){switch(l.label){case 0:if(null==t)return[2];o=Array.prototype.slice.call(t),n=[],r=I(e).customUpload,l.label=1;case 1:l.trys.push([1,8,9,14]),i=!0,a=p(o),l.label=2;case 2:return[4,a.next()];case 3:return d=l.sent(),(s=d.done)?[3,7]:(h=d.value,i=!1,c=h,r?[4,r(c,function(t,o){return M(e,t,o)},e)]:[3,5]);case 4:return l.sent(),[3,6];case 5:n.push(c),l.label=6;case 6:return i=!0,[3,2];case 7:return[3,14];case 8:return u=l.sent(),v={error:u},[3,14];case 9:return l.trys.push([9,,12,13]),i||s||!(f=a.return)?[3,11]:[4,f.call(a)];case 10:l.sent(),l.label=11;case 11:return[3,13];case 12:if(v)throw v.error;return[7];case 13:return[7];case 14:return n.length>0?[4,V(e,n)]:[3,16];case 15:l.sent(),l.label=16;case 16:return[2]}})})}(e,t)})}},n.prototype.isDisabled=function(t){var n=t.selection;return null==n||(!o.Range.isCollapsed(n)||!!e.DomEditor.getSelectedElems(t).some(function(o){var n=e.DomEditor.getNodeType(o);return"pre"===n||("list-item"===n||!!t.isVoid(o))}))},n.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadVideo")},n}();function N(e,t,o,n,r,i){return void 0===t&&(t=""),void 0===o&&(o="auto"),void 0===n&&(n="auto"),void 0===r&&(r={}),void 0===i&&(i="center"),{type:"video",src:e,poster:t,width:o,height:n,style:r,children:[{text:""}],textAlign:i}}function T(e){var t=y(e.attr("style")||"")["text-align"];if(t)return t;var o=(e.attr("data-w-e-text-align")||"").trim();if(o)return o;for(var n=(e.attr("class")||"").trim().split(/\s+/).filter(Boolean),r=0;r<n.length;r+=1){var i=n[r];if(i.startsWith("w-e-video-align-")){var a=i.replace("w-e-video-align-","");if(a)return a}}return"center"}return{renderElems:[{type:"video",renderElem:function(t,o,n){var r,a=t,c=a.src,u=void 0===c?"":c,s=a.poster,l=void 0===s?"":s,v=a.key,f=void 0===v?"":v,p=a.width,h=void 0===p?"auto":p,y=a.height,g=void 0===y?"auto":y,m=a.style,w=void 0===m?{}:m,b=a.textAlign,M=void 0===b?"center":b,S=e.DomEditor.isNodeSelected(n,t);if(0===u.trim().indexOf("<iframe ")){var x=d(u,h,g,w);r=i.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:M},innerHTML:x})}else{var I=i.jsx("video",{key:f,poster:l,controls:!0,style:w},i.jsx("source",{src:u,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==h&&(I.data.width=h),"auto"!==g&&(I.data.height=g),r=i.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:M}},I)}return i.h("div",{props:{contentEditable:!1},on:{mousedown:function(e){return e.preventDefault()}}},r)}}],elemsToHtml:[c],preParseHtml:[{selector:"iframe,video,p",preParseHtml:function(e){var o=t(e),n=o;if("p"===a(o)){var r=o.children();if(1===r.length){var i=r[0],d=i.tagName.toLowerCase();["iframe","video"].includes(d)&&(n=t(i))}}var c=a(n);if("iframe"!==c&&"video"!==c)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var u=t('<div data-w-e-type="video" data-w-e-is-void class="w-e-video-align-center" data-w-e-text-align="center"></div>');return u.append(n),u[0]}}],parseElemsHtml:[{selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,o,n){var r=t(e),i="",a="",d="auto",c="auto",u={},s=r.find("iframe");if(s.length>0){d=s.attr("width")||"auto",c=s.attr("height")||"auto",u=y(s.attr("style")||"");var l=s.attr("data-w-e-style-width")||"",v=s.attr("data-w-e-style-height")||"";return!u.width&&l&&(u.width=l),!u.height&&v&&(u.height=v),N(i=s[0].outerHTML,a,d,c,u,T(r))}var f=r.find("video");(i=f.attr("src")||"")||f.length>0&&(i=f.find("source").attr("src")||""),d=f.attr("width")||"auto",c=f.attr("height")||"auto",a=f.attr("poster")||"",u=y(f.attr("style")||"");var p=f.attr("data-w-e-style-width")||"",h=f.attr("data-w-e-style-height")||"";return!u.width&&p&&(u.width=p),!u.height&&h&&(u.height=h),N(i,a,d,c,u,T(r))}}],menus:[{key:"insertVideo",factory:function(){return new x},config:{onInsertedVideo:function(e){},checkVideo:function(e,t){return!0},parseVideoSrc:function(e){return e}}},{key:"uploadVideo",factory:function(){return new P},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,o){console.error("'".concat(e.name," upload error"),t,o)}}},{key:"editVideoSize",factory:function(){return new m}},{key:"editVideoSrc",factory:function(){return new b}}],editorPlugin:function(t){var n=t.isVoid,r=t.normalizeNode,i=t;return i.isVoid=function(e){return"video"===e.type||n(e)},i.normalizeNode=function(t){var n=f(t,2),a=n[0],d=n[1];"video"===e.DomEditor.getNodeType(a)&&(e.DomEditor.isLastNode(i,a)&&o.Transforms.insertNodes(i,e.DomEditor.genEmptyParagraph(),{at:[d[0]+1]}));return r([a,d])},i}}});
|
|
2
2
|
//# sourceMappingURL=index.js.map
|