You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
187 lines
796 KiB
187 lines
796 KiB
|
2 years ago
|
import{d as j1,r as Du,aB as sP,X as i$,n as a$,o as N1,b as I1,ae as u$,aC as s$,ay as l$,a2 as c$,a as b4,f as qo,D as lP,_ as f$}from"./index-b0696d90.js";import{u as d$}from"./index-53f7d59e.js";var se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function p$(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ss(t){var e={exports:{}};return t(e,e.exports),e.exports}var mi,H0,_h=function(t){return t&&t.Math==Math&&t},kt=_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")(),r5=Function.prototype,mx=r5.apply,h$=r5.bind,bx=r5.call,cP=typeof Reflect=="object"&&Reflect.apply||(h$?bx.bind(mx):function(){return bx.apply(mx,arguments)}),fP=Function.prototype,w4=fP.bind,E4=fP.call,g$=w4&&w4.bind(E4),ge=w4?function(t){return t&&g$(E4,t)}:function(t){return t&&function(){return E4.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}),Bc=Function.prototype.call,zn=Bc.bind?Bc.bind(Bc):function(){return Bc.apply(Bc,arguments)},wx={}.propertyIsEnumerable,Ex=Object.getOwnPropertyDescriptor,v$=Ex&&!wx.call({1:2},1)?function(t){var e=Ex(this,t);return!!e&&e.enumerable}:wx,o5={f:v$},Yr=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},y$=ge({}.toString),m$=ge("".slice),Cu=function(t){return m$(y$(t),8,-1)},Gy=kt.Object,b$=ge("".split),dP=Gn(function(){return!Gy("z").propertyIsEnumerable(0)})?function(t){return Cu(t)=="String"?b$(t,""):Gy(t)}:Gy,w$=kt.TypeError,i5=function(t){if(t==null)throw w$("Can't call method on "+t);return t},Po=function(t){return dP(i5(t))},tr=function(t){return typeof t=="object"?t!==null:sn(t)},Qn={},Dx=function(t){return sn(t)?t:void 0},ic=function(t,e){return arguments.length<2?Dx(Qn[t])||Dx(kt[t]):Qn[t]&&Qn[t][e]||kt[t]&&kt[t][e]},Pd=ge({}.isPrototypeOf),qy=ic("navigator","userAgent")||"",Cx=kt.process,xx=kt.Deno,Sx=Cx&&Cx.versions||xx&&xx.version,Ax=Sx&&Sx.v8;Ax&&(H0=(mi=Ax.split("."))[0]>0&&mi[0]<4?1:+(mi[0]+mi[1])),!H0&&qy&&(!(mi=qy.match(/Edge\/(\d+)/))||mi[1]>=74)&&(mi=qy.match(/Chrome\/(\d+)/))&&(H0=+mi[1]);var Th,Dg=H0,po=!!Object.getOwnPropertySymbols&&!Gn(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Dg&&Dg<41}),a5=po&&!Symbol.sham&&typeof Symbol.iterator=="symbol",E$=kt.Object,gl=a5?function(t){return typeof t=="symbol"}:function(t){var e=ic("Symbol");return sn(e)&&Pd(e.prototype,E$(t))},D$=kt.String,D4=function(t){try{return D$(t)}catch{return"Object"}},C$=kt.TypeError,u5=function(t){if(sn(t))return t;throw C$(D4(t)+" is not a function")},Cg=function(t,e){var n=t[e];return n==null?void 0:u5(n)},x$=kt.TypeError,S$=Object.defineProperty,ea=kt["__core-js_shared__"]||function(t,e){try{S$(kt,t,{value:e,configurable:!0,writable:!0})}catch{kt[t]=e}return e}("__core-js_shared__",{}),ls=ss(function(t){(t.exports=function(e,n){return ea[e]||(ea[e]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),A$=kt.Object,_p=function(t){return A$(i5(t))},O$=ge({}.hasOwnProperty),Vt=Object.hasOwn||function(t,e){return O$(_p(t),e)},k$=0,B$=Math.random(),F$=ge(1 .toString),xg=function(t){return"Symbol("+(t===void 0?"":t)+")_"+F$(++k$+B$,36)},Fc=ls("wks"),xu=kt.Symbol,Ox=xu&&xu.for,_$=a5?xu:xu&&xu.withoutSetter||xg,Bn=function(t){if(!Vt(Fc,t)||!po&&typeof Fc[t]!="string"){var e="Symbol."+t;po&&Vt(xu,t)?Fc[t]=xu[t]:Fc[t]=a5&&Ox?Ox(e):_$(e)}return Fc[t]},T$=kt.TypeError,P$=Bn("toPrimitive"),j$=function(t,e){if(!tr(t)||gl(t))return t;var n,r=Cg(t,P$);if(r){if(e===void 0&&(e="default"),n=zn(r,t,e),!tr(n)||gl(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)
|
||
|
|
`),e),`
|
||
|
|
`);return t},wH=function(t,e){tr(e)&&"cause"in e&&Tn(t,"cause",e.cause)},ei={},EH=Bn("iterator"),DH=Array.prototype,wP={};wP[Bn("toStringTag")]="z";var d5=String(wP)==="[object z]",CH=Bn("toStringTag"),xH=kt.Object,SH=Cu(function(){return arguments}())=="Arguments",Np=d5?Cu: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=xH(t),CH))=="string"?n:SH?Cu(e):(r=Cu(e))=="Object"&&sn(e.callee)?"Arguments":r},AH=Bn("iterator"),Ix=function(t){if(t!=null)return Cg(t,AH)||Cg(t,"@@iterator")||ei[Np(t)]},OH=kt.TypeError,Lx=function(t,e,n){var r,o;ar(t);try{if(!(r=Cg(t,"return"))){if(e==="throw")throw n;return n}r=zn(r,t)}catch(i){o=!0,r=i}if(e==="throw")throw n;if(o)throw r;return ar(r),n},kH=kt.TypeError,W0=function(t,e){this.stopped=t,this.result=e},Rx=W0.prototype,BH=function(t,e,n){var r,o,i,a,u,s,l,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),y=s5(e,c),g=function(m){return r&&Lx(r,"normal",m),new W0(!0,m)},v=function(m){return f?(ar(m),d?y(m[0],m[1],g):y(m[0],m[1])):d?y(m,g):y(m)};if(p)r=t;else{if(!(o=Ix(t)))throw kH(D4(t)+" is not iterable");if(function(m){return m!==void 0&&(ei.Array===m||DH[EH]===m)}(o)){for(i=0,a=Pp(t);a>i;i++)if((u=v(t[i]))&&Pd(Rx,u))return u;return new W0(!1)}r=function(m,h){var b=arguments.length<2?Ix(m):h;if(u5(b))return ar(zn(b,m));throw OH(D4(m)+" is not iterable")}(t,o)}for(s=r.next;!(l=zn(s,r)).done;){try{u=v(l.value)}catch(m){Lx(r,"throw",m)}if(typeof u=="object"&&u&&Pd(Rx,u))return u}return new W0(!1)},FH=kt.String,jd=function(t){if(Np(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return FH(t)},_H=function(t,e){return t===void 0?arguments.length<2?"":e:jd(t)},TH=!Gn(function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",Yr(1,7)),t.stack!==7)}),PH=Bn("toStringTag"),kg=kt.Error,jH=[].push,Nd=function(t,e){var n,r=arguments.length>2?arguments[2]:void 0,o=Pd(Yy,this);Ag?n=Ag(new kg(void 0),o?Sg(this):Yy):(n=o?this:ii(Yy),Tn(n,PH,"Error")),Tn(n,"message",_H(e,"")),TH&&Tn(n,"stack",bH(n.stack,1)),wH(n,r);var i=[];return BH(t,jH,{that:i}),Tn(n,"errors",i),n};Ag?Ag(Nd,kg):function(t,e){for(var n=lH(e),r=Na.f,o=L1.f,i=0;i<n.length;i++){var a=n[i];Vt(t,a)||r(t,a,o(e,a))}}(Nd,kg);var Yy=Nd.prototype=ii(kg.prototype,{constructor:Yr(1,Nd),message:Yr(1,""),name:Yr(1,"AggregateError")});Ko({global:!0},{AggregateError:Nd});var NH=ge(Function.toString);sn(ea.inspectSource)||(ea.inspectSource=function(t){return NH(t)});var Bg,ad,Fg,EP=ea.inspectSource,Mx=kt.WeakMap,IH=sn(Mx)&&/native code/.test(EP(Mx)),k4=kt.TypeError,LH=kt.WeakMap;if(IH||ea.state){var qa=ea.state||(ea.state=new LH),RH=ge(qa.get),zx=ge(qa.has),MH=ge(qa.set);Bg=function(t,e){if(zx(qa,t))throw new k4("Object already initialized");return e.facade=t,MH(qa,t,e),e},ad=function(t){return RH(qa,t)||{}},Fg=function(t){return zx(qa,t)}}else{var Ss=R1("state");jp[Ss]=!0,Bg=function(t,e){if(Vt(t,Ss))throw new k4("Object already initialized");return e.facade=t,Tn(t,Ss,e),e},ad=function(t){return Vt(t,Ss)?t[Ss]:{}},Fg=function(t){return Vt(t,Ss)}}var Yi,$x,Hx,uc={set:Bg,get:ad,has:Fg,enforce:function(t){return Fg(t)?ad(t):Bg(t,{})},getterFor:function(t){return function(e){var n;if(!tr(e)||(n=ad(e)).type!==t)throw k4("Incompatible receiver, "+t+" required");return n}}},DP=Function.prototype,zH=Hn&&Object.getOwnPropertyDescriptor,Xy=Vt(DP,"name"),$H={EXISTS:Xy,PROPER:Xy&&function(){}.name==="something",CONFIGURABLE:Xy&&(!Hn||Hn&&zH(DP,"name").configurable)},kl=function(t,e,n,r){r&&r.enumerable?t[e]=n:Tn(t,e,n)},B4=Bn("iterator"),CP=!1;[].keys&&("next"in(Hx=[].keys())?($x=Sg(Sg(Hx)))!==Object.prototype&&(Yi=$x):CP=!0);var HH=Yi==null||Gn(function(){var t={};return Yi[B4].call(t)!==t});Yi=HH?{}:ii(Yi),sn(Yi[B4])||kl(Yi,B4,function(){return this});var xP={IteratorPrototype:Yi,BUGGY_SAFARI_ITERATORS:CP},VH=d5?{}.toString:function(){return"[object "+Np(this)+"]"},UH=Na.f,Vx=Bn("toStringTag"),_g=function(t,e,n,r){if(t){var o=n?t:t.prototype;Vt(o,Vx)||UH(o,Vx,{configurable:!0,value:e}),r&&!d5&&Tn(o,"toString",
|
||
|
|
`)&&t.flags==="s")}),vU=Et.RegExp,yU=cn(function(){var t=vU("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),mU=qu.get,bU=v5("native-string-replace",String.prototype.replace),Ig=RegExp.prototype.exec,R4=Ig,wU=ie("".charAt),EU=ie("".indexOf),DU=ie("".replace),im=ie("".slice),am=(om=/b*/g,un(Ig,cS=/a/,"a"),un(Ig,om,"a"),cS.lastIndex!==0||om.lastIndex!==0),fS=cU.BROKEN_CARET,um=/()??/.exec("")[1]!==void 0;(am||um||fS||gU||yU)&&(R4=function(t){var e,n,r,o,i,a,u,s=this,l=mU(s),c=Ou(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=un(R4,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=fS&&s.sticky,y=un(uU,s),g=s.source,v=0,m=c;if(d&&(y=DU(y,"y",""),EU(y,"g")===-1&&(y+="g"),m=im(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&wU(c,s.lastIndex-1)!==`
|
||
|
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),um&&(n=new RegExp("^"+g+"$(?!\\s)",y)),am&&(r=s.lastIndex),o=un(Ig,d?n:s,m),d?o?(o.input=im(o.input,v),o[0]=im(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:am&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),um&&o&&o.length>1&&un(bU,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&p)for(o.groups=a=Mp(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Lg=R4;Rp({target:"RegExp",proto:!0,forced:/./.exec!==Lg},{exec:Lg});var CU=Nn("species"),sm=RegExp.prototype,xU=ie("".charAt),dS=ie("".charCodeAt),SU=ie("".slice),pS=function(t){return function(e,n){var r,o,i=Ou(M1(e)),a=S5(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=dS(i,a))<55296||r>56319||a+1===u||(o=dS(i,a+1))<56320||o>57343?t?xU(i,a):r:t?SU(i,a,a+2):o-56320+(r-55296<<10)+65536}},LP={codeAt:pS(!1),charAt:pS(!0)},AU=LP.charAt,OU=function(t,e,n){return e+(n?AU(t,e).length:1)},kU=Et.TypeError,hS=function(t,e){var n=t.exec;if(Ge(n)){var r=un(n,t,e);return r!==null&&ur(r),r}if(Su(t)==="RegExp")return un(Lg,t,e);throw kU("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[CU]=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===Lg||g===sm.exec?i&&!d?{done:!0,value:u(c,f,p)}:{done:!0,value:y(f,c,p)}:{done:!1}});oa(String.prototype,t,s[0]),oa(sm,o,s[1])}r&&jn(sm[o],"sham",!0)})("match",function(t,e,n){return[function(r){var o=M1(this),i=r==null?void 0:Id(r,t);return i?un(i,r,o):new RegExp(r)[t](Ou(o))},function(r){var o=ur(this),i=Ou(r),a=n(e,o,i);if(a.done)return a.value;if(!o.global)return hS(o,i);var u=o.unicode;o.lastIndex=0;for(var s,l=[],c=0;(s=hS(o,i))!==null;){var f=Ou(s[0]);l[c]=f,f===""&&(o.lastIndex=OU(i,_P(o.lastIndex),u)),c++}return c===0?null:l}]}),Rp({global:!0},{globalThis:Et});var BU=!cn(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),gS=D5("IE_PROTO"),M4=Et.Object,FU=M4.prototype,Ld=BU?M4.getPrototypeOf:function(t){var e=y5(t);if(Vn(e,gS))return e[gS];var n=e.constructor;return Ge(n)&&e instanceof n?n.prototype:e instanceof M4?FU:null},_U=Et.String,TU=Et.TypeError,Bl=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 "+_U(i)+" as a prototype")}(o),e?t(r,o):r.__proto__=o,r}}():void 0),PU=Et.Array,jU=Math.max,NU=ie("".replace),IU=ie("".split),LU=ie([].join),z4=String(Error("zxcasd").stack),RP=/\n\s*at [^:]*:[^\n]*/,RU=RP.test(z4),MU=/@[^\n]*\n/.test(z4)&&!/zxcasd/.test(z4),zU=function(t,e){if(typeof t!="string")return t;if(RU)for(;e--;)t=NU(t,RP,"");else if(MU)return LU(function(n,r,o){for(var i,a,u,s,l=z1(n),c=L4(r,l),f=L4(o===void 0?l:o,l),p=PU(jU(f-c,0)),d=0;c<f;c++,d++)i=p,a=d,u=n[c],s=void 0,(s=m5(a))in i?lc.f(i,s,na(0,u)):i[s]=u;return p.length=d,p}(IU(t,`
|
||
|
|
`),e),`
|
||
|
|
`);return t},$U=function(t,e){Vr(e)&&"cause"in e&&jn(t,"cause",e.cause)},vS=ie(ie.bind),MP=function(t,e){return h5(t),e===void 0?t:vS?vS(t,e):function(){return t.apply(e,arguments)}},Fl={},HU=Nn("iterator"),VU=Array.prototype,UU=Nn("iterator"),yS=function(t){if(t!=null)return Id(t,UU)||Id(t,"@@iterator")||Fl[$1(t)]},WU=Et.TypeError,mS=function(t,e,n){var r,o;ur(t);try{if(!(r=Id(t,"return"))){if(e==="throw")throw n;return n}r=un(r,t)}catch(i){o=!0,r=i}if(e==="throw")throw n;if(o)throw r;return ur(r),n},GU=Et.TypeError,K0=function(t,e){this.stopped=t,this.result=e},bS=K0.prototype,qU=function(t,e,n){var r,o,i,a,u,s,l,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),y=MP(e,c),g=function(m){return r&&mS(r,"normal",m),new K0(!0,m)},v=function(m){return f?(ur(m),d?y(m[0],m[1],g):y(m[0],m[1])):d?y(m,g):y(m)};if(p)r=t;else{if(!(o=yS(t)))throw GU(j4(t)+" is not iterable");if(function(m){return m!==void 0&&(Fl.Array===m||VU[HU]===m)}(o)){for(i=0,a=z1(t);a>i;i++)if((u=v(t[i]))&&Tg(bS,u))return u;return new K0(!1)}r=function(m,h){var b=arguments.length<2?yS(m):h;if(h5(b))return ur(un(b,m));throw WU(j4(m)+" is not iterable")}(t,o)}for(s=r.next;!(l=un(s,r)).done;){try{u=v(l.value)}catch(m){mS(r,"throw",m)}if(typeof u=="object"&&u&&Tg(bS,u))return u}return new K0(!1)},KU=function(t,e){return t===void 0?arguments.length<2?"":e:Ou(t)},YU=!cn(function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",na(1,7)),t.stack!==7)}),XU=Nn("toStringTag"),Rg=Et.Error,ZU=[].push,Rd=function(t,e){var n,r=arguments.length>2?arguments[2]:void 0,o=Tg(lm,this);Bl?n=Bl(new Rg(void 0),o?Ld(this):lm):(n=o?this:Mp(lm),jn(n,XU,"Error")),jn(n,"message",KU(e,"")),YU&&jn(n,"stack",zU(n.stack,1)),$U(n,r);var i=[];return qU(t,ZU,{that:i}),jn(n,"errors",i),n};Bl?Bl(Rd,Rg):PP(Rd,Rg);var lm=Rd.prototype=Mp(Rg.prototype,{constructor:na(1,Rd),message:na(1,""),name:na(1,"AggregateError")});Rp({global:!0},{AggregateError:Rd});var $4=Nn("unscopables"),H4=Array.prototype;H4[$4]==null&&lc.f(H4,$4,{configurable:!0,value:Mp(null)});var ku,wS,ES,cm=function(t){H4[$4][t]=!0},V4=Nn("iterator"),zP=!1;[].keys&&("next"in(ES=[].keys())?(wS=Ld(Ld(ES)))!==Object.prototype&&(ku=wS):zP=!0);var JU=ku==null||cn(function(){var t={};return ku[V4].call(t)!==t});JU&&(ku={}),Ge(ku[V4])||oa(ku,V4,function(){return this});var B5={IteratorPrototype:ku,BUGGY_SAFARI_ITERATORS:zP},QU=lc.f,DS=Nn("toStringTag"),CS=function(t,e,n){t&&!Vn(t=n?t:t.prototype,DS)&&QU(t,DS,{configurable:!0,value:e})},tW=B5.IteratorPrototype,eW=function(){return this},nW=x5.PROPER,rW=x5.CONFIGURABLE,xS=B5.IteratorPrototype,Ih=B5.BUGGY_SAFARI_ITERATORS,Pc=Nn("iterator"),oW=function(){return this},$P=function(t,e,n,r,o,i,a){(function(m,h,b,w){var D=h+" Iterator";m.prototype=Mp(tW,{next:na(+!w,b)}),CS(m,D,!1),Fl[D]=eW})(n,e,r);var u,s,l,c=function(m){if(m===o&&g)return g;if(!Ih&&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[Pc]||d["@@iterator"]||o&&d[o],g=!Ih&&y||c(o),v=e=="Array"&&d.entries||y;if(v&&(u=Ld(v.call(new t)))!==Object.prototype&&u.next&&(Ld(u)!==xS&&(Bl?Bl(u,xS):Ge(u[Pc])||oa(u,Pc,oW)),CS(u,f,!0)),nW&&o=="values"&&y&&y.name!=="values"&&(rW?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)(Ih||p||!(l in d))&&oa(d,l,s[l]);else Rp({target:e,proto:!0,forced:Ih||p},s);return d[Pc]!==g&&oa(d,Pc,g,{name:o}),Fl[e]=g,s},iW=qu.set,aW=qu.getterFor("Array Iterator"),Xf=$P(Array,"Array",function(t,e){iW(this,{type:"Array Iterator",target:sc(t),index:0,kind:e})},function(){var t=aW(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");Fl.Arguments=Fl.Array,cm("keys"),cm("values"),cm("entries");var uW=LP.charAt,sW=qu.set,lW=qu.getterFor("String Iterator");$P(String,"String",function(t){sW(this,{type:"St
|
||
|
|
Sorry, wangEditor V5+ versions do not support IE browser.`),OS(),kS()):global&&(!((fm=global.navigator)===null||fm===void 0)&&fm.userAgent.match("QQBrowser"))&&(OS(),kS());function OS(){typeof globalThis>"u"&&(window.globalThis=window)}function kS(){rV===void 0&&(window.AggregateError=function(t,e){var n=new Error(e);return n.errors=t,n})}var BS,zg=Array.isArray||function(t){return Cu(t)=="Array"},UP=function(){},cW=[],WP=ic("Reflect","construct"),F5=/^\s*(?:class|function)\b/,fW=ge(F5.exec),dW=!F5.exec(UP),jc=function(t){if(!sn(t))return!1;try{return WP(UP,cW,t),!0}catch{return!1}},pW=!WP||Gn(function(){var t;return jc(jc.call)||!jc(Object)||!jc(function(){t=!0})||t})?function(t){if(!sn(t))return!1;switch(Np(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return dW||!!fW(F5,EP(t))}:jc,hW=Bn("species"),FS=kt.Array,GP=function(t,e){return new(function(n){var r;return zg(n)&&(r=n.constructor,(pW(r)&&(r===FS||zg(r.prototype))||tr(r)&&(r=r[hW])===null)&&(r=void 0)),r===void 0?FS:r}(t))(e===0?0:e)},gW=Bn("species"),qP=Bn("isConcatSpreadable"),_S=kt.TypeError,vW=Dg>=51||!Gn(function(){var t=[];return t[qP]=!1,t.concat()[0]!==t}),yW=(BS="concat",Dg>=51||!Gn(function(){var t=[];return(t.constructor={})[gW]=function(){return{foo:1}},t[BS](Boolean).foo!==1})),mW=function(t){if(!tr(t))return!1;var e=t[qP];return e!==void 0?!!e:zg(t)};Ko({target:"Array",proto:!0,forced:!vW||!yW},{concat:function(t){var e,n,r,o,i,a=_p(this),u=GP(a,0),s=0;for(e=-1,r=arguments.length;e<r;e++)if(mW(i=e===-1?a:arguments[e])){if(s+(o=Pp(i))>9007199254740991)throw _S("Maximum allowed index exceeded");for(n=0;n<o;n++,s++)n in i&&A4(u,s,i[n])}else{if(s>=9007199254740991)throw _S("Maximum allowed index exceeded");A4(u,s++,i)}return u.length=s,u}});var TS=c5.f,PS=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],KP={f:function(t){return PS&&Cu(t)=="Window"?function(e){try{return TS(e)}catch{return mP(PS)}}(t):TS(Po(t))}},bW=ge([].slice),_5={f:Bn},wW=Na.f,je=function(t){var e=Qn.Symbol||(Qn.Symbol={});Vt(e,t)||wW(e,t,{value:_5.f(t)})},jS=ge([].push),wi=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=_p(s),g=dP(y),v=s5(l,c),m=Pp(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:jS(w,p)}else switch(t){case 4:return!1;case 7:jS(w,p)}return i?-1:r||o?o:w}},H1={forEach:wi(0),map:wi(1),filter:wi(2),some:wi(3),every:wi(4),find:wi(5),findIndex:wi(6),filterReject:wi(7)}.forEach,Rn=R1("hidden"),NS=Bn("toPrimitive"),EW=uc.set,IS=uc.getterFor("Symbol"),Gr=Object.prototype,Wi=kt.Symbol,Xi=Wi&&Wi.prototype,LS=kt.TypeError,vm=kt.QObject,Nc=ic("JSON","stringify"),YP=L1.f,Gi=Na.f,XP=KP.f,DW=o5.f,ZP=ge([].push),ai=ls("symbols"),zp=ls("op-symbols"),ym=ls("string-to-symbol-registry"),mm=ls("symbol-to-string-registry"),CW=ls("wks"),bm=!vm||!vm.prototype||!vm.prototype.findChild,U4=Hn&&Gn(function(){return ii(Gi({},"a",{get:function(){return Gi(this,"a",{value:7}).a}})).a!=7})?function(t,e,n){var r=YP(Gr,e);r&&delete Gr[e],Gi(t,e,n),r&&t!==Gr&&Gi(Gr,e,r)}:Gi,wm=function(t,e){var n=ai[t]=ii(Xi);return EW(n,{type:"Symbol",tag:t,description:e}),Hn||(n.description=e),n},$g=function(t,e,n){t===Gr&&$g(zp,e,n),ar(t);var r=ac(e);return ar(n),Vt(ai,r)?(n.enumerable?(Vt(t,Rn)&&t[Rn][r]&&(t[Rn][r]=!1),n=ii(n,{enumerable:Yr(0,!1)})):(Vt(t,Rn)||Gi(t,Rn,Yr(1,{})),t[Rn][r]=!0),U4(t,r,n)):Gi(t,r,n)},RS=function(t,e){ar(t);var n=Po(e),r=f5(n).concat(W4(n));return H1(r,function(o){Hn&&!zn(JP,n,o)||$g(t,o,n[o])}),t},JP=function(t){var e=ac(t),n=zn(DW,this,e);return!(this===Gr&&Vt(ai,e)&&!Vt(zp,e))&&(!(n||!Vt(this,e)||!Vt(ai,e)||Vt(this,Rn)&&this[Rn][e])||n)},MS=function(t,e){var n=Po(t),r=ac(e);if(n!==Gr||!Vt(ai,r)||Vt(zp,r)){var o=YP(n,r);return!o||!Vt(ai,r)||Vt(n,Rn)&&n[Rn][r]||(o.enumerable=!0),o}},zS=function(t){var e=XP(Po(t)),n=[];return H1(e,function(r){Vt(ai,r)||Vt(jp,r)||ZP(n,r)}),n},W4=function(t){var e=t===Gr,n=XP(e?zp:Po(
|
||
|
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||
|
|
*
|
||
|
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||
|
|
* Released under the MIT License.
|
||
|
|
*/function $S(t){return Object.prototype.toString.call(t)==="[object Object]"}function Sn(t){var e,n;return $S(t)!==!1&&((e=t.constructor)===void 0||$S(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;r<e;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map(function(o){return"'"+o+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ku(t){return!!t&&!!t[sr]}function Yu(t){return!!t&&(function(e){if(!e||typeof e!="object")return!1;var n=Object.getPrototypeOf(e);if(n===null)return!0;var r=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return r===Object||typeof r=="function"&&Function.toString.call(r)===LW}(t)||Array.isArray(t)||!!t[YS]||!!t.constructor[YS]||T5(t)||P5(t))}function Md(t,e,n){n===void 0&&(n=!1),_l(t)===0?(n?Object.keys:R5)(t).forEach(function(r){n&&typeof r=="symbol"||e(r,t[r],t)}):t.forEach(function(r,o){return e(o,r,t)})}function _l(t){var e=t[sr];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:T5(t)?2:P5(t)?3:0}function G4(t,e){return _l(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function tj(t,e,n){var r=_l(t);r===2?t.set(e,n):r===3?(t.delete(e),t.add(n)):t[e]=n}function T5(t){return NW&&t instanceof Map}function P5(t){return IW&&t instanceof Set}function au(t){return t.o||t.t}function j5(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=RW(t);delete e[sr];for(var n=R5(e),r=0;r<n.length;r++){var o=n[r],i=e[o];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[o]})}return Object.create(Object.getPrototypeOf(t),e)}function N5(t,e){return e===void 0&&(e=!1),I5(t)||Ku(t)||!Yu(t)||(_l(t)>1&&(t.set=t.add=t.clear=t.delete=TW),Object.freeze(t),e&&Md(t,function(n,r){return N5(r,!0)},!0)),t}function TW(){Ur(2)}function I5(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ni(t){var e=MW[t];return e||Ur(18,t),e}function HS(){return zd}function Em(t,e){e&&(ni("Patches"),t.u=[],t.s=[],t.v=e)}function Hg(t){q4(t),t.p.forEach(PW),t.p=null}function q4(t){t===zd&&(zd=t.l)}function VS(t){return zd={p:[],l:zd,h:t,m:!0,_:0}}function PW(t){var e=t[sr];e.i===0||e.i===1?e.j():e.O=!0}function Dm(t,e){e._=e.p.length;var n=e.p[0],r=t!==void 0&&t!==n;return e.h.g||ni("ES5").S(e,t,r),r?(n[sr].P&&(Hg(e),Ur(4)),Yu(t)&&(t=Vg(e,t),e.l||Ug(e,t)),e.u&&ni("Patches").M(n[sr],t,e.u,e.s)):t=Vg(e,n,[]),Hg(e),e.u&&e.v(e.u,e.s),t!==ej?t:void 0}function Vg(t,e,n){if(I5(e))return e;var r=e[sr];if(!r)return Md(e,function(i,a){return US(t,r,e,i,a,n)},!0),e;if(r.A!==t)return e;if(!r.P)return Ug(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=j5(r.k):r.o;Md(r.i===3?new Set(o):o,function(i,a){return US(t,r,o,i,a,n)}),Ug(t,o,!1),n&&t.u&&ni("Patches").R(r,n,t.u,t.s)}return r.o}function US(t,e,n,r,o,i){if(Ku(o)){var a=Vg(t,o,i&&e&&e.i!==3&&!G4(e.D,r)?i.concat(r):void 0);if(tj(n,r,a),!Ku(a))return;t.m=!1}if(Yu(o)&&!I5(o)){if(!t.h.F&&t._<1)return;Vg(t,o),e&&e.A.l||Ug(t,o)}}function Ug(t,e,n){n===void 0&&(n=!1),t.h.F&&t.m&&N5(e,n)}function Cm(t,e){var n=t[sr];return(n?au(n):t)[e]}function WS(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 K4(t){t.P||(t.P=!0,t.l&&K4(t.l))}function xm(t){t.o||(t.o=j5(t.t))}function Y4(t,e,n){var r=T5(e)?ni("MapSet").N(e,n):P5(e)?ni("MapSet").T(e,n):t.g?function(o,i){var a=Array.isArray(o),u={i:a?1:0,A:i?i.A:HS(),P:!1,I:!1,D:{},l:i,t:o,k:null,o:null,j:null,C:!1},s=u,l=Y0;a&&(s=[u],l=X0);var c=Proxy.revocable(s,l),f=c.revoke,p=c.proxy;return u.k=p,u.j=f,p}(e,n):ni("ES5").J(e,n);return(n?n.A:HS()).p.push(r),r}function jW(t){return Ku(t)||Ur(22,t),function e(n){if(!Yu(n))return n;var r,o=n[sr],i=_l(n);if(o){if(!o.P&&(o.i<4||!ni("ES5").K(o)))return o.t;o.I=!0,r=GS(n,i),o.I=!1}else r=GS(n,i);return Md(r,function(a,u){o&&function(s,l){return _l(s)===2?s.get(l):s[l]}(o.t,a)===u||tj(r,a,e(u))}),i===3?new Set(r):r}(t)}function GS(t,e){switch(e){cas
|
||
|
|
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=QS.get(t);return e||(e=new Set,QS.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=tA.get(t);return e||(e=new Set,tA.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=Z4(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"?X4(D,C):x==="word"?function(O){for(var _=arguments.length>1&&arguments[1]!==void 0&&arguments[1],R=0,H=!1;O.length>0;){var M=X4(O,_),[K,U]=Z4(O,M,_);if(GW(K,U,_))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=eA.get(t);return e||(e=new Set,eA.set(t,e)),e},removeMark(t,e){t.removeMark(e)},setNormalizing(t,e){JS.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]:{}
|
||
|
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
||
|
|
* and replaces it with values from options `{smart_count: 5}`
|
||
|
|
*
|
||
|
|
* @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
|
||
|
|
* taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
|
||
|
|
*
|
||
|
|
* @param {string} phrase that needs interpolation, with placeholders
|
||
|
|
* @param {object} options with values that will be used to replace placeholders
|
||
|
|
* @returns {any[]} interpolated
|
||
|
|
*/function ZA(t,e){const n=/\$/g;let r=[t];if(e==null)return r;for(const o of Object.keys(e))if(o!=="_"){let i=e[o];typeof i=="string"&&(i=n[Symbol.replace](i,"$$$$")),r=kK(r,new RegExp(`%\\{${o}\\}`,"g"),i)}return r}var Pj=(Bs=OK("apply"),class{constructor(t){Object.defineProperty(this,Bs,{value:BK}),this.locale={strings:{},pluralize:e=>e===1?0:1},Array.isArray(t)?t.forEach(XA(this,Bs)[Bs],this):XA(this,Bs)[Bs](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 ZA(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 ZA(n,e)}});function BK(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;g<v;g++){var m=y[g];if(m==="*"&&(f=f.concat(e[m])),d.length===2&&d[0]===m){f=f.concat(e[m]);break}}return f}(n);l.length&&function(c,f,p){for(var d=0,y=f.length;d<y&&f[d];d++)f[d].event=c,f[d].apply(f[d],p)}(n,l,[r,o,i,a,u,s])},t.on=function(n,r){e[n]||(e[n]=[]),e[n].push(r)},t.once=function(n,r){this.on(n,function o(){r.apply(this,arguments),t.off(n,o)})},t.off=function(n,r){var o=[];if(n&&r)for(var i=this._fns[n],a=0,u=i?i.length:0;a<u;a++)i[a]!==r&&o.push(i[a]);o.length?this._fns[n]=o:delete this._fns[n]},t},FK={urlAlphabet:"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"};let{urlAlphabet:_K}=FK,JA=t=>crypto.getRandomValues(new Uint8Array(t)),QA=(t,e,n)=>{let r=(2<<Math.log(t.length-1)/Math.LN2)-1,o=-~(1.6*r*e/t.length);return()=>{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)=>QA(t,e,JA),customRandom:QA,urlAlphabet:_K,random:JA},Nm=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<i;e++)o[e]!=="*"&&(r=e<n.length&&o[e]===n[e]);r=r&&n}else r=!1;else if(typeof t.splice=="function")for(r=[],e=t.length;e--;)this.match(t[e])&&(r[r.length]=t[e]);else if(typeof t=="object")for(var a in r={},t)this.match(a)&&(r[a]=t[a]);return r};var PK=/[\/\+\.]/,jK=function(t,e){function n(r){var o=function(i,a,u){var s=new Nj(i,u||/[\/\.]/);return a!==void 0?s.match(a):s}(r,t,PK);return o&&o.length>=2}return e?n(e.split(";")[0]):n},NK=0;function IK(t){return"__private_"+NK+++"_"+t}var Im=IK("publish");class Ij{constructor(){Object.defineProperty(this,Im,{value:LK}),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,Im)[Im](n,r,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function LK(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++
|
||
|
|
id: ${r[i].id}
|
||
|
|
type: ${r[i].type}`)}),r.length>0&&ft(this,Hc)[Hc](),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 impo
|
||
|
|
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,Mc)[Mc](),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,yu)[yu](e),Promise.reject(new Error("Nonexistent upload")))}[zj](){return ft(this,Uo)[Uo](...arguments)}addResultData(e,n){if(!ft(this,$m)[$m](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,Rm)[Rm](n),ft(this,Mm)[Mm](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 WK(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&&jK(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:Nm(o),file:t.name}))}if(n&&t.size!=null&&t.size>n)throw new yo(this.i18n("exceedsSize",{size:Nm(n),file:t.name}));if(r&&t.size!=null&&t.size<r)throw new yo(this.i18n("inferiorSize",{size:Nm(r)}))}function GK(t){const{minNumberOfFiles:e}=this.opts.restrictions;if(Object.keys(t).length<e)throw new yo(`${this.i18n("youHaveToAtLeastSelectX",{smart_count:e})}`)}function qK(t){const{requiredMetaFields:e}=this.opts.restrictions,{hasOwnProperty:n}=Object.prototype,r=[],o=[];for(let i=0;i<e.length;i++)if(!n.call(t.meta,e[i])||t.meta[e[i]]===""){const a=new yo(`${this.i18n("missingRequiredMetaFieldOnFile",{fileName:t.name})}`);r.push(a),o.push(e[i]),ft(this,Je)[Je](a,{file:t,showInformer:!1,t
|
||
|
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||
|
|
*
|
||
|
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||
|
|
* Released under the MIT License.
|
||
|
|
*/function j7(t){return Object.prototype.toString.call(t)==="[object Object]"}De({target:"Object",stat:!0,forced:HX},{keys:function(t){return yl(Ia(t))}});var VX={isHistory(t){return j7(e=t)!==!1&&((n=e.constructor)===void 0||j7(r=n.prototype)!==!1&&r.hasOwnProperty("isPrototypeOf")!==!1)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Zi.isOperationList(t.redos[0]))&&(t.undos.length===0||Zi.isOperationList(t.undos[0]));var e,n,r}},tb=new WeakMap,eb=new WeakMap,cl={isHistoryEditor:t=>VX.isHistory(t.history)&&E.isEditor(t),isMerging:t=>eb.get(t),isSaving:t=>tb.get(t),redo(t){t.redo()},undo(t){t.undo()},withoutMerging(t,e){var n=cl.isMerging(t);eb.set(t,!1),e(),eb.set(t,n)},withoutSaving(t,e){var n=cl.isSaving(t);tb.set(t,!1),e(),tb.set(t,n)}},UX=X.String,ue=function(t){if(J1(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return UX(t)},rD=function(){var t=Le(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},WX=cc.PROPER,EE=RegExp.prototype,aN=EE.toString,GX=pt(rD),qX=Zt(function(){return aN.call({source:"a",flags:"b"})!="/a/b"}),KX=WX&&aN.name!="toString";(qX||KX)&&Un(RegExp.prototype,"toString",function(){var t=Le(this),e=ue(t.source),n=t.flags;return"/"+e+"/"+ue(n===void 0&&Zu(EE,t)&&!("flags"in EE)?GX(t):n)},{unsafe:!0});var Wh,YX=an?Object.defineProperties:function(t,e){Le(t);for(var n,r=La(e),o=yl(e),i=o.length,a=0;i>a;)ro.f(t,n=o[a++],r[n]);return t},DE=hs("document","documentElement"),uN=eD("IE_PROTO"),nb=function(){},sN=function(t){return"<script>"+t+"<\/script>"},N7=function(t){t.write(sN("")),t.close();var e=t.parentWindow.Object;return t=null,e},tg=function(){try{Wh=new ActiveXObject("htmlfile")}catch{}var t,e;tg=typeof document<"u"?document.domain&&Wh?N7(Wh):((e=Ud("iframe")).style.display="none",DE.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(sN("document.F=Object")),t.close(),t.F):N7(Wh);for(var n=sv.length;n--;)delete tg.prototype[sv[n]];return tg()};Z1[uN]=!0;var ey=Object.create||function(t,e){var n;return t!==null?(nb.prototype=Le(t),n=new nb,nb.prototype=null,n[uN]=t):n=tg(),e===void 0?n:YX(n,e)},CE=xe("unscopables"),xE=Array.prototype;xE[CE]==null&&ro.f(xE,CE,{configurable:!0,value:ey(null)});var fd=function(t){xE[CE][t]=!0},XX=rN.includes;De({target:"Array",proto:!0},{includes:function(t){return XX(this,t,arguments.length>1?arguments[1]:void 0)}}),fd("includes");var ZX=xe("match"),oD=function(t){var e;return ce(t)&&((e=t[ZX])!==void 0?!!e:Zr(t)=="RegExp")},JX=X.TypeError,iD=function(t){if(oD(t))throw JX("The method doesn't accept regular expressions");return t},QX=xe("match"),aD=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[QX]=!1,"/./"[t](e)}catch{}}return!1},tZ=pt("".indexOf);De({target:"String",proto:!0,forced:!aD("includes")},{includes:function(t){return!!~tZ(ue(Tr(this)),ue(iD(t)),arguments.length>1?arguments[1]:void 0)}});var eZ=/"/g,nZ=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(Tr(this)),r="<a",(r+=' name="'+nZ(ue(e),eZ,""")+'"')+">"+n+"</a>";var e,n,r}});var SE=function(t,e,n){var r,o;Le(t);try{if(!(r=Ju(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},rZ=function(t,e,n,r){try{return r?e(Le(n)[0],n[1]):e(n)}catch(o){SE(t,"throw",o)}},Ul={},oZ=xe("iterator"),iZ=Array.prototype,lN=function(t){return t!==void 0&&(Ul.Array===t||iZ[oZ]===t)},qd=function(t,e,n){var r=tD(e);r in t?ro.f(t,r,Y1(0,n)):t[r]=n},aZ=xe("iterator"),uD=function(t){if(t!=null)return Ju(t,aZ)||Ju(t,"@@iterator")||Ul[J1(t)]},uZ=X.TypeError,cN=function(t,e){var n=arguments.length<2?uD(t):e;if(Sa(n))return Le(Ut(n,t));throw uZ(K1(t)+" is not iterable")},I7=X.Array,fN=xe("iterator"),dN=!1;try{var sZ=0,L7={next:function(){return{done:!!sZ++}},return:function(){dN=!0}};L7[fN]=function(){return this},Array.from(L7,function(){throw 2})}catc
|
||
|
|
`)&&t.flags==="s")}),RZ=X.RegExp,pD=Zt(function(){var t=RZ("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),MZ=kn.get,zZ=X5("native-string-replace",String.prototype.replace),fv=RegExp.prototype.exec,BE=fv,$Z=pt("".charAt),HZ=pt("".indexOf),VZ=pt("".replace),ob=pt("".slice),ib=function(){var t=/a/,e=/b*/g;return Ut(fv,t,"a"),Ut(fv,e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),G7=ry.BROKEN_CARET,ab=/()??/.exec("")[1]!==void 0;(ib||ab||G7||dD||pD)&&(BE=function(t){var e,n,r,o,i,a,u,s=this,l=MZ(s),c=ue(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=Ut(BE,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=G7&&s.sticky,y=Ut(rD,s),g=s.source,v=0,m=c;if(d&&(y=VZ(y,"y",""),HZ(y,"g")===-1&&(y+="g"),m=ob(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&$Z(c,s.lastIndex-1)!==`
|
||
|
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),ab&&(n=new RegExp("^"+g+"$(?!\\s)",y)),ib&&(r=s.lastIndex),o=Ut(fv,d?n:s,m),d?o?(o.input=ob(o.input,v),o[0]=ob(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:ib&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),ab&&o&&o.length>1&&Ut(zZ,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&p)for(o.groups=a=ey(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Kd=BE;De({target:"RegExp",proto:!0,forced:/./.exec!==Kd},{exec:Kd});var hD=Function.prototype,q7=hD.apply,UZ=hD.bind,K7=hD.call,gD=typeof Reflect=="object"&&Reflect.apply||(UZ?K7.bind(q7):function(){return K7.apply(q7,arguments)}),WZ=xe("species"),ub=RegExp.prototype,vD=function(t,e,n,r){var o=xe(t),i=!Zt(function(){var l={};return l[o]=function(){return 7},""[t](l)!=7}),a=i&&!Zt(function(){var l=!1,c=/a/;return t==="split"&&((c={}).constructor={},c.constructor[WZ]=function(){return c},c.flags="",c[o]=/./[o]),c.exec=function(){return l=!0,null},c[o](""),!l});if(!i||!a||n){var u=pt(/./[o]),s=e(o,""[t],function(l,c,f,p,d){var y=pt(l),g=c.exec;return g===Kd||g===ub.exec?i&&!d?{done:!0,value:u(c,f,p)}:{done:!0,value:y(f,c,p)}:{done:!1}});Un(String.prototype,t,s[0]),Un(ub,o,s[1])}r&&Xr(ub[o],"sham",!0)},GZ=pN.charAt,yD=function(t,e,n){return e+(n?GZ(t,e).length:1)},qZ=Math.floor,sb=pt("".charAt),KZ=pt("".replace),lb=pt("".slice),YZ=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,XZ=/\$([$&'`]|\d{1,2})/g,ZZ=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=XZ;return o!==void 0&&(o=Ia(o),s=YZ),KZ(i,s,function(l,c){var f;switch(sb(c,0)){case"$":return"$";case"&":return t;case"`":return lb(e,0,n);case"'":return lb(e,a);case"<":f=o[lb(c,1,-1)];break;default:var p=+c;if(p===0)return l;if(p>u){var d=qZ(p/10);return d===0?l:d<=u?r[d-1]===void 0?sb(c,1):r[d-1]+sb(c,1):l}f=r[p-1]}return f===void 0?"":f})},JZ=X.TypeError,Yd=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(Kd,t,e);throw JZ("RegExp#exec called on incompatible receiver")},FE=xe("replace"),QZ=Math.max,tJ=Math.min,eJ=pt([].concat),cb=pt([].push),Y7=pt("".indexOf),X7=pt("".slice),nJ="a".replace(/./,"$0")==="$0",Z7=!!/./[FE]&&/./[FE]("a","$0")==="";vD("replace",function(t,e,n){var r=Z7?"$":"$0";return[function(o,i){var a=Tr(this),u=o==null?void 0:Ju(o,FE);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"&&Y7(i,r)===-1&&Y7(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=Yd(a,u);if(d===null||(cb(p,d),!c))break;ue(d[0])===""&&(a.lastIndex=yD(u,fc(a.lastIndex),f))}for(var y,g="",v=0,m=0;m<p.length;m++){for(var h=ue((d=p[m])[0]),b=QZ(tJ(Wp(d.index),u.length),0),w=[],D=1;D<d.length;D++)cb(w,(y=d[D])===void 0?y:String(y));var x=d.groups;if(l){var C=eJ([h],w,b,u);x!==void 0&&cb(C,x);var O=ue(gD(i,void 0,C))}else O=ZZ(h,u,b,w,x,i);b>=v&&(g+=X7(u,v,b)+O,v=b+h.length)}return g+X7(u,v)}]},!!Zt(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$<a>")!=="7"})||!nJ||Z7);/*! *****************************************************************************
|
||
|
|
Copyright (c) Microsoft Corporation.
|
||
|
|
|
||
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
|
purpose with or without fee is hereby granted.
|
||
|
|
|
||
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
|
***************************************************************************** */var _E=function(t,e){return _E=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])},_E(t,e)};function pc(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}_E(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<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Er.apply(this,arguments)};function Dr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function 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 TE(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t}var rJ=0,J7=function(){this.id=""+rJ++},oJ=kn.set,iJ=kn.getterFor("Array Iterator"),Qf=cD(Array,"Array",function(t,e){oJ(this,{type:"Array Iterator",target:La(t),index:0,kind:e})},function(){var t=iJ(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");Ul.Arguments=Ul.Array,fd("keys"),fd("values"),fd("entries");var Gl=function(t,e,n){for(var r in e)Un(t,r,e[r],n);return t},aJ=X.Array,uJ=Math.max,PE=function(t,e,n){for(var r=gs(t),o=Vl(e,r),i=Vl(n===void 0?r:n,r),a=aJ(uJ(i-o,0)),u=0;o<i;o++,u++)qd(a,u,t[o]);return a.length=u,a},Q7=Wd.f,t9=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],sJ={f:function(t){return t9&&Zr(t)=="Window"?function(e){try{return Q7(e)}catch{return PE(t9)}}(t):Q7(La(t))}},e9=Zt(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),qh=Object.isExtensible,mu=Zt(function(){qh(1)})||e9?function(t){return!!ce(t)&&(!e9||Zr(t)!="ArrayBuffer")&&(!qh||qh(t))}:qh,lJ=!Zt(function(){return Object.isExtensible(Object.preventExtensions({}))}),oy=Up(function(t){var e=ro.f,n=!1,r=Z5("meta"),o=0,i=function(u){e(u,r,{value:{objectID:"O"+o++,weakData:{}}})},a=t.exports={enable:function(){a.enable=function(){},n=!0;var u=Wd.f,s=pt([].splice),l={};l[r]=1,u(l).length&&(Wd.f=function(c){for(var f=u(c),p=0,d=f.length;p<d;p++)if(f[p]===r){s(f,p,1);break}return f},De({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:sJ.f}))},fastKey:function(u,s){if(!ce(u))return typeof u=="symbol"?u:(typeof u=="string"?"S":"P")+u;if(!Ie(u,r)){if(!mu(u))return"F";if(!s)return"E";i(u)}return u[r].objectID},getWeakData:function(u,s){if(!Ie(u,r)){if(!mu(u))return!0;if(!s)return!1;i(u)}return u[r].weakData},onFreeze:function(u){return lJ&&n&&mu(u)&&!Ie(u,r)&&i(u),u}};Z1[r]=!0}),cJ=X.TypeError,eg=function(t,e){this.stopped=t,this.result=e},n9=eg.prototype,Xd=function(t,e,n){var r,o,i,a,u,s,l,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),y=Qu(e,c),g=function(m){return r&&SE(r,"normal",m),new eg(!0,m)},v=function(m){return f?(Le(m),d?y(m[0],m[1],g):y(m[0],m[1])):d?y(m,g):y(m)};if(p)r=t;else{if(!(o=uD(t)))throw cJ(K1(t)+" is not iterable");if(lN(o)){for(i=0,a=gs(t);a>i;i++)if((u=v(t[i]))&&Zu(n9,u))return u;return new eg(!1)}r=cN(t,o)}for(s=r.next;!(l=Ut(s,r)).done;){try{u=v(l.value)}catch(m){SE(r,"throw",m)}if(typeof u=="object"&&u&&Zu(n9,u))return u}return new eg(!1)},fJ=X.TypeError,iy=function(t,e){if(Zu(e,t))return t;throw fJ("Incorrect invo
|
||
|
|
`)}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 h9(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 zE=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),dd=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Qc=typeof navigator<"u"&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),xJ=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),SJ=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),$E=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),tf=!SJ&&!xJ&&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=rg.get(e);return n||(n=new J7,rg.set(e,n)),n},setNewKey:function(t){var e=new J7;rg.set(t,e)},findPath:function(t,e){for(var n=[],r=e;;){var o=ql.get(r);if(o==null){if(E.isEditor(r))return n;break}var i=Zd.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 ql.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=wD.get(t);else{var r=A.findKey(t,e);n=RE.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?pv.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM
|
||
|
|
`)))&&f--}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: "+e)}var m=A.toSlateNode(t,c);return{path:A.findPath(t,m),offset:f}},hasRange:function(t,e){var n=e.anchor,r=e.focus;return E.hasPath(t,n.path)&&E.hasPath(t,r.path)},getNodeType:function(t){return ct.isElement(t)?t.type:""},checkNodeType:function(t,e){return this.getNodeType(t)===e},getNodesStr:function(t){return t.map(function(e){return Q.string(e)}).join("")},getSelectedElems:function(t){var e,n,r=[],o=E.nodes(t,{universal:!0});try{for(var i=Dr(o),a=i.next();!a.done;a=i.next()){var u=Ht(a.value,1)[0];ct.isElement(u)&&r.push(u)}}catch(s){e={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r},getSelectedNodeByType:function(t,e){var n=this,r=Ht(E.nodes(t,{match:function(i){return n.checkNodeType(i,e)},universal:!0}),1),o=r[0];return o==null?null:o[0]},getSelectedTextNode:function(t){var e=Ht(E.nodes(t,{match:function(r){return ot.isText(r)},universal:!0}),1),n=e[0];return n==null?null:n[0]},isNodeSelected:function(t,e){var n=Ht(E.nodes(t,{match:function(o){return o===e},universal:!0}),1),r=n[0];return r!=null&&Ht(r,1)[0]===e},isSelectionAtLineEnd:function(t,e){var n=t.selection;return!!n&&(E.isEnd(t,n.anchor,e)||E.isEnd(t,n.focus,e))},getTextarea:function(t){var e=jE.get(t);if(e==null)throw new Error("Cannot find textarea instance by editor");return e},getToolbar:function(t){return ay.get(t)||null},getHoverbar:function(t){return dv.get(t)||null},normalizeContent:function(t){t.children.forEach(function(e,n){t.normalizeNode([e,[n]])})},getLeftLengthOfMaxLength:function(t){var e=t.getConfig(),n=e.maxLength,r=e.onMaxLength;if(typeof n!="number"||n<=0)return 1/0;var o=n-t.getText().replace(/\r|\n|(\r\n)/g,"").length;return o<=0&&r&&r(t),o},cleanExposedTexNodeInSelectionBlock:function(t){var e,n,r,o,i=A.getTextarea(t).$textArea,a=i==null?void 0:i[0].childNodes;if(a)try{for(var u=Dr(Array.from(a)),s=u.next();!s.done;s=u.next()){var l=s.value;if(l.nodeType!==3)break;l.remove()}}catch(g){e={error:g}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}var c=E.nodes(t,{match:function(g){return!(!ct.isElement(g)||t.isInline(g))},universal:!0});try{for(var f=Dr(c),p=f.next();!p.done;p=f.next()){var d=p.value;if(d!=null){var y=d[0];SN(A.toDOMNode(t,y),function(g,v){var m=B(v);m.attr("data-slate-string")||m.attr("data-slate-zero-width")||m.attr("data-w-e-reserve")||v.removeChild(g)})}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}},isLastNode:function(t,e){var n=t.children||[];return n[n.length-1]===e},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(t){var e,n,r=E.nodes(t,{match:function(u){return t.isVoid(u)}}),o=0;try{for(var i=Dr(r),a=i.next();!a.done;a=i.next())a.value,o++}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return o>0},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===""}},AJ=1,AN={},Jd={},OJ=dc.filter,kJ=ny("filter");De({target:"Array",proto:!0,forced:!kJ},{filter:function(t){return OJ(this,t,arguments.length>1?arguments[1]:void 0)}});var HE=`
|
||
|
|
\v\f\r \u2028\u2029\uFEFF`,g9=pt("".replace),gv="["+HE+"]",BJ=RegExp("^"+gv+gv+"*"),FJ=RegExp(gv+gv+"*$"),yb=function(t){return function(e){var n=ue(Tr(e));return 1&t&&(n=g9(n,BJ,"")),2&t&&(n=g9(n,FJ,"")),n}},_J={start:yb(1),end:yb(2),trim:yb(3)},TJ=cc.PROPER,PJ=_J.trim;De({target:"String",proto:!0,forced:function(t){return Zt(function(){return!!HE[t]()||"
"[t]()!=="
"||TJ&&HE[t].name!==t})}("trim")},{trim:function(){return PJ(this)}});var VE=[],ON={};function jJ(t,e,n){var r=n.isInline(t)?"span":"div";return"<"+r+">"+e+"</"+r+">"}var Qd,Ts,v9,mb,vv=X.Promise,y9=xe("species"),DD=function(t){var e=hs(t),n=ro.f;an&&e&&!e[y9]&&n(e,y9,{configurable:!0,get:function(){return this}})},NJ=X.TypeError,IJ=xe("species"),kN=function(t,e){var n,r=Le(t).constructor;return r===void 0||(n=Le(r)[IJ])==null?e:function(o){if(ty(o))return o;throw NJ(K1(o)+" is not a constructor")}(n)},BN=pt([].slice),FN=/(?:ipad|iphone|ipod).*applewebkit/i.test(vl),aa=Zr(X.process)=="process",UE=X.setImmediate,WE=X.clearImmediate,LJ=X.process,bb=X.Dispatch,RJ=X.Function,m9=X.MessageChannel,MJ=X.String,wb=0,pd={};try{Qd=X.location}catch{}var CD=function(t){if(Ie(pd,t)){var e=pd[t];delete pd[t],e()}},Eb=function(t){return function(){CD(t)}},b9=function(t){CD(t.data)},w9=function(t){X.postMessage(MJ(t),Qd.protocol+"//"+Qd.host)};UE&&WE||(UE=function(t){var e=BN(arguments,1);return pd[++wb]=function(){gD(re(t)?t:RJ(t),void 0,e)},Ts(wb),wb},WE=function(t){delete pd[t]},aa?Ts=function(t){LJ.nextTick(Eb(t))}:bb&&bb.now?Ts=function(t){bb.now(Eb(t))}:m9&&!FN?(mb=(v9=new m9).port2,v9.port1.onmessage=b9,Ts=Qu(mb.postMessage,mb)):X.addEventListener&&re(X.postMessage)&&!X.importScripts&&Qd&&Qd.protocol!=="file:"&&!Zt(w9)?(Ts=w9,X.addEventListener("message",b9,!1)):Ts="onreadystatechange"in Ud("script")?function(t){DE.appendChild(Ud("script")).onreadystatechange=function(){DE.removeChild(this),CD(t)}}:function(t){setTimeout(Eb(t),0)});var ef,hu,hd,ol,Db,Cb,xb,E9,_N={set:UE,clear:WE},zJ=/ipad|iphone|ipod/i.test(vl)&&X.Pebble!==void 0,$J=/web0s(?!.*chrome)/i.test(vl),HJ=Gp.f,Sb=_N.set,D9=X.MutationObserver||X.WebKitMutationObserver,C9=X.document,x9=X.process,Jh=X.Promise,S9=HJ(X,"queueMicrotask"),TN=S9&&S9.value;TN||(ef=function(){var t,e;for(aa&&(t=x9.domain)&&t.exit();hu;){e=hu.fn,hu=hu.next;try{e()}catch(n){throw hu?ol():hd=void 0,n}}hd=void 0,t&&t.enter()},FN||aa||$J||!D9||!C9?!zJ&&Jh&&Jh.resolve?((xb=Jh.resolve(void 0)).constructor=Jh,E9=Qu(xb.then,xb),ol=function(){E9(ef)}):aa?ol=function(){x9.nextTick(ef)}:(Sb=Qu(Sb,X),ol=function(){Sb(ef)}):(Db=!0,Cb=C9.createTextNode(""),new D9(ef).observe(Cb,{characterData:!0}),ol=function(){Cb.data=Db=!Db}));var Ab,A9,PN,O9,jN=TN||function(t){var e={fn:t,next:void 0};hd&&(hd.next=e),hu||(hu=e,ol()),hd=e},VJ=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=Sa(e),this.reject=Sa(n)},xD={f:function(t){return new VJ(t)}},GE=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},UJ=typeof window=="object",NN=_N.set,WJ=xe("species"),go="Promise",k9=kn.getterFor(go),GJ=kn.set,qJ=kn.getterFor(go),su=vv&&vv.prototype,bo=vv,nf=su,IN=X.TypeError,qE=X.document,SD=X.process,ml=xD.f,KJ=ml,YJ=!!(qE&&qE.createEvent&&X.dispatchEvent),LN=re(X.PromiseRejectionEvent),RN=!1,gd=Gd(go,function(){var t=X1(bo),e=t!==String(bo);if(!e&&Vd===66)return!0;if(Vd>=51&&/native code/.test(t))return!1;var n=new bo(function(o){o(1)}),r=function(o){o(function(){},function(){})};return(n.constructor={})[WJ]=r,!(RN=n.then(function(){})instanceof r)||!e&&UJ&&!LN}),XJ=gd||!sD(function(t){bo.all(t).catch(function(){})}),MN=function(t){var e;return!(!ce(t)||!re(e=t.then))&&e},AD=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&&JJ(t),t.rejection=1),c===!0?a=r:(d&&d.enter(),a=c(r),d&&(d.exit(),s=!0)),a===l.promise?p(IN("Promis
|
||
|
|
`)>=0)return;c&&(c=qN(c),I9(u,c)||u.push({text:c}))}}else{if(l.nodeName==="BR")return void(I9(u,`
|
||
|
|
`)||u.push({text:`
|
||
|
|
`}));var f=kD(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 yv)if(i[0].matches(a))return yv[a];return gQ}(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," ")}]),OD.forEach(function(a){i=a(t[0],i,e)}))}),o}function Bb(t,e){t.parents("pre").length===0&&(t[0].innerHTML=t[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/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 OD.forEach(function(o){r=o(t[0],r,e)}),r}function kD(t,e){WN.forEach(function(r){var o=r.selector,i=r.preParseHtml;t[0].matches(o)&&(t=B(i(t[0])))});var n=h9(t);return n==="span"?t.attr("data-w-e-type")?kb(t,e):Bb(t,e):n==="code"?h9(t.parent())==="pre"?kb(t,e):Bb(t,e):UN.includes(n)?Bb(t,e):kb(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 L9(t,e){e===void 0&&(e="");var n=[];e===""&&(e="<p><br></p>"),e.indexOf("<")!==0&&(e=e.split(/\n/).map(function(o){return"<p>"+o+"</p>"}).join(""));var r=B("<div>"+e+"</div>");return Array.from(r.children()).forEach(function(o){var i=kD(B(o),t);Array.isArray(i)?i.forEach(function(a){return n.push(a)}):n.push(i)}),n}var vQ=ro.f,R9=oy.fastKey,M9=kn.set,Fb=kn.getterFor,yQ={getConstructor:function(t,e,n,r){var o=t(function(l,c){iy(l,i),M9(l,{type:e,index:ey(null),first:void 0,last:void 0,size:0}),an||(l.size=0),c!=null&&Xd(c,l[r],{that:l,AS_ENTRIES:n})}),i=o.prototype,a=Fb(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=R9(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=R9(c);if(d!=="F")return p.index[d];for(f=p.first;f;f=f.next)if(f.key==c)return f};return Gl(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=Qu(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)}}),Gl(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&&vQ(i,"size",{get:function(){return a(this).size}}),o},setStrong:function(t,e,n){var r=e+" Iterator",o=Fb(e),i=Fb(r);cD(t,e,function(a,u){M9(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),DD(e)}};yN("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},yQ);var z9=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function $9(t,e){t.isInline(e)?(t.insertNode(e),e.type==="link"&&t.insertFragment([{text:""}])):N.insertNodes(t,e,{mode:"highest"})}var mQ=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",CJ(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},td=function(t){return t!=null},bQ={object:!0,function:!0,undefined:!0},wQ=/^\s*class[\s{/}]/,EQ=Function.prototype.toString,H9=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!!td(r)&&hasOwnProperty.call(bQ,typeof r)}(n))return!1;try{return!!n.constructor&&n.constructor.prototype===n}catch{return!1}}(e)}(t)&&!wQ.test(EQ.call(t))},BD=function(t){return t!=null},DQ=Object.keys,CQ=function(){try{return Object.keys("primitive"),!0}catch{return!1}}()?Object.keys:function(t){return DQ(BD(t)?Object(t):t)},xQ=function(t){if(!BD(t))throw new TypeError("Cannot use null or undefined");return t},SQ=Math.max,V9=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=SQ(arguments.length,2);for(t=Object(xQ(t)),o=function(a){try{t[a]=e[a]}catch(u){n||(n=u)}},r=1;r<i;++r)CQ(e=arguments[r]).forEach(o);if(n!==void 0)throw n;return t},AQ=Array.prototype.forEach,OQ=Object.create,kQ=function(t,e){var n;for(n in t)e[n]=t[n]},U9=function(t){var e=OQ(null);return AQ.call(arguments,function(n){BD(n)&&kQ(Object(n),e)}),e},_b="razdwatrzy",BQ=String.prototype.indexOf,of=typeof _b.contains=="function"&&_b.contains("dwa")===!0&&_b.contains("foo")===!1?String.prototype.contains:function(t){return BQ.call(this,t,arguments[1])>-1},t0=Up(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],td(n)?(o=of.call(n,"c"),i=of.call(n,"e"),a=of.call(n,"w")):(o=a=!0,i=!1),s={value:r,configurable:o,enumerable:i,writable:a},u?V9(U9(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],td(r)?H9(r)?td(o)?H9(o)||(u=o,o=void 0):o=void 0:(u=r,r=o=void 0):r=void 0,td(n)?(i=of.call(n,"c"),a=of.call(n,"e")):(i=!0,a=!1),s={get:r,set:o,configurable:i,enumerable:a},u?V9(U9(u),s):s}}),Tb=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");return t},FQ=Up(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 Tb(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 Tb(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(Tb(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];retur
|
||
|
|
`:t)}function jb(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 ZE(t,e,n,r){return Zd.set(t,e),ql.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]||HQ}(p);a=l?null:y.map(function(D,x){return ZE(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"}},ZE(b,0,o,i));v=bt(m,{style:{position:"relative"}},v,w),Zd.set(b,0),ql.set(b,o)}return v.data==null&&(v.data={}),Object.assign(v.data,f),l||s||(v=function(D,x){var C=x;return XE.forEach(function(O){C=O(D,x)}),C}(o,v)),Pr(function(){var D=ME(c);D!=null&&(RE.set(u,D),hv.set(o,D),pv.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),_=j.parent(O);if(E.isEditor(D))throw new Error("Text node "+JSON.stringify(w)+" parent is Editor");return x.isVoid(D)?jb(Q.string(D).length):C!==""||D.children[D.children.length-1]!==w||x.isInline(D)||E.string(x,_)!==""?C===""?jb():b&&C.slice(-1)===`
|
||
|
|
`?Y9(C,!0):Y9(C):jb(0,!0)}(g,v===f.length-1,o,i,a);return m=function(h,b){var w=b;return XE.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=ME(d);g!=null&&(RE.set(u,g),hv.set(o,g),pv.set(g,o))}),y}(t,n,r)}function VQ(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),Hl("div#"+g,{props:{contentEditable:!v}})}(o,a),l=e.children||[];s.children=l.map(function(g,v){var m=ZE(g,v,e,e);return XN(m),m});var c=s9.get(t);if(c==null&&(c=!0),c){var f=function(g,v){return B(`<div
|
||
|
|
id="`+g+`"
|
||
|
|
data-slate-editor
|
||
|
|
data-slate-node="value"
|
||
|
|
suppressContentEditableWarning
|
||
|
|
role="textarea"
|
||
|
|
spellCheck="true"
|
||
|
|
autoCorrect="true"
|
||
|
|
autoCapitalize="true"
|
||
|
|
></div>`)}(o);r.append(f),t.$textArea=f,n=f[0],(d=Pq([Nq,Mq,$q,Iq,Rq,jq]))(n,s),s9.set(t,!1),l9.set(t,d)}else{var p=c9.get(t),d=l9.get(t);if(p==null||d==null)return;n=p.elm,d(p,s)}if(n!=null||(n=ME(o))!=null){if((c?u:e.isFocused())&&n.focus({preventScroll:!0}),c){var y=ED(n);y&&DN.set(e,y)}wD.set(e,n),hv.set(e,n),pv.set(n,e),c9.set(t,s)}}function X9(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function Z9(t,e){return(!e||t!=="hidden")&&t!=="visible"&&t!=="clip"}function Nb(t,e){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var n=getComputedStyle(t,null);return Z9(n.overflowY,e)||Z9(n.overflowX,e)||function(r){var o=function(i){if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)}(t)}return!1}function n0(t,e,n,r,o,i,a,u){return i<t&&a>e||i>t&&a<e?0:i<=t&&u<=n||a>=e&&u>=n?i-t-r:a>e&&u<n||i<t&&u>n?a-e+o:0}function J9(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(!X9(t))throw new TypeError("Invalid target");for(var l=document.scrollingElement||document.documentElement,c=[],f=t;X9(f)&&s(f);){if((f=f.parentElement)===l){c.push(f);break}f!=null&&f===document.body&&Nb(f)&&!Nb(document.documentElement)||f!=null&&Nb(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,_=[],R=0;R<c.length;R++){var H=c[R],M=H.getBoundingClientRect(),K=M.height,U=M.width,W=M.top,q=M.right,nt=M.bottom,lt=M.left;if(r==="if-needed"&&b>=0&&x>=0&&D<=d&&w<=p&&b>=W&&D<=nt&&x>=lt&&w<=q)return _;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"?n0(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:n0(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"?n0(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:n0(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)))}_.push({el:H,top:$,left:Y})}return _}function Q9(t){return t===Object(t)&&Object.keys(t).length!==0}function mr(t,e){return ts(e)&&A.hasDOMNode(t,e,{editable:!0})}function tO(t,e){if(t.getConfig().readOnly)return!1;var n=al(t,e)&&A.toSlateNode(t,e);return E.isVoid(t,n)}function al(t,e){return ts(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=wD.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;(
|
||
|
|
`+r:n;t.attr("data-tooltip",a),t.addClass("w-e-menu-tooltip-v5")}}}vD("match",function(t,e,n){return[function(r){var o=Tr(this),i=r==null?void 0:Ju(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 Yd(o,i);var u=o.unicode;o.lastIndex=0;for(var s,l=[],c=0;(s=Yd(o,i))!==null;){var f=ue(s[0]);l[c]=f,f===""&&(o.lastIndex=yD(i,fc(o.lastIndex),u)),c++}return c===0?null:l}]});var ND=function(){function t(e,n,r){var o=this;r===void 0&&(r=!1),this.$elem=B('<div class="w-e-bar-item"></div>'),this.$button=B('<button type="button"></button>'),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);PD(d),p.append(d)}else p.text(u);tI(p,f,u,l,r),r&&f&&p.append(B('<span class="title">'+u+"</span>")),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}(),XQ=function(t){function e(n,r,o){return o===void 0&&(o=!1),t.call(this,n,r,o)||this}return pc(e,t),e.prototype.onButtonClick=function(){},e}(ND),ID=function(){function t(e){this.isShow=!1,this.showTime=0,this.record(e)}return t.prototype.record=function(e){var n=LE.get(e);n==null&&(n=new Set,LE.set(e,n)),n.add(this),ng.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=ng.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=ng.get(this);e&&e.emit("modalOrPanelHide")}},t}(),ZQ=function(t){function e(n){var r=t.call(this,n)||this;return r.type="dropPanel",r.$elem=B('<div class="w-e-drop-panel"></div>'),r}return pc(e,t),e.prototype.genSelfElem=function(){return null},e}(ID),JQ=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=jD();i.$button.append(a)}return i}return pc(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 ZQ(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}(ND),QQ=function(t){function e(n,r){r===void 0&&(r=0);var o=t.call(this,n)||this;o.type="modal",o.$elem=B('<div class="w-e-modal"></div>'),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 pc(e,t),e.prototype.genSelfElem=function(){var n=this,r=B('<span class="btn-close"><svg viewBox="0 0 1024 1024"><path d="
|
||
|
|
`)},h.getSelectionText=function(){var C=h.selection;return C==null?"":E.string(m,C)},h.getElemsByType=function(C,O){var _,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){_={error:nt}}finally{try{U&&!U.done&&(R=K.return)&&R.call(K)}finally{if(_)throw _.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 _=O[0];if(_==null)return!0;if(ct.isElement(_)&&_.type==="paragraph"){var R=_.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 _=document.createElement("div");_.innerHTML=C;var R=Array.from(_.childNodes);if(R=R.filter(function(U){var W=U.nodeType,q=U.nodeName;return W===mo.TEXT_NODE||W===mo.ELEMENT_NODE&&!z9.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]]),_.setAttribute("hidden","true"),document.body.appendChild(_);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 yv)if(st.matches(k)){at=!0;break}if(at){var S=kD(B(st),h);return Array.isArray(S)?(S.forEach(function($){return $9(h,$)}),K++):($9(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}),_.remove()}}}},h.setHtml=function(C){C===void 0&&(C="");var O=h.isDisabled(),_=h.isFocused(),R=JSON.stringify(h.selection);h.enable(),h.focus(),h.clear();var H=L9(h,C);if(N.insertFragment(h,H),_||(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 Jd)b.push(w);return b},h.getConfig=function(){var b=u9.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=mQ($W());return h.id="wangEditor-"+AJ++,h.isDestroyed=!1,h.isFullScreen=!1,h.focus=function(b){if(A.toDOMNode(h,h).focus({preventScroll:!0}),_u.set(h,!0),b){var w=E.end(h,[]);N.select(h,w)}else{var D=gb.get(h);D?N.select(h,D):N.select(h,E.start(h,[]))}},h.isFocused=function(){return!!_u.get(h)},h.blur=function(){A.toDOMNode(h,h).blur(),N.deselect(h),_u.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(),jE.delete(h),NE.delete(b);var w=A.getToolbar(h);w&&(w.destroy(),ay.delete(h),mD.delete(w));var D=A.getHoverbar(h);D&&(D.destroy(),dv.delete(h),IE.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,_=C.$scroll,R=D.offset().top,H=O.offset().top;_[0].scrollBy({top:R-H,behavior:"smooth"})}},h.showProgressBar=function(b){b<1||A.getTextarea(h).changeProgress(b)},h.hidePanelOrModal=function(){var b=LE.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=Tj(AN),b={},w=m.MENU_CONF,D=w===void 0?{}:w;return H5(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);u9.set(l,c);var f=c.hoverbarKeys,p=f===void 0?{}:f;if(s.forEach(function(m){l=m(l)}),a!=null&&(l.children=L9(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 YQ(n);jE.set(l,d),NE.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 ott,IE.set(y,l),dv.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 att=ny("splice"),utt=X.TypeError,stt=Math.max,ltt=Math.min;De({target:"Array",proto:!0,forced:!att},{splice:function(t,e){var n,r,o,i,a,u,s=Ia(this),l=gs(s),c=Vl(t,l),f=arguments.length;if(f===0?n=r=0:f===1?(n=0,r=l-c):(n=f-2,r=ltt(stt(Wp(e),0),l-c)),l+n-r>9007199254740991)throw utt("Maximum allowed length exceeded");for(o=Qj(s,r),i=0;i<r;i++)(a=c+i)in s&&qd(o,i,s[a]);if(o.length=r,n<r){for(i=c;i<l-r;i++)u=i+n,(a=i+r)in s?s[u]=s[a]:delete s[u];for(i=l;i>l-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<n;i++)s[i+c]=arguments[i+2];return s.length=l-r+n,o}});var ctt=function(){function t(e,n){var r=this;this.$toolbar=B('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.changeToolbarState=_j(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=Tj(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 nO(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 nO,i=this.menus,a=i[e];if(a==null){var u=Jd[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),bD.set(s,r),o?n.appendBarItem(s):n.$toolbar.append(s.$elem)},t.prototype.getEditorInstance=function(){var e=mD.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}(),ftt=cc.EXISTS,dtt=ro.f,rI=Function.prototype,ptt=pt(rI.toString),oI=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,htt=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.onProgress,R=_===void 0?function(K){}:_;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=[];H5(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 Zf({onBeforeUpload:w,restrictions:{maxFileSize:a,maxNumberOfFiles:s},meta:c}).use($Y,{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 ua(t){return ua=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},ua(t)}function gtt(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;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),r.forEach(function(o){gtt(t,o,n[o])})}return t}function li(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ci(t,e,n){return e&&oO(t.prototype,e),n&&oO(t,n),t}function es(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tp(t,e){if(e&&(ua(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return es(t)}function Kl(t){return Kl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Kl(t)}function JE(t,e){return JE=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},JE(t,e)}function uy(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&JE(t,e)}an&&!ftt&&dtt(rI,"name",{configurable:!0,get:function(){try{return htt(oI,ptt(this))[1]}catch{return""}}});var vtt={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){console&&console[t]&&console[t].apply(console,e)}},ti=new(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};li(this,t),this.init(e,n)}return ci(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||vtt,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;r<e;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,n,r,o){return o&&!this.debug?null:(typeof e[0]=="string"&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.
|
||
|
|
`)&&t.flags==="s")}),Qet=St.RegExp,tnt=Ce(function(){var t=Qet("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),ent=i6.get,nnt=HD("native-string-replace",String.prototype.replace),Av=RegExp.prototype.exec,u6=Av,rnt=yt("".charAt),ont=yt("".indexOf),int=yt("".replace),Gb=yt("".slice),qb=(Wb=/b*/g,_e(Av,TO=/a/,"a"),_e(Av,Wb,"a"),TO.lastIndex!==0||Wb.lastIndex!==0),PO=kI.BROKEN_CARET,Kb=/()??/.exec("")[1]!==void 0;(qb||Kb||PO||Jet||tnt)&&(u6=function(t){var e,n,r,o,i,a,u,s=this,l=ent(s),c=Ee(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=_e(u6,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=PO&&s.sticky,y=_e(OI,s),g=s.source,v=0,m=c;if(d&&(y=int(y,"y",""),ont(y,"g")===-1&&(y+="g"),m=Gb(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&rnt(c,s.lastIndex-1)!==`
|
||
|
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),Kb&&(n=new RegExp("^"+g+"$(?!\\s)",y)),qb&&(r=s.lastIndex),o=_e(Av,d?n:s,m),d?o?(o.input=Gb(o.input,v),o[0]=Gb(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:qb&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),Kb&&o&&o.length>1&&_e(nnt,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&p)for(o.groups=a=_I(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var rp=u6;tn({target:"RegExp",proto:!0,forced:/./.exec!==rp},{exec:rp});var tC=Function.prototype,jO=tC.apply,ant=tC.bind,NO=tC.call,TI=typeof Reflect=="object"&&Reflect.apply||(ant?NO.bind(jO):function(){return NO.apply(jO,arguments)}),unt=dr("species"),Yb=RegExp.prototype,eC=function(t,e,n,r){var o=dr(t),i=!Ce(function(){var l={};return l[o]=function(){return 7},""[t](l)!=7}),a=i&&!Ce(function(){var l=!1,c=/a/;return t==="split"&&((c={}).constructor={},c.constructor[unt]=function(){return c},c.flags="",c[o]=/./[o]),c.exec=function(){return l=!0,null},c[o](""),!l});if(!i||!a||n){var u=yt(/./[o]),s=e(o,""[t],function(l,c,f,p,d){var y=yt(l),g=c.exec;return g===rp||g===Yb.exec?i&&!d?{done:!0,value:u(c,f,p)}:{done:!0,value:y(f,c,p)}:{done:!1}});ep(String.prototype,t,s[0]),ep(Yb,o,s[1])}r&&Yl(Yb[o],"sham",!0)},snt=yt("".charAt),IO=yt("".charCodeAt),lnt=yt("".slice),cnt=function(t){return function(e,n){var r,o,i=Ee(jr(e)),a=yc(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=IO(i,a))<55296||r>56319||a+1===u||(o=IO(i,a+1))<56320||o>57343?t?snt(i,a):r:t?lnt(i,a,a+2):o-56320+(r-55296<<10)+65536}},fnt=cnt(!0),nC=function(t,e,n){return e+(n?fnt(t,e).length:1)},dnt=Math.floor,Xb=yt("".charAt),pnt=yt("".replace),Zb=yt("".slice),hnt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,gnt=/\$([$&'`]|\d{1,2})/g,vnt=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=gnt;return o!==void 0&&(o=Yp(o),s=hnt),pnt(i,s,function(l,c){var f;switch(Xb(c,0)){case"$":return"$";case"&":return t;case"`":return Zb(e,0,n);case"'":return Zb(e,a);case"<":f=o[Zb(c,1,-1)];break;default:var p=+c;if(p===0)return l;if(p>u){var d=dnt(p/10);return d===0?l:d<=u?r[d-1]===void 0?Xb(c,1):r[d-1]+Xb(c,1):l}f=r[p-1]}return f===void 0?"":f})},ynt=St.TypeError,op=function(t,e){var n=t.exec;if(hn(n)){var r=_e(n,t,e);return r!==null&&rr(r),r}if(sa(t)==="RegExp")return _e(rp,t,e);throw ynt("RegExp#exec called on incompatible receiver")},s6=dr("replace"),mnt=Math.max,bnt=Math.min,wnt=yt([].concat),Jb=yt([].push),LO=yt("".indexOf),RO=yt("".slice),Ent="a".replace(/./,"$0")==="$0",MO=!!/./[s6]&&/./[s6]("a","$0")==="";eC("replace",function(t,e,n){var r=MO?"$":"$0";return[function(o,i){var a=jr(this),u=o==null?void 0:fy(o,s6);return u?_e(u,o,a,i):_e(e,Ee(a),o,i)},function(o,i){var a=rr(this),u=Ee(o);if(typeof i=="string"&&LO(i,r)===-1&&LO(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=op(a,u);if(d===null||(Jb(p,d),!c))break;Ee(d[0])===""&&(a.lastIndex=nC(u,Xp(a.lastIndex),f))}for(var y,g="",v=0,m=0;m<p.length;m++){for(var h=Ee((d=p[m])[0]),b=mnt(bnt(yc(d.index),u.length),0),w=[],D=1;D<d.length;D++)Jb(w,(y=d[D])===void 0?y:String(y));var x=d.groups;if(l){var C=wnt([h],w,b,u);x!==void 0&&Jb(C,x);var O=Ee(TI(i,void 0,C))}else O=vnt(h,u,b,w,x,i);b>=v&&(g+=RO(u,v,b)+O,v=b+h.length)}return g+RO(u,v)}]},!!Ce(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$<a>")!=="7"})||!Ent||MO);var l6=dr("unscopables"),c6=Array.prototype;c6[l6]==null&&vc.f(c6,l6,{configurable:!0,value:_I(null)});var PI=function(t){c6[l6][t]=!0},Dnt=hy.find,zO=!0;"find"in[]&&Array(1).find(function(){zO=!1}),tn({target:"Array",proto:!0,forced:zO},{find:function(t){return Dnt(this,t,arguments.length>1?arguments[1]:void 0)}}),PI("find");var Cnt=dr("match"),jI=function(t){var e;return Cr(t)&&((e=t[Cnt])!==void 0?!!e:sa(t)=="RegExp")},xnt=St.TypeError,Snt=dr("species"),NI=function(t,e,n){var r=VD(e);r in t?vc.f(t,r,MD(0,n)):t[r]=n},Ant=St.Array,Ont=Math.max,$O=function(t,e,n){for(var r=py(t),o=np(e,r),i=np(n==
|
||
|
|
\v\f\r \u2028\u2029\uFEFF`,HO=yt("".replace),Ov="["+f6+"]",Fnt=RegExp("^"+Ov+Ov+"*"),_nt=RegExp(Ov+Ov+"*$"),Qb=function(t){return function(e){var n=Ee(jr(e));return 1&t&&(n=HO(n,Fnt,"")),2&t&&(n=HO(n,_nt,"")),n}},Tnt={start:Qb(1),end:Qb(2),trim:Qb(3)},Pnt=dy.PROPER,jnt=Tnt.trim;function rC(t){return B("<div>"+t+"</div>").children().filter(function(e){return e.tagName!=="BR"}).length===0}function mc(t){return t.length===0?"":t[0].outerHTML}function bc(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;i<o;i++){var a=r[i];if(a){var u=a.split(":");u[0].trim()===e&&(n=u[1].trim())}}return n}tn({target:"String",proto:!0,forced:Ce(function(){return!!f6.trim()||"
".trim()!=="
"||Pnt&&f6.trim.name!=="trim"})},{trim:function(){return jnt(this)}}),tn({global:!0},{globalThis:St}),Jg&&(B.fn.css=Jg),_r&&(B.fn.append=_r),BA&&(B.fn.prepend=BA),Tl&&(B.fn.addClass=Tl),Pl&&(B.fn.removeClass=Pl),jl&&(B.fn.hasClass=jl),ko&&(B.fn.on=ko),SA&&(B.fn.off=SA),xa&&(B.fn.focus=xa),Fr&&(B.fn.attr=Fr),Kg&&(B.fn.removeAttr=Kg),Il&&(B.fn.hide=Il),Zg&&(B.fn.show=Zg),ev&&(B.fn.parents=ev),Nl&&(B.fn.dataset=Nl),Oo&&(B.fn.val=Oo),tv&&(B.fn.text=tv),Ca&&(B.fn.html=Ca),Ml&&(B.fn.children=Ml),zl&&(B.fn.remove=zl),Rl&&(B.fn.find=Rl),Yg&&(B.fn.width=Yg),Xg&&(B.fn.height=Xg),OA&&(B.fn.filter=OA),$l&&(B.fn.empty=$l);var Nnt={selector:"p: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:"paragraph",children:e}}},d6=function(t,e){return d6=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])},d6(t,e);/*! *****************************************************************************
|
||
|
|
Copyright (c) Microsoft Corporation.
|
||
|
|
|
||
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
|
purpose with or without fee is hereby granted.
|
||
|
|
|
||
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
|
***************************************************************************** */};function be(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}d6(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Oa=function(){return Oa=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Oa.apply(this,arguments)};function Ra(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(l){try{s(r.next(l))}catch(c){i(c)}}function u(l){try{s(r.throw(l))}catch(c){i(c)}}function s(l){var c;l.done?o(l.value):(c=l.value,c instanceof n?c:new n(function(f){f(c)})).then(a,u)}s((r=r.apply(t,e||[])).next())})}function Ma(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(s){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(c[0]===6&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(f){c=[6,f],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,l])}}}function LI(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function 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 VO(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 Int={renderElems:[Mtt],elemsToHtml:[{type:"paragraph",elemToHtml:function(t,e){return e===""?"<p><br></p>":"<p>"+e+"</p>"}}],parseElemsHtml:[Nnt],editorPlugin:function(t){var e=t.deleteBackward,n=t.deleteForward;t.insertText,t.insertBreak;var r=t;return r.deleteBackward=function(o){VO(r)||e(o)},r.deleteForward=function(o){VO(r)||n(o)},r}},Lnt=/"/g,Rnt=yt("".replace),ed=function(t,e,n,r){var o=Ee(jr(t)),i="<"+e;return n!==""&&(i+=" "+n+'="'+Rnt(Ee(r),Lnt,""")+'"'),i+">"+o+"</"+e+">"},nd=function(t){return Ce(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})};function t2(t,e){var n=e,r=t,o=r.bold,i=r.italic,a=r.underline;return o&&(n="<strong>"+n+"</strong>"),r.code&&(n="<code>"+n+"</code>"),i&&(n="<em>"+n+"</em>"),a&&(n="<u>"+n+"</u>"),r.through&&(n="<s>"+n+"</s>"),r.sub&&(n="<sub>"+n+"</sub>"),r.sup&&(n="<sup>"+n+"</sup>"),n}function Qa(t,e){return t.length!==0&&(!!t[0].matches(e)||t.find(e).length>0)}tn({target:"String",proto:!0,forced:nd("bold")},{bold:function(){return ed(this,"b","","")}}),tn({target:"String",proto:!0,forced:nd("italics")},{italics:function(){return ed(this,"i","","")}}),tn({target:"String",proto:!0,forced:nd("sub")},{sub:function(){return ed(this,"sub","","")}}),tn({target:"String",proto:!0,forced:nd("sup")},{sup:function(){return ed(t
|
||
|
|
<li data-value="0" class="clear">
|
||
|
|
<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>
|
||
|
|
`+u+`
|
||
|
|
</li>
|
||
|
|
`);return o.prepend(s),o[0]},t}(),Vrt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("color.color"),n.iconSvg=qnt,n.mark="color",n}return be(e,t),e}(YI),Urt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("color.bgColor"),n.iconSvg=Knt,n.mark="bgColor",n}return be(e,t),e}(YI),XO=["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)"],Wrt={renderStyle:function(t,e){var n=t,r=n.color,o=n.bgColor,i=e;return r&&ns(i,{color:r}),o&&ns(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?((rC(e)||bc(n=B(e))!=="span")&&(n=B("<span>"+e+"</span>")),o&&n.css("color",o),i&&n.css("background-color",i),mc(n)):e},preParseHtml:[Hrt],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 Vrt},config:{colors:XO}},{key:"bgColor",factory:function(){return new Urt},config:{colors:XO}}]},Grt=/^(?:\w+:)?\/\/(\S+)$/,qrt=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,Krt=/^[^\s\.]+\.\S{2,}$/,Yrt=EI.includes;function gy(t){return t===void 0&&(t="r"),t+"-"+yj()}function oC(t){return t.replace(/</g,"<").replace(/>/g,">")}function XI(t,e,n,r){return Ra(this,void 0,void 0,function(){var o,i;return Ma(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 Ra(this,void 0,void 0,function(){var r;return Ma(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 iC(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 i2(t,e){return{type:"link",url:oC(t),children:e?[{text:e}]:[]}}function JI(t,e,n){return Ra(this,void 0,void 0,function(){var r,o,i;return Ma(this,function(a){switch(a.label){case 0:return n?(e||(e=n),t.restoreSelection(),iC(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=i2(r,e),N.insertNodes(t,i),t.insertFragment([{text:" "}])):E.string(t,o)!==e?(t.deleteFragment(),i=i2(r,e),N.insertNodes(t,i)):(i=i2(r),N.wrapNodes(t,i,{split:!0}),N.collapse(t,{edge:"end"}))),[2]}})})}tn({target:"Array",proto:!0},{includes:function(t){return Yrt(this,t,arguments.length>1?arguments[1]:void 0)}}),PI("
|
||
|
|
`)return t.deleteBackward("character"),void N.insertNodes(r,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}n(`
|
||
|
|
`)},r}},Bot=function(){function t(){this.title=tt("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',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('<ul class="w-e-panel-content-emotion"></ul>');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("<li>"+i+"</li>");r.append(a)}),r[0]},t}(),Fot={menus:[{key:"emotion",factory:function(){return new Bot},config:{emotions:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏".split(" ")}}]},_ot={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(bc(e)!=="font")return t;var n=e.attr("size")||"";n&&(e.removeAttr("size"),e.css("font-size",_ot[n]));var r=e.attr("face")||"";return r&&(e.removeAttr("face"),e.css("font-family",r)),e[0]}},Pot=yt("".indexOf);tn({target:"String",proto:!0,forced:!WI("includes")},{includes:function(t){return!!~Pot(Ee(jr(this)),Ee(UI(t)),arguments.length>1?arguments[1]:void 0)}});var _i,ag,s0=function(t){return t&&t.Math==Math&&t},Ft=s0(typeof globalThis=="object"&&globalThis)||s0(typeof window=="object"&&window)||s0(typeof self=="object"&&self)||s0(typeof Ev=="object"&&Ev)||function(){return this}()||Function("return this")(),uC=Function.prototype,rk=uC.apply,jot=uC.bind,ok=uC.call,rL=typeof Reflect=="object"&&Reflect.apply||(jot?ok.bind(rk):function(){return ok.apply(rk,arguments)}),oL=Function.prototype,g6=oL.bind,v6=oL.call,Not=g6&&g6.bind(v6),Te=g6?function(t){return t&&Not(v6,t)}:function(t){return t&&function(){return v6.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}),gf=Function.prototype.call,qr=gf.bind?gf.bind(gf):function(){return gf.apply(gf,arguments)},ik={}.propertyIsEnumerable,ak=Object.getOwnPropertyDescriptor,Iot=ak&&!ik.call({1:2},1)?function(t){var e=ak(this,t);return!!e&&e.enumerable}:ik,sC={f:Iot},rs=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Lot=Te({}.toString),Rot=Te("".slice),Nu=function(t){return Rot(Lot(t),8,-1)},l2=Ft.Object,Mot=Te("".split),iL=lr(function(){return!l2("z").propertyIsEnumerable(0)})?function(t){return Nu(t)=="String"?Mot(t,""):l2(t)}:l2,zot=Ft.TypeError,lC=function(t){if(t==null)throw zot("Can't call method on "+t);return t},No=function(t){return iL(lC(t))},xr=function(t){return typeof t=="object"?t!==null:gn(t)},br={},uk=function(t){return gn(t)?
|
||
|
|
`).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}(),qat={key:"codeBlock",factory:function(){return new Gat}};tn({target:"String",proto:!0,forced:nd("anchor")},{anchor:function(t){return ed(this,"a","name",t)}}),eC("match",function(t,e,n){return[function(r){var o=jr(this),i=r==null?void 0:fy(r,t);return i?_e(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 op(o,i);var u=o.unicode;o.lastIndex=0;for(var s,l=[],c=0;(s=op(o,i))!==null;){var f=Ee(s[0]);l[c]=f,f===""&&(o.lastIndex=nC(i,Xp(o.lastIndex),u)),c++}return c===0?null:l}]});var Kat={type:"pre",renderElem:function(t,e,n){return bt("pre",null,e)}},Yat={type:"code",renderElem:function(t,e,n){return bt("code",null,e)}},Xat={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"})}}},Zat={menus:[qat],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:[Kat,Yat],elemsToHtml:[{type:"code",elemToHtml:function(t,e){return"<code>"+e+"</code>"}},{type:"pre",elemToHtml:function(t,e){return"<pre>"+e+"</pre>"}}],preParseHtml:[{selector:"pre>code",preParseHtml:function(t){var e=B(t);if(bc(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||""}]}}},Xat]},Jat=function(){function t(){this.title=tt("fullScreen.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z"></path></svg>',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}(),Qat={menus:[{key:"fullScreen",factory:function(){return new Jat}}]},tut=function(){function t(){this.title=tt("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',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}(),eut=[prt,Wrt,xat,kat,Pat,Nat,got,$at,Fot,not,Zat,kot,zrt,Int,bot,Rat,Qat,{menus:[{key:"enter",factory:function(){return new tut}}]}];qn("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),qn("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var zk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yC(t){var e={exports:{}};return t(e,e.exports),e.exports}var Pi,sg,d0=function(t){return t&&t.Math==Math&&t},wt=d0(typeof globalThis=="object"&&globalThis)||d0(typeof window=="object"&&window)||d0(typeof self=="object"&&self)||d0(typeof zk=="object"&&zk)||function(){return thi
|
||
|
|
Copyright (c) Microsoft Corporation.
|
||
|
|
|
||
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
|
purpose with or without fee is hereby granted.
|
||
|
|
|
||
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
|
***************************************************************************** */};function sR(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}V6(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function xB(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function wd(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 SB(t){return E.nodes(t,{at:t.selection||void 0,match:function(e){return A.findPath(t,e).length===1}})}var Gst=ML.includes;Ba({target:"Array",proto:!0},{includes:function(t){return Gst(this,t,arguments.length>1?arguments[1]:void 0)}}),md("includes");var AB,T2,qst=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},NC=wt.RegExp,U6=Oe(function(){var t=NC("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),Kst=U6||Oe(function(){return!NC("a","y").sticky}),Yst={BROKEN_CARET:U6||Oe(function(){var t=NC("^r","gy");return t.lastIndex=2,t.exec("str")!=null}),MISSED_STICKY:Kst,UNSUPPORTED_Y:U6},Xst=wt.RegExp,Zst=Oe(function(){var t=Xst(".","s");return!(t.dotAll&&t.exec(`
|
||
|
|
`)&&t.flags==="s")}),Jst=wt.RegExp,Qst=Oe(function(){var t=Jst("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),tlt=Bo.get,elt=bC("native-string-replace",String.prototype.replace),Uv=RegExp.prototype.exec,W6=Uv,nlt=jt("".charAt),rlt=jt("".indexOf),olt=jt("".replace),P2=jt("".slice),j2=(T2=/b*/g,en(Uv,AB=/a/,"a"),en(Uv,T2,"a"),AB.lastIndex!==0||T2.lastIndex!==0),OB=Yst.BROKEN_CARET,N2=/()??/.exec("")[1]!==void 0;(j2||N2||OB||Zst||Qst)&&(W6=function(t){var e,n,r,o,i,a,u,s=this,l=tlt(s),c=Yo(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=en(W6,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=OB&&s.sticky,y=en(qst,s),g=s.source,v=0,m=c;if(d&&(y=olt(y,"y",""),rlt(y,"g")===-1&&(y+="g"),m=P2(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&nlt(c,s.lastIndex-1)!==`
|
||
|
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),N2&&(n=new RegExp("^"+g+"$(?!\\s)",y)),j2&&(r=s.lastIndex),o=en(Uv,d?n:s,m),d?o?(o.input=P2(o.input,v),o[0]=P2(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:j2&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),N2&&o&&o.length>1&&en(elt,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&p)for(o.groups=a=AC(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Wv=W6;Ba({target:"RegExp",proto:!0,forced:/./.exec!==Wv},{exec:Wv});var lR=function(){function t(){this.type="list-item",this.tag="button"}return t.prototype.getListNode=function(e){var n=this.type;return A.getSelectedNodeByType(e,n)},t.prototype.getValue=function(e){return""},t.prototype.isActive=function(e){var n=this.getListNode(e);if(n==null)return!1;var r=n.ordered;return(r!==void 0&&r)===this.ordered},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","table"].includes(r)||void 0})},t.prototype.exec=function(e,n){this.isActive(e)?N.setNodes(e,{type:"paragraph",ordered:void 0,level:void 0}):N.setNodes(e,{type:"list-item",ordered:this.ordered,indent:void 0})},t}(),ilt='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',alt='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',ult=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.ordered=!1,n.title=tt("listModule.unOrderedList"),n.iconSvg=ilt,n}return sR(e,t),e}(lR),slt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.ordered=!0,n.title=tt("listModule.orderedList"),n.iconSvg=alt,n}return sR(e,t),e}(lR),llt={key:"bulletedList",factory:function(){return new ult}},clt={key:"numberedList",factory:function(){return new slt}},kB=[],flt={type:"list-item",elemToHtml:function(t,e){var n="",r="",o=t.ordered,i=o!==void 0&&o?"ol":"ul",a=function(l){var c=H6.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]===0)return v+1;var h=j.previous(m),b=E.node(c,h);if(!b)return 0;var w=wd(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,_=O===void 0?0:O;return _<v?v-_:_>v?0:_===v?C===y?0:1:0}(t);if(a>0)for(var u=0;u<a;u++)n+="<"+i+">",kB.push(i);var s=function(l){var c=H6.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=wd(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,_=O===void 0?0:O;return _<v?v-_:_>v?0:_===v?C===y?0:1:0}(t);if(s>0)for(u=0;u<s;u++)r+="</"+kB.pop()+">";return{html:"<li>"+e+"</li>",prefix:n,suffix:r}}},dlt=yn("species"),plt=jC.filter,hlt=k6>=51||!Oe(function(){var t=[];return(t.constructor={})[dlt]=function(){return{foo:1}},t.filter(Boolean).foo!==1});Ba({target:"Array",proto:!0,forced:!hlt},{filter:function(t){return plt(this,t,arguments.length>1?arguments[1]:void 0)}});var IC=Function.prototype,BB=IC.apply,glt=IC.bind,FB=IC.call,vlt=typeof Reflect=="object"&&Reflect.apply||(glt?FB.bind(BB):function(){return FB.apply(BB,arguments)}),_B=(yn("species"),RegExp.prototype),ylt=YL.charAt,mlt=function(t,e,n){return e+(n?ylt(t,e).length:1)},blt=Math.floor,I2=jt("".charAt),wlt=jt("".replace),L2=jt("".slice),Elt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Dlt=/\$([$&'`]|\d{1,2})/g,Clt=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=Dlt;return o!==void 0&&(o=ih(o),s=Elt),wlt(i,s,function(l,c)
|
||
|
|
`)&&t.flags==="s")}),$ct=Tt.RegExp,Hct=Ye(function(){var t=$ct("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),Vct=Q6.get,Uct=$C("native-string-replace",String.prototype.replace),Yv=RegExp.prototype.exec,e3=Yv,Wct=Rt("".charAt),Gct=Rt("".indexOf),qct=Rt("".replace),G2=Rt("".slice),q2=(W2=/b*/g,We(Yv,XB=/a/,"a"),We(Yv,W2,"a"),XB.lastIndex!==0||W2.lastIndex!==0),ZB=AR.BROKEN_CARET,K2=/()??/.exec("")[1]!==void 0;(q2||K2||ZB||zct||Hct)&&(e3=function(t){var e,n,r,o,i,a,u,s=this,l=Vct(s),c=An(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=We(e3,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=ZB&&s.sticky,y=We(SR,s),g=s.source,v=0,m=c;if(d&&(y=qct(y,"y",""),Gct(y,"g")===-1&&(y+="g"),m=G2(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Wct(c,s.lastIndex-1)!==`
|
||
|
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),K2&&(n=new RegExp("^"+g+"$(?!\\s)",y)),q2&&(r=s.lastIndex),o=We(Yv,d?n:s,m),d?o?(o.input=G2(o.input,v),o[0]=G2(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:q2&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),K2&&o&&o.length>1&&We(Uct,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&p)for(o.groups=a=BR(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var sp=e3;Ta({target:"RegExp",proto:!0,forced:/./.exec!==sp},{exec:sp});var Xv=Array.isArray||function(t){return pa(t)=="Array"},FR=function(){},Kct=[],_R=ch("Reflect","construct"),JC=/^\s*(?:class|function)\b/,Yct=Rt(JC.exec),Xct=!JC.exec(FR),Of=function(t){if(!vn(t))return!1;try{return _R(FR,Kct,t),!0}catch{return!1}},QC=!_R||Ye(function(){var t;return Of(Of.call)||!Of(Object)||!Of(function(){t=!0})||t})?function(t){if(!vn(t))return!1;switch(XC(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Xct||!!Yct(JC,WC(t))}:Of,TR=function(t,e,n){var r=VC(e);r in t?fh.f(t,r,LC(0,n)):t[r]=n},Zct=Nr("species"),t8=function(t){return Y6>=51||!Ye(function(){var e=[];return(e.constructor={})[Zct]=function(){return{foo:1}},e[t](Boolean).foo!==1})},Jct=Rt([].slice),Qct=t8("slice"),tft=Nr("species"),Y2=Tt.Array,eft=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 JB(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 QB(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:!Qct},{slice:function(t,e){var n,r,o,i=lh(this),a=Oy(i),u=up(t,a),s=up(e===void 0?a:e,a);if(Xv(i)&&(n=i.constructor,(QC(n)&&(n===Y2||Xv(n.prototype))||Sr(n)&&(n=n[tft])===null)&&(n=void 0),n===Y2||n===void 0))return Jct(i,u,s);for(r=new(n===void 0?Y2:n)(eft(s-u,0)),o=0;u<s;u++,o++)u in i&&TR(r,o,i[u]);return r.length=o,r}});var tF=Rt(Rt.bind),nft=Nr("species"),eF=Tt.Array,rft=function(t,e){return new(function(n){var r;return Xv(n)&&(r=n.constructor,(QC(r)&&(r===eF||Xv(r.prototype))||Sr(r)&&(r=r[nft])===null)&&(r=void 0)),r===void 0?eF:r}(t))(e===0?0:e)},nF=Rt([].push),Ii=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=HC(s),g=hR(y),v=function(D,x){return yR(D),x===void 0?D:tF?tF(D,x):function(){return D.apply(x,arguments)}}(l,c),m=Oy(g),h=0,b=f||rft,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:nF(w,p)}else switch(t){case 4:return!1;case 7:nF(w,p)}return i?-1:r||o?o:w}},ky={forEach:Ii(0),map:Ii(1),filter:Ii(2),some:Ii(3),every:Ii(4),find:Ii(5),findIndex:Ii(6),filterReject:Ii(7)},oft=ky.map;Ta({target:"Array",proto:!0,forced:!t8("map")},{map:function(t){return oft(this,t,arguments.length>1?arguments[1]:void 0)}});var ift=YC?{}.toString:function(){return"[object "+XC(this)+"]"};function By(t){var e=t.children||[];return e.length===0?[]:(e[0]||{}).children||[]}function PR(t){return By(t).every(function(e){return!!e.isHeader})}YC||ap(Object.prototype,"toString",ift,{unsafe:!0});var aft=qC.PROPER,n3=RegExp.prototype,jR=n3.toString,uft=Rt(SR),sf
|
||
|
|
\v\f\r \u2028\u2029\uFEFF`,sF=Rt("".replace),Zv="["+a3+"]",Sft=RegExp("^"+Zv+Zv+"*"),Aft=RegExp(Zv+Zv+"*$"),Z2=function(t){return function(e){var n=An(_a(e));return 1&t&&(n=sF(n,Sft,"")),2&t&&(n=sF(n,Aft,"")),n}},Oft={start:Z2(1),end:Z2(2),trim:Z2(3)},kft=qC.PROPER,Bft=Oft.trim;function MR(t){return t.length?t[0].tagName.toLowerCase():""}Ta({target:"String",proto:!0,forced:function(t){return Ye(function(){return!!a3[t]()||"
"[t]()!=="
"||kft&&a3[t].name!==t})}("trim")},{trim:function(){return Bft(this)}}),Ta({global:!0},{globalThis:Tt}),_r&&(B.fn.append=_r),ko&&(B.fn.on=ko),xa&&(B.fn.focus=xa),Fr&&(B.fn.attr=Fr),Oo&&(B.fn.val=Oo),Ca&&(B.fn.html=Ca),Nl&&(B.fn.dataset=Nl),Tl&&(B.fn.addClass=Tl),Pl&&(B.fn.removeClass=Pl),Ml&&(B.fn.children=Ml),Qg&&(B.fn.each=Qg),Rl&&(B.fn.find=Rl);var lp=!1,zR=0,$R=0,cp=null,fp=null,Dd=B("body");function HR(t){lp=!1,fp=null,cp=null,Dd.off("mousemove",VR),Dd.off("mouseup",HR)}Dd.on("mousedown",function(t){var e=t.target;if((e.tagName==="TH"||e.tagName==="TD")&&e.style.cursor==="col-resize"){e.style.cursor="auto",t.preventDefault(),lp=!0;var n=t.clientX;zR=n;var r=e.getBoundingClientRect().width;$R=r,Dd.on("mousemove",VR),Dd.on("mouseup",HR)}});var VR=Xu(function(t){if(lp&&fp!=null&&cp!=null){t.preventDefault();var e=t.clientX,n=$R+(e-zR);(n=Math.floor(100*n)/100)<30&&(n=30),N.setNodes(fp,{width:n.toString()},{at:cp})}},100),Fft={type:"table",renderElem:function(t,e,n){var r=function(u,s){if(u.isDisabled())return!1;var l=u.selection;if(l==null||L.isCollapsed(l))return!0;var c=l.anchor,f=l.focus,p=A.findPath(u,s),d=E.start(u,p),y=E.end(u,p),g=Bt.compare(c,y)<=0&&Bt.compare(c,d)>=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,By(t).map(function(u){var s=u.width;return bt("col",{width:s===void 0?"auto":s})})),bt("tbody",null,e)));return a}},_ft={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&&By(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:Xu(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;lp||(b>g+v-5&&b<g+v&&w>m&&w<m+h?(d.style.cursor="col-resize",fp=n,cp=A.findPath(n,t)):lp||(d.style.cursor="auto",fp=null,cp=null))}},100)}},e);return f}},Pft={selector:"table",preParseHtml:function(t){var e=B(t);if(MR(e)!=="table")return t;var n=e.find("tbody");if(n.length===0)return t;var r=e.find("tr");return e.append(r),n.remove(),e[0]}},jft=ky.filter;Ta({target:"Array",proto:!0,forced:!t8("filter")},{filter:function(t){return jft(this,t,arguments.length>1?arguments[1]:void 0)}});var Nft=Math.floor,J2=Rt("".charAt),Ift=Rt("".replace),Q2=Rt("".slice),Lft=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Rft=/\$([$&'`]|\d{1,2})/g,Mft=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=Rft;return o!==void 0&&(o=HC(o),s=Lft),Ift(i,s,function(l,c){var f;switch(J2(c,0)){case"$":return"$";case"&":return t;case"`":return Q2(e,0,n);case"'":return Q2(e,a);case"<":f=o[Q2(c,1,-1)];break;default:var p=+c;if(p===0)return l;if(p>u){var d=Nft(p/10);return d===0?l:d<=u?r[d-1]===void 0?J2(c,1):r[d-1]+J2(c,1):l}f=r[p-1]}return f===void 0?"":f})},u3=Nr("replace"),zft=Math.max,$ft=Math.min,Hft=Rt([].concat),tw=Rt([].push),lF=Rt("".indexOf),cF=Rt("".slice),Vft="a".replace(/./,"$0")===
|
||
|
|
`)},s.deleteBackward=function(l){if(!JB(s)){var c=s.selection;if(c){var f=E.before(s,c);if(f){var p=QB(s,f),d=QB(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){JB(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===`
|
||
|
|
`||/<img[^>]+>/.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 <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",width:"Width",height:"Height"}}),qn("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",width:"宽度",height:"高度"}});/*! *****************************************************************************
|
||
|
|
Copyright (c) Microsoft Corporation.
|
||
|
|
|
||
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
|
purpose with or without fee is hereby granted.
|
||
|
|
|
||
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
|
***************************************************************************** */var Jv=function(){return Jv=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Jv.apply(this,arguments)};function Fy(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(l){try{s(r.next(l))}catch(c){i(c)}}function u(l){try{s(r.throw(l))}catch(c){i(c)}}function s(l){var c;l.done?o(l.value):(c=l.value,c instanceof n?c:new n(function(f){f(c)})).then(a,u)}s((r=r.apply(t,e||[])).next())})}function _y(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(s){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(c[0]===6&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(f){c=[6,f],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,l])}}}function $u(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 idt(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=function(o){var i=typeof Symbol=="function"&&Symbol.iterator,a=i&&o[i],u=0;if(a)return a.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&u>=o.length&&(o=void 0),{value:o&&o[u++],done:!o}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(o){e[o]=t[o]&&function(i){return new Promise(function(a,u){(function(s,l,c,f){Promise.resolve(f).then(function(p){s({value:p,done:c})},l)})(a,u,(i=t[o](i)).done,i.value)})}}}var hF=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function n8(t){var e={exports:{}};return t(e,e.exports),e.exports}var Li,pg,D0=function(t){return t&&t.Math==Math&&t},rt=D0(typeof globalThis=="object"&&globalThis)||D0(typeof window=="object"&&window)||D0(typeof self=="object"&&self)||D0(typeof hF=="object"&&hF)||function(){return this}()||Function("return this")(),de=function(t){try{return!!t()}catch{return!0}},Fo=!de(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Bf=Function.prototype.call,le=Bf.bind?Bf.bind(Bf):function(){return Bf.apply(Bf,arguments)},gF={}.propertyIsEnumerable,vF=Object.getOwnPropertyDescriptor,adt={f:vF&&!gF.call({1:2},1)?function(t){var e=vF(this,t);return!!e&&e.enumerable}:gF},Ty=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},WR=Function.prototype,s3=WR.bind,l3=WR.call,udt=s3&&s3.bind(l3),Ct=s3?function(t){return t&&udt(l3,t)}:function(t){return t&&function(){return l3.apply(t,arguments)}},sdt=Ct({}.toString),ldt=Ct("".slice),xo=function(t){return ldt(sdt(t),8,-1)},ow=rt.Object,cdt=Ct("".split),r8=de(function(){return!ow("z").propertyIsEnumerable(0)})?function(t){return xo(t)=="String"?cdt(t,""):ow(t)}:ow,fdt=rt.TypeError,ph=function(t){if(t==null)throw fdt("Can't call method on "+t);return t},za=function(t){return r8(ph(t))},oe=function(t){return typeof
|
||
|
|
\v\f\r \u2028\u2029\uFEFF`,BF=Ct("".replace),i1="["+p3+"]",npt=RegExp("^"+i1+i1+"*"),rpt=RegExp(i1+i1+"*$"),uw=function(t){return function(e){var n=wr(ph(e));return 1&t&&(n=BF(n,npt,"")),2&t&&(n=BF(n,rpt,"")),n}},opt={start:uw(1),end:uw(2),trim:uw(3)},ipt=xc.PROPER,apt=opt.trim;function FF(t){return t.length?t[0].tagName.toLowerCase():""}function QR(t,e,n){e===void 0&&(e="auto"),n===void 0&&(n="auto");var r=B(t);return r.attr("width",e),r.attr("height",n),r[0].outerHTML}$n({target:"String",proto:!0,forced:de(function(){return!!p3.trim()||"
".trim()!=="
"||ipt&&p3.trim.name!=="trim"})},{trim:function(){return apt(this)}}),$n({global:!0},{globalThis:rt}),_r&&(B.fn.append=_r),ko&&(B.fn.on=ko),xa&&(B.fn.focus=xa),Fr&&(B.fn.attr=Fr),Oo&&(B.fn.val=Oo),Ca&&(B.fn.html=Ca),Ll&&(B.fn.parent=Ll),jl&&(B.fn.hasClass=jl),$l&&(B.fn.empty=$l);var C0,upt={type:"video",renderElem:function(t,e,n){var r,o=t,i=o.src,a=i===void 0?"":i,u=o.poster,s=u===void 0?"":u,l=o.width,c=l===void 0?"auto":l,f=o.height,p=f===void 0?"auto":f,d=A.isNodeSelected(n,t);if(a.trim().indexOf("<iframe ")===0)r=bt("div",{className:"w-e-textarea-video-container","data-selected":d?"true":"",innerHTML:QR(a,c,p)});else{var y=bt("video",{poster:s,controls:!0},bt("source",{src:a,type:"video/mp4"}),`Sorry, your browser doesn't support embedded videos.
|
||
|
|
抱歉,浏览器不支持 video 视频`);c!=="auto"&&(y.data.width=c),p!=="auto"&&(y.data.height=p),r=bt("div",{className:"w-e-textarea-video-container","data-selected":d?"true":""},y)}return Hl("div",{props:{contentEditable:!1},on:{mousedown:function(g){return g.preventDefault()}}},r)}},spt={type:"video",elemToHtml:function(t,e){var n=t,r=n.src,o=r===void 0?"":r,i=n.poster,a=i===void 0?"":i,u=n.width,s=u===void 0?"auto":u,l=n.height,c=l===void 0?"auto":l,f=`<div data-w-e-type="video" data-w-e-is-void>
|
||
|
|
`;return o.trim().indexOf("<iframe ")===0?f+=QR(o,s,c):f+='<video poster="'+a+'" controls="true" width="'+s+'" height="'+c+'"><source src="'+o+'" type="video/mp4"/></video>',f+`
|
||
|
|
</div>`}},lpt=Object.keys||function(t){return ZR(t,n1)},cpt=Fo?Object.defineProperties:function(t,e){fn(t);for(var n,r=za(e),o=lpt(e),i=o.length,a=0;i>a;)fi.f(t,n=o[a++],r[n]);return t},h3=as("document","documentElement"),tM=c8("IE_PROTO"),sw=function(){},eM=function(t){return"<script>"+t+"<\/script>"},_F=function(t){t.write(eM("")),t.close();var e=t.parentWindow.Object;return t=null,e},hg=function(){try{C0=new ActiveXObject("htmlfile")}catch{}var t,e;hg=typeof document<"u"?document.domain&&C0?_F(C0):((e=gp("iframe")).style.display="none",h3.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(eM("document.F=Object")),t.close(),t.F):_F(C0);for(var n=n1.length;n--;)delete hg.prototype[n1[n]];return hg()};Ny[tM]=!0;var d8=Object.create||function(t,e){var n;return t!==null?(sw.prototype=fn(t),n=new sw,sw.prototype=null,n[tM]=t):n=hg(),e===void 0?n:cpt(n,e)},g3=Re("unscopables"),v3=Array.prototype;v3[g3]==null&&fi.f(v3,g3,{configurable:!0,value:d8(null)});var xd=function(t){v3[g3][t]=!0},fpt=XR.includes;$n({target:"Array",proto:!0},{includes:function(t){return fpt(this,t,arguments.length>1?arguments[1]:void 0)}}),xd("includes");var dpt={selector:"iframe,video,p",preParseHtml:function(t){var e=B(t),n=e;if(FF(e)==="p"){var r=e.children();if(r.length===1){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=B(o))}}var a=FF(n);if(a!=="iframe"&&a!=="video"||n.parent().attr("data-w-e-type")==="video")return n[0];var u=B('<div data-w-e-type="video" data-w-e-is-void></div>');return u.append(n),u[0]}},TF=Ct(Ct.bind),yp=function(t,e){return Pa(t),e===void 0?t:TF?TF(t,e):function(){return t.apply(e,arguments)}},a1=Array.isArray||function(t){return xo(t)=="Array"},nM=function(){},ppt=[],rM=as("Reflect","construct"),p8=/^\s*(?:class|function)\b/,hpt=Ct(p8.exec),gpt=!p8.exec(nM),_f=function(t){if(!oe(t))return!1;try{return rM(nM,ppt,t),!0}catch{return!1}},h8=!rM||de(function(){var t;return _f(_f.call)||!_f(Object)||!_f(function(){t=!0})||t})?function(t){if(!oe(t))return!1;switch(Ly(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return gpt||!!hpt(p8,jy(t))}:_f,vpt=Re("species"),PF=rt.Array,ypt=function(t,e){return new(function(n){var r;return a1(n)&&(r=n.constructor,(h8(r)&&(r===PF||a1(r.prototype))||he(r)&&(r=r[vpt])===null)&&(r=void 0)),r===void 0?PF:r}(t))(e===0?0:e)},jF=Ct([].push),Ri=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=Py(s),g=r8(y),v=yp(l,c),m=hh(g),h=0,b=f||ypt,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:jF(w,p)}else switch(t){case 4:return!1;case 7:jF(w,p)}return i?-1:r||o?o:w}},g8={forEach:Ri(0),map:Ri(1),filter:Ri(2),some:Ri(3),every:Ri(4),find:Ri(5),findIndex:Ri(6),filterReject:Ri(7)},mpt=g8.find,NF=!0;"find"in[]&&Array(1).find(function(){NF=!1}),$n({target:"Array",proto:!0,forced:NF},{find:function(t){return mpt(this,t,arguments.length>1?arguments[1]:void 0)}}),xd("find");var bpt=f8?{}.toString:function(){return"[object "+Ly(this)+"]"};function IF(t,e,n,r){return e===void 0&&(e=""),n===void 0&&(n="auto"),r===void 0&&(r="auto"),{type:"video",src:t,poster:e,width:n,height:r,children:[{text:""}]}}f8||or(Object.prototype,"toString",bpt,{unsafe:!0});var LF,lw,wpt={selector:'div[data-w-e-type="video"]',parseElemHtml:function(t,e,n){var r=B(t),o="",i="",a="auto",u="auto",s=r.find("iframe");if(s.length>0)return a=s.attr("width")||"auto",u=s.attr("height")||"auto",IF(o=s[0].outerHTML,i,a,u);var l=r.find("video");return(o=l.attr("src")||"")||l.length>0&&(o=l.find("source").attr("src")||""),a=l.attr("width")||"auto",u=l.attr("height")||"auto",IF(o,i=l.attr("poster")||"",a,u)}},oM=function(){var t=fn(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},v8=rt.RegExp,y3=de(function(){var t=v8("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),Ept=y3||de(function(){return!v8("a","y").
|
||
|
|
`)&&t.flags==="s")}),Spt=rt.RegExp,Apt=de(function(){var t=Spt("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),Opt=cr.get,kpt=a8("native-string-replace",String.prototype.replace),u1=RegExp.prototype.exec,m3=u1,Bpt=Ct("".charAt),Fpt=Ct("".indexOf),_pt=Ct("".replace),cw=Ct("".slice),fw=(lw=/b*/g,le(u1,LF=/a/,"a"),le(u1,lw,"a"),LF.lastIndex!==0||lw.lastIndex!==0),RF=Dpt.BROKEN_CARET,dw=/()??/.exec("")[1]!==void 0;(fw||dw||RF||xpt||Apt)&&(m3=function(t){var e,n,r,o,i,a,u,s=this,l=Opt(s),c=wr(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=le(m3,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=RF&&s.sticky,y=le(oM,s),g=s.source,v=0,m=c;if(d&&(y=_pt(y,"y",""),Fpt(y,"g")===-1&&(y+="g"),m=cw(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Bpt(c,s.lastIndex-1)!==`
|
||
|
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),dw&&(n=new RegExp("^"+g+"$(?!\\s)",y)),fw&&(r=s.lastIndex),o=le(u1,d?n:s,m),d?o?(o.input=cw(o.input,v),o[0]=cw(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:fw&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),dw&&o&&o.length>1&&le(kpt,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&p)for(o.groups=a=d8(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var s1=m3;$n({target:"RegExp",proto:!0,forced:/./.exec!==s1},{exec:s1});var y8=Function.prototype,MF=y8.apply,Tpt=y8.bind,zF=y8.call,iM=typeof Reflect=="object"&&Reflect.apply||(Tpt?zF.bind(MF):function(){return zF.apply(MF,arguments)}),$F=(Re("species"),RegExp.prototype),Ppt=Ct("".charAt),HF=Ct("".charCodeAt),jpt=Ct("".slice),VF=function(t){return function(e,n){var r,o,i=wr(ph(e)),a=Iy(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=HF(i,a))<55296||r>56319||a+1===u||(o=HF(i,a+1))<56320||o>57343?t?Ppt(i,a):r:t?jpt(i,a,a+2):o-56320+(r-55296<<10)+65536}},aM={codeAt:VF(!1),charAt:VF(!0)},Npt=aM.charAt,Ipt=function(t,e,n){return e+(n?Npt(t,e).length:1)},Lpt=Math.floor,pw=Ct("".charAt),Rpt=Ct("".replace),hw=Ct("".slice),Mpt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,zpt=/\$([$&'`]|\d{1,2})/g,$pt=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=zpt;return o!==void 0&&(o=Py(o),s=Mpt),Rpt(i,s,function(l,c){var f;switch(pw(c,0)){case"$":return"$";case"&":return t;case"`":return hw(e,0,n);case"'":return hw(e,a);case"<":f=o[hw(c,1,-1)];break;default:var p=+c;if(p===0)return l;if(p>u){var d=Lpt(p/10);return d===0?l:d<=u?r[d-1]===void 0?pw(c,1):r[d-1]+pw(c,1):l}f=r[p-1]}return f===void 0?"":f})},Hpt=rt.TypeError,Vpt=function(t,e){var n=t.exec;if(oe(n)){var r=le(n,t,e);return r!==null&&fn(r),r}if(xo(t)==="RegExp")return le(s1,t,e);throw Hpt("RegExp#exec called on incompatible receiver")},b3=Re("replace"),Upt=Math.max,Wpt=Math.min,Gpt=Ct([].concat),gw=Ct([].push),UF=Ct("".indexOf),WF=Ct("".slice),qpt="a".replace(/./,"$0")==="$0",GF=!!/./[b3]&&/./[b3]("a","$0")==="";function uM(t){return t===void 0&&(t="r"),t+"-"+yj()}(function(t,e,n,r){var o=Re(t),i=!de(function(){var l={};return l[o]=function(){return 7},""[t](l)!=7}),a=i&&!de(function(){var l=!1,c=/a/;return c.exec=function(){return l=!0,null},c[o](""),!l});if(!i||!a||n){var u=Ct(/./[o]),s=function(l,c,f){var p=GF?"$":"$0";return[function(d,y){var g=ph(this),v=d==null?void 0:hp(d,b3);return v?le(v,d,g,y):le(c,wr(g),d,y)},function(d,y){var g=fn(this),v=wr(d);if(typeof y=="string"&&UF(y,p)===-1&&UF(y,"$<")===-1){var m=f(c,g,v,y);if(m.done)return m.value}var h=oe(y);h||(y=wr(y));var b=g.global;if(b){var w=g.unicode;g.lastIndex=0}for(var D=[];;){var x=Vpt(g,v);if(x===null||(gw(D,x),!b))break;wr(x[0])===""&&(g.lastIndex=Ipt(v,YR(g.lastIndex),w))}for(var C,O="",_=0,R=0;R<D.length;R++){for(var H=wr((x=D[R])[0]),M=Upt(Wpt(Iy(x.index),v.length),0),K=[],U=1;U<x.length;U++)gw(K,(C=x[U])===void 0?C:String(C));var W=x.groups;if(h){var q=Gpt([H],K,M,v);W!==void 0&&gw(q,W);var nt=wr(iM(y,void 0,q))}else nt=$pt(H,v,M,K,W,y);M>=_&&(O+=WF(v,_,M)+nt,_=M+H.length)}return O+WF(v,_)}]}(0,""[t],function(l,c,f,p,d){var y=Ct(l),g=c.exec;return g===s1||g===$F.exec?i&&!d?{done:!0,value:u(c,f,p)}:{done:!0,value:y(f,c,p)}:{done:!1}});or(String.prototype,t,s[0]),or($F,o,s[1])}})("replace",0,!!de(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$<a>")!=="7"})||!qpt||GF);var l1=rt.Promise,c1=function(t,e,n){for(var r in e)or(t,r,e[r],n);return t},Kpt=rt.String,Ypt=rt.TypeError,Ql=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Ct(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch{}return function(r,o){return fn(r),function(i){if(typeof i=="object"||oe(i))return i;throw Ypt("Can't set "+Kpt(i)+" as a prototype")}(o),e?t(r,o):r.__proto__=o,r}}():void 0),Xpt=fi.f,qF=Re("toStringTag"),f1=function(t,e,n){t&&!qe(t=n?t:t.prototype,qF)&&Xpt(t,qF,{configurable:!0,value:e})},KF=Re("species"),Zpt=rt.TypeError,m8=function(t,e){if(dp(e
|
||
|
|
`)&&t.flags==="s")}),xgt=et.RegExp,Sgt=ve(function(){var t=xgt("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),Agt=fr.get,Ogt=B8("native-string-replace",String.prototype.replace),E1=RegExp.prototype.exec,N3=E1,kgt=_t("".charAt),Bgt=_t("".indexOf),Fgt=_t("".replace),Mw=_t("".slice),zw=(Rw=/b*/g,Jt(E1,z_=/a/,"a"),Jt(E1,Rw,"a"),z_.lastIndex!==0||Rw.lastIndex!==0),$_=qM.BROKEN_CARET,$w=/()??/.exec("")[1]!==void 0;(zw||$w||$_||Cgt||Sgt)&&(N3=function(t){var e,n,r,o,i,a,u,s=this,l=Agt(s),c=ba(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=Jt(N3,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=$_&&s.sticky,y=Jt(GM,s),g=s.source,v=0,m=c;if(d&&(y=Fgt(y,"y",""),Bgt(y,"g")===-1&&(y+="g"),m=Mw(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&kgt(c,s.lastIndex-1)!==`
|
||
|
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),$w&&(n=new RegExp("^"+g+"$(?!\\s)",y)),zw&&(r=s.lastIndex),o=Jt(E1,d?n:s,m),d?o?(o.input=Mw(o.input,v),o[0]=Mw(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:zw&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),$w&&o&&o.length>1&&Jt(Ogt,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&p)for(o.groups=a=z8(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Ap=N3;Eo({target:"RegExp",proto:!0,forced:/./.exec!==Ap},{exec:Ap});var $8=Function.prototype,H_=$8.apply,_gt=$8.bind,V_=$8.call,XM=typeof Reflect=="object"&&Reflect.apply||(_gt?V_.bind(H_):function(){return V_.apply(H_,arguments)}),Tgt=Me("species"),Hw=RegExp.prototype,Pgt=Me("match"),jgt=et.TypeError,Ngt=Me("species"),ZM=function(t,e){var n,r=dn(t).constructor;return r===void 0||(n=dn(r)[Ngt])==null?e:function(o){if(R8(o))return o;throw jgt(h1(o)+" is not a constructor")}(n)},Igt=_t("".charAt),U_=_t("".charCodeAt),Lgt=_t("".slice),W_=function(t){return function(e,n){var r,o,i=ba(wp(e)),a=N8(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=U_(i,a))<55296||r>56319||a+1===u||(o=U_(i,a+1))<56320||o>57343?t?Igt(i,a):r:t?Lgt(i,a,a+2):o-56320+(r-55296<<10)+65536}},JM={codeAt:W_(!1),charAt:W_(!0)},Rgt=JM.charAt,Mgt=function(t,e,n){return e+(n?Rgt(t,e).length:1)},zgt=et.Array,$gt=Math.max,I3=function(t,e,n){for(var r=yh(t),o=Sp(e,r),i=Sp(n===void 0?r:n,r),a=zgt($gt(i-o,0)),u=0;o<i;o++,u++)UM(a,u,t[o]);return a.length=u,a},Hgt=et.TypeError,G_=function(t,e){var n=t.exec;if(ae(n)){var r=Jt(n,t,e);return r!==null&&dn(r),r}if(Qr(t)==="RegExp")return Jt(Ap,t,e);throw Hgt("RegExp#exec called on incompatible receiver")},Xs=qM.UNSUPPORTED_Y,Vgt=Math.min,QM=[].push,Ugt=_t(/./.exec),Zs=_t(QM),zf=_t("".slice);(function(t,e,n,r){var o=Me(t),i=!ve(function(){var l={};return l[o]=function(){return 7},""[t](l)!=7}),a=i&&!ve(function(){var l=!1,c=/a/;return(c={}).constructor={},c.constructor[Tgt]=function(){return c},c.flags="",c[o]=/./[o],c.exec=function(){return l=!0,null},c[o](""),!l});if(!i||!a||n){var u=_t(/./[o]),s=function(l,c,f){var p;return p="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(d,y){var g,v,m=ba(wp(this)),h=y===void 0?4294967295:y>>>0;if(h===0)return[];if(d===void 0)return[m];if(!fe(g=d)||!((v=g[Pgt])!==void 0?v:Qr(g)=="RegExp"))return Jt(c,m,d,h);for(var b,w,D,x=[],C=(d.ignoreCase?"i":"")+(d.multiline?"m":"")+(d.unicode?"u":"")+(d.sticky?"y":""),O=0,_=new RegExp(d.source,C+"g");(b=Jt(Ap,_,m))&&!((w=_.lastIndex)>O&&(Zs(x,zf(m,O,b.index)),b.length>1&&b.index<m.length&&XM(QM,x,I3(b,1)),D=b[0].length,O=w,x.length>=h));)_.lastIndex===b.index&&_.lastIndex++;return O===m.length?!D&&Ugt(_,"")||Zs(x,""):Zs(x,zf(m,O)),x.length>h?I3(x,0,h):x}:"0".split(void 0,0).length?function(d,y){return d===void 0&&y===0?[]:Jt(c,this,d,y)}:c,[function(d,y){var g=wp(this),v=d==null?void 0:Cp(d,l);return v?Jt(v,d,g,y):Jt(p,ba(g),d,y)},function(d,y){var g=dn(this),v=ba(d),m=f(p,g,v,y,p!==c);if(m.done)return m.value;var h=ZM(g,RegExp),b=g.unicode,w=(g.ignoreCase?"i":"")+(g.multiline?"m":"")+(g.unicode?"u":"")+(Xs?"g":"y"),D=new h(Xs?"^(?:"+g.source+")":g,w),x=y===void 0?4294967295:y>>>0;if(x===0)return[];if(v.length===0)return G_(D,v)===null?[v]:[];for(var C=0,O=0,_=[];O<v.length;){D.lastIndex=Xs?0:O;var R,H=G_(D,Xs?zf(v,O):v);if(H===null||(R=Vgt(MM(D.lastIndex+(Xs?O:0)),v.length))===C)O=Mgt(v,O,b);else{if(Zs(_,zf(v,C,O)),_.length===x)return _;for(var M=1;M<=H.length-1;M++)if(Zs(_,H[M]),_.length===x)return _;O=C=R}}return Zs(_,zf(v,C)),_}]}(o,""[t],function(l,c,f,p,d){var y=_t(l),g=c.exec;return g===Ap||g===Hw.exec?i&&!d?{done:!0,value:u(c,f,p)}:{done:!0,value:y(f,c,p)}:{done:!1}});ir(String.prototype,t,s[0]),ir(Hw,o,s[1])}r&&So(Hw[o],"sham",!0)})("split",0,!!ve(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),Xs);/*! ***********
|
||
|
|
Copyright (c) Microsoft Corporation.
|
||
|
|
|
||
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
|
purpose with or without fee is hereby granted.
|
||
|
|
|
||
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
|
***************************************************************************** */var D1=function(){return D1=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},D1.apply(this,arguments)};function H8(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(l){try{s(r.next(l))}catch(c){i(c)}}function u(l){try{s(r.throw(l))}catch(c){i(c)}}function s(l){var c;l.done?o(l.value):(c=l.value,c instanceof n?c:new n(function(f){f(c)})).then(a,u)}s((r=r.apply(t,e||[])).next())})}function V8(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(s){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(c[0]===6&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(f){c=[6,f],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,l])}}}function Wgt(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=function(o){var i=typeof Symbol=="function"&&Symbol.iterator,a=i&&o[i],u=0;if(a)return a.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&u>=o.length&&(o=void 0),{value:o&&o[u++],done:!o}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(o){e[o]=t[o]&&function(i){return new Promise(function(a,u){(function(s,l,c,f){Promise.resolve(f).then(function(p){s({value:p,done:c})},l)})(a,u,(i=t[o](i)).done,i.value)})}}}var L3=Me("unscopables"),R3=Array.prototype;R3[L3]==null&&di.f(R3,L3,{configurable:!0,value:z8(null)});var Wu,q_,K_,Vw=function(t){R3[L3][t]=!0},ec={},Ggt=!ve(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Y_=j8("IE_PROTO"),M3=et.Object,qgt=M3.prototype,C1=Ggt?M3.getPrototypeOf:function(t){var e=F8(t);if(Ke(e,Y_))return e[Y_];var n=e.constructor;return ae(n)&&e instanceof n?n.prototype:e instanceof M3?qgt:null},z3=Me("iterator"),tz=!1;[].keys&&("next"in(K_=[].keys())?(q_=C1(C1(K_)))!==Object.prototype&&(Wu=q_):tz=!0);var Kgt=Wu==null||ve(function(){var t={};return Wu[z3].call(t)!==t});Kgt&&(Wu={}),ae(Wu[z3])||ir(Wu,z3,function(){return this});var U8={IteratorPrototype:Wu,BUGGY_SAFARI_ITERATORS:tz},Ygt=di.f,X_=Me("toStringTag"),x1=function(t,e,n){t&&!Ke(t=n?t:t.prototype,X_)&&Ygt(t,X_,{configurable:!0,value:e})},Xgt=U8.IteratorPrototype,Zgt=function(){return this},Jgt=et.String,Qgt=et.TypeError,nc=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=_t(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch{}return function(r,o){return dn(r),function(i){if(typeof i=="object"||ae(i))return i;throw Qgt("Can't set "+Jgt(i)+" as a prototype")}(o),e?t(r,o):r.__proto__=o,r}}():void 0),tvt=vh.PROPER,evt=vh.CONFIGURABLE,Z_=U8.IteratorPrototype,P0=U8.BUGGY_SAFARI_ITERATORS,$f=Me("iterator"),nvt=function(){return this},ez=function(t,e,n,r,o,i,a){(function(m,h,b,w){var D=h+" Iterator";m.prototype=z8(Xgt,{next:Ry(1,b)}),x1(m,D,!1),ec[D]=Zgt})(n,e,r);var u,s,l,c=function(m){if(m===o&&g)return g;if(!P0&&m in d)return d[m];switch(m){case"keys":case"values":case"entries":return func
|
||
|
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
||
|
|
*
|
||
|
|
* @license MIT <https://opensource.org/licenses/MIT>
|
||
|
|
* @author Lea Verou <https://lea.verou.me>
|
||
|
|
* @namespace
|
||
|
|
* @public
|
||
|
|
*/t.exports&&(t.exports=e),B1!==void 0&&(B1.Prism=e),e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[r]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var a={};a[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(n,r){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:e.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml,function(n){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var o=n.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))}(e),e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\
|
||
|
|
`)&&t.flags==="s")}),byt=Nt.RegExp,wyt=ln(function(){var t=byt("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),Eyt=J3.get,Dyt=tx("native-string-replace",String.prototype.replace),P1=RegExp.prototype.exec,e5=P1,Cyt=Qt("".charAt),xyt=Qt("".indexOf),Syt=Qt("".replace),g4=Qt("".slice),v4=(h4=/b*/g,Qe(P1,QT=/a/,"a"),Qe(P1,h4,"a"),QT.lastIndex!==0||h4.lastIndex!==0),tP=Xz.BROKEN_CARET,y4=/()??/.exec("")[1]!==void 0;(v4||y4||tP||myt||wyt)&&(e5=function(t){var e,n,r,o,i,a,u,s=this,l=Eyt(s),c=oi(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=Qe(e5,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=tP&&s.sticky,y=Qe(Yz,s),g=s.source,v=0,m=c;if(d&&(y=Syt(y,"y",""),xyt(y,"g")===-1&&(y+="g"),m=g4(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Cyt(c,s.lastIndex-1)!==`
|
||
|
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),y4&&(n=new RegExp("^"+g+"$(?!\\s)",y)),v4&&(r=s.lastIndex),o=Qe(P1,d?n:s,m),d?o?(o.input=g4(o.input,v),o[0]=g4(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:v4&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),y4&&o&&o.length>1&&Qe(Dyt,o[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(o[i]=void 0)}),o&&p)for(o.groups=a=vyt(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Fp=e5;Uy({target:"RegExp",proto:!0,forced:/./.exec!==Fp},{exec:Fp});var gx=Function.prototype,eP=gx.apply,Ayt=gx.bind,nP=gx.call,Oyt=typeof Reflect=="object"&&Reflect.apply||(Ayt?nP.bind(eP):function(){return nP.apply(eP,arguments)}),kyt=Ha("species"),m4=RegExp.prototype,Byt=Ha("match"),Fyt=Nt.TypeError,_yt=Ha("species"),Tyt=Qt("".charAt),rP=Qt("".charCodeAt),Pyt=Qt("".slice),jyt=function(t){return function(e,n){var r,o,i=oi(rc(e)),a=fx(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=rP(i,a))<55296||r>56319||a+1===u||(o=rP(i,a+1))<56320||o>57343?t?Tyt(i,a):r:t?Pyt(i,a,a+2):o-56320+(r-55296<<10)+65536}},Nyt=jyt(!0),Iyt=function(t,e,n){return e+(n?Nyt(t,e).length:1)},Lyt=Nt.Array,Ryt=Math.max,oP=function(t,e,n){for(var r,o,i,a,u=dx(t),s=Q3(e,u),l=Q3(n===void 0?u:n,u),c=Lyt(Ryt(l-s,0)),f=0;s<l;s++,f++)r=c,o=f,i=t[s],(a=ix(o))in r?Hy.f(r,a,ax(0,i)):r[a]=i;return c.length=f,c},Myt=Nt.TypeError,iP=function(t,e){var n=t.exec;if(On(n)){var r=Qe(n,t,e);return r!==null&&to(r),r}if(Da(t)==="RegExp")return Qe(Fp,t,e);throw Myt("RegExp#exec called on incompatible receiver")},el=Xz.UNSUPPORTED_Y,zyt=Math.min,Qz=[].push,$yt=Qt(/./.exec),nl=Qt(Qz),Yf=Qt("".slice);(function(t,e,n,r){var o=Ha(t),i=!ln(function(){var l={};return l[o]=function(){return 7},""[t](l)!=7}),a=i&&!ln(function(){var l=!1,c=/a/;return(c={}).constructor={},c.constructor[kyt]=function(){return c},c.flags="",c[o]=/./[o],c.exec=function(){return l=!0,null},c[o](""),!l});if(!i||!a||n){var u=Qt(/./[o]),s=function(l,c,f){var p;return p="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(d,y){var g,v,m=oi(rc(this)),h=y===void 0?4294967295:y>>>0;if(h===0)return[];if(d===void 0)return[m];if(!Wr(g=d)||!((v=g[Byt])!==void 0?v:Da(g)=="RegExp"))return Qe(c,m,d,h);for(var b,w,D,x=[],C=(d.ignoreCase?"i":"")+(d.multiline?"m":"")+(d.unicode?"u":"")+(d.sticky?"y":""),O=0,_=new RegExp(d.source,C+"g");(b=Qe(Fp,_,m))&&!((w=_.lastIndex)>O&&(nl(x,Yf(m,O,b.index)),b.length>1&&b.index<m.length&&Oyt(Qz,x,oP(b,1)),D=b[0].length,O=w,x.length>=h));)_.lastIndex===b.index&&_.lastIndex++;return O===m.length?!D&&$yt(_,"")||nl(x,""):nl(x,Yf(m,O)),x.length>h?oP(x,0,h):x}:"0".split(void 0,0).length?function(d,y){return d===void 0&&y===0?[]:Qe(c,this,d,y)}:c,[function(d,y){var g=rc(this),v=d==null?void 0:Nz(d,l);return v?Qe(v,d,g,y):Qe(p,oi(g),d,y)},function(d,y){var g=to(this),v=oi(d),m=f(p,g,v,y,p!==c);if(m.done)return m.value;var h=function(K,U){var W,q=to(K).constructor;return q===void 0||(W=to(q)[_yt])==null?U:function(nt){if(Hz(nt))return nt;throw Fyt(Pz(nt)+" is not a constructor")}(W)}(g,RegExp),b=g.unicode,w=(g.ignoreCase?"i":"")+(g.multiline?"m":"")+(g.unicode?"u":"")+(el?"g":"y"),D=new h(el?"^(?:"+g.source+")":g,w),x=y===void 0?4294967295:y>>>0;if(x===0)return[];if(v.length===0)return iP(D,v)===null?[v]:[];for(var C=0,O=0,_=[];O<v.length;){D.lastIndex=el?0:O;var R,H=iP(D,el?Yf(v,O):v);if(H===null||(R=zyt(Mz(D.lastIndex+(el?O:0)),v.length))===C)O=Iyt(v,O,b);else{if(nl(_,Yf(v,C,O)),_.length===x)return _;for(var M=1;M<=H.length-1;M++)if(nl(_,H[M]),_.length===x)return _;O=C=R}}return nl(_,Yf(v,C)),_}]}(o,""[t],function(l,c,f,p,d){var y=Qt(l),g=c.exec;return g===Fp||g===m4.exec?i&&!d?{done:!0,value:u(c,f,p)}:{done:!0,value:y(f,c,p)}:{done:!1}});Bp(String.prototype,t,s[0]),Bp(m4,o,s[1])}r&&oc(m4[o],"sham",!0)})("split",0,!!ln(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),el)
|
||
|
|
Can not construct a instance`)}return t.setEditorConfig=function(e){e===void 0&&(e={}),this.editorConfig=Se(Se({},this.editorConfig),e)},t.setSimpleEditorConfig=function(e){e===void 0&&(e={}),this.simpleEditorConfig=Se(Se({},this.simpleEditorConfig),e)},t.setToolbarConfig=function(e){e===void 0&&(e={}),this.toolbarConfig=Se(Se({},this.toolbarConfig),e)},t.setSimpleToolbarConfig=function(e){e===void 0&&(e={}),this.simpleToolbarConfig=Se(Se({},this.simpleToolbarConfig),e)},t.registerPlugin=function(e){this.plugins.push(e)},t.registerMenu=function(e,n){(function(r,o){var i=r.key,a=r.factory,u=r.config,s=Er(Er({},u),o||{});if(Jd[i]!=null)throw new Error("Duplicated key '"+i+"' in menu items");Jd[i]=a,function(l,c){c!=null&&(AN[l]=c)}(i,s)})(e,n)},t.registerRenderElem=function(e){(function(n){var r=n.type,o=n.renderElem;ZN[r||""]=o})(e)},t.registerRenderStyle=function(e){(function(n){XE.push(n)})(e)},t.registerElemToHtml=function(e){(function(n){var r=n.type,o=n.elemToHtml;ON[r||""]=o})(e)},t.registerStyleToHtml=function(e){(function(n){VE.push(n)})(e)},t.registerPreParseHtml=function(e){(function(n){WN.push(n)})(e)},t.registerParseElemHtml=function(e){(function(n){var r=n.selector,o=n.parseElemHtml;yv[r]=o})(e)},t.registerParseStyleHtml=function(e){(function(n){OD.push(n)})(e)},t.registerModule=function(e){fu(e)},t.editorConfig={},t.simpleEditorConfig={},t.toolbarConfig={},t.simpleToolbarConfig={},t.plugins=[],t}();/*! *****************************************************************************
|
||
|
|
Copyright (c) Microsoft Corporation.
|
||
|
|
|
||
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
|
purpose with or without fee is hereby granted.
|
||
|
|
|
||
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
|
***************************************************************************** */function fu(t){var e=t.menus,n=t.renderElems,r=t.renderStyle,o=t.elemsToHtml,i=t.styleToHtml,a=t.preParseHtml,u=t.parseElemsHtml,s=t.parseStyleHtml,l=t.editorPlugin;e&&e.forEach(function(c){return on.registerMenu(c)}),n&&n.forEach(function(c){return on.registerRenderElem(c)}),r&&on.registerRenderStyle(r),o&&o.forEach(function(c){return on.registerElemToHtml(c)}),i&&on.registerStyleToHtml(i),a&&a.forEach(function(c){return on.registerPreParseHtml(c)}),u&&u.forEach(function(c){return on.registerParseElemHtml(c)}),s&&on.registerParseStyleHtml(s),l&&on.registerPlugin(l)}eut.forEach(function(t){return fu(t)}),fu(Tlt),fu(odt),fu(p0t),fu(o1t),fu(qyt);var n$='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',r$={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize"]}},Xyt={hoverbarKeys:Se(Se({},r$),{text:{menuKeys:["headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};on.setEditorConfig(Se(Se({},Xyt),{decorate:e$}));var Zyt={hoverbarKeys:r$};on.setSimpleEditorConfig(Se(Se({},Zyt),{decorate:e$}));var Jyt={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:tt("editor.more"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:tt("editor.justify"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:tt("editor.indent"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:tt("editor.image"),iconSvg:n$,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:tt("editor.video"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","fullScreen"]};on.setToolbarConfig(Jyt);var Qyt={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:tt("editor.image"),iconSvg:n$,menuKeys:["insertImage","uploadImage"]},"insertVideo"
|
||
|
|
Please use '@${t}' event instead of props`,e}var o$=(t,e)=>{for(const[n,r]of e)t[n]=r;return t};const lmt=j1({props:{mode:{type:String,default:"default"},defaultContent:{type:Array,default:[]},defaultHtml:{type:String,default:""},defaultConfig:{type:Object,default:{}},modelValue:{type:String,default:""}},setup(t,e){const n=Du(null),r=sP(null),o=Du(""),i=()=>{if(!n.value)return;const u=s$(t.defaultContent);tmt({selector:n.value,mode:t.mode,content:u||[],html:t.defaultHtml||t.modelValue||"",config:smt(umt({},t.defaultConfig),{onCreated(s){if(r.value=s,e.emit("onCreated",s),t.defaultConfig.onCreated){const l=Vi("onCreated");throw new Error(l)}},onChange(s){const l=s.getHtml();if(o.value=l,e.emit("update:modelValue",l),e.emit("onChange",s),t.defaultConfig.onChange){const c=Vi("onChange");throw new Error(c)}},onDestroyed(s){if(e.emit("onDestroyed",s),t.defaultConfig.onDestroyed){const l=Vi("onDestroyed");throw new Error(l)}},onMaxLength(s){if(e.emit("onMaxLength",s),t.defaultConfig.onMaxLength){const l=Vi("onMaxLength");throw new Error(l)}},onFocus(s){if(e.emit("onFocus",s),t.defaultConfig.onFocus){const l=Vi("onFocus");throw new Error(l)}},onBlur(s){if(e.emit("onBlur",s),t.defaultConfig.onBlur){const l=Vi("onBlur");throw new Error(l)}},customAlert(s,l){if(e.emit("customAlert",s,l),t.defaultConfig.customAlert){const c=Vi("customAlert");throw new Error(c)}},customPaste:(s,l)=>{if(t.defaultConfig.customPaste){const f=Vi("customPaste");throw new Error(f)}let c;return e.emit("customPaste",s,l,f=>{c=f}),c}})})};function a(u){const s=r.value;if(s==null)return;const l=s.isDisabled(),c=s.isFocused(),f=JSON.stringify(s.selection);if(s.enable(),s.focus(),s.select([]),s.deleteFragment(),N.setNodes(s,{type:"paragraph"},{mode:"highest"}),s.dangerouslyInsertHtml(u),!c){s.deselect(),s.blur();return}if(l){s.deselect(),s.disable();return}try{s.select(JSON.parse(f))}catch{s.select(E.start(s,[]))}}return i$(()=>{i()}),a$(()=>t.modelValue,u=>{u!==o.value&&a(u)}),{box:n}}}),cmt={ref:"box",style:{height:"100%"}};function fmt(t,e,n,r,o,i){return N1(),I1("div",cmt,null,512)}var dmt=o$(lmt,[["render",fmt]]);const pmt=j1({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(t){const e=Du(null),n=r=>{if(e.value){if(r==null)throw new Error("Not found instance of Editor when create <Toolbar/> component");A.getToolbar(r)||emt({editor:r,selector:e.value||"<div></div>",mode:t.mode,config:t.defaultConfig})}};return u$(()=>{const{editor:r}=t;r!=null&&n(r)}),{selector:e}}}),hmt={ref:"selector"};function gmt(t,e,n,r,o,i){return N1(),I1("div",hmt,null,512)}var vmt=o$(pmt,[["render",gmt]]);const ymt={class:"editor-wrapper"},mmt=j1({__name:"index",props:{modelValue:{type:[String],default:""}},emits:["update:modelValue"],setup(t,{emit:e}){const r=l$(t,"modelValue",e),o=sP(),i=Du("default"),a=Du({}),u=Du({placeholder:"请输入内容...",MENU_CONF:{uploadImage:{async customUpload(c,f){d$(c).then(p=>{const d=p.data.url;f(d)})}}}}),s=c=>{o.value=c};function l(c){r.value=c.getHtml()}return c$(()=>{const c=o.value;c!=null&&c.destroy()}),(c,f)=>(N1(),I1("div",ymt,[b4(qo(vmt),{id:"toolbar-container",editor:qo(o),"default-config":qo(a),mode:qo(i)},null,8,["editor","default-config","mode"]),b4(qo(dmt),{id:"editor-container",modelValue:qo(r),"onUpdate:modelValue":f[0]||(f[0]=p=>lP(r)?r.value=p:null),"default-config":qo(u),mode:qo(i),onOnChange:l,onOnCreated:s},null,8,["modelValue","default-config","mode"])]))}});const bmt=f$(mmt,[["__scopeId","data-v-0d451391"]]),wmt={class:"app-container"},Cmt=j1({__name:"wangEditor",setup(t){const e=Du("初始内容");return(n,r)=>(N1(),I1("div",wmt,[b4(bmt,{modelValue:qo(e),"onUpdate:modelValue":r[0]||(r[0]=o=>lP(e)?e.value=o:null),style:{height:"calc(100vh - 124px)"}},null,8,["modelValue"])]))}});export{Cmt as default};
|