187 lines
798 KiB
JavaScript
187 lines
798 KiB
JavaScript
|
import{d as rP,r as h4,s as e$,i as n$,w as r$,k as o$,t as i$,o as oP,c as iP}from"./@vue.663bc523.js";var se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function a$(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function as(t){var e={exports:{}};return t(e,e.exports),e.exports}var yi,z0,Bh=function(t){return t&&t.Math==Math&&t},kt=Bh(typeof globalThis=="object"&&globalThis)||Bh(typeof window=="object"&&window)||Bh(typeof self=="object"&&self)||Bh(typeof se=="object"&&se)||function(){return this}()||Function("return this")(),J3=Function.prototype,pS=J3.apply,u$=J3.bind,hS=J3.call,aP=typeof Reflect=="object"&&Reflect.apply||(u$?hS.bind(pS):function(){return hS.apply(pS,arguments)}),uP=Function.prototype,g4=uP.bind,v4=uP.call,s$=g4&&g4.bind(v4),ge=g4?function(t){return t&&s$(v4,t)}:function(t){return t&&function(){return v4.apply(t,arguments)}},sn=function(t){return typeof t=="function"},Gn=function(t){try{return!!t()}catch{return!0}},Hn=!Gn(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Oc=Function.prototype.call,zn=Oc.bind?Oc.bind(Oc):function(){return Oc.apply(Oc,arguments)},gS={}.propertyIsEnumerable,vS=Object.getOwnPropertyDescriptor,l$=vS&&!gS.call({1:2},1)?function(t){var e=vS(this,t);return!!e&&e.enumerable}:gS,Q3={f:l$},Yr=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},c$=ge({}.toString),f$=ge("".slice),Eu=function(t){return f$(c$(t),8,-1)},$y=kt.Object,d$=ge("".split),sP=Gn(function(){return!$y("z").propertyIsEnumerable(0)})?function(t){return Eu(t)=="String"?d$(t,""):$y(t)}:$y,p$=kt.TypeError,t5=function(t){if(t==null)throw p$("Can't call method on "+t);return t},Po=function(t){return sP(t5(t))},tr=function(t){return typeof t=="object"?t!==null:sn(t)},Qn={},yS=function(t){return sn(t)?t:void 0},rc=function(t,e){return arguments.length<2?yS(Qn[t])||yS(kt[t]):Qn[t]&&Qn[t][e]||kt[t]&&kt[t][e]},Td=ge({}.isPrototypeOf),Hy=rc("navigator","userAgent")||"",mS=kt.process,bS=kt.Deno,wS=mS&&mS.versions||bS&&bS.version,ES=wS&&wS.v8;ES&&(z0=(yi=ES.split("."))[0]>0&&yi[0]<4?1:+(yi[0]+yi[1])),!z0&&Hy&&(!(yi=Hy.match(/Edge\/(\d+)/))||yi[1]>=74)&&(yi=Hy.match(/Chrome\/(\d+)/))&&(z0=+yi[1]);var Fh,wg=z0,po=!!Object.getOwnPropertySymbols&&!Gn(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&wg&&wg<41}),e5=po&&!Symbol.sham&&typeof Symbol.iterator=="symbol",h$=kt.Object,pl=e5?function(t){return typeof t=="symbol"}:function(t){var e=rc("Symbol");return sn(e)&&Td(e.prototype,h$(t))},g$=kt.String,y4=function(t){try{return g$(t)}catch{return"Object"}},v$=kt.TypeError,n5=function(t){if(sn(t))return t;throw v$(y4(t)+" is not a function")},Eg=function(t,e){var n=t[e];return n==null?void 0:n5(n)},y$=kt.TypeError,m$=Object.defineProperty,ta=kt["__core-js_shared__"]||function(t,e){try{m$(kt,t,{value:e,configurable:!0,writable:!0})}catch{kt[t]=e}return e}("__core-js_shared__",{}),us=as(function(t){(t.exports=function(e,n){return ta[e]||(ta[e]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"pure",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),b$=kt.Object,Bp=function(t){return b$(t5(t))},w$=ge({}.hasOwnProperty),Vt=Object.hasOwn||function(t,e){return w$(Bp(t),e)},E$=0,D$=Math.random(),C$=ge(1 .toString),Dg=function(t){return"Symbol("+(t===void 0?"":t)+")_"+C$(++E$+D$,36)},kc=us("wks"),Du=kt.Symbol,DS=Du&&Du.for,S$=e5?Du:Du&&Du.withoutSetter||Dg,Bn=function(t){if(!Vt(kc,t)||!po&&typeof kc[t]!="string"){var e="Symbol."+t;po&&Vt(Du,t)?kc[t]=Du[t]:kc[t]=e5&&DS?DS(e):S$(e)}return kc[t]},x$=kt.TypeError,A$=Bn("toPrimitive"),O$=function(t,e){if(!tr(t)||pl(t))return t;var n,r=Eg(t,A$);if(r){if(e===void 0&&(e="default"),n=zn(r,t,e),!tr(n)||pl(n))return n;throw x$("Can't convert object to primitive value")}return e===void 0&&(e="number"),function(o,i){var a,u;if(i==="string"&&sn(a=o.toString)&&!tr(u=zn(a,o))||sn(a=o.valueOf)&&!tr(u=zn(a,o))||i!=="string"&&sn(a=o.toString)&&!tr(u=zn(a,o)))return u;throw y$("Can't con
|
||
|
`),e),`
|
||
|
`);return t},pH=function(t,e){tr(e)&&"cause"in e&&_n(t,"cause",e.cause)},ti={},hH=Bn("iterator"),gH=Array.prototype,vP={};vP[Bn("toStringTag")]="z";var u5=String(vP)==="[object z]",vH=Bn("toStringTag"),yH=kt.Object,mH=Eu(function(){return arguments}())=="Arguments",Pp=u5?Eu: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=yH(t),vH))=="string"?n:mH?Eu(e):(r=Eu(e))=="Object"&&sn(e.callee)?"Arguments":r},bH=Bn("iterator"),TS=function(t){if(t!=null)return Eg(t,bH)||Eg(t,"@@iterator")||ti[Pp(t)]},wH=kt.TypeError,_S=function(t,e,n){var r,o;ar(t);try{if(!(r=Eg(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},EH=kt.TypeError,V0=function(t,e){this.stopped=t,this.result=e},PS=V0.prototype,DH=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=r5(e,c),g=function(m){return r&&_S(r,"normal",m),new V0(!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=TS(t)))throw EH(y4(t)+" is not iterable");if(function(m){return m!==void 0&&(ti.Array===m||gH[hH]===m)}(o)){for(i=0,a=Tp(t);a>i;i++)if((u=v(t[i]))&&Td(PS,u))return u;return new V0(!1)}r=function(m,h){var b=arguments.length<2?TS(m):h;if(n5(b))return ar(zn(b,m));throw wH(y4(m)+" is not iterable")}(t,o)}for(s=r.next;!(l=zn(s,r)).done;){try{u=v(l.value)}catch(m){_S(r,"throw",m)}if(typeof u=="object"&&u&&Td(PS,u))return u}return new V0(!1)},CH=kt.String,_d=function(t){if(Pp(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return CH(t)},SH=function(t,e){return t===void 0?arguments.length<2?"":e:_d(t)},xH=!Gn(function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",Yr(1,7)),t.stack!==7)}),AH=Bn("toStringTag"),Ag=kt.Error,OH=[].push,Pd=function(t,e){var n,r=arguments.length>2?arguments[2]:void 0,o=Td(Uy,this);Sg?n=Sg(new Ag(void 0),o?Cg(this):Uy):(n=o?this:oi(Uy),_n(n,AH,"Error")),_n(n,"message",SH(e,"")),xH&&_n(n,"stack",dH(n.stack,1)),pH(n,r);var i=[];return DH(t,OH,{that:i}),_n(n,"errors",i),n};Sg?Sg(Pd,Ag):function(t,e){for(var n=nH(e),r=ja.f,o=_1.f,i=0;i<n.length;i++){var a=n[i];Vt(t,a)||r(t,a,o(e,a))}}(Pd,Ag);var Uy=Pd.prototype=oi(Ag.prototype,{constructor:Yr(1,Pd),message:Yr(1,""),name:Yr(1,"AggregateError")});qo({global:!0},{AggregateError:Pd});var kH=ge(Function.toString);sn(ta.inspectSource)||(ta.inspectSource=function(t){return kH(t)});var Og,od,kg,yP=ta.inspectSource,jS=kt.WeakMap,BH=sn(jS)&&/native code/.test(yP(jS)),C4=kt.TypeError,FH=kt.WeakMap;if(BH||ta.state){var Ga=ta.state||(ta.state=new FH),TH=ge(Ga.get),NS=ge(Ga.has),_H=ge(Ga.set);Og=function(t,e){if(NS(Ga,t))throw new C4("Object already initialized");return e.facade=t,_H(Ga,t,e),e},od=function(t){return TH(Ga,t)||{}},kg=function(t){return NS(Ga,t)}}else{var Cs=P1("state");_p[Cs]=!0,Og=function(t,e){if(Vt(t,Cs))throw new C4("Object already initialized");return e.facade=t,_n(t,Cs,e),e},od=function(t){return Vt(t,Cs)?t[Cs]:{}},kg=function(t){return Vt(t,Cs)}}var Ki,IS,LS,ic={set:Og,get:od,has:kg,enforce:function(t){return kg(t)?od(t):Og(t,{})},getterFor:function(t){return function(e){var n;if(!tr(e)||(n=od(e)).type!==t)throw C4("Incompatible receiver, "+t+" required");return n}}},mP=Function.prototype,PH=Hn&&Object.getOwnPropertyDescriptor,Wy=Vt(mP,"name"),jH={EXISTS:Wy,PROPER:Wy&&function(){}.name==="something",CONFIGURABLE:Wy&&(!Hn||Hn&&PH(mP,"name").configurable)},Al=function(t,e,n,r){r&&r.enumerable?t[e]=n:_n(t,e,n)},S4=Bn("iterator"),bP=!1;[].keys&&("next"in(LS=[].keys())?(IS=Cg(Cg(LS)))!==Object.prototype&&(Ki=IS):bP=!0);var NH=Ki==null||Gn(function(){var t={};return Ki[S4].call(t)!==t});Ki=NH?{}:oi(Ki),sn(Ki[S4])||Al(Ki,S4,function(){return this});var wP={IteratorPrototype:Ki,BUGGY_SAFARI_ITERATORS:bP},IH=u5?{}.toString:function(){return"[object "+Pp(this)+"]"},LH=ja.f,RS=Bn("toStringTag"),Bg=function(t,e,n,r){if(t){var o=n?t:t.prototype;Vt(o,RS)||LH(o,RS,{configurable:!0,value:e}),r&&!u5&&_n(o,"toString",
|
||
|
`)&&t.flags==="s")}),lU=Et.RegExp,cU=cn(function(){var t=lU("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),fU=Wu.get,dU=f5("native-string-replace",String.prototype.replace),jg=RegExp.prototype.exec,P4=jg,pU=ie("".charAt),hU=ie("".indexOf),gU=ie("".replace),tm=ie("".slice),em=(Qy=/b*/g,un(jg,ix=/a/,"a"),un(jg,Qy,"a"),ix.lastIndex!==0||Qy.lastIndex!==0),ax=rU.BROKEN_CARET,nm=/()??/.exec("")[1]!==void 0;(em||nm||ax||sU||cU)&&(P4=function(t){var e,n,r,o,i,a,u,s=this,l=fU(s),c=xu(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=un(P4,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=ax&&s.sticky,y=un(tU,s),g=s.source,v=0,m=c;if(d&&(y=gU(y,"y",""),hU(y,"g")===-1&&(y+="g"),m=tm(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&pU(c,s.lastIndex-1)!==`
|
||
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),nm&&(n=new RegExp("^"+g+"$(?!\\s)",y)),em&&(r=s.lastIndex),o=un(jg,d?n:s,m),d?o?(o.input=tm(o.input,v),o[0]=tm(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:em&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),nm&&o&&o.length>1&&un(dU,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=Lp(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Ng=P4;Ip({target:"RegExp",proto:!0,forced:/./.exec!==Ng},{exec:Ng});var vU=Nn("species"),rm=RegExp.prototype,yU=ie("".charAt),ux=ie("".charCodeAt),mU=ie("".slice),sx=function(t){return function(e,n){var r,o,i=xu(j1(e)),a=w5(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=ux(i,a))<55296||r>56319||a+1===u||(o=ux(i,a+1))<56320||o>57343?t?yU(i,a):r:t?mU(i,a,a+2):o-56320+(r-55296<<10)+65536}},PP={codeAt:sx(!1),charAt:sx(!0)},bU=PP.charAt,wU=function(t,e,n){return e+(n?bU(t,e).length:1)},EU=Et.TypeError,lx=function(t,e){var n=t.exec;if(Ge(n)){var r=un(n,t,e);return r!==null&&ur(r),r}if(Cu(t)==="RegExp")return un(Ng,t,e);throw EU("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[vU]=function(){return c},c.flags="",c[o]=/./[o]),c.exec=function(){return l=!0,null},c[o](""),!l});if(!i||!a||n){var u=ie(/./[o]),s=e(o,""[t],function(l,c,f,p,d){var y=ie(l),g=c.exec;return g===Ng||g===rm.exec?i&&!d?{done:!0,value:u(c,f,p)}:{done:!0,value:y(f,c,p)}:{done:!1}});ra(String.prototype,t,s[0]),ra(rm,o,s[1])}r&&jn(rm[o],"sham",!0)})("match",function(t,e,n){return[function(r){var o=j1(this),i=r==null?void 0:jd(r,t);return i?un(i,r,o):new RegExp(r)[t](xu(o))},function(r){var o=ur(this),i=xu(r),a=n(e,o,i);if(a.done)return a.value;if(!o.global)return lx(o,i);var u=o.unicode;o.lastIndex=0;for(var s,l=[],c=0;(s=lx(o,i))!==null;){var f=xu(s[0]);l[c]=f,f===""&&(o.lastIndex=wU(i,OP(o.lastIndex),u)),c++}return c===0?null:l}]}),Ip({global:!0},{globalThis:Et});var DU=!cn(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),cx=y5("IE_PROTO"),j4=Et.Object,CU=j4.prototype,Nd=DU?j4.getPrototypeOf:function(t){var e=d5(t);if(Vn(e,cx))return e[cx];var n=e.constructor;return Ge(n)&&e instanceof n?n.prototype:e instanceof j4?CU:null},SU=Et.String,xU=Et.TypeError,Ol=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=ie(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch{}return function(r,o){return ur(r),function(i){if(typeof i=="object"||Ge(i))return i;throw xU("Can't set "+SU(i)+" as a prototype")}(o),e?t(r,o):r.__proto__=o,r}}():void 0),AU=Et.Array,OU=Math.max,kU=ie("".replace),BU=ie("".split),FU=ie([].join),N4=String(Error("zxcasd").stack),jP=/\n\s*at [^:]*:[^\n]*/,TU=jP.test(N4),_U=/@[^\n]*\n/.test(N4)&&!/zxcasd/.test(N4),PU=function(t,e){if(typeof t!="string")return t;if(TU)for(;e--;)t=kU(t,jP,"");else if(_U)return FU(function(n,r,o){for(var i,a,u,s,l=N1(n),c=_4(r,l),f=_4(o===void 0?l:o,l),p=AU(OU(f-c,0)),d=0;c<f;c++,d++)i=p,a=d,u=n[c],s=void 0,(s=p5(a))in i?uc.f(i,s,ea(0,u)):i[s]=u;return p.length=d,p}(BU(t,`
|
||
|
`),e),`
|
||
|
`);return t},jU=function(t,e){Vr(e)&&"cause"in e&&jn(t,"cause",e.cause)},fx=ie(ie.bind),NP=function(t,e){return l5(t),e===void 0?t:fx?fx(t,e):function(){return t.apply(e,arguments)}},kl={},NU=Nn("iterator"),IU=Array.prototype,LU=Nn("iterator"),dx=function(t){if(t!=null)return jd(t,LU)||jd(t,"@@iterator")||kl[I1(t)]},RU=Et.TypeError,px=function(t,e,n){var r,o;ur(t);try{if(!(r=jd(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},MU=Et.TypeError,G0=function(t,e){this.stopped=t,this.result=e},hx=G0.prototype,zU=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=NP(e,c),g=function(m){return r&&px(r,"normal",m),new G0(!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=dx(t)))throw MU(B4(t)+" is not iterable");if(function(m){return m!==void 0&&(kl.Array===m||IU[NU]===m)}(o)){for(i=0,a=N1(t);a>i;i++)if((u=v(t[i]))&&Fg(hx,u))return u;return new G0(!1)}r=function(m,h){var b=arguments.length<2?dx(m):h;if(l5(b))return ur(un(b,m));throw RU(B4(m)+" is not iterable")}(t,o)}for(s=r.next;!(l=un(s,r)).done;){try{u=v(l.value)}catch(m){px(r,"throw",m)}if(typeof u=="object"&&u&&Fg(hx,u))return u}return new G0(!1)},$U=function(t,e){return t===void 0?arguments.length<2?"":e:xu(t)},HU=!cn(function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",ea(1,7)),t.stack!==7)}),VU=Nn("toStringTag"),Ig=Et.Error,UU=[].push,Id=function(t,e){var n,r=arguments.length>2?arguments[2]:void 0,o=Fg(om,this);Ol?n=Ol(new Ig(void 0),o?Nd(this):om):(n=o?this:Lp(om),jn(n,VU,"Error")),jn(n,"message",$U(e,"")),HU&&jn(n,"stack",PU(n.stack,1)),jU(n,r);var i=[];return zU(t,UU,{that:i}),jn(n,"errors",i),n};Ol?Ol(Id,Ig):BP(Id,Ig);var om=Id.prototype=Lp(Ig.prototype,{constructor:ea(1,Id),message:ea(1,""),name:ea(1,"AggregateError")});Ip({global:!0},{AggregateError:Id});var I4=Nn("unscopables"),L4=Array.prototype;L4[I4]==null&&uc.f(L4,I4,{configurable:!0,value:Lp(null)});var Au,gx,vx,im=function(t){L4[I4][t]=!0},R4=Nn("iterator"),IP=!1;[].keys&&("next"in(vx=[].keys())?(gx=Nd(Nd(vx)))!==Object.prototype&&(Au=gx):IP=!0);var WU=Au==null||cn(function(){var t={};return Au[R4].call(t)!==t});WU&&(Au={}),Ge(Au[R4])||ra(Au,R4,function(){return this});var S5={IteratorPrototype:Au,BUGGY_SAFARI_ITERATORS:IP},GU=uc.f,yx=Nn("toStringTag"),mx=function(t,e,n){t&&!Vn(t=n?t:t.prototype,yx)&&GU(t,yx,{configurable:!0,value:e})},qU=S5.IteratorPrototype,KU=function(){return this},YU=b5.PROPER,XU=b5.CONFIGURABLE,bx=S5.IteratorPrototype,jh=S5.BUGGY_SAFARI_ITERATORS,Tc=Nn("iterator"),ZU=function(){return this},LP=function(t,e,n,r,o,i,a){(function(m,h,b,w){var D=h+" Iterator";m.prototype=Lp(qU,{next:ea(+!w,b)}),mx(m,D,!1),kl[D]=KU})(n,e,r);var u,s,l,c=function(m){if(m===o&&g)return g;if(!jh&&m in d)return d[m];switch(m){case"keys":case"values":case"entries":return function(){return new n(this,m)}}return function(){return new n(this)}},f=e+" Iterator",p=!1,d=t.prototype,y=d[Tc]||d["@@iterator"]||o&&d[o],g=!jh&&y||c(o),v=e=="Array"&&d.entries||y;if(v&&(u=Nd(v.call(new t)))!==Object.prototype&&u.next&&(Nd(u)!==bx&&(Ol?Ol(u,bx):Ge(u[Tc])||ra(u,Tc,ZU)),mx(u,f,!0)),YU&&o=="values"&&y&&y.name!=="values"&&(XU?jn(d,"name","values"):(p=!0,g=function(){return un(y,this)})),o)if(s={values:c("values"),keys:i?g:c("keys"),entries:c("entries")},a)for(l in s)(jh||p||!(l in d))&&ra(d,l,s[l]);else Ip({target:e,proto:!0,forced:jh||p},s);return d[Tc]!==g&&ra(d,Tc,g,{name:o}),kl[e]=g,s},JU=Wu.set,QU=Wu.getterFor("Array Iterator"),Kf=LP(Array,"Array",function(t,e){JU(this,{type:"Array Iterator",target:ac(t),index:0,kind:e})},function(){var t=QU(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values");kl.Arguments=kl.Array,im("keys"),im("values"),im("entries");var tW=PP.charAt,eW=Wu.set,nW=Wu.getterFor("String Iterator");LP(String,"String",function(t){eW(this,{type:"St
|
||
|
Sorry, wangEditor V5+ versions do not support IE browser.`),Dx(),Cx()):global&&((am=global.navigator)===null||am===void 0?void 0:am.userAgent.match("QQBrowser"))&&(Dx(),Cx());function Dx(){typeof globalThis>"u"&&(window.globalThis=window)}function Cx(){XH===void 0&&(window.AggregateError=function(t,e){var n=new Error(e);return n.errors=t,n})}var Sx,Rg=Array.isArray||function(t){return Eu(t)=="Array"},zP=function(){},rW=[],$P=rc("Reflect","construct"),x5=/^\s*(?:class|function)\b/,oW=ge(x5.exec),iW=!x5.exec(zP),_c=function(t){if(!sn(t))return!1;try{return $P(zP,rW,t),!0}catch{return!1}},aW=!$P||Gn(function(){var t;return _c(_c.call)||!_c(Object)||!_c(function(){t=!0})||t})?function(t){if(!sn(t))return!1;switch(Pp(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return iW||!!oW(x5,yP(t))}:_c,uW=Bn("species"),xx=kt.Array,HP=function(t,e){return new(function(n){var r;return Rg(n)&&(r=n.constructor,(aW(r)&&(r===xx||Rg(r.prototype))||tr(r)&&(r=r[uW])===null)&&(r=void 0)),r===void 0?xx:r}(t))(e===0?0:e)},sW=Bn("species"),VP=Bn("isConcatSpreadable"),Ax=kt.TypeError,lW=wg>=51||!Gn(function(){var t=[];return t[VP]=!1,t.concat()[0]!==t}),cW=(Sx="concat",wg>=51||!Gn(function(){var t=[];return(t.constructor={})[sW]=function(){return{foo:1}},t[Sx](Boolean).foo!==1})),fW=function(t){if(!tr(t))return!1;var e=t[VP];return e!==void 0?!!e:Rg(t)};qo({target:"Array",proto:!0,forced:!lW||!cW},{concat:function(t){var e,n,r,o,i,a=Bp(this),u=HP(a,0),s=0;for(e=-1,r=arguments.length;e<r;e++)if(fW(i=e===-1?a:arguments[e])){if(s+(o=Tp(i))>9007199254740991)throw Ax("Maximum allowed index exceeded");for(n=0;n<o;n++,s++)n in i&&E4(u,s,i[n])}else{if(s>=9007199254740991)throw Ax("Maximum allowed index exceeded");E4(u,s++,i)}return u.length=s,u}});var Ox=i5.f,kx=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],UP={f:function(t){return kx&&Eu(t)=="Window"?function(e){try{return Ox(e)}catch{return hP(kx)}}(t):Ox(Po(t))}},dW=ge([].slice),A5={f:Bn},pW=ja.f,je=function(t){var e=Qn.Symbol||(Qn.Symbol={});Vt(e,t)||pW(e,t,{value:A5.f(t)})},Bx=ge([].push),bi=function(t){var e=t==1,n=t==2,r=t==3,o=t==4,i=t==6,a=t==7,u=t==5||i;return function(s,l,c,f){for(var p,d,y=Bp(s),g=sP(y),v=r5(l,c),m=Tp(g),h=0,b=f||HP,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:Bx(w,p)}else switch(t){case 4:return!1;case 7:Bx(w,p)}return i?-1:r||o?o:w}},L1={forEach:bi(0),map:bi(1),filter:bi(2),some:bi(3),every:bi(4),find:bi(5),findIndex:bi(6),filterReject:bi(7)}.forEach,Rn=P1("hidden"),Fx=Bn("toPrimitive"),hW=ic.set,Tx=ic.getterFor("Symbol"),Gr=Object.prototype,Ui=kt.Symbol,Yi=Ui&&Ui.prototype,_x=kt.TypeError,fm=kt.QObject,Pc=rc("JSON","stringify"),WP=_1.f,Wi=ja.f,GP=UP.f,gW=Q3.f,qP=ge([].push),ii=us("symbols"),Rp=us("op-symbols"),dm=us("string-to-symbol-registry"),pm=us("symbol-to-string-registry"),vW=us("wks"),hm=!fm||!fm.prototype||!fm.prototype.findChild,M4=Hn&&Gn(function(){return oi(Wi({},"a",{get:function(){return Wi(this,"a",{value:7}).a}})).a!=7})?function(t,e,n){var r=WP(Gr,e);r&&delete Gr[e],Wi(t,e,n),r&&t!==Gr&&Wi(Gr,e,r)}:Wi,gm=function(t,e){var n=ii[t]=oi(Yi);return hW(n,{type:"Symbol",tag:t,description:e}),Hn||(n.description=e),n},Mg=function(t,e,n){t===Gr&&Mg(Rp,e,n),ar(t);var r=oc(e);return ar(n),Vt(ii,r)?(n.enumerable?(Vt(t,Rn)&&t[Rn][r]&&(t[Rn][r]=!1),n=oi(n,{enumerable:Yr(0,!1)})):(Vt(t,Rn)||Wi(t,Rn,Yr(1,{})),t[Rn][r]=!0),M4(t,r,n)):Wi(t,r,n)},Px=function(t,e){ar(t);var n=Po(e),r=a5(n).concat(z4(n));return L1(r,function(o){Hn&&!zn(KP,n,o)||Mg(t,o,n[o])}),t},KP=function(t){var e=oc(t),n=zn(gW,this,e);return!(this===Gr&&Vt(ii,e)&&!Vt(Rp,e))&&(!(n||!Vt(this,e)||!Vt(ii,e)||Vt(this,Rn)&&this[Rn][e])||n)},jx=function(t,e){var n=Po(t),r=oc(e);if(n!==Gr||!Vt(ii,r)||Vt(Rp,r)){var o=WP(n,r);return!o||!Vt(ii,r)||Vt(n,Rn)&&n[Rn][r]||(o.enumerable=!0),o}},Nx=function(t){var e=GP(Po(t)),n=[];return L1(e,function(r){Vt(ii,r)||Vt(_p,r)||qP(n,r)}),n},z4=function(t){var e=t===Gr,n=GP(e?Rp:
|
||
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||
|
*
|
||
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||
|
* Released under the MIT License.
|
||
|
*/function Ix(t){return Object.prototype.toString.call(t)==="[object Object]"}function xn(t){var e,n;return Ix(t)!==!1&&((e=t.constructor)===void 0||Ix(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 Gu(t){return!!t&&!!t[sr]}function qu(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)===FW}(t)||Array.isArray(t)||!!t[Ux]||!!t.constructor[Ux]||O5(t)||k5(t))}function Ld(t,e,n){n===void 0&&(n=!1),Bl(t)===0?(n?Object.keys:P5)(t).forEach(function(r){n&&typeof r=="symbol"||e(r,t[r],t)}):t.forEach(function(r,o){return e(o,r,t)})}function Bl(t){var e=t[sr];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:O5(t)?2:k5(t)?3:0}function $4(t,e){return Bl(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function XP(t,e,n){var r=Bl(t);r===2?t.set(e,n):r===3?(t.delete(e),t.add(n)):t[e]=n}function O5(t){return kW&&t instanceof Map}function k5(t){return BW&&t instanceof Set}function iu(t){return t.o||t.t}function B5(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=TW(t);delete e[sr];for(var n=P5(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 F5(t,e){return e===void 0&&(e=!1),T5(t)||Gu(t)||!qu(t)||(Bl(t)>1&&(t.set=t.add=t.clear=t.delete=xW),Object.freeze(t),e&&Ld(t,function(n,r){return F5(r,!0)},!0)),t}function xW(){Ur(2)}function T5(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ei(t){var e=_W[t];return e||Ur(18,t),e}function Lx(){return Rd}function vm(t,e){e&&(ei("Patches"),t.u=[],t.s=[],t.v=e)}function zg(t){H4(t),t.p.forEach(AW),t.p=null}function H4(t){t===Rd&&(Rd=t.l)}function Rx(t){return Rd={p:[],l:Rd,h:t,m:!0,_:0}}function AW(t){var e=t[sr];e.i===0||e.i===1?e.j():e.O=!0}function ym(t,e){e._=e.p.length;var n=e.p[0],r=t!==void 0&&t!==n;return e.h.g||ei("ES5").S(e,t,r),r?(n[sr].P&&(zg(e),Ur(4)),qu(t)&&(t=$g(e,t),e.l||Hg(e,t)),e.u&&ei("Patches").M(n[sr],t,e.u,e.s)):t=$g(e,n,[]),zg(e),e.u&&e.v(e.u,e.s),t!==ZP?t:void 0}function $g(t,e,n){if(T5(e))return e;var r=e[sr];if(!r)return Ld(e,function(i,a){return Mx(t,r,e,i,a,n)},!0),e;if(r.A!==t)return e;if(!r.P)return Hg(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=B5(r.k):r.o;Ld(r.i===3?new Set(o):o,function(i,a){return Mx(t,r,o,i,a,n)}),Hg(t,o,!1),n&&t.u&&ei("Patches").R(r,n,t.u,t.s)}return r.o}function Mx(t,e,n,r,o,i){if(Gu(o)){var a=$g(t,o,i&&e&&e.i!==3&&!$4(e.D,r)?i.concat(r):void 0);if(XP(n,r,a),!Gu(a))return;t.m=!1}if(qu(o)&&!T5(o)){if(!t.h.F&&t._<1)return;$g(t,o),e&&e.A.l||Hg(t,o)}}function Hg(t,e,n){n===void 0&&(n=!1),t.h.F&&t.m&&F5(e,n)}function mm(t,e){var n=t[sr];return(n?iu(n):t)[e]}function zx(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 V4(t){t.P||(t.P=!0,t.l&&V4(t.l))}function bm(t){t.o||(t.o=B5(t.t))}function U4(t,e,n){var r=O5(e)?ei("MapSet").N(e,n):k5(e)?ei("MapSet").T(e,n):t.g?function(o,i){var a=Array.isArray(o),u={i:a?1:0,A:i?i.A:Lx(),P:!1,I:!1,D:{},l:i,t:o,k:null,o:null,j:null,C:!1},s=u,l=q0;a&&(s=[u],l=K0);var c=Proxy.revocable(s,l),f=c.revoke,p=c.proxy;return u.k=p,u.j=f,p}(e,n):ei("ES5").J(e,n);return(n?n.A:Lx()).p.push(r),r}function OW(t){return Gu(t)||Ur(22,t),function e(n){if(!qu(n))return n;var r,o=n[sr],i=Bl(n);if(o){if(!o.P&&(o.i<4||!ei("ES5").K(o)))return o.t;o.I=!0,r=$x(n,i),o.I=!1}else r=$x(n,i);return Ld(r,function(a,u){o&&function(s,l){return Bl(s)===2?s.get(l):s[l]}(o.t,a)===u||XP(r,a,e(u))}),i===3?new Set(r):r}(t)}function $x(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=Kx.get(t);return e||(e=new Set,Kx.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=Yx.get(t);return e||(e=new Set,Yx.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=G4(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,S,C){return S==="character"?W4(D,C):S==="word"?function(O){for(var T=arguments.length>1&&arguments[1]!==void 0&&arguments[1],R=0,H=!1;O.length>0;){var M=W4(O,T),[K,U]=G4(O,M,T);if(MW(K,U,T))H=!0,R+=M;else{if(H)break;R+=M}O=U}return R}(D,C):S==="line"||S==="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=Xx.get(t);return e||(e=new Set,Xx.set(t,e)),e},removeMark(t,e){t.removeMark(e)},setNormalizing(t,e){qx.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 GA(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=EK(r,new RegExp(`%\\{${o}\\}`,"g"),i)}return r}var Bj=(Os=wK("apply"),class{constructor(t){Object.defineProperty(this,Os,{value:DK}),this.locale={strings:{},pluralize:e=>e===1?0:1},Array.isArray(t)?t.forEach(WA(this,Os)[Os],this):WA(this,Os)[Os](t)}translate(t,e){return this.translateArray(t,e).join("")}translateArray(t,e){if(!function(r,o){return Object.prototype.hasOwnProperty.call(r,o)}(this.locale.strings,t))throw new Error(`missing string: ${t}`);const n=this.locale.strings[t];if(typeof n=="object"){if(e&&e.smart_count!==void 0)return GA(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 GA(n,e)}});function DK(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 Fj=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},CK={urlAlphabet:"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"};let{urlAlphabet:SK}=CK,qA=t=>crypto.getRandomValues(new Uint8Array(t)),KA=(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 xK={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)=>KA(t,e,qA),customRandom:KA,urlAlphabet:SK,random:qA},Fm=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 Tj(t,e){this.text=t=t||"",this.hasWild=~t.indexOf("*"),this.separator=e,this.parts=t.split(e)}Tj.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 AK=/[\/\+\.]/,OK=function(t,e){function n(r){var o=function(i,a,u){var s=new Tj(i,u||/[\/\.]/);return a!==void 0?s.match(a):s}(r,t,AK);return o&&o.length>=2}return e?n(e.split(";")[0]):n},kK=0;function BK(t){return"__private_"+kK+++"_"+t}var Tm=BK("publish");class _j{constructor(){Object.defineProperty(this,Tm,{value:FK}),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,Tm)[Tm](n,r,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function FK(){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,zc)[zc](),o.length>0){let i=`Multiple errors occurred while adding files:
|
||
|
`;if(o.forEach(a=>{i+=`
|
||
|
* ${a.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:o.length}),details:i},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(o,i);{const a=new Error(i);throw a.errors=o,a}}}removeFiles(e,n){const{files:r,currentUploads:o}=this.getState(),i={...r},a={...o},u=Object.create(null);function s(f){return u[f]===void 0}e.forEach(f=>{r[f]&&(u[f]=r[f],delete i[f])}),Object.keys(a).forEach(f=>{const p=o[f].fileIDs.filter(s);p.length!==0?a[f]={...o[f],fileIDs:p}:delete a[f]});const l={currentUploads:a,files:i};Object.keys(i).length===0&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const c=Object.keys(u);c.forEach(f=>{this.emit("file-removed",u[f],n)}),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(e,n){n===void 0&&(n=null),this.removeFiles([e],n)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const n=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:n}),this.emit("upload-pause",e,n),n}pauseAll(){const e={...this.getState().files};Object.keys(e).filter(n=>!e[n].progress.uploadComplete&&e[n].progress.uploadStarted).forEach(n=>{const r={...e[n],isPaused:!0};e[n]=r}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter(n=>!e[n].progress.uploadComplete&&e[n].progress.uploadStarted).forEach(n=>{const r={...e[n],isPaused:!1,error:null};e[n]=r}),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},n=Object.keys(e).filter(o=>e[o].error);if(n.forEach(o=>{const i={...e[o],isPaused:!1,error:null};e[o]=i}),this.setState({files:e,error:null}),this.emit("retry-all",n),n.length===0)return Promise.resolve({successful:[],failed:[]});const r=ft(this,Uo)[Uo](n,{forceAllowNewUpload:!0});return ft(this,Wo)[Wo](r)}cancelAll(){this.emit("cancel-all");const{files:e}=this.getState(),n=Object.keys(e);n.length&&this.removeFiles(n,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const n=ft(this,Uo)[Uo]([e],{forceAllowNewUpload:!0});return ft(this,Wo)[Wo](n)}reset(){this.cancelAll()}logout(){this.iteratePlugins(e=>{e.provider&&e.provider.logout&&e.provider.logout()})}calculateProgress(e,n){if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const r=Number.isFinite(n.bytesTotal)&&n.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:n.bytesUploaded,bytesTotal:n.bytesTotal,percentage:r?Math.round(n.bytesUploaded/n.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter(s=>s.progress.uploadStarted||s.progress.preprocess||s.progress.postprocess);if(e.length===0)return this.emit("progress",0),void this.setState({totalProgress:0});const n=e.filter(s=>s.progress.bytesTotal!=null),r=e.filter(s=>s.progress.bytesTotal==null);if(n.length===0){const s=100*e.length,l=r.reduce((f,p)=>f+p.progress.percentage,0),c=Math.round(l/s*100);return void this.setState({totalProgress:c})}let o=n.reduce((s,l)=>s+l.progress.bytesTotal,0);const i=o/n.length;o+=i*r.length;let a=0;n.forEach(s=>{a+=s.progress.bytesUploaded}),r.forEach(s=>{a+=i*(s.progress.percentage||0)/100});let u=o===0?0:Math.round(a/o*100);u>100&&(u=100),this.setState({totalProgress:u}),this.emit("progress",u)}updateOnlineStatus(){window.navigator.onLine===void 0||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,n){if(typeof e!="function")throw new TypeError(`Expected a plugin class, but got ${e===null?"null":typeof e}. Please verify that the plugin was 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}}[Nj](e){return ft(this,pn)[pn][e]}iteratePlugins(e){Object.values(ft(this,pn)[pn]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const n=ft(this,pn)[pn][e.type],r=n.findIndex(i=>i.id===e.id);r!==-1&&n.splice(r,1);const o={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(o)}close(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.reset(),ft(this,Lc)[Lc](),this.iteratePlugins(e=>{this.removePlugin(e)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",ft(this,Hr)[Hr]),window.removeEventListener("offline",ft(this,Hr)[Hr]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,n,r){n===void 0&&(n="info"),r===void 0&&(r=3e3);const o=typeof e=="object";this.setState({info:[...this.getState().info,{type:n,message:o?e.message:e,details:o?e.details:null}]}),setTimeout(()=>this.hideInfo(),r),this.emit("info-visible")}log(e,n){const{logger:r}=this.opts;switch(n){case"error":r.error(e);break;case"warning":r.warn(e);break;default:r.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?ft(this,Wo)[Wo](e):(ft(this,vu)[vu](e),Promise.reject(new Error("Nonexistent upload")))}[Ij](){return ft(this,Uo)[Uo](...arguments)}addResultData(e,n){if(!ft(this,Im)[Im](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,Pm)[Pm](n),ft(this,jm)[jm](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 RK(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&&OK(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:Fm(o),file:t.name}))}if(n&&t.size!=null&&t.size>n)throw new yo(this.i18n("exceedsSize",{size:Fm(n),file:t.name}));if(r&&t.size!=null&&t.size<r)throw new yo(this.i18n("inferiorSize",{size:Fm(r)}))}function MK(t){const{minNumberOfFiles:e}=this.opts.restrictions;if(Object.keys(t).length<e)throw new yo(`${this.i18n("youHaveToAtLeastSelectX",{smart_count:e})}`)}function zK(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 B7(t){return Object.prototype.toString.call(t)==="[object Object]"}De({target:"Object",stat:!0,forced:NX},{keys:function(t){return gl(Na(t))}});var IX={isHistory(t){return B7(e=t)!==!1&&((n=e.constructor)===void 0||B7(r=n.prototype)!==!1&&r.hasOwnProperty("isPrototypeOf")!==!1)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Xi.isOperationList(t.redos[0]))&&(t.undos.length===0||Xi.isOperationList(t.undos[0]));var e,n,r}},Ym=new WeakMap,Xm=new WeakMap,sl={isHistoryEditor:t=>IX.isHistory(t.history)&&E.isEditor(t),isMerging:t=>Xm.get(t),isSaving:t=>Ym.get(t),redo(t){t.redo()},undo(t){t.undo()},withoutMerging(t,e){var n=sl.isMerging(t);Xm.set(t,!1),e(),Xm.set(t,n)},withoutSaving(t,e){var n=sl.isSaving(t);Ym.set(t,!1),e(),Ym.set(t,n)}},LX=X.String,ue=function(t){if(q1(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return LX(t)},J5=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},RX=sc.PROPER,vE=RegExp.prototype,nN=vE.toString,MX=pt(J5),zX=Zt(function(){return nN.call({source:"a",flags:"b"})!="/a/b"}),$X=RX&&nN.name!="toString";(zX||$X)&&Un(RegExp.prototype,"toString",function(){var t=Le(this),e=ue(t.source),n=t.flags;return"/"+e+"/"+ue(n===void 0&&Yu(vE,t)&&!("flags"in vE)?MX(t):n)},{unsafe:!0});var Vh,HX=an?Object.defineProperties:function(t,e){Le(t);for(var n,r=Ia(e),o=gl(e),i=o.length,a=0;i>a;)ro.f(t,n=o[a++],r[n]);return t},yE=ds("document","documentElement"),rN=X5("IE_PROTO"),Zm=function(){},oN=function(t){return"<script>"+t+"<\/script>"},F7=function(t){t.write(oN("")),t.close();var e=t.parentWindow.Object;return t=null,e},J0=function(){try{Vh=new ActiveXObject("htmlfile")}catch{}var t,e;J0=typeof document<"u"?document.domain&&Vh?F7(Vh):((e=Hd("iframe")).style.display="none",yE.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(oN("document.F=Object")),t.close(),t.F):F7(Vh);for(var n=av.length;n--;)delete J0.prototype[av[n]];return J0()};G1[rN]=!0;var X1=Object.create||function(t,e){var n;return t!==null?(Zm.prototype=Le(t),n=new Zm,Zm.prototype=null,n[rN]=t):n=J0(),e===void 0?n:HX(n,e)},mE=Se("unscopables"),bE=Array.prototype;bE[mE]==null&&ro.f(bE,mE,{configurable:!0,value:X1(null)});var ld=function(t){bE[mE][t]=!0},VX=Qj.includes;De({target:"Array",proto:!0},{includes:function(t){return VX(this,t,arguments.length>1?arguments[1]:void 0)}}),ld("includes");var UX=Se("match"),Q5=function(t){var e;return ce(t)&&((e=t[UX])!==void 0?!!e:Zr(t)=="RegExp")},WX=X.TypeError,tD=function(t){if(Q5(t))throw WX("The method doesn't accept regular expressions");return t},GX=Se("match"),eD=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[GX]=!1,"/./"[t](e)}catch{}}return!1},qX=pt("".indexOf);De({target:"String",proto:!0,forced:!eD("includes")},{includes:function(t){return!!~qX(ue(_r(this)),ue(tD(t)),arguments.length>1?arguments[1]:void 0)}});var KX=/"/g,YX=pt("".replace);De({target:"String",proto:!0,forced:Zt(function(){var t="".anchor('"');return t!==t.toLowerCase()||t.split('"').length>3})},{anchor:function(t){return e=t,n=ue(_r(this)),r="<a",(r+=' name="'+YX(ue(e),KX,""")+'"')+">"+n+"</a>";var e,n,r}});var wE=function(t,e,n){var r,o;Le(t);try{if(!(r=Xu(t,"return"))){if(e==="throw")throw n;return n}r=Ut(r,t)}catch(i){o=!0,r=i}if(e==="throw")throw n;if(o)throw r;return Le(r),n},XX=function(t,e,n,r){try{return r?e(Le(n)[0],n[1]):e(n)}catch(o){wE(t,"throw",o)}},Hl={},ZX=Se("iterator"),JX=Array.prototype,iN=function(t){return t!==void 0&&(Hl.Array===t||JX[ZX]===t)},Wd=function(t,e,n){var r=Y5(e);r in t?ro.f(t,r,U1(0,n)):t[r]=n},QX=Se("iterator"),nD=function(t){if(t!=null)return Xu(t,QX)||Xu(t,"@@iterator")||Hl[q1(t)]},tZ=X.TypeError,aN=function(t,e){var n=arguments.length<2?nD(t):e;if(Sa(n))return Le(Ut(n,t));throw tZ(V1(t)+" is not iterable")},T7=X.Array,uN=Se("iterator"),sN=!1;try{var eZ=0,_7={next:function(){return{done:!!eZ++}},return:function(){sN=!0}};_7[uN]=function(){return this},Array.from(_7,function(){throw
|
||
|
`)&&t.flags==="s")}),TZ=X.RegExp,sD=Zt(function(){var t=TZ("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),_Z=kn.get,PZ=W5("native-string-replace",String.prototype.replace),lv=RegExp.prototype.exec,SE=lv,jZ=pt("".charAt),NZ=pt("".indexOf),IZ=pt("".replace),Qm=pt("".slice),tb=function(){var t=/a/,e=/b*/g;return Ut(lv,t,"a"),Ut(lv,e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),$7=J1.BROKEN_CARET,eb=/()??/.exec("")[1]!==void 0;(tb||eb||$7||uD||sD)&&(SE=function(t){var e,n,r,o,i,a,u,s=this,l=_Z(s),c=ue(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=Ut(SE,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=$7&&s.sticky,y=Ut(J5,s),g=s.source,v=0,m=c;if(d&&(y=IZ(y,"y",""),NZ(y,"g")===-1&&(y+="g"),m=Qm(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&jZ(c,s.lastIndex-1)!==`
|
||
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),eb&&(n=new RegExp("^"+g+"$(?!\\s)",y)),tb&&(r=s.lastIndex),o=Ut(lv,d?n:s,m),d?o?(o.input=Qm(o.input,v),o[0]=Qm(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:tb&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),eb&&o&&o.length>1&&Ut(PZ,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=X1(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Gd=SE;De({target:"RegExp",proto:!0,forced:/./.exec!==Gd},{exec:Gd});var lD=Function.prototype,H7=lD.apply,LZ=lD.bind,V7=lD.call,cD=typeof Reflect=="object"&&Reflect.apply||(LZ?V7.bind(H7):function(){return V7.apply(H7,arguments)}),RZ=Se("species"),nb=RegExp.prototype,fD=function(t,e,n,r){var o=Se(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[RZ]=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===Gd||g===nb.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(nb,o,s[1])}r&&Xr(nb[o],"sham",!0)},MZ=lN.charAt,dD=function(t,e,n){return e+(n?MZ(t,e).length:1)},zZ=Math.floor,rb=pt("".charAt),$Z=pt("".replace),ob=pt("".slice),HZ=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,VZ=/\$([$&'`]|\d{1,2})/g,UZ=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=VZ;return o!==void 0&&(o=Na(o),s=HZ),$Z(i,s,function(l,c){var f;switch(rb(c,0)){case"$":return"$";case"&":return t;case"`":return ob(e,0,n);case"'":return ob(e,a);case"<":f=o[ob(c,1,-1)];break;default:var p=+c;if(p===0)return l;if(p>u){var d=zZ(p/10);return d===0?l:d<=u?r[d-1]===void 0?rb(c,1):r[d-1]+rb(c,1):l}f=r[p-1]}return f===void 0?"":f})},WZ=X.TypeError,qd=function(t,e){var n=t.exec;if(re(n)){var r=Ut(n,t,e);return r!==null&&Le(r),r}if(Zr(t)==="RegExp")return Ut(Gd,t,e);throw WZ("RegExp#exec called on incompatible receiver")},xE=Se("replace"),GZ=Math.max,qZ=Math.min,KZ=pt([].concat),ib=pt([].push),U7=pt("".indexOf),W7=pt("".slice),YZ="a".replace(/./,"$0")==="$0",G7=!!/./[xE]&&/./[xE]("a","$0")==="";fD("replace",function(t,e,n){var r=G7?"$":"$0";return[function(o,i){var a=_r(this),u=o==null?void 0:Xu(o,xE);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"&&U7(i,r)===-1&&U7(i,"$<")===-1){var s=n(e,a,u,i);if(s.done)return s.value}var l=re(i);l||(i=ue(i));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=qd(a,u);if(d===null||(ib(p,d),!c))break;ue(d[0])===""&&(a.lastIndex=dD(u,lc(a.lastIndex),f))}for(var y,g="",v=0,m=0;m<p.length;m++){for(var h=ue((d=p[m])[0]),b=GZ(qZ(Vp(d.index),u.length),0),w=[],D=1;D<d.length;D++)ib(w,(y=d[D])===void 0?y:String(y));var S=d.groups;if(l){var C=KZ([h],w,b,u);S!==void 0&&ib(C,S);var O=ue(cD(i,void 0,C))}else O=UZ(h,u,b,w,S,i);b>=v&&(g+=W7(u,v,b)+O,v=b+h.length)}return g+W7(u,v)}]},!!Zt(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$<a>")!=="7"})||!YZ||G7);/*! *****************************************************************************
|
||
|
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 AE=function(t,e){return AE=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])},AE(t,e)};function fc(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}AE(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 OE(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t}var XZ=0,q7=function(){this.id=""+XZ++},ZZ=kn.set,JZ=kn.getterFor("Array Iterator"),Zf=iD(Array,"Array",function(t,e){ZZ(this,{type:"Array Iterator",target:Ia(t),index:0,kind:e})},function(){var t=JZ(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");Hl.Arguments=Hl.Array,ld("keys"),ld("values"),ld("entries");var Ul=function(t,e,n){for(var r in e)Un(t,r,e[r],n);return t},QZ=X.Array,tJ=Math.max,kE=function(t,e,n){for(var r=ps(t),o=$l(e,r),i=$l(n===void 0?r:n,r),a=QZ(tJ(i-o,0)),u=0;o<i;o++,u++)Wd(a,u,t[o]);return a.length=u,a},K7=Vd.f,Y7=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],eJ={f:function(t){return Y7&&Zr(t)=="Window"?function(e){try{return K7(e)}catch{return kE(Y7)}}(t):K7(Ia(t))}},X7=Zt(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),Wh=Object.isExtensible,yu=Zt(function(){Wh(1)})||X7?function(t){return!!ce(t)&&(!X7||Zr(t)!="ArrayBuffer")&&(!Wh||Wh(t))}:Wh,nJ=!Zt(function(){return Object.isExtensible(Object.preventExtensions({}))}),Q1=Hp(function(t){var e=ro.f,n=!1,r=G5("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=Vd.f,s=pt([].splice),l={};l[r]=1,u(l).length&&(Vd.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:eJ.f}))},fastKey:function(u,s){if(!ce(u))return typeof u=="symbol"?u:(typeof u=="string"?"S":"P")+u;if(!Ie(u,r)){if(!yu(u))return"F";if(!s)return"E";i(u)}return u[r].objectID},getWeakData:function(u,s){if(!Ie(u,r)){if(!yu(u))return!0;if(!s)return!1;i(u)}return u[r].weakData},onFreeze:function(u){return nJ&&n&&yu(u)&&!Ie(u,r)&&i(u),u}};G1[r]=!0}),rJ=X.TypeError,Q0=function(t,e){this.stopped=t,this.result=e},Z7=Q0.prototype,Kd=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=Zu(e,c),g=function(m){return r&&wE(r,"normal",m),new Q0(!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=nD(t)))throw rJ(V1(t)+" is not iterable");if(iN(o)){for(i=0,a=ps(t);a>i;i++)if((u=v(t[i]))&&Yu(Z7,u))return u;return new Q0(!1)}r=aN(t,o)}for(s=r.next;!(l=Ut(s,r)).done;){try{u=v(l.value)}catch(m){wE(r,"throw",m)}if(typeof u=="object"&&u&&Yu(Z7,u))return u}return new Q0(!1)},oJ=X.TypeError,ty=function(t,e){if(Yu(e,t))return t;throw oJ("Incorrect invo
|
||
|
`)}return o};function EN(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||EN(o,e)}}function l9(t){if(t.length===0)return"";var e=t[0];return e.nodeType!==mo.ELEMENT_NODE?"":e.tagName.toLowerCase()}(Sn=mo||(mo={}))[Sn.ELEMENT_NODE=1]="ELEMENT_NODE",Sn[Sn.TEXT_NODE=3]="TEXT_NODE",Sn[Sn.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",Sn[Sn.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",Sn[Sn.COMMENT_NODE=8]="COMMENT_NODE",Sn[Sn.DOCUMENT_NODE=9]="DOCUMENT_NODE",Sn[Sn.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",Sn[Sn.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",globalThis.navigator!==void 0&&globalThis.window!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&globalThis.window.MSStream;var NE=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),cd=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent);var Zc=typeof navigator<"u"&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),yJ=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),mJ=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),IE=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent);typeof navigator<"u"&&/.*QQBrowser/.test(navigator.userAgent);var Jc=!mJ&&!yJ&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",A={getWindow:function(t){var e=mN.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},findKey:function(t,e){var n=eg.get(e);return n||(n=new q7,eg.set(e,n)),n},setNewKey:function(t){var e=new q7;eg.set(t,e)},findPath:function(t,e){for(var n=[],r=e;;){var o=Wl.get(r);if(o==null){if(E.isEditor(r))return n;break}var i=Yd.get(r);if(i==null)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: "+JSON.stringify(e))},findDocumentOrShadowRoot:function(t){if(t.isDestroyed)return window.document;var e=A.toDOMNode(t,t),n=e.getRootNode();return(n instanceof Document||n instanceof ShadowRoot)&&n.getSelection!=null?n:e.ownerDocument},getParentNode:function(t,e){return Wl.get(e)||null},getParentsNodes:function(t,e){for(var n=[],r=e;r!==t&&r!=null;){var o=A.getParentNode(t,r);if(o==null)break;n.push(o),r=o}return n},getTopNode:function(t,e){var n=[A.findPath(t,e)[0]];return Q.get(t,n)},toDOMNode:function(t,e){var n;if(E.isEditor(e))n=gD.get(t);else{var r=A.findKey(t,e);n=PE.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.e
|
||
|
`)))&&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=BE.get(t);if(e==null)throw new Error("Cannot find textarea instance by editor");return e},getToolbar:function(t){return ey.get(t)||null},getHoverbar:function(t){return cv.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];EN(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===""}},bJ=1,DN={},Xd={},wJ=cc.filter,EJ=Z1("filter");De({target:"Array",proto:!0,forced:!EJ},{filter:function(t){return wJ(this,t,arguments.length>1?arguments[1]:void 0)}});var LE=`
|
||
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,c9=pt("".replace),pv="["+LE+"]",DJ=RegExp("^"+pv+pv+"*"),CJ=RegExp(pv+pv+"*$"),db=function(t){return function(e){var n=ue(_r(e));return 1&t&&(n=c9(n,DJ,"")),2&t&&(n=c9(n,CJ,"")),n}},SJ={start:db(1),end:db(2),trim:db(3)},xJ=sc.PROPER,AJ=SJ.trim;De({target:"String",proto:!0,forced:function(t){return Zt(function(){return!!LE[t]()||"\u200B\x85\u180E"[t]()!=="\u200B\x85\u180E"||xJ&&LE[t].name!==t})}("trim")},{trim:function(){return AJ(this)}});var RE=[],CN={};function OJ(t,e,n){var r=n.isInline(t)?"span":"div";return"<"+r+">"+e+"</"+r+">"}var Zd,Fs,f9,pb,hv=X.Promise,d9=Se("species"),yD=function(t){var e=ds(t),n=ro.f;an&&e&&!e[d9]&&n(e,d9,{configurable:!0,get:function(){return this}})},kJ=X.TypeError,BJ=Se("species"),SN=function(t,e){var n,r=Le(t).constructor;return r===void 0||(n=Le(r)[BJ])==null?e:function(o){if(Y1(o))return o;throw kJ(V1(o)+" is not a constructor")}(n)},xN=pt([].slice),AN=/(?:ipad|iphone|ipod).*applewebkit/i.test(hl),ia=Zr(X.process)=="process",ME=X.setImmediate,zE=X.clearImmediate,FJ=X.process,hb=X.Dispatch,TJ=X.Function,p9=X.MessageChannel,_J=X.String,gb=0,fd={};try{Zd=X.location}catch{}var mD=function(t){if(Ie(fd,t)){var e=fd[t];delete fd[t],e()}},vb=function(t){return function(){mD(t)}},h9=function(t){mD(t.data)},g9=function(t){X.postMessage(_J(t),Zd.protocol+"//"+Zd.host)};ME&&zE||(ME=function(t){var e=xN(arguments,1);return fd[++gb]=function(){cD(re(t)?t:TJ(t),void 0,e)},Fs(gb),gb},zE=function(t){delete fd[t]},ia?Fs=function(t){FJ.nextTick(vb(t))}:hb&&hb.now?Fs=function(t){hb.now(vb(t))}:p9&&!AN?(pb=(f9=new p9).port2,f9.port1.onmessage=h9,Fs=Zu(pb.postMessage,pb)):X.addEventListener&&re(X.postMessage)&&!X.importScripts&&Zd&&Zd.protocol!=="file:"&&!Zt(g9)?(Fs=g9,X.addEventListener("message",h9,!1)):Fs="onreadystatechange"in Hd("script")?function(t){yE.appendChild(Hd("script")).onreadystatechange=function(){yE.removeChild(this),mD(t)}}:function(t){setTimeout(vb(t),0)});var Qc,pu,dd,nl,yb,mb,bb,v9,ON={set:ME,clear:zE},PJ=/ipad|iphone|ipod/i.test(hl)&&X.Pebble!==void 0,jJ=/web0s(?!.*chrome)/i.test(hl),NJ=Up.f,wb=ON.set,y9=X.MutationObserver||X.WebKitMutationObserver,m9=X.document,b9=X.process,Xh=X.Promise,w9=NJ(X,"queueMicrotask"),kN=w9&&w9.value;kN||(Qc=function(){var t,e;for(ia&&(t=b9.domain)&&t.exit();pu;){e=pu.fn,pu=pu.next;try{e()}catch(n){throw pu?nl():dd=void 0,n}}dd=void 0,t&&t.enter()},AN||ia||jJ||!y9||!m9?!PJ&&Xh&&Xh.resolve?((bb=Xh.resolve(void 0)).constructor=Xh,v9=Zu(bb.then,bb),nl=function(){v9(Qc)}):ia?nl=function(){b9.nextTick(Qc)}:(wb=Zu(wb,X),nl=function(){wb(Qc)}):(yb=!0,mb=m9.createTextNode(""),new y9(Qc).observe(mb,{characterData:!0}),nl=function(){mb.data=yb=!yb}));var Eb,E9,BN,D9,FN=kN||function(t){var e={fn:t,next:void 0};dd&&(dd.next=e),pu||(pu=e,nl()),dd=e},IJ=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)},bD={f:function(t){return new IJ(t)}},$E=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},LJ=typeof window=="object",TN=ON.set,RJ=Se("species"),go="Promise",C9=kn.getterFor(go),MJ=kn.set,zJ=kn.getterFor(go),uu=hv&&hv.prototype,bo=hv,tf=uu,_N=X.TypeError,HE=X.document,wD=X.process,vl=bD.f,$J=vl,HJ=!!(HE&&HE.createEvent&&X.dispatchEvent),PN=re(X.PromiseRejectionEvent),jN=!1,pd=Ud(go,function(){var t=W1(bo),e=t!==String(bo);if(!e&&$d===66)return!0;if($d>=51&&/native code/.test(t))return!1;var n=new bo(function(o){o(1)}),r=function(o){o(function(){},function(){})};return(n.constructor={})[RJ]=r,!(jN=n.then(function(){})instanceof r)||!e&&LJ&&!PN}),VJ=pd||!rD(function(t){bo.all(t).catch(function(){})}),NN=function(t){var e;return!(!ce(t)||!re(e=t.then))&&e},ED=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;FN(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&&WJ(t),t.rejection=1),c===!0?a=r:(d&&
|
||
|
`)>=0)return;c&&(c=VN(c),T9(u,c)||u.push({text:c}))}}else{if(l.nodeName==="BR")return void(T9(u,`
|
||
|
`)||u.push({text:`
|
||
|
`}));var f=CD(B(l),a);Array.isArray(f)?f.forEach(function(p){return u.push(p)}):u.push(f)}}),u)}(t,e),r=function(i){for(var a in gv)if(i[0].matches(a))return gv[a];return sQ}(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," ")}]),DD.forEach(function(a){i=a(t[0],i,e)}))}),o}function Sb(t,e){t.parents("pre").length===0&&(t[0].innerHTML=t[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,`
|
||
|
`));var n=t[0].textContent||"";n=function(o){return o.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"\xAE").replace(/©/g,"\xA9").replace(/™/g,"\u2122").replace(/"/g,'"')}(n);var r={text:n=VN(n)};return DD.forEach(function(o){r=o(t[0],r,e)}),r}function CD(t,e){$N.forEach(function(r){var o=r.selector,i=r.preParseHtml;t[0].matches(o)&&(t=B(i(t[0])))});var n=l9(t);return n==="span"?t.attr("data-w-e-type")?Cb(t,e):Sb(t,e):n==="code"?l9(t.parent())==="pre"?Cb(t,e):Sb(t,e):zN.includes(n)?Sb(t,e):Cb(t,e)}function UN(t,e,n){var r=B(n);return!!r.attr(e)||(r.attr(e,"true"),t.on("destroyed",function(){r.removeAttr(e)}),!1)}function _9(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=CD(B(o),t);Array.isArray(i)?i.forEach(function(a){return n.push(a)}):n.push(i)}),n}var lQ=ro.f,P9=Q1.fastKey,j9=kn.set,xb=kn.getterFor,cQ={getConstructor:function(t,e,n,r){var o=t(function(l,c){ty(l,i),j9(l,{type:e,index:X1(null),first:void 0,last:void 0,size:0}),an||(l.size=0),c!=null&&Kd(c,l[r],{that:l,AS_ENTRIES:n})}),i=o.prototype,a=xb(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=P9(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=P9(c);if(d!=="F")return p.index[d];for(f=p.first;f;f=f.next)if(f.key==c)return f};return Ul(i,{clear:function(){for(var l=a(this),c=l.index,f=l.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete c[f.index],f=f.next;l.first=l.last=void 0,an?l.size=0:this.size=0},delete:function(l){var c=this,f=a(c),p=s(c,l);if(p){var d=p.next,y=p.previous;delete f.index[p.index],p.removed=!0,y&&(y.next=d),d&&(d.previous=y),f.first==p&&(f.first=d),f.last==p&&(f.last=y),an?f.size--:c.size--}return!!p},forEach:function(l){for(var c,f=a(this),p=Zu(l,arguments.length>1?arguments[1]:void 0);c=c?c.next:f.first;)for(p(c.value,c.key,this);c&&c.removed;)c=c.previous},has:function(l){return!!s(this,l)}}),Ul(i,n?{get:function(l){var c=s(this,l);return c&&c.value},set:function(l,c){return u(this,l===0?0:l,c)}}:{add:function(l){return u(this,l=l===0?0:l,l)}}),an&&lQ(i,"size",{get:function(){return a(this).size}}),o},setStrong:function(t,e,n){var r=e+" Iterator",o=xb(e),i=xb(r);iD(t,e,function(a,u){j9(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),yD(e)}};pN("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},cQ);var N9=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function I9(t,e){t.isInline(e)?(t.insertNode(e),e.type==="link"&&t.insertFragment([{text:""}])):N.insertNodes(t,e,{mode:"highest"})}var fQ=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 S=D.getAttribute("data-slate-zero-width")==="n";D.textContent=S?`
|
||
|
`:""}),bN(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",vJ(w)),f.ownerDocument.body.removeChild(w),r}}},e.insertData=function(r){var o,i,a=r.getData("application/x-slate-fragment");if(a){var u=decodeURIComponent(window.atob(a)),s=JSON.parse(u);e.insertFragment(s)}else{var l=r.getData("text/plain"),c=r.getData("text/html");if(c)e.dangerouslyInsertHtml(c);else if(l){var f=l.split(/\r\n|\r|\n/),p=!1;try{for(var d=Dr(f),y=d.next();!y.done;y=d.next()){var g=y.value;p&&N.splitNodes(e,{always:!0}),n(g),p=!0}}catch(v){o={error:v}}finally{try{y&&!y.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}}},e},Jf=function(t){return t!=null},dQ={object:!0,function:!0,undefined:!0},pQ=/^\s*class[\s{/}]/,hQ=Function.prototype.toString,L9=function(t){return!!function(e){if(typeof e!="function"||!hasOwnProperty.call(e,"length"))return!1;try{if(typeof e.length!="number"||typeof e.call!="function"||typeof e.apply!="function")return!1}catch{return!1}return!function(n){if(!function(r){return!!Jf(r)&&hasOwnProperty.call(dQ,typeof r)}(n))return!1;try{return!!n.constructor&&n.constructor.prototype===n}catch{return!1}}(e)}(t)&&!pQ.test(hQ.call(t))},SD=function(t){return t!=null},gQ=Object.keys,vQ=function(){try{return Object.keys("primitive"),!0}catch{return!1}}()?Object.keys:function(t){return gQ(SD(t)?Object(t):t)},yQ=function(t){if(!SD(t))throw new TypeError("Cannot use null or undefined");return t},mQ=Math.max,R9=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=mQ(arguments.length,2);for(t=Object(yQ(t)),o=function(a){try{t[a]=e[a]}catch(u){n||(n=u)}},r=1;r<i;++r)vQ(e=arguments[r]).forEach(o);if(n!==void 0)throw n;return t},bQ=Array.prototype.forEach,wQ=Object.create,EQ=function(t,e){var n;for(n in t)e[n]=t[n]},M9=function(t){var e=wQ(null);return bQ.call(arguments,function(n){SD(n)&&EQ(Object(n),e)}),e},Ab="razdwatrzy",DQ=String.prototype.indexOf,nf=typeof Ab.contains=="function"&&Ab.contains("dwa")===!0&&Ab.contains("foo")===!1?String.prototype.contains:function(t){return DQ.call(this,t,arguments[1])>-1},Jh=Hp(function(t){var e=t.exports=function(n,r){var o,i,a,u,s;return arguments.length<2||typeof n!="string"?(u=r,r=n,n=null):u=arguments[2],Jf(n)?(o=nf.call(n,"c"),i=nf.call(n,"e"),a=nf.call(n,"w")):(o=a=!0,i=!1),s={value:r,configurable:o,enumerable:i,writable:a},u?R9(M9(u),s):s};e.gs=function(n,r,o){var i,a,u,s;return typeof n!="string"?(u=o,o=r,r=n,n=null):u=arguments[3],Jf(r)?L9(r)?Jf(o)?L9(o)||(u=o,o=void 0):o=void 0:(u=r,r=o=void 0):r=void 0,Jf(n)?(i=nf.call(n,"c"),a=nf.call(n,"e")):(i=!0,a=!1),s={get:r,set:o,configurable:i,enumerable:a},u?R9(M9(u),s):s}}),Ob=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");return t},CQ=Hp(function(t,e){var n,r,o,i,a,u,s,l=Function.prototype.apply,c=Function.prototype.call,f=Object.create,p=Object.defineProperty,d=Object.defineProperties,y=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};n=function(v,m){var h;return Ob(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 Ob(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(Ob(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 Bb(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 GE(t,e,n,r){return Yd.set(t,e),Wl.set(t,n),ct.isElement(t)?function(o,i){var a,u=A.findKey(i,o),s=i.isInline(o),l=E.isVoid(i,o),c=MN(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 qN[D]||NQ}(p);a=l?null:y.map(function(D,S){return GE(D,S,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"}},GE(b,0,o,i));v=bt(m,{style:{position:"relative"}},v,w),Yd.set(b,0),Wl.set(b,o)}return v.data==null&&(v.data={}),Object.assign(v.data,f),l||s||(v=function(D,S){var C=S;return WE.forEach(function(O){C=O(D,S)}),C}(o,v)),Pr(function(){var D=jE(c);D!=null&&(PE.set(u,D),dv.set(o,D),fv.set(D,o))}),v}(t,r):function(o,i,a){if(o.text==null)throw new Error("Current node is not slate Text "+JSON.stringify(o));var u=A.findKey(a,o),s=a.getConfig().decorate;if(s==null)throw new Error("Can not get config.decorate");var l=A.findPath(a,o),c=s([o,l]),f=ot.decorations(o,c),p=f.map(function(g,v){var m=function(h,b,w,D,S){b===void 0&&(b=!1);var C=h.text,O=A.findPath(S,w),T=j.parent(O);if(E.isEditor(D))throw new Error("Text node "+JSON.stringify(w)+" parent is Editor");return S.isVoid(D)?Bb(Q.string(D).length):C!==""||D.children[D.children.length-1]!==w||S.isInline(D)||E.string(S,T)!==""?C===""?Bb():b&&C.slice(-1)===`
|
||
|
`?U9(C,!0):U9(C):Bb(0,!0)}(g,v===f.length-1,o,i,a);return m=function(h,b){var w=b;return WE.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=jE(d);g!=null&&(PE.set(u,g),dv.set(o,g),fv.set(g,o))}),y}(t,n,r)}function IQ(t,e){var n,r=t.$scroll,o=function(g){return"w-e-textarea-"+g}(t.id),i=e.getConfig(),a=i.readOnly,u=i.autoFocus,s=function(g,v){return v===void 0&&(v=!1),zl("div#"+g,{props:{contentEditable:!v}})}(o,a),l=e.children||[];s.children=l.map(function(g,v){var m=GE(g,v,e,e);return GN(m),m});var c=r9.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=Aq([kq,_q,jq,Bq,Tq,Oq]))(n,s),r9.set(t,!1),o9.set(t,d)}else{var p=i9.get(t),d=o9.get(t);if(p==null||d==null)return;n=p.elm,d(p,s)}if(n!=null||(n=jE(o))!=null){if((c?u:e.isFocused())&&n.focus({preventScroll:!0}),c){var y=vD(n);y&&mN.set(e,y)}gD.set(e,n),dv.set(e,n),fv.set(n,e),i9.set(t,s)}}function W9(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function G9(t,e){return(!e||t!=="hidden")&&t!=="visible"&&t!=="clip"}function Fb(t,e){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var n=getComputedStyle(t,null);return G9(n.overflowY,e)||G9(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 t0(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 q9(t,e){var n=window,r=e.scrollMode,o=e.block,i=e.inline,a=e.boundary,u=e.skipOverflowHiddenElements,s=typeof a=="function"?a:function(Dt){return Dt!==a};if(!W9(t))throw new TypeError("Invalid target");for(var l=document.scrollingElement||document.documentElement,c=[],f=t;W9(f)&&s(f);){if((f=f.parentElement)===l){c.push(f);break}f!=null&&f===document.body&&Fb(f)&&!Fb(document.documentElement)||f!=null&&Fb(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,S=v.left,C=o==="start"||o==="nearest"?b:o==="end"?D:b+m/2,O=i==="center"?S+h/2:i==="end"?w:S,T=[],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&&S>=0&&D<=d&&w<=p&&b>=W&&D<=nt&&S>=lt&&w<=q)return T;var st=getComputedStyle(H),at=parseInt(st.borderLeftWidth,10),k=parseInt(st.borderTopWidth,10),x=parseInt(st.borderRightWidth,10),P=parseInt(st.borderBottomWidth,10),$=0,Y=0,V="offsetWidth"in H?H.offsetWidth-H.clientWidth-at-x:0,it="offsetHeight"in H?H.offsetHeight-H.clientHeight-k-P:0;if(l===H)$=o==="start"?C:o==="end"?C-d:o==="nearest"?t0(g,g+d,d,k,P,g+C,g+C+m,m):C-d/2,Y=i==="start"?O:i==="center"?O-p/2:i==="end"?O-p:t0(y,y+p,p,at,x,y+O,y+O+h,h),$=Math.max(0,$+g),Y=Math.max(0,Y+y);else{$=o==="start"?C-W-k:o==="end"?C-nt+P+it:o==="nearest"?t0(W,nt,K,k,P+it,C,C+m,m):C-(W+K/2)+it/2,Y=i==="start"?O-lt-at:i==="center"?O-(lt+U/2)+V/2:i==="end"?O-q+x+V:t0(lt,q,U,at,x+V,O,O+h,h);var gt=H.scrollLeft,vt=H.scrollTop;C+=vt-($=Math.max(0,Math.min(vt+$,H.scrollHeight-K+it))),O+=gt-(Y=Math.max(0,Math.min(gt+Y,H.scrollWidth-U+V)))}T.push({el:H,top:$,left:Y})}return T}function K9(t){return t===Object(t)&&Object.keys(t).length!==0}function mr(t,e){return Ju(e)&&A.hasDOMNode(t,e,{editable:!0})}function Y9(t,e){if(t.getConfig().readOnly)return!1;var n=ol(t,e)&&A.toSlateNode(t,e);return E.isVoid(t,n)}function ol(t,e){return Ju(e)&&A.hasDOMNode(t,e)}function KN(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=gD.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")}}}fD("match",function(t,e,n){return[function(r){var o=_r(this),i=r==null?void 0:Xu(r,t);return i?Ut(i,r,o):new RegExp(r)[t](ue(o))},function(r){var o=Le(this),i=ue(r),a=n(e,o,i);if(a.done)return a.value;if(!o.global)return qd(o,i);var u=o.unicode;o.lastIndex=0;for(var s,l=[],c=0;(s=qd(o,i))!==null;){var f=ue(s[0]);l[c]=f,f===""&&(o.lastIndex=dD(i,lc(o.lastIndex),u)),c++}return c===0?null:l}]});var FD=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);kD(d),p.append(d)}else p.text(u);XN(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}(),VQ=function(t){function e(n,r,o){return o===void 0&&(o=!1),t.call(this,n,r,o)||this}return fc(e,t),e.prototype.onButtonClick=function(){},e}(FD),TD=function(){function t(e){this.isShow=!1,this.showTime=0,this.record(e)}return t.prototype.record=function(e){var n=_E.get(e);n==null&&(n=new Set,_E.set(e,n)),n.add(this),tg.set(this,e)},t.prototype.renderContent=function(e){var n=this.$elem;n.empty(),n.append(e);var r=this.genSelfElem();r&&n.append(r)},t.prototype.appendTo=function(e){var n=this.$elem;e.append(n)},t.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=tg.get(this);e&&e.emit("modalOrPanelShow",this)}},t.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=tg.get(this);e&&e.emit("modalOrPanelHide")}},t}(),UQ=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 fc(e,t),e.prototype.genSelfElem=function(){return null},e}(TD),WQ=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=BD();i.$button.append(a)}return i}return fc(e,t),e.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},e.prototype.handleDropPanel=function(){var n=this.menu;if(n.getPanelContentElem!=null){var r=er(this);if(this.dropPanel==null){var o=new UQ(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}(FD),GQ=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 fc(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 T,R;O===void 0&&(O=!1);var H=[],M=E.nodes(h,{at:[],universal:!0});try{for(var K=Dr(M),U=K.next();!U.done;U=K.next()){var W=Ht(U.value,1)[0];if(ct.isElement(W)&&(O?W.type.indexOf(C)>=0:W.type===C)){var q=MN(A.findKey(h,W).id);H.push(Er(Er({},W),{id:q}))}}}catch(nt){T={error:nt}}finally{try{U&&!U.done&&(R=K.return)&&R.call(K)}finally{if(T)throw T.error}}return H},h.getElemsByTypePrefix=function(C){return h.getElemsByType(C,!0)},h.isEmpty=function(){var C=h.children,O=C===void 0?[]:C;if(O.length>1)return!1;var T=O[0];if(T==null)return!0;if(ct.isElement(T)&&T.type==="paragraph"){var R=T.children,H=R===void 0?[]:R;if(H.length>1)return!1;var M=H[0];if(M==null||ot.isText(M)&&M.text==="")return!0}return!1},h.clear=function(){N.delete(h,{at:{anchor:E.start(h,[]),focus:E.end(h,[])}}),h.children.length===0&&N.insertNodes(h,[{type:"paragraph",children:[{text:""}]}])},h.getParentNode=function(C){return A.getParentNode(h,C)},h.dangerouslyInsertHtml=function(C,O){if(C===void 0&&(C=""),O===void 0&&(O=!1),C){var T=document.createElement("div");T.innerHTML=C;var R=Array.from(T.childNodes);if(R=R.filter(function(U){var W=U.nodeType,q=U.nodeName;return W===mo.TEXT_NODE||W===mo.ELEMENT_NODE&&!N9.has(q.toLowerCase())}),R.length!==0){var H=h.selection;if(H!=null){var M=null;A.isSelectedEmptyParagraph(h)&&!O&&(M=[H.focus.path[0]]),T.setAttribute("hidden","true"),document.body.appendChild(T);var K=0;R.forEach(function(U){var W=U.nodeType,q=U.nodeName,nt=U.textContent,lt=nt===void 0?"":nt;if(W!==mo.TEXT_NODE)if(q!=="BR"){var st=U,at=!1;if(zN.includes(q.toLowerCase()))at=!0;else for(var k in gv)if(st.matches(k)){at=!0;break}if(at){var x=CD(B(st),h);return Array.isArray(x)?(x.forEach(function($){return I9(h,$)}),K++):(I9(h,x),K++),void(A.isSelectedVoidNode(h)&&h.move(1))}var P=window.getComputedStyle(st).display;A.isSelectedEmptyParagraph(h)||P.indexOf("inline")<0&&h.insertBreak(),h.dangerouslyInsertHtml(st.innerHTML,!0)}else h.insertText(`
|
||
|
`);else{if(!lt||!lt.trim())return;h.insertNode({text:lt})}}),K&&M&&A.isEmptyPath(h,M)&&N.removeNodes(h,{at:M}),T.remove()}}}},h.setHtml=function(C){C===void 0&&(C="");var O=h.isDisabled(),T=h.isFocused(),R=JSON.stringify(h.selection);h.enable(),h.focus(),h.clear();var H=_9(h,C);if(N.insertFragment(h,H),T||(h.deselect(),h.blur()),O&&(h.deselect(),h.disable()),h.isFocused())try{h.select(JSON.parse(R))}catch{h.select(E.start(h,[]))}},h}(function(m){var h=m;return h.getAllMenuKeys=function(){var b=[];for(var w in Xd)b.push(w);return b},h.getConfig=function(){var b=n9.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=fQ(jW());return h.id="wangEditor-"+bJ++,h.isDestroyed=!1,h.isFullScreen=!1,h.focus=function(b){if(A.toDOMNode(h,h).focus({preventScroll:!0}),Bu.set(h,!0),b){var w=E.end(h,[]);N.select(h,w)}else{var D=cb.get(h);D?N.select(h,D):N.select(h,E.start(h,[]))}},h.isFocused=function(){return!!Bu.get(h)},h.blur=function(){A.toDOMNode(h,h).blur(),N.deselect(h),Bu.set(h,!1)},h.updateView=function(){A.getTextarea(h).changeViewState();var b=A.getToolbar(h);b&&b.changeToolbarState();var w=A.getHoverbar(h);w&&w.changeHoverbarState()},h.destroy=function(){if(!h.isDestroyed){var b=A.getTextarea(h);b.destroy(),BE.delete(h),FE.delete(b);var w=A.getToolbar(h);w&&(w.destroy(),ey.delete(h),pD.delete(w));var D=A.getHoverbar(h);D&&(D.destroy(),cv.delete(h),TE.delete(D)),h.isDestroyed=!0,h.emit("destroyed")}},h.scrollToElem=function(b){if(!h.getConfig().scroll){var w="\u7F16\u8F91\u5668\u7981\u7528\u4E86 scroll \uFF0C\u7F16\u8F91\u5668\u5185\u5BB9\u65E0\u6CD5\u6EDA\u52A8\uFF0C\u8BF7\u81EA\u884C\u5B9E\u73B0\u8BE5\u529F\u80FD";return w+=`
|
||
|
You has disabled editor scroll, please do this yourself`,void console.warn(w)}var D=B("#"+b);if(D.length!==0){var S=D[0];if(!A.hasDOMNode(h,S))return w="Element (found by id is '"+b+"') is not in editor DOM",w+=`
|
||
|
\u901A\u8FC7 id '`+b+"' \u627E\u5230\u7684 element \u4E0D\u5728 editor DOM \u4E4B\u5185",void console.error(w,S);var C=A.getTextarea(h),O=C.$textAreaContainer,T=C.$scroll,R=D.offset().top,H=O.offset().top;T[0].scrollBy({top:R-H,behavior:"smooth"})}},h.showProgressBar=function(b){b<1||A.getTextarea(h).changeProgress(b)},h.hidePanelOrModal=function(){var b=_E.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
|
||
|
\u4E0D\u80FD\u8BBE\u7F6E\u5168\u5C4F\uFF0C\u56E0\u4E3A toolbar DOM \u7236\u8282\u70B9\u548C textarea DOM \u7236\u8282\u70B9\u4E0D\u4E00\u81F4`);D.addClass("w-e-full-screen-container");var S=D.css("z-index");D.attr("data-z-index",S.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 UN(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=kj(DN),b={},w=m.MENU_CONF,D=w===void 0?{}:w;return L5(h,function(S,C){b[C]=Er(Er({},S),D[C]||{})}),delete m.MENU_CONF,Er({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:b,hoverbarKeys:{},customAlert:function(S,C){window.alert(C+`:
|
||
|
`+S)}},m)}(o);n9.set(l,c);var f=c.hoverbarKeys,p=f===void 0?{}:f;if(s.forEach(function(m){l=m(l)}),a!=null&&(l.children=_9(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 HQ(n);BE.set(l,d),FE.set(d,l),d.changeViewState(),Pr(function(){var m=d.$scroll;m!=null&&m.height()<300&&console.warn(`\u7F16\u8F91\u533A\u57DF\u9AD8\u5EA6 < 300px \u8FD9\u53EF\u80FD\u4F1A\u5BFC\u81F4 modal hoverbar \u5B9A\u4F4D\u5F02\u5E38
|
||
|
Textarea height < 300px . This may be cause modal and hoverbar position error`,m)});var y=void 0;Object.keys(p).length>0&&(y=new ZQ,TE.set(y,l),cv.set(l,y)),l.on("change",function(){l.hidePanelOrModal()}),l.on("scroll",function(){l.hidePanelOrModal()})}else l.children.forEach(function(m,h){return JN(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 QQ=Z1("splice"),ttt=X.TypeError,ett=Math.max,ntt=Math.min;De({target:"Array",proto:!0,forced:!QQ},{splice:function(t,e){var n,r,o,i,a,u,s=Na(this),l=ps(s),c=$l(t,l),f=arguments.length;if(f===0?n=r=0:f===1?(n=0,r=l-c):(n=f-2,r=ntt(ett(Vp(e),0),l-c)),l+n-r>9007199254740991)throw ttt("Maximum allowed length exceeded");for(o=Yj(s,r),i=0;i<r;i++)(a=c+i)in s&&Wd(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 rtt=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=Oj(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=kj(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=YN();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 Z9(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 Z9,i=this.menus,a=i[e];if(a==null){var u=Xd[e];if(u==null)throw new Error("Not found menu item factory by key '"+e+"'");if(typeof u!="function")throw new Error("Menu item factory (key='"+e+"') is not a function");a=u(),i[e]=a}else console.warn("Duplicated toolbar menu key '"+e+`'
|
||
|
\u91CD\u590D\u6CE8\u518C\u4E86\u83DC\u5355\u680F menu '`+e+"'");var s=ZN(e,a,o);this.toolbarItems.push(s),hD.set(s,r),o?n.appendBarItem(s):n.$toolbar.append(s.$elem)},t.prototype.getEditorInstance=function(){var e=pD.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}(),ott=sc.EXISTS,itt=ro.f,QN=Function.prototype,att=pt(QN.toString),tI=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,utt=pt(tI.exec);function eI(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,S=D===void 0?function(K,U){}:D,C=t.onError,O=C===void 0?function(K,U,W){console.error(K.name+" upload error",U,W)}:C,T=t.onProgress,R=T===void 0?function(K){}:T;if(!n)throw new Error(`Cannot get upload server address
|
||
|
\u6CA1\u6709\u914D\u7F6E\u4E0A\u4F20\u5730\u5740`);if(!o)throw new Error(`Cannot get fieldName
|
||
|
\u6CA1\u6709\u914D\u7F6E fieldName`);var H=n;p&&(H=function(K,U){var W=Ht(K.split("#"),2),q=W[0],nt=W[1],lt=[];L5(U,function(at,k){lt.push(k+"="+at)});var st=lt.join("&");return q=q.indexOf("?")>0?q+"&"+st:q+"?"+st,nt?q+"#"+nt:q}(H,c));var M=new Yf({onBeforeUpload:w,restrictions:{maxFileSize:a,maxNumberOfFiles:s},meta:c}).use(jY,{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{S(K,q)}catch(nt){console.error("wangEditor upload file - onSuccess error",nt)}M.removeFile(K.id)}),M.on("progress",function(K){K<1||R(K)}),M.on("upload-error",function(K,U,W){try{O(K,U,W)}catch(q){console.error("wangEditor upload file - onError error",q)}M.removeFile(K.id)}),M.on("restriction-failed",function(K,U){try{O(K,U)}catch(W){console.error("wangEditor upload file - onError error",W)}M.removeFile(K.id)}),M}function aa(t){return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(t)}function stt(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){stt(t,o,n[o])})}return t}function si(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q9(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 li(t,e,n){return e&&Q9(t.prototype,e),n&&Q9(t,n),t}function Qu(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jd(t,e){if(e&&(aa(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qu(t)}function Gl(t){return Gl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Gl(t)}function qE(t,e){return qE=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},qE(t,e)}function ny(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&&qE(t,e)}an&&!ott&&itt(QN,"name",{configurable:!0,get:function(){try{return utt(tI,att(this))[1]}catch{return""}}});var ltt={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)}},Qo=new(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};si(this,t),this.init(e,n)}return li(t,[{key:"init",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||ltt,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(
|
||
|
`)&&t.flags==="s")}),Get=xt.RegExp,qet=Ce(function(){var t=Get("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),Ket=t6.get,Yet=LD("native-string-replace",String.prototype.replace),Sv=RegExp.prototype.exec,n6=Sv,Xet=yt("".charAt),Zet=yt("".indexOf),Jet=yt("".replace),$b=yt("".slice),Hb=(zb=/b*/g,Te(Sv,OO=/a/,"a"),Te(Sv,zb,"a"),OO.lastIndex!==0||zb.lastIndex!==0),kO=SI.BROKEN_CARET,Vb=/()??/.exec("")[1]!==void 0;(Hb||Vb||kO||Wet||qet)&&(n6=function(t){var e,n,r,o,i,a,u,s=this,l=Ket(s),c=Ee(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=Te(n6,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=kO&&s.sticky,y=Te(CI,s),g=s.source,v=0,m=c;if(d&&(y=Jet(y,"y",""),Zet(y,"g")===-1&&(y+="g"),m=$b(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Xet(c,s.lastIndex-1)!==`
|
||
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),Vb&&(n=new RegExp("^"+g+"$(?!\\s)",y)),Hb&&(r=s.lastIndex),o=Te(Sv,d?n:s,m),d?o?(o.input=$b(o.input,v),o[0]=$b(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:Hb&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),Vb&&o&&o.length>1&&Te(Yet,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=OI(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var ep=n6;tn({target:"RegExp",proto:!0,forced:/./.exec!==ep},{exec:ep});var YD=Function.prototype,BO=YD.apply,Qet=YD.bind,FO=YD.call,kI=typeof Reflect=="object"&&Reflect.apply||(Qet?FO.bind(BO):function(){return FO.apply(BO,arguments)}),tnt=dr("species"),Ub=RegExp.prototype,XD=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[tnt]=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===ep||g===Ub.exec?i&&!d?{done:!0,value:u(c,f,p)}:{done:!0,value:y(f,c,p)}:{done:!1}});Qd(String.prototype,t,s[0]),Qd(Ub,o,s[1])}r&&ql(Ub[o],"sham",!0)},ent=yt("".charAt),TO=yt("".charCodeAt),nnt=yt("".slice),rnt=function(t){return function(e,n){var r,o,i=Ee(jr(e)),a=gc(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=TO(i,a))<55296||r>56319||a+1===u||(o=TO(i,a+1))<56320||o>57343?t?ent(i,a):r:t?nnt(i,a,a+2):o-56320+(r-55296<<10)+65536}},ont=rnt(!0),ZD=function(t,e,n){return e+(n?ont(t,e).length:1)},int=Math.floor,Wb=yt("".charAt),ant=yt("".replace),Gb=yt("".slice),unt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,snt=/\$([$&'`]|\d{1,2})/g,lnt=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=snt;return o!==void 0&&(o=qp(o),s=unt),ant(i,s,function(l,c){var f;switch(Wb(c,0)){case"$":return"$";case"&":return t;case"`":return Gb(e,0,n);case"'":return Gb(e,a);case"<":f=o[Gb(c,1,-1)];break;default:var p=+c;if(p===0)return l;if(p>u){var d=int(p/10);return d===0?l:d<=u?r[d-1]===void 0?Wb(c,1):r[d-1]+Wb(c,1):l}f=r[p-1]}return f===void 0?"":f})},cnt=xt.TypeError,np=function(t,e){var n=t.exec;if(hn(n)){var r=Te(n,t,e);return r!==null&&rr(r),r}if(ua(t)==="RegExp")return Te(ep,t,e);throw cnt("RegExp#exec called on incompatible receiver")},r6=dr("replace"),fnt=Math.max,dnt=Math.min,pnt=yt([].concat),qb=yt([].push),_O=yt("".indexOf),PO=yt("".slice),hnt="a".replace(/./,"$0")==="$0",jO=!!/./[r6]&&/./[r6]("a","$0")==="";XD("replace",function(t,e,n){var r=jO?"$":"$0";return[function(o,i){var a=jr(this),u=o==null?void 0:ay(o,r6);return u?Te(u,o,a,i):Te(e,Ee(a),o,i)},function(o,i){var a=rr(this),u=Ee(o);if(typeof i=="string"&&_O(i,r)===-1&&_O(i,"$<")===-1){var s=n(e,a,u,i);if(s.done)return s.value}var l=hn(i);l||(i=Ee(i));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=np(a,u);if(d===null||(qb(p,d),!c))break;Ee(d[0])===""&&(a.lastIndex=ZD(u,Kp(a.lastIndex),f))}for(var y,g="",v=0,m=0;m<p.length;m++){for(var h=Ee((d=p[m])[0]),b=fnt(dnt(gc(d.index),u.length),0),w=[],D=1;D<d.length;D++)qb(w,(y=d[D])===void 0?y:String(y));var S=d.groups;if(l){var C=pnt([h],w,b,u);S!==void 0&&qb(C,S);var O=Ee(kI(i,void 0,C))}else O=lnt(h,u,b,w,S,i);b>=v&&(g+=PO(u,v,b)+O,v=b+h.length)}return g+PO(u,v)}]},!!Ce(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$<a>")!=="7"})||!hnt||jO);var o6=dr("unscopables"),i6=Array.prototype;i6[o6]==null&&hc.f(i6,o6,{configurable:!0,value:OI(null)});var BI=function(t){i6[o6][t]=!0},gnt=ly.find,NO=!0;"find"in[]&&Array(1).find(function(){NO=!1}),tn({target:"Array",proto:!0,forced:NO},{find:function(t){return gnt(this,t,arguments.length>1?arguments[1]:void 0)}}),BI("find");var vnt=dr("match"),FI=function(t){var e;return Cr(t)&&((e=t[vnt])!==void 0?!!e:ua(t)=="RegExp")},ynt=xt.TypeError,mnt=dr("species"),TI=function(t,e,n){var r=RD(e);r in t?hc.f(t,r,jD(0,n)):t[r]=n},bnt=xt.Array,wnt=Math.max,IO=function(t,e,n){for(var r=sy(t),o=tp(e,r),i=tp(n==
|
||
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,LO=yt("".replace),xv="["+a6+"]",Cnt=RegExp("^"+xv+xv+"*"),Snt=RegExp(xv+xv+"*$"),Kb=function(t){return function(e){var n=Ee(jr(e));return 1&t&&(n=LO(n,Cnt,"")),2&t&&(n=LO(n,Snt,"")),n}},xnt={start:Kb(1),end:Kb(2),trim:Kb(3)},Ant=uy.PROPER,Ont=xnt.trim;function JD(t){return B("<div>"+t+"</div>").children().filter(function(e){return e.tagName!=="BR"}).length===0}function vc(t){return t.length===0?"":t[0].outerHTML}function yc(t){return t.length?t[0].tagName.toLowerCase():""}function Jr(t,e){for(var n="",r=(t.attr("style")||"").split(";"),o=r.length,i=0;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!!a6.trim()||"\u200B\x85\u180E".trim()!=="\u200B\x85\u180E"||Ant&&a6.trim.name!=="trim"})},{trim:function(){return Ont(this)}}),tn({global:!0},{globalThis:xt}),Xg&&(B.fn.css=Xg),Tr&&(B.fn.append=Tr),SA&&(B.fn.prepend=SA),Fl&&(B.fn.addClass=Fl),Tl&&(B.fn.removeClass=Tl),_l&&(B.fn.hasClass=_l),ko&&(B.fn.on=ko),wA&&(B.fn.off=wA),Ca&&(B.fn.focus=Ca),Fr&&(B.fn.attr=Fr),Gg&&(B.fn.removeAttr=Gg),jl&&(B.fn.hide=jl),Yg&&(B.fn.show=Yg),Qg&&(B.fn.parents=Qg),Pl&&(B.fn.dataset=Pl),Oo&&(B.fn.val=Oo),Jg&&(B.fn.text=Jg),Da&&(B.fn.html=Da),Ll&&(B.fn.children=Ll),Rl&&(B.fn.remove=Rl),Il&&(B.fn.find=Il),qg&&(B.fn.width=qg),Kg&&(B.fn.height=Kg),DA&&(B.fn.filter=DA),Ml&&(B.fn.empty=Ml);var knt={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}}},u6=function(t,e){return u6=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])},u6(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}u6(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Aa=function(){return Aa=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},Aa.apply(this,arguments)};function La(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 Ra(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 PI(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 RO(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 Bnt={renderElems:[_tt],elemsToHtml:[{type:"paragraph",elemToHtml:function(t,e){return e===""?"<p><br></p>":"<p>"+e+"</p>"}}],parseElemsHtml:[knt],editorPlugin:function(t){var e=t.deleteBackward,n=t.deleteForward;t.insertText,t.insertBreak;var r=t;return r.deleteBackward=function(o){RO(r)||e(o)},r.deleteForward=function(o){RO(r)||n(o)},r}},Fnt=/"/g,Tnt=yt("".replace),Qf=function(t,e,n,r){var o=Ee(jr(t)),i="<"+e;return n!==""&&(i+=" "+n+'="'+Tnt(Ee(r),Fnt,""")+'"'),i+">"+o+"</"+e+">"},td=function(t){return Ce(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})};function Yb(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 Ja(t,e){return t.length!==0&&(!!t[0].matches(e)||t.find(e).length>0)}tn({target:"String",proto:!0,forced:td("bold")},{bold:function(){return Qf(this,"b","","")}}),tn({target:"String",proto:!0,forced:td("italics")},{italics:function(){return Qf(this,"i","","")}}),tn({target:"String",proto:!0,forced:td("sub")},{sub:function(){return Qf(this,"sub","","")}}),tn({target:"String",proto:!0,forced:td("sup")},{sup:function(){return Qf(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}(),Irt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("color.color"),n.iconSvg=znt,n.mark="color",n}return be(e,t),e}(WI),Lrt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.title=tt("color.bgColor"),n.iconSvg=$nt,n.mark="bgColor",n}return be(e,t),e}(WI),WO=["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)"],Rrt={renderStyle:function(t,e){var n=t,r=n.color,o=n.bgColor,i=e;return r&&ts(i,{color:r}),o&&ts(i,{backgroundColor:o}),i},styleToHtml:function(t,e){if(!ot.isText(t))return e;var n,r=t,o=r.color,i=r.bgColor;return o||i?((JD(e)||yc(n=B(e))!=="span")&&(n=B("<span>"+e+"</span>")),o&&n.css("color",o),i&&n.css("background-color",i),vc(n)):e},preParseHtml:[Nrt],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 Irt},config:{colors:WO}},{key:"bgColor",factory:function(){return new Lrt},config:{colors:WO}}]},Mrt=/^(?:\w+:)?\/\/(\S+)$/,zrt=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,$rt=/^[^\s\.]+\.\S{2,}$/,Hrt=yI.includes;function cy(t){return t===void 0&&(t="r"),t+"-"+pj()}function QD(t){return t.replace(/</g,"<").replace(/>/g,">")}function GI(t,e,n,r){return La(this,void 0,void 0,function(){var o,i;return Ra(this,function(a){switch(a.label){case 0:return(o=e.getMenuConfig(t).checkLink)?[4,o(n,r)]:[3,2];case 1:if(typeof(i=a.sent())=="string")return e.alert(i,"error"),[2,!1];if(i==null)return[2,!1];a.label=2;case 2:return[2,!0]}})})}function qI(t,e,n){return La(this,void 0,void 0,function(){var r;return Ra(this,function(o){switch(o.label){case 0:return(r=e.getMenuConfig(t).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}})})}function t8(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 t2(t,e){return{type:"link",url:QD(t),children:e?[{text:e}]:[]}}function KI(t,e,n){return La(this,void 0,void 0,function(){var r,o,i;return Ra(this,function(a){switch(a.label){case 0:return n?(e||(e=n),t.restoreSelection(),t8(t)?[2]:[4,GI("insertLink",t,e,n)]):[2];case 1:return a.sent()?[4,qI("insertLink",t,n)]:[2];case 2:return r=a.sent(),(o=t.selection)==null||(L.isCollapsed(o)?(t.insertText(" "),i=t2(r,e),N.insertNodes(t,i),t.insertFragment([{text:" "}])):E.string(t,o)!==e?(t.deleteFragment(),i=t2(r,e),N.insertNodes(t,i)):(i=t2(r),N.wrapNodes(t,i,{split:!0}),N.collapse(t,{edge:"end"}))),[2]}})})}tn({target:"Array",proto:!0},{includes:function(t){return Hrt(this,t,arguments.length>1?arguments[1]:void 0)}}),BI("
|
||
|
`)return t.deleteBackward("character"),void N.insertNodes(r,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}n(`
|
||
|
`)},r}},Dot=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}(),Cot={menus:[{key:"emotion",factory:function(){return new Dot},config:{emotions:"\u{1F600} \u{1F603} \u{1F604} \u{1F601} \u{1F606} \u{1F605} \u{1F602} \u{1F923} \u{1F60A} \u{1F607} \u{1F642} \u{1F643} \u{1F609} \u{1F60C} \u{1F60D} \u{1F618} \u{1F617} \u{1F619} \u{1F61A} \u{1F60B} \u{1F61B} \u{1F61D} \u{1F61C} \u{1F913} \u{1F60E} \u{1F60F} \u{1F612} \u{1F61E} \u{1F614} \u{1F61F} \u{1F615} \u{1F641} \u{1F623} \u{1F616} \u{1F62B} \u{1F629} \u{1F622} \u{1F62D} \u{1F624} \u{1F620} \u{1F621} \u{1F633} \u{1F631} \u{1F628} \u{1F917} \u{1F914} \u{1F636} \u{1F611} \u{1F62C} \u{1F644} \u{1F62F} \u{1F634} \u{1F637} \u{1F911} \u{1F608} \u{1F921} \u{1F4A9} \u{1F47B} \u{1F480} \u{1F440} \u{1F463} \u{1F450} \u{1F64C} \u{1F44F} \u{1F91D} \u{1F44D} \u{1F44E} \u{1F44A} \u270A \u{1F91B} \u{1F91C} \u{1F91E} \u270C\uFE0F \u{1F918} \u{1F44C} \u{1F448} \u{1F449} \u{1F446} \u{1F447} \u261D\uFE0F \u270B \u{1F91A} \u{1F590} \u{1F596} \u{1F44B} \u{1F919} \u{1F4AA} \u{1F595} \u270D\uFE0F \u{1F64F}".split(" ")}}]},Sot={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"},xot={selector:"font",preParseHtml:function(t){var e=B(t);if(yc(e)!=="font")return t;var n=e.attr("size")||"";n&&(e.removeAttr("size"),e.css("font-size",Sot[n]));var r=e.attr("face")||"";return r&&(e.removeAttr("face"),e.css("font-family",r)),e[0]}},Aot=yt("".indexOf);tn({target:"String",proto:!0,forced:!$I("includes")},{includes:function(t){return!!~Aot(Ee(jr(this)),Ee(zI(t)),arguments.length>1?arguments[1]:void 0)}});var Fi,og,a0=function(t){return t&&t.Math==Math&&t},Ft=a0(typeof globalThis=="object"&&globalThis)||a0(typeof window=="object"&&window)||a0(typeof self=="object"&&self)||a0(typeof bv=="object"&&bv)||function(){return this}()||Function("return this")(),n8=Function.prototype,JO=n8.apply,Oot=n8.bind,QO=n8.call,QI=typeof Reflect=="object"&&Reflect.apply||(Oot?QO.bind(JO):function(){return QO.apply(JO,arguments)}),tL=Function.prototype,c6=tL.bind,f6=tL.call,kot=c6&&c6.bind(f6),_e=c6?function(t){return t&&kot(f6,t)}:function(t){return t&&function(){return f6.apply(t,arguments)}},gn=function(t){return typeof t=="function"},lr=function(t){try{return!!t()}catch{return!0}},Wn=!lr(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),pf=Function.prototype.call,qr=pf.bind?pf.bind(pf):function(){return pf.apply(pf,arguments)},tk={}.propertyIsEnumerable,ek=Object.getOwnPropertyDescriptor,Bot=ek&&!tk.call({1:2},1)?function(t){var e=ek(this,t);return!!e&&e.enumerable}:tk,r8={f:Bot},es=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(
|
||
|
`).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=PI(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}(),zat={key:"codeBlock",factory:function(){return new Mat}};tn({target:"String",proto:!0,forced:td("anchor")},{anchor:function(t){return Qf(this,"a","name",t)}}),XD("match",function(t,e,n){return[function(r){var o=jr(this),i=r==null?void 0:ay(r,t);return i?Te(i,r,o):new RegExp(r)[t](Ee(o))},function(r){var o=rr(this),i=Ee(r),a=n(e,o,i);if(a.done)return a.value;if(!o.global)return np(o,i);var u=o.unicode;o.lastIndex=0;for(var s,l=[],c=0;(s=np(o,i))!==null;){var f=Ee(s[0]);l[c]=f,f===""&&(o.lastIndex=ZD(i,Kp(o.lastIndex),u)),c++}return c===0?null:l}]});var $at={type:"pre",renderElem:function(t,e,n){return bt("pre",null,e)}},Hat={type:"code",renderElem:function(t,e,n){return bt("code",null,e)}},Vat={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"})}}},Uat={menus:[zat],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:[$at,Hat],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(yc(e)!=="code")return t;var n=e.find("xmp");if(n.length===0)return t;var r=n.text();return n.remove(),e.text(r),e[0]}}],parseElemsHtml:[{selector:"pre:not([data-w-e-type])>code",parseElemHtml:function(t,e,n){return{type:"code",language:"",children:[{text:B(t)[0].textContent||""}]}}},Vat]},Wat=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}(),Gat={menus:[{key:"fullScreen",factory:function(){return new Wat}}]},qat=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}(),Kat=[art,Rrt,yat,Eat,Aat,kat,sot,jat,Cot,Yrt,Uat,Eot,Prt,Bnt,dot,Tat,Gat,{menus:[{key:"enter",factory:function(){return new qat}}]}];qn("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),qn("zh-CN",{listModule:{unOrderedList:"\u65E0\u5E8F\u5217\u8868",orderedList:"\u6709\u5E8F\u5217\u8868"}});var Nk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function d8(t){var e={exports:{}};return t(e,e.exports),e.exports}var _i,ag,c0=function(t){return t&&t.Math==Math&&t},wt=c0(typeof globalThis=="object"&&globalThis)||c0(typeof window=="object"&&window)||c0(typeof self=="object"&&self)||c0(typeof Nk=="object"&&Nk
|
||
|
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 oR(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}R6(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function bB(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 md(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function wB(t){return E.nodes(t,{at:t.selection||void 0,match:function(e){return A.findPath(t,e).length===1}})}var Mst=NL.includes;ka({target:"Array",proto:!0},{includes:function(t){return Mst(this,t,arguments.length>1?arguments[1]:void 0)}}),vd("includes");var EB,O2,zst=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},F8=wt.RegExp,M6=Oe(function(){var t=F8("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),$st=M6||Oe(function(){return!F8("a","y").sticky}),Hst={BROKEN_CARET:M6||Oe(function(){var t=F8("^r","gy");return t.lastIndex=2,t.exec("str")!=null}),MISSED_STICKY:$st,UNSUPPORTED_Y:M6},Vst=wt.RegExp,Ust=Oe(function(){var t=Vst(".","s");return!(t.dotAll&&t.exec(`
|
||
|
`)&&t.flags==="s")}),Wst=wt.RegExp,Gst=Oe(function(){var t=Wst("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),qst=Bo.get,Kst=h8("native-string-replace",String.prototype.replace),Hv=RegExp.prototype.exec,z6=Hv,Yst=jt("".charAt),Xst=jt("".indexOf),Zst=jt("".replace),k2=jt("".slice),B2=(O2=/b*/g,en(Hv,EB=/a/,"a"),en(Hv,O2,"a"),EB.lastIndex!==0||O2.lastIndex!==0),DB=Hst.BROKEN_CARET,F2=/()??/.exec("")[1]!==void 0;(B2||F2||DB||Ust||Gst)&&(z6=function(t){var e,n,r,o,i,a,u,s=this,l=qst(s),c=Ko(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=en(z6,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=DB&&s.sticky,y=en(zst,s),g=s.source,v=0,m=c;if(d&&(y=Zst(y,"y",""),Xst(y,"g")===-1&&(y+="g"),m=k2(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Yst(c,s.lastIndex-1)!==`
|
||
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),F2&&(n=new RegExp("^"+g+"$(?!\\s)",y)),B2&&(r=s.lastIndex),o=en(Hv,d?n:s,m),d?o?(o.input=k2(o.input,v),o[0]=k2(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:B2&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),F2&&o&&o.length>1&&en(Kst,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=E8(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Vv=z6;ka({target:"RegExp",proto:!0,forced:/./.exec!==Vv},{exec:Vv});var iR=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}(),Jst='<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>',Qst='<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>',tlt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.ordered=!1,n.title=tt("listModule.unOrderedList"),n.iconSvg=Jst,n}return oR(e,t),e}(iR),elt=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.ordered=!0,n.title=tt("listModule.orderedList"),n.iconSvg=Qst,n}return oR(e,t),e}(iR),nlt={key:"bulletedList",factory:function(){return new tlt}},rlt={key:"numberedList",factory:function(){return new elt}},CB=[],olt={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=L6.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=md(b,1)[0];if(A.getNodeType(w)!==p)return v+1;var D=w,S=D.ordered,C=S!==void 0&&S,O=D.level,T=O===void 0?0:O;return T<v?v-T:T>v?0:T===v?C===y?0:1:0}(t);if(a>0)for(var u=0;u<a;u++)n+="<"+i+">",CB.push(i);var s=function(l){var c=L6.get(l);if(c==null)return 0;var f=l,p=f.type,d=f.ordered,y=d!==void 0&&d,g=f.level,v=g===void 0?0:g,m=A.findPath(c,l);if(m[0]===c.children.length-1)return v+1;var h=j.next(m),b=E.node(c,h);if(!b)return 0;var w=md(b,1)[0];if(A.getNodeType(w)!==p)return v+1;var D=w,S=D.ordered,C=S!==void 0&&S,O=D.level,T=O===void 0?0:O;return T<v?v-T:T>v?0:T===v?C===y?0:1:0}(t);if(s>0)for(u=0;u<s;u++)r+="</"+CB.pop()+">";return{html:"<li>"+e+"</li>",prefix:n,suffix:r}}},ilt=yn("species"),alt=B8.filter,ult=C6>=51||!Oe(function(){var t=[];return(t.constructor={})[ilt]=function(){return{foo:1}},t.filter(Boolean).foo!==1});ka({target:"Array",proto:!0,forced:!ult},{filter:function(t){return alt(this,t,arguments.length>1?arguments[1]:void 0)}});var T8=Function.prototype,SB=T8.apply,slt=T8.bind,xB=T8.call,llt=typeof Reflect=="object"&&Reflect.apply||(slt?xB.bind(SB):function(){return xB.apply(SB,arguments)}),AB=(yn("species"),RegExp.prototype),clt=WL.charAt,flt=function(t,e,n){return e+(n?clt(t,e).length:1)},dlt=Math.floor,T2=jt("".charAt),plt=jt("".replace),_2=jt("".slice),hlt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,glt=/\$([$&'`]|\d{1,2})/g,vlt=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=glt;return o!==void 0&&(o=rh(o),s=hlt),plt(i,s,function(l,c)
|
||
|
`)&&t.flags==="s")}),jct=_t.RegExp,Nct=Ye(function(){var t=jct("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),Ict=K6.get,Lct=I8("native-string-replace",String.prototype.replace),qv=RegExp.prototype.exec,X6=qv,Rct=Rt("".charAt),Mct=Rt("".indexOf),zct=Rt("".replace),$2=Rt("".slice),H2=(z2=/b*/g,We(qv,WB=/a/,"a"),We(qv,z2,"a"),WB.lastIndex!==0||z2.lastIndex!==0),GB=DR.BROKEN_CARET,V2=/()??/.exec("")[1]!==void 0;(H2||V2||GB||Pct||Nct)&&(X6=function(t){var e,n,r,o,i,a,u,s=this,l=Ict(s),c=An(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=We(X6,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=GB&&s.sticky,y=We(ER,s),g=s.source,v=0,m=c;if(d&&(y=zct(y,"y",""),Mct(y,"g")===-1&&(y+="g"),m=$2(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Rct(c,s.lastIndex-1)!==`
|
||
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),V2&&(n=new RegExp("^"+g+"$(?!\\s)",y)),H2&&(r=s.lastIndex),o=We(qv,d?n:s,m),d?o?(o.input=$2(o.input,v),o[0]=$2(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:H2&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),V2&&o&&o.length>1&&We(Lct,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=xR(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var ap=X6;Ta({target:"RegExp",proto:!0,forced:/./.exec!==ap},{exec:ap});var Kv=Array.isArray||function(t){return da(t)=="Array"},AR=function(){},$ct=[],OR=sh("Reflect","construct"),q8=/^\s*(?:class|function)\b/,Hct=Rt(q8.exec),Vct=!q8.exec(AR),xf=function(t){if(!vn(t))return!1;try{return OR(AR,$ct,t),!0}catch{return!1}},K8=!OR||Ye(function(){var t;return xf(xf.call)||!xf(Object)||!xf(function(){t=!0})||t})?function(t){if(!vn(t))return!1;switch(W8(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Vct||!!Hct(q8,z8(t))}:xf,kR=function(t,e,n){var r=R8(e);r in t?lh.f(t,r,_8(0,n)):t[r]=n},Uct=Nr("species"),Y8=function(t){return U6>=51||!Ye(function(){var e=[];return(e.constructor={})[Uct]=function(){return{foo:1}},e[t](Boolean).foo!==1})},Wct=Rt([].slice),Gct=Y8("slice"),qct=Nr("species"),U2=_t.Array,Kct=Math.max;function no(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function qB(t){var e=t.selection;if(e==null)return!1;var n=no(E.nodes(t,{match:function(i){return A.checkNodeType(i,"table-cell")}}),1)[0];if(n){var r=no(n,2)[1],o=E.start(t,r);if(Bt.equals(e.anchor,o))return!0}return!1}function KB(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:!Gct},{slice:function(t,e){var n,r,o,i=uh(this),a=Dy(i),u=ip(t,a),s=ip(e===void 0?a:e,a);if(Kv(i)&&(n=i.constructor,(K8(n)&&(n===U2||Kv(n.prototype))||xr(n)&&(n=n[qct])===null)&&(n=void 0),n===U2||n===void 0))return Wct(i,u,s);for(r=new(n===void 0?U2:n)(Kct(s-u,0)),o=0;u<s;u++,o++)u in i&&kR(r,o,i[u]);return r.length=o,r}});var YB=Rt(Rt.bind),Yct=Nr("species"),XB=_t.Array,Xct=function(t,e){return new(function(n){var r;return Kv(n)&&(r=n.constructor,(K8(r)&&(r===XB||Kv(r.prototype))||xr(r)&&(r=r[Yct])===null)&&(r=void 0)),r===void 0?XB:r}(t))(e===0?0:e)},ZB=Rt([].push),Ni=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=L8(s),g=cR(y),v=function(D,S){return pR(D),S===void 0?D:YB?YB(D,S):function(){return D.apply(S,arguments)}}(l,c),m=Dy(g),h=0,b=f||Xct,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:ZB(w,p)}else switch(t){case 4:return!1;case 7:ZB(w,p)}return i?-1:r||o?o:w}},Cy={forEach:Ni(0),map:Ni(1),filter:Ni(2),some:Ni(3),every:Ni(4),find:Ni(5),findIndex:Ni(6),filterReject:Ni(7)},Zct=Cy.map;Ta({target:"Array",proto:!0,forced:!Y8("map")},{map:function(t){return Zct(this,t,arguments.length>1?arguments[1]:void 0)}});var Jct=U8?{}.toString:function(){return"[object "+W8(this)+"]"};function Sy(t){var e=t.children||[];return e.length===0?[]:(e[0]||{}).children||[]}function BR(t){return Sy(t).every(function(e){return!!e.isHeader})}U8||op(Object.prototype,"toString",Jct,{unsafe:!0});var Qct=H8.PROPER,Z6=RegExp.prototype,FR=Z6.toString,tft=Rt(ER),ef
|
||
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,rF=Rt("".replace),Yv="["+e3+"]",mft=RegExp("^"+Yv+Yv+"*"),bft=RegExp(Yv+Yv+"*$"),G2=function(t){return function(e){var n=An(Fa(e));return 1&t&&(n=rF(n,mft,"")),2&t&&(n=rF(n,bft,"")),n}},wft={start:G2(1),end:G2(2),trim:G2(3)},Eft=H8.PROPER,Dft=wft.trim;function NR(t){return t.length?t[0].tagName.toLowerCase():""}Ta({target:"String",proto:!0,forced:function(t){return Ye(function(){return!!e3[t]()||"\u200B\x85\u180E"[t]()!=="\u200B\x85\u180E"||Eft&&e3[t].name!==t})}("trim")},{trim:function(){return Dft(this)}}),Ta({global:!0},{globalThis:_t}),Tr&&(B.fn.append=Tr),ko&&(B.fn.on=ko),Ca&&(B.fn.focus=Ca),Fr&&(B.fn.attr=Fr),Oo&&(B.fn.val=Oo),Da&&(B.fn.html=Da),Pl&&(B.fn.dataset=Pl),Fl&&(B.fn.addClass=Fl),Tl&&(B.fn.removeClass=Tl),Ll&&(B.fn.children=Ll),Zg&&(B.fn.each=Zg),Il&&(B.fn.find=Il);var up=!1,IR=0,LR=0,sp=null,lp=null,wd=B("body");function RR(t){up=!1,lp=null,sp=null,wd.off("mousemove",MR),wd.off("mouseup",RR)}wd.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(),up=!0;var n=t.clientX;IR=n;var r=e.getBoundingClientRect().width;LR=r,wd.on("mousemove",MR),wd.on("mouseup",RR)}});var MR=Ku(function(t){if(up&&lp!=null&&sp!=null){t.preventDefault();var e=t.clientX,n=LR+(e-IR);(n=Math.floor(100*n)/100)<30&&(n=30),N.setNodes(lp,{width:n.toString()},{at:sp})}},100),Cft={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,Sy(t).map(function(u){var s=u.width;return bt("col",{width:s===void 0?"auto":s})})),bt("tbody",null,e)));return a}},Sft={type:"table-row",renderElem:function(t,e,n){return bt("tr",null,e)}},xft={type:"table-cell",renderElem:function(t,e,n){var r=function(p,d){var y=A.getParentNode(p,d);if(y==null)return!1;var g=A.getParentNode(p,y);return g!=null&&Sy(g).some(function(v){return v===d})}(n,t),o=t,i=o.colSpan,a=i===void 0?1:i,u=o.rowSpan,s=u===void 0?1:u,l=o.isHeader,c=l!==void 0&&l;if(!r)return bt("td",{colSpan:a,rowSpan:s},e);var f=bt(c?"th":"td",{colSpan:a,rowSpan:s,style:{borderRightWidth:"3px"},on:{mousemove:Ku(function(p){var d=this.elm;if(d!=null){var y=d.getBoundingClientRect(),g=y.left,v=y.width,m=y.top,h=y.height,b=p.clientX,w=p.clientY;up||(b>g+v-5&&b<g+v&&w>m&&w<m+h?(d.style.cursor="col-resize",lp=n,sp=A.findPath(n,t)):up||(d.style.cursor="auto",lp=null,sp=null))}},100)}},e);return f}},Aft={selector:"table",preParseHtml:function(t){var e=B(t);if(NR(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]}},Oft=Cy.filter;Ta({target:"Array",proto:!0,forced:!Y8("filter")},{filter:function(t){return Oft(this,t,arguments.length>1?arguments[1]:void 0)}});var kft=Math.floor,q2=Rt("".charAt),Bft=Rt("".replace),K2=Rt("".slice),Fft=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Tft=/\$([$&'`]|\d{1,2})/g,_ft=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=Tft;return o!==void 0&&(o=L8(o),s=Fft),Bft(i,s,function(l,c){var f;switch(q2(c,0)){case"$":return"$";case"&":return t;case"`":return K2(e,0,n);case"'":return K2(e,a);case"<":f=o[K2(c,1,-1)];break;default:var p=+c;if(p===0)return l;if(p>u){var d=kft(p/10);return d===0?l:d<=u?r[d-1]===void 0?q2(c,1):r[d-1]+q2(c,1):l}f=r[p-1]}return f===void 0?"":f})},n3=Nr("replace"),Pft=Math.max,jft=Math.min,Nft=Rt([].concat),Y2=Rt([].push)
|
||
|
`)},s.deleteBackward=function(l){if(!qB(s)){var c=s.selection;if(c){var f=E.before(s,c);if(f){var p=KB(s,f),d=KB(s,c);if(p&&!d)return}}n(l)}},s.handleTab=function(){var l;if(A.getSelectedNodeByType(s,"table")){var c=E.above(t);A.checkNodeType(c[0],"table-cell")&&N.select(t,c[1]);var f=E.next(t);if(f)f[0]&&f[0].text&&(f=(l=E.above(t,{at:f[1]}))!==null&&l!==void 0?l:f),N.select(t,f[1]);else{var p=s.children||[],d=p.length;if(A.checkNodeType(p[d-1],"table")){var y=A.genEmptyParagraph();N.insertNodes(s,y,{at:[d]}),s.handleTab()}}}else a()},s.deleteForward=function(l){qB(s)||r(l)},s.normalizeNode=function(l){var c=no(l,2),f=c[0],p=c[1];if(A.getNodeType(f)!=="table")return o([f,p]);if(A.isLastNode(s,f)){var d=A.genEmptyParagraph();N.insertNodes(s,d,{at:[p[0]+1]})}},s.insertData=function(l){if(A.getSelectedNodeByType(s,"table")!=null){var c=l.getData("text/plain");c===`
|
||
|
`||/<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:"\u5220\u9664\u89C6\u9891",uploadVideo:"\u4E0A\u4F20\u89C6\u9891",insertVideo:"\u63D2\u5165\u89C6\u9891",videoSrc:"\u89C6\u9891\u5730\u5740",videoSrcPlaceHolder:"\u89C6\u9891\u6587\u4EF6 url \u6216\u7B2C\u4E09\u65B9 <iframe>",videoPoster:"\u89C6\u9891\u5C01\u9762",videoPosterPlaceHolder:"\u5C01\u9762\u56FE\u7247 url",ok:"\u786E\u5B9A",editSize:"\u4FEE\u6539\u5C3A\u5BF8",width:"\u5BBD\u5EA6",height:"\u9AD8\u5EA6"}});/*! *****************************************************************************
|
||
|
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 Xv=function(){return Xv=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},Xv.apply(this,arguments)};function xy(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 Ay(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 Mu(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 Jft(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 lF=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Z8(t){var e={exports:{}};return t(e,e.exports),e.exports}var Ii,fg,w0=function(t){return t&&t.Math==Math&&t},rt=w0(typeof globalThis=="object"&&globalThis)||w0(typeof window=="object"&&window)||w0(typeof self=="object"&&self)||w0(typeof lF=="object"&&lF)||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}),Of=Function.prototype.call,le=Of.bind?Of.bind(Of):function(){return Of.apply(Of,arguments)},cF={}.propertyIsEnumerable,fF=Object.getOwnPropertyDescriptor,Qft={f:fF&&!cF.call({1:2},1)?function(t){var e=fF(this,t);return!!e&&e.enumerable}:cF},Oy=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},$R=Function.prototype,r3=$R.bind,o3=$R.call,tdt=r3&&r3.bind(o3),Ct=r3?function(t){return t&&tdt(o3,t)}:function(t){return t&&function(){return o3.apply(t,arguments)}},edt=Ct({}.toString),ndt=Ct("".slice),So=function(t){return ndt(edt(t),8,-1)},Q2=rt.Object,rdt=Ct("".split),J8=de(function(){return!Q2("z").propertyIsEnumerable(0)})?function(t){return So(t)=="String"?rdt(t,""):Q2(t)}:Q2,odt=rt.TypeError,fh=function(t){if(t==null)throw odt("Can't call method on "+t);return t},Ma=function(t){return J8(fh(t))},oe=function(t){return typeof
|
||
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,SF=Ct("".replace),r1="["+s3+"]",Ydt=RegExp("^"+r1+r1+"*"),Xdt=RegExp(r1+r1+"*$"),nw=function(t){return function(e){var n=wr(fh(e));return 1&t&&(n=SF(n,Ydt,"")),2&t&&(n=SF(n,Xdt,"")),n}},Zdt={start:nw(1),end:nw(2),trim:nw(3)},Jdt=Dc.PROPER,Qdt=Zdt.trim;function xF(t){return t.length?t[0].tagName.toLowerCase():""}function YR(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!!s3.trim()||"\u200B\x85\u180E".trim()!=="\u200B\x85\u180E"||Jdt&&s3.trim.name!=="trim"})},{trim:function(){return Qdt(this)}}),$n({global:!0},{globalThis:rt}),Tr&&(B.fn.append=Tr),ko&&(B.fn.on=ko),Ca&&(B.fn.focus=Ca),Fr&&(B.fn.attr=Fr),Oo&&(B.fn.val=Oo),Da&&(B.fn.html=Da),Nl&&(B.fn.parent=Nl),_l&&(B.fn.hasClass=_l),Ml&&(B.fn.empty=Ml);var E0,tpt={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:YR(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.
|
||
|
\u62B1\u6B49\uFF0C\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 video \u89C6\u9891`);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 zl("div",{props:{contentEditable:!1},on:{mousedown:function(g){return g.preventDefault()}}},r)}},ept={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+=YR(o,s,c):f+='<video poster="'+a+'" controls="true" width="'+s+'" height="'+c+'"><source src="'+o+'" type="video/mp4"/></video>',f+`
|
||
|
</div>`}},npt=Object.keys||function(t){return qR(t,t1)},rpt=Fo?Object.defineProperties:function(t,e){fn(t);for(var n,r=Ma(e),o=npt(e),i=o.length,a=0;i>a;)ci.f(t,n=o[a++],r[n]);return t},l3=os("document","documentElement"),XR=iC("IE_PROTO"),rw=function(){},ZR=function(t){return"<script>"+t+"<\/script>"},AF=function(t){t.write(ZR("")),t.close();var e=t.parentWindow.Object;return t=null,e},dg=function(){try{E0=new ActiveXObject("htmlfile")}catch{}var t,e;dg=typeof document<"u"?document.domain&&E0?AF(E0):((e=pp("iframe")).style.display="none",l3.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(ZR("document.F=Object")),t.close(),t.F):AF(E0);for(var n=t1.length;n--;)delete dg.prototype[t1[n]];return dg()};Fy[XR]=!0;var uC=Object.create||function(t,e){var n;return t!==null?(rw.prototype=fn(t),n=new rw,rw.prototype=null,n[XR]=t):n=dg(),e===void 0?n:rpt(n,e)},c3=Re("unscopables"),f3=Array.prototype;f3[c3]==null&&ci.f(f3,c3,{configurable:!0,value:uC(null)});var Dd=function(t){f3[c3][t]=!0},opt=GR.includes;$n({target:"Array",proto:!0},{includes:function(t){return opt(this,t,arguments.length>1?arguments[1]:void 0)}}),Dd("includes");var ipt={selector:"iframe,video,p",preParseHtml:function(t){var e=B(t),n=e;if(xF(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=xF(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]}},OF=Ct(Ct.bind),gp=function(t,e){return _a(t),e===void 0?t:OF?OF(t,e):function(){return t.apply(e,arguments)}},o1=Array.isArray||function(t){return So(t)=="Array"},JR=function(){},apt=[],QR=os("Reflect","construct"),sC=/^\s*(?:class|function)\b/,upt=Ct(sC.exec),spt=!sC.exec(JR),Bf=function(t){if(!oe(t))return!1;try{return QR(JR,apt,t),!0}catch{return!1}},lC=!QR||de(function(){var t;return Bf(Bf.call)||!Bf(Object)||!Bf(function(){t=!0})||t})?function(t){if(!oe(t))return!1;switch(_y(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return spt||!!upt(sC,By(t))}:Bf,lpt=Re("species"),kF=rt.Array,cpt=function(t,e){return new(function(n){var r;return o1(n)&&(r=n.constructor,(lC(r)&&(r===kF||o1(r.prototype))||he(r)&&(r=r[lpt])===null)&&(r=void 0)),r===void 0?kF:r}(t))(e===0?0:e)},BF=Ct([].push),Li=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=ky(s),g=J8(y),v=gp(l,c),m=dh(g),h=0,b=f||cpt,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:BF(w,p)}else switch(t){case 4:return!1;case 7:BF(w,p)}return i?-1:r||o?o:w}},cC={forEach:Li(0),map:Li(1),filter:Li(2),some:Li(3),every:Li(4),find:Li(5),findIndex:Li(6),filterReject:Li(7)},fpt=cC.find,FF=!0;"find"in[]&&Array(1).find(function(){FF=!1}),$n({target:"Array",proto:!0,forced:FF},{find:function(t){return fpt(this,t,arguments.length>1?arguments[1]:void 0)}}),Dd("find");var dpt=aC?{}.toString:function(){return"[object "+_y(this)+"]"};function TF(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:""}]}}aC||or(Object.prototype,"toString",dpt,{unsafe:!0});var _F,ow,ppt={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",TF(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",TF(o,i=l.attr("poster")||"",a,u)}},tM=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},fC=rt.RegExp,d3=de(function(){var t=fC("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),hpt=d3||de(function(){return!fC("
|
||
|
`)&&t.flags==="s")}),mpt=rt.RegExp,bpt=de(function(){var t=mpt("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),wpt=cr.get,Ept=eC("native-string-replace",String.prototype.replace),i1=RegExp.prototype.exec,p3=i1,Dpt=Ct("".charAt),Cpt=Ct("".indexOf),Spt=Ct("".replace),iw=Ct("".slice),aw=(ow=/b*/g,le(i1,_F=/a/,"a"),le(i1,ow,"a"),_F.lastIndex!==0||ow.lastIndex!==0),PF=gpt.BROKEN_CARET,uw=/()??/.exec("")[1]!==void 0;(aw||uw||PF||ypt||bpt)&&(p3=function(t){var e,n,r,o,i,a,u,s=this,l=wpt(s),c=wr(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=le(p3,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=PF&&s.sticky,y=le(tM,s),g=s.source,v=0,m=c;if(d&&(y=Spt(y,"y",""),Cpt(y,"g")===-1&&(y+="g"),m=iw(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Dpt(c,s.lastIndex-1)!==`
|
||
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),uw&&(n=new RegExp("^"+g+"$(?!\\s)",y)),aw&&(r=s.lastIndex),o=le(i1,d?n:s,m),d?o?(o.input=iw(o.input,v),o[0]=iw(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:aw&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),uw&&o&&o.length>1&&le(Ept,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=uC(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var a1=p3;$n({target:"RegExp",proto:!0,forced:/./.exec!==a1},{exec:a1});var dC=Function.prototype,jF=dC.apply,xpt=dC.bind,NF=dC.call,eM=typeof Reflect=="object"&&Reflect.apply||(xpt?NF.bind(jF):function(){return NF.apply(jF,arguments)}),IF=(Re("species"),RegExp.prototype),Apt=Ct("".charAt),LF=Ct("".charCodeAt),Opt=Ct("".slice),RF=function(t){return function(e,n){var r,o,i=wr(fh(e)),a=Ty(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=LF(i,a))<55296||r>56319||a+1===u||(o=LF(i,a+1))<56320||o>57343?t?Apt(i,a):r:t?Opt(i,a,a+2):o-56320+(r-55296<<10)+65536}},nM={codeAt:RF(!1),charAt:RF(!0)},kpt=nM.charAt,Bpt=function(t,e,n){return e+(n?kpt(t,e).length:1)},Fpt=Math.floor,sw=Ct("".charAt),Tpt=Ct("".replace),lw=Ct("".slice),_pt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ppt=/\$([$&'`]|\d{1,2})/g,jpt=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,s=Ppt;return o!==void 0&&(o=ky(o),s=_pt),Tpt(i,s,function(l,c){var f;switch(sw(c,0)){case"$":return"$";case"&":return t;case"`":return lw(e,0,n);case"'":return lw(e,a);case"<":f=o[lw(c,1,-1)];break;default:var p=+c;if(p===0)return l;if(p>u){var d=Fpt(p/10);return d===0?l:d<=u?r[d-1]===void 0?sw(c,1):r[d-1]+sw(c,1):l}f=r[p-1]}return f===void 0?"":f})},Npt=rt.TypeError,Ipt=function(t,e){var n=t.exec;if(oe(n)){var r=le(n,t,e);return r!==null&&fn(r),r}if(So(t)==="RegExp")return le(a1,t,e);throw Npt("RegExp#exec called on incompatible receiver")},h3=Re("replace"),Lpt=Math.max,Rpt=Math.min,Mpt=Ct([].concat),cw=Ct([].push),MF=Ct("".indexOf),zF=Ct("".slice),zpt="a".replace(/./,"$0")==="$0",$F=!!/./[h3]&&/./[h3]("a","$0")==="";function rM(t){return t===void 0&&(t="r"),t+"-"+pj()}(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=$F?"$":"$0";return[function(d,y){var g=fh(this),v=d==null?void 0:dp(d,h3);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"&&MF(y,p)===-1&&MF(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 S=Ipt(g,v);if(S===null||(cw(D,S),!b))break;wr(S[0])===""&&(g.lastIndex=Bpt(v,WR(g.lastIndex),w))}for(var C,O="",T=0,R=0;R<D.length;R++){for(var H=wr((S=D[R])[0]),M=Lpt(Rpt(Ty(S.index),v.length),0),K=[],U=1;U<S.length;U++)cw(K,(C=S[U])===void 0?C:String(C));var W=S.groups;if(h){var q=Mpt([H],K,M,v);W!==void 0&&cw(q,W);var nt=wr(eM(y,void 0,q))}else nt=jpt(H,v,M,K,W,y);M>=T&&(O+=zF(v,T,M)+nt,T=M+H.length)}return O+zF(v,T)}]}(0,""[t],function(l,c,f,p,d){var y=Ct(l),g=c.exec;return g===a1||g===IF.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(IF,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"})||!zpt||$F);var u1=rt.Promise,s1=function(t,e,n){for(var r in e)or(t,r,e[r],n);return t},$pt=rt.String,Hpt=rt.TypeError,Zl=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 Hpt("Can't set "+$pt(i)+" as a prototype")}(o),e?t(r,o):r.__proto__=o,r}}():void 0),Vpt=ci.f,HF=Re("toStringTag"),l1=function(t,e,n){t&&!qe(t=n?t:t.prototype,HF)&&Vpt(t,HF,{configurable:!0,value:e})},VF=Re("species"),Upt=rt.TypeError,pC=function(t,e){if(cp(e
|
||
|
`)&&t.flags==="s")}),ygt=et.RegExp,mgt=ve(function(){var t=ygt("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),bgt=fr.get,wgt=SC("native-string-replace",String.prototype.replace),b1=RegExp.prototype.exec,F3=b1,Egt=Tt("".charAt),Dgt=Tt("".indexOf),Cgt=Tt("".replace),jw=Tt("".slice),Nw=(Pw=/b*/g,Jt(b1,NT=/a/,"a"),Jt(b1,Pw,"a"),NT.lastIndex!==0||Pw.lastIndex!==0),IT=VM.BROKEN_CARET,Iw=/()??/.exec("")[1]!==void 0;(Nw||Iw||IT||vgt||mgt)&&(F3=function(t){var e,n,r,o,i,a,u,s=this,l=bgt(s),c=ma(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=Jt(F3,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=IT&&s.sticky,y=Jt(HM,s),g=s.source,v=0,m=c;if(d&&(y=Cgt(y,"y",""),Dgt(y,"g")===-1&&(y+="g"),m=jw(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Egt(c,s.lastIndex-1)!==`
|
||
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),Iw&&(n=new RegExp("^"+g+"$(?!\\s)",y)),Nw&&(r=s.lastIndex),o=Jt(b1,d?n:s,m),d?o?(o.input=jw(o.input,v),o[0]=jw(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:Nw&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),Iw&&o&&o.length>1&&Jt(wgt,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=NC(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Sp=F3;Eo({target:"RegExp",proto:!0,forced:/./.exec!==Sp},{exec:Sp});var IC=Function.prototype,LT=IC.apply,Sgt=IC.bind,RT=IC.call,GM=typeof Reflect=="object"&&Reflect.apply||(Sgt?RT.bind(LT):function(){return RT.apply(LT,arguments)}),xgt=Me("species"),Lw=RegExp.prototype,Agt=Me("match"),Ogt=et.TypeError,kgt=Me("species"),qM=function(t,e){var n,r=dn(t).constructor;return r===void 0||(n=dn(r)[kgt])==null?e:function(o){if(PC(o))return o;throw Ogt(d1(o)+" is not a constructor")}(n)},Bgt=Tt("".charAt),MT=Tt("".charCodeAt),Fgt=Tt("".slice),zT=function(t){return function(e,n){var r,o,i=ma(mp(e)),a=FC(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=MT(i,a))<55296||r>56319||a+1===u||(o=MT(i,a+1))<56320||o>57343?t?Bgt(i,a):r:t?Fgt(i,a,a+2):o-56320+(r-55296<<10)+65536}},KM={codeAt:zT(!1),charAt:zT(!0)},Tgt=KM.charAt,_gt=function(t,e,n){return e+(n?Tgt(t,e).length:1)},Pgt=et.Array,jgt=Math.max,T3=function(t,e,n){for(var r=gh(t),o=Cp(e,r),i=Cp(n===void 0?r:n,r),a=Pgt(jgt(i-o,0)),u=0;o<i;o++,u++)zM(a,u,t[o]);return a.length=u,a},Ngt=et.TypeError,$T=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(Sp,t,e);throw Ngt("RegExp#exec called on incompatible receiver")},Ks=VM.UNSUPPORTED_Y,Igt=Math.min,YM=[].push,Lgt=Tt(/./.exec),Ys=Tt(YM),Rf=Tt("".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[xgt]=function(){return c},c.flags="",c[o]=/./[o],c.exec=function(){return l=!0,null},c[o](""),!l});if(!i||!a||n){var u=Tt(/./[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=ma(mp(this)),h=y===void 0?4294967295:y>>>0;if(h===0)return[];if(d===void 0)return[m];if(!fe(g=d)||!((v=g[Agt])!==void 0?v:Qr(g)=="RegExp"))return Jt(c,m,d,h);for(var b,w,D,S=[],C=(d.ignoreCase?"i":"")+(d.multiline?"m":"")+(d.unicode?"u":"")+(d.sticky?"y":""),O=0,T=new RegExp(d.source,C+"g");(b=Jt(Sp,T,m))&&!((w=T.lastIndex)>O&&(Ys(S,Rf(m,O,b.index)),b.length>1&&b.index<m.length&&GM(YM,S,T3(b,1)),D=b[0].length,O=w,S.length>=h));)T.lastIndex===b.index&&T.lastIndex++;return O===m.length?!D&&Lgt(T,"")||Ys(S,""):Ys(S,Rf(m,O)),S.length>h?T3(S,0,h):S}:"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=mp(this),v=d==null?void 0:Ep(d,l);return v?Jt(v,d,g,y):Jt(p,ma(g),d,y)},function(d,y){var g=dn(this),v=ma(d),m=f(p,g,v,y,p!==c);if(m.done)return m.value;var h=qM(g,RegExp),b=g.unicode,w=(g.ignoreCase?"i":"")+(g.multiline?"m":"")+(g.unicode?"u":"")+(Ks?"g":"y"),D=new h(Ks?"^(?:"+g.source+")":g,w),S=y===void 0?4294967295:y>>>0;if(S===0)return[];if(v.length===0)return $T(D,v)===null?[v]:[];for(var C=0,O=0,T=[];O<v.length;){D.lastIndex=Ks?0:O;var R,H=$T(D,Ks?Rf(v,O):v);if(H===null||(R=Igt(NM(D.lastIndex+(Ks?O:0)),v.length))===C)O=_gt(v,O,b);else{if(Ys(T,Rf(v,C,O)),T.length===S)return T;for(var M=1;M<=H.length-1;M++)if(Ys(T,H[M]),T.length===S)return T;O=C=R}}return Ys(T,Rf(v,C)),T}]}(o,""[t],function(l,c,f,p,d){var y=Tt(l),g=c.exec;return g===Sp||g===Lw.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(Lw,o,s[1])}r&&xo(Lw[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"}),Ks);/*! ***********
|
||
|
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 w1=function(){return w1=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},w1.apply(this,arguments)};function LC(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 RC(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 Rgt(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 _3=Me("unscopables"),P3=Array.prototype;P3[_3]==null&&fi.f(P3,_3,{configurable:!0,value:NC(null)});var Vu,HT,VT,Rw=function(t){P3[_3][t]=!0},Ql={},Mgt=!ve(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),UT=BC("IE_PROTO"),j3=et.Object,zgt=j3.prototype,E1=Mgt?j3.getPrototypeOf:function(t){var e=xC(t);if(Ke(e,UT))return e[UT];var n=e.constructor;return ae(n)&&e instanceof n?n.prototype:e instanceof j3?zgt:null},N3=Me("iterator"),XM=!1;[].keys&&("next"in(VT=[].keys())?(HT=E1(E1(VT)))!==Object.prototype&&(Vu=HT):XM=!0);var $gt=Vu==null||ve(function(){var t={};return Vu[N3].call(t)!==t});$gt&&(Vu={}),ae(Vu[N3])||ir(Vu,N3,function(){return this});var MC={IteratorPrototype:Vu,BUGGY_SAFARI_ITERATORS:XM},Hgt=fi.f,WT=Me("toStringTag"),D1=function(t,e,n){t&&!Ke(t=n?t:t.prototype,WT)&&Hgt(t,WT,{configurable:!0,value:e})},Vgt=MC.IteratorPrototype,Ugt=function(){return this},Wgt=et.String,Ggt=et.TypeError,tc=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Tt(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 Ggt("Can't set "+Wgt(i)+" as a prototype")}(o),e?t(r,o):r.__proto__=o,r}}():void 0),qgt=hh.PROPER,Kgt=hh.CONFIGURABLE,GT=MC.IteratorPrototype,T0=MC.BUGGY_SAFARI_ITERATORS,Mf=Me("iterator"),Ygt=function(){return this},ZM=function(t,e,n,r,o,i,a){(function(m,h,b,w){var D=h+" Iterator";m.prototype=NC(Vgt,{next:Py(1,b)}),D1(m,D,!1),Ql[D]=Ugt})(n,e,r);var u,s,l,c=function(m){if(m===o&&g)return g;if(!T0&&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),O1!==void 0&&(O1.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")}),dyt=Nt.RegExp,pyt=ln(function(){var t=dyt("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),hyt=q3.get,gyt=YC("native-string-replace",String.prototype.replace),T1=RegExp.prototype.exec,X3=T1,vyt=Qt("".charAt),yyt=Qt("".indexOf),myt=Qt("".replace),c4=Qt("".slice),f4=(l4=/b*/g,Qe(T1,K_=/a/,"a"),Qe(T1,l4,"a"),K_.lastIndex!==0||l4.lastIndex!==0),Y_=Gz.BROKEN_CARET,d4=/()??/.exec("")[1]!==void 0;(f4||d4||Y_||fyt||pyt)&&(X3=function(t){var e,n,r,o,i,a,u,s=this,l=hyt(s),c=ri(t),f=l.raw;if(f)return f.lastIndex=s.lastIndex,e=Qe(X3,f,c),s.lastIndex=f.lastIndex,e;var p=l.groups,d=Y_&&s.sticky,y=Qe(Wz,s),g=s.source,v=0,m=c;if(d&&(y=myt(y,"y",""),yyt(y,"g")===-1&&(y+="g"),m=c4(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&vyt(c,s.lastIndex-1)!==`
|
||
|
`)&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",y)),d4&&(n=new RegExp("^"+g+"$(?!\\s)",y)),f4&&(r=s.lastIndex),o=Qe(T1,d?n:s,m),d?o?(o.input=c4(o.input,v),o[0]=c4(o[0],v),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:f4&&o&&(s.lastIndex=s.global?o.index+o[0].length:r),d4&&o&&o.length>1&&Qe(gyt,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=lyt(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var kp=X3;My({target:"RegExp",proto:!0,forced:/./.exec!==kp},{exec:kp});var cS=Function.prototype,X_=cS.apply,byt=cS.bind,Z_=cS.call,wyt=typeof Reflect=="object"&&Reflect.apply||(byt?Z_.bind(X_):function(){return Z_.apply(X_,arguments)}),Eyt=$a("species"),p4=RegExp.prototype,Dyt=$a("match"),Cyt=Nt.TypeError,Syt=$a("species"),xyt=Qt("".charAt),J_=Qt("".charCodeAt),Ayt=Qt("".slice),Oyt=function(t){return function(e,n){var r,o,i=ri(ec(e)),a=aS(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=J_(i,a))<55296||r>56319||a+1===u||(o=J_(i,a+1))<56320||o>57343?t?xyt(i,a):r:t?Ayt(i,a,a+2):o-56320+(r-55296<<10)+65536}},kyt=Oyt(!0),Byt=function(t,e,n){return e+(n?kyt(t,e).length:1)},Fyt=Nt.Array,Tyt=Math.max,Q_=function(t,e,n){for(var r,o,i,a,u=uS(t),s=K3(e,u),l=K3(n===void 0?u:n,u),c=Fyt(Tyt(l-s,0)),f=0;s<l;s++,f++)r=c,o=f,i=t[s],(a=tS(o))in r?Ly.f(r,a,eS(0,i)):r[a]=i;return c.length=f,c},_yt=Nt.TypeError,tP=function(t,e){var n=t.exec;if(On(n)){var r=Qe(n,t,e);return r!==null&&to(r),r}if(Ea(t)==="RegExp")return Qe(kp,t,e);throw _yt("RegExp#exec called on incompatible receiver")},Qs=Gz.UNSUPPORTED_Y,Pyt=Math.min,Yz=[].push,jyt=Qt(/./.exec),tl=Qt(Yz),qf=Qt("".slice);(function(t,e,n,r){var o=$a(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[Eyt]=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=ri(ec(this)),h=y===void 0?4294967295:y>>>0;if(h===0)return[];if(d===void 0)return[m];if(!Wr(g=d)||!((v=g[Dyt])!==void 0?v:Ea(g)=="RegExp"))return Qe(c,m,d,h);for(var b,w,D,S=[],C=(d.ignoreCase?"i":"")+(d.multiline?"m":"")+(d.unicode?"u":"")+(d.sticky?"y":""),O=0,T=new RegExp(d.source,C+"g");(b=Qe(kp,T,m))&&!((w=T.lastIndex)>O&&(tl(S,qf(m,O,b.index)),b.length>1&&b.index<m.length&&wyt(Yz,S,Q_(b,1)),D=b[0].length,O=w,S.length>=h));)T.lastIndex===b.index&&T.lastIndex++;return O===m.length?!D&&jyt(T,"")||tl(S,""):tl(S,qf(m,O)),S.length>h?Q_(S,0,h):S}:"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=ec(this),v=d==null?void 0:Tz(d,l);return v?Qe(v,d,g,y):Qe(p,ri(g),d,y)},function(d,y){var g=to(this),v=ri(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)[Syt])==null?U:function(nt){if(Rz(nt))return nt;throw Cyt(Bz(nt)+" is not a constructor")}(W)}(g,RegExp),b=g.unicode,w=(g.ignoreCase?"i":"")+(g.multiline?"m":"")+(g.unicode?"u":"")+(Qs?"g":"y"),D=new h(Qs?"^(?:"+g.source+")":g,w),S=y===void 0?4294967295:y>>>0;if(S===0)return[];if(v.length===0)return tP(D,v)===null?[v]:[];for(var C=0,O=0,T=[];O<v.length;){D.lastIndex=Qs?0:O;var R,H=tP(D,Qs?qf(v,O):v);if(H===null||(R=Pyt(Nz(D.lastIndex+(Qs?O:0)),v.length))===C)O=Byt(v,O,b);else{if(tl(T,qf(v,C,O)),T.length===S)return T;for(var M=1;M<=H.length-1;M++)if(tl(T,H[M]),T.length===S)return T;O=C=R}}return tl(T,qf(v,C)),T}]}(o,""[t],function(l,c,f,p,d){var y=Qt(l),g=c.exec;return g===kp||g===p4.exec?i&&!d?{done:!0,value:u(c,f,p)}:{done:!0,value:y(f,c,p)}:{done:!1}});Op(String.prototype,t,s[0]),Op(p4,o,s[1])}r&&nc(p4[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"}),Qs)
|
||
|
Can not construct a instance`)}return t.setEditorConfig=function(e){e===void 0&&(e={}),this.editorConfig=xe(xe({},this.editorConfig),e)},t.setSimpleEditorConfig=function(e){e===void 0&&(e={}),this.simpleEditorConfig=xe(xe({},this.simpleEditorConfig),e)},t.setToolbarConfig=function(e){e===void 0&&(e={}),this.toolbarConfig=xe(xe({},this.toolbarConfig),e)},t.setSimpleToolbarConfig=function(e){e===void 0&&(e={}),this.simpleToolbarConfig=xe(xe({},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(Xd[i]!=null)throw new Error("Duplicated key '"+i+"' in menu items");Xd[i]=a,function(l,c){c!=null&&(DN[l]=c)}(i,s)})(e,n)},t.registerRenderElem=function(e){(function(n){var r=n.type,o=n.renderElem;qN[r||""]=o})(e)},t.registerRenderStyle=function(e){(function(n){WE.push(n)})(e)},t.registerElemToHtml=function(e){(function(n){var r=n.type,o=n.elemToHtml;CN[r||""]=o})(e)},t.registerStyleToHtml=function(e){(function(n){RE.push(n)})(e)},t.registerPreParseHtml=function(e){(function(n){$N.push(n)})(e)},t.registerParseElemHtml=function(e){(function(n){var r=n.selector,o=n.parseElemHtml;gv[r]=o})(e)},t.registerParseStyleHtml=function(e){(function(n){DD.push(n)})(e)},t.registerModule=function(e){cu(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 cu(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)}Kat.forEach(function(t){return cu(t)}),cu(xlt),cu(Zft),cu(a0t),cu(Zvt),cu(zyt);var Jz='<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>',Qz={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"]}},Vyt={hoverbarKeys:xe(xe({},Qz),{text:{menuKeys:["headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};on.setEditorConfig(xe(xe({},Vyt),{decorate:Zz}));var Uyt={hoverbarKeys:Qz};on.setSimpleEditorConfig(xe(xe({},Uyt),{decorate:Zz}));var Wyt={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:Jz,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(Wyt);var Gyt={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:Jz,menuKeys:["insertImage","uploadImage"]},"insertVideo"
|
||
|
Please use '@${t}' event instead of props`,e}var t$=(t,e)=>{for(const[n,r]of e)t[n]=r;return t};const nmt=rP({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=h4(null),r=e$(null),o=h4(""),i=()=>{if(!n.value)return;const u=i$(t.defaultContent);qyt({selector:n.value,mode:t.mode,content:u||[],html:t.defaultHtml||t.modelValue||"",config:emt(tmt({},t.defaultConfig),{onCreated(s){if(r.value=s,e.emit("onCreated",s),t.defaultConfig.onCreated){const l=Hi("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=Hi("onChange");throw new Error(c)}},onDestroyed(s){if(e.emit("onDestroyed",s),t.defaultConfig.onDestroyed){const l=Hi("onDestroyed");throw new Error(l)}},onMaxLength(s){if(e.emit("onMaxLength",s),t.defaultConfig.onMaxLength){const l=Hi("onMaxLength");throw new Error(l)}},onFocus(s){if(e.emit("onFocus",s),t.defaultConfig.onFocus){const l=Hi("onFocus");throw new Error(l)}},onBlur(s){if(e.emit("onBlur",s),t.defaultConfig.onBlur){const l=Hi("onBlur");throw new Error(l)}},customAlert(s,l){if(e.emit("customAlert",s,l),t.defaultConfig.customAlert){const c=Hi("customAlert");throw new Error(c)}},customPaste:(s,l)=>{if(t.defaultConfig.customPaste){const f=Hi("customPaste");throw new Error(f)}let c;return e.emit("customPaste",s,l,f=>{c=f}),c}})})};function a(u){const s=r.value;s!=null&&s.setHtml(u)}return n$(()=>{i()}),r$(()=>t.modelValue,u=>{u!==o.value&&a(u)}),{box:n}}}),rmt={ref:"box",style:{height:"100%"}};function omt(t,e,n,r,o,i){return oP(),iP("div",rmt,null,512)}var lmt=t$(nmt,[["render",omt]]);const imt=rP({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(t){const e=h4(null),n=r=>{if(!!e.value){if(r==null)throw new Error("Not found instance of Editor when create <Toolbar/> component");A.getToolbar(r)||Kyt({editor:r,selector:e.value||"<div></div>",mode:t.mode,config:t.defaultConfig})}};return o$(()=>{const{editor:r}=t;r!=null&&n(r)}),{selector:e}}}),amt={ref:"selector"};function umt(t,e,n,r,o,i){return oP(),iP("div",amt,null,512)}var cmt=t$(imt,[["render",umt]]);export{lmt as E,cmt as T};
|