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