import{e as _1,r as g4,s as lP,o as i$,w as v4,a as a$,ab as u$,g as t5,h as e5,G as s$,J as l$,A as yx,u as mx,l as c$}from"./vue.e266cb73.js";import{_ as f$}from"./_plugin-vue_export-helper.c27b6911.js";var se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function d$(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function as(t){var e={exports:{}};return t(e,e.exports),e.exports}var yi,z0,Bh=function(t){return t&&t.Math==Math&&t},kt=Bh(typeof globalThis=="object"&&globalThis)||Bh(typeof window=="object"&&window)||Bh(typeof self=="object"&&self)||Bh(typeof se=="object"&&se)||function(){return this}()||Function("return this")(),n5=Function.prototype,bx=n5.apply,p$=n5.bind,wx=n5.call,cP=typeof Reflect=="object"&&Reflect.apply||(p$?wx.bind(bx):function(){return wx.apply(bx,arguments)}),fP=Function.prototype,y4=fP.bind,m4=fP.call,h$=y4&&y4.bind(m4),ge=y4?function(t){return t&&h$(m4,t)}:function(t){return t&&function(){return m4.apply(t,arguments)}},sn=function(t){return typeof t=="function"},Gn=function(t){try{return!!t()}catch{return!0}},Hn=!Gn(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Oc=Function.prototype.call,zn=Oc.bind?Oc.bind(Oc):function(){return Oc.apply(Oc,arguments)},Ex={}.propertyIsEnumerable,Dx=Object.getOwnPropertyDescriptor,g$=Dx&&!Ex.call({1:2},1)?function(t){var e=Dx(this,t);return!!e&&e.enumerable}:Ex,r5={f:g$},Yr=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v$=ge({}.toString),y$=ge("".slice),Eu=function(t){return y$(v$(t),8,-1)},Hy=kt.Object,m$=ge("".split),dP=Gn(function(){return!Hy("z").propertyIsEnumerable(0)})?function(t){return Eu(t)=="String"?m$(t,""):Hy(t)}:Hy,b$=kt.TypeError,o5=function(t){if(t==null)throw b$("Can't call method on "+t);return t},Po=function(t){return dP(o5(t))},tr=function(t){return typeof t=="object"?t!==null:sn(t)},Qn={},Cx=function(t){return sn(t)?t:void 0},rc=function(t,e){return arguments.length<2?Cx(Qn[t])||Cx(kt[t]):Qn[t]&&Qn[t][e]||kt[t]&&kt[t][e]},Td=ge({}.isPrototypeOf),Vy=rc("navigator","userAgent")||"",xx=kt.process,Sx=kt.Deno,Ax=xx&&xx.versions||Sx&&Sx.version,Ox=Ax&&Ax.v8;Ox&&(z0=(yi=Ox.split("."))[0]>0&&yi[0]<4?1:+(yi[0]+yi[1])),!z0&&Vy&&(!(yi=Vy.match(/Edge\/(\d+)/))||yi[1]>=74)&&(yi=Vy.match(/Chrome\/(\d+)/))&&(z0=+yi[1]);var Fh,wg=z0,po=!!Object.getOwnPropertySymbols&&!Gn(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&wg&&wg<41}),i5=po&&!Symbol.sham&&typeof Symbol.iterator=="symbol",w$=kt.Object,pl=i5?function(t){return typeof t=="symbol"}:function(t){var e=rc("Symbol");return sn(e)&&Td(e.prototype,w$(t))},E$=kt.String,b4=function(t){try{return E$(t)}catch{return"Object"}},D$=kt.TypeError,a5=function(t){if(sn(t))return t;throw D$(b4(t)+" is not a function")},Eg=function(t,e){var n=t[e];return n==null?void 0:a5(n)},C$=kt.TypeError,x$=Object.defineProperty,ta=kt["__core-js_shared__"]||function(t,e){try{x$(kt,t,{value:e,configurable:!0,writable:!0})}catch{kt[t]=e}return e}("__core-js_shared__",{}),us=as(function(t){(t.exports=function(e,n){return ta[e]||(ta[e]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),S$=kt.Object,Bp=function(t){return S$(o5(t))},A$=ge({}.hasOwnProperty),Vt=Object.hasOwn||function(t,e){return A$(Bp(t),e)},O$=0,k$=Math.random(),B$=ge(1 .toString),Dg=function(t){return"Symbol("+(t===void 0?"":t)+")_"+B$(++O$+k$,36)},kc=us("wks"),Du=kt.Symbol,kx=Du&&Du.for,F$=i5?Du:Du&&Du.withoutSetter||Dg,Bn=function(t){if(!Vt(kc,t)||!po&&typeof kc[t]!="string"){var e="Symbol."+t;po&&Vt(Du,t)?kc[t]=Du[t]:kc[t]=i5&&kx?kx(e):F$(e)}return kc[t]},T$=kt.TypeError,_$=Bn("toPrimitive"),P$=function(t,e){if(!tr(t)||pl(t))return t;var n,r=Eg(t,_$);if(r){if(e===void 0&&(e="default"),n=zn(r,t,e),!tr(n)||pl(n))return n;throw T$("Can't convert object to primitive value")}return e===void 0&&(e="number"),function(o,i){var a,u;if(i==="string"&&sn(a=o.toString)&&!tr(u=zn(a,o))||sn(a=o.valueOf)&&!tr(u=zn(a,o))||i!=="string"&&sn(a=o.toString)&&!tr(u=zn(a,o)))return u;throw C$("Can't convert object to primitive value")}(t,e)},oc=function(t){var e=P$(t,"string");return pl(e)?e:e+""},w4=kt.document,j$=tr(w4)&&tr(w4.createElement),pP=function(t){return j$?w4.createElement(t):{}},hP=!Hn&&!Gn(function(){return Object.defineProperty(pP("div"),"a",{get:function(){return 7}}).a!=7}),Bx=Object.getOwnPropertyDescriptor,N$=Hn?Bx:function(t,e){if(t=Po(t),e=oc(e),hP)try{return Bx(t,e)}catch{}if(Vt(t,e))return Yr(!zn(r5.f,t,e),t[e])},P1={f:N$},I$=/#|\.prototype\./,Fp=function(t,e){var n=R$[L$(t)];return n==z$||n!=M$&&(sn(e)?Gn(e):!!e)},L$=Fp.normalize=function(t){return String(t).replace(I$,".").toLowerCase()},R$=Fp.data={},M$=Fp.NATIVE="N",z$=Fp.POLYFILL="P",$$=Fp,Fx=ge(ge.bind),u5=function(t,e){return a5(t),e===void 0?t:Fx?Fx(t,e):function(){return t.apply(e,arguments)}},H$=kt.String,V$=kt.TypeError,ar=function(t){if(tr(t))return t;throw V$(H$(t)+" is not an object")},U$=kt.TypeError,Tx=Object.defineProperty,W$=Hn?Tx:function(t,e,n){if(ar(t),e=oc(e),ar(n),hP)try{return Tx(t,e,n)}catch{}if("get"in n||"set"in n)throw U$("Accessors not supported");return"value"in n&&(t[e]=n.value),t},ja={f:W$},_n=Hn?function(t,e,n){return ja.f(t,e,Yr(1,n))}:function(t,e,n){return t[e]=n,t},G$=P1.f,q$=function(t){var e=function(n,r,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,o)}return cP(t,this,arguments)};return e.prototype=t.prototype,e},qo=function(t,e){var n,r,o,i,a,u,s,l,c=t.target,f=t.global,p=t.stat,d=t.proto,y=f?kt:p?kt[c]:(kt[c]||{}).prototype,g=f?Qn:Qn[c]||_n(Qn,c,{})[c],v=g.prototype;for(o in e)n=!$$(f?o:c+(p?".":"#")+o,t.forced)&&y&&Vt(y,o),a=g[o],n&&(u=t.noTargetGet?(l=G$(y,o))&&l.value:y[o]),i=n&&u?u:e[o],n&&typeof a==typeof i||(s=t.bind&&n?u5(i,kt):t.wrap&&n?q$(i):d&&sn(i)?ge(i):i,(t.sham||i&&i.sham||a&&a.sham)&&_n(s,"sham",!0),_n(g,o,s),d&&(Vt(Qn,r=c+"Prototype")||_n(Qn,r,{}),_n(Qn[r],o,i),t.real&&v&&!v[o]&&_n(v,o,i)))},_x=us("keys"),j1=function(t){return _x[t]||(_x[t]=Dg(t))},K$=!Gn(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Px=j1("IE_PROTO"),E4=kt.Object,Y$=E4.prototype,Cg=K$?E4.getPrototypeOf:function(t){var e=Bp(t);if(Vt(e,Px))return e[Px];var n=e.constructor;return sn(n)&&e instanceof n?n.prototype:e instanceof E4?Y$:null},X$=kt.String,Z$=kt.TypeError,xg=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=ge(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch{}return function(r,o){return ar(r),function(i){if(typeof i=="object"||sn(i))return i;throw Z$("Can't set "+X$(i)+" as a prototype")}(o),e?t(r,o):r.__proto__=o,r}}():void 0),J$=Math.ceil,Q$=Math.floor,s5=function(t){var e=+t;return e!=e||e===0?0:(e>0?Q$:J$)(e)},tH=Math.max,eH=Math.min,D4=function(t,e){var n=s5(t);return n<0?tH(n+e,0):eH(n,e)},nH=Math.min,Tp=function(t){return(e=t.length)>0?nH(s5(e),9007199254740991):0;var e},jx=function(t){return function(e,n,r){var o,i=Po(e),a=Tp(i),u=D4(r,a);if(t&&n!=n){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===n)return t||u||0;return!t&&-1}},rH={includes:jx(!0),indexOf:jx(!1)},_p={},oH=rH.indexOf,Nx=ge([].push),gP=function(t,e){var n,r=Po(t),o=0,i=[];for(n in r)!Vt(_p,n)&&Vt(r,n)&&Nx(i,n);for(;e.length>o;)Vt(r,n=e[o++])&&(~oH(i,n)||Nx(i,n));return i},Sg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],iH=Sg.concat("length","prototype"),aH=Object.getOwnPropertyNames||function(t){return gP(t,iH)},l5={f:aH},$0={f:Object.getOwnPropertySymbols},uH=ge([].concat),sH=rc("Reflect","ownKeys")||function(t){var e=l5.f(ar(t)),n=$0.f;return n?uH(e,n(t)):e},c5=Object.keys||function(t){return gP(t,Sg)},lH=Hn?Object.defineProperties:function(t,e){ar(t);for(var n,r=Po(e),o=c5(e),i=o.length,a=0;i>a;)ja.f(t,n=o[a++],r[n]);return t},cH=rc("document","documentElement"),vP=j1("IE_PROTO"),Uy=function(){},yP=function(t){return""},Ix=function(t){t.write(yP("")),t.close();var e=t.parentWindow.Object;return t=null,e},H0=function(){try{Fh=new ActiveXObject("htmlfile")}catch{}var t,e;H0=typeof document<"u"?document.domain&&Fh?Ix(Fh):((e=pP("iframe")).style.display="none",cH.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(yP("document.F=Object")),t.close(),t.F):Ix(Fh);for(var n=Sg.length;n--;)delete H0.prototype[Sg[n]];return H0()};_p[vP]=!0;var oi=Object.create||function(t,e){var n;return t!==null?(Uy.prototype=ar(t),n=new Uy,Uy.prototype=null,n[vP]=t):n=H0(),e===void 0?n:lH(n,e)},C4=function(t,e,n){var r=oc(e);r in t?ja.f(t,r,Yr(0,n)):t[r]=n},fH=kt.Array,dH=Math.max,mP=function(t,e,n){for(var r=Tp(t),o=D4(e,r),i=D4(n===void 0?r:n,r),a=fH(dH(i-o,0)),u=0;oi;i++)if((u=v(t[i]))&&Td(Mx,u))return u;return new V0(!1)}r=function(m,h){var b=arguments.length<2?Lx(m):h;if(a5(b))return ar(zn(b,m));throw AH(b4(m)+" is not iterable")}(t,o)}for(s=r.next;!(l=zn(s,r)).done;){try{u=v(l.value)}catch(m){Rx(r,"throw",m)}if(typeof u=="object"&&u&&Td(Mx,u))return u}return new V0(!1)},BH=kt.String,_d=function(t){if(Pp(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return BH(t)},FH=function(t,e){return t===void 0?arguments.length<2?"":e:_d(t)},TH=!Gn(function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",Yr(1,7)),t.stack!==7)}),_H=Bn("toStringTag"),Ag=kt.Error,PH=[].push,Pd=function(t,e){var n,r=arguments.length>2?arguments[2]:void 0,o=Td(Wy,this);xg?n=xg(new Ag(void 0),o?Cg(this):Wy):(n=o?this:oi(Wy),_n(n,_H,"Error")),_n(n,"message",FH(e,"")),TH&&_n(n,"stack",mH(n.stack,1)),bH(n,r);var i=[];return kH(t,PH,{that:i}),_n(n,"errors",i),n};xg?xg(Pd,Ag):function(t,e){for(var n=sH(e),r=ja.f,o=P1.f,i=0;i=e.length?(t.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values"),ti.Arguments=ti.Array;var XH=ge("".charAt),Wx=ge("".charCodeAt),ZH=ge("".slice),Gx=function(t){return function(e,n){var r,o,i=_d(o5(e)),a=s5(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=Wx(i,a))<55296||r>56319||a+1===u||(o=Wx(i,a+1))<56320||o>57343?t?XH(i,a):r:t?ZH(i,a,a+2):o-56320+(r-55296<<10)+65536}},JH={codeAt:Gx(!1),charAt:Gx(!0)}.charAt,QH=ic.set,tV=ic.getterFor("String Iterator");SP(String,"String",function(t){QH(this,{type:"String Iterator",string:_d(t),index:0})},function(){var t,e=tV(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=JH(n,r),e.index+=t.length,{value:t,done:!1})});var eV=Qn.AggregateError,qx=Bn("toStringTag");for(var Ky in{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}){var Kx=kt[Ky],Yy=Kx&&Kx.prototype;Yy&&Pp(Yy)!==qx&&_n(Yy,qx,Ky),ti[Ky]=ti.Array}var mi,U0,nV=eV,_h=function(t){return t&&t.Math==Math&&t},Et=_h(typeof globalThis=="object"&&globalThis)||_h(typeof window=="object"&&window)||_h(typeof self=="object"&&self)||_h(typeof se=="object"&&se)||function(){return this}()||Function("return this")(),cn=function(t){try{return!!t()}catch{return!0}},Ao=!cn(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Bc=Function.prototype.call,un=Bc.bind?Bc.bind(Bc):function(){return Bc.apply(Bc,arguments)},Yx={}.propertyIsEnumerable,Xx=Object.getOwnPropertyDescriptor,rV=Xx&&!Yx.call({1:2},1)?function(t){var e=Xx(this,t);return!!e&&e.enumerable}:Yx,oV={f:rV},ea=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},AP=Function.prototype,O4=AP.bind,k4=AP.call,iV=O4&&O4.bind(k4),ie=O4?function(t){return t&&iV(k4,t)}:function(t){return t&&function(){return k4.apply(t,arguments)}},aV=ie({}.toString),uV=ie("".slice),Cu=function(t){return uV(aV(t),8,-1)},Xy=Et.Object,sV=ie("".split),OP=cn(function(){return!Xy("z").propertyIsEnumerable(0)})?function(t){return Cu(t)=="String"?sV(t,""):Xy(t)}:Xy,lV=Et.TypeError,N1=function(t){if(t==null)throw lV("Can't call method on "+t);return t},ac=function(t){return OP(N1(t))},Ge=function(t){return typeof t=="function"},Vr=function(t){return typeof t=="object"?t!==null:Ge(t)},cV=function(t){return Ge(t)?t:void 0},jp=function(t,e){return arguments.length<2?cV(Et[t]):Et[t]&&Et[t][e]},Fg=ie({}.isPrototypeOf),Zy=jp("navigator","userAgent")||"",Zx=Et.process,Jx=Et.Deno,Qx=Zx&&Zx.versions||Jx&&Jx.version,tS=Qx&&Qx.v8;tS&&(U0=(mi=tS.split("."))[0]>0&&mi[0]<4?1:+(mi[0]+mi[1])),!U0&&Zy&&(!(mi=Zy.match(/Edge\/(\d+)/))||mi[1]>=74)&&(mi=Zy.match(/Chrome\/(\d+)/))&&(U0=+mi[1]);var eS=U0,B4=!!Object.getOwnPropertySymbols&&!cn(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&eS&&eS<41}),d5=B4&&!Symbol.sham&&typeof Symbol.iterator=="symbol",fV=Et.Object,F4=d5?function(t){return typeof t=="symbol"}:function(t){var e=jp("Symbol");return Ge(e)&&Fg(e.prototype,fV(t))},dV=Et.String,T4=function(t){try{return dV(t)}catch{return"Object"}},pV=Et.TypeError,p5=function(t){if(Ge(t))return t;throw pV(T4(t)+" is not a function")},jd=function(t,e){var n=t[e];return n==null?void 0:p5(n)},hV=Et.TypeError,gV=Object.defineProperty,h5=function(t,e){try{gV(Et,t,{value:e,configurable:!0,writable:!0})}catch{Et[t]=e}return e},na=Et["__core-js_shared__"]||h5("__core-js_shared__",{}),g5=as(function(t){(t.exports=function(e,n){return na[e]||(na[e]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),vV=Et.Object,v5=function(t){return vV(N1(t))},yV=ie({}.hasOwnProperty),Vn=Object.hasOwn||function(t,e){return yV(v5(t),e)},mV=0,bV=Math.random(),wV=ie(1 .toString),kP=function(t){return"Symbol("+(t===void 0?"":t)+")_"+wV(++mV+bV,36)},Fc=g5("wks"),xu=Et.Symbol,nS=xu&&xu.for,EV=d5?xu:xu&&xu.withoutSetter||kP,Nn=function(t){if(!Vn(Fc,t)||!B4&&typeof Fc[t]!="string"){var e="Symbol."+t;B4&&Vn(xu,t)?Fc[t]=xu[t]:Fc[t]=d5&&nS?nS(e):EV(e)}return Fc[t]},DV=Et.TypeError,CV=Nn("toPrimitive"),xV=function(t,e){if(!Vr(t)||F4(t))return t;var n,r=jd(t,CV);if(r){if(e===void 0&&(e="default"),n=un(r,t,e),!Vr(n)||F4(n))return n;throw DV("Can't convert object to primitive value")}return e===void 0&&(e="number"),function(o,i){var a,u;if(i==="string"&&Ge(a=o.toString)&&!Vr(u=un(a,o))||Ge(a=o.valueOf)&&!Vr(u=un(a,o))||i!=="string"&&Ge(a=o.toString)&&!Vr(u=un(a,o)))return u;throw hV("Can't convert object to primitive value")}(t,e)},y5=function(t){var e=xV(t,"string");return F4(e)?e:e+""},_4=Et.document,SV=Vr(_4)&&Vr(_4.createElement),m5=function(t){return SV?_4.createElement(t):{}},BP=!Ao&&!cn(function(){return Object.defineProperty(m5("div"),"a",{get:function(){return 7}}).a!=7}),rS=Object.getOwnPropertyDescriptor,AV=Ao?rS:function(t,e){if(t=ac(t),e=y5(e),BP)try{return rS(t,e)}catch{}if(Vn(t,e))return ea(!un(oV.f,t,e),t[e])},b5={f:AV},OV=Et.String,kV=Et.TypeError,ur=function(t){if(Vr(t))return t;throw kV(OV(t)+" is not an object")},BV=Et.TypeError,oS=Object.defineProperty,FV=Ao?oS:function(t,e,n){if(ur(t),e=y5(e),ur(n),BP)try{return oS(t,e,n)}catch{}if("get"in n||"set"in n)throw BV("Accessors not supported");return"value"in n&&(t[e]=n.value),t},uc={f:FV},jn=Ao?function(t,e,n){return uc.f(t,e,ea(1,n))}:function(t,e,n){return t[e]=n,t},TV=ie(Function.toString);Ge(na.inspectSource)||(na.inspectSource=function(t){return TV(t)});var Tg,id,_g,w5=na.inspectSource,iS=Et.WeakMap,_V=Ge(iS)&&/native code/.test(w5(iS)),aS=g5("keys"),E5=function(t){return aS[t]||(aS[t]=kP(t))},D5={},P4=Et.TypeError,PV=Et.WeakMap;if(_V||na.state){var qa=na.state||(na.state=new PV),jV=ie(qa.get),uS=ie(qa.has),NV=ie(qa.set);Tg=function(t,e){if(uS(qa,t))throw new P4("Object already initialized");return e.facade=t,NV(qa,t,e),e},id=function(t){return jV(qa,t)||{}},_g=function(t){return uS(qa,t)}}else{var xs=E5("state");D5[xs]=!0,Tg=function(t,e){if(Vn(t,xs))throw new P4("Object already initialized");return e.facade=t,jn(t,xs,e),e},id=function(t){return Vn(t,xs)?t[xs]:{}},_g=function(t){return Vn(t,xs)}}var Wu={set:Tg,get:id,has:_g,enforce:function(t){return _g(t)?id(t):Tg(t,{})},getterFor:function(t){return function(e){var n;if(!Vr(e)||(n=id(e)).type!==t)throw P4("Incompatible receiver, "+t+" required");return n}}},FP=Function.prototype,IV=Ao&&Object.getOwnPropertyDescriptor,Jy=Vn(FP,"name"),C5={EXISTS:Jy,PROPER:Jy&&function(){}.name==="something",CONFIGURABLE:Jy&&(!Ao||Ao&&IV(FP,"name").configurable)},ra=as(function(t){var e=C5.CONFIGURABLE,n=Wu.get,r=Wu.enforce,o=String(String).split("String");(t.exports=function(i,a,u,s){var l,c=!!s&&!!s.unsafe,f=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet,d=s&&s.name!==void 0?s.name:a;Ge(u)&&(String(d).slice(0,7)==="Symbol("&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Vn(u,"name")||e&&u.name!==d)&&jn(u,"name",d),(l=r(u)).source||(l.source=o.join(typeof d=="string"?d:""))),i!==Et?(c?!p&&i[a]&&(f=!0):delete i[a],f?i[a]=u:jn(i,a,u)):f?i[a]=u:h5(a,u)})(Function.prototype,"toString",function(){return Ge(this)&&n(this).source||w5(this)})}),LV=Math.ceil,RV=Math.floor,x5=function(t){var e=+t;return e!=e||e===0?0:(e>0?RV:LV)(e)},MV=Math.max,zV=Math.min,j4=function(t,e){var n=x5(t);return n<0?MV(n+e,0):zV(n,e)},$V=Math.min,TP=function(t){return t>0?$V(x5(t),9007199254740991):0},I1=function(t){return TP(t.length)},sS=function(t){return function(e,n,r){var o,i=ac(e),a=I1(i),u=j4(r,a);if(t&&n!=n){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===n)return t||u||0;return!t&&-1}},HV={includes:sS(!0),indexOf:sS(!1)}.indexOf,lS=ie([].push),_P=function(t,e){var n,r=ac(t),o=0,i=[];for(n in r)!Vn(D5,n)&&Vn(r,n)&&lS(i,n);for(;e.length>o;)Vn(r,n=e[o++])&&(~HV(i,n)||lS(i,n));return i},Pg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],VV=Pg.concat("length","prototype"),UV=Object.getOwnPropertyNames||function(t){return _P(t,VV)},WV={f:UV},GV={f:Object.getOwnPropertySymbols},qV=ie([].concat),KV=jp("Reflect","ownKeys")||function(t){var e=WV.f(ur(t)),n=GV.f;return n?qV(e,n(t)):e},PP=function(t,e){for(var n=KV(e),r=uc.f,o=b5.f,i=0;ia;)uc.f(t,n=o[a++],r[n]);return t},dU=jp("document","documentElement"),NP=E5("IE_PROTO"),Qy=function(){},IP=function(t){return""},cS=function(t){t.write(IP("")),t.close();var e=t.parentWindow.Object;return t=null,e},W0=function(){try{Ph=new ActiveXObject("htmlfile")}catch{}var t,e;W0=typeof document<"u"?document.domain&&Ph?cS(Ph):((e=m5("iframe")).style.display="none",dU.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(IP("document.F=Object")),t.close(),t.F):cS(Ph);for(var n=Pg.length;n--;)delete W0.prototype[Pg[n]];return W0()};D5[NP]=!0;var fS,tm,Lp=Object.create||function(t,e){var n;return t!==null?(Qy.prototype=ur(t),n=new Qy,Qy.prototype=null,n[NP]=t):n=W0(),e===void 0?n:fU(n,e)},pU=Et.RegExp,hU=cn(function(){var t=pU(".","s");return!(t.dotAll&&t.exec(` `)&&t.flags==="s")}),gU=Et.RegExp,vU=cn(function(){var t=gU("(?b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$c")!=="bc"}),yU=Wu.get,mU=g5("native-string-replace",String.prototype.replace),jg=RegExp.prototype.exec,N4=jg,bU=ie("".charAt),wU=ie("".indexOf),EU=ie("".replace),em=ie("".slice),nm=(tm=/b*/g,un(jg,fS=/a/,"a"),un(jg,tm,"a"),fS.lastIndex!==0||tm.lastIndex!==0),dS=lU.BROKEN_CARET,rm=/()??/.exec("")[1]!==void 0;(nm||rm||dS||hU||vU)&&(N4=function(t){var e,n,r,o,i,a,u,s=this,l=yU(s),c=Su(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=un(N4,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=dS&&s.sticky,y=un(aU,s),g=s.source,v=0,m=c;if(d&&(y=EU(y,"y",""),wU(y,"g")===-1&&(y+="g"),m=em(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&bU(c,s.lastIndex-1)!==` `)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),rm&&(n=new RegExp("^"+g+"$(?!\\s)",y)),nm&&(r=s.lastIndex),o=un(jg,d?n:s,m),d?o?(o.input=em(o.input,v),o[0]=em(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:nm&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),rm&&o&&o.length>1&&un(mU,o[0],n,function(){for(i=1;i=u?t?"":void 0:(r=pS(i,a))<55296||r>56319||a+1===u||(o=pS(i,a+1))<56320||o>57343?t?CU(i,a):r:t?xU(i,a,a+2):o-56320+(r-55296<<10)+65536}},LP={codeAt:hS(!1),charAt:hS(!0)},SU=LP.charAt,AU=function(t,e,n){return e+(n?SU(t,e).length:1)},OU=Et.TypeError,gS=function(t,e){var n=t.exec;if(Ge(n)){var r=un(n,t,e);return r!==null&&ur(r),r}if(Cu(t)==="RegExp")return un(Ng,t,e);throw OU("RegExp#exec called on incompatible receiver")};(function(t,e,n,r){var o=Nn(t),i=!cn(function(){var l={};return l[o]=function(){return 7},""[t](l)!=7}),a=i&&!cn(function(){var l=!1,c=/a/;return t==="split"&&((c={}).constructor={},c.constructor[DU]=function(){return c},c.flags="",c[o]=/./[o]),c.exec=function(){return l=!0,null},c[o](""),!l});if(!i||!a||n){var u=ie(/./[o]),s=e(o,""[t],function(l,c,f,p,d){var y=ie(l),g=c.exec;return g===Ng||g===om.exec?i&&!d?{done:!0,value:u(c,f,p)}:{done:!0,value:y(f,c,p)}:{done:!1}});ra(String.prototype,t,s[0]),ra(om,o,s[1])}r&&jn(om[o],"sham",!0)})("match",function(t,e,n){return[function(r){var o=N1(this),i=r==null?void 0:jd(r,t);return i?un(i,r,o):new RegExp(r)[t](Su(o))},function(r){var o=ur(this),i=Su(r),a=n(e,o,i);if(a.done)return a.value;if(!o.global)return gS(o,i);var u=o.unicode;o.lastIndex=0;for(var s,l=[],c=0;(s=gS(o,i))!==null;){var f=Su(s[0]);l[c]=f,f===""&&(o.lastIndex=AU(i,TP(o.lastIndex),u)),c++}return c===0?null:l}]}),Ip({global:!0},{globalThis:Et});var kU=!cn(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),vS=E5("IE_PROTO"),I4=Et.Object,BU=I4.prototype,Nd=kU?I4.getPrototypeOf:function(t){var e=v5(t);if(Vn(e,vS))return e[vS];var n=e.constructor;return Ge(n)&&e instanceof n?n.prototype:e instanceof I4?BU:null},FU=Et.String,TU=Et.TypeError,Ol=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=ie(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch{}return function(r,o){return ur(r),function(i){if(typeof i=="object"||Ge(i))return i;throw TU("Can't set "+FU(i)+" as a prototype")}(o),e?t(r,o):r.__proto__=o,r}}():void 0),_U=Et.Array,PU=Math.max,jU=ie("".replace),NU=ie("".split),IU=ie([].join),L4=String(Error("zxcasd").stack),RP=/\n\s*at [^:]*:[^\n]*/,LU=RP.test(L4),RU=/@[^\n]*\n/.test(L4)&&!/zxcasd/.test(L4),MU=function(t,e){if(typeof t!="string")return t;if(LU)for(;e--;)t=jU(t,RP,"");else if(RU)return IU(function(n,r,o){for(var i,a,u,s,l=I1(n),c=j4(r,l),f=j4(o===void 0?l:o,l),p=_U(PU(f-c,0)),d=0;ci;i++)if((u=v(t[i]))&&Fg(wS,u))return u;return new G0(!1)}r=function(m,h){var b=arguments.length<2?mS(m):h;if(p5(b))return ur(un(b,m));throw UU(T4(m)+" is not iterable")}(t,o)}for(s=r.next;!(l=un(s,r)).done;){try{u=v(l.value)}catch(m){bS(r,"throw",m)}if(typeof u=="object"&&u&&Fg(wS,u))return u}return new G0(!1)},qU=function(t,e){return t===void 0?arguments.length<2?"":e:Su(t)},KU=!cn(function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",ea(1,7)),t.stack!==7)}),YU=Nn("toStringTag"),Ig=Et.Error,XU=[].push,Id=function(t,e){var n,r=arguments.length>2?arguments[2]:void 0,o=Fg(im,this);Ol?n=Ol(new Ig(void 0),o?Nd(this):im):(n=o?this:Lp(im),jn(n,YU,"Error")),jn(n,"message",qU(e,"")),KU&&jn(n,"stack",MU(n.stack,1)),zU(n,r);var i=[];return GU(t,XU,{that:i}),jn(n,"errors",i),n};Ol?Ol(Id,Ig):PP(Id,Ig);var im=Id.prototype=Lp(Ig.prototype,{constructor:ea(1,Id),message:ea(1,""),name:ea(1,"AggregateError")});Ip({global:!0},{AggregateError:Id});var R4=Nn("unscopables"),M4=Array.prototype;M4[R4]==null&&uc.f(M4,R4,{configurable:!0,value:Lp(null)});var Au,ES,DS,am=function(t){M4[R4][t]=!0},z4=Nn("iterator"),zP=!1;[].keys&&("next"in(DS=[].keys())?(ES=Nd(Nd(DS)))!==Object.prototype&&(Au=ES):zP=!0);var ZU=Au==null||cn(function(){var t={};return Au[z4].call(t)!==t});ZU&&(Au={}),Ge(Au[z4])||ra(Au,z4,function(){return this});var k5={IteratorPrototype:Au,BUGGY_SAFARI_ITERATORS:zP},JU=uc.f,CS=Nn("toStringTag"),xS=function(t,e,n){t&&!Vn(t=n?t:t.prototype,CS)&&JU(t,CS,{configurable:!0,value:e})},QU=k5.IteratorPrototype,tW=function(){return this},eW=C5.PROPER,nW=C5.CONFIGURABLE,SS=k5.IteratorPrototype,jh=k5.BUGGY_SAFARI_ITERATORS,Tc=Nn("iterator"),rW=function(){return this},$P=function(t,e,n,r,o,i,a){(function(m,h,b,w){var D=h+" Iterator";m.prototype=Lp(QU,{next:ea(+!w,b)}),xS(m,D,!1),kl[D]=tW})(n,e,r);var u,s,l,c=function(m){if(m===o&&g)return g;if(!jh&&m in d)return d[m];switch(m){case"keys":case"values":case"entries":return function(){return new n(this,m)}}return function(){return new n(this)}},f=e+" Iterator",p=!1,d=t.prototype,y=d[Tc]||d["@@iterator"]||o&&d[o],g=!jh&&y||c(o),v=e=="Array"&&d.entries||y;if(v&&(u=Nd(v.call(new t)))!==Object.prototype&&u.next&&(Nd(u)!==SS&&(Ol?Ol(u,SS):Ge(u[Tc])||ra(u,Tc,rW)),xS(u,f,!0)),eW&&o=="values"&&y&&y.name!=="values"&&(nW?jn(d,"name","values"):(p=!0,g=function(){return un(y,this)})),o)if(s={values:c("values"),keys:i?g:c("keys"),entries:c("entries")},a)for(l in s)(jh||p||!(l in d))&&ra(d,l,s[l]);else Ip({target:e,proto:!0,forced:jh||p},s);return d[Tc]!==g&&ra(d,Tc,g,{name:o}),kl[e]=g,s},oW=Wu.set,iW=Wu.getterFor("Array Iterator"),Kf=$P(Array,"Array",function(t,e){oW(this,{type:"Array Iterator",target:ac(t),index:0,kind:e})},function(){var t=iW(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values");kl.Arguments=kl.Array,am("keys"),am("values"),am("entries");var aW=LP.charAt,uW=Wu.set,sW=Wu.getterFor("String Iterator");$P(String,"String",function(t){uW(this,{type:"String Iterator",string:Su(t),index:0})},function(){var t,e=sW(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=aW(n,r),e.index+=t.length,{value:t,done:!1})});var um,Lg={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},sm=m5("span").classList,AS=sm&&sm.constructor&&sm.constructor.prototype,HP=AS===Object.prototype?void 0:AS,lm=Nn("iterator"),OS=Nn("toStringTag"),cm=Kf.values,VP=function(t,e){if(t){if(t[lm]!==cm)try{jn(t,lm,cm)}catch{t[lm]=cm}if(t[OS]||jn(t,OS,e),Lg[e]){for(var n in Kf)if(t[n]!==Kf[n])try{jn(t,n,Kf[n])}catch{t[n]=Kf[n]}}}};for(var fm in Lg)VP(Et[fm]&&Et[fm].prototype,fm);VP(HP,"DOMTokenList"),typeof global>"u"?("ActiveXObject"in window&&console.error(`抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器 Sorry, wangEditor V5+ versions do not support IE browser.`),kS(),BS()):global&&((um=global.navigator)===null||um===void 0?void 0:um.userAgent.match("QQBrowser"))&&(kS(),BS());function kS(){typeof globalThis>"u"&&(window.globalThis=window)}function BS(){nV===void 0&&(window.AggregateError=function(t,e){var n=new Error(e);return n.errors=t,n})}var FS,Rg=Array.isArray||function(t){return Eu(t)=="Array"},UP=function(){},lW=[],WP=rc("Reflect","construct"),B5=/^\s*(?:class|function)\b/,cW=ge(B5.exec),fW=!B5.exec(UP),_c=function(t){if(!sn(t))return!1;try{return WP(UP,lW,t),!0}catch{return!1}},dW=!WP||Gn(function(){var t;return _c(_c.call)||!_c(Object)||!_c(function(){t=!0})||t})?function(t){if(!sn(t))return!1;switch(Pp(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return fW||!!cW(B5,EP(t))}:_c,pW=Bn("species"),TS=kt.Array,GP=function(t,e){return new(function(n){var r;return Rg(n)&&(r=n.constructor,(dW(r)&&(r===TS||Rg(r.prototype))||tr(r)&&(r=r[pW])===null)&&(r=void 0)),r===void 0?TS:r}(t))(e===0?0:e)},hW=Bn("species"),qP=Bn("isConcatSpreadable"),_S=kt.TypeError,gW=wg>=51||!Gn(function(){var t=[];return t[qP]=!1,t.concat()[0]!==t}),vW=(FS="concat",wg>=51||!Gn(function(){var t=[];return(t.constructor={})[hW]=function(){return{foo:1}},t[FS](Boolean).foo!==1})),yW=function(t){if(!tr(t))return!1;var e=t[qP];return e!==void 0?!!e:Rg(t)};qo({target:"Array",proto:!0,forced:!gW||!vW},{concat:function(t){var e,n,r,o,i,a=Bp(this),u=GP(a,0),s=0;for(e=-1,r=arguments.length;e9007199254740991)throw _S("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw _S("Maximum allowed index exceeded");C4(u,s++,i)}return u.length=s,u}});var PS=l5.f,jS=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],KP={f:function(t){return jS&&Eu(t)=="Window"?function(e){try{return PS(e)}catch{return mP(jS)}}(t):PS(Po(t))}},mW=ge([].slice),F5={f:Bn},bW=ja.f,je=function(t){var e=Qn.Symbol||(Qn.Symbol={});Vt(e,t)||bW(e,t,{value:F5.f(t)})},NS=ge([].push),bi=function(t){var e=t==1,n=t==2,r=t==3,o=t==4,i=t==6,a=t==7,u=t==5||i;return function(s,l,c,f){for(var p,d,y=Bp(s),g=dP(y),v=u5(l,c),m=Tp(g),h=0,b=f||GP,w=e?b(s,m):n||a?b(s,0):void 0;m>h;h++)if((u||h in g)&&(d=v(p=g[h],h,y),t))if(e)w[h]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return h;case 2:NS(w,p)}else switch(t){case 4:return!1;case 7:NS(w,p)}return i?-1:r||o?o:w}},R1={forEach:bi(0),map:bi(1),filter:bi(2),some:bi(3),every:bi(4),find:bi(5),findIndex:bi(6),filterReject:bi(7)}.forEach,Rn=j1("hidden"),IS=Bn("toPrimitive"),wW=ic.set,LS=ic.getterFor("Symbol"),Gr=Object.prototype,Ui=kt.Symbol,Yi=Ui&&Ui.prototype,RS=kt.TypeError,dm=kt.QObject,Pc=rc("JSON","stringify"),YP=P1.f,Wi=ja.f,XP=KP.f,EW=r5.f,ZP=ge([].push),ii=us("symbols"),Rp=us("op-symbols"),pm=us("string-to-symbol-registry"),hm=us("symbol-to-string-registry"),DW=us("wks"),gm=!dm||!dm.prototype||!dm.prototype.findChild,$4=Hn&&Gn(function(){return oi(Wi({},"a",{get:function(){return Wi(this,"a",{value:7}).a}})).a!=7})?function(t,e,n){var r=YP(Gr,e);r&&delete Gr[e],Wi(t,e,n),r&&t!==Gr&&Wi(Gr,e,r)}:Wi,vm=function(t,e){var n=ii[t]=oi(Yi);return wW(n,{type:"Symbol",tag:t,description:e}),Hn||(n.description=e),n},Mg=function(t,e,n){t===Gr&&Mg(Rp,e,n),ar(t);var r=oc(e);return ar(n),Vt(ii,r)?(n.enumerable?(Vt(t,Rn)&&t[Rn][r]&&(t[Rn][r]=!1),n=oi(n,{enumerable:Yr(0,!1)})):(Vt(t,Rn)||Wi(t,Rn,Yr(1,{})),t[Rn][r]=!0),$4(t,r,n)):Wi(t,r,n)},MS=function(t,e){ar(t);var n=Po(e),r=c5(n).concat(H4(n));return R1(r,function(o){Hn&&!zn(JP,n,o)||Mg(t,o,n[o])}),t},JP=function(t){var e=oc(t),n=zn(EW,this,e);return!(this===Gr&&Vt(ii,e)&&!Vt(Rp,e))&&(!(n||!Vt(this,e)||!Vt(ii,e)||Vt(this,Rn)&&this[Rn][e])||n)},zS=function(t,e){var n=Po(t),r=oc(e);if(n!==Gr||!Vt(ii,r)||Vt(Rp,r)){var o=YP(n,r);return!o||!Vt(ii,r)||Vt(n,Rn)&&n[Rn][r]||(o.enumerable=!0),o}},$S=function(t){var e=XP(Po(t)),n=[];return R1(e,function(r){Vt(ii,r)||Vt(_p,r)||ZP(n,r)}),n},H4=function(t){var e=t===Gr,n=XP(e?Rp:Po(t)),r=[];return R1(n,function(o){!Vt(ii,o)||e&&!Vt(Gr,o)||ZP(r,ii[o])}),r};if(po||(Yi=(Ui=function(){if(Td(Yi,this))throw RS("Symbol is not a constructor");var t=arguments.length&&arguments[0]!==void 0?_d(arguments[0]):void 0,e=Dg(t),n=function(r){this===Gr&&zn(n,Rp,r),Vt(this,Rn)&&Vt(this[Rn],e)&&(this[Rn][e]=!1),$4(this,e,Yr(1,r))};return Hn&&gm&&$4(Gr,e,{configurable:!0,set:n}),vm(e,t)}).prototype,Al(Yi,"toString",function(){return LS(this).tag}),Al(Ui,"withoutSetter",function(t){return vm(Dg(t),t)}),r5.f=JP,ja.f=Mg,P1.f=zS,l5.f=KP.f=$S,$0.f=H4,F5.f=function(t){return vm(Bn(t),t)},Hn&&Wi(Yi,"description",{configurable:!0,get:function(){return LS(this).description}})),qo({global:!0,wrap:!0,forced:!po,sham:!po},{Symbol:Ui}),R1(c5(DW),function(t){je(t)}),qo({target:"Symbol",stat:!0,forced:!po},{for:function(t){var e=_d(t);if(Vt(pm,e))return pm[e];var n=Ui(e);return pm[e]=n,hm[n]=e,n},keyFor:function(t){if(!pl(t))throw RS(t+" is not a symbol");if(Vt(hm,t))return hm[t]},useSetter:function(){gm=!0},useSimple:function(){gm=!1}}),qo({target:"Object",stat:!0,forced:!po,sham:!Hn},{create:function(t,e){return e===void 0?oi(t):MS(oi(t),e)},defineProperty:Mg,defineProperties:MS,getOwnPropertyDescriptor:zS}),qo({target:"Object",stat:!0,forced:!po},{getOwnPropertyNames:$S,getOwnPropertySymbols:H4}),qo({target:"Object",stat:!0,forced:Gn(function(){$0.f(1)})},{getOwnPropertySymbols:function(t){return $0.f(Bp(t))}}),Pc){var CW=!po||Gn(function(){var t=Ui();return Pc([t])!="[null]"||Pc({a:t})!="{}"||Pc(Object(t))!="{}"});qo({target:"JSON",stat:!0,forced:CW},{stringify:function(t,e,n){var r=mW(arguments),o=e;if((tr(e)||t!==void 0)&&!pl(t))return Rg(e)||(e=function(i,a){if(sn(o)&&(a=zn(o,this,i,a)),!pl(a))return a}),r[1]=e,cP(Pc,null,r)}})}if(!Yi[IS]){var xW=Yi.valueOf;Al(Yi,IS,function(t){return zn(xW,this)})}Bg(Ui,"Symbol"),_p[Rn]=!0,je("asyncIterator"),je("hasInstance"),je("isConcatSpreadable"),je("iterator"),je("match"),je("matchAll"),je("replace"),je("search"),je("species"),je("split"),je("toPrimitive"),je("toStringTag"),je("unscopables"),Bg(kt.JSON,"JSON",!0);var SW=Qn.Symbol;je("asyncDispose"),je("dispose"),je("matcher"),je("metadata"),je("observable"),je("patternMatch"),je("replaceAll");var Nh=SW,AW=F5.f("iterator"),OW=as(function(t){function e(n){return typeof Nh=="function"&&typeof AW=="symbol"?(t.exports=e=function(r){return typeof r},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(r){return r&&typeof Nh=="function"&&r.constructor===Nh&&r!==Nh.prototype?"symbol":typeof r},t.exports.default=t.exports,t.exports.__esModule=!0),e(n)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0}),kW=d$(OW),QP=b5.f,BW=cn(function(){QP(1)});if(Ip({target:"Object",stat:!0,forced:!Ao||BW,sham:!Ao},{getOwnPropertyDescriptor:function(t,e){return QP(ac(t),e)}}),(typeof global>"u"?"undefined":kW(global))==="object"){var FW=Object.getOwnPropertyDescriptor(global,"window");global.window&&!FW.set||(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(t){return nodeCrypto.randomFillSync(t)}}),global.document!=null&&global.document.getElementsByTagName==null&&(global.document.getElementsByTagName=function(){return[]})}function HS(t){return Object.prototype.toString.call(t)==="[object Object]"}function Sn(t){var e,n;return HS(t)!==!1&&((e=t.constructor)===void 0||HS(n=e.prototype)!==!1&&n.hasOwnProperty("isPrototypeOf")!==!1)}function Ur(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r3?e.i-4:e.i:Array.isArray(t)?1:T5(t)?2:_5(t)?3:0}function V4(t,e){return Bl(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function tj(t,e,n){var r=Bl(t);r===2?t.set(e,n):r===3?(t.delete(e),t.add(n)):t[e]=n}function T5(t){return jW&&t instanceof Map}function _5(t){return NW&&t instanceof Set}function iu(t){return t.o||t.t}function P5(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=LW(t);delete e[sr];for(var n=L5(e),r=0;r1&&(t.set=t.add=t.clear=t.delete=TW),Object.freeze(t),e&&Ld(t,function(n,r){return j5(r,!0)},!0)),t}function TW(){Ur(2)}function N5(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ei(t){var e=RW[t];return e||Ur(18,t),e}function VS(){return Rd}function ym(t,e){e&&(ei("Patches"),t.u=[],t.s=[],t.v=e)}function zg(t){U4(t),t.p.forEach(_W),t.p=null}function U4(t){t===Rd&&(Rd=t.l)}function US(t){return Rd={p:[],l:Rd,h:t,m:!0,_:0}}function _W(t){var e=t[sr];e.i===0||e.i===1?e.j():e.O=!0}function mm(t,e){e._=e.p.length;var n=e.p[0],r=t!==void 0&&t!==n;return e.h.g||ei("ES5").S(e,t,r),r?(n[sr].P&&(zg(e),Ur(4)),qu(t)&&(t=$g(e,t),e.l||Hg(e,t)),e.u&&ei("Patches").M(n[sr],t,e.u,e.s)):t=$g(e,n,[]),zg(e),e.u&&e.v(e.u,e.s),t!==ej?t:void 0}function $g(t,e,n){if(N5(e))return e;var r=e[sr];if(!r)return Ld(e,function(i,a){return WS(t,r,e,i,a,n)},!0),e;if(r.A!==t)return e;if(!r.P)return Hg(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=P5(r.k):r.o;Ld(r.i===3?new Set(o):o,function(i,a){return WS(t,r,o,i,a,n)}),Hg(t,o,!1),n&&t.u&&ei("Patches").R(r,n,t.u,t.s)}return r.o}function WS(t,e,n,r,o,i){if(Gu(o)){var a=$g(t,o,i&&e&&e.i!==3&&!V4(e.D,r)?i.concat(r):void 0);if(tj(n,r,a),!Gu(a))return;t.m=!1}if(qu(o)&&!N5(o)){if(!t.h.F&&t._<1)return;$g(t,o),e&&e.A.l||Hg(t,o)}}function Hg(t,e,n){n===void 0&&(n=!1),t.h.F&&t.m&&j5(e,n)}function bm(t,e){var n=t[sr];return(n?iu(n):t)[e]}function GS(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function W4(t){t.P||(t.P=!0,t.l&&W4(t.l))}function wm(t){t.o||(t.o=P5(t.t))}function G4(t,e,n){var r=T5(e)?ei("MapSet").N(e,n):_5(e)?ei("MapSet").T(e,n):t.g?function(o,i){var a=Array.isArray(o),u={i:a?1:0,A:i?i.A:VS(),P:!1,I:!1,D:{},l:i,t:o,k:null,o:null,j:null,C:!1},s=u,l=q0;a&&(s=[u],l=K0);var c=Proxy.revocable(s,l),f=c.revoke,p=c.proxy;return u.k=p,u.j=f,p}(e,n):ei("ES5").J(e,n);return(n?n.A:VS()).p.push(r),r}function PW(t){return Gu(t)||Ur(22,t),function e(n){if(!qu(n))return n;var r,o=n[sr],i=Bl(n);if(o){if(!o.P&&(o.i<4||!ei("ES5").K(o)))return o.t;o.I=!0,r=qS(n,i),o.I=!1}else r=qS(n,i);return Ld(r,function(a,u){o&&function(s,l){return Bl(s)===2?s.get(l):s[l]}(o.t,a)===u||tj(r,a,e(u))}),i===3?new Set(r):r}(t)}function qS(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return P5(t)}var KS,Rd,I5=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",jW=typeof Map<"u",NW=typeof Set<"u",YS=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ej=I5?Symbol.for("immer-nothing"):((KS={})["immer-nothing"]=!0,KS),XS=I5?Symbol.for("immer-draftable"):"__$immer_draftable",sr=I5?Symbol.for("immer-state"):"__$immer_state",IW=""+Object.prototype.constructor,L5=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,LW=Object.getOwnPropertyDescriptors||function(t){var e={};return L5(t).forEach(function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)}),e},RW={},q0={get:function(t,e){if(e===sr)return t;var n=iu(t);if(!V4(n,e))return function(o,i,a){var u,s=GS(i,a);return s?"value"in s?s.value:(u=s.get)===null||u===void 0?void 0:u.call(o.k):void 0}(t,n,e);var r=n[e];return t.I||!qu(r)?r:r===bm(t.t,e)?(wm(t),t.o[e]=G4(t.A.h,r,t)):r},has:function(t,e){return e in iu(t)},ownKeys:function(t){return Reflect.ownKeys(iu(t))},set:function(t,e,n){var r=GS(iu(t),e);if(r!=null&&r.set)return r.set.call(t.k,n),!0;if(!t.P){var o=bm(iu(t),e),i=o==null?void 0:o[sr];if(i&&i.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(function(a,u){return a===u?a!==0||1/a==1/u:a!=a&&u!=u}(n,o)&&(n!==void 0||V4(t.t,e)))return!0;wm(t),W4(t)}return t.o[e]===n&&typeof n!="number"&&(n!==void 0||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return bm(t.t,e)!==void 0||e in t.t?(t.D[e]=!1,wm(t),W4(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=iu(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty:function(){Ur(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ur(12)}},K0={};Ld(q0,function(t,e){K0[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),K0.deleteProperty=function(t,e){return q0.deleteProperty.call(this,t[0],e)},K0.set=function(t,e,n){return q0.set.call(this,t[0],e,n,t[0])};var MW=function(){function t(n){var r=this;this.g=YS,this.F=!0,this.produce=function(o,i,a){if(typeof o=="function"&&typeof i!="function"){var u=i;i=o;var s=r;return function(d){var y=this;d===void 0&&(d=u);for(var g=arguments.length,v=Array(g>1?g-1:0),m=1;m1?l-1:0),f=1;f=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var a=ei("Patches").$;return Gu(n)?a(n,r):this.produce(n,function(u){return a(u,r)})},t}(),Zn=new MW,M1=Zn.produce;Zn.produceWithPatches.bind(Zn),Zn.setAutoFreeze.bind(Zn),Zn.setUseProxies.bind(Zn),Zn.applyPatches.bind(Zn);var ZS=Zn.createDraft.bind(Zn),JS=Zn.finishDraft.bind(Zn);function jo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Vg=new WeakMap,jc=new WeakMap,QS=new WeakMap,tA=new WeakMap,eA=new WeakMap,nA=new WeakMap;function rA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ih(t){for(var e=1;e{var t={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:e=>{for(var n of E.pathRefs(t))vG.transform(n,e);for(var r of E.pointRefs(t))yG.transform(r,e);for(var o of E.rangeRefs(t))bG.transform(o,e);var i=new Set,a=[],u=p=>{if(p){var d=p.join(",");i.has(d)||(i.add(d),a.push(p))}},s=Vg.get(t)||[],l=$W(e);for(var c of s)u(j.transform(c,e));for(var f of l)u(f);Vg.set(t,a),N.transform(t,e),t.operations.push(e),E.normalize(t),e.type==="set_selection"&&(t.marks=null),jc.get(t)||(jc.set(t,!0),Promise.resolve().then(()=>{jc.set(t,!1),t.onChange(),t.operations=[]}))},addMark:(e,n)=>{var{selection:r}=t;if(r)if(L.isExpanded(r))N.setNodes(t,{[e]:n},{match:ot.isText,split:!0});else{var o=Ih(Ih({},E.marks(t)||{}),{},{[e]:n});t.marks=o,jc.get(t)||t.onChange()}},deleteBackward:e=>{var{selection:n}=t;n&&L.isCollapsed(n)&&N.delete(t,{unit:e,reverse:!0})},deleteForward:e=>{var{selection:n}=t;n&&L.isCollapsed(n)&&N.delete(t,{unit:e})},deleteFragment:e=>{var{selection:n}=t;n&&L.isExpanded(n)&&N.delete(t,{reverse:e==="backward"})},getFragment:()=>{var{selection:e}=t;return e?Q.fragment(t,e):[]},insertBreak:()=>{N.splitNodes(t,{always:!0})},insertFragment:e=>{N.insertFragment(t,e)},insertNode:e=>{N.insertNodes(t,e)},insertText:e=>{var{selection:n,marks:r}=t;if(n){if(r){var o=Ih({text:e},r);N.insertNodes(t,o)}else N.insertText(t,e);t.marks=null}},normalizeNode:e=>{var[n,r]=e;if(!ot.isText(n))if(ct.isElement(n)&&n.children.length===0)N.insertNodes(t,{text:""},{at:r.concat(0),voids:!0});else for(var o=!E.isEditor(n)&&ct.isElement(n)&&(t.isInline(n)||n.children.length===0||ot.isText(n.children[0])||t.isInline(n.children[0])),i=0,a=0;a{var{selection:n}=t;if(n)if(L.isExpanded(n))N.unsetNodes(t,e,{match:ot.isText,split:!0});else{var r=Ih({},E.marks(t)||{});delete r[e],t.marks=r,jc.get(t)||t.onChange()}}};return t},$W=t=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":var{path:e}=t;return j.levels(e);case"insert_node":var{node:n,path:r}=t,o=j.levels(r),i=ot.isText(n)?[]:Array.from(Q.nodes(n),w=>{var[,D]=w;return r.concat(D)});return[...o,...i];case"merge_node":var{path:a}=t;return[...j.ancestors(a),j.previous(a)];case"move_node":var{path:u,newPath:s}=t;if(j.equals(u,s))return[];var l=[],c=[];for(var f of j.ancestors(u)){var p=j.transform(f,t);l.push(p)}for(var d of j.ancestors(s)){var y=j.transform(d,t);c.push(y)}var g=c[c.length-1],v=s[s.length-1],m=g.concat(v);return[...l,...c,m];case"remove_node":var{path:h}=t;return[...j.ancestors(h)];case"split_node":var{path:b}=t;return[...j.levels(b),j.next(b)];default:return[]}};function ai(t,e){if(t==null)return{};var n,r,o=function(a,u){if(a==null)return{};var s,l,c={},f=Object.keys(a);for(l=0;l=0||(c[s]=a[s]);return c}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var xt,q4=function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=!e,r=e?GW(t):t,o=xt.None,i=xt.None,a=0,u=null;for(var s of r){var l=s.codePointAt(0);if(!l)break;var c=oG(s,l);if([o,i]=n?[i,c]:[c,o],ul(o,xt.ZWJ)&&ul(i,xt.ExtPict)&&!sG(n?t.substring(0,a):t.substring(0,t.length-a))||ul(o,xt.RI)&&ul(i,xt.RI)&&!(u=u!==null?!u:!!n||cG(t.substring(0,t.length-a)))||o!==xt.None&&i!==xt.None&&aG(o,i))break;a+=s.length}return a||1},HW=/\s/,VW=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,UW=/['\u2018\u2019]/,K4=(t,e,n)=>{if(n){var r=t.length-e;return[t.slice(r,t.length),t.slice(0,r)]}return[t.slice(0,e),t.slice(e)]},WW=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(HW.test(e))return!1;if(UW.test(e)){var o=q4(n,r),[i,a]=K4(n,o,r);if(t(i,a,r))return!0}return!VW.test(e)},GW=function*(t){for(var e=t.length-1,n=0;nt>=55296&&t<=56319,KW=t=>t>=56320&&t<=57343;(function(t){t[t.None=0]="None",t[t.Extend=1]="Extend",t[t.ZWJ=2]="ZWJ",t[t.RI=4]="RI",t[t.Prepend=8]="Prepend",t[t.SpacingMark=16]="SpacingMark",t[t.L=32]="L",t[t.V=64]="V",t[t.T=128]="T",t[t.LV=256]="LV",t[t.LVT=512]="LVT",t[t.ExtPict=1024]="ExtPict",t[t.Any=2048]="Any"})(xt||(xt={}));var YW=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,XW=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,ZW=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,JW=/^[\u1100-\u115F\uA960-\uA97C]$/,QW=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,tG=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,eG=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,nG=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,rG=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,oG=(t,e)=>{var n=xt.Any;return t.search(YW)!==-1&&(n|=xt.Extend),e===8205&&(n|=xt.ZWJ),e>=127462&&e<=127487&&(n|=xt.RI),t.search(XW)!==-1&&(n|=xt.Prepend),t.search(ZW)!==-1&&(n|=xt.SpacingMark),t.search(JW)!==-1&&(n|=xt.L),t.search(QW)!==-1&&(n|=xt.V),t.search(tG)!==-1&&(n|=xt.T),t.search(eG)!==-1&&(n|=xt.LV),t.search(nG)!==-1&&(n|=xt.LVT),t.search(rG)!==-1&&(n|=xt.ExtPict),n};function ul(t,e){return(t&e)!=0}var iG=[[xt.L,xt.L|xt.V|xt.LV|xt.LVT],[xt.LV|xt.V,xt.V|xt.T],[xt.LVT|xt.T,xt.T],[xt.Any,xt.Extend|xt.ZWJ],[xt.Any,xt.SpacingMark],[xt.Prepend,xt.Any],[xt.ZWJ,xt.ExtPict],[xt.RI,xt.RI]];function aG(t,e){return iG.findIndex(n=>ul(t,n[0])&&ul(e,n[1]))===-1}var uG=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,sG=t=>t.search(uG)!==-1,lG=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,cG=t=>{var e=t.match(lG);return e!==null&&e[0].length/2%2==1},oA=t=>Sn(t)&&Q.isNodeList(t.children)&&!E.isEditor(t),ct={isAncestor:t=>Sn(t)&&Q.isNodeList(t.children),isElement:oA,isElementList:t=>Array.isArray(t)&&t.every(e=>ct.isElement(e)),isElementProps:t=>t.children!==void 0,isElementType:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return oA(t)&&t[n]===e},matches(t,e){for(var n in e)if(n!=="children"&&t[n]!==e[n])return!1;return!0}},fG=["text"],dG=["text"];function iA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ss(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{},{voids:n=!1,mode:r="lowest",at:o=t.selection,match:i}=e;if(o){var a=E.path(t,o),u=r==="lowest";for(var[s,l]of E.levels(t,{at:a,voids:n,match:i,reverse:u}))if(!ot.isText(s)&&!j.equals(a,l))return[s,l]}},addMark(t,e,n){t.addMark(e,n)},after(t,e){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o={anchor:E.point(t,e,{edge:"end"}),focus:E.end(t,[])},{distance:i=1}=r,a=0;for(var u of E.positions(t,Ss(Ss({},r),{},{at:o}))){if(a>i)break;a!==0&&(n=u),a++}return n},before(t,e){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o={anchor:E.start(t,[]),focus:E.point(t,e,{edge:"start"})},{distance:i=1}=r,a=0;for(var u of E.positions(t,Ss(Ss({},r),{},{at:o,reverse:!0}))){if(a>i)break;a!==0&&(n=u),a++}return n},deleteBackward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteBackward(n)},deleteForward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteForward(n)},deleteFragment(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{direction:n="forward"}=e;t.deleteFragment(n)},edges:(t,e)=>[E.start(t,e),E.end(t,e)],end:(t,e)=>E.point(t,e,{edge:"end"}),first(t,e){var n=E.path(t,e,{edge:"start"});return E.node(t,n)},fragment(t,e){var n=E.range(t,e);return Q.fragment(t,n)},hasBlocks:(t,e)=>e.children.some(n=>E.isBlock(t,n)),hasInlines:(t,e)=>e.children.some(n=>ot.isText(n)||E.isInline(t,n)),hasTexts:(t,e)=>e.children.every(n=>ot.isText(n)),insertBreak(t){t.insertBreak()},insertFragment(t,e){t.insertFragment(e)},insertNode(t,e){t.insertNode(e)},insertText(t,e){t.insertText(e)},isBlock:(t,e)=>ct.isElement(e)&&!t.isInline(e),isEditor(t){if(!Sn(t))return!1;var e=aA.get(t);if(e!==void 0)return e;var n=typeof t.addMark=="function"&&typeof t.apply=="function"&&typeof t.deleteBackward=="function"&&typeof t.deleteForward=="function"&&typeof t.deleteFragment=="function"&&typeof t.insertBreak=="function"&&typeof t.insertFragment=="function"&&typeof t.insertNode=="function"&&typeof t.insertText=="function"&&typeof t.isInline=="function"&&typeof t.isVoid=="function"&&typeof t.normalizeNode=="function"&&typeof t.onChange=="function"&&typeof t.removeMark=="function"&&(t.marks===null||Sn(t.marks))&&(t.selection===null||L.isRange(t.selection))&&Q.isNodeList(t.children)&&Xi.isOperationList(t.operations);return aA.set(t,n),n},isEnd(t,e,n){var r=E.end(t,n);return Bt.equals(e,r)},isEdge:(t,e,n)=>E.isStart(t,e,n)||E.isEnd(t,e,n),isEmpty(t,e){var{children:n}=e,[r]=n;return n.length===0||n.length===1&&ot.isText(r)&&r.text===""&&!t.isVoid(e)},isInline:(t,e)=>ct.isElement(e)&&t.isInline(e),isNormalizing(t){var e=QS.get(t);return e===void 0||e},isStart(t,e,n){if(e.offset!==0)return!1;var r=E.start(t,n);return Bt.equals(e,r)},isVoid:(t,e)=>ct.isElement(e)&&t.isVoid(e),last(t,e){var n=E.path(t,e,{edge:"end"});return E.node(t,n)},leaf(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(t,e,n);return[Q.leaf(t,r),r]},*levels(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=t.selection,reverse:r=!1,voids:o=!1}=e,{match:i}=e;if(i==null&&(i=()=>!0),n){var a=[],u=E.path(t,n);for(var[s,l]of Q.levels(t,u))if(i(s,l)&&(a.push([s,l]),!o&&E.isVoid(t,s)))break;r&&a.reverse(),yield*a}},marks(t){var{marks:e,selection:n}=t;if(!n)return null;if(e)return e;if(L.isExpanded(n)){var[r]=E.nodes(t,{match:ot.isText});if(r){var[o]=r;return ai(o,fG)}return{}}var{anchor:i}=n,{path:a}=i,[u]=E.leaf(t,a);if(i.offset===0){var s=E.previous(t,{at:a,match:ot.isText}),l=E.above(t,{match:d=>E.isBlock(t,d)});if(s&&l){var[c,f]=s,[,p]=l;j.isAncestor(p,f)&&(u=c)}}return ai(u,dG)},next(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:r=!1}=e,{match:o,at:i=t.selection}=e;if(i){var a=E.after(t,i,{voids:r});if(a){var[,u]=E.last(t,[]),s=[a.path,u];if(j.isPath(i)&&i.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(j.isPath(i)){var[l]=E.parent(t,i);o=f=>l.children.includes(f)}else o=()=>!0;var[c]=E.nodes(t,{at:s,match:o,mode:n,voids:r});return c}}},node(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(t,e,n);return[Q.get(t,r),r]},*nodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=t.selection,mode:r="all",universal:o=!1,reverse:i=!1,voids:a=!1}=e,{match:u}=e;if(u||(u=()=>!0),n){var s,l;if(pG.isSpan(n))s=n[0],l=n[1];else{var c=E.path(t,n,{edge:"start"}),f=E.path(t,n,{edge:"end"});s=i?f:c,l=i?c:f}var p,d=Q.nodes(t,{reverse:i,from:s,to:l,pass:b=>{var[w]=b;return!a&&E.isVoid(t,w)}}),y=[];for(var[g,v]of d){var m=p&&j.compare(v,p[1])===0;if(r!=="highest"||!m){if(u(g,v))if(r==="lowest"&&m)p=[g,v];else{var h=r==="lowest"?p:[g,v];h&&(o?y.push(h):yield h),p=[g,v]}else if(o&&!m&&ot.isText(g))return}}r==="lowest"&&p&&(o?y.push(p):yield p),o&&(yield*y)}},normalize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1}=e,r=i=>Vg.get(i)||[];if(E.isNormalizing(t)){if(n){var o=Array.from(Q.nodes(t),i=>{var[,a]=i;return a});Vg.set(t,o)}r(t).length!==0&&E.withoutNormalizing(t,()=>{for(var i of r(t))if(Q.has(t,i)){var a=E.node(t,i),[u,s]=a;ct.isElement(u)&&u.children.length===0&&t.normalizeNode(a)}for(var l=42*r(t).length,c=0;r(t).length!==0;){if(c>l)throw new Error(` Could not completely normalize the editor after `.concat(l,` iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state. `));var f=r(t).pop();if(Q.has(t,f)){var p=E.node(t,f);t.normalizeNode(p)}c++}})}},parent(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(t,e,n),o=j.parent(r);return E.node(t,o)},path(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:r,edge:o}=n;if(j.isPath(e)){if(o==="start"){var[,i]=Q.first(t,e);e=i}else if(o==="end"){var[,a]=Q.last(t,e);e=a}}return L.isRange(e)&&(e=o==="start"?L.start(e):o==="end"?L.end(e):j.common(e.anchor.path,e.focus.path)),Bt.isPoint(e)&&(e=e.path),r!=null&&(e=e.slice(0,r)),e},hasPath:(t,e)=>Q.has(t,e),pathRef(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,o={current:e,affinity:r,unref(){var{current:i}=o;return E.pathRefs(t).delete(o),o.current=null,i}};return E.pathRefs(t).add(o),o},pathRefs(t){var e=tA.get(t);return e||(e=new Set,tA.set(t,e)),e},point(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:r="start"}=n;if(j.isPath(e)){var o;if(r==="end"){var[,i]=Q.last(t,e);o=i}else{var[,a]=Q.first(t,e);o=a}var u=Q.get(t,o);if(!ot.isText(u))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(e,"] because it has no ").concat(r," text node."));return{path:o,offset:r==="end"?u.text.length:0}}if(L.isRange(e)){var[s,l]=L.edges(e);return r==="start"?s:l}return e},pointRef(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,o={current:e,affinity:r,unref(){var{current:i}=o;return E.pointRefs(t).delete(o),o.current=null,i}};return E.pointRefs(t).add(o),o},pointRefs(t){var e=eA.get(t);return e||(e=new Set,eA.set(t,e)),e},*positions(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=t.selection,unit:r="offset",reverse:o=!1,voids:i=!1}=e;if(n){var a=E.range(t,n),[u,s]=L.edges(a),l=o?s:u,c=!1,f="",p=0,d=0,y=0;for(var[g,v]of E.nodes(t,{at:n,reverse:o,voids:i})){if(ct.isElement(g)){if(!i&&t.isVoid(g)){yield E.start(t,v);continue}if(t.isInline(g))continue;if(E.hasInlines(t,g)){var m=j.isAncestor(v,s.path)?s:E.end(t,v),h=j.isAncestor(v,u.path)?u:E.start(t,v);f=E.string(t,{anchor:h,focus:m},{voids:i}),c=!0}}if(ot.isText(g)){var b=j.equals(v,l.path);for(b?(d=o?l.offset:g.text.length-l.offset,y=l.offset):(d=g.text.length,y=o?d:0),(b||c||r==="offset")&&(yield{path:v,offset:y},c=!1);;){if(p===0){if(f==="")break;p=w(f,r,o),f=K4(f,p,o)[1]}if(y=o?y-p:y+p,(d-=p)<0){p=-d;break}p=0,yield{path:v,offset:y}}}}}function w(D,x,C){return x==="character"?q4(D,C):x==="word"?function(O){for(var T=arguments.length>1&&arguments[1]!==void 0&&arguments[1],R=0,H=!1;O.length>0;){var M=q4(O,T),[K,U]=K4(O,M,T);if(WW(K,U,T))H=!0,R+=M;else{if(H)break;R+=M}O=U}return R}(D,C):x==="line"||x==="block"?D.length:1}},previous(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:r=!1}=e,{match:o,at:i=t.selection}=e;if(i){var a=E.before(t,i,{voids:r});if(a){var[,u]=E.first(t,[]),s=[a.path,u];if(j.isPath(i)&&i.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(j.isPath(i)){var[l]=E.parent(t,i);o=f=>l.children.includes(f)}else o=()=>!0;var[c]=E.nodes(t,{reverse:!0,at:s,match:o,mode:n,voids:r});return c}}},range:(t,e,n)=>L.isRange(e)&&!n?e:{anchor:E.start(t,e),focus:E.end(t,n||e)},rangeRef(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,o={current:e,affinity:r,unref(){var{current:i}=o;return E.rangeRefs(t).delete(o),o.current=null,i}};return E.rangeRefs(t).add(o),o},rangeRefs(t){var e=nA.get(t);return e||(e=new Set,nA.set(t,e)),e},removeMark(t,e){t.removeMark(e)},setNormalizing(t,e){QS.set(t,e)},start:(t,e)=>E.point(t,e,{edge:"start"}),string(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,o=E.range(t,e),[i,a]=L.edges(o),u="";for(var[s,l]of E.nodes(t,{at:o,match:ot.isText,voids:r})){var c=s.text;j.equals(l,a.path)&&(c=c.slice(0,a.offset)),j.equals(l,i.path)&&(c=c.slice(i.offset)),u+=c}return u},unhangRange(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,[o,i]=L.edges(e);if(o.offset!==0||i.offset!==0||L.isCollapsed(e))return e;var a=E.above(t,{at:i,match:p=>E.isBlock(t,p)}),u=a?a[1]:[],s={anchor:E.start(t,[]),focus:i},l=!0;for(var[c,f]of E.nodes(t,{at:s,match:ot.isText,reverse:!0,voids:r}))if(l)l=!1;else if(c.text!==""||j.isBefore(f,u)){i={path:f,offset:c.text.length};break}return{anchor:o,focus:i}},void(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return E.above(t,Ss(Ss({},e),{},{match:n=>E.isVoid(t,n)}))},withoutNormalizing(t,e){var n=E.isNormalizing(t);E.setNormalizing(t,!1);try{e()}finally{E.setNormalizing(t,n)}E.normalize(t)}},pG={isSpan:t=>Array.isArray(t)&&t.length===2&&t.every(j.isPath)},hG=["children"],gG=["text"],uA=new WeakMap,Q={ancestor(t,e){var n=Q.get(t,e);if(ot.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat(n));return n},*ancestors(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var r of j.ancestors(e,n)){var o=[Q.ancestor(t,r),r];yield o}},child(t,e){if(ot.isText(t))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(t)));var n=t.children[e];if(n==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(JSON.stringify(t)));return n},*children(t,e){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{reverse:r=!1}=n,o=Q.ancestor(t,e),{children:i}=o,a=r?i.length-1:0;r?a>=0:a1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of Q.nodes(t,e))r.length!==0&&(yield[n,r])},*elements(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of Q.nodes(t,e))ct.isElement(n)&&(yield[n,r])},extractProps:t=>ct.isAncestor(t)?ai(t,hG):ai(t,gG),first(t,e){for(var n=e.slice(),r=Q.get(t,n);r&&!ot.isText(r)&&r.children.length!==0;)r=r.children[0],n.push(0);return[r,n]},fragment(t,e){if(ot.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(t)));var n=M1({children:t.children},r=>{var[o,i]=L.edges(e),a=Q.nodes(r,{reverse:!0,pass:p=>{var[,d]=p;return!L.includes(e,d)}});for(var[,u]of a){if(!L.includes(e,u)){var s=Q.parent(r,u),l=u[u.length-1];s.children.splice(l,1)}if(j.equals(u,i.path)){var c=Q.leaf(r,u);c.text=c.text.slice(0,i.offset)}if(j.equals(u,o.path)){var f=Q.leaf(r,u);f.text=f.text.slice(o.offset)}}E.isEditor(r)&&(r.selection=null)});return n.children},get(t,e){for(var n=t,r=0;rot.isText(t)||ct.isElement(t)||E.isEditor(t),isNodeList(t){if(!Array.isArray(t))return!1;var e=uA.get(t);if(e!==void 0)return e;var n=t.every(r=>Q.isNode(r));return uA.set(t,n),n},last(t,e){for(var n=e.slice(),r=Q.get(t,n);r&&!ot.isText(r)&&r.children.length!==0;){var o=r.children.length-1;r=r.children[o],n.push(o)}return[r,n]},leaf(t,e){var n=Q.get(t,e);if(!ot.isText(n))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat(n));return n},*levels(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var r of j.levels(e,n)){var o=Q.get(t,r);yield[o,r]}},matches:(t,e)=>ct.isElement(t)&&ct.isElementProps(e)&&ct.matches(t,e)||ot.isText(t)&&ot.isTextProps(e)&&ot.matches(t,e),*nodes(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{pass:n,reverse:r=!1}=e,{from:o=[],to:i}=e,a=new Set,u=[],s=t;!i||!(r?j.isBefore(u,i):j.isAfter(u,i));)if(a.has(s)||(yield[s,u]),a.has(s)||ot.isText(s)||s.children.length===0||n!=null&&n([s,u])!==!1){if(u.length===0)break;if(!r){var l=j.next(u);if(Q.has(t,l)){u=l,s=Q.get(t,u);continue}}r&&u[u.length-1]!==0?(u=j.previous(u),s=Q.get(t,u)):(u=j.parent(u),s=Q.get(t,u),a.add(s))}else{a.add(s);var c=r?s.children.length-1:0;j.isAncestor(u,o)&&(c=o[u.length]),u=u.concat(c),s=Q.get(t,u)}},parent(t,e){var n=j.parent(e),r=Q.get(t,n);if(ot.isText(r))throw new Error("Cannot get the parent of path [".concat(e,"] because it does not exist in the root."));return r},string:t=>ot.isText(t)?t.text:t.children.map(Q.string).join(""),*texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of Q.nodes(t,e))ot.isText(n)&&(yield[n,r])}};function sA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function ze(t){for(var e=1;eXi.isOperation(t)&&t.type.endsWith("_node"),isOperation(t){if(!Sn(t))return!1;switch(t.type){case"insert_node":case"remove_node":return j.isPath(t.path)&&Q.isNode(t.node);case"insert_text":case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&j.isPath(t.path);case"merge_node":return typeof t.position=="number"&&j.isPath(t.path)&&Sn(t.properties);case"move_node":return j.isPath(t.path)&&j.isPath(t.newPath);case"set_node":return j.isPath(t.path)&&Sn(t.properties)&&Sn(t.newProperties);case"set_selection":return t.properties===null&&L.isRange(t.newProperties)||t.newProperties===null&&L.isRange(t.properties)||Sn(t.properties)&&Sn(t.newProperties);case"split_node":return j.isPath(t.path)&&typeof t.position=="number"&&Sn(t.properties);default:return!1}},isOperationList:t=>Array.isArray(t)&&t.every(e=>Xi.isOperation(e)),isSelectionOperation:t=>Xi.isOperation(t)&&t.type.endsWith("_selection"),isTextOperation:t=>Xi.isOperation(t)&&t.type.endsWith("_text"),inverse(t){switch(t.type){case"insert_node":return ze(ze({},t),{},{type:"remove_node"});case"insert_text":return ze(ze({},t),{},{type:"remove_text"});case"merge_node":return ze(ze({},t),{},{type:"split_node",path:j.previous(t.path)});case"move_node":var{newPath:e,path:n}=t;if(j.equals(e,n))return t;if(j.isSibling(n,e))return ze(ze({},t),{},{path:e,newPath:n});var r=j.transform(n,t),o=j.transform(j.next(n),t);return ze(ze({},t),{},{path:r,newPath:o});case"remove_node":return ze(ze({},t),{},{type:"insert_node"});case"remove_text":return ze(ze({},t),{},{type:"insert_text"});case"set_node":var{properties:i,newProperties:a}=t;return ze(ze({},t),{},{properties:a,newProperties:i});case"set_selection":var{properties:u,newProperties:s}=t;return ze(ze({},t),{},u==null?{properties:s,newProperties:null}:s==null?{properties:null,newProperties:u}:{properties:s,newProperties:u});case"split_node":return ze(ze({},t),{},{type:"merge_node",path:j.next(t.path)})}}},j={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=j.levels(t,e);return r=n?r.slice(1):r.slice(0,-1)},common(t,e){for(var n=[],r=0;re[r])return 1}return 0},endsAfter(t,e){var n=t.length-1,r=t.slice(0,n),o=e.slice(0,n),i=t[n],a=e[n];return j.equals(r,o)&&i>a},endsAt(t,e){var n=t.length,r=t.slice(0,n),o=e.slice(0,n);return j.equals(r,o)},endsBefore(t,e){var n=t.length-1,r=t.slice(0,n),o=e.slice(0,n),i=t[n],a=e[n];return j.equals(r,o)&&it.length===e.length&&t.every((n,r)=>n===e[r]),hasPrevious:t=>t[t.length-1]>0,isAfter:(t,e)=>j.compare(t,e)===1,isAncestor:(t,e)=>t.lengthj.compare(t,e)===-1,isChild:(t,e)=>t.length===e.length+1&&j.compare(t,e)===0,isCommon:(t,e)=>t.length<=e.length&&j.compare(t,e)===0,isDescendant:(t,e)=>t.length>e.length&&j.compare(t,e)===0,isParent:(t,e)=>t.length+1===e.length&&j.compare(t,e)===0,isPath:t=>Array.isArray(t)&&(t.length===0||typeof t[0]=="number"),isSibling(t,e){if(t.length!==e.length)return!1;var n=t.slice(0,-1),r=e.slice(0,-1);return t[t.length-1]!==e[e.length-1]&&j.equals(n,r)},levels(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=[],o=0;o<=t.length;o++)r.push(t.slice(0,o));return n&&r.reverse(),r},next(t){if(t.length===0)throw new Error("Cannot get the next path of a root path [".concat(t,"], because it has no next index."));var e=t[t.length-1];return t.slice(0,-1).concat(e+1)},parent(t){if(t.length===0)throw new Error("Cannot get the parent path of the root path [".concat(t,"]."));return t.slice(0,-1)},previous(t){if(t.length===0)throw new Error("Cannot get the previous path of a root path [".concat(t,"], because it has no previous index."));var e=t[t.length-1];if(e<=0)throw new Error("Cannot get the previous path of a first child path [".concat(t,"] because it would result in a negative index."));return t.slice(0,-1).concat(e-1)},relative(t,e){if(!j.isAncestor(e,t)&&!j.equals(t,e))throw new Error("Cannot get the relative path of [".concat(t,"] inside ancestor [").concat(e,"], because it is not above or equal to the path."));return t.slice(e.length)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return M1(t,r=>{var{affinity:o="forward"}=n;if(t&&(t==null?void 0:t.length)!==0){if(r===null)return null;switch(e.type){case"insert_node":var{path:i}=e;(j.equals(i,r)||j.endsBefore(i,r)||j.isAncestor(i,r))&&(r[i.length-1]+=1);break;case"remove_node":var{path:a}=e;if(j.equals(a,r)||j.isAncestor(a,r))return null;j.endsBefore(a,r)&&(r[a.length-1]-=1);break;case"merge_node":var{path:u,position:s}=e;j.equals(u,r)||j.endsBefore(u,r)?r[u.length-1]-=1:j.isAncestor(u,r)&&(r[u.length-1]-=1,r[u.length]+=s);break;case"split_node":var{path:l,position:c}=e;if(j.equals(l,r)){if(o==="forward")r[r.length-1]+=1;else if(o!=="backward")return null}else j.endsBefore(l,r)?r[l.length-1]+=1:j.isAncestor(l,r)&&t[l.length]>=c&&(r[l.length-1]+=1,r[l.length]-=c);break;case"move_node":var{path:f,newPath:p}=e;if(j.equals(f,p))return;if(j.isAncestor(f,r)||j.equals(f,r)){var d=p.slice();return j.endsBefore(f,p)&&f.lengthe.offset?1:0:n},isAfter:(t,e)=>Bt.compare(t,e)===1,isBefore:(t,e)=>Bt.compare(t,e)===-1,equals:(t,e)=>t.offset===e.offset&&j.equals(t.path,e.path),isPoint:t=>Sn(t)&&typeof t.offset=="number"&&j.isPath(t.path),transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return M1(t,r=>{if(r===null)return null;var{affinity:o="forward"}=n,{path:i,offset:a}=r;switch(e.type){case"insert_node":case"move_node":r.path=j.transform(i,e,n);break;case"insert_text":j.equals(e.path,i)&&e.offset<=a&&(r.offset+=e.text.length);break;case"merge_node":j.equals(e.path,i)&&(r.offset+=e.position),r.path=j.transform(i,e,n);break;case"remove_text":j.equals(e.path,i)&&e.offset<=a&&(r.offset-=Math.min(a-e.offset,e.text.length));break;case"remove_node":if(j.equals(e.path,i)||j.isAncestor(e.path,i))return null;r.path=j.transform(i,e,n);break;case"split_node":if(j.equals(e.path,i)){if(e.position===a&&o==null)return null;(e.position1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,{anchor:r,focus:o}=t;return L.isBackward(t)===n?[r,o]:[o,r]},end(t){var[,e]=L.edges(t);return e},equals:(t,e)=>Bt.equals(t.anchor,e.anchor)&&Bt.equals(t.focus,e.focus),includes(t,e){if(L.isRange(e)){if(L.includes(t,e.anchor)||L.includes(t,e.focus))return!0;var[n,r]=L.edges(t),[o,i]=L.edges(e);return Bt.isBefore(n,o)&&Bt.isAfter(r,i)}var[a,u]=L.edges(t),s=!1,l=!1;return Bt.isPoint(e)?(s=Bt.compare(e,a)>=0,l=Bt.compare(e,u)<=0):(s=j.compare(e,a.path)>=0,l=j.compare(e,u.path)<=0),s&&l},intersection(t,e){var n=ai(t,mG),[r,o]=L.edges(t),[i,a]=L.edges(e),u=Bt.isBefore(r,i)?i:r,s=Bt.isBefore(o,a)?o:a;return Bt.isBefore(s,u)?null:function(l){for(var c=1;c!L.isCollapsed(t),isForward:t=>!L.isBackward(t),isRange:t=>Sn(t)&&Bt.isPoint(t.anchor)&&Bt.isPoint(t.focus),*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=L.edges(t);return e},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return M1(t,r=>{if(r===null)return null;var o,i,{affinity:a="inward"}=n;if(a==="inward"){var u=L.isCollapsed(r);L.isForward(r)?(o="forward",i=u?o:"backward"):(o="backward",i=u?o:"forward")}else a==="outward"?L.isForward(r)?(o="backward",i="forward"):(o="forward",i="backward"):(o=a,i=a);var s=Bt.transform(r.anchor,e,{affinity:o}),l=Bt.transform(r.focus,e,{affinity:i});if(!s||!l)return null;r.anchor=s,r.focus=l})}},bG={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var o=L.transform(n,e,{affinity:r});t.current=o,o==null&&t.unref()}}},nj=(t,e)=>{for(var n in t){var r=t[n],o=e[n];if(Sn(r)&&Sn(o)){if(!nj(r,o))return!1}else if(Array.isArray(r)&&Array.isArray(o)){if(r.length!==o.length)return!1;for(var i=0;i2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function o(i){return ai(i,wG)}return nj(r?o(t):t,r?o(e):e)},isText:t=>Sn(t)&&typeof t.text=="string",isTextList:t=>Array.isArray(t)&&t.every(e=>ot.isText(e)),isTextProps:t=>t.text!==void 0,matches(t,e){for(var n in e)if(n!=="text"&&(!t.hasOwnProperty(n)||t[n]!==e[n]))return!1;return!0},decorations(t,e){var n=[Ho({},t)];for(var r of e){var o=ai(r,EG),[i,a]=L.edges(r),u=[],s=0;for(var l of n){var{length:c}=l.text,f=s;if(s+=c,i.offset<=f&&a.offset>=s)Object.assign(l,o),u.push(l);else if(i.offset!==a.offset&&(i.offset===s||a.offset===f)||i.offset>s||a.offsetf){var v=i.offset-f;d=Ho(Ho({},p),{},{text:p.text.slice(0,v)}),p=Ho(Ho({},p),{},{text:p.text.slice(v)})}Object.assign(p,o),d&&u.push(d),u.push(p),y&&u.push(y)}}n=u}return n}};function pA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Nc(t){for(var e=1;e{switch(i.type){case"insert_node":var{path:a,node:u}=i,s=Q.parent(r,a),l=a[a.length-1];if(l>s.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(a,"] because the destination is past the end of the node."));if(s.children.splice(l,0,u),o)for(var[c,f]of L.points(o))o[f]=Bt.transform(c,i);break;case"insert_text":var{path:p,offset:d,text:y}=i;if(y.length===0)break;var g=Q.leaf(r,p),v=g.text.slice(0,d),m=g.text.slice(d);if(g.text=v+y+m,o)for(var[h,b]of L.points(o))o[b]=Bt.transform(h,i);break;case"merge_node":var{path:w}=i,D=Q.get(r,w),x=j.previous(w),C=Q.get(r,x),O=Q.parent(r,w),T=w[w.length-1];if(ot.isText(D)&&ot.isText(C))C.text+=D.text;else{if(ot.isText(D)||ot.isText(C))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(w,"] to nodes of different interfaces: ").concat(D," ").concat(C));C.children.push(...D.children)}if(O.children.splice(T,1),o)for(var[R,H]of L.points(o))o[H]=Bt.transform(R,i);break;case"move_node":var{path:M,newPath:K}=i;if(j.isAncestor(M,K))throw new Error("Cannot move a path [".concat(M,"] to new path [").concat(K,"] because the destination is inside itself."));var U=Q.get(r,M),W=Q.parent(r,M),q=M[M.length-1];W.children.splice(q,1);var nt=j.transform(M,i),lt=Q.get(r,j.parent(nt)),st=nt[nt.length-1];if(lt.children.splice(st,0,U),o)for(var[at,k]of L.points(o))o[k]=Bt.transform(at,i);break;case"remove_node":var{path:S}=i,P=S[S.length-1];if(Q.parent(r,S).children.splice(P,1),o)for(var[$,Y]of L.points(o)){var V=Bt.transform($,i);if(o!=null&&V!=null)o[Y]=V;else{var it=void 0,gt=void 0;for(var[vt,Dt]of Q.texts(r)){if(j.compare(Dt,S)!==-1){gt=[vt,Dt];break}it=[vt,Dt]}var G=!1;it&>&&(G=j.equals(gt[1],S)?!j.hasPrevious(gt[1]):j.common(it[1],S).length2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(t,()=>{var{hanging:r=!1,voids:o=!1,mode:i="lowest"}=n,{at:a,match:u,select:s}=n;if(Q.isNode(e)&&(e=[e]),e.length!==0){var[l]=e;if(a||(a=t.selection?t.selection:t.children.length>0?E.end(t,[]):[0],s=!0),s==null&&(s=!1),L.isRange(a))if(r||(a=E.unhangRange(t,a)),L.isCollapsed(a))a=a.anchor;else{var[,c]=L.edges(a),f=E.pointRef(t,c);N.delete(t,{at:a}),a=f.unref()}if(Bt.isPoint(a)){u==null&&(u=ot.isText(l)?x=>ot.isText(x):t.isInline(l)?x=>ot.isText(x)||E.isInline(t,x):x=>E.isBlock(t,x));var[p]=E.nodes(t,{at:a.path,match:u,mode:i,voids:o});if(!p)return;var[,d]=p,y=E.pathRef(t,d),g=E.isEnd(t,a,d);N.splitNodes(t,{at:a,match:u,mode:i,voids:o});var v=y.unref();a=g?j.next(v):v}var m=j.parent(a),h=a[a.length-1];if(o||!E.void(t,{at:m})){for(var b of e){var w=m.concat(h);h++,t.apply({type:"insert_node",path:w,node:b}),a=j.next(a)}if(a=j.previous(a),s){var D=E.end(t,a);D&&N.select(t,D)}}}})},liftNodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(t,()=>{var{at:n=t.selection,mode:r="lowest",voids:o=!1}=e,{match:i}=e;if(i==null&&(i=j.isPath(n)?As(t,n):b=>E.isBlock(t,b)),n){var a=E.nodes(t,{at:n,match:i,mode:r,voids:o}),u=Array.from(a,b=>{var[,w]=b;return E.pathRef(t,w)});for(var s of u){var l=s.unref();if(l.length<2)throw new Error("Cannot lift node at a path [".concat(l,"] because it has a depth of less than `2`."));var c=E.node(t,j.parent(l)),[f,p]=c,d=l[l.length-1],{length:y}=f.children;if(y===1){var g=j.next(p);N.moveNodes(t,{at:l,to:g,voids:o}),N.removeNodes(t,{at:p,voids:o})}else if(d===0)N.moveNodes(t,{at:l,to:p,voids:o});else if(d===y-1){var v=j.next(p);N.moveNodes(t,{at:l,to:v,voids:o})}else{var m=j.next(l),h=j.next(p);N.splitNodes(t,{at:m,voids:o}),N.moveNodes(t,{at:l,to:h,voids:o})}}}})},mergeNodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(t,()=>{var{match:n,at:r=t.selection}=e,{hanging:o=!1,voids:i=!1,mode:a="lowest"}=e;if(r){if(n==null)if(j.isPath(r)){var[u]=E.parent(t,r);n=T=>u.children.includes(T)}else n=T=>E.isBlock(t,T);if(!o&&L.isRange(r)&&(r=E.unhangRange(t,r)),L.isRange(r))if(L.isCollapsed(r))r=r.anchor;else{var[,s]=L.edges(r),l=E.pointRef(t,s);N.delete(t,{at:r}),r=l.unref(),e.at==null&&N.select(t,r)}var[c]=E.nodes(t,{at:r,match:n,voids:i,mode:a}),f=E.previous(t,{at:r,match:n,voids:i,mode:a});if(c&&f){var[p,d]=c,[y,g]=f;if(d.length!==0&&g.length!==0){var v,m,h=j.next(g),b=j.common(d,g),w=j.isSibling(d,g),D=Array.from(E.levels(t,{at:d}),T=>{var[R]=T;return R}).slice(b.length).slice(0,-1),x=E.above(t,{at:d,mode:"highest",match:T=>D.includes(T)&&rj(t,T)}),C=x&&E.pathRef(t,x[1]);if(ot.isText(p)&&ot.isText(y)){var O=ai(p,CG);m=y.text.length,v=O}else{if(!ct.isElement(p)||!ct.isElement(y))throw new Error("Cannot merge the node at path [".concat(d,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(p)," ").concat(JSON.stringify(y)));O=ai(p,xG),m=y.children.length,v=O}w||N.moveNodes(t,{at:d,to:h,voids:i}),C&&N.removeNodes(t,{at:C.current,voids:i}),ct.isElement(y)&&E.isEmpty(t,y)||ot.isText(y)&&y.text===""&&g[g.length-1]!==0?N.removeNodes(t,{at:g,voids:i}):t.apply({type:"merge_node",path:h,position:m,properties:v}),C&&C.unref()}}}})},moveNodes(t,e){E.withoutNormalizing(t,()=>{var{to:n,at:r=t.selection,mode:o="lowest",voids:i=!1}=e,{match:a}=e;if(r){a==null&&(a=j.isPath(r)?As(t,r):d=>E.isBlock(t,d));var u=E.pathRef(t,n),s=E.nodes(t,{at:r,match:a,mode:o,voids:i}),l=Array.from(s,d=>{var[,y]=d;return E.pathRef(t,y)});for(var c of l){var f=c.unref(),p=u.current;f.length!==0&&t.apply({type:"move_node",path:f,newPath:p}),u.current&&j.isSibling(p,f)&&j.isAfter(p,f)&&(u.current=j.next(u.current))}u.unref()}})},removeNodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(t,()=>{var{hanging:n=!1,voids:r=!1,mode:o="lowest"}=e,{at:i=t.selection,match:a}=e;if(i){a==null&&(a=j.isPath(i)?As(t,i):p=>E.isBlock(t,p)),!n&&L.isRange(i)&&(i=E.unhangRange(t,i));var u=E.nodes(t,{at:i,match:a,mode:o,voids:r}),s=Array.from(u,p=>{var[,d]=p;return E.pathRef(t,d)});for(var l of s){var c=l.unref();if(c){var[f]=E.node(t,c);t.apply({type:"remove_node",path:c,node:f})}}}})},setNodes(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(t,()=>{var{match:r,at:o=t.selection}=n,{hanging:i=!1,mode:a="lowest",split:u=!1,voids:s=!1}=n;if(o){if(r==null&&(r=j.isPath(o)?As(t,o):D=>E.isBlock(t,D)),!i&&L.isRange(o)&&(o=E.unhangRange(t,o)),u&&L.isRange(o)){if(L.isCollapsed(o)&&E.leaf(t,o.anchor)[0].text.length>0)return;var l=E.rangeRef(t,o,{affinity:"inward"}),[c,f]=L.edges(o),p=a==="lowest"?"lowest":"highest",d=E.isEnd(t,f,f.path);N.splitNodes(t,{at:f,match:r,mode:p,voids:s,always:!d});var y=E.isStart(t,c,c.path);N.splitNodes(t,{at:c,match:r,mode:p,voids:s,always:!y}),o=l.unref(),n.at==null&&N.select(t,o)}for(var[g,v]of E.nodes(t,{at:o,match:r,mode:a,voids:s})){var m={},h={};if(v.length!==0){var b=!1;for(var w in e)w!=="children"&&w!=="text"&&e[w]!==g[w]&&(b=!0,g.hasOwnProperty(w)&&(m[w]=g[w]),e[w]!=null&&(h[w]=e[w]));b&&t.apply({type:"set_node",path:v,properties:m,newProperties:h})}}}})},splitNodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(t,()=>{var{mode:n="lowest",voids:r=!1}=e,{match:o,at:i=t.selection,height:a=0,always:u=!1}=e;if(o==null&&(o=U=>E.isBlock(t,U)),L.isRange(i)&&(i=AG(t,i)),j.isPath(i)){var s=i,l=E.point(t,s),[c]=E.parent(t,s);o=U=>U===c,a=l.path.length-s.length+1,i=l,u=!0}if(i){var f=E.pointRef(t,i,{affinity:"backward"}),[p]=E.nodes(t,{at:i,match:o,mode:n,voids:r});if(p){var d=E.void(t,{at:i,mode:"highest"});if(!r&&d){var[y,g]=d;if(ct.isElement(y)&&t.isInline(y)){var v=E.after(t,g);if(!v){var m=j.next(g);N.insertNodes(t,{text:""},{at:m,voids:r}),v=E.point(t,m)}i=v,u=!0}a=i.path.length-g.length+1,u=!0}var h=E.pointRef(t,i),b=i.path.length-a,[,w]=p,D=i.path.slice(0,b),x=a===0?i.offset:i.path[b]+0;for(var[C,O]of E.levels(t,{at:D,reverse:!0,voids:r})){var T=!1;if(O.length2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(e)||(e=[e]);var r={};for(var o of e)r[o]=null;N.setNodes(t,r,n)},unwrapNodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(t,()=>{var{mode:n="lowest",split:r=!1,voids:o=!1}=e,{at:i=t.selection,match:a}=e;if(i){a==null&&(a=j.isPath(i)?As(t,i):p=>E.isBlock(t,p)),j.isPath(i)&&(i=E.range(t,i));var u=L.isRange(i)?E.rangeRef(t,i):null,s=E.nodes(t,{at:i,match:a,mode:n,voids:o}),l=Array.from(s,p=>{var[,d]=p;return E.pathRef(t,d)}).reverse(),c=function(p){var d=p.unref(),[y]=E.node(t,d),g=E.range(t,d);r&&u&&(g=L.intersection(u.current,g)),N.liftNodes(t,{at:g,match:v=>ct.isAncestor(y)&&y.children.includes(v),voids:o})};for(var f of l)c(f);u&&u.unref()}})},wrapNodes(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(t,()=>{var{mode:r="lowest",split:o=!1,voids:i=!1}=n,{match:a,at:u=t.selection}=n;if(u){if(a==null&&(a=j.isPath(u)?As(t,u):t.isInline(e)?v=>E.isInline(t,v)||ot.isText(v):v=>E.isBlock(t,v)),o&&L.isRange(u)){var[s,l]=L.edges(u),c=E.rangeRef(t,u,{affinity:"inward"});N.splitNodes(t,{at:l,match:a,voids:i}),N.splitNodes(t,{at:s,match:a,voids:i}),u=c.unref(),n.at==null&&N.select(t,u)}var f=Array.from(E.nodes(t,{at:u,match:t.isInline(e)?v=>E.isBlock(t,v):v=>E.isEditor(v),mode:"lowest",voids:i}));for(var[,p]of f){var d=L.isRange(u)?L.intersection(u,E.range(t,p)):u;if(d){var y=Array.from(E.nodes(t,{at:d,match:a,mode:r,voids:i}));if(y.length>0){var g=function(){var[v]=y,m=y[y.length-1],[,h]=v,[,b]=m;if(h.length===0&&b.length===0)return"continue";var w=j.equals(h,b)?j.parent(h):j.common(h,b),D=E.range(t,h,b),x=E.node(t,w),[C]=x,O=w.length+1,T=j.next(b.slice(0,O)),R=gA(gA({},e),{},{children:[]});N.insertNodes(t,R,{at:T,voids:i}),N.moveNodes(t,{at:D,match:H=>ct.isAncestor(C)&&C.children.includes(H),to:T.concat(0),voids:i})}();if(g==="continue")continue}}}}})}},rj=(t,e)=>{if(ct.isElement(e)){var n=e;return!!E.isVoid(t,e)||n.children.length===1&&rj(t,n.children[0])}return!E.isEditor(e)},AG=(t,e)=>{if(L.isCollapsed(e))return e.anchor;var[,n]=L.edges(e),r=E.pointRef(t,n);return N.delete(t,{at:e}),r.unref()},As=(t,e)=>{var[n]=E.node(t,e);return r=>r===n};function vA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function yA(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{},{edge:n="anchor"}=e,{selection:r}=t;if(r){if(n==="anchor")N.select(t,r.anchor);else if(n==="focus")N.select(t,r.focus);else if(n==="start"){var[o]=L.edges(r);N.select(t,o)}else if(n==="end"){var[,i]=L.edges(r);N.select(t,i)}}},deselect(t){var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},move(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=t,{distance:r=1,unit:o="character",reverse:i=!1}=e,{edge:a=null}=e;if(n){a==="start"&&(a=L.isBackward(n)?"focus":"anchor"),a==="end"&&(a=L.isBackward(n)?"anchor":"focus");var{anchor:u,focus:s}=n,l={distance:r,unit:o},c={};if(a==null||a==="anchor"){var f=i?E.before(t,u,l):E.after(t,u,l);f&&(c.anchor=f)}if(a==null||a==="focus"){var p=i?E.before(t,s,l):E.after(t,s,l);p&&(c.focus=p)}N.setSelection(t,c)}},select(t,e){var{selection:n}=t;if(e=E.range(t,e),n)N.setSelection(t,e);else{if(!L.isRange(e))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(JSON.stringify(e)));t.apply({type:"set_selection",properties:n,newProperties:e})}},setPoint(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:r}=t,{edge:o="both"}=n;if(r){o==="start"&&(o=L.isBackward(r)?"focus":"anchor"),o==="end"&&(o=L.isBackward(r)?"anchor":"focus");var{anchor:i,focus:a}=r,u=o==="anchor"?i:a;N.setSelection(t,{[o==="anchor"?"anchor":"focus"]:yA(yA({},u),e)})}},setSelection(t,e){var{selection:n}=t,r={},o={};if(n){for(var i in e)(i==="anchor"&&e.anchor!=null&&!Bt.equals(e.anchor,n.anchor)||i==="focus"&&e.focus!=null&&!Bt.equals(e.focus,n.focus)||i!=="anchor"&&i!=="focus"&&e[i]!==n[i])&&(r[i]=n[i],o[i]=e[i]);Object.keys(r).length>0&&t.apply({type:"set_selection",properties:r,newProperties:o})}}},kG={delete(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(t,()=>{var{reverse:n=!1,unit:r="character",distance:o=1,voids:i=!1}=e,{at:a=t.selection,hanging:u=!1}=e;if(a){if(L.isRange(a)&&L.isCollapsed(a)&&(a=a.anchor),Bt.isPoint(a)){var s=E.void(t,{at:a,mode:"highest"});if(!i&&s){var[,l]=s;a=l}else{var c={unit:r,distance:o};a={anchor:a,focus:n?E.before(t,a,c)||E.start(t,[]):E.after(t,a,c)||E.end(t,[])},u=!0}}if(j.isPath(a))N.removeNodes(t,{at:a,voids:i});else if(!L.isCollapsed(a)){if(!u){var[,f]=L.edges(a),p=E.end(t,[]);Bt.equals(f,p)||(a=E.unhangRange(t,a,{voids:i}))}var[d,y]=L.edges(a),g=E.above(t,{match:gt=>E.isBlock(t,gt),at:d,voids:i}),v=E.above(t,{match:gt=>E.isBlock(t,gt),at:y,voids:i}),m=g&&v&&!j.equals(g[1],v[1]),h=j.equals(d.path,y.path),b=i?null:E.void(t,{at:d,mode:"highest"}),w=i?null:E.void(t,{at:y,mode:"highest"});if(b){var D=E.before(t,d);D&&g&&j.isAncestor(g[1],D.path)&&(d=D)}if(w){var x=E.after(t,y);x&&v&&j.isAncestor(v[1],x.path)&&(y=x)}var C,O=[];for(var T of E.nodes(t,{at:a,voids:i})){var[R,H]=T;C&&j.compare(H,C)===0||(!i&&E.isVoid(t,R)||!j.isCommon(H,d.path)&&!j.isCommon(H,y.path))&&(O.push(T),C=H)}var M=Array.from(O,gt=>{var[,vt]=gt;return E.pathRef(t,vt)}),K=E.pointRef(t,d),U=E.pointRef(t,y);if(!h&&!b){var W=K.current,[q]=E.leaf(t,W),{path:nt}=W,{offset:lt}=d,st=q.text.slice(lt);st.length>0&&t.apply({type:"remove_text",path:nt,offset:lt,text:st})}for(var at of M){var k=at.unref();N.removeNodes(t,{at:k,voids:i})}if(!w){var S=U.current,[P]=E.leaf(t,S),{path:$}=S,Y=h?d.offset:0,V=P.text.slice(Y,y.offset);V.length>0&&t.apply({type:"remove_text",path:$,offset:Y,text:V})}!h&&m&&U.current&&K.current&&N.mergeNodes(t,{at:U.current,hanging:!0,voids:i});var it=n?K.unref()||U.unref():U.unref()||K.unref();e.at==null&&it&&N.select(t,it)}}})},insertFragment(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(t,()=>{var{hanging:r=!1,voids:o=!1}=n,{at:i=t.selection}=n;if(e.length&&i){if(L.isRange(i))if(r||(i=E.unhangRange(t,i)),L.isCollapsed(i))i=i.anchor;else{var[,a]=L.edges(i);if(!o&&E.void(t,{at:a}))return;var u=E.pointRef(t,a);N.delete(t,{at:i}),i=u.unref()}else j.isPath(i)&&(i=E.start(t,i));if(o||!E.void(t,{at:i})){var s=E.above(t,{at:i,match:S=>E.isInline(t,S),mode:"highest",voids:o});if(s){var[,l]=s;E.isEnd(t,i,l)?i=E.after(t,l):E.isStart(t,i,l)&&(i=E.before(t,l))}var c=E.above(t,{match:S=>E.isBlock(t,S),at:i,voids:o}),[,f]=c,p=E.isStart(t,i,f),d=E.isEnd(t,i,f),y=p&&d,g=!p||p&&d,v=!d,[,m]=Q.first({children:e},[]),[,h]=Q.last({children:e},[]),b=[],w=S=>{var[P,$]=S;return $.length!==0&&(!!y||!(g&&j.isAncestor($,m)&&ct.isElement(P)&&!t.isVoid(P)&&!t.isInline(P))&&!(v&&j.isAncestor($,h)&&ct.isElement(P)&&!t.isVoid(P)&&!t.isInline(P)))};for(var D of Q.nodes({children:e},{pass:w}))w(D)&&b.push(D);var x=[],C=[],O=[],T=!0,R=!1;for(var[H]of b)ct.isElement(H)&&!t.isInline(H)?(T=!1,R=!0,C.push(H)):T?x.push(H):O.push(H);var[M]=E.nodes(t,{at:i,match:S=>ot.isText(S)||E.isInline(t,S),mode:"highest",voids:o}),[,K]=M,U=E.isStart(t,i,K),W=E.isEnd(t,i,K),q=E.pathRef(t,d?j.next(f):f),nt=E.pathRef(t,W?j.next(K):K),lt=E.pathRef(t,f);N.splitNodes(t,{at:i,match:S=>R?E.isBlock(t,S):ot.isText(S)||E.isInline(t,S),mode:R?"lowest":"highest",voids:o});var st=E.pathRef(t,!U||U&&W?j.next(K):K);if(N.insertNodes(t,x,{at:st.current,match:S=>ot.isText(S)||E.isInline(t,S),mode:"highest",voids:o}),y&&C.length&&N.delete(t,{at:lt.unref(),voids:o}),N.insertNodes(t,C,{at:q.current,match:S=>E.isBlock(t,S),mode:"lowest",voids:o}),N.insertNodes(t,O,{at:nt.current,match:S=>ot.isText(S)||E.isInline(t,S),mode:"highest",voids:o}),!n.at){var at;at=O.length>0?j.previous(nt.current):C.length>0?j.previous(q.current):j.previous(st.current);var k=E.end(t,at);N.select(t,k)}st.unref(),q.unref(),nt.unref()}}})},insertText(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(t,()=>{var{voids:r=!1}=n,{at:o=t.selection}=n;if(o){if(j.isPath(o)&&(o=E.range(t,o)),L.isRange(o))if(L.isCollapsed(o))o=o.anchor;else{var i=L.end(o);if(!r&&E.void(t,{at:i}))return;var a=E.pointRef(t,i);N.delete(t,{at:o,voids:r}),o=a.unref(),N.setSelection(t,{anchor:o,focus:o})}if(r||!E.void(t,{at:o})){var{path:u,offset:s}=o;e.length>0&&t.apply({type:"insert_text",path:u,offset:s,text:e})}}})}};function mA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Lh(t){for(var e=1;e-1&&t%1==0&&t-1&&e%1==0&&e<=9007199254740991}(t.length)&&!lj(t)}function lj(t){var e=cj(t)?Mp.call(t):"";return e=="[object Function]"||e=="[object GeneratorFunction]"}function cj(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function fj(t){return!!t&&typeof t=="object"}function eq(t){return t?RG(t,function(e){return R5(e)?ZG(e):QG(e)}(t)):[]}var xA=function(t){if(!t)return[];if(R5(t))return function(n){return typeof n=="string"||!sj(n)&&fj(n)&&Mp.call(n)=="[object String]"}(t)?$G(t):function(n,r){var o=-1,i=n.length;for(r||(r=Array(i));++o0&&M5(t[n],e[n])})}var dj={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function $p(){var t=typeof document<"u"?document:{};return M5(t,dj),t}var nq={document:dj,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(t){return typeof setTimeout>"u"?(t(),null):setTimeout(t,0)},cancelAnimationFrame:function(t){typeof setTimeout<"u"&&clearTimeout(t)}};function cs(){var t=typeof window<"u"?window:{};return M5(t,nq),t}function oE(t){return oE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},oE(t)}function Wg(t,e){return Wg=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Wg(t,e)}function rq(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function iE(t,e,n){return iE=rq()?Reflect.construct:function(r,o,i){var a=[null];a.push.apply(a,o);var u=new(Function.bind.apply(r,a));return i&&Wg(u,i.prototype),u},iE.apply(null,arguments)}function aE(t){var e=typeof Map=="function"?new Map:void 0;return aE=function(n){if(n===null||!function(o){return Function.toString.call(o).indexOf("[native code]")!==-1}(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,r)}function r(){return iE(n,arguments,oE(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Wg(r,n)},aE(t)}var Zi=function(t){var e,n;function r(o){var i,a,u;return i=t.call.apply(t,[this].concat(o))||this,a=function(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}(i),u=a.__proto__,Object.defineProperty(a,"__proto__",{get:function(){return u},set:function(s){u.__proto__=s}}),i}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r}(aE(Array));function $1(t){t===void 0&&(t=[]);var e=[];return t.forEach(function(n){Array.isArray(n)?e.push.apply(e,$1(n)):e.push(n)}),e}function pj(t,e){return Array.prototype.filter.call(t,e)}function B(t,e){var n=cs(),r=$p(),o=[];if(!e&&t instanceof Zi)return t;if(!t)return new Zi(o);if(typeof t=="string"){var i=t.trim();if(i.indexOf("<")>=0&&i.indexOf(">")>=0){var a="div";i.indexOf("0}).length>0}function Fr(t,e){if(arguments.length===1&&typeof t=="string")return this[0]?this[0].getAttribute(t):void 0;for(var n=0;n=0&&(n[e=i.name.split("data-")[1],e.toLowerCase().replace(/-(.)/g,function(u,s){return s.toUpperCase()})]=i.value)}for(var a in n)n[a]==="false"?n[a]=!1:n[a]==="true"?n[a]=!0:parseFloat(n[a])===1*n[a]&&(n[a]*=1);return n}}function Oo(t){if(t===void 0){var e=this[0];if(!e)return;if(e.multiple&&e.nodeName.toLowerCase()==="select"){for(var n=[],r=0;r=0;else i.value=t}return this}function ko(){for(var t=arguments.length,e=new Array(t),n=0;n=0;d-=1){var y=p[d];i&&y.listener===i||i&&y.listener&&y.listener.dom7proxy&&y.listener.dom7proxy===i?(f.removeEventListener(l,y.proxyListener,a),p.splice(d,1)):i||(f.removeEventListener(l,y.proxyListener,a),p.splice(d,1))}}return this}function qg(){var t=cs();return this[0]===t?t.innerWidth:this.length>0?parseFloat(this.css("width")):null}function Kg(){var t=cs();return this[0]===t?t.innerHeight:this.length>0?parseFloat(this.css("height")):null}function OA(){if(this.length>0){var t=cs(),e=$p(),n=this[0],r=n.getBoundingClientRect(),o=e.body,i=n.clientTop||o.clientTop||0,a=n.clientLeft||o.clientLeft||0,u=n===t?t.scrollY:n.scrollTop,s=n===t?t.scrollX:n.scrollLeft;return{top:r.top+u-i,left:r.left+s-a}}return null}function jl(){for(var t=0;t=0;n-=1)this[e].insertBefore(o.childNodes[n],this[e].childNodes[0])}else if(t instanceof Zi)for(n=0;n-1&&t%1==0&&t-1&&e%1==0&&e<=9007199254740991}(t.length)&&!function(e){var n=function(r){var o=typeof r;return!!r&&(o=="object"||o=="function")}(e)?gj.call(e):"";return n=="[object Function]"||n==iq}(t)}function gq(t){return z5(t)?cq(t):pq(t)}function vq(t){return t}var $5=function(t,e){return(vj(t)?uq:fq)(t,typeof e=="function"?e:vq)};let yj=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let r=63&n[t];e+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return e};var yq=/^\s+|\s+$/g,mq=/^[-+]0x[0-9a-f]+$/i,bq=/^0b[01]+$/i,wq=/^0o[0-7]+$/i,Eq=parseInt,Dq=typeof se=="object"&&se&&se.Object===Object&&se,Cq=typeof self=="object"&&self&&self.Object===Object&&self,xq=Dq||Cq||Function("return this")(),Sq=Object.prototype.toString,Aq=Math.max,Oq=Math.min,Cm=function(){return xq.Date.now()};function kq(t,e,n){var r,o,i,a,u,s,l=0,c=!1,f=!1,p=!0;if(typeof t!="function")throw new TypeError("Expected a function");function d(b){var w=r,D=o;return r=o=void 0,l=b,a=t.apply(D,w)}function y(b){return l=b,u=setTimeout(v,e),c?d(b):a}function g(b){var w=b-s;return s===void 0||w>=e||w<0||f&&b-l>=i}function v(){var b=Cm();if(g(b))return m(b);u=setTimeout(v,function(w){var D=e-(w-s);return f?Oq(D,i-(w-l)):D}(b))}function m(b){return u=void 0,p&&r?d(b):(r=o=void 0,a)}function h(){var b=Cm(),w=g(b);if(r=arguments,o=this,s=b,w){if(u===void 0)return y(s);if(f)return u=setTimeout(v,e),d(s)}return u===void 0&&(u=setTimeout(v,e)),a}return e=PA(e)||0,tv(n)&&(c=!!n.leading,i=(f="maxWait"in n)?Aq(PA(n.maxWait)||0,e):i,p="trailing"in n?!!n.trailing:p),h.cancel=function(){u!==void 0&&clearTimeout(u),l=0,r=s=o=u=void 0},h.flush=function(){return u===void 0?a:m(Cm())},h}function tv(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function PA(t){if(typeof t=="number")return t;if(function(r){return typeof r=="symbol"||function(o){return!!o&&typeof o=="object"}(r)&&Sq.call(r)=="[object Symbol]"}(t))return NaN;if(tv(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=tv(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(yq,"");var n=bq.test(t);return n||wq.test(t)?Eq(t.slice(2),n?2:8):mq.test(t)?NaN:+t}var Ku=function(t,e,n){var r=!0,o=!0;if(typeof t!="function")throw new TypeError("Expected a function");return tv(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),kq(t,e,{leading:r,maxWait:e,trailing:o})};const Bq={createElement:function(t,e){return document.createElement(t,e)},createElementNS:function(t,e,n){return document.createElementNS(t,e,n)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},getTextContent:function(t){return t.textContent},isElement:function(t){return t.nodeType===1},isText:function(t){return t.nodeType===3},isComment:function(t){return t.nodeType===8}};function Md(t,e,n,r,o){return{sel:t,data:e,children:n,text:r,elm:o,key:e===void 0?void 0:e.key}}const sE=Array.isArray;function Y0(t){return typeof t=="string"||typeof t=="number"||t instanceof String||t instanceof Number}function xm(t){return t===void 0}function Xn(t){return t!==void 0}const jA=Md("",{},[],void 0,void 0);function Ic(t,e){var n,r;const o=t.key===e.key,i=((n=t.data)===null||n===void 0?void 0:n.is)===((r=e.data)===null||r===void 0?void 0:r.is);return t.sel===e.sel&&o&&i}function Fq(t,e,n){var r;const o={};for(let i=e;i<=n;++i){const a=(r=t[i])===null||r===void 0?void 0:r.key;a!==void 0&&(o[a]=i)}return o}const Tq=["create","update","remove","destroy","pre","post"];function _q(t,e){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},r=e!==void 0?e:Bq;for(const f of Tq)for(const p of t){const d=p[f];d!==void 0&&n[f].push(d)}function o(f){const p=f.id?"#"+f.id:"",d=f.getAttribute("class"),y=d?"."+d.split(" ").join("."):"";return Md(r.tagName(f).toLowerCase()+p+y,{},[],void 0,f)}function i(f,p){return function(){if(--p==0){const d=r.parentNode(f);r.removeChild(d,f)}}}function a(f,p){var d,y;let g,v=f.data;if(v!==void 0){const b=(d=v.hook)===null||d===void 0?void 0:d.init;Xn(b)&&(b(f),v=f.data)}const m=f.children,h=f.sel;if(h==="!")xm(f.text)&&(f.text=""),f.elm=r.createComment(f.text);else if(h!==void 0){const b=h.indexOf("#"),w=h.indexOf(".",b),D=b>0?b:h.length,x=w>0?w:h.length,C=b!==-1||w!==-1?h.slice(0,Math.min(D,x)):h,O=f.elm=Xn(v)&&Xn(g=v.ns)?r.createElementNS(g,C,v):r.createElement(C,v);for(D0&&O.setAttribute("class",h.slice(x+1).replace(/\./g," ")),g=0;gnt?(U=T[at+1]==null?null:T[at+1].elm,u(C,U,T,q,at,R)):l(C,O,W,nt))}(w,D,x,d):Xn(x)?(Xn(f.text)&&r.setTextContent(w,""),u(w,null,x,0,x.length-1,d)):Xn(D)?l(w,D,0,D.length-1):Xn(f.text)&&r.setTextContent(w,""):f.text!==p.text&&(Xn(D)&&l(w,D,0,D.length-1),r.setTextContent(w,p.text)),(h=b==null?void 0:b.postpatch)===null||h===void 0||h.call(b,f,p)}}return function(f,p){let d,y,g;const v=[];for(d=0;d=r?t:function(o,i,a){var u=-1,s=o.length;i<0&&(i=-i>s?0:s+i),(a=a>s?s:a)<0&&(a+=s),s=i>a?0:a-i>>>0,i>>>=0;for(var l=Array(s);++u1;b&&(h=h.slice(0,-1));var w=Fj(h),D=km[w];if(h.length>1&&!D&&!kj[h]&&!U5[w])throw new TypeError('Unknown modifier: "'+h+'"');f!==1&&D||(s?l.key=w:l.which=dK(h)),D&&(l[D]=!b||null)}}catch(x){y=!0,g=x}finally{try{!d&&m.return&&m.return()}finally{if(y)throw g}}return l}(i,e)}),o=function(i){return r.some(function(a){return function(u,s){for(var l in u){var c=u[l],f=void 0;if(c!=null&&((f=l==="key"&&s.key!=null?s.key.toLowerCase():l==="which"?c===91&&s.which===93?91:s.which:s[l])!=null||c!==!1)&&f!==c)return!1}return!0}(a,i)})};return n==null?o:o(n)}function dK(t){return t=Fj(t),U5[t]||t.toUpperCase().charCodeAt(0)}function Fj(t){return t=t.toLowerCase(),t=kj[t]||t}var pK=Bj,Bm=function(t,e){return Bj(t,{byKey:!0},e)},hK=/^\s+|\s+$/g,gK=/^[-+]0x[0-9a-f]+$/i,vK=/^0b[01]+$/i,yK=/^0o[0-7]+$/i,mK=parseInt,bK=typeof se=="object"&&se&&se.Object===Object&&se,wK=typeof self=="object"&&self&&self.Object===Object&&self,EK=bK||wK||Function("return this")(),DK=Object.prototype.toString,CK=Math.max,xK=Math.min,Fm=function(){return EK.Date.now()};function cE(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function XA(t){if(typeof t=="number")return t;if(function(r){return typeof r=="symbol"||function(o){return!!o&&typeof o=="object"}(r)&&DK.call(r)=="[object Symbol]"}(t))return NaN;if(cE(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=cE(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(hK,"");var n=vK.test(t);return n||yK.test(t)?mK(t.slice(2),n?2:8):gK.test(t)?NaN:+t}var Os,Tj=function(t,e,n){var r,o,i,a,u,s,l=0,c=!1,f=!1,p=!0;if(typeof t!="function")throw new TypeError("Expected a function");function d(b){var w=r,D=o;return r=o=void 0,l=b,a=t.apply(D,w)}function y(b){return l=b,u=setTimeout(v,e),c?d(b):a}function g(b){var w=b-s;return s===void 0||w>=e||w<0||f&&b-l>=i}function v(){var b=Fm();if(g(b))return m(b);u=setTimeout(v,function(w){var D=e-(w-s);return f?xK(D,i-(w-l)):D}(b))}function m(b){return u=void 0,p&&r?d(b):(r=o=void 0,a)}function h(){var b=Fm(),w=g(b);if(r=arguments,o=this,s=b,w){if(u===void 0)return y(s);if(f)return u=setTimeout(v,e),d(s)}return u===void 0&&(u=setTimeout(v,e)),a}return e=XA(e)||0,cE(n)&&(c=!!n.leading,i=(f="maxWait"in n)?CK(XA(n.maxWait)||0,e):i,p="trailing"in n?!!n.trailing:p),h.cancel=function(){u!==void 0&&clearTimeout(u),l=0,r=s=o=u=void 0},h.flush=function(){return u===void 0?a:m(Fm())},h},_j=as(function(t,e){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",u="[object Function]",s="[object GeneratorFunction]",l="[object Map]",c="[object Number]",f="[object Object]",p="[object Promise]",d="[object RegExp]",y="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",h="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",D="[object Float64Array]",x="[object Int8Array]",C="[object Int16Array]",O="[object Int32Array]",T="[object Uint8Array]",R="[object Uint8ClampedArray]",H="[object Uint16Array]",M="[object Uint32Array]",K=/\w*$/,U=/^\[object .+?Constructor\]$/,W=/^(?:0|[1-9]\d*)$/,q={};q[o]=q["[object Array]"]=q[h]=q[b]=q[i]=q[a]=q[w]=q[D]=q[x]=q[C]=q[O]=q[l]=q[c]=q[f]=q[d]=q[y]=q[g]=q[v]=q[T]=q[R]=q[H]=q[M]=!0,q["[object Error]"]=q[u]=q[m]=!1;var nt=typeof se=="object"&&se&&se.Object===Object&&se,lt=typeof self=="object"&&self&&self.Object===Object&&self,st=nt||lt||Function("return this")(),at=e&&!e.nodeType&&e,k=at&&t&&!t.nodeType&&t,S=k&&k.exports===at;function P(F,z){return F.set(z[0],z[1]),F}function $(F,z){return F.add(z),F}function Y(F,z,J,ut){var Mt=-1,pe=F?F.length:0;for(ut&&pe&&(J=F[++Mt]);++Mt-1},gr.prototype.set=function(F,z){var J=this.__data__,ut=Yn(J,F);return ut<0?J.push([F,z]):J[ut][1]=z,this},Ro.prototype.clear=function(){this.__data__={hash:new Rr,map:new(bn||gr),string:new Rr}},Ro.prototype.delete=function(F){return zo(this,F).delete(F)},Ro.prototype.get=function(F){return zo(this,F).get(F)},Ro.prototype.has=function(F){return zo(this,F).has(F)},Ro.prototype.set=function(F,z){return zo(this,F).set(F,z),this},Mr.prototype.clear=function(){this.__data__=new gr},Mr.prototype.delete=function(F){return this.__data__.delete(F)},Mr.prototype.get=function(F){return this.__data__.get(F)},Mr.prototype.has=function(F){return this.__data__.has(F)},Mr.prototype.set=function(F,z){var J=this.__data__;if(J instanceof gr){var ut=J.__data__;if(!bn||ut.length<199)return ut.push([F,z]),this;J=this.__data__=new Ro(ut)}return J.set(F,z),this};var Sc=Ha?gt(Ha,Object):function(){return[]},uo=function(F){return $t.call(F)};function Eh(F,z){return!!(z=z??r)&&(typeof F=="number"||W.test(F))&&F>-1&&F%1==0&&F-1&&z%1==0&&z<=r}(F.length)&&!ht(F)}var Z=Lr||function(){return!1};function ht(F){var z=ee(F)?$t.call(F):"";return z==u||z==s}function ee(F){var z=typeof F;return!!F&&(z=="object"||z=="function")}function Pt(F){return I(F)?pi(F):function(z){if(!hi(z))return io(z);var J=[];for(var ut in Object(z))Be.call(z,ut)&&ut!="constructor"&&J.push(ut);return J}(F)}t.exports=function(F){return xc(F,!0,!0)}});function ZA(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var SK=0;function AK(t){return"__private_"+SK+++"_"+t}function OK(t,e,n){const r=[];return t.forEach(o=>typeof o!="string"?r.push(o):e[Symbol.split](o).forEach((i,a,u)=>{i!==""&&r.push(i),ae===1?0:1},Array.isArray(t)?t.forEach(ZA(this,Os)[Os],this):ZA(this,Os)[Os](t)}translate(t,e){return this.translateArray(t,e).join("")}translateArray(t,e){if(!function(r,o){return Object.prototype.hasOwnProperty.call(r,o)}(this.locale.strings,t))throw new Error(`missing string: ${t}`);const n=this.locale.strings[t];if(typeof n=="object"){if(e&&e.smart_count!==void 0)return JA(n[this.locale.pluralize(e.smart_count)],e);throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return JA(n,e)}});function kK(t){if(t==null||!t.strings)return;const e=this.locale;this.locale={...e,strings:{...e.strings,...t.strings}},this.locale.pluralize=t.pluralize||e.pluralize}var jj=function(){var t={},e=t._fns={};return t.emit=function(n,r,o,i,a,u,s){var l=function(c){for(var f=e[c]?e[c]:[],p=c.indexOf(":"),d=p===-1?[c]:[c.substring(0,p),c.substring(p+1)],y=Object.keys(e),g=0,v=y.length;gcrypto.getRandomValues(new Uint8Array(t)),t7=(t,e,n)=>{let r=(2<{let i="";for(;;){let a=n(o),u=o;for(;u--;)if(i+=t[a[u]&r]||"",i.length===e)return i}}};var TK={nanoid:(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let r=63&n[t];e+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return e},customAlphabet:(t,e)=>t7(t,e,QA),customRandom:t7,urlAlphabet:FK,random:QA},Tm=function(t){if(typeof t!="number"||isNaN(t))throw new TypeError("Expected a number, got "+typeof t);var e=t<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e&&(t=-t),t<1)return(e?"-":"")+t+" B";var r=Math.min(Math.floor(Math.log(t)/Math.log(1024)),n.length-1);t=Number(t/Math.pow(1024,r));var o=n[r];return t>=10||t%1==0?(e?"-":"")+t.toFixed(0)+" "+o:(e?"-":"")+t.toFixed(1)+" "+o};function Nj(t,e){this.text=t=t||"",this.hasWild=~t.indexOf("*"),this.separator=e,this.parts=t.split(e)}Nj.prototype.match=function(t){var e,n,r=!0,o=this.parts,i=o.length;if(typeof t=="string"||t instanceof String)if(this.hasWild||this.text==t){for(n=(t||"").split(this.separator),e=0;r&&e=2}return e?n(e.split(";")[0]):n},jK=0;function NK(t){return"__private_"+jK+++"_"+t}var _m=NK("publish");class Ij{constructor(){Object.defineProperty(this,_m,{value:IK}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const n={...this.state},r={...this.state,...e};this.state=r,function(o,i){if(!Object.prototype.hasOwnProperty.call(o,i))throw new TypeError("attempted to use private field on non-instance");return o}(this,_m)[_m](n,r,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function IK(){for(var t=arguments.length,e=new Array(t),n=0;n{r(...e)})}Ij.VERSION="2.0.3";var e7=function(t){const e=t.lastIndexOf(".");return e===-1||e===t.length-1?{name:t,extension:void 0}:{name:t.slice(0,e),extension:t.slice(e+1)}},n7={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function r7(t){let e="";return t.replace(/[^A-Z0-9]/gi,n=>(e+=`-${function(r){return r.charCodeAt(0).toString(32)}(n)}`,"/"))+e}var LK=function(t){if(t==null&&(t=typeof navigator<"u"?navigator.userAgent:null),!t)return!0;const e=/Edge\/(\d+\.\d+)/.exec(t);if(!e)return!0;const n=e[1];let[r,o]=n.split(".");return r=parseInt(r,10),o=parseInt(o,10),r<15||r===15&&o<15063||r>18||r===18&&o>=18218};function Pm(t){return t<10?`0${t}`:t.toString()}var Mh=function(){const t=new Date;return`${Pm(t.getHours())}:${Pm(t.getMinutes())}:${Pm(t.getSeconds())}`},Lj={justErrorsLogger:{debug:()=>{},warn:()=>{},error:function(){for(var t=arguments.length,e=new Array(t),n=0;n"u"&&(globalThis.AggregateError=class extends Error{constructor(t,e){super(e),this.errors=t}});class VK extends AggregateError{constructor(){super(...arguments),this.isRestriction=!0}}var pn=Xe("plugins"),Lc=Xe("storeUnsubscribe"),Vo=Xe("emitter"),fu=Xe("preProcessors"),du=Xe("uploaders"),Yo=Xe("postProcessors"),ad=Xe("checkRestrictions"),jm=Xe("checkMinNumberOfFiles"),zd=Xe("checkRequiredMetaFieldsOnFile"),Nm=Xe("checkRequiredMetaFields"),Je=Xe("showOrLogErrorAndThrow"),Rc=Xe("assertNewUploadAllowed"),Mc=Xe("checkAndCreateFileStateObject"),zc=Xe("startIfAutoProceed"),Im=Xe("addListeners"),Hr=Xe("updateOnlineStatus"),Uo=Xe("createUpload"),Lm=Xe("getUpload"),vu=Xe("removeUpload"),Wo=Xe("runUpload");Mj=Symbol.for("uppy test: getPlugins"),zj=Symbol.for("uppy test: createUpload");class $j{constructor(e){Object.defineProperty(this,Wo,{value:nY}),Object.defineProperty(this,vu,{value:eY}),Object.defineProperty(this,Lm,{value:tY}),Object.defineProperty(this,Uo,{value:QK}),Object.defineProperty(this,Im,{value:JK}),Object.defineProperty(this,zc,{value:ZK}),Object.defineProperty(this,Mc,{value:XK}),Object.defineProperty(this,Rc,{value:YK}),Object.defineProperty(this,Je,{value:KK}),Object.defineProperty(this,Nm,{value:qK}),Object.defineProperty(this,zd,{value:GK}),Object.defineProperty(this,jm,{value:WK}),Object.defineProperty(this,ad,{value:UK}),Object.defineProperty(this,pn,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,Lc,{writable:!0,value:void 0}),Object.defineProperty(this,Vo,{writable:!0,value:jj()}),Object.defineProperty(this,fu,{writable:!0,value:new Set}),Object.defineProperty(this,du,{writable:!0,value:new Set}),Object.defineProperty(this,Yo,{writable:!0,value:new Set}),Object.defineProperty(this,Hr,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=RK;const n={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:{maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]},meta:{},onBeforeFileAdded:r=>r,onBeforeUpload:r=>r,store:new Ij,logger:$K,infoTimeout:5e3};if(this.opts={...n,...e,restrictions:{...n.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=HK),this.log(`Using Core v${this.constructor.VERSION}`),this.opts.restrictions.allowedFileTypes&&this.opts.restrictions.allowedFileTypes!==null&&!Array.isArray(this.opts.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");this.i18nInit(),this.calculateProgress=Ku(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:LK(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),ft(this,Lc)[Lc]=this.store.subscribe((r,o,i)=>{this.emit("state-update",r,o,i),this.updateAll(o)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),ft(this,Im)[Im]()}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{n.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,n){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...n}}})}i18nInit(){const e=new Pj([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(n=>{n.setOptions()}),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},n={...this.getState().files},r={};Object.keys(n).forEach(o=>{const i={...n[o]};i.progress={...i.progress,...e},r[o]=i}),this.setState({files:r,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){ft(this,fu)[fu].add(e)}removePreProcessor(e){return ft(this,fu)[fu].delete(e)}addPostProcessor(e){ft(this,Yo)[Yo].add(e)}removePostProcessor(e){return ft(this,Yo)[Yo].delete(e)}addUploader(e){ft(this,du)[du].add(e)}removeUploader(e){return ft(this,du)[du].delete(e)}setMeta(e){const n={...this.getState().meta,...e},r={...this.getState().files};Object.keys(r).forEach(o=>{r[o]={...r[o],meta:{...r[o].meta,...e}}}),this.log("Adding metadata:"),this.log(e),this.setState({meta:n,files:r})}setFileMeta(e,n){const r={...this.getState().files};if(!r[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const o={...r[e].meta,...n};r[e]={...r[e],meta:o},this.setState({files:r})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:n,error:r}=this.getState(),o=Object.values(e),i=o.filter(y=>{let{progress:g}=y;return!g.uploadComplete&&g.uploadStarted}),a=o.filter(y=>!y.progress.uploadStarted),u=o.filter(y=>y.progress.uploadStarted||y.progress.preprocess||y.progress.postprocess),s=o.filter(y=>y.progress.uploadStarted),l=o.filter(y=>y.isPaused),c=o.filter(y=>y.progress.uploadComplete),f=o.filter(y=>y.error),p=i.filter(y=>!y.isPaused),d=o.filter(y=>y.progress.preprocess||y.progress.postprocess);return{newFiles:a,startedFiles:u,uploadStartedFiles:s,pausedFiles:l,completeFiles:c,erroredFiles:f,inProgressFiles:i,inProgressNotPausedFiles:p,processingFiles:d,isUploadStarted:s.length>0,isAllComplete:n===100&&c.length===o.length&&d.length===0,isAllErrored:!!r&&f.length===o.length,isAllPaused:i.length!==0&&l.length===i.length,isUploadInProgress:i.length>0,isSomeGhost:o.some(y=>y.isGhost)}}validateRestrictions(e,n){try{return ft(this,ad)[ad](e,n),{result:!0}}catch(r){return{result:!1,reason:r.message}}}checkIfFileAlreadyExists(e){const{files:n}=this.getState();return!(!n[e]||n[e].isGhost)}addFile(e){ft(this,Rc)[Rc](e);const{files:n}=this.getState();let r=ft(this,Mc)[Mc](n,e);return n[r.id]&&n[r.id].isGhost&&(r={...n[r.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${r.name}, ${r.id}`)),this.setState({files:{...n,[r.id]:r}}),this.emit("file-added",r),this.emit("files-added",[r]),this.log(`Added file: ${r.name}, ${r.id}, mime type: ${r.type}`),ft(this,zc)[zc](),r.id}addFiles(e){ft(this,Rc)[Rc]();const n={...this.getState().files},r=[],o=[];for(let i=0;i{this.emit("file-added",i)}),this.emit("files-added",r),r.length>5?this.log(`Added batch of ${r.length} files`):Object.keys(r).forEach(i=>{this.log(`Added file: ${r[i].name} id: ${r[i].id} type: ${r[i].type}`)}),r.length>0&&ft(this,zc)[zc](),o.length>0){let i=`Multiple errors occurred while adding files: `;if(o.forEach(a=>{i+=` * ${a.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:o.length}),details:i},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(o,i);{const a=new Error(i);throw a.errors=o,a}}}removeFiles(e,n){const{files:r,currentUploads:o}=this.getState(),i={...r},a={...o},u=Object.create(null);function s(f){return u[f]===void 0}e.forEach(f=>{r[f]&&(u[f]=r[f],delete i[f])}),Object.keys(a).forEach(f=>{const p=o[f].fileIDs.filter(s);p.length!==0?a[f]={...o[f],fileIDs:p}:delete a[f]});const l={currentUploads:a,files:i};Object.keys(i).length===0&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const c=Object.keys(u);c.forEach(f=>{this.emit("file-removed",u[f],n)}),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(e,n){n===void 0&&(n=null),this.removeFiles([e],n)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const n=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:n}),this.emit("upload-pause",e,n),n}pauseAll(){const e={...this.getState().files};Object.keys(e).filter(n=>!e[n].progress.uploadComplete&&e[n].progress.uploadStarted).forEach(n=>{const r={...e[n],isPaused:!0};e[n]=r}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter(n=>!e[n].progress.uploadComplete&&e[n].progress.uploadStarted).forEach(n=>{const r={...e[n],isPaused:!1,error:null};e[n]=r}),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},n=Object.keys(e).filter(o=>e[o].error);if(n.forEach(o=>{const i={...e[o],isPaused:!1,error:null};e[o]=i}),this.setState({files:e,error:null}),this.emit("retry-all",n),n.length===0)return Promise.resolve({successful:[],failed:[]});const r=ft(this,Uo)[Uo](n,{forceAllowNewUpload:!0});return ft(this,Wo)[Wo](r)}cancelAll(){this.emit("cancel-all");const{files:e}=this.getState(),n=Object.keys(e);n.length&&this.removeFiles(n,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const n=ft(this,Uo)[Uo]([e],{forceAllowNewUpload:!0});return ft(this,Wo)[Wo](n)}reset(){this.cancelAll()}logout(){this.iteratePlugins(e=>{e.provider&&e.provider.logout&&e.provider.logout()})}calculateProgress(e,n){if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const r=Number.isFinite(n.bytesTotal)&&n.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:n.bytesUploaded,bytesTotal:n.bytesTotal,percentage:r?Math.round(n.bytesUploaded/n.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter(s=>s.progress.uploadStarted||s.progress.preprocess||s.progress.postprocess);if(e.length===0)return this.emit("progress",0),void this.setState({totalProgress:0});const n=e.filter(s=>s.progress.bytesTotal!=null),r=e.filter(s=>s.progress.bytesTotal==null);if(n.length===0){const s=100*e.length,l=r.reduce((f,p)=>f+p.progress.percentage,0),c=Math.round(l/s*100);return void this.setState({totalProgress:c})}let o=n.reduce((s,l)=>s+l.progress.bytesTotal,0);const i=o/n.length;o+=i*r.length;let a=0;n.forEach(s=>{a+=s.progress.bytesUploaded}),r.forEach(s=>{a+=i*(s.progress.percentage||0)/100});let u=o===0?0:Math.round(a/o*100);u>100&&(u=100),this.setState({totalProgress:u}),this.emit("progress",u)}updateOnlineStatus(){window.navigator.onLine===void 0||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,n){if(typeof e!="function")throw new TypeError(`Expected a plugin class, but got ${e===null?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`);const r=new e(this,n),o=r.id;if(!o)throw new Error("Your plugin must have an id");if(!r.type)throw new Error("Your plugin must have a type");const i=this.getPlugin(o);if(i){const a=`Already found a plugin named '${i.id}'. Tried to use: '${o}'. Uppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(a)}return e.VERSION&&this.log(`Using ${o} v${e.VERSION}`),r.type in ft(this,pn)[pn]?ft(this,pn)[pn][r.type].push(r):ft(this,pn)[pn][r.type]=[r],r.install(),this}getPlugin(e){for(const n of Object.values(ft(this,pn)[pn])){const r=n.find(o=>o.id===e);if(r!=null)return r}}[Mj](e){return ft(this,pn)[pn][e]}iteratePlugins(e){Object.values(ft(this,pn)[pn]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const n=ft(this,pn)[pn][e.type],r=n.findIndex(i=>i.id===e.id);r!==-1&&n.splice(r,1);const o={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(o)}close(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.reset(),ft(this,Lc)[Lc](),this.iteratePlugins(e=>{this.removePlugin(e)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",ft(this,Hr)[Hr]),window.removeEventListener("offline",ft(this,Hr)[Hr]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,n,r){n===void 0&&(n="info"),r===void 0&&(r=3e3);const o=typeof e=="object";this.setState({info:[...this.getState().info,{type:n,message:o?e.message:e,details:o?e.details:null}]}),setTimeout(()=>this.hideInfo(),r),this.emit("info-visible")}log(e,n){const{logger:r}=this.opts;switch(n){case"error":r.error(e);break;case"warning":r.warn(e);break;default:r.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?ft(this,Wo)[Wo](e):(ft(this,vu)[vu](e),Promise.reject(new Error("Nonexistent upload")))}[zj](){return ft(this,Uo)[Uo](...arguments)}addResultData(e,n){if(!ft(this,Lm)[Lm](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:r}=this.getState(),o={...r[e],result:{...r[e].result,...n}};this.setState({currentUploads:{...r,[e]:o}})}upload(){var e;(e=ft(this,pn)[pn].uploader)!=null&&e.length||this.log("No uploader type plugins are used","warning");let{files:n}=this.getState();const r=this.opts.onBeforeUpload(n);return r===!1?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&typeof r=="object"&&(n=r,this.setState({files:n})),Promise.resolve().then(()=>{ft(this,jm)[jm](n),ft(this,Nm)[Nm](n)}).catch(o=>{ft(this,Je)[Je](o)}).then(()=>{const{currentUploads:o}=this.getState(),i=Object.values(o).flatMap(s=>s.fileIDs),a=[];Object.keys(n).forEach(s=>{const l=this.getFile(s);l.progress.uploadStarted||i.indexOf(s)!==-1||a.push(l.id)});const u=ft(this,Uo)[Uo](a);return ft(this,Wo)[Wo](u)}).catch(o=>{ft(this,Je)[Je](o,{showInformer:!1})}))}}function UK(t,e){e===void 0&&(e=this.getFiles());const{maxFileSize:n,minFileSize:r,maxTotalFileSize:o,maxNumberOfFiles:i,allowedFileTypes:a}=this.opts.restrictions;if(i&&e.length+1>i)throw new yo(`${this.i18n("youCanOnlyUploadX",{smart_count:i})}`);if(a&&!a.some(u=>u.indexOf("/")>-1?!!t.type&&PK(t.type.replace(/;.*?$/,""),u):!(u[0]!=="."||!t.extension)&&t.extension.toLowerCase()===u.substr(1).toLowerCase())){const u=a.join(", ");throw new yo(this.i18n("youCanOnlyUploadFileTypes",{types:u}))}if(o&&t.size!=null){let u=0;if(u+=t.size,e.forEach(s=>{u+=s.size}),u>o)throw new yo(this.i18n("exceedsSize",{size:Tm(o),file:t.name}))}if(n&&t.size!=null&&t.size>n)throw new yo(this.i18n("exceedsSize",{size:Tm(n),file:t.name}));if(r&&t.size!=null&&t.size{const r=this.getFile(n);return ft(this,zd)[zd](r)});if(e.length)throw new VK(e,`${this.i18n("missingRequiredMetaField")}`)}function KK(t,e){let{showInformer:n=!0,file:r=null,throwErr:o=!0}=e===void 0?{}:e;const i=typeof t=="object"?t.message:t,a=typeof t=="object"&&t.details?t.details:"";let u=i;if(a&&(u+=` ${a}`),t.isRestriction?(this.log(u),this.emit("restriction-failed",r,t)):this.log(u,"error"),n&&this.info({message:i,details:a},"error",this.opts.infoTimeout),o)throw typeof t=="object"?t:new Error(t)}function YK(t){const{allowNewUpload:e}=this.getState();e===!1&&ft(this,Je)[Je](new yo(this.i18n("noMoreFilesAllowed")),{file:t})}function XK(t,e){const n=function(f){var p;if(f.type)return f.type;const d=f.name?(p=e7(f.name).extension)==null?void 0:p.toLowerCase():null;return d&&d in n7?n7[d]:"application/octet-stream"}(e),r=function(f,p){return p.name?p.name:f.split("/")[0]==="image"?`${f.split("/")[0]}.${f.split("/")[1]}`:"noname"}(n,e),o=e7(r).extension,i=Boolean(e.isRemote),a=function(f){let p="uppy";return typeof f.name=="string"&&(p+=`-${r7(f.name.toLowerCase())}`),f.type!==void 0&&(p+=`-${f.type}`),f.meta&&typeof f.meta.relativePath=="string"&&(p+=`-${r7(f.meta.relativePath.toLowerCase())}`),f.data.size!==void 0&&(p+=`-${f.data.size}`),f.data.lastModified!==void 0&&(p+=`-${f.data.lastModified}`),p}({...e,type:n});if(this.checkIfFileAlreadyExists(a)){const f=new yo(this.i18n("noDuplicates",{fileName:r}));ft(this,Je)[Je](f,{file:e})}const u=e.meta||{};u.name=r,u.type=n;const s=Number.isFinite(e.data.size)?e.data.size:null;let l={source:e.source||"",id:a,name:r,extension:o||"",meta:{...this.getState().meta,...u},type:n,data:e.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:s,uploadComplete:!1,uploadStarted:null},size:s,isRemote:i,remote:e.remote||"",preview:e.preview};const c=this.opts.onBeforeFileAdded(l,t);c===!1?ft(this,Je)[Je](new yo("Cannot add the file because onBeforeFileAdded returned false."),{showInformer:!1,fileDescriptor:e}):typeof c=="object"&&c!==null&&(l=c);try{const f=Object.keys(t).map(p=>t[p]);ft(this,ad)[ad](l,f)}catch(f){ft(this,Je)[Je](f,{file:l})}return l}function ZK(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(t=>{t.isRestriction||this.log(t.stack||t.message||t)})},4))}function JK(){const t=(e,n,r)=>{let o=e.message||"Unknown error";e.details&&(o+=` ${e.details}`),this.setState({error:o}),n!=null&&n.id in this.getState().files&&this.setFileState(n.id,{error:o,response:r})};this.on("error",t),this.on("upload-error",(e,n,r)=>{if(t(n,e,r),typeof n=="object"&&n.message){const o=new Error(n.message);o.details=n.message,n.details&&(o.details+=` ${n.details}`),o.message=this.i18n("failedToUpload",{file:e.name}),ft(this,Je)[Je](o,{throwErr:!1})}else ft(this,Je)[Je](n,{throwErr:!1})}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-started",e=>{this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${e.id}`)}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(e,n)=>{if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const r=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...r,postprocess:ft(this,Yo)[Yo].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:r.bytesTotal},response:n,uploadURL:n.uploadURL,isPaused:!1}),e.size==null&&this.setFileState(e.id,{size:n.bytesUploaded||r.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(e,n)=>{this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:n}}):this.log(`Not setting progress for a file that has been removed: ${e.id}`)}),this.on("preprocess-complete",e=>{if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const n={...this.getState().files};n[e.id]={...n[e.id],progress:{...n[e.id].progress}},delete n[e.id].progress.preprocess,this.setState({files:n})}),this.on("postprocess-progress",(e,n)=>{this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:n}}):this.log(`Not setting progress for a file that has been removed: ${e.id}`)}),this.on("postprocess-complete",e=>{if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const n={...this.getState().files};n[e.id]={...n[e.id],progress:{...n[e.id].progress}},delete n[e.id].progress.postprocess,this.setState({files:n})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",e=>{e&&ft(this,zd)[zd](e)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",ft(this,Hr)[Hr]),window.addEventListener("offline",ft(this,Hr)[Hr]),setTimeout(ft(this,Hr)[Hr],3e3))}function QK(t,e){e===void 0&&(e={});const{forceAllowNewUpload:n=!1}=e,{allowNewUpload:r,currentUploads:o}=this.getState();if(!r&&!n)throw new Error("Cannot create a new upload: already uploading.");const i=zK();return this.emit("upload",{id:i,fileIDs:t}),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...o,[i]:{fileIDs:t,step:0,result:{}}}}),i}function tY(t){const{currentUploads:e}=this.getState();return e[t]}function eY(t){const e={...this.getState().currentUploads};delete e[t],this.setState({currentUploads:e})}async function nY(t){let{currentUploads:e}=this.getState(),n=e[t];const r=n.step||0,o=[...ft(this,fu)[fu],...ft(this,du)[du],...ft(this,Yo)[Yo]];try{for(let a=r;a{const c=this.getFile(l);c&&c.progress.postprocess&&this.emit("postprocess-complete",c)});const a=n.fileIDs.map(l=>this.getFile(l)),u=a.filter(l=>!l.error),s=a.filter(l=>l.error);await this.addResultData(t,{successful:u,failed:s,uploadID:t}),e=this.getState().currentUploads,n=e[t]}let i;return n&&(i=n.result,this.emit("complete",i),ft(this,vu)[vu](t)),i==null&&this.log(`Not setting result for an upload that has been removed: ${t}`),i}$j.VERSION="2.1.3";var Hj=$j,rY=as(function(t,e){var n,r,o,i,a,u,s,l,c={},f=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function d(k,S){for(var P in S)k[P]=S[P];return k}function y(k){var S=k.parentNode;S&&S.removeChild(k)}function g(k,S,P){var $,Y,V,it={};for(V in S)V=="key"?$=S[V]:V=="ref"?Y=S[V]:it[V]=S[V];if(arguments.length>2&&(it.children=arguments.length>3?n.call(arguments,2):P),typeof k=="function"&&k.defaultProps!=null)for(V in k.defaultProps)it[V]===void 0&&(it[V]=k.defaultProps[V]);return v(k,it,$,Y,null)}function v(k,S,P,$,Y){var V={type:k,props:S,key:P,ref:$,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:Y??++o};return Y==null&&r.vnode!=null&&r.vnode(V),V}function m(k){return k.children}function h(k,S){this.props=k,this.context=S}function b(k,S){if(S==null)return k.__?b(k.__,k.__.__k.indexOf(k)+1):null;for(var P;S0?v(dt.type,dt.props,dt.key,null,dt.__v):dt)!=null){if(dt.__=P,dt.__b=P.__b+1,(At=te[G])===null||At&&dt.key==At.key&&dt.type===At.type)te[G]=void 0;else for(It=0;It2&&(it.children=arguments.length>3?n.call(arguments,2):P),v(k.type,it,$||k.key,Y||k.ref,null)},e.createContext=function(k,S){var P={__c:S="__cC"+l++,__:k,Consumer:function($,Y){return $.children(Y)},Provider:function($){var Y,V;return this.getChildContext||(Y=[],(V={})[S]=this,this.getChildContext=function(){return V},this.shouldComponentUpdate=function(it){this.props.value!==it.value&&Y.some(D)},this.sub=function(it){Y.push(it);var gt=it.componentWillUnmount;it.componentWillUnmount=function(){Y.splice(Y.indexOf(it),1),gt&>.call(it)}}),$.children}};return P.Provider.__=P.Consumer.contextType=P},e.createElement=g,e.createRef=function(){return{current:null}},e.h=g,e.hydrate=function k(S,P){at(S,P,k)},e.isValidElement=i,e.options=r,e.render=at,e.toChildArray=function k(S,P){return P=P||[],S==null||typeof S=="boolean"||(Array.isArray(S)?S.some(function($){k($,P)}):P.push(S)),P}}),oY=function(t,e){return e===void 0&&(e=document),typeof t=="string"?e.querySelector(t):((n=t)==null?void 0:n.nodeType)===Node.ELEMENT_NODE?t:null;var n},W5=class{constructor(t,e){e===void 0&&(e={}),this.uppy=t,this.opts=e}getPluginState(){const{plugins:t}=this.uppy.getState();return t[this.id]||{}}setPluginState(t){const{plugins:e}=this.uppy.getState();this.uppy.setState({plugins:{...e,[this.id]:{...e[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new Pj([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}};function o7(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var iY=0;function aY(t){return"__private_"+iY+++"_"+t}const{render:i7}=rY;var $c=aY("updateUI");class G5 extends W5{constructor(){super(...arguments),Object.defineProperty(this,$c,{writable:!0,value:void 0})}mount(e,n){const r=n.id,o=oY(e);if(o){this.isTargetDOMEl=!0;const u=document.createDocumentFragment();return o7(this,$c)[$c]=function(s){let l=null,c=null;return function(){for(var f=arguments.length,p=new Array(f),d=0;d(l=null,s(...c)))),l}}(s=>{this.uppy.getPlugin(this.id)&&(i7(this.render(s),u),this.afterUpdate())}),this.uppy.log(`Installing ${r} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(o.innerHTML=""),i7(this.render(this.uppy.getState()),u),this.el=u.firstElementChild,o.appendChild(u),this.onMount(),this.el}let i;if(typeof e=="object"&&e instanceof G5)i=e;else if(typeof e=="function"){const u=e;this.uppy.iteratePlugins(s=>{if(s instanceof u)return i=s,!1})}if(i)return this.uppy.log(`Installing ${r} to ${i.id}`),this.parent=i,this.el=i.addTarget(n),this.onMount(),this.el;this.uppy.log(`Not installing ${r}`);let a=`Invalid target option given to ${r}.`;throw a+=typeof e=="function"?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the "},I7=function(t){t.write(sN("")),t.close();var e=t.parentWindow.Object;return t=null,e},J0=function(){try{Vh=new ActiveXObject("htmlfile")}catch{}var t,e;J0=typeof document<"u"?document.domain&&Vh?I7(Vh):((e=Hd("iframe")).style.display="none",bE.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(sN("document.F=Object")),t.close(),t.F):I7(Vh);for(var n=av.length;n--;)delete J0.prototype[av[n]];return J0()};q1[uN]=!0;var Z1=Object.create||function(t,e){var n;return t!==null?(Jm.prototype=Le(t),n=new Jm,Jm.prototype=null,n[uN]=t):n=J0(),e===void 0?n:KX(n,e)},wE=xe("unscopables"),EE=Array.prototype;EE[wE]==null&&ro.f(EE,wE,{configurable:!0,value:Z1(null)});var ld=function(t){EE[wE][t]=!0},YX=rN.includes;De({target:"Array",proto:!0},{includes:function(t){return YX(this,t,arguments.length>1?arguments[1]:void 0)}}),ld("includes");var XX=xe("match"),rD=function(t){var e;return ce(t)&&((e=t[XX])!==void 0?!!e:Zr(t)=="RegExp")},ZX=X.TypeError,oD=function(t){if(rD(t))throw ZX("The method doesn't accept regular expressions");return t},JX=xe("match"),iD=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[JX]=!1,"/./"[t](e)}catch{}}return!1},QX=pt("".indexOf);De({target:"String",proto:!0,forced:!iD("includes")},{includes:function(t){return!!~QX(ue(_r(this)),ue(oD(t)),arguments.length>1?arguments[1]:void 0)}});var tZ=/"/g,eZ=pt("".replace);De({target:"String",proto:!0,forced:Zt(function(){var t="".anchor('"');return t!==t.toLowerCase()||t.split('"').length>3})},{anchor:function(t){return e=t,n=ue(_r(this)),r=""+n+"";var e,n,r}});var DE=function(t,e,n){var r,o;Le(t);try{if(!(r=Xu(t,"return"))){if(e==="throw")throw n;return n}r=Ut(r,t)}catch(i){o=!0,r=i}if(e==="throw")throw n;if(o)throw r;return Le(r),n},nZ=function(t,e,n,r){try{return r?e(Le(n)[0],n[1]):e(n)}catch(o){DE(t,"throw",o)}},Hl={},rZ=xe("iterator"),oZ=Array.prototype,lN=function(t){return t!==void 0&&(Hl.Array===t||oZ[rZ]===t)},Wd=function(t,e,n){var r=Q5(e);r in t?ro.f(t,r,W1(0,n)):t[r]=n},iZ=xe("iterator"),aD=function(t){if(t!=null)return Xu(t,iZ)||Xu(t,"@@iterator")||Hl[K1(t)]},aZ=X.TypeError,cN=function(t,e){var n=arguments.length<2?aD(t):e;if(xa(n))return Le(Ut(n,t));throw aZ(U1(t)+" is not iterable")},L7=X.Array,fN=xe("iterator"),dN=!1;try{var uZ=0,R7={next:function(){return{done:!!uZ++}},return:function(){dN=!0}};R7[fN]=function(){return this},Array.from(R7,function(){throw 2})}catch{}var uD=function(t,e){if(!e&&!dN)return!1;var n=!1;try{var r={};r[fN]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch{}return n},sZ=!uD(function(t){Array.from(t)});De({target:"Array",stat:!0,forced:sZ},{from:function(t){var e=Na(t),n=X1(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=o!==void 0;i&&(o=Zu(o,r>2?arguments[2]:void 0));var a,u,s,l,c,f,p=aD(e),d=0;if(!p||this==L7&&lN(p))for(a=ps(e),u=n?new this(a):L7(a);a>d;d++)f=i?o(e[d],d):e[d],Wd(u,d,f);else for(c=(l=cN(e,p)).next,u=n?new this:[];!(s=Ut(c,l)).done;d++)f=i?nZ(l,o,[s.value,d],!0):s.value,Wd(u,d,f);return u.length=d,u}});var ku,M7,z7,lZ=pt("".charAt),$7=pt("".charCodeAt),cZ=pt("".slice),H7=function(t){return function(e,n){var r,o,i=ue(_r(e)),a=Vp(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=$7(i,a))<55296||r>56319||a+1===u||(o=$7(i,a+1))<56320||o>57343?t?lZ(i,a):r:t?cZ(i,a,a+2):o-56320+(r-55296<<10)+65536}},pN={codeAt:H7(!1),charAt:H7(!0)},fZ=!Zt(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),V7=tD("IE_PROTO"),CE=X.Object,dZ=CE.prototype,uv=fZ?CE.getPrototypeOf:function(t){var e=Na(t);if(Ie(e,V7))return e[V7];var n=e.constructor;return re(n)&&e instanceof n?n.prototype:e instanceof CE?dZ:null},xE=xe("iterator"),hN=!1;[].keys&&("next"in(z7=[].keys())?(M7=uv(uv(z7)))!==Object.prototype&&(ku=M7):hN=!0);var pZ=ku==null||Zt(function(){var t={};return ku[xE].call(t)!==t});pZ&&(ku={}),re(ku[xE])||Un(ku,xE,function(){return this});var sD={IteratorPrototype:ku,BUGGY_SAFARI_ITERATORS:hN},hZ=ro.f,U7=xe("toStringTag"),sv=function(t,e,n){t&&!Ie(t=n?t:t.prototype,U7)&&hZ(t,U7,{configurable:!0,value:e})},gZ=sD.IteratorPrototype,vZ=function(){return this},yZ=X.String,mZ=X.TypeError,Vl=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=pt(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch{}return function(r,o){return Le(r),function(i){if(typeof i=="object"||re(i))return i;throw mZ("Can't set "+yZ(i)+" as a prototype")}(o),e?t(r,o):r.__proto__=o,r}}():void 0),bZ=sc.PROPER,wZ=sc.CONFIGURABLE,W7=sD.IteratorPrototype,Uh=sD.BUGGY_SAFARI_ITERATORS,Kc=xe("iterator"),EZ=function(){return this},lD=function(t,e,n,r,o,i,a){(function(m,h,b,w){var D=h+" Iterator";m.prototype=Z1(gZ,{next:W1(1,b)}),sv(m,D,!1),Hl[D]=vZ})(n,e,r);var u,s,l,c=function(m){if(m===o&&g)return g;if(!Uh&&m in d)return d[m];switch(m){case"keys":case"values":case"entries":return function(){return new n(this,m)}}return function(){return new n(this)}},f=e+" Iterator",p=!1,d=t.prototype,y=d[Kc]||d["@@iterator"]||o&&d[o],g=!Uh&&y||c(o),v=e=="Array"&&d.entries||y;if(v&&(u=uv(v.call(new t)))!==Object.prototype&&u.next&&(uv(u)!==W7&&(Vl?Vl(u,W7):re(u[Kc])||Un(u,Kc,EZ)),sv(u,f,!0)),bZ&&o=="values"&&y&&y.name!=="values"&&(wZ?Xr(d,"name","values"):(p=!0,g=function(){return Ut(y,this)})),o)if(s={values:c("values"),keys:i?g:c("keys"),entries:c("entries")},a)for(l in s)(Uh||p||!(l in d))&&Un(d,l,s[l]);else De({target:e,proto:!0,forced:Uh||p},s);return d[Kc]!==g&&Un(d,Kc,g,{name:o}),Hl[e]=g,s},DZ=pN.charAt,CZ=kn.set,xZ=kn.getterFor("String Iterator");lD(String,"String",function(t){CZ(this,{type:"String Iterator",string:ue(t),index:0})},function(){var t,e=xZ(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=DZ(n,r),e.index+=t.length,{value:t,done:!1})});var Qm,SZ=Up.f,G7=pt("".endsWith),AZ=pt("".slice),OZ=Math.min,gN=iD("endsWith"),kZ=!(gN||(Qm=SZ(String.prototype,"endsWith"),!Qm||Qm.writable));De({target:"String",proto:!0,forced:!kZ&&!gN},{endsWith:function(t){var e=ue(_r(this));oD(t);var n=arguments.length>1?arguments[1]:void 0,r=e.length,o=n===void 0?r:OZ(lc(n),r),i=ue(t);return G7?G7(e,i,o):AZ(e,o-i.length,o)===i}});var BZ=pt([].join),FZ=Y1!=Object,TZ=tN("join",",");De({target:"Array",proto:!0,forced:FZ||!TZ},{join:function(t){return BZ(Ia(this),t===void 0?",":t)}});var _Z=xe("species"),J1=function(t){return $d>=51||!Zt(function(){var e=[];return(e.constructor={})[_Z]=function(){return{foo:1}},e[t](Boolean).foo!==1})},PZ=cc.map,jZ=J1("map");De({target:"Array",proto:!0,forced:!jZ},{map:function(t){return PZ(this,t,arguments.length>1?arguments[1]:void 0)}});var cD=X.RegExp,SE=Zt(function(){var t=cD("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),NZ=SE||Zt(function(){return!cD("a","y").sticky}),Q1={BROKEN_CARET:SE||Zt(function(){var t=cD("^r","gy");return t.lastIndex=2,t.exec("str")!=null}),MISSED_STICKY:NZ,UNSUPPORTED_Y:SE},IZ=X.RegExp,fD=Zt(function(){var t=IZ(".","s");return!(t.dotAll&&t.exec(` `)&&t.flags==="s")}),LZ=X.RegExp,dD=Zt(function(){var t=LZ("(?b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$c")!=="bc"}),RZ=kn.get,MZ=Y5("native-string-replace",String.prototype.replace),lv=RegExp.prototype.exec,AE=lv,zZ=pt("".charAt),$Z=pt("".indexOf),HZ=pt("".replace),tb=pt("".slice),eb=function(){var t=/a/,e=/b*/g;return Ut(lv,t,"a"),Ut(lv,e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),q7=Q1.BROKEN_CARET,nb=/()??/.exec("")[1]!==void 0;(eb||nb||q7||fD||dD)&&(AE=function(t){var e,n,r,o,i,a,u,s=this,l=RZ(s),c=ue(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=Ut(AE,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=q7&&s.sticky,y=Ut(nD,s),g=s.source,v=0,m=c;if(d&&(y=HZ(y,"y",""),$Z(y,"g")===-1&&(y+="g"),m=tb(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&zZ(c,s.lastIndex-1)!==` `)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),nb&&(n=new RegExp("^"+g+"$(?!\\s)",y)),eb&&(r=s.lastIndex),o=Ut(lv,d?n:s,m),d?o?(o.input=tb(o.input,v),o[0]=tb(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:eb&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),nb&&o&&o.length>1&&Ut(MZ,o[0],n,function(){for(i=1;i]*>)/g,YZ=/\$([$&'`]|\d{1,2})/g,XZ=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=YZ;return o!==void 0&&(o=Na(o),s=KZ),qZ(i,s,function(l,c){var f;switch(ob(c,0)){case"$":return"$";case"&":return t;case"`":return ib(e,0,n);case"'":return ib(e,a);case"<":f=o[ib(c,1,-1)];break;default:var p=+c;if(p===0)return l;if(p>u){var d=GZ(p/10);return d===0?l:d<=u?r[d-1]===void 0?ob(c,1):r[d-1]+ob(c,1):l}f=r[p-1]}return f===void 0?"":f})},ZZ=X.TypeError,qd=function(t,e){var n=t.exec;if(re(n)){var r=Ut(n,t,e);return r!==null&&Le(r),r}if(Zr(t)==="RegExp")return Ut(Gd,t,e);throw ZZ("RegExp#exec called on incompatible receiver")},OE=xe("replace"),JZ=Math.max,QZ=Math.min,tJ=pt([].concat),ab=pt([].push),X7=pt("".indexOf),Z7=pt("".slice),eJ="a".replace(/./,"$0")==="$0",J7=!!/./[OE]&&/./[OE]("a","$0")==="";gD("replace",function(t,e,n){var r=J7?"$":"$0";return[function(o,i){var a=_r(this),u=o==null?void 0:Xu(o,OE);return u?Ut(u,o,a,i):Ut(e,ue(a),o,i)},function(o,i){var a=Le(this),u=ue(o);if(typeof i=="string"&&X7(i,r)===-1&&X7(i,"$<")===-1){var s=n(e,a,u,i);if(s.done)return s.value}var l=re(i);l||(i=ue(i));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=qd(a,u);if(d===null||(ab(p,d),!c))break;ue(d[0])===""&&(a.lastIndex=vD(u,lc(a.lastIndex),f))}for(var y,g="",v=0,m=0;m=v&&(g+=Z7(u,v,b)+O,v=b+h.length)}return g+Z7(u,v)}]},!!Zt(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$")!=="7"})||!eJ||J7);var kE=function(t,e){return kE=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},kE(t,e)};function fc(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}kE(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Er=function(){return Er=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=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 Ht(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function BE(t,e){for(var n=0,r=e.length,o=t.length;n=e.length?(t.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values");Hl.Arguments=Hl.Array,ld("keys"),ld("values"),ld("entries");var Ul=function(t,e,n){for(var r in e)Un(t,r,e[r],n);return t},iJ=X.Array,aJ=Math.max,FE=function(t,e,n){for(var r=ps(t),o=$l(e,r),i=$l(n===void 0?r:n,r),a=iJ(aJ(i-o,0)),u=0;oi;i++)if((u=v(t[i]))&&Yu(r9,u))return u;return new Q0(!1)}r=cN(t,o)}for(s=r.next;!(l=Ut(s,r)).done;){try{u=v(l.value)}catch(m){DE(r,"throw",m)}if(typeof u=="object"&&u&&Yu(r9,u))return u}return new Q0(!1)},cJ=X.TypeError,ey=function(t,e){if(Yu(e,t))return t;throw cJ("Incorrect invocation")},vN=function(t,e,n){var r,o;return Vl&&re(r=e.constructor)&&r!==n&&ce(o=r.prototype)&&o!==n.prototype&&Vl(t,o),t},yN=function(t,e,n){var r=t.indexOf("Map")!==-1,o=t.indexOf("Weak")!==-1,i=r?"set":"add",a=X[t],u=a&&a.prototype,s=a,l={},c=function(v){var m=pt(u[v]);Un(u,v,v=="add"?function(h){return m(this,h===0?0:h),this}:v=="delete"?function(h){return!(o&&!ce(h))&&m(this,h===0?0:h)}:v=="get"?function(h){return o&&!ce(h)?void 0:m(this,h===0?0:h)}:v=="has"?function(h){return!(o&&!ce(h))&&m(this,h===0?0:h)}:function(h,b){return m(this,h===0?0:h,b),this})};if(Ud(t,!re(a)||!(o||u.forEach&&!Zt(function(){new a().entries().next()}))))s=n.getConstructor(e,t,r,i),ty.enable();else if(Ud(t,!0)){var f=new s,p=f[i](o?{}:-0,1)!=f,d=Zt(function(){f.has(1)}),y=uD(function(v){new a(v)}),g=!o&&Zt(function(){for(var v=new a,m=5;m--;)v[i](m,m);return!v.has(-0)});y||((s=e(function(v,m){ey(v,u);var h=vN(new a,v,s);return m!=null&&Kd(m,h[i],{that:h,AS_ENTRIES:r}),h})).prototype=u,u.constructor=s),(d||g)&&(c("delete"),c("has"),r&&c("get")),(g||p)&&c(i),o&&u.clear&&delete u.clear}return l[t]=s,De({global:!0,forced:s!=a},l),sv(s,t),o||n.setStrong(s,t,r),s},Gh=ty.getWeakData,fJ=kn.set,dJ=kn.getterFor,pJ=cc.find,hJ=cc.findIndex,gJ=pt([].splice),vJ=0,qh=function(t){return t.frozen||(t.frozen=new mN)},mN=function(){this.entries=[]},ub=function(t,e){return pJ(t.entries,function(n){return n[0]===e})};mN.prototype={get:function(t){var e=ub(this,t);if(e)return e[1]},has:function(t){return!!ub(this,t)},set:function(t,e){var n=ub(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=hJ(this.entries,function(n){return n[0]===t});return~e&&gJ(this.entries,e,1),!!~e}};var Yc,bN={getConstructor:function(t,e,n,r){var o=t(function(s,l){ey(s,i),fJ(s,{type:e,id:vJ++,frozen:void 0}),l!=null&&Kd(l,s[r],{that:s,AS_ENTRIES:n})}),i=o.prototype,a=dJ(e),u=function(s,l,c){var f=a(s),p=Gh(Le(l),!0);return p===!0?qh(f).set(l,c):p[f.id]=c,s};return Ul(i,{delete:function(s){var l=a(this);if(!ce(s))return!1;var c=Gh(s);return c===!0?qh(l).delete(s):c&&Ie(c,l.id)&&delete c[l.id]},has:function(s){var l=a(this);if(!ce(s))return!1;var c=Gh(s);return c===!0?qh(l).has(s):c&&Ie(c,l.id)}}),Ul(i,n?{get:function(s){var l=a(this);if(ce(s)){var c=Gh(s);return c===!0?qh(l).get(s):c?c[l.id]:void 0}},set:function(s,l){return u(this,s,l)}}:{add:function(s){return u(this,s,!0)}}),o}},Kh=kn.enforce,yJ=!X.ActiveXObject&&"ActiveXObject"in X,wN=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},mJ=yN("WeakMap",wN,bN);if(Kj&&yJ){Yc=bN.getConstructor(wN,"WeakMap",!0),ty.enable();var Xc=mJ.prototype,o9=pt(Xc.delete),Yh=pt(Xc.has),i9=pt(Xc.get),a9=pt(Xc.set);Ul(Xc,{delete:function(t){if(ce(t)&&!yu(t)){var e=Kh(this);return e.frozen||(e.frozen=new Yc),o9(this,t)||e.frozen.delete(t)}return o9(this,t)},has:function(t){if(ce(t)&&!yu(t)){var e=Kh(this);return e.frozen||(e.frozen=new Yc),Yh(this,t)||e.frozen.has(t)}return Yh(this,t)},get:function(t){if(ce(t)&&!yu(t)){var e=Kh(this);return e.frozen||(e.frozen=new Yc),Yh(this,t)?i9(this,t):e.frozen.get(t)}return i9(this,t)},set:function(t,e){if(ce(t)&&!yu(t)){var n=Kh(this);n.frozen||(n.frozen=new Yc),Yh(this,t)?a9(this,t,e):n.frozen.set(t,e)}else a9(this,t,e);return this}})}var sb=xe("iterator"),u9=xe("toStringTag"),lb=Zf.values,EN=function(t,e){if(t){if(t[sb]!==lb)try{Xr(t,sb,lb)}catch{t[sb]=lb}if(t[u9]||Xr(t,u9,e),ov[e]){for(var n in Zf)if(t[n]!==Zf[n])try{Xr(t,n,Zf[n])}catch{t[n]=Zf[n]}}}};for(var cb in ov)EN(X[cb]&&X[cb].prototype,cb);EN(Xj,"DOMTokenList");var TE=new WeakMap,_E=new WeakMap,yD=new WeakMap,ny=new WeakMap,PE=new WeakMap,cv=new WeakMap,mD=new WeakMap,jE=new WeakMap,tg=new WeakMap,s9=new WeakMap,l9=new WeakMap,c9=new WeakMap,f9=new WeakMap,Yd=new WeakMap,Wl=new WeakMap,bD=new WeakMap,fv=new WeakMap,NE=new WeakMap,dv=new WeakMap,eg=new WeakMap,DN=new WeakMap,Bu=new WeakMap,fb=new WeakMap,d9=new WeakMap,db=new WeakMap,bJ=cc.find,p9=!0;"find"in[]&&Array(1).find(function(){p9=!1}),De({target:"Array",proto:!0,forced:p9},{find:function(t){return bJ(this,t,arguments.length>1?arguments[1]:void 0)}}),ld("find"),De({global:!0},{globalThis:X});const wJ=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];Xg&&(B.fn.css=Xg),Tr&&(B.fn.append=Tr),Fl&&(B.fn.addClass=Fl),Tl&&(B.fn.removeClass=Tl),_l&&(B.fn.hasClass=_l),ko&&(B.fn.on=ko),Ca&&(B.fn.focus=Ca),Fr&&(B.fn.attr=Fr),Gg&&(B.fn.removeAttr=Gg),jl&&(B.fn.hide=jl),Yg&&(B.fn.show=Yg),OA&&(B.fn.offset=OA),qg&&(B.fn.width=qg),Kg&&(B.fn.height=Kg),Nl&&(B.fn.parent=Nl),Qg&&(B.fn.parents=Qg),BA&&(B.fn.is=BA),Pl&&(B.fn.dataset=Pl),Oo&&(B.fn.val=Oo),Jg&&(B.fn.text=Jg),Da&&(B.fn.html=Da),Ll&&(B.fn.children=Ll),Rl&&(B.fn.remove=Rl),Il&&(B.fn.find=Il),Zg&&(B.fn.each=Zg),Ml&&(B.fn.empty=Ml);var mo,xn,wD=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||null},$r=function(t){return Ju(t)&&t.nodeType===1},Ju=function(t){var e=wD(t);return!!e&&t instanceof e.Node},h9=function(t){var e=t&&t.anchorNode&&wD(t.anchorNode);return!!e&&t instanceof e.Selection},CN=function(t){return Ju(t)&&t.nodeType===3},IE=function(t){var e,n,r;return(e=window.document.getElementById(t))!==null&&e!==void 0?e:((r=(n=window.document.activeElement)===null||n===void 0?void 0:n.shadowRoot)===null||r===void 0?void 0:r.getElementById(t))||null},xN=function(t,e,n){for(var r,o=t.childNodes,i=o[e],a=e,u=!1,s=!1;(Ju(r=i)&&r.nodeType===8||$r(i)&&i.childNodes.length===0||$r(i)&&i.getAttribute("contenteditable")==="false")&&(!u||!s);)a>=o.length?(u=!0,a=e-1,n="backward"):a<0?(s=!0,a=e+1,n="forward"):(i=o[a],e=a,a+=n==="forward"?1:-1);return[i,e]},EJ=function(t,e,n){return Ht(xN(t,e,n),1)[0]},DJ=function t(e){var n,r,o="";if(CN(e)&&e.nodeValue)return e.nodeValue;if($r(e)){try{for(var i=Dr(Array.from(e.childNodes)),a=i.next();!a.done;a=i.next())o+=t(a.value)}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}var u=getComputedStyle(e).getPropertyValue("display");u!=="block"&&u!=="list"&&u!=="table-row"&&e.tagName!=="BR"||(o+=` `)}return o};function SN(t,e){if(!(t instanceof HTMLElement&&t.dataset.slateVoid==="true"))for(var n=t.childNodes,r=n.length;r--;){var o=n[r],i=o.nodeType;i==3?e(o,t):i!=1&&i!=9&&i!=11||SN(o,e)}}function g9(t){if(t.length===0)return"";var e=t[0];return e.nodeType!==mo.ELEMENT_NODE?"":e.tagName.toLowerCase()}(xn=mo||(mo={}))[xn.ELEMENT_NODE=1]="ELEMENT_NODE",xn[xn.TEXT_NODE=3]="TEXT_NODE",xn[xn.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",xn[xn.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",xn[xn.COMMENT_NODE=8]="COMMENT_NODE",xn[xn.DOCUMENT_NODE=9]="DOCUMENT_NODE",xn[xn.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",xn[xn.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";var LE=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),cd=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Zc=typeof navigator<"u"&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),CJ=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),xJ=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),RE=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),Jc=!xJ&&!CJ&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",A={getWindow:function(t){var e=DN.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},findKey:function(t,e){var n=eg.get(e);return n||(n=new Q7,eg.set(e,n)),n},setNewKey:function(t){var e=new Q7;eg.set(t,e)},findPath:function(t,e){for(var n=[],r=e;;){var o=Wl.get(r);if(o==null){if(E.isEditor(r))return n;break}var i=Yd.get(r);if(i==null)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: "+JSON.stringify(e))},findDocumentOrShadowRoot:function(t){if(t.isDestroyed)return window.document;var e=A.toDOMNode(t,t),n=e.getRootNode();return(n instanceof Document||n instanceof ShadowRoot)&&n.getSelection!=null?n:e.ownerDocument},getParentNode:function(t,e){return Wl.get(e)||null},getParentsNodes:function(t,e){for(var n=[],r=e;r!==t&&r!=null;){var o=A.getParentNode(t,r);if(o==null)break;n.push(o),r=o}return n},getTopNode:function(t,e){var n=[A.findPath(t,e)[0]];return Q.get(t,n)},toDOMNode:function(t,e){var n;if(E.isEditor(e))n=bD.get(t);else{var r=A.findKey(t,e);n=NE.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: "+JSON.stringify(e));return n},hasDOMNode:function(t,e,n){n===void 0&&(n={});var r,o=n.editable,i=o!==void 0&&o,a=A.toDOMNode(t,t);try{r=$r(e)?e:e.parentElement}catch(u){if(!u.message.includes('Permission denied to access property "nodeType"'))throw u}return!!r&&r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))},toDOMRange:function(t,e){var n=e.anchor,r=e.focus,o=L.isBackward(e),i=A.toDOMPoint(t,n),a=L.isCollapsed(e)?i:A.toDOMPoint(t,r),u=A.getWindow(t).document.createRange(),s=Ht(o?a:i,2),l=s[0],c=s[1],f=Ht(o?i:a,2),p=f[0],d=f[1],y=!!($r(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!($r(p)?p:p.parentElement).getAttribute("data-slate-zero-width");return u.setStart(l,y?1:c),u.setEnd(p,g?1:d),u},toDOMPoint:function(t,e){var n,r,o,i=Ht(E.node(t,e.path),1)[0],a=A.toDOMNode(t,i);E.void(t,{at:e})&&(e={path:e.path,offset:0});var u=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),s=0;try{for(var l=Dr(u),c=l.next();!c.done;c=l.next()){var f=c.value,p=f.childNodes[0];if(p!=null&&p.textContent!=null){var d=p.textContent.length,y=f.getAttribute("data-slate-length"),g=s+(y==null?d:parseInt(y,10));if(e.offset<=g){o=[p,Math.min(d,Math.max(0,e.offset-s))];break}s=g}}}catch(v){n={error:v}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: "+JSON.stringify(e));return o},toSlateNode:function(t,e){var n=$r(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?fv.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: "+n);return r},findEventRange:function(t,e){"nativeEvent"in e&&(e=e.nativeEvent);var n=e.clientX,r=e.clientY,o=e.target;if(n==null||r==null)throw new Error("Cannot resolve a Slate range from a DOM event: "+e);var i,a=A.toSlateNode(t,e.target),u=A.findPath(t,a);if(E.isVoid(t,a)){var s=o.getBoundingClientRect(),l=t.isInline(a)?n-s.left0},isSelectedEmptyParagraph:function(t){var e=t.selection;if(e==null||L.isExpanded(e))return!1;var n=A.getSelectedNodeByType(t,"paragraph");if(n===null)return!1;var r=n.children;return r.length===1&&(r[0].text===""||void 0)},isEmptyPath:function(t,e){var n=E.node(t,e);if(n==null)return!1;var r=Ht(n,1)[0].children;return r.length===1&&r[0].text===""}},SJ=1,AN={},Xd={},AJ=cc.filter,OJ=J1("filter");De({target:"Array",proto:!0,forced:!OJ},{filter:function(t){return AJ(this,t,arguments.length>1?arguments[1]:void 0)}});var ME=` \v\f\r                 \u2028\u2029\uFEFF`,v9=pt("".replace),pv="["+ME+"]",kJ=RegExp("^"+pv+pv+"*"),BJ=RegExp(pv+pv+"*$"),pb=function(t){return function(e){var n=ue(_r(e));return 1&t&&(n=v9(n,kJ,"")),2&t&&(n=v9(n,BJ,"")),n}},FJ={start:pb(1),end:pb(2),trim:pb(3)},TJ=sc.PROPER,_J=FJ.trim;De({target:"String",proto:!0,forced:function(t){return Zt(function(){return!!ME[t]()||"​…᠎"[t]()!=="​…᠎"||TJ&&ME[t].name!==t})}("trim")},{trim:function(){return _J(this)}});var zE=[],ON={};function PJ(t,e,n){var r=n.isInline(t)?"span":"div";return"<"+r+">"+e+""}var Zd,Fs,y9,hb,hv=X.Promise,m9=xe("species"),ED=function(t){var e=ds(t),n=ro.f;an&&e&&!e[m9]&&n(e,m9,{configurable:!0,get:function(){return this}})},jJ=X.TypeError,NJ=xe("species"),kN=function(t,e){var n,r=Le(t).constructor;return r===void 0||(n=Le(r)[NJ])==null?e:function(o){if(X1(o))return o;throw jJ(U1(o)+" is not a constructor")}(n)},BN=pt([].slice),FN=/(?:ipad|iphone|ipod).*applewebkit/i.test(hl),ia=Zr(X.process)=="process",$E=X.setImmediate,HE=X.clearImmediate,IJ=X.process,gb=X.Dispatch,LJ=X.Function,b9=X.MessageChannel,RJ=X.String,vb=0,fd={};try{Zd=X.location}catch{}var DD=function(t){if(Ie(fd,t)){var e=fd[t];delete fd[t],e()}},yb=function(t){return function(){DD(t)}},w9=function(t){DD(t.data)},E9=function(t){X.postMessage(RJ(t),Zd.protocol+"//"+Zd.host)};$E&&HE||($E=function(t){var e=BN(arguments,1);return fd[++vb]=function(){hD(re(t)?t:LJ(t),void 0,e)},Fs(vb),vb},HE=function(t){delete fd[t]},ia?Fs=function(t){IJ.nextTick(yb(t))}:gb&&gb.now?Fs=function(t){gb.now(yb(t))}:b9&&!FN?(hb=(y9=new b9).port2,y9.port1.onmessage=w9,Fs=Zu(hb.postMessage,hb)):X.addEventListener&&re(X.postMessage)&&!X.importScripts&&Zd&&Zd.protocol!=="file:"&&!Zt(E9)?(Fs=E9,X.addEventListener("message",w9,!1)):Fs="onreadystatechange"in Hd("script")?function(t){bE.appendChild(Hd("script")).onreadystatechange=function(){bE.removeChild(this),DD(t)}}:function(t){setTimeout(yb(t),0)});var Qc,pu,dd,nl,mb,bb,wb,D9,TN={set:$E,clear:HE},MJ=/ipad|iphone|ipod/i.test(hl)&&X.Pebble!==void 0,zJ=/web0s(?!.*chrome)/i.test(hl),$J=Up.f,Eb=TN.set,C9=X.MutationObserver||X.WebKitMutationObserver,x9=X.document,S9=X.process,Xh=X.Promise,A9=$J(X,"queueMicrotask"),_N=A9&&A9.value;_N||(Qc=function(){var t,e;for(ia&&(t=S9.domain)&&t.exit();pu;){e=pu.fn,pu=pu.next;try{e()}catch(n){throw pu?nl():dd=void 0,n}}dd=void 0,t&&t.enter()},FN||ia||zJ||!C9||!x9?!MJ&&Xh&&Xh.resolve?((wb=Xh.resolve(void 0)).constructor=Xh,D9=Zu(wb.then,wb),nl=function(){D9(Qc)}):ia?nl=function(){S9.nextTick(Qc)}:(Eb=Zu(Eb,X),nl=function(){Eb(Qc)}):(mb=!0,bb=x9.createTextNode(""),new C9(Qc).observe(bb,{characterData:!0}),nl=function(){bb.data=mb=!mb}));var Db,O9,PN,k9,jN=_N||function(t){var e={fn:t,next:void 0};dd&&(dd.next=e),pu||(pu=e,nl()),dd=e},HJ=function(t){var e,n;this.promise=new t(function(r,o){if(e!==void 0||n!==void 0)throw TypeError("Bad Promise constructor");e=r,n=o}),this.resolve=xa(e),this.reject=xa(n)},CD={f:function(t){return new HJ(t)}},VE=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},VJ=typeof window=="object",NN=TN.set,UJ=xe("species"),go="Promise",B9=kn.getterFor(go),WJ=kn.set,GJ=kn.getterFor(go),uu=hv&&hv.prototype,bo=hv,tf=uu,IN=X.TypeError,UE=X.document,xD=X.process,vl=CD.f,qJ=vl,KJ=!!(UE&&UE.createEvent&&X.dispatchEvent),LN=re(X.PromiseRejectionEvent),RN=!1,pd=Ud(go,function(){var t=G1(bo),e=t!==String(bo);if(!e&&$d===66)return!0;if($d>=51&&/native code/.test(t))return!1;var n=new bo(function(o){o(1)}),r=function(o){o(function(){},function(){})};return(n.constructor={})[UJ]=r,!(RN=n.then(function(){})instanceof r)||!e&&VJ&&!LN}),YJ=pd||!uD(function(t){bo.all(t).catch(function(){})}),MN=function(t){var e;return!(!ce(t)||!re(e=t.then))&&e},SD=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;jN(function(){for(var r=t.value,o=t.state==1,i=0;n.length>i;){var a,u,s,l=n[i++],c=o?l.ok:l.fail,f=l.resolve,p=l.reject,d=l.domain;try{c?(o||(t.rejection===2&&ZJ(t),t.rejection=1),c===!0?a=r:(d&&d.enter(),a=c(r),d&&(d.exit(),s=!0)),a===l.promise?p(IN("Promise-chain cycle")):(u=MN(a))?Ut(u,a,f,p):f(a)):p(r)}catch(y){d&&!s&&d.exit(),p(y)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&XJ(t)})}},zN=function(t,e,n){var r,o;KJ?((r=UE.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),X.dispatchEvent(r)):r={promise:e,reason:n},!LN&&(o=X["on"+t])?o(r):t==="unhandledrejection"&&function(i,a){var u=X.console;u&&u.error&&(arguments.length==1?u.error(i):u.error(i,a))}("Unhandled promise rejection",n)},XJ=function(t){Ut(NN,X,function(){var e,n=t.facade,r=t.value;if(F9(t)&&(e=VE(function(){ia?xD.emit("unhandledRejection",r,n):zN("unhandledrejection",n,r)}),t.rejection=ia||F9(t)?2:1,e.error))throw e.value})},F9=function(t){return t.rejection!==1&&!t.parent},ZJ=function(t){Ut(NN,X,function(){var e=t.facade;ia?xD.emit("rejectionHandled",e):zN("rejectionhandled",e,t.value)})},ll=function(t,e,n){return function(r){t(e,r,n)}},yl=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,SD(t,!0))},WE=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw IN("Promise can't be resolved itself");var r=MN(e);r?jN(function(){var o={done:!1};try{Ut(r,e,ll(WE,o,t),ll(yl,o,t))}catch(i){yl(o,i,t)}}):(t.value=e,t.state=1,SD(t,!1))}catch(o){yl({done:!1},o,t)}}};if(pd&&(tf=(bo=function(t){ey(this,tf),xa(t),Ut(Db,this);var e=B9(this);try{t(ll(WE,e),ll(yl,e))}catch(n){yl(e,n)}}).prototype,(Db=function(t){WJ(this,{type:go,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Ul(tf,{then:function(t,e){var n=GJ(this),r=n.reactions,o=vl(kN(this,bo));return o.ok=!re(t)||t,o.fail=re(e)&&e,o.domain=ia?xD.domain:void 0,n.parent=!0,r[r.length]=o,n.state!=0&&SD(n,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),O9=function(){var t=new Db,e=B9(t);this.promise=t,this.resolve=ll(WE,e),this.reject=ll(yl,e)},CD.f=vl=function(t){return t===bo||t===PN?new O9(t):qJ(t)},re(hv)&&uu!==Object.prototype)){k9=uu.then,RN||(Un(uu,"then",function(t,e){var n=this;return new bo(function(r,o){Ut(k9,n,r,o)}).then(t,e)},{unsafe:!0}),Un(uu,"catch",tf.catch,{unsafe:!0}));try{delete uu.constructor}catch{}Vl&&Vl(uu,tf)}De({global:!0,wrap:!0,forced:pd},{Promise:bo}),sv(bo,go,!1),ED(go),PN=ds(go),De({target:go,stat:!0,forced:pd},{reject:function(t){var e=vl(this);return Ut(e.reject,void 0,t),e.promise}}),De({target:go,stat:!0,forced:pd},{resolve:function(t){return function(e,n){if(Le(e),ce(n)&&n.constructor===e)return n;var r=CD.f(e);return(0,r.resolve)(n),r.promise}(this,t)}}),De({target:go,stat:!0,forced:YJ},{all:function(t){var e=this,n=vl(e),r=n.resolve,o=n.reject,i=VE(function(){var a=xa(e.resolve),u=[],s=0,l=1;Kd(t,function(c){var f=s++,p=!1;l++,Ut(a,e,c).then(function(d){p||(p=!0,u[f]=d,--l||r(u))},o)}),--l||r(u)});return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=vl(e),r=n.reject,o=VE(function(){var i=xa(e.resolve);Kd(t,function(a){Ut(i,e,a).then(n.resolve,r)})});return o.error&&r(o.value),n.promise}});var Ts=Q1.UNSUPPORTED_Y,JJ=Math.min,$N=[].push,QJ=pt(/./.exec),_s=pt($N),ef=pt("".slice);function Pr(t){Promise.resolve().then(t)}function HN(t,e){return ct.isElement(t)?function(n,r){var o=n.type,i=o===void 0?"":o,a=n.children,u=a===void 0?[]:a,s=E.isVoid(r,n),l="";s||(l=u.map(function(m){return HN(m,r)}).join(""));var c=function(m){return ON[m]||PJ}(i),f=c(n,l,r),p="";if(p=typeof f=="string"?f:f.html||"",s||zE.forEach(function(m){return p=m(n,p)}),typeof f=="string")return p;var d=f.prefix,y=d===void 0?"":d,g=f.suffix,v=g===void 0?"":g;return y&&(p=y+p),v&&(p+=v),p}(t,e):function(n,r){var o=n.text;if(o==null)throw new Error("Current node is not slate Text "+JSON.stringify(n));var i=o;i=function(s){return s.replace(/ {2}/g,"  ").replace(//g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(i);var a=A.getParentsNodes(r,n).some(function(s){return A.getNodeType(s)==="pre"});if(a||(i=i.replace(/\r\n|\r|\n/g,"
")),a&&(i=i.replace(/ /g," ")),i===""){var u=A.getParentNode(null,n);if(!u||u.children.length!==0)return i;i="
"}return zE.forEach(function(s){return i=s(n,i)}),i}(t,e)}function VN(t){return"w-e-element-"+t}gD("split",function(t,e,n){var r;return r="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(o,i){var a=ue(_r(this)),u=i===void 0?4294967295:i>>>0;if(u===0)return[];if(o===void 0)return[a];if(!rD(o))return Ut(e,a,o,u);for(var s,l,c,f=[],p=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(o.sticky?"y":""),d=0,y=new RegExp(o.source,p+"g");(s=Ut(Gd,y,a))&&!((l=y.lastIndex)>d&&(_s(f,ef(a,d,s.index)),s.length>1&&s.index=u));)y.lastIndex===s.index&&y.lastIndex++;return d===a.length?!c&&QJ(y,"")||_s(f,""):_s(f,ef(a,d)),f.length>u?FE(f,0,u):f}:"0".split(void 0,0).length?function(o,i){return o===void 0&&i===0?[]:Ut(e,this,o,i)}:e,[function(o,i){var a=_r(this),u=o==null?void 0:Xu(o,t);return u?Ut(u,o,a,i):Ut(r,ue(a),o,i)},function(o,i){var a=Le(this),u=ue(o),s=n(r,a,u,i,r!==e);if(s.done)return s.value;var l=kN(a,RegExp),c=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Ts?"g":"y"),p=new l(Ts?"^(?:"+a.source+")":a,f),d=i===void 0?4294967295:i>>>0;if(d===0)return[];if(u.length===0)return qd(p,u)===null?[u]:[];for(var y=0,g=0,v=[];g=n},_9=function(t,e,n){var r=A.toDOMRange(t,e).getBoundingClientRect(),o=A.toDOMRange(t,n).getBoundingClientRect();return T9(r,o)&&T9(o,r)},UN=["span","b","strong","i","em","s","strike","u","font","sub","sup"],WN=[],AD=[],gv={},tQ=ro.f,eQ=Vd.f,nQ=kn.enforce,rQ=xe("match"),Jo=X.RegExp,rl=Jo.prototype,oQ=X.SyntaxError,iQ=pt(nD),aQ=pt(rl.exec),Zh=pt("".charAt),P9=pt("".replace),j9=pt("".indexOf),uQ=pt("".slice),sQ=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Fu=/a/g,Cb=/a/g,lQ=new Jo(Fu)!==Fu,GN=Q1.MISSED_STICKY,cQ=Q1.UNSUPPORTED_Y,fQ=an&&(!lQ||GN||fD||dD||Zt(function(){return Cb[rQ]=!1,Jo(Fu)!=Fu||Jo(Cb)==Cb||Jo(Fu,"i")!="/a/i"}));if(Ud("RegExp",fQ)){for(var Ai=function(t,e){var n,r,o,i,a,u,s=Yu(rl,this),l=rD(t),c=e===void 0,f=[],p=t;if(!s&&l&&c&&t.constructor===Ai)return t;if((l||Yu(rl,t))&&(t=t.source,c&&(e="flags"in p?p.flags:iQ(p))),t=t===void 0?"":ue(t),e=e===void 0?"":ue(e),p=t,fD&&"dotAll"in Fu&&(r=!!e&&j9(e,"s")>-1)&&(e=P9(e,/s/g,"")),n=e,GN&&"sticky"in Fu&&(o=!!e&&j9(e,"y")>-1)&&cQ&&(e=P9(e,/y/g,"")),dD&&(i=function(d){for(var y,g=d.length,v=0,m="",h=[],b={},w=!1,D=!1,x=0,C="";v<=g;v++){if((y=Zh(d,v))==="\\")y+=Zh(d,++v);else if(y==="]")w=!1;else if(!w)switch(!0){case y==="[":w=!0;break;case y==="(":aQ(sQ,uQ(d,v+1))&&(v+=2,D=!0),m+=y,x++;continue;case(y===">"&&D):if(C===""||Ie(b,C))throw new oQ("Invalid capture group name");b[C]=!0,h[h.length]=[C,x],D=!1,C="";continue}D?C+=y:m+=y}return[m,h]}(t),t=i[0],f=i[1]),a=vN(Jo(t,e),s?this:rl,Ai),(r||o||f.length)&&(u=nQ(a),r&&(u.dotAll=!0,u.raw=Ai(function(d){for(var y,g=d.length,v=0,m="",h=!1;v<=g;v++)(y=Zh(d,v))!=="\\"?h||y!=="."?(y==="["?h=!0:y==="]"&&(h=!1),m+=y):m+="[\\s\\S]":m+=y+Zh(d,++v);return m}(t),n)),o&&(u.sticky=!0),f.length&&(u.groups=f)),t!==p)try{Xr(a,"source",p===""?"(?:)":p)}catch{}return a},dQ=function(t){t in Ai||tQ(Ai,t,{configurable:!0,get:function(){return Jo[t]},set:function(e){Jo[t]=e}})},N9=eQ(Jo),I9=0;N9.length>I9;)dQ(N9[I9++]);rl.constructor=Ai,Ai.prototype=rl,Un(X,"RegExp",Ai)}ED("RegExp");var pQ=new RegExp(String.fromCharCode(160),"g");function qN(t){return t.replace(pQ," ")}function L9(t,e){var n=t.length;if(n){var r=t[n-1];if(ot.isText(r)){var o=Object.keys(r);if(o.length===1&&o[0]==="text")return r.text=r.text+e,!0}}return!1}function hQ(t,e,n){return{type:"paragraph",children:[{text:B(t).text().replace(/\s+/gm," ")}]}}function xb(t,e){var n=function(i,a){var u=[];if(i.attr("data-w-e-is-void")!=null)return u;var s=i[0].childNodes;return s.length===1&&s[0].nodeName==="BR"?(u.push({text:""}),u):(s.forEach(function(l){if(l.nodeType!==mo.ELEMENT_NODE){if(l.nodeType===mo.TEXT_NODE){var c=l.textContent||"";if(c.trim()===""&&c.indexOf(` `)>=0)return;c&&(c=qN(c),L9(u,c)||u.push({text:c}))}}else{if(l.nodeName==="BR")return void(L9(u,` `)||u.push({text:` `}));var f=OD(B(l),a);Array.isArray(f)?f.forEach(function(p){return u.push(p)}):u.push(f)}}),u)}(t,e),r=function(i){for(var a in gv)if(i[0].matches(a))return gv[a];return hQ}(t),o=r(t[0],n,e);return Array.isArray(o)||(o=[o]),o.forEach(function(i){E.isVoid(e,i)||(n.length===0&&(i.children=[{text:t.text().replace(/\s+/gm," ")}]),AD.forEach(function(a){i=a(t[0],i,e)}))}),o}function Sb(t,e){t.parents("pre").length===0&&(t[0].innerHTML=t[0].innerHTML.replace(/\s+/gm," ").replace(/
/g,` `));var n=t[0].textContent||"";n=function(o){return o.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}(n);var r={text:n=qN(n)};return AD.forEach(function(o){r=o(t[0],r,e)}),r}function OD(t,e){WN.forEach(function(r){var o=r.selector,i=r.preParseHtml;t[0].matches(o)&&(t=B(i(t[0])))});var n=g9(t);return n==="span"?t.attr("data-w-e-type")?xb(t,e):Sb(t,e):n==="code"?g9(t.parent())==="pre"?xb(t,e):Sb(t,e):UN.includes(n)?Sb(t,e):xb(t,e)}function KN(t,e,n){var r=B(n);return!!r.attr(e)||(r.attr(e,"true"),t.on("destroyed",function(){r.removeAttr(e)}),!1)}function R9(t,e){e===void 0&&(e="");var n=[];e===""&&(e="


"),e.indexOf("<")!==0&&(e=e.split(/\n/).map(function(o){return"

"+o+"

"}).join(""));var r=B("
"+e+"
");return Array.from(r.children()).forEach(function(o){var i=OD(B(o),t);Array.isArray(i)?i.forEach(function(a){return n.push(a)}):n.push(i)}),n}var gQ=ro.f,M9=ty.fastKey,z9=kn.set,Ab=kn.getterFor,vQ={getConstructor:function(t,e,n,r){var o=t(function(l,c){ey(l,i),z9(l,{type:e,index:Z1(null),first:void 0,last:void 0,size:0}),an||(l.size=0),c!=null&&Kd(c,l[r],{that:l,AS_ENTRIES:n})}),i=o.prototype,a=Ab(e),u=function(l,c,f){var p,d,y=a(l),g=s(l,c);return g?g.value=f:(y.last=g={index:d=M9(c,!0),key:c,value:f,previous:p=y.last,next:void 0,removed:!1},y.first||(y.first=g),p&&(p.next=g),an?y.size++:l.size++,d!=="F"&&(y.index[d]=g)),l},s=function(l,c){var f,p=a(l),d=M9(c);if(d!=="F")return p.index[d];for(f=p.first;f;f=f.next)if(f.key==c)return f};return Ul(i,{clear:function(){for(var l=a(this),c=l.index,f=l.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete c[f.index],f=f.next;l.first=l.last=void 0,an?l.size=0:this.size=0},delete:function(l){var c=this,f=a(c),p=s(c,l);if(p){var d=p.next,y=p.previous;delete f.index[p.index],p.removed=!0,y&&(y.next=d),d&&(d.previous=y),f.first==p&&(f.first=d),f.last==p&&(f.last=y),an?f.size--:c.size--}return!!p},forEach:function(l){for(var c,f=a(this),p=Zu(l,arguments.length>1?arguments[1]:void 0);c=c?c.next:f.first;)for(p(c.value,c.key,this);c&&c.removed;)c=c.previous},has:function(l){return!!s(this,l)}}),Ul(i,n?{get:function(l){var c=s(this,l);return c&&c.value},set:function(l,c){return u(this,l===0?0:l,c)}}:{add:function(l){return u(this,l=l===0?0:l,l)}}),an&&gQ(i,"size",{get:function(){return a(this).size}}),o},setStrong:function(t,e,n){var r=e+" Iterator",o=Ab(e),i=Ab(r);lD(t,e,function(a,u){z9(this,{type:r,target:a,state:o(a),kind:u,last:void 0})},function(){for(var a=i(this),u=a.kind,s=a.last;s&&s.removed;)s=s.previous;return a.target&&(a.last=s=s?s.next:a.state.first)?u=="keys"?{value:s.key,done:!1}:u=="values"?{value:s.value,done:!1}:{value:[s.key,s.value],done:!1}:(a.target=void 0,{value:void 0,done:!0})},n?"entries":"values",!n,!0),ED(e)}};yN("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},vQ);var $9=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function H9(t,e){t.isInline(e)?(t.insertNode(e),e.type==="link"&&t.insertFragment([{text:""}])):N.insertNodes(t,e,{mode:"highest"})}var yQ=function(t){var e=t,n=e.insertText;return e.insertFragment,e.setFragmentData=function(r){var o=e.selection;if(o){var i=Ht(L.edges(o),2),a=i[0],u=i[1],s=E.void(e,{at:a.path}),l=E.void(e,{at:u.path});if(!L.isCollapsed(o)||s){var c=A.toDOMRange(e,o),f=c.cloneContents(),p=f.childNodes[0];if(f.childNodes.forEach(function(D){D.textContent&&D.textContent.trim()!==""&&(p=D)}),l){var d=Ht(l,1)[0],y=c.cloneRange(),g=A.toDOMNode(e,d);y.setEndAfter(g),f=y.cloneContents()}if(s&&(p=f.querySelector("[data-slate-spacer]")),Array.from(f.querySelectorAll("[data-slate-zero-width]")).forEach(function(D){var x=D.getAttribute("data-slate-zero-width")==="n";D.textContent=x?` `:""}),CN(p)){var v=p.ownerDocument.createElement("span");v.style.whiteSpace="pre",v.appendChild(p),f.appendChild(v),p=v}var m=e.getFragment(),h=JSON.stringify(m),b=window.btoa(encodeURIComponent(h));p.setAttribute("data-slate-fragment",b),r.setData("application/x-slate-fragment",b);var w=f.ownerDocument.createElement("div");return w.appendChild(f),w.setAttribute("hidden","true"),f.ownerDocument.body.appendChild(w),r.setData("text/html",w.innerHTML),r.setData("text/plain",DJ(w)),f.ownerDocument.body.removeChild(w),r}}},e.insertData=function(r){var o,i,a=r.getData("application/x-slate-fragment");if(a){var u=decodeURIComponent(window.atob(a)),s=JSON.parse(u);e.insertFragment(s)}else{var l=r.getData("text/plain"),c=r.getData("text/html");if(c)e.dangerouslyInsertHtml(c);else if(l){var f=l.split(/\r\n|\r|\n/),p=!1;try{for(var d=Dr(f),y=d.next();!y.done;y=d.next()){var g=y.value;p&&N.splitNodes(e,{always:!0}),n(g),p=!0}}catch(v){o={error:v}}finally{try{y&&!y.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}}},e},Jf=function(t){return t!=null},mQ={object:!0,function:!0,undefined:!0},bQ=/^\s*class[\s{/}]/,wQ=Function.prototype.toString,V9=function(t){return!!function(e){if(typeof e!="function"||!hasOwnProperty.call(e,"length"))return!1;try{if(typeof e.length!="number"||typeof e.call!="function"||typeof e.apply!="function")return!1}catch{return!1}return!function(n){if(!function(r){return!!Jf(r)&&hasOwnProperty.call(mQ,typeof r)}(n))return!1;try{return!!n.constructor&&n.constructor.prototype===n}catch{return!1}}(e)}(t)&&!bQ.test(wQ.call(t))},kD=function(t){return t!=null},EQ=Object.keys,DQ=function(){try{return Object.keys("primitive"),!0}catch{return!1}}()?Object.keys:function(t){return EQ(kD(t)?Object(t):t)},CQ=function(t){if(!kD(t))throw new TypeError("Cannot use null or undefined");return t},xQ=Math.max,U9=function(){var t,e=Object.assign;return typeof e=="function"&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}()?Object.assign:function(t,e){var n,r,o,i=xQ(arguments.length,2);for(t=Object(CQ(t)),o=function(a){try{t[a]=e[a]}catch(u){n||(n=u)}},r=1;r-1},Jh=Hp(function(t){var e=t.exports=function(n,r){var o,i,a,u,s;return arguments.length<2||typeof n!="string"?(u=r,r=n,n=null):u=arguments[2],Jf(n)?(o=nf.call(n,"c"),i=nf.call(n,"e"),a=nf.call(n,"w")):(o=a=!0,i=!1),s={value:r,configurable:o,enumerable:i,writable:a},u?U9(W9(u),s):s};e.gs=function(n,r,o){var i,a,u,s;return typeof n!="string"?(u=o,o=r,r=n,n=null):u=arguments[3],Jf(r)?V9(r)?Jf(o)?V9(o)||(u=o,o=void 0):o=void 0:(u=r,r=o=void 0):r=void 0,Jf(n)?(i=nf.call(n,"c"),a=nf.call(n,"e")):(i=!0,a=!1),s={get:r,set:o,configurable:i,enumerable:a},u?U9(W9(u),s):s}}),kb=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");return t},BQ=Hp(function(t,e){var n,r,o,i,a,u,s,l=Function.prototype.apply,c=Function.prototype.call,f=Object.create,p=Object.defineProperty,d=Object.defineProperties,y=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};n=function(v,m){var h;return kb(m),y.call(this,"__ee__")?h=this.__ee__:(h=g.value=f(null),p(this,"__ee__",g),g.value=null),h[v]?typeof h[v]=="object"?h[v].push(m):h[v]=[h[v],m]:h[v]=m,this},r=function(v,m){var h,b;return kb(m),b=this,n.call(this,v,h=function(){o.call(b,v,h),l.call(m,this,arguments)}),h.__eeOnceListener__=m,this},o=function(v,m){var h,b,w,D;if(kb(m),!y.call(this,"__ee__"))return this;if(!(h=this.__ee__)[v])return this;if(typeof(b=h[v])=="object")for(D=0;w=b[D];++D)w!==m&&w.__eeOnceListener__!==m||(b.length===2?h[v]=b[D?0:1]:b.splice(D,1));else b!==m&&b.__eeOnceListener__!==m||delete h[v];return this},i=function(v){var m,h,b,w,D;if(y.call(this,"__ee__")&&(w=this.__ee__[v]))if(typeof w=="object"){for(h=arguments.length,D=new Array(h-1),m=1;ma/2){var d=a-p;c.right=d+5+"px"}else c.left=p+5+"px";if(f>u/2){var y=u-f;c.bottom=y+5+"px"}else{var g=f+l;g<0&&(g=0),c.top=g+5+"px"}return c}function TD(t,e,n){n===void 0&&(n="modal");var r={top:"0",left:"0"};if(t.selection==null)return r;var o=ct.isElement(e)&&t.isVoid(e),i=ct.isElement(e)&&t.isInline(e),a=dv.get(e);if(a==null)return r;var u=a.getBoundingClientRect(),s=u.top,l=u.left,c=u.height,f=u.width;if(o){var p=function(C){var O=[];O.push(C);for(var T=0;O.length>0;){var R=O.pop();if(R==null||++T>1e4)break;var H=R.nodeName;if(R.nodeType===1){var M=H.toLowerCase();if(wJ.includes(M)||M==="iframe"||M==="video")return R;var K=R.children||[],U=K.length;if(U)for(var W=U-1;W>=0;W--)O.push(K[W])}}return null}(a);if(p!=null){var d=p.getBoundingClientRect();s=d.top,c=d.height}}var y=BD(t);if(y==null)return r;var g,v=y.top,m=y.left,h=y.width,b=y.height,w={},D=s-v,x=l-m;if(n==="bar")return w.left=x+"px",D>40?w.bottom=b-D+5+"px":w.top=D+c+5+"px",w;if(n==="modal")return o?i?x>(h-f)/2?w.right=h-x+5+"px":w.left=x+f+5+"px":w.left="20px":w.left=x+"px",o?((g=D)<0&&(g=0),w.top=g+"px"):D>(b-c)/2?w.bottom=b-D+5+"px":((g=D+c)<0&&(g=0),w.top=g+5+"px"),w;throw new Error("type '"+n+"' is invalid")}function GE(t,e){Pr(function(){var n=BD(t);if(n!=null){var r,o=n.top,i=n.left,a=n.width,u=n.height,s=e.offset(),l=s.top,c=s.left,f=e.width(),p=e.height(),d=l-o,y=c-i,g=e.attr("style");if(g.indexOf("top")>=0&&(r=d+p-u)>0){var v=e.css("top"),m=parseInt(v.toString())-r;m<0&&(m=0),e.css("top",m+"px")}if(g.indexOf("bottom")>=0&&l<0){var h=e.css("bottom"),b=parseInt(h.toString())-Math.abs(l);e.css("bottom",b+"px")}if(g.indexOf("left")>=0&&(r=y+f-a)>0){var w=e.css("left"),D=parseInt(w.toString())-r;D<0&&(D=0),e.css("left",D+"px")}if(g.indexOf("right")>=0&&c<0){var x=e.css("right"),C=parseInt(x.toString())-Math.abs(c);e.css("right",C+"px")}}})}var _Q=J1("slice"),PQ=xe("species"),Bb=X.Array,jQ=Math.max;De({target:"Array",proto:!0,forced:!_Q},{slice:function(t,e){var n,r,o,i=Ia(this),a=ps(i),u=$l(t,a),s=$l(e===void 0?a:e,a);if(iv(i)&&(n=i.constructor,(X1(n)&&(n===Bb||iv(n.prototype))||ce(n)&&(n=n[PQ])===null)&&(n=void 0),n===Bb||n===void 0))return BN(i,u,s);for(r=new(n===void 0?Bb:n)(jQ(s-u,0)),o=0;u1?arguments[1]:void 0,e.length)),r=ue(t);return q9?q9(e,r,n):IQ(e,n,n+r.length)===r}});var Ps=Object.assign,K9=Object.defineProperty,MQ=pt([].concat),Y9=!Ps||Zt(function(){if(an&&Ps({b:1},Ps(K9({},"a",{enumerable:!0,get:function(){K9(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(o){e[o]=o}),Ps({},t)[n]!=7||gl(Ps({},e)).join("")!=r})?function(t,e){for(var n=Na(t),r=arguments.length,o=1,i=iN.f,a=nN.f;r>o;)for(var u,s=Y1(arguments[o++]),l=i?MQ(gl(s),i(s)):gl(s),c=l.length,f=0;c>f;)u=l[f++],an&&!Ut(a,s,u)||(n[u]=s[u]);return n}:Ps;De({target:"Object",stat:!0,forced:Object.assign!==Y9},{assign:Y9});var zQ=["props","attrs","style","dataset","on","hook"];function XN(t){var e=t.data,n=e===void 0?{}:e,r=t.children,o=r===void 0?[]:r;Object.keys(n).forEach(function(i){var a,u,s=n[i];if(i!=="key"){if(!zQ.includes(i)){if(i.startsWith("data-")){var l=i.slice(5);return l=cK(l),function(c,f){c.data==null&&(c.data={});var p=c.data;p.dataset==null&&(p.dataset={}),Object.assign(p.dataset,f)}(t,((a={})[l]=s,a)),void delete n[i]}(function(c,f){c.data==null&&(c.data={});var p=c.data;p.props==null&&(p.props={}),Object.assign(p.props,f)})(t,(u={},u[i]=s,u)),delete n[i]}}else t.key=s}),o.length>0&&o.forEach(function(i){typeof i!="string"&&XN(i)})}var qE=[],ZN={};function $Q(t,e,n){return bt(n.isInline(t)?"span":"div",null,e)}function X9(t,e){return e===void 0&&(e=!1),bt("span",{"data-slate-string":!0},e?t+` `:t)}function Fb(t,e){return t===void 0&&(t=0),e===void 0&&(e=!1),bt("span",{"data-slate-zero-width":e?"n":"z","data-slate-length":t},"\uFEFF",e?bt("br",null):null)}function KE(t,e,n,r){return Yd.set(t,e),Wl.set(t,n),ct.isElement(t)?function(o,i){var a,u=A.findKey(i,o),s=i.isInline(o),l=E.isVoid(i,o),c=VN(u.id),f={id:c,key:u.id,"data-slate-node":"element","data-slate-inline":s},p=o.type,d=o.children,y=d===void 0?[]:d,g=function(D){return ZN[D]||$Q}(p);a=l?null:y.map(function(D,x){return KE(D,x,o,i)});var v=g(o,a,i);if(l){f["data-slate-void"]=!0;var m=s?"span":"div",h=Ht(Q.texts(o),1),b=Ht(h[0],1)[0],w=bt(m,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},KE(b,0,o,i));v=bt(m,{style:{position:"relative"}},v,w),Yd.set(b,0),Wl.set(b,o)}return v.data==null&&(v.data={}),Object.assign(v.data,f),l||s||(v=function(D,x){var C=x;return qE.forEach(function(O){C=O(D,x)}),C}(o,v)),Pr(function(){var D=IE(c);D!=null&&(NE.set(u,D),dv.set(o,D),fv.set(D,o))}),v}(t,r):function(o,i,a){if(o.text==null)throw new Error("Current node is not slate Text "+JSON.stringify(o));var u=A.findKey(a,o),s=a.getConfig().decorate;if(s==null)throw new Error("Can not get config.decorate");var l=A.findPath(a,o),c=s([o,l]),f=ot.decorations(o,c),p=f.map(function(g,v){var m=function(h,b,w,D,x){b===void 0&&(b=!1);var C=h.text,O=A.findPath(x,w),T=j.parent(O);if(E.isEditor(D))throw new Error("Text node "+JSON.stringify(w)+" parent is Editor");return x.isVoid(D)?Fb(Q.string(D).length):C!==""||D.children[D.children.length-1]!==w||x.isInline(D)||E.string(x,T)!==""?C===""?Fb():b&&C.slice(-1)===` `?X9(C,!0):X9(C):Fb(0,!0)}(g,v===f.length-1,o,i,a);return m=function(h,b){var w=b;return qE.forEach(function(D){w=D(h,w)}),w}(g,m),bt("span",{"data-slate-leaf":!0},m)}),d=function(g){return"w-e-text-"+g}(u.id),y=bt("span",{"data-slate-node":"text",id:d,key:u.id},p);return Pr(function(){var g=IE(d);g!=null&&(NE.set(u,g),dv.set(o,g),fv.set(g,o))}),y}(t,n,r)}function HQ(t,e){var n,r=t.$scroll,o=function(g){return"w-e-textarea-"+g}(t.id),i=e.getConfig(),a=i.readOnly,u=i.autoFocus,s=function(g,v){return v===void 0&&(v=!1),zl("div#"+g,{props:{contentEditable:!v}})}(o,a),l=e.children||[];s.children=l.map(function(g,v){var m=KE(g,v,e,e);return XN(m),m});var c=l9.get(t);if(c==null&&(c=!0),c){var f=function(g,v){return B(`
`)}(o);r.append(f),t.$textArea=f,n=f[0],(d=_q([jq,Rq,zq,Nq,Lq,Pq]))(n,s),l9.set(t,!1),c9.set(t,d)}else{var p=f9.get(t),d=c9.get(t);if(p==null||d==null)return;n=p.elm,d(p,s)}if(n!=null||(n=IE(o))!=null){if((c?u:e.isFocused())&&n.focus({preventScroll:!0}),c){var y=wD(n);y&&DN.set(e,y)}bD.set(e,n),dv.set(e,n),fv.set(n,e),f9.set(t,s)}}function Z9(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function J9(t,e){return(!e||t!=="hidden")&&t!=="visible"&&t!=="clip"}function Tb(t,e){if(t.clientHeighte||i>t&&a=e&&u>=n?i-t-r:a>e&&un?a-e+o:0}function Q9(t,e){var n=window,r=e.scrollMode,o=e.block,i=e.inline,a=e.boundary,u=e.skipOverflowHiddenElements,s=typeof a=="function"?a:function(Dt){return Dt!==a};if(!Z9(t))throw new TypeError("Invalid target");for(var l=document.scrollingElement||document.documentElement,c=[],f=t;Z9(f)&&s(f);){if((f=f.parentElement)===l){c.push(f);break}f!=null&&f===document.body&&Tb(f)&&!Tb(document.documentElement)||f!=null&&Tb(f,u)&&c.push(f)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,d=n.visualViewport?n.visualViewport.height:innerHeight,y=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,v=t.getBoundingClientRect(),m=v.height,h=v.width,b=v.top,w=v.right,D=v.bottom,x=v.left,C=o==="start"||o==="nearest"?b:o==="end"?D:b+m/2,O=i==="center"?x+h/2:i==="end"?w:x,T=[],R=0;R=0&&x>=0&&D<=d&&w<=p&&b>=W&&D<=nt&&x>=lt&&w<=q)return T;var st=getComputedStyle(H),at=parseInt(st.borderLeftWidth,10),k=parseInt(st.borderTopWidth,10),S=parseInt(st.borderRightWidth,10),P=parseInt(st.borderBottomWidth,10),$=0,Y=0,V="offsetWidth"in H?H.offsetWidth-H.clientWidth-at-S:0,it="offsetHeight"in H?H.offsetHeight-H.clientHeight-k-P:0;if(l===H)$=o==="start"?C:o==="end"?C-d:o==="nearest"?t0(g,g+d,d,k,P,g+C,g+C+m,m):C-d/2,Y=i==="start"?O:i==="center"?O-p/2:i==="end"?O-p:t0(y,y+p,p,at,S,y+O,y+O+h,h),$=Math.max(0,$+g),Y=Math.max(0,Y+y);else{$=o==="start"?C-W-k:o==="end"?C-nt+P+it:o==="nearest"?t0(W,nt,K,k,P+it,C,C+m,m):C-(W+K/2)+it/2,Y=i==="start"?O-lt-at:i==="center"?O-(lt+U/2)+V/2:i==="end"?O-q+S+V:t0(lt,q,U,at,S+V,O,O+h,h);var gt=H.scrollLeft,vt=H.scrollTop;C+=vt-($=Math.max(0,Math.min(vt+$,H.scrollHeight-K+it))),O+=gt-(Y=Math.max(0,Math.min(gt+Y,H.scrollWidth-U+V)))}T.push({el:H,top:$,left:Y})}return T}function tO(t){return t===Object(t)&&Object.keys(t).length!==0}function mr(t,e){return Ju(e)&&A.hasDOMNode(t,e,{editable:!0})}function eO(t,e){if(t.getConfig().readOnly)return!1;var n=ol(t,e)&&A.toSlateNode(t,e);return E.isVoid(t,n)}function ol(t,e){return Ju(e)&&A.hasDOMNode(t,e)}function JN(t,e,n){n===void 0&&(n=!1);var r=e.selection,o=e.getConfig(),i=A.findDocumentOrShadowRoot(e).getSelection();if(i&&(!t.isComposing||n)&&e.isFocused()){var a=i.type!=="None";if(r||a){var u=bD.get(e),s=!1;if(u.contains(i.anchorNode)&&u.contains(i.focusNode)&&(s=!0),a&&s&&r){var l=A.toSlateRange(e,i,{exactMatch:!0,suppressThrow:!0});if(l&&L.equals(l,r)){var c=!0;if(L.isCollapsed(r)){var f=i.anchorNode,p=i.anchorOffset;if(f===u){var d=u.childNodes,y=void 0;(y=d[p])&&y.matches("table")&&(c=!1),(y=d[p-1])&&y.matches("table")&&(c=!1)}}if(c)return}}if(!r||A.hasRange(e,r)){t.isUpdatingSelection=!0;var g=r&&A.toDOMRange(e,r);if(g){L.isBackward(r)?i.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):i.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")){v.getBoundingClientRect=g.getBoundingClientRect.bind(g);var m=document.body;(function(h,b){var w=!h.ownerDocument.documentElement.contains(h);if(tO(b)&&typeof b.behavior=="function")return b.behavior(w?[]:Q9(h,b));if(!w){var D=function(x){return x===!1?{block:"end",inline:"nearest"}:tO(x)?x:{block:"start",inline:"nearest"}}(b);(function(x,C){C===void 0&&(C="auto");var O="scrollBehavior"in document.body.style;x.forEach(function(T){var R=T.el,H=T.top,M=T.left;R.scroll&&O?R.scroll({top:H,left:M,behavior:C}):(R.scrollTop=H,R.scrollLeft=M)})})(Q9(h,D),D.behavior)}})(v,{scrollMode:"if-needed",boundary:o.scroll?u.parentElement:m,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else i.removeAllRanges();setTimeout(function(){g&&cd&&u.focus(),t.isUpdatingSelection=!1})}else e.selection=A.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})}}}var _b=new WeakMap,nO=new WeakMap,VQ={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},UQ={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},WQ={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},me=function(t){var e=VQ[t],n=UQ[t],r=WQ[t],o=e&&Bm(e),i=n&&Bm(n),a=r&&Bm(r);return function(u){return!(!o||!o(u))||!!(LE&&i&&i(u))||!(LE||!a||!a(u))}},we={isBold:me("bold"),isCompose:me("compose"),isMoveBackward:me("moveBackward"),isMoveForward:me("moveForward"),isDeleteBackward:me("deleteBackward"),isDeleteForward:me("deleteForward"),isDeleteLineBackward:me("deleteLineBackward"),isDeleteLineForward:me("deleteLineForward"),isDeleteWordBackward:me("deleteWordBackward"),isDeleteWordForward:me("deleteWordForward"),isExtendBackward:me("extendBackward"),isExtendForward:me("extendForward"),isExtendLineBackward:me("extendLineBackward"),isExtendLineForward:me("extendLineForward"),isItalic:me("italic"),isMoveLineBackward:me("moveLineBackward"),isMoveLineForward:me("moveLineForward"),isMoveWordBackward:me("moveWordBackward"),isMoveWordForward:me("moveWordForward"),isRedo:me("redo"),isSplitBlock:me("splitBlock"),isTransposeCharacter:me("transposeCharacter"),isUndo:me("undo"),isTab:me("tab"),isSelectAll:me("selectAll")};function He(t){t.preventDefault()}var GQ={beforeinput:function(t,e,n){var r=t,o=n.getConfig().readOnly;if(Jc&&!o&&mr(n,r.target)){var i=n.selection,a=r.inputType,u=r.dataTransfer||r.data||void 0;if(a!=="insertCompositionText"&&a!=="deleteCompositionText"){if(r.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var s=Ht(r.getTargetRanges(),1)[0];if(s){var l=A.toSlateRange(n,s,{exactMatch:!1,suppressThrow:!1});i&&L.equals(i,l)||N.select(n,l)}}if(i&&L.isExpanded(i)&&a.startsWith("delete")){var c=a.endsWith("Backward")?"backward":"forward";E.deleteFragment(n,{direction:c})}else switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":E.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":E.deleteForward(n);break;case"deleteContentBackward":E.deleteBackward(n);break;case"deleteEntireSoftLine":E.deleteBackward(n,{unit:"line"}),E.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":E.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":E.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":E.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":E.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":E.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":E.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":E.insertBreak(n);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if(a==="insertFromPaste"&&!db.get(n))break;u instanceof DataTransfer?n.insertData(u):typeof u=="string"&&E.insertText(n,u)}}}},blur:function(t,e,n){var r=t,o=e.isUpdatingSelection,i=e.latestElement;if(!n.getConfig().readOnly&&!o&&mr(n,r.target)){var a=A.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var u=r.relatedTarget;if(!(u===A.toDOMNode(n,n)||$r(u)&&u.hasAttribute("data-slate-spacer"))){if(u!=null&&Ju(u)&&A.hasDOMNode(n,u)){var s=A.toSlateNode(n,u);if(ct.isElement(s)&&!n.isVoid(s))return}if(Zc){var l=a.getSelection();l==null||l.removeAllRanges()}Bu.delete(n)}}}},focus:function(t,e,n){var r=A.toDOMNode(n,n),o=A.findDocumentOrShadowRoot(n);e.latestElement=o.activeElement,cd&&t.target!==r?r.focus():Bu.set(n,!0)},click:function(t,e,n){if(!n.getConfig().readOnly&&ol(n,t.target)&&Ju(t.target)){var r=A.toSlateNode(n,t.target),o=A.findPath(n,r);if(E.hasPath(n,o)&&Q.get(n,o)===r){var i=E.start(n,o),a=E.end(n,o),u=E.void(n,{at:i}),s=E.void(n,{at:a});if(u&&s&&j.equals(u[1],s[1])){var l=E.range(n,i);N.select(n,l)}}}},compositionstart:function(t,e,n){if(mr(n,t.target)){var r=n.selection;if(r&&L.isExpanded(r)&&(E.deleteFragment(n),Promise.resolve().then(function(){JN(e,n,!0)})),r&&L.isCollapsed(r)){var o=A.toDOMRange(n,r).startContainer,i=o.textContent||"";_b.set(n,i),nO.set(n,o)}e.isComposing=!0,function(a,u){var s;u.getConfig().placeholder&&u.isEmpty()&&a.showPlaceholder&&((s=a.$placeholder)===null||s===void 0||s.hide(),a.showPlaceholder=!1)}(e,n)}},compositionend:function(t,e,n){var r=t;if(mr(n,r.target)){e.isComposing=!1;var o=n.selection;if(o!=null){(RE||cd)&&A.cleanExposedTexNodeInSelectionBlock(n);for(var i=L.isBackward(o)?o.focus:o.anchor,a=Ht(E.node(n,[i.path[0]]),1)[0],u=0;u0&&E.insertText(n,l.slice(0,c)),e.changeViewState()):E.insertText(n,l)}else E.insertText(n,l);Zc||setTimeout(function(){var f=n.selection;if(f!=null){var p=nO.get(n);p!=null&&A.toDOMRange(n,f).startContainer!==p&&(p.textContent=_b.get(n)||"")}})}}}},compositionupdate:function(t,e,n){mr(n,t.target)&&(e.isComposing=!0)},keydown:function(t,e,n){var r=t,o=n.selection;if(!n.getConfig().readOnly&&!e.isComposing&&mr(n,r.target)){if(function(a,u){var s=ny.get(a),l=s&&s.getMenus(),c=cv.get(a),f=c&&c.getMenus(),p=Er(Er({},l),f);for(var d in p){var y=p[d],g=y.hotkey;if(g&&pK(g,u)&&!y.isDisabled(a)){var v=y.getValue(a);y.exec(a,v)}}}(n,r),we.isTab(r))return He(r),void n.handleTab();if(we.isRedo(r))return He(r),void(typeof n.redo=="function"&&n.redo());if(we.isUndo(r))return He(r),void(typeof n.undo=="function"&&n.undo());if(we.isMoveLineBackward(r))return He(r),void N.move(n,{unit:"line",reverse:!0});if(we.isMoveLineForward(r))return He(r),void N.move(n,{unit:"line"});if(we.isExtendLineBackward(r))return He(r),void N.move(n,{unit:"line",edge:"focus",reverse:!0});if(we.isExtendLineForward(r))return He(r),void N.move(n,{unit:"line",edge:"focus"});if(we.isMoveBackward(r))return He(r),void(o&&L.isCollapsed(o)?N.move(n,{reverse:!0}):N.collapse(n,{edge:"start"}));if(we.isMoveForward(r))return He(r),void(o&&L.isCollapsed(o)?N.move(n):N.collapse(n,{edge:"end"}));if(we.isMoveWordBackward(r))return He(r),o&&L.isExpanded(o)&&N.collapse(n,{edge:"focus"}),void N.move(n,{unit:"word",reverse:!0});if(we.isMoveWordForward(r))return He(r),o&&L.isExpanded(o)&&N.collapse(n,{edge:"focus"}),void N.move(n,{unit:"word"});if(we.isSelectAll(r))return He(r),void n.selectAll();if(Jc){if((RE||Zc)&&o&&(we.isDeleteBackward(r)||we.isDeleteForward(r))&&L.isCollapsed(o)){var i=Q.parent(n,o.anchor.path);if(ct.isElement(i)&&E.isVoid(n,i)&&E.isInline(n,i))return r.preventDefault(),void N.delete(n,{unit:"block"})}}else{if(we.isBold(r)||we.isItalic(r)||we.isTransposeCharacter(r))return void He(r);if(we.isSplitBlock(r))return He(r),void E.insertBreak(n);if(we.isDeleteBackward(r))return He(r),void(o&&L.isExpanded(o)?E.deleteFragment(n,{direction:"backward"}):E.deleteBackward(n));if(we.isDeleteForward(r))return He(r),void(o&&L.isExpanded(o)?E.deleteFragment(n,{direction:"forward"}):E.deleteForward(n));if(we.isDeleteLineBackward(r))return He(r),void(o&&L.isExpanded(o)?E.deleteFragment(n,{direction:"backward"}):E.deleteBackward(n,{unit:"line"}));if(we.isDeleteLineForward(r))return He(r),void(o&&L.isExpanded(o)?E.deleteFragment(n,{direction:"forward"}):E.deleteForward(n,{unit:"line"}));if(we.isDeleteWordBackward(r))return He(r),void(o&&L.isExpanded(o)?E.deleteFragment(n,{direction:"backward"}):E.deleteBackward(n,{unit:"word"}));if(we.isDeleteWordForward(r))return He(r),void(o&&L.isExpanded(o)?E.deleteFragment(n,{direction:"forward"}):E.deleteForward(n,{unit:"word"}))}}},keypress:function(t,e,n){if(!Jc&&!n.getConfig().readOnly&&mr(n,t.target)){t.preventDefault();var r=t.key;E.insertText(n,r)}},copy:function(t,e,n){var r=t;if(mr(n,r.target)){r.preventDefault();var o=r.clipboardData;o!=null&&n.setFragmentData(o)}},cut:function(t,e,n){var r=t,o=n.selection;if(!n.getConfig().readOnly&&mr(n,r.target)){r.preventDefault();var i=r.clipboardData;if(i!=null&&(n.setFragmentData(i),o))if(L.isExpanded(o))E.deleteFragment(n);else{var a=Q.parent(n,o.anchor.path);E.isVoid(n,a)&&N.delete(n)}}},paste:function(t,e,n){db.set(n,!0);var r=t;if(!n.getConfig().readOnly&&mr(n,r.target)){var o=n.getConfig().customPaste;if(o&&o(n,r)===!1)return void db.set(n,!1);if(!Jc||function(a){return a.clipboardData&&a.clipboardData.getData("text/plain")!==""&&a.clipboardData.types.length===1}(r)){r.preventDefault();var i=r.clipboardData;i!=null&&n.insertData(i)}}},dragover:function(t,e,n){if(ol(n,t.target)){var r=A.toSlateNode(n,t.target);E.isVoid(n,r)&&t.preventDefault()}},dragstart:function(t,e,n){var r=t;if(ol(n,r.target)&&!n.getConfig().readOnly){var o=A.toSlateNode(n,r.target),i=A.findPath(n,o);if(E.isVoid(n,o)||E.void(n,{at:i,voids:!0})){var a=E.range(n,i);N.select(n,a)}var u=r.dataTransfer;u!=null&&(e.isDraggingInternally=!0,n.setFragmentData(u))}},dragend:function(t,e,n){var r=t;n.getConfig().readOnly||e.isDraggingInternally&&ol(n,r.target)&&(e.isDraggingInternally=!1)},drop:function(t,e,n){var r=t,o=r.dataTransfer;if(!n.getConfig().readOnly&&ol(n,r.target)&&o!=null&&!(Jc&&Zc&&o.files.length>0)){r.preventDefault();var i=n.selection,a=A.findEventRange(n,r);N.select(n,a),e.isDraggingInternally&&(i&&N.delete(n,{at:i}),e.isDraggingInternally=!1),n.insertData(o),n.isFocused()||n.focus()}}},qQ=1,KQ=function(){function t(e){var n=this;this.id=qQ++,this.$textArea=null,this.$progressBar=B('
'),this.$maxLengthInfo=B('
'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=Ku(function(){var a=n.editorInstance;(function(u,s){var l=u.isComposing,c=u.isUpdatingSelection,f=u.isDraggingInternally;if(!(s.getConfig().readOnly||l||c||f)){var p=A.findDocumentOrShadowRoot(s),d=p.activeElement,y=A.toDOMNode(s,s),g=p.getSelection();if(d===y?(u.latestElement=d,Bu.set(s,!0)):Bu.delete(s),!g)return N.deselect(s);var v=g.anchorNode,m=g.focusNode,h=mr(s,v)||eO(s,v),b=mr(s,m)||eO(s,m);if(h&&b){var w=A.toSlateRange(s,g,{exactMatch:!1,suppressThrow:!1});N.select(s,w)}else N.deselect(s)}})(n,a)},100);var r=B(e);if(r.length===0)throw new Error("Cannot find textarea DOM by selector '"+e+"'");this.$box=r;var o=B('
');o.append(this.$progressBar),o.append(this.$maxLengthInfo),r.append(o);var i=B('
');o.append(i),this.$scroll=i,this.$textAreaContainer=o,Pr(function(){var a=n.editorInstance,u=A.getWindow(a);u.document.addEventListener("selectionchange",n.onDOMSelectionChange),a.on("destroyed",function(){u.document.removeEventListener("selectionchange",n.onDOMSelectionChange)}),o.on("click",function(){return a.hidePanelOrModal()}),a.on("change",n.changeViewState.bind(n));var s=a.getConfig().onChange;s&&a.on("change",function(){return s(a)}),n.onFocusAndOnBlur(),a.on("change",n.changeMaxLengthInfo.bind(n)),n.bindEvent()})}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){var e=_E.get(this);if(e==null)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),t.prototype.bindEvent=function(){var e=this,n=this.$textArea,r=this.$scroll,o=this.editorInstance;n!=null&&($5(GQ,function(i,a){n.on(a,function(u){i(u,e,o)})}),o.getConfig().scroll&&(r.css("overflow-y","auto"),r.on("scroll",Ku(function(){o.emit("scroll")},100))))},t.prototype.onFocusAndOnBlur=function(){var e=this,n=this.editorInstance,r=n.getConfig(),o=r.onBlur,i=r.onFocus;this.latestEditorSelection=n.selection,n.on("change",function(){e.latestEditorSelection==null&&n.selection!=null?setTimeout(function(){return i&&i(n)}):e.latestEditorSelection!=null&&n.selection==null&&setTimeout(function(){return o&&o(n)}),e.latestEditorSelection=n.selection})},t.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,n=e.getConfig().maxLength;if(n){var r=n-A.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML=r+"/"+n}},t.prototype.changeProgress=function(e){var n=this.$progressBar;n.css("width",e+"%"),e>=100&&setTimeout(function(){n.hide(),n.css("width","0"),n.show()},1e3)},t.prototype.changeViewState=function(){var e=this,n=this.editorInstance;HQ(this,n),function(r,o){var i,a=o.getConfig().placeholder;if(a){var u=o.isEmpty();if(u&&!r.showPlaceholder&&!r.isComposing){if(r.$placeholder==null){var s=B('
'+a+"
");r.$textAreaContainer.append(s),r.$placeholder=s}return r.$placeholder.show(),void(r.showPlaceholder=!0)}!u&&r.showPlaceholder&&((i=r.$placeholder)===null||i===void 0||i.hide(),r.showPlaceholder=!1)}}(this,n),Pr(function(){JN(e,n)})},t.prototype.destroy=function(){this.$textAreaContainer.remove()},t}();function _D(t){t.removeAttr("width"),t.removeAttr("height"),t.removeAttr("fill"),t.removeAttr("class"),t.removeAttr("t"),t.removeAttr("p-id");var e=t.children();e.length&&_D(e)}function PD(){return B('')}function QN(){return B('
')}function tI(t,e,n,r,o){if(o===void 0&&(o=!1),e){if(r){var i=LE?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(t.attr("data-tooltip",r),t.addClass("w-e-menu-tooltip-v5"),t.addClass("tooltip-right"));else{var a=r?n+` `+r:n;t.attr("data-tooltip",a),t.addClass("w-e-menu-tooltip-v5")}}}gD("match",function(t,e,n){return[function(r){var o=_r(this),i=r==null?void 0:Xu(r,t);return i?Ut(i,r,o):new RegExp(r)[t](ue(o))},function(r){var o=Le(this),i=ue(r),a=n(e,o,i);if(a.done)return a.value;if(!o.global)return qd(o,i);var u=o.unicode;o.lastIndex=0;for(var s,l=[],c=0;(s=qd(o,i))!==null;){var f=ue(s[0]);l[c]=f,f===""&&(o.lastIndex=vD(i,lc(o.lastIndex),u)),c++}return c===0?null:l}]});var jD=function(){function t(e,n,r){var o=this;r===void 0&&(r=!1),this.$elem=B('
'),this.$button=B(''),this.disabled=!1,this.menu=n;var i=n.tag,a=n.width;if(i!=="button")throw new Error("Invalid tag '"+i+"', expected 'button'");var u=n.title,s=n.hotkey,l=s===void 0?"":s,c=n.iconSvg,f=c===void 0?"":c,p=this.$button;if(f){var d=B(f);_D(d),p.append(d)}else p.text(u);tI(p,f,u,l,r),r&&f&&p.append(B(''+u+"")),a&&p.css("width",a+"px"),p.attr("data-menu-key",e),this.$elem.append(p),Pr(function(){return o.init()})}return t.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(n){n.preventDefault(),er(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())})},t.prototype.exec=function(){var e=er(this),n=this.menu,r=n.getValue(e);n.exec(e,r)},t.prototype.setActive=function(){var e=er(this),n=this.$button,r="active";this.menu.isActive(e)?n.addClass(r):n.removeClass(r)},t.prototype.setDisabled=function(){var e=er(this),n=this.$button,r=this.menu.isDisabled(e);(e.selection==null||e.isDisabled())&&(r=!0),this.menu.alwaysEnable&&(r=!1);var o="disabled";r?n.addClass(o):n.removeClass(o),this.disabled=r},t.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},t}(),YQ=function(t){function e(n,r,o){return o===void 0&&(o=!1),t.call(this,n,r,o)||this}return fc(e,t),e.prototype.onButtonClick=function(){},e}(jD),ND=function(){function t(e){this.isShow=!1,this.showTime=0,this.record(e)}return t.prototype.record=function(e){var n=jE.get(e);n==null&&(n=new Set,jE.set(e,n)),n.add(this),tg.set(this,e)},t.prototype.renderContent=function(e){var n=this.$elem;n.empty(),n.append(e);var r=this.genSelfElem();r&&n.append(r)},t.prototype.appendTo=function(e){var n=this.$elem;e.append(n)},t.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=tg.get(this);e&&e.emit("modalOrPanelShow",this)}},t.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=tg.get(this);e&&e.emit("modalOrPanelHide")}},t}(),XQ=function(t){function e(n){var r=t.call(this,n)||this;return r.type="dropPanel",r.$elem=B('
'),r}return fc(e,t),e.prototype.genSelfElem=function(){return null},e}(ND),ZQ=function(t){function e(n,r,o){o===void 0&&(o=!1);var i=t.call(this,n,r,o)||this;if(i.dropPanel=null,i.menu=r,r.showDropPanel){var a=PD();i.$button.append(a)}return i}return fc(e,t),e.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},e.prototype.handleDropPanel=function(){var n=this.menu;if(n.getPanelContentElem!=null){var r=er(this);if(this.dropPanel==null){var o=new XQ(r),i=n.getPanelContentElem(r);o.renderContent(i),o.appendTo(this.$elem),o.show(),this.dropPanel=o}else{var a=this.dropPanel;a.isShow?a.hide():(i=n.getPanelContentElem(r),a.renderContent(i),a.show())}var u=this.dropPanel;if(u.isShow){var s=this.$elem,l=s.offset().left,c=s.parents(".w-e-bar");l-c.offset().left>=c.width()/2?u.$elem.css({left:"none",right:"0"}):u.$elem.css({left:"0",right:"none"})}}},e}(jD),JQ=function(t){function e(n,r){r===void 0&&(r=0);var o=t.call(this,n)||this;o.type="modal",o.$elem=B('
'),o.width=0,r&&(o.width=r);var i=o.$elem;return i.on("click",function(a){return a.stopPropagation()}),i.on("keyup",function(a){a.code==="Escape"&&(o.hide(),n.restoreSelection())}),o}return fc(e,t),e.prototype.genSelfElem=function(){var n=this,r=B(''),o=tg.get(this);return r.on("click",function(){n.hide(),o==null||o.restoreSelection()}),r},e.prototype.setStyle=function(n){var r=this.width,o=this.$elem;o.attr("style",""),r&&o.css("width",r+"px"),o.css(n)},e}(ND);function nr(t,e,n){var r=B('');r.append(""+t+"");var o=B('');return r.append(o),[r[0],o[0]]}function dc(t,e){var n=B('
'),r=B('");return n.append(r),[n[0],r[0]]}var QQ=function(t){function e(n,r,o){o===void 0&&(o=!1);var i=t.call(this,n,r,o)||this;return i.$body=B("body"),i.modal=null,i.menu=r,i}return fc(e,t),e.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},e.prototype.getPosition=function(){var n=er(this),r=this.menu.getModalPositionNode(n);return ct.isElement(r)?TD(n,r,"modal"):FD(n)},e.prototype.handleModal=function(){var n=er(this),r=this.menu;if(this.modal==null){var o=new JQ(n,r.modalWidth);this.renderAndShowModal(o,!0),this.modal=o}else(o=this.modal).isShow?o.hide():this.renderAndShowModal(o,!1)},e.prototype.renderAndShowModal=function(n,r){r===void 0&&(r=!1);var o=er(this),i=this.menu;if(i.getModalContentElem!=null){var a=A.getTextarea(o),u=A.getToolbar(o),s=((u==null?void 0:u.getConfig())||{}).modalAppendToBody,l=i.getModalContentElem(o);if(n.renderContent(l),s)n.setStyle({left:"0",right:"0"});else{var c=this.getPosition();n.setStyle(c)}r&&(s?n.appendTo(this.$body):n.appendTo(a.$textAreaContainer)),n.show(),s||GE(o,n.$elem),setTimeout(function(){o.blur()})}},e}(jD),ttt=function(t){function e(n,r){var o=t.call(this,n)||this;return o.type="selectList",o.$elem=B('
'),r&&o.$elem.css("width",r+"px"),o.$elem.on("click",function(i){i.stopPropagation()}),o}return fc(e,t),e.prototype.renderList=function(n){var r=this.$elem;r.empty();var o=B("
    ");n.forEach(function(i){var a=i.value,u=i.text,s=i.selected,l=i.styleForRenderMenuList,c=B('
  • ');if(l&&c.css(l),s){var f=B('');c.append(f),c.addClass("selected")}c.append(B(''+u+"")),c.attr("title",u),o.append(c)}),r.append(o)},e.prototype.genSelfElem=function(){return null},e}(ND),ett=function(){function t(e,n,r){var o=this;r===void 0&&(r=!1),this.$elem=B('
    '),this.$button=B(''),this.disabled=!1,this.selectList=null;var i=n.tag,a=n.title,u=n.width,s=n.iconSvg,l=s===void 0?"":s,c=n.hotkey,f=c===void 0?"":c;if(i!=="select")throw new Error("Invalid tag '"+i+"', expected 'select'");var p=this.$button;u&&p.css("width",u+"px"),p.attr("data-menu-key",e),tI(p,l,a,f,r),this.$elem.append(p),this.menu=n,Pr(function(){return o.init()})}return t.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",function(n){n.preventDefault(),er(e).hidePanelOrModal(),e.trigger()})},t.prototype.trigger=function(){var e=this,n=er(this);if(!n.isDisabled()&&!this.disabled){var r=this.menu;if(this.selectList==null){this.selectList=new ttt(n,r.selectPanelWidth);var o=this.selectList,i=r.getOptions(n);o.renderList(i),o.appendTo(this.$elem),o.show(),o.$elem.on("click","li",function(a){var u=a.target;if(u!=null){a.preventDefault();var s=B(u).attr("data-value");e.onChange(s)}})}else(o=this.selectList).isShow?o.hide():(i=r.getOptions(n),o.renderList(i),o.show())}},t.prototype.onChange=function(e){var n=er(this),r=this.menu;r.exec&&r.exec(n,e)},t.prototype.setSelectedValue=function(){var e=er(this),n=this.menu,r=n.getValue(e),o=function(u,s){for(var l=u.length,c="",f=0;f'),this.$container=B('
    '),this.$button=B('');var n=e.key,r=e.iconSvg,o=e.title,i=this.$elem,a=this.$button;if(r){var u=B(r);_D(u),a.append(u)}else a.text(o);a.attr("data-menu-key",n);var s=PD();a.append(s),i.append(a);var l=this.$container;i.append(l);var c=this.createObserver();this.observe(c)}return t.prototype.appendBarItem=function(e){var n=e.$elem;this.$container.append(n)},t.prototype.observe=function(e){var n=this.$container;e.observe(n[0],{childList:!0,subtree:!0,attributes:!0})},t.prototype.createObserver=function(){var e=this,n=this.$container,r=this.$button,o=new MutationObserver(function(){var i=n.find("button"),a=i.length;if(a!==0){var u=0;i.each(function(s){B(s).hasClass("disabled")&&u++}),o.disconnect(),u===a?r.addClass("disabled"):r.removeClass("disabled"),e.observe(o)}});return o},t}(),oO=new WeakMap;function er(t){var e=mD.get(t);if(e==null)throw new Error("Can not get editor instance");return e}function eI(t,e,n){n===void 0&&(n=!1);var r=oO.get(e);if(r)return r;var o=e.tag;if(o==="button"){var i=e.showDropPanel,a=e.showModal;r=i?new ZQ(t,e,n):a?new QQ(t,e,n):new YQ(t,e,n)}if(o==="select"&&(r=new ett(t,e,n)),r==null)throw new Error("Invalid tag in menu "+JSON.stringify(e));return oO.set(e,r),r}function ntt(t,e){var n=t.selection;return n!=null&&!L.isCollapsed(n)&&!A.getSelectedElems(t).some(function(r){if(t.isVoid(r))return!0;var o=r.type;return!!["pre","code","table"].includes(o)||void 0})&&!!ot.isText(e)}var rtt=function(){function t(){var e=this;this.$elem=B('
    '),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.changeHoverbarState=Tj(function(){var n=e.isShow,r=e.getSelectedNodeAndMenuKeys()||{},o=r.node,i=o===void 0?null:o,a=r.menuKeys,u=a===void 0?[]:a;i!=null&&e.changeItemsState(),i&&ct.isElement(i)&&n&&e.isSamePath(i,e.prevSelectedNode)||(e.hideAndClean(),i!=null&&(e.registerItems(u),e.setPosition(i),e.show()),e.prevSelectedNode=i)},200),Pr(function(){var n=e.getEditorInstance(),r=e.$elem;r.on("mousedown",function(i){return i.preventDefault()},{passive:!1}),A.getTextarea(n).$textAreaContainer.append(r),n.on("change",e.changeHoverbarState);var o=e.hideAndClean.bind(e);n.on("scroll",o),n.on("fullScreen",o),n.on("unFullScreen",o)})}return t.prototype.getMenus=function(){return this.menus},t.prototype.hideAndClean=function(){var e=this.$elem;e.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],e.empty(),this.isShow=!1},t.prototype.checkPositionBottom=function(){var e=this.$elem,n=!1,r=window.innerHeight;r&&r>=360&&r-e[0].getBoundingClientRect().bottom<360&&(n=!0),n?e.addClass("w-e-bar-bottom"):e.removeClass("w-e-bar-bottom")},t.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},t.prototype.changeItemsState=function(){var e=this;Pr(function(){e.hoverbarItems.forEach(function(n){n.changeMenuState()})})},t.prototype.registerItems=function(e){var n=this,r=this.$elem;e.forEach(function(o){if(o!=="|")n.registerSingleItem(o);else{var i=QN();r.append(i)}})},t.prototype.registerSingleItem=function(e){var n=this.getEditorInstance(),r=this.menus,o=r[e];if(o==null){var i=Xd[e];if(i==null)throw new Error("Not found menu item factory by key '"+e+"'");if(typeof i!="function")throw new Error("Menu item factory (key='"+e+"') is not a function");o=i(),r[e]=o}var a=eI(e,o);this.hoverbarItems.push(a),mD.set(a,n),this.$elem.append(a.$elem)},t.prototype.setPosition=function(e){var n=this.getEditorInstance(),r=this.$elem;if(r.attr("style",""),ct.isElement(e)){var o=TD(n,e,"bar");return r.css(o),void GE(n,r)}if(ot.isText(e))return o=FD(n),r.css(o),void GE(n,r);throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},t.prototype.getSelectedNodeAndMenuKeys=function(){var e=this.getEditorInstance();if(e.selection==null)return null;var n=this.getHoverbarKeysConf(),r=null,o=[],i=function(u){var s=n[u],l=s.match,c=s.menuKeys,f=c===void 0?[]:c,p=l||function(g,v){return A.checkNodeType(v,u)},d=Ht(E.nodes(e,{match:function(g){return p(e,g)},universal:!0}),1),y=d[0];if(y!=null)return r=y[0],o=f,"break"};for(var a in n)if(i(a)==="break")break;return r==null||o.length===0?null:{node:r,menuKeys:o}},t.prototype.getEditorInstance=function(){var e=PE.get(this);if(e==null)throw new Error("Can not get editor instance");return e},t.prototype.getHoverbarKeysConf=function(){var e=this.getEditorInstance().getConfig().hoverbarKeys,n=e===void 0?{}:e,r=n.text;return r&&r.match==null&&(r.match=ntt),n},t.prototype.isSamePath=function(e,n){if(e==null||n==null)return!1;var r=A.findPath(null,e),o=A.findPath(null,n);return j.equals(r,o)},t.prototype.destroy=function(){this.changeHoverbarState.cancel(),this.$elem.remove(),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},t}();function nI(t,e,n,r){if(Yd.set(t,e),Wl.set(t,n),ct.isElement(t)){var o=t.children;if((o===void 0?[]:o).forEach(function(u,s){return nI(u,s,t,r)}),E.isVoid(r,t)){var i=Ht(Q.texts(t),1),a=Ht(i[0],1)[0];Yd.set(a,0),Wl.set(a,t)}}}function ott(t){var e=t.selector,n=e===void 0?"":e,r=t.config,o=r===void 0?{}:r,i=t.content,a=t.html,u=t.plugins,s=u===void 0?[]:u,l=(m=>{var h=m,{apply:b}=h;return h.history={undos:[],redos:[]},h.redo=()=>{var{history:w}=h,{redos:D}=w;if(D.length>0){var x=D[D.length-1];sl.withoutSaving(h,()=>{E.withoutNormalizing(h,()=>{for(var C of x)h.apply(C)})}),w.redos.pop(),w.undos.push(x)}},h.undo=()=>{var{history:w}=h,{undos:D}=w;if(D.length>0){var x=D[D.length-1];sl.withoutSaving(h,()=>{E.withoutNormalizing(h,()=>{var C=x.map(Xi.inverse).reverse();for(var O of C)h.apply(O)})}),w.redos.push(x),w.undos.pop()}},h.apply=w=>{var{operations:D,history:x}=h,{undos:C}=x,O=C[C.length-1],T=O&&O[O.length-1],R=((U,W)=>!(!W||U.type!=="set_selection"||W.type!=="set_selection"))(w,T),H=sl.isSaving(h),M=sl.isMerging(h);if(H==null&&(H=((U,W)=>U.type!=="set_selection"||U.properties!=null&&U.newProperties!=null)(w)),H){if(M==null&&(M=O!=null&&(D.length!==0||((U,W)=>U.type==="set_selection"||!(!W||U.type!=="insert_text"||W.type!=="insert_text"||U.offset!==W.offset+W.text.length||!j.equals(U.path,W.path))||!(!W||U.type!=="remove_text"||W.type!=="remove_text"||U.offset+U.text.length!==W.offset||!j.equals(U.path,W.path)))(w,T)||R)),O&&M)R&&O.pop(),O.push(w);else{var K=[w];C.push(K)}for(;C.length>100;)C.shift();(U=>U.type!=="set_selection")(w)&&(x.redos=[])}b(w)},h})(function(m){var h=m,b=h.insertText,w=h.insertNode,D=h.insertFragment,x=h.dangerouslyInsertHtml;return h.insertText=function(C){if(h.getConfig().maxLength){var O=A.getLeftLengthOfMaxLength(h);O<=0||(O0&&w.removeAllRanges(),b&&N.deselect(m)},h.move=function(b,w){w===void 0&&(w=!1),b&&(b<0||N.move(m,{distance:b,unit:"character",reverse:w}))},h.moveReverse=function(b){h.move(b,!0)},h.restoreSelection=function(){var b=fb.get(h);b!=null&&(h.focus(),N.select(h,b))},h.getSelectionPosition=function(){return FD(h)},h.getNodePosition=function(b){return TD(h,b)},h.isSelectedAll=function(){var b=h.selection;if(b==null)return!1;var w=Ht(L.edges(b),2),D=w[0],x=w[1],C=Ht(E.edges(h,[]),2),O=C[0],T=C[1];return!(!Bt.equals(D,O)||!Bt.equals(x,T))},h.selectAll=function(){var b=E.start(h,[]),w=E.end(h,[]);N.select(h,{anchor:b,focus:w})},h}(function(m){var h=m,b=h.onChange,w=h.insertText,D=h.apply,x=h.deleteBackward;return h.insertText=function(C){h.getConfig().readOnly||w(C)},h.apply=function(C){var O,T,R,H,M,K,U,W,q=[];switch(C.type){case"insert_text":case"remove_text":case"set_node":try{for(var nt=Dr(E.levels(h,{at:C.path})),lt=nt.next();!lt.done;lt=nt.next()){var st=Ht(lt.value,2),at=st[0],k=st[1],S=A.findKey(h,at);q.push([k,S])}}catch(It){O={error:It}}finally{try{lt&&!lt.done&&(T=nt.return)&&T.call(nt)}finally{if(O)throw O.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var P=Dr(E.levels(h,{at:j.parent(C.path)})),$=P.next();!$.done;$=P.next()){var Y=Ht($.value,2);at=Y[0],k=Y[1],S=A.findKey(h,at),q.push([k,S])}}catch(It){R={error:It}}finally{try{$&&!$.done&&(H=P.return)&&H.call(P)}finally{if(R)throw R.error}}break;case"move_node":try{for(var V=Dr(E.levels(h,{at:j.common(j.parent(C.path),j.parent(C.newPath))})),it=V.next();!it.done;it=V.next()){var gt=Ht(it.value,2);at=gt[0],k=gt[1],S=A.findKey(h,at),q.push([k,S])}}catch(It){M={error:It}}finally{try{it&&!it.done&&(K=V.return)&&K.call(V)}finally{if(M)throw M.error}}}D(C);try{for(var vt=Dr(q),Dt=vt.next();!Dt.done;Dt=vt.next()){var G=Ht(Dt.value,2);k=G[0],S=G[1],at=Ht(E.node(h,k),1)[0],eg.set(at,S)}}catch(It){U={error:It}}finally{try{Dt&&!Dt.done&&(W=vt.return)&&W.call(vt)}finally{if(U)throw U.error}}},h.deleteBackward=function(C){if(C!=="line")return x(C);if(m.selection&&L.isCollapsed(m.selection)){var O=E.above(m,{match:function(M){return E.isBlock(m,M)},at:m.selection});if(O){var T=Ht(O,2)[1],R=E.range(m,T,m.selection.anchor),H=function(M,K){var U=E.range(M,L.end(K)),W=Array.from(E.positions(M,{at:K})),q=0,nt=W.length,lt=Math.floor(nt/2);if(_9(M,E.range(M,W[q]),U))return E.range(M,W[q],U);if(W.length<2)return E.range(M,W[W.length-1],U);for(;lt!==W.length&<!==q;)_9(M,E.range(M,W[lt]),U)?nt=lt:q=lt,lt=Math.floor((q+nt)/2);return E.range(M,W[nt],U)}(h,R);L.isCollapsed(H)||N.delete(m,{at:H})}}},h.onChange=function(){var C=h.selection;C!=null&&fb.set(h,C),h.emit("change"),b()},h.handleTab=function(){h.insertText(" ")},h.getHtml=function(){var C=h.children;return(C===void 0?[]:C).map(function(O){return HN(O,h)}).join("")},h.getText=function(){var C=h.children;return(C===void 0?[]:C).map(function(O){return Q.string(O)}).join(` `)},h.getSelectionText=function(){var C=h.selection;return C==null?"":E.string(m,C)},h.getElemsByType=function(C,O){var T,R;O===void 0&&(O=!1);var H=[],M=E.nodes(h,{at:[],universal:!0});try{for(var K=Dr(M),U=K.next();!U.done;U=K.next()){var W=Ht(U.value,1)[0];if(ct.isElement(W)&&(O?W.type.indexOf(C)>=0:W.type===C)){var q=VN(A.findKey(h,W).id);H.push(Er(Er({},W),{id:q}))}}}catch(nt){T={error:nt}}finally{try{U&&!U.done&&(R=K.return)&&R.call(K)}finally{if(T)throw T.error}}return H},h.getElemsByTypePrefix=function(C){return h.getElemsByType(C,!0)},h.isEmpty=function(){var C=h.children,O=C===void 0?[]:C;if(O.length>1)return!1;var T=O[0];if(T==null)return!0;if(ct.isElement(T)&&T.type==="paragraph"){var R=T.children,H=R===void 0?[]:R;if(H.length>1)return!1;var M=H[0];if(M==null||ot.isText(M)&&M.text==="")return!0}return!1},h.clear=function(){N.delete(h,{at:{anchor:E.start(h,[]),focus:E.end(h,[])}}),h.children.length===0&&N.insertNodes(h,[{type:"paragraph",children:[{text:""}]}])},h.getParentNode=function(C){return A.getParentNode(h,C)},h.dangerouslyInsertHtml=function(C,O){if(C===void 0&&(C=""),O===void 0&&(O=!1),C){var T=document.createElement("div");T.innerHTML=C;var R=Array.from(T.childNodes);if(R=R.filter(function(U){var W=U.nodeType,q=U.nodeName;return W===mo.TEXT_NODE||W===mo.ELEMENT_NODE&&!$9.has(q.toLowerCase())}),R.length!==0){var H=h.selection;if(H!=null){var M=null;A.isSelectedEmptyParagraph(h)&&!O&&(M=[H.focus.path[0]]),T.setAttribute("hidden","true"),document.body.appendChild(T);var K=0;R.forEach(function(U){var W=U.nodeType,q=U.nodeName,nt=U.textContent,lt=nt===void 0?"":nt;if(W!==mo.TEXT_NODE)if(q!=="BR"){var st=U,at=!1;if(UN.includes(q.toLowerCase()))at=!0;else for(var k in gv)if(st.matches(k)){at=!0;break}if(at){var S=OD(B(st),h);return Array.isArray(S)?(S.forEach(function($){return H9(h,$)}),K++):(H9(h,S),K++),void(A.isSelectedVoidNode(h)&&h.move(1))}var P=window.getComputedStyle(st).display;A.isSelectedEmptyParagraph(h)||P.indexOf("inline")<0&&h.insertBreak(),h.dangerouslyInsertHtml(st.innerHTML,!0)}else h.insertText(` `);else{if(!lt||!lt.trim())return;h.insertNode({text:lt})}}),K&&M&&A.isEmptyPath(h,M)&&N.removeNodes(h,{at:M}),T.remove()}}}},h.setHtml=function(C){C===void 0&&(C="");var O=h.isDisabled(),T=h.isFocused(),R=JSON.stringify(h.selection);h.enable(),h.focus(),h.clear();var H=R9(h,C);if(N.insertFragment(h,H),T||(h.deselect(),h.blur()),O&&(h.deselect(),h.disable()),h.isFocused())try{h.select(JSON.parse(R))}catch{h.select(E.start(h,[]))}},h}(function(m){var h=m;return h.getAllMenuKeys=function(){var b=[];for(var w in Xd)b.push(w);return b},h.getConfig=function(){var b=s9.get(h);if(b==null)throw new Error("Can not get editor config");return b},h.getMenuConfig=function(b){var w=h.getConfig().MENU_CONF;return(w===void 0?{}:w)[b]||{}},h.alert=function(b,w){w===void 0&&(w="info");var D=h.getConfig().customAlert;D&&D(b,w)},h}(function(m){var h=yQ(zW());return h.id="wangEditor-"+SJ++,h.isDestroyed=!1,h.isFullScreen=!1,h.focus=function(b){if(A.toDOMNode(h,h).focus({preventScroll:!0}),Bu.set(h,!0),b){var w=E.end(h,[]);N.select(h,w)}else{var D=fb.get(h);D?N.select(h,D):N.select(h,E.start(h,[]))}},h.isFocused=function(){return!!Bu.get(h)},h.blur=function(){A.toDOMNode(h,h).blur(),N.deselect(h),Bu.set(h,!1)},h.updateView=function(){A.getTextarea(h).changeViewState();var b=A.getToolbar(h);b&&b.changeToolbarState();var w=A.getHoverbar(h);w&&w.changeHoverbarState()},h.destroy=function(){if(!h.isDestroyed){var b=A.getTextarea(h);b.destroy(),TE.delete(h),_E.delete(b);var w=A.getToolbar(h);w&&(w.destroy(),ny.delete(h),yD.delete(w));var D=A.getHoverbar(h);D&&(D.destroy(),cv.delete(h),PE.delete(D)),h.isDestroyed=!0,h.emit("destroyed")}},h.scrollToElem=function(b){if(!h.getConfig().scroll){var w="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return w+=` You has disabled editor scroll, please do this yourself`,void console.warn(w)}var D=B("#"+b);if(D.length!==0){var x=D[0];if(!A.hasDOMNode(h,x))return w="Element (found by id is '"+b+"') is not in editor DOM",w+=` 通过 id '`+b+"' 找到的 element 不在 editor DOM 之内",void console.error(w,x);var C=A.getTextarea(h),O=C.$textAreaContainer,T=C.$scroll,R=D.offset().top,H=O.offset().top;T[0].scrollBy({top:R-H,behavior:"smooth"})}},h.showProgressBar=function(b){b<1||A.getTextarea(h).changeProgress(b)},h.hidePanelOrModal=function(){var b=jE.get(h);b!=null&&b.forEach(function(w){return w.hide()})},h.enable=function(){h.getConfig().readOnly=!1,h.updateView()},h.disable=function(){h.getConfig().readOnly=!0,h.updateView()},h.isDisabled=function(){return h.getConfig().readOnly},h.toDOMNode=function(b){return A.toDOMNode(h,b)},h.fullScreen=function(){if(!h.isFullScreen){var b=null,w=A.getToolbar(h);w&&(b=w.$box);var D=A.getTextarea(h).$box.parent();if(b&&b.parent()[0]!==D[0])throw new Error(`Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent 不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致`);D.addClass("w-e-full-screen-container");var x=D.css("z-index");D.attr("data-z-index",x.toString()),h.isFullScreen=!0,h.emit("fullScreen")}},h.unFullScreen=function(){if(h.isFullScreen){var b=A.getTextarea(h).$box.parent();setTimeout(function(){b.removeClass("w-e-full-screen-container"),h.isFullScreen=!1,h.emit("unFullScreen")},200)}},h.getEditableContainer=function(){return A.getTextarea(h).$textAreaContainer[0]},h}()))))));if(n&&function(m,h){return KN(m,"data-w-e-textarea",h)}(l,n))throw new Error("Repeated create editor by selector '"+n+"'");var c=function(m){m===void 0&&(m={});var h=_j(AN),b={},w=m.MENU_CONF,D=w===void 0?{}:w;return $5(h,function(x,C){b[C]=Er(Er({},x),D[C]||{})}),delete m.MENU_CONF,Er({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:b,hoverbarKeys:{},customAlert:function(x,C){window.alert(C+`: `+x)}},m)}(o);s9.set(l,c);var f=c.hoverbarKeys,p=f===void 0?{}:f;if(s.forEach(function(m){l=m(l)}),a!=null&&(l.children=R9(l,a)),i&&i.length&&(l.children=i),l.children.length===0&&(l.children=[{type:"paragraph",children:[{text:""}]}]),A.normalizeContent(l),n){var d=new KQ(n);TE.set(l,d),_E.set(d,l),d.changeViewState(),Pr(function(){var m=d.$scroll;m!=null&&m.height()<300&&console.warn(`编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常 Textarea height < 300px . This may be cause modal and hoverbar position error`,m)});var y=void 0;Object.keys(p).length>0&&(y=new rtt,PE.set(y,l),cv.set(l,y)),l.on("change",function(){l.hidePanelOrModal()}),l.on("scroll",function(){l.hidePanelOrModal()})}else l.children.forEach(function(m,h){return nI(m,h,l,l)});var g=c.onCreated,v=c.onDestroyed;return g&&l.on("created",function(){return g(l)}),v&&l.on("destroyed",function(){return v(l)}),Pr(function(){return l.emit("created")}),l}var itt=J1("splice"),att=X.TypeError,utt=Math.max,stt=Math.min;De({target:"Array",proto:!0,forced:!itt},{splice:function(t,e){var n,r,o,i,a,u,s=Na(this),l=ps(s),c=$l(t,l),f=arguments.length;if(f===0?n=r=0:f===1?(n=0,r=l-c):(n=f-2,r=stt(utt(Vp(e),0),l-c)),l+n-r>9007199254740991)throw att("Maximum allowed length exceeded");for(o=Qj(s,r),i=0;il-r+n;i--)delete s[i-1]}else if(n>r)for(i=l-r;i>c;i--)u=i+n-1,(a=i+r-1)in s?s[u]=s[a]:delete s[u];for(i=0;i'),this.menus={},this.toolbarItems=[],this.config={},this.changeToolbarState=Tj(function(){r.toolbarItems.forEach(function(a){a.changeMenuState()})},200),this.config=n;var o=B(e);if(o.length===0)throw new Error("Cannot find toolbar DOM by selector '"+e+"'");this.$box=o;var i=this.$toolbar;i.on("mousedown",function(a){return a.preventDefault()},{passive:!1}),o.append(i),Pr(function(){r.registerItems(),r.changeToolbarState(),r.getEditorInstance().on("change",r.changeToolbarState)})}return t.prototype.getMenus=function(){return this.menus},t.prototype.getConfig=function(){return this.config},t.prototype.registerItems=function(){var e=this,n="",r=this.$toolbar,o=this.config,i=o.toolbarKeys,a=i===void 0?[]:i,u=o.insertKeys,s=u===void 0?{index:0,keys:[]}:u,l=o.excludeKeys,c=l===void 0?[]:l,f=_j(a);s.keys.length>0&&(typeof s.keys=="string"&&(s.keys=[s.keys]),s.keys.forEach(function(y,g){f.splice(s.index+g,0,y)}));var p=f.filter(function(y){if(typeof y=="string"){if(c.includes(y))return!1}else if(c.includes(y.key))return!1;return!0}),d=p.length;p.forEach(function(y,g){if(y==="|"){if(g===0||g+1===d||n==="|")return;var v=QN();return r.append(v),void(n=y)}if(typeof y=="string")return e.registerSingleItem(y,e),void(n=y);e.registerGroup(y),n="group"})},t.prototype.registerGroup=function(e){var n=this,r=this.$toolbar,o=function(l){return new rO(l)}(e),i=e.menuKeys,a=i===void 0?[]:i,u=this.config.excludeKeys,s=u===void 0?[]:u;a.forEach(function(l){s.includes(l)||n.registerSingleItem(l,o)}),r.append(o.$elem)},t.prototype.registerSingleItem=function(e,n){var r=this.getEditorInstance(),o=n instanceof rO,i=this.menus,a=i[e];if(a==null){var u=Xd[e];if(u==null)throw new Error("Not found menu item factory by key '"+e+"'");if(typeof u!="function")throw new Error("Menu item factory (key='"+e+"') is not a function");a=u(),i[e]=a}else console.warn("Duplicated toolbar menu key '"+e+`' 重复注册了菜单栏 menu '`+e+"'");var s=eI(e,a,o);this.toolbarItems.push(s),mD.set(s,r),o?n.appendBarItem(s):n.$toolbar.append(s.$elem)},t.prototype.getEditorInstance=function(){var e=yD.get(this);if(e==null)throw new Error("Can not get editor instance");return e},t.prototype.destroy=function(){this.$toolbar.remove(),this.menus={},this.toolbarItems=[]},t}(),ctt=sc.EXISTS,ftt=ro.f,rI=Function.prototype,dtt=pt(rI.toString),oI=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,ptt=pt(oI.exec);function iI(t){var e=t.server,n=e===void 0?"":e,r=t.fieldName,o=r===void 0?"":r,i=t.maxFileSize,a=i===void 0?10485760:i,u=t.maxNumberOfFiles,s=u===void 0?100:u,l=t.meta,c=l===void 0?{}:l,f=t.metaWithUrl,p=f!==void 0&&f,d=t.headers,y=d===void 0?{}:d,g=t.withCredentials,v=g!==void 0&&g,m=t.timeout,h=m===void 0?1e4:m,b=t.onBeforeUpload,w=b===void 0?function(K){return K}:b,D=t.onSuccess,x=D===void 0?function(K,U){}:D,C=t.onError,O=C===void 0?function(K,U,W){console.error(K.name+" upload error",U,W)}:C,T=t.onProgress,R=T===void 0?function(K){}:T;if(!n)throw new Error(`Cannot get upload server address 没有配置上传地址`);if(!o)throw new Error(`Cannot get fieldName 没有配置 fieldName`);var H=n;p&&(H=function(K,U){var W=Ht(K.split("#"),2),q=W[0],nt=W[1],lt=[];$5(U,function(at,k){lt.push(k+"="+at)});var st=lt.join("&");return q=q.indexOf("?")>0?q+"&"+st:q+"?"+st,nt?q+"#"+nt:q}(H,c));var M=new Yf({onBeforeUpload:w,restrictions:{maxFileSize:a,maxNumberOfFiles:s},meta:c}).use(zY,{endpoint:H,headers:y,formData:!0,fieldName:o,bundle:!0,withCredentials:v,timeout:h});return M.on("upload-success",function(K,U){var W=U.body,q=W===void 0?{}:W;try{x(K,q)}catch(nt){console.error("wangEditor upload file - onSuccess error",nt)}M.removeFile(K.id)}),M.on("progress",function(K){K<1||R(K)}),M.on("upload-error",function(K,U,W){try{O(K,U,W)}catch(q){console.error("wangEditor upload file - onError error",q)}M.removeFile(K.id)}),M.on("restriction-failed",function(K,U){try{O(K,U)}catch(W){console.error("wangEditor upload file - onError error",W)}M.removeFile(K.id)}),M}function aa(t){return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(t)}function htt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ve(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{};si(this,t),this.init(e,n)}return li(t,[{key:"init",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||gtt,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r1?n-1:0),o=1;o-1?u.replace(/###/g,"."):u}function o(){return!t||typeof t=="string"}for(var i=typeof e!="string"?[].concat(e):e.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!t[a]&&n&&(t[a]=new n),t=Object.prototype.hasOwnProperty.call(t,a)?t[a]:{}}return o()?{}:{obj:t,k:r(i.shift())}}function uO(t,e,n){var r=ID(t,e,Object);r.obj[r.k]=n}function yv(t,e){var n=ID(t,e),r=n.obj,o=n.k;if(r)return r[o]}function sO(t,e,n){var r=yv(t,n);return r!==void 0?r:yv(e,n)}function aI(t,e,n){for(var r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="string"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):aI(t[r],e[r],n):t[r]=e[r]);return t}function js(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var ytt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function mtt(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return ytt[e]}):t}var oy=typeof window<"u"&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;function uI(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(t){if(t[e])return t[e];for(var r=e.split(n),o=t,i=0;ii+a;)a++,s=o[u=r.slice(i,i+a).join(n)];if(s===void 0)return;if(typeof s=="string")return s;if(u&&typeof s[u]=="string")return s[u];var l=r.slice(i+a).join(n);return l?uI(s,l,n):void 0}o=o[r[i]]}return o}}var btt=function(t){function e(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return si(this,e),r=Jd(this,Gl(e).call(this)),oy&&Sa.call(Qu(r)),r.data=n||{},r.options=o,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r.options.ignoreJSONStructure===void 0&&(r.options.ignoreJSONStructure=!0),r}return ry(e,Sa),li(e,[{key:"addNamespaces",value:function(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}},{key:"removeNamespaces",value:function(n){var r=this.options.ns.indexOf(n);r>-1&&this.options.ns.splice(r,1)}},{key:"getResource",value:function(n,r,o){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,u=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[n,r];o&&typeof o!="string"&&(s=s.concat(o)),o&&typeof o=="string"&&(s=s.concat(a?o.split(a):o)),n.indexOf(".")>-1&&(s=n.split("."));var l=yv(this.data,s);return l||!u||typeof o!="string"?l:uI(this.data&&this.data[n]&&this.data[n][r],o,a)}},{key:"addResource",value:function(n,r,o,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var s=[n,r];o&&(s=s.concat(u?o.split(u):o)),n.indexOf(".")>-1&&(i=r,r=(s=n.split("."))[1]),this.addNamespaces(r),uO(this.data,s,i),a.silent||this.emit("added",n,r,o,i)}},{key:"addResources",value:function(n,r,o){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var a in o)typeof o[a]!="string"&&Object.prototype.toString.apply(o[a])!=="[object Array]"||this.addResource(n,r,a,o[a],{silent:!0});i.silent||this.emit("added",n,r,o)}},{key:"addResourceBundle",value:function(n,r,o,i,a){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},s=[n,r];n.indexOf(".")>-1&&(i=o,o=r,r=(s=n.split("."))[1]),this.addNamespaces(r);var l=yv(this.data,s)||{};i?aI(l,o,a):l=Ve({},l,o),uO(this.data,s,l),u.silent||this.emit("added",n,r,o)}},{key:"removeResourceBundle",value:function(n,r){this.hasResourceBundle(n,r)&&delete this.data[n][r],this.removeNamespaces(r),this.emit("removed",n,r)}},{key:"hasResourceBundle",value:function(n,r){return this.getResource(n,r)!==void 0}},{key:"getResourceBundle",value:function(n,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Ve({},{},this.getResource(n,r)):this.getResource(n,r)}},{key:"getDataByLanguage",value:function(n){return this.data[n]}},{key:"toJSON",value:function(){return this.data}}]),e}(),sI={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,n,r,o){var i=this;return t.forEach(function(a){i.processors[a]&&(e=i.processors[a].process(e,n,r,o))}),e}},lO={},cO=function(t){function e(n){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return si(this,e),r=Jd(this,Gl(e).call(this)),oy&&Sa.call(Qu(r)),vtt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,Qu(r)),r.options=o,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r.logger=Qo.create("translator"),r}return ry(e,Sa),li(e,[{key:"changeLanguage",value:function(n){n&&(this.language=n)}},{key:"exists",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(n==null)return!1;var o=this.resolve(n,r);return o&&o.res!==void 0}},{key:"extractFromKey",value:function(n,r){var o=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");var i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,a=r.ns||this.options.defaultNS;if(o&&n.indexOf(o)>-1){var u=n.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:n,namespaces:a};var s=n.split(o);(o!==i||o===i&&this.options.ns.indexOf(s[0])>-1)&&(a=s.shift()),n=s.join(i)}return typeof a=="string"&&(a=[a]),{key:n,namespaces:a}}},{key:"translate",value:function(n,r,o){var i=this;if(aa(r)!=="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),r||(r={}),n==null)return"";Array.isArray(n)||(n=[String(n)]);var a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,u=this.extractFromKey(n[n.length-1],r),s=u.key,l=u.namespaces,c=l[l.length-1],f=r.lng||this.language,p=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&f.toLowerCase()==="cimode"){if(p){var d=r.nsSeparator||this.options.nsSeparator;return c+d+s}return s}var y=this.resolve(n,r),g=y&&y.res,v=y&&y.usedKey||s,m=y&&y.exactUsedKey||s,h=Object.prototype.toString.apply(g),b=["[object Number]","[object Function]","[object RegExp]"],w=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject,x=typeof g!="string"&&typeof g!="boolean"&&typeof g!="number";if(D&&g&&x&&b.indexOf(h)<0&&(typeof w!="string"||h!=="[object Array]")){if(!r.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,Ve({},r,{ns:l})):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(a){var C=h==="[object Array]",O=C?[]:{},T=C?m:v;for(var R in g)if(Object.prototype.hasOwnProperty.call(g,R)){var H="".concat(T).concat(a).concat(R);O[R]=this.translate(H,Ve({},r,{joinArrays:!1,ns:l})),O[R]===H&&(O[R]=g[R])}g=O}}else if(D&&typeof w=="string"&&h==="[object Array]")(g=g.join(w))&&(g=this.extendTranslation(g,n,r,o));else{var M=!1,K=!1,U=r.count!==void 0&&typeof r.count!="string",W=e.hasDefaultValue(r),q=U?this.pluralResolver.getSuffix(f,r.count):"",nt=r["defaultValue".concat(q)]||r.defaultValue;!this.isValidLookup(g)&&W&&(M=!0,g=nt),this.isValidLookup(g)||(K=!0,g=s);var lt=r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,st=lt&&K?void 0:g,at=W&&nt!==g&&this.options.updateMissing;if(K||M||at){if(this.logger.log(at?"updateKey":"missingKey",f,c,s,at?nt:g),a){var k=this.resolve(s,Ve({},r,{keySeparator:!1}));k&&k.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var S=[],P=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&P&&P[0])for(var $=0;$1&&arguments[1]!==void 0?arguments[1]:{};return typeof n=="string"&&(n=[n]),n.forEach(function(c){if(!s.isValidLookup(r)){var f=s.extractFromKey(c,l),p=f.key;o=p;var d=f.namespaces;s.options.fallbackNS&&(d=d.concat(s.options.fallbackNS));var y=l.count!==void 0&&typeof l.count!="string",g=l.context!==void 0&&(typeof l.context=="string"||typeof l.context=="number")&&l.context!=="",v=l.lngs?l.lngs:s.languageUtils.toResolveHierarchy(l.lng||s.language,l.fallbackLng);d.forEach(function(m){s.isValidLookup(r)||(u=m,!lO["".concat(v[0],"-").concat(m)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(u)&&(lO["".concat(v[0],"-").concat(m)]=!0,s.logger.warn('key "'.concat(o,'" for languages "').concat(v.join(", "),`" won't get resolved as namespace "`).concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(function(h){if(!s.isValidLookup(r)){a=h;var b,w,D=p,x=[D];for(s.i18nFormat&&s.i18nFormat.addLookupKeys?s.i18nFormat.addLookupKeys(x,p,h,m,l):(y&&(b=s.pluralResolver.getSuffix(h,l.count)),y&&g&&x.push(D+b),g&&x.push(D+="".concat(s.options.contextSeparator).concat(l.context)),y&&x.push(D+=b));w=x.pop();)s.isValidLookup(r)||(i=w,r=s.getResource(h,m,w,l))}}))})}}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:u}}},{key:"isValidLookup",value:function(n){return!(n===void 0||!this.options.returnNull&&n===null||!this.options.returnEmptyString&&n==="")}},{key:"getResource",value:function(n,r,o){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(n,r,o,i):this.resourceStore.getResource(n,r,o,i)}}],[{key:"hasDefaultValue",value:function(n){var r="defaultValue";for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&r===o.substring(0,r.length)&&n[o]!==void 0)return!0;return!1}}]),e}();function Pb(t){return t.charAt(0).toUpperCase()+t.slice(1)}var wtt=function(){function t(e){si(this,t),this.options=e,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Qo.create("languageUtils")}return li(t,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var n=e.split("-");return n.length===2?null:(n.pop(),n[n.length-1].toLowerCase()==="x"?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var n=e.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(e){if(typeof e=="string"&&e.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map(function(o){return o.toLowerCase()}):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Pb(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Pb(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Pb(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",`function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it's usage asap.`),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var n,r=this;return e?(e.forEach(function(o){if(!n){var i=r.formatLanguageCode(o);r.options.supportedLngs&&!r.isSupportedCode(i)||(n=i)}}),!n&&this.options.supportedLngs&&e.forEach(function(o){if(!n){var i=r.getLanguagePartFromCode(o);if(r.isSupportedCode(i))return n=i;n=r.options.supportedLngs.find(function(a){if(a.indexOf(i)===0)return a})}}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n):null}},{key:"getFallbackCodes",value:function(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!n)return e.default||[];var r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,n){var r=this,o=this.getFallbackCodes(n||this.options.fallbackLng||[],e),i=[],a=function(u){u&&(r.isSupportedCode(u)?i.push(u):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof e=="string"&&e.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):typeof e=="string"&&a(this.formatLanguageCode(e)),o.forEach(function(u){i.indexOf(u)<0&&a(r.formatLanguageCode(u))}),i}}]),t}(),Ett=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Dtt={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}};function Ctt(){var t={};return Ett.forEach(function(e){e.lngs.forEach(function(n){t[n]={numbers:e.nr,plurals:Dtt[e.fc]}})}),t}var xtt=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};si(this,t),this.languageUtils=e,this.options=n,this.logger=Qo.create("pluralResolver"),this.rules=Ctt()}return li(t,[{key:"addRule",value:function(e,n){this.rules[e]=n}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var n=this.getRule(e);return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,n){return this.getSuffixes(e).map(function(r){return n+r})}},{key:"getSuffixes",value:function(e){var n=this,r=this.getRule(e);return r?r.numbers.map(function(o){return n.getSuffix(e,o)}):[]}},{key:"getSuffix",value:function(e,n){var r=this,o=this.getRule(e);if(o){var i=o.noAbs?o.plurals(n):o.plurals(Math.abs(n)),a=o.numbers[i];this.options.simplifyPluralSuffix&&o.numbers.length===2&&o.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var u=function(){return r.options.prepend&&a.toString()?r.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):u():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&o.numbers.length===2&&o.numbers[0]===1?u():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),t}(),Stt=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};si(this,t),this.logger=Qo.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(n){return n},this.init(e)}return li(t,[{key:"init",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var n=e.interpolation;this.escape=n.escape!==void 0?n.escape:mtt,this.escapeValue=n.escapeValue===void 0||n.escapeValue,this.useRawValueToEscape=n.useRawValueToEscape!==void 0&&n.useRawValueToEscape,this.prefix=n.prefix?js(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?js(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?js(n.nestingPrefix):n.nestingPrefixEscaped||js("$t("),this.nestingSuffix=n.nestingSuffix?js(n.nestingSuffix):n.nestingSuffixEscaped||js(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0&&n.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,n,r,o){var i,a,u,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(g){return g.replace(/\$/g,"$$$$")}var f=function(g){if(g.indexOf(s.formatSeparator)<0){var v=sO(n,l,g);return s.alwaysFormat?s.format(v,void 0,r,Ve({},o,n,{interpolationkey:g})):v}var m=g.split(s.formatSeparator),h=m.shift().trim(),b=m.join(s.formatSeparator).trim();return s.format(sO(n,l,h),b,r,Ve({},o,n,{interpolationkey:h}))};this.resetRegExp();var p=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,y=[{regex:this.regexpUnescape,safeValue:function(g){return c(g)}},{regex:this.regexp,safeValue:function(g){return s.escapeValue?c(s.escape(g)):c(g)}}];return y.forEach(function(g){for(u=0;i=g.regex.exec(e);){if((a=f(i[1].trim()))===void 0)if(typeof p=="function"){var v=p(e,i,o);a=typeof v=="string"?v:""}else{if(d){a=i[0];continue}s.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),a=""}else typeof a=="string"||s.useRawValueToEscape||(a=aO(a));var m=g.safeValue(a);if(e=e.replace(i[0],m),d?(g.regex.lastIndex+=m.length,g.regex.lastIndex-=i[0].length):g.regex.lastIndex=0,++u>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,n){var r,o,i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=Ve({},a);function s(p,d){var y=this.nestingOptionsSeparator;if(p.indexOf(y)<0)return p;var g=p.split(new RegExp("".concat(y,"[ ]*{"))),v="{".concat(g[1]);p=g[0],v=(v=this.interpolate(v,u)).replace(/'/g,'"');try{u=JSON.parse(v),d&&(u=Ve({},d,u))}catch(m){return this.logger.warn("failed parsing options string in nesting for key ".concat(p),m),"".concat(p).concat(y).concat(v)}return delete u.defaultValue,p}for(u.applyPostProcessor=!1,delete u.defaultValue;r=this.nestingRegexp.exec(e);){var l=[],c=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){var f=r[1].split(this.formatSeparator).map(function(p){return p.trim()});r[1]=f.shift(),l=f,c=!0}if((o=n(s.call(this,r[1].trim(),u),u))&&r[0]===e&&typeof o!="string")return o;typeof o!="string"&&(o=aO(o)),o||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),o=""),c&&(o=l.reduce(function(p,d){return i.format(p,d,a.lng,Ve({},a,{interpolationkey:r[1].trim()}))},o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}]),t}(),Att=function(t){function e(n,r,o){var i,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return si(this,e),i=Jd(this,Gl(e).call(this)),oy&&Sa.call(Qu(i)),i.backend=n,i.store=r,i.services=o,i.languageUtils=o.languageUtils,i.options=a,i.logger=Qo.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,a.backend,a),i}return ry(e,Sa),li(e,[{key:"queueLoad",value:function(n,r,o,i){var a=this,u=[],s=[],l=[],c=[];return n.forEach(function(f){var p=!0;r.forEach(function(d){var y="".concat(f,"|").concat(d);!o.reload&&a.store.hasResourceBundle(f,d)?a.state[y]=2:a.state[y]<0||(a.state[y]===1?s.indexOf(y)<0&&s.push(y):(a.state[y]=1,p=!1,s.indexOf(y)<0&&s.push(y),u.indexOf(y)<0&&u.push(y),c.indexOf(d)<0&&c.push(d)))}),p||l.push(f)}),(u.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:i}),{toLoad:u,pending:s,toLoadLanguages:l,toLoadNamespaces:c}}},{key:"loaded",value:function(n,r,o){var i=n.split("|"),a=i[0],u=i[1];r&&this.emit("failedLoading",a,u,r),o&&this.store.addResourceBundle(a,u,o),this.state[n]=r?-1:2;var s={};this.queue.forEach(function(l){(function(c,f,p,d){var y=ID(c,f,Object),g=y.obj,v=y.k;g[v]=g[v]||[],g[v].push(p)})(l.loaded,[a],u),function(c,f){for(var p=c.indexOf(f);p!==-1;)c.splice(p,1),p=c.indexOf(f)}(l.pending,n),r&&l.errors.push(r),l.pending.length!==0||l.done||(Object.keys(l.loaded).forEach(function(c){s[c]||(s[c]=[]),l.loaded[c].length&&l.loaded[c].forEach(function(f){s[c].indexOf(f)<0&&s[c].push(f)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(l){return!l.done})}},{key:"read",value:function(n,r,o){var i=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return n.length?this.backend[o](n,r,function(l,c){l&&c&&a<5?setTimeout(function(){i.read.call(i,n,r,o,a+1,2*u,s)},u):s(l,c)}):s(null,{})}},{key:"prepareLoading",value:function(n,r){var o=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();typeof n=="string"&&(n=this.languageUtils.toResolveHierarchy(n)),typeof r=="string"&&(r=[r]);var u=this.queueLoad(n,r,i,a);if(!u.toLoad.length)return u.pending.length||a(),null;u.toLoad.forEach(function(s){o.loadOne(s)})}},{key:"load",value:function(n,r,o){this.prepareLoading(n,r,{},o)}},{key:"reload",value:function(n,r,o){this.prepareLoading(n,r,{reload:!0},o)}},{key:"loadOne",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=n.split("|"),a=i[0],u=i[1];this.read(a,u,"read",void 0,void 0,function(s,l){s&&r.logger.warn("".concat(o,"loading namespace ").concat(u," for language ").concat(a," failed"),s),!s&&l&&r.logger.log("".concat(o,"loaded namespace ").concat(u," for language ").concat(a),l),r.loaded(n,s,l)})}},{key:"saveMissing",value:function(n,r,o,i,a){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)?this.logger.warn('did not save key "'.concat(o,'" as the namespace "').concat(r,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):o!=null&&o!==""&&(this.backend&&this.backend.create&&this.backend.create(n,r,o,i,null,Ve({},u,{isUpdate:a})),n&&n[0]&&this.store.addResource(n[0],r,o,i))}}]),e}();function Ott(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};if(aa(t[1])==="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),aa(t[2])==="object"||aa(t[3])==="object"){var n=t[3]||t[2];Object.keys(n).forEach(function(r){e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:function(t,e,n,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function fO(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&(t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t.supportedLngs=t.whitelist),t.nonExplicitWhitelist&&(t.nonExplicitSupportedLngs=t.nonExplicitWhitelist),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function e0(){}var ktt=function(t){function e(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(si(this,e),n=Jd(this,Gl(e).call(this)),oy&&Sa.call(Qu(n)),n.options=fO(r),n.services={},n.logger=Qo,n.modules={external:[]},o&&!n.isInitialized&&!r.isClone){if(!n.options.initImmediate)return n.init(r,o),Jd(n,Qu(n));setTimeout(function(){n.init(r,o)},0)}return n}return ry(e,Sa),li(e,[{key:"init",value:function(){var n=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;function i(d){return d?typeof d=="function"?new d:d:null}if(typeof r=="function"&&(o=r,r={}),r.whitelist&&!r.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),r.nonExplicitWhitelist&&!r.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=Ve({},Ott(),this.options,fO(r)),this.format=this.options.interpolation.format,o||(o=e0),!this.options.isClone){this.modules.logger?Qo.init(i(this.modules.logger),this.options):Qo.init(null,this.options);var a=new wtt(this.options);this.store=new btt(this.options.resources,this.options);var u=this.services;u.logger=Qo,u.resourceStore=this.store,u.languageUtils=a,u.pluralResolver=new xtt(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u.interpolator=new Stt(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Att(i(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(d){for(var y=arguments.length,g=new Array(y>1?y-1:0),v=1;v1?y-1:0),v=1;v0&&s[0]!=="dev"&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var l=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach(function(d){n[d]=function(){var y;return(y=n.store)[d].apply(y,arguments)}});var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach(function(d){n[d]=function(){var y;return(y=n.store)[d].apply(y,arguments),n}});var f=rf(),p=function(){var d=function(y,g){n.isInitialized&&!n.initializedStoreOnce&&n.logger.warn("init: i18next is already initialized. You should call init just once!"),n.isInitialized=!0,n.options.isClone||n.logger.log("initialized",n.options),n.emit("initialized",n.options),f.resolve(g),o(y,g)};if(n.languages&&n.options.compatibilityAPI!=="v1"&&!n.isInitialized)return d(null,n.t.bind(n));n.changeLanguage(n.options.lng,d)};return this.options.resources||!this.options.initImmediate?p():setTimeout(p,0),f}},{key:"loadResources",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e0,i=o,a=typeof n=="string"?n:this.language;if(typeof n=="function"&&(i=n),!this.options.resources||this.options.partialBundledLanguages){if(a&&a.toLowerCase()==="cimode")return i();var u=[],s=function(c){c&&r.services.languageUtils.toResolveHierarchy(c).forEach(function(f){u.indexOf(f)<0&&u.push(f)})};if(a)s(a);else{var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach(function(c){return s(c)})}this.options.preload&&this.options.preload.forEach(function(c){return s(c)}),this.services.backendConnector.load(u,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function(n,r,o){var i=rf();return n||(n=this.languages),r||(r=this.options.ns),o||(o=e0),this.services.backendConnector.reload(n,r,function(a){i.resolve(),o(a)}),i}},{key:"use",value:function(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&sI.addPostProcessor(n),n.type==="3rdParty"&&this.modules.external.push(n),this}},{key:"changeLanguage",value:function(n,r){var o=this;this.isLanguageChangingTo=n;var i=rf();this.emit("languageChanging",n);var a=function(u){n||u||!o.services.languageDetector||(u=[]);var s=typeof u=="string"?u:o.services.languageUtils.getBestMatchFromCodes(u);s&&(o.language||(o.language=s,o.languages=o.services.languageUtils.toResolveHierarchy(s)),o.translator.language||o.translator.changeLanguage(s),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage(s)),o.loadResources(s,function(l){(function(c,f){f?(o.language=f,o.languages=o.services.languageUtils.toResolveHierarchy(f),o.translator.changeLanguage(f),o.isLanguageChangingTo=void 0,o.emit("languageChanged",f),o.logger.log("languageChanged",f)):o.isLanguageChangingTo=void 0,i.resolve(function(){return o.t.apply(o,arguments)}),r&&r(c,function(){return o.t.apply(o,arguments)})})(l,s)})};return n||!this.services.languageDetector||this.services.languageDetector.async?!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(n):a(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(n,r,o){var i=this,a=function u(s,l){var c;if(aa(l)!=="object"){for(var f=arguments.length,p=new Array(f>2?f-2:0),d=2;d1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],a=!!this.options&&this.options.fallbackLng,u=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;var s=function(c,f){var p=r.services.backendConnector.state["".concat(c,"|").concat(f)];return p===-1||p===2};if(o.precheck){var l=o.precheck(this,s);if(l!==void 0)return l}return!!this.hasResourceBundle(i,n)||!this.services.backendConnector.backend||!(!s(i,n)||a&&!s(u,n))}},{key:"loadNamespaces",value:function(n,r){var o=this,i=rf();return this.options.ns?(typeof n=="string"&&(n=[n]),n.forEach(function(a){o.options.ns.indexOf(a)<0&&o.options.ns.push(a)}),this.loadResources(function(a){i.resolve(),r&&r(a)}),i):(r&&r(),Promise.resolve())}},{key:"loadLanguages",value:function(n,r){var o=rf();typeof n=="string"&&(n=[n]);var i=this.options.preload||[],a=n.filter(function(u){return i.indexOf(u)<0});return a.length?(this.options.preload=i.concat(a),this.loadResources(function(u){o.resolve(),r&&r(u)}),o):(r&&r(),Promise.resolve())}},{key:"dir",value:function(n){return n||(n=this.languages&&this.languages.length>0?this.languages[0]:this.language),n?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(n))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new e(n,r)}},{key:"cloneInstance",value:function(){var n=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e0,i=Ve({},this.options,r,{isClone:!0}),a=new e(i),u=["store","services","language"];return u.forEach(function(s){a[s]=n[s]}),a.services=Ve({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new cO(a.services,a.options),a.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),f=1;fh;h++)if((u||h in g)&&(d=v(p=g[h],h,y),t))if(e)w[h]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return h;case 2:hO(w,p)}else switch(t){case 4:return!1;case 7:hO(w,p)}return i?-1:r||o?o:w}},Itt={forEach:Oi(0),map:Oi(1),filter:Oi(2),some:Oi(3),every:Oi(4),find:Oi(5),findIndex:Oi(6),filterReject:Oi(7)}.forEach,Ltt=function(t,e){var n=[][t];return!!n&&cn(function(){n.call(null,e||function(){throw 1},1)})}("forEach"),jb=Ltt?[].forEach:function(t){return Itt(this,t,arguments.length>1?arguments[1]:void 0)},fI=function(t){if(t&&t.forEach!==jb)try{jn(t,"forEach",jb)}catch{t.forEach=jb}};for(var Nb in Lg)Lg[Nb]&&fI(Et[Nb]&&Et[Nb].prototype);fI(HP),qn("en",{common:{ok:"OK",delete:"Delete",enter:"Enter"},blockQuote:{title:"Quote"},codeBlock:{title:"Code block"},color:{color:"Font color",bgColor:"Back color",default:"Default color",clear:"Clear back color"},divider:{title:"Divider"},emotion:{title:"Emotion"},fontSize:{title:"Font size",default:"Default"},fontFamily:{title:"Font family",default:"Default"},fullScreen:{title:"Full screen"},header:{title:"Header",text:"Text"},image:{netImage:"Net image",delete:"Delete image",edit:"Edit image",viewLink:"View link",src:"Image src",desc:"Description",link:"Image link"},indent:{decrease:"Decrease",increase:"Increase"},justify:{left:"Left",right:"Right",center:"Center",justify:"Justify"},lineHeight:{title:"Line height",default:"Default"},link:{insert:"Insert link",text:"Link text",url:"Link source",unLink:"Unlink",edit:"Edit link",view:"View link"},textStyle:{bold:"Bold",clear:"Clear styles",code:"Inline code",italic:"Italic",sub:"Sub",sup:"Sup",through:"Through",underline:"Underline"},undo:{undo:"undo",redo:"Redo"},todo:{todo:"Todo"}}),qn("zh-CN",{common:{ok:"确定",delete:"删除",enter:"回车"},blockQuote:{title:"引用"},codeBlock:{title:"代码块"},color:{color:"文字颜色",bgColor:"背景色",default:"默认颜色",clear:"清除背景色"},divider:{title:"分割线"},emotion:{title:"表情"},fontSize:{title:"字号",default:"默认字号"},fontFamily:{title:"字体",default:"默认字体"},fullScreen:{title:"全屏"},header:{title:"标题",text:"正文"},image:{netImage:"网络图片",delete:"删除图片",edit:"编辑图片",viewLink:"查看链接",src:"图片地址",desc:"图片描述",link:"图片链接"},indent:{decrease:"减少缩进",increase:"增加缩进"},justify:{left:"左对齐",right:"右对齐",center:"居中对齐",justify:"两端对齐"},lineHeight:{title:"行高",default:"默认行高"},link:{insert:"插入链接",text:"链接文本",url:"链接地址",unLink:"取消链接",edit:"修改链接",view:"查看链接"},textStyle:{bold:"粗体",clear:"清除格式",code:"行内代码",italic:"斜体",sub:"下标",sup:"上标",through:"删除线",underline:"下划线"},undo:{undo:"撤销",redo:"重做"},todo:{todo:"待办"}});var Rtt={type:"paragraph",renderElem:function(t,e,n){return bt("p",null,e)}},bv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function iy(t){var e={exports:{}};return t(e,e.exports),e.exports}var ki,ng,n0=function(t){return t&&t.Math==Math&&t},St=n0(typeof globalThis=="object"&&globalThis)||n0(typeof window=="object"&&window)||n0(typeof self=="object"&&self)||n0(typeof bv=="object"&&bv)||function(){return this}()||Function("return this")(),Ce=function(t){try{return!!t()}catch{return!0}},eo=!Ce(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),af=Function.prototype.call,Te=af.bind?af.bind(af):function(){return af.apply(af,arguments)},gO={}.propertyIsEnumerable,vO=Object.getOwnPropertyDescriptor,Mtt=vO&&!gO.call({1:2},1)?function(t){var e=vO(this,t);return!!e&&e.enumerable}:gO,dI={f:Mtt},RD=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},pI=Function.prototype,XE=pI.bind,ZE=pI.call,ztt=XE&&XE.bind(ZE),yt=XE?function(t){return t&&ztt(ZE,t)}:function(t){return t&&function(){return ZE.apply(t,arguments)}},$tt=yt({}.toString),Htt=yt("".slice),ua=function(t){return Htt($tt(t),8,-1)},Ib=St.Object,Vtt=yt("".split),ay=Ce(function(){return!Ib("z").propertyIsEnumerable(0)})?function(t){return ua(t)=="String"?Vtt(t,""):Ib(t)}:Ib,Utt=St.TypeError,jr=function(t){if(t==null)throw Utt("Can't call method on "+t);return t},pc=function(t){return ay(jr(t))},hn=function(t){return typeof t=="function"},Cr=function(t){return typeof t=="object"?t!==null:hn(t)},Wtt=function(t){return hn(t)?t:void 0},Gp=function(t,e){return arguments.length<2?Wtt(St[t]):St[t]&&St[t][e]},hI=yt({}.isPrototypeOf),Lb=Gp("navigator","userAgent")||"",yO=St.process,mO=St.Deno,bO=yO&&yO.versions||mO&&mO.version,wO=bO&&bO.v8;wO&&(ng=(ki=wO.split("."))[0]>0&&ki[0]<4?1:+(ki[0]+ki[1])),!ng&&Lb&&(!(ki=Lb.match(/Edge\/(\d+)/))||ki[1]>=74)&&(ki=Lb.match(/Chrome\/(\d+)/))&&(ng=+ki[1]);var JE=ng,QE=!!Object.getOwnPropertySymbols&&!Ce(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&JE&&JE<41}),MD=QE&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Gtt=St.Object,Rb=MD?function(t){return typeof t=="symbol"}:function(t){var e=Gp("Symbol");return hn(e)&&hI(e.prototype,Gtt(t))},qtt=St.String,gI=function(t){try{return qtt(t)}catch{return"Object"}},Ktt=St.TypeError,vI=function(t){if(hn(t))return t;throw Ktt(gI(t)+" is not a function")},uy=function(t,e){var n=t[e];return n==null?void 0:vI(n)},Ytt=St.TypeError,Xtt=Object.defineProperty,zD=function(t,e){try{Xtt(St,t,{value:e,configurable:!0,writable:!0})}catch{St[t]=e}return e},sa=St["__core-js_shared__"]||zD("__core-js_shared__",{}),$D=iy(function(t){(t.exports=function(e,n){return sa[e]||(sa[e]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Ztt=St.Object,qp=function(t){return Ztt(jr(t))},Jtt=yt({}.hasOwnProperty),Ar=Object.hasOwn||function(t,e){return Jtt(qp(t),e)},Qtt=0,tet=Math.random(),eet=yt(1 .toString),yI=function(t){return"Symbol("+(t===void 0?"":t)+")_"+eet(++Qtt+tet,36)},uf=$D("wks"),Tu=St.Symbol,EO=Tu&&Tu.for,net=MD?Tu:Tu&&Tu.withoutSetter||yI,dr=function(t){if(!Ar(uf,t)||!QE&&typeof uf[t]!="string"){var e="Symbol."+t;QE&&Ar(Tu,t)?uf[t]=Tu[t]:uf[t]=MD&&EO?EO(e):net(e)}return uf[t]},ret=St.TypeError,oet=dr("toPrimitive"),HD=function(t){var e=function(n,r){if(!Cr(n)||Rb(n))return n;var o,i=uy(n,oet);if(i){if(r===void 0&&(r="default"),o=Te(i,n,r),!Cr(o)||Rb(o))return o;throw ret("Can't convert object to primitive value")}return r===void 0&&(r="number"),function(a,u){var s,l;if(u==="string"&&hn(s=a.toString)&&!Cr(l=Te(s,a))||hn(s=a.valueOf)&&!Cr(l=Te(s,a))||u!=="string"&&hn(s=a.toString)&&!Cr(l=Te(s,a)))return l;throw Ytt("Can't convert object to primitive value")}(n,r)}(t,"string");return Rb(e)?e:e+""},t6=St.document,iet=Cr(t6)&&Cr(t6.createElement),VD=function(t){return iet?t6.createElement(t):{}},mI=!eo&&!Ce(function(){return Object.defineProperty(VD("div"),"a",{get:function(){return 7}}).a!=7}),DO=Object.getOwnPropertyDescriptor,UD={f:eo?DO:function(t,e){if(t=pc(t),e=HD(e),mI)try{return DO(t,e)}catch{}if(Ar(t,e))return RD(!Te(dI.f,t,e),t[e])}},aet=St.String,uet=St.TypeError,rr=function(t){if(Cr(t))return t;throw uet(aet(t)+" is not an object")},set=St.TypeError,CO=Object.defineProperty,hc={f:eo?CO:function(t,e,n){if(rr(t),e=HD(e),rr(n),mI)try{return CO(t,e,n)}catch{}if("get"in n||"set"in n)throw set("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},ql=eo?function(t,e,n){return hc.f(t,e,RD(1,n))}:function(t,e,n){return t[e]=n,t},cet=yt(Function.toString);hn(sa.inspectSource)||(sa.inspectSource=function(t){return cet(t)});var wv,hd,Ev,WD=sa.inspectSource,xO=St.WeakMap,fet=hn(xO)&&/native code/.test(WD(xO)),SO=$D("keys"),bI=function(t){return SO[t]||(SO[t]=yI(t))},GD={},e6=St.TypeError,det=St.WeakMap;if(fet||sa.state){var Za=sa.state||(sa.state=new det),pet=yt(Za.get),AO=yt(Za.has),het=yt(Za.set);wv=function(t,e){if(AO(Za,t))throw new e6("Object already initialized");return e.facade=t,het(Za,t,e),e},hd=function(t){return pet(Za,t)||{}},Ev=function(t){return AO(Za,t)}}else{var Ns=bI("state");GD[Ns]=!0,wv=function(t,e){if(Ar(t,Ns))throw new e6("Object already initialized");return e.facade=t,ql(t,Ns,e),e},hd=function(t){return Ar(t,Ns)?t[Ns]:{}},Ev=function(t){return Ar(t,Ns)}}var n6={set:wv,get:hd,has:Ev,enforce:function(t){return Ev(t)?hd(t):wv(t,{})},getterFor:function(t){return function(e){var n;if(!Cr(e)||(n=hd(e)).type!==t)throw e6("Incompatible receiver, "+t+" required");return n}}},wI=Function.prototype,get=eo&&Object.getOwnPropertyDescriptor,Mb=Ar(wI,"name"),sy={EXISTS:Mb,PROPER:Mb&&function(){}.name==="something",CONFIGURABLE:Mb&&(!eo||eo&&get(wI,"name").configurable)},Qd=iy(function(t){var e=sy.CONFIGURABLE,n=n6.get,r=n6.enforce,o=String(String).split("String");(t.exports=function(i,a,u,s){var l,c=!!s&&!!s.unsafe,f=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet,d=s&&s.name!==void 0?s.name:a;hn(u)&&(String(d).slice(0,7)==="Symbol("&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ar(u,"name")||e&&u.name!==d)&&ql(u,"name",d),(l=r(u)).source||(l.source=o.join(typeof d=="string"?d:""))),i!==St?(c?!p&&i[a]&&(f=!0):delete i[a],f?i[a]=u:ql(i,a,u)):f?i[a]=u:zD(a,u)})(Function.prototype,"toString",function(){return hn(this)&&n(this).source||WD(this)})}),vet=Math.ceil,yet=Math.floor,gc=function(t){var e=+t;return e!=e||e===0?0:(e>0?yet:vet)(e)},met=Math.max,bet=Math.min,tp=function(t,e){var n=gc(t);return n<0?met(n+e,0):bet(n,e)},wet=Math.min,Kp=function(t){return t>0?wet(gc(t),9007199254740991):0},ly=function(t){return Kp(t.length)},OO=function(t){return function(e,n,r){var o,i=pc(e),a=ly(i),u=tp(r,a);if(t&&n!=n){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===n)return t||u||0;return!t&&-1}},EI={includes:OO(!0),indexOf:OO(!1)},Eet=EI.indexOf,kO=yt([].push),DI=function(t,e){var n,r=pc(t),o=0,i=[];for(n in r)!Ar(GD,n)&&Ar(r,n)&&kO(i,n);for(;e.length>o;)Ar(r,n=e[o++])&&(~Eet(i,n)||kO(i,n));return i},Dv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Det=Dv.concat("length","prototype"),Cet={f:Object.getOwnPropertyNames||function(t){return DI(t,Det)}},CI={f:Object.getOwnPropertySymbols},xet=yt([].concat),Aet=Gp("Reflect","ownKeys")||function(t){var e=Cet.f(rr(t)),n=CI.f;return n?xet(e,n(t)):e},Oet=function(t,e){for(var n=Aet(e),r=hc.f,o=UD.f,i=0;ih;h++)if((u||h in g)&&(d=v(p=g[h],h,y),t))if(e)w[h]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return h;case 2:TO(w,p)}else switch(t){case 4:return!1;case 7:TO(w,p)}return i?-1:r||o?o:w}},cy={forEach:Bi(0),map:Bi(1),filter:Bi(2),some:Bi(3),every:Bi(4),find:Bi(5),findIndex:Bi(6),filterReject:Bi(7)},Vet=dr("species"),ZD=function(t){return JE>=51||!Ce(function(){var e=[];return(e.constructor={})[Vet]=function(){return{foo:1}},e[t](Boolean).foo!==1})},Uet=cy.filter;tn({target:"Array",proto:!0,forced:!ZD("filter")},{filter:function(t){return Uet(this,t,arguments.length>1?arguments[1]:void 0)}});var Wet=qD?{}.toString:function(){return"[object "+KD(this)+"]"};qD||Qd(Object.prototype,"toString",Wet,{unsafe:!0});var r0,Get=St.String,Ee=function(t){if(KD(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Get(t)},OI=function(){var t=rr(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},JD=St.RegExp,r6=Ce(function(){var t=JD("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),qet=r6||Ce(function(){return!JD("a","y").sticky}),kI={BROKEN_CARET:r6||Ce(function(){var t=JD("^r","gy");return t.lastIndex=2,t.exec("str")!=null}),MISSED_STICKY:qet,UNSUPPORTED_Y:r6},ml=Object.keys||function(t){return DI(t,Dv)},Ket=eo?Object.defineProperties:function(t,e){rr(t);for(var n,r=pc(e),o=ml(e),i=o.length,a=0;i>a;)hc.f(t,n=o[a++],r[n]);return t},Yet=Gp("document","documentElement"),BI=bI("IE_PROTO"),zb=function(){},FI=function(t){return""},_O=function(t){t.write(FI("")),t.close();var e=t.parentWindow.Object;return t=null,e},rg=function(){try{r0=new ActiveXObject("htmlfile")}catch{}var t,e;rg=typeof document<"u"?document.domain&&r0?_O(r0):((e=VD("iframe")).style.display="none",Yet.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(FI("document.F=Object")),t.close(),t.F):_O(r0);for(var n=Dv.length;n--;)delete rg.prototype[Dv[n]];return rg()};GD[BI]=!0;var PO,$b,TI=Object.create||function(t,e){var n;return t!==null?(zb.prototype=rr(t),n=new zb,zb.prototype=null,n[BI]=t):n=rg(),e===void 0?n:Ket(n,e)},Xet=St.RegExp,Zet=Ce(function(){var t=Xet(".","s");return!(t.dotAll&&t.exec(` `)&&t.flags==="s")}),Jet=St.RegExp,Qet=Ce(function(){var t=Jet("(?
    b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$c")!=="bc"}),tnt=n6.get,ent=$D("native-string-replace",String.prototype.replace),xv=RegExp.prototype.exec,o6=xv,nnt=yt("".charAt),rnt=yt("".indexOf),ont=yt("".replace),Hb=yt("".slice),Vb=($b=/b*/g,Te(xv,PO=/a/,"a"),Te(xv,$b,"a"),PO.lastIndex!==0||$b.lastIndex!==0),jO=kI.BROKEN_CARET,Ub=/()??/.exec("")[1]!==void 0;(Vb||Ub||jO||Zet||Qet)&&(o6=function(t){var e,n,r,o,i,a,u,s=this,l=tnt(s),c=Ee(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=Te(o6,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=jO&&s.sticky,y=Te(OI,s),g=s.source,v=0,m=c;if(d&&(y=ont(y,"y",""),rnt(y,"g")===-1&&(y+="g"),m=Hb(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&nnt(c,s.lastIndex-1)!==` `)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),Ub&&(n=new RegExp("^"+g+"$(?!\\s)",y)),Vb&&(r=s.lastIndex),o=Te(xv,d?n:s,m),d?o?(o.input=Hb(o.input,v),o[0]=Hb(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:Vb&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),Ub&&o&&o.length>1&&Te(ent,o[0],n,function(){for(i=1;i=u?t?"":void 0:(r=LO(i,a))<55296||r>56319||a+1===u||(o=LO(i,a+1))<56320||o>57343?t?unt(i,a):r:t?snt(i,a,a+2):o-56320+(r-55296<<10)+65536}},cnt=lnt(!0),eC=function(t,e,n){return e+(n?cnt(t,e).length:1)},fnt=Math.floor,Gb=yt("".charAt),dnt=yt("".replace),qb=yt("".slice),pnt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,hnt=/\$([$&'`]|\d{1,2})/g,gnt=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=hnt;return o!==void 0&&(o=qp(o),s=pnt),dnt(i,s,function(l,c){var f;switch(Gb(c,0)){case"$":return"$";case"&":return t;case"`":return qb(e,0,n);case"'":return qb(e,a);case"<":f=o[qb(c,1,-1)];break;default:var p=+c;if(p===0)return l;if(p>u){var d=fnt(p/10);return d===0?l:d<=u?r[d-1]===void 0?Gb(c,1):r[d-1]+Gb(c,1):l}f=r[p-1]}return f===void 0?"":f})},vnt=St.TypeError,np=function(t,e){var n=t.exec;if(hn(n)){var r=Te(n,t,e);return r!==null&&rr(r),r}if(ua(t)==="RegExp")return Te(ep,t,e);throw vnt("RegExp#exec called on incompatible receiver")},i6=dr("replace"),ynt=Math.max,mnt=Math.min,bnt=yt([].concat),Kb=yt([].push),RO=yt("".indexOf),MO=yt("".slice),wnt="a".replace(/./,"$0")==="$0",zO=!!/./[i6]&&/./[i6]("a","$0")==="";tC("replace",function(t,e,n){var r=zO?"$":"$0";return[function(o,i){var a=jr(this),u=o==null?void 0:uy(o,i6);return u?Te(u,o,a,i):Te(e,Ee(a),o,i)},function(o,i){var a=rr(this),u=Ee(o);if(typeof i=="string"&&RO(i,r)===-1&&RO(i,"$<")===-1){var s=n(e,a,u,i);if(s.done)return s.value}var l=hn(i);l||(i=Ee(i));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=np(a,u);if(d===null||(Kb(p,d),!c))break;Ee(d[0])===""&&(a.lastIndex=eC(u,Kp(a.lastIndex),f))}for(var y,g="",v=0,m=0;m=v&&(g+=MO(u,v,b)+O,v=b+h.length)}return g+MO(u,v)}]},!!Ce(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$")!=="7"})||!wnt||zO);var a6=dr("unscopables"),u6=Array.prototype;u6[a6]==null&&hc.f(u6,a6,{configurable:!0,value:TI(null)});var PI=function(t){u6[a6][t]=!0},Ent=cy.find,$O=!0;"find"in[]&&Array(1).find(function(){$O=!1}),tn({target:"Array",proto:!0,forced:$O},{find:function(t){return Ent(this,t,arguments.length>1?arguments[1]:void 0)}}),PI("find");var Dnt=dr("match"),jI=function(t){var e;return Cr(t)&&((e=t[Dnt])!==void 0?!!e:ua(t)=="RegExp")},Cnt=St.TypeError,xnt=dr("species"),NI=function(t,e,n){var r=HD(e);r in t?hc.f(t,r,RD(0,n)):t[r]=n},Snt=St.Array,Ant=Math.max,HO=function(t,e,n){for(var r=ly(t),o=tp(e,r),i=tp(n===void 0?r:n,r),a=Snt(Ant(i-o,0)),u=0;o1||"".split(/.?/).length?function(o,i){var a=Ee(jr(this)),u=i===void 0?4294967295:i>>>0;if(u===0)return[];if(o===void 0)return[a];if(!jI(o))return Te(e,a,o,u);for(var s,l,c,f=[],p=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(o.sticky?"y":""),d=0,y=new RegExp(o.source,p+"g");(s=Te(ep,y,a))&&!((l=y.lastIndex)>d&&(Ls(f,lf(a,d,s.index)),s.length>1&&s.index=u));)y.lastIndex===s.index&&y.lastIndex++;return d===a.length?!c&&knt(y,"")||Ls(f,""):Ls(f,lf(a,d)),f.length>u?HO(f,0,u):f}:"0".split(void 0,0).length?function(o,i){return o===void 0&&i===0?[]:Te(e,this,o,i)}:e,[function(o,i){var a=jr(this),u=o==null?void 0:uy(o,t);return u?Te(u,o,a,i):Te(r,Ee(a),o,i)},function(o,i){var a=rr(this),u=Ee(o),s=n(r,a,u,i,r!==e);if(s.done)return s.value;var l=function(w,D){var x,C=rr(w).constructor;return C===void 0||(x=rr(C)[xnt])==null?D:function(O){if(XD(O))return O;throw Cnt(gI(O)+" is not a constructor")}(x)}(a,RegExp),c=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Is?"g":"y"),p=new l(Is?"^(?:"+a.source+")":a,f),d=i===void 0?4294967295:i>>>0;if(d===0)return[];if(u.length===0)return np(p,u)===null?[u]:[];for(var y=0,g=0,v=[];g"+t+"").children().filter(function(e){return e.tagName!=="BR"}).length===0}function vc(t){return t.length===0?"":t[0].outerHTML}function yc(t){return t.length?t[0].tagName.toLowerCase():""}function Jr(t,e){for(var n="",r=(t.attr("style")||"").split(";"),o=r.length,i=0;i0&&o[o.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]=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 Yt(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function UO(t){var e=Yt(E.nodes(t,{match:function(i){return t.children[0]===i},mode:"highest"}),1)[0];if(e==null)return!1;var n=e[0];if(!ct.isElement(n)||n.type==="paragraph"||Q.string(n)!=="")return!1;var r=n.children,o=r===void 0?[]:r;return!!ot.isText(o[0])&&(N.setNodes(t,{type:"paragraph"}),!0)}var Nnt={renderElems:[Rtt],elemsToHtml:[{type:"paragraph",elemToHtml:function(t,e){return e===""?"


    ":"

    "+e+"

    "}}],parseElemsHtml:[jnt],editorPlugin:function(t){var e=t.deleteBackward,n=t.deleteForward;t.insertText,t.insertBreak;var r=t;return r.deleteBackward=function(o){UO(r)||e(o)},r.deleteForward=function(o){UO(r)||n(o)},r}},Int=/"/g,Lnt=yt("".replace),Qf=function(t,e,n,r){var o=Ee(jr(t)),i="<"+e;return n!==""&&(i+=" "+n+'="'+Lnt(Ee(r),Int,""")+'"'),i+">"+o+""},td=function(t){return Ce(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})};function Xb(t,e){var n=e,r=t,o=r.bold,i=r.italic,a=r.underline;return o&&(n=""+n+""),r.code&&(n=""+n+""),i&&(n=""+n+""),a&&(n=""+n+""),r.through&&(n=""+n+""),r.sub&&(n=""+n+""),r.sup&&(n=""+n+""),n}function Ja(t,e){return t.length!==0&&(!!t[0].matches(e)||t.find(e).length>0)}tn({target:"String",proto:!0,forced:td("bold")},{bold:function(){return Qf(this,"b","","")}}),tn({target:"String",proto:!0,forced:td("italics")},{italics:function(){return Qf(this,"i","","")}}),tn({target:"String",proto:!0,forced:td("sub")},{sub:function(){return Qf(this,"sub","","")}}),tn({target:"String",proto:!0,forced:td("sup")},{sup:function(){return Qf(this,"sup","","")}});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},Zb=VD("span").classList,GO=Zb&&Zb.constructor&&Zb.constructor.prototype,Rnt=GO===Object.prototype?void 0:GO,RI=function(t,e){var n=[][t];return!!n&&Ce(function(){n.call(null,e||function(){throw 1},1)})},Mnt=cy.forEach,Jb=RI("forEach")?[].forEach:function(t){return Mnt(this,t,arguments.length>1?arguments[1]:void 0)},MI=function(t){if(t&&t.forEach!==Jb)try{ql(t,"forEach",Jb)}catch{t.forEach=Jb}};for(var Qb in WO)WO[Qb]&&MI(St[Qb]&&St[Qb].prototype);function zI(t,e){return t.selection==null||!!Yt(E.nodes(t,{match:function(n){return A.getNodeType(n)==="pre"||!!E.isVoid(t,n)},universal:!0}),1)[0]}function znt(t,e){Object.keys(e).forEach(function(n){n!=="text"&&E.removeMark(t,n)})}MI(Rnt),tn({target:"Object",stat:!0,forced:Ce(function(){ml(1)})},{keys:function(t){return ml(qp(t))}});var hs=function(){function t(){this.marksNeedToRemove=[],this.tag="button"}return t.prototype.getValue=function(e){var n=this.mark,r=E.marks(e);return r?r[n]:!!Yt(E.nodes(e,{match:function(o){return o[n]===!0}}),1)[0]},t.prototype.isActive=function(e){return!!this.getValue(e)},t.prototype.isDisabled=function(e){return zI(e,this.mark)},t.prototype.exec=function(e,n){var r=this.mark,o=this.marksNeedToRemove;n?e.removeMark(r):(e.addMark(r,!0),o&&o.forEach(function(i){return e.removeMark(i)}))},t}(),$nt='',Hnt='',Vnt='',Unt='',Wnt='',$I='',HI='',Gnt='',qnt='',Knt='',Ynt='',Xnt='',Znt='',Jnt='',Qnt='',trt='',ert='',nrt='',rrt='',ort=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.mark="bold",n.title=tt("textStyle.bold"),n.iconSvg=$nt,n.hotkey="mod+b",n}return be(e,t),e}(hs),irt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.mark="code",n.title=tt("textStyle.code"),n.iconSvg=Wnt,n.hotkey="mod+e",n}return be(e,t),e}(hs),art=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.mark="italic",n.title=tt("textStyle.italic"),n.iconSvg=Vnt,n.hotkey="mod+i",n}return be(e,t),e}(hs),urt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.mark="through",n.title=tt("textStyle.through"),n.iconSvg=Unt,n.hotkey="mod+shift+x",n}return be(e,t),e}(hs),srt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.mark="underline",n.title=tt("textStyle.underline"),n.iconSvg=Hnt,n.hotkey="mod+u",n}return be(e,t),e}(hs),lrt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.mark="sub",n.marksNeedToRemove=["sup"],n.title=tt("textStyle.sub"),n.iconSvg=rrt,n.hotkey="",n}return be(e,t),e}(hs),crt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.mark="sup",n.marksNeedToRemove=["sub"],n.title=tt("textStyle.sup"),n.iconSvg=nrt,n.hotkey="",n}return be(e,t),e}(hs),frt=function(){function t(){this.title=tt("textStyle.clear"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){return zI(e)},t.prototype.exec=function(e,n){var r,o,i=E.nodes(e,{match:function(s){return ot.isText(s)},universal:!0});try{for(var a=LI(i),u=a.next();!u.done;u=a.next())znt(e,u.value[0])}catch(s){r={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}},t}(),drt={renderStyle:function(t,e){var n=t,r=n.bold,o=n.italic,i=n.underline,a=n.code,u=n.through,s=n.sub,l=n.sup,c=e;return r&&(c=bt("strong",null,c)),a&&(c=bt("code",null,c)),o&&(c=bt("em",null,c)),i&&(c=bt("u",null,c)),u&&(c=bt("s",null,c)),s&&(c=bt("sub",null,c)),l&&(c=bt("sup",null,c)),c},menus:[{key:"bold",factory:function(){return new ort}},{key:"underline",factory:function(){return new srt}},{key:"italic",factory:function(){return new art}},{key:"through",factory:function(){return new urt}},{key:"code",factory:function(){return new irt}},{key:"sub",factory:function(){return new lrt}},{key:"sup",factory:function(){return new crt}},{key:"clearStyle",factory:function(){return new frt}}],styleToHtml:function(t,e){if(!ot.isText(t))return e;if(nC(e))return Xb(t,e);var n=B(e);if(yc(n)==="br")return Xb(t,"
    ");var r=n.html();return r=Xb(t,r),n.html(r),vc(n)},parseStyleHtml:function(t,e,n){var r=B(t);if(!ot.isText(e))return e;var o=e;return Ja(r,"b,strong")&&(o.bold=!0),Ja(r,"i,em")&&(o.italic=!0),Ja(r,"u")&&(o.underline=!0),Ja(r,"s,strike")&&(o.through=!0),Ja(r,"sub")&&(o.sub=!0),Ja(r,"sup")&&(o.sup=!0),Ja(r,"code")&&(o.code=!0),o}};function Xp(t){return function(e,n,r){return bt("h"+t,null,n)}}var prt={type:"header1",renderElem:Xp(1)},hrt={type:"header2",renderElem:Xp(2)},grt={type:"header3",renderElem:Xp(3)},vrt={type:"header4",renderElem:Xp(4)},yrt={type:"header5",renderElem:Xp(5)},mrt=sy.PROPER,c6=RegExp.prototype,VI=c6.toString,brt=yt(OI),wrt=Ce(function(){return VI.call({source:"a",flags:"b"})!="/a/b"}),Ert=mrt&&VI.name!="toString";(wrt||Ert)&&Qd(RegExp.prototype,"toString",function(){var t=rr(this),e=Ee(t.source),n=t.flags;return"/"+e+"/"+Ee(n===void 0&&hI(c6,t)&&!("flags"in c6)?brt(t):n)},{unsafe:!0});var t2,Drt=St.TypeError,UI=function(t){if(jI(t))throw Drt("The method doesn't accept regular expressions");return t},Crt=dr("match"),WI=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[Crt]=!1,"/./"[t](e)}catch{}}return!1},xrt=UD.f,qO=yt("".startsWith),Srt=yt("".slice),Art=Math.min,KO=WI("startsWith");function GI(t){var e=Yt(E.nodes(t,{match:function(o){return A.getNodeType(o).startsWith("header")},universal:!0}),1),n=e[0];if(n==null)return"paragraph";var r=Yt(n,1)[0];return A.getNodeType(r)}function qI(t){return t.selection==null||!Yt(E.nodes(t,{match:function(e){var n=A.getNodeType(e);return n==="paragraph"||!!n.startsWith("header")},universal:!0,mode:"highest"}),1)[0]}function KI(t,e){e&&N.setNodes(t,{type:e})}tn({target:"String",proto:!0,forced:!(!KO&&(t2=xrt(String.prototype,"startsWith"),t2&&!t2.writable)||KO)},{startsWith:function(t){var e=Ee(jr(this));UI(t);var n=Kp(Art(arguments.length>1?arguments[1]:void 0,e.length)),r=Ee(t);return qO?qO(e,r,n):Srt(e,n,n+r.length)===r}});var Ort=function(){function t(){this.title=tt("header.title"),this.iconSvg='',this.tag="select",this.width=60}return t.prototype.getOptions=function(e){var n=[{value:"header1",text:"H1",styleForRenderMenuList:{"font-size":"32px","font-weight":"bold"}},{value:"header2",text:"H2",styleForRenderMenuList:{"font-size":"24px","font-weight":"bold"}},{value:"header3",text:"H3",styleForRenderMenuList:{"font-size":"18px","font-weight":"bold"}},{value:"header4",text:"H4",styleForRenderMenuList:{"font-size":"16px","font-weight":"bold"}},{value:"header5",text:"H5",styleForRenderMenuList:{"font-size":"13px","font-weight":"bold"}},{value:"paragraph",text:tt("header.text")}],r=this.getValue(e).toString();return n.forEach(function(o){o.value===r?o.selected=!0:delete o.selected}),n},t.prototype.isActive=function(e){return!1},t.prototype.getValue=function(e){return GI(e)},t.prototype.isDisabled=function(e){return qI(e)},t.prototype.exec=function(e,n){KI(e,n.toString())},t}(),Zp=function(){function t(){this.tag="button"}return t.prototype.getValue=function(e){return GI(e)},t.prototype.isActive=function(e){return this.getValue(e)===this.type},t.prototype.isDisabled=function(e){return qI(e)},t.prototype.exec=function(e,n){var r=this.type;KI(e,n===r?"paragraph":r)},t}(),krt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title="H1",n.type="header1",n}return be(e,t),e}(Zp),Brt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title="H2",n.type="header2",n}return be(e,t),e}(Zp),Frt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title="H3",n.type="header3",n}return be(e,t),e}(Zp),Trt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title="H4",n.type="header4",n}return be(e,t),e}(Zp),_rt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title="H5",n.type="header5",n}return be(e,t),e}(Zp),Prt={key:"headerSelect",factory:function(){return new Ort}},jrt={key:"header1",factory:function(){return new krt}},Nrt={key:"header2",factory:function(){return new Brt}},Irt={key:"header3",factory:function(){return new Frt}},Lrt={key:"header4",factory:function(){return new Trt}},Rrt={key:"header5",factory:function(){return new _rt}};function cf(t){return function(e,n){return""+n+""}}function ff(t){return function(e,n,r){var o=B(e);return(n=n.filter(function(i){return!!ot.isText(i)||!!r.isInline(i)})).length===0&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"header"+t,children:n}}}var Mrt={renderElems:[prt,hrt,grt,vrt,yrt],elemsToHtml:[{type:"header1",elemToHtml:cf(1)},{type:"header2",elemToHtml:cf(2)},{type:"header3",elemToHtml:cf(3)},{type:"header4",elemToHtml:cf(4)},{type:"header5",elemToHtml:cf(5)}],parseElemsHtml:[{selector:"h1:not([data-w-e-type])",parseElemHtml:ff(1)},{selector:"h2:not([data-w-e-type])",parseElemHtml:ff(2)},{selector:"h3:not([data-w-e-type])",parseElemHtml:ff(3)},{selector:"h4:not([data-w-e-type])",parseElemHtml:ff(4)},{selector:"h5:not([data-w-e-type])",parseElemHtml:ff(5)}],menus:[Prt,jrt,Nrt,Irt,Lrt,Rrt],editorPlugin:function(t){var e=t.insertBreak;t.insertNode;var n=t;return n.insertBreak=function(){var r=Yt(E.nodes(n,{match:function(o){return A.getNodeType(o).startsWith("header")},universal:!0}),1)[0];r&&A.isSelectionAtLineEnd(t,r[1])?N.insertNodes(n,{type:"paragraph",children:[{text:""}]},{mode:"highest"}):e()},n}},Rs=Object.assign,YO=Object.defineProperty,zrt=yt([].concat),XO=!Rs||Ce(function(){if(eo&&Rs({b:1},Rs(YO({},"a",{enumerable:!0,get:function(){YO(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(o){e[o]=o}),Rs({},t)[n]!=7||ml(Rs({},e)).join("")!=r})?function(t,e){for(var n=qp(t),r=arguments.length,o=1,i=CI.f,a=dI.f;r>o;)for(var u,s=ay(arguments[o++]),l=i?zrt(ml(s),i(s)):ml(s),c=l.length,f=0;c>f;)u=l[f++],eo&&!Te(a,s,u)||(n[u]=s[u]);return n}:Rs;function ts(t,e){t.data==null&&(t.data={});var n=t.data;n.style==null&&(n.style={}),Object.assign(n.style,e)}tn({target:"Object",stat:!0,forced:Object.assign!==XO},{assign:XO});var $rt={selector:"font",preParseHtml:function(t){var e=B(t);if(yc(e)!=="font")return t;var n=e.attr("color")||"";return n&&(e.removeAttr("color"),e.css("color",n)),e[0]}},YI=function(){function t(){this.tag="button",this.showDropPanel=!0,this.$content=null}return t.prototype.exec=function(e,n){},t.prototype.getValue=function(e){var n=this.mark,r=E.marks(e);return r&&r[n]?r[n]:""},t.prototype.isActive=function(e){return!!this.getValue(e)},t.prototype.isDisabled=function(e){return e.selection==null||!!Yt(E.nodes(e,{match:function(n){return A.getNodeType(n)==="pre"||!!E.isVoid(e,n)},universal:!0}),1)[0]},t.prototype.getPanelContentElem=function(e){var n=this.mark;if(this.$content==null){var r=B('
      ');r.on("click","li",function(l){var c=l.target;if(c!=null&&(l.preventDefault(),e.selection!=null)){var f=B(c).attr("data-value");f==="0"?E.removeMark(e,n):E.addMark(e,n,f)}}),this.$content=r}var o=this.$content;if(o==null)return document.createElement("ul");o.empty();var i=this.getValue(e),a=e.getMenuConfig(n).colors;(a===void 0?[]:a).forEach(function(l){var c=B('
      ');c.css("background-color",l);var f=B('
    • ');i===l&&f.addClass("active"),f.append(c),o.append(f)});var u="";n==="color"&&(u=tt("color.default")),n==="bgColor"&&(u=tt("color.clear"));var s=B(`
    • `+u+`
    • `);return o.prepend(s),o[0]},t}(),Hrt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("color.color"),n.iconSvg=Gnt,n.mark="color",n}return be(e,t),e}(YI),Vrt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("color.bgColor"),n.iconSvg=qnt,n.mark="bgColor",n}return be(e,t),e}(YI),ZO=["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"],Urt={renderStyle:function(t,e){var n=t,r=n.color,o=n.bgColor,i=e;return r&&ts(i,{color:r}),o&&ts(i,{backgroundColor:o}),i},styleToHtml:function(t,e){if(!ot.isText(t))return e;var n,r=t,o=r.color,i=r.bgColor;return o||i?((nC(e)||yc(n=B(e))!=="span")&&(n=B(""+e+"")),o&&n.css("color",o),i&&n.css("background-color",i),vc(n)):e},preParseHtml:[$rt],parseStyleHtml:function(t,e,n){var r=B(t);if(!ot.isText(e))return e;var o=e,i=Jr(r,"color");i&&(o.color=i);var a=Jr(r,"background-color");return a||(a=Jr(r,"background")),a&&(o.bgColor=a),o},menus:[{key:"color",factory:function(){return new Hrt},config:{colors:ZO}},{key:"bgColor",factory:function(){return new Vrt},config:{colors:ZO}}]},Wrt=/^(?:\w+:)?\/\/(\S+)$/,Grt=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,qrt=/^[^\s\.]+\.\S{2,}$/,Krt=EI.includes;function fy(t){return t===void 0&&(t="r"),t+"-"+yj()}function rC(t){return t.replace(//g,">")}function XI(t,e,n,r){return La(this,void 0,void 0,function(){var o,i;return Ra(this,function(a){switch(a.label){case 0:return(o=e.getMenuConfig(t).checkLink)?[4,o(n,r)]:[3,2];case 1:if(typeof(i=a.sent())=="string")return e.alert(i,"error"),[2,!1];if(i==null)return[2,!1];a.label=2;case 2:return[2,!0]}})})}function ZI(t,e,n){return La(this,void 0,void 0,function(){var r;return Ra(this,function(o){switch(o.label){case 0:return(r=e.getMenuConfig(t).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}})})}function oC(t){return t.selection==null||!!A.getSelectedElems(t).some(function(e){var n=e.type;return!!t.isVoid(e)||!!["pre","code","link"].includes(n)||void 0})}function e2(t,e){return{type:"link",url:rC(t),children:e?[{text:e}]:[]}}function JI(t,e,n){return La(this,void 0,void 0,function(){var r,o,i;return Ra(this,function(a){switch(a.label){case 0:return n?(e||(e=n),t.restoreSelection(),oC(t)?[2]:[4,XI("insertLink",t,e,n)]):[2];case 1:return a.sent()?[4,ZI("insertLink",t,n)]:[2];case 2:return r=a.sent(),(o=t.selection)==null||(L.isCollapsed(o)?(t.insertText(" "),i=e2(r,e),N.insertNodes(t,i),t.insertFragment([{text:" "}])):E.string(t,o)!==e?(t.deleteFragment(),i=e2(r,e),N.insertNodes(t,i)):(i=e2(r),N.wrapNodes(t,i,{split:!0}),N.collapse(t,{edge:"end"}))),[2]}})})}tn({target:"Array",proto:!0},{includes:function(t){return Krt(this,t,arguments.length>1?arguments[1]:void 0)}}),PI("includes");var Yrt={type:"link",renderElem:function(t,e,n){var r=t,o=r.url,i=r.target;return bt("a",{href:o,target:i===void 0?"_blank":i},e)}},Xrt={selector:"a:not([data-w-e-type])",parseElemHtml:function(t,e,n){var r=B(t);return(e=e.filter(function(o){return!!ot.isText(o)||!!n.isInline(o)})).length===0&&(e=[{text:r.text().replace(/\s+/gm," ")}]),{type:"link",url:r.attr("href")||"",target:r.attr("target")||"",children:e}}};function n2(){return fy("w-e-insert-link")}var Zrt=function(){function t(){this.title=tt("link.insert"),this.iconSvg='',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=n2(),this.urlInputId=n2(),this.buttonId=n2()}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.exec=function(e,n){},t.prototype.isDisabled=function(e){return oC(e)},t.prototype.getModalPositionNode=function(e){return null},t.prototype.getModalContentElem=function(e){var n=e.selection,r=this,o=r.textInputId,i=r.urlInputId,a=r.buttonId,u=Yt(nr(tt("link.text"),o),2),s=u[0],l=B(u[1]),c=Yt(nr(tt("link.url"),i),2),f=c[0],p=B(c[1]),d=Yt(dc(a,tt("common.ok")),1)[0];if(this.$content==null){var y=B("
      ");y.on("click","#"+a,function(m){m.preventDefault();var h=y.find("#"+o).val(),b=y.find("#"+i).val();JI(e,h,b),e.hidePanelOrModal()}),this.$content=y}var g=this.$content;if(g.empty(),g.append(s),g.append(f),g.append(d),n==null||L.isCollapsed(n))l.val("");else{var v=E.string(e,n);l.val(v)}return p.val(""),setTimeout(function(){l.focus()}),g[0]},t}();function JO(){return fy("w-e-update-link")}var Jrt=function(){function t(){this.title=tt("link.edit"),this.iconSvg=$I,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=JO(),this.buttonId=JO()}return t.prototype.getSelectedLinkElem=function(e){var n=A.getSelectedNodeByType(e,"link");return n??null},t.prototype.getValue=function(e){var n=this.getSelectedLinkElem(e);return n&&n.url||""},t.prototype.isActive=function(e){return!1},t.prototype.exec=function(e,n){},t.prototype.isDisabled=function(e){return e.selection==null||this.getSelectedLinkElem(e)==null},t.prototype.getModalPositionNode=function(e){return A.getSelectedNodeByType(e,"link")},t.prototype.getModalContentElem=function(e){var n=this.urlInputId,r=this.buttonId,o=Yt(nr(tt("link.url"),n),2),i=o[0],a=B(o[1]),u=Yt(dc(r,tt("common.ok")),1)[0];if(this.$content==null){var s=B("
      ");s.on("click","button",function(f){f.preventDefault(),e.restoreSelection();var p=A.getSelectedNodeByType(e,"link"),d=p?Q.string(p):"",y=s.find("#"+n).val();(function(g,v,m){La(this,void 0,void 0,function(){var h,b;return Ra(this,function(w){switch(w.label){case 0:return m?[4,XI("editLink",g,v,m)]:[2];case 1:return w.sent()?[4,ZI("editLink",g,m)]:[2];case 2:return h=w.sent(),b={url:rC(h)},N.setNodes(g,b,{match:function(D){return A.checkNodeType(D,"link")}}),[2]}})})})(e,d,y),e.hidePanelOrModal()}),this.$content=s}var l=this.$content;l.empty(),l.append(i),l.append(u);var c=this.getValue(e);return a.val(c),setTimeout(function(){a.focus()}),l[0]},t}(),Qrt=function(){function t(){this.title=tt("link.unLink"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){return e.selection==null||A.getSelectedNodeByType(e,"link")==null},t.prototype.exec=function(e,n){this.isDisabled(e)||N.unwrapNodes(e,{match:function(r){return A.checkNodeType(r,"link")}})},t}(),tot=function(){function t(){this.title=tt("link.view"),this.iconSvg=HI,this.tag="button"}return t.prototype.getSelectedLinkElem=function(e){var n=A.getSelectedNodeByType(e,"link");return n??null},t.prototype.getValue=function(e){var n=this.getSelectedLinkElem(e);return n&&n.url||""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){return e.selection==null||this.getSelectedLinkElem(e)==null},t.prototype.exec=function(e,n){if(!this.isDisabled(e)){if(!n||typeof n!="string")throw new Error("View link failed, link url is '"+n+"'");window.open(n,"_blank")}},t}(),QO={checkLink:function(t,e){return!0},parseLinkUrl:function(t){return t}},eot={renderElems:[Yrt],elemsToHtml:[{type:"link",elemToHtml:function(t,e){var n=t,r=n.url,o=n.target;return'
      '+e+""}}],parseElemsHtml:[Xrt],menus:[{key:"insertLink",factory:function(){return new Zrt},config:QO},{key:"editLink",factory:function(){return new Jrt},config:QO},{key:"unLink",factory:function(){return new Qrt}},{key:"viewLink",factory:function(){return new tot}}],editorPlugin:function(t){var e=t.isInline,n=t.insertData,r=t.normalizeNode;t.insertNode,t.insertText;var o=t;return o.isInline=function(i){return i.type==="link"||e(i)},o.insertData=function(i){var a=i.getData("text/plain");if(function(l){if(typeof l!="string")return!1;var c=l.match(Wrt);if(!c)return!1;var f=c[1];return!(!f||!Grt.test(f)&&!qrt.test(f))}(a)){if(!oC(o)){var u=o.selection;if(u!=null){var s=E.string(o,u);JI(o,s,a)}}}else n(i)},o.normalizeNode=function(i){var a=Yt(i,2),u=a[0],s=a[1];return A.getNodeType(u)!=="link"?r([u,s]):Q.string(u)===""?N.removeNodes(o,{at:s}):r([u,s])},o}},not=yt(1 .valueOf),rot=St.RangeError,oot=St.RangeError,QI=St.String,tL=Math.floor,f6=yt(function(t){var e=Ee(jr(this)),n="",r=gc(t);if(r<0||r==1/0)throw rot("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}),tk=yt("".slice),df=yt(1 .toFixed),cl=function(t,e,n){return e===0?n:e%2==1?cl(t,e-1,n*t):cl(t*t,e/2,n)},Ms=function(t,e,n){for(var r=-1,o=n;++r<6;)o+=e*t[r],t[r]=o%1e7,o=tL(o/1e7)},r2=function(t,e){for(var n=6,r=0;--n>=0;)r+=t[n],t[n]=tL(r/e),r=r%e*1e7},ek=function(t){for(var e=6,n="";--e>=0;)if(n!==""||e===0||t[e]!==0){var r=QI(t[e]);n=n===""?r:n+f6("0",7-r.length)+r}return n};function nk(t,e){return"w-e-image-container-"+A.findKey(t,e).id}tn({target:"Number",proto:!0,forced:Ce(function(){return df(8e-5,3)!=="0.000"||df(.9,0)!=="1"||df(1.255,2)!=="1.25"||df(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!Ce(function(){df({})})},{toFixed:function(t){var e,n,r,o,i=not(this),a=gc(t),u=[0,0,0,0,0,0],s="",l="0";if(a<0||a>20)throw oot("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return QI(i);if(i<0&&(s="-",i=-i),i>1e-21)if(n=(e=function(c){for(var f=0,p=c;p>=4096;)f+=12,p/=4096;for(;p>=2;)f+=1,p/=2;return f}(i*cl(2,69,1))-69)<0?i*cl(2,-e,1):i/cl(2,e,1),n*=4503599627370496,(e=52-e)>0){for(Ms(u,0,n),r=a;r>=7;)Ms(u,1e7,0),r-=7;for(Ms(u,cl(10,r,1),0),r=e-1;r>=23;)r2(u,1<<23),r-=23;r2(u,1<0?s+((o=l.length)<=a?"0."+f6("0",a-o)+l:tk(l,0,o-a)+"."+tk(l,o-a)):s+l}});var iot={type:"image",renderElem:function(t,e,n){var r=t,o=r.src,i=r.alt,a=i===void 0?"":i,u=r.href,s=u===void 0?"":u,l=r.style,c=l===void 0?{}:l,f=c.width,p=f===void 0?"":f,d=c.height,y=d===void 0?"":d,g=A.isNodeSelected(n,t),v={};p&&(v.width="100%"),y&&(v.height="100%");var m=bt("img",{style:v,src:o,alt:a,"data-href":s}),h=n.isDisabled();return g&&!h?function(b,w,D,x){var C=B("body"),O=nk(b,w),T=x.width,R=x.height,H=0,M=0,K=0,U=!1,W=null;function q(at){W=function(){var P=B("#"+O);if(P.length===0)throw new Error("Cannot find image container elem");return P}(),H=at;var k=W.find("img");if(k.length===0)throw new Error("Cannot find image elem");M=k.width(),K=k.height(),C.on("mousemove",nt),C.on("mouseup",lt);var S=A.getHoverbar(b);S&&S.hideAndClean()}var nt=Ku(function(at){at.preventDefault();var k=at.clientX,S=M+(U?H-k:k-H),P=K*(S/M);W!=null&&(S<=15||P<=15||(W.css("width",S+"px"),W.css("height",P+"px")))},100);function lt(at){if(C.off("mousemove",nt),W!=null){var k=W.width().toFixed(2),S=W.height().toFixed(2),P={style:Aa(Aa({},w.style),{width:k+"px",height:S+"px"})};N.setNodes(b,P,{at:A.findPath(b,w)}),C.off("mouseup",lt)}}var st={};return T&&(st.width=T),R&&(st.height=R),bt("div",{id:O,style:st,className:"w-e-image-container w-e-selected-image-container",on:{mousedown:function(at){var k=B(at.target);k.hasClass("w-e-image-dragger")&&(at.preventDefault(),(k.hasClass("left-top")||k.hasClass("left-bottom"))&&(U=!0),q(at.clientX))}}},D,bt("div",{className:"w-e-image-dragger left-top"}),bt("div",{className:"w-e-image-dragger right-top"}),bt("div",{className:"w-e-image-dragger left-bottom"}),bt("div",{className:"w-e-image-dragger right-bottom"}))}(n,t,m,{width:p,height:y}):function(b,w,D,x){var C=x.width,O=x.height,T={};return C&&(T.width=C),O&&(T.height=O),bt("div",{id:nk(b,w),style:T,className:"w-e-image-container"},D)}(n,t,m,{width:p,height:y})}},aot={selector:"img:not([data-w-e-type])",parseElemHtml:function(t,e,n){var r=B(t),o=r.attr("data-href")||"";return o=decodeURIComponent(o),{type:"image",src:r.attr("src")||"",alt:r.attr("alt")||"",href:o,style:{width:Jr(r,"width"),height:Jr(r,"height")},children:[{text:""}]}}};function eL(t,e,n,r,o){return r===void 0&&(r=""),o===void 0&&(o=""),La(this,void 0,void 0,function(){var i,a;return Ra(this,function(u){switch(u.label){case 0:return(i=e.getMenuConfig(t).checkImage)?[4,i(n,r,o)]:[3,2];case 1:if(typeof(a=u.sent())=="string")return e.alert(a,"error"),[2,!1];if(a==null)return[2,!1];u.label=2;case 2:return[2,!0]}})})}function nL(t,e,n){return La(this,void 0,void 0,function(){var r;return Ra(this,function(o){switch(o.label){case 0:return(r=e.getMenuConfig(t).parseImageSrc)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}})})}function _u(t,e,n,r){return n===void 0&&(n=""),r===void 0&&(r=""),La(this,void 0,void 0,function(){var o,i,a;return Ra(this,function(u){switch(u.label){case 0:return[4,eL("insertImage",t,e,n,r)];case 1:return u.sent()?[4,nL("insertImage",t,e)]:[2];case 2:return o=u.sent(),i={type:"image",src:rC(o),href:r,alt:n,style:{},children:[{text:""}]},t.selection===null&&t.restoreSelection(),A.getSelectedNodeByType(t,"image")&&t.move(1),dy(t)||(N.insertNodes(t,i),(a=t.getMenuConfig("insertImage").onInsertedImage)&&a(i)),[2]}})})}function dy(t){var e=t.selection;return e==null||!L.isCollapsed(e)||!!Yt(E.nodes(t,{match:function(n){var r=A.getNodeType(n);return r==="code"||r==="pre"||r==="link"||r==="list-item"||!!r.startsWith("header")||r==="blockquote"||!!E.isVoid(t,n)},universal:!0}),1)[0]}function o0(){return fy("w-e-insert-image")}var uot=function(){function t(){this.title=tt("image.netImage"),this.iconSvg='',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=o0(),this.altInputId=o0(),this.hrefInputId=o0(),this.buttonId=o0()}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.exec=function(e,n){},t.prototype.isDisabled=function(e){return dy(e)},t.prototype.getModalPositionNode=function(e){return null},t.prototype.getModalContentElem=function(e){var n=this,r=this,o=r.srcInputId,i=r.altInputId,a=r.hrefInputId,u=r.buttonId,s=Yt(nr(tt("image.src"),o),2),l=s[0],c=B(s[1]),f=Yt(nr(tt("image.desc"),i),2),p=f[0],d=B(f[1]),y=Yt(nr(tt("image.link"),a),2),g=y[0],v=B(y[1]),m=Yt(dc(u,tt("common.ok")),1)[0];if(this.$content==null){var h=B("
      ");h.on("click","#"+u,function(w){w.preventDefault();var D=h.find("#"+o).val().trim(),x=h.find("#"+i).val().trim(),C=h.find("#"+a).val().trim();n.insertImage(e,D,x,C),e.hidePanelOrModal()}),this.$content=h}var b=this.$content;return b.empty(),b.append(l),b.append(p),b.append(g),b.append(m),c.val(""),d.val(""),v.val(""),setTimeout(function(){c.focus()}),b[0]},t.prototype.insertImage=function(e,n,r,o){r===void 0&&(r=""),o===void 0&&(o=""),n&&(e.restoreSelection(),this.isDisabled(e)||_u(e,n,r,o))},t}(),sot=function(){function t(){this.title=tt("image.delete"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){return e.selection==null||A.getSelectedNodeByType(e,"image")==null},t.prototype.exec=function(e,n){this.isDisabled(e)||N.removeNodes(e,{match:function(r){return A.checkNodeType(r,"image")}})},t}();function i0(){return fy("w-e-edit-image")}var lot=function(){function t(){this.title=tt("image.edit"),this.iconSvg=$I,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=i0(),this.altInputId=i0(),this.hrefInputId=i0(),this.buttonId=i0()}return t.prototype.getValue=function(e){return""},t.prototype.getImageNode=function(e){return A.getSelectedNodeByType(e,"image")},t.prototype.isActive=function(e){return!1},t.prototype.exec=function(e,n){},t.prototype.isDisabled=function(e){var n=e.selection;return n==null||!L.isCollapsed(n)||A.getSelectedNodeByType(e,"image")==null},t.prototype.getModalPositionNode=function(e){return this.getImageNode(e)},t.prototype.getModalContentElem=function(e){var n=this,r=this,o=r.srcInputId,i=r.altInputId,a=r.hrefInputId,u=r.buttonId,s=this.getImageNode(e);if(s==null)throw new Error("Not found selected image node");var l=Yt(nr(tt("image.src"),o),2),c=l[0],f=B(l[1]),p=Yt(nr(tt("image.desc"),i),2),d=p[0],y=B(p[1]),g=Yt(nr(tt("image.link"),a),2),v=g[0],m=B(g[1]),h=Yt(dc(u,tt("common.ok")),1)[0];if(this.$content==null){var b=B("
      ");b.on("click","#"+u,function(H){H.preventDefault();var M=b.find("#"+o).val(),K=b.find("#"+i).val(),U=b.find("#"+a).val();n.updateImage(e,M,K,U),e.hidePanelOrModal()}),this.$content=b}var w=this.$content;w.empty(),w.append(c),w.append(d),w.append(v),w.append(h);var D=s,x=D.src,C=D.alt,O=C===void 0?"":C,T=D.href,R=T===void 0?"":T;return f.val(x),y.val(O),m.val(R),setTimeout(function(){f.focus()}),w[0]},t.prototype.updateImage=function(e,n,r,o,i){r===void 0&&(r=""),o===void 0&&(o=""),i===void 0&&(i={}),n&&(e.restoreSelection(),this.isDisabled(e)||function(a,u,s,l,c){s===void 0&&(s=""),l===void 0&&(l=""),c===void 0&&(c={}),La(this,void 0,void 0,function(){var f,p,d,y,g,v;return Ra(this,function(m){switch(m.label){case 0:return[4,eL("editImage",a,u,s,l)];case 1:return m.sent()?[4,nL("editImage",a,u)]:[2];case 2:return f=m.sent(),(p=A.getSelectedNodeByType(a,"image"))==null||(d=p.style,y={src:f,alt:s,href:l,style:Aa(Aa({},d===void 0?{}:d),c)},N.setNodes(a,y,{match:function(h){return A.checkNodeType(h,"image")}}),g=A.getSelectedNodeByType(a,"image"),(v=a.getMenuConfig("editImage").onUpdatedImage)&&v(g)),[2]}})})}(e,n,r,o,i))},t}(),cot=function(){function t(){this.title=tt("image.viewLink"),this.iconSvg=HI,this.tag="button"}return t.prototype.getValue=function(e){var n=A.getSelectedNodeByType(e,"image");return n&&n.href||""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){return e.selection==null||!this.getValue(e)},t.prototype.exec=function(e,n){if(!this.isDisabled(e)){if(!n||typeof n!="string")throw new Error("View image link failed, image.href is '"+n+"'");window.open(n,"_blank")}},t}(),iC=function(){function t(){this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.getSelectedNode=function(e){return A.getSelectedNodeByType(e,"image")},t.prototype.isDisabled=function(e){return e.selection==null||this.getSelectedNode(e)==null},t.prototype.exec=function(e,n){if(!this.isDisabled(e)){var r=this.getSelectedNode(e);if(r!=null){var o=A.getHoverbar(e);o&&o.hideAndClean();var i=r.style,a={style:Aa(Aa({},i===void 0?{}:i),{width:this.value,height:""})};N.setNodes(e,a,{match:function(u){return A.checkNodeType(u,"image")}})}}},t}(),fot=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title="30%",n.value="30%",n}return be(e,t),e}(iC),dot=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title="50%",n.value="50%",n}return be(e,t),e}(iC),pot=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title="100%",n.value="100%",n}return be(e,t),e}(iC),rk={onInsertedImage:function(t){},onUpdatedImage:function(t){},checkImage:function(t,e,n){return!0},parseImageSrc:function(t){return t}},hot={renderElems:[iot],elemsToHtml:[{type:"image",elemToHtml:function(t,e){var n=t,r=n.src,o=n.alt,i=o===void 0?"":o,a=n.href,u=a===void 0?"":a,s=n.style,l=s===void 0?{}:s,c=l.width,f=c===void 0?"":c,p=l.height,d=p===void 0?"":p,y="";return f&&(y+="width: "+f+";"),d&&(y+="height: "+d+";"),''+i+''}}],parseElemsHtml:[aot],menus:[{key:"insertImage",factory:function(){return new uot},config:rk},{key:"deleteImage",factory:function(){return new sot}},{key:"editImage",factory:function(){return new lot},config:rk},{key:"viewImageLink",factory:function(){return new cot}},{key:"imageWidth30",factory:function(){return new fot}},{key:"imageWidth50",factory:function(){return new dot}},{key:"imageWidth100",factory:function(){return new pot}}],editorPlugin:function(t){var e=t.isInline,n=t.isVoid;t.insertNode;var r=t;return r.isInline=function(o){return o.type==="image"||e(o)},r.isVoid=function(o){return o.type==="image"||n(o)},r}},got={type:"todo",renderElem:function(t,e,n){var r=!1;n.isDisabled()&&(r=!0);var o=bt("div",{style:{margin:"5px 0"}},bt("span",{contentEditable:!1,style:{marginRight:"0.5em"}},bt("input",{type:"checkbox",checked:t.checked,disabled:r,on:{change:function(i){var a=A.findPath(n,t),u={checked:i.target.checked};N.setNodes(n,u,{at:a})}}})),bt("span",null,e));return o}},vot=function(){function t(){this.title=tt("todo.todo"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!!A.getSelectedNodeByType(e,"todo")},t.prototype.isDisabled=function(e){return e.selection==null||!!A.getSelectedElems(e).some(function(n){if(E.isVoid(e,n)&&E.isBlock(e,n))return!0;var r=n.type;return!!["pre","table","list-item"].includes(r)||void 0})},t.prototype.exec=function(e,n){var r=this.isActive(e);N.setNodes(e,{type:r?"paragraph":"todo"})},t}(),yot={selector:'div[data-w-e-type="todo"]',parseElemHtml:function(t,e,n){var r=B(t);(e=e.filter(function(i){return!!ot.isText(i)||!!n.isInline(i)})).length===0&&(e=[{text:r.text().replace(/\s+/gm," ")}]);var o=!1;return r.find('input[type="checkbox"]').attr("checked")!=null&&(o=!0),{type:"todo",checked:o,children:e}}},mot={renderElems:[got],elemsToHtml:[{type:"todo",elemToHtml:function(t,e){return'
      "+e+"
      "}}],preParseHtml:[{selector:"ul.w-e-todo",preParseHtml:function(t){var e=B(t).find("li"),n=B('
      '),r=e.find("input[type]");return n.append(r),e.children()[0].remove(),n[0].innerHTML=n[0].innerHTML+e[0].innerHTML,n[0]}}],parseElemsHtml:[yot],menus:[{key:"todo",factory:function(){return new vot}}],editorPlugin:function(t){var e=t.deleteBackward,n=t;return n.deleteBackward=function(r){var o=t.selection;if(o&&L.isCollapsed(o)){var i=A.getSelectedNodeByType(t,"todo");if(i&&Q.string(i).length===0)return void N.setNodes(t,{type:"paragraph"},{mode:"highest"})}e(r)},n}},bot={type:"blockquote",renderElem:function(t,e,n){return bt("blockquote",null,e)}},wot={selector:"blockquote:not([data-w-e-type])",parseElemHtml:function(t,e,n){var r=B(t);return(e=e.filter(function(o){return!!ot.isText(o)||!!n.isInline(o)})).length===0&&(e=[{text:r.text().replace(/\s+/gm," ")}]),{type:"blockquote",children:e}}},Eot=function(){function t(){this.title=tt("blockQuote.title"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!!A.getSelectedNodeByType(e,"blockquote")},t.prototype.isDisabled=function(e){return e.selection==null||!Yt(E.nodes(e,{match:function(n){var r=A.getNodeType(n);return r==="paragraph"||r==="blockquote"},universal:!0,mode:"highest"}),1)[0]},t.prototype.exec=function(e,n){if(!this.isDisabled(e)){var r=this.isActive(e)?"paragraph":"blockquote";N.setNodes(e,{type:r},{mode:"highest"})}},t}(),Dot={key:"blockquote",factory:function(){return new Eot}},Cot=yt([].slice),xot=ZD("slice"),Sot=dr("species"),o2=St.Array,Aot=Math.max;tn({target:"Array",proto:!0,forced:!xot},{slice:function(t,e){var n,r,o,i=pc(this),a=ly(i),u=tp(t,a),s=tp(e===void 0?a:e,a);if(Cv(i)&&(n=i.constructor,(XD(n)&&(n===o2||Cv(n.prototype))||Cr(n)&&(n=n[Sot])===null)&&(n=void 0),n===o2||n===void 0))return Cot(i,u,s);for(r=new(n===void 0?o2:n)(Aot(s-u,0)),o=0;u"+e+""}}],parseElemsHtml:[wot],menus:[Dot],editorPlugin:function(t){var e=t.insertBreak,n=t.insertText,r=t;return r.insertBreak=function(){var o=r.selection;if(o==null)return e();var i=Yt(E.nodes(t,{match:function(c){return A.checkNodeType(c,"blockquote")},universal:!0}),1)[0];if(!i)return e();var a=i[0],u=A.findPath(t,a),s=E.end(t,u);if(Bt.equals(s,o.focus)){var l=Q.string(a);if(l&&l.slice(-1)===` `)return t.deleteBackward("character"),void N.insertNodes(r,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}n(` `)},r}},kot=function(){function t(){this.title=tt("emotion.title"),this.iconSvg='',this.tag="button",this.showDropPanel=!0,this.$content=null}return t.prototype.exec=function(e,n){},t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){return e.selection==null||!!Yt(E.nodes(e,{match:function(n){return A.getNodeType(n)==="pre"||!!E.isVoid(e,n)},universal:!0}),1)[0]},t.prototype.getPanelContentElem=function(e){if(this.$content==null){var n=B('
        ');n.on("click","li",function(i){var a=i.target;if(a!=null){i.preventDefault();var u=B(a).text();e.insertText(u)}}),this.$content=n}var r=this.$content;if(r==null)return document.createElement("ul");r.empty();var o=e.getMenuConfig("emotion").emotions;return(o===void 0?[]:o).forEach(function(i){var a=B("
      • "+i+"
      • ");r.append(a)}),r[0]},t}(),Bot={menus:[{key:"emotion",factory:function(){return new kot},config:{emotions:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏".split(" ")}}]},Fot={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"},Tot={selector:"font",preParseHtml:function(t){var e=B(t);if(yc(e)!=="font")return t;var n=e.attr("size")||"";n&&(e.removeAttr("size"),e.css("font-size",Fot[n]));var r=e.attr("face")||"";return r&&(e.removeAttr("face"),e.css("font-family",r)),e[0]}},_ot=yt("".indexOf);tn({target:"String",proto:!0,forced:!WI("includes")},{includes:function(t){return!!~_ot(Ee(jr(this)),Ee(UI(t)),arguments.length>1?arguments[1]:void 0)}});var Fi,og,a0=function(t){return t&&t.Math==Math&&t},Ft=a0(typeof globalThis=="object"&&globalThis)||a0(typeof window=="object"&&window)||a0(typeof self=="object"&&self)||a0(typeof bv=="object"&&bv)||function(){return this}()||Function("return this")(),aC=Function.prototype,ok=aC.apply,Pot=aC.bind,ik=aC.call,rL=typeof Reflect=="object"&&Reflect.apply||(Pot?ik.bind(ok):function(){return ik.apply(ok,arguments)}),oL=Function.prototype,d6=oL.bind,p6=oL.call,jot=d6&&d6.bind(p6),_e=d6?function(t){return t&&jot(p6,t)}:function(t){return t&&function(){return p6.apply(t,arguments)}},gn=function(t){return typeof t=="function"},lr=function(t){try{return!!t()}catch{return!0}},Wn=!lr(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),pf=Function.prototype.call,qr=pf.bind?pf.bind(pf):function(){return pf.apply(pf,arguments)},ak={}.propertyIsEnumerable,uk=Object.getOwnPropertyDescriptor,Not=uk&&!ak.call({1:2},1)?function(t){var e=uk(this,t);return!!e&&e.enumerable}:ak,uC={f:Not},es=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Iot=_e({}.toString),Lot=_e("".slice),Pu=function(t){return Lot(Iot(t),8,-1)},i2=Ft.Object,Rot=_e("".split),iL=lr(function(){return!i2("z").propertyIsEnumerable(0)})?function(t){return Pu(t)=="String"?Rot(t,""):i2(t)}:i2,Mot=Ft.TypeError,sC=function(t){if(t==null)throw Mot("Can't call method on "+t);return t},No=function(t){return iL(sC(t))},xr=function(t){return typeof t=="object"?t!==null:gn(t)},br={},sk=function(t){return gn(t)?t:void 0},Jp=function(t,e){return arguments.length<2?sk(br[t])||sk(Ft[t]):br[t]&&br[t][e]||Ft[t]&&Ft[t][e]},aL=_e({}.isPrototypeOf),a2=Jp("navigator","userAgent")||"",lk=Ft.process,ck=Ft.Deno,fk=lk&&lk.versions||ck&&ck.version,dk=fk&&fk.v8;dk&&(og=(Fi=dk.split("."))[0]>0&&Fi[0]<4?1:+(Fi[0]+Fi[1])),!og&&a2&&(!(Fi=a2.match(/Edge\/(\d+)/))||Fi[1]>=74)&&(Fi=a2.match(/Chrome\/(\d+)/))&&(og=+Fi[1]);var Av=og,ho=!!Object.getOwnPropertySymbols&&!lr(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Av&&Av<41}),lC=ho&&!Symbol.sham&&typeof Symbol.iterator=="symbol",zot=Ft.Object,bl=lC?function(t){return typeof t=="symbol"}:function(t){var e=Jp("Symbol");return gn(e)&&aL(e.prototype,zot(t))},$ot=Ft.String,Hot=Ft.TypeError,uL=function(t){if(gn(t))return t;throw Hot(function(e){try{return $ot(e)}catch{return"Object"}}(t)+" is not a function")},Vot=Ft.TypeError,Uot=Object.defineProperty,la=Ft["__core-js_shared__"]||function(t,e){try{Uot(Ft,t,{value:e,configurable:!0,writable:!0})}catch{Ft[t]=e}return e}("__core-js_shared__",{}),gs=iy(function(t){(t.exports=function(e,n){return la[e]||(la[e]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Wot=Ft.Object,Qp=function(t){return Wot(sC(t))},Got=_e({}.hasOwnProperty),Kt=Object.hasOwn||function(t,e){return Got(Qp(t),e)},qot=0,Kot=Math.random(),Yot=_e(1 .toString),Ov=function(t){return"Symbol("+(t===void 0?"":t)+")_"+Yot(++qot+Kot,36)},hf=gs("wks"),ju=Ft.Symbol,pk=ju&&ju.for,Xot=lC?ju:ju&&ju.withoutSetter||Ov,pr=function(t){if(!Kt(hf,t)||!ho&&typeof hf[t]!="string"){var e="Symbol."+t;ho&&Kt(ju,t)?hf[t]=ju[t]:hf[t]=lC&&pk?pk(e):Xot(e)}return hf[t]},Zot=Ft.TypeError,Jot=pr("toPrimitive"),mc=function(t){var e=function(n,r){if(!xr(n)||bl(n))return n;var o,i,a=(o=n[Jot])==null?void 0:uL(o);if(a){if(r===void 0&&(r="default"),i=qr(a,n,r),!xr(i)||bl(i))return i;throw Zot("Can't convert object to primitive value")}return r===void 0&&(r="number"),function(u,s){var l,c;if(s==="string"&&gn(l=u.toString)&&!xr(c=qr(l,u))||gn(l=u.valueOf)&&!xr(c=qr(l,u))||s!=="string"&&gn(l=u.toString)&&!xr(c=qr(l,u)))return c;throw Vot("Can't convert object to primitive value")}(n,r)}(t,"string");return bl(e)?e:e+""},h6=Ft.document,Qot=xr(h6)&&xr(h6.createElement),sL=function(t){return Qot?h6.createElement(t):{}},lL=!Wn&&!lr(function(){return Object.defineProperty(sL("div"),"a",{get:function(){return 7}}).a!=7}),hk=Object.getOwnPropertyDescriptor,cC={f:Wn?hk:function(t,e){if(t=No(t),e=mc(e),lL)try{return hk(t,e)}catch{}if(Kt(t,e))return es(!qr(uC.f,t,e),t[e])}},tit=/#|\.prototype\./,th=function(t,e){var n=nit[eit(t)];return n==oit||n!=rit&&(gn(e)?lr(e):!!e)},eit=th.normalize=function(t){return String(t).replace(tit,".").toLowerCase()},nit=th.data={},rit=th.NATIVE="N",oit=th.POLYFILL="P",iit=th,gk=_e(_e.bind),cL=function(t,e){return uL(t),e===void 0?t:gk?gk(t,e):function(){return t.apply(e,arguments)}},ait=Ft.String,uit=Ft.TypeError,ns=function(t){if(xr(t))return t;throw uit(ait(t)+" is not an object")},sit=Ft.TypeError,vk=Object.defineProperty,vs={f:Wn?vk:function(t,e,n){if(ns(t),e=mc(e),ns(n),lL)try{return vk(t,e,n)}catch{}if("get"in n||"set"in n)throw sit("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},vo=Wn?function(t,e,n){return vs.f(t,e,es(1,n))}:function(t,e,n){return t[e]=n,t},lit=cC.f,cit=function(t){var e=function(n,r,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,o)}return rL(t,this,arguments)};return e.prototype=t.prototype,e},Vi=function(t,e){var n,r,o,i,a,u,s,l,c=t.target,f=t.global,p=t.stat,d=t.proto,y=f?Ft:p?Ft[c]:(Ft[c]||{}).prototype,g=f?br:br[c]||vo(br,c,{})[c],v=g.prototype;for(o in e)n=!iit(f?o:c+(p?".":"#")+o,t.forced)&&y&&Kt(y,o),a=g[o],n&&(u=t.noTargetGet?(l=lit(y,o))&&l.value:y[o]),i=n&&u?u:e[o],n&&typeof a==typeof i||(s=t.bind&&n?cL(i,Ft):t.wrap&&n?cit(i):d&&gn(i)?_e(i):i,(t.sham||i&&i.sham||a&&a.sham)&&vo(s,"sham",!0),vo(g,o,s),d&&(Kt(br,r=c+"Prototype")||vo(br,r,{}),vo(br[r],o,i),t.real&&v&&!v[o]&&vo(v,o,i)))},kv=Array.isArray||function(t){return Pu(t)=="Array"},fit=Math.ceil,dit=Math.floor,fC=function(t){var e=+t;return e!=e||e===0?0:(e>0?dit:fit)(e)},pit=Math.min,py=function(t){return(e=t.length)>0?pit(fC(e),9007199254740991):0;var e},g6=function(t,e,n){var r=mc(e);r in t?vs.f(t,r,es(0,n)):t[r]=n},fL={};fL[pr("toStringTag")]="z";var dC=String(fL)==="[object z]",hit=pr("toStringTag"),git=Ft.Object,vit=Pu(function(){return arguments}())=="Arguments",hy=dC?Pu:function(t){var e,n,r;return t===void 0?"Undefined":t===null?"Null":typeof(n=function(o,i){try{return o[i]}catch{}}(e=git(t),hit))=="string"?n:vit?Pu(e):(r=Pu(e))=="Object"&&gn(e.callee)?"Arguments":r},yit=_e(Function.toString);gn(la.inspectSource)||(la.inspectSource=function(t){return yit(t)});var dL=la.inspectSource,pL=function(){},mit=[],hL=Jp("Reflect","construct"),pC=/^\s*(?:class|function)\b/,bit=_e(pC.exec),wit=!pC.exec(pL),gf=function(t){if(!gn(t))return!1;try{return hL(pL,mit,t),!0}catch{return!1}},Eit=!hL||lr(function(){var t;return gf(gf.call)||!gf(Object)||!gf(function(){t=!0})||t})?function(t){if(!gn(t))return!1;switch(hy(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return wit||!!bit(pC,dL(t))}:gf,Dit=pr("species"),yk=Ft.Array,gL=function(t,e){return new(function(n){var r;return kv(n)&&(r=n.constructor,(Eit(r)&&(r===yk||kv(r.prototype))||xr(r)&&(r=r[Dit])===null)&&(r=void 0)),r===void 0?yk:r}(t))(e===0?0:e)},Cit=pr("species"),vL=pr("isConcatSpreadable"),mk=Ft.TypeError,xit=Av>=51||!lr(function(){var t=[];return t[vL]=!1,t.concat()[0]!==t}),Sit=Av>=51||!lr(function(){var t=[];return(t.constructor={})[Cit]=function(){return{foo:1}},t.concat(Boolean).foo!==1}),Ait=function(t){if(!xr(t))return!1;var e=t[vL];return e!==void 0?!!e:kv(t)};Vi({target:"Array",proto:!0,forced:!xit||!Sit},{concat:function(t){var e,n,r,o,i,a=Qp(this),u=gL(a,0),s=0;for(e=-1,r=arguments.length;e9007199254740991)throw mk("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw mk("Maximum allowed index exceeded");g6(u,s++,i)}return u.length=s,u}});var u0,Oit=Ft.String,Bv=function(t){if(hy(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Oit(t)},kit=Math.max,Bit=Math.min,v6=function(t,e){var n=fC(t);return n<0?kit(n+e,0):Bit(n,e)},bk=function(t){return function(e,n,r){var o,i=No(e),a=py(i),u=v6(r,a);if(t&&n!=n){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===n)return t||u||0;return!t&&-1}},Fit={includes:bk(!0),indexOf:bk(!1)},eh={},Tit=Fit.indexOf,wk=_e([].push),yL=function(t,e){var n,r=No(t),o=0,i=[];for(n in r)!Kt(eh,n)&&Kt(r,n)&&wk(i,n);for(;e.length>o;)Kt(r,n=e[o++])&&(~Tit(i,n)||wk(i,n));return i},Fv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hC=Object.keys||function(t){return yL(t,Fv)},_it=Wn?Object.defineProperties:function(t,e){ns(t);for(var n,r=No(e),o=hC(e),i=o.length,a=0;i>a;)vs.f(t,n=o[a++],r[n]);return t},Pit=Jp("document","documentElement"),Ek=gs("keys"),gy=function(t){return Ek[t]||(Ek[t]=Ov(t))},mL=gy("IE_PROTO"),u2=function(){},bL=function(t){return""},Dk=function(t){t.write(bL("")),t.close();var e=t.parentWindow.Object;return t=null,e},ig=function(){try{u0=new ActiveXObject("htmlfile")}catch{}var t,e;ig=typeof document<"u"?document.domain&&u0?Dk(u0):((e=sL("iframe")).style.display="none",Pit.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(bL("document.F=Object")),t.close(),t.F):Dk(u0);for(var n=Fv.length;n--;)delete ig.prototype[Fv[n]];return ig()};eh[mL]=!0;var Tv,gd,_v,rs=Object.create||function(t,e){var n;return t!==null?(u2.prototype=ns(t),n=new u2,u2.prototype=null,n[mL]=t):n=ig(),e===void 0?n:_it(n,e)},jit=Fv.concat("length","prototype"),wL={f:Object.getOwnPropertyNames||function(t){return yL(t,jit)}},Nit=Ft.Array,Iit=Math.max,Ck=wL.f,xk=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],EL={f:function(t){return xk&&Pu(t)=="Window"?function(e){try{return Ck(e)}catch{return function(r,o,i){for(var a=py(r),u=v6(void 0,a),s=v6(a,a),l=Nit(Iit(s-u,0)),c=0;uh;h++)if((u||h in g)&&(d=v(p=g[h],h,y),t))if(e)w[h]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return h;case 2:kk(w,p)}else switch(t){case 4:return!1;case 7:kk(w,p)}return i?-1:r||o?o:w}},vy=[Ti(0),Ti(1),Ti(2),Ti(3),Ti(4),Ti(5),Ti(6),Ti(7)][0],Mn=gy("hidden"),Bk=pr("toPrimitive"),Wit=bc.set,Fk=bc.getterFor("Symbol"),Kr=Object.prototype,Gi=Ft.Symbol,Ji=Gi&&Gi.prototype,Tk=Ft.TypeError,l2=Ft.QObject,vf=Jp("JSON","stringify"),DL=cC.f,qi=vs.f,CL=EL.f,Git=uC.f,xL=_e([].push),ui=gs("symbols"),nh=gs("op-symbols"),c2=gs("string-to-symbol-registry"),f2=gs("symbol-to-string-registry"),qit=gs("wks"),d2=!l2||!l2.prototype||!l2.prototype.findChild,m6=Wn&&lr(function(){return rs(qi({},"a",{get:function(){return qi(this,"a",{value:7}).a}})).a!=7})?function(t,e,n){var r=DL(Kr,e);r&&delete Kr[e],qi(t,e,n),r&&t!==Kr&&qi(Kr,e,r)}:qi,p2=function(t,e){var n=ui[t]=rs(Ji);return Wit(n,{type:"Symbol",tag:t,description:e}),Wn||(n.description=e),n},jv=function(t,e,n){t===Kr&&jv(nh,e,n),ns(t);var r=mc(e);return ns(n),Kt(ui,r)?(n.enumerable?(Kt(t,Mn)&&t[Mn][r]&&(t[Mn][r]=!1),n=rs(n,{enumerable:es(0,!1)})):(Kt(t,Mn)||qi(t,Mn,es(1,{})),t[Mn][r]=!0),m6(t,r,n)):qi(t,r,n)},_k=function(t,e){ns(t);var n=No(e),r=hC(n).concat(b6(n));return vy(r,function(o){Wn&&!qr(SL,n,o)||jv(t,o,n[o])}),t},SL=function(t){var e=mc(t),n=qr(Git,this,e);return!(this===Kr&&Kt(ui,e)&&!Kt(nh,e))&&(!(n||!Kt(this,e)||!Kt(ui,e)||Kt(this,Mn)&&this[Mn][e])||n)},Pk=function(t,e){var n=No(t),r=mc(e);if(n!==Kr||!Kt(ui,r)||Kt(nh,r)){var o=DL(n,r);return!o||!Kt(ui,r)||Kt(n,Mn)&&n[Mn][r]||(o.enumerable=!0),o}},jk=function(t){var e=CL(No(t)),n=[];return vy(e,function(r){Kt(ui,r)||Kt(eh,r)||xL(n,r)}),n},b6=function(t){var e=t===Kr,n=CL(e?nh:No(t)),r=[];return vy(n,function(o){!Kt(ui,o)||e&&!Kt(Kr,o)||xL(r,ui[o])}),r};if(ho||(Ji=(Gi=function(){if(aL(Ji,this))throw Tk("Symbol is not a constructor");var t=arguments.length&&arguments[0]!==void 0?Bv(arguments[0]):void 0,e=Ov(t),n=function(r){this===Kr&&qr(n,nh,r),Kt(this,Mn)&&Kt(this[Mn],e)&&(this[Mn][e]=!1),m6(this,e,es(1,r))};return Wn&&d2&&m6(Kr,e,{configurable:!0,set:n}),p2(e,t)}).prototype,Kl(Ji,"toString",function(){return Fk(this).tag}),Kl(Gi,"withoutSetter",function(t){return p2(Ov(t),t)}),uC.f=SL,vs.f=jv,cC.f=Pk,wL.f=EL.f=jk,s2.f=b6,gC.f=function(t){return p2(pr(t),t)},Wn&&qi(Ji,"description",{configurable:!0,get:function(){return Fk(this).description}})),Vi({global:!0,wrap:!0,forced:!ho,sham:!ho},{Symbol:Gi}),vy(hC(qit),function(t){Ne(t)}),Vi({target:"Symbol",stat:!0,forced:!ho},{for:function(t){var e=Bv(t);if(Kt(c2,e))return c2[e];var n=Gi(e);return c2[e]=n,f2[n]=e,n},keyFor:function(t){if(!bl(t))throw Tk(t+" is not a symbol");if(Kt(f2,t))return f2[t]},useSetter:function(){d2=!0},useSimple:function(){d2=!1}}),Vi({target:"Object",stat:!0,forced:!ho,sham:!Wn},{create:function(t,e){return e===void 0?rs(t):_k(rs(t),e)},defineProperty:jv,defineProperties:_k,getOwnPropertyDescriptor:Pk}),Vi({target:"Object",stat:!0,forced:!ho},{getOwnPropertyNames:jk,getOwnPropertySymbols:b6}),Vi({target:"Object",stat:!0,forced:lr(function(){s2.f(1)})},{getOwnPropertySymbols:function(t){return s2.f(Qp(t))}}),vf){var Kit=!ho||lr(function(){var t=Gi();return vf([t])!="[null]"||vf({a:t})!="{}"||vf(Object(t))!="{}"});Vi({target:"JSON",stat:!0,forced:Kit},{stringify:function(t,e,n){var r=Lit(arguments),o=e;if((xr(e)||t!==void 0)&&!bl(t))return kv(e)||(e=function(i,a){if(gn(o)&&(a=qr(o,this,i,a)),!bl(a))return a}),r[1]=e,rL(vf,null,r)}})}if(!Ji[Bk]){var Yit=Ji.valueOf;Kl(Ji,Bk,function(t){return qr(Yit,this)})}Pv(Gi,"Symbol"),eh[Mn]=!0,Ne("asyncIterator"),Ne("hasInstance"),Ne("isConcatSpreadable"),Ne("iterator"),Ne("match"),Ne("matchAll"),Ne("replace"),Ne("search"),Ne("species"),Ne("split"),Ne("toPrimitive"),Ne("toStringTag"),Ne("unscopables"),Pv(Ft.JSON,"JSON",!0);var Qi,Nk,Ik,Xit=br.Symbol,Nu={},AL=Function.prototype,Zit=Wn&&Object.getOwnPropertyDescriptor,h2=Kt(AL,"name"),Jit={EXISTS:h2,PROPER:h2&&function(){}.name==="something",CONFIGURABLE:h2&&(!Wn||Wn&&Zit(AL,"name").configurable)},Qit=!lr(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Lk=gy("IE_PROTO"),w6=Ft.Object,tat=w6.prototype,E6=Qit?w6.getPrototypeOf:function(t){var e=Qp(t);if(Kt(e,Lk))return e[Lk];var n=e.constructor;return gn(n)&&e instanceof n?n.prototype:e instanceof w6?tat:null},D6=pr("iterator"),OL=!1;[].keys&&("next"in(Ik=[].keys())?(Nk=E6(E6(Ik)))!==Object.prototype&&(Qi=Nk):OL=!0);var eat=Qi==null||lr(function(){var t={};return Qi[D6].call(t)!==t});Qi=eat?{}:rs(Qi),gn(Qi[D6])||Kl(Qi,D6,function(){return this});var kL={IteratorPrototype:Qi,BUGGY_SAFARI_ITERATORS:OL},nat=kL.IteratorPrototype,rat=function(){return this};Ft.String,Ft.TypeError,Object.setPrototypeOf||"__proto__"in{}&&function(){var t={};try{_e(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set)(t,[]),t instanceof Array}catch{}}();var oat=Jit.PROPER,s0=kL.BUGGY_SAFARI_ITERATORS,g2=pr("iterator"),iat=function(){return this},BL=function(t,e,n,r,o,i,a){(function(m,h,b,w){var D=h+" Iterator";m.prototype=rs(nat,{next:es(1,b)}),Pv(m,D,!1,!0),Nu[D]=rat})(n,e,r);var u,s,l,c=function(m){if(m===o&&g)return g;if(!s0&&m in d)return d[m];switch(m){case"keys":case"values":case"entries":return function(){return new n(this,m)}}return function(){return new n(this)}},f=e+" Iterator",p=!1,d=t.prototype,y=d[g2]||d["@@iterator"]||o&&d[o],g=!s0&&y||c(o),v=e=="Array"&&d.entries||y;if(v&&(u=E6(v.call(new t)))!==Object.prototype&&u.next&&(Pv(u,f,!0,!0),Nu[f]=iat),oat&&o=="values"&&y&&y.name!=="values"&&(p=!0,g=function(){return qr(y,this)}),o)if(s={values:c("values"),keys:i?g:c("keys"),entries:c("entries")},a)for(l in s)(s0||p||!(l in d))&&Kl(d,l,s[l]);else Vi({target:e,proto:!0,forced:s0||p},s);return a&&d[g2]!==g&&Kl(d,g2,g,{name:o}),Nu[e]=g,s},aat=bc.set,uat=bc.getterFor("Array Iterator");BL(Array,"Array",function(t,e){aat(this,{type:"Array Iterator",target:No(t),index:0,kind:e})},function(){var t=uat(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values"),Nu.Arguments=Nu.Array;var Rk=pr("toStringTag");for(var v2 in{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}){var Mk=Ft[v2],y2=Mk&&Mk.prototype;y2&&hy(y2)!==Rk&&vo(y2,Rk,v2),Nu[v2]=Nu.Array}var sat=Xit;Ne("asyncDispose"),Ne("dispose"),Ne("matcher"),Ne("metadata"),Ne("observable"),Ne("patternMatch"),Ne("replaceAll");var l0=sat,lat=_e("".charAt),zk=_e("".charCodeAt),cat=_e("".slice),fat=function(t){return function(e,n){var r,o,i=Bv(sC(e)),a=fC(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=zk(i,a))<55296||r>56319||a+1===u||(o=zk(i,a+1))<56320||o>57343?t?lat(i,a):r:t?cat(i,a,a+2):o-56320+(r-55296<<10)+65536}},dat=fat(!0),pat=bc.set,hat=bc.getterFor("String Iterator");BL(String,"String",function(t){pat(this,{type:"String Iterator",string:Bv(t),index:0})},function(){var t,e=hat(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=dat(n,r),e.index+=t.length,{value:t,done:!1})});var gat=gC.f("iterator"),vat=iy(function(t){function e(n){return typeof l0=="function"&&typeof gat=="symbol"?(t.exports=e=function(r){return typeof r},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(r){return r&&typeof l0=="function"&&r.constructor===l0&&r!==l0.prototype?"symbol":typeof r},t.exports.default=t.exports,t.exports.__esModule=!0),e(n)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0}),FL=function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}(vat),yat=sy.EXISTS,mat=hc.f,TL=Function.prototype,bat=yt(TL.toString),_L=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,wat=yt(_L.exec);eo&&!yat&&mat(TL,"name",{configurable:!0,get:function(){try{return wat(_L,bat(this))[1]}catch{return""}}});var PL=function(){function t(){this.tag="select",this.width=80}return t.prototype.isActive=function(e){return!1},t.prototype.getValue=function(e){var n=this.mark,r=E.marks(e);return r&&r[n]?r[n]:""},t.prototype.isDisabled=function(e){return e.selection==null||(this.mark,!!Yt(E.nodes(e,{match:function(n){return A.getNodeType(n)==="pre"||!!E.isVoid(e,n)},universal:!0}),1)[0])},t.prototype.exec=function(e,n){var r=this.mark;n?e.addMark(r,n):e.removeMark(r)},t}(),Eat=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("fontSize.title"),n.iconSvg=Knt,n.mark="fontSize",n}return be(e,t),e.prototype.getOptions=function(n){var r=[],o=n.getMenuConfig(this.mark).fontSizeList,i=o===void 0?[]:o;r.push({text:tt("fontSize.default"),value:""}),i.forEach(function(u){if(typeof u=="string")r.push({text:u,value:u});else if(FL(u)==="object"){var s=u.name,l=u.value;r.push({text:s,value:l})}});var a=this.getValue(n);return r.forEach(function(u){u.value===a?u.selected=!0:delete u.selected}),r},e}(PL),Dat=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("fontFamily.title"),n.iconSvg=Ynt,n.mark="fontFamily",n.selectPanelWidth=150,n}return be(e,t),e.prototype.getOptions=function(n){var r=[],o=n.getMenuConfig(this.mark).fontFamilyList,i=o===void 0?[]:o;r.push({text:tt("fontFamily.default"),value:""}),i.forEach(function(u){if(typeof u=="string")r.push({text:u,value:u,styleForRenderMenuList:{"font-family":u}});else if(FL(u)==="object"){var s=u.name,l=u.value;r.push({text:s,value:l,styleForRenderMenuList:{"font-family":l}})}});var a=this.getValue(n);return r.forEach(function(u){u.value===a?u.selected=!0:delete u.selected}),r},e}(PL),Cat={renderStyle:function(t,e){var n=t,r=n.fontSize,o=n.fontFamily,i=e;return r&&ts(i,{fontSize:r}),o&&ts(i,{fontFamily:o}),i},styleToHtml:function(t,e){if(!ot.isText(t))return e;var n,r=t,o=r.fontSize,i=r.fontFamily;return o||i?((nC(e)||yc(n=B(e))!=="span")&&(n=B(""+e+"")),o&&n.css("font-size",o),i&&n.css("font-family",i),vc(n)):e},preParseHtml:[Tot],parseStyleHtml:function(t,e,n){var r=B(t);if(!ot.isText(e))return e;var o=e,i=n.getMenuConfig("fontSize").fontSizeList,a=i===void 0?[]:i,u=Jr(r,"font-size"),s=a.find(function(d){return d.value&&d.value===u})||a.includes(u);u&&s&&(o.fontSize=u);var l=n.getMenuConfig("fontFamily").fontFamilyList,c=l===void 0?[]:l,f=Jr(r,"font-family").replace(/"/g,""),p=c.find(function(d){return d.value&&d.value===f})||c.includes(f);return f&&p&&(o.fontFamily=f),o},menus:[{key:"fontSize",factory:function(){return new Eat},config:{fontSizeList:["12px",{name:"13px",value:"13px"},"14px","15px","16px","19px",{name:"22px",value:"22px"},"24px","29px","32px","40px","48px"]}},{key:"fontFamily",factory:function(){return new Dat},config:{fontFamilyList:["黑体",{name:"仿宋",value:"仿宋"},"楷体","标楷体","华文仿宋","华文楷体",{name:"宋体",value:"宋体"},"微软雅黑","Arial","Tahoma","Verdana","Times New Roman","Courier New"]}}]},xat={selector:"p,h1,h2,h3,h4,h5",preParseHtml:function(t){var e=B(t),n=Jr(e,"padding-left");return/\dem/.test(n)&&e.css("text-indent","2em"),/\dpx/.test(n)&&parseInt(n,10)%32==0&&e.css("text-indent","2em"),e[0]}},jL=function(){function t(){this.tag="button"}return t.prototype.getValue=function(e){var n=Yt(E.nodes(e,{match:function(o){return!!o.indent},universal:!0}),1),r=n[0];return r==null?"":Yt(r,1)[0].indent||""},t.prototype.isActive=function(e){return!1},t.prototype.getMatchNode=function(e){var n=Yt(E.nodes(e,{match:function(r){var o=A.getNodeType(r);return o==="paragraph"||!!o.startsWith("header")},universal:!0,mode:"highest"}),1)[0];return n==null?null:n[0]},t}(),Sat=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("indent.decrease"),n.iconSvg=Xnt,n}return be(e,t),e.prototype.isDisabled=function(n){var r=this.getMatchNode(n);return r==null||!r.indent},e.prototype.exec=function(n,r){N.setNodes(n,{indent:null},{match:function(o){return ct.isElement(o)}})},e}(jL),Aat=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("indent.increase"),n.iconSvg=Znt,n}return be(e,t),e.prototype.isDisabled=function(n){var r=this.getMatchNode(n);return r==null||!!r.indent},e.prototype.exec=function(n,r){N.setNodes(n,{indent:"2em"},{match:function(o){return ct.isElement(o)},mode:"highest"})},e}(jL),Oat={renderStyle:function(t,e){if(!ct.isElement(t))return e;var n=t.indent,r=e;return n&&ts(r,{textIndent:n}),r},styleToHtml:function(t,e){if(!ct.isElement(t))return e;var n=t.indent;if(!n)return e;var r=B(e);return r.css("text-indent",n),vc(r)},preParseHtml:[xat],parseStyleHtml:function(t,e,n){var r=B(t);if(!ct.isElement(e))return e;var o=e,i=Jr(r,"text-indent"),a=parseInt(i,10);return i&&a>0&&(o.indent=i),o},menus:[{key:"indent",factory:function(){return new Aat}},{key:"delIndent",factory:function(){return new Sat}}]},yy=function(){function t(){this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.getMatchNode=function(e){var n=Yt(E.nodes(e,{match:function(r){var o=A.getNodeType(r);return o==="paragraph"||o==="blockquote"||!!o.startsWith("header")},universal:!0,mode:"highest"}),1)[0];return n==null?null:n[0]},t.prototype.isDisabled=function(e){return e.selection==null||!!A.getSelectedElems(e).some(function(n){if(E.isVoid(e,n)&&E.isBlock(e,n))return!0;var r=n.type;return!!["pre","code"].includes(r)||void 0})},t}(),kat=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("justify.left"),n.iconSvg=Jnt,n}return be(e,t),e.prototype.exec=function(n,r){N.setNodes(n,{textAlign:"left"},{match:function(o){return ct.isElement(o)&&!n.isInline(o)}})},e}(yy),Bat=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("justify.right"),n.iconSvg=Qnt,n}return be(e,t),e.prototype.exec=function(n,r){N.setNodes(n,{textAlign:"right"},{match:function(o){return ct.isElement(o)&&!n.isInline(o)}})},e}(yy),Fat=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("justify.center"),n.iconSvg=trt,n}return be(e,t),e.prototype.exec=function(n,r){N.setNodes(n,{textAlign:"center"},{match:function(o){return ct.isElement(o)&&!n.isInline(o)}})},e}(yy),Tat=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("justify.justify"),n.iconSvg=ert,n}return be(e,t),e.prototype.exec=function(n,r){N.setNodes(n,{textAlign:"justify"},{match:function(o){return ct.isElement(o)&&!n.isInline(o)}})},e}(yy),_at={renderStyle:function(t,e){if(!ct.isElement(t))return e;var n=t.textAlign,r=e;return n&&ts(r,{textAlign:n}),r},styleToHtml:function(t,e){if(!ct.isElement(t))return e;var n=t.textAlign;if(!n)return e;var r=B(e);return r.css("text-align",n),vc(r)},parseStyleHtml:function(t,e,n){var r=B(t);if(!ct.isElement(e))return e;var o=e,i=Jr(r,"text-align");return i&&(o.textAlign=i),o},menus:[{key:"justifyLeft",factory:function(){return new kat}},{key:"justifyRight",factory:function(){return new Bat}},{key:"justifyCenter",factory:function(){return new Fat}},{key:"justifyJustify",factory:function(){return new Tat}}]},Pat=function(){function t(){this.title=tt("lineHeight.title"),this.iconSvg='',this.tag="select",this.width=80}return t.prototype.getOptions=function(e){var n=[],r=e.getMenuConfig("lineHeight").lineHeightList,o=r===void 0?[]:r;n.push({text:tt("lineHeight.default"),value:""}),o.forEach(function(a){n.push({text:a,value:a})});var i=this.getValue(e);return n.forEach(function(a){a.value===i?a.selected=!0:delete a.selected}),n},t.prototype.getMatchNode=function(e){var n=Yt(E.nodes(e,{match:function(r){var o=A.getNodeType(r);return!!o.startsWith("header")||!!["paragraph","blockquote","list-item"].includes(o)},universal:!0,mode:"highest"}),1)[0];return n==null?null:n[0]},t.prototype.isActive=function(e){return!1},t.prototype.getValue=function(e){var n=this.getMatchNode(e);return n==null?"":ct.isElement(n)&&n.lineHeight||""},t.prototype.isDisabled=function(e){return e.selection==null||this.getMatchNode(e)==null},t.prototype.exec=function(e,n){N.setNodes(e,{lineHeight:n.toString()},{mode:"highest"})},t}(),jat={renderStyle:function(t,e){if(!ct.isElement(t))return e;var n=t.lineHeight,r=e;return n&&ts(r,{lineHeight:n}),r},styleToHtml:function(t,e){if(!ct.isElement(t))return e;var n=t.lineHeight;if(!n)return e;var r=B(e);return r.css("line-height",n),vc(r)},parseStyleHtml:function(t,e,n){var r=B(t);if(!ct.isElement(e))return e;var o=e,i=n.getMenuConfig("lineHeight").lineHeightList,a=i===void 0?[]:i,u=Jr(r,"line-height");return u&&a.includes(u)&&(o.lineHeight=u),o},menus:[{key:"lineHeight",factory:function(){return new Pat},config:{lineHeightList:["1","1.15","1.5","2","2.5","3"]}}]},Nat=function(){function t(){this.title=tt("undo.redo"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){return e.selection==null},t.prototype.exec=function(e,n){typeof e.redo=="function"&&e.redo()},t}(),Iat=function(){function t(){this.title=tt("undo.undo"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){return e.selection==null},t.prototype.exec=function(e,n){typeof e.undo=="function"&&e.undo()},t}(),Lat={menus:[{key:"redo",factory:function(){return new Nat}},{key:"undo",factory:function(){return new Iat}}]},Rat={type:"divider",renderElem:function(t,e,n){return zl("div",{props:{contentEditable:!1,className:"w-e-textarea-divider"},dataset:{selected:A.isNodeSelected(n,t)?"true":""},style:{},on:{mousedown:function(r){return r.preventDefault()}}},[zl("hr")])}},Mat=function(){function t(){this.title=tt("divider.title"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){return e.selection==null||!!A.getSelectedElems(e).some(function(n){if(e.isVoid(n))return!0;var r=A.getNodeType(n);return r==="table"||r==="pre"||void 0})},t.prototype.exec=function(e,n){N.insertNodes(e,{type:"divider",children:[{text:""}]},{mode:"highest"})},t}(),zat={renderElems:[Rat],elemsToHtml:[{type:"divider",elemToHtml:function(t,e){return"
        "}}],parseElemsHtml:[{selector:"hr:not([data-w-e-type])",parseElemHtml:function(t,e,n){return{type:"divider",children:[{text:""}]}}}],menus:[{key:"divider",factory:function(){return new Mat}}],editorPlugin:function(t){var e=t.isVoid,n=t.normalizeNode,r=t;return r.isVoid=function(o){return o.type==="divider"||e(o)},r.normalizeNode=function(o){var i=Yt(o,2),a=i[0],u=i[1];if(A.getNodeType(a)!=="divider")return n([a,u]);A.isLastNode(r,a)&&N.insertNodes(r,A.genEmptyParagraph(),{at:[u[0]+1]})},r}},$at=cy.map;tn({target:"Array",proto:!0,forced:!ZD("map")},{map:function(t){return $at(this,t,arguments.length>1?arguments[1]:void 0)}});var Hat=yt([].join),Vat=ay!=Object,Uat=RI("join",",");tn({target:"Array",proto:!0,forced:Vat||!Uat},{join:function(t){return Hat(pc(this),t===void 0?",":t)}});var Wat=function(){function t(){this.title=tt("codeBlock.title"),this.iconSvg='',this.tag="button"}return t.prototype.getSelectCodeElem=function(e){var n=A.getSelectedNodeByType(e,"code");if(n==null)return null;var r=A.getParentNode(e,n);return r==null||A.getNodeType(r)!=="pre"?null:n},t.prototype.getValue=function(e){var n=this.getSelectCodeElem(e);return n==null?"":n.language||""},t.prototype.isActive=function(e){return!!this.getSelectCodeElem(e)},t.prototype.isDisabled=function(e){if(e.selection==null)return!0;var n=A.getSelectedElems(e);return!!n.some(function(r){return e.isVoid(r)})||!n.some(function(r){var o=A.getNodeType(r);if(o==="pre"||o==="paragraph")return!0})},t.prototype.exec=function(e,n){this.isActive(e)?this.changeToPlainText(e):this.changeToCodeBlock(e,n.toString())},t.prototype.changeToPlainText=function(e){var n=this.getSelectCodeElem(e);if(n!=null){var r=Q.string(n);N.removeNodes(e,{mode:"highest"});var o=r.split(` `).map(function(i){return{type:"paragraph",children:[{text:i}]}});N.insertNodes(e,o,{mode:"highest"})}},t.prototype.changeToCodeBlock=function(e,n){var r,o,i=[],a=E.nodes(e,{match:function(f){return e.children.includes(f)},universal:!0});try{for(var u=LI(a),s=u.next();!s.done;s=u.next()){var l=Yt(s.value,1)[0];l&&i.push(Q.string(l))}}catch(f){r={error:f}}finally{try{s&&!s.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}N.removeNodes(e,{mode:"highest"});var c={type:"pre",children:[{type:"code",language:n,children:[{text:i.join(` `)}]}]};N.insertNodes(e,c,{mode:"highest"})},t}(),Gat={key:"codeBlock",factory:function(){return new Wat}};tn({target:"String",proto:!0,forced:td("anchor")},{anchor:function(t){return Qf(this,"a","name",t)}}),tC("match",function(t,e,n){return[function(r){var o=jr(this),i=r==null?void 0:uy(r,t);return i?Te(i,r,o):new RegExp(r)[t](Ee(o))},function(r){var o=rr(this),i=Ee(r),a=n(e,o,i);if(a.done)return a.value;if(!o.global)return np(o,i);var u=o.unicode;o.lastIndex=0;for(var s,l=[],c=0;(s=np(o,i))!==null;){var f=Ee(s[0]);l[c]=f,f===""&&(o.lastIndex=eC(i,Kp(o.lastIndex),u)),c++}return c===0?null:l}]});var qat={type:"pre",renderElem:function(t,e,n){return bt("pre",null,e)}},Kat={type:"code",renderElem:function(t,e,n){return bt("code",null,e)}},Yat={selector:"pre:not([data-w-e-type])",parseElemHtml:function(t,e,n){var r=B(t);return(e=e.filter(function(o){return A.getNodeType(o)==="code"})).length===0&&(e=[{type:"code",language:"",children:[{text:r[0].textContent||""}]}]),{type:"pre",children:e.filter(function(o){return A.getNodeType(o)==="code"})}}},Xat={menus:[Gat],editorPlugin:function(t){var e=t.insertBreak,n=t.normalizeNode,r=t.insertData;t.insertNode;var o=t;return o.insertBreak=function(){var i=A.getSelectedNodeByType(o,"code");if(i!=null){var a=function(l,c){var f=c.selection;if(f==null)return"";var p=Q.string(l),d=f.anchor.offset,y=p.slice(0,d).split(` `),g=y.length;return g===0?"":y[g-1]}(i,o);if(a){var u=a.match(/^\s+/);if(u!=null&&u[0]!=null){var s=u[0];return void o.insertText(` `+s)}}o.insertText(` `)}else e()},o.normalizeNode=function(i){var a=Yt(i,2),u=a[0],s=a[1],l=A.getNodeType(u);return l==="code"&&s.length<=1&&N.setNodes(o,{type:"paragraph"},{at:s}),l==="pre"&&(A.isLastNode(o,u)&&N.insertNodes(o,A.genEmptyParagraph(),{at:[s[0]+1]}),A.getNodeType(u.children[0])!=="code"&&(N.unwrapNodes(o),N.setNodes(o,{type:"paragraph"},{mode:"highest"}))),n([u,s])},o.insertData=function(i){if(A.getSelectedNodeByType(o,"code")!=null){var a=i.getData("text/plain");E.insertText(o,a)}else r(i)},o},renderElems:[qat,Kat],elemsToHtml:[{type:"code",elemToHtml:function(t,e){return""+e+""}},{type:"pre",elemToHtml:function(t,e){return"
        "+e+"
        "}}],preParseHtml:[{selector:"pre>code",preParseHtml:function(t){var e=B(t);if(yc(e)!=="code")return t;var n=e.find("xmp");if(n.length===0)return t;var r=n.text();return n.remove(),e.text(r),e[0]}}],parseElemsHtml:[{selector:"pre:not([data-w-e-type])>code",parseElemHtml:function(t,e,n){return{type:"code",language:"",children:[{text:B(t)[0].textContent||""}]}}},Yat]},Zat=function(){function t(){this.title=tt("fullScreen.title"),this.iconSvg='',this.tag="button",this.alwaysEnable=!0}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return e.isFullScreen},t.prototype.isDisabled=function(e){return!1},t.prototype.exec=function(e,n){e.isFullScreen?e.unFullScreen():e.fullScreen()},t}(),Jat={menus:[{key:"fullScreen",factory:function(){return new Zat}}]},Qat=function(){function t(){this.title=tt("common.enter"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){var n=e.selection;return n==null||!!L.isExpanded(n)},t.prototype.exec=function(e,n){var r=e.selection;if(r!=null){var o=[r.anchor.path[0]];N.insertNodes(e,{type:"paragraph",children:[{text:""}]},{at:o}),e.select(E.start(e,o))}},t}(),tut=[drt,Urt,Cat,Oat,_at,jat,hot,zat,Bot,eot,Xat,Oot,Mrt,Nnt,mot,Lat,Jat,{menus:[{key:"enter",factory:function(){return new Qat}}]}];qn("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),qn("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var $k=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vC(t){var e={exports:{}};return t(e,e.exports),e.exports}var _i,ag,c0=function(t){return t&&t.Math==Math&&t},wt=c0(typeof globalThis=="object"&&globalThis)||c0(typeof window=="object"&&window)||c0(typeof self=="object"&&self)||c0(typeof $k=="object"&&$k)||function(){return this}()||Function("return this")(),NL=Function.prototype,C6=NL.bind,x6=NL.call,eut=C6&&C6.bind(x6),jt=C6?function(t){return t&&eut(x6,t)}:function(t){return t&&function(){return x6.apply(t,arguments)}},Oe=function(t){try{return!!t()}catch{return!0}},nut=jt({}.toString),rut=jt("".slice),ni=function(t){return rut(nut(t),8,-1)},m2=wt.Object,out=jt("".split),IL=Oe(function(){return!m2("z").propertyIsEnumerable(0)})?function(t){return ni(t)=="String"?out(t,""):m2(t)}:m2,iut=wt.TypeError,my=function(t){if(t==null)throw iut("Can't call method on "+t);return t},wc=function(t){return IL(my(t))},aut=Object.defineProperty,yC=function(t,e){try{aut(wt,t,{value:e,configurable:!0,writable:!0})}catch{wt[t]=e}return e},ca=wt["__core-js_shared__"]||yC("__core-js_shared__",{}),mC=vC(function(t){(t.exports=function(e,n){return ca[e]||(ca[e]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),uut=wt.Object,rh=function(t){return uut(my(t))},sut=jt({}.hasOwnProperty),nn=Object.hasOwn||function(t,e){return sut(rh(t),e)},lut=0,cut=Math.random(),fut=jt(1 .toString),bC=function(t){return"Symbol("+(t===void 0?"":t)+")_"+fut(++lut+cut,36)},ke=function(t){return typeof t=="function"},dut=function(t){return ke(t)?t:void 0},oh=function(t,e){return arguments.length<2?dut(wt[t]):wt[t]&&wt[t][e]},b2=oh("navigator","userAgent")||"",Hk=wt.process,Vk=wt.Deno,Uk=Hk&&Hk.versions||Vk&&Vk.version,Wk=Uk&&Uk.v8;Wk&&(ag=(_i=Wk.split("."))[0]>0&&_i[0]<4?1:+(_i[0]+_i[1])),!ag&&b2&&(!(_i=b2.match(/Edge\/(\d+)/))||_i[1]>=74)&&(_i=b2.match(/Chrome\/(\d+)/))&&(ag=+_i[1]);var f0,S6=ag,A6=!!Object.getOwnPropertySymbols&&!Oe(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&S6&&S6<41}),wC=A6&&!Symbol.sham&&typeof Symbol.iterator=="symbol",yf=mC("wks"),Iu=wt.Symbol,Gk=Iu&&Iu.for,put=wC?Iu:Iu&&Iu.withoutSetter||bC,yn=function(t){if(!nn(yf,t)||!A6&&typeof yf[t]!="string"){var e="Symbol."+t;A6&&nn(Iu,t)?yf[t]=Iu[t]:yf[t]=wC&&Gk?Gk(e):put(e)}return yf[t]},Ae=function(t){return typeof t=="object"?t!==null:ke(t)},hut=wt.String,gut=wt.TypeError,Kn=function(t){if(Ae(t))return t;throw gut(hut(t)+" is not an object")},Oa=!Oe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),O6=wt.document,vut=Ae(O6)&&Ae(O6.createElement),EC=function(t){return vut?O6.createElement(t):{}},LL=!Oa&&!Oe(function(){return Object.defineProperty(EC("div"),"a",{get:function(){return 7}}).a!=7}),mf=Function.prototype.call,en=mf.bind?mf.bind(mf):function(){return mf.apply(mf,arguments)},Nv=jt({}.isPrototypeOf),yut=wt.Object,w2=wC?function(t){return typeof t=="symbol"}:function(t){var e=oh("Symbol");return ke(e)&&Nv(e.prototype,yut(t))},mut=wt.String,k6=function(t){try{return mut(t)}catch{return"Object"}},but=wt.TypeError,DC=function(t){if(ke(t))return t;throw but(k6(t)+" is not a function")},rp=function(t,e){var n=t[e];return n==null?void 0:DC(n)},wut=wt.TypeError,Eut=wt.TypeError,Dut=yn("toPrimitive"),CC=function(t){var e=function(n,r){if(!Ae(n)||w2(n))return n;var o,i=rp(n,Dut);if(i){if(r===void 0&&(r="default"),o=en(i,n,r),!Ae(o)||w2(o))return o;throw Eut("Can't convert object to primitive value")}return r===void 0&&(r="number"),function(a,u){var s,l;if(u==="string"&&ke(s=a.toString)&&!Ae(l=en(s,a))||ke(s=a.valueOf)&&!Ae(l=en(s,a))||u!=="string"&&ke(s=a.toString)&&!Ae(l=en(s,a)))return l;throw wut("Can't convert object to primitive value")}(n,r)}(t,"string");return w2(e)?e:e+""},Cut=wt.TypeError,qk=Object.defineProperty,ys={f:Oa?qk:function(t,e,n){if(Kn(t),e=CC(e),Kn(n),LL)try{return qk(t,e,n)}catch{}if("get"in n||"set"in n)throw Cut("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},xut=Math.ceil,Sut=Math.floor,ih=function(t){var e=+t;return e!=e||e===0?0:(e>0?Sut:xut)(e)},Aut=Math.max,Out=Math.min,B6=function(t,e){var n=ih(t);return n<0?Aut(n+e,0):Out(n,e)},kut=Math.min,RL=function(t){return t>0?kut(ih(t),9007199254740991):0},Ec=function(t){return RL(t.length)},Kk=function(t){return function(e,n,r){var o,i=wc(e),a=Ec(i),u=B6(r,a);if(t&&n!=n){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===n)return t||u||0;return!t&&-1}},ML={includes:Kk(!0),indexOf:Kk(!1)},by={},But=ML.indexOf,Yk=jt([].push),zL=function(t,e){var n,r=wc(t),o=0,i=[];for(n in r)!nn(by,n)&&nn(r,n)&&Yk(i,n);for(;e.length>o;)nn(r,n=e[o++])&&(~But(i,n)||Yk(i,n));return i},Iv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Fut=Object.keys||function(t){return zL(t,Iv)},Tut=Oa?Object.defineProperties:function(t,e){Kn(t);for(var n,r=wc(e),o=Fut(e),i=o.length,a=0;i>a;)ys.f(t,n=o[a++],r[n]);return t},_ut=oh("document","documentElement"),Xk=mC("keys"),xC=function(t){return Xk[t]||(Xk[t]=bC(t))},$L=xC("IE_PROTO"),E2=function(){},HL=function(t){return""},Zk=function(t){t.write(HL("")),t.close();var e=t.parentWindow.Object;return t=null,e},ug=function(){try{f0=new ActiveXObject("htmlfile")}catch{}var t,e;ug=typeof document<"u"?document.domain&&f0?Zk(f0):((e=EC("iframe")).style.display="none",_ut.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(HL("document.F=Object")),t.close(),t.F):Zk(f0);for(var n=Iv.length;n--;)delete ug.prototype[Iv[n]];return ug()};by[$L]=!0;var SC=Object.create||function(t,e){var n;return t!==null?(E2.prototype=Kn(t),n=new E2,E2.prototype=null,n[$L]=t):n=ug(),e===void 0?n:Tut(n,e)},F6=yn("unscopables"),T6=Array.prototype;T6[F6]==null&&ys.f(T6,F6,{configurable:!0,value:SC(null)});var vd=function(t){T6[F6][t]=!0},Yl={},Put=jt(Function.toString);ke(ca.inspectSource)||(ca.inspectSource=function(t){return Put(t)});var Lv,yd,Rv,AC=ca.inspectSource,Jk=wt.WeakMap,VL=ke(Jk)&&/native code/.test(AC(Jk)),wy=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},fa=Oa?function(t,e,n){return ys.f(t,e,wy(1,n))}:function(t,e,n){return t[e]=n,t},_6=wt.TypeError,jut=wt.WeakMap;if(VL||ca.state){var tu=ca.state||(ca.state=new jut),Nut=jt(tu.get),Qk=jt(tu.has),Iut=jt(tu.set);Lv=function(t,e){if(Qk(tu,t))throw new _6("Object already initialized");return e.facade=t,Iut(tu,t,e),e},yd=function(t){return Nut(tu,t)||{}},Rv=function(t){return Qk(tu,t)}}else{var $s=xC("state");by[$s]=!0,Lv=function(t,e){if(nn(t,$s))throw new _6("Object already initialized");return e.facade=t,fa(t,$s,e),e},yd=function(t){return nn(t,$s)?t[$s]:{}},Rv=function(t){return nn(t,$s)}}var Lu,tB,eB,Bo={set:Lv,get:yd,has:Rv,enforce:function(t){return Rv(t)?yd(t):Lv(t,{})},getterFor:function(t){return function(e){var n;if(!Ae(e)||(n=yd(e)).type!==t)throw _6("Incompatible receiver, "+t+" required");return n}}},nB={}.propertyIsEnumerable,rB=Object.getOwnPropertyDescriptor,Lut={f:rB&&!nB.call({1:2},1)?function(t){var e=rB(this,t);return!!e&&e.enumerable}:nB},oB=Object.getOwnPropertyDescriptor,UL={f:Oa?oB:function(t,e){if(t=wc(t),e=CC(e),LL)try{return oB(t,e)}catch{}if(nn(t,e))return wy(!en(Lut.f,t,e),t[e])}},WL=Function.prototype,Rut=Oa&&Object.getOwnPropertyDescriptor,D2=nn(WL,"name"),OC={EXISTS:D2,PROPER:D2&&function(){}.name==="something",CONFIGURABLE:D2&&(!Oa||Oa&&Rut(WL,"name").configurable)},Co=vC(function(t){var e=OC.CONFIGURABLE,n=Bo.get,r=Bo.enforce,o=String(String).split("String");(t.exports=function(i,a,u,s){var l,c=!!s&&!!s.unsafe,f=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet,d=s&&s.name!==void 0?s.name:a;ke(u)&&(String(d).slice(0,7)==="Symbol("&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!nn(u,"name")||e&&u.name!==d)&&fa(u,"name",d),(l=r(u)).source||(l.source=o.join(typeof d=="string"?d:""))),i!==wt?(c?!p&&i[a]&&(f=!0):delete i[a],f?i[a]=u:fa(i,a,u)):f?i[a]=u:yC(a,u)})(Function.prototype,"toString",function(){return ke(this)&&n(this).source||AC(this)})}),Mut=Iv.concat("length","prototype"),Mv={f:Object.getOwnPropertyNames||function(t){return zL(t,Mut)}},zut={f:Object.getOwnPropertySymbols},$ut=jt([].concat),Hut=oh("Reflect","ownKeys")||function(t){var e=Mv.f(Kn(t)),n=zut.f;return n?$ut(e,n(t)):e},Vut=function(t,e){for(var n=Hut(e),r=ys.f,o=UL.f,i=0;i=e.length?(t.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values");Yl.Arguments=Yl.Array,vd("keys"),vd("values"),vd("entries");var KL={};KL[yn("toStringTag")]="z";var BC=String(KL)==="[object z]",lst=yn("toStringTag"),cst=wt.Object,fst=ni(function(){return arguments}())=="Arguments",Ey=BC?ni:function(t){var e,n,r;return t===void 0?"Undefined":t===null?"Null":typeof(n=function(o,i){try{return o[i]}catch{}}(e=cst(t),lst))=="string"?n:fst?ni(e):(r=ni(e))=="Object"&&ke(e.callee)?"Arguments":r},dst=BC?{}.toString:function(){return"[object "+Ey(this)+"]"};BC||Co(Object.prototype,"toString",dst,{unsafe:!0});var pst=wt.String,Ko=function(t){if(Ey(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return pst(t)},hst=jt("".charAt),sB=jt("".charCodeAt),gst=jt("".slice),lB=function(t){return function(e,n){var r,o,i=Ko(my(e)),a=ih(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=sB(i,a))<55296||r>56319||a+1===u||(o=sB(i,a+1))<56320||o>57343?t?hst(i,a):r:t?gst(i,a,a+2):o-56320+(r-55296<<10)+65536}},YL={codeAt:lB(!1),charAt:lB(!0)},vst=YL.charAt,yst=Bo.set,mst=Bo.getterFor("String Iterator");qL(String,"String",function(t){yst(this,{type:"String Iterator",string:Ko(t),index:0})},function(){var t,e=mst(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=vst(n,r),e.index+=t.length,{value:t,done:!1})});var L6=function(t,e,n){for(var r in e)Co(t,r,e[r],n);return t},bst=wt.Array,wst=Math.max,cB=Mv.f,fB=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Est={f:function(t){return fB&&ni(t)=="Window"?function(e){try{return cB(e)}catch{return function(r,o,i){for(var a,u,s,l,c=Ec(r),f=B6(void 0,c),p=B6(c,c),d=bst(wst(p-f,0)),y=0;fi;i++)if((u=m(t[i]))&&Nv(vB,u))return u;return new sg(!1)}r=function(h,b){var w=arguments.length<2?hB(h):b;if(DC(w))return Kn(en(w,h));throw Ast(k6(h)+" is not iterable")}(t,o)}for(s=r.next;!(l=en(s,r)).done;){try{u=m(l.value)}catch(h){gB(r,"throw",h)}if(typeof u=="object"&&u&&Nv(vB,u))return u}return new sg(!1)},kst=wt.TypeError,ZL=function(t,e){if(Nv(e,t))return t;throw kst("Incorrect invocation")},JL=yn("iterator"),QL=!1;try{var Bst=0,yB={next:function(){return{done:!!Bst++}},return:function(){QL=!0}};yB[JL]=function(){return this},Array.from(yB,function(){throw 2})}catch{}var R6=Array.isArray||function(t){return ni(t)=="Array"},tR=function(){},Fst=[],eR=oh("Reflect","construct"),_C=/^\s*(?:class|function)\b/,Tst=jt(_C.exec),_st=!_C.exec(tR),wf=function(t){if(!ke(t))return!1;try{return eR(tR,Fst,t),!0}catch{return!1}},Pst=!eR||Oe(function(){var t;return wf(wf.call)||!wf(Object)||!wf(function(){t=!0})||t})?function(t){if(!ke(t))return!1;switch(Ey(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return _st||!!Tst(_C,AC(t))}:wf,jst=yn("species"),mB=wt.Array,nR=function(t,e){return new(function(n){var r;return R6(n)&&(r=n.constructor,(Pst(r)&&(r===mB||R6(r.prototype))||Ae(r)&&(r=r[jst])===null)&&(r=void 0)),r===void 0?mB:r}(t))(e===0?0:e)},bB=jt([].push),Pi=function(t){var e=t==1,n=t==2,r=t==3,o=t==4,i=t==6,a=t==7,u=t==5||i;return function(s,l,c,f){for(var p,d,y=rh(s),g=IL(y),v=TC(l,c),m=Ec(g),h=0,b=f||nR,w=e?b(s,m):n||a?b(s,0):void 0;m>h;h++)if((u||h in g)&&(d=v(p=g[h],h,y),t))if(e)w[h]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return h;case 2:bB(w,p)}else switch(t){case 4:return!1;case 7:bB(w,p)}return i?-1:r||o?o:w}},PC={forEach:Pi(0),map:Pi(1),filter:Pi(2),some:Pi(3),every:Pi(4),find:Pi(5),findIndex:Pi(6),filterReject:Pi(7)},h0=FC.getWeakData,Nst=Bo.set,Ist=Bo.getterFor,Lst=PC.find,Rst=PC.findIndex,Mst=jt([].splice),zst=0,g0=function(t){return t.frozen||(t.frozen=new rR)},rR=function(){this.entries=[]},C2=function(t,e){return Lst(t.entries,function(n){return n[0]===e})};rR.prototype={get:function(t){var e=C2(this,t);if(e)return e[1]},has:function(t){return!!C2(this,t)},set:function(t,e){var n=C2(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Rst(this.entries,function(n){return n[0]===t});return~e&&Mst(this.entries,e,1),!!~e}};var Ef,oR={getConstructor:function(t,e,n,r){var o=t(function(s,l){ZL(s,i),Nst(s,{type:e,id:zst++,frozen:void 0}),l!=null&&XL(l,s[r],{that:s,AS_ENTRIES:n})}),i=o.prototype,a=Ist(e),u=function(s,l,c){var f=a(s),p=h0(Kn(l),!0);return p===!0?g0(f).set(l,c):p[f.id]=c,s};return L6(i,{delete:function(s){var l=a(this);if(!Ae(s))return!1;var c=h0(s);return c===!0?g0(l).delete(s):c&&nn(c,l.id)&&delete c[l.id]},has:function(s){var l=a(this);if(!Ae(s))return!1;var c=h0(s);return c===!0?g0(l).has(s):c&&nn(c,l.id)}}),L6(i,n?{get:function(s){var l=a(this);if(Ae(s)){var c=h0(s);return c===!0?g0(l).get(s):c?c[l.id]:void 0}},set:function(s,l){return u(this,s,l)}}:{add:function(s){return u(this,s,!0)}}),o}},v0=Bo.enforce,$st=!wt.ActiveXObject&&"ActiveXObject"in wt,iR=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Hst=function(t,e,n){var r=t.indexOf("Map")!==-1,o=t.indexOf("Weak")!==-1,i=r?"set":"add",a=wt[t],u=a&&a.prototype,s=a,l={},c=function(v){var m=jt(u[v]);Co(u,v,v=="add"?function(h){return m(this,h===0?0:h),this}:v=="delete"?function(h){return!(o&&!Ae(h))&&m(this,h===0?0:h)}:v=="get"?function(h){return o&&!Ae(h)?void 0:m(this,h===0?0:h)}:v=="has"?function(h){return!(o&&!Ae(h))&&m(this,h===0?0:h)}:function(h,b){return m(this,h===0?0:h,b),this})};if(P6(t,!ke(a)||!(o||u.forEach&&!Oe(function(){new a().entries().next()}))))s=n.getConstructor(e,t,r,i),FC.enable();else if(P6(t,!0)){var f=new s,p=f[i](o?{}:-0,1)!=f,d=Oe(function(){f.has(1)}),y=function(v,m){if(!QL)return!1;var h=!1;try{var b={};b[JL]=function(){return{next:function(){return{done:h=!0}}}},function(w){new a(w)}(b)}catch{}return h}(),g=!o&&Oe(function(){for(var v=new a,m=5;m--;)v[i](m,m);return!v.has(-0)});y||((s=e(function(v,m){ZL(v,u);var h=function(b,w,D){var x,C;return $v&&ke(x=w.constructor)&&x!==D&&Ae(C=x.prototype)&&C!==D.prototype&&$v(b,C),b}(new a,v,s);return m!=null&&XL(m,h[i],{that:h,AS_ENTRIES:r}),h})).prototype=u,u.constructor=s),(d||g)&&(c("delete"),c("has"),r&&c("get")),(g||p)&&c(i),o&&u.clear&&delete u.clear}return l[t]=s,ka({global:!0,forced:s!=a},l),I6(s,t),o||n.setStrong(s,t,r),s}("WeakMap",iR,oR);if(VL&&$st){Ef=oR.getConstructor(iR,"WeakMap",!0),FC.enable();var Df=Hst.prototype,wB=jt(Df.delete),y0=jt(Df.has),EB=jt(Df.get),DB=jt(Df.set);L6(Df,{delete:function(t){if(Ae(t)&&!mu(t)){var e=v0(this);return e.frozen||(e.frozen=new Ef),wB(this,t)||e.frozen.delete(t)}return wB(this,t)},has:function(t){if(Ae(t)&&!mu(t)){var e=v0(this);return e.frozen||(e.frozen=new Ef),y0(this,t)||e.frozen.has(t)}return y0(this,t)},get:function(t){if(Ae(t)&&!mu(t)){var e=v0(this);return e.frozen||(e.frozen=new Ef),y0(this,t)?EB(this,t):e.frozen.get(t)}return EB(this,t)},set:function(t,e){if(Ae(t)&&!mu(t)){var n=v0(this);n.frozen||(n.frozen=new Ef),y0(this,t)?DB(this,t,e):n.frozen.set(t,e)}else DB(this,t,e);return this}})}var aR={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},x2=EC("span").classList,CB=x2&&x2.constructor&&x2.constructor.prototype,Vst=CB===Object.prototype?void 0:CB,S2=yn("iterator"),xB=yn("toStringTag"),A2=ed.values,uR=function(t,e){if(t){if(t[S2]!==A2)try{fa(t,S2,A2)}catch{t[S2]=A2}if(t[xB]||fa(t,xB,e),aR[e]){for(var n in ed)if(t[n]!==ed[n])try{fa(t,n,ed[n])}catch{t[n]=ed[n]}}}};for(var O2 in aR)uR(wt[O2]&&wt[O2].prototype,O2);uR(Vst,"DOMTokenList");var M6=new WeakMap,Ust={type:"list-item",renderElem:function(t,e,n){M6.set(t,n);var r=t,o=r.level,i=o===void 0?0:o,a=r.ordered,u={margin:"5px 0 5px "+20*i+"px"},s="";if(a!==void 0&&a){var l=function(f,p){var d=p,y=d.type,g=d.level,v=g===void 0?0:g,m=d.ordered,h=m!==void 0&&m;if(!h)return-1;var b=1,w=p,D=A.findPath(f,w);if(D[0]===0)return 1;for(;D[0]>0;){var x=j.previous(D),C=E.node(f,x);if(C==null)break;var O=C[0],T=O.level,R=T===void 0?0:T,H=O.type,M=O.ordered;if(H!==y||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 md(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function AB(t){return E.nodes(t,{at:t.selection||void 0,match:function(e){return A.findPath(t,e).length===1}})}var Wst=ML.includes;ka({target:"Array",proto:!0},{includes:function(t){return Wst(this,t,arguments.length>1?arguments[1]:void 0)}}),vd("includes");var OB,k2,Gst=function(){var t=Kn(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},jC=wt.RegExp,$6=Oe(function(){var t=jC("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),qst=$6||Oe(function(){return!jC("a","y").sticky}),Kst={BROKEN_CARET:$6||Oe(function(){var t=jC("^r","gy");return t.lastIndex=2,t.exec("str")!=null}),MISSED_STICKY:qst,UNSUPPORTED_Y:$6},Yst=wt.RegExp,Xst=Oe(function(){var t=Yst(".","s");return!(t.dotAll&&t.exec(` `)&&t.flags==="s")}),Zst=wt.RegExp,Jst=Oe(function(){var t=Zst("(?b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$c")!=="bc"}),Qst=Bo.get,tlt=mC("native-string-replace",String.prototype.replace),Hv=RegExp.prototype.exec,H6=Hv,elt=jt("".charAt),nlt=jt("".indexOf),rlt=jt("".replace),B2=jt("".slice),F2=(k2=/b*/g,en(Hv,OB=/a/,"a"),en(Hv,k2,"a"),OB.lastIndex!==0||k2.lastIndex!==0),kB=Kst.BROKEN_CARET,T2=/()??/.exec("")[1]!==void 0;(F2||T2||kB||Xst||Jst)&&(H6=function(t){var e,n,r,o,i,a,u,s=this,l=Qst(s),c=Ko(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=en(H6,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=kB&&s.sticky,y=en(Gst,s),g=s.source,v=0,m=c;if(d&&(y=rlt(y,"y",""),nlt(y,"g")===-1&&(y+="g"),m=B2(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&elt(c,s.lastIndex-1)!==` `)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),T2&&(n=new RegExp("^"+g+"$(?!\\s)",y)),F2&&(r=s.lastIndex),o=en(Hv,d?n:s,m),d?o?(o.input=B2(o.input,v),o[0]=B2(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:F2&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),T2&&o&&o.length>1&&en(tlt,o[0],n,function(){for(i=1;iv?0:T===v?C===y?0:1:0}(t);if(a>0)for(var u=0;u",BB.push(i);var s=function(l){var c=M6.get(l);if(c==null)return 0;var f=l,p=f.type,d=f.ordered,y=d!==void 0&&d,g=f.level,v=g===void 0?0:g,m=A.findPath(c,l);if(m[0]===c.children.length-1)return v+1;var h=j.next(m),b=E.node(c,h);if(!b)return 0;var w=md(b,1)[0];if(A.getNodeType(w)!==p)return v+1;var D=w,x=D.ordered,C=x!==void 0&&x,O=D.level,T=O===void 0?0:O;return Tv?0:T===v?C===y?0:1:0}(t);if(s>0)for(u=0;u";return{html:"
      • "+e+"
      • ",prefix:n,suffix:r}}},flt=yn("species"),dlt=PC.filter,plt=S6>=51||!Oe(function(){var t=[];return(t.constructor={})[flt]=function(){return{foo:1}},t.filter(Boolean).foo!==1});ka({target:"Array",proto:!0,forced:!plt},{filter:function(t){return dlt(this,t,arguments.length>1?arguments[1]:void 0)}});var NC=Function.prototype,FB=NC.apply,hlt=NC.bind,TB=NC.call,glt=typeof Reflect=="object"&&Reflect.apply||(hlt?TB.bind(FB):function(){return TB.apply(FB,arguments)}),_B=(yn("species"),RegExp.prototype),vlt=YL.charAt,ylt=function(t,e,n){return e+(n?vlt(t,e).length:1)},mlt=Math.floor,_2=jt("".charAt),blt=jt("".replace),P2=jt("".slice),wlt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Elt=/\$([$&'`]|\d{1,2})/g,Dlt=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=Elt;return o!==void 0&&(o=rh(o),s=wlt),blt(i,s,function(l,c){var f;switch(_2(c,0)){case"$":return"$";case"&":return t;case"`":return P2(e,0,n);case"'":return P2(e,a);case"<":f=o[P2(c,1,-1)];break;default:var p=+c;if(p===0)return l;if(p>u){var d=mlt(p/10);return d===0?l:d<=u?r[d-1]===void 0?_2(c,1):r[d-1]+_2(c,1):l}f=r[p-1]}return f===void 0?"":f})},Clt=wt.TypeError,xlt=function(t,e){var n=t.exec;if(ke(n)){var r=en(n,t,e);return r!==null&&Kn(r),r}if(ni(t)==="RegExp")return en(Vv,t,e);throw Clt("RegExp#exec called on incompatible receiver")},V6=yn("replace"),Slt=Math.max,Alt=Math.min,Olt=jt([].concat),j2=jt([].push),PB=jt("".indexOf),jB=jt("".slice),klt="a".replace(/./,"$0")==="$0",NB=!!/./[V6]&&/./[V6]("a","$0")==="";(function(t,e,n,r){var o=yn(t),i=!Oe(function(){var l={};return l[o]=function(){return 7},""[t](l)!=7}),a=i&&!Oe(function(){var l=!1,c=/a/;return c.exec=function(){return l=!0,null},c[o](""),!l});if(!i||!a||n){var u=jt(/./[o]),s=function(l,c,f){var p=NB?"$":"$0";return[function(d,y){var g=my(this),v=d==null?void 0:rp(d,V6);return v?en(v,d,g,y):en(c,Ko(g),d,y)},function(d,y){var g=Kn(this),v=Ko(d);if(typeof y=="string"&&PB(y,p)===-1&&PB(y,"$<")===-1){var m=f(c,g,v,y);if(m.done)return m.value}var h=ke(y);h||(y=Ko(y));var b=g.global;if(b){var w=g.unicode;g.lastIndex=0}for(var D=[];;){var x=xlt(g,v);if(x===null||(j2(D,x),!b))break;Ko(x[0])===""&&(g.lastIndex=ylt(v,RL(g.lastIndex),w))}for(var C,O="",T=0,R=0;R=T&&(O+=jB(v,T,M)+nt,T=M+H.length)}return O+jB(v,T)}]}(0,""[t],function(l,c,f,p,d){var y=jt(l),g=c.exec;return g===Vv||g===_B.exec?i&&!d?{done:!0,value:u(c,f,p)}:{done:!0,value:y(f,c,p)}:{done:!1}});Co(String.prototype,t,s[0]),Co(_B,o,s[1])}})("replace",0,!!Oe(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$
        ")!=="7"})||!klt||NB);var Blt=wt.TypeError,cR=function(t,e,n,r,o,i,a,u){for(var s,l,c=o,f=0,p=!!a&&TC(a,u);f0&&R6(s))l=Ec(s),c=cR(t,e,s,l,c,i-1)-1;else{if(c>=9007199254740991)throw Blt("Exceed the acceptable array length");t[c]=s}c++}f++}return c},Flt=cR;function N2(t){return t.length?t[0].tagName.toLowerCase():""}ka({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=rh(this),n=Ec(e),r=nR(e,0);return r.length=Flt(r,e,e,n,0,t===void 0?1:ih(t)),r}}),vd("flat"),ka({global:!0},{globalThis:wt}),Tr&&(B.fn.append=Tr),Fr&&(B.fn.attr=Fr),Nl&&(B.fn.parent=Nl);var Tlt={renderElems:[Ust],editorPlugin:function(t){var e=t.deleteBackward,n=t.handleTab,r=t.normalizeNode,o=t;return o.deleteBackward=function(i){var a=o.selection;if(a!=null)if(L.isExpanded(a))e(i);else{var u=A.getSelectedNodeByType(o,"list-item");if(u!=null)if(a.focus.offset!==0)e(i);else{var s=u.level,l=s===void 0?0:s;l>0?N.setNodes(o,{level:l-1}):N.setNodes(o,{type:"paragraph",ordered:void 0,level:void 0})}else e(i)}else e(i)},o.handleTab=function(){var i,a,u,s,l=o.selection;if(l!=null){if(L.isCollapsed(l)){var c=A.getSelectedNodeByType(o,"list-item");if(c==null)return void n();if(l.focus.offset===0){var f=c.level,p=f===void 0?0:f;return void N.setNodes(o,{level:p+1})}}if(L.isExpanded(l)){var d=0,y=!1;try{for(var g=SB(AB(o)),v=g.next();!v.done;v=g.next()){var m=md(v.value,1)[0];A.getNodeType(m)==="list-item"?d++:y=!0}}catch(C){i={error:C}}finally{try{v&&!v.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}if(y||d<=1)return void n();try{for(var h=SB(AB(o)),b=h.next();!b.done;b=h.next()){var w=md(b.value,2),D=(m=w[0],w[1]),x=m.level;p=x===void 0?0:x,N.setNodes(o,{level:p+1},{at:D})}}catch(C){u={error:C}}finally{try{b&&!b.done&&(s=h.return)&&s.call(h)}finally{if(u)throw u.error}}}else n()}else n()},o.normalizeNode=function(i){var a=md(i,2),u=a[0],s=a[1],l=A.getNodeType(u);return l!=="bulleted-list"&&l!=="numbered-list"||N.unwrapNodes(o,{at:s}),r([u,s])},o},menus:[slt,llt],elemsToHtml:[clt],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(t,e,n){return e.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(t,e,n){var r=B(t);(e=e.filter(function(a){return!!ot.isText(a)||!!n.isInline(a)})).length===0&&(e=[{text:r.text().replace(/\s+/gm," ")}]);var o=function(a){return N2(a.parent())==="ol"}(r),i=function(a){for(var u=0,s=a.parent(),l=N2(s);l==="ul"||l==="ol";)l=N2(s=s.parent()),u++;return u-1}(r);return{type:"list-item",ordered:o,level:i,children:e}}}]},fR=as(function(t,e){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Array]",a="[object Boolean]",u="[object Date]",s="[object Error]",l="[object Function]",c="[object Map]",f="[object Number]",p="[object Object]",d="[object Promise]",y="[object RegExp]",g="[object Set]",v="[object String]",m="[object Symbol]",h="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",D=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[o]=C[i]=C[b]=C[a]=C[w]=C[u]=C[s]=C[l]=C[c]=C[f]=C[p]=C[y]=C[g]=C[v]=C[h]=!1;var O=typeof se=="object"&&se&&se.Object===Object&&se,T=typeof self=="object"&&self&&self.Object===Object&&self,R=O||T||Function("return this")(),H=e&&!e.nodeType&&e,M=H&&t&&!t.nodeType&&t,K=M&&M.exports===H,U=K&&O.process,W=function(){try{return U&&U.binding&&U.binding("util")}catch{}}(),q=W&&W.isTypedArray;function nt(_,I){for(var Z=-1,ht=_==null?0:_.length;++Zz))return!1;var ut=Pt.get(_);if(ut&&Pt.get(I))return ut==I;var Mt=-1,pe=!0,ne=2&Z?new rn:void 0;for(Pt.set(_,I),Pt.set(I,_);++Mt-1},En.prototype.set=function(_,I){var Z=this.__data__,ht=di(Z,_);return ht<0?(++this.size,Z.push([_,I])):Z[ht][1]=I,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new wn,map:new(ye||En),string:new wn}},Fn.prototype.delete=function(_){var I=Mr(this,_).delete(_);return this.size-=I?1:0,I},Fn.prototype.get=function(_){return Mr(this,_).get(_)},Fn.prototype.has=function(_){return Mr(this,_).has(_)},Fn.prototype.set=function(_,I){var Z=Mr(this,_),ht=Z.size;return Z.set(_,I),this.size+=Z.size==ht?0:1,this},rn.prototype.add=rn.prototype.push=function(_){return this.__data__.set(_,n),this},rn.prototype.has=function(_){return this.__data__.has(_)},hr.prototype.clear=function(){this.__data__=new En,this.size=0},hr.prototype.delete=function(_){var I=this.__data__,Z=I.delete(_);return this.size=I.size,Z},hr.prototype.get=function(_){return this.__data__.get(_)},hr.prototype.has=function(_){return this.__data__.has(_)},hr.prototype.set=function(_,I){var Z=this.__data__;if(Z instanceof En){var ht=Z.__data__;if(!ye||ht.length<199)return ht.push([_,I]),this.size=++Z.size,this;Z=this.__data__=new Fn(ht)}return Z.set(_,I),this.size=Z.size,this};var bh=Ot?function(_){return _==null?[]:(_=Object(_),function(I,Z){for(var ht=-1,ee=I==null?0:I.length,Pt=0,F=[];++ht-1&&_%1==0&&_-1&&_%1==0&&_<=r}function Eh(_){var I=typeof _;return _!=null&&(I=="object"||I=="function")}function hi(_){return _!=null&&typeof _=="object"}var so=q?function(_){return function(I){return _(I)}}(q):function(_){return hi(_)&&uo(_.length)&&!!C[Lo(_)]};function Dh(_){return(I=_)!=null&&uo(I.length)&&!Sc(I)?Cc(_):Rr(_);var I}t.exports=function(_,I){return Va(_,I)}});qn("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"}}),qn("zh-CN",{tableModule:{deleteCol:"删除列",deleteRow:"删除行",deleteTable:"删除表格",widthAuto:"宽度自适应",insertCol:"插入列",insertRow:"插入行",insertTable:"插入表格",header:"表头"}});var IB=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dR(t){var e={exports:{}};return t(e,e.exports),e.exports}var ji,lg,m0=function(t){return t&&t.Math==Math&&t},_t=m0(typeof globalThis=="object"&&globalThis)||m0(typeof window=="object"&&window)||m0(typeof self=="object"&&self)||m0(typeof IB=="object"&&IB)||function(){return this}()||Function("return this")(),Ye=function(t){try{return!!t()}catch{return!0}},Ba=!Ye(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Cf=Function.prototype.call,We=Cf.bind?Cf.bind(Cf):function(){return Cf.apply(Cf,arguments)},LB={}.propertyIsEnumerable,RB=Object.getOwnPropertyDescriptor,_lt={f:RB&&!LB.call({1:2},1)?function(t){var e=RB(this,t);return!!e&&e.enumerable}:LB},IC=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},pR=Function.prototype,U6=pR.bind,W6=pR.call,Plt=U6&&U6.bind(W6),Rt=U6?function(t){return t&&Plt(W6,t)}:function(t){return t&&function(){return W6.apply(t,arguments)}},jlt=Rt({}.toString),Nlt=Rt("".slice),da=function(t){return Nlt(jlt(t),8,-1)},I2=_t.Object,Ilt=Rt("".split),hR=Ye(function(){return!I2("z").propertyIsEnumerable(0)})?function(t){return da(t)=="String"?Ilt(t,""):I2(t)}:I2,Llt=_t.TypeError,Fa=function(t){if(t==null)throw Llt("Can't call method on "+t);return t},uh=function(t){return hR(Fa(t))},vn=function(t){return typeof t=="function"},Sr=function(t){return typeof t=="object"?t!==null:vn(t)},Rlt=function(t){return vn(t)?t:void 0},sh=function(t,e){return arguments.length<2?Rlt(_t[t]):_t[t]&&_t[t][e]},gR=Rt({}.isPrototypeOf),L2=sh("navigator","userAgent")||"",MB=_t.process,zB=_t.Deno,$B=MB&&MB.versions||zB&&zB.version,HB=$B&&$B.v8;HB&&(lg=(ji=HB.split("."))[0]>0&&ji[0]<4?1:+(ji[0]+ji[1])),!lg&&L2&&(!(ji=L2.match(/Edge\/(\d+)/))||ji[1]>=74)&&(ji=L2.match(/Chrome\/(\d+)/))&&(lg=+ji[1]);var G6=lg,q6=!!Object.getOwnPropertySymbols&&!Ye(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&G6&&G6<41}),LC=q6&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Mlt=_t.Object,R2=LC?function(t){return typeof t=="symbol"}:function(t){var e=sh("Symbol");return vn(e)&&gR(e.prototype,Mlt(t))},zlt=_t.String,vR=function(t){try{return zlt(t)}catch{return"Object"}},$lt=_t.TypeError,yR=function(t){if(vn(t))return t;throw $lt(vR(t)+" is not a function")},RC=function(t,e){var n=t[e];return n==null?void 0:yR(n)},Hlt=_t.TypeError,Vlt=Object.defineProperty,MC=function(t,e){try{Vlt(_t,t,{value:e,configurable:!0,writable:!0})}catch{_t[t]=e}return e},pa=_t["__core-js_shared__"]||MC("__core-js_shared__",{}),zC=dR(function(t){(t.exports=function(e,n){return pa[e]||(pa[e]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Ult=_t.Object,$C=function(t){return Ult(Fa(t))},Wlt=Rt({}.hasOwnProperty),Or=Object.hasOwn||function(t,e){return Wlt($C(t),e)},Glt=0,qlt=Math.random(),Klt=Rt(1 .toString),mR=function(t){return"Symbol("+(t===void 0?"":t)+")_"+Klt(++Glt+qlt,36)},xf=zC("wks"),Ru=_t.Symbol,VB=Ru&&Ru.for,Ylt=LC?Ru:Ru&&Ru.withoutSetter||mR,Nr=function(t){if(!Or(xf,t)||!q6&&typeof xf[t]!="string"){var e="Symbol."+t;q6&&Or(Ru,t)?xf[t]=Ru[t]:xf[t]=LC&&VB?VB(e):Ylt(e)}return xf[t]},Xlt=_t.TypeError,Zlt=Nr("toPrimitive"),HC=function(t){var e=function(n,r){if(!Sr(n)||R2(n))return n;var o,i=RC(n,Zlt);if(i){if(r===void 0&&(r="default"),o=We(i,n,r),!Sr(o)||R2(o))return o;throw Xlt("Can't convert object to primitive value")}return r===void 0&&(r="number"),function(a,u){var s,l;if(u==="string"&&vn(s=a.toString)&&!Sr(l=We(s,a))||vn(s=a.valueOf)&&!Sr(l=We(s,a))||u!=="string"&&vn(s=a.toString)&&!Sr(l=We(s,a)))return l;throw Hlt("Can't convert object to primitive value")}(n,r)}(t,"string");return R2(e)?e:e+""},K6=_t.document,Jlt=Sr(K6)&&Sr(K6.createElement),VC=function(t){return Jlt?K6.createElement(t):{}},bR=!Ba&&!Ye(function(){return Object.defineProperty(VC("div"),"a",{get:function(){return 7}}).a!=7}),UB=Object.getOwnPropertyDescriptor,wR={f:Ba?UB:function(t,e){if(t=uh(t),e=HC(e),bR)try{return UB(t,e)}catch{}if(Or(t,e))return IC(!We(_lt.f,t,e),t[e])}},Qlt=_t.String,tct=_t.TypeError,kr=function(t){if(Sr(t))return t;throw tct(Qlt(t)+" is not an object")},ect=_t.TypeError,WB=Object.defineProperty,lh={f:Ba?WB:function(t,e,n){if(kr(t),e=HC(e),kr(n),bR)try{return WB(t,e,n)}catch{}if("get"in n||"set"in n)throw ect("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Xl=Ba?function(t,e,n){return lh.f(t,e,IC(1,n))}:function(t,e,n){return t[e]=n,t},nct=Rt(Function.toString);vn(pa.inspectSource)||(pa.inspectSource=function(t){return nct(t)});var Uv,bd,Wv,UC=pa.inspectSource,GB=_t.WeakMap,rct=vn(GB)&&/native code/.test(UC(GB)),qB=zC("keys"),ER=function(t){return qB[t]||(qB[t]=mR(t))},WC={},Y6=_t.TypeError,oct=_t.WeakMap;if(rct||pa.state){var eu=pa.state||(pa.state=new oct),ict=Rt(eu.get),KB=Rt(eu.has),act=Rt(eu.set);Uv=function(t,e){if(KB(eu,t))throw new Y6("Object already initialized");return e.facade=t,act(eu,t,e),e},bd=function(t){return ict(eu,t)||{}},Wv=function(t){return KB(eu,t)}}else{var Hs=ER("state");WC[Hs]=!0,Uv=function(t,e){if(Or(t,Hs))throw new Y6("Object already initialized");return e.facade=t,Xl(t,Hs,e),e},bd=function(t){return Or(t,Hs)?t[Hs]:{}},Wv=function(t){return Or(t,Hs)}}var X6={set:Uv,get:bd,has:Wv,enforce:function(t){return Wv(t)?bd(t):Uv(t,{})},getterFor:function(t){return function(e){var n;if(!Sr(e)||(n=bd(e)).type!==t)throw Y6("Incompatible receiver, "+t+" required");return n}}},DR=Function.prototype,uct=Ba&&Object.getOwnPropertyDescriptor,M2=Or(DR,"name"),GC={EXISTS:M2,PROPER:M2&&function(){}.name==="something",CONFIGURABLE:M2&&(!Ba||Ba&&uct(DR,"name").configurable)},op=dR(function(t){var e=GC.CONFIGURABLE,n=X6.get,r=X6.enforce,o=String(String).split("String");(t.exports=function(i,a,u,s){var l,c=!!s&&!!s.unsafe,f=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet,d=s&&s.name!==void 0?s.name:a;vn(u)&&(String(d).slice(0,7)==="Symbol("&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Or(u,"name")||e&&u.name!==d)&&Xl(u,"name",d),(l=r(u)).source||(l.source=o.join(typeof d=="string"?d:""))),i!==_t?(c?!p&&i[a]&&(f=!0):delete i[a],f?i[a]=u:Xl(i,a,u)):f?i[a]=u:MC(a,u)})(Function.prototype,"toString",function(){return vn(this)&&n(this).source||UC(this)})}),sct=Math.ceil,lct=Math.floor,Dy=function(t){var e=+t;return e!=e||e===0?0:(e>0?lct:sct)(e)},cct=Math.max,fct=Math.min,ip=function(t,e){var n=Dy(t);return n<0?cct(n+e,0):fct(n,e)},dct=Math.min,qC=function(t){return t>0?dct(Dy(t),9007199254740991):0},Cy=function(t){return qC(t.length)},pct=function(t){return function(e,n,r){var o,i=uh(e),a=Cy(i),u=ip(r,a);if(t&&n!=n){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===n)return t||u||0;return!t&&-1}},hct=pct(!1),YB=Rt([].push),CR=function(t,e){var n,r=uh(t),o=0,i=[];for(n in r)!Or(WC,n)&&Or(r,n)&&YB(i,n);for(;e.length>o;)Or(r,n=e[o++])&&(~hct(i,n)||YB(i,n));return i},Gv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],gct=Gv.concat("length","prototype"),vct={f:Object.getOwnPropertyNames||function(t){return CR(t,gct)}},yct={f:Object.getOwnPropertySymbols},mct=Rt([].concat),bct=sh("Reflect","ownKeys")||function(t){var e=vct.f(kr(t)),n=yct.f;return n?mct(e,n(t)):e},wct=function(t,e){for(var n=bct(e),r=lh.f,o=wR.f,i=0;i3})},{anchor:function(t){return e=t,n=An(Fa(this)),r=""+n+"";var e,n,r}});var b0,SR=function(){var t=kr(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},XC=_t.RegExp,Z6=Ye(function(){var t=XC("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),jct=Z6||Ye(function(){return!XC("a","y").sticky}),AR={BROKEN_CARET:Z6||Ye(function(){var t=XC("^r","gy");return t.lastIndex=2,t.exec("str")!=null}),MISSED_STICKY:jct,UNSUPPORTED_Y:Z6},Nct=Object.keys||function(t){return CR(t,Gv)},Ict=Ba?Object.defineProperties:function(t,e){kr(t);for(var n,r=uh(e),o=Nct(e),i=o.length,a=0;i>a;)lh.f(t,n=o[a++],r[n]);return t},Lct=sh("document","documentElement"),OR=ER("IE_PROTO"),z2=function(){},kR=function(t){return""},XB=function(t){t.write(kR("")),t.close();var e=t.parentWindow.Object;return t=null,e},cg=function(){try{b0=new ActiveXObject("htmlfile")}catch{}var t,e;cg=typeof document<"u"?document.domain&&b0?XB(b0):((e=VC("iframe")).style.display="none",Lct.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(kR("document.F=Object")),t.close(),t.F):XB(b0);for(var n=Gv.length;n--;)delete cg.prototype[Gv[n]];return cg()};WC[OR]=!0;var ZB,$2,BR=Object.create||function(t,e){var n;return t!==null?(z2.prototype=kr(t),n=new z2,z2.prototype=null,n[OR]=t):n=cg(),e===void 0?n:Ict(n,e)},Rct=_t.RegExp,Mct=Ye(function(){var t=Rct(".","s");return!(t.dotAll&&t.exec(` `)&&t.flags==="s")}),zct=_t.RegExp,$ct=Ye(function(){var t=zct("(?b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$c")!=="bc"}),Hct=X6.get,Vct=zC("native-string-replace",String.prototype.replace),qv=RegExp.prototype.exec,J6=qv,Uct=Rt("".charAt),Wct=Rt("".indexOf),Gct=Rt("".replace),H2=Rt("".slice),V2=($2=/b*/g,We(qv,ZB=/a/,"a"),We(qv,$2,"a"),ZB.lastIndex!==0||$2.lastIndex!==0),JB=AR.BROKEN_CARET,U2=/()??/.exec("")[1]!==void 0;(V2||U2||JB||Mct||$ct)&&(J6=function(t){var e,n,r,o,i,a,u,s=this,l=Hct(s),c=An(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=We(J6,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=JB&&s.sticky,y=We(SR,s),g=s.source,v=0,m=c;if(d&&(y=Gct(y,"y",""),Wct(y,"g")===-1&&(y+="g"),m=H2(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Uct(c,s.lastIndex-1)!==` `)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),U2&&(n=new RegExp("^"+g+"$(?!\\s)",y)),V2&&(r=s.lastIndex),o=We(qv,d?n:s,m),d?o?(o.input=H2(o.input,v),o[0]=H2(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:V2&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),U2&&o&&o.length>1&&We(Vct,o[0],n,function(){for(i=1;i=51||!Ye(function(){var e=[];return(e.constructor={})[Xct]=function(){return{foo:1}},e[t](Boolean).foo!==1})},Zct=Rt([].slice),Jct=QC("slice"),Qct=Nr("species"),W2=_t.Array,tft=Math.max;function no(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function QB(t){var e=t.selection;if(e==null)return!1;var n=no(E.nodes(t,{match:function(i){return A.checkNodeType(i,"table-cell")}}),1)[0];if(n){var r=no(n,2)[1],o=E.start(t,r);if(Bt.equals(e.anchor,o))return!0}return!1}function tF(t,e){var n,r,o=E.nodes(t,{at:e,match:function(s){return A.getNodeType(s)==="table"}}),i=!1;try{for(var a=function(s){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&s[l],f=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&f>=s.length&&(s=void 0),{value:s&&s[f++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")}(o),u=a.next();!u.done;u=a.next())u.value,i=!0}catch(s){n={error:s}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}Ta({target:"Array",proto:!0,forced:!Jct},{slice:function(t,e){var n,r,o,i=uh(this),a=Cy(i),u=ip(t,a),s=ip(e===void 0?a:e,a);if(Kv(i)&&(n=i.constructor,(JC(n)&&(n===W2||Kv(n.prototype))||Sr(n)&&(n=n[Qct])===null)&&(n=void 0),n===W2||n===void 0))return Zct(i,u,s);for(r=new(n===void 0?W2:n)(tft(s-u,0)),o=0;uh;h++)if((u||h in g)&&(d=v(p=g[h],h,y),t))if(e)w[h]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return h;case 2:rF(w,p)}else switch(t){case 4:return!1;case 7:rF(w,p)}return i?-1:r||o?o:w}},xy={forEach:Ni(0),map:Ni(1),filter:Ni(2),some:Ni(3),every:Ni(4),find:Ni(5),findIndex:Ni(6),filterReject:Ni(7)},rft=xy.map;Ta({target:"Array",proto:!0,forced:!QC("map")},{map:function(t){return rft(this,t,arguments.length>1?arguments[1]:void 0)}});var oft=KC?{}.toString:function(){return"[object "+YC(this)+"]"};function Sy(t){var e=t.children||[];return e.length===0?[]:(e[0]||{}).children||[]}function PR(t){return Sy(t).every(function(e){return!!e.isHeader})}KC||op(Object.prototype,"toString",oft,{unsafe:!0});var ift=GC.PROPER,Q6=RegExp.prototype,jR=Q6.toString,aft=Rt(SR),uft=Ye(function(){return jR.call({source:"a",flags:"b"})!="/a/b"}),sft=ift&&jR.name!="toString";(uft||sft)&&op(RegExp.prototype,"toString",function(){var t=kr(this),e=An(t.source),n=t.flags;return"/"+e+"/"+An(n===void 0&&gR(Q6,t)&&!("flags"in Q6)?aft(t):n)},{unsafe:!0});var t3=Nr("unscopables"),e3=Array.prototype;e3[t3]==null&&lh.f(e3,t3,{configurable:!0,value:BR(null)});var lft=xy.find,oF=!0;"find"in[]&&Array(1).find(function(){oF=!1}),Ta({target:"Array",proto:!0,forced:oF},{find:function(t){return lft(this,t,arguments.length>1?arguments[1]:void 0)}}),e3[t3].find=!0;var t8=Function.prototype,iF=t8.apply,cft=t8.bind,aF=t8.call,NR=typeof Reflect=="object"&&Reflect.apply||(cft?aF.bind(iF):function(){return aF.apply(iF,arguments)}),fft=Nr("species"),G2=RegExp.prototype,IR=function(t,e,n,r){var o=Nr(t),i=!Ye(function(){var l={};return l[o]=function(){return 7},""[t](l)!=7}),a=i&&!Ye(function(){var l=!1,c=/a/;return t==="split"&&((c={}).constructor={},c.constructor[fft]=function(){return c},c.flags="",c[o]=/./[o]),c.exec=function(){return l=!0,null},c[o](""),!l});if(!i||!a||n){var u=Rt(/./[o]),s=e(o,""[t],function(l,c,f,p,d){var y=Rt(l),g=c.exec;return g===ap||g===G2.exec?i&&!d?{done:!0,value:u(c,f,p)}:{done:!0,value:y(f,c,p)}:{done:!1}});op(String.prototype,t,s[0]),op(G2,o,s[1])}r&&Xl(G2[o],"sham",!0)},dft=Nr("match"),pft=_t.TypeError,hft=Nr("species"),gft=Rt("".charAt),uF=Rt("".charCodeAt),vft=Rt("".slice),yft=function(t){return function(e,n){var r,o,i=An(Fa(e)),a=Dy(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=uF(i,a))<55296||r>56319||a+1===u||(o=uF(i,a+1))<56320||o>57343?t?gft(i,a):r:t?vft(i,a,a+2):o-56320+(r-55296<<10)+65536}},mft=yft(!0),LR=function(t,e,n){return e+(n?mft(t,e).length:1)},bft=_t.Array,wft=Math.max,sF=function(t,e,n){for(var r=Cy(t),o=ip(e,r),i=ip(n===void 0?r:n,r),a=bft(wft(i-o,0)),u=0;o1||"".split(/.?/).length?function(o,i){var a,u,s=An(Fa(this)),l=i===void 0?4294967295:i>>>0;if(l===0)return[];if(o===void 0)return[s];if(!Sr(a=o)||!((u=a[dft])!==void 0?u:da(a)=="RegExp"))return We(e,s,o,l);for(var c,f,p,d=[],y=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(o.sticky?"y":""),g=0,v=new RegExp(o.source,y+"g");(c=We(ap,v,s))&&!((f=v.lastIndex)>g&&(Us(d,Af(s,g,c.index)),c.length>1&&c.index=l));)v.lastIndex===c.index&&v.lastIndex++;return g===s.length?!p&&Cft(v,"")||Us(d,""):Us(d,Af(s,g)),d.length>l?sF(d,0,l):d}:"0".split(void 0,0).length?function(o,i){return o===void 0&&i===0?[]:We(e,this,o,i)}:e,[function(o,i){var a=Fa(this),u=o==null?void 0:RC(o,t);return u?We(u,o,a,i):We(r,An(a),o,i)},function(o,i){var a=kr(this),u=An(o),s=n(r,a,u,i,r!==e);if(s.done)return s.value;var l=function(w,D){var x,C=kr(w).constructor;return C===void 0||(x=kr(C)[hft])==null?D:function(O){if(JC(O))return O;throw pft(vR(O)+" is not a constructor")}(x)}(a,RegExp),c=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Vs?"g":"y"),p=new l(Vs?"^(?:"+a.source+")":a,f),d=i===void 0?4294967295:i>>>0;if(d===0)return[];if(u.length===0)return n3(p,u)===null?[u]:[];for(var y=0,g=0,v=[];g=0,v=Bt.compare(f,y)<=0&&Bt.compare(f,d)>=0;return!!(g&&v&&j.equals(c.path.slice(0,3),f.path.slice(0,3)))}(n,t),o=t.width,i=o===void 0?"auto":o,a=bt("div",{className:"table-container","data-selected":A.isNodeSelected(n,t),on:{mousedown:function(u){if(u.target.tagName==="DIV"&&u.preventDefault(),!n.isDisabled()){var s=A.findPath(n,t),l=E.start(n,s),c=n.selection;c!=null?c.anchor.path[0]!==s[0]&&n.select(l):n.select(l)}}}},bt("table",{width:i,contentEditable:r},bt("colgroup",null,Sy(t).map(function(u){var s=u.width;return bt("col",{width:s===void 0?"auto":s})})),bt("tbody",null,e)));return a}},Fft={type:"table-row",renderElem:function(t,e,n){return bt("tr",null,e)}},Tft={type:"table-cell",renderElem:function(t,e,n){var r=function(p,d){var y=A.getParentNode(p,d);if(y==null)return!1;var g=A.getParentNode(p,y);return g!=null&&Sy(g).some(function(v){return v===d})}(n,t),o=t,i=o.colSpan,a=i===void 0?1:i,u=o.rowSpan,s=u===void 0?1:u,l=o.isHeader,c=l!==void 0&&l;if(!r)return bt("td",{colSpan:a,rowSpan:s},e);var f=bt(c?"th":"td",{colSpan:a,rowSpan:s,style:{borderRightWidth:"3px"},on:{mousemove:Ku(function(p){var d=this.elm;if(d!=null){var y=d.getBoundingClientRect(),g=y.left,v=y.width,m=y.top,h=y.height,b=p.clientX,w=p.clientY;up||(b>g+v-5&&bm&&w1?arguments[1]:void 0)}});var jft=Math.floor,K2=Rt("".charAt),Nft=Rt("".replace),Y2=Rt("".slice),Ift=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Lft=/\$([$&'`]|\d{1,2})/g,Rft=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=Lft;return o!==void 0&&(o=$C(o),s=Ift),Nft(i,s,function(l,c){var f;switch(K2(c,0)){case"$":return"$";case"&":return t;case"`":return Y2(e,0,n);case"'":return Y2(e,a);case"<":f=o[Y2(c,1,-1)];break;default:var p=+c;if(p===0)return l;if(p>u){var d=jft(p/10);return d===0?l:d<=u?r[d-1]===void 0?K2(c,1):r[d-1]+K2(c,1):l}f=r[p-1]}return f===void 0?"":f})},o3=Nr("replace"),Mft=Math.max,zft=Math.min,$ft=Rt([].concat),X2=Rt([].push),cF=Rt("".indexOf),fF=Rt("".slice),Hft="a".replace(/./,"$0")==="$0",dF=!!/./[o3]&&/./[o3]("a","$0")==="";IR("replace",function(t,e,n){var r=dF?"$":"$0";return[function(o,i){var a=Fa(this),u=o==null?void 0:RC(o,o3);return u?We(u,o,a,i):We(e,An(a),o,i)},function(o,i){var a=kr(this),u=An(o);if(typeof i=="string"&&cF(i,r)===-1&&cF(i,"$<")===-1){var s=n(e,a,u,i);if(s.done)return s.value}var l=vn(i);l||(i=An(i));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=n3(a,u);if(d===null||(X2(p,d),!c))break;An(d[0])===""&&(a.lastIndex=LR(u,qC(a.lastIndex),f))}for(var y,g="",v=0,m=0;m=v&&(g+=fF(u,v,b)+O,v=b+h.length)}return g+fF(u,v)}]},!!Ye(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$")!=="7"})||!Hft||dF);var Vft={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:function(t,e,n){var r=B(t);(e=e.filter(function(u){return!!ot.isText(u)||!!n.isInline(u)})).length===0&&(e=[{text:r.text().replace(/\s+/gm," ")}]);var o=parseInt(r.attr("colSpan")||"1"),i=parseInt(r.attr("rowSpan")||"1"),a=r.attr("width")||"auto";return{type:"table-cell",isHeader:MR(r)==="th",colSpan:o,rowSpan:i,width:a,children:e}}},Uft={selector:"tr:not([data-w-e-type])",parseElemHtml:function(t,e,n){return{type:"table-row",children:e.filter(function(r){return A.getNodeType(r)==="table-cell"})}}},Wft={selector:"table:not([data-w-e-type])",parseElemHtml:function(t,e,n){var r=B(t),o="auto";return function(i,a){for(var u="",s=(i.attr("style")||"").split(";"),l=s.length,c=0;c',this.tag="button",this.showDropPanel=!0,this.$content=null}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.exec=function(e,n){},t.prototype.isDisabled=function(e){var n=e.selection;return n==null||!L.isCollapsed(n)||!!A.getSelectedElems(e).some(function(r){var o=A.getNodeType(r);return o==="pre"||o==="table"||o==="list-item"||!!e.isVoid(r)})},t.prototype.getPanelContentElem=function(e){var n=this;if(this.$content)return this.$content[0];for(var r=B('
        '),o=B("0 × 0"),i=B("
        "),a=0;a<10;a++){for(var u=B(""),s=0;s<10;s++){var l=B("");l.attr("data-x",s.toString()),l.attr("data-y",a.toString()),u.append(l),l.on("mouseenter",function(c){var f=c.target;if(f!=null){var p=B(f).dataset(),d=p.x,y=p.y;o[0].innerHTML=d+1+" × "+(y+1),i.children().each(function(g){B(g).children().each(function(v){var m=B(v),h=m.dataset(),b=h.x,w=h.y;b<=d&&w<=y?m.addClass("active"):m.removeClass("active")})})}}),l.on("click",function(c){c.preventDefault();var f=c.target;if(f!=null){var p=B(f).dataset(),d=p.x,y=p.y;n.insertTable(e,y+1,d+1)}})}i.append(u)}return r.append(i),r.append(o),this.$content=r,r[0]},t.prototype.insertTable=function(e,n,r){var o=parseInt(n,10),i=parseInt(r,10);if(o&&i&&!(o<=0||i<=0)){A.isSelectedEmptyParagraph(e)&&N.removeNodes(e,{mode:"highest"});var a=function(u,s){for(var l=[],c=0;c',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){return e.selection==null||A.getSelectedNodeByType(e,"table")==null},t.prototype.exec=function(e,n){this.isDisabled(e)||N.removeNodes(e,{mode:"highest"})},t}(),Kft=function(){function t(){this.title=tt("tableModule.insertRow"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){var n=e.selection;return n==null||!L.isCollapsed(n)||A.getSelectedNodeByType(e,"table")==null},t.prototype.exec=function(e,n){if(!this.isDisabled(e)){var r=no(E.nodes(e,{match:function(d){return A.checkNodeType(d,"table-cell")},universal:!0}),1),o=no(r[0],2),i=o[0],a=o[1],u=A.getParentNode(e,i),s=(u==null?void 0:u.children.length)||0;if(s!==0){for(var l={type:"table-row",children:[]},c=0;c',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){var n=e.selection;return n==null||!L.isCollapsed(n)||A.getSelectedNodeByType(e,"table-row")==null},t.prototype.exec=function(e,n){if(!this.isDisabled(e)){var r=no(E.nodes(e,{match:function(s){return A.checkNodeType(s,"table-row")},universal:!0}),1),o=no(r[0],2),i=o[0],a=o[1],u=A.getParentNode(e,i);((u==null?void 0:u.children.length)||0)<=1?N.removeNodes(e,{mode:"highest"}):N.removeNodes(e,{at:a})}},t}(),pF={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},Z2=VC("span").classList,hF=Z2&&Z2.constructor&&Z2.constructor.prototype,Xft=hF===Object.prototype?void 0:hF,Zft=xy.forEach,Jft=function(t,e){var n=[].forEach;return!!n&&Ye(function(){n.call(null,function(){throw 1},1)})}(),J2=Jft?[].forEach:function(t){return Zft(this,t,arguments.length>1?arguments[1]:void 0)},UR=function(t){if(t&&t.forEach!==J2)try{Xl(t,"forEach",J2)}catch{t.forEach=J2}};for(var Q2 in pF)pF[Q2]&&UR(_t[Q2]&&_t[Q2].prototype);UR(Xft);var Qft=function(){function t(){this.title=tt("tableModule.insertCol"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){var n=e.selection;return n==null||!L.isCollapsed(n)||A.getSelectedNodeByType(e,"table")==null},t.prototype.exec=function(e,n){if(!this.isDisabled(e)){var r=no(E.nodes(e,{match:function(l){return A.checkNodeType(l,"table-cell")},universal:!0}),1),o=no(r[0],2),i=o[0],a=o[1],u=A.getParentNode(e,i);if(u!=null){var s=A.getParentNode(e,u);s!=null&&(s.children||[]).forEach(function(l,c){ct.isElement(l)&&(l.children||[]).forEach(function(f){var p=A.findPath(e,f);if(p.length===a.length&&fR(p.slice(-1),a.slice(-1))){var d={type:"table-cell",children:[{text:""}]};c===0&&PR(s)&&(d.isHeader=!0),N.insertNodes(e,d,{at:p})}})})}}},t}(),tdt=function(){function t(){this.title=tt("tableModule.deleteCol"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){return!1},t.prototype.isDisabled=function(e){var n=e.selection;return n==null||!L.isCollapsed(n)||A.getSelectedNodeByType(e,"table-cell")==null},t.prototype.exec=function(e,n){if(!this.isDisabled(e)){var r=no(E.nodes(e,{match:function(c){return A.checkNodeType(c,"table-cell")},universal:!0}),1),o=no(r[0],2),i=o[0],a=o[1],u=A.getParentNode(e,i),s=(u==null?void 0:u.children.length)||0;if(!u||s<=1)N.removeNodes(e,{mode:"highest"});else{var l=A.getParentNode(e,u);l!=null&&(l.children||[]).forEach(function(c){ct.isElement(c)&&(c.children||[]).forEach(function(f){var p=A.findPath(e,f);p.length===a.length&&fR(p.slice(-1),a.slice(-1))&&N.removeNodes(e,{at:p})})})}}},t}(),edt=function(){function t(){this.title=tt("tableModule.header"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){var n=A.getSelectedNodeByType(e,"table");return n!=null&&PR(n)},t.prototype.isActive=function(e){return!!this.getValue(e)},t.prototype.isDisabled=function(e){var n=e.selection;return n==null||!L.isCollapsed(n)||A.getSelectedNodeByType(e,"table")==null},t.prototype.exec=function(e,n){if(!this.isDisabled(e)){var r=!n,o=A.getSelectedNodeByType(e,"table");o!=null&&Sy(o).forEach(function(i){return N.setNodes(e,{isHeader:r},{at:A.findPath(e,i)})})}},t}(),ndt=function(){function t(){this.title=tt("tableModule.widthAuto"),this.iconSvg='',this.tag="button"}return t.prototype.getValue=function(e){var n=A.getSelectedNodeByType(e,"table");return n!=null&&n.width==="100%"},t.prototype.isActive=function(e){return!!this.getValue(e)},t.prototype.isDisabled=function(e){var n=e.selection;return n==null||!L.isCollapsed(n)||A.getSelectedNodeByType(e,"table")==null},t.prototype.exec=function(e,n){if(!this.isDisabled(e)){var r={width:n?"auto":"100%"};N.setNodes(e,r,{mode:"highest"})}},t}(),rdt={renderElems:[Bft,Fft,Tft],elemsToHtml:[{type:"table",elemToHtml:function(t,e){var n=t.width;return''+e+"
        "}},{type:"table-row",elemToHtml:function(t,e){return""+e+""}},{type:"table-cell",elemToHtml:function(t,e){var n=t,r=n.colSpan,o=r===void 0?1:r,i=n.rowSpan,a=i===void 0?1:i,u=n.isHeader,s=u!==void 0&&u,l=n.width,c=s?"th":"td";return"<"+c+' colSpan="'+o+'" rowSpan="'+a+'" width="'+(l===void 0?"auto":l)+'">'+e+""}}],preParseHtml:[_ft],parseElemsHtml:[Vft,Uft,Wft],menus:[{key:"insertTable",factory:function(){return new Gft}},{key:"deleteTable",factory:function(){return new qft}},{key:"insertTableRow",factory:function(){return new Kft}},{key:"deleteTableRow",factory:function(){return new Yft}},{key:"insertTableCol",factory:function(){return new Qft}},{key:"deleteTableCol",factory:function(){return new tdt}},{key:"tableHeader",factory:function(){return new edt}},{key:"tableFullWidth",factory:function(){return new ndt}}],editorPlugin:function(t){var e=t.insertBreak,n=t.deleteBackward,r=t.deleteForward,o=t.normalizeNode,i=t.insertData,a=t.handleTab,u=t.selectAll,s=t;return s.insertBreak=function(){A.getSelectedNodeByType(s,"table")==null?e():s.insertText(` `)},s.deleteBackward=function(l){if(!QB(s)){var c=s.selection;if(c){var f=E.before(s,c);if(f){var p=tF(s,f),d=tF(s,c);if(p&&!d)return}}n(l)}},s.handleTab=function(){var l;if(A.getSelectedNodeByType(s,"table")){var c=E.above(t);A.checkNodeType(c[0],"table-cell")&&N.select(t,c[1]);var f=E.next(t);if(f)f[0]&&f[0].text&&(f=(l=E.above(t,{at:f[1]}))!==null&&l!==void 0?l:f),N.select(t,f[1]);else{var p=s.children||[],d=p.length;if(A.checkNodeType(p[d-1],"table")){var y=A.genEmptyParagraph();N.insertNodes(s,y,{at:[d]}),s.handleTab()}}}else a()},s.deleteForward=function(l){QB(s)||r(l)},s.normalizeNode=function(l){var c=no(l,2),f=c[0],p=c[1];if(A.getNodeType(f)!=="table")return o([f,p]);if(A.isLastNode(s,f)){var d=A.genEmptyParagraph();N.insertNodes(s,d,{at:[p[0]+1]})}},s.insertData=function(l){if(A.getSelectedNodeByType(s,"table")!=null){var c=l.getData("text/plain");c===` `||/]+>/.test(l.getData("text/html"))?i(l):E.insertText(s,c)}else i(l)},s.selectAll=function(){var l=s.selection;if(l!=null){var c=A.getSelectedNodeByType(s,"table-cell");if(c!=null){var f=l.anchor,p=l.focus;if(j.equals(f.path.slice(0,3),p.path.slice(0,3)))if(Q.string(c).length!==0){var d=A.findPath(s,c),y={anchor:E.start(s,d),focus:E.end(s,d)};s.select(y)}else u();else u()}else u()}else u()},s}};qn("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party