!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@wangeditor/core"),require("slate"),require("snabbdom"),require("lodash.throttle"),require("dom7"),require("nanoid"),require("lodash.isequal")):"function"==typeof define&&define.amd?define(["@wangeditor/core","slate","snabbdom","lodash.throttle","dom7","nanoid","lodash.isequal"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorTableModule=e(t.core,t.slate,t.snabbdom,t.throttle,t.$,null,t.isEqual)}(this,(function(t,e,n,r,o,i,a){"use strict";function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=l(r),c=l(o),s=l(a);t.i18nAddResources("en",{tableModule:{deleteCol:"Delete column",deleteRow:"Delete row",deleteTable:"Delete table",widthAuto:"Width auto",insertCol:"Insert column",insertRow:"Insert row",insertTable:"Insert table",header:"Header"}}),t.i18nAddResources("zh-CN",{tableModule:{deleteCol:"删除列",deleteRow:"删除行",deleteTable:"删除表格",widthAuto:"宽度自适应",insertCol:"插入列",insertRow:"插入行",insertTable:"插入表格",header:"表头"}});var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(t){var e={exports:{}};return t(e,e.exports),e.exports}var p,v,h=function(t){return t&&t.Math==Math&&t},g=h("object"==typeof globalThis&&globalThis)||h("object"==typeof window&&window)||h("object"==typeof self&&self)||h("object"==typeof f&&f)||function(){return this}()||Function("return this")(),y=function(t){try{return!!t()}catch(t){return!0}},m=!y((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),b=Function.prototype.call,E=b.bind?b.bind(b):function(){return b.apply(b,arguments)},w={}.propertyIsEnumerable,x=Object.getOwnPropertyDescriptor,S={f:x&&!w.call({1:2},1)?function(t){var e=x(this,t);return!!e&&e.enumerable}:w},T=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},D=Function.prototype,N=D.bind,P=D.call,M=N&&N.bind(P),R=N?function(t){return t&&M(P,t)}:function(t){return t&&function(){return P.apply(t,arguments)}},O=R({}.toString),H=R("".slice),V=function(t){return H(O(t),8,-1)},z=g.Object,j=R("".split),L=y((function(){return!z("z").propertyIsEnumerable(0)}))?function(t){return"String"==V(t)?j(t,""):z(t)}:z,A=g.TypeError,C=function(t){if(null==t)throw A("Can't call method on "+t);return t},I=function(t){return L(C(t))},k=function(t){return"function"==typeof t},B=function(t){return"object"==typeof t?null!==t:k(t)},$=function(t){return k(t)?t:void 0},F=function(t,e){return arguments.length<2?$(g[t]):g[t]&&g[t][e]},q=R({}.isPrototypeOf),G=F("navigator","userAgent")||"",_=g.process,W=g.Deno,U=_&&_.versions||W&&W.version,X=U&&U.v8;X&&(v=(p=X.split("."))[0]>0&&p[0]<4?1:+(p[0]+p[1])),!v&&G&&(!(p=G.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=G.match(/Chrome\/(\d+)/))&&(v=+p[1]);var Y=v,K=!!Object.getOwnPropertySymbols&&!y((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Y&&Y<41})),J=K&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Q=g.Object,Z=J?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return k(e)&&q(e.prototype,Q(t))},tt=g.String,et=function(t){try{return tt(t)}catch(t){return"Object"}},nt=g.TypeError,rt=function(t){if(k(t))return t;throw nt(et(t)+" is not a function")},ot=function(t,e){var n=t[e];return null==n?void 0:rt(n)},it=g.TypeError,at=Object.defineProperty,lt=function(t,e){try{at(g,t,{value:e,configurable:!0,writable:!0})}catch(n){g[t]=e}return e},ut="__core-js_shared__",ct=g[ut]||lt(ut,{}),st=d((function(t){(t.exports=function(t,e){return ct[t]||(ct[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),ft=g.Object,dt=function(t){return ft(C(t))},pt=R({}.hasOwnProperty),vt=Object.hasOwn||function(t,e){return pt(dt(t),e)},ht=0,gt=Math.random(),yt=R(1..toString),mt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+yt(++ht+gt,36)},bt=st("wks"),Et=g.Symbol,wt=Et&&Et.for,xt=J?Et:Et&&Et.withoutSetter||mt,St=function(t){if(!vt(bt,t)||!K&&"string"!=typeof bt[t]){var e="Symbol."+t;K&&vt(Et,t)?bt[t]=Et[t]:bt[t]=J&&wt?wt(e):xt(e)}return bt[t]},Tt=g.TypeError,Dt=St("toPrimitive"),Nt=function(t,e){if(!B(t)||Z(t))return t;var n,r=ot(t,Dt);if(r){if(void 0===e&&(e="default"),n=E(r,t,e),!B(n)||Z(n))return n;throw Tt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&k(n=t.toString)&&!B(r=E(n,t)))return r;if(k(n=t.valueOf)&&!B(r=E(n,t)))return r;if("string"!==e&&k(n=t.toString)&&!B(r=E(n,t)))return r;throw it("Can't convert object to primitive value")}(t,e)},Pt=function(t){var e=Nt(t,"string");return Z(e)?e:e+""},Mt=g.document,Rt=B(Mt)&&B(Mt.createElement),Ot=function(t){return Rt?Mt.createElement(t):{}},Ht=!m&&!y((function(){return 7!=Object.defineProperty(Ot("div"),"a",{get:function(){return 7}}).a})),Vt=Object.getOwnPropertyDescriptor,zt={f:m?Vt:function(t,e){if(t=I(t),e=Pt(e),Ht)try{return Vt(t,e)}catch(t){}if(vt(t,e))return T(!E(S.f,t,e),t[e])}},jt=g.String,Lt=g.TypeError,At=function(t){if(B(t))return t;throw Lt(jt(t)+" is not an object")},Ct=g.TypeError,It=Object.defineProperty,kt={f:m?It:function(t,e,n){if(At(t),e=Pt(e),At(n),Ht)try{return It(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Ct("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Bt=m?function(t,e,n){return kt.f(t,e,T(1,n))}:function(t,e,n){return t[e]=n,t},$t=R(Function.toString);k(ct.inspectSource)||(ct.inspectSource=function(t){return $t(t)});var Ft,qt,Gt,_t=ct.inspectSource,Wt=g.WeakMap,Ut=k(Wt)&&/native code/.test(_t(Wt)),Xt=st("keys"),Yt=function(t){return Xt[t]||(Xt[t]=mt(t))},Kt={},Jt="Object already initialized",Qt=g.TypeError,Zt=g.WeakMap;if(Ut||ct.state){var te=ct.state||(ct.state=new Zt),ee=R(te.get),ne=R(te.has),re=R(te.set);Ft=function(t,e){if(ne(te,t))throw new Qt(Jt);return e.facade=t,re(te,t,e),e},qt=function(t){return ee(te,t)||{}},Gt=function(t){return ne(te,t)}}else{var oe=Yt("state");Kt[oe]=!0,Ft=function(t,e){if(vt(t,oe))throw new Qt(Jt);return e.facade=t,Bt(t,oe,e),e},qt=function(t){return vt(t,oe)?t[oe]:{}},Gt=function(t){return vt(t,oe)}}var ie={set:Ft,get:qt,has:Gt,enforce:function(t){return Gt(t)?qt(t):Ft(t,{})},getterFor:function(t){return function(e){var n;if(!B(e)||(n=qt(e)).type!==t)throw Qt("Incompatible receiver, "+t+" required");return n}}},ae=Function.prototype,le=m&&Object.getOwnPropertyDescriptor,ue=vt(ae,"name"),ce={EXISTS:ue,PROPER:ue&&"something"===function(){}.name,CONFIGURABLE:ue&&(!m||m&&le(ae,"name").configurable)},se=d((function(t){var e=ce.CONFIGURABLE,n=ie.get,r=ie.enforce,o=String(String).split("String");(t.exports=function(t,n,i,a){var l,u=!!a&&!!a.unsafe,c=!!a&&!!a.enumerable,s=!!a&&!!a.noTargetGet,f=a&&void 0!==a.name?a.name:n;k(i)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!vt(i,"name")||e&&i.name!==f)&&Bt(i,"name",f),(l=r(i)).source||(l.source=o.join("string"==typeof f?f:""))),t!==g?(u?!s&&t[n]&&(c=!0):delete t[n],c?t[n]=i:Bt(t,n,i)):c?t[n]=i:lt(n,i)})(Function.prototype,"toString",(function(){return k(this)&&n(this).source||_t(this)}))})),fe=Math.ceil,de=Math.floor,pe=function(t){var e=+t;return e!=e||0===e?0:(e>0?de:fe)(e)},ve=Math.max,he=Math.min,ge=function(t,e){var n=pe(t);return n<0?ve(n+e,0):he(n,e)},ye=Math.min,me=function(t){return t>0?ye(pe(t),9007199254740991):0},be=function(t){return me(t.length)},Ee=function(t){return function(e,n,r){var o,i=I(e),a=be(i),l=ge(r,a);if(t&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((t||l in i)&&i[l]===n)return t||l||0;return!t&&-1}},we={includes:Ee(!0),indexOf:Ee(!1)}.indexOf,xe=R([].push),Se=function(t,e){var n,r=I(t),o=0,i=[];for(n in r)!vt(Kt,n)&&vt(r,n)&&xe(i,n);for(;e.length>o;)vt(r,n=e[o++])&&(~we(i,n)||xe(i,n));return i},Te=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],De=Te.concat("length","prototype"),Ne={f:Object.getOwnPropertyNames||function(t){return Se(t,De)}},Pe={f:Object.getOwnPropertySymbols},Me=R([].concat),Re=F("Reflect","ownKeys")||function(t){var e=Ne.f(At(t)),n=Pe.f;return n?Me(e,n(t)):e},Oe=function(t,e){for(var n=Re(e),r=kt.f,o=zt.f,i=0;i3})))},{anchor:function(t){return e="a",n="name",r=t,o=Xe(C(this)),i="<"+e,""!==n&&(i+=" "+n+'="'+Ke(Xe(r),Ye,""")+'"'),i+">"+o+"";var e,n,r,o,i}});var Je,Qe=function(){var t=At(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Ze=g.RegExp,tn=y((function(){var t=Ze("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),en=tn||y((function(){return!Ze("a","y").sticky})),nn={BROKEN_CARET:tn||y((function(){var t=Ze("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:en,UNSUPPORTED_Y:tn},rn=Object.keys||function(t){return Se(t,Te)},on=m?Object.defineProperties:function(t,e){At(t);for(var n,r=I(e),o=rn(e),i=o.length,a=0;i>a;)kt.f(t,n=o[a++],r[n]);return t},an=F("document","documentElement"),ln=Yt("IE_PROTO"),un=function(){},cn=function(t){return"