mindoc/static/cherry/addons/cherry-code-block-mermaid-p...

2 lines
38 KiB
Go

!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t=t||self).CherryCodeBlockMermaidPlugin=r()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function e(t,r){return t(r={exports:{}},r.exports),r.exports}var n,o,i=function(t){return t&&t.Math==Math&&t},a=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||Function("return this")(),u=function(t){try{return!!t()}catch(t){return!0}},c=!u((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),f=Function.prototype,s=f.apply,l=f.call,p="object"==typeof Reflect&&Reflect.apply||(c?l.bind(s):function(){return l.apply(s,arguments)}),v=Function.prototype,y=v.bind,d=v.call,h=c&&y.bind(d,d),b=c?function(t){return t&&h(t)}:function(t){return t&&function(){return d.apply(t,arguments)}},m=function(t){return"function"==typeof t},g=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),w=Function.prototype.call,_=c?w.bind(w):function(){return w.apply(w,arguments)},O={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,S={f:j&&!O.call({1:2},1)?function(t){var r=j(this,t);return!!r&&r.enumerable}:O},P=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},x=b({}.toString),A=b("".slice),T=function(t){return A(x(t),8,-1)},E=a.Object,F=b("".split),M=u((function(){return!E("z").propertyIsEnumerable(0)}))?function(t){return"String"==T(t)?F(t,""):E(t)}:E,I=a.TypeError,L=function(t){if(null==t)throw I("Can't call method on "+t);return t},C=function(t){return M(L(t))},k=function(t){return"object"==typeof t?null!==t:m(t)},R={},z=function(t){return m(t)?t:void 0},D=function(t,r){return arguments.length<2?z(R[t])||z(a[t]):R[t]&&R[t][r]||a[t]&&a[t][r]},B=b({}.isPrototypeOf),N=D("navigator","userAgent")||"",G=a.process,U=a.Deno,V=G&&G.versions||U&&U.version,$=V&&V.v8;$&&(o=(n=$.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&N&&(!(n=N.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=N.match(/Chrome\/(\d+)/))&&(o=+n[1]);var W=o,q=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&W&&W<41})),H=q&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Y=a.Object,J=H?function(t){return"symbol"==typeof t}:function(t){var r=D("Symbol");return m(r)&&B(r.prototype,Y(t))},X=a.String,K=function(t){try{return X(t)}catch(t){return"Object"}},Q=a.TypeError,Z=function(t){if(m(t))return t;throw Q(K(t)+" is not a function")},tt=a.TypeError,rt=Object.defineProperty,et=a["__core-js_shared__"]||function(t,r){try{rt(a,t,{value:r,configurable:!0,writable:!0})}catch(e){a[t]=r}return r}("__core-js_shared__",{}),nt=e((function(t){(t.exports=function(t,r){return et[t]||(et[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.22.6",mode:"pure",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.6/LICENSE",source:"https://github.com/zloirock/core-js"})})),ot=a.Object,it=function(t){return ot(L(t))},at=b({}.hasOwnProperty),ut=Object.hasOwn||function(t,r){return at(it(t),r)},ct=0,ft=Math.random(),st=b(1..toString),lt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+st(++ct+ft,36)},pt=nt("wks"),vt=a.Symbol,yt=vt&&vt.for,dt=H?vt:vt&&vt.withoutSetter||lt,ht=function(t){if(!ut(pt,t)||!q&&"string"!=typeof pt[t]){var r="Symbol."+t;q&&ut(vt,t)?pt[t]=vt[t]:pt[t]=H&&yt?yt(r):dt(r)}return pt[t]},bt=a.TypeError,mt=ht("toPrimitive"),gt=function(t,r){if(!k(t)||J(t))return t;var e,n,o=null==(e=t[mt])?void 0:Z(e);if(o){if(void 0===r&&(r="default"),n=_(o,t,r),!k(n)||J(n))return n;throw bt("Can't convert object to primitive value")}return void 0===r&&(r="number"),function(t,r){var e,n;if("string"===r&&m(e=t.toString)&&!k(n=_(e,t)))return n;if(m(e=t.valueOf)&&!k(n=_(e,t)))return n;if("string"!==r&&m(e=t.toString)&&!k(n=_(e,t)))return n;throw tt("Can't convert object to primitive value")}(t,r)},wt=function(t){var r=gt(t,"string");return J(r)?r:r+""},_t=a.document,Ot=k(_t)&&k(_t.createElement),jt=function(t){return Ot?_t.createElement(t):{}},St=!g&&!u((function(){return 7!=Object.defineProperty(jt("div"),"a",{get:function(){return 7}}).a})),Pt=Object.getOwnPropertyDescriptor,xt={f:g?Pt:function(t,r){if(t=C(t),r=wt(r),St)try{return Pt(t,r)}catch(t){}if(ut(t,r))return P(!_(S.f,t,r),t[r])}},At=/#|\.prototype\./,Tt=function(t,r){var e=Ft[Et(t)];return e==It||e!=Mt&&(m(r)?u(r):!!r)},Et=Tt.normalize=function(t){return String(t).replace(At,".").toLowerCase()},Ft=Tt.data={},Mt=Tt.NATIVE="N",It=Tt.POLYFILL="P",Lt=Tt,Ct=b(b.bind),kt=function(t,r){return Z(t),void 0===r?t:c?Ct(t,r):function(){return t.apply(r,arguments)}},Rt=g&&u((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),zt=a.String,Dt=a.TypeError,Bt=function(t){if(k(t))return t;throw Dt(zt(t)+" is not an object")},Nt=a.TypeError,Gt=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,Vt={f:g?Rt?function(t,r,e){if(Bt(t),r=wt(r),Bt(e),"function"==typeof t&&"prototype"===r&&"value"in e&&"writable"in e&&!e.writable){var n=Ut(t,r);n&&n.writable&&(t[r]=e.value,e={configurable:"configurable"in e?e.configurable:n.configurable,enumerable:"enumerable"in e?e.enumerable:n.enumerable,writable:!1})}return Gt(t,r,e)}:Gt:function(t,r,e){if(Bt(t),r=wt(r),Bt(e),St)try{return Gt(t,r,e)}catch(t){}if("get"in e||"set"in e)throw Nt("Accessors not supported");return"value"in e&&(t[r]=e.value),t}},$t=g?function(t,r,e){return Vt.f(t,r,P(1,e))}:function(t,r,e){return t[r]=e,t},Wt=xt.f,qt=function(t){var r=function(e,n,o){if(this instanceof r){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,o)}return p(t,this,arguments)};return r.prototype=t.prototype,r},Ht=function(t,r){var e,n,o,i,u,c,f,s,l=t.target,p=t.global,v=t.stat,y=t.proto,d=p?a:v?a[l]:(a[l]||{}).prototype,h=p?R:R[l]||$t(R,l,{})[l],g=h.prototype;for(o in r)e=!Lt(p?o:l+(v?".":"#")+o,t.forced)&&d&&ut(d,o),u=h[o],e&&(c=t.dontCallGetSet?(s=Wt(d,o))&&s.value:d[o]),i=e&&c?c:r[o],e&&typeof u==typeof i||(f=t.bind&&e?kt(i,a):t.wrap&&e?qt(i):y&&m(i)?b(i):i,(t.sham||i&&i.sham||u&&u.sham)&&$t(f,"sham",!0),$t(h,o,f),y&&(ut(R,n=l+"Prototype")||$t(R,n,{}),$t(R[n],o,i),t.real&&g&&!g[o]&&$t(g,o,i)))},Yt=Math.ceil,Jt=Math.floor,Xt=Math.trunc||function(t){var r=+t;return(r>0?Jt:Yt)(r)},Kt=function(t){var r=+t;return r!=r||0===r?0:Xt(r)},Qt=Math.max,Zt=Math.min,tr=function(t,r){var e=Kt(t);return e<0?Qt(e+r,0):Zt(e,r)},rr=Math.min,er=function(t){return(r=t.length)>0?rr(Kt(r),9007199254740991):0;var r},nr=function(t){return function(r,e,n){var o,i=C(r),a=er(i),u=tr(n,a);if(t&&e!=e){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===e)return t||u||0;return!t&&-1}},or={includes:nr(!0),indexOf:nr(!1)},ir={},ar=or.indexOf,ur=b([].push),cr=function(t,r){var e,n=C(t),o=0,i=[];for(e in n)!ut(ir,e)&&ut(n,e)&&ur(i,e);for(;r.length>o;)ut(n,e=r[o++])&&(~ar(i,e)||ur(i,e));return i},fr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],sr=Object.keys||function(t){return cr(t,fr)},lr=u((function(){sr(1)}));Ht({target:"Object",stat:!0,forced:lr},{keys:function(t){return sr(it(t))}});var pr=R.Object.keys,vr={};vr[ht("toStringTag")]="z";var yr,dr="[object z]"===String(vr),hr=ht("toStringTag"),br=a.Object,mr="Arguments"==T(function(){return arguments}()),gr=dr?T:function(t){var r,e,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,r){try{return t[r]}catch(t){}}(r=br(t),hr))?e:mr?T(r):"Object"==(n=T(r))&&m(r.callee)?"Arguments":n},wr=a.String,_r=function(t){if("Symbol"===gr(t))throw TypeError("Cannot convert a Symbol value to a string");return wr(t)},Or={f:g&&!Rt?Object.defineProperties:function(t,r){Bt(t);for(var e,n=C(r),o=sr(r),i=o.length,a=0;i>a;)Vt.f(t,e=o[a++],n[e]);return t}},jr=D("document","documentElement"),Sr=nt("keys"),Pr=function(t){return Sr[t]||(Sr[t]=lt(t))},xr=Pr("IE_PROTO"),Ar=function(){},Tr=function(t){return"<script>"+t+"<\/script>"},Er=function(t){t.write(Tr("")),t.close();var r=t.parentWindow.Object;return t=null,r},Fr=function(){try{yr=new ActiveXObject("htmlfile")}catch(t){}var t,r;Fr="undefined"!=typeof document?document.domain&&yr?Er(yr):((r=jt("iframe")).style.display="none",jr.appendChild(r),r.src=String("javascript:"),(t=r.contentWindow.document).open(),t.write(Tr("document.F=Object")),t.close(),t.F):Er(yr);for(var e=fr.length;e--;)delete Fr.prototype[fr[e]];return Fr()};ir[xr]=!0;var Mr=Object.create||function(t,r){var e;return null!==t?(Ar.prototype=Bt(t),e=new Ar,Ar.prototype=null,e[xr]=t):e=Fr(),void 0===r?e:Or.f(e,r)},Ir=fr.concat("length","prototype"),Lr={f:Object.getOwnPropertyNames||function(t){return cr(t,Ir)}},Cr=function(t,r,e){var n=wt(r);n in t?Vt.f(t,n,P(0,e)):t[n]=e},kr=a.Array,Rr=Math.max,zr=Lr.f,Dr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Br=function(t){try{return zr(t)}catch(t){return function(t,r,e){for(var n=er(t),o=tr(r,n),i=tr(void 0===e?n:e,n),a=kr(Rr(i-o,0)),u=0;o<i;o++,u++)Cr(a,u,t[o]);return a.length=u,a}(Dr)}},Nr={f:function(t){return Dr&&"Window"==T(t)?Br(t):zr(C(t))}},Gr={f:Object.getOwnPropertySymbols},Ur=function(t,r,e,n){return n&&n.enumerable?t[r]=e:$t(t,r,e),t},Vr={f:ht},$r=Vt.f,Wr=dr?{}.toString:function(){return"[object "+gr(this)+"]"},qr=Vt.f,Hr=ht("toStringTag"),Yr=function(t,r,e,n){if(t){var o=e?t:t.prototype;ut(o,Hr)||qr(o,Hr,{configurable:!0,value:r}),n&&!dr&&$t(o,"toString",Wr)}},Jr=b(Function.toString);m(et.inspectSource)||(et.inspectSource=function(t){return Jr(t)});var Xr,Kr,Qr,Zr=et.inspectSource,te=a.WeakMap,re=m(te)&&/native code/.test(Zr(te)),ee=a.TypeError,ne=a.WeakMap;if(re||et.state){var oe=et.state||(et.state=new ne),ie=b(oe.get),ae=b(oe.has),ue=b(oe.set);Xr=function(t,r){if(ae(oe,t))throw new ee("Object already initialized");return r.facade=t,ue(oe,t,r),r},Kr=function(t){return ie(oe,t)||{}},Qr=function(t){return ae(oe,t)}}else{var ce=Pr("state");ir[ce]=!0,Xr=function(t,r){if(ut(t,ce))throw new ee("Object already initialized");return r.facade=t,$t(t,ce,r),r},Kr=function(t){return ut(t,ce)?t[ce]:{}},Qr=function(t){return ut(t,ce)}}var fe={set:Xr,get:Kr,has:Qr,enforce:function(t){return Qr(t)?Kr(t):Xr(t,{})},getterFor:function(t){return function(r){var e;if(!k(r)||(e=Kr(r)).type!==t)throw ee("Incompatible receiver, "+t+" required");return e}}},se=Array.isArray||function(t){return"Array"==T(t)},le=function(){},pe=[],ve=D("Reflect","construct"),ye=/^\s*(?:class|function)\b/,de=b(ye.exec),he=!ye.exec(le),be=function(t){if(!m(t))return!1;try{return ve(le,pe,t),!0}catch(t){return!1}},me=function(t){if(!m(t))return!1;switch(gr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return he||!!de(ye,Zr(t))}catch(t){return!0}};me.sham=!0;var ge=!ve||u((function(){var t;return be(be.call)||!be(Object)||!be((function(){t=!0}))||t}))?me:be,we=ht("species"),_e=a.Array,Oe=function(t,r){return new(function(t){var r;return se(t)&&(r=t.constructor,(ge(r)&&(r===_e||se(r.prototype))||k(r)&&null===(r=r[we]))&&(r=void 0)),void 0===r?_e:r}(t))(0===r?0:r)},je=b([].push),Se=function(t){var r=1==t,e=2==t,n=3==t,o=4==t,i=6==t,a=7==t,u=5==t||i;return function(c,f,s,l){for(var p,v,y=it(c),d=M(y),h=kt(f,s),b=er(d),m=0,g=l||Oe,w=r?g(c,b):e||a?g(c,0):void 0;b>m;m++)if((u||m in d)&&(v=h(p=d[m],m,y),t))if(r)w[m]=v;else if(v)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:je(w,p)}else switch(t){case 4:return!1;case 7:je(w,p)}return i?-1:n||o?o:w}},Pe={forEach:Se(0),map:Se(1),filter:Se(2),some:Se(3),every:Se(4),find:Se(5),findIndex:Se(6),filterReject:Se(7)},xe=Pe.forEach,Ae=Pr("hidden"),Te=fe.set,Ee=fe.getterFor("Symbol"),Fe=Object.prototype,Me=a.Symbol,Ie=Me&&Me.prototype,Le=a.TypeError,Ce=a.QObject,ke=xt.f,Re=Vt.f,ze=Nr.f,De=S.f,Be=b([].push),Ne=nt("symbols"),Ge=nt("op-symbols"),Ue=nt("wks"),Ve=!Ce||!Ce.prototype||!Ce.prototype.findChild,$e=g&&u((function(){return 7!=Mr(Re({},"a",{get:function(){return Re(this,"a",{value:7}).a}})).a}))?function(t,r,e){var n=ke(Fe,r);n&&delete Fe[r],Re(t,r,e),n&&t!==Fe&&Re(Fe,r,n)}:Re,We=function(t,r){var e=Ne[t]=Mr(Ie);return Te(e,{type:"Symbol",tag:t,description:r}),g||(e.description=r),e},qe=function(t,r,e){t===Fe&&qe(Ge,r,e),Bt(t);var n=wt(r);return Bt(e),ut(Ne,n)?(e.enumerable?(ut(t,Ae)&&t[Ae][n]&&(t[Ae][n]=!1),e=Mr(e,{enumerable:P(0,!1)})):(ut(t,Ae)||Re(t,Ae,P(1,{})),t[Ae][n]=!0),$e(t,n,e)):Re(t,n,e)},He=function(t,r){Bt(t);var e=C(r),n=sr(e).concat(Ke(e));return xe(n,(function(r){g&&!_(Ye,e,r)||qe(t,r,e[r])})),t},Ye=function(t){var r=wt(t),e=_(De,this,r);return!(this===Fe&&ut(Ne,r)&&!ut(Ge,r))&&(!(e||!ut(this,r)||!ut(Ne,r)||ut(this,Ae)&&this[Ae][r])||e)},Je=function(t,r){var e=C(t),n=wt(r);if(e!==Fe||!ut(Ne,n)||ut(Ge,n)){var o=ke(e,n);return!o||!ut(Ne,n)||ut(e,Ae)&&e[Ae][n]||(o.enumerable=!0),o}},Xe=function(t){var r=ze(C(t)),e=[];return xe(r,(function(t){ut(Ne,t)||ut(ir,t)||Be(e,t)})),e},Ke=function(t){var r=t===Fe,e=ze(r?Ge:C(t)),n=[];return xe(e,(function(t){!ut(Ne,t)||r&&!ut(Fe,t)||Be(n,Ne[t])})),n};q||(Ie=(Me=function(){if(B(Ie,this))throw Le("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?_r(arguments[0]):void 0,r=lt(t),e=function(t){this===Fe&&_(e,Ge,t),ut(this,Ae)&&ut(this[Ae],r)&&(this[Ae][r]=!1),$e(this,r,P(1,t))};return g&&Ve&&$e(Fe,r,{configurable:!0,set:e}),We(r,t)}).prototype,Ur(Ie,"toString",(function(){return Ee(this).tag})),Ur(Me,"withoutSetter",(function(t){return We(lt(t),t)})),S.f=Ye,Vt.f=qe,Or.f=He,xt.f=Je,Lr.f=Nr.f=Xe,Gr.f=Ke,Vr.f=function(t){return We(ht(t),t)},g&&Re(Ie,"description",{configurable:!0,get:function(){return Ee(this).description}})),Ht({global:!0,constructor:!0,wrap:!0,forced:!q,sham:!q},{Symbol:Me}),xe(sr(Ue),(function(t){!function(t){var r=R.Symbol||(R.Symbol={});ut(r,t)||$r(r,t,{value:Vr.f(t)})}(t)})),Ht({target:"Symbol",stat:!0,forced:!q},{useSetter:function(){Ve=!0},useSimple:function(){Ve=!1}}),Ht({target:"Object",stat:!0,forced:!q,sham:!g},{create:function(t,r){return void 0===r?Mr(t):He(Mr(t),r)},defineProperty:qe,defineProperties:He,getOwnPropertyDescriptor:Je}),Ht({target:"Object",stat:!0,forced:!q},{getOwnPropertyNames:Xe}),function(){var t=D("Symbol"),r=t&&t.prototype,e=r&&r.valueOf,n=ht("toPrimitive");r&&!r[n]&&Ur(r,n,(function(t){return _(e,this)}),{arity:1})}(),Yr(Me,"Symbol"),ir[Ae]=!0;var Qe=q&&!!Symbol.for&&!!Symbol.keyFor,Ze=nt("string-to-symbol-registry"),tn=nt("symbol-to-string-registry");Ht({target:"Symbol",stat:!0,forced:!Qe},{for:function(t){var r=_r(t);if(ut(Ze,r))return Ze[r];var e=D("Symbol")(r);return Ze[r]=e,tn[e]=r,e}});var rn=nt("symbol-to-string-registry");Ht({target:"Symbol",stat:!0,forced:!Qe},{keyFor:function(t){if(!J(t))throw TypeError(K(t)+" is not a symbol");if(ut(rn,t))return rn[t]}});var en=b([].slice),nn=D("JSON","stringify"),on=b(/./.exec),an=b("".charAt),un=b("".charCodeAt),cn=b("".replace),fn=b(1..toString),sn=/[\uD800-\uDFFF]/g,ln=/^[\uD800-\uDBFF]$/,pn=/^[\uDC00-\uDFFF]$/,vn=!q||u((function(){var t=D("Symbol")();return"[null]"!=nn([t])||"{}"!=nn({a:t})||"{}"!=nn(Object(t))})),yn=u((function(){return'"\\udf06\\ud834"'!==nn("\udf06\ud834")||'"\\udead"'!==nn("\udead")})),dn=function(t,r){var e=en(arguments),n=r;if((k(r)||void 0!==t)&&!J(t))return se(r)||(r=function(t,r){if(m(n)&&(r=_(n,this,t,r)),!J(r))return r}),e[1]=r,p(nn,null,e)},hn=function(t,r,e){var n=an(e,r-1),o=an(e,r+1);return on(ln,t)&&!on(pn,o)||on(pn,t)&&!on(ln,n)?"\\u"+fn(un(t,0),16):t};nn&&Ht({target:"JSON",stat:!0,arity:3,forced:vn||yn},{stringify:function(t,r,e){var n=en(arguments),o=p(vn?dn:nn,null,n);return yn&&"string"==typeof o?cn(o,sn,hn):o}});var bn=!q||u((function(){Gr.f(1)}));Ht({target:"Object",stat:!0,forced:bn},{getOwnPropertySymbols:function(t){var r=Gr.f;return r?r(it(t)):[]}});var mn=R.Object.getOwnPropertySymbols,gn=ht("species"),wn=function(t){return W>=51||!u((function(){var r=[];return(r.constructor={})[gn]=function(){return{foo:1}},1!==r[t](Boolean).foo}))},_n=Pe.filter,On=wn("filter");Ht({target:"Array",proto:!0,forced:!On},{filter:function(t){return _n(this,t,arguments.length>1?arguments[1]:void 0)}});var jn=function(t){return R[t+"Prototype"]},Sn=jn("Array").filter,Pn=Array.prototype,xn=function(t){var r=t.filter;return t===Pn||B(Pn,t)&&r===Pn.filter?Sn:r},An=xt.f,Tn=u((function(){An(1)}));Ht({target:"Object",stat:!0,forced:!g||Tn,sham:!g},{getOwnPropertyDescriptor:function(t,r){return An(C(t),r)}});var En,Fn,Mn,In=e((function(t){var r=R.Object,e=t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)};r.getOwnPropertyDescriptor.sham&&(e.sham=!0)})),Ln=Function.prototype,Cn=g&&Object.getOwnPropertyDescriptor,kn=ut(Ln,"name"),Rn={EXISTS:kn,PROPER:kn&&"something"===function(){}.name,CONFIGURABLE:kn&&(!g||g&&Cn(Ln,"name").configurable)},zn=!u((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Dn=Pr("IE_PROTO"),Bn=a.Object,Nn=Bn.prototype,Gn=zn?Bn.getPrototypeOf:function(t){var r=it(t);if(ut(r,Dn))return r[Dn];var e=r.constructor;return m(e)&&r instanceof e?e.prototype:r instanceof Bn?Nn:null},Un=ht("iterator"),Vn=!1;[].keys&&("next"in(Mn=[].keys())?(Fn=Gn(Gn(Mn)))!==Object.prototype&&(En=Fn):Vn=!0);var $n=null==En||u((function(){var t={};return En[Un].call(t)!==t}));En=$n?{}:Mr(En),m(En[Un])||Ur(En,Un,(function(){return this}));var Wn={IteratorPrototype:En,BUGGY_SAFARI_ITERATORS:Vn},qn=Wn.IteratorPrototype,Hn=a.String,Yn=a.TypeError,Jn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,e={};try{(t=b(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),r=e instanceof Array}catch(t){}return function(e,n){return Bt(e),function(t){if("object"==typeof t||m(t))return t;throw Yn("Can't set "+Hn(t)+" as a prototype")}(n),r?t(e,n):e.__proto__=n,e}}():void 0),Xn=Rn.PROPER,Kn=Wn.BUGGY_SAFARI_ITERATORS,Qn=ht("iterator"),Zn=fe.set,to=fe.getterFor("Array Iterator"),ro=(function(t,r,e,n,o,i,a){!function(t,r,e,n){var o=r+" Iterator";t.prototype=Mr(qn,{next:P(+!n,e)}),Yr(t,o,!1,!0)}(e,r,n);var u,c,f,s=function(t){if(t===o&&d)return d;if(!Kn&&t in v)return v[t];switch(t){case"keys":case"values":case"entries":return function(){return new e(this,t)}}return function(){return new e(this)}},l=r+" Iterator",p=!1,v=t.prototype,y=v[Qn]||v["@@iterator"]||o&&v[o],d=!Kn&&y||s(o),h="Array"==r&&v.entries||y;if(h&&(u=Gn(h.call(new t)))!==Object.prototype&&u.next&&Yr(u,l,!0,!0),Xn&&"values"==o&&y&&"values"!==y.name&&(p=!0,d=function(){return _(y,this)}),o)if(c={values:s("values"),keys:i?d:s("keys"),entries:s("entries")},a)for(f in c)(Kn||p||!(f in v))&&Ur(v,f,c[f]);else Ht({target:r,proto:!0,forced:Kn||p},c);a&&v[Qn]!==d&&Ur(v,Qn,d,{name:o})}(Array,"Array",(function(t,r){Zn(this,{type:"Array Iterator",target:C(t),index:0,kind:r})}),(function(){var t=to(this),r=t.target,e=t.kind,n=t.index++;return!r||n>=r.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==e?{value:n,done:!1}:"values"==e?{value:r[n],done:!1}:{value:[n,r[n]],done:!1}}),"values"),ht("toStringTag"));for(var eo in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var no=a[eo],oo=no&&no.prototype;oo&&gr(oo)!==ro&&$t(oo,ro,eo)}var io,ao,uo=Pe.forEach,co=!!(ao=[]["forEach"])&&u((function(){ao.call(null,io||function(){return 1},1)}))?[].forEach:function(t){return uo(this,t,arguments.length>1?arguments[1]:void 0)};Ht({target:"Array",proto:!0,forced:[].forEach!=co},{forEach:co});var fo=jn("Array").forEach,so=Array.prototype,lo={DOMTokenList:!0,NodeList:!0},po=function(t){var r=t.forEach;return t===so||B(so,t)&&r===so.forEach||ut(lo,gr(t))?fo:r},vo=b([].concat),yo=D("Reflect","ownKeys")||function(t){var r=Lr.f(Bt(t)),e=Gr.f;return e?vo(r,e(t)):r};Ht({target:"Object",stat:!0,sham:!g},{getOwnPropertyDescriptors:function(t){for(var r,e,n=C(t),o=xt.f,i=yo(n),a={},u=0;i.length>u;)void 0!==(e=o(n,r=i[u++]))&&Cr(a,r,e);return a}});var ho=R.Object.getOwnPropertyDescriptors,bo=Or.f;Ht({target:"Object",stat:!0,forced:Object.defineProperties!==bo,sham:!g},{defineProperties:bo});var mo=e((function(t){var r=R.Object,e=t.exports=function(t,e){return r.defineProperties(t,e)};r.defineProperties.sham&&(e.sham=!0)})),go=Vt.f;Ht({target:"Object",stat:!0,forced:Object.defineProperty!==go,sham:!g},{defineProperty:go});var wo=e((function(t){var r=R.Object,e=t.exports=function(t,e,n){return r.defineProperty(t,e,n)};r.defineProperty.sham&&(e.sham=!0)})),_o=wo,Oo=a.Function,jo=b([].concat),So=b([].join),Po={},xo=function(t,r,e){if(!ut(Po,r)){for(var n=[],o=0;o<r;o++)n[o]="a["+o+"]";Po[r]=Oo("C,a","return new C("+So(n,",")+")")}return Po[r](t,e)},Ao=c?Oo.bind:function(t){var r=Z(this),e=r.prototype,n=en(arguments,1),o=function(){var e=jo(n,en(arguments));return this instanceof o?xo(r,e.length,e):r.apply(t,e)};return k(e)&&(o.prototype=e),o},To=a.TypeError,Eo=function(t){if(ge(t))return t;throw To(K(t)+" is not a constructor")},Fo=D("Reflect","construct"),Mo=Object.prototype,Io=[].push,Lo=u((function(){function t(){}return!(Fo((function(){}),[],t)instanceof t)})),Co=!u((function(){Fo((function(){}))})),ko=Lo||Co;Ht({target:"Reflect",stat:!0,forced:ko,sham:ko},{construct:function(t,r){Eo(t),Bt(r);var e=arguments.length<3?t:Eo(arguments[2]);if(Co&&!Lo)return Fo(t,r,e);if(t==e){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var n=[null];return p(Io,n,r),new(p(Ao,t,n))}var o=e.prototype,i=Mr(k(o)?o:Mo),a=p(t,i,r);return k(a)?a:i}});var Ro=R.Reflect.construct;Ht({target:"Function",proto:!0,forced:Function.bind!==Ao},{bind:Ao});var zo=jn("Function").bind,Do=Function.prototype,Bo=function(t){var r=t.bind;return t===Do||B(Do,t)&&r===Do.bind?zo:r};Ht({target:"Object",stat:!0},{setPrototypeOf:Jn});var No=R.Object.setPrototypeOf,Go=e((function(t){function r(e,n){return t.exports=r=No||function(t,r){return t.__proto__=r,t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e,n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}));r(Go);var Uo=e((function(t){t.exports=function(){if("undefined"==typeof Reflect||!Ro)return!1;if(Ro.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Ro(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.__esModule=!0,t.exports.default=t.exports}));r(Uo);var Vo=r(e((function(t){function r(e,n,o){return Uo()?(t.exports=r=Ro,t.exports.__esModule=!0,t.exports.default=t.exports):(t.exports=r=function(t,r,e){var n=[null];n.push.apply(n,r);var o=new(Bo(Function).apply(t,n));return e&&Go(o,e.prototype),o},t.exports.__esModule=!0,t.exports.default=t.exports),r.apply(null,arguments)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}))),$o=r(e((function(t){t.exports=function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports}))),Wo=wo,qo=r(e((function(t){function r(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Wo(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Wo(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports}))),Ho=r(e((function(t){t.exports=function(t,r,e){return r in t?Wo(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t},t.exports.__esModule=!0,t.exports.default=t.exports}))),Yo=ht("isConcatSpreadable"),Jo=a.TypeError,Xo=W>=51||!u((function(){var t=[];return t[Yo]=!1,t.concat()[0]!==t})),Ko=wn("concat"),Qo=function(t){if(!k(t))return!1;var r=t[Yo];return void 0!==r?!!r:se(t)};Ht({target:"Array",proto:!0,arity:1,forced:!Xo||!Ko},{concat:function(t){var r,e,n,o,i,a=it(this),u=Oe(a,0),c=0;for(r=-1,n=arguments.length;r<n;r++)if(Qo(i=-1===r?a:arguments[r])){if(c+(o=er(i))>9007199254740991)throw Jo("Maximum allowed index exceeded");for(e=0;e<o;e++,c++)e in i&&Cr(u,c,i[e])}else{if(c>=9007199254740991)throw Jo("Maximum allowed index exceeded");Cr(u,c++,i)}return u.length=c,u}});var Zo=jn("Array").concat,ti=Array.prototype,ri=function(t){var r=t.concat;return t===ti||B(ti,t)&&r===ti.concat?Zo:r};var ei=function(){this.__data__=[],this.size=0};var ni=function(t,r){return t===r||t!=t&&r!=r};var oi=function(t,r){for(var e=t.length;e--;)if(ni(t[e][0],r))return e;return-1},ii=Array.prototype.splice;var ai=function(t){var r=this.__data__,e=oi(r,t);return!(e<0)&&(e==r.length-1?r.pop():ii.call(r,e,1),--this.size,!0)};var ui=function(t){var r=this.__data__,e=oi(r,t);return e<0?void 0:r[e][1]};var ci=function(t){return oi(this.__data__,t)>-1};var fi=function(t,r){var e=this.__data__,n=oi(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};function si(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}si.prototype.clear=ei,si.prototype.delete=ai,si.prototype.get=ui,si.prototype.has=ci,si.prototype.set=fi;var li=si;var pi=function(){this.__data__=new li,this.size=0};var vi=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e};var yi=function(t){return this.__data__.get(t)};var di=function(t){return this.__data__.has(t)},hi="object"==typeof t&&t&&t.Object===Object&&t,bi="object"==typeof self&&self&&self.Object===Object&&self,mi=hi||bi||Function("return this")(),gi=mi.Symbol,wi=Object.prototype,_i=wi.hasOwnProperty,Oi=wi.toString,ji=gi?gi.toStringTag:void 0;var Si=function(t){var r=_i.call(t,ji),e=t[ji];try{t[ji]=void 0;var n=!0}catch(t){}var o=Oi.call(t);return n&&(r?t[ji]=e:delete t[ji]),o},Pi=Object.prototype.toString;var xi=function(t){return Pi.call(t)},Ai=gi?gi.toStringTag:void 0;var Ti=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Ai&&Ai in Object(t)?Si(t):xi(t)};var Ei=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)};var Fi=function(t){if(!Ei(t))return!1;var r=Ti(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r},Mi=mi["__core-js_shared__"],Ii=function(){var t=/[^.]+$/.exec(Mi&&Mi.keys&&Mi.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var Li=function(t){return!!Ii&&Ii in t},Ci=Function.prototype.toString;var ki=function(t){if(null!=t){try{return Ci.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Ri=/^\[object .+?Constructor\]$/,zi=Function.prototype,Di=Object.prototype,Bi=zi.toString,Ni=Di.hasOwnProperty,Gi=RegExp("^"+Bi.call(Ni).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ui=function(t){return!(!Ei(t)||Li(t))&&(Fi(t)?Gi:Ri).test(ki(t))};var Vi=function(t,r){return null==t?void 0:t[r]};var $i=function(t,r){var e=Vi(t,r);return Ui(e)?e:void 0},Wi=$i(mi,"Map"),qi=$i(Object,"create");var Hi=function(){this.__data__=qi?qi(null):{},this.size=0};var Yi=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},Ji=Object.prototype.hasOwnProperty;var Xi=function(t){var r=this.__data__;if(qi){var e=r[t];return"__lodash_hash_undefined__"===e?void 0:e}return Ji.call(r,t)?r[t]:void 0},Ki=Object.prototype.hasOwnProperty;var Qi=function(t){var r=this.__data__;return qi?void 0!==r[t]:Ki.call(r,t)};var Zi=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=qi&&void 0===r?"__lodash_hash_undefined__":r,this};function ta(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}ta.prototype.clear=Hi,ta.prototype.delete=Yi,ta.prototype.get=Xi,ta.prototype.has=Qi,ta.prototype.set=Zi;var ra=ta;var ea=function(){this.size=0,this.__data__={hash:new ra,map:new(Wi||li),string:new ra}};var na=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t};var oa=function(t,r){var e=t.__data__;return na(r)?e["string"==typeof r?"string":"hash"]:e.map};var ia=function(t){var r=oa(this,t).delete(t);return this.size-=r?1:0,r};var aa=function(t){return oa(this,t).get(t)};var ua=function(t){return oa(this,t).has(t)};var ca=function(t,r){var e=oa(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function fa(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}fa.prototype.clear=ea,fa.prototype.delete=ia,fa.prototype.get=aa,fa.prototype.has=ua,fa.prototype.set=ca;var sa=fa;var la=function(t,r){var e=this.__data__;if(e instanceof li){var n=e.__data__;if(!Wi||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new sa(n)}return e.set(t,r),this.size=e.size,this};function pa(t){var r=this.__data__=new li(t);this.size=r.size}pa.prototype.clear=pi,pa.prototype.delete=vi,pa.prototype.get=yi,pa.prototype.has=di,pa.prototype.set=la;var va=pa,ya=function(){try{var t=$i(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var da=function(t,r,e){"__proto__"==r&&ya?ya(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e};var ha=function(t,r,e){(void 0!==e&&!ni(t[r],e)||void 0===e&&!(r in t))&&da(t,r,e)};var ba=function(t){return function(r,e,n){for(var o=-1,i=Object(r),a=n(r),u=a.length;u--;){var c=a[t?u:++o];if(!1===e(i[c],c,i))break}return r}}(),ma=e((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e?mi.Buffer:void 0,i=o?o.allocUnsafe:void 0;t.exports=function(t,r){if(r)return t.slice();var e=t.length,n=i?i(e):new t.constructor(e);return t.copy(n),n}})),ga=mi.Uint8Array;var wa=function(t){var r=new t.constructor(t.byteLength);return new ga(r).set(new ga(t)),r};var _a=function(t,r){var e=r?wa(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)};var Oa=function(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r},ja=Object.create,Sa=function(){function t(){}return function(r){if(!Ei(r))return{};if(ja)return ja(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();var Pa=function(t,r){return function(e){return t(r(e))}}(Object.getPrototypeOf,Object),xa=Object.prototype;var Aa=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||xa)};var Ta=function(t){return"function"!=typeof t.constructor||Aa(t)?{}:Sa(Pa(t))};var Ea=function(t){return null!=t&&"object"==typeof t};var Fa=function(t){return Ea(t)&&"[object Arguments]"==Ti(t)},Ma=Object.prototype,Ia=Ma.hasOwnProperty,La=Ma.propertyIsEnumerable,Ca=Fa(function(){return arguments}())?Fa:function(t){return Ea(t)&&Ia.call(t,"callee")&&!La.call(t,"callee")},ka=Array.isArray;var Ra=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var za=function(t){return null!=t&&Ra(t.length)&&!Fi(t)};var Da=function(t){return Ea(t)&&za(t)};var Ba=function(){return!1},Na=e((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e?mi.Buffer:void 0,i=(o?o.isBuffer:void 0)||Ba;t.exports=i})),Ga=Function.prototype,Ua=Object.prototype,Va=Ga.toString,$a=Ua.hasOwnProperty,Wa=Va.call(Object);var qa=function(t){if(!Ea(t)||"[object Object]"!=Ti(t))return!1;var r=Pa(t);if(null===r)return!0;var e=$a.call(r,"constructor")&&r.constructor;return"function"==typeof e&&e instanceof e&&Va.call(e)==Wa},Ha={};Ha["[object Float32Array]"]=Ha["[object Float64Array]"]=Ha["[object Int8Array]"]=Ha["[object Int16Array]"]=Ha["[object Int32Array]"]=Ha["[object Uint8Array]"]=Ha["[object Uint8ClampedArray]"]=Ha["[object Uint16Array]"]=Ha["[object Uint32Array]"]=!0,Ha["[object Arguments]"]=Ha["[object Array]"]=Ha["[object ArrayBuffer]"]=Ha["[object Boolean]"]=Ha["[object DataView]"]=Ha["[object Date]"]=Ha["[object Error]"]=Ha["[object Function]"]=Ha["[object Map]"]=Ha["[object Number]"]=Ha["[object Object]"]=Ha["[object RegExp]"]=Ha["[object Set]"]=Ha["[object String]"]=Ha["[object WeakMap]"]=!1;var Ya=function(t){return Ea(t)&&Ra(t.length)&&!!Ha[Ti(t)]};var Ja=function(t){return function(r){return t(r)}},Xa=e((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e&&hi.process,i=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i})),Ka=Xa&&Xa.isTypedArray,Qa=Ka?Ja(Ka):Ya;var Za=function(t,r){if(("constructor"!==r||"function"!=typeof t[r])&&"__proto__"!=r)return t[r]},tu=Object.prototype.hasOwnProperty;var ru=function(t,r,e){var n=t[r];tu.call(t,r)&&ni(n,e)&&(void 0!==e||r in t)||da(t,r,e)};var eu=function(t,r,e,n){var o=!e;e||(e={});for(var i=-1,a=r.length;++i<a;){var u=r[i],c=n?n(e[u],t[u],u,e,t):void 0;void 0===c&&(c=t[u]),o?da(e,u,c):ru(e,u,c)}return e};var nu=function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n},ou=/^(?:0|[1-9]\d*)$/;var iu=function(t,r){var e=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==e||"symbol"!=e&&ou.test(t))&&t>-1&&t%1==0&&t<r},au=Object.prototype.hasOwnProperty;var uu=function(t,r){var e=ka(t),n=!e&&Ca(t),o=!e&&!n&&Na(t),i=!e&&!n&&!o&&Qa(t),a=e||n||o||i,u=a?nu(t.length,String):[],c=u.length;for(var f in t)!r&&!au.call(t,f)||a&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||iu(f,c))||u.push(f);return u};var cu=function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r},fu=Object.prototype.hasOwnProperty;var su=function(t){if(!Ei(t))return cu(t);var r=Aa(t),e=[];for(var n in t)("constructor"!=n||!r&&fu.call(t,n))&&e.push(n);return e};var lu=function(t){return za(t)?uu(t,!0):su(t)};var pu=function(t){return eu(t,lu(t))};var vu=function(t,r,e,n,o,i,a){var u=Za(t,e),c=Za(r,e),f=a.get(c);if(f)ha(t,e,f);else{var s=i?i(u,c,e+"",t,r,a):void 0,l=void 0===s;if(l){var p=ka(c),v=!p&&Na(c),y=!p&&!v&&Qa(c);s=c,p||v||y?ka(u)?s=u:Da(u)?s=Oa(u):v?(l=!1,s=ma(c,!0)):y?(l=!1,s=_a(c,!0)):s=[]:qa(c)||Ca(c)?(s=u,Ca(u)?s=pu(u):Ei(u)&&!Fi(u)||(s=Ta(c))):l=!1}l&&(a.set(c,s),o(s,c,n,i,a),a.delete(c)),ha(t,e,s)}};var yu=function t(r,e,n,o,i){r!==e&&ba(e,(function(a,u){if(i||(i=new va),Ei(a))vu(r,e,u,n,t,o,i);else{var c=o?o(Za(r,u),a,u+"",r,e,i):void 0;void 0===c&&(c=a),ha(r,u,c)}}),lu)};var du=function(t){return t};var hu=function(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)},bu=Math.max;var mu=function(t,r,e){return r=bu(void 0===r?t.length-1:r,0),function(){for(var n=arguments,o=-1,i=bu(n.length-r,0),a=Array(i);++o<i;)a[o]=n[r+o];o=-1;for(var u=Array(r+1);++o<r;)u[o]=n[o];return u[r]=e(a),hu(t,this,u)}};var gu=function(t){return function(){return t}},wu=ya?function(t,r){return ya(t,"toString",{configurable:!0,enumerable:!1,value:gu(r),writable:!0})}:du,_u=Date.now;var Ou=function(t){var r=0,e=0;return function(){var n=_u(),o=16-(n-e);if(e=n,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(wu);var ju=function(t,r){return Ou(mu(t,r,du),t+"")};var Su=function(t,r,e){if(!Ei(e))return!1;var n=typeof r;return!!("number"==n?za(e)&&iu(r,e.length):"string"==n&&r in e)&&ni(e[r],t)};var Pu=function(t){return ju((function(r,e){var n=-1,o=e.length,i=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,a&&Su(e[0],e[1],a)&&(i=o<3?void 0:i,o=1),r=Object(r);++n<o;){var u=e[n];u&&t(r,u,n,i)}return r}))}((function(t,r,e,n){yu(t,r,e,n)}));function xu(t,r){var e=pr(t);if(mn){var n=mn(t);r&&(n=xn(n).call(n,(function(r){return In(t,r).enumerable}))),e.push.apply(e,n)}return e}function Au(t){for(var r=1;r<arguments.length;r++){var e,n,o=null!=arguments[r]?arguments[r]:{};r%2?po(e=xu(Object(o),!0)).call(e,(function(r){Ho(t,r,o[r])})):ho?mo(t,ho(o)):po(n=xu(Object(o))).call(n,(function(r){_o(t,r,In(o,r))}))}return t}var Tu={theme:"default",altFontFamily:"sans-serif",fontFamily:"sans-serif",themeCSS:".label foreignObject { font-size: 90%; overflow: visible; } .label { font-family: sans-serif; }",flowchart:{useMaxWidth:!1},sequence:{useMaxWidth:!1},startOnLoad:!1,logLevel:5},Eu=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};$o(this,t),Ho(this,"mermaidAPIRefs",null),Ho(this,"options",Tu),Ho(this,"dom",null),Ho(this,"mermaidCanvas",null);var e=r.mermaid,n=r.mermaidAPI;if(!(n||window.mermaidAPI||e&&e.mermaidAPI||window.mermaid&&window.mermaid.mermaidAPI))throw new Error("code-block-mermaid-plugin[init]: Package mermaid or mermaidAPI not found.");this.options=Au(Au({},Tu),r||{}),this.mermaidAPIRefs=n||window.mermaidAPI||e.mermaidAPI||window.mermaid.mermaidAPI,delete this.options.mermaid,delete this.options.mermaidAPI,this.mermaidAPIRefs.initialize(this.options)}return qo(t,[{key:"mountMermaidCanvas",value:function(t){this.mermaidCanvas&&document.body.contains(this.mermaidCanvas)||(this.mermaidCanvas=document.createElement("div"),this.mermaidCanvas.style="width:1024px;opacity:0;position:fixed;top:100%;",(t.$cherry.wrapperDom||document.body).appendChild(this.mermaidCanvas))}},{key:"convertMermaidSvgToImg",value:function(t,r){var e,n=new DOMParser,o=function(t){return t.replace("<svg ",'<svg style="max-width:100%;height:auto;font-family:sans-serif;" ')};try{var i=n.parseFromString(t,"image/svg+xml"),a=i.documentElement;if("svg"===a.tagName.toLowerCase()){a.style.maxWidth="100%",a.style.height="auto",a.style.fontFamily="sans-serif";var u,c=document.getElementById(r).getBBox();if(a.hasAttribute("viewBox"))c=a.viewBox.baseVal;else a.setAttribute("viewBox",ri(u="0 0 ".concat(c.width," ")).call(u,c.height));"100%"===a.getAttribute("width")&&a.setAttribute("width","".concat(c.width)),"100%"===a.getAttribute("height")&&a.setAttribute("height","".concat(c.height)),e=i.documentElement.outerHTML}else e=o(t)}catch(r){e=o(t)}return e}},{key:"render",value:function(t,r,e){var n,o,i=this,a=r;a||(a=Math.round(1e8*Math.random())),this.mountMermaidCanvas(e);var u=ri(n="mermaid-".concat(a,"-")).call(n,(new Date).getTime());try{this.mermaidAPIRefs.render(u,t,(function(t){var r=t.replace(/\s*markerUnits="0"/g,"").replace(/\s*x="NaN"/g,"").replace(/<br>/g,"<br/>");o=i.convertMermaidSvgToImg(r,u)}),this.mermaidCanvas)}catch(t){return!1}return o}}],[{key:"install",value:function(r){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];Pu(r,{engine:{syntax:{codeBlock:{customRenderer:{mermaid:Vo(t,n)}}}}})}}]),t}();return Ho(Eu,"TYPE","figure"),Eu}));