@wangeditor-next/plugin-formula 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("katex"),require("katex/dist/katex.css"),require("@wangeditor-next/editor"),require("snabbdom")):"function"==typeof define&&define.amd?define(["katex","katex/dist/katex.css","@wangeditor-next/editor","snabbdom"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorFormulaPlugin=e(t.katex,t.katexStyleContent,t.editor,t.snabbdom)}(this,(function(t,e,n,r){"use strict";var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function o(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}"function"==typeof SuppressedError&&SuppressedError;var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var f,c,s={};function l(){if(c)return f;c=1;var t=function(t){return t&&t.Math===Math&&t};return f=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof u&&u)||t("object"==typeof f&&f)||function(){return this}()||Function("return this")()}var h,p,d,v,m,g,y,b,w,E,x,S,O,A,T,L,j,M,P,I,C,N,D,_,k,F,R,W,H,V,q,B,z,$,U,G,K,X={exports:{}};function Y(){if(v)return d;v=1;var t=l(),e=Object.defineProperty;return d=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function J(){if(m)return X.exports;m=1;var t=p?h:(p=1,h=!1),e=l(),n=Y(),r="__core-js_shared__",i=X.exports=e[r]||n(r,{});return(i.versions||(i.versions=[])).push({version:"3.38.1",mode:t?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"}),X.exports}function Q(){if(y)return g;y=1;var t=J();return g=function(e,n){return t[e]||(t[e]=n||{})}}function Z(){return w?b:(w=1,b=function(t){try{return!!t()}catch(t){return!0}})}function tt(){if(x)return E;x=1;var t=Z();return E=!t((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function et(){if(O)return S;O=1;var t=tt(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return S=t?r:function(t){return function(){return n.apply(t,arguments)}},S}function nt(){return T?A:(T=1,A=function(t){return null==t})}function rt(){if(j)return L;j=1;var t=nt(),e=TypeError;return L=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function it(){if(P)return M;P=1;var t=rt(),e=Object;return M=function(n){return e(t(n))}}function ot(){if(C)return I;C=1;var t=et(),e=it(),n=t({}.hasOwnProperty);return I=Object.hasOwn||function(t,r){return n(e(t),r)}}function ut(){if(D)return N;D=1;var t=et(),e=0,n=Math.random(),r=t(1..toString);return N=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function at(){if(R)return F;R=1;var t,e,n=l(),r=function(){if(k)return _;k=1;var t=l().navigator,e=t&&t.userAgent;return _=e?String(e):""}(),i=n.process,o=n.Deno,u=i&&i.versions||o&&o.version,a=u&&u.v8;return a&&(e=(t=a.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&r&&(!(t=r.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=r.match(/Chrome\/(\d+)/))&&(e=+t[1]),F=e}function ft(){if(H)return W;H=1;var t=at(),e=Z(),n=l().String;return W=!!Object.getOwnPropertySymbols&&!e((function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41}))}function ct(){if(q)return V;q=1;var t=ft();return V=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function st(){if(z)return B;z=1;var t=l(),e=Q(),n=ot(),r=ut(),i=ft(),o=ct(),u=t.Symbol,a=e("wks"),f=o?u.for||u:u&&u.withoutSetter||r;return B=function(t){return n(a,t)||(a[t]=i&&n(u,t)?u[t]:f("Symbol."+t)),a[t]}}function lt(){if(U)return $;U=1;var t={};return t[st()("toStringTag")]="z",$="[object z]"===String(t)}function ht(){if(K)return G;K=1;var t="object"==typeof document&&document.all;return G=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}var pt,dt,vt,mt,gt,yt,bt,wt,Et,xt,St,Ot,At,Tt,Lt,jt,Mt,Pt,It,Ct,Nt,Dt,_t,kt,Ft,Rt,Wt,Ht,Vt,qt,Bt,zt,$t,Ut={};function Gt(){if(dt)return pt;dt=1;var t=Z();return pt=!t((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Kt(){if(mt)return vt;mt=1;var t=ht();return vt=function(e){return"object"==typeof e?null!==e:t(e)}}function Xt(){if(yt)return gt;yt=1;var t=l(),e=Kt(),n=t.document,r=e(n)&&e(n.createElement);return gt=function(t){return r?n.createElement(t):{}}}function Yt(){if(wt)return bt;wt=1;var t=Gt(),e=Z(),n=Xt();return bt=!t&&!e((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function Jt(){if(xt)return Et;xt=1;var t=Gt(),e=Z();return Et=t&&e((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function Qt(){if(Ot)return St;Ot=1;var t=Kt(),e=String,n=TypeError;return St=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function Zt(){if(Tt)return At;Tt=1;var t=tt(),e=Function.prototype.call;return At=t?e.bind(e):function(){return e.apply(e,arguments)},At}function te(){if(jt)return Lt;jt=1;var t=l(),e=ht();return Lt=function(n,r){return arguments.length<2?(i=t[n],e(i)?i:void 0):t[n]&&t[n][r];var i},Lt}function ee(){if(Ct)return It;Ct=1;var t=te(),e=ht(),n=function(){if(Pt)return Mt;Pt=1;var t=et();return Mt=t({}.isPrototypeOf)}(),r=ct(),i=Object;return It=r?function(t){return"symbol"==typeof t}:function(r){var o=t("Symbol");return e(o)&&n(o.prototype,i(r))}}function ne(){if(Dt)return Nt;Dt=1;var t=String;return Nt=function(e){try{return t(e)}catch(t){return"Object"}}}function re(){if(kt)return _t;kt=1;var t=ht(),e=ne(),n=TypeError;return _t=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function ie(){if(Rt)return Ft;Rt=1;var t=re(),e=nt();return Ft=function(n,r){var i=n[r];return e(i)?void 0:t(i)}}function oe(){if(Ht)return Wt;Ht=1;var t=Zt(),e=ht(),n=Kt(),r=TypeError;return Wt=function(i,o){var u,a;if("string"===o&&e(u=i.toString)&&!n(a=t(u,i)))return a;if(e(u=i.valueOf)&&!n(a=t(u,i)))return a;if("string"!==o&&e(u=i.toString)&&!n(a=t(u,i)))return a;throw new r("Can't convert object to primitive value")}}function ue(){if(qt)return Vt;qt=1;var t=Zt(),e=Kt(),n=ee(),r=ie(),i=oe(),o=st(),u=TypeError,a=o("toPrimitive");return Vt=function(o,f){if(!e(o)||n(o))return o;var c,s=r(o,a);if(s){if(void 0===f&&(f="default"),c=t(s,o,f),!e(c)||n(c))return c;throw new u("Can't convert object to primitive value")}return void 0===f&&(f="number"),i(o,f)}}function ae(){if(zt)return Bt;zt=1;var t=ue(),e=ee();return Bt=function(n){var r=t(n,"string");return e(r)?r:r+""}}function fe(){if($t)return Ut;$t=1;var t=Gt(),e=Yt(),n=Jt(),r=Qt(),i=ae(),o=TypeError,u=Object.defineProperty,a=Object.getOwnPropertyDescriptor,f="enumerable",c="configurable",s="writable";return Ut.f=t?n?function(t,e,n){if(r(t),e=i(e),r(n),"function"==typeof t&&"prototype"===e&&"value"in n&&s in n&&!n[s]){var o=a(t,e);o&&o[s]&&(t[e]=n.value,n={configurable:c in n?n[c]:o[c],enumerable:f in n?n[f]:o[f],writable:!1})}return u(t,e,n)}:u:function(t,n,a){if(r(t),n=i(n),r(a),e)try{return u(t,n,a)}catch(t){}if("get"in a||"set"in a)throw new o("Accessors not supported");return"value"in a&&(t[n]=a.value),t},Ut}var ce,se,le,he,pe,de,ve,me,ge,ye,be,we,Ee,xe,Se,Oe,Ae,Te,Le,je,Me,Pe,Ie,Ce,Ne,De,_e={exports:{}};function ke(){if(se)return ce;se=1;var t=Gt(),e=ot(),n=Function.prototype,r=t&&Object.getOwnPropertyDescriptor,i=e(n,"name"),o=i&&"something"===function(){}.name,u=i&&(!t||t&&r(n,"name").configurable);return ce={EXISTS:i,PROPER:o,CONFIGURABLE:u}}function Fe(){if(he)return le;he=1;var t=et(),e=ht(),n=J(),r=t(Function.toString);return e(n.inspectSource)||(n.inspectSource=function(t){return r(t)}),le=n.inspectSource}function Re(){return me?ve:(me=1,ve=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function We(){if(ye)return ge;ye=1;var t=Gt(),e=fe(),n=Re();return ge=t?function(t,r,i){return e.f(t,r,n(1,i))}:function(t,e,n){return t[e]=n,t}}function He(){if(we)return be;we=1;var t=Q(),e=ut(),n=t("keys");return be=function(t){return n[t]||(n[t]=e(t))}}function Ve(){return xe?Ee:(xe=1,Ee={})}function qe(){if(Oe)return Se;Oe=1;var t,e,n,r=function(){if(de)return pe;de=1;var t=l(),e=ht(),n=t.WeakMap;return pe=e(n)&&/native code/.test(String(n))}(),i=l(),o=Kt(),u=We(),a=ot(),f=J(),c=He(),s=Ve(),h="Object already initialized",p=i.TypeError,d=i.WeakMap;if(r||f.state){var v=f.state||(f.state=new d);v.get=v.get,v.has=v.has,v.set=v.set,t=function(t,e){if(v.has(t))throw new p(h);return e.facade=t,v.set(t,e),e},e=function(t){return v.get(t)||{}},n=function(t){return v.has(t)}}else{var m=c("state");s[m]=!0,t=function(t,e){if(a(t,m))throw new p(h);return e.facade=t,u(t,m,e),e},e=function(t){return a(t,m)?t[m]:{}},n=function(t){return a(t,m)}}return Se={set:t,get:e,has:n,enforce:function(r){return n(r)?e(r):t(r,{})},getterFor:function(t){return function(n){var r;if(!o(n)||(r=e(n)).type!==t)throw new p("Incompatible receiver, "+t+" required");return r}}}}function Be(){if(Ae)return _e.exports;Ae=1;var t=et(),e=Z(),n=ht(),r=ot(),i=Gt(),o=ke().CONFIGURABLE,u=Fe(),a=qe(),f=a.enforce,c=a.get,s=String,l=Object.defineProperty,h=t("".slice),p=t("".replace),d=t([].join),v=i&&!e((function(){return 8!==l((function(){}),"length",{value:8}).length})),m=String(String).split("String"),g=_e.exports=function(t,e,n){"Symbol("===h(s(e),0,7)&&(e="["+p(s(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!r(t,"name")||o&&t.name!==e)&&(i?l(t,"name",{value:e,configurable:!0}):t.name=e),v&&n&&r(n,"arity")&&t.length!==n.arity&&l(t,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?i&&l(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var u=f(t);return r(u,"source")||(u.source=d(m,"string"==typeof e?e:"")),t};return Function.prototype.toString=g((function(){return n(this)&&c(this).source||u(this)}),"toString"),_e.exports}function ze(){if(Le)return Te;Le=1;var t=ht(),e=fe(),n=Be(),r=Y();return Te=function(i,o,u,a){a||(a={});var f=a.enumerable,c=void 0!==a.name?a.name:o;if(t(u)&&n(u,c,a),a.global)f?i[o]=u:r(o,u);else{try{a.unsafe?i[o]&&(f=!0):delete i[o]}catch(t){}f?i[o]=u:e.f(i,o,{value:u,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return i}}function $e(){if(Me)return je;Me=1;var t=et(),e=t({}.toString),n=t("".slice);return je=function(t){return n(e(t),8,-1)}}function Ue(){if(Ie)return Pe;Ie=1;var t=lt(),e=ht(),n=$e(),r=st()("toStringTag"),i=Object,o="Arguments"===n(function(){return arguments}());return Pe=t?n:function(t){var u,a,f;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,e){try{return t[e]}catch(t){}}(u=i(t),r))?a:o?n(u):"Object"===(f=n(u))&&e(u.callee)?"Arguments":f}}!function(){if(De)return s;De=1;var t=lt(),e=ze(),n=function(){if(Ne)return Ce;Ne=1;var t=lt(),e=Ue();return Ce=t?{}.toString:function(){return"[object "+e(this)+"]"}}();t||e(Object.prototype,"toString",n,{unsafe:!0})}();var Ge,Ke,Xe,Ye,Je,Qe,Ze={},tn={},en={};function nn(){if(Xe)return Ke;Xe=1;var t=et(),e=Z(),n=$e(),r=Object,i=t("".split);return Ke=e((function(){return!r("z").propertyIsEnumerable(0)}))?function(t){return"String"===n(t)?i(t,""):r(t)}:r}function rn(){if(Je)return Ye;Je=1;var t=nn(),e=rt();return Ye=function(n){return t(e(n))}}function on(){if(Qe)return tn;Qe=1;var t=Gt(),e=Zt(),n=function(){if(Ge)return en;Ge=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return en.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,en}(),r=Re(),i=rn(),o=ae(),u=ot(),a=Yt(),f=Object.getOwnPropertyDescriptor;return tn.f=t?f:function(t,c){if(t=i(t),c=o(c),a)try{return f(t,c)}catch(t){}if(u(t,c))return r(!e(n.f,t,c),t[c])},tn}var un,an,fn,cn,sn,ln,hn,pn,dn,vn,mn,gn,yn,bn,wn,En,xn,Sn={};function On(){if(cn)return fn;cn=1;var t=function(){if(an)return un;an=1;var t=Math.ceil,e=Math.floor;return un=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)}}();return fn=function(e){var n=+e;return n!=n||0===n?0:t(n)}}function An(){if(ln)return sn;ln=1;var t=On(),e=Math.max,n=Math.min;return sn=function(r,i){var o=t(r);return o<0?e(o+i,0):n(o,i)}}function Tn(){if(pn)return hn;pn=1;var t=On(),e=Math.min;return hn=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function Ln(){if(vn)return dn;vn=1;var t=Tn();return dn=function(e){return t(e.length)}}function jn(){if(bn)return yn;bn=1;var t=et(),e=ot(),n=rn(),r=function(){if(gn)return mn;gn=1;var t=rn(),e=An(),n=Ln(),r=function(r){return function(i,o,u){var a=t(i),f=n(a);if(0===f)return!r&&-1;var c,s=e(u,f);if(r&&o!=o){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((r||s in a)&&a[s]===o)return r||s||0;return!r&&-1}};return mn={includes:r(!0),indexOf:r(!1)}}().indexOf,i=Ve(),o=t([].push);return yn=function(t,u){var a,f=n(t),c=0,s=[];for(a in f)!e(i,a)&&e(f,a)&&o(s,a);for(;u.length>c;)e(f,a=u[c++])&&(~r(s,a)||o(s,a));return s}}function Mn(){return En?wn:(En=1,wn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}var Pn,In,Cn,Nn,Dn,_n,kn,Fn,Rn,Wn,Hn,Vn,qn,Bn,zn,$n,Un,Gn,Kn,Xn={};function Yn(){if(Cn)return In;Cn=1;var t=te(),e=et(),n=function(){if(xn)return Sn;xn=1;var t=jn(),e=Mn().concat("length","prototype");return Sn.f=Object.getOwnPropertyNames||function(n){return t(n,e)},Sn}(),r=(Pn||(Pn=1,Xn.f=Object.getOwnPropertySymbols),Xn),i=Qt(),o=e([].concat);return In=t("Reflect","ownKeys")||function(t){var e=n.f(i(t)),u=r.f;return u?o(e,u(t)):e}}function Jn(){if(Dn)return Nn;Dn=1;var t=ot(),e=Yn(),n=on(),r=fe();return Nn=function(i,o,u){for(var a=e(o),f=r.f,c=n.f,s=0;s<a.length;s++){var l=a[s];t(i,l)||u&&t(u,l)||f(i,l,c(o,l))}}}function Qn(){if(Rn)return Fn;Rn=1;var t=l(),e=on().f,n=We(),r=ze(),i=Y(),o=Jn(),u=function(){if(kn)return _n;kn=1;var t=Z(),e=ht(),n=/#|\.prototype\./,r=function(n,r){var f=o[i(n)];return f===a||f!==u&&(e(r)?t(r):!!r)},i=r.normalize=function(t){return String(t).replace(n,".").toLowerCase()},o=r.data={},u=r.NATIVE="N",a=r.POLYFILL="P";return _n=r}();return Fn=function(a,f){var c,s,l,h,p,d=a.target,v=a.global,m=a.stat;if(c=v?t:m?t[d]||i(d,{}):t[d]&&t[d].prototype)for(s in f){if(h=f[s],l=a.dontCallGetSet?(p=e(c,s))&&p.value:c[s],!u(v?s:d+(m?".":"#")+s,a.forced)&&void 0!==l){if(typeof h==typeof l)continue;o(h,l)}(a.sham||l&&l.sham)&&n(h,"sham",!0),r(c,s,h,a)}}}function Zn(){if(qn)return Vn;qn=1;var t=et();return Vn=t([].slice)}function tr(){if(zn)return Bn;zn=1;var t=et(),e=re(),n=Kt(),r=ot(),i=Zn(),o=tt(),u=Function,a=t([].concat),f=t([].join),c={};return Bn=o?u.bind:function(t){var o=e(this),s=o.prototype,l=i(arguments,1),h=function(){var e=a(l,i(arguments));return this instanceof h?function(t,e,n){if(!r(c,e)){for(var i=[],o=0;o<e;o++)i[o]="a["+o+"]";c[e]=u("C,a","return new C("+f(i,",")+")")}return c[e](t,n)}(o,e.length,e):o.apply(t,e)};return n(s)&&(h.prototype=s),h},Bn}function er(){if(Un)return $n;Un=1;var t=et(),e=Z(),n=ht(),r=Ue(),i=te(),o=Fe(),u=function(){},a=i("Reflect","construct"),f=/^\s*(?:class|function)\b/,c=t(f.exec),s=!f.test(u),l=function(t){if(!n(t))return!1;try{return a(u,[],t),!0}catch(t){return!1}},h=function(t){if(!n(t))return!1;switch(r(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return s||!!c(f,o(t))}catch(t){return!0}};return h.sham=!0,$n=!a||e((function(){var t;return l(l.call)||!l(Object)||!l((function(){t=!0}))||t}))?h:l}function nr(){if(Kn)return Gn;Kn=1;var t=er(),e=ne(),n=TypeError;return Gn=function(r){if(t(r))return r;throw new n(e(r)+" is not a constructor")}}var rr,ir,or,ur,ar,fr,cr,sr,lr={};function hr(){if(ir)return rr;ir=1;var t=jn(),e=Mn();return rr=Object.keys||function(n){return t(n,e)}}function pr(){if(ar)return ur;ar=1;var t=te();return ur=t("document","documentElement")}function dr(){if(cr)return fr;cr=1;var t,e=Qt(),n=function(){if(or)return lr;or=1;var t=Gt(),e=Jt(),n=fe(),r=Qt(),i=rn(),o=hr();return lr.f=t&&!e?Object.defineProperties:function(t,e){r(t);for(var u,a=i(e),f=o(e),c=f.length,s=0;c>s;)n.f(t,u=f[s++],a[u]);return t},lr}(),r=Mn(),i=Ve(),o=pr(),u=Xt(),a=He(),f="prototype",c="script",s=a("IE_PROTO"),l=function(){},h=function(t){return"<"+c+">"+t+"</"+c+">"},p=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},d=function(){try{t=new ActiveXObject("htmlfile")}catch(t){}var e,n,i;d="undefined"!=typeof document?document.domain&&t?p(t):(n=u("iframe"),i="java"+c+":",n.style.display="none",o.appendChild(n),n.src=String(i),(e=n.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):p(t);for(var a=r.length;a--;)delete d[f][r[a]];return d()};return i[s]=!0,fr=Object.create||function(t,r){var i;return null!==t?(l[f]=e(t),i=new l,l[f]=null,i[s]=t):i=d(),void 0===r?i:n.f(i,r)}}!function(){if(sr)return Ze;sr=1;var t=Qn(),e=te(),n=function(){if(Hn)return Wn;Hn=1;var t=tt(),e=Function.prototype,n=e.apply,r=e.call;return Wn="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),Wn}(),r=tr(),i=nr(),o=Qt(),u=Kt(),a=dr(),f=Z(),c=e("Reflect","construct"),s=Object.prototype,l=[].push,h=f((function(){function t(){}return!(c((function(){}),[],t)instanceof t)})),p=!f((function(){c((function(){}))})),d=h||p;t({target:"Reflect",stat:!0,forced:d,sham:d},{construct:function(t,e){i(t),o(e);var f=arguments.length<3?t:i(arguments[2]);if(p&&!h)return c(t,e,f);if(t===f){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var d=[null];return n(l,d,e),new(n(r,t,d))}var v=f.prototype,m=a(u(v)?v:s),g=n(t,m,e);return u(g)?g:m}})}(),function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.polyfillWrapFlushCallback){var t=HTMLElement,e=function(){return Reflect.construct(t,[],this.constructor)};window.HTMLElement=e,HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}}();var vr=function(n){function r(){var t=n.call(this)||this,r=t.attachShadow({mode:"open"}),i=r.ownerDocument,o=i.createElement("style");o.innerHTML=e,r.appendChild(o);var u=i.createElement("span");return u.style.display="inline-block",r.appendChild(u),t.span=u,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(r,n),Object.defineProperty(r,"observedAttributes",{get:function(){return["data-value"]},enumerable:!1,configurable:!0}),r.prototype.attributeChangedCallback=function(t,e,n){if("data-value"===t){if(e===n)return;this.render(n||"")}},r.prototype.render=function(e){t.render(e,this.span,{throwOnError:!1})},r}(HTMLElement);window.customElements.get("w-e-formula-card")||window.customElements.define("w-e-formula-card",vr),n.i18nAddResources("en",{formula:{formula:"Formula",placeholder:"Use LateX syntax",insert:"Insert formula",edit:"Edit formula",ok:"OK"}}),n.i18nAddResources("zh-CN",{formula:{formula:"公式",placeholder:"使用 LateX 语法",insert:"插入公式",edit:"编辑公式",ok:"确定"}});var mr,gr,yr,br,wr,Er,xr,Sr,Or,Ar,Tr,Lr,jr,Mr,Pr,Ir={type:"formula",elemToHtml:function(t,e){var n=t.value;return'<span data-w-e-type="formula" data-w-e-is-void data-w-e-is-inline data-value="'.concat(void 0===n?"":n,'"></span>')}},Cr={};function Nr(){if(br)return yr;br=1;var t=function(){if(gr)return mr;gr=1;var t=$e(),e=et();return mr=function(n){if("Function"===t(n))return e(n)}}(),e=re(),n=tt(),r=t(t.bind);return yr=function(t,i){return e(t),void 0===i?t:n?r(t,i):function(){return t.apply(i,arguments)}},yr}function Dr(){if(Er)return wr;Er=1;var t=$e();return wr=Array.isArray||function(e){return"Array"===t(e)}}function _r(){if(Sr)return xr;Sr=1;var t=Dr(),e=er(),n=Kt(),r=st()("species"),i=Array;return xr=function(o){var u;return t(o)&&(u=o.constructor,(e(u)&&(u===i||t(u.prototype))||n(u)&&null===(u=u[r]))&&(u=void 0)),void 0===u?i:u}}function kr(){if(Ar)return Or;Ar=1;var t=_r();return Or=function(e,n){return new(t(e))(0===n?0:n)}}function Fr(){if(Mr)return jr;Mr=1;var t=st(),e=dr(),n=fe().f,r=t("unscopables"),i=Array.prototype;return void 0===i[r]&&n(i,r,{configurable:!0,value:e(null)}),jr=function(t){i[r][t]=!0}}!function(){if(Pr)return Cr;Pr=1;var t=Qn(),e=function(){if(Lr)return Tr;Lr=1;var t=Nr(),e=et(),n=nn(),r=it(),i=Ln(),o=kr(),u=e([].push),a=function(e){var a=1===e,f=2===e,c=3===e,s=4===e,l=6===e,h=7===e,p=5===e||l;return function(d,v,m,g){for(var y,b,w=r(d),E=n(w),x=i(E),S=t(v,m),O=0,A=g||o,T=a?A(d,x):f||h?A(d,0):void 0;x>O;O++)if((p||O in E)&&(b=S(y=E[O],O,w),e))if(a)T[O]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return O;case 2:u(T,y)}else switch(e){case 4:return!1;case 7:u(T,y)}return l?-1:c||s?s:T}};return Tr={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}().find,n=Fr(),r="find",i=!0;r in[]&&Array(1)[r]((function(){i=!1})),t({target:"Array",proto:!0,forced:i},{find:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),n(r)}();var Rr,Wr,Hr,Vr,qr,Br,zr,$r,Ur,Gr,Kr,Xr,Yr,Jr={};function Qr(){if(Wr)return Rr;Wr=1;var t=Ue(),e=String;return Rr=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function Zr(){if(Vr)return Hr;Vr=1;var t=Qt();return Hr=function(){var e=t(this),n="";return e.hasIndices&&(n+="d"),e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.dotAll&&(n+="s"),e.unicode&&(n+="u"),e.unicodeSets&&(n+="v"),e.sticky&&(n+="y"),n}}function ti(){if(Xr)return Kr;Xr=1;var t,e,n=Zt(),r=et(),i=Qr(),o=Zr(),u=function(){if(Br)return qr;Br=1;var t=Z(),e=l().RegExp,n=t((function(){var t=e("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),r=n||t((function(){return!e("a","y").sticky})),i=n||t((function(){var t=e("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));return qr={BROKEN_CARET:i,MISSED_STICKY:r,UNSUPPORTED_Y:n}}(),a=Q(),f=dr(),c=qe().get,s=function(){if($r)return zr;$r=1;var t=Z(),e=l().RegExp;return zr=t((function(){var t=e(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))}(),h=function(){if(Gr)return Ur;Gr=1;var t=Z(),e=l().RegExp;return Ur=t((function(){var t=e("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))}(),p=a("native-string-replace",String.prototype.replace),d=RegExp.prototype.exec,v=d,m=r("".charAt),g=r("".indexOf),y=r("".replace),b=r("".slice),w=(e=/b*/g,n(d,t=/a/,"a"),n(d,e,"a"),0!==t.lastIndex||0!==e.lastIndex),E=u.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];return(w||x||E||s||h)&&(v=function(t){var e,r,u,a,s,l,h,S=this,O=c(S),A=i(t),T=O.raw;if(T)return T.lastIndex=S.lastIndex,e=n(v,T,A),S.lastIndex=T.lastIndex,e;var L=O.groups,j=E&&S.sticky,M=n(o,S),P=S.source,I=0,C=A;if(j&&(M=y(M,"y",""),-1===g(M,"g")&&(M+="g"),C=b(A,S.lastIndex),S.lastIndex>0&&(!S.multiline||S.multiline&&"\n"!==m(A,S.lastIndex-1))&&(P="(?: "+P+")",C=" "+C,I++),r=new RegExp("^(?:"+P+")",M)),x&&(r=new RegExp("^"+P+"$(?!\\s)",M)),w&&(u=S.lastIndex),a=n(d,j?r:S,C),j?a?(a.input=b(a.input,I),a[0]=b(a[0],I),a.index=S.lastIndex,S.lastIndex+=a[0].length):S.lastIndex=0:w&&a&&(S.lastIndex=S.global?a.index+a[0].length:u),x&&a&&a.length>1&&n(p,a[0],r,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(a[s]=void 0)})),a&&L)for(a.groups=l=f(null),s=0;s<L.length;s++)l[(h=L[s])[0]]=a[h[1]];return a}),Kr=v}!function(){if(Yr)return Jr;Yr=1;var t=Qn(),e=ti();t({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e})}();var ei,ni,ri,ii,oi,ui,ai,fi={};function ci(){return ni?ei:(ni=1,ei="\t\n\v\f\r                 \u2028\u2029\ufeff")}!function(){if(ai)return fi;ai=1;var t=Qn(),e=function(){if(ii)return ri;ii=1;var t=et(),e=rt(),n=Qr(),r=ci(),i=t("".replace),o=RegExp("^["+r+"]+"),u=RegExp("(^|[^"+r+"])["+r+"]+$"),a=function(t){return function(r){var a=n(e(r));return 1&t&&(a=i(a,o,"")),2&t&&(a=i(a,u,"$1")),a}};return ri={start:a(1),end:a(2),trim:a(3)}}().trim,n=function(){if(ui)return oi;ui=1;var t=ke().PROPER,e=Z(),n=ci();return oi=function(r){return e((function(){return!!n[r]()||"​…᠎"!=="​…᠎"[r]()||t&&n[r].name!==r}))}}();t({target:"String",proto:!0,forced:n("trim")},{trim:function(){return e(this)}})}();var si,li,hi={};li||(li=1,function(){if(si)return hi;si=1;var t=Qn(),e=l();t({global:!0,forced:e.globalThis!==e},{globalThis:e})}());var pi,di,vi={},mi={exports:{}};mi.exports;function gi(){return pi||(pi=1,function(t,e){!function(t){function e(t){return null!==t&&"object"==typeof t&&"constructor"in t&&t.constructor===Object}function n(t,r){void 0===t&&(t={}),void 0===r&&(r={}),Object.keys(r).forEach((function(i){void 0===t[i]?t[i]=r[i]:e(r[i])&&e(t[i])&&Object.keys(r[i]).length>0&&n(t[i],r[i])}))}var r={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function i(){var t="undefined"!=typeof document?document:{};return n(t,r),t}var o={document:r,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(t){return"undefined"==typeof setTimeout?(t(),null):setTimeout(t,0)},cancelAnimationFrame:function(t){"undefined"!=typeof setTimeout&&clearTimeout(t)}};function u(){var t="undefined"!=typeof window?window:{};return n(t,o),t}t.extend=n,t.getDocument=i,t.getWindow=u,t.ssrDocument=r,t.ssrWindow=o,Object.defineProperty(t,"__esModule",{value:!0})}(e)}(0,mi.exports)),mi.exports}function yi(){if(di)return vi;di=1,Object.defineProperty(vi,"__esModule",{value:!0});var t=gi();function e(t){return e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(t)}function n(t,e){return n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(t,e)}function r(t,e,i){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return r&&n(o,r.prototype),o},r.apply(null,arguments)}function i(t){var o="function"==typeof Map?new Map:void 0;return i=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==o){if(o.has(t))return o.get(t);o.set(t,u)}function u(){return r(t,arguments,e(this).constructor)}return u.prototype=Object.create(t.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),n(u,t)},i(t)}var o=function(t){var e,n;function r(e){var n,r,i;return n=t.call.apply(t,[this].concat(e))||this,r=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n),i=r.__proto__,Object.defineProperty(r,"__proto__",{get:function(){return i},set:function(t){i.__proto__=t}}),n}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r}(i(Array));function u(t){void 0===t&&(t=[]);var e=[];return t.forEach((function(t){Array.isArray(t)?e.push.apply(e,u(t)):e.push(t)})),e}function a(t,e){return Array.prototype.filter.call(t,e)}function f(e,n){var r=t.getWindow(),i=t.getDocument(),u=[];if(!n&&e instanceof o)return e;if(!e)return new o(u);if("string"==typeof e){var a=e.trim();if(a.indexOf("<")>=0&&a.indexOf(">")>=0){var f="div";0===a.indexOf("<li")&&(f="ul"),0===a.indexOf("<tr")&&(f="tbody"),0!==a.indexOf("<td")&&0!==a.indexOf("<th")||(f="tr"),0===a.indexOf("<tbody")&&(f="table"),0===a.indexOf("<option")&&(f="select");var c=i.createElement(f);c.innerHTML=a;for(var s=0;s<c.childNodes.length;s+=1)u.push(c.childNodes[s])}else u=function(t,e){if("string"!=typeof t)return[t];for(var n=[],r=e.querySelectorAll(t),i=0;i<r.length;i+=1)n.push(r[i]);return n}(e.trim(),n||i)}else if(e.nodeType||e===r||e===i)u.push(e);else if(Array.isArray(e)){if(e instanceof o)return e;u=e}return new o(function(t){for(var e=[],n=0;n<t.length;n+=1)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(u))}f.fn=o.prototype;var c="resize scroll".split(" ");function s(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(void 0===n[0]){for(var i=0;i<this.length;i+=1)c.indexOf(t)<0&&(t in this[i]?this[i][t]():f(this[i]).trigger(t));return this}return this.on.apply(this,[t].concat(n))}}var l=s("click"),h=s("blur"),p=s("focus"),d=s("focusin"),v=s("focusout"),m=s("keyup"),g=s("keydown"),y=s("keypress"),b=s("submit"),w=s("change"),E=s("mousedown"),x=s("mousemove"),S=s("mouseup"),O=s("mouseenter"),A=s("mouseleave"),T=s("mouseout"),L=s("mouseover"),j=s("touchstart"),M=s("touchend"),P=s("touchmove"),I=s("resize"),C=s("scroll");return vi.$=f,vi.add=function(){for(var t,e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(t=0;t<r.length;t+=1){var o=f(r[t]);for(e=0;e<o.length;e+=1)this.push(o[e])}return this},vi.addClass=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=u(e.map((function(t){return t.split(" ")})));return this.forEach((function(t){var e;(e=t.classList).add.apply(e,r)})),this},vi.animate=function(e,n){var r,i=t.getWindow(),o=this,u={props:Object.assign({},e),params:Object.assign({duration:300,easing:"swing"},n),elements:o,animating:!1,que:[],easingProgress:function(t,e){return"swing"===t?.5-Math.cos(e*Math.PI)/2:"function"==typeof t?t(e):e},stop:function(){u.frameId&&i.cancelAnimationFrame(u.frameId),u.animating=!1,u.elements.each((function(t){delete t.dom7AnimateInstance})),u.que=[]},done:function(t){if(u.animating=!1,u.elements.each((function(t){delete t.dom7AnimateInstance})),t&&t(o),u.que.length>0){var e=u.que.shift();u.animate(e[0],e[1])}},animate:function(t,e){if(u.animating)return u.que.push([t,e]),u;var n=[];u.elements.each((function(e,r){var o,a,f,c,s;e.dom7AnimateInstance||(u.elements[r].dom7AnimateInstance=u),n[r]={container:e},Object.keys(t).forEach((function(u){o=i.getComputedStyle(e,null).getPropertyValue(u).replace(",","."),a=parseFloat(o),f=o.replace(a,""),c=parseFloat(t[u]),s=t[u]+f,n[r][u]={initialFullValue:o,initialValue:a,unit:f,finalValue:c,finalFullValue:s,currentValue:a}}))}));var r,a,f=null,c=0,s=0,l=!1;return u.animating=!0,u.frameId=i.requestAnimationFrame((function h(){var p,d;r=(new Date).getTime(),l||(l=!0,e.begin&&e.begin(o)),null===f&&(f=r),e.progress&&e.progress(o,Math.max(Math.min((r-f)/e.duration,1),0),f+e.duration-r<0?0:f+e.duration-r,f),n.forEach((function(i){var o=i;a||o.done||Object.keys(t).forEach((function(i){if(!a&&!o.done){p=Math.max(Math.min((r-f)/e.duration,1),0),d=u.easingProgress(e.easing,p);var l=o[i],h=l.initialValue,v=l.finalValue,m=l.unit;o[i].currentValue=h+d*(v-h);var g=o[i].currentValue;(v>h&&g>=v||v<h&&g<=v)&&(o.container.style[i]=v+m,(s+=1)===Object.keys(t).length&&(o.done=!0,c+=1),c===n.length&&(a=!0)),a?u.done(e.complete):o.container.style[i]=g+m}}))})),a||(u.frameId=i.requestAnimationFrame(h))})),u}};if(0===u.elements.length)return o;for(var a=0;a<u.elements.length;a+=1)u.elements[a].dom7AnimateInstance?r=u.elements[a].dom7AnimateInstance:u.elements[a].dom7AnimateInstance=u;return r||(r=u),"stop"===e?r.stop():r.animate(u.props,u.params),o},vi.animationEnd=function(t){var e=this;return t&&e.on("animationend",(function n(r){r.target===this&&(t.call(this,r),e.off("animationend",n))})),this},vi.append=function(){for(var e,n=t.getDocument(),r=0;r<arguments.length;r+=1){e=r<0||arguments.length<=r?void 0:arguments[r];for(var i=0;i<this.length;i+=1)if("string"==typeof e){var u=n.createElement("div");for(u.innerHTML=e;u.firstChild;)this[i].appendChild(u.firstChild)}else if(e instanceof o)for(var a=0;a<e.length;a+=1)this[i].appendChild(e[a]);else this[i].appendChild(e)}return this},vi.appendTo=function(t){return f(t).append(this),this},vi.attr=function(t,e){if(1===arguments.length&&"string"==typeof t)return this[0]?this[0].getAttribute(t):void 0;for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(t,e);else for(var r in t)this[n][r]=t[r],this[n].setAttribute(r,t[r]);return this},vi.blur=h,vi.change=w,vi.children=function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].children,i=0;i<r.length;i+=1)t&&!f(r[i]).is(t)||e.push(r[i]);return f(e)},vi.click=l,vi.closest=function(t){var e=this;return void 0===t?f([]):(e.is(t)||(e=e.parents(t).eq(0)),e)},vi.css=function(e,n){var r,i=t.getWindow();if(1===arguments.length){if("string"!=typeof e){for(r=0;r<this.length;r+=1)for(var o in e)this[r].style[o]=e[o];return this}if(this[0])return i.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(r=0;r<this.length;r+=1)this[r].style[e]=n;return this}return this},vi.data=function(t,e){var n;if(void 0===e){if(!(n=this[0]))return;if(n.dom7ElementDataStorage&&t in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[t];var r=n.getAttribute("data-"+t);return r||void 0}for(var i=0;i<this.length;i+=1)(n=this[i]).dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[t]=e;return this},vi.dataset=function(){var t=this[0];if(t){var e,n={};if(t.dataset)for(var r in t.dataset)n[r]=t.dataset[r];else for(var i=0;i<t.attributes.length;i+=1){var o=t.attributes[i];o.name.indexOf("data-")>=0&&(n[(e=o.name.split("data-")[1],e.toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})))]=o.value)}for(var u in n)"false"===n[u]?n[u]=!1:"true"===n[u]?n[u]=!0:parseFloat(n[u])===1*n[u]&&(n[u]*=1);return n}},vi.default=f,vi.detach=function(){return this.remove()},vi.each=function(t){return t?(this.forEach((function(e,n){t.apply(e,[e,n])})),this):this},vi.empty=function(){for(var t=0;t<this.length;t+=1){var e=this[t];if(1===e.nodeType){for(var n=0;n<e.childNodes.length;n+=1)e.childNodes[n].parentNode&&e.childNodes[n].parentNode.removeChild(e.childNodes[n]);e.textContent=""}}return this},vi.eq=function(t){if(void 0===t)return this;var e=this.length;if(t>e-1)return f([]);if(t<0){var n=e+t;return f(n<0?[]:[this[n]])}return f([this[t]])},vi.filter=function(t){return f(a(this,t))},vi.find=function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].querySelectorAll(t),i=0;i<r.length;i+=1)e.push(r[i]);return f(e)},vi.focus=p,vi.focusin=d,vi.focusout=v,vi.hasClass=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=u(e.map((function(t){return t.split(" ")})));return a(this,(function(t){return r.filter((function(e){return t.classList.contains(e)})).length>0})).length>0},vi.height=function(){var e=t.getWindow();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null},vi.hide=function(){for(var t=0;t<this.length;t+=1)this[t].style.display="none";return this},vi.html=function(t){if(void 0===t)return this[0]?this[0].innerHTML:null;for(var e=0;e<this.length;e+=1)this[e].innerHTML=t;return this},vi.index=function(){var t,e=this[0];if(e){for(t=0;null!==(e=e.previousSibling);)1===e.nodeType&&(t+=1);return t}},vi.insertAfter=function(t){for(var e=f(t),n=0;n<this.length;n+=1)if(1===e.length)e[0].parentNode.insertBefore(this[n],e[0].nextSibling);else if(e.length>1)for(var r=0;r<e.length;r+=1)e[r].parentNode.insertBefore(this[n].cloneNode(!0),e[r].nextSibling)},vi.insertBefore=function(t){for(var e=f(t),n=0;n<this.length;n+=1)if(1===e.length)e[0].parentNode.insertBefore(this[n],e[0]);else if(e.length>1)for(var r=0;r<e.length;r+=1)e[r].parentNode.insertBefore(this[n].cloneNode(!0),e[r])},vi.is=function(e){var n,r,i=t.getWindow(),u=t.getDocument(),a=this[0];if(!a||void 0===e)return!1;if("string"==typeof e){if(a.matches)return a.matches(e);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(e);if(a.msMatchesSelector)return a.msMatchesSelector(e);for(n=f(e),r=0;r<n.length;r+=1)if(n[r]===a)return!0;return!1}if(e===u)return a===u;if(e===i)return a===i;if(e.nodeType||e instanceof o){for(n=e.nodeType?[e]:e,r=0;r<n.length;r+=1)if(n[r]===a)return!0;return!1}return!1},vi.keydown=g,vi.keypress=y,vi.keyup=m,vi.mousedown=E,vi.mouseenter=O,vi.mouseleave=A,vi.mousemove=x,vi.mouseout=T,vi.mouseover=L,vi.mouseup=S,vi.next=function(t){return this.length>0?t?this[0].nextElementSibling&&f(this[0].nextElementSibling).is(t)?f([this[0].nextElementSibling]):f([]):this[0].nextElementSibling?f([this[0].nextElementSibling]):f([]):f([])},vi.nextAll=function(t){var e=[],n=this[0];if(!n)return f([]);for(;n.nextElementSibling;){var r=n.nextElementSibling;t?f(r).is(t)&&e.push(r):e.push(r),n=r}return f(e)},vi.off=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],u=e[3];"function"==typeof e[1]&&(r=e[0],o=e[1],u=e[2],i=void 0),u||(u=!1);for(var a=r.split(" "),f=0;f<a.length;f+=1)for(var c=a[f],s=0;s<this.length;s+=1){var l=this[s],h=void 0;if(!i&&l.dom7Listeners?h=l.dom7Listeners[c]:i&&l.dom7LiveListeners&&(h=l.dom7LiveListeners[c]),h&&h.length)for(var p=h.length-1;p>=0;p-=1){var d=h[p];o&&d.listener===o||o&&d.listener&&d.listener.dom7proxy&&d.listener.dom7proxy===o?(l.removeEventListener(c,d.proxyListener,u),h.splice(p,1)):o||(l.removeEventListener(c,d.proxyListener,u),h.splice(p,1))}}return this},vi.offset=function(){if(this.length>0){var e=t.getWindow(),n=t.getDocument(),r=this[0],i=r.getBoundingClientRect(),o=n.body,u=r.clientTop||o.clientTop||0,a=r.clientLeft||o.clientLeft||0,f=r===e?e.scrollY:r.scrollTop,c=r===e?e.scrollX:r.scrollLeft;return{top:i.top+f-u,left:i.left+c-a}}return null},vi.on=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],u=e[3];function a(t){var e=t.target;if(e){var n=t.target.dom7EventData||[];if(n.indexOf(t)<0&&n.unshift(t),f(e).is(i))o.apply(e,n);else for(var r=f(e).parents(),u=0;u<r.length;u+=1)f(r[u]).is(i)&&o.apply(r[u],n)}}function c(t){var e=t&&t.target&&t.target.dom7EventData||[];e.indexOf(t)<0&&e.unshift(t),o.apply(this,e)}"function"==typeof e[1]&&(r=e[0],o=e[1],u=e[2],i=void 0),u||(u=!1);for(var s,l=r.split(" "),h=0;h<this.length;h+=1){var p=this[h];if(i)for(s=0;s<l.length;s+=1){var d=l[s];p.dom7LiveListeners||(p.dom7LiveListeners={}),p.dom7LiveListeners[d]||(p.dom7LiveListeners[d]=[]),p.dom7LiveListeners[d].push({listener:o,proxyListener:a}),p.addEventListener(d,a,u)}else for(s=0;s<l.length;s+=1){var v=l[s];p.dom7Listeners||(p.dom7Listeners={}),p.dom7Listeners[v]||(p.dom7Listeners[v]=[]),p.dom7Listeners[v].push({listener:o,proxyListener:c}),p.addEventListener(v,c,u)}}return this},vi.once=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],o=n[1],u=n[2],a=n[3];function f(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];u.apply(this,n),t.off(i,o,f,a),f.dom7proxy&&delete f.dom7proxy}return"function"==typeof n[1]&&(i=n[0],u=n[1],a=n[2],o=void 0),f.dom7proxy=u,t.on(i,o,f,a)},vi.outerHeight=function(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},vi.outerWidth=function(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},vi.parent=function(t){for(var e=[],n=0;n<this.length;n+=1)null!==this[n].parentNode&&(t?f(this[n].parentNode).is(t)&&e.push(this[n].parentNode):e.push(this[n].parentNode));return f(e)},vi.parents=function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].parentNode;r;)t?f(r).is(t)&&e.push(r):e.push(r),r=r.parentNode;return f(e)},vi.prepend=function(e){var n,r,i=t.getDocument();for(n=0;n<this.length;n+=1)if("string"==typeof e){var u=i.createElement("div");for(u.innerHTML=e,r=u.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(u.childNodes[r],this[n].childNodes[0])}else if(e instanceof o)for(r=0;r<e.length;r+=1)this[n].insertBefore(e[r],this[n].childNodes[0]);else this[n].insertBefore(e,this[n].childNodes[0]);return this},vi.prependTo=function(t){return f(t).prepend(this),this},vi.prev=function(t){if(this.length>0){var e=this[0];return t?e.previousElementSibling&&f(e.previousElementSibling).is(t)?f([e.previousElementSibling]):f([]):e.previousElementSibling?f([e.previousElementSibling]):f([])}return f([])},vi.prevAll=function(t){var e=[],n=this[0];if(!n)return f([]);for(;n.previousElementSibling;){var r=n.previousElementSibling;t?f(r).is(t)&&e.push(r):e.push(r),n=r}return f(e)},vi.prop=function(t,e){if(1!==arguments.length||"string"!=typeof t){for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n][t]=e;else for(var r in t)this[n][r]=t[r];return this}return this[0]?this[0][t]:this},vi.remove=function(){for(var t=0;t<this.length;t+=1)this[t].parentNode&&this[t].parentNode.removeChild(this[t]);return this},vi.removeAttr=function(t){for(var e=0;e<this.length;e+=1)this[e].removeAttribute(t);return this},vi.removeClass=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=u(e.map((function(t){return t.split(" ")})));return this.forEach((function(t){var e;(e=t.classList).remove.apply(e,r)})),this},vi.removeData=function(t){for(var e=0;e<this.length;e+=1){var n=this[e];n.dom7ElementDataStorage&&n.dom7ElementDataStorage[t]&&(n.dom7ElementDataStorage[t]=null,delete n.dom7ElementDataStorage[t])}},vi.resize=I,vi.scroll=C,vi.scrollLeft=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],u=e[3];3===e.length&&"function"==typeof o&&(r=e[0],i=e[1],u=e[2],o=e[3]);var a=this;return void 0===r?a.length>0?a[0].scrollLeft:null:a.scrollTo(r,void 0,i,o,u)},vi.scrollTo=function(){for(var e=t.getWindow(),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r[0],u=r[1],a=r[2],f=r[3],c=r[4];return 4===r.length&&"function"==typeof f&&(c=f,o=r[0],u=r[1],a=r[2],c=r[3],f=r[4]),void 0===f&&(f="swing"),this.each((function(){var t,n,r,i,s,l,h,p,d=this,v=u>0||0===u,m=o>0||0===o;if(void 0===f&&(f="swing"),v&&(t=d.scrollTop,a||(d.scrollTop=u)),m&&(n=d.scrollLeft,a||(d.scrollLeft=o)),a){v&&(r=d.scrollHeight-d.offsetHeight,s=Math.max(Math.min(u,r),0)),m&&(i=d.scrollWidth-d.offsetWidth,l=Math.max(Math.min(o,i),0));var g=null;v&&s===t&&(v=!1),m&&l===n&&(m=!1),e.requestAnimationFrame((function r(i){void 0===i&&(i=(new Date).getTime()),null===g&&(g=i);var o,u=Math.max(Math.min((i-g)/a,1),0),y="linear"===f?u:.5-Math.cos(u*Math.PI)/2;v&&(h=t+y*(s-t)),m&&(p=n+y*(l-n)),v&&s>t&&h>=s&&(d.scrollTop=s,o=!0),v&&s<t&&h<=s&&(d.scrollTop=s,o=!0),m&&l>n&&p>=l&&(d.scrollLeft=l,o=!0),m&&l<n&&p<=l&&(d.scrollLeft=l,o=!0),o?c&&c():(v&&(d.scrollTop=h),m&&(d.scrollLeft=p),e.requestAnimationFrame(r))}))}}))},vi.scrollTop=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],u=e[3];3===e.length&&"function"==typeof o&&(r=e[0],i=e[1],u=e[2],o=e[3]);var a=this;return void 0===r?a.length>0?a[0].scrollTop:null:a.scrollTo(void 0,r,i,o,u)},vi.show=function(){for(var e=t.getWindow(),n=0;n<this.length;n+=1){var r=this[n];"none"===r.style.display&&(r.style.display=""),"none"===e.getComputedStyle(r,null).getPropertyValue("display")&&(r.style.display="block")}return this},vi.siblings=function(t){return this.nextAll(t).add(this.prevAll(t))},vi.stop=function(){for(var t=this,e=0;e<t.length;e+=1)t[e].dom7AnimateInstance&&t[e].dom7AnimateInstance.stop()},vi.styles=function(){var e=t.getWindow();return this[0]?e.getComputedStyle(this[0],null):{}},vi.submit=b,vi.text=function(t){if(void 0===t)return this[0]?this[0].textContent.trim():null;for(var e=0;e<this.length;e+=1)this[e].textContent=t;return this},vi.toggleClass=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=u(e.map((function(t){return t.split(" ")})));this.forEach((function(t){r.forEach((function(e){t.classList.toggle(e)}))}))},vi.touchend=M,vi.touchmove=P,vi.touchstart=j,vi.transform=function(t){for(var e=0;e<this.length;e+=1)this[e].style.transform=t;return this},vi.transition=function(t){for(var e=0;e<this.length;e+=1)this[e].style.transitionDuration="string"!=typeof t?t+"ms":t;return this},vi.transitionEnd=function(t){var e=this;return t&&e.on("transitionend",(function n(r){r.target===this&&(t.call(this,r),e.off("transitionend",n))})),this},vi.trigger=function(){for(var e=t.getWindow(),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=r[0].split(" "),u=r[1],a=0;a<o.length;a+=1)for(var f=o[a],c=0;c<this.length;c+=1){var s=this[c];if(e.CustomEvent){var l=new e.CustomEvent(f,{detail:u,bubbles:!0,cancelable:!0});s.dom7EventData=r.filter((function(t,e){return e>0})),s.dispatchEvent(l),s.dom7EventData=[],delete s.dom7EventData}}return this},vi.val=function(t){if(void 0===t){var e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){for(var n=[],r=0;r<e.selectedOptions.length;r+=1)n.push(e.selectedOptions[r].value);return n}return e.value}for(var i=0;i<this.length;i+=1){var o=this[i];if(Array.isArray(t)&&o.multiple&&"select"===o.nodeName.toLowerCase())for(var u=0;u<o.options.length;u+=1)o.options[u].selected=t.indexOf(o.options[u].value)>=0;else o.value=t}return this},vi.value=function(t){return this.val(t)},vi.width=function(){var e=t.getWindow();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null},vi}var bi=yi(),wi=a(bi);bi.append&&(wi.fn.append=bi.append),bi.html&&(wi.fn.html=bi.html),bi.val&&(wi.fn.val=bi.val),bi.on&&(wi.fn.on=bi.on),bi.focus&&(wi.fn.focus=bi.focus),bi.is&&(wi.fn.is=bi.is),bi.parents&&(wi.fn.parents=bi.parents),bi.find&&(wi.fn.find=bi.find);var Ei,xi,Si,Oi,Ai,Ti,Li,ji={};function Mi(){if(xi)return Ei;xi=1;var t=TypeError;return Ei=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}}function Pi(){if(Oi)return Si;Oi=1;var t=Gt(),e=fe(),n=Re();return Si=function(r,i,o){t?e.f(r,i,n(0,o)):r[i]=o}}function Ii(){if(Ti)return Ai;Ti=1;var t=Z(),e=st(),n=at(),r=e("species");return Ai=function(e){return n>=51||!t((function(){var t=[];return(t.constructor={})[r]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}}!function(){if(Li)return ji;Li=1;var t=Qn(),e=Z(),n=Dr(),r=Kt(),i=it(),o=Ln(),u=Mi(),a=Pi(),f=kr(),c=Ii(),s=st(),l=at(),h=s("isConcatSpreadable"),p=l>=51||!e((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),d=function(t){if(!r(t))return!1;var e=t[h];return void 0!==e?!!e:n(t)};t({target:"Array",proto:!0,arity:1,forced:!p||!c("concat")},{concat:function(t){var e,n,r,c,s,l=i(this),h=f(l,0),p=0;for(e=-1,r=arguments.length;e<r;e++)if(d(s=-1===e?l:arguments[e]))for(c=o(s),u(p+c),n=0;n<c;n++,p++)n in s&&a(h,p,s[n]);else u(p+1),a(h,p++,s);return h.length=p,h}})}();let Ci=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e>62?"-":"_"),"");function Ni(t){return"".concat(t,"-").concat(Ci())}function Di(){return Ni("w-e-insert-formula")}var _i=function(){function t(){this.title=n.t("formula.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textareaId=Di(),this.buttonId=Di()}return t.prototype.getSelectedElem=function(t){var e=n.DomEditor.getSelectedNodeByType(t,"formula");return null==e?null:e},t.prototype.getValue=function(t){var e=this.getSelectedElem(t);return e&&e.value||""},t.prototype.isActive=function(t){return!1},t.prototype.exec=function(t,e){},t.prototype.isDisabled=function(t){var e=t.selection;return null==e||(!!n.SlateRange.isExpanded(e)||null==this.getSelectedElem(t))},t.prototype.getModalPositionNode=function(t){return this.getSelectedElem(t)},t.prototype.getModalContentElem=function(t){var e=this,r=this.textareaId,i=this.buttonId,u=o(n.genModalTextareaElems(n.t("formula.formula"),r,n.t("formula.placeholder")),2),a=u[0],f=u[1],c=wi(f),s=o(n.genModalButtonElems(i,n.t("formula.ok")),1)[0];if(null==this.$content){var l=wi("<div></div>");l.on("click","#".concat(i),(function(n){n.preventDefault();var i=l.find("#".concat(r)).val().trim();e.updateFormula(t,i),t.hidePanelOrModal()})),this.$content=l}var h=this.$content;h.html(""),h.append(a),h.append(s);var p=this.getValue(t);return c.val(p),setTimeout((function(){c.focus()})),h[0]},t.prototype.updateFormula=function(t,e){if(e&&(t.restoreSelection(),!this.isDisabled(t))){var r=this.getSelectedElem(t);if(null!=r){var i=n.DomEditor.findPath(t,r),o={value:e};n.SlateTransforms.setNodes(t,o,{at:i})}}},t}();function ki(){return Ni("w-e-insert-formula")}var Fi=function(){function t(){this.title=n.t("formula.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M941.6 734.72L985.984 640H1024l-64 384H0v-74.24l331.552-391.2L0 227.008V0h980L1024 256h-34.368l-18.72-38.88C935.584 143.744 909.024 128 832 128H169.984l353.056 353.056L225.632 832H768c116 0 146.656-41.568 173.6-97.28z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textareaId=ki(),this.buttonId=ki()}return t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){return!1},t.prototype.exec=function(t,e){},t.prototype.isDisabled=function(t){var e=t.selection;if(null==e)return!0;if(n.SlateRange.isExpanded(e))return!0;var r=n.DomEditor.getSelectedElems(t);return!!r.some((function(e){return t.isVoid(e)}))||!!r.some((function(t){return"pre"===n.DomEditor.getNodeType(t)}))},t.prototype.getModalPositionNode=function(t){return null},t.prototype.getModalContentElem=function(t){var e=this,r=this.textareaId,i=this.buttonId,u=o(n.genModalTextareaElems(n.t("formula.formula"),r,n.t("formula.placeholder")),2),a=u[0],f=u[1],c=wi(f),s=o(n.genModalButtonElems(i,n.t("formula.ok")),1)[0];if(null==this.$content){var l=wi("<div></div>");l.on("click","#".concat(i),(function(n){n.preventDefault();var i=l.find("#".concat(r)).val().trim();e.insertFormula(t,i),t.hidePanelOrModal()})),this.$content=l}var h=this.$content;return h.html(""),h.append(a),h.append(s),c.val(""),setTimeout((function(){c.focus()})),h[0]},t.prototype.insertFormula=function(t,e){if(e&&(t.restoreSelection(),!this.isDisabled(t))){var n={type:"formula",value:e,children:[{text:""}]};t.insertNode(n)}},t}();return{editorPlugin:function(t){var e=t.isInline,r=t.isVoid,i=t;return i.isInline=function(t){return"formula"===n.DomEditor.getNodeType(t)||e(t)},i.isVoid=function(t){return"formula"===n.DomEditor.getNodeType(t)||r(t)},i},renderElems:[{type:"formula",renderElem:function(t,e,i){var o=n.DomEditor.isNodeSelected(i,t),u=t.value,a=void 0===u?"":u,f=r.h("w-e-formula-card",{dataset:{value:a}},null);return r.h("div",{props:{contentEditable:!1},style:{display:"inline-block",marginLeft:"3px",marginRight:"3px",border:o?"2px solid var(--w-e-textarea-selected-border-color)":"2px solid transparent",borderRadius:"3px",padding:"3px 3px"}},[f])}}],elemsToHtml:[Ir],parseElemsHtml:[{selector:'span[data-w-e-type="formula"]',parseElemHtml:function(t,e,n){return{type:"formula",value:t.getAttribute("data-value")||"",children:[{text:""}]}}}],menus:[{key:"insertFormula",factory:function(){return new Fi}},{key:"editFormula",factory:function(){return new _i}}]}}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("katex"),require("@wangeditor-next/editor"),require("snabbdom")):"function"==typeof define&&define.amd?define(["katex","@wangeditor-next/editor","snabbdom"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorFormulaPlugin=e(t.katex,t.editor,t.snabbdom)}(this,(function(t,e,n){"use strict";var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)};function i(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}"function"==typeof SuppressedError&&SuppressedError;var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var a,f,c={};function s(){if(f)return a;f=1;var t=function(t){return t&&t.Math===Math&&t};return a=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof o&&o)||t("object"==typeof a&&a)||function(){return this}()||Function("return this")()}var l,h,p,d,v,m,g,y,b,w,E,x,S,O,A,T,L,j,M,P,I,C,N,D,_,k,F,R,W,V,H,q,B,z,$,U,G,X={exports:{}};function K(){if(d)return p;d=1;var t=s(),e=Object.defineProperty;return p=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function Y(){if(v)return X.exports;v=1;var t=h?l:(h=1,l=!1),e=s(),n=K(),r="__core-js_shared__",i=X.exports=e[r]||n(r,{});return(i.versions||(i.versions=[])).push({version:"3.38.1",mode:t?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"}),X.exports}function J(){if(g)return m;g=1;var t=Y();return m=function(e,n){return t[e]||(t[e]=n||{})}}function Q(){return b?y:(b=1,y=function(t){try{return!!t()}catch(t){return!0}})}function Z(){if(E)return w;E=1;var t=Q();return w=!t((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function tt(){if(S)return x;S=1;var t=Z(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return x=t?r:function(t){return function(){return n.apply(t,arguments)}},x}function et(){return A?O:(A=1,O=function(t){return null==t})}function nt(){if(L)return T;L=1;var t=et(),e=TypeError;return T=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function rt(){if(M)return j;M=1;var t=nt(),e=Object;return j=function(n){return e(t(n))}}function it(){if(I)return P;I=1;var t=tt(),e=rt(),n=t({}.hasOwnProperty);return P=Object.hasOwn||function(t,r){return n(e(t),r)}}function ot(){if(N)return C;N=1;var t=tt(),e=0,n=Math.random(),r=t(1..toString);return C=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function ut(){if(F)return k;F=1;var t,e,n=s(),r=function(){if(_)return D;_=1;var t=s().navigator,e=t&&t.userAgent;return D=e?String(e):""}(),i=n.process,o=n.Deno,u=i&&i.versions||o&&o.version,a=u&&u.v8;return a&&(e=(t=a.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&r&&(!(t=r.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=r.match(/Chrome\/(\d+)/))&&(e=+t[1]),k=e}function at(){if(W)return R;W=1;var t=ut(),e=Q(),n=s().String;return R=!!Object.getOwnPropertySymbols&&!e((function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41}))}function ft(){if(H)return V;H=1;var t=at();return V=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function ct(){if(B)return q;B=1;var t=s(),e=J(),n=it(),r=ot(),i=at(),o=ft(),u=t.Symbol,a=e("wks"),f=o?u.for||u:u&&u.withoutSetter||r;return q=function(t){return n(a,t)||(a[t]=i&&n(u,t)?u[t]:f("Symbol."+t)),a[t]}}function st(){if($)return z;$=1;var t={};return t[ct()("toStringTag")]="z",z="[object z]"===String(t)}function lt(){if(G)return U;G=1;var t="object"==typeof document&&document.all;return U=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}var ht,pt,dt,vt,mt,gt,yt,bt,wt,Et,xt,St,Ot,At,Tt,Lt,jt,Mt,Pt,It,Ct,Nt,Dt,_t,kt,Ft,Rt,Wt,Vt,Ht,qt,Bt,zt,$t={};function Ut(){if(pt)return ht;pt=1;var t=Q();return ht=!t((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Gt(){if(vt)return dt;vt=1;var t=lt();return dt=function(e){return"object"==typeof e?null!==e:t(e)}}function Xt(){if(gt)return mt;gt=1;var t=s(),e=Gt(),n=t.document,r=e(n)&&e(n.createElement);return mt=function(t){return r?n.createElement(t):{}}}function Kt(){if(bt)return yt;bt=1;var t=Ut(),e=Q(),n=Xt();return yt=!t&&!e((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function Yt(){if(Et)return wt;Et=1;var t=Ut(),e=Q();return wt=t&&e((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function Jt(){if(St)return xt;St=1;var t=Gt(),e=String,n=TypeError;return xt=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function Qt(){if(At)return Ot;At=1;var t=Z(),e=Function.prototype.call;return Ot=t?e.bind(e):function(){return e.apply(e,arguments)},Ot}function Zt(){if(Lt)return Tt;Lt=1;var t=s(),e=lt();return Tt=function(n,r){return arguments.length<2?(i=t[n],e(i)?i:void 0):t[n]&&t[n][r];var i},Tt}function te(){if(It)return Pt;It=1;var t=Zt(),e=lt(),n=function(){if(Mt)return jt;Mt=1;var t=tt();return jt=t({}.isPrototypeOf)}(),r=ft(),i=Object;return Pt=r?function(t){return"symbol"==typeof t}:function(r){var o=t("Symbol");return e(o)&&n(o.prototype,i(r))}}function ee(){if(Nt)return Ct;Nt=1;var t=String;return Ct=function(e){try{return t(e)}catch(t){return"Object"}}}function ne(){if(_t)return Dt;_t=1;var t=lt(),e=ee(),n=TypeError;return Dt=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function re(){if(Ft)return kt;Ft=1;var t=ne(),e=et();return kt=function(n,r){var i=n[r];return e(i)?void 0:t(i)}}function ie(){if(Wt)return Rt;Wt=1;var t=Qt(),e=lt(),n=Gt(),r=TypeError;return Rt=function(i,o){var u,a;if("string"===o&&e(u=i.toString)&&!n(a=t(u,i)))return a;if(e(u=i.valueOf)&&!n(a=t(u,i)))return a;if("string"!==o&&e(u=i.toString)&&!n(a=t(u,i)))return a;throw new r("Can't convert object to primitive value")}}function oe(){if(Ht)return Vt;Ht=1;var t=Qt(),e=Gt(),n=te(),r=re(),i=ie(),o=ct(),u=TypeError,a=o("toPrimitive");return Vt=function(o,f){if(!e(o)||n(o))return o;var c,s=r(o,a);if(s){if(void 0===f&&(f="default"),c=t(s,o,f),!e(c)||n(c))return c;throw new u("Can't convert object to primitive value")}return void 0===f&&(f="number"),i(o,f)}}function ue(){if(Bt)return qt;Bt=1;var t=oe(),e=te();return qt=function(n){var r=t(n,"string");return e(r)?r:r+""}}function ae(){if(zt)return $t;zt=1;var t=Ut(),e=Kt(),n=Yt(),r=Jt(),i=ue(),o=TypeError,u=Object.defineProperty,a=Object.getOwnPropertyDescriptor,f="enumerable",c="configurable",s="writable";return $t.f=t?n?function(t,e,n){if(r(t),e=i(e),r(n),"function"==typeof t&&"prototype"===e&&"value"in n&&s in n&&!n[s]){var o=a(t,e);o&&o[s]&&(t[e]=n.value,n={configurable:c in n?n[c]:o[c],enumerable:f in n?n[f]:o[f],writable:!1})}return u(t,e,n)}:u:function(t,n,a){if(r(t),n=i(n),r(a),e)try{return u(t,n,a)}catch(t){}if("get"in a||"set"in a)throw new o("Accessors not supported");return"value"in a&&(t[n]=a.value),t},$t}var fe,ce,se,le,he,pe,de,ve,me,ge,ye,be,we,Ee,xe,Se,Oe,Ae,Te,Le,je,Me,Pe,Ie,Ce,Ne,De={exports:{}};function _e(){if(ce)return fe;ce=1;var t=Ut(),e=it(),n=Function.prototype,r=t&&Object.getOwnPropertyDescriptor,i=e(n,"name"),o=i&&"something"===function(){}.name,u=i&&(!t||t&&r(n,"name").configurable);return fe={EXISTS:i,PROPER:o,CONFIGURABLE:u}}function ke(){if(le)return se;le=1;var t=tt(),e=lt(),n=Y(),r=t(Function.toString);return e(n.inspectSource)||(n.inspectSource=function(t){return r(t)}),se=n.inspectSource}function Fe(){return ve?de:(ve=1,de=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function Re(){if(ge)return me;ge=1;var t=Ut(),e=ae(),n=Fe();return me=t?function(t,r,i){return e.f(t,r,n(1,i))}:function(t,e,n){return t[e]=n,t}}function We(){if(be)return ye;be=1;var t=J(),e=ot(),n=t("keys");return ye=function(t){return n[t]||(n[t]=e(t))}}function Ve(){return Ee?we:(Ee=1,we={})}function He(){if(Se)return xe;Se=1;var t,e,n,r=function(){if(pe)return he;pe=1;var t=s(),e=lt(),n=t.WeakMap;return he=e(n)&&/native code/.test(String(n))}(),i=s(),o=Gt(),u=Re(),a=it(),f=Y(),c=We(),l=Ve(),h="Object already initialized",p=i.TypeError,d=i.WeakMap;if(r||f.state){var v=f.state||(f.state=new d);v.get=v.get,v.has=v.has,v.set=v.set,t=function(t,e){if(v.has(t))throw new p(h);return e.facade=t,v.set(t,e),e},e=function(t){return v.get(t)||{}},n=function(t){return v.has(t)}}else{var m=c("state");l[m]=!0,t=function(t,e){if(a(t,m))throw new p(h);return e.facade=t,u(t,m,e),e},e=function(t){return a(t,m)?t[m]:{}},n=function(t){return a(t,m)}}return xe={set:t,get:e,has:n,enforce:function(r){return n(r)?e(r):t(r,{})},getterFor:function(t){return function(n){var r;if(!o(n)||(r=e(n)).type!==t)throw new p("Incompatible receiver, "+t+" required");return r}}}}function qe(){if(Oe)return De.exports;Oe=1;var t=tt(),e=Q(),n=lt(),r=it(),i=Ut(),o=_e().CONFIGURABLE,u=ke(),a=He(),f=a.enforce,c=a.get,s=String,l=Object.defineProperty,h=t("".slice),p=t("".replace),d=t([].join),v=i&&!e((function(){return 8!==l((function(){}),"length",{value:8}).length})),m=String(String).split("String"),g=De.exports=function(t,e,n){"Symbol("===h(s(e),0,7)&&(e="["+p(s(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!r(t,"name")||o&&t.name!==e)&&(i?l(t,"name",{value:e,configurable:!0}):t.name=e),v&&n&&r(n,"arity")&&t.length!==n.arity&&l(t,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?i&&l(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var u=f(t);return r(u,"source")||(u.source=d(m,"string"==typeof e?e:"")),t};return Function.prototype.toString=g((function(){return n(this)&&c(this).source||u(this)}),"toString"),De.exports}function Be(){if(Te)return Ae;Te=1;var t=lt(),e=ae(),n=qe(),r=K();return Ae=function(i,o,u,a){a||(a={});var f=a.enumerable,c=void 0!==a.name?a.name:o;if(t(u)&&n(u,c,a),a.global)f?i[o]=u:r(o,u);else{try{a.unsafe?i[o]&&(f=!0):delete i[o]}catch(t){}f?i[o]=u:e.f(i,o,{value:u,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return i}}function ze(){if(je)return Le;je=1;var t=tt(),e=t({}.toString),n=t("".slice);return Le=function(t){return n(e(t),8,-1)}}function $e(){if(Pe)return Me;Pe=1;var t=st(),e=lt(),n=ze(),r=ct()("toStringTag"),i=Object,o="Arguments"===n(function(){return arguments}());return Me=t?n:function(t){var u,a,f;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,e){try{return t[e]}catch(t){}}(u=i(t),r))?a:o?n(u):"Object"===(f=n(u))&&e(u.callee)?"Arguments":f}}!function(){if(Ne)return c;Ne=1;var t=st(),e=Be(),n=function(){if(Ce)return Ie;Ce=1;var t=st(),e=$e();return Ie=t?{}.toString:function(){return"[object "+e(this)+"]"}}();t||e(Object.prototype,"toString",n,{unsafe:!0})}();var Ue,Ge,Xe,Ke,Ye,Je,Qe={},Ze={},tn={};function en(){if(Xe)return Ge;Xe=1;var t=tt(),e=Q(),n=ze(),r=Object,i=t("".split);return Ge=e((function(){return!r("z").propertyIsEnumerable(0)}))?function(t){return"String"===n(t)?i(t,""):r(t)}:r}function nn(){if(Ye)return Ke;Ye=1;var t=en(),e=nt();return Ke=function(n){return t(e(n))}}function rn(){if(Je)return Ze;Je=1;var t=Ut(),e=Qt(),n=function(){if(Ue)return tn;Ue=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return tn.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,tn}(),r=Fe(),i=nn(),o=ue(),u=it(),a=Kt(),f=Object.getOwnPropertyDescriptor;return Ze.f=t?f:function(t,c){if(t=i(t),c=o(c),a)try{return f(t,c)}catch(t){}if(u(t,c))return r(!e(n.f,t,c),t[c])},Ze}var on,un,an,fn,cn,sn,ln,hn,pn,dn,vn,mn,gn,yn,bn,wn,En,xn={};function Sn(){if(fn)return an;fn=1;var t=function(){if(un)return on;un=1;var t=Math.ceil,e=Math.floor;return on=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)}}();return an=function(e){var n=+e;return n!=n||0===n?0:t(n)}}function On(){if(sn)return cn;sn=1;var t=Sn(),e=Math.max,n=Math.min;return cn=function(r,i){var o=t(r);return o<0?e(o+i,0):n(o,i)}}function An(){if(hn)return ln;hn=1;var t=Sn(),e=Math.min;return ln=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function Tn(){if(dn)return pn;dn=1;var t=An();return pn=function(e){return t(e.length)}}function Ln(){if(yn)return gn;yn=1;var t=tt(),e=it(),n=nn(),r=function(){if(mn)return vn;mn=1;var t=nn(),e=On(),n=Tn(),r=function(r){return function(i,o,u){var a=t(i),f=n(a);if(0===f)return!r&&-1;var c,s=e(u,f);if(r&&o!=o){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((r||s in a)&&a[s]===o)return r||s||0;return!r&&-1}};return vn={includes:r(!0),indexOf:r(!1)}}().indexOf,i=Ve(),o=t([].push);return gn=function(t,u){var a,f=n(t),c=0,s=[];for(a in f)!e(i,a)&&e(f,a)&&o(s,a);for(;u.length>c;)e(f,a=u[c++])&&(~r(s,a)||o(s,a));return s}}function jn(){return wn?bn:(wn=1,bn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}var Mn,Pn,In,Cn,Nn,Dn,_n,kn,Fn,Rn,Wn,Vn,Hn,qn,Bn,zn,$n,Un,Gn,Xn={};function Kn(){if(In)return Pn;In=1;var t=Zt(),e=tt(),n=function(){if(En)return xn;En=1;var t=Ln(),e=jn().concat("length","prototype");return xn.f=Object.getOwnPropertyNames||function(n){return t(n,e)},xn}(),r=(Mn||(Mn=1,Xn.f=Object.getOwnPropertySymbols),Xn),i=Jt(),o=e([].concat);return Pn=t("Reflect","ownKeys")||function(t){var e=n.f(i(t)),u=r.f;return u?o(e,u(t)):e}}function Yn(){if(Nn)return Cn;Nn=1;var t=it(),e=Kn(),n=rn(),r=ae();return Cn=function(i,o,u){for(var a=e(o),f=r.f,c=n.f,s=0;s<a.length;s++){var l=a[s];t(i,l)||u&&t(u,l)||f(i,l,c(o,l))}}}function Jn(){if(Fn)return kn;Fn=1;var t=s(),e=rn().f,n=Re(),r=Be(),i=K(),o=Yn(),u=function(){if(_n)return Dn;_n=1;var t=Q(),e=lt(),n=/#|\.prototype\./,r=function(n,r){var f=o[i(n)];return f===a||f!==u&&(e(r)?t(r):!!r)},i=r.normalize=function(t){return String(t).replace(n,".").toLowerCase()},o=r.data={},u=r.NATIVE="N",a=r.POLYFILL="P";return Dn=r}();return kn=function(a,f){var c,s,l,h,p,d=a.target,v=a.global,m=a.stat;if(c=v?t:m?t[d]||i(d,{}):t[d]&&t[d].prototype)for(s in f){if(h=f[s],l=a.dontCallGetSet?(p=e(c,s))&&p.value:c[s],!u(v?s:d+(m?".":"#")+s,a.forced)&&void 0!==l){if(typeof h==typeof l)continue;o(h,l)}(a.sham||l&&l.sham)&&n(h,"sham",!0),r(c,s,h,a)}}}function Qn(){if(Hn)return Vn;Hn=1;var t=tt();return Vn=t([].slice)}function Zn(){if(Bn)return qn;Bn=1;var t=tt(),e=ne(),n=Gt(),r=it(),i=Qn(),o=Z(),u=Function,a=t([].concat),f=t([].join),c={};return qn=o?u.bind:function(t){var o=e(this),s=o.prototype,l=i(arguments,1),h=function(){var e=a(l,i(arguments));return this instanceof h?function(t,e,n){if(!r(c,e)){for(var i=[],o=0;o<e;o++)i[o]="a["+o+"]";c[e]=u("C,a","return new C("+f(i,",")+")")}return c[e](t,n)}(o,e.length,e):o.apply(t,e)};return n(s)&&(h.prototype=s),h},qn}function tr(){if($n)return zn;$n=1;var t=tt(),e=Q(),n=lt(),r=$e(),i=Zt(),o=ke(),u=function(){},a=i("Reflect","construct"),f=/^\s*(?:class|function)\b/,c=t(f.exec),s=!f.test(u),l=function(t){if(!n(t))return!1;try{return a(u,[],t),!0}catch(t){return!1}},h=function(t){if(!n(t))return!1;switch(r(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return s||!!c(f,o(t))}catch(t){return!0}};return h.sham=!0,zn=!a||e((function(){var t;return l(l.call)||!l(Object)||!l((function(){t=!0}))||t}))?h:l}function er(){if(Gn)return Un;Gn=1;var t=tr(),e=ee(),n=TypeError;return Un=function(r){if(t(r))return r;throw new n(e(r)+" is not a constructor")}}var nr,rr,ir,or,ur,ar,fr,cr,sr={};function lr(){if(rr)return nr;rr=1;var t=Ln(),e=jn();return nr=Object.keys||function(n){return t(n,e)}}function hr(){if(ur)return or;ur=1;var t=Zt();return or=t("document","documentElement")}function pr(){if(fr)return ar;fr=1;var t,e=Jt(),n=function(){if(ir)return sr;ir=1;var t=Ut(),e=Yt(),n=ae(),r=Jt(),i=nn(),o=lr();return sr.f=t&&!e?Object.defineProperties:function(t,e){r(t);for(var u,a=i(e),f=o(e),c=f.length,s=0;c>s;)n.f(t,u=f[s++],a[u]);return t},sr}(),r=jn(),i=Ve(),o=hr(),u=Xt(),a=We(),f="prototype",c="script",s=a("IE_PROTO"),l=function(){},h=function(t){return"<"+c+">"+t+"</"+c+">"},p=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},d=function(){try{t=new ActiveXObject("htmlfile")}catch(t){}var e,n,i;d="undefined"!=typeof document?document.domain&&t?p(t):(n=u("iframe"),i="java"+c+":",n.style.display="none",o.appendChild(n),n.src=String(i),(e=n.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):p(t);for(var a=r.length;a--;)delete d[f][r[a]];return d()};return i[s]=!0,ar=Object.create||function(t,r){var i;return null!==t?(l[f]=e(t),i=new l,l[f]=null,i[s]=t):i=d(),void 0===r?i:n.f(i,r)}}!function(){if(cr)return Qe;cr=1;var t=Jn(),e=Zt(),n=function(){if(Wn)return Rn;Wn=1;var t=Z(),e=Function.prototype,n=e.apply,r=e.call;return Rn="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),Rn}(),r=Zn(),i=er(),o=Jt(),u=Gt(),a=pr(),f=Q(),c=e("Reflect","construct"),s=Object.prototype,l=[].push,h=f((function(){function t(){}return!(c((function(){}),[],t)instanceof t)})),p=!f((function(){c((function(){}))})),d=h||p;t({target:"Reflect",stat:!0,forced:d,sham:d},{construct:function(t,e){i(t),o(e);var f=arguments.length<3?t:i(arguments[2]);if(p&&!h)return c(t,e,f);if(t===f){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var d=[null];return n(l,d,e),new(n(r,t,d))}var v=f.prototype,m=a(u(v)?v:s),g=n(t,m,e);return u(g)?g:m}})}(),function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.polyfillWrapFlushCallback){var t=HTMLElement,e=function(){return Reflect.construct(t,[],this.constructor)};window.HTMLElement=e,HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}}();var dr=function(e){function n(){var t=e.call(this)||this,n=t.attachShadow({mode:"open"}),r=n.ownerDocument,i=r.createElement("link");i.rel="stylesheet",i.href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css",i.integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV",i.crossOrigin="anonymous",n.appendChild(i);var o=r.createElement("span");return o.style.display="inline-block",n.appendChild(o),t.span=o,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(n,e),Object.defineProperty(n,"observedAttributes",{get:function(){return["data-value"]},enumerable:!1,configurable:!0}),n.prototype.attributeChangedCallback=function(t,e,n){if("data-value"===t){if(e===n)return;this.render(n||"")}},n.prototype.render=function(e){t.render(e,this.span,{throwOnError:!1})},n}(HTMLElement);window.customElements.get("w-e-formula-card")||window.customElements.define("w-e-formula-card",dr),e.i18nAddResources("en",{formula:{formula:"Formula",placeholder:"Use LateX syntax",insert:"Insert formula",edit:"Edit formula",ok:"OK"}}),e.i18nAddResources("zh-CN",{formula:{formula:"公式",placeholder:"使用 LateX 语法",insert:"插入公式",edit:"编辑公式",ok:"确定"}});var vr,mr,gr,yr,br,wr,Er,xr,Sr,Or,Ar,Tr,Lr,jr,Mr,Pr={type:"formula",elemToHtml:function(t,e){var n=t.value;return'<span data-w-e-type="formula" data-w-e-is-void data-w-e-is-inline data-value="'.concat(void 0===n?"":n,'"></span>')}},Ir={};function Cr(){if(yr)return gr;yr=1;var t=function(){if(mr)return vr;mr=1;var t=ze(),e=tt();return vr=function(n){if("Function"===t(n))return e(n)}}(),e=ne(),n=Z(),r=t(t.bind);return gr=function(t,i){return e(t),void 0===i?t:n?r(t,i):function(){return t.apply(i,arguments)}},gr}function Nr(){if(wr)return br;wr=1;var t=ze();return br=Array.isArray||function(e){return"Array"===t(e)}}function Dr(){if(xr)return Er;xr=1;var t=Nr(),e=tr(),n=Gt(),r=ct()("species"),i=Array;return Er=function(o){var u;return t(o)&&(u=o.constructor,(e(u)&&(u===i||t(u.prototype))||n(u)&&null===(u=u[r]))&&(u=void 0)),void 0===u?i:u}}function _r(){if(Or)return Sr;Or=1;var t=Dr();return Sr=function(e,n){return new(t(e))(0===n?0:n)}}function kr(){if(jr)return Lr;jr=1;var t=ct(),e=pr(),n=ae().f,r=t("unscopables"),i=Array.prototype;return void 0===i[r]&&n(i,r,{configurable:!0,value:e(null)}),Lr=function(t){i[r][t]=!0}}!function(){if(Mr)return Ir;Mr=1;var t=Jn(),e=function(){if(Tr)return Ar;Tr=1;var t=Cr(),e=tt(),n=en(),r=rt(),i=Tn(),o=_r(),u=e([].push),a=function(e){var a=1===e,f=2===e,c=3===e,s=4===e,l=6===e,h=7===e,p=5===e||l;return function(d,v,m,g){for(var y,b,w=r(d),E=n(w),x=i(E),S=t(v,m),O=0,A=g||o,T=a?A(d,x):f||h?A(d,0):void 0;x>O;O++)if((p||O in E)&&(b=S(y=E[O],O,w),e))if(a)T[O]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return O;case 2:u(T,y)}else switch(e){case 4:return!1;case 7:u(T,y)}return l?-1:c||s?s:T}};return Ar={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}().find,n=kr(),r="find",i=!0;r in[]&&Array(1)[r]((function(){i=!1})),t({target:"Array",proto:!0,forced:i},{find:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),n(r)}();var Fr,Rr,Wr,Vr,Hr,qr,Br,zr,$r,Ur,Gr,Xr,Kr,Yr={};function Jr(){if(Rr)return Fr;Rr=1;var t=$e(),e=String;return Fr=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function Qr(){if(Vr)return Wr;Vr=1;var t=Jt();return Wr=function(){var e=t(this),n="";return e.hasIndices&&(n+="d"),e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.dotAll&&(n+="s"),e.unicode&&(n+="u"),e.unicodeSets&&(n+="v"),e.sticky&&(n+="y"),n}}function Zr(){if(Xr)return Gr;Xr=1;var t,e,n=Qt(),r=tt(),i=Jr(),o=Qr(),u=function(){if(qr)return Hr;qr=1;var t=Q(),e=s().RegExp,n=t((function(){var t=e("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),r=n||t((function(){return!e("a","y").sticky})),i=n||t((function(){var t=e("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));return Hr={BROKEN_CARET:i,MISSED_STICKY:r,UNSUPPORTED_Y:n}}(),a=J(),f=pr(),c=He().get,l=function(){if(zr)return Br;zr=1;var t=Q(),e=s().RegExp;return Br=t((function(){var t=e(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))}(),h=function(){if(Ur)return $r;Ur=1;var t=Q(),e=s().RegExp;return $r=t((function(){var t=e("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))}(),p=a("native-string-replace",String.prototype.replace),d=RegExp.prototype.exec,v=d,m=r("".charAt),g=r("".indexOf),y=r("".replace),b=r("".slice),w=(e=/b*/g,n(d,t=/a/,"a"),n(d,e,"a"),0!==t.lastIndex||0!==e.lastIndex),E=u.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];return(w||x||E||l||h)&&(v=function(t){var e,r,u,a,s,l,h,S=this,O=c(S),A=i(t),T=O.raw;if(T)return T.lastIndex=S.lastIndex,e=n(v,T,A),S.lastIndex=T.lastIndex,e;var L=O.groups,j=E&&S.sticky,M=n(o,S),P=S.source,I=0,C=A;if(j&&(M=y(M,"y",""),-1===g(M,"g")&&(M+="g"),C=b(A,S.lastIndex),S.lastIndex>0&&(!S.multiline||S.multiline&&"\n"!==m(A,S.lastIndex-1))&&(P="(?: "+P+")",C=" "+C,I++),r=new RegExp("^(?:"+P+")",M)),x&&(r=new RegExp("^"+P+"$(?!\\s)",M)),w&&(u=S.lastIndex),a=n(d,j?r:S,C),j?a?(a.input=b(a.input,I),a[0]=b(a[0],I),a.index=S.lastIndex,S.lastIndex+=a[0].length):S.lastIndex=0:w&&a&&(S.lastIndex=S.global?a.index+a[0].length:u),x&&a&&a.length>1&&n(p,a[0],r,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(a[s]=void 0)})),a&&L)for(a.groups=l=f(null),s=0;s<L.length;s++)l[(h=L[s])[0]]=a[h[1]];return a}),Gr=v}!function(){if(Kr)return Yr;Kr=1;var t=Jn(),e=Zr();t({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e})}();var ti,ei,ni,ri,ii,oi,ui,ai={};function fi(){return ei?ti:(ei=1,ti="\t\n\v\f\r                 \u2028\u2029\ufeff")}!function(){if(ui)return ai;ui=1;var t=Jn(),e=function(){if(ri)return ni;ri=1;var t=tt(),e=nt(),n=Jr(),r=fi(),i=t("".replace),o=RegExp("^["+r+"]+"),u=RegExp("(^|[^"+r+"])["+r+"]+$"),a=function(t){return function(r){var a=n(e(r));return 1&t&&(a=i(a,o,"")),2&t&&(a=i(a,u,"$1")),a}};return ni={start:a(1),end:a(2),trim:a(3)}}().trim,n=function(){if(oi)return ii;oi=1;var t=_e().PROPER,e=Q(),n=fi();return ii=function(r){return e((function(){return!!n[r]()||"​…᠎"!=="​…᠎"[r]()||t&&n[r].name!==r}))}}();t({target:"String",proto:!0,forced:n("trim")},{trim:function(){return e(this)}})}();var ci,si,li={};si||(si=1,function(){if(ci)return li;ci=1;var t=Jn(),e=s();t({global:!0,forced:e.globalThis!==e},{globalThis:e})}());var hi,pi,di={},vi={exports:{}};vi.exports;function mi(){return hi||(hi=1,function(t,e){!function(t){function e(t){return null!==t&&"object"==typeof t&&"constructor"in t&&t.constructor===Object}function n(t,r){void 0===t&&(t={}),void 0===r&&(r={}),Object.keys(r).forEach((function(i){void 0===t[i]?t[i]=r[i]:e(r[i])&&e(t[i])&&Object.keys(r[i]).length>0&&n(t[i],r[i])}))}var r={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function i(){var t="undefined"!=typeof document?document:{};return n(t,r),t}var o={document:r,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(t){return"undefined"==typeof setTimeout?(t(),null):setTimeout(t,0)},cancelAnimationFrame:function(t){"undefined"!=typeof setTimeout&&clearTimeout(t)}};function u(){var t="undefined"!=typeof window?window:{};return n(t,o),t}t.extend=n,t.getDocument=i,t.getWindow=u,t.ssrDocument=r,t.ssrWindow=o,Object.defineProperty(t,"__esModule",{value:!0})}(e)}(0,vi.exports)),vi.exports}function gi(){if(pi)return di;pi=1,Object.defineProperty(di,"__esModule",{value:!0});var t=mi();function e(t){return e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(t)}function n(t,e){return n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(t,e)}function r(t,e,i){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return r&&n(o,r.prototype),o},r.apply(null,arguments)}function i(t){var o="function"==typeof Map?new Map:void 0;return i=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==o){if(o.has(t))return o.get(t);o.set(t,u)}function u(){return r(t,arguments,e(this).constructor)}return u.prototype=Object.create(t.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),n(u,t)},i(t)}var o=function(t){var e,n;function r(e){var n,r,i;return n=t.call.apply(t,[this].concat(e))||this,r=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n),i=r.__proto__,Object.defineProperty(r,"__proto__",{get:function(){return i},set:function(t){i.__proto__=t}}),n}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r}(i(Array));function u(t){void 0===t&&(t=[]);var e=[];return t.forEach((function(t){Array.isArray(t)?e.push.apply(e,u(t)):e.push(t)})),e}function a(t,e){return Array.prototype.filter.call(t,e)}function f(e,n){var r=t.getWindow(),i=t.getDocument(),u=[];if(!n&&e instanceof o)return e;if(!e)return new o(u);if("string"==typeof e){var a=e.trim();if(a.indexOf("<")>=0&&a.indexOf(">")>=0){var f="div";0===a.indexOf("<li")&&(f="ul"),0===a.indexOf("<tr")&&(f="tbody"),0!==a.indexOf("<td")&&0!==a.indexOf("<th")||(f="tr"),0===a.indexOf("<tbody")&&(f="table"),0===a.indexOf("<option")&&(f="select");var c=i.createElement(f);c.innerHTML=a;for(var s=0;s<c.childNodes.length;s+=1)u.push(c.childNodes[s])}else u=function(t,e){if("string"!=typeof t)return[t];for(var n=[],r=e.querySelectorAll(t),i=0;i<r.length;i+=1)n.push(r[i]);return n}(e.trim(),n||i)}else if(e.nodeType||e===r||e===i)u.push(e);else if(Array.isArray(e)){if(e instanceof o)return e;u=e}return new o(function(t){for(var e=[],n=0;n<t.length;n+=1)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(u))}f.fn=o.prototype;var c="resize scroll".split(" ");function s(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(void 0===n[0]){for(var i=0;i<this.length;i+=1)c.indexOf(t)<0&&(t in this[i]?this[i][t]():f(this[i]).trigger(t));return this}return this.on.apply(this,[t].concat(n))}}var l=s("click"),h=s("blur"),p=s("focus"),d=s("focusin"),v=s("focusout"),m=s("keyup"),g=s("keydown"),y=s("keypress"),b=s("submit"),w=s("change"),E=s("mousedown"),x=s("mousemove"),S=s("mouseup"),O=s("mouseenter"),A=s("mouseleave"),T=s("mouseout"),L=s("mouseover"),j=s("touchstart"),M=s("touchend"),P=s("touchmove"),I=s("resize"),C=s("scroll");return di.$=f,di.add=function(){for(var t,e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(t=0;t<r.length;t+=1){var o=f(r[t]);for(e=0;e<o.length;e+=1)this.push(o[e])}return this},di.addClass=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=u(e.map((function(t){return t.split(" ")})));return this.forEach((function(t){var e;(e=t.classList).add.apply(e,r)})),this},di.animate=function(e,n){var r,i=t.getWindow(),o=this,u={props:Object.assign({},e),params:Object.assign({duration:300,easing:"swing"},n),elements:o,animating:!1,que:[],easingProgress:function(t,e){return"swing"===t?.5-Math.cos(e*Math.PI)/2:"function"==typeof t?t(e):e},stop:function(){u.frameId&&i.cancelAnimationFrame(u.frameId),u.animating=!1,u.elements.each((function(t){delete t.dom7AnimateInstance})),u.que=[]},done:function(t){if(u.animating=!1,u.elements.each((function(t){delete t.dom7AnimateInstance})),t&&t(o),u.que.length>0){var e=u.que.shift();u.animate(e[0],e[1])}},animate:function(t,e){if(u.animating)return u.que.push([t,e]),u;var n=[];u.elements.each((function(e,r){var o,a,f,c,s;e.dom7AnimateInstance||(u.elements[r].dom7AnimateInstance=u),n[r]={container:e},Object.keys(t).forEach((function(u){o=i.getComputedStyle(e,null).getPropertyValue(u).replace(",","."),a=parseFloat(o),f=o.replace(a,""),c=parseFloat(t[u]),s=t[u]+f,n[r][u]={initialFullValue:o,initialValue:a,unit:f,finalValue:c,finalFullValue:s,currentValue:a}}))}));var r,a,f=null,c=0,s=0,l=!1;return u.animating=!0,u.frameId=i.requestAnimationFrame((function h(){var p,d;r=(new Date).getTime(),l||(l=!0,e.begin&&e.begin(o)),null===f&&(f=r),e.progress&&e.progress(o,Math.max(Math.min((r-f)/e.duration,1),0),f+e.duration-r<0?0:f+e.duration-r,f),n.forEach((function(i){var o=i;a||o.done||Object.keys(t).forEach((function(i){if(!a&&!o.done){p=Math.max(Math.min((r-f)/e.duration,1),0),d=u.easingProgress(e.easing,p);var l=o[i],h=l.initialValue,v=l.finalValue,m=l.unit;o[i].currentValue=h+d*(v-h);var g=o[i].currentValue;(v>h&&g>=v||v<h&&g<=v)&&(o.container.style[i]=v+m,(s+=1)===Object.keys(t).length&&(o.done=!0,c+=1),c===n.length&&(a=!0)),a?u.done(e.complete):o.container.style[i]=g+m}}))})),a||(u.frameId=i.requestAnimationFrame(h))})),u}};if(0===u.elements.length)return o;for(var a=0;a<u.elements.length;a+=1)u.elements[a].dom7AnimateInstance?r=u.elements[a].dom7AnimateInstance:u.elements[a].dom7AnimateInstance=u;return r||(r=u),"stop"===e?r.stop():r.animate(u.props,u.params),o},di.animationEnd=function(t){var e=this;return t&&e.on("animationend",(function n(r){r.target===this&&(t.call(this,r),e.off("animationend",n))})),this},di.append=function(){for(var e,n=t.getDocument(),r=0;r<arguments.length;r+=1){e=r<0||arguments.length<=r?void 0:arguments[r];for(var i=0;i<this.length;i+=1)if("string"==typeof e){var u=n.createElement("div");for(u.innerHTML=e;u.firstChild;)this[i].appendChild(u.firstChild)}else if(e instanceof o)for(var a=0;a<e.length;a+=1)this[i].appendChild(e[a]);else this[i].appendChild(e)}return this},di.appendTo=function(t){return f(t).append(this),this},di.attr=function(t,e){if(1===arguments.length&&"string"==typeof t)return this[0]?this[0].getAttribute(t):void 0;for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(t,e);else for(var r in t)this[n][r]=t[r],this[n].setAttribute(r,t[r]);return this},di.blur=h,di.change=w,di.children=function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].children,i=0;i<r.length;i+=1)t&&!f(r[i]).is(t)||e.push(r[i]);return f(e)},di.click=l,di.closest=function(t){var e=this;return void 0===t?f([]):(e.is(t)||(e=e.parents(t).eq(0)),e)},di.css=function(e,n){var r,i=t.getWindow();if(1===arguments.length){if("string"!=typeof e){for(r=0;r<this.length;r+=1)for(var o in e)this[r].style[o]=e[o];return this}if(this[0])return i.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(r=0;r<this.length;r+=1)this[r].style[e]=n;return this}return this},di.data=function(t,e){var n;if(void 0===e){if(!(n=this[0]))return;if(n.dom7ElementDataStorage&&t in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[t];var r=n.getAttribute("data-"+t);return r||void 0}for(var i=0;i<this.length;i+=1)(n=this[i]).dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[t]=e;return this},di.dataset=function(){var t=this[0];if(t){var e,n={};if(t.dataset)for(var r in t.dataset)n[r]=t.dataset[r];else for(var i=0;i<t.attributes.length;i+=1){var o=t.attributes[i];o.name.indexOf("data-")>=0&&(n[(e=o.name.split("data-")[1],e.toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})))]=o.value)}for(var u in n)"false"===n[u]?n[u]=!1:"true"===n[u]?n[u]=!0:parseFloat(n[u])===1*n[u]&&(n[u]*=1);return n}},di.default=f,di.detach=function(){return this.remove()},di.each=function(t){return t?(this.forEach((function(e,n){t.apply(e,[e,n])})),this):this},di.empty=function(){for(var t=0;t<this.length;t+=1){var e=this[t];if(1===e.nodeType){for(var n=0;n<e.childNodes.length;n+=1)e.childNodes[n].parentNode&&e.childNodes[n].parentNode.removeChild(e.childNodes[n]);e.textContent=""}}return this},di.eq=function(t){if(void 0===t)return this;var e=this.length;if(t>e-1)return f([]);if(t<0){var n=e+t;return f(n<0?[]:[this[n]])}return f([this[t]])},di.filter=function(t){return f(a(this,t))},di.find=function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].querySelectorAll(t),i=0;i<r.length;i+=1)e.push(r[i]);return f(e)},di.focus=p,di.focusin=d,di.focusout=v,di.hasClass=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=u(e.map((function(t){return t.split(" ")})));return a(this,(function(t){return r.filter((function(e){return t.classList.contains(e)})).length>0})).length>0},di.height=function(){var e=t.getWindow();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null},di.hide=function(){for(var t=0;t<this.length;t+=1)this[t].style.display="none";return this},di.html=function(t){if(void 0===t)return this[0]?this[0].innerHTML:null;for(var e=0;e<this.length;e+=1)this[e].innerHTML=t;return this},di.index=function(){var t,e=this[0];if(e){for(t=0;null!==(e=e.previousSibling);)1===e.nodeType&&(t+=1);return t}},di.insertAfter=function(t){for(var e=f(t),n=0;n<this.length;n+=1)if(1===e.length)e[0].parentNode.insertBefore(this[n],e[0].nextSibling);else if(e.length>1)for(var r=0;r<e.length;r+=1)e[r].parentNode.insertBefore(this[n].cloneNode(!0),e[r].nextSibling)},di.insertBefore=function(t){for(var e=f(t),n=0;n<this.length;n+=1)if(1===e.length)e[0].parentNode.insertBefore(this[n],e[0]);else if(e.length>1)for(var r=0;r<e.length;r+=1)e[r].parentNode.insertBefore(this[n].cloneNode(!0),e[r])},di.is=function(e){var n,r,i=t.getWindow(),u=t.getDocument(),a=this[0];if(!a||void 0===e)return!1;if("string"==typeof e){if(a.matches)return a.matches(e);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(e);if(a.msMatchesSelector)return a.msMatchesSelector(e);for(n=f(e),r=0;r<n.length;r+=1)if(n[r]===a)return!0;return!1}if(e===u)return a===u;if(e===i)return a===i;if(e.nodeType||e instanceof o){for(n=e.nodeType?[e]:e,r=0;r<n.length;r+=1)if(n[r]===a)return!0;return!1}return!1},di.keydown=g,di.keypress=y,di.keyup=m,di.mousedown=E,di.mouseenter=O,di.mouseleave=A,di.mousemove=x,di.mouseout=T,di.mouseover=L,di.mouseup=S,di.next=function(t){return this.length>0?t?this[0].nextElementSibling&&f(this[0].nextElementSibling).is(t)?f([this[0].nextElementSibling]):f([]):this[0].nextElementSibling?f([this[0].nextElementSibling]):f([]):f([])},di.nextAll=function(t){var e=[],n=this[0];if(!n)return f([]);for(;n.nextElementSibling;){var r=n.nextElementSibling;t?f(r).is(t)&&e.push(r):e.push(r),n=r}return f(e)},di.off=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],u=e[3];"function"==typeof e[1]&&(r=e[0],o=e[1],u=e[2],i=void 0),u||(u=!1);for(var a=r.split(" "),f=0;f<a.length;f+=1)for(var c=a[f],s=0;s<this.length;s+=1){var l=this[s],h=void 0;if(!i&&l.dom7Listeners?h=l.dom7Listeners[c]:i&&l.dom7LiveListeners&&(h=l.dom7LiveListeners[c]),h&&h.length)for(var p=h.length-1;p>=0;p-=1){var d=h[p];o&&d.listener===o||o&&d.listener&&d.listener.dom7proxy&&d.listener.dom7proxy===o?(l.removeEventListener(c,d.proxyListener,u),h.splice(p,1)):o||(l.removeEventListener(c,d.proxyListener,u),h.splice(p,1))}}return this},di.offset=function(){if(this.length>0){var e=t.getWindow(),n=t.getDocument(),r=this[0],i=r.getBoundingClientRect(),o=n.body,u=r.clientTop||o.clientTop||0,a=r.clientLeft||o.clientLeft||0,f=r===e?e.scrollY:r.scrollTop,c=r===e?e.scrollX:r.scrollLeft;return{top:i.top+f-u,left:i.left+c-a}}return null},di.on=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],u=e[3];function a(t){var e=t.target;if(e){var n=t.target.dom7EventData||[];if(n.indexOf(t)<0&&n.unshift(t),f(e).is(i))o.apply(e,n);else for(var r=f(e).parents(),u=0;u<r.length;u+=1)f(r[u]).is(i)&&o.apply(r[u],n)}}function c(t){var e=t&&t.target&&t.target.dom7EventData||[];e.indexOf(t)<0&&e.unshift(t),o.apply(this,e)}"function"==typeof e[1]&&(r=e[0],o=e[1],u=e[2],i=void 0),u||(u=!1);for(var s,l=r.split(" "),h=0;h<this.length;h+=1){var p=this[h];if(i)for(s=0;s<l.length;s+=1){var d=l[s];p.dom7LiveListeners||(p.dom7LiveListeners={}),p.dom7LiveListeners[d]||(p.dom7LiveListeners[d]=[]),p.dom7LiveListeners[d].push({listener:o,proxyListener:a}),p.addEventListener(d,a,u)}else for(s=0;s<l.length;s+=1){var v=l[s];p.dom7Listeners||(p.dom7Listeners={}),p.dom7Listeners[v]||(p.dom7Listeners[v]=[]),p.dom7Listeners[v].push({listener:o,proxyListener:c}),p.addEventListener(v,c,u)}}return this},di.once=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],o=n[1],u=n[2],a=n[3];function f(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];u.apply(this,n),t.off(i,o,f,a),f.dom7proxy&&delete f.dom7proxy}return"function"==typeof n[1]&&(i=n[0],u=n[1],a=n[2],o=void 0),f.dom7proxy=u,t.on(i,o,f,a)},di.outerHeight=function(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},di.outerWidth=function(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},di.parent=function(t){for(var e=[],n=0;n<this.length;n+=1)null!==this[n].parentNode&&(t?f(this[n].parentNode).is(t)&&e.push(this[n].parentNode):e.push(this[n].parentNode));return f(e)},di.parents=function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].parentNode;r;)t?f(r).is(t)&&e.push(r):e.push(r),r=r.parentNode;return f(e)},di.prepend=function(e){var n,r,i=t.getDocument();for(n=0;n<this.length;n+=1)if("string"==typeof e){var u=i.createElement("div");for(u.innerHTML=e,r=u.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(u.childNodes[r],this[n].childNodes[0])}else if(e instanceof o)for(r=0;r<e.length;r+=1)this[n].insertBefore(e[r],this[n].childNodes[0]);else this[n].insertBefore(e,this[n].childNodes[0]);return this},di.prependTo=function(t){return f(t).prepend(this),this},di.prev=function(t){if(this.length>0){var e=this[0];return t?e.previousElementSibling&&f(e.previousElementSibling).is(t)?f([e.previousElementSibling]):f([]):e.previousElementSibling?f([e.previousElementSibling]):f([])}return f([])},di.prevAll=function(t){var e=[],n=this[0];if(!n)return f([]);for(;n.previousElementSibling;){var r=n.previousElementSibling;t?f(r).is(t)&&e.push(r):e.push(r),n=r}return f(e)},di.prop=function(t,e){if(1!==arguments.length||"string"!=typeof t){for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n][t]=e;else for(var r in t)this[n][r]=t[r];return this}return this[0]?this[0][t]:this},di.remove=function(){for(var t=0;t<this.length;t+=1)this[t].parentNode&&this[t].parentNode.removeChild(this[t]);return this},di.removeAttr=function(t){for(var e=0;e<this.length;e+=1)this[e].removeAttribute(t);return this},di.removeClass=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=u(e.map((function(t){return t.split(" ")})));return this.forEach((function(t){var e;(e=t.classList).remove.apply(e,r)})),this},di.removeData=function(t){for(var e=0;e<this.length;e+=1){var n=this[e];n.dom7ElementDataStorage&&n.dom7ElementDataStorage[t]&&(n.dom7ElementDataStorage[t]=null,delete n.dom7ElementDataStorage[t])}},di.resize=I,di.scroll=C,di.scrollLeft=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],u=e[3];3===e.length&&"function"==typeof o&&(r=e[0],i=e[1],u=e[2],o=e[3]);var a=this;return void 0===r?a.length>0?a[0].scrollLeft:null:a.scrollTo(r,void 0,i,o,u)},di.scrollTo=function(){for(var e=t.getWindow(),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r[0],u=r[1],a=r[2],f=r[3],c=r[4];return 4===r.length&&"function"==typeof f&&(c=f,o=r[0],u=r[1],a=r[2],c=r[3],f=r[4]),void 0===f&&(f="swing"),this.each((function(){var t,n,r,i,s,l,h,p,d=this,v=u>0||0===u,m=o>0||0===o;if(void 0===f&&(f="swing"),v&&(t=d.scrollTop,a||(d.scrollTop=u)),m&&(n=d.scrollLeft,a||(d.scrollLeft=o)),a){v&&(r=d.scrollHeight-d.offsetHeight,s=Math.max(Math.min(u,r),0)),m&&(i=d.scrollWidth-d.offsetWidth,l=Math.max(Math.min(o,i),0));var g=null;v&&s===t&&(v=!1),m&&l===n&&(m=!1),e.requestAnimationFrame((function r(i){void 0===i&&(i=(new Date).getTime()),null===g&&(g=i);var o,u=Math.max(Math.min((i-g)/a,1),0),y="linear"===f?u:.5-Math.cos(u*Math.PI)/2;v&&(h=t+y*(s-t)),m&&(p=n+y*(l-n)),v&&s>t&&h>=s&&(d.scrollTop=s,o=!0),v&&s<t&&h<=s&&(d.scrollTop=s,o=!0),m&&l>n&&p>=l&&(d.scrollLeft=l,o=!0),m&&l<n&&p<=l&&(d.scrollLeft=l,o=!0),o?c&&c():(v&&(d.scrollTop=h),m&&(d.scrollLeft=p),e.requestAnimationFrame(r))}))}}))},di.scrollTop=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],u=e[3];3===e.length&&"function"==typeof o&&(r=e[0],i=e[1],u=e[2],o=e[3]);var a=this;return void 0===r?a.length>0?a[0].scrollTop:null:a.scrollTo(void 0,r,i,o,u)},di.show=function(){for(var e=t.getWindow(),n=0;n<this.length;n+=1){var r=this[n];"none"===r.style.display&&(r.style.display=""),"none"===e.getComputedStyle(r,null).getPropertyValue("display")&&(r.style.display="block")}return this},di.siblings=function(t){return this.nextAll(t).add(this.prevAll(t))},di.stop=function(){for(var t=this,e=0;e<t.length;e+=1)t[e].dom7AnimateInstance&&t[e].dom7AnimateInstance.stop()},di.styles=function(){var e=t.getWindow();return this[0]?e.getComputedStyle(this[0],null):{}},di.submit=b,di.text=function(t){if(void 0===t)return this[0]?this[0].textContent.trim():null;for(var e=0;e<this.length;e+=1)this[e].textContent=t;return this},di.toggleClass=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=u(e.map((function(t){return t.split(" ")})));this.forEach((function(t){r.forEach((function(e){t.classList.toggle(e)}))}))},di.touchend=M,di.touchmove=P,di.touchstart=j,di.transform=function(t){for(var e=0;e<this.length;e+=1)this[e].style.transform=t;return this},di.transition=function(t){for(var e=0;e<this.length;e+=1)this[e].style.transitionDuration="string"!=typeof t?t+"ms":t;return this},di.transitionEnd=function(t){var e=this;return t&&e.on("transitionend",(function n(r){r.target===this&&(t.call(this,r),e.off("transitionend",n))})),this},di.trigger=function(){for(var e=t.getWindow(),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=r[0].split(" "),u=r[1],a=0;a<o.length;a+=1)for(var f=o[a],c=0;c<this.length;c+=1){var s=this[c];if(e.CustomEvent){var l=new e.CustomEvent(f,{detail:u,bubbles:!0,cancelable:!0});s.dom7EventData=r.filter((function(t,e){return e>0})),s.dispatchEvent(l),s.dom7EventData=[],delete s.dom7EventData}}return this},di.val=function(t){if(void 0===t){var e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){for(var n=[],r=0;r<e.selectedOptions.length;r+=1)n.push(e.selectedOptions[r].value);return n}return e.value}for(var i=0;i<this.length;i+=1){var o=this[i];if(Array.isArray(t)&&o.multiple&&"select"===o.nodeName.toLowerCase())for(var u=0;u<o.options.length;u+=1)o.options[u].selected=t.indexOf(o.options[u].value)>=0;else o.value=t}return this},di.value=function(t){return this.val(t)},di.width=function(){var e=t.getWindow();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null},di}var yi=gi(),bi=u(yi);yi.append&&(bi.fn.append=yi.append),yi.html&&(bi.fn.html=yi.html),yi.val&&(bi.fn.val=yi.val),yi.on&&(bi.fn.on=yi.on),yi.focus&&(bi.fn.focus=yi.focus),yi.is&&(bi.fn.is=yi.is),yi.parents&&(bi.fn.parents=yi.parents),yi.find&&(bi.fn.find=yi.find);var wi,Ei,xi,Si,Oi,Ai,Ti,Li={};function ji(){if(Ei)return wi;Ei=1;var t=TypeError;return wi=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}}function Mi(){if(Si)return xi;Si=1;var t=Ut(),e=ae(),n=Fe();return xi=function(r,i,o){t?e.f(r,i,n(0,o)):r[i]=o}}function Pi(){if(Ai)return Oi;Ai=1;var t=Q(),e=ct(),n=ut(),r=e("species");return Oi=function(e){return n>=51||!t((function(){var t=[];return(t.constructor={})[r]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}}!function(){if(Ti)return Li;Ti=1;var t=Jn(),e=Q(),n=Nr(),r=Gt(),i=rt(),o=Tn(),u=ji(),a=Mi(),f=_r(),c=Pi(),s=ct(),l=ut(),h=s("isConcatSpreadable"),p=l>=51||!e((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),d=function(t){if(!r(t))return!1;var e=t[h];return void 0!==e?!!e:n(t)};t({target:"Array",proto:!0,arity:1,forced:!p||!c("concat")},{concat:function(t){var e,n,r,c,s,l=i(this),h=f(l,0),p=0;for(e=-1,r=arguments.length;e<r;e++)if(d(s=-1===e?l:arguments[e]))for(c=o(s),u(p+c),n=0;n<c;n++,p++)n in s&&a(h,p,s[n]);else u(p+1),a(h,p++,s);return h.length=p,h}})}();let Ii=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e>62?"-":"_"),"");function Ci(t){return"".concat(t,"-").concat(Ii())}function Ni(){return Ci("w-e-insert-formula")}var Di=function(){function t(){this.title=e.t("formula.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textareaId=Ni(),this.buttonId=Ni()}return t.prototype.getSelectedElem=function(t){var n=e.DomEditor.getSelectedNodeByType(t,"formula");return null==n?null:n},t.prototype.getValue=function(t){var e=this.getSelectedElem(t);return e&&e.value||""},t.prototype.isActive=function(t){return!1},t.prototype.exec=function(t,e){},t.prototype.isDisabled=function(t){var n=t.selection;return null==n||(!!e.SlateRange.isExpanded(n)||null==this.getSelectedElem(t))},t.prototype.getModalPositionNode=function(t){return this.getSelectedElem(t)},t.prototype.getModalContentElem=function(t){var n=this,r=this.textareaId,o=this.buttonId,u=i(e.genModalTextareaElems(e.t("formula.formula"),r,e.t("formula.placeholder")),2),a=u[0],f=u[1],c=bi(f),s=i(e.genModalButtonElems(o,e.t("formula.ok")),1)[0];if(null==this.$content){var l=bi("<div></div>");l.on("click","#".concat(o),(function(e){e.preventDefault();var i=l.find("#".concat(r)).val().trim();n.updateFormula(t,i),t.hidePanelOrModal()})),this.$content=l}var h=this.$content;h.html(""),h.append(a),h.append(s);var p=this.getValue(t);return c.val(p),setTimeout((function(){c.focus()})),h[0]},t.prototype.updateFormula=function(t,n){if(n&&(t.restoreSelection(),!this.isDisabled(t))){var r=this.getSelectedElem(t);if(null!=r){var i=e.DomEditor.findPath(t,r),o={value:n};e.SlateTransforms.setNodes(t,o,{at:i})}}},t}();function _i(){return Ci("w-e-insert-formula")}var ki=function(){function t(){this.title=e.t("formula.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M941.6 734.72L985.984 640H1024l-64 384H0v-74.24l331.552-391.2L0 227.008V0h980L1024 256h-34.368l-18.72-38.88C935.584 143.744 909.024 128 832 128H169.984l353.056 353.056L225.632 832H768c116 0 146.656-41.568 173.6-97.28z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textareaId=_i(),this.buttonId=_i()}return t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){return!1},t.prototype.exec=function(t,e){},t.prototype.isDisabled=function(t){var n=t.selection;if(null==n)return!0;if(e.SlateRange.isExpanded(n))return!0;var r=e.DomEditor.getSelectedElems(t);return!!r.some((function(e){return t.isVoid(e)}))||!!r.some((function(t){return"pre"===e.DomEditor.getNodeType(t)}))},t.prototype.getModalPositionNode=function(t){return null},t.prototype.getModalContentElem=function(t){var n=this,r=this.textareaId,o=this.buttonId,u=i(e.genModalTextareaElems(e.t("formula.formula"),r,e.t("formula.placeholder")),2),a=u[0],f=u[1],c=bi(f),s=i(e.genModalButtonElems(o,e.t("formula.ok")),1)[0];if(null==this.$content){var l=bi("<div></div>");l.on("click","#".concat(o),(function(e){e.preventDefault();var i=l.find("#".concat(r)).val().trim();n.insertFormula(t,i),t.hidePanelOrModal()})),this.$content=l}var h=this.$content;return h.html(""),h.append(a),h.append(s),c.val(""),setTimeout((function(){c.focus()})),h[0]},t.prototype.insertFormula=function(t,e){if(e&&(t.restoreSelection(),!this.isDisabled(t))){var n={type:"formula",value:e,children:[{text:""}]};t.insertNode(n)}},t}();return{editorPlugin:function(t){var n=t.isInline,r=t.isVoid,i=t;return i.isInline=function(t){return"formula"===e.DomEditor.getNodeType(t)||n(t)},i.isVoid=function(t){return"formula"===e.DomEditor.getNodeType(t)||r(t)},i},renderElems:[{type:"formula",renderElem:function(t,r,i){var o=e.DomEditor.isNodeSelected(i,t),u=t.value,a=void 0===u?"":u,f=n.h("w-e-formula-card",{dataset:{value:a}},null);return n.h("div",{props:{contentEditable:!1},style:{display:"inline-block",marginLeft:"3px",marginRight:"3px",border:o?"2px solid var(--w-e-textarea-selected-border-color)":"2px solid transparent",borderRadius:"3px",padding:"3px 3px"}},[f])}}],elemsToHtml:[Pr],parseElemsHtml:[{selector:'span[data-w-e-type="formula"]',parseElemHtml:function(t,e,n){return{type:"formula",value:t.getAttribute("data-value")||"",children:[{text:""}]}}}],menus:[{key:"insertFormula",factory:function(){return new ki}},{key:"editFormula",factory:function(){return new Di}}]}}));
2
2
  //# sourceMappingURL=index.js.map