@wangeditor-next/list-module 1.1.9 → 1.1.11
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 +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/list-module/src/module/custom-types.d.ts +1 -1
- package/dist/list-module/src/module/menu/BaseMenu.d.ts +2 -2
- package/dist/list-module/src/module/parse-elem-html.d.ts +2 -2
- package/dist/list-module/src/module/render-elem.d.ts +1 -1
- package/dist/list-module/src/utils/dom.d.ts +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@wangeditor-next/core"),require("slate"),require("snabbdom"),require("dom7")):"function"==typeof define&&define.amd?define(["@wangeditor-next/core","slate","snabbdom","dom7"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorListModule=e(t.core,t.slate,t.snabbdom,t.$)}(this,(function(t,e,r,n){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=o(n);t.i18nAddResources("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),t.i18nAddResources("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var u=function(t){try{return!!t()}catch(t){return!0}},a=!u((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),c=Function.prototype,f=c.call,l=a&&c.bind.bind(f,f),s=a?l:function(t){return function(){return f.apply(t,arguments)}},d=s({}.toString),p=s("".slice),v=function(t){return p(d(t),8,-1)},y=Object,h=s("".split),g=u((function(){return!y("z").propertyIsEnumerable(0)}))?function(t){return"String"===v(t)?h(t,""):y(t)}:y,b=function(t){return null==t},m=TypeError,w=function(t){if(b(t))throw new m("Can't call method on "+t);return t},x=function(t){return g(w(t))},O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function S(t){var e={exports:{}};return t(e,e.exports),e.exports}var E,T,j=function(t){return t&&t.Math===Math&&t},A=j("object"==typeof globalThis&&globalThis)||j("object"==typeof window&&window)||j("object"==typeof self&&self)||j("object"==typeof O&&O)||j("object"==typeof O&&O)||function(){return this}()||Function("return this")(),P=Object.defineProperty,I=function(t,e){try{P(A,t,{value:e,configurable:!0,writable:!0})}catch(r){A[t]=e}return e},R=S((function(t){var e="__core-js_shared__",r=t.exports=A[e]||I(e,{});(r.versions||(r.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"})})),L=function(t,e){return R[t]||(R[t]=e||{})},k=Object,N=function(t){return k(w(t))},M=s({}.hasOwnProperty),z=Object.hasOwn||function(t,e){return M(N(t),e)},_=0,D=Math.random(),C=s(1..toString),F=function(t){return"Symbol("+(void 0===t?"":t)+")_"+C(++_+D,36)},B=A.navigator,H=B&&B.userAgent,$=H?String(H):"",G=A.process,V=A.Deno,W=G&&G.versions||V&&V.version,U=W&&W.v8;U&&(T=(E=U.split("."))[0]>0&&E[0]<4?1:+(E[0]+E[1])),!T&&$&&(!(E=$.match(/Edge\/(\d+)/))||E[1]>=74)&&(E=$.match(/Chrome\/(\d+)/))&&(T=+E[1]);var q,K=T,Y=A.String,X=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol("symbol detection");return!Y(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&K&&K<41})),J=X&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Q=A.Symbol,Z=L("wks"),tt=J?Q.for||Q:Q&&Q.withoutSetter||F,et=function(t){return z(Z,t)||(Z[t]=X&&z(Q,t)?Q[t]:tt("Symbol."+t)),Z[t]},rt="object"==typeof document&&document.all,nt=void 0===rt&&void 0!==rt?function(t){return"function"==typeof t||t===rt}:function(t){return"function"==typeof t},ot=function(t){return"object"==typeof t?null!==t:nt(t)},it=String,ut=TypeError,at=function(t){if(ot(t))return t;throw new ut(it(t)+" is not an object")},ct=!u((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ft=ct&&u((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),lt=A.document,st=ot(lt)&&ot(lt.createElement),dt=function(t){return st?lt.createElement(t):{}},pt=!ct&&!u((function(){return 7!==Object.defineProperty(dt("div"),"a",{get:function(){return 7}}).a})),vt=Function.prototype.call,yt=a?vt.bind(vt):function(){return vt.apply(vt,arguments)},ht=function(t,e){return arguments.length<2?(r=A[t],nt(r)?r:void 0):A[t]&&A[t][e];var r},gt=s({}.isPrototypeOf),bt=Object,mt=J?function(t){return"symbol"==typeof t}:function(t){var e=ht("Symbol");return nt(e)&>(e.prototype,bt(t))},wt=String,xt=function(t){try{return wt(t)}catch(t){return"Object"}},Ot=TypeError,St=function(t){if(nt(t))return t;throw new Ot(xt(t)+" is not a function")},Et=function(t,e){var r=t[e];return b(r)?void 0:St(r)},Tt=TypeError,jt=TypeError,At=et("toPrimitive"),Pt=function(t,e){if(!ot(t)||mt(t))return t;var r,n=Et(t,At);if(n){if(void 0===e&&(e="default"),r=yt(n,t,e),!ot(r)||mt(r))return r;throw new jt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&nt(r=t.toString)&&!ot(n=yt(r,t)))return n;if(nt(r=t.valueOf)&&!ot(n=yt(r,t)))return n;if("string"!==e&&nt(r=t.toString)&&!ot(n=yt(r,t)))return n;throw new Tt("Can't convert object to primitive value")}(t,e)},It=function(t){var e=Pt(t,"string");return mt(e)?e:e+""},Rt=TypeError,Lt=Object.defineProperty,kt=Object.getOwnPropertyDescriptor,Nt="enumerable",Mt="configurable",zt="writable",_t={f:ct?ft?function(t,e,r){if(at(t),e=It(e),at(r),"function"==typeof t&&"prototype"===e&&"value"in r&&zt in r&&!r[zt]){var n=kt(t,e);n&&n[zt]&&(t[e]=r.value,r={configurable:Mt in r?r[Mt]:n[Mt],enumerable:Nt in r?r[Nt]:n[Nt],writable:!1})}return Lt(t,e,r)}:Lt:function(t,e,r){if(at(t),e=It(e),at(r),pt)try{return Lt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new Rt("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},Dt=Math.ceil,Ct=Math.floor,Ft=Math.trunc||function(t){var e=+t;return(e>0?Ct:Dt)(e)},Bt=function(t){var e=+t;return e!=e||0===e?0:Ft(e)},Ht=Math.max,$t=Math.min,Gt=Math.min,Vt=function(t){var e=Bt(t);return e>0?Gt(e,9007199254740991):0},Wt=function(t){return Vt(t.length)},Ut=function(t){return function(e,r,n){var o=x(e),i=Wt(o);if(0===i)return!t&&-1;var u,a=function(t,e){var r=Bt(t);return r<0?Ht(r+e,0):$t(r,e)}(n,i);if(t&&r!=r){for(;i>a;)if((u=o[a++])!=u)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},qt={includes:Ut(!0),indexOf:Ut(!1)},Kt={},Yt=qt.indexOf,Xt=s([].push),Jt=function(t,e){var r,n=x(t),o=0,i=[];for(r in n)!z(Kt,r)&&z(n,r)&&Xt(i,r);for(;e.length>o;)z(n,r=e[o++])&&(~Yt(i,r)||Xt(i,r));return i},Qt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Zt=Object.keys||function(t){return Jt(t,Qt)},te=ct&&!ft?Object.defineProperties:function(t,e){at(t);for(var r,n=x(e),o=Zt(e),i=o.length,u=0;i>u;)_t.f(t,r=o[u++],n[r]);return t},ee={f:te},re=ht("document","documentElement"),ne=L("keys"),oe=function(t){return ne[t]||(ne[t]=F(t))},ie="prototype",ue="script",ae=oe("IE_PROTO"),ce=function(){},fe=function(t){return"<"+ue+">"+t+"</"+ue+">"},le=function(t){t.write(fe("")),t.close();var e=t.parentWindow.Object;return t=null,e},se=function(){try{q=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;se="undefined"!=typeof document?document.domain&&q?le(q):(e=dt("iframe"),r="java"+ue+":",e.style.display="none",re.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(fe("document.F=Object")),t.close(),t.F):le(q);for(var n=Qt.length;n--;)delete se[ie][Qt[n]];return se()};Kt[ae]=!0;var de=Object.create||function(t,e){var r;return null!==t?(ce[ie]=at(t),r=new ce,ce[ie]=null,r[ae]=t):r=se(),void 0===e?r:ee.f(r,e)},pe=_t.f,ve=et("unscopables"),ye=Array.prototype;void 0===ye[ve]&&pe(ye,ve,{configurable:!0,value:de(null)});var he,ge,be,me=function(t){ye[ve][t]=!0},we={},xe=A.WeakMap,Oe=nt(xe)&&/native code/.test(String(xe)),Se=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Ee=ct?function(t,e,r){return _t.f(t,e,Se(1,r))}:function(t,e,r){return t[e]=r,t},Te="Object already initialized",je=A.TypeError,Ae=A.WeakMap;if(Oe||R.state){var Pe=R.state||(R.state=new Ae);Pe.get=Pe.get,Pe.has=Pe.has,Pe.set=Pe.set,he=function(t,e){if(Pe.has(t))throw new je(Te);return e.facade=t,Pe.set(t,e),e},ge=function(t){return Pe.get(t)||{}},be=function(t){return Pe.has(t)}}else{var Ie=oe("state");Kt[Ie]=!0,he=function(t,e){if(z(t,Ie))throw new je(Te);return e.facade=t,Ee(t,Ie,e),e},ge=function(t){return z(t,Ie)?t[Ie]:{}},be=function(t){return z(t,Ie)}}var Re={set:he,get:ge,has:be,enforce:function(t){return be(t)?ge(t):he(t,{})},getterFor:function(t){return function(e){var r;if(!ot(e)||(r=ge(e)).type!==t)throw new je("Incompatible receiver, "+t+" required");return r}}},Le={}.propertyIsEnumerable,ke=Object.getOwnPropertyDescriptor,Ne={f:ke&&!Le.call({1:2},1)?function(t){var e=ke(this,t);return!!e&&e.enumerable}:Le},Me=Object.getOwnPropertyDescriptor,ze={f:ct?Me:function(t,e){if(t=x(t),e=It(e),pt)try{return Me(t,e)}catch(t){}if(z(t,e))return Se(!yt(Ne.f,t,e),t[e])}},_e=Function.prototype,De=ct&&Object.getOwnPropertyDescriptor,Ce=z(_e,"name"),Fe={EXISTS:Ce,PROPER:Ce&&"something"===function(){}.name,CONFIGURABLE:Ce&&(!ct||ct&&De(_e,"name").configurable)},Be=s(Function.toString);nt(R.inspectSource)||(R.inspectSource=function(t){return Be(t)});var He,$e,Ge,Ve=R.inspectSource,We=S((function(t){var e=Fe.CONFIGURABLE,r=Re.enforce,n=Re.get,o=String,i=Object.defineProperty,a=s("".slice),c=s("".replace),f=s([].join),l=ct&&!u((function(){return 8!==i((function(){}),"length",{value:8}).length})),d=String(String).split("String"),p=t.exports=function(t,n,u){"Symbol("===a(o(n),0,7)&&(n="["+c(o(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),u&&u.getter&&(n="get "+n),u&&u.setter&&(n="set "+n),(!z(t,"name")||e&&t.name!==n)&&(ct?i(t,"name",{value:n,configurable:!0}):t.name=n),l&&u&&z(u,"arity")&&t.length!==u.arity&&i(t,"length",{value:u.arity});try{u&&z(u,"constructor")&&u.constructor?ct&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var s=r(t);return z(s,"source")||(s.source=f(d,"string"==typeof n?n:"")),t};Function.prototype.toString=p((function(){return nt(this)&&n(this).source||Ve(this)}),"toString")})),Ue=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(nt(r)&&We(r,i,n),n.global)o?t[e]=r:I(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:_t.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},qe=Qt.concat("length","prototype"),Ke={f:Object.getOwnPropertyNames||function(t){return Jt(t,qe)}},Ye={f:Object.getOwnPropertySymbols},Xe=s([].concat),Je=ht("Reflect","ownKeys")||function(t){var e=Ke.f(at(t)),r=Ye.f;return r?Xe(e,r(t)):e},Qe=function(t,e,r){for(var n=Je(e),o=_t.f,i=ze.f,u=0;u<n.length;u++){var a=n[u];z(t,a)||r&&z(r,a)||o(t,a,i(e,a))}},Ze=/#|\.prototype\./,tr=function(t,e){var r=rr[er(t)];return r===or||r!==nr&&(nt(e)?u(e):!!e)},er=tr.normalize=function(t){return String(t).replace(Ze,".").toLowerCase()},rr=tr.data={},nr=tr.NATIVE="N",or=tr.POLYFILL="P",ir=tr,ur=ze.f,ar=function(t,e){var r,n,o,i,u,a=t.target,c=t.global,f=t.stat;if(r=c?A:f?A[a]||I(a,{}):A[a]&&A[a].prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(u=ur(r,n))&&u.value:r[n],!ir(c?n:a+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Qe(i,o)}(t.sham||o&&o.sham)&&Ee(i,"sham",!0),Ue(r,n,i,t)}},cr=!u((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),fr=oe("IE_PROTO"),lr=Object,sr=lr.prototype,dr=cr?lr.getPrototypeOf:function(t){var e=N(t);if(z(e,fr))return e[fr];var r=e.constructor;return nt(r)&&e instanceof r?r.prototype:e instanceof lr?sr:null},pr=et("iterator"),vr=!1;[].keys&&("next"in(Ge=[].keys())?($e=dr(dr(Ge)))!==Object.prototype&&(He=$e):vr=!0);var yr=!ot(He)||u((function(){var t={};return He[pr].call(t)!==t}));yr&&(He={}),nt(He[pr])||Ue(He,pr,(function(){return this}));var hr={IteratorPrototype:He,BUGGY_SAFARI_ITERATORS:vr},gr=_t.f,br=et("toStringTag"),mr=function(t,e,r){t&&!r&&(t=t.prototype),t&&!z(t,br)&&gr(t,br,{configurable:!0,value:e})},wr=hr.IteratorPrototype,xr=function(){return this},Or=String,Sr=TypeError,Er=function(t){if(function(t){return ot(t)||null===t}(t))return t;throw new Sr("Can't set "+Or(t)+" as a prototype")},Tr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=function(t,e,r){try{return s(St(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return w(r),Er(n),ot(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),jr=Fe.PROPER,Ar=Fe.CONFIGURABLE,Pr=hr.IteratorPrototype,Ir=hr.BUGGY_SAFARI_ITERATORS,Rr=et("iterator"),Lr="keys",kr="values",Nr="entries",Mr=function(){return this},zr=function(t,e,r,n,o,i,u){!function(t,e,r,n){var o=e+" Iterator";t.prototype=de(wr,{next:Se(+!n,r)}),mr(t,o,!1),we[o]=xr}(r,e,n);var a,c,f,l=function(t){if(t===o&&y)return y;if(!Ir&&t&&t in p)return p[t];switch(t){case Lr:case kr:case Nr:return function(){return new r(this,t)}}return function(){return new r(this)}},s=e+" Iterator",d=!1,p=t.prototype,v=p[Rr]||p["@@iterator"]||o&&p[o],y=!Ir&&v||l(o),h="Array"===e&&p.entries||v;if(h&&(a=dr(h.call(new t)))!==Object.prototype&&a.next&&(dr(a)!==Pr&&(Tr?Tr(a,Pr):nt(a[Rr])||Ue(a,Rr,Mr)),mr(a,s,!0)),jr&&o===kr&&v&&v.name!==kr&&(Ar?Ee(p,"name",kr):(d=!0,y=function(){return yt(v,this)})),o)if(c={values:l(kr),keys:i?y:l(Lr),entries:l(Nr)},u)for(f in c)(Ir||d||!(f in p))&&Ue(p,f,c[f]);else ar({target:e,proto:!0,forced:Ir||d},c);return p[Rr]!==y&&Ue(p,Rr,y,{name:o}),we[e]=y,c},_r=function(t,e){return{value:t,done:e}},Dr=_t.f,Cr="Array Iterator",Fr=Re.set,Br=Re.getterFor(Cr),Hr=zr(Array,"Array",(function(t,e){Fr(this,{type:Cr,target:x(t),index:0,kind:e})}),(function(){var t=Br(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,_r(void 0,!0);switch(t.kind){case"keys":return _r(r,!1);case"values":return _r(e[r],!1)}return _r([r,e[r]],!1)}),"values"),$r=we.Arguments=we.Array;if(me("keys"),me("values"),me("entries"),ct&&"values"!==$r.name)try{Dr($r,"name",{value:"values"})}catch(t){}var Gr={};Gr[et("toStringTag")]="z";var Vr="[object z]"===String(Gr),Wr=et("toStringTag"),Ur=Object,qr="Arguments"===v(function(){return arguments}()),Kr=Vr?v:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Ur(t),Wr))?r:qr?v(e):"Object"===(n=v(e))&&nt(e.callee)?"Arguments":n},Yr=Vr?{}.toString:function(){return"[object "+Kr(this)+"]"};Vr||Ue(Object.prototype,"toString",Yr,{unsafe:!0});var Xr=String,Jr=function(t){if("Symbol"===Kr(t))throw new TypeError("Cannot convert a Symbol value to a string");return Xr(t)},Qr=s("".charAt),Zr=s("".charCodeAt),tn=s("".slice),en=function(t){return function(e,r){var n,o,i=Jr(w(e)),u=Bt(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=Zr(i,u))<55296||n>56319||u+1===a||(o=Zr(i,u+1))<56320||o>57343?t?Qr(i,u):n:t?tn(i,u,u+2):o-56320+(n-55296<<10)+65536}},rn={codeAt:en(!1),charAt:en(!0)},nn=rn.charAt,on="String Iterator",un=Re.set,an=Re.getterFor(on);zr(String,"String",(function(t){un(this,{type:on,string:Jr(t),index:0})}),(function(){var t,e=an(this),r=e.string,n=e.index;return n>=r.length?_r(void 0,!0):(t=nn(r,n),e.index+=t.length,_r(t,!1))}));var cn=!u((function(){return Object.isExtensible(Object.preventExtensions({}))})),fn=function(t,e,r){for(var n in e)Ue(t,n,e[n],r);return t},ln=s([].slice),sn=Ke.f,dn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],pn={f:function(t){return dn&&"Window"===v(t)?function(t){try{return sn(t)}catch(t){return ln(dn)}}(t):sn(x(t))}},vn=u((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),yn=Object.isExtensible,hn=u((function(){yn(1)}))||vn?function(t){return!!ot(t)&&((!vn||"ArrayBuffer"!==v(t))&&(!yn||yn(t)))}:yn,gn=S((function(t){var e=_t.f,r=!1,n=F("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},r=!0;var t=Ke.f,e=s([].splice),o={};o[n]=1,t(o).length&&(Ke.f=function(r){for(var o=t(r),i=0,u=o.length;i<u;i++)if(o[i]===n){e(o,i,1);break}return o},ar({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:pn.f}))},fastKey:function(t,e){if(!ot(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!z(t,n)){if(!hn(t))return"F";if(!e)return"E";i(t)}return t[n].objectID},getWeakData:function(t,e){if(!z(t,n)){if(!hn(t))return!0;if(!e)return!1;i(t)}return t[n].weakData},onFreeze:function(t){return cn&&r&&hn(t)&&!z(t,n)&&i(t),t}};Kt[n]=!0})),bn=function(t){if("Function"===v(t))return s(t)},mn=bn(bn.bind),wn=function(t,e){return St(t),void 0===e?t:a?mn(t,e):function(){return t.apply(e,arguments)}},xn=et("iterator"),On=Array.prototype,Sn=et("iterator"),En=function(t){if(!b(t))return Et(t,Sn)||Et(t,"@@iterator")||we[Kr(t)]},Tn=TypeError,jn=function(t,e,r){var n,o;at(t);try{if(!(n=Et(t,"return"))){if("throw"===e)throw r;return r}n=yt(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return at(n),r},An=TypeError,Pn=function(t,e){this.stopped=t,this.result=e},In=Pn.prototype,Rn=function(t,e,r){var n,o,i,u,a,c,f,l,s=r&&r.that,d=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),v=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),h=wn(e,s),g=function(t){return n&&jn(n,"normal",t),new Pn(!0,t)},b=function(t){return d?(at(t),y?h(t[0],t[1],g):h(t[0],t[1])):y?h(t,g):h(t)};if(p)n=t.iterator;else if(v)n=t;else{if(!(o=En(t)))throw new An(xt(t)+" is not iterable");if(void 0!==(l=o)&&(we.Array===l||On[xn]===l)){for(i=0,u=Wt(t);u>i;i++)if((a=b(t[i]))&>(In,a))return a;return new Pn(!1)}n=function(t,e){var r=arguments.length<2?En(t):e;if(St(r))return at(yt(r,t));throw new Tn(xt(t)+" is not iterable")}(t,o)}for(c=p?t.next:n.next;!(f=yt(c,n)).done;){try{a=b(f.value)}catch(t){jn(n,"throw",t)}if("object"==typeof a&&a&>(In,a))return a}return new Pn(!1)},Ln=TypeError,kn=function(t,e){if(gt(e,t))return t;throw new Ln("Incorrect invocation")},Nn=et("iterator"),Mn=!1;try{var zn=0,_n={next:function(){return{done:!!zn++}},return:function(){Mn=!0}};_n[Nn]=function(){return this},Array.from(_n,(function(){throw 2}))}catch(t){}var Dn=Array.isArray||function(t){return"Array"===v(t)},Cn=function(){},Fn=ht("Reflect","construct"),Bn=/^\s*(?:class|function)\b/,Hn=s(Bn.exec),$n=!Bn.test(Cn),Gn=function(t){if(!nt(t))return!1;try{return Fn(Cn,[],t),!0}catch(t){return!1}},Vn=function(t){if(!nt(t))return!1;switch(Kr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $n||!!Hn(Bn,Ve(t))}catch(t){return!0}};Vn.sham=!0;var Wn=!Fn||u((function(){var t;return Gn(Gn.call)||!Gn(Object)||!Gn((function(){t=!0}))||t}))?Vn:Gn,Un=et("species"),qn=Array,Kn=function(t,e){return new(function(t){var e;return Dn(t)&&(e=t.constructor,(Wn(e)&&(e===qn||Dn(e.prototype))||ot(e)&&null===(e=e[Un]))&&(e=void 0)),void 0===e?qn:e}(t))(0===e?0:e)},Yn=s([].push),Xn=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,u=7===t,a=5===t||i;return function(c,f,l,s){for(var d,p,v=N(c),y=g(v),h=Wt(y),b=wn(f,l),m=0,w=s||Kn,x=e?w(c,h):r||u?w(c,0):void 0;h>m;m++)if((a||m in y)&&(p=b(d=y[m],m,v),t))if(e)x[m]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return m;case 2:Yn(x,d)}else switch(t){case 4:return!1;case 7:Yn(x,d)}return i?-1:n||o?o:x}},Jn={forEach:Xn(0),map:Xn(1),filter:Xn(2),some:Xn(3),every:Xn(4),find:Xn(5),findIndex:Xn(6),filterReject:Xn(7)},Qn=gn.getWeakData,Zn=Re.set,to=Re.getterFor,eo=Jn.find,ro=Jn.findIndex,no=s([].splice),oo=0,io=function(t){return t.frozen||(t.frozen=new uo)},uo=function(){this.entries=[]},ao=function(t,e){return eo(t.entries,(function(t){return t[0]===e}))};uo.prototype={get:function(t){var e=ao(this,t);if(e)return e[1]},has:function(t){return!!ao(this,t)},set:function(t,e){var r=ao(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=ro(this.entries,(function(e){return e[0]===t}));return~e&&no(this.entries,e,1),!!~e}};var co,fo={getConstructor:function(t,e,r,n){var o=t((function(t,o){kn(t,i),Zn(t,{type:e,id:oo++,frozen:null}),b(o)||Rn(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,u=to(e),a=function(t,e,r){var n=u(t),o=Qn(at(e),!0);return!0===o?io(n).set(e,r):o[n.id]=r,t};return fn(i,{delete:function(t){var e=u(this);if(!ot(t))return!1;var r=Qn(t);return!0===r?io(e).delete(t):r&&z(r,e.id)&&delete r[e.id]},has:function(t){var e=u(this);if(!ot(t))return!1;var r=Qn(t);return!0===r?io(e).has(t):r&&z(r,e.id)}}),fn(i,r?{get:function(t){var e=u(this);if(ot(t)){var r=Qn(t);if(!0===r)return io(e).get(t);if(r)return r[e.id]}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},lo=Re.enforce,so=Object,po=Array.isArray,vo=so.isExtensible,yo=so.isFrozen,ho=so.isSealed,go=so.freeze,bo=so.seal,mo=!A.ActiveXObject&&"ActiveXObject"in A,wo=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},xo=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",a=A[t],c=a&&a.prototype,f=a,l={},d=function(t){var e=s(c[t]);Ue(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,r){return e(this,0===t?0:t,r),this})};if(ir(t,!nt(a)||!(o||c.forEach&&!u((function(){(new a).entries().next()})))))f=r.getConstructor(e,t,n,i),gn.enable();else if(ir(t,!0)){var p=new f,v=p[i](o?{}:-0,1)!==p,y=u((function(){p.has(1)})),h=function(t,e){try{if(!e&&!Mn)return!1}catch(t){return!1}var r=!1;try{var n={};n[Nn]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){new a(t)})),g=!o&&u((function(){for(var t=new a,e=5;e--;)t[i](e,e);return!t.has(-0)}));h||((f=e((function(t,e){kn(t,c);var r=function(t,e,r){var n,o;return Tr&&nt(n=e.constructor)&&n!==r&&ot(o=n.prototype)&&o!==r.prototype&&Tr(t,o),t}(new a,t,f);return b(e)||Rn(e,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=c,c.constructor=f),(y||g)&&(d("delete"),d("has"),n&&d("get")),(g||v)&&d(i),o&&c.clear&&delete c.clear}return l[t]=f,ar({global:!0,constructor:!0,forced:f!==a},l),mr(f,t),o||r.setStrong(f,t,n),f}("WeakMap",wo,fo),Oo=xo.prototype,So=s(Oo.set);if(Oe)if(mo){co=fo.getConstructor(wo,"WeakMap",!0),gn.enable();var Eo=s(Oo.delete),To=s(Oo.has),jo=s(Oo.get);fn(Oo,{delete:function(t){if(ot(t)&&!vo(t)){var e=lo(this);return e.frozen||(e.frozen=new co),Eo(this,t)||e.frozen.delete(t)}return Eo(this,t)},has:function(t){if(ot(t)&&!vo(t)){var e=lo(this);return e.frozen||(e.frozen=new co),To(this,t)||e.frozen.has(t)}return To(this,t)},get:function(t){if(ot(t)&&!vo(t)){var e=lo(this);return e.frozen||(e.frozen=new co),To(this,t)?jo(this,t):e.frozen.get(t)}return jo(this,t)},set:function(t,e){if(ot(t)&&!vo(t)){var r=lo(this);r.frozen||(r.frozen=new co),To(this,t)?So(this,t,e):r.frozen.set(t,e)}else So(this,t,e);return this}})}else cn&&u((function(){var t=go([]);return So(new xo,t,1),!yo(t)}))&&fn(Oo,{set:function(t,e){var r;return po(t)&&(yo(t)?r=go:ho(t)&&(r=bo)),So(this,t,e),r&&r(t),this}});var Ao={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},Po=dt("span").classList,Io=Po&&Po.constructor&&Po.constructor.prototype,Ro=Io===Object.prototype?void 0:Io,Lo=et("iterator"),ko=Hr.values,No=function(t,e){if(t){if(t[Lo]!==ko)try{Ee(t,Lo,ko)}catch(e){t[Lo]=ko}if(mr(t,e,!0),Ao[e])for(var r in Hr)if(t[r]!==Hr[r])try{Ee(t,r,Hr[r])}catch(e){t[r]=Hr[r]}}};for(var Mo in Ao)No(A[Mo]&&A[Mo].prototype,Mo);No(Ro,"DOMTokenList");var zo=new WeakMap;function _o(t){var r,n=t.children||[],o=n.length;if(0===o)return"";for(var i=0;i<o&&!r;i++){var u=n[i];e.Text.isText(u)&&(r=u)}return null==r?"":r.color||""}var Do={type:"list-item",renderElem:function(n,o,i){zo.set(n,i);var u=n,a=u.level,c=void 0===a?0:a,f=u.ordered,l={margin:"5px 0 5px "+20*c+"px"},s="";if(void 0!==f&&f){var d=function(r,n){var o=n,i=o.type,u=o.level,a=void 0===u?0:u,c=o.ordered,f=void 0!==c&&c,l=1,s=n,d=t.DomEditor.findPath(r,s);if(0===d[0])return 1;for(;d[0]>0;){var p=e.Path.previous(d),v=e.Editor.node(r,p);if(null==v)break;var y=v[0],h=y.level,g=void 0===h?0:h,b=y.type,m=y.ordered;if(b!==i)break;if(g<a)break;if(g===a){if(m!==f)break;l++}s=y,d=p}return l}(i,n);s=d+"."}else s=function(t){void 0===t&&(t=0);var e="";switch(t){case 0:e="•";break;case 1:e="◦";break;default:e="▪"}return e}(c);var p=_o(n);return r.jsx("div",{style:l},r.jsx("span",{contentEditable:!1,style:{marginRight:"0.5em",color:p},"data-w-e-reserve":!0},s),r.jsx("span",null,o))}},Co=function(t,e){return Co=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Co(t,e)};function Fo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Co(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Bo(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ho(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function $o(r,n,o){for(var i=n.type,u=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(n,["type"]),a=void 0!==o?o:u.level||0,c=t.DomEditor.findPath(r,n),f=c;;){if(0===f.length||0===c[c.length-1])return null;f=e.Path.previous(f);var l=e.Editor.node(r,f);if(!l)return null;var s=Ho(l,1)[0],d=s.level,p=void 0===d?0:d;if(t.DomEditor.getNodeType(s)!==i)return null;if(p===a)return s}}function Go(t,e,r){var n=$o(t,e,r);return!!n&&n.ordered===e.ordered}function Vo(r){return e.Editor.nodes(r,{at:r.selection||void 0,match:function(e){return 1===t.DomEditor.findPath(r,e).length}})}"function"==typeof SuppressedError&&SuppressedError;var Wo=qt.includes,Uo=u((function(){return!Array(1).includes()}));ar({target:"Array",proto:!0,forced:Uo},{includes:function(t){return Wo(this,t,arguments.length>1?arguments[1]:void 0)}}),me("includes");var qo,Ko,Yo=function(){var t=at(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},Xo=A.RegExp,Jo=u((function(){var t=Xo("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),Qo=Jo||u((function(){return!Xo("a","y").sticky})),Zo={BROKEN_CARET:Jo||u((function(){var t=Xo("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:Qo,UNSUPPORTED_Y:Jo},ti=A.RegExp,ei=u((function(){var t=ti(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),ri=A.RegExp,ni=u((function(){var t=ri("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),oi=Re.get,ii=L("native-string-replace",String.prototype.replace),ui=RegExp.prototype.exec,ai=ui,ci=s("".charAt),fi=s("".indexOf),li=s("".replace),si=s("".slice),di=(Ko=/b*/g,yt(ui,qo=/a/,"a"),yt(ui,Ko,"a"),0!==qo.lastIndex||0!==Ko.lastIndex),pi=Zo.BROKEN_CARET,vi=void 0!==/()??/.exec("")[1];(di||vi||pi||ei||ni)&&(ai=function(t){var e,r,n,o,i,u,a,c=this,f=oi(c),l=Jr(t),s=f.raw;if(s)return s.lastIndex=c.lastIndex,e=yt(ai,s,l),c.lastIndex=s.lastIndex,e;var d=f.groups,p=pi&&c.sticky,v=yt(Yo,c),y=c.source,h=0,g=l;if(p&&(v=li(v,"y",""),-1===fi(v,"g")&&(v+="g"),g=si(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==ci(l,c.lastIndex-1))&&(y="(?: "+y+")",g=" "+g,h++),r=new RegExp("^(?:"+y+")",v)),vi&&(r=new RegExp("^"+y+"$(?!\\s)",v)),di&&(n=c.lastIndex),o=yt(ui,p?r:c,g),p?o?(o.input=si(o.input,h),o[0]=si(o[0],h),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:di&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),vi&&o&&o.length>1&&yt(ii,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=u=de(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var yi=ai;ar({target:"RegExp",proto:!0,forced:/./.exec!==yi},{exec:yi});var hi=function(){function r(){this.type="list-item",this.tag="button"}return r.prototype.getListNode=function(e){var r=this.type;return t.DomEditor.getSelectedNodeByType(e,r)},r.prototype.getValue=function(t){return""},r.prototype.isActive=function(t){var e=this.getListNode(t);if(null==e)return!1;var r=e.ordered;return(void 0!==r&&r)===this.ordered},r.prototype.isDisabled=function(r){return null==r.selection||!!t.DomEditor.getSelectedElems(r).some((function(t){if(e.Editor.isVoid(r,t)&&e.Editor.isBlock(r,t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)||void 0}))},r.prototype.exec=function(t,r){this.isActive(t)?e.Transforms.setNodes(t,{type:"paragraph",ordered:void 0,level:void 0}):e.Transforms.setNodes(t,{type:"list-item",ordered:this.ordered,indent:void 0})},r}(),gi=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.ordered=!1,r.title=t.t("listModule.unOrderedList"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',r}return Fo(r,e),r}(hi),bi=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.ordered=!0,r.title=t.t("listModule.orderedList"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',r}return Fo(r,e),r}(hi),mi={key:"bulletedList",factory:function(){return new gi}},wi={key:"numberedList",factory:function(){return new bi}};var xi=[];var Oi,Si={type:"list-item",elemToHtml:function(r,n){var o="",i="",u=r.ordered,a=void 0!==u&&u?"ol":"ul",c=function(r){var n=zo.get(r);if(null==n)return 0;var o=r,i=o.type,u=o.ordered,a=void 0!==u&&u,c=o.level,f=void 0===c?0:c,l=t.DomEditor.findPath(n,r);if(0===l[0])return f+1;var s=e.Path.previous(l),d=e.Editor.node(n,s);if(!d)return 0;var p=Ho(d,1)[0];if(t.DomEditor.getNodeType(p)!==i)return f+1;var v=p,y=v.ordered,h=void 0!==y&&y,g=v.level,b=void 0===g?0:g;return b<f?f-b:b>f?Go(n,r)?0:1:b===f?h===a?0:1:0}(r);if(c>0)for(var f=0;f<c;f++)o+="<"+a+">",xi.push(a);var l=function(r){var n=zo.get(r);if(null==n)return 0;var o=r,i=o.type,u=o.ordered,a=void 0!==u&&u,c=o.level,f=void 0===c?0:c,l=t.DomEditor.findPath(n,r);if(l[0]===n.children.length-1)return f+1;var s=e.Path.next(l),d=e.Editor.node(n,s);if(!d)return 0;var p=Ho(d,1)[0];if(t.DomEditor.getNodeType(p)!==i)return f+1;var v=p,y=v.ordered,h=void 0!==y&&y,g=v.level,b=void 0===g?0:g;return b<f?Go(n,p)?f-b:f-b+1:b>f?0:b===f?h===a?0:1:0}(r);if(l>0)for(f=0;f<l;f++){i+="</"+xi.pop()+">"}var s=_o(r);return{html:"<li"+(s?' style="color:'+s+'"':"")+">"+n+"</li>",prefix:o,suffix:i}}},Ei=et("species"),Ti=Jn.filter,ji=(Oi="filter",K>=51||!u((function(){var t=[];return(t.constructor={})[Ei]=function(){return{foo:1}},1!==t[Oi](Boolean).foo})));ar({target:"Array",proto:!0,forced:!ji},{filter:function(t){return Ti(this,t,arguments.length>1?arguments[1]:void 0)}});var Ai=TypeError,Pi=function(t){if(t>9007199254740991)throw Ai("Maximum allowed index exceeded");return t},Ii=function(t,e,r,n,o,i,u,a){for(var c,f,l=o,s=0,d=!!u&&wn(u,a);s<n;)s in r&&(c=d?d(r[s],s,e):r[s],i>0&&Dn(c)?(f=Wt(c),l=Ii(t,e,c,f,l,i-1)-1):(Pi(l+1),t[l]=c),l++),s++;return l},Ri=Ii;ar({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=N(this),r=Wt(e),n=Kn(e,0);return n.length=Ri(n,e,e,r,0,void 0===t?1:Bt(t)),n}}),me("flat");var Li=Function.prototype,ki=Li.apply,Ni=Li.call,Mi="object"==typeof Reflect&&Reflect.apply||(a?Ni.bind(ki):function(){return Ni.apply(ki,arguments)}),zi=et("species"),_i=RegExp.prototype,Di=rn.charAt,Ci=function(t,e,r){return e+(r?Di(t,e).length:1)},Fi=Math.floor,Bi=s("".charAt),Hi=s("".replace),$i=s("".slice),Gi=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Vi=/\$([$&'`]|\d{1,2})/g,Wi=function(t,e,r,n,o,i){var u=r+t.length,a=n.length,c=Vi;return void 0!==o&&(o=N(o),c=Gi),Hi(i,c,(function(i,c){var f;switch(Bi(c,0)){case"$":return"$";case"&":return t;case"`":return $i(e,0,r);case"'":return $i(e,u);case"<":f=o[$i(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>a){var s=Fi(l/10);return 0===s?i:s<=a?void 0===n[s-1]?Bi(c,1):n[s-1]+Bi(c,1):i}f=n[l-1]}return void 0===f?"":f}))},Ui=TypeError,qi=function(t,e){var r=t.exec;if(nt(r)){var n=yt(r,t,e);return null!==n&&at(n),n}if("RegExp"===v(t))return yt(yi,t,e);throw new Ui("RegExp#exec called on incompatible receiver")},Ki=et("replace"),Yi=Math.max,Xi=Math.min,Ji=s([].concat),Qi=s([].push),Zi=s("".indexOf),tu=s("".slice),eu="$0"==="a".replace(/./,"$0"),ru=!!/./[Ki]&&""===/./[Ki]("a","$0");function nu(t){return t.length?t[0].tagName.toLowerCase():""}return function(t,e,r,n){var o=et(t),i=!u((function(){var e={};return e[o]=function(){return 7},7!==""[t](e)})),a=i&&!u((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[zi]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||r){var c=/./[o],f=e(o,""[t],(function(t,e,r,n,o){var u=e.exec;return u===yi||u===_i.exec?i&&!o?{done:!0,value:yt(c,e,r,n)}:{done:!0,value:yt(t,r,e,n)}:{done:!1}}));Ue(String.prototype,t,f[0]),Ue(_i,o,f[1])}n&&Ee(_i[o],"sham",!0)}("replace",(function(t,e,r){var n=ru?"$":"$0";return[function(t,r){var n=w(this),o=b(t)?void 0:Et(t,Ki);return o?yt(o,t,n,r):yt(e,Jr(n),t,r)},function(t,o){var i=at(this),u=Jr(t);if("string"==typeof o&&-1===Zi(o,n)&&-1===Zi(o,"$<")){var a=r(e,i,u,o);if(a.done)return a.value}var c=nt(o);c||(o=Jr(o));var f,l=i.global;l&&(f=i.unicode,i.lastIndex=0);for(var s,d=[];null!==(s=qi(i,u))&&(Qi(d,s),l);){""===Jr(s[0])&&(i.lastIndex=Ci(u,Vt(i.lastIndex),f))}for(var p,v="",y=0,h=0;h<d.length;h++){for(var g,b=Jr((s=d[h])[0]),m=Yi(Xi(Bt(s.index),u.length),0),w=[],x=1;x<s.length;x++)Qi(w,void 0===(p=s[x])?p:String(p));var O=s.groups;if(c){var S=Ji([b],w,m,u);void 0!==O&&Qi(S,O),g=Jr(Mi(o,void 0,S))}else g=Wi(b,u,m,w,O,o);m>=y&&(v+=tu(u,y,m)+g,y=m+b.length)}return v+tu(u,y)}]}),!!u((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!eu||ru),ar({global:!0,forced:A.globalThis!==A},{globalThis:A}),n.append&&(i.default.fn.append=n.append),n.attr&&(i.default.fn.attr=n.attr),n.parent&&(i.default.fn.parent=n.parent),{renderElems:[Do],editorPlugin:function(r){var n=r.deleteBackward,o=r.handleTab,i=r.normalizeNode,u=r.insertBreak,a=r;return a.insertBreak=function(){var n=Ho(e.Editor.nodes(r,{match:function(e){return t.DomEditor.checkNodeType(e,"list-item")},universal:!0}),1)[0];return n?""!==n[0].children[0].text?u():void e.Transforms.setNodes(a,{type:"paragraph",ordered:void 0,level:void 0}):u()},a.deleteBackward=function(o){var i=a.selection;if(null!=i)if(e.Range.isExpanded(i))n(o);else{var u=t.DomEditor.getSelectedNodeByType(a,"list-item");if(null!=u)if(0!==i.focus.offset)n(o);else{var c=u,f=c.level,l=void 0===f?0:f,s=c.ordered,d=void 0!==s&&s;if(l>0){var p=$o(r,u,l-1);p&&p.ordered!==d?e.Transforms.setNodes(a,{level:l-1,ordered:!d}):e.Transforms.setNodes(a,{level:l-1})}else e.Transforms.setNodes(a,{type:"paragraph",ordered:void 0,level:void 0})}else n(o)}else n(o)},a.handleTab=function(){var r,n,i,u,c=a.selection;if(null!=c){if(e.Range.isCollapsed(c)){var f=t.DomEditor.getSelectedNodeByType(a,"list-item");if(null==f)return void o();if(0===c.focus.offset){var l=f.level,s=void 0===l?0:l;return void e.Transforms.setNodes(a,{level:s+1})}}if(e.Range.isExpanded(c)){var d=0,p=!1;try{for(var v=Bo(Vo(a)),y=v.next();!y.done;y=v.next()){var h=Ho(y.value,1)[0];"list-item"===t.DomEditor.getNodeType(h)?d++:p=!0}}catch(t){r={error:t}}finally{try{y&&!y.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}if(p||d<=1)return void o();try{for(var g=Bo(Vo(a)),b=g.next();!b.done;b=g.next()){var m=Ho(b.value,2),w=(h=m[0],m[1]),x=h.level;s=void 0===x?0:x;e.Transforms.setNodes(a,{level:s+1},{at:w})}}catch(t){i={error:t}}finally{try{b&&!b.done&&(u=g.return)&&u.call(g)}finally{if(i)throw i.error}}}else o()}else o()},a.normalizeNode=function(r){var n=Ho(r,2),o=n[0],u=n[1],c=t.DomEditor.getNodeType(o);return"bulleted-list"!==c&&"numbered-list"!==c||e.Transforms.unwrapNodes(a,{at:u}),i([o,u])},a},menus:[mi,wi],elemsToHtml:[Si],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(t,e,r){return e.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(t,r,n){var o=i.default(t);0===(r=r.filter((function(t){return!!e.Text.isText(t)||!!n.isInline(t)}))).length&&(r=[{text:o.text().replace(/\s+/gm," ")}]);var u=function(t){return"ol"===nu(t.parent())}(o),a=function(t){for(var e=0,r=t.parent(),n=nu(r);"ul"===n||"ol"===n;)n=nu(r=r.parent()),e++;return e-1}(o);return{type:"list-item",ordered:u,level:a,children:r}}}]}}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@wangeditor-next/core"),require("slate"),require("dom7"),require("snabbdom")):"function"==typeof define&&define.amd?define(["@wangeditor-next/core","slate","dom7","snabbdom"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorListModule=e(t.core,t.slate,t.$,t.snabbdom)}(this,(function(t,e,r,n){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=o(r);t.i18nAddResources("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),t.i18nAddResources("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t){var e={exports:{}};return t(e,e.exports),e.exports}var c,f,l=function(t){return t&&t.Math===Math&&t},s=l("object"==typeof globalThis&&globalThis)||l("object"==typeof window&&window)||l("object"==typeof self&&self)||l("object"==typeof u&&u)||l("object"==typeof u&&u)||function(){return this}()||Function("return this")(),d=function(t){try{return!!t()}catch(t){return!0}},p=!d((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),v=!d((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),y=Function.prototype.call,h=v?y.bind(y):function(){return y.apply(y,arguments)},g={}.propertyIsEnumerable,b=Object.getOwnPropertyDescriptor,m={f:b&&!g.call({1:2},1)?function(t){var e=b(this,t);return!!e&&e.enumerable}:g},w=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},x=Function.prototype,O=x.call,S=v&&x.bind.bind(O,O),E=v?S:function(t){return function(){return O.apply(t,arguments)}},T=E({}.toString),j=E("".slice),A=function(t){return j(T(t),8,-1)},P=Object,I=E("".split),R=d((function(){return!P("z").propertyIsEnumerable(0)}))?function(t){return"String"===A(t)?I(t,""):P(t)}:P,L=function(t){return null==t},k=TypeError,N=function(t){if(L(t))throw new k("Can't call method on "+t);return t},M=function(t){return R(N(t))},z="object"==typeof document&&document.all,_=void 0===z&&void 0!==z?function(t){return"function"==typeof t||t===z}:function(t){return"function"==typeof t},D=function(t){return"object"==typeof t?null!==t:_(t)},C=function(t,e){return arguments.length<2?(r=s[t],_(r)?r:void 0):s[t]&&s[t][e];var r},F=E({}.isPrototypeOf),B=s.navigator,H=B&&B.userAgent,$=H?String(H):"",G=s.process,V=s.Deno,W=G&&G.versions||V&&V.version,U=W&&W.v8;U&&(f=(c=U.split("."))[0]>0&&c[0]<4?1:+(c[0]+c[1])),!f&&$&&(!(c=$.match(/Edge\/(\d+)/))||c[1]>=74)&&(c=$.match(/Chrome\/(\d+)/))&&(f=+c[1]);var q=f,K=s.String,Y=!!Object.getOwnPropertySymbols&&!d((function(){var t=Symbol("symbol detection");return!K(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&q&&q<41})),X=Y&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,J=Object,Q=X?function(t){return"symbol"==typeof t}:function(t){var e=C("Symbol");return _(e)&&F(e.prototype,J(t))},Z=String,tt=function(t){try{return Z(t)}catch(t){return"Object"}},et=TypeError,rt=function(t){if(_(t))return t;throw new et(tt(t)+" is not a function")},nt=function(t,e){var r=t[e];return L(r)?void 0:rt(r)},ot=TypeError,it=Object.defineProperty,ut=function(t,e){try{it(s,t,{value:e,configurable:!0,writable:!0})}catch(r){s[t]=e}return e},at=a((function(t){var e="__core-js_shared__",r=t.exports=s[e]||ut(e,{});(r.versions||(r.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"})})),ct=function(t,e){return at[t]||(at[t]=e||{})},ft=Object,lt=function(t){return ft(N(t))},st=E({}.hasOwnProperty),dt=Object.hasOwn||function(t,e){return st(lt(t),e)},pt=0,vt=Math.random(),yt=E(1..toString),ht=function(t){return"Symbol("+(void 0===t?"":t)+")_"+yt(++pt+vt,36)},gt=s.Symbol,bt=ct("wks"),mt=X?gt.for||gt:gt&>.withoutSetter||ht,wt=function(t){return dt(bt,t)||(bt[t]=Y&&dt(gt,t)?gt[t]:mt("Symbol."+t)),bt[t]},xt=TypeError,Ot=wt("toPrimitive"),St=function(t,e){if(!D(t)||Q(t))return t;var r,n=nt(t,Ot);if(n){if(void 0===e&&(e="default"),r=h(n,t,e),!D(r)||Q(r))return r;throw new xt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&_(r=t.toString)&&!D(n=h(r,t)))return n;if(_(r=t.valueOf)&&!D(n=h(r,t)))return n;if("string"!==e&&_(r=t.toString)&&!D(n=h(r,t)))return n;throw new ot("Can't convert object to primitive value")}(t,e)},Et=function(t){var e=St(t,"string");return Q(e)?e:e+""},Tt=s.document,jt=D(Tt)&&D(Tt.createElement),At=function(t){return jt?Tt.createElement(t):{}},Pt=!p&&!d((function(){return 7!==Object.defineProperty(At("div"),"a",{get:function(){return 7}}).a})),It=Object.getOwnPropertyDescriptor,Rt={f:p?It:function(t,e){if(t=M(t),e=Et(e),Pt)try{return It(t,e)}catch(t){}if(dt(t,e))return w(!h(m.f,t,e),t[e])}},Lt=p&&d((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),kt=String,Nt=TypeError,Mt=function(t){if(D(t))return t;throw new Nt(kt(t)+" is not an object")},zt=TypeError,_t=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,Ct="enumerable",Ft="configurable",Bt="writable",Ht={f:p?Lt?function(t,e,r){if(Mt(t),e=Et(e),Mt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&Bt in r&&!r[Bt]){var n=Dt(t,e);n&&n[Bt]&&(t[e]=r.value,r={configurable:Ft in r?r[Ft]:n[Ft],enumerable:Ct in r?r[Ct]:n[Ct],writable:!1})}return _t(t,e,r)}:_t:function(t,e,r){if(Mt(t),e=Et(e),Mt(r),Pt)try{return _t(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new zt("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},$t=p?function(t,e,r){return Ht.f(t,e,w(1,r))}:function(t,e,r){return t[e]=r,t},Gt=Function.prototype,Vt=p&&Object.getOwnPropertyDescriptor,Wt=dt(Gt,"name"),Ut={EXISTS:Wt,PROPER:Wt&&"something"===function(){}.name,CONFIGURABLE:Wt&&(!p||p&&Vt(Gt,"name").configurable)},qt=E(Function.toString);_(at.inspectSource)||(at.inspectSource=function(t){return qt(t)});var Kt,Yt,Xt,Jt=at.inspectSource,Qt=s.WeakMap,Zt=_(Qt)&&/native code/.test(String(Qt)),te=ct("keys"),ee=function(t){return te[t]||(te[t]=ht(t))},re={},ne="Object already initialized",oe=s.TypeError,ie=s.WeakMap;if(Zt||at.state){var ue=at.state||(at.state=new ie);ue.get=ue.get,ue.has=ue.has,ue.set=ue.set,Kt=function(t,e){if(ue.has(t))throw new oe(ne);return e.facade=t,ue.set(t,e),e},Yt=function(t){return ue.get(t)||{}},Xt=function(t){return ue.has(t)}}else{var ae=ee("state");re[ae]=!0,Kt=function(t,e){if(dt(t,ae))throw new oe(ne);return e.facade=t,$t(t,ae,e),e},Yt=function(t){return dt(t,ae)?t[ae]:{}},Xt=function(t){return dt(t,ae)}}var ce={set:Kt,get:Yt,has:Xt,enforce:function(t){return Xt(t)?Yt(t):Kt(t,{})},getterFor:function(t){return function(e){var r;if(!D(e)||(r=Yt(e)).type!==t)throw new oe("Incompatible receiver, "+t+" required");return r}}},fe=a((function(t){var e=Ut.CONFIGURABLE,r=ce.enforce,n=ce.get,o=String,i=Object.defineProperty,u=E("".slice),a=E("".replace),c=E([].join),f=p&&!d((function(){return 8!==i((function(){}),"length",{value:8}).length})),l=String(String).split("String"),s=t.exports=function(t,n,s){"Symbol("===u(o(n),0,7)&&(n="["+a(o(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!dt(t,"name")||e&&t.name!==n)&&(p?i(t,"name",{value:n,configurable:!0}):t.name=n),f&&s&&dt(s,"arity")&&t.length!==s.arity&&i(t,"length",{value:s.arity});try{s&&dt(s,"constructor")&&s.constructor?p&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var d=r(t);return dt(d,"source")||(d.source=c(l,"string"==typeof n?n:"")),t};Function.prototype.toString=s((function(){return _(this)&&n(this).source||Jt(this)}),"toString")})),le=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(_(r)&&fe(r,i,n),n.global)o?t[e]=r:ut(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Ht.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},se=Math.ceil,de=Math.floor,pe=Math.trunc||function(t){var e=+t;return(e>0?de:se)(e)},ve=function(t){var e=+t;return e!=e||0===e?0:pe(e)},ye=Math.max,he=Math.min,ge=Math.min,be=function(t){var e=ve(t);return e>0?ge(e,9007199254740991):0},me=function(t){return be(t.length)},we=function(t){return function(e,r,n){var o=M(e),i=me(o);if(0===i)return!t&&-1;var u,a=function(t,e){var r=ve(t);return r<0?ye(r+e,0):he(r,e)}(n,i);if(t&&r!=r){for(;i>a;)if((u=o[a++])!=u)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},xe={includes:we(!0),indexOf:we(!1)},Oe=xe.indexOf,Se=E([].push),Ee=function(t,e){var r,n=M(t),o=0,i=[];for(r in n)!dt(re,r)&&dt(n,r)&&Se(i,r);for(;e.length>o;)dt(n,r=e[o++])&&(~Oe(i,r)||Se(i,r));return i},Te=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],je=Te.concat("length","prototype"),Ae={f:Object.getOwnPropertyNames||function(t){return Ee(t,je)}},Pe={f:Object.getOwnPropertySymbols},Ie=E([].concat),Re=C("Reflect","ownKeys")||function(t){var e=Ae.f(Mt(t)),r=Pe.f;return r?Ie(e,r(t)):e},Le=function(t,e,r){for(var n=Re(e),o=Ht.f,i=Rt.f,u=0;u<n.length;u++){var a=n[u];dt(t,a)||r&&dt(r,a)||o(t,a,i(e,a))}},ke=/#|\.prototype\./,Ne=function(t,e){var r=ze[Me(t)];return r===De||r!==_e&&(_(e)?d(e):!!e)},Me=Ne.normalize=function(t){return String(t).replace(ke,".").toLowerCase()},ze=Ne.data={},_e=Ne.NATIVE="N",De=Ne.POLYFILL="P",Ce=Ne,Fe=Rt.f,Be=function(t,e){var r,n,o,i,u,a=t.target,c=t.global,f=t.stat;if(r=c?s:f?s[a]||ut(a,{}):s[a]&&s[a].prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(u=Fe(r,n))&&u.value:r[n],!Ce(c?n:a+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Le(i,o)}(t.sham||o&&o.sham)&&$t(i,"sham",!0),le(r,n,i,t)}},He=Array.isArray||function(t){return"Array"===A(t)},$e=TypeError,Ge=function(t){if(t>9007199254740991)throw $e("Maximum allowed index exceeded");return t},Ve=function(t,e,r){p?Ht.f(t,e,w(0,r)):t[e]=r},We={};We[wt("toStringTag")]="z";var Ue="[object z]"===String(We),qe=wt("toStringTag"),Ke=Object,Ye="Arguments"===A(function(){return arguments}()),Xe=Ue?A:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Ke(t),qe))?r:Ye?A(e):"Object"===(n=A(e))&&_(e.callee)?"Arguments":n},Je=function(){},Qe=C("Reflect","construct"),Ze=/^\s*(?:class|function)\b/,tr=E(Ze.exec),er=!Ze.test(Je),rr=function(t){if(!_(t))return!1;try{return Qe(Je,[],t),!0}catch(t){return!1}},nr=function(t){if(!_(t))return!1;switch(Xe(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return er||!!tr(Ze,Jt(t))}catch(t){return!0}};nr.sham=!0;var or=!Qe||d((function(){var t;return rr(rr.call)||!rr(Object)||!rr((function(){t=!0}))||t}))?nr:rr,ir=wt("species"),ur=Array,ar=function(t,e){return new(function(t){var e;return He(t)&&(e=t.constructor,(or(e)&&(e===ur||He(e.prototype))||D(e)&&null===(e=e[ir]))&&(e=void 0)),void 0===e?ur:e}(t))(0===e?0:e)},cr=wt("species"),fr=function(t){return q>=51||!d((function(){var e=[];return(e.constructor={})[cr]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},lr=wt("isConcatSpreadable"),sr=q>=51||!d((function(){var t=[];return t[lr]=!1,t.concat()[0]!==t})),dr=function(t){if(!D(t))return!1;var e=t[lr];return void 0!==e?!!e:He(t)},pr=!sr||!fr("concat");Be({target:"Array",proto:!0,arity:1,forced:pr},{concat:function(t){var e,r,n,o,i,u=lt(this),a=ar(u,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(dr(i=-1===e?u:arguments[e]))for(o=me(i),Ge(c+o),r=0;r<o;r++,c++)r in i&&Ve(a,c,i[r]);else Ge(c+1),Ve(a,c++,i);return a.length=c,a}});var vr=function(t,e){return vr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},vr(t,e)};function yr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}vr(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function hr(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function gr(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}"function"==typeof SuppressedError&&SuppressedError;var br,mr=Object.keys||function(t){return Ee(t,Te)},wr=p&&!Lt?Object.defineProperties:function(t,e){Mt(t);for(var r,n=M(e),o=mr(e),i=o.length,u=0;i>u;)Ht.f(t,r=o[u++],n[r]);return t},xr={f:wr},Or=C("document","documentElement"),Sr="prototype",Er="script",Tr=ee("IE_PROTO"),jr=function(){},Ar=function(t){return"<"+Er+">"+t+"</"+Er+">"},Pr=function(t){t.write(Ar("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ir=function(){try{br=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;Ir="undefined"!=typeof document?document.domain&&br?Pr(br):(e=At("iframe"),r="java"+Er+":",e.style.display="none",Or.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(Ar("document.F=Object")),t.close(),t.F):Pr(br);for(var n=Te.length;n--;)delete Ir[Sr][Te[n]];return Ir()};re[Tr]=!0;var Rr=Object.create||function(t,e){var r;return null!==t?(jr[Sr]=Mt(t),r=new jr,jr[Sr]=null,r[Tr]=t):r=Ir(),void 0===e?r:xr.f(r,e)},Lr=Ht.f,kr=wt("unscopables"),Nr=Array.prototype;void 0===Nr[kr]&&Lr(Nr,kr,{configurable:!0,value:Rr(null)});var Mr,zr,_r,Dr=function(t){Nr[kr][t]=!0},Cr={},Fr=!d((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Br=ee("IE_PROTO"),Hr=Object,$r=Hr.prototype,Gr=Fr?Hr.getPrototypeOf:function(t){var e=lt(t);if(dt(e,Br))return e[Br];var r=e.constructor;return _(r)&&e instanceof r?r.prototype:e instanceof Hr?$r:null},Vr=wt("iterator"),Wr=!1;[].keys&&("next"in(_r=[].keys())?(zr=Gr(Gr(_r)))!==Object.prototype&&(Mr=zr):Wr=!0);var Ur=!D(Mr)||d((function(){var t={};return Mr[Vr].call(t)!==t}));Ur&&(Mr={}),_(Mr[Vr])||le(Mr,Vr,(function(){return this}));var qr={IteratorPrototype:Mr,BUGGY_SAFARI_ITERATORS:Wr},Kr=Ht.f,Yr=wt("toStringTag"),Xr=function(t,e,r){t&&!r&&(t=t.prototype),t&&!dt(t,Yr)&&Kr(t,Yr,{configurable:!0,value:e})},Jr=qr.IteratorPrototype,Qr=function(){return this},Zr=String,tn=TypeError,en=function(t){if(function(t){return D(t)||null===t}(t))return t;throw new tn("Can't set "+Zr(t)+" as a prototype")},rn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=function(t,e,r){try{return E(rt(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return N(r),en(n),D(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),nn=Ut.PROPER,on=Ut.CONFIGURABLE,un=qr.IteratorPrototype,an=qr.BUGGY_SAFARI_ITERATORS,cn=wt("iterator"),fn="keys",ln="values",sn="entries",dn=function(){return this},pn=function(t,e,r,n,o,i,u){!function(t,e,r,n){var o=e+" Iterator";t.prototype=Rr(Jr,{next:w(+!n,r)}),Xr(t,o,!1),Cr[o]=Qr}(r,e,n);var a,c,f,l=function(t){if(t===o&&y)return y;if(!an&&t&&t in p)return p[t];switch(t){case fn:case ln:case sn:return function(){return new r(this,t)}}return function(){return new r(this)}},s=e+" Iterator",d=!1,p=t.prototype,v=p[cn]||p["@@iterator"]||o&&p[o],y=!an&&v||l(o),g="Array"===e&&p.entries||v;if(g&&(a=Gr(g.call(new t)))!==Object.prototype&&a.next&&(Gr(a)!==un&&(rn?rn(a,un):_(a[cn])||le(a,cn,dn)),Xr(a,s,!0)),nn&&o===ln&&v&&v.name!==ln&&(on?$t(p,"name",ln):(d=!0,y=function(){return h(v,this)})),o)if(c={values:l(ln),keys:i?y:l(fn),entries:l(sn)},u)for(f in c)(an||d||!(f in p))&&le(p,f,c[f]);else Be({target:e,proto:!0,forced:an||d},c);return p[cn]!==y&&le(p,cn,y,{name:o}),Cr[e]=y,c},vn=function(t,e){return{value:t,done:e}},yn=Ht.f,hn="Array Iterator",gn=ce.set,bn=ce.getterFor(hn),mn=pn(Array,"Array",(function(t,e){gn(this,{type:hn,target:M(t),index:0,kind:e})}),(function(){var t=bn(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,vn(void 0,!0);switch(t.kind){case"keys":return vn(r,!1);case"values":return vn(e[r],!1)}return vn([r,e[r]],!1)}),"values"),wn=Cr.Arguments=Cr.Array;if(Dr("keys"),Dr("values"),Dr("entries"),p&&"values"!==wn.name)try{yn(wn,"name",{value:"values"})}catch(t){}var xn=Ue?{}.toString:function(){return"[object "+Xe(this)+"]"};Ue||le(Object.prototype,"toString",xn,{unsafe:!0});var On=String,Sn=function(t){if("Symbol"===Xe(t))throw new TypeError("Cannot convert a Symbol value to a string");return On(t)},En=E("".charAt),Tn=E("".charCodeAt),jn=E("".slice),An=function(t){return function(e,r){var n,o,i=Sn(N(e)),u=ve(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=Tn(i,u))<55296||n>56319||u+1===a||(o=Tn(i,u+1))<56320||o>57343?t?En(i,u):n:t?jn(i,u,u+2):o-56320+(n-55296<<10)+65536}},Pn={codeAt:An(!1),charAt:An(!0)},In=Pn.charAt,Rn="String Iterator",Ln=ce.set,kn=ce.getterFor(Rn);pn(String,"String",(function(t){Ln(this,{type:Rn,string:Sn(t),index:0})}),(function(){var t,e=kn(this),r=e.string,n=e.index;return n>=r.length?vn(void 0,!0):(t=In(r,n),e.index+=t.length,vn(t,!1))}));var Nn=!d((function(){return Object.isExtensible(Object.preventExtensions({}))})),Mn=function(t,e,r){for(var n in e)le(t,n,e[n],r);return t},zn=E([].slice),_n=Ae.f,Dn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Cn={f:function(t){return Dn&&"Window"===A(t)?function(t){try{return _n(t)}catch(t){return zn(Dn)}}(t):_n(M(t))}},Fn=d((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Bn=Object.isExtensible,Hn=d((function(){Bn(1)}))||Fn?function(t){return!!D(t)&&((!Fn||"ArrayBuffer"!==A(t))&&(!Bn||Bn(t)))}:Bn,$n=a((function(t){var e=Ht.f,r=!1,n=ht("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},r=!0;var t=Ae.f,e=E([].splice),o={};o[n]=1,t(o).length&&(Ae.f=function(r){for(var o=t(r),i=0,u=o.length;i<u;i++)if(o[i]===n){e(o,i,1);break}return o},Be({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Cn.f}))},fastKey:function(t,e){if(!D(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!dt(t,n)){if(!Hn(t))return"F";if(!e)return"E";i(t)}return t[n].objectID},getWeakData:function(t,e){if(!dt(t,n)){if(!Hn(t))return!0;if(!e)return!1;i(t)}return t[n].weakData},onFreeze:function(t){return Nn&&r&&Hn(t)&&!dt(t,n)&&i(t),t}};re[n]=!0})),Gn=function(t){if("Function"===A(t))return E(t)},Vn=Gn(Gn.bind),Wn=function(t,e){return rt(t),void 0===e?t:v?Vn(t,e):function(){return t.apply(e,arguments)}},Un=wt("iterator"),qn=Array.prototype,Kn=wt("iterator"),Yn=function(t){if(!L(t))return nt(t,Kn)||nt(t,"@@iterator")||Cr[Xe(t)]},Xn=TypeError,Jn=function(t,e,r){var n,o;Mt(t);try{if(!(n=nt(t,"return"))){if("throw"===e)throw r;return r}n=h(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return Mt(n),r},Qn=TypeError,Zn=function(t,e){this.stopped=t,this.result=e},to=Zn.prototype,eo=function(t,e,r){var n,o,i,u,a,c,f,l,s=r&&r.that,d=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),v=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),g=Wn(e,s),b=function(t){return n&&Jn(n,"normal",t),new Zn(!0,t)},m=function(t){return d?(Mt(t),y?g(t[0],t[1],b):g(t[0],t[1])):y?g(t,b):g(t)};if(p)n=t.iterator;else if(v)n=t;else{if(!(o=Yn(t)))throw new Qn(tt(t)+" is not iterable");if(void 0!==(l=o)&&(Cr.Array===l||qn[Un]===l)){for(i=0,u=me(t);u>i;i++)if((a=m(t[i]))&&F(to,a))return a;return new Zn(!1)}n=function(t,e){var r=arguments.length<2?Yn(t):e;if(rt(r))return Mt(h(r,t));throw new Xn(tt(t)+" is not iterable")}(t,o)}for(c=p?t.next:n.next;!(f=h(c,n)).done;){try{a=m(f.value)}catch(t){Jn(n,"throw",t)}if("object"==typeof a&&a&&F(to,a))return a}return new Zn(!1)},ro=TypeError,no=function(t,e){if(F(e,t))return t;throw new ro("Incorrect invocation")},oo=wt("iterator"),io=!1;try{var uo=0,ao={next:function(){return{done:!!uo++}},return:function(){io=!0}};ao[oo]=function(){return this},Array.from(ao,(function(){throw 2}))}catch(t){}var co=E([].push),fo=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,u=7===t,a=5===t||i;return function(c,f,l,s){for(var d,p,v=lt(c),y=R(v),h=me(y),g=Wn(f,l),b=0,m=s||ar,w=e?m(c,h):r||u?m(c,0):void 0;h>b;b++)if((a||b in y)&&(p=g(d=y[b],b,v),t))if(e)w[b]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return b;case 2:co(w,d)}else switch(t){case 4:return!1;case 7:co(w,d)}return i?-1:n||o?o:w}},lo={forEach:fo(0),map:fo(1),filter:fo(2),some:fo(3),every:fo(4),find:fo(5),findIndex:fo(6),filterReject:fo(7)},so=$n.getWeakData,po=ce.set,vo=ce.getterFor,yo=lo.find,ho=lo.findIndex,go=E([].splice),bo=0,mo=function(t){return t.frozen||(t.frozen=new wo)},wo=function(){this.entries=[]},xo=function(t,e){return yo(t.entries,(function(t){return t[0]===e}))};wo.prototype={get:function(t){var e=xo(this,t);if(e)return e[1]},has:function(t){return!!xo(this,t)},set:function(t,e){var r=xo(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=ho(this.entries,(function(e){return e[0]===t}));return~e&&go(this.entries,e,1),!!~e}};var Oo,So={getConstructor:function(t,e,r,n){var o=t((function(t,o){no(t,i),po(t,{type:e,id:bo++,frozen:null}),L(o)||eo(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,u=vo(e),a=function(t,e,r){var n=u(t),o=so(Mt(e),!0);return!0===o?mo(n).set(e,r):o[n.id]=r,t};return Mn(i,{delete:function(t){var e=u(this);if(!D(t))return!1;var r=so(t);return!0===r?mo(e).delete(t):r&&dt(r,e.id)&&delete r[e.id]},has:function(t){var e=u(this);if(!D(t))return!1;var r=so(t);return!0===r?mo(e).has(t):r&&dt(r,e.id)}}),Mn(i,r?{get:function(t){var e=u(this);if(D(t)){var r=so(t);if(!0===r)return mo(e).get(t);if(r)return r[e.id]}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},Eo=ce.enforce,To=Object,jo=Array.isArray,Ao=To.isExtensible,Po=To.isFrozen,Io=To.isSealed,Ro=To.freeze,Lo=To.seal,ko=!s.ActiveXObject&&"ActiveXObject"in s,No=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Mo=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",u=s[t],a=u&&u.prototype,c=u,f={},l=function(t){var e=E(a[t]);le(a,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!D(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!D(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!D(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(Ce(t,!_(u)||!(o||a.forEach&&!d((function(){(new u).entries().next()})))))c=r.getConstructor(e,t,n,i),$n.enable();else if(Ce(t,!0)){var p=new c,v=p[i](o?{}:-0,1)!==p,y=d((function(){p.has(1)})),h=function(t,e){try{if(!e&&!io)return!1}catch(t){return!1}var r=!1;try{var n={};n[oo]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){new u(t)})),g=!o&&d((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));h||((c=e((function(t,e){no(t,a);var r=function(t,e,r){var n,o;return rn&&_(n=e.constructor)&&n!==r&&D(o=n.prototype)&&o!==r.prototype&&rn(t,o),t}(new u,t,c);return L(e)||eo(e,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=a,a.constructor=c),(y||g)&&(l("delete"),l("has"),n&&l("get")),(g||v)&&l(i),o&&a.clear&&delete a.clear}return f[t]=c,Be({global:!0,constructor:!0,forced:c!==u},f),Xr(c,t),o||r.setStrong(c,t,n),c}("WeakMap",No,So),zo=Mo.prototype,_o=E(zo.set);if(Zt)if(ko){Oo=So.getConstructor(No,"WeakMap",!0),$n.enable();var Do=E(zo.delete),Co=E(zo.has),Fo=E(zo.get);Mn(zo,{delete:function(t){if(D(t)&&!Ao(t)){var e=Eo(this);return e.frozen||(e.frozen=new Oo),Do(this,t)||e.frozen.delete(t)}return Do(this,t)},has:function(t){if(D(t)&&!Ao(t)){var e=Eo(this);return e.frozen||(e.frozen=new Oo),Co(this,t)||e.frozen.has(t)}return Co(this,t)},get:function(t){if(D(t)&&!Ao(t)){var e=Eo(this);return e.frozen||(e.frozen=new Oo),Co(this,t)?Fo(this,t):e.frozen.get(t)}return Fo(this,t)},set:function(t,e){if(D(t)&&!Ao(t)){var r=Eo(this);r.frozen||(r.frozen=new Oo),Co(this,t)?_o(this,t,e):r.frozen.set(t,e)}else _o(this,t,e);return this}})}else Nn&&d((function(){var t=Ro([]);return _o(new Mo,t,1),!Po(t)}))&&Mn(zo,{set:function(t,e){var r;return jo(t)&&(Po(t)?r=Ro:Io(t)&&(r=Lo)),_o(this,t,e),r&&r(t),this}});var Bo={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},Ho=At("span").classList,$o=Ho&&Ho.constructor&&Ho.constructor.prototype,Go=$o===Object.prototype?void 0:$o,Vo=wt("iterator"),Wo=mn.values,Uo=function(t,e){if(t){if(t[Vo]!==Wo)try{$t(t,Vo,Wo)}catch(e){t[Vo]=Wo}if(Xr(t,e,!0),Bo[e])for(var r in mn)if(t[r]!==mn[r])try{$t(t,r,mn[r])}catch(e){t[r]=mn[r]}}};for(var qo in Bo)Uo(s[qo]&&s[qo].prototype,qo);Uo(Go,"DOMTokenList");var Ko=new WeakMap;function Yo(t){var r,n=t.children||[],o=n.length;if(0===o)return"";for(var i=0;i<o&&!r;i+=1){var u=n[i];e.Text.isText(u)&&(r=u)}return null==r?"":r.color||""}function Xo(r,n,o){for(var i=n.type,u=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(n,["type"]),a=void 0!==o?o:u.level||0,c=t.DomEditor.findPath(r,n),f=c;;){if(0===f.length||0===c[c.length-1])return null;f=e.Path.previous(f);var l=e.Editor.node(r,f);if(!l)return null;var s=gr(l,1)[0],d=s.level,p=void 0===d?0:d;if(t.DomEditor.getNodeType(s)!==i)return null;if(p===a)return s}}function Jo(t,e,r){var n=Xo(t,e,r);return!!n&&n.ordered===e.ordered}var Qo=[];var Zo={type:"list-item",elemToHtml:function(r,n){var o="",i="",u=r.ordered,a=void 0!==u&&u?"ol":"ul",c=function(r){var n=Ko.get(r);if(null==n)return 0;var o=r,i=o.type,u=o.ordered,a=void 0!==u&&u,c=o.level,f=void 0===c?0:c,l=t.DomEditor.findPath(n,r);if(0===l[0])return f+1;var s=e.Path.previous(l),d=e.Editor.node(n,s);if(!d)return 0;var p=gr(d,1)[0];if(t.DomEditor.getNodeType(p)!==i)return f+1;var v=p,y=v.ordered,h=void 0!==y&&y,g=v.level,b=void 0===g?0:g;return b<f?f-b:b>f?Jo(n,r)?0:1:b===f?h===a?0:1:0}(r);if(c>0)for(var f=0;f<c;f+=1)o+="<".concat(a,">"),Qo.push(a);var l=function(r){var n=Ko.get(r);if(null==n)return 0;var o=r,i=o.type,u=o.ordered,a=void 0!==u&&u,c=o.level,f=void 0===c?0:c,l=t.DomEditor.findPath(n,r);if(l[0]===n.children.length-1)return f+1;var s=e.Path.next(l),d=e.Editor.node(n,s);if(!d)return 0;var p=gr(d,1)[0];if(t.DomEditor.getNodeType(p)!==i)return f+1;var v=p,y=v.ordered,h=void 0!==y&&y,g=v.level,b=void 0===g?0:g;return b<f?Jo(n,p)?f-b:f-b+1:b>f?0:b===f?h===a?0:1:0}(r);if(l>0)for(f=0;f<l;f+=1){var s=Qo.pop();i+="</".concat(s,">")}var d=Yo(r),p=d?' style="color:'.concat(d,'"'):"";return{html:"<li".concat(p,">").concat(n,"</li>"),prefix:o,suffix:i}}},ti=xe.includes,ei=d((function(){return!Array(1).includes()}));Be({target:"Array",proto:!0,forced:ei},{includes:function(t){return ti(this,t,arguments.length>1?arguments[1]:void 0)}}),Dr("includes");var ri,ni,oi=function(){var t=Mt(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},ii=s.RegExp,ui=d((function(){var t=ii("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),ai=ui||d((function(){return!ii("a","y").sticky})),ci={BROKEN_CARET:ui||d((function(){var t=ii("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:ai,UNSUPPORTED_Y:ui},fi=s.RegExp,li=d((function(){var t=fi(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),si=s.RegExp,di=d((function(){var t=si("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),pi=ce.get,vi=ct("native-string-replace",String.prototype.replace),yi=RegExp.prototype.exec,hi=yi,gi=E("".charAt),bi=E("".indexOf),mi=E("".replace),wi=E("".slice),xi=(ni=/b*/g,h(yi,ri=/a/,"a"),h(yi,ni,"a"),0!==ri.lastIndex||0!==ni.lastIndex),Oi=ci.BROKEN_CARET,Si=void 0!==/()??/.exec("")[1];(xi||Si||Oi||li||di)&&(hi=function(t){var e,r,n,o,i,u,a,c=this,f=pi(c),l=Sn(t),s=f.raw;if(s)return s.lastIndex=c.lastIndex,e=h(hi,s,l),c.lastIndex=s.lastIndex,e;var d=f.groups,p=Oi&&c.sticky,v=h(oi,c),y=c.source,g=0,b=l;if(p&&(v=mi(v,"y",""),-1===bi(v,"g")&&(v+="g"),b=wi(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==gi(l,c.lastIndex-1))&&(y="(?: "+y+")",b=" "+b,g++),r=new RegExp("^(?:"+y+")",v)),Si&&(r=new RegExp("^"+y+"$(?!\\s)",v)),xi&&(n=c.lastIndex),o=h(yi,p?r:c,b),p?o?(o.input=wi(o.input,g),o[0]=wi(o[0],g),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:xi&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Si&&o&&o.length>1&&h(vi,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=u=Rr(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var Ei=hi;Be({target:"RegExp",proto:!0,forced:/./.exec!==Ei},{exec:Ei});var Ti=function(){function r(){this.type="list-item",this.tag="button"}return r.prototype.getListNode=function(e){var r=this.type;return t.DomEditor.getSelectedNodeByType(e,r)},r.prototype.getValue=function(t){return""},r.prototype.isActive=function(t){var e=this.getListNode(t);if(null==e)return!1;var r=e.ordered;return(void 0!==r&&r)===this.ordered},r.prototype.isDisabled=function(r){return null==r.selection||!!t.DomEditor.getSelectedElems(r).some((function(t){if(e.Editor.isVoid(r,t)&&e.Editor.isBlock(r,t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)}))},r.prototype.exec=function(t,r){this.isActive(t)?e.Transforms.setNodes(t,{type:"paragraph",ordered:void 0,level:void 0}):e.Transforms.setNodes(t,{type:"list-item",ordered:this.ordered,indent:void 0})},r}(),ji=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.ordered=!1,r.title=t.t("listModule.unOrderedList"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',r}return yr(r,e),r}(Ti),Ai=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.ordered=!0,r.title=t.t("listModule.orderedList"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',r}return yr(r,e),r}(Ti),Pi={key:"bulletedList",factory:function(){return new ji}},Ii={key:"numberedList",factory:function(){return new Ai}},Ri=lo.filter,Li=fr("filter");Be({target:"Array",proto:!0,forced:!Li},{filter:function(t){return Ri(this,t,arguments.length>1?arguments[1]:void 0)}});var ki=function(t,e,r,n,o,i,u,a){for(var c,f,l=o,s=0,d=!!u&&Wn(u,a);s<n;)s in r&&(c=d?d(r[s],s,e):r[s],i>0&&He(c)?(f=me(c),l=ki(t,e,c,f,l,i-1)-1):(Ge(l+1),t[l]=c),l++),s++;return l},Ni=ki;Be({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=lt(this),r=me(e),n=ar(e,0);return n.length=Ni(n,e,e,r,0,void 0===t?1:ve(t)),n}}),Dr("flat");var Mi=Function.prototype,zi=Mi.apply,_i=Mi.call,Di="object"==typeof Reflect&&Reflect.apply||(v?_i.bind(zi):function(){return _i.apply(zi,arguments)}),Ci=wt("species"),Fi=RegExp.prototype,Bi=Pn.charAt,Hi=function(t,e,r){return e+(r?Bi(t,e).length:1)},$i=Math.floor,Gi=E("".charAt),Vi=E("".replace),Wi=E("".slice),Ui=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,qi=/\$([$&'`]|\d{1,2})/g,Ki=function(t,e,r,n,o,i){var u=r+t.length,a=n.length,c=qi;return void 0!==o&&(o=lt(o),c=Ui),Vi(i,c,(function(i,c){var f;switch(Gi(c,0)){case"$":return"$";case"&":return t;case"`":return Wi(e,0,r);case"'":return Wi(e,u);case"<":f=o[Wi(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>a){var s=$i(l/10);return 0===s?i:s<=a?void 0===n[s-1]?Gi(c,1):n[s-1]+Gi(c,1):i}f=n[l-1]}return void 0===f?"":f}))},Yi=TypeError,Xi=function(t,e){var r=t.exec;if(_(r)){var n=h(r,t,e);return null!==n&&Mt(n),n}if("RegExp"===A(t))return h(Ei,t,e);throw new Yi("RegExp#exec called on incompatible receiver")},Ji=wt("replace"),Qi=Math.max,Zi=Math.min,tu=E([].concat),eu=E([].push),ru=E("".indexOf),nu=E("".slice),ou="$0"==="a".replace(/./,"$0"),iu=!!/./[Ji]&&""===/./[Ji]("a","$0");function uu(t){return t.length?t[0].tagName.toLowerCase():""}function au(r){return e.Editor.nodes(r,{at:r.selection||void 0,match:function(e){return 1===t.DomEditor.findPath(r,e).length}})}return function(t,e,r,n){var o=wt(t),i=!d((function(){var e={};return e[o]=function(){return 7},7!==""[t](e)})),u=i&&!d((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Ci]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!u||r){var a=/./[o],c=e(o,""[t],(function(t,e,r,n,o){var u=e.exec;return u===Ei||u===Fi.exec?i&&!o?{done:!0,value:h(a,e,r,n)}:{done:!0,value:h(t,r,e,n)}:{done:!1}}));le(String.prototype,t,c[0]),le(Fi,o,c[1])}n&&$t(Fi[o],"sham",!0)}("replace",(function(t,e,r){var n=iu?"$":"$0";return[function(t,r){var n=N(this),o=L(t)?void 0:nt(t,Ji);return o?h(o,t,n,r):h(e,Sn(n),t,r)},function(t,o){var i=Mt(this),u=Sn(t);if("string"==typeof o&&-1===ru(o,n)&&-1===ru(o,"$<")){var a=r(e,i,u,o);if(a.done)return a.value}var c=_(o);c||(o=Sn(o));var f,l=i.global;l&&(f=i.unicode,i.lastIndex=0);for(var s,d=[];null!==(s=Xi(i,u))&&(eu(d,s),l);){""===Sn(s[0])&&(i.lastIndex=Hi(u,be(i.lastIndex),f))}for(var p,v="",y=0,h=0;h<d.length;h++){for(var g,b=Sn((s=d[h])[0]),m=Qi(Zi(ve(s.index),u.length),0),w=[],x=1;x<s.length;x++)eu(w,void 0===(p=s[x])?p:String(p));var O=s.groups;if(c){var S=tu([b],w,m,u);void 0!==O&&eu(S,O),g=Sn(Di(o,void 0,S))}else g=Ki(b,u,m,w,O,o);m>=y&&(v+=nu(u,y,m)+g,y=m+b.length)}return v+nu(u,y)}]}),!!d((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!ou||iu),Be({global:!0,forced:s.globalThis!==s},{globalThis:s}),r.append&&(i.default.fn.append=r.append),r.attr&&(i.default.fn.attr=r.attr),r.parent&&(i.default.fn.parent=r.parent),{renderElems:[{type:"list-item",renderElem:function(r,o,i){Ko.set(r,i);var u=r,a=u.level,c=void 0===a?0:a,f=u.ordered,l=void 0!==f&&f,s={margin:"5px 0 5px ".concat(20*c,"px")},d="";if(l){var p=function(r,n){var o=n,i=o.type,u=o.level,a=void 0===u?0:u,c=o.ordered,f=void 0!==c&&c,l=1,s=n,d=t.DomEditor.findPath(r,s);if(0===d[0])return 1;for(;d[0]>0;){var p=e.Path.previous(d),v=e.Editor.node(r,p);if(null==v)break;var y=v[0],h=y.level,g=void 0===h?0:h,b=y.type,m=y.ordered;if(b!==i)break;if(g<a)break;if(g===a){if(m!==f)break;l+=1}s=y,d=p}return l}(i,r);d="".concat(p,".")}else d=function(t){void 0===t&&(t=0);var e="";switch(t){case 0:e="•";break;case 1:e="◦";break;default:e="▪"}return e}(c);var v=Yo(r);return n.jsx("div",{style:s},n.jsx("span",{contentEditable:!1,style:{marginRight:"0.5em",color:v},"data-w-e-reserve":!0},d),n.jsx("span",null,o))}}],editorPlugin:function(r){var n=r.deleteBackward,o=r.handleTab,i=r.normalizeNode,u=r.insertBreak,a=r;return a.insertBreak=function(){var n=gr(e.Editor.nodes(r,{match:function(e){return t.DomEditor.checkNodeType(e,"list-item")},universal:!0}),1)[0];return n?""!==n[0].children[0].text?u():void e.Transforms.setNodes(a,{type:"paragraph",ordered:void 0,level:void 0}):u()},a.deleteBackward=function(o){var i=a.selection;if(null!=i)if(e.Range.isExpanded(i))n(o);else{var u=t.DomEditor.getSelectedNodeByType(a,"list-item");if(null!=u)if(0!==i.focus.offset)n(o);else{var c=u,f=c.level,l=void 0===f?0:f,s=c.ordered,d=void 0!==s&&s;if(l>0){var p=Xo(r,u,l-1);p&&p.ordered!==d?e.Transforms.setNodes(a,{level:l-1,ordered:!d}):e.Transforms.setNodes(a,{level:l-1})}else e.Transforms.setNodes(a,{type:"paragraph",ordered:void 0,level:void 0})}else n(o)}else n(o)},a.handleTab=function(){var r,n,i,u,c=a.selection;if(null!=c){if(e.Range.isCollapsed(c)){var f=t.DomEditor.getSelectedNodeByType(a,"list-item");if(null==f)return void o();if(0===c.focus.offset){var l=f.level,s=void 0===l?0:l;return void e.Transforms.setNodes(a,{level:s+1})}}if(e.Range.isExpanded(c)){var d=0,p=!1;try{for(var v=hr(au(a)),y=v.next();!y.done;y=v.next()){var h=gr(y.value,1)[0];"list-item"===t.DomEditor.getNodeType(h)?d+=1:p=!0}}catch(t){r={error:t}}finally{try{y&&!y.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}if(p||d<=1)return void o();try{for(var g=hr(au(a)),b=g.next();!b.done;b=g.next()){var m=gr(b.value,2),w=(h=m[0],m[1]),x=h.level;s=void 0===x?0:x;e.Transforms.setNodes(a,{level:s+1},{at:w})}}catch(t){i={error:t}}finally{try{b&&!b.done&&(u=g.return)&&u.call(g)}finally{if(i)throw i.error}}}else o()}else o()},a.normalizeNode=function(r){var n=gr(r,2),o=n[0],u=n[1],c=t.DomEditor.getNodeType(o);return"bulleted-list"!==c&&"numbered-list"!==c||e.Transforms.unwrapNodes(a,{at:u}),i([o,u])},a},menus:[Pi,Ii],elemsToHtml:[Zo],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(t,e,r){return e.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(t,r,n){var o=i.default(t);0===(r=r.filter((function(t){return!!e.Text.isText(t)||!!n.isInline(t)}))).length&&(r=[{text:o.text().replace(/\s+/gm," ")}]);var u=function(t){return"ol"===uu(t.parent())}(o),a=function(t){for(var e=0,r=t.parent(),n=uu(r);"ul"===n||"ol"===n;)n=uu(r=r.parent()),e+=1;return e-1}(o);return{type:"list-item",ordered:u,level:a,children:r}}}]}}));
|
|
2
2
|
//# sourceMappingURL=index.js.map
|