!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@wangeditor/core"),require("@wangeditor/basic-modules"),require("dom7")):"function"==typeof define&&define.amd?define(["@wangeditor/core","@wangeditor/basic-modules","dom7"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorUploadImageModule=e(t.core,t.basicModules,t.$)}(this,(function(t,e,n){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=r(n);t.i18nAddResources("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),t.i18nAddResources("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(t){var e={exports:{}};return t(e,e.exports),e.exports}var a,c,f=function(t){return t&&t.Math==Math&&t},s=f("object"==typeof globalThis&&globalThis)||f("object"==typeof window&&window)||f("object"==typeof self&&self)||f("object"==typeof i&&i)||function(){return this}()||Function("return this")(),l=function(t){try{return!!t()}catch(t){return!0}},p=!l((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),d=Function.prototype.call,v=d.bind?d.bind(d):function(){return d.apply(d,arguments)},h={}.propertyIsEnumerable,y=Object.getOwnPropertyDescriptor,g={f:y&&!h.call({1:2},1)?function(t){var e=y(this,t);return!!e&&e.enumerable}:h},m=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},b=Function.prototype,w=b.bind,x=b.call,S=w&&w.bind(x),O=w?function(t){return t&&S(x,t)}:function(t){return t&&function(){return x.apply(t,arguments)}},E=O({}.toString),j=O("".slice),I=function(t){return j(E(t),8,-1)},T=s.Object,A=O("".split),P=l((function(){return!T("z").propertyIsEnumerable(0)}))?function(t){return"String"==I(t)?A(t,""):T(t)}:T,R=s.TypeError,M=function(t){if(null==t)throw R("Can't call method on "+t);return t},k=function(t){return P(M(t))},L=function(t){return"function"==typeof t},F=function(t){return"object"==typeof t?null!==t:L(t)},C=function(t){return L(t)?t:void 0},N=function(t,e){return arguments.length<2?C(s[t]):s[t]&&s[t][e]},z=O({}.isPrototypeOf),_=N("navigator","userAgent")||"",D=s.process,U=s.Deno,G=D&&D.versions||U&&U.version,B=G&&G.v8;B&&(c=(a=B.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!c&&_&&(!(a=_.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=_.match(/Chrome\/(\d+)/))&&(c=+a[1]);var W=c,V=!!Object.getOwnPropertySymbols&&!l((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&W&&W<41})),H=V&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,q=s.Object,K=H?function(t){return"symbol"==typeof t}:function(t){var e=N("Symbol");return L(e)&&z(e.prototype,q(t))},Y=s.String,X=function(t){try{return Y(t)}catch(t){return"Object"}},$=s.TypeError,J=function(t){if(L(t))return t;throw $(X(t)+" is not a function")},Q=function(t,e){var n=t[e];return null==n?void 0:J(n)},Z=s.TypeError,tt=Object.defineProperty,et=function(t,e){try{tt(s,t,{value:e,configurable:!0,writable:!0})}catch(n){s[t]=e}return e},nt="__core-js_shared__",rt=s[nt]||et(nt,{}),ot=u((function(t){(t.exports=function(t,e){return rt[t]||(rt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),it=s.Object,ut=function(t){return it(M(t))},at=O({}.hasOwnProperty),ct=Object.hasOwn||function(t,e){return at(ut(t),e)},ft=0,st=Math.random(),lt=O(1..toString),pt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+lt(++ft+st,36)},dt=ot("wks"),vt=s.Symbol,ht=vt&&vt.for,yt=H?vt:vt&&vt.withoutSetter||pt,gt=function(t){if(!ct(dt,t)||!V&&"string"!=typeof dt[t]){var e="Symbol."+t;V&&ct(vt,t)?dt[t]=vt[t]:dt[t]=H&&ht?ht(e):yt(e)}return dt[t]},mt=s.TypeError,bt=gt("toPrimitive"),wt=function(t,e){if(!F(t)||K(t))return t;var n,r=Q(t,bt);if(r){if(void 0===e&&(e="default"),n=v(r,t,e),!F(n)||K(n))return n;throw mt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&L(n=t.toString)&&!F(r=v(n,t)))return r;if(L(n=t.valueOf)&&!F(r=v(n,t)))return r;if("string"!==e&&L(n=t.toString)&&!F(r=v(n,t)))return r;throw Z("Can't convert object to primitive value")}(t,e)},xt=function(t){var e=wt(t,"string");return K(e)?e:e+""},St=s.document,Ot=F(St)&&F(St.createElement),Et=function(t){return Ot?St.createElement(t):{}},jt=!p&&!l((function(){return 7!=Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a})),It=Object.getOwnPropertyDescriptor,Tt={f:p?It:function(t,e){if(t=k(t),e=xt(e),jt)try{return It(t,e)}catch(t){}if(ct(t,e))return m(!v(g.f,t,e),t[e])}},At=s.String,Pt=s.TypeError,Rt=function(t){if(F(t))return t;throw Pt(At(t)+" is not an object")},Mt=s.TypeError,kt=Object.defineProperty,Lt={f:p?kt:function(t,e,n){if(Rt(t),e=xt(e),Rt(n),jt)try{return kt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Mt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Ft=p?function(t,e,n){return Lt.f(t,e,m(1,n))}:function(t,e,n){return t[e]=n,t},Ct=O(Function.toString);L(rt.inspectSource)||(rt.inspectSource=function(t){return Ct(t)});var Nt,zt,_t,Dt=rt.inspectSource,Ut=s.WeakMap,Gt=L(Ut)&&/native code/.test(Dt(Ut)),Bt=ot("keys"),Wt=function(t){return Bt[t]||(Bt[t]=pt(t))},Vt={},Ht="Object already initialized",qt=s.TypeError,Kt=s.WeakMap;if(Gt||rt.state){var Yt=rt.state||(rt.state=new Kt),Xt=O(Yt.get),$t=O(Yt.has),Jt=O(Yt.set);Nt=function(t,e){if($t(Yt,t))throw new qt(Ht);return e.facade=t,Jt(Yt,t,e),e},zt=function(t){return Xt(Yt,t)||{}},_t=function(t){return $t(Yt,t)}}else{var Qt=Wt("state");Vt[Qt]=!0,Nt=function(t,e){if(ct(t,Qt))throw new qt(Ht);return e.facade=t,Ft(t,Qt,e),e},zt=function(t){return ct(t,Qt)?t[Qt]:{}},_t=function(t){return ct(t,Qt)}}var Zt={set:Nt,get:zt,has:_t,enforce:function(t){return _t(t)?zt(t):Nt(t,{})},getterFor:function(t){return function(e){var n;if(!F(e)||(n=zt(e)).type!==t)throw qt("Incompatible receiver, "+t+" required");return n}}},te=Function.prototype,ee=p&&Object.getOwnPropertyDescriptor,ne=ct(te,"name"),re={EXISTS:ne,PROPER:ne&&"something"===function(){}.name,CONFIGURABLE:ne&&(!p||p&&ee(te,"name").configurable)},oe=u((function(t){var e=re.CONFIGURABLE,n=Zt.get,r=Zt.enforce,o=String(String).split("String");(t.exports=function(t,n,i,u){var a,c=!!u&&!!u.unsafe,f=!!u&&!!u.enumerable,l=!!u&&!!u.noTargetGet,p=u&&void 0!==u.name?u.name:n;L(i)&&("Symbol("===String(p).slice(0,7)&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ct(i,"name")||e&&i.name!==p)&&Ft(i,"name",p),(a=r(i)).source||(a.source=o.join("string"==typeof p?p:""))),t!==s?(c?!l&&t[n]&&(f=!0):delete t[n],f?t[n]=i:Ft(t,n,i)):f?t[n]=i:et(n,i)})(Function.prototype,"toString",(function(){return L(this)&&n(this).source||Dt(this)}))})),ie=Math.ceil,ue=Math.floor,ae=function(t){var e=+t;return e!=e||0===e?0:(e>0?ue:ie)(e)},ce=Math.max,fe=Math.min,se=function(t,e){var n=ae(t);return n<0?ce(n+e,0):fe(n,e)},le=Math.min,pe=function(t){return t>0?le(ae(t),9007199254740991):0},de=function(t){return pe(t.length)},ve=function(t){return function(e,n,r){var o,i=k(e),u=de(i),a=se(r,u);if(t&&n!=n){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},he={includes:ve(!0),indexOf:ve(!1)}.indexOf,ye=O([].push),ge=function(t,e){var n,r=k(t),o=0,i=[];for(n in r)!ct(Vt,n)&&ct(r,n)&&ye(i,n);for(;e.length>o;)ct(r,n=e[o++])&&(~he(i,n)||ye(i,n));return i},me=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],be=me.concat("length","prototype"),we={f:Object.getOwnPropertyNames||function(t){return ge(t,be)}},xe={f:Object.getOwnPropertySymbols},Se=O([].concat),Oe=N("Reflect","ownKeys")||function(t){var e=we.f(Rt(t)),n=xe.f;return n?Se(e,n(t)):e},Ee=function(t,e){for(var n=Oe(e),r=Lt.f,o=Tt.f,i=0;i=51||!l((function(){var t=[];return(t.constructor={})[Je]=function(){return{foo:1}},1!==t[Ne](Boolean).foo}))),tn=gt("species"),en=s.Array,nn=Math.max;Le({target:"Array",proto:!0,forced:!Ze},{slice:function(t,e){var n,r,o,i=k(this),u=de(i),a=se(t,u),c=se(void 0===e?u:e,u);if(Fe(i)&&(n=i.constructor,(Xe(n)&&(n===en||Fe(n.prototype))||F(n)&&null===(n=n[tn]))&&(n=void 0),n===en||void 0===n))return Qe(i,a,c);for(r=new(void 0===n?en:n)(nn(c-a,0)),o=0;au;)Lt.f(t,n=o[u++],r[n]);return t},hn=N("document","documentElement"),yn=Wt("IE_PROTO"),gn=function(){},mn=function(t){return"