!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).CherryEngine={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,t){return e(t={exports:{}},t.exports),t.exports}var i,a,o=function(e){return e&&e.Math==Math&&e},s=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),l=function(e){return"function"==typeof e},c=function(e){try{return!!e()}catch(e){return!0}},u=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,p={f:d&&!f.call({1:2},1)?function(e){var t=d(this,e);return!!t&&t.enumerable}:f},h=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},g={}.toString,m=function(e){return g.call(e).slice(8,-1)},v="".split,y=c((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==m(e)?v.call(e,""):Object(e)}:Object,b=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},w=function(e){return y(b(e))},_=function(e){return"object"==typeof e?null!==e:l(e)},k={},x=function(e){return l(e)?e:void 0},S=function(e,t){return arguments.length<2?x(k[e])||x(s[e]):k[e]&&k[e][t]||s[e]&&s[e][t]},C=S("navigator","userAgent")||"",E=s.process,A=s.Deno,T=E&&E.versions||A&&A.version,O=T&&T.v8;O?a=(i=O.split("."))[0]<4?1:i[0]+i[1]:C&&(!(i=C.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=C.match(/Chrome\/(\d+)/))&&(a=i[1]);var L=a&&+a,M=!!Object.getOwnPropertySymbols&&!c((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&L&&L<41})),R=M&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,N=R?function(e){return"symbol"==typeof e}:function(e){var t=S("Symbol");return l(t)&&Object(e)instanceof t},P=function(e){try{return String(e)}catch(e){return"Object"}},$=function(e){if(l(e))return e;throw TypeError(P(e)+" is not a function")},I=function(e,t){var n=e[t];return null==n?void 0:$(n)},D=s["__core-js_shared__"]||function(e,t){try{Object.defineProperty(s,e,{value:t,configurable:!0,writable:!0})}catch(n){s[e]=t}return t}("__core-js_shared__",{}),H=r((function(e){(e.exports=function(e,t){return D[e]||(D[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.18.3",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),F=function(e){return Object(b(e))},j={}.hasOwnProperty,B=Object.hasOwn||function(e,t){return j.call(F(e),t)},z=0,W=Math.random(),U=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++z+W).toString(36)},G=H("wks"),K=s.Symbol,q=R?K:K&&K.withoutSetter||U,X=function(e){return B(G,e)&&(M||"string"==typeof G[e])||(M&&B(K,e)?G[e]=K[e]:G[e]=q("Symbol."+e)),G[e]},Y=X("toPrimitive"),V=function(e,t){if(!_(e)||N(e))return e;var n,r=I(e,Y);if(r){if(void 0===t&&(t="default"),n=r.call(e,t),!_(n)||N(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&l(n=e.toString)&&!_(r=n.call(e)))return r;if(l(n=e.valueOf)&&!_(r=n.call(e)))return r;if("string"!==t&&l(n=e.toString)&&!_(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}(e,t)},Z=function(e){var t=V(e,"string");return N(t)?t:String(t)},J=s.document,Q=_(J)&&_(J.createElement),ee=function(e){return Q?J.createElement(e):{}},te=!u&&!c((function(){return 7!=Object.defineProperty(ee("div"),"a",{get:function(){return 7}}).a})),ne=Object.getOwnPropertyDescriptor,re={f:u?ne:function(e,t){if(e=w(e),t=Z(t),te)try{return ne(e,t)}catch(e){}if(B(e,t))return h(!p.f.call(e,t),e[t])}},ie=/#|\.prototype\./,ae=function(e,t){var n=se[oe(e)];return n==ce||n!=le&&(l(t)?c(t):!!t)},oe=ae.normalize=function(e){return String(e).replace(ie,".").toLowerCase()},se=ae.data={},le=ae.NATIVE="N",ce=ae.POLYFILL="P",ue=ae,fe=function(e,t,n){if($(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},de=function(e){if(_(e))return e;throw TypeError(String(e)+" is not an object")},pe=Object.defineProperty,he={f:u?pe:function(e,t,n){if(de(e),t=Z(t),de(n),te)try{return pe(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},ge=u?function(e,t,n){return he.f(e,t,h(1,n))}:function(e,t,n){return e[t]=n,e},me=re.f,ve=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t},ye=function(e,t){var n,r,i,a,o,c,u,f,d=e.target,p=e.global,h=e.stat,g=e.proto,m=p?s:h?s[d]:(s[d]||{}).prototype,v=p?k:k[d]||ge(k,d,{})[d],y=v.prototype;for(i in t)n=!ue(p?i:d+(h?".":"#")+i,e.forced)&&m&&B(m,i),o=v[i],n&&(c=e.noTargetGet?(f=me(m,i))&&f.value:m[i]),a=n&&c?c:t[i],n&&typeof o==typeof a||(u=e.bind&&n?fe(a,s):e.wrap&&n?ve(a):g&&l(a)?fe(Function.call,a):a,(e.sham||a&&a.sham||o&&o.sham)&&ge(u,"sham",!0),ge(v,i,u),g&&(B(k,r=d+"Prototype")||ge(k,r,{}),ge(k[r],i,a),e.real&&y&&!y[i]&&ge(y,i,a)))},be={};be[X("toStringTag")]="z";var we="[object z]"===String(be),_e=X("toStringTag"),ke="Arguments"==m(function(){return arguments}()),xe=we?m:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),_e))?n:ke?m(t):"Object"==(r=m(t))&&l(t.callee)?"Arguments":r},Se=Function.toString;l(D.inspectSource)||(D.inspectSource=function(e){return Se.call(e)});var Ce,Ee=D.inspectSource,Ae=[],Te=S("Reflect","construct"),Oe=/^\s*(?:class|function)\b/,Le=Oe.exec,Me=!Oe.exec((function(){})),Re=function(e){if(!l(e))return!1;try{return Te(Object,Ae,e),!0}catch(e){return!1}},Ne=!Te||c((function(){var e;return Re(Re.call)||!Re(Object)||!Re((function(){e=!0}))||e}))?function(e){if(!l(e))return!1;switch(xe(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Me||!!Le.call(Oe,Ee(e))}:Re,Pe=function(e){if(Ne(e))return e;throw TypeError(P(e)+" is not a constructor")},$e=Math.ceil,Ie=Math.floor,De=function(e){var t=+e;return t!=t||0===t?0:(t>0?Ie:$e)(t)},He=Math.max,Fe=Math.min,je=function(e,t){var n=De(e);return n<0?He(n+t,0):Fe(n,t)},Be=Math.min,ze=function(e){return e>0?Be(De(e),9007199254740991):0},We=function(e){return ze(e.length)},Ue=function(e){return function(t,n,r){var i,a=w(t),o=We(a),s=je(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},Ge={includes:Ue(!0),indexOf:Ue(!1)},Ke={},qe=Ge.indexOf,Xe=function(e,t){var n,r=w(e),i=0,a=[];for(n in r)!B(Ke,n)&&B(r,n)&&a.push(n);for(;t.length>i;)B(r,n=t[i++])&&(~qe(a,n)||a.push(n));return a},Ye=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ve=Object.keys||function(e){return Xe(e,Ye)},Ze=u?Object.defineProperties:function(e,t){de(e);for(var n,r=Ve(t),i=r.length,a=0;i>a;)he.f(e,n=r[a++],t[n]);return e},Je=S("document","documentElement"),Qe=H("keys"),et=function(e){return Qe[e]||(Qe[e]=U(e))},tt=et("IE_PROTO"),nt=function(){},rt=function(e){return"<script>"+e+"<\/script>"},it=function(e){e.write(rt("")),e.close();var t=e.parentWindow.Object;return e=null,t},at=function(){try{Ce=new ActiveXObject("htmlfile")}catch(e){}var e,t;at="undefined"!=typeof document?document.domain&&Ce?it(Ce):((t=ee("iframe")).style.display="none",Je.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(rt("document.F=Object")),e.close(),e.F):it(Ce);for(var n=Ye.length;n--;)delete at.prototype[Ye[n]];return at()};Ke[tt]=!0;var ot=Object.create||function(e,t){var n;return null!==e?(nt.prototype=de(e),n=new nt,nt.prototype=null,n[tt]=e):n=at(),void 0===t?n:Ze(n,t)},st=[].slice,lt={},ct=function(e,t,n){if(!(t in lt)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";lt[t]=Function("C,a","return new C("+r.join(",")+")")}return lt[t](e,n)},ut=Function.bind||function(e){var t=$(this),n=st.call(arguments,1),r=function(){var i=n.concat(st.call(arguments));return this instanceof r?ct(t,i.length,i):t.apply(e,i)};return _(t.prototype)&&(r.prototype=t.prototype),r},ft=S("Reflect","construct"),dt=c((function(){function e(){}return!(ft((function(){}),[],e)instanceof e)})),pt=!c((function(){ft((function(){}))})),ht=dt||pt;ye({target:"Reflect",stat:!0,forced:ht,sham:ht},{construct:function(e,t){Pe(e),de(t);var n=arguments.length<3?e:Pe(arguments[2]);if(pt&&!dt)return ft(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(ut.apply(e,r))}var i=n.prototype,a=ot(_(i)?i:Object.prototype),o=Function.apply.call(e,a,t);return _(o)?o:a}});var gt=k.Reflect.construct,mt=gt,vt=n(r((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0})));ye({target:"Object",stat:!0,sham:!u},{create:ot});var yt=k.Object,bt=function(e,t){return yt.create(e,t)},wt=bt,_t=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return de(n),function(e){if("object"==typeof e||l(e))return e;throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(n,r):n.__proto__=r,n}}():void 0);ye({target:"Object",stat:!0},{setPrototypeOf:_t});var kt=k.Object.setPrototypeOf,xt=r((function(e){function t(n,r){return e.exports=t=kt||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}));n(xt);var St=n(r((function(e){e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=wt(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xt(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0}))),Ct=Array.isArray||function(e){return"Array"==m(e)},Et=function(e,t,n){var r=Z(t);r in e?he.f(e,r,h(0,n)):e[r]=n},At=X("species"),Tt=function(e,t){return new(function(e){var t;return Ct(e)&&(t=e.constructor,(Ne(t)&&(t===Array||Ct(t.prototype))||_(t)&&null===(t=t[At]))&&(t=void 0)),void 0===t?Array:t}(e))(0===t?0:t)},Ot=X("species"),Lt=function(e){return L>=51||!c((function(){var t=[];return(t.constructor={})[Ot]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Mt=X("isConcatSpreadable"),Rt=L>=51||!c((function(){var e=[];return e[Mt]=!1,e.concat()[0]!==e})),Nt=Lt("concat"),Pt=function(e){if(!_(e))return!1;var t=e[Mt];return void 0!==t?!!t:Ct(e)};ye({target:"Array",proto:!0,forced:!Rt||!Nt},{concat:function(e){var t,n,r,i,a,o=F(this),s=Tt(o,0),l=0;for(t=-1,r=arguments.length;t<r;t++)if(Pt(a=-1===t?o:arguments[t])){if(l+(i=We(a))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,l++)n in a&&Et(s,l,a[n])}else{if(l>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Et(s,l++,a)}return s.length=l,s}});var $t,It,Dt,Ht=function(e){if("Symbol"===xe(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Ft=Ye.concat("length","prototype"),jt={f:Object.getOwnPropertyNames||function(e){return Xe(e,Ft)}},Bt=jt.f,zt={}.toString,Wt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ut={f:function(e){return Wt&&"[object Window]"==zt.call(e)?function(e){try{return Bt(e)}catch(e){return Wt.slice()}}(e):Bt(w(e))}},Gt={f:Object.getOwnPropertySymbols},Kt=function(e,t,n,r){r&&r.enumerable?e[t]=n:ge(e,t,n)},qt={f:X},Xt=he.f,Yt=function(e){var t=k.Symbol||(k.Symbol={});B(t,e)||Xt(t,e,{value:qt.f(e)})},Vt=we?{}.toString:function(){return"[object "+xe(this)+"]"},Zt=he.f,Jt=X("toStringTag"),Qt=function(e,t,n,r){if(e){var i=n?e:e.prototype;B(i,Jt)||Zt(i,Jt,{configurable:!0,value:t}),r&&!we&&ge(i,"toString",Vt)}},en=s.WeakMap,tn=l(en)&&/native code/.test(Ee(en)),nn=s.WeakMap;if(tn||D.state){var rn=D.state||(D.state=new nn),an=rn.get,on=rn.has,sn=rn.set;$t=function(e,t){if(on.call(rn,e))throw new TypeError("Object already initialized");return t.facade=e,sn.call(rn,e,t),t},It=function(e){return an.call(rn,e)||{}},Dt=function(e){return on.call(rn,e)}}else{var ln=et("state");Ke[ln]=!0,$t=function(e,t){if(B(e,ln))throw new TypeError("Object already initialized");return t.facade=e,ge(e,ln,t),t},It=function(e){return B(e,ln)?e[ln]:{}},Dt=function(e){return B(e,ln)}}var cn={set:$t,get:It,has:Dt,enforce:function(e){return Dt(e)?It(e):$t(e,{})},getterFor:function(e){return function(t){var n;if(!_(t)||(n=It(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},un=[].push,fn=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(l,c,u,f){for(var d,p,h=F(l),g=y(h),m=fe(c,u,3),v=We(g),b=0,w=f||Tt,_=t?w(l,v):n||o?w(l,0):void 0;v>b;b++)if((s||b in g)&&(p=m(d=g[b],b,h),e))if(t)_[b]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return b;case 2:un.call(_,d)}else switch(e){case 4:return!1;case 7:un.call(_,d)}return a?-1:r||i?i:_}},dn={forEach:fn(0),map:fn(1),filter:fn(2),some:fn(3),every:fn(4),find:fn(5),findIndex:fn(6),filterReject:fn(7)},pn=dn.forEach,hn=et("hidden"),gn=X("toPrimitive"),mn=cn.set,vn=cn.getterFor("Symbol"),yn=Object.prototype,bn=s.Symbol,wn=S("JSON","stringify"),_n=re.f,kn=he.f,xn=Ut.f,Sn=p.f,Cn=H("symbols"),En=H("op-symbols"),An=H("string-to-symbol-registry"),Tn=H("symbol-to-string-registry"),On=H("wks"),Ln=s.QObject,Mn=!Ln||!Ln.prototype||!Ln.prototype.findChild,Rn=u&&c((function(){return 7!=ot(kn({},"a",{get:function(){return kn(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=_n(yn,t);r&&delete yn[t],kn(e,t,n),r&&e!==yn&&kn(yn,t,r)}:kn,Nn=function(e,t){var n=Cn[e]=ot(bn.prototype);return mn(n,{type:"Symbol",tag:e,description:t}),u||(n.description=t),n},Pn=function(e,t,n){e===yn&&Pn(En,t,n),de(e);var r=Z(t);return de(n),B(Cn,r)?(n.enumerable?(B(e,hn)&&e[hn][r]&&(e[hn][r]=!1),n=ot(n,{enumerable:h(0,!1)})):(B(e,hn)||kn(e,hn,h(1,{})),e[hn][r]=!0),Rn(e,r,n)):kn(e,r,n)},$n=function(e,t){de(e);var n=w(t),r=Ve(n).concat(Fn(n));return pn(r,(function(t){u&&!In.call(n,t)||Pn(e,t,n[t])})),e},In=function(e){var t=Z(e),n=Sn.call(this,t);return!(this===yn&&B(Cn,t)&&!B(En,t))&&(!(n||!B(this,t)||!B(Cn,t)||B(this,hn)&&this[hn][t])||n)},Dn=function(e,t){var n=w(e),r=Z(t);if(n!==yn||!B(Cn,r)||B(En,r)){var i=_n(n,r);return!i||!B(Cn,r)||B(n,hn)&&n[hn][r]||(i.enumerable=!0),i}},Hn=function(e){var t=xn(w(e)),n=[];return pn(t,(function(e){B(Cn,e)||B(Ke,e)||n.push(e)})),n},Fn=function(e){var t=e===yn,n=xn(t?En:w(e)),r=[];return pn(n,(function(e){!B(Cn,e)||t&&!B(yn,e)||r.push(Cn[e])})),r};if(M||(Kt((bn=function(){if(this instanceof bn)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Ht(arguments[0]):void 0,t=U(e),n=function(e){this===yn&&n.call(En,e),B(this,hn)&&B(this[hn],t)&&(this[hn][t]=!1),Rn(this,t,h(1,e))};return u&&Mn&&Rn(yn,t,{configurable:!0,set:n}),Nn(t,e)}).prototype,"toString",(function(){return vn(this).tag})),Kt(bn,"withoutSetter",(function(e){return Nn(U(e),e)})),p.f=In,he.f=Pn,re.f=Dn,jt.f=Ut.f=Hn,Gt.f=Fn,qt.f=function(e){return Nn(X(e),e)},u&&kn(bn.prototype,"description",{configurable:!0,get:function(){return vn(this).description}})),ye({global:!0,wrap:!0,forced:!M,sham:!M},{Symbol:bn}),pn(Ve(On),(function(e){Yt(e)})),ye({target:"Symbol",stat:!0,forced:!M},{for:function(e){var t=Ht(e);if(B(An,t))return An[t];var n=bn(t);return An[t]=n,Tn[n]=t,n},keyFor:function(e){if(!N(e))throw TypeError(e+" is not a symbol");if(B(Tn,e))return Tn[e]},useSetter:function(){Mn=!0},useSimple:function(){Mn=!1}}),ye({target:"Object",stat:!0,forced:!M,sham:!u},{create:function(e,t){return void 0===t?ot(e):$n(ot(e),t)},defineProperty:Pn,defineProperties:$n,getOwnPropertyDescriptor:Dn}),ye({target:"Object",stat:!0,forced:!M},{getOwnPropertyNames:Hn,getOwnPropertySymbols:Fn}),ye({target:"Object",stat:!0,forced:c((function(){Gt.f(1)}))},{getOwnPropertySymbols:function(e){return Gt.f(F(e))}}),wn){var jn=!M||c((function(){var e=bn();return"[null]"!=wn([e])||"{}"!=wn({a:e})||"{}"!=wn(Object(e))}));ye({target:"JSON",stat:!0,forced:jn},{stringify:function(e,t,n){for(var r,i=[e],a=1;arguments.length>a;)i.push(arguments[a++]);if(r=t,(_(t)||void 0!==e)&&!N(e))return Ct(t)||(t=function(e,t){if(l(r)&&(t=r.call(this,e,t)),!N(t))return t}),i[1]=t,wn.apply(null,i)}})}if(!bn.prototype[gn]){var Bn=bn.prototype.valueOf;Kt(bn.prototype,gn,(function(){return Bn.apply(this,arguments)}))}Qt(bn,"Symbol"),Ke[hn]=!0,Yt("asyncIterator"),Yt("hasInstance"),Yt("isConcatSpreadable"),Yt("iterator"),Yt("match"),Yt("matchAll"),Yt("replace"),Yt("search"),Yt("species"),Yt("split"),Yt("toPrimitive"),Yt("toStringTag"),Yt("unscopables"),Qt(s.JSON,"JSON",!0);var zn,Wn,Un,Gn=k.Symbol,Kn={},qn=Function.prototype,Xn=u&&Object.getOwnPropertyDescriptor,Yn=B(qn,"name"),Vn={EXISTS:Yn,PROPER:Yn&&"something"===function(){}.name,CONFIGURABLE:Yn&&(!u||u&&Xn(qn,"name").configurable)},Zn=!c((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Jn=et("IE_PROTO"),Qn=Object.prototype,er=Zn?Object.getPrototypeOf:function(e){var t=F(e);if(B(t,Jn))return t[Jn];var n=t.constructor;return l(n)&&t instanceof n?n.prototype:t instanceof Object?Qn:null},tr=X("iterator"),nr=!1;[].keys&&("next"in(Un=[].keys())?(Wn=er(er(Un)))!==Object.prototype&&(zn=Wn):nr=!0);var rr=null==zn||c((function(){var e={};return zn[tr].call(e)!==e}));zn=rr?{}:ot(zn),l(zn[tr])||Kt(zn,tr,(function(){return this}));var ir={IteratorPrototype:zn,BUGGY_SAFARI_ITERATORS:nr},ar=ir.IteratorPrototype,or=function(){return this},sr=Vn.PROPER,lr=ir.BUGGY_SAFARI_ITERATORS,cr=X("iterator"),ur=function(){return this},fr=function(e,t,n,r,i,a,o){!function(e,t,n){var r=t+" Iterator";e.prototype=ot(ar,{next:h(1,n)}),Qt(e,r,!1,!0),Kn[r]=or}(n,t,r);var s,l,c,u=function(e){if(e===i&&m)return m;if(!lr&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",d=!1,p=e.prototype,g=p[cr]||p["@@iterator"]||i&&p[i],m=!lr&&g||u(i),v="Array"==t&&p.entries||g;if(v&&(s=er(v.call(new e)))!==Object.prototype&&s.next&&(Qt(s,f,!0,!0),Kn[f]=ur),sr&&"values"==i&&g&&"values"!==g.name&&(d=!0,m=function(){return g.call(this)}),i)if(l={values:u("values"),keys:a?m:u("keys"),entries:u("entries")},o)for(c in l)(lr||d||!(c in p))&&Kt(p,c,l[c]);else ye({target:t,proto:!0,forced:lr||d},l);return o&&p[cr]!==m&&Kt(p,cr,m,{name:i}),Kn[t]=m,l},dr=cn.set,pr=cn.getterFor("Array Iterator");fr(Array,"Array",(function(e,t){dr(this,{type:"Array Iterator",target:w(e),index:0,kind:t})}),(function(){var e=pr(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");Kn.Arguments=Kn.Array;var hr=X("toStringTag");for(var gr 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 mr=s[gr],vr=mr&&mr.prototype;vr&&xe(vr)!==hr&&ge(vr,hr,gr),Kn[gr]=Kn.Array}var yr=Gn;Yt("asyncDispose"),Yt("dispose"),Yt("matcher"),Yt("metadata"),Yt("observable"),Yt("patternMatch"),Yt("replaceAll");var br=yr,wr=function(e){return function(t,n){var r,i,a=Ht(b(t)),o=De(n),s=a.length;return o<0||o>=s?e?"":void 0:(r=a.charCodeAt(o))<55296||r>56319||o+1===s||(i=a.charCodeAt(o+1))<56320||i>57343?e?a.charAt(o):r:e?a.slice(o,o+2):i-56320+(r-55296<<10)+65536}},_r={codeAt:wr(!1),charAt:wr(!0)}.charAt,kr=cn.set,xr=cn.getterFor("String Iterator");fr(String,"String",(function(e){kr(this,{type:"String Iterator",string:Ht(e),index:0})}),(function(){var e,t=xr(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=_r(n,r),t.index+=e.length,{value:e,done:!1})}));var Sr=qt.f("iterator"),Cr=r((function(e){function t(n){return"function"==typeof br&&"symbol"==typeof Sr?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof br&&e.constructor===br&&e!==br.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),Er=n(Cr),Ar=r((function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0})),Tr=n(Ar),Or=n(r((function(e){var t=Cr.default;e.exports=function(e,n){if(n&&("object"===t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Ar(e)},e.exports.default=e.exports,e.exports.__esModule=!0}))),Lr=c((function(){er(1)}));ye({target:"Object",stat:!0,forced:Lr,sham:!Zn},{getPrototypeOf:function(e){return er(F(e))}});var Mr=k.Object.getPrototypeOf,Rr=r((function(e){function t(n){return e.exports=t=kt?Mr:function(e){return e.__proto__||Mr(e)},e.exports.default=e.exports,e.exports.__esModule=!0,t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),Nr=n(Rr);ye({target:"Object",stat:!0,forced:!u,sham:!u},{defineProperty:he.f});var Pr=r((function(e){var t=k.Object,n=e.exports=function(e,n,r){return t.defineProperty(e,n,r)};t.defineProperty.sham&&(n.sham=!0)})),$r=Pr,Ir=n(r((function(e){e.exports=function(e,t,n){return t in e?$r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0})));var Dr=function(){this.__data__=[],this.size=0};var Hr=function(e,t){return e===t||e!=e&&t!=t};var Fr=function(e,t){for(var n=e.length;n--;)if(Hr(e[n][0],t))return n;return-1},jr=Array.prototype.splice;var Br=function(e){var t=this.__data__,n=Fr(t,e);return!(n<0)&&(n==t.length-1?t.pop():jr.call(t,n,1),--this.size,!0)};var zr=function(e){var t=this.__data__,n=Fr(t,e);return n<0?void 0:t[n][1]};var Wr=function(e){return Fr(this.__data__,e)>-1};var Ur=function(e,t){var n=this.__data__,r=Fr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Gr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Gr.prototype.clear=Dr,Gr.prototype.delete=Br,Gr.prototype.get=zr,Gr.prototype.has=Wr,Gr.prototype.set=Ur;var Kr=Gr;var qr=function(){this.__data__=new Kr,this.size=0};var Xr=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var Yr=function(e){return this.__data__.get(e)};var Vr=function(e){return this.__data__.has(e)},Zr="object"==typeof t&&t&&t.Object===Object&&t,Jr="object"==typeof self&&self&&self.Object===Object&&self,Qr=Zr||Jr||Function("return this")(),ei=Qr.Symbol,ti=Object.prototype,ni=ti.hasOwnProperty,ri=ti.toString,ii=ei?ei.toStringTag:void 0;var ai=function(e){var t=ni.call(e,ii),n=e[ii];try{e[ii]=void 0;var r=!0}catch(e){}var i=ri.call(e);return r&&(t?e[ii]=n:delete e[ii]),i},oi=Object.prototype.toString;var si=function(e){return oi.call(e)},li=ei?ei.toStringTag:void 0;var ci=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":li&&li in Object(e)?ai(e):si(e)};var ui=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var fi=function(e){if(!ui(e))return!1;var t=ci(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},di=Qr["__core-js_shared__"],pi=function(){var e=/[^.]+$/.exec(di&&di.keys&&di.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var hi=function(e){return!!pi&&pi in e},gi=Function.prototype.toString;var mi=function(e){if(null!=e){try{return gi.call(e)}catch(e){}try{return e+""}catch(e){}}return""},vi=/^\[object .+?Constructor\]$/,yi=Function.prototype,bi=Object.prototype,wi=yi.toString,_i=bi.hasOwnProperty,ki=RegExp("^"+wi.call(_i).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var xi=function(e){return!(!ui(e)||hi(e))&&(fi(e)?ki:vi).test(mi(e))};var Si=function(e,t){return null==e?void 0:e[t]};var Ci=function(e,t){var n=Si(e,t);return xi(n)?n:void 0},Ei=Ci(Qr,"Map"),Ai=Ci(Object,"create");var Ti=function(){this.__data__=Ai?Ai(null):{},this.size=0};var Oi=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Li=Object.prototype.hasOwnProperty;var Mi=function(e){var t=this.__data__;if(Ai){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Li.call(t,e)?t[e]:void 0},Ri=Object.prototype.hasOwnProperty;var Ni=function(e){var t=this.__data__;return Ai?void 0!==t[e]:Ri.call(t,e)};var Pi=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ai&&void 0===t?"__lodash_hash_undefined__":t,this};function $i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}$i.prototype.clear=Ti,$i.prototype.delete=Oi,$i.prototype.get=Mi,$i.prototype.has=Ni,$i.prototype.set=Pi;var Ii=$i;var Di=function(){this.size=0,this.__data__={hash:new Ii,map:new(Ei||Kr),string:new Ii}};var Hi=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Fi=function(e,t){var n=e.__data__;return Hi(t)?n["string"==typeof t?"string":"hash"]:n.map};var ji=function(e){var t=Fi(this,e).delete(e);return this.size-=t?1:0,t};var Bi=function(e){return Fi(this,e).get(e)};var zi=function(e){return Fi(this,e).has(e)};var Wi=function(e,t){var n=Fi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ui(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ui.prototype.clear=Di,Ui.prototype.delete=ji,Ui.prototype.get=Bi,Ui.prototype.has=zi,Ui.prototype.set=Wi;var Gi=Ui;var Ki=function(e,t){var n=this.__data__;if(n instanceof Kr){var r=n.__data__;if(!Ei||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gi(r)}return n.set(e,t),this.size=n.size,this};function qi(e){var t=this.__data__=new Kr(e);this.size=t.size}qi.prototype.clear=qr,qi.prototype.delete=Xr,qi.prototype.get=Yr,qi.prototype.has=Vr,qi.prototype.set=Ki;var Xi=qi,Yi=function(){try{var e=Ci(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Vi=function(e,t,n){"__proto__"==t&&Yi?Yi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var Zi=function(e,t,n){(void 0!==n&&!Hr(e[t],n)||void 0===n&&!(t in e))&&Vi(e,t,n)};var Ji=function(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(!1===n(a[l],l,a))break}return t}}(),Qi=r((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n?Qr.Buffer:void 0,a=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}})),ea=Qr.Uint8Array;var ta=function(e){var t=new e.constructor(e.byteLength);return new ea(t).set(new ea(e)),t};var na=function(e,t){var n=t?ta(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var ra=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},ia=Object.create,aa=function(){function e(){}return function(t){if(!ui(t))return{};if(ia)return ia(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var oa=function(e,t){return function(n){return e(t(n))}},sa=oa(Object.getPrototypeOf,Object),la=Object.prototype;var ca=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||la)};var ua=function(e){return"function"!=typeof e.constructor||ca(e)?{}:aa(sa(e))};var fa=function(e){return null!=e&&"object"==typeof e};var da=function(e){return fa(e)&&"[object Arguments]"==ci(e)},pa=Object.prototype,ha=pa.hasOwnProperty,ga=pa.propertyIsEnumerable,ma=da(function(){return arguments}())?da:function(e){return fa(e)&&ha.call(e,"callee")&&!ga.call(e,"callee")},va=Array.isArray;var ya=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ba=function(e){return null!=e&&ya(e.length)&&!fi(e)};var wa=function(e){return fa(e)&&ba(e)};var _a=function(){return!1},ka=r((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n?Qr.Buffer:void 0,a=(i?i.isBuffer:void 0)||_a;e.exports=a})),xa=Function.prototype,Sa=Object.prototype,Ca=xa.toString,Ea=Sa.hasOwnProperty,Aa=Ca.call(Object);var Ta=function(e){if(!fa(e)||"[object Object]"!=ci(e))return!1;var t=sa(e);if(null===t)return!0;var n=Ea.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ca.call(n)==Aa},Oa={};Oa["[object Float32Array]"]=Oa["[object Float64Array]"]=Oa["[object Int8Array]"]=Oa["[object Int16Array]"]=Oa["[object Int32Array]"]=Oa["[object Uint8Array]"]=Oa["[object Uint8ClampedArray]"]=Oa["[object Uint16Array]"]=Oa["[object Uint32Array]"]=!0,Oa["[object Arguments]"]=Oa["[object Array]"]=Oa["[object ArrayBuffer]"]=Oa["[object Boolean]"]=Oa["[object DataView]"]=Oa["[object Date]"]=Oa["[object Error]"]=Oa["[object Function]"]=Oa["[object Map]"]=Oa["[object Number]"]=Oa["[object Object]"]=Oa["[object RegExp]"]=Oa["[object Set]"]=Oa["[object String]"]=Oa["[object WeakMap]"]=!1;var La=function(e){return fa(e)&&ya(e.length)&&!!Oa[ci(e)]};var Ma=function(e){return function(t){return e(t)}},Ra=r((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n&&Zr.process,a=function(){try{var e=r&&r.require&&r.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=a})),Na=Ra&&Ra.isTypedArray,Pa=Na?Ma(Na):La;var $a=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Ia=Object.prototype.hasOwnProperty;var Da=function(e,t,n){var r=e[t];Ia.call(e,t)&&Hr(r,n)&&(void 0!==n||t in e)||Vi(e,t,n)};var Ha=function(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?Vi(n,s,l):Da(n,s,l)}return n};var Fa=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},ja=/^(?:0|[1-9]\d*)$/;var Ba=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ja.test(e))&&e>-1&&e%1==0&&e<t},za=Object.prototype.hasOwnProperty;var Wa=function(e,t){var n=va(e),r=!n&&ma(e),i=!n&&!r&&ka(e),a=!n&&!r&&!i&&Pa(e),o=n||r||i||a,s=o?Fa(e.length,String):[],l=s.length;for(var c in e)!t&&!za.call(e,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ba(c,l))||s.push(c);return s};var Ua=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Ga=Object.prototype.hasOwnProperty;var Ka=function(e){if(!ui(e))return Ua(e);var t=ca(e),n=[];for(var r in e)("constructor"!=r||!t&&Ga.call(e,r))&&n.push(r);return n};var qa=function(e){return ba(e)?Wa(e,!0):Ka(e)};var Xa=function(e){return Ha(e,qa(e))};var Ya=function(e,t,n,r,i,a,o){var s=$a(e,n),l=$a(t,n),c=o.get(l);if(c)Zi(e,n,c);else{var u=a?a(s,l,n+"",e,t,o):void 0,f=void 0===u;if(f){var d=va(l),p=!d&&ka(l),h=!d&&!p&&Pa(l);u=l,d||p||h?va(s)?u=s:wa(s)?u=ra(s):p?(f=!1,u=Qi(l,!0)):h?(f=!1,u=na(l,!0)):u=[]:Ta(l)||ma(l)?(u=s,ma(s)?u=Xa(s):ui(s)&&!fi(s)||(u=ua(l))):f=!1}f&&(o.set(l,u),i(u,l,r,a,o),o.delete(l)),Zi(e,n,u)}};var Va=function e(t,n,r,i,a){t!==n&&Ji(n,(function(o,s){if(a||(a=new Xi),ui(o))Ya(t,n,s,r,e,i,a);else{var l=i?i($a(t,s),o,s+"",t,n,a):void 0;void 0===l&&(l=o),Zi(t,s,l)}}),qa)};var Za=function(e){return e};var Ja=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Qa=Math.max;var eo=function(e,t,n){return t=Qa(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Qa(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Ja(e,this,s)}};var to=function(e){return function(){return e}},no=Yi?function(e,t){return Yi(e,"toString",{configurable:!0,enumerable:!1,value:to(t),writable:!0})}:Za,ro=Date.now;var io=function(e){var t=0,n=0;return function(){var r=ro(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(no);var ao=function(e,t){return io(eo(e,t,Za),e+"")};var oo=function(e,t,n){if(!ui(n))return!1;var r=typeof t;return!!("number"==r?ba(n)&&Ba(t,n.length):"string"==r&&t in n)&&Hr(n[t],e)};var so=function(e){return ao((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&oo(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t}))}((function(e,t,n,r){Va(e,t,n,r)})),lo=n(r((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),$r(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0}))),co=Pr;ye({target:"Function",proto:!0},{bind:ut});var uo=function(e){return k[e+"Prototype"]},fo=uo("Function").bind,po=Function.prototype,ho=function(e){var t=e.bind;return e===po||e instanceof Function&&t===po.bind?fo:t},go=ho,mo=uo("Array").concat,vo=Array.prototype,yo=function(e){var t=e.concat;return e===vo||e instanceof Array&&t===vo.concat?mo:t},bo=function(e,t){var n=[][e];return!!n&&c((function(){n.call(null,t||function(){throw 1},1)}))},wo=dn.forEach,_o=bo("forEach")?[].forEach:function(e){return wo(this,e,arguments.length>1?arguments[1]:void 0)};ye({target:"Array",proto:!0,forced:[].forEach!=_o},{forEach:_o});var ko=uo("Array").forEach,xo=Array.prototype,So={DOMTokenList:!0,NodeList:!0},Co=function(e){var t=e.forEach;return e===xo||e instanceof Array&&t===xo.forEach||So.hasOwnProperty(xe(e))?ko:t},Eo=c((function(){Ve(1)}));ye({target:"Object",stat:!0,forced:Eo},{keys:function(e){return Ve(F(e))}});var Ao=k.Object.keys,To=dn.filter,Oo=Lt("filter");ye({target:"Array",proto:!0,forced:!Oo},{filter:function(e){return To(this,e,arguments.length>1?arguments[1]:void 0)}});var Lo=uo("Array").filter,Mo=Array.prototype,Ro=function(e){var t=e.filter;return e===Mo||e instanceof Array&&t===Mo.filter?Lo:t},No=dn.findIndex,Po=!0;"findIndex"in[]&&Array(1).findIndex((function(){Po=!1})),ye({target:"Array",proto:!0,forced:Po},{findIndex:function(e){return No(this,e,arguments.length>1?arguments[1]:void 0)}});var $o=uo("Array").findIndex,Io=Array.prototype,Do=function(e){var t=e.findIndex;return e===Io||e instanceof Array&&t===Io.findIndex?$o:t},Ho=Lt("splice"),Fo=Math.max,jo=Math.min;ye({target:"Array",proto:!0,forced:!Ho},{splice:function(e,t){var n,r,i,a,o,s,l=F(this),c=We(l),u=je(e,c),f=arguments.length;if(0===f?n=r=0:1===f?(n=0,r=c-u):(n=f-2,r=jo(Fo(De(t),0),c-u)),c+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(i=Tt(l,r),a=0;a<r;a++)(o=u+a)in l&&Et(i,a,l[o]);if(i.length=r,n<r){for(a=u;a<c-r;a++)s=a+n,(o=a+r)in l?l[s]=l[o]:delete l[s];for(a=c;a>c-r+n;a--)delete l[a-1]}else if(n>r)for(a=c-r;a>u;a--)s=a+n-1,(o=a+r-1)in l?l[s]=l[o]:delete l[s];for(a=0;a<n;a++)l[a+u]=arguments[a+2];return l.length=c-r+n,i}});var Bo=uo("Array").splice,zo=Array.prototype,Wo=function(e){var t=e.splice;return e===zo||e instanceof Array&&t===zo.splice?Bo:t},Uo=!1,Go={SEN:"sentence",PAR:"paragraph",DEFAULT:"sentence"},Ko=function(){function e(t){vt(this,e),Ir(this,"$engine",void 0),this.RULE=this.rule(t)}return lo(e,[{key:"getType",value:function(){return this.constructor.HOOK_TYPE||Go.DEFAULT}},{key:"getName",value:function(){return this.constructor.HOOK_NAME}},{key:"beforeMakeHtml",value:function(e){return e}},{key:"makeHtml",value:function(e){return e}},{key:"afterMakeHtml",value:function(e){return e}},{key:"onKeyDown",value:function(e,t){}},{key:"getOnKeyDown",value:function(){return this.onKeyDown||!1}},{key:"getAttributesTest",value:function(){return/^(color|fontSize|font-size|id|title|class|target|underline|line-through|overline|sub|super)$/}},{key:"$testAttributes",value:function(e,t){this.getAttributesTest().test(e)&&t()}},{key:"getAttributes",value:function(e){return{attrs:{},str:e}}},{key:"test",value:function(e){return!!this.RULE.reg&&this.RULE.reg.test(e)}},{key:"rule",value:function(e){return{begin:"",end:"",content:"",reg:new RegExp("")}}},{key:"mounted",value:function(){}}],[{key:"getMathJaxConfig",value:function(){return Uo}},{key:"setMathJaxConfig",value:function(e){Uo=e}}]),e}();Ir(Ko,"HOOK_NAME","default"),Ir(Ko,"HOOK_TYPE",Go.DEFAULT);var qo=dn.map,Xo=Lt("map");ye({target:"Array",proto:!0,forced:!Xo},{map:function(e){return qo(this,e,arguments.length>1?arguments[1]:void 0)}});var Yo,Vo=uo("Array").map,Zo=Array.prototype,Jo=function(e){var t=e.map;return e===Zo||e instanceof Array&&t===Zo.map?Vo:t},Qo="\t\n\v\f\r                　\u2028\u2029\ufeff",es="["+Qo+"]",ts=RegExp("^"+es+es+"*"),ns=RegExp(es+es+"*$"),rs=function(e){return function(t){var n=Ht(b(t));return 1&e&&(n=n.replace(ts,"")),2&e&&(n=n.replace(ns,"")),n}},is={start:rs(1),end:rs(2),trim:rs(3)},as=Vn.PROPER,os=is.trim;ye({target:"String",proto:!0,forced:(Yo="trim",c((function(){return!!Qo[Yo]()||"​᠎"!=="​᠎"[Yo]()||as&&Qo[Yo].name!==Yo})))},{trim:function(){return os(this)}});var ss=uo("String").trim,ls=String.prototype,cs=function(e){var t=e.trim;return"string"==typeof e||e===ls||e instanceof String&&t===ls.trim?ss:t},us=is.trim,fs=s.parseInt,ds=s.Symbol,ps=ds&&ds.iterator,hs=/^[+-]?0x/i,gs=8!==fs(Qo+"08")||22!==fs(Qo+"0x16")||ps&&!c((function(){fs(Object(ps))}))?function(e,t){var n=us(Ht(e));return fs(n,t>>>0||(hs.test(n)?16:10))}:fs;ye({global:!0,forced:parseInt!=gs},{parseInt:gs});var ms=k.parseInt;function vs(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!/^\n/.test(e))return t;if(n){var r,i,a,o=null!==(r=null===(i=e.match(/^\n+/g))||void 0===i||null===(a=i[0])||void 0===a?void 0:a.length)&&void 0!==r?r:0;return o>1?"\n\n".concat(t):"\n".concat(t)}return"\n\n".concat(t)}function ys(e,t){var n=(e.match(/\n/g)||[]).length;return""!==e&&(n-=2),n+t}function bs(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}var ws=0,_s=function(e){St(n,e);var t=bs(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{needCache:!1},i=r.needCache,a=r.defaultCache,o=void 0===a?{}:a;return vt(this,n),(e=t.call(this,{})).cacheState=!!i,i&&(e.cache=o||{},e.cacheKey="~~C".concat(ws),ws+=1),e}return lo(n,[{key:"makeHtml",value:function(e,t){return t(e).html}},{key:"afterMakeHtml",value:function(e){return this.restoreCache(e)}},{key:"isContainsCache",value:function(e,t){if(t){var r=/^(\s*~~C\d+I\w+\$\s*)+$/g.test(e),i=new RegExp("~~C\\d+I".concat(n.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX,"\\w+\\$"),"g").test(e);return r&&!i}return new RegExp("~~C\\d+I(?!".concat(n.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX,")\\w+\\$"),"g").test(e)}},{key:"$splitHtmlByCache",value:function(e){var t=new RegExp("\\n*~~C\\d+I(?!".concat(n.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX,")\\w+\\$\\n?"),"g");return{caches:e.match(t),contents:e.split(t)}}},{key:"makeExcludingCached",value:function(e,t){for(var n=this.$splitHtmlByCache(e),r=n.caches,i=n.contents,a=Jo(i).call(i,t),o="",s=0;s<a.length;s++){var l;if(o+=a[s],r&&r[s])o+=cs(l=r[s]).call(l)}return o}},{key:"getCacheWithSpace",value:function(e,t){var n,r,i,a,o,s,l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=null!==(n=null===(r=t.match(/^\n+/))||void 0===r?void 0:r[0])&&void 0!==n?n:"",u=null!==(i=null===(a=t.match(/\n+$/))||void 0===a?void 0:a[0])&&void 0!==i?i:"";return l?vs(t,e):yo(o=yo(s="".concat(c)).call(s,e)).call(o,u)}},{key:"getLineCount",value:function(e){var t,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=e,s=null!==(t=null===(r=a.match(/^\n+/g))||void 0===r||null===(i=r[0])||void 0===i?void 0:i.length)&&void 0!==t?t:0;s=1===s?1:0,o=o.replace(/^\n+/g,"");var l=new RegExp("\n*~~C\\d+I(?:".concat(n.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX,")?\\w+?_L(\\d+)\\$"),"g"),c=0;return o=o.replace(l,(function(e,t){return c+=ms(t,10),e.replace(/^\n+/g,"")})),s+c+(o.match(/\n/g)||[]).length+1}},{key:"pushCache",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.cacheState){var a=r||this.$engine.md5(e);return this.cache[a]=e,yo(t=yo(n="".concat(this.cacheKey,"I")).call(n,a,"_L")).call(t,i,"$")}}},{key:"popCache",value:function(e){if(this.cacheState)return this.cache[e]||""}},{key:"resetCache",value:function(e){this.cacheState&&(this.cache=e||{})}},{key:"restoreCache",value:function(e){var t,r=this;if(!this.cacheState)return e;var i=new RegExp(yo(t="".concat(this.cacheKey,"I((?:")).call(t,n.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX,")?\\w+)\\$"),"g"),a=e.replace(i,(function(e,t){return r.popCache(t.replace(/_L\d+$/,""))}));return this.resetCache(),a}},{key:"mounted",value:function(){}},{key:"signWithCache",value:function(e){return!1}}]),n}(Ko);Ir(_s,"HOOK_TYPE",Go.PAR),Ir(_s,"IN_PARAGRAPH_CACHE_KEY_PREFIX","!"),Ir(_s,"IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX","\\!");var ks=!c((function(){return Object.isExtensible(Object.preventExtensions({}))})),xs=r((function(e){var t=he.f,n=!1,r=U("meta"),i=0,a=Object.isExtensible||function(){return!0},o=function(e){t(e,r,{value:{objectID:"O"+i++,weakData:{}}})},s=e.exports={enable:function(){s.enable=function(){},n=!0;var e=jt.f,t=[].splice,i={};i[r]=1,e(i).length&&(jt.f=function(n){for(var i=e(n),a=0,o=i.length;a<o;a++)if(i[a]===r){t.call(i,a,1);break}return i},ye({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Ut.f}))},fastKey:function(e,t){if(!_(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!B(e,r)){if(!a(e))return"F";if(!t)return"E";o(e)}return e[r].objectID},getWeakData:function(e,t){if(!B(e,r)){if(!a(e))return!0;if(!t)return!1;o(e)}return e[r].weakData},onFreeze:function(e){return ks&&n&&a(e)&&!B(e,r)&&o(e),e}};Ke[r]=!0})),Ss=(xs.enable,xs.fastKey,xs.getWeakData,xs.onFreeze,X("iterator")),Cs=Array.prototype,Es=function(e){return void 0!==e&&(Kn.Array===e||Cs[Ss]===e)},As=X("iterator"),Ts=function(e){if(null!=e)return I(e,As)||I(e,"@@iterator")||Kn[xe(e)]},Os=function(e,t){var n=arguments.length<2?Ts(e):t;if($(n))return de(n.call(e));throw TypeError(String(e)+" is not iterable")},Ls=function(e,t,n){var r,i;de(e);try{if(!(r=I(e,"return"))){if("throw"===t)throw n;return n}r=r.call(e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return de(r),n},Ms=function(e,t){this.stopped=e,this.result=t},Rs=function(e,t,n){var r,i,a,o,s,l,c,u=n&&n.that,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),h=fe(t,u,1+f+p),g=function(e){return r&&Ls(r,"normal",e),new Ms(!0,e)},m=function(e){return f?(de(e),p?h(e[0],e[1],g):h(e[0],e[1])):p?h(e,g):h(e)};if(d)r=e;else{if(!(i=Ts(e)))throw TypeError(String(e)+" is not iterable");if(Es(i)){for(a=0,o=We(e);o>a;a++)if((s=m(e[a]))&&s instanceof Ms)return s;return new Ms(!1)}r=Os(e,i)}for(l=r.next;!(c=l.call(r)).done;){try{s=m(c.value)}catch(e){Ls(r,"throw",e)}if("object"==typeof s&&s&&s instanceof Ms)return s}return new Ms(!1)},Ns=function(e,t,n){if(e instanceof t)return e;throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")},Ps=he.f,$s=dn.forEach,Is=cn.set,Ds=cn.getterFor,Hs=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:Kt(e,r,t[r],n);return e},Fs=X("species"),js=he.f,Bs=xs.fastKey,zs=cn.set,Ws=cn.getterFor,Us=(function(e,t,n){var r,i=-1!==e.indexOf("Map"),a=-1!==e.indexOf("Weak"),o=i?"set":"add",f=s[e],d=f&&f.prototype,p={};if(u&&l(f)&&(a||d.forEach&&!c((function(){(new f).entries().next()})))){r=t((function(t,n){Is(Ns(t,r,e),{type:e,collection:new f}),null!=n&&Rs(n,t[o],{that:t,AS_ENTRIES:i})}));var h=Ds(e);$s(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in d)||a&&"clear"==e||ge(r.prototype,e,(function(n,r){var i=h(this).collection;if(!t&&a&&!_(n))return"get"==e&&void 0;var o=i[e](0===n?0:n,r);return t?this:o}))})),a||Ps(r.prototype,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else r=n.getConstructor(t,e,i,o),xs.enable();Qt(r,e,!1,!0),p[e]=r,ye({global:!0,forced:!0},p),a||n.setStrong(r,e,i)}("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(e,t,n,r){var i=e((function(e,a){Ns(e,i,t),zs(e,{type:t,index:ot(null),first:void 0,last:void 0,size:0}),u||(e.size=0),null!=a&&Rs(a,e[r],{that:e,AS_ENTRIES:n})})),a=Ws(t),o=function(e,t,n){var r,i,o=a(e),l=s(e,t);return l?l.value=n:(o.last=l={index:i=Bs(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=l),r&&(r.next=l),u?o.size++:e.size++,"F"!==i&&(o.index[i]=l)),e},s=function(e,t){var n,r=a(e),i=Bs(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return Hs(i.prototype,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,u?e.size=0:this.size=0},delete:function(e){var t=a(this),n=s(this,e);if(n){var r=n.next,i=n.previous;delete t.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),t.first==n&&(t.first=r),t.last==n&&(t.last=i),u?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=a(this),r=fe(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!s(this,e)}}),Hs(i.prototype,n?{get:function(e){var t=s(this,e);return t&&t.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),u&&js(i.prototype,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=Ws(t),a=Ws(r);fr(e,t,(function(e,t){zs(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),function(e){var t=S(e),n=he.f;u&&t&&!t[Fs]&&n(t,Fs,{configurable:!0,get:function(){return this}})}(t)}}),k.Map);ye({target:"Map",stat:!0},{from:function(e){var t,n,r,i,a=arguments.length,o=a>1?arguments[1]:void 0;return Pe(this),(t=void 0!==o)&&$(o),null==e?new this:(n=[],t?(r=0,i=fe(o,a>2?arguments[2]:void 0,2),Rs(e,(function(e){n.push(i(e,r++))}))):Rs(e,n.push,{that:n}),new this(n))}});ye({target:"Map",stat:!0},{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}});var Gs=function(){for(var e,t=de(this),n=$(t.delete),r=!0,i=0,a=arguments.length;i<a;i++)e=n.call(t,arguments[i]),r=r&&e;return!!r};ye({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){return Gs.apply(this,arguments)}});ye({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n=de(this),r=n.has(e)&&"update"in t?t.update(n.get(e),e,n):t.insert(e,n);return n.set(e,r),r}});var Ks=Os;ye({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=de(this),n=Ks(t),r=fe(e,arguments.length>1?arguments[1]:void 0,3);return!Rs(n,(function(e,n,i){if(!r(n,e,t))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var qs=X("species"),Xs=function(e,t){var n,r=de(e).constructor;return void 0===r||null==(n=de(r)[qs])?t:Pe(n)};ye({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=de(this),n=Ks(t),r=fe(e,arguments.length>1?arguments[1]:void 0,3),i=new(Xs(t,S("Map"))),a=$(i.set);return Rs(n,(function(e,n){r(n,e,t)&&a.call(i,e,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}}),ye({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=de(this),n=Ks(t),r=fe(e,arguments.length>1?arguments[1]:void 0,3);return Rs(n,(function(e,n,i){if(r(n,e,t))return i(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),ye({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=de(this),n=Ks(t),r=fe(e,arguments.length>1?arguments[1]:void 0,3);return Rs(n,(function(e,n,i){if(r(n,e,t))return i(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),ye({target:"Map",stat:!0},{groupBy:function(e,t){$(t);var n=Os(e),r=new this,i=$(r.has),a=$(r.get),o=$(r.set);return Rs(n,(function(e){var n=t(e);i.call(r,n)?a.call(r,n).push(e):o.call(r,n,[e])}),{IS_ITERATOR:!0}),r}});ye({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return Rs(Ks(de(this)),(function(t,n,r){if((i=n)===(a=e)||i!=i&&a!=a)return r();var i,a}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),ye({target:"Map",stat:!0},{keyBy:function(e,t){var n=new this;$(t);var r=$(n.set);return Rs(e,(function(e){r.call(n,t(e),e)})),n}}),ye({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){return Rs(Ks(de(this)),(function(t,n,r){if(n===e)return r(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),ye({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=de(this),n=Ks(t),r=fe(e,arguments.length>1?arguments[1]:void 0,3),i=new(Xs(t,S("Map"))),a=$(i.set);return Rs(n,(function(e,n){a.call(i,r(n,e,t),n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}}),ye({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=de(this),n=Ks(t),r=fe(e,arguments.length>1?arguments[1]:void 0,3),i=new(Xs(t,S("Map"))),a=$(i.set);return Rs(n,(function(e,n){a.call(i,e,r(n,e,t))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}}),ye({target:"Map",proto:!0,real:!0,forced:!0},{merge:function(e){for(var t=de(this),n=$(t.set),r=arguments.length,i=0;i<r;)Rs(arguments[i++],n,{that:t,AS_ENTRIES:!0});return t}}),ye({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=de(this),n=Ks(t),r=arguments.length<2,i=r?void 0:arguments[1];if($(e),Rs(n,(function(n,a){r?(r=!1,i=a):i=e(i,a,n,t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r)throw TypeError("Reduce of empty map with no initial value");return i}}),ye({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=de(this),n=Ks(t),r=fe(e,arguments.length>1?arguments[1]:void 0,3);return Rs(n,(function(e,n,i){if(r(n,e,t))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),ye({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=de(this),r=arguments.length;$(t);var i=n.has(e);if(!i&&r<3)throw TypeError("Updating absent value");var a=i?n.get(e):$(r>2?arguments[2]:void 0)(e,n);return n.set(e,t(a,e,n)),n}});var Ys=function(e,t){var n,r=de(this),i=arguments.length>2?arguments[2]:void 0;if(!l(t)&&!l(i))throw TypeError("At least one callback required");return r.has(e)?(n=r.get(e),l(t)&&(n=t(n),r.set(e,n))):l(i)&&(n=i(),r.set(e,n)),n};ye({target:"Map",proto:!0,real:!0,forced:!0},{upsert:Ys}),ye({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:Ys});var Vs=Us,Zs=Ge.indexOf,Js=[].indexOf,Qs=!!Js&&1/[1].indexOf(1,-0)<0,el=bo("indexOf");ye({target:"Array",proto:!0,forced:Qs||!el},{indexOf:function(e){return Qs?Js.apply(this,arguments)||0:Zs(this,e,arguments.length>1?arguments[1]:void 0)}});var tl=uo("Array").indexOf,nl=Array.prototype,rl=function(e){var t=e.indexOf;return e===nl||e instanceof Array&&t===nl.indexOf?tl:t},il=rl,al=r((function(e){e.exports=function(e){var t;return-1!==il(t=Function.toString.call(e)).call(t,"[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0}));n(al);var ol=gt,sl=ho,ll=r((function(e){e.exports=function(){if("undefined"==typeof Reflect||!ol)return!1;if(ol.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ol(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0}));n(ll);var cl=r((function(e){function t(n,r,i){return ll()?(e.exports=t=ol,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(sl(Function).apply(e,r));return n&&xt(i,n.prototype),i},e.exports.default=e.exports,e.exports.__esModule=!0),t.apply(null,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}));n(cl);var ul=n(r((function(e){function t(n){var r="function"==typeof Vs?new Vs:void 0;return e.exports=t=function(e){if(null===e||!al(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return cl(e,arguments,Rr(this).constructor)}return t.prototype=wt(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),xt(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})));ye({target:"Array",stat:!0},{isArray:Ct});var fl=k.Array.isArray,dl=fl;function pl(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}var hl=function(e,t){if(!dl(e)&&Er(e)!==t.name.toLowerCase()||!dl(e)&&"array"===t.name.toLowerCase())throw new TypeError("parameter given must be ".concat(t.name));return!0},gl=function(e,t){if(!(e instanceof t))throw new Error("the hook does not correctly inherit");return!0},ml=function(e){if("object"!==Er(e))throw new Error("the hook must be a instance, not a class");return!0},vl=function(e){St(n,e);var t=pl(n);function n(e,r){var i;return vt(this,n),(i=t.call(this,e)).name="Error",i.stack=i.buildStackTrace(r),i}return lo(n,[{key:"buildStackTrace",value:function(e){var t,n=e&&e.stack?e.stack:"";return yo(t="".concat(this.stack,"\nCaused By: ")).call(t,n)}}]),n}(ul(Error)),yl=new Proxy({},{get:function(e,t,n){return function(){}}});function bl(e,t,n){var r,i;if(-1===e)yl.warn(yo(r=yo(i="Duplicate hook name [".concat(t.HOOK_NAME,"] found, hook [")).call(i,t.toString(),"] ")).call(r,isNaN(n)?"":"at index [".concat(n,"] "),"will not take effect."));else if(-2===e){var a;yl.warn(yo(a="Hook [".concat(t.toString(),"] ")).call(a,isNaN(n)?"":"at index [".concat(n,"] "),"is not a valid hook, and will not take effect."))}}function wl(e){return _l(e)||kl(e)}function _l(e){return Object.prototype.isPrototypeOf.call(Ko,e)}function kl(e){return Object.prototype.isPrototypeOf.call(_s,e)}function xl(e){return wl(e)&&!0===(null==e?void 0:e.Cherry$$CUSTOM)}var Sl=function(){function e(t,n){vt(this,e),this.hookList={},this.hookNameList={},hl(t,Array),this.registerInternalHooks(t,n),this.registerCustomHooks(n.engine.customSyntax,n)}return lo(e,[{key:"registerInternalHooks",value:function(e,t){var n=this;Co(e).call(e,(function(e,r){bl(n.register(e,t),e,r)}))}},{key:"registerCustomHooks",value:function(e,t){var n=this;if(e){var r=Ao(e);Co(r).call(r,(function(r){var i,a,o,s,l={},c=e[r];if(_l(c))a=c;else{if(!_l(s=null==(o=c)?void 0:o.syntaxClass)&&!kl(s))return;a=c.syntaxClass,l.force=Boolean(c.force),c.before?l.before=c.before:c.after&&(l.after=c.after)}wl(a)?(co(a,"Cherry$$CUSTOM",{enumerable:!1,configurable:!1,writable:!1,value:!0}),i=n.register(a,t,l)):i=-2,bl(i,a,void 0)}))}}},{key:"getHookList",value:function(){return this.hookList}},{key:"getHookNameList",value:function(){return this.hookNameList}},{key:"register",value:function(e,t,n){var r,i,a=t.externals,o=t.engine,s=o.syntax;if(wl(e)){i=e.HOOK_NAME,r=new e({externals:a,config:(null==s?void 0:s[i])||{},globalConfig:o.global})}else{if("function"!=typeof e)return-2;if(!(r=e(t))||!wl(r.constructor))return-2;i=r.getName()}if(!1!==s[i]||xl(e)){var l=r.getType();if(this.hookNameList[i]){var c;if(!xl(e))return-1;if(!n.force)return-1;var u=this.hookNameList[i].type;this.hookList[u]=Ro(c=this.hookList[u]).call(c,(function(e){return e.getName()!==i}))}if(this.hookNameList[i]={type:l},this.hookList[l]=this.hookList[l]||[],xl(e)){var f,d,p,h=-1;if(n.before){if(-1===(h=Do(f=this.hookList[l]).call(f,(function(e){return e.getName()===n.before}))))yl.warn(yo(d="Cannot find hook named [".concat(n.before,"],\n            custom hook [")).call(d,i,"] will append to the end of the hooks."))}else if(n.after){var g,m;-1===(h=Do(g=this.hookList[l]).call(g,(function(e){return e.getName()===n.after})))?yl.warn(yo(m="Cannot find hook named [".concat(n.after,"],\n              custom hook [")).call(m,i,"] will append to the end of the hooks.")):h+=1}if(h<0||h>=this.hookList[l].length)this.hookList[l].push(r);else Wo(p=this.hookList[l]).call(p,h,0,r)}else this.hookList[l].push(r)}}}]),e}();function Cl(e,t,n){var r=e.begin+e.content+e.end;return n&&(r=r.replace(/\[\\h\]/g,Al).replace(/\\h/g,Al)),new RegExp(r,t||"g")}function El(){try{return new RegExp("(?<=.)"),!0}catch(e){}return!1}var Al="[ \\t\\u00a0]",Tl="[\\u0021-\\u002F\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e]",Ol="[\\u0021-\\u002F\\u003a-\\u0040\\u005b\\u005d\\u005e\\u0060\\u007b-\\u007e \\t\\n]",Ll=new RegExp([/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+/.source,"@",/[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*/.source].join("")),Ml=new RegExp("^".concat(Ll.source,"$")),Rl=new RegExp('(?:\\S+(?::\\S*)?@)?(?:(?:1\\d\\d|2[01]\\d|22[0-3]|[1-9]\\d?)(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:1\\d\\d|2[0-4]\\d|25[0-4]|[1-9]\\d?))|(?![-_])(?:[-\\w\\xa1-\\xff]{0,63}[^-_]\\.)+(?:[a-zA-Z\\xa1-\\xff]{2,}\\.?))(?::\\d{2,5})?(?:[/?#][^\\s<>\\x00-\\x1f"\\(\\)]*)?'),Nl=new RegExp("(?:\\/\\/)".concat(Rl.source)),Pl=new RegExp("^".concat(Rl.source,"$")),$l=new RegExp("^".concat(Nl.source,"$")),Il=fl,Dl=r((function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0}));n(Dl);var Hl=r((function(e){e.exports=function(e){if(Il(e))return Dl(e)},e.exports.default=e.exports,e.exports.__esModule=!0}));n(Hl);var Fl=Ts,jl=function(e,t,n,r){try{return r?t(de(n)[0],n[1]):t(n)}catch(t){Ls(e,"throw",t)}},Bl=X("iterator"),zl=!1;try{var Wl=0,Ul={next:function(){return{done:!!Wl++}},return:function(){zl=!0}};Ul[Bl]=function(){return this},Array.from(Ul,(function(){throw 2}))}catch(e){}var Gl=!function(e,t){if(!t&&!zl)return!1;var n=!1;try{var r={};r[Bl]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}((function(e){Array.from(e)}));ye({target:"Array",stat:!0,forced:Gl},{from:function(e){var t=F(e),n=Ne(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=fe(i,r>2?arguments[2]:void 0,2));var o,s,l,c,u,f,d=Ts(t),p=0;if(!d||this==Array&&Es(d))for(o=We(t),s=n?new this(o):Array(o);o>p;p++)f=a?i(t[p],p):t[p],Et(s,p,f);else for(u=(c=Os(t,d)).next,s=n?new this:[];!(l=u.call(c)).done;p++)f=a?jl(c,i,[l.value,p],!0):l.value,Et(s,p,f);return s.length=p,s}});var Kl=k.Array.from,ql=r((function(e){e.exports=function(e){if(void 0!==br&&null!=Fl(e)||null!=e["@@iterator"])return Kl(e)},e.exports.default=e.exports,e.exports.__esModule=!0}));n(ql);var Xl=Lt("slice"),Yl=X("species"),Vl=[].slice,Zl=Math.max;ye({target:"Array",proto:!0,forced:!Xl},{slice:function(e,t){var n,r,i,a=w(this),o=We(a),s=je(e,o),l=je(void 0===t?o:t,o);if(Ct(a)&&(n=a.constructor,(Ne(n)&&(n===Array||Ct(n.prototype))||_(n)&&null===(n=n[Yl]))&&(n=void 0),n===Array||void 0===n))return Vl.call(a,s,l);for(r=new(void 0===n?Array:n)(Zl(l-s,0)),i=0;s<l;s++,i++)s in a&&Et(r,i,a[s]);return r.length=i,r}});var Jl=uo("Array").slice,Ql=Array.prototype,ec=function(e){var t=e.slice;return e===Ql||e instanceof Array&&t===Ql.slice?Jl:t},tc=ec,nc=r((function(e){e.exports=function(e,t){var n;if(e){if("string"==typeof e)return Dl(e,t);var r=tc(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Kl(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dl(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0}));n(nc);var rc=r((function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0}));n(rc);var ic=n(r((function(e){e.exports=function(e){return Hl(e)||ql(e)||nc(e)||rc()},e.exports.default=e.exports,e.exports.__esModule=!0}))),ac=r((function(e){e.exports=function(e){if(Il(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0}));n(ac);var oc=r((function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0}));n(oc);var sc=n(r((function(e){e.exports=function(e){return ac(e)||ql(e)||nc(e)||oc()},e.exports.default=e.exports,e.exports.__esModule=!0}))),lc=ec,cc=k.Object.getOwnPropertySymbols,uc=re.f,fc=c((function(){uc(1)}));ye({target:"Object",stat:!0,forced:!u||fc,sham:!u},{getOwnPropertyDescriptor:function(e,t){return uc(w(e),t)}});var dc=r((function(e){var t=k.Object,n=e.exports=function(e,n){return t.getOwnPropertyDescriptor(e,n)};t.getOwnPropertyDescriptor.sham&&(n.sham=!0)})),pc=dc,hc=S("Reflect","ownKeys")||function(e){var t=jt.f(de(e)),n=Gt.f;return n?t.concat(n(e)):t};ye({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(e){for(var t,n,r=w(e),i=re.f,a=hc(r),o={},s=0;a.length>s;)void 0!==(n=i(r,t=a[s++]))&&Et(o,t,n);return o}});var gc=k.Object.getOwnPropertyDescriptors;ye({target:"Object",stat:!0,forced:!u,sham:!u},{defineProperties:Ze});var mc=r((function(e){var t=k.Object,n=e.exports=function(e,n){return t.defineProperties(e,n)};t.defineProperties.sham&&(n.sham=!0)}));function vc(e,t){var n=Ao(e);if(cc){var r=cc(e);t&&(r=Ro(r).call(r,(function(t){return pc(e,t).enumerable}))),n.push.apply(n,r)}return n}function yc(e){for(var t=1;t<arguments.length;t++){var n,r=null!=arguments[t]?arguments[t]:{};if(t%2)Co(n=vc(Object(r),!0)).call(n,(function(t){Ir(e,t,r[t])}));else if(gc)mc(e,gc(r));else{var i;Co(i=vc(Object(r))).call(i,(function(t){co(e,t,pc(r,t))}))}}return e}function bc(e,t){if(!t.length)return e;var n=[],r=0;return Co(t).call(t,(function(i,a){n.push(lc(e).call(e,r,i.begin)),n.push(i.replacedText),r=i.begin+i.length,a===t.length-1&&n.push(lc(e).call(e,r))})),n.join("")}function wc(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;if(!t)return e;t.lastIndex=0;for(var o=0,s=[];null!==(r=t.exec(e));){var l={begin:r.index,length:r[0].length};if(i&&r.index===o-a){var c,u=r,f=sc(u),d=f[0],p=lc(f).call(f,2);s.push({begin:l.begin+a,length:l.length-a,replacedText:n.apply(void 0,yo(c=[lc(d).call(d,a),""]).call(c,ic(p)))})}else s.push(yc(yc({},l),{},{replacedText:n.apply(void 0,ic(r))}));o=t.lastIndex,t.lastIndex-=a}return t.lastIndex=0,bc(e,s)}function _c(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}var kc=function(e){St(n,e);var t=_c(n);function n(){return vt(this,n),t.apply(this,arguments)}return lo(n,[{key:"toHtml",value:function(e,t,n,r){var i,a;return yo(i=yo(a="".concat(t,'<span style="color:')).call(a,n,'">')).call(i,r,"</span>")}},{key:"makeHtml",value:function(e){return El()?e.replace(this.RULE.reg,this.toHtml):wc(e,this.RULE.reg,this.toHtml,!0,1)}},{key:"rule",value:function(){var e={begin:El()?"((?<!\\\\))!!":"(^|[^\\\\])!!",end:"!!",content:"(#[0-9a-zA-Z]{3,6}|[a-z]{3,20})[\\s]([\\w\\W]+?)"};return e.reg=new RegExp(e.begin+e.content+e.end,"g"),e}}]),n}(Ko);function xc(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(kc,"HOOK_NAME","fontColor");var Sc=function(e){St(n,e);var t=xc(n);function n(){return vt(this,n),t.apply(this,arguments)}return lo(n,[{key:"toHtml",value:function(e,t,n,r){var i,a;return yo(i=yo(a="".concat(t,'<span style="background-color:')).call(a,n,'">')).call(i,r,"</span>")}},{key:"makeHtml",value:function(e){return El()?e.replace(this.RULE.reg,this.toHtml):wc(e,this.RULE.reg,this.toHtml,!0,1)}},{key:"rule",value:function(){var e={begin:El()?"((?<!\\\\))!!!":"(^|[^\\\\])!!!",end:"!!!",content:"(#[0-9a-zA-Z]{3,6}|[a-z]{3,10})[\\s]([\\w\\W]+?)"};return e.reg=new RegExp(e.begin+e.content+e.end,"g"),e}}]),n}(Ko);function Cc(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(Sc,"HOOK_NAME","bgColor");var Ec=function(e){St(n,e);var t=Cc(n);function n(){return vt(this,n),t.apply(this,arguments)}return lo(n,[{key:"makeHtml",value:function(e){return this.test(e)?e.replace(this.RULE.reg,'$2<span style="font-size:$4px">$5</span>$7'):e}},{key:"rule",value:function(){var e={begin:"((^|[^\\\\])(\\!))",end:"(\\!([\\s\\S]|$))",content:"([0-9]{1,2})[\\s]([\\w\\W]*?)"};return e.reg=new RegExp(e.begin+e.content+e.end,"g"),e}}]),n}(Ko);function Ac(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(Ec,"HOOK_NAME","fontSize");var Tc=function(e){St(n,e);var t=Ac(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:void 0},i=r.config;return vt(this,n),e=t.call(this,{config:i}),i?(e.needWhitespace=!!i.needWhitespace,e):Or(e)}return lo(n,[{key:"makeHtml",value:function(e){return this.test(e)?e.replace(this.RULE.reg,"$1<del>$2</del>"):e}},{key:"rule",value:function(){var e={};return(e=this.needWhitespace?{begin:"(^|[\\s])\\~T\\~T",end:"\\~T\\~T(?=\\s|$)",content:"([\\w\\W]+?)"}:{begin:"(^|[^\\\\])\\~T\\~T",end:"\\~T\\~T",content:"([\\w\\W]+?)"}).reg=new RegExp(e.begin+e.content+e.end,"g"),e}}]),n}(Ko);function Oc(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(Tc,"HOOK_NAME","strikethrough");var Lc=function(e){St(n,e);var t=Oc(n);function n(){return vt(this,n),t.apply(this,arguments)}return lo(n,[{key:"toHtml",value:function(e,t,n){var r;return yo(r="".concat(t,"<sup>")).call(r,n,"</sup>")}},{key:"makeHtml",value:function(e){return El()?e.replace(this.RULE.reg,this.toHtml):wc(e,this.RULE.reg,this.toHtml,!0,1)}},{key:"rule",value:function(){var e={begin:El()?"((?<!\\\\))\\^":"(^|[^\\\\])\\^",end:"\\^",content:"([\\w\\W]+?)"};return e.reg=new RegExp(e.begin+e.content+e.end,"g"),e}}]),n}(Ko);function Mc(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(Lc,"HOOK_NAME","sup");var Rc=function(e){St(n,e);var t=Mc(n);function n(){return vt(this,n),t.apply(this,arguments)}return lo(n,[{key:"toHtml",value:function(e,t,n){var r;return yo(r="".concat(t,"<sub>")).call(r,n,"</sub>")}},{key:"makeHtml",value:function(e){return El()?e.replace(this.RULE.reg,this.toHtml):wc(e,this.RULE.reg,this.toHtml,!0,1)}},{key:"rule",value:function(){var e={begin:El()?"((?<!\\\\))\\^\\^":"(^|[^\\\\])\\^\\^",end:"\\^\\^",content:"([\\w\\W]+?)"};return e.reg=new RegExp(e.begin+e.content+e.end,"g"),e}}]),n}(Ko);Ir(Rc,"HOOK_NAME","sub");var Nc=r((function(e){e.exports=function(e,t){var n=null==e?null:void 0!==br&&Fl(e)||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}},e.exports.default=e.exports,e.exports.__esModule=!0}));n(Nc);var Pc=n(r((function(e){e.exports=function(e,t){return ac(e)||Nc(e,t)||nc(e,t)||oc()},e.exports.default=e.exports,e.exports.__esModule=!0}))),$c=rl,Ic=r((function(e){var n=function(e){var t=/\blang(?:uage)?-([\w-]+)\b/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,a;switch(n=n||{},i.util.type(t)){case"Object":if(a=i.util.objId(t),n[a])return n[a];for(var o in r={},n[a]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case"Array":return a=i.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach((function(t,i){r[i]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e&&!t.test(e.className);)e=e.parentElement;return e?(e.className.match(t)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var a=(r=r||i.languages)[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(o[l]=n[l]);n.hasOwnProperty(s)||(o[s]=a[s])}var c=r[e];return r[e]=o,i.languages.DFS(i.languages,(function(t,n){n===c&&t!=e&&(this[t]=o)})),o},DFS:function e(t,n,r,a){a=a||{};var o=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var l=t[s],c=i.util.type(l);"Object"!==c||a[o(l)]?"Array"!==c||a[o(l)]||(a[o(l)]=!0,e(l,n,s,a)):(a[o(l)]=!0,e(l,n,null,a))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run("before-all-elements-highlight",r);for(var a,o=0;a=r.elements[o++];)i.highlightElement(a,!0===t,r.callback)},highlightElement:function(n,r,a){var o=i.util.getLanguage(n),s=i.languages[o];n.className=n.className.replace(t,"").replace(/\s+/g," ")+" language-"+o;var l=n.parentElement;l&&"pre"===l.nodeName.toLowerCase()&&(l.className=l.className.replace(t,"").replace(/\s+/g," ")+" language-"+o);var c={element:n,language:o,grammar:s,code:n.textContent};function u(e){c.highlightedCode=e,i.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,i.hooks.run("after-highlight",c),i.hooks.run("complete",c),a&&a.call(c.element)}if(i.hooks.run("before-sanity-check",c),(l=c.element.parentElement)&&"pre"===l.nodeName.toLowerCase()&&!l.hasAttribute("tabindex")&&l.setAttribute("tabindex","0"),!c.code)return i.hooks.run("complete",c),void(a&&a.call(c.element));if(i.hooks.run("before-highlight",c),c.grammar)if(r&&e.Worker){var f=new Worker(i.filename);f.onmessage=function(e){u(e.data)},f.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else u(i.highlight(c.code,c.grammar,c.language));else u(i.util.encode(c.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};return i.hooks.run("before-tokenize",r),r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run("after-tokenize",r),a.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var u=new s;return l(u,u.head,e),function e(t,n,r,s,u,f){for(var d in r)if(r.hasOwnProperty(d)&&r[d]){var p=r[d];p=Array.isArray(p)?p:[p];for(var h=0;h<p.length;++h){if(f&&f.cause==d+","+h)return;var g=p[h],m=g.inside,v=!!g.lookbehind,y=!!g.greedy,b=g.alias;if(y&&!g.pattern.global){var w=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,w+"g")}for(var _=g.pattern||g,k=s.next,x=u;k!==n.tail&&!(f&&x>=f.reach);x+=k.value.length,k=k.next){var S=k.value;if(n.length>t.length)return;if(!(S instanceof a)){var C,E=1;if(y){if(!(C=o(_,x,t,v)))break;var A=C.index,T=C.index+C[0].length,O=x;for(O+=k.value.length;A>=O;)k=k.next,O+=k.value.length;if(O-=k.value.length,x=O,k.value instanceof a)continue;for(var L=k;L!==n.tail&&(O<T||"string"==typeof L.value);L=L.next)E++,O+=L.value.length;E--,S=t.slice(x,O),C.index-=x}else if(!(C=o(_,0,S,v)))continue;A=C.index;var M=C[0],R=S.slice(0,A),N=S.slice(A+M.length),P=x+S.length;f&&P>f.reach&&(f.reach=P);var $=k.prev;R&&($=l(n,$,R),x+=R.length),c(n,$,E);var I=new a(d,m?i.tokenize(M,m):M,b,M);if(k=l(n,$,I),N&&l(n,k,N),E>1){var D={cause:d+","+h,reach:P};e(t,n,r,k.prev,x,D),f&&D.reach>f.reach&&(f.reach=D.reach)}}}}}}(e,u,t,u.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(u)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(n&&n.length)for(var r,a=0;r=n[a++];)r(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function o(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function c(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}if(e.Prism=i,a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var a={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),i.hooks.run("wrap",a);var s="";for(var l in a.attributes)s+=" "+l+'="'+(a.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+s+">"+a.content+"</"+a.tag+">"},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()}),!1),i):i;var u=i.util.currentScript();function f(){i.manual||i.highlightAll()}if(u&&(i.filename=u.src,u.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var d=document.readyState;"loading"===d||"interactive"===d&&u&&u.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=n),void 0!==t&&(t.Prism=n)}));Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean,function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),r||"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,(function(){return"(?:"+e+")"}));return e.replace(/<<self>>/g,"[^\\s\\S]")}var i="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",a="class enum interface record struct",o="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(a),u=RegExp(l(i+" "+a+" "+o+" "+s)),f=l(a+" "+o+" "+s),d=l(i+" "+a+" "+s),p=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,m=t(/<<0>>(?:\s*<<1>>)?/.source,[g,p]),v=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[f,m]),y=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[v,y]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,h,y]),_=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),k=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[_,v,y]),x={keyword:u,punctuation:/[<>()?,.:[\]]/},S=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,C=/"(?:\\.|[^\\"\r\n])*"/.source,E=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[C]),lookbehind:!0,greedy:!0},{pattern:RegExp(S),greedy:!0,alias:"character"}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[v]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,k]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,m]),lookbehind:!0,inside:x},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[v]),lookbehind:!0,inside:x},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:x},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[k,d,g]),inside:x}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|typeof|sizeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:x},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[k,v]),inside:x,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[k]),lookbehind:!0,inside:x,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,p]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(p),alias:"class-name",inside:x}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,m,g,k,u.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[m,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(k),greedy:!0,inside:x},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var A=C+"|"+S,T=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[A]),O=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),L=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,M=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[v,O]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[L,M]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[L]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[O]),inside:e.languages.csharp},"class-name":{pattern:RegExp(v),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var R=/:[^}\r\n]+/.source,N=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),P=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[N,R]),$=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[A]),2),I=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[$,R]);function D(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,R]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:D(P,N)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[I]),lookbehind:!0,greedy:!0,inside:D(I,$)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:module|import)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),function(e){var t=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extension|external|extends|factory|final|finally|for|get|hide|if|implements|interface|import|in|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{string:[{pattern:/r?("""|''')[\s\S]*?\1/,greedy:!0},{pattern:/r?(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],"class-name":[r,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:r.inside}],keyword:t,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","function",{metadata:{pattern:/@\w+/,alias:"symbol"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(Prism),function(e){var t=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,n=/(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g,(function(){return t})),r=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g,(function(){return r})),a={pattern:RegExp(r),greedy:!0},o={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function s(e,t){return e=e.replace(/<OPT>/g,(function(){return i})).replace(/<SP>/g,(function(){return n})),RegExp(e,t)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:s(/(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[a,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:s(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:s(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:s(/(^ONBUILD<SP>)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:o,string:a,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:o},e.languages.dockerfile=e.languages.docker}(Prism),Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},Prism.languages.glsl=Prism.languages.extend("c",{keyword:/\b(?:attribute|const|uniform|varying|buffer|shared|coherent|volatile|restrict|readonly|writeonly|atomic_uint|layout|centroid|flat|smooth|noperspective|patch|sample|break|continue|do|for|while|switch|case|default|if|else|subroutine|in|out|inout|float|double|int|void|bool|true|false|invariant|precise|discard|return|d?mat[234](?:x[234])?|[ibdu]?vec[234]|uint|lowp|mediump|highp|precision|[iu]?sampler[123]D|[iu]?samplerCube|sampler[12]DShadow|samplerCubeShadow|[iu]?sampler[12]DArray|sampler[12]DArrayShadow|[iu]?sampler2DRect|sampler2DRectShadow|[iu]?samplerBuffer|[iu]?sampler2DMS(?:Array)?|[iu]?samplerCubeArray|samplerCubeArrayShadow|[iu]?image[123]D|[iu]?image2DRect|[iu]?imageCube|[iu]?imageBuffer|[iu]?image[12]DArray|[iu]?imageCubeArray|[iu]?image2DMS(?:Array)?|struct|common|partition|active|asm|class|union|enum|typedef|template|this|resource|goto|inline|noinline|public|static|extern|external|interface|long|short|half|fixed|unsigned|superp|input|output|hvec[234]|fvec[234]|sampler3DRect|filter|sizeof|cast|namespace|using)\b/}),Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|iota|nil|true|false)\b/,number:/(?:\b0x[a-f\d]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[-+]?\d+)?)i?/i,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/}),delete Prism.languages.go["class-name"],function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+i+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/true|false/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"font-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var i=t[n];if("code"===i.type){var a=i.content[1],o=i.content[3];if(a&&o&&"code-language"===a.type&&"code-block"===o.type&&"string"==typeof a.content){var s=a.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),l="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());o.alias?"string"==typeof o.alias?o.alias=[o.alias,l]:o.alias.push(l):o.alias=[l]}}else e(i.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,i=t.classes.length;r<i;r++){var a=t.classes[r],c=/language-(.+)/.exec(a);if(c){n=c[1];break}}var u=e.languages[n];if(u)t.content=e.highlight(function(e){var t=e.replace(o,"");return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n);var r=s[t];return r||e}))}(t.content),u,n);else if(n&&"none"!==n&&e.plugins.autoloader){var f="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=f,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(f);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var o=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/[A-Z]\w*Input(?=!?.*$)/m,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var i=[];if(f(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var a=d(/^\($/,/^\)$/);if(-1===a)continue;for(;n<a;n++){var o=u(0);"variable"===o.type&&(p(o,"variable-input"),i.push(o.content))}n=a+1}if(f(["punctuation","property-query"])&&"{"===u(0).content&&(n++,p(u(0),"property-mutation"),i.length>0)){var s=d(/^\{$/,/^\}$/);if(-1===s)continue;for(var l=n;l<s;l++){var c=t[l];"variable"===c.type&&i.indexOf(c.content)>=0&&p(c,"variable-input")}}}}function u(e){return t[n+e]}function f(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return!1}return!0}function d(e,r){for(var i=1,a=n;a<t.length;a++){var o=t[a],s=o.content;if("punctuation"===o.type&&"string"==typeof s)if(e.test(s))i++;else if(r.test(s)&&0===--i)return a}return-1}function p(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var t={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp(/%r/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S])*\)/.source,/\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S])*\]/.source,/<(?:[^<>\\]|\\[\s\S])*>/.source].join("|")+")"+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp(/%[qQiIwWxs]?/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S])*\)/.source,/\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S])*\]/.source,/<(?:[^<>\\]|\\[\s\S])*>/.source].join("|")+")"),greedy:!0,inside:{interpolation:t}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|[a-z_]\w*$/i,alias:"symbol",inside:{punctuation:/^<<[-~]?/}},interpolation:t}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|[a-z_]\w*$/i,alias:"symbol",inside:{punctuation:/^<<[-~]?'|'$/}}}}],e.languages.rb=e.languages.ruby}(Prism),function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|c[a-zA-Z]|0[0-7]{0,2}|[123][0-7]{2}|.)/,r="(?:[^\\\\-]|"+n.source+")",i=RegExp(r+"-"+r),a={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={charset:{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"charset-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"charset-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,charclass:{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,charclass:{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":a}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":a}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(Prism),Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,a){if(n.language===r){var o=n.tokenStack=[];n.code=n.code.replace(i,(function(e){if("function"==typeof a&&!a(e))return e;for(var i,s=o.length;-1!==n.code.indexOf(i=t(r,s));)++s;return o[s]=e,i})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var i=0,a=Object.keys(n.tokenStack);!function o(s){for(var l=0;l<s.length&&!(i>=a.length);l++){var c=s[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=a[i],f=n.tokenStack[u],d="string"==typeof c?c:c.content,p=t(r,u),h=d.indexOf(p);if(h>-1){++i;var g=d.substring(0,h),m=new e.Token(r,e.tokenize(f,n.grammar),"language-"+r,f),v=d.substring(h+p.length),y=[];g&&y.push.apply(y,o([g])),y.push(m),v&&y.push.apply(y,o([v])),"string"==typeof c?s.splice.apply(s,[l,1].concat(y)):c.content=y}}else c.content&&o(c.content)}return s}(n.tokens)}}}})}(Prism),Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|forward|for|each|while|import|use|extend|debug|warn|mixin|include|function|return|content)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|with|show|hide)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss,function(e){e.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,lookbehind:!0,inside:e.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,lookbehind:!0,inside:e.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:e.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:e.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:e.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.ruby}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},r=0,i=t.length;r<i;r++){var a=t[r];a="string"==typeof a?{filter:a,language:a}:a,e.languages[a.language]&&(n["filter-"+a.filter]={pattern:RegExp("((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}(?:(?:\\r?\\n|\\r)(?:\\2[\\t ].+|\\s*?(?=\\r?\\n|\\r)))+".replace("{{filter_name}}",(function(){return a.filter}))),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},rest:e.languages[a.language]}})}e.languages.insertBefore("haml","filter",n)}(Prism),function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{"class-name":[r,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism),Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json,Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},Prism.languages.matlab={comment:[/%\{[\s\S]*?\}%/,/%.+/],string:{pattern:/\B'(?:''|[^'\r\n])*'/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,keyword:/\b(?:break|case|catch|continue|else|elseif|end|for|function|if|inf|NaN|otherwise|parfor|pause|pi|return|switch|try|while)\b/,function:/\b(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/},function(e){var t=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"],n="(?:"+(t=t.map((function(e){return e.replace("$","\\$")}))).join("|")+")\\b";e.languages.mongodb=e.languages.extend("javascript",{}),e.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp("^(['\"])?"+n+"(?:\\1)?$")}}}),e.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/,greedy:!0}},e.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:"+["ObjectId","Code","BinData","DBRef","Timestamp","NumberLong","NumberDecimal","MaxKey","MinKey","RegExp","ISODate","UUID"].join("|")+")\\b"),alias:"keyword"}})}(Prism),function(e){var t=/\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i;e.languages.nginx={comment:{pattern:/(^|[\s{};])#.*/,lookbehind:!0},directive:{pattern:/(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:{string:{pattern:/((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,lookbehind:!0,inside:{escape:{pattern:/\\["'\\nrt]/,alias:"entity"},variable:t}},comment:{pattern:/(\s)#.*/,lookbehind:!0,greedy:!0},keyword:{pattern:/^\S+/,greedy:!0},boolean:{pattern:/(\s)(?:off|on)(?!\S)/,lookbehind:!0},number:{pattern:/(\s)\d+[a-z]*(?!\S)/i,lookbehind:!0},variable:t}},punctuation:/[{};]/}}(Prism),Prism.languages.objectivec=Prism.languages.extend("c",{string:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,keyword:/\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec,Prism.languages.pascal={comment:[/\(\*[\s\S]+?\*\)/,/\{[\s\S]+?\}/,/\/\/.*/],string:{pattern:/(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/i,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},Prism.languages.objectpascal=Prism.languages.pascal,function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[\w|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:i,punctuation:a};var o={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:o}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:o}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:i,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){if(/<\?/.test(t.code)){e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(Prism),Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,Prism.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:TRUE|FALSE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:NaN|Inf)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:if|else|repeat|while|function|for|in|next|break|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/},Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:S|ING)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|IN|ILIKE|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|as|declare|implements|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter;var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return i})),RegExp(e,t)}i=a(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/i,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx},alias:"language-javascript"}},e.languages.jsx.tag);var o=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(o).join(""):""},s=function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r],a=!1;if("string"!=typeof i&&("tag"===i.type&&i.content[0]&&"tag"===i.content[0].type?"</"===i.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===o(i.content[0].content[1])&&n.pop():"/>"===i.content[i.content.length-1].content||n.push({tagName:o(i.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===i.type&&"{"===i.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof i)&&n.length>0&&0===n[n.length-1].openedBraces){var l=o(i);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(l+=o(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(l=o(t[r-1])+l,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",l,null,l)}i.content&&"string"!=typeof i.content&&s(i.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)}))}(Prism),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t);var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(Prism),function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(Prism),function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,o=0;o<i.length;o++)a[i[o]]=e.languages.bash[i[o]];e.languages.shell=e.languages.bash}(Prism),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:true|false)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:true|false)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift})),Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?)[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,boolean:/\b(?:True|False|Nothing)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Until|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"];var Dc=String.fromCharCode,Hc=String.fromCodePoint,Fc=!!Hc&&1!=Hc.length;ye({target:"String",stat:!0,forced:Fc},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,i=0;r>i;){if(t=+arguments[i++],je(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?Dc(t):Dc(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}});var jc,Bc,zc=k.String.fromCodePoint;function Wc(e,t){var n=Ao(e);if(cc){var r=cc(e);t&&(r=Ro(r).call(r,(function(t){return pc(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uc(e){for(var t=1;t<arguments.length;t++){var n,r=null!=arguments[t]?arguments[t]:{};if(t%2)Co(n=Wc(Object(r),!0)).call(n,(function(t){Ir(e,t,r[t])}));else if(gc)mc(e,gc(r));else{var i;Co(i=Wc(Object(r))).call(i,(function(t){co(e,t,pc(r,t))}))}}return e}var Gc={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#x27;"},Kc={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},qc=Uc(Uc(Uc(Uc(Uc(Uc({},{34:"&quot;",38:"&amp;",39:"&apos;",60:"&lt;",62:"&gt;"}),{192:"&Agrave;",193:"&Aacute;",194:"&Acirc;",195:"&Atilde;",196:"&Auml;",197:"&Aring;",198:"&AElig;",199:"&Ccedil;",200:"&Egrave;",201:"&Eacute;",202:"&Ecirc;",203:"&Euml;",204:"&Igrave;",205:"&Iacute;",206:"&Icirc;",207:"&Iuml;",208:"&ETH;",209:"&Ntilde;",210:"&Ograve;",211:"&Oacute;",212:"&Ocirc;",213:"&Otilde;",214:"&Ouml;",216:"&Oslash;",217:"&Ugrave;",218:"&Uacute;",219:"&Ucirc;",220:"&Uuml;",221:"&Yacute;",222:"&THORN;",223:"&szlig;",224:"&agrave;",225:"&aacute;",226:"&acirc;",227:"&atilde;",228:"&auml;",229:"&aring;",230:"&aelig;",231:"&ccedil;",232:"&egrave;",233:"&eacute;",234:"&ecirc;",235:"&euml;",236:"&igrave;",237:"&iacute;",238:"&icirc;",239:"&iuml;",240:"&eth;",241:"&ntilde;",242:"&ograve;",243:"&oacute;",244:"&ocirc;",245:"&otilde;",246:"&ouml;",248:"&oslash;",249:"&ugrave;",250:"&uacute;",251:"&ucirc;",252:"&uuml;",253:"&yacute;",254:"&thorn;",255:"&yuml;"}),{160:"&nbsp;",161:"&iexcl;",162:"&cent;",163:"&pound;",164:"&curren;",165:"&yen;",166:"&brvbar;",167:"&sect;",168:"&uml;",169:"&copy;",170:"&ordf;",171:"&laquo;",172:"&not;",173:"&shy;",174:"&reg;",175:"&macr;",176:"&deg;",177:"&plusmn;",178:"&sup2;",179:"&sup3;",180:"&acute;",181:"&micro;",182:"&para;",184:"&cedil;",185:"&sup1;",186:"&ordm;",187:"&raquo;",188:"&frac14;",189:"&frac12;",190:"&frac34;",191:"&iquest;",215:"&times;",247:"&divide;"}),{8704:"&forall;",8706:"&part;",8707:"&exist;",8709:"&empty;",8711:"&nabla;",8712:"&isin;",8713:"&notin;",8715:"&ni;",8719:"&prod;",8721:"&sum;",8722:"&minus;",8727:"&lowast;",8730:"&radic;",8733:"&prop;",8734:"&infin;",8736:"&ang;",8743:"&and;",8744:"&or;",8745:"&cap;",8746:"&cup;",8747:"&int;",8756:"&there4;",8764:"&sim;",8773:"&cong;",8776:"&asymp;",8800:"&ne;",8801:"&equiv;",8804:"&le;",8805:"&ge;",8834:"&sub;",8835:"&sup;",8836:"&nsub;",8838:"&sube;",8839:"&supe;",8853:"&oplus;",8855:"&otimes;",8869:"&perp;",8901:"&sdot;"}),{913:"&Alpha;",914:"&Beta;",915:"&Gamma;",916:"&Delta;",917:"&Epsilon;",918:"&Zeta;",919:"&Eta;",920:"&Theta;",921:"&Iota;",922:"&Kappa;",923:"&Lambda;",924:"&Mu;",925:"&Nu;",926:"&Xi;",927:"&Omicron;",928:"&Pi;",929:"&Rho;",931:"&Sigma;",932:"&Tau;",933:"&Upsilon;",934:"&Phi;",935:"&Chi;",936:"&Psi;",937:"&Omega;",945:"&alpha;",946:"&beta;",947:"&gamma;",948:"&delta;",949:"&epsilon;",950:"&zeta;",951:"&eta;",952:"&theta;",953:"&iota;",954:"&kappa;",955:"&lambda;",956:"&mu;",957:"&nu;",958:"&xi;",959:"&omicron;",960:"&pi;",961:"&rho;",962:"&sigmaf;",963:"&sigma;",964:"&tau;",965:"&upsilon;",966:"&phi;",967:"&chi;",968:"&psi;",969:"&omega;",977:"&thetasym;",978:"&upsih;",982:"&piv;"}),{338:"&OElig;",339:"&oelig;",352:"&Scaron;",353:"&scaron;",376:"&Yuml;",402:"&fnof;",710:"&circ;",732:"&tilde;",8194:"&ensp;",8195:"&emsp;",8201:"&thinsp;",8204:"&zwnj;",8205:"&zwj;",8206:"&lrm;",8207:"&rlm;",8211:"&ndash;",8212:"&mdash;",8216:"&lsquo;",8217:"&rsquo;",8218:"&sbquo;",8220:"&ldquo;",8221:"&rdquo;",8222:"&bdquo;",8224:"&dagger;",8225:"&Dagger;",8226:"&bull;",8230:"&hellip;",8240:"&permil;",8242:"&prime;",8243:"&Prime;",8249:"&lsaquo;",8250:"&rsaquo;",8254:"&oline;",8364:"&euro;",8482:"&trade;",8592:"&larr;",8593:"&uarr;",8594:"&rarr;",8595:"&darr;",8596:"&harr;",8629:"&crarr;",8968:"&lceil;",8969:"&rceil;",8970:"&lfloor;",8971:"&rfloor;",9674:"&loz;",9824:"&spades;",9827:"&clubs;",9829:"&hearts;",9830:"&diams;"}),Xc=Ao(qc),Yc=Jo(Xc).call(Xc,(function(e){return qc[e].replace(/^&(\w+);$/g,(function(e,t){return t.toLowerCase()}))})),Vc=function(e){return"string"!=typeof e||e.length<=0},Zc=function(e){try{var t=zc(e);return!Vc(t)}catch(e){return!1}};var Jc=["h1|h2|h3|h4|h5|h6","ul|ol|li|dd|dl|dt","table|thead|tbody|tfoot|col|colgroup|th|td|tr","div|article|section|footer|aside|details|summary|code|audio|video|canvas|figure","address|center|cite|p|pre|blockquote|marquee|caption|figcaption|track|source|output|svg"].join("|"),Qc=["span|a|link|b|s|i|del|u|em|strong|sup|sub|kbd","nav|font|bdi|samp|map|area|small|time|bdo|var|wbr|meter|dfn","ruby|rt|rp|mark|q|progress|input|textarea|select|ins"].join("|"),eu=new RegExp(yo(jc=yo(Bc="^(".concat(Jc,"|")).call(Bc,Qc,"|")).call(jc,"br|img|hr",")( |$|/)"),"i");function tu(e,t){return"string"!=typeof e?"":t?e.replace(/[<>&]/g,(function(e){return Gc[e]||e})):e.replace(/[<>&"']/g,(function(e){return Gc[e]||e}))}function nu(e,t){if("string"!=typeof e)return"";var n=ru(e);return tu(n=function(e){return"string"!=typeof e?"":e.replace(/&(\w+);?/g,(function(e,t){return Kc[t]||e}))}(n),t)}function ru(e){return e.replace(/&#(\d+);?/g,(function(e,t){return qc[t]||e}))}function iu(e){var t=function(e){return e.replace(/&#x([0-9a-f]+);?/gi,(function(e,t){var n=ms("0x".concat(t),16);try{return zc(n)}catch(t){return e}}))}(function(e){return e.replace(/&#(\d+);?/g,(function(e,t){try{return zc(t)}catch(t){return e}}))}(e)).match(/^\s*([\w\W]+?)(?=:)/i);if(!t)return!0;var n=["javascript","data"],r=t[1].replace(/[\s]/g,"");return-1===$c(n).call(n,r.toLowerCase())}function au(e){return encodeURI(e).replace(/[!'()*]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16))})).replace(/%25/g,"%")}function ou(e,t){var n=Ao(e);if(cc){var r=cc(e);t&&(r=Ro(r).call(r,(function(t){return pc(e,t).enumerable}))),n.push.apply(n,r)}return n}function su(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ic.manual=!0;var lu={figure:"figure"},cu=function(e){St(n,e);var t=su(n);function n(e){e.externals;var r,i,a=e.config;(vt(this,n),r=t.call(this,{needCache:!0}),n.inlineCodeCache={},r.codeCache={},r.customLang=[],r.customParser={},r.wrap=a.wrap,r.lineNumber=a.lineNumber,a&&a.customRenderer)&&(r.customLang=Jo(i=Ao(a.customRenderer)).call(i,(function(e){return e.toLowerCase()})),r.customParser=function(e){for(var t=1;t<arguments.length;t++){var n,r=null!=arguments[t]?arguments[t]:{};if(t%2)Co(n=ou(Object(r),!0)).call(n,(function(t){Ir(e,t,r[t])}));else if(gc)mc(e,gc(r));else{var i;Co(i=ou(Object(r))).call(i,(function(t){co(e,t,pc(r,t))}))}}return e}({},a.customRenderer));return r.customHighlighter=a.highlighter,r}return lo(n,[{key:"$codeCache",value:function(e,t){return e&&t&&(this.codeCache[e]=t),this.codeCache[e]?this.codeCache[e]:(this.codeCache.length>40&&(this.codeCache.length=0),!1)}},{key:"parseCustomLanguage",value:function(e,t,n){var r,i,a,o,s,l=this.customParser[e];if(!l||"function"!=typeof l.render)return!1;var c=l.render(t,n.sign,this.$engine);if(!c)return!1;var u=lu[l.constructor.TYPE]||"div";return yo(r=yo(i=yo(a=yo(o=yo(s="<".concat(u,' data-sign="')).call(s,n.sign,'" data-type="')).call(o,e,'" data-lines="')).call(a,n.lines,'">')).call(i,c,"</")).call(r,u,">")}},{key:"fillTag",value:function(e){var t=[];return Jo(e).call(e,(function(e){if(!e)return"";for(var n=e;t.length;){var r,i=t.pop();n=yo(r="".concat(i)).call(r,n)}var a=n.match(/<span class="(.+?)">|<\/span>/g),o=0;if(!a)return n;for(;a.length;){var s=a.pop();/<\/span>/.test(s)?o+=1:o?o-=1:t.unshift(s.match(/<span class="(.+?)">/)[0])}for(var l=0;l<t.length;l++)n="".concat(n,"</span>");return n}))}},{key:"renderLineNumber",value:function(e){if(!this.lineNumber)return e;var t=e.split("\n");return t.pop(),t=this.fillTag(t),'<span class="code-line">'.concat(t.join('</span>\n<span class="code-line">'),"</span>")}},{key:"isInternalCustomLangCovered",value:function(e){var t;return-1!==$c(t=this.customLang).call(t,e)}},{key:"computeLines",value:function(e,t,n){var r=t,i=this.getLineCount(e,r);return{sign:this.$engine.md5(e.replace(/^\n+/,"")+i),lines:i}}},{key:"appendMermaid",value:function(e,t){var n=e,r=t;if(/^flow([ ](TD|LR))?$/i.test(r)&&!this.isInternalCustomLangCovered(r)){var i,a=r.match(/^flow(?:[ ](TD|LR))?$/i)||[];n=yo(i="graph ".concat(a[1]||"TD","\n")).call(i,n),r="mermaid"}return/^seq$/i.test(r)&&!this.isInternalCustomLangCovered(r)&&(n="sequenceDiagram\n".concat(n),r="mermaid"),"mermaid"===r&&(n=(n=n.replace(/(^[\s]*)stateDiagram-v2\n/,"$1stateDiagram\n")).replace(/(^[\s]*)sequenceDiagram[ \t]*\n[\s]*autonumber[ \t]*\n/,"$1sequenceDiagram\n")),[n,r]}},{key:"wrapCode",value:function(e,t){var n,r;return yo(n=yo(r='<code class="language-'.concat(t)).call(r,this.wrap?" wrap":"",'">')).call(n,e,"</code>")}},{key:"renderCodeBlock",value:function(e,t,n,r){var i,a,o,s=e,l=t;return this.customHighlighter?s=this.customHighlighter(s,l):(l&&Ic.languages[l]||(l="javascript"),s=Ic.highlight(s,Ic.languages[l],l),s=this.renderLineNumber(s)),s=yo(i=yo(a=yo(o='<div data-sign="'.concat(n,'" data-type="codeBlock" data-lines="')).call(o,r,'">\n      <pre class="language-')).call(a,l,'">')).call(i,this.wrapCode(s,l),"</pre>\n    </div>")}},{key:"beforeMakeHtml",value:function(e,t,r){var i=this,a=e;a=a.replace(this.RULE.reg,(function(e,t,n,r){var a,o,s,l=r,c=i.computeLines(e,t,r),u=c.sign,f=c.lines,d=i.$codeCache(u);if(d&&""!==d)return i.getCacheWithSpace(i.pushCache(d,u,f),e);l=(l=l.replace(/~D/g,"$")).replace(/~T/g,"~");var p=null!==(a=null==t||null===(o=t.match(/[ ]/g))||void 0===o?void 0:o.length)&&void 0!==a?a:0;if(p>0){var h=new RegExp("(^|\\n)[ ]{1,".concat(p,"}"),"g");l=l.replace(h,"$1")}var g=cs(n).call(n);if(/^(math|katex|latex)$/i.test(g)&&!i.isInternalCustomLangCovered(g)){var m,v=e.match(/^\s*/g);return yo(m="".concat(v,"~D~D\n")).call(m,l,"~D~D")}var y=i.appendMermaid(l,g),b=Pc(y,2);return l=b[0],g=b[1],-1!==$c(s=i.customLang).call(s,g.toLowerCase())&&(d=i.parseCustomLanguage(g,l,{lines:f,sign:u}))&&""!==d?(i.$codeCache(u,d),i.getCacheWithSpace(i.pushCache(d,u,f),e)):(l=l.replace(/~X/g,"\\`"),d=(d=i.renderCodeBlock(l,g,u,f)).replace(/\\/g,"\\\\"),d=i.$codeCache(u,d),i.getCacheWithSpace(i.pushCache(d,u,f),e))}));var o=/(`+)(.+?(?:\n.+?)*?)\1/g;return o.test(a)&&(a=(a=(a=a.replace(/\\`/g,"~~not~inlineCode")).replace(o,(function(e,t,r){if("`"===cs(r).call(r))return e;var a=r.replace(/~~not~inlineCode/g,"\\`");a=(a=i.$replaceSpecialChar(a)).replace(/\\/g,"\\\\");var o="<code>".concat(tu(a),"</code>"),s=i.$engine.md5(o);return n.inlineCodeCache[s]=o,"~~CODE".concat(s,"$")}))).replace(/~~not~inlineCode/g,"\\`")),a}},{key:"makeHtml",value:function(e){return e}},{key:"$replaceSpecialChar",value:function(e){var t=e.replace(/~Q/g,"\\~");return t=(t=(t=(t=t.replace(/~Y/g,"\\!")).replace(/~Z/g,"\\#")).replace(/~&/g,"\\&")).replace(/~K/g,"\\/")}},{key:"rule",value:function(){var e={begin:/(?:^|\n)(\n*(?:[^\S\n]*))```(.*?)\n/,content:/([\w\W]*?)/,end:/[^\S\n]*```[ \t]*(?=$|\n+)/};return e.reg=new RegExp(e.begin.source+e.content.source+e.end.source,"g"),e}},{key:"mounted",value:function(e){}}]),n}(_s);function uu(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(cu,"HOOK_NAME","codeBlock"),Ir(cu,"inlineCodeCache",{});var fu=function(e){St(n,e);var t=uu(n);function n(){return vt(this,n),t.apply(this,arguments)}return lo(n,[{key:"makeHtml",value:function(e){return e}},{key:"afterMakeHtml",value:function(e){var t=e;return Ao(cu.inlineCodeCache).length>0&&(t=t.replace(/~~CODE([0-9a-zA-Z]+)\$/g,(function(e,t){return cu.inlineCodeCache[t]})),cu.inlineCodeCache={}),t}},{key:"rule",value:function(){var e={begin:"(`+)[ ]*",end:"[ ]*\\1",content:"(.+?(?:\\n.+?)*?)"};return e.reg=Cl(e,"g"),e}}]),n}(_s);function du(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(fu,"HOOK_NAME","inlineCode");var pu=function(e){St(n,e);var t=du(n);function n(e){var r,i=e.config,a=e.globalConfig;return vt(this,n),(r=t.call(this,{config:i})).urlProcessor=a.urlProcessor,r.openNewPage=i.openNewPage,r}return lo(n,[{key:"beforeMakeHtml",value:function(e){return e.replace(this.RULE.reg,(function(e){return e.replace(/~D/g,"~1D")}))}},{key:"toHtml",value:function(e,t,n,r,i,a,o){var s=void 0===r?"ref":"url",l="";if("ref"===s)return e;if("url"===s){var c;l=i&&""!==cs(i).call(i)?' title="'.concat(tu(i.replace(/["']/g,"")),'"'):"",o?l+=' target="'.concat(o.replace(/{target\s*=\s*(.*?)}/,"$1"),'"'):this.openNewPage&&(l+=' target="_blank"');var u,f,d,p=cs(r).call(r).replace(/~1D/g,"~D"),h=n.replace(/~1D/g,"~D");return iu(p)?(p=this.urlProcessor(p,"link"),yo(u=yo(f=yo(d="".concat(t,'<a href="')).call(d,au(p),'" rel="nofollow"')).call(f,l,">")).call(u,h,"</a>")):yo(c="".concat(t,"<span>")).call(c,n,"</span>")}return e}},{key:"toStdMarkdown",value:function(e){return e}},{key:"makeHtml",value:function(e){var t,n;return this.test(e)?El()?e.replace(this.RULE.reg,go(n=this.toHtml).call(n,this)):wc(e,this.RULE.reg,go(t=this.toHtml).call(t,this),!0,1):e}},{key:"rule",value:function(){var e={begin:El()?"((?<!\\\\))":"(^|[^\\\\])",content:["\\[([^\\n]+?)\\]","[ \\t]*","".concat('(?:\\(([^"][^\\s)]+?[^"])(?:[ \\t]((?:".*?")|(?:\'.*?\')))?\\)|\\[(').concat("(?:[^\\n]*?\\S[^\\n]*?)",")\\]")+")","(\\{target\\s*=\\s*(_blank|_parent|_self|_top)\\})?"].join(""),end:""};return e.reg=Cl(e,"g"),e}}]),n}(Ko);Ir(pu,"HOOK_NAME","link");ye({target:"String",proto:!0},{repeat:function(e){var t=Ht(b(this)),n="",r=De(e);if(r<0||r==1/0)throw RangeError("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}});var hu=uo("String").repeat,gu=String.prototype,mu=function(e){var t=e.repeat;return"string"==typeof e||e===gu||e instanceof String&&t===gu.repeat?hu:t};function vu(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}var yu=function(e){St(n,e);var t=vu(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:void 0},i=r.config;return vt(this,n),e=t.call(this,{config:i}),i?(e.allowWhitespace=!!i.allowWhitespace,e):Or(e)}return lo(n,[{key:"makeHtml",value:function(e,t){var n=function(e,n,r,i){var a,o,s,l,c,u=r.length%2==1?"em":"strong",f=Math.floor(r.length/2),d=mu(a="<strong>").call(a,f),p=mu(o="</strong>").call(o,f);return"em"===u&&(d+="<em>",p="</em>".concat(p)),yo(s=yo(l=yo(c="".concat(n)).call(c,d)).call(l,t(i).html.replace(/_/g,"~U"))).call(s,p)},r=e;return(r=(r=this.allowWhitespace?(r=(r=r.replace(/(^|\n[\s]*)(\*)([^\s*](?:.*?)(?:(?:\n.*?)*?))\*/g,n)).replace(/(^|\n[\s]*)(\*{2,})((?:.*?)(?:(?:\n.*?)*?))\2/g,n)).replace(/([^\n*\\\s][ ]*)(\*+)((?:.*?)(?:(?:\n.*?)*?))\2/g,n):r.replace(this.RULE.asterisk.reg,n)).replace(this.RULE.underscore.reg,(function(e,n,r,i,a,o){var s,l,c,u,f;if(""===cs(i).call(i))return e;var d=r.length%2==1?"em":"strong",p=Math.floor(r.length/2),h=mu(s="<strong>").call(s,p),g=mu(l="</strong>").call(l,p),m=t(i).html;return"em"===d&&(h+="<em>",g="</em>".concat(g)),yo(c=yo(u=yo(f="".concat(n)).call(f,h)).call(u,m)).call(c,g)}))).replace(/~U/g,"_")}},{key:"test",value:function(e,t){return this.RULE[t].reg&&this.RULE[t].reg.test(e)}},{key:"rule",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:void 0},t=e.config,n=!!t&&!!t.allowWhitespace,r=n?"(?:.*?)(?:(?:\\n.*?)*?)":"(?:(?:\\S|(?:\\S.*?\\S))(?:[ \\t]*\\n.*?)*?)",i={begin:"(^|[^\\\\])(\\*+)",content:"(".concat(r,")"),end:"\\2"},a={begin:"(^|".concat(Ol,")(_+)"),content:"(".concat(r,")"),end:"\\2(?=".concat(Ol,"|$)")};return i.reg=Cl(i,"g"),a.reg=Cl(a,"g"),{asterisk:i,underscore:a}}}]),n}(Ko);function bu(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(yu,"HOOK_NAME","fontEmphasis");var wu=function(e){St(n,e);var t=bu(n);function n(e){var r;return vt(this,n),(r=t.call(this)).classicBr=e.globalConfig.classicBr,r.removeBrAfterBlock=null,r.removeBrBeforeBlock=null,r}return lo(n,[{key:"$cleanParagraph",value:function(e){if(this.$engine.$cherry.options.engine.global.classicBr)return e.replace(/^\n+/,"").replace(/\n+$/,"");if(!this.removeBrAfterBlock){var t,n=this.$engine.htmlWhiteListAppend?yo(t="".concat(this.$engine.htmlWhiteListAppend,"|")).call(t,Jc).replace(/\|\|+/g,"|"):Jc;this.removeBrAfterBlock=new RegExp("<(".concat(n,")(>| [^>]*>)\\s*\\n\\s*"),"ig"),this.removeBrBeforeBlock=new RegExp("\\n\\s*<\\/(".concat(n,")>\\s*\\n"),"ig")}return e.replace(/^\n+/,"").replace(/\n+$/,"").replace(this.removeBrAfterBlock,"<$1$2").replace(this.removeBrBeforeBlock,"</$1>").replace(/\n/g,"<br>")}},{key:"makeHtml",value:function(e,t){var n=this;return this.test(e)?e.replace(this.RULE.reg,(function(e,r,i){var a;if(n.isContainsCache(e,!0))return e;var o,s=function(e){var r,i,a,o,s,l;if(""===cs(e).call(e))return"";var c=t(e),u=c.sign,f=c.html,d="p";new RegExp("<(".concat(Jc,")[^>]*>"),"i").test(f)&&(d="div");var p=n.getLineCount(e,e);return yo(r=yo(i=yo(a=yo(o=yo(s=yo(l="<".concat(d,' data-sign="')).call(l,u)).call(s,p,'" data-type="')).call(o,d,'" data-lines="')).call(a,p,'">')).call(i,n.$cleanParagraph(f),"</")).call(r,d,">")};return n.isContainsCache(i)?n.makeExcludingCached(yo(o="".concat(r)).call(o,i),s):s(yo(a="".concat(r)).call(a,i))})):e}},{key:"rule",value:function(){var e={begin:"(?:^|\\n)(\\n*)",end:"(?=\\s*$|\\n\\n)",content:"([\\s\\S]+?)"};return e.reg=new RegExp(e.begin+e.content+e.end,"g"),e}}]),n}(_s);Ir(wu,"HOOK_NAME","normalParagraph");var _u=function(e){return void 0!==e&&(B(e,"value")||B(e,"writable"))};ye({target:"Reflect",stat:!0},{get:function e(t,n){var r,i,a=arguments.length<3?t:arguments[2];return de(t)===a?t[n]:(r=re.f(t,n))?_u(r)?r.value:void 0===r.get?void 0:r.get.call(a):_(i=er(t))?e(i,n,a):void 0}});var ku=k.Reflect.get,xu=dc,Su=r((function(e){e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Rr(e)););return e},e.exports.default=e.exports,e.exports.__esModule=!0}));n(Su);var Cu=n(r((function(e){function t(n,r,i){return"undefined"!=typeof Reflect&&ku?(e.exports=t=ku,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e,t,n){var r=Su(e,t);if(r){var i=xu(r,t);return i.get?i.get.call(n):i.value}},e.exports.default=e.exports,e.exports.__esModule=!0),t(n,r,i||n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})));function Eu(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}var Au=/[\s\-_]/,Tu=/[A-Za-z]/,Ou=/[0-9]/,Lu=function(e){St(n,e);var t=Eu(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:void 0,externals:void 0},i=(r.externals,r.config);return vt(this,n),(e=t.call(this,{needCache:!0})).strict=!i||!!i.strict,e.RULE=e.rule(),e.headerIDCache=[],e.headerIDCounter={},e}return lo(n,[{key:"$parseTitleText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"string"!=typeof e?"":e.replace(/<.*?>/g,"").replace(/&#60;/g,"<").replace(/&#62;/g,">")}},{key:"$generateId",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.length,r="",i=0;i<n;i++){var a=e.charAt(i);if(Tu.test(a))r+=t?a.toLowerCase():a;else if(Ou.test(a))r+=a;else if(Au.test(a))r+=r.length<1||"-"!==r.charAt(r.length-1)?"-":"";else if(a.charCodeAt(0)>255)try{r+=encodeURIComponent(a)}catch(e){}}return r}},{key:"generateIDNoDup",value:function(e){var t,n=e.replace(/&#60;/g,"<").replace(/&#62;/g,">"),r=this.$generateId(n,!0),i=$c(t=this.headerIDCache).call(t,r);if(-1!==i)this.headerIDCounter[i]+=1,r+="-".concat(this.headerIDCounter[i]+1);else{var a=this.headerIDCache.push(r);this.headerIDCounter[a-1]=1}return r}},{key:"$wrapHeader",value:function(e,t,n,r){var i,a,o,s,l,c,u,f=r(cs(e).call(e)),d=f.html,p=d.match(/\s+\{#([A-Za-z0-9-]+)\}$/);null!==p&&(d=d.substring(0,p.index),u=Pc(p,2)[1]);var h=this.$parseTitleText(d);if(!u){u=this.generateIDNoDup(h.replace(/~fn#([0-9]+)#/g,""))}var g=this.$engine.md5(yo(i=yo(a=yo(o="".concat(t,"-")).call(o,f.sign,"-")).call(a,u,"-")).call(i,n));return{html:[yo(s=yo(l=yo(c="<h".concat(t,' id="')).call(c,u,'" data-sign="')).call(l,g,'" data-lines="')).call(s,n,'">'),'<a class="anchor" href="#'.concat(u,'"></a>'),"".concat(d),"</h".concat(t,">")].join(""),sign:"".concat(g)}}},{key:"beforeMakeHtml",value:function(e){var t=this,n=e;return this.test(n,"atx")&&(n=n.replace(this.RULE.atx.reg,(function(e,n,r,i){return""===cs(i).call(i)?e:t.getCacheWithSpace(t.pushCache(e),e,!0)}))),this.test(n,"setext")&&(n=n.replace(this.RULE.setext.reg,(function(e,n,r){return""===cs(r).call(r)||t.isContainsCache(r)?e:t.getCacheWithSpace(t.pushCache(e),e,!0)}))),n}},{key:"makeHtml",value:function(e,t){var n=this,r=this.restoreCache(e);return this.test(r,"atx")&&(r=r.replace(this.RULE.atx.reg,(function(e,r,i,a){var o=ys(r,n.getLineCount(e.replace(/^\n+/,""))),s=a.replace(/\s+#+\s*$/,""),l=n.$wrapHeader(s,i.length,o,t),c=l.html,u=l.sign;return n.getCacheWithSpace(n.pushCache(c,u,o),e,!0)}))),this.test(r,"setext")&&(r=r.replace(this.RULE.setext.reg,(function(e,r,i,a){if(n.isContainsCache(i))return e;var o=ys(r,n.getLineCount(e.replace(/^\n+/,""))),s="-"===a[0]?2:1,l=n.$wrapHeader(i,s,o,t),c=l.html,u=l.sign;return n.getCacheWithSpace(n.pushCache(c,u,o),e,!0)}))),r}},{key:"afterMakeHtml",value:function(e){var t=Cu(Nr(n.prototype),"afterMakeHtml",this).call(this,e);return this.headerIDCache=[],this.headerIDCounter={},t}},{key:"test",value:function(e,t){return this.RULE[t].reg&&this.RULE[t].reg.test(e)}},{key:"rule",value:function(){var e={begin:"(?:^|\\n)(\\n*)",content:["(?:\\h*","(.+)",")\\n","(?:\\h*","([=]+|[-]+)",")"].join(""),end:"(?=$|\\n)"};e.reg=Cl(e,"g",!0);var t={begin:"(?:^|\\n)(\\n*)(?:\\h*(#{1,6}))",content:"(.+?)",end:"(?=$|\\n)"};return this.strict&&(t.begin+="(?=\\h+)"),t.reg=Cl(t,"g",!0),{setext:e,atx:t}}}]),n}(_s);function Mu(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(Lu,"HOOK_NAME","header");var Ru=function(e){St(n,e);var t=Mu(n);function n(){return vt(this,n),t.apply(this,arguments)}return lo(n,[{key:"rule",value:function(){var e={};return e.reg=new RegExp(""),e}},{key:"afterMakeHtml",value:function(e){var t=e.replace(/~Q/g,"~");return t=(t=(t=(t=(t=t.replace(/~X/g,"`")).replace(/~Y/g,"!")).replace(/~Z/g,"#")).replace(/~&/g,"&")).replace(/~K/g,"/")}}]),n}(Ko);Ir(Ru,"HOOK_NAME","transfer");var Nu=function(e){return function(t,n,r,i){$(n);var a=F(t),o=y(a),s=We(a),l=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(l in o){i=o[l],l+=c;break}if(l+=c,e?l<0:s<=l)throw TypeError("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=c)l in o&&(i=n(i,o[l],l,a));return i}},Pu={left:Nu(!1),right:Nu(!0)},$u="process"==m(s.process),Iu=Pu.left,Du=bo("reduce");ye({target:"Array",proto:!0,forced:!Du||!$u&&L>79&&L<83},{reduce:function(e){return Iu(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Hu=uo("Array").reduce,Fu=Array.prototype,ju=function(e){var t=e.reduce;return e===Fu||e instanceof Array&&t===Fu.reduce?Hu:t};function Bu(e,t){var n=Ao(e);if(cc){var r=cc(e);t&&(r=Ro(r).call(r,(function(t){return pc(e,t).enumerable}))),n.push.apply(n,r)}return n}function zu(e){for(var t=1;t<arguments.length;t++){var n,r=null!=arguments[t]?arguments[t]:{};if(t%2)Co(n=Bu(Object(r),!0)).call(n,(function(t){Ir(e,t,r[t])}));else if(gc)mc(e,gc(r));else{var i;Co(i=Bu(Object(r))).call(i,(function(t){co(e,t,pc(r,t))}))}}return e}function Wu(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}var Uu=function(e){St(n,e);var t=Wu(n);function n(e){var r,i=e.externals,a=e.config;vt(this,n),r=t.call(this,{needCache:!0});var o=a.enableChart,s=a.chartRenderEngine,l=a.externals,c=a.chartEngineOptions,u=void 0===c?{}:c;if(r.chartRenderEngine=null,!0===o)try{r.chartRenderEngine=new s(zu(zu({},i&&l instanceof Array&&ju(l).call(l,(function(e,t){return delete u[t],zu(zu({},e),{},Ir({},t,i[t]))}),{})),{},{renderer:"svg",width:500,height:300},u))}catch(e){console.warn(e)}return r}return lo(n,[{key:"$extendColumns",value:function(e,t){var n,r=t-e.length;return r<1?e:yo(e).call(e,mu(n="&nbsp;|").call(n,r).split("|",r))}},{key:"$parseChartOptions",value:function(e){if(!this.chartRenderEngine)return null;var t=/^[ ]*:(\w+):(?:[ ]*{(.*?)}[ ]*)?$/;if(!t.test(e))return null;var n=e.match(t),r=Pc(n,3),i=r[1],a=r[2];return{type:i,options:a?a.split(/\s*,\s*/):["x","y"]}}},{key:"$parseColumnAlignRules",value:function(e){var t=["U","L","R","C"];return{textAlignRules:Jo(e).call(e,(function(e){var n=cs(e).call(e),r=0;return/^:/.test(n)&&(r+=1),/:$/.test(n)&&(r+=2),t[r]})),COLUMN_ALIGN_MAP:{L:"left",R:"right",C:"center"}}}},{key:"$parseTable",value:function(e,t,n){var r,i,a,o,s,l,c=this,u=0,f=Jo(e).call(e,(function(e,t){var n=e.replace(/\\\|/g,"~CS").split("|");return""===n[0]&&n.shift(),""===n[n.length-1]&&n.pop(),1!==t&&(u=Math.max(u,n.length)),n})),d=this.$parseColumnAlignRules(f[1]),p=d.textAlignRules,h=d.COLUMN_ALIGN_MAP,g={header:[],rows:[],colLength:u,rowLength:f.length-2},m=this.$parseChartOptions(f[0][0]),v=this.$engine.md5(f[0][0]);m&&(f[0][0]="");var y=Jo(r=this.$extendColumns(f[0],u)).call(r,(function(e,t){var n,r;return g.header.push(e.replace(/~CS/g,"\\|")),yo(n="~CTH".concat(p[t]||"U"," ")).call(n,cs(r=e.replace(/~CS/g,"\\|")).call(r)," ~CTH$")})).join(""),b=ju(f).call(f,(function(e,n,r){var i;if(r<=1)return e;var a=r-2;g.rows[a]=[];var o=Jo(i=c.$extendColumns(n,u)).call(i,(function(e,n){var r,i;g.rows[a].push(e.replace(/~CS/g,"\\|"));var o=t(cs(r=e.replace(/~CS/g,"\\|")).call(r)).html;return yo(i="~CTD".concat(p[n]||"U"," ")).call(i,o," ~CTD$")}));return e.push("~CTR".concat(o.join(""),"~CTR$")),e}),[]).join(""),w=this.$renderTable(h,y,b,n);if(!m)return w;var _=this.chartRenderEngine.render(m.type,m.options,g),k=yo(i=yo(a=yo(o=yo(s='<figure id="table_chart_'.concat(v,"_")).call(s,w.sign,'"\n      data-sign="table_chart_')).call(o,v,"_")).call(a,w.sign,'" data-lines="0">')).call(i,_,"</figure>");return{html:yo(l="".concat(k)).call(l,w.html),sign:v+w.sign}}},{key:"$renderTable",value:function(e,t,n,r){var i,a,o,s,l=yo(i="~CTHD".concat(t,"~CTHD$~CTBD")).call(i,n,"~CTBD$"),c=this.$engine.md5(l),u=l.replace(/~CTHD\$/g,"</thead>").replace(/~CTHD/g,"<thead>").replace(/~CTBD\$/g,"</tbody>").replace(/~CTBD/g,"</tbody>").replace(/~CTR\$/g,"</tr>").replace(/~CTR/g,"<tr>").replace(/[ ]?~CTH\$/g,"</th>").replace(/[ ]?~CTD\$/g,"</td>").replace(/~CT(D|H)(L|R|C|U)[ ]?/g,(function(t,n,r){var i="<t".concat(n);return i+="U"===r?">":' align="'.concat(e[r],'">')})).replace(/\\\|/g,"|");return{html:yo(a=yo(o=yo(s='<div class="cherry-table-container" data-sign="'.concat(c)).call(s,r,'" data-lines="')).call(o,r,'">\n        <table class="cherry-table">')).call(a,u,"</table></div>"),sign:c}}},{key:"makeHtml",value:function(e,t){var n=this,r=e;return this.test(r,"strict")&&(r=r.replace(this.RULE.strict.reg,(function(e,r){var i,a=n.getLineCount(e,r),o=Jo(i=cs(e).call(e).split(/\n/)).call(i,(function(e){var t;return cs(t=String(e)).call(t)})),s=n.$parseTable(o,t,a),l=s.html,c=s.sign;return n.getCacheWithSpace(n.pushCache(l,c,a),e)}))),this.test(r,"loose")&&(r=r.replace(this.RULE.loose.reg,(function(e,r){var i,a=n.getLineCount(e,r),o=Jo(i=cs(e).call(e).split(/\n/)).call(i,(function(e){var t;return cs(t=String(e)).call(t)})),s=n.$parseTable(o,t,a),l=s.html,c=s.sign;return n.getCacheWithSpace(n.pushCache(l,c,a),e)}))),r}},{key:"test",value:function(e,t){return this.RULE[t].reg&&this.RULE[t].reg.test(e)}},{key:"rule",value:function(){var e={begin:"(?:^|\\n)(\\n*)",content:["(\\h*\\|[^\\n]+\\|?\\h*)","\\n","(?:(?:\\h*\\|\\h*:?[-]{1,}:?\\h*)+\\|?\\h*)","((\\n\\h*\\|[^\\n]+\\|?\\h*)*)"].join(""),end:"(?=$|\\n)"};e.reg=Cl(e,"g",!0);var t={begin:"(?:^|\\n)(\\n*)",content:["(\\|?[^\\n|]+(\\|[^\\n|]+)+\\|?)","\\n","(?:\\|?\\h*:?[-]{1,}:?[\\h]*(?:\\|[\\h]*:?[-]{1,}:?\\h*)+\\|?)","((\\n\\|?([^\\n|]+(\\|[^\\n|]*)+)\\|?)*)"].join(""),end:"(?=$|\\n)"};return t.reg=Cl(t,"g",!0),{strict:e,loose:t}}}]),n}(_s);function Gu(){return"object"===("undefined"==typeof window?"undefined":Er(window))}function Ku(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(Uu,"HOOK_NAME","table");var qu=function(e){St(n,e);var t=Ku(n);function n(e){var r;return vt(this,n),(r=t.call(this,{needCache:!0})).classicBr=e.globalConfig.classicBr,r}return lo(n,[{key:"beforeMakeHtml",value:function(e){var t=this;return this.test(e)?e.replace(this.RULE.reg,(function(e,n,r){if(0===r)return e;var i,a,o=n.match(/\n/g).length,s="br".concat(o),l="",c=t.$engine.$cherry.options.engine.global.classicBr;Gu()?l=c?yo(i='<span data-sign="'.concat(s,'" data-type="br" data-lines="')).call(i,o,'"></span>'):yo(a='<p data-sign="'.concat(s,'" data-type="br" data-lines="')).call(a,o,'">&nbsp;</p>'):l=c?"":"<br/>";var u=t.pushCache(l,s);return"\n\n".concat(u,"\n")})):e}},{key:"makeHtml",value:function(e,t){return e}},{key:"rule",value:function(){var e={begin:"(?:\\n)",end:"",content:"((?:\\h*\\n){2,})"};return e.reg=Cl(e,"g",!0),e}}]),n}(_s);function Xu(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(qu,"HOOK_NAME","br");var Yu=function(e){St(n,e);var t=Xu(n);function n(){return vt(this,n),t.call(this,{needCache:!0})}return lo(n,[{key:"beforeMakeHtml",value:function(e){var t=this;return e.replace(this.RULE.reg,(function(e,n){var r,i=(n.match(/\n/g)||[]).length+1,a="hr".concat(i);return vs(e,t.pushCache(yo(r='<hr data-sign="'.concat(a,'" data-lines="')).call(r,i,'" />'),a))}))}},{key:"makeHtml",value:function(e,t){return e}},{key:"rule",value:function(){var e={begin:"(?:^|\\n)(\\n*)[ ]*",end:"(?=$|\\n)",content:"((?:-[ \\t]*){3,}|(?:\\*[ \\t]*){3,}|(?:_[ \\t]*){3,})"};return e.reg=new RegExp(e.begin+e.content+e.end,"g"),e}}]),n}(_s);function Vu(e){var t=e.match(/#([0-9]+(px|em|pt|pc|in|mm|cm|ex|%)|auto)/g);if(!t)return"";var n="",r=Pc(t,2),i=r[0],a=r[1];return i&&(n=' width="'.concat(i.replace(/[ #]*/g,""),'"')),a&&(n+=' height="'.concat(a.replace(/[ #]*/g,""),'"')),n}function Zu(e){var t=e.match(/#(center|right|left|float-right|float-left)/i);if(!t)return"";var n="";switch(Pc(t,2)[1]){case"center":n+="transform:translateX(-50%);margin-left:50%;display:block;";break;case"right":n+="transform:translateX(-100%);margin-left:100%;margin-right:-100%;display:block;";break;case"left":n+="transform:translateX(0);margin-left:0;display:block;";break;case"float-right":n+="float:right;transform:translateX(0);margin-left:0;display:block;";break;case"float-left":n+="float:left;transform:translateX(0);margin-left:0;display:block;"}return n}function Ju(e,t){var n=Ao(e);if(cc){var r=cc(e);t&&(r=Ro(r).call(r,(function(t){return pc(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qu(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(Yu,"HOOK_NAME","hr");var ef=function(e,t,n,r,i,a,o,s,l){var c=void 0===i?"ref":"url",u="";if("ref"===c)return t;if("url"===c){var f,d,p,h,g,m,v,y=Vu(r),b=Zu(r);b&&(b=' style="'.concat(b,'" ')),u=a&&""!==cs(a).call(a)?' title="'.concat(nu(a),'"'):"",o&&(u+=" poster=".concat(au(o)));var w=l.urlProcessor(i,e),_=yo(f=yo(d=yo(p=yo(h=yo(g=yo(m="<".concat(e,' src="')).call(m,au(w),'"')).call(g,u," ")).call(h,y," ")).call(p,b,' controls="controls">')).call(d,nu(r||""),"</")).call(f,e,">");return yo(v="".concat(n)).call(v,s.videoWrapper?s.videoWrapper(i):_)}return t},tf=function(e){St(n,e);var t=Qu(n);function n(e){var r,i=e.config,a=e.globalConfig;return vt(this,n),(r=t.call(this,null)).urlProcessor=a.urlProcessor,r.extendMedia={tag:["video","audio"],replacer:{video:function(e,t,n,r,o,s){return ef("video",e,t,n,r,o,s,i,a)},audio:function(e,t,n,r,o,s){return ef("audio",e,t,n,r,o,s,i,a)}}},r.RULE=r.rule(r.extendMedia),r}return lo(n,[{key:"toHtml",value:function(e,t,n,r,i,a){var o=void 0===r?"ref":"url",s="";if("ref"===o)return e;if("url"===o){var l,c,u,f,d,p,h=Vu(n),g=Zu(n);g&&(g=' style="'.concat(g,'" ')),s=i&&""!==cs(i).call(i)?' title="'.concat(nu(i.replace(/["']/g,"")),'"'):"";var m,v="src",y=this.$engine.$cherry.options;if(y.callback&&y.callback.beforeImageMounted){var b=y.callback.beforeImageMounted(v,r);v=b.srcProp||v,m=b.src||r}return yo(l=yo(c=yo(u=yo(f=yo(d=yo(p="".concat(t,"<img ")).call(p,v,'="')).call(d,au(this.urlProcessor(m,"image")),'" ')).call(f,h," ")).call(u,g,' alt="')).call(c,nu(n||""),'"')).call(l,s,"/>")}return e}},{key:"toMediaHtml",value:function(e,t,n,r,i,a,o,s,l){var c,u;if(!this.extendMedia.replacer[n])return e;for(var f=arguments.length,d=new Array(f>9?f-9:0),p=9;p<f;p++)d[p-9]=arguments[p];return(c=this.extendMedia.replacer[n]).call.apply(c,yo(u=[this,e,t,r,i,a,l]).call(u,d))}},{key:"makeHtml",value:function(e){var t,n,r,i,a=e;this.test(a)&&(a=El()?a.replace(this.RULE.reg,go(t=this.toHtml).call(t,this)):wc(a,this.RULE.reg,go(n=this.toHtml).call(n,this),!0,1));this.testMedia(a)&&(a=El()?a.replace(this.RULE.regExtend,go(r=this.toMediaHtml).call(r,this)):wc(a,this.RULE.regExtend,go(i=this.toMediaHtml).call(i,this),!0,1));return a}},{key:"testMedia",value:function(e){return this.RULE.regExtend&&this.RULE.regExtend.test(e)}},{key:"rule",value:function(e){var t={begin:El()?"((?<!\\\\))!":"(^|[^\\\\])!",content:["\\[([^\\n]*?)\\]","[ \\t]*","".concat('(?:\\(([^"][^\\s]+?)(?:[ \\t]((?:".*?")|(?:\'.*?\')))?\\)|\\[(').concat("(?:[^\\n]*?\\S[^\\n]*?)",")\\]")+")"].join(""),end:""};if(e){var n=function(e){for(var t=1;t<arguments.length;t++){var n,r=null!=arguments[t]?arguments[t]:{};if(t%2)Co(n=Ju(Object(r),!0)).call(n,(function(t){Ir(e,t,r[t])}));else if(gc)mc(e,gc(r));else{var i;Co(i=Ju(Object(r))).call(i,(function(t){co(e,t,pc(r,t))}))}}return e}({},t);n.begin=El()?"((?<!\\\\))!(".concat(e.tag.join("|"),")"):"(^|[^\\\\])!(".concat(e.tag.join("|"),")"),n.end="({poster=(.*)})?",t.regExtend=Cl(n,"g")}return t.reg=Cl(t,"g"),t}}]),n}(Ko);function nf(e,t){var n=Ao(e);if(cc){var r=cc(e);t&&(r=Ro(r).call(r,(function(t){return pc(e,t).enumerable}))),n.push.apply(n,r)}return n}function rf(e){for(var t=1;t<arguments.length;t++){var n,r=null!=arguments[t]?arguments[t]:{};if(t%2)Co(n=nf(Object(r),!0)).call(n,(function(t){Ir(e,t,r[t])}));else if(gc)mc(e,gc(r));else{var i;Co(i=nf(Object(r))).call(i,(function(t){co(e,t,pc(r,t))}))}}return e}function af(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(tf,"HOOK_NAME","image");function of(e){var t;if("object"!==Er(e)&&Ao(e).length<1)return"";var n=[""];return Co(t=Ao(e)).call(t,(function(t){var r;n.push(yo(r="".concat(t,'="')).call(r,e[t],'"'))})),n.join(" ")}function sf(e,t){for(var n=/^(\t|[ ])/,r=e;n.test(r);)t.space+="\t"===r[0]?4:1,r=r.replace(n,"");return r}function lf(e,t){var n=/^((([*+-]|\d+[.]|[a-z]\.|[I一二三四五六七八九十]+\.)[ \t]+)([^\r]+?)($|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.]|[a-z]\.|[I一二三四五六七八九十]+\.)[ \t]+)))/;return n.test(e)?e.replace(n,(function(e,n,r,i,a){return t.type=r.search(/[*+-]/g)>-1?"ul":"ol",t.listStyle=function(e){return/^[a-z]/.test(e)?"lower-greek":/^[一二三四五六七八九十]/.test(e)?"cjk-ideographic":/^I/.test(e)?"upper-roman":/^\+/.test(e)?"circle":/^\*/.test(e)?"square":"default"}(r),t.start=Number(r.replace(".",""))?Number(r.replace(".","")):1,a})):(t.type="blank",e)}var cf=function e(){vt(this,e),this.index=0,this.space=0,this.type="",this.start=1,this.listStyle="",this.strs=[],this.children=[],this.lines=0},uf=function(e){St(n,e);var t=af(n);function n(e){var r,i=e.config;return vt(this,n),(r=t.call(this,{needCache:!0})).config=i||{},r.tree=[],r.emptyLines=0,r.indentSpace=Math.max(r.config.indentSpace,2),r}return lo(n,[{key:"addNode",value:function(e,t,n,r){"blank"===e.type?this.tree[r].strs.push(e.strs[0]):(this.tree[n].children.push(t),this.tree[t]=rf(rf({},e),{},{parent:n}))}},{key:"buildTree",value:function(e,t){var n=e.split("\n");this.tree=[],n.unshift("");for(var r=e.match(/\n*$/g)[0].length,i=0;i<n.length-r;i++){var a=new cf;if(n[i]=sf(n[i],a),n[i]=lf(n[i],a),a.strs.push(t(n[i]).html),a.index=i,0!==i){for(var o=i-1;!this.tree[o];)o-=1;if("blank"===a.type)this.addNode(a,i,this.tree[o].parent,o);else{for(;!this.tree[o]||this.tree[o].space>a.space;)o-=1;var s=a.space,l=this.tree[o].space;s<l+this.indentSpace?this.config.listNested&&this.tree[o].type!==a.type?this.addNode(a,i,o):this.addNode(a,i,this.tree[o].parent):s<l+this.indentSpace+4?this.addNode(a,i,o):(a.type="blank",this.addNode(a,i,this.tree[o].parent,o))}}else a.space=-2,this.tree.push(a)}}},{key:"renderSubTree",value:function(e,t,n){var r,i,a,o=this,s=0,l={},c=ju(t).call(t,(function(t,n){var r,i,a,l=o.tree[n],c={},u="<p>".concat(l.strs.join("<br>"),"</p>");l.lines+=l.strs.length;var f=l.children.length?o.renderTree(n):"";e.lines+=l.lines,s+=l.lines;return/<span class="ch-icon ch-icon-(square|check)"><\/span>/.test(u)&&(c.class="check-list-item"),yo(r=yo(i=yo(a="".concat(t,"<li")).call(a,of(c),">")).call(i,u)).call(r,f,"</li>")}),"");return void 0===e.parent&&(l["data-lines"]=0===e.index?s+this.emptyLines:s,l["data-sign"]=this.sign),l.class="cherry-list__".concat(this.tree[t[0]].listStyle),yo(r=yo(i=yo(a="<".concat(n)).call(a,of(l),">")).call(i,c,"</")).call(r,n,">")}},{key:"renderTree",value:function(e){var t=this,n=0,r=this.tree[e],i=r.children;return ju(i).call(i,(function(e,a,o){if(0===o)return e;if(t.tree[i[o]].type===t.tree[i[o-1]].type)return e;var s=t.renderSubTree(r,lc(i).call(i,n,o),t.tree[i[o-1]].type);return n=o,e+s}),"")+this.renderSubTree(r,lc(i).call(i,n,i.length),this.tree[i[i.length-1]].type)}},{key:"toHtml",value:function(e,t){return this.sign=this.$engine.md5(e),this.buildTree(function(e){return e.replace(/([*+-]\s+)\[(\s|x)\]/g,(function(e,t,n){var r,i=/\s/.test(n)?'<span class="ch-icon ch-icon-square"></span>':'<span class="ch-icon ch-icon-check"></span>';return yo(r="".concat(t)).call(r,i)}))}(e),t),this.renderTree(0)}},{key:"makeHtml",value:function(e,t){var n=this,r="".concat(e,"~0");return this.test(r)&&(r=r.replace(this.RULE.reg,(function(e){var r,i;n.emptyLines=null!==(r=null===(i=e.match(/^\n\n/))||void 0===i?void 0:i.length)&&void 0!==r?r:0;var a=e.replace(/~0$/g,"").replace(/^\n+/,""),o=n.toHtml(a,t);return n.getCacheWithSpace(n.pushCache(o,n.sign),e)}))),r=r.replace(/~0$/g,"")}},{key:"rule",value:function(){var e={begin:"(?:^|\n)(\n*)(([ ]{0,3}([*+-]|\\d+[.]|[a-z]\\.|[I一二三四五六七八九十]+\\.)[ \\t]+)",content:"([^\\r]+?)",end:"(~0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.]|[a-z]\\.|[I一二三四五六七八九十]+\\.)[ \\t]+)))"};return e.reg=new RegExp(e.begin+e.content+e.end,"gm"),e}}]),n}(_s);function ff(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}function df(e){for(var t=/^(\t|[ ]{1,4})/,n=e,r=0;t.test(n);)n=n.replace(/^(\t|[ ]{1,4})/g,""),r+=1;return r}Ir(uf,"HOOK_NAME","list");var pf=function(e){St(n,e);var t=ff(n);function n(){return vt(this,n),t.call(this,{needCache:!0})}return lo(n,[{key:"handleMatch",value:function(e,t){var n=this;return e.replace(this.RULE.reg,(function(e,r,i){for(var a,o,s,l=t(i),c=l.sign,u=l.html,f=n.signWithCache(u)||c,d=n.getLineCount(e,r),p=/^(([ \t]{0,3}([*+-]|\d+[.]|[a-z]\.|[I一二三四五六七八九十]+\.)[ \t]+)([^\r]+?)($|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.]|[a-z]\.|[I一二三四五六七八九十]+\.)[ \t]+)))/,h=df(r),g=u.split("\n"),m=/^[>\s]+/,v=/>/g,y=1,b=0,w=yo(a=yo(o='<blockquote data-sign="'.concat(f,"_")).call(o,d,'" data-lines="')).call(a,d,'">'),_=0;g[_];_++){if(0!==_){var k=df(g[_]);if(k<=h&&p.test(g[_]))break;h=k}var x,S=g[_].replace(m,(function(e){var t=e.match(v);return b=t&&t.length>y?t.length:y,""}));if(y===b&&0!==_&&(w+="<br>"),y<b)w+=mu(x="<blockquote>").call(x,b-y),y=b;w+=S}return w+=mu(s="</blockquote>").call(s,y),n.getCacheWithSpace(n.pushCache(w,f,d),e)}))}},{key:"makeHtml",value:function(e,t){return this.test(e)?this.handleMatch(e,t):e}},{key:"rule",value:function(){var e={begin:"(?:^|\\n)(\\s*)",content:["(",">(?:.+?\n)(?:>*.+?\n)*(?:>*.+?)","|",">(?:.+?)",")"].join(""),end:"(?=(\\n)|$)"};return e.reg=Cl(e,"g"),e}}]),n}(_s);function hf(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(pf,"HOOK_NAME","blockquote");var gf=function(e){St(n,e);var t=hf(n);function n(e){var r,i=e.config,a=e.globalConfig;return vt(this,n),(r=t.call(this,{config:i})).urlProcessor=a.urlProcessor,r}return lo(n,[{key:"isLinkInHtmlAttribute",value:function(e,t,n){for(var r,i=new RegExp(["<","([a-zA-Z][a-zA-Z0-9-]*)","(",["\\s+[a-zA-Z_:][a-zA-Z0-9_.:-]*","(",["\\s*=\\s*","(",["([^\\s\"'=<>`]+)","('[^']*')",'("[^"]*")'].join("|"),")"].join(""),")?"].join(""),")*","\\s*[/]?>"].join(""),"g");null!==(r=i.exec(e))&&!(r.index>t+n);)if(r.index<t&&r.index+r[0].length>=t+n)return!0;return!1}},{key:"isLinkInATag",value:function(e,t,n){for(var r,i=/<a.*>[^<]*<\/a>/g;null!==(r=i.exec(e))&&!(r.index>t+n);)if(r.index<t&&r.index+r[0].length>=t+n)return!0;return!1}},{key:"makeHtml",value:function(e,t){var n=this;return this.test(e)&&(Ll.test(e)||Rl.test(e))?e.replace(this.RULE.reg,(function(e,t,r,i,a,o,s){var l,c,u;if(n.isLinkInHtmlAttribute(s,o,r.length+i.length)||n.isLinkInATag(s,o,r.length+i.length))return e;var f=r.toLowerCase(),d="",p="",h=!0;if(("<"!==t&&"&#60;"!==t||">"!==a&&"&#62;"!==a)&&(d=t,p=a,h=!1),""===cs(i).call(i)||!h&&""===f&&!/www\./.test(i))return e;switch(f){case"javascript:":return e;case"mailto:":var g,m,v,y;return Ml.test(i)?yo(g=yo(m=yo(v="".concat(d,'<a href="')).call(v,au(yo(y="".concat(f)).call(y,i)),'" rel="nofollow">')).call(m,nu(i),"</a>")).call(g,p):e;case"":var b,w,_,k,x,S;if(d===p||!h)return Ml.test(i)?yo(b=yo(w=yo(_="".concat(d,'<a href="mailto:')).call(_,au(i),'" rel="nofollow">')).call(w,nu(i),"</a>")).call(b,p):Pl.test(i)?yo(k=yo(x="".concat(d)).call(x,n.renderLink("//".concat(i),i))).call(k,p):e;if(h)return Ml.test(i)?yo(S='<a href="mailto:'.concat(au(i),'" rel="nofollow">')).call(S,nu(i),"</a>"):$l.test(i)||Pl.test(i)?n.renderLink(i):e;default:return $l.test(i)?yo(l=yo(c="".concat(d)).call(c,n.renderLink(yo(u="".concat(f)).call(u,i)))).call(l,p):e}return e})):e}},{key:"rule",value:function(){var e,t={begin:"(<?)",content:["((?:[a-z][a-z0-9+.-]{1,31}:)?)",yo(e="((?:".concat(Nl.source,")|(?:")).call(e,Ll.source,"))")].join(""),end:"(>?)"};return t.reg=Cl(t,"ig"),t}},{key:"renderLink",value:function(e,t){var n,r=t;"string"!=typeof r&&(r=e);var i=this.urlProcessor(e,"autolink");return yo(n='<a href="'.concat(au(i),'" rel="nofollow">')).call(n,nu(r),"</a>")}}]),n}(Ko);function mf(){var e,t,n,r;Gu()&&(this.katex=null!==(e=null===(t=this.externals)||void 0===t?void 0:t.katex)&&void 0!==e?e:window.katex,this.MathJax=null!==(n=null===(r=this.externals)||void 0===r?void 0:r.MathJax)&&void 0!==n?n:window.MathJax)}Ir(gf,"HOOK_NAME","autoLink");var vf=["&","<",">",'"',"'"],yf=function(e){return e.replace(new RegExp(Tl,"g"),(function(e){return-1!==$c(vf).call(vf,e)?tu(e):"\\".concat(e)}))},bf=is.trim,wf=s.parseFloat,_f=s.Symbol,kf=_f&&_f.iterator,xf=1/wf(Qo+"-0")!=-1/0||kf&&!c((function(){wf(Object(kf))}))?function(e){var t=bf(Ht(e)),n=wf(t);return 0===n&&"-"==t.charAt(0)?-0:n}:wf;ye({global:!0,forced:parseFloat!=xf},{parseFloat:xf});var Sf=X("match"),Cf=function(e){if(function(e){var t;return _(e)&&(void 0!==(t=e[Sf])?!!t:"RegExp"==m(e))}(e))throw TypeError("The method doesn't accept regular expressions");return e},Ef=X("match"),Af=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Ef]=!1,"/./"[e](t)}catch(e){}}return!1},Tf="".startsWith,Of=Math.min,Lf=Af("startsWith");ye({target:"String",proto:!0,forced:!Lf},{startsWith:function(e){var t=Ht(b(this));Cf(e);var n=ze(Of(arguments.length>1?arguments[1]:void 0,t.length)),r=Ht(e);return Tf?Tf.call(t,r,n):t.slice(n,n+r.length)===r}});var Mf=uo("String").startsWith,Rf=String.prototype,Nf=function(e){var t=e.startsWith;return"string"==typeof e||e===Rf||e instanceof String&&t===Rf.startsWith?Mf:t};function Pf(e,t){if(!e||!e.tagName)return"";var n,r,i=document.createElement("div");return i.appendChild(e.cloneNode(!1)),n=i.innerHTML,t&&(r=$c(n).call(n,">")+1,n=n.substring(0,r)+e.innerHTML+n.substring(r)),i=null,n}function $f(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=document.createElement(e);(i.className=n,void 0!==r)&&Co(t=Ao(r)).call(t,(function(e){var t=r[e];if(Nf(e).call(e,"data-")){var n=e.replace(/^data-/,"");i.dataset[n]=t}else i.setAttribute(e,t)}));return i}function If(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}var Df=function(e){St(n,e);var t=If(n);function n(e){var r,i,a=e.config;return vt(this,n),i=t.call(this,{needCache:!0}),Ir(Tr(i),"engine","MathJax"),Ir(Tr(i),"katex",void 0),Ir(Tr(i),"MathJax",void 0),i.engine=Gu()?null!==(r=a.engine)&&void 0!==r?r:"MathJax":"node",i}return lo(n,[{key:"toHtml",value:function(e,t,n){var r,i,a;go(mf).call(mf,this)("engine");var o=e.replace(/^[ \f\r\t\v]*/,"").replace(/\s*$/,""),s=t.replace(/^[ \f\r\t\v]*\n/,""),l=this.$engine.md5(e),c=this.getLineCount(o,s);if(/\n/.test(t)||(c-=1),/\n\s*$/.test(e)||(c-=1),c=c>0?c:0,"katex"===this.engine){var u,f,d=this.katex.renderToString(n,{throwOnError:!1,displayMode:!0}),p=yo(u=yo(f='<div data-sign="'.concat(l,'" class="Cherry-Math" data-type="mathBlock"\n            data-lines="')).call(f,c,'">')).call(u,d,"</div>");return this.getCacheWithSpace(this.pushCache(p,l,c),e)}if(null!==(r=this.MathJax)&&void 0!==r&&r.tex2svg){var h,g,m=Pf(this.MathJax.tex2svg(n),!0),v=yo(h=yo(g='<div data-sign="'.concat(l,'" class="Cherry-Math" data-type="mathBlock"\n            data-lines="')).call(g,c,'">')).call(h,m,"</div>");return this.getCacheWithSpace(this.pushCache(v,l,c),e)}var y=yo(i=yo(a='<div data-sign="'.concat(l,'" class="Cherry-Math" data-type="mathBlock"\n          data-lines="')).call(a,c,'">$$')).call(i,yf(n),"$$</div>");return this.getCacheWithSpace(this.pushCache(y,l,c),e)}},{key:"beforeMakeHtml",value:function(e){var t,n=e;return n=n.replace(this.RULE.reg,go(t=this.toHtml).call(t,this))}},{key:"makeHtml",value:function(e){return e}},{key:"rule",value:function(){var e={begin:"(\\s*)~D~D\\s*",end:"\\s*~D~D(?:\\s{0,1})",content:"([\\w\\W]*?)"};return e.reg=new RegExp(e.begin+e.content+e.end,"g"),e}}]),n}(_s);function Hf(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(Df,"HOOK_NAME","mathBlock");var Ff=function(e){St(n,e);var t=Hf(n);function n(e){var r,i,a=e.config;return vt(this,n),i=t.call(this,{needCache:!0}),Ir(Tr(i),"engine","MathJax"),Ir(Tr(i),"katex",void 0),Ir(Tr(i),"MathJax",void 0),i.engine=Gu()?null!==(r=a.engine)&&void 0!==r?r:"MathJax":"node",i}return lo(n,[{key:"toHtml",value:function(e,t){var n,r,i;if(!t)return e;go(mf).call(mf,this)("engine");var a=t.match(/\n/g),o=a?a.length+2:2,s=this.$engine.md5(e);if("katex"===this.engine&&null!==(n=this.katex)&&void 0!==n&&n.renderToString){var l,c=this.katex.renderToString(t,{throwOnError:!1}),u=yo(l='<span class="Cherry-InlineMath" data-type="mathBlock" data-lines="'.concat(o,'">')).call(l,c,"</span>");return this.pushCache(u,_s.IN_PARAGRAPH_CACHE_KEY_PREFIX+s)}if(null!==(r=this.MathJax)&&void 0!==r&&r.tex2svg){var f,d=Pf(this.MathJax.tex2svg(t,{em:12,ex:6,display:!1}),!0),p=yo(f='<span class="Cherry-InlineMath" data-type="mathBlock" data-lines="'.concat(o,'">')).call(f,d,"</span>");return this.pushCache(p,_s.IN_PARAGRAPH_CACHE_KEY_PREFIX+s)}var h=yo(i='<span class="Cherry-InlineMath" data-type="mathBlock"\n        data-lines="'.concat(o,'">$')).call(i,yf(t),"$</span>");return this.pushCache(h,_s.IN_PARAGRAPH_CACHE_KEY_PREFIX+s)}},{key:"beforeMakeHtml",value:function(e){var t;return this.test(e)?e.replace(this.RULE.reg,go(t=this.toHtml).call(t,this)):e}},{key:"makeHtml",value:function(e){return e}},{key:"rule",value:function(){var e={begin:"~D\\n?",end:"~D",content:"(.*?)\\n?"};return e.reg=new RegExp(e.begin+e.content+e.end,"g"),e}}]),n}(_s);Ir(Ff,"HOOK_NAME","inlineMath");ye({target:"Array",proto:!0},{fill:function(e){for(var t=F(this),n=We(t),r=arguments.length,i=je(r>1?arguments[1]:void 0,n),a=r>2?arguments[2]:void 0,o=void 0===a?n:je(a,n);o>i;)t[i++]=e;return t}});var jf=uo("Array").fill,Bf=Array.prototype,zf=function(e){var t=e.fill;return e===Bf||e instanceof Array&&t===Bf.fill?jf:t};function Wf(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}function Uf(e){return e}var Gf={tocStyle:"plain",tocNodeClass:"toc-li",tocContainerClass:"toc",tocTitleClass:"toc-title",linkProcessor:Uf},Kf=function(e){St(n,e);var t=Wf(n);function n(e){e.externals;var r,i,a=e.config;return vt(this,n),i=t.call(this,{needCache:!0}),Ir(Tr(i),"tocStyle","nested"),Ir(Tr(i),"tocNodeClass","toc-li"),Ir(Tr(i),"tocContainerClass","toc"),Ir(Tr(i),"tocTitleClass","toc-title"),Ir(Tr(i),"linkProcessor",Uf),Ir(Tr(i),"baseLevel",1),Ir(Tr(i),"isFirstTocToken",!0),Ir(Tr(i),"allowMultiToc",!1),Co(r=Ao(Gf)).call(r,(function(e){i[e]=a[e]||Gf[e]})),i}return lo(n,[{key:"beforeMakeHtml",value:function(e){var t=this,n=e;return this.test(n,"extend")&&(n=n.replace(this.RULE.extend.reg,(function(e,n,r){var i;if(!t.allowMultiToc&&!t.isFirstTocToken)return yo(i="\n".concat(n)).call(i,'<p data-sign="empty-toc" data-lines="1">&nbsp;</p>');var a=t.pushCache(e);return t.isFirstTocToken=!1,vs(e,a)}))),this.test(n,"standard")&&(n=n.replace(this.RULE.standard.reg,(function(e,n,r){var i;return t.allowMultiToc||t.isFirstTocToken?(t.isFirstTocToken=!1,vs(e,t.pushCache(e))):yo(i="\n".concat(n)).call(i,'<p data-sign="empty-toc" data-lines="1">&nbsp;</p>')}))),n}},{key:"makeHtml",value:function(e){return e}},{key:"$makeLevel",value:function(e){for(var t="",n=this.baseLevel;n<e;n++)t+="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";return t}},{key:"$makeTocItem",value:function(e,t){var n,r,i,a,o,s=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],l="";t&&(l=this.$makeLevel(e.level));var c=this.linkProcessor("#".concat(e.id));return yo(n=yo(r=yo(i=yo(a=yo(o='<li class="'.concat(this.tocNodeClass,'">')).call(o,l,'<a href="')).call(a,c,'" class="level-')).call(i,e.level,'">')).call(r,e.text,"</a>")).call(n,s?"</li>":"")}},{key:"$makePlainToc",value:function(e){var t=this;return Jo(e).call(e,(function(e){return t.$makeTocItem(e,!0)})).join("")}},{key:"$makeNestedToc",value:function(e){var t,n,r=this,i=0,a=zf(t=new Array(7)).call(t,!1),o=zf(n=new Array(7)).call(n,!1),s="";Co(e).call(e,(function(e){var t=e.level;if(0===i){for(var n=t;n>=r.baseLevel;n--)s+="<ul>",o[n]=!0;return s+=r.$makeTocItem(e,!1,!1),a[t]=!0,void(i=t)}if(t<i){for(var l=i;l>=t;l--)a[l]&&(s+="</li>",a[l]=!1),o[l]&&l>t&&(s+="</ul>",o[l]=!1);a[t]=!0,s+=r.$makeTocItem(e,!1,!1),i=t}else if(t===i)a[i]&&(s+="</li>"),s+=r.$makeTocItem(e,!1,!1),a[t]=!0,o[t]=!0;else{for(var c=i+1;c<=t;c++)s+="<ul>",o[c]=!0;a[t]=!0,s+=r.$makeTocItem(e,!1,!1),i=t}}));for(var l=i;l>=this.baseLevel;l--)a[l]&&(s+="</li>",a[l]=!1),o[l]&&(s+="</ul>",o[l]=!1);return s}},{key:"$makeToc",value:function(e,t,n){var r,i,a,o=ys(n,1),s=yo(r=yo(i=yo(a='<dir class="'.concat(this.tocContainerClass,'" data-sign="')).call(a,t,"-")).call(i,o,'" data-lines="')).call(r,o,'">');return s+='<p class="'.concat(this.tocTitleClass,'">目录</p>'),e.length<=0?"":(this.baseLevel=Math.min.apply(Math,ic(Jo(e).call(e,(function(e){return e.level})))),"nested"===this.tocStyle?s+=this.$makeNestedToc(e):s+=this.$makePlainToc(e),s+="</dir>")}},{key:"afterMakeHtml",value:function(e){var t=this,r=Cu(Nr(n.prototype),"afterMakeHtml",this).call(this,e),i=[],a="";return r.replace(/<h([1-6]) id="([^"]+?)" data-sign=".+?" data-lines="[0-9]+"><a[^/]+?\/a>(.+?)<\/h\1>/g,(function(e,t,n,r){var o,s=r.replace(/~fn#[0-9]+#/g,"");i.push({level:+t,id:n,text:s}),a+=yo(o="".concat(t)).call(o,n)})),a=this.$engine.md5(a),r=(r=(r=r.replace(/(?:^|\n)(\[\[|\[|【【)(toc|TOC)(\]\]|\]|】】)([<~])/,(function(e){return e.replace(/(\]\]|\]|】】)([<~])/,"$1\n$2")}))).replace(this.RULE.extend.reg,(function(e,n){return t.$makeToc(i,a,n)}))).replace(this.RULE.standard.reg,(function(e,n){return t.$makeToc(i,a,n)})),this.isFirstTocToken=!0,r}},{key:"test",value:function(e,t){return!!this.RULE[t].reg&&this.RULE[t].reg.test(e)}},{key:"rule",value:function(){var e={begin:"(?:^|\\n)(\\n*)",end:"(?=$|\\n)",content:"[ ]*((?:【【|\\[\\[)(?:toc|TOC)(?:\\]\\]|】】))[ ]*"};e.reg=new RegExp(e.begin+e.content+e.end,"g");var t={begin:"(?:^|\\n)(\\n*)",end:"(?=$|\\n)",content:"[ ]*(\\[(?:toc|TOC)\\])[ ]*"};return t.reg=new RegExp(t.begin+t.content+t.end,"g"),{extend:e,standard:t}}}]),n}(_s);function qf(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(Kf,"HOOK_NAME","toc");var Xf=function(e){St(n,e);var t=qf(n);function n(e){var r;e.externals,e.config;return vt(this,n),(r=t.call(this)).footnoteCache={},r.footnoteMap={},r.footnote=[],r}return lo(n,[{key:"$cleanCache",value:function(){this.footnoteCache={},this.footnoteMap={},this.footnote=[]}},{key:"pushFootnoteCache",value:function(e,t){this.footnoteCache[e]=t}},{key:"getFootnoteCache",value:function(e){return this.footnoteCache[e]||null}},{key:"pushFootNote",value:function(e,t){var n,r,i,a,o,s;if(this.footnoteMap[e])return this.footnoteMap[e];var l=this.footnote.length+1,c={};c.fn=yo(n=yo(r=yo(i='<sup><a href="#fn:'.concat(l,'" id="fnref:')).call(i,l,'" title="')).call(r,e,'" class="footnote">[')).call(n,l,"]</a></sup>"),c.fnref=yo(a=yo(o=yo(s='<a href="#fnref:'.concat(l,'" id="fn:')).call(s,l,'" title="')).call(o,e,'" class="footnote-ref">[')).call(a,l,"]</a>"),c.num=l,c.note=cs(t).call(t),this.footnote.push(c);var u="\0~fn#".concat(l-1,"#\0");return this.footnoteMap[e]=u,u}},{key:"getFootNote",value:function(){return this.footnote}},{key:"formatFootNote",value:function(){var e,t=this.getFootNote();if(t.length<=0)return"";var n=Jo(t).call(t,(function(e){var t;return yo(t='<div class="one-footnote">\n'.concat(e.fnref)).call(t,e.note,"\n</div>")})).join(""),r=this.$engine.md5(n);return n=yo(e='<div class="footnote" data-sign="'.concat(r,'" data-lines="0"><div class="footnote-title">脚注</div>')).call(e,n,"</div>")}},{key:"beforeMakeHtml",value:function(e){var t=this,n=e;return this.test(n)&&(n=(n=n.replace(this.RULE.reg,(function(e,n,r,i){return t.pushFootnoteCache(r,i),(e.match(/\n/g)||[]).join("")}))).replace(/\[\^([^\]]+?)\](?!:)/g,(function(e,n){var r=t.getFootnoteCache(n);return r?t.pushFootNote(n,r):e})),n+=this.formatFootNote()),n}},{key:"makeHtml",value:function(e,t){return e}},{key:"afterMakeHtml",value:function(e){var t=this.getFootNote(),n=e.replace(/\0~fn#([0-9]+)#\0/g,(function(e,n){return t[n].fn}));return this.$cleanCache(),n}},{key:"rule",value:function(){var e={begin:"(^|\\n)",content:["\\[\\^([^\\]]+?)\\]:\\h*","([\\s\\S]+?)"].join(""),end:"(?=\\s*$|\\n\\n)"};return e.reg=Cl(e,"g",!0),e}}]),n}(_s);Ir(Xf,"HOOK_NAME","footnote");var Yf=r((function(e){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3)for(var i=e[r]<<16|e[r+1]<<8|e[r+2],a=0;a<4;a++)8*r+6*a<=8*e.length?n.push(t.charAt(i>>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r<e.length;i=++r%4)0!=i&&n.push((t.indexOf(e.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(e.charAt(r))>>>6-2*i);return n}};e.exports=n}()})),Vf={utf8:{stringToBytes:function(e){return Vf.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(Vf.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},Zf=Vf,Jf=function(e){return null!=e&&(Qf(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Qf(e.slice(0,0))}(e)||!!e._isBuffer)};function Qf(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var ed=r((function(e){!function(){var t=Yf,n=Zf.utf8,r=Jf,i=Zf.bin,a=function(e,o){e.constructor==String?e=o&&"binary"===o.encoding?i.stringToBytes(e):n.stringToBytes(e):r(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var s=t.bytesToWords(e),l=8*e.length,c=1732584193,u=-271733879,f=-1732584194,d=271733878,p=0;p<s.length;p++)s[p]=16711935&(s[p]<<8|s[p]>>>24)|4278255360&(s[p]<<24|s[p]>>>8);s[l>>>5]|=128<<l%32,s[14+(l+64>>>9<<4)]=l;var h=a._ff,g=a._gg,m=a._hh,v=a._ii;for(p=0;p<s.length;p+=16){var y=c,b=u,w=f,_=d;c=h(c,u,f,d,s[p+0],7,-680876936),d=h(d,c,u,f,s[p+1],12,-389564586),f=h(f,d,c,u,s[p+2],17,606105819),u=h(u,f,d,c,s[p+3],22,-1044525330),c=h(c,u,f,d,s[p+4],7,-176418897),d=h(d,c,u,f,s[p+5],12,1200080426),f=h(f,d,c,u,s[p+6],17,-1473231341),u=h(u,f,d,c,s[p+7],22,-45705983),c=h(c,u,f,d,s[p+8],7,1770035416),d=h(d,c,u,f,s[p+9],12,-1958414417),f=h(f,d,c,u,s[p+10],17,-42063),u=h(u,f,d,c,s[p+11],22,-1990404162),c=h(c,u,f,d,s[p+12],7,1804603682),d=h(d,c,u,f,s[p+13],12,-40341101),f=h(f,d,c,u,s[p+14],17,-1502002290),c=g(c,u=h(u,f,d,c,s[p+15],22,1236535329),f,d,s[p+1],5,-165796510),d=g(d,c,u,f,s[p+6],9,-1069501632),f=g(f,d,c,u,s[p+11],14,643717713),u=g(u,f,d,c,s[p+0],20,-373897302),c=g(c,u,f,d,s[p+5],5,-701558691),d=g(d,c,u,f,s[p+10],9,38016083),f=g(f,d,c,u,s[p+15],14,-660478335),u=g(u,f,d,c,s[p+4],20,-405537848),c=g(c,u,f,d,s[p+9],5,568446438),d=g(d,c,u,f,s[p+14],9,-1019803690),f=g(f,d,c,u,s[p+3],14,-187363961),u=g(u,f,d,c,s[p+8],20,1163531501),c=g(c,u,f,d,s[p+13],5,-1444681467),d=g(d,c,u,f,s[p+2],9,-51403784),f=g(f,d,c,u,s[p+7],14,1735328473),c=m(c,u=g(u,f,d,c,s[p+12],20,-1926607734),f,d,s[p+5],4,-378558),d=m(d,c,u,f,s[p+8],11,-2022574463),f=m(f,d,c,u,s[p+11],16,1839030562),u=m(u,f,d,c,s[p+14],23,-35309556),c=m(c,u,f,d,s[p+1],4,-1530992060),d=m(d,c,u,f,s[p+4],11,1272893353),f=m(f,d,c,u,s[p+7],16,-155497632),u=m(u,f,d,c,s[p+10],23,-1094730640),c=m(c,u,f,d,s[p+13],4,681279174),d=m(d,c,u,f,s[p+0],11,-358537222),f=m(f,d,c,u,s[p+3],16,-722521979),u=m(u,f,d,c,s[p+6],23,76029189),c=m(c,u,f,d,s[p+9],4,-640364487),d=m(d,c,u,f,s[p+12],11,-421815835),f=m(f,d,c,u,s[p+15],16,530742520),c=v(c,u=m(u,f,d,c,s[p+2],23,-995338651),f,d,s[p+0],6,-198630844),d=v(d,c,u,f,s[p+7],10,1126891415),f=v(f,d,c,u,s[p+14],15,-1416354905),u=v(u,f,d,c,s[p+5],21,-57434055),c=v(c,u,f,d,s[p+12],6,1700485571),d=v(d,c,u,f,s[p+3],10,-1894986606),f=v(f,d,c,u,s[p+10],15,-1051523),u=v(u,f,d,c,s[p+1],21,-2054922799),c=v(c,u,f,d,s[p+8],6,1873313359),d=v(d,c,u,f,s[p+15],10,-30611744),f=v(f,d,c,u,s[p+6],15,-1560198380),u=v(u,f,d,c,s[p+13],21,1309151649),c=v(c,u,f,d,s[p+4],6,-145523070),d=v(d,c,u,f,s[p+11],10,-1120210379),f=v(f,d,c,u,s[p+2],15,718787259),u=v(u,f,d,c,s[p+9],21,-343485551),c=c+y>>>0,u=u+b>>>0,f=f+w>>>0,d=d+_>>>0}return t.endian([c,u,f,d])};a._ff=function(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},a._gg=function(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},a._hh=function(e,t,n,r,i,a,o){var s=e+(t^n^r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},a._ii=function(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+(i>>>0)+o;return(s<<a|s>>>32-a)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,n){if(null==e)throw new Error("Illegal argument "+e);var r=t.wordsToBytes(a(e,n));return n&&n.asBytes?r:n&&n.asString?i.bytesToString(r):t.bytesToHex(r)}}()})),td={},nd=/^cherry-inner:\/\/([0-9a-f]+)$/i;var rd=function(){function e(){vt(this,e)}return lo(e,null,[{key:"isInnerLink",value:function(e){return nd.test(e)}},{key:"set",value:function(e){var t=ed(e);return td[t]=e,"cherry-inner://".concat(t)}},{key:"get",value:function(e){var t,n=null!==(t=e.match(nd))&&void 0!==t?t:[],r=Pc(n,2)[1];if(r)return td[r]}},{key:"replace",value:function(e,t){var n,r=null!==(n=e.match(nd))&&void 0!==n?n:[],i=Pc(r,2)[1];if(i)return td[i]=t,e}},{key:"clear",value:function(){td={}}}]),e}();function id(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}var ad=function(e){St(n,e);var t=id(n);function n(e){var r;e.externals,e.config;return vt(this,n),(r=t.call(this)).commentCache={},r}return lo(n,[{key:"$cleanCache",value:function(){this.commentCache={}}},{key:"pushCommentReferenceCache",value:function(e,t){var n,r=t.split(/[ ]+/g),i=sc(r),a=i[0],o=lc(i).call(i,1),s=rd.set(a);this.commentCache["".concat(e).toLowerCase()]=yo(n=[s]).call(n,ic(o)).join(" ")}},{key:"getCommentReferenceCache",value:function(e){return this.commentCache["".concat(e).toLowerCase()]||null}},{key:"beforeMakeHtml",value:function(e){var t=this,n=e;if(this.test(n)){n=(n=n.replace(this.RULE.reg,(function(e,n,r,i){return t.pushCommentReferenceCache(r,i),e.match(/\n/g).join("")}))).replace(/(\[[^\]\n]+?\])?(?:\[([^\]\n]+?)\])/g,(function(e,n,r){var i,a,o=t.getCommentReferenceCache(r);return o?n?yo(a="".concat(n,"(")).call(a,o,")"):yo(i="[".concat(r,"](")).call(i,o,")"):e})),this.$cleanCache()}return n}},{key:"makeHtml",value:function(e,t){return e}},{key:"afterMakeHtml",value:function(e){return e.replace(/cherry-inner:\/\/([0-9a-z]+)/gi,(function(e){return rd.get(e)||e}))}},{key:"rule",value:function(){var e={begin:"(^|\\n)",content:["\\[([^^][^\\]]*?)\\]:\\h*","([^\\n]+?)"].join(""),end:"(?=$|\\n)"};return e.reg=Cl(e,"g",!0),e}}]),n}(_s);Ir(ad,"HOOK_NAME","commentReference");var od=dn.some,sd=bo("some");ye({target:"Array",proto:!0,forced:!sd},{some:function(e){return od(this,e,arguments.length>1?arguments[1]:void 0)}});var ld=uo("Array").some,cd=Array.prototype,ud=function(e){var t=e.some;return e===cd||e instanceof Array&&t===cd.some?ld:t},fd=r((function(e,t){e.exports=function(){var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,i=Object.getOwnPropertyDescriptor,a=Object.freeze,o=Object.seal,s=Object.create,l="undefined"!=typeof Reflect&&Reflect,c=l.apply,u=l.construct;c||(c=function(e,t,n){return e.apply(t,n)}),a||(a=function(e){return e}),o||(o=function(e){return e}),u||(u=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var f,d=k(Array.prototype.forEach),p=k(Array.prototype.pop),h=k(Array.prototype.push),g=k(String.prototype.toLowerCase),m=k(String.prototype.match),v=k(String.prototype.replace),y=k(String.prototype.indexOf),b=k(String.prototype.trim),w=k(RegExp.prototype.test),_=(f=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(f,t)});function k(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return c(e,t,r)}}function x(e,r){t&&t(e,null);for(var i=r.length;i--;){var a=r[i];if("string"==typeof a){var o=g(a);o!==a&&(n(r)||(r[i]=o),a=o)}e[a]=!0}return e}function S(t){var n=s(null),r=void 0;for(r in t)c(e,t,[r])&&(n[r]=t[r]);return n}function C(e,t){for(;null!==e;){var n=i(e,t);if(n){if(n.get)return k(n.get);if("function"==typeof n.value)return k(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}var E=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),A=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),T=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),O=a(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),M=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R=a(["#text"]),N=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),P=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),I=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),D=o(/\{\{[\s\S]*|[\s\S]*\}\}/gm),H=o(/<%[\s\S]*|[\s\S]*%>/gm),F=o(/^data-[\-\w.\u00B7-\uFFFF]/),j=o(/^aria-[\-\w]+$/),B=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=o(/^(?:\w+script|data):/i),W=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function G(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var K=function(){return"undefined"==typeof window?null:window},q=function(e,t){if("object"!==(void 0===e?"undefined":U(e))||"function"!=typeof e.createPolicy)return null;var n=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=t.currentScript.getAttribute("data-tt-policy-suffix"));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K(),n=function(t){return e(t)};if(n.version="2.3.3",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,i=t.document,o=t.DocumentFragment,s=t.HTMLTemplateElement,l=t.Node,c=t.Element,u=t.NodeFilter,f=t.NamedNodeMap,k=void 0===f?t.NamedNodeMap||t.MozNamedAttrMap:f,X=t.Text,Y=t.Comment,V=t.DOMParser,Z=t.trustedTypes,J=c.prototype,Q=C(J,"cloneNode"),ee=C(J,"nextSibling"),te=C(J,"childNodes"),ne=C(J,"parentNode");if("function"==typeof s){var re=i.createElement("template");re.content&&re.content.ownerDocument&&(i=re.content.ownerDocument)}var ie=q(Z,r),ae=ie&&De?ie.createHTML(""):"",oe=i,se=oe.implementation,le=oe.createNodeIterator,ce=oe.createDocumentFragment,ue=oe.getElementsByTagName,fe=r.importNode,de={};try{de=S(i).documentMode?i.documentMode:{}}catch(e){}var pe={};n.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==de;var he=D,ge=H,me=F,ve=j,ye=z,be=W,we=B,_e=null,ke=x({},[].concat(G(E),G(A),G(T),G(L),G(R))),xe=null,Se=x({},[].concat(G(N),G(P),G($),G(I))),Ce=null,Ee=null,Ae=!0,Te=!0,Oe=!1,Le=!1,Me=!1,Re=!1,Ne=!1,Pe=!1,$e=!1,Ie=!0,De=!1,He=!0,Fe=!0,je=!1,Be={},ze=null,We=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ue=null,Ge=x({},["audio","video","img","source","image","track"]),Ke=null,qe=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml",Ze=Ve,Je=!1,Qe=void 0,et=["application/xhtml+xml","text/html"],tt="text/html",nt=void 0,rt=null,it=i.createElement("form"),at=function(e){rt&&rt===e||(e&&"object"===(void 0===e?"undefined":U(e))||(e={}),e=S(e),_e="ALLOWED_TAGS"in e?x({},e.ALLOWED_TAGS):ke,xe="ALLOWED_ATTR"in e?x({},e.ALLOWED_ATTR):Se,Ke="ADD_URI_SAFE_ATTR"in e?x(S(qe),e.ADD_URI_SAFE_ATTR):qe,Ue="ADD_DATA_URI_TAGS"in e?x(S(Ge),e.ADD_DATA_URI_TAGS):Ge,ze="FORBID_CONTENTS"in e?x({},e.FORBID_CONTENTS):We,Ce="FORBID_TAGS"in e?x({},e.FORBID_TAGS):{},Ee="FORBID_ATTR"in e?x({},e.FORBID_ATTR):{},Be="USE_PROFILES"in e&&e.USE_PROFILES,Ae=!1!==e.ALLOW_ARIA_ATTR,Te=!1!==e.ALLOW_DATA_ATTR,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Le=e.SAFE_FOR_TEMPLATES||!1,Me=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,$e=e.RETURN_DOM_FRAGMENT||!1,Ie=!1!==e.RETURN_DOM_IMPORT,De=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,He=!1!==e.SANITIZE_DOM,Fe=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,we=e.ALLOWED_URI_REGEXP||we,Ze=e.NAMESPACE||Ve,Qe=Qe=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?tt:e.PARSER_MEDIA_TYPE,nt="application/xhtml+xml"===Qe?function(e){return e}:g,Le&&(Te=!1),$e&&(Pe=!0),Be&&(_e=x({},[].concat(G(R))),xe=[],!0===Be.html&&(x(_e,E),x(xe,N)),!0===Be.svg&&(x(_e,A),x(xe,P),x(xe,I)),!0===Be.svgFilters&&(x(_e,T),x(xe,P),x(xe,I)),!0===Be.mathMl&&(x(_e,L),x(xe,$),x(xe,I))),e.ADD_TAGS&&(_e===ke&&(_e=S(_e)),x(_e,e.ADD_TAGS)),e.ADD_ATTR&&(xe===Se&&(xe=S(xe)),x(xe,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&x(Ke,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(ze===We&&(ze=S(ze)),x(ze,e.FORBID_CONTENTS)),Fe&&(_e["#text"]=!0),Me&&x(_e,["html","head","body"]),_e.table&&(x(_e,["tbody"]),delete Ce.tbody),a&&a(e),rt=e)},ot=x({},["mi","mo","mn","ms","mtext"]),st=x({},["foreignobject","desc","title","annotation-xml"]),lt=x({},A);x(lt,T),x(lt,O);var ct=x({},L);x(ct,M);var ut=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});var n=g(e.tagName),r=g(t.tagName);if(e.namespaceURI===Ye)return t.namespaceURI===Ve?"svg"===n:t.namespaceURI===Xe?"svg"===n&&("annotation-xml"===r||ot[r]):Boolean(lt[n]);if(e.namespaceURI===Xe)return t.namespaceURI===Ve?"math"===n:t.namespaceURI===Ye?"math"===n&&st[r]:Boolean(ct[n]);if(e.namespaceURI===Ve){if(t.namespaceURI===Ye&&!st[r])return!1;if(t.namespaceURI===Xe&&!ot[r])return!1;var i=x({},["title","style","font","a","script"]);return!ct[n]&&(i[n]||!lt[n])}return!1},ft=function(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ae}catch(t){e.remove()}}},dt=function(e,t){try{h(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!xe[e])if(Pe||$e)try{ft(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){var t=void 0,n=void 0;if(Ne)e="<remove></remove>"+e;else{var r=m(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===Qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var a=ie?ie.createHTML(e):e;if(Ze===Ve)try{t=(new V).parseFromString(a,Qe)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(Ze,"template",null);try{t.documentElement.innerHTML=Je?"":a}catch(e){}}var o=t.body||t.documentElement;return e&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),Ze===Ve?ue.call(t,Me?"html":"body")[0]:Me?t.documentElement:o},ht=function(e){return le.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},gt=function(e){return!(e instanceof X||e instanceof Y||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof k&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},mt=function(e){return"object"===(void 0===l?"undefined":U(l))?e instanceof l:e&&"object"===(void 0===e?"undefined":U(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},vt=function(e,t,r){pe[e]&&d(pe[e],(function(e){e.call(n,t,r,rt)}))},yt=function(e){var t=void 0;if(vt("beforeSanitizeElements",e,null),gt(e))return ft(e),!0;if(m(e.nodeName,/[\u0080-\uFFFF]/))return ft(e),!0;var r=nt(e.nodeName);if(vt("uponSanitizeElement",e,{tagName:r,allowedTags:_e}),!mt(e.firstElementChild)&&(!mt(e.content)||!mt(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return ft(e),!0;if("select"===r&&w(/<template/i,e.innerHTML))return ft(e),!0;if(!_e[r]||Ce[r]){if(Fe&&!ze[r]){var i=ne(e)||e.parentNode,a=te(e)||e.childNodes;if(a&&i)for(var o=a.length-1;o>=0;--o)i.insertBefore(Q(a[o],!0),ee(e))}return ft(e),!0}return e instanceof c&&!ut(e)?(ft(e),!0):"noscript"!==r&&"noembed"!==r||!w(/<\/no(script|embed)/i,e.innerHTML)?(Le&&3===e.nodeType&&(t=e.textContent,t=v(t,he," "),t=v(t,ge," "),e.textContent!==t&&(h(n.removed,{element:e.cloneNode()}),e.textContent=t)),vt("afterSanitizeElements",e,null),!1):(ft(e),!0)},bt=function(e,t,n){if(He&&("id"===t||"name"===t)&&(n in i||n in it))return!1;if(Te&&!Ee[t]&&w(me,t));else if(Ae&&w(ve,t));else{if(!xe[t]||Ee[t])return!1;if(Ke[t]);else if(w(we,v(n,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Ue[e])if(Oe&&!w(ye,v(n,be,"")));else if(n)return!1}return!0},wt=function(e){var t=void 0,r=void 0,i=void 0,a=void 0;vt("beforeSanitizeAttributes",e,null);var o=e.attributes;if(o){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xe};for(a=o.length;a--;){var l=t=o[a],c=l.name,u=l.namespaceURI;if(r=b(t.value),i=nt(c),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,vt("uponSanitizeAttribute",e,s),r=s.attrValue,!s.forceKeepAttr&&(dt(c,e),s.keepAttr))if(w(/\/>/i,r))dt(c,e);else{Le&&(r=v(r,he," "),r=v(r,ge," "));var f=nt(e.nodeName);if(bt(f,i,r))try{u?e.setAttributeNS(u,c,r):e.setAttribute(c,r),p(n.removed)}catch(e){}}}vt("afterSanitizeAttributes",e,null)}},_t=function e(t){var n=void 0,r=ht(t);for(vt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)vt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof o&&e(n.content),wt(n));vt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,i){var a=void 0,s=void 0,c=void 0,u=void 0,f=void 0;if((Je=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!mt(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!n.isSupported){if("object"===U(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(mt(e))return t.toStaticHTML(e.outerHTML)}return e}if(Re||at(i),n.removed=[],"string"==typeof e&&(je=!1),je);else if(e instanceof l)1===(s=(a=pt("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?a=s:a.appendChild(s);else{if(!Pe&&!Le&&!Me&&-1===e.indexOf("<"))return ie&&De?ie.createHTML(e):e;if(!(a=pt(e)))return Pe?null:ae}a&&Ne&&ft(a.firstChild);for(var d=ht(je?e:a);c=d.nextNode();)3===c.nodeType&&c===u||yt(c)||(c.content instanceof o&&_t(c.content),wt(c),u=c);if(u=null,je)return e;if(Pe){if($e)for(f=ce.call(a.ownerDocument);a.firstChild;)f.appendChild(a.firstChild);else f=a;return Ie&&(f=fe.call(r,f,!0)),f}var p=Me?a.outerHTML:a.innerHTML;return Le&&(p=v(p,he," "),p=v(p,ge," ")),ie&&De?ie.createHTML(p):p},n.setConfig=function(e){at(e),Re=!0},n.clearConfig=function(){rt=null,Re=!1},n.isValidAttribute=function(e,t,n){rt||at({});var r=nt(e),i=nt(t);return bt(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],h(pe[e],t))},n.removeHook=function(e){pe[e]&&p(pe[e])},n.removeHooks=function(e){pe[e]&&(pe[e]=[])},n.removeAllHooks=function(){pe={}},n}()}()}))(window);function dd(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}var pd=function(e){St(n,e);var t=dd(n);function n(){return vt(this,n),t.call(this,{needCache:!0})}return lo(n,[{key:"isAutoLinkTag",value:function(e){var t=[/^<([a-z][a-z0-9+.-]{1,31}:\/\/[^<> `]+)>$/i,/^<(mailto:[^<> `]+)>$/i,/^<([^()<>[\]:'@\\,"\s`]+@[^()<>[\]:'@\\,"\s`.]+\.[^()<>[\]:'@\\,"\s`]+)>$/i];return ud(t).call(t,(function(t){return t.test(e)}))}},{key:"isHtmlComment",value:function(e){return/^<!--.*?-->$/.test(e)}},{key:"beforeMakeHtml",value:function(e,t){var n=this;this.$engine.htmlWhiteListAppend?(this.htmlWhiteListAppend=new RegExp("^(".concat(this.$engine.htmlWhiteListAppend,")( |$|/)"),"i"),this.htmlWhiteList=this.$engine.htmlWhiteListAppend.split("|")):(this.htmlWhiteListAppend=!1,this.htmlWhiteList=[]);var r=e;return r=(r=(r=(r=function(e){if("string"!=typeof e)return"";var t=e.replace(/&(\w+);?/g,(function(e,t){return-1===$c(e).call(e,";")||-1===$c(Yc).call(Yc,t.toLowerCase())?e.replace(/&/g,"&amp;"):e}));return t=(t=t.replace(/&#(?!x)(\d*);?/gi,(function(e,t){return Vc(t)||-1===$c(e).call(e,";")||t.lenth>7||!Zc(t)?e.replace(/&/g,"&amp;"):e}))).replace(/&#x([0-9a-f]*);?/gi,(function(e,t){if(Vc(t))return e.replace(/&/g,"&amp;");var n="0x".concat(t),r=ms(n,16);return isNaN(r)||-1===$c(e).call(e,";")||t.lenth>6||!Zc(n)?e.replace(/&/g,"&amp;"):e}))}(r=ru(r))).replace(/<[/]?(.*?)>/g,(function(e,t){return eu.test(t)||n.isAutoLinkTag(e)||n.isHtmlComment(e)||!1!==n.htmlWhiteListAppend&&n.htmlWhiteListAppend.test(t)?e.replace(/</g,"$#60;").replace(/>/g,"$#62;"):e.replace(/</g,"&#60;").replace(/>/g,"&#62;")}))).replace(/<(?=\/?(\w|\n|$))/g,"&#60;")).replace(/\$#60;/g,"<").replace(/\$#62;/g,">")}},{key:"makeHtml",value:function(e,t){return e}},{key:"afterMakeHtml",value:function(e){var t=e,n={ALLOW_UNKNOWN_PROTOCOLS:!0,ADD_ATTR:["target"]};if(!1!==this.htmlWhiteListAppend){var r;if(n.ADD_TAGS=this.htmlWhiteList,(this.htmlWhiteListAppend.test("style")||this.htmlWhiteListAppend.test("ALL"))&&(t=t.replace(/<style(>| [^>]*>).*?<\/style>/gi,(function(e){return e.replace(/<br>/gi,"")}))),this.htmlWhiteListAppend.test("iframe")||this.htmlWhiteListAppend.test("ALL"))n.ADD_ATTR=yo(r=n.ADD_ATTR).call(r,["align","frameborder","height","longdesc","marginheight","marginwidth","name","sandbox","scrolling","seamless","src","srcdoc","width"]),n.SANITIZE_DOM=!1,t=t.replace(/<iframe(>| [^>]*>).*?<\/iframe>/gi,(function(e){return e.replace(/<br>/gi,"").replace(/\n/g,"")}));if(this.htmlWhiteListAppend.test("script")||this.htmlWhiteListAppend.test("ALL"))return t=t.replace(/<script(>| [^>]*>).*?<\/script>/gi,(function(e){return e.replace(/<br>/gi,"")}))}return Gu()||(n.FORBID_ATTR=["data-sign","data-lines"]),fd.sanitize(t,n)}}]),n}(_s);Ir(pd,"HOOK_NAME","htmlBlock");var hd={"+1":"1f44d","-1":"1f44e",100:"1f4af",1234:"1f522","1st_place_medal":"1f947","2nd_place_medal":"1f948","3rd_place_medal":"1f949","8ball":"1f3b1",a:"1f170",ab:"1f18e",abacus:"1f9ee",abc:"1f524",abcd:"1f521",accept:"1f251",adhesive_bandage:"1fa79",adult:"1f9d1",aerial_tramway:"1f6a1",afghanistan:"1f1e6-1f1eb",airplane:"2708",aland_islands:"1f1e6-1f1fd",alarm_clock:"23f0",albania:"1f1e6-1f1f1",alembic:"2697",algeria:"1f1e9-1f1ff",alien:"1f47d",ambulance:"1f691",american_samoa:"1f1e6-1f1f8",amphora:"1f3fa",anchor:"2693",andorra:"1f1e6-1f1e9",angel:"1f47c",anger:"1f4a2",angola:"1f1e6-1f1f4",angry:"1f620",anguilla:"1f1e6-1f1ee",anguished:"1f627",ant:"1f41c",antarctica:"1f1e6-1f1f6",antigua_barbuda:"1f1e6-1f1ec",apple:"1f34e",aquarius:"2652",argentina:"1f1e6-1f1f7",aries:"2648",armenia:"1f1e6-1f1f2",arrow_backward:"25c0",arrow_double_down:"23ec",arrow_double_up:"23eb",arrow_down:"2b07",arrow_down_small:"1f53d",arrow_forward:"25b6",arrow_heading_down:"2935",arrow_heading_up:"2934",arrow_left:"2b05",arrow_lower_left:"2199",arrow_lower_right:"2198",arrow_right:"27a1",arrow_right_hook:"21aa",arrow_up:"2b06",arrow_up_down:"2195",arrow_up_small:"1f53c",arrow_upper_left:"2196",arrow_upper_right:"2197",arrows_clockwise:"1f503",arrows_counterclockwise:"1f504",art:"1f3a8",articulated_lorry:"1f69b",artificial_satellite:"1f6f0",artist:"1f9d1-1f3a8",aruba:"1f1e6-1f1fc",ascension_island:"1f1e6-1f1e8",asterisk:"002a-20e3",astonished:"1f632",astronaut:"1f9d1-1f680",athletic_shoe:"1f45f",atm:"1f3e7",atom_symbol:"269b",australia:"1f1e6-1f1fa",austria:"1f1e6-1f1f9",auto_rickshaw:"1f6fa",avocado:"1f951",axe:"1fa93",azerbaijan:"1f1e6-1f1ff",b:"1f171",baby:"1f476",baby_bottle:"1f37c",baby_chick:"1f424",baby_symbol:"1f6bc",back:"1f519",bacon:"1f953",badger:"1f9a1",badminton:"1f3f8",bagel:"1f96f",baggage_claim:"1f6c4",baguette_bread:"1f956",bahamas:"1f1e7-1f1f8",bahrain:"1f1e7-1f1ed",balance_scale:"2696",bald_man:"1f468-1f9b2",bald_woman:"1f469-1f9b2",ballet_shoes:"1fa70",balloon:"1f388",ballot_box:"1f5f3",ballot_box_with_check:"2611",bamboo:"1f38d",banana:"1f34c",bangbang:"203c",bangladesh:"1f1e7-1f1e9",banjo:"1fa95",bank:"1f3e6",bar_chart:"1f4ca",barbados:"1f1e7-1f1e7",barber:"1f488",baseball:"26be",basket:"1f9fa",basketball:"1f3c0",basketball_man:"26f9-2642",basketball_woman:"26f9-2640",bat:"1f987",bath:"1f6c0",bathtub:"1f6c1",battery:"1f50b",beach_umbrella:"1f3d6",bear:"1f43b",bearded_person:"1f9d4",bed:"1f6cf",bee:"1f41d",beer:"1f37a",beers:"1f37b",beetle:"1f41e",beginner:"1f530",belarus:"1f1e7-1f1fe",belgium:"1f1e7-1f1ea",belize:"1f1e7-1f1ff",bell:"1f514",bellhop_bell:"1f6ce",benin:"1f1e7-1f1ef",bento:"1f371",bermuda:"1f1e7-1f1f2",beverage_box:"1f9c3",bhutan:"1f1e7-1f1f9",bicyclist:"1f6b4",bike:"1f6b2",biking_man:"1f6b4-2642",biking_woman:"1f6b4-2640",bikini:"1f459",billed_cap:"1f9e2",biohazard:"2623",bird:"1f426",birthday:"1f382",black_circle:"26ab",black_flag:"1f3f4",black_heart:"1f5a4",black_joker:"1f0cf",black_large_square:"2b1b",black_medium_small_square:"25fe",black_medium_square:"25fc",black_nib:"2712",black_small_square:"25aa",black_square_button:"1f532",blond_haired_man:"1f471-2642",blond_haired_person:"1f471",blond_haired_woman:"1f471-2640",blonde_woman:"1f471-2640",blossom:"1f33c",blowfish:"1f421",blue_book:"1f4d8",blue_car:"1f699",blue_heart:"1f499",blue_square:"1f7e6",blush:"1f60a",boar:"1f417",boat:"26f5",bolivia:"1f1e7-1f1f4",bomb:"1f4a3",bone:"1f9b4",book:"1f4d6",bookmark:"1f516",bookmark_tabs:"1f4d1",books:"1f4da",boom:"1f4a5",boot:"1f462",bosnia_herzegovina:"1f1e7-1f1e6",botswana:"1f1e7-1f1fc",bouncing_ball_man:"26f9-2642",bouncing_ball_person:"26f9",bouncing_ball_woman:"26f9-2640",bouquet:"1f490",bouvet_island:"1f1e7-1f1fb",bow:"1f647",bow_and_arrow:"1f3f9",bowing_man:"1f647-2642",bowing_woman:"1f647-2640",bowl_with_spoon:"1f963",bowling:"1f3b3",boxing_glove:"1f94a",boy:"1f466",brain:"1f9e0",brazil:"1f1e7-1f1f7",bread:"1f35e",breast_feeding:"1f931",bricks:"1f9f1",bride_with_veil:"1f470",bridge_at_night:"1f309",briefcase:"1f4bc",british_indian_ocean_territory:"1f1ee-1f1f4",british_virgin_islands:"1f1fb-1f1ec",broccoli:"1f966",broken_heart:"1f494",broom:"1f9f9",brown_circle:"1f7e4",brown_heart:"1f90e",brown_square:"1f7eb",brunei:"1f1e7-1f1f3",bug:"1f41b",building_construction:"1f3d7",bulb:"1f4a1",bulgaria:"1f1e7-1f1ec",bullettrain_front:"1f685",bullettrain_side:"1f684",burkina_faso:"1f1e7-1f1eb",burrito:"1f32f",burundi:"1f1e7-1f1ee",bus:"1f68c",business_suit_levitating:"1f574",busstop:"1f68f",bust_in_silhouette:"1f464",busts_in_silhouette:"1f465",butter:"1f9c8",butterfly:"1f98b",cactus:"1f335",cake:"1f370",calendar:"1f4c6",call_me_hand:"1f919",calling:"1f4f2",cambodia:"1f1f0-1f1ed",camel:"1f42b",camera:"1f4f7",camera_flash:"1f4f8",cameroon:"1f1e8-1f1f2",camping:"1f3d5",canada:"1f1e8-1f1e6",canary_islands:"1f1ee-1f1e8",cancer:"264b",candle:"1f56f",candy:"1f36c",canned_food:"1f96b",canoe:"1f6f6",cape_verde:"1f1e8-1f1fb",capital_abcd:"1f520",capricorn:"2651",car:"1f697",card_file_box:"1f5c3",card_index:"1f4c7",card_index_dividers:"1f5c2",caribbean_netherlands:"1f1e7-1f1f6",carousel_horse:"1f3a0",carrot:"1f955",cartwheeling:"1f938",cat:"1f431",cat2:"1f408",cayman_islands:"1f1f0-1f1fe",cd:"1f4bf",central_african_republic:"1f1e8-1f1eb",ceuta_melilla:"1f1ea-1f1e6",chad:"1f1f9-1f1e9",chains:"26d3",chair:"1fa91",champagne:"1f37e",chart:"1f4b9",chart_with_downwards_trend:"1f4c9",chart_with_upwards_trend:"1f4c8",checkered_flag:"1f3c1",cheese:"1f9c0",cherries:"1f352",cherry_blossom:"1f338",chess_pawn:"265f",chestnut:"1f330",chicken:"1f414",child:"1f9d2",children_crossing:"1f6b8",chile:"1f1e8-1f1f1",chipmunk:"1f43f",chocolate_bar:"1f36b",chopsticks:"1f962",christmas_island:"1f1e8-1f1fd",christmas_tree:"1f384",church:"26ea",cinema:"1f3a6",circus_tent:"1f3aa",city_sunrise:"1f307",city_sunset:"1f306",cityscape:"1f3d9",cl:"1f191",clamp:"1f5dc",clap:"1f44f",clapper:"1f3ac",classical_building:"1f3db",climbing:"1f9d7",climbing_man:"1f9d7-2642",climbing_woman:"1f9d7-2640",clinking_glasses:"1f942",clipboard:"1f4cb",clipperton_island:"1f1e8-1f1f5",clock1:"1f550",clock10:"1f559",clock1030:"1f565",clock11:"1f55a",clock1130:"1f566",clock12:"1f55b",clock1230:"1f567",clock130:"1f55c",clock2:"1f551",clock230:"1f55d",clock3:"1f552",clock330:"1f55e",clock4:"1f553",clock430:"1f55f",clock5:"1f554",clock530:"1f560",clock6:"1f555",clock630:"1f561",clock7:"1f556",clock730:"1f562",clock8:"1f557",clock830:"1f563",clock9:"1f558",clock930:"1f564",closed_book:"1f4d5",closed_lock_with_key:"1f510",closed_umbrella:"1f302",cloud:"2601",cloud_with_lightning:"1f329",cloud_with_lightning_and_rain:"26c8",cloud_with_rain:"1f327",cloud_with_snow:"1f328",clown_face:"1f921",clubs:"2663",cn:"1f1e8-1f1f3",coat:"1f9e5",cocktail:"1f378",coconut:"1f965",cocos_islands:"1f1e8-1f1e8",coffee:"2615",coffin:"26b0",cold_face:"1f976",cold_sweat:"1f630",collision:"1f4a5",colombia:"1f1e8-1f1f4",comet:"2604",comoros:"1f1f0-1f1f2",compass:"1f9ed",computer:"1f4bb",computer_mouse:"1f5b1",confetti_ball:"1f38a",confounded:"1f616",confused:"1f615",congo_brazzaville:"1f1e8-1f1ec",congo_kinshasa:"1f1e8-1f1e9",congratulations:"3297",construction:"1f6a7",construction_worker:"1f477",construction_worker_man:"1f477-2642",construction_worker_woman:"1f477-2640",control_knobs:"1f39b",convenience_store:"1f3ea",cook:"1f9d1-1f373",cook_islands:"1f1e8-1f1f0",cookie:"1f36a",cool:"1f192",cop:"1f46e",copyright:"00a9",corn:"1f33d",costa_rica:"1f1e8-1f1f7",cote_divoire:"1f1e8-1f1ee",couch_and_lamp:"1f6cb",couple:"1f46b",couple_with_heart:"1f491",couple_with_heart_man_man:"1f468-2764-1f468",couple_with_heart_woman_man:"1f469-2764-1f468",couple_with_heart_woman_woman:"1f469-2764-1f469",couplekiss:"1f48f",couplekiss_man_man:"1f468-2764-1f48b-1f468",couplekiss_man_woman:"1f469-2764-1f48b-1f468",couplekiss_woman_woman:"1f469-2764-1f48b-1f469",cow:"1f42e",cow2:"1f404",cowboy_hat_face:"1f920",crab:"1f980",crayon:"1f58d",credit_card:"1f4b3",crescent_moon:"1f319",cricket:"1f997",cricket_game:"1f3cf",croatia:"1f1ed-1f1f7",crocodile:"1f40a",croissant:"1f950",crossed_fingers:"1f91e",crossed_flags:"1f38c",crossed_swords:"2694",crown:"1f451",cry:"1f622",crying_cat_face:"1f63f",crystal_ball:"1f52e",cuba:"1f1e8-1f1fa",cucumber:"1f952",cup_with_straw:"1f964",cupcake:"1f9c1",cupid:"1f498",curacao:"1f1e8-1f1fc",curling_stone:"1f94c",curly_haired_man:"1f468-1f9b1",curly_haired_woman:"1f469-1f9b1",curly_loop:"27b0",currency_exchange:"1f4b1",curry:"1f35b",cursing_face:"1f92c",custard:"1f36e",customs:"1f6c3",cut_of_meat:"1f969",cyclone:"1f300",cyprus:"1f1e8-1f1fe",czech_republic:"1f1e8-1f1ff",dagger:"1f5e1",dancer:"1f483",dancers:"1f46f",dancing_men:"1f46f-2642",dancing_women:"1f46f-2640",dango:"1f361",dark_sunglasses:"1f576",dart:"1f3af",dash:"1f4a8",date:"1f4c5",de:"1f1e9-1f1ea",deaf_man:"1f9cf-2642",deaf_person:"1f9cf",deaf_woman:"1f9cf-2640",deciduous_tree:"1f333",deer:"1f98c",denmark:"1f1e9-1f1f0",department_store:"1f3ec",derelict_house:"1f3da",desert:"1f3dc",desert_island:"1f3dd",desktop_computer:"1f5a5",detective:"1f575",diamond_shape_with_a_dot_inside:"1f4a0",diamonds:"2666",diego_garcia:"1f1e9-1f1ec",disappointed:"1f61e",disappointed_relieved:"1f625",diving_mask:"1f93f",diya_lamp:"1fa94",dizzy:"1f4ab",dizzy_face:"1f635",djibouti:"1f1e9-1f1ef",dna:"1f9ec",do_not_litter:"1f6af",dog:"1f436",dog2:"1f415",dollar:"1f4b5",dolls:"1f38e",dolphin:"1f42c",dominica:"1f1e9-1f1f2",dominican_republic:"1f1e9-1f1f4",door:"1f6aa",doughnut:"1f369",dove:"1f54a",dragon:"1f409",dragon_face:"1f432",dress:"1f457",dromedary_camel:"1f42a",drooling_face:"1f924",drop_of_blood:"1fa78",droplet:"1f4a7",drum:"1f941",duck:"1f986",dumpling:"1f95f",dvd:"1f4c0","e-mail":"1f4e7",eagle:"1f985",ear:"1f442",ear_of_rice:"1f33e",ear_with_hearing_aid:"1f9bb",earth_africa:"1f30d",earth_americas:"1f30e",earth_asia:"1f30f",ecuador:"1f1ea-1f1e8",egg:"1f95a",eggplant:"1f346",egypt:"1f1ea-1f1ec",eight:"0038-20e3",eight_pointed_black_star:"2734",eight_spoked_asterisk:"2733",eject_button:"23cf",el_salvador:"1f1f8-1f1fb",electric_plug:"1f50c",elephant:"1f418",elf:"1f9dd",elf_man:"1f9dd-2642",elf_woman:"1f9dd-2640",email:"2709",end:"1f51a",england:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",envelope:"2709",envelope_with_arrow:"1f4e9",equatorial_guinea:"1f1ec-1f1f6",eritrea:"1f1ea-1f1f7",es:"1f1ea-1f1f8",estonia:"1f1ea-1f1ea",ethiopia:"1f1ea-1f1f9",eu:"1f1ea-1f1fa",euro:"1f4b6",european_castle:"1f3f0",european_post_office:"1f3e4",european_union:"1f1ea-1f1fa",evergreen_tree:"1f332",exclamation:"2757",exploding_head:"1f92f",expressionless:"1f611",eye:"1f441",eye_speech_bubble:"1f441-1f5e8",eyeglasses:"1f453",eyes:"1f440",face_with_head_bandage:"1f915",face_with_thermometer:"1f912",facepalm:"1f926",facepunch:"1f44a",factory:"1f3ed",factory_worker:"1f9d1-1f3ed",fairy:"1f9da",fairy_man:"1f9da-2642",fairy_woman:"1f9da-2640",falafel:"1f9c6",falkland_islands:"1f1eb-1f1f0",fallen_leaf:"1f342",family:"1f46a",family_man_boy:"1f468-1f466",family_man_boy_boy:"1f468-1f466-1f466",family_man_girl:"1f468-1f467",family_man_girl_boy:"1f468-1f467-1f466",family_man_girl_girl:"1f468-1f467-1f467",family_man_man_boy:"1f468-1f468-1f466",family_man_man_boy_boy:"1f468-1f468-1f466-1f466",family_man_man_girl:"1f468-1f468-1f467",family_man_man_girl_boy:"1f468-1f468-1f467-1f466",family_man_man_girl_girl:"1f468-1f468-1f467-1f467",family_man_woman_boy:"1f468-1f469-1f466",family_man_woman_boy_boy:"1f468-1f469-1f466-1f466",family_man_woman_girl:"1f468-1f469-1f467",family_man_woman_girl_boy:"1f468-1f469-1f467-1f466",family_man_woman_girl_girl:"1f468-1f469-1f467-1f467",family_woman_boy:"1f469-1f466",family_woman_boy_boy:"1f469-1f466-1f466",family_woman_girl:"1f469-1f467",family_woman_girl_boy:"1f469-1f467-1f466",family_woman_girl_girl:"1f469-1f467-1f467",family_woman_woman_boy:"1f469-1f469-1f466",family_woman_woman_boy_boy:"1f469-1f469-1f466-1f466",family_woman_woman_girl:"1f469-1f469-1f467",family_woman_woman_girl_boy:"1f469-1f469-1f467-1f466",family_woman_woman_girl_girl:"1f469-1f469-1f467-1f467",farmer:"1f9d1-1f33e",faroe_islands:"1f1eb-1f1f4",fast_forward:"23e9",fax:"1f4e0",fearful:"1f628",feet:"1f43e",female_detective:"1f575-2640",female_sign:"2640",ferris_wheel:"1f3a1",ferry:"26f4",field_hockey:"1f3d1",fiji:"1f1eb-1f1ef",file_cabinet:"1f5c4",file_folder:"1f4c1",film_projector:"1f4fd",film_strip:"1f39e",finland:"1f1eb-1f1ee",fire:"1f525",fire_engine:"1f692",fire_extinguisher:"1f9ef",firecracker:"1f9e8",firefighter:"1f9d1-1f692",fireworks:"1f386",first_quarter_moon:"1f313",first_quarter_moon_with_face:"1f31b",fish:"1f41f",fish_cake:"1f365",fishing_pole_and_fish:"1f3a3",fist:"270a",fist_left:"1f91b",fist_oncoming:"1f44a",fist_raised:"270a",fist_right:"1f91c",five:"0035-20e3",flags:"1f38f",flamingo:"1f9a9",flashlight:"1f526",flat_shoe:"1f97f",fleur_de_lis:"269c",flight_arrival:"1f6ec",flight_departure:"1f6eb",flipper:"1f42c",floppy_disk:"1f4be",flower_playing_cards:"1f3b4",flushed:"1f633",flying_disc:"1f94f",flying_saucer:"1f6f8",fog:"1f32b",foggy:"1f301",foot:"1f9b6",football:"1f3c8",footprints:"1f463",fork_and_knife:"1f374",fortune_cookie:"1f960",fountain:"26f2",fountain_pen:"1f58b",four:"0034-20e3",four_leaf_clover:"1f340",fox_face:"1f98a",fr:"1f1eb-1f1f7",framed_picture:"1f5bc",free:"1f193",french_guiana:"1f1ec-1f1eb",french_polynesia:"1f1f5-1f1eb",french_southern_territories:"1f1f9-1f1eb",fried_egg:"1f373",fried_shrimp:"1f364",fries:"1f35f",frog:"1f438",frowning:"1f626",frowning_face:"2639",frowning_man:"1f64d-2642",frowning_person:"1f64d",frowning_woman:"1f64d-2640",fu:"1f595",fuelpump:"26fd",full_moon:"1f315",full_moon_with_face:"1f31d",funeral_urn:"26b1",gabon:"1f1ec-1f1e6",gambia:"1f1ec-1f1f2",game_die:"1f3b2",garlic:"1f9c4",gb:"1f1ec-1f1e7",gear:"2699",gem:"1f48e",gemini:"264a",genie:"1f9de",genie_man:"1f9de-2642",genie_woman:"1f9de-2640",georgia:"1f1ec-1f1ea",ghana:"1f1ec-1f1ed",ghost:"1f47b",gibraltar:"1f1ec-1f1ee",gift:"1f381",gift_heart:"1f49d",giraffe:"1f992",girl:"1f467",globe_with_meridians:"1f310",gloves:"1f9e4",goal_net:"1f945",goat:"1f410",goggles:"1f97d",golf:"26f3",golfing:"1f3cc",golfing_man:"1f3cc-2642",golfing_woman:"1f3cc-2640",gorilla:"1f98d",grapes:"1f347",greece:"1f1ec-1f1f7",green_apple:"1f34f",green_book:"1f4d7",green_circle:"1f7e2",green_heart:"1f49a",green_salad:"1f957",green_square:"1f7e9",greenland:"1f1ec-1f1f1",grenada:"1f1ec-1f1e9",grey_exclamation:"2755",grey_question:"2754",grimacing:"1f62c",grin:"1f601",grinning:"1f600",guadeloupe:"1f1ec-1f1f5",guam:"1f1ec-1f1fa",guard:"1f482",guardsman:"1f482-2642",guardswoman:"1f482-2640",guatemala:"1f1ec-1f1f9",guernsey:"1f1ec-1f1ec",guide_dog:"1f9ae",guinea:"1f1ec-1f1f3",guinea_bissau:"1f1ec-1f1fc",guitar:"1f3b8",gun:"1f52b",guyana:"1f1ec-1f1fe",haircut:"1f487",haircut_man:"1f487-2642",haircut_woman:"1f487-2640",haiti:"1f1ed-1f1f9",hamburger:"1f354",hammer:"1f528",hammer_and_pick:"2692",hammer_and_wrench:"1f6e0",hamster:"1f439",hand:"270b",hand_over_mouth:"1f92d",handbag:"1f45c",handball_person:"1f93e",handshake:"1f91d",hankey:"1f4a9",hash:"0023-20e3",hatched_chick:"1f425",hatching_chick:"1f423",headphones:"1f3a7",health_worker:"1f9d1-2695",hear_no_evil:"1f649",heard_mcdonald_islands:"1f1ed-1f1f2",heart:"2764",heart_decoration:"1f49f",heart_eyes:"1f60d",heart_eyes_cat:"1f63b",heartbeat:"1f493",heartpulse:"1f497",hearts:"2665",heavy_check_mark:"2714",heavy_division_sign:"2797",heavy_dollar_sign:"1f4b2",heavy_exclamation_mark:"2757",heavy_heart_exclamation:"2763",heavy_minus_sign:"2796",heavy_multiplication_x:"2716",heavy_plus_sign:"2795",hedgehog:"1f994",helicopter:"1f681",herb:"1f33f",hibiscus:"1f33a",high_brightness:"1f506",high_heel:"1f460",hiking_boot:"1f97e",hindu_temple:"1f6d5",hippopotamus:"1f99b",hocho:"1f52a",hole:"1f573",honduras:"1f1ed-1f1f3",honey_pot:"1f36f",honeybee:"1f41d",hong_kong:"1f1ed-1f1f0",horse:"1f434",horse_racing:"1f3c7",hospital:"1f3e5",hot_face:"1f975",hot_pepper:"1f336",hotdog:"1f32d",hotel:"1f3e8",hotsprings:"2668",hourglass:"231b",hourglass_flowing_sand:"23f3",house:"1f3e0",house_with_garden:"1f3e1",houses:"1f3d8",hugs:"1f917",hungary:"1f1ed-1f1fa",hushed:"1f62f",ice_cream:"1f368",ice_cube:"1f9ca",ice_hockey:"1f3d2",ice_skate:"26f8",icecream:"1f366",iceland:"1f1ee-1f1f8",id:"1f194",ideograph_advantage:"1f250",imp:"1f47f",inbox_tray:"1f4e5",incoming_envelope:"1f4e8",india:"1f1ee-1f1f3",indonesia:"1f1ee-1f1e9",infinity:"267e",information_desk_person:"1f481",information_source:"2139",innocent:"1f607",interrobang:"2049",iphone:"1f4f1",iran:"1f1ee-1f1f7",iraq:"1f1ee-1f1f6",ireland:"1f1ee-1f1ea",isle_of_man:"1f1ee-1f1f2",israel:"1f1ee-1f1f1",it:"1f1ee-1f1f9",izakaya_lantern:"1f3ee",jack_o_lantern:"1f383",jamaica:"1f1ef-1f1f2",japan:"1f5fe",japanese_castle:"1f3ef",japanese_goblin:"1f47a",japanese_ogre:"1f479",jeans:"1f456",jersey:"1f1ef-1f1ea",jigsaw:"1f9e9",jordan:"1f1ef-1f1f4",joy:"1f602",joy_cat:"1f639",joystick:"1f579",jp:"1f1ef-1f1f5",judge:"1f9d1-2696",juggling_person:"1f939",kaaba:"1f54b",kangaroo:"1f998",kazakhstan:"1f1f0-1f1ff",kenya:"1f1f0-1f1ea",key:"1f511",keyboard:"2328",keycap_ten:"1f51f",kick_scooter:"1f6f4",kimono:"1f458",kiribati:"1f1f0-1f1ee",kiss:"1f48b",kissing:"1f617",kissing_cat:"1f63d",kissing_closed_eyes:"1f61a",kissing_heart:"1f618",kissing_smiling_eyes:"1f619",kite:"1fa81",kiwi_fruit:"1f95d",kneeling_man:"1f9ce-2642",kneeling_person:"1f9ce",kneeling_woman:"1f9ce-2640",knife:"1f52a",koala:"1f428",koko:"1f201",kosovo:"1f1fd-1f1f0",kr:"1f1f0-1f1f7",kuwait:"1f1f0-1f1fc",kyrgyzstan:"1f1f0-1f1ec",lab_coat:"1f97c",label:"1f3f7",lacrosse:"1f94d",lantern:"1f3ee",laos:"1f1f1-1f1e6",large_blue_circle:"1f535",large_blue_diamond:"1f537",large_orange_diamond:"1f536",last_quarter_moon:"1f317",last_quarter_moon_with_face:"1f31c",latin_cross:"271d",latvia:"1f1f1-1f1fb",laughing:"1f606",leafy_green:"1f96c",leaves:"1f343",lebanon:"1f1f1-1f1e7",ledger:"1f4d2",left_luggage:"1f6c5",left_right_arrow:"2194",left_speech_bubble:"1f5e8",leftwards_arrow_with_hook:"21a9",leg:"1f9b5",lemon:"1f34b",leo:"264c",leopard:"1f406",lesotho:"1f1f1-1f1f8",level_slider:"1f39a",liberia:"1f1f1-1f1f7",libra:"264e",libya:"1f1f1-1f1fe",liechtenstein:"1f1f1-1f1ee",light_rail:"1f688",link:"1f517",lion:"1f981",lips:"1f444",lipstick:"1f484",lithuania:"1f1f1-1f1f9",lizard:"1f98e",llama:"1f999",lobster:"1f99e",lock:"1f512",lock_with_ink_pen:"1f50f",lollipop:"1f36d",loop:"27bf",lotion_bottle:"1f9f4",lotus_position:"1f9d8",lotus_position_man:"1f9d8-2642",lotus_position_woman:"1f9d8-2640",loud_sound:"1f50a",loudspeaker:"1f4e2",love_hotel:"1f3e9",love_letter:"1f48c",love_you_gesture:"1f91f",low_brightness:"1f505",luggage:"1f9f3",luxembourg:"1f1f1-1f1fa",lying_face:"1f925",m:"24c2",macau:"1f1f2-1f1f4",macedonia:"1f1f2-1f1f0",madagascar:"1f1f2-1f1ec",mag:"1f50d",mag_right:"1f50e",mage:"1f9d9",mage_man:"1f9d9-2642",mage_woman:"1f9d9-2640",magnet:"1f9f2",mahjong:"1f004",mailbox:"1f4eb",mailbox_closed:"1f4ea",mailbox_with_mail:"1f4ec",mailbox_with_no_mail:"1f4ed",malawi:"1f1f2-1f1fc",malaysia:"1f1f2-1f1fe",maldives:"1f1f2-1f1fb",male_detective:"1f575-2642",male_sign:"2642",mali:"1f1f2-1f1f1",malta:"1f1f2-1f1f9",man:"1f468",man_artist:"1f468-1f3a8",man_astronaut:"1f468-1f680",man_cartwheeling:"1f938-2642",man_cook:"1f468-1f373",man_dancing:"1f57a",man_facepalming:"1f926-2642",man_factory_worker:"1f468-1f3ed",man_farmer:"1f468-1f33e",man_firefighter:"1f468-1f692",man_health_worker:"1f468-2695",man_in_manual_wheelchair:"1f468-1f9bd",man_in_motorized_wheelchair:"1f468-1f9bc",man_in_tuxedo:"1f935",man_judge:"1f468-2696",man_juggling:"1f939-2642",man_mechanic:"1f468-1f527",man_office_worker:"1f468-1f4bc",man_pilot:"1f468-2708",man_playing_handball:"1f93e-2642",man_playing_water_polo:"1f93d-2642",man_scientist:"1f468-1f52c",man_shrugging:"1f937-2642",man_singer:"1f468-1f3a4",man_student:"1f468-1f393",man_teacher:"1f468-1f3eb",man_technologist:"1f468-1f4bb",man_with_gua_pi_mao:"1f472",man_with_probing_cane:"1f468-1f9af",man_with_turban:"1f473-2642",mandarin:"1f34a",mango:"1f96d",mans_shoe:"1f45e",mantelpiece_clock:"1f570",manual_wheelchair:"1f9bd",maple_leaf:"1f341",marshall_islands:"1f1f2-1f1ed",martial_arts_uniform:"1f94b",martinique:"1f1f2-1f1f6",mask:"1f637",massage:"1f486",massage_man:"1f486-2642",massage_woman:"1f486-2640",mate:"1f9c9",mauritania:"1f1f2-1f1f7",mauritius:"1f1f2-1f1fa",mayotte:"1f1fe-1f1f9",meat_on_bone:"1f356",mechanic:"1f9d1-1f527",mechanical_arm:"1f9be",mechanical_leg:"1f9bf",medal_military:"1f396",medal_sports:"1f3c5",medical_symbol:"2695",mega:"1f4e3",melon:"1f348",memo:"1f4dd",men_wrestling:"1f93c-2642",menorah:"1f54e",mens:"1f6b9",mermaid:"1f9dc-2640",merman:"1f9dc-2642",merperson:"1f9dc",metal:"1f918",metro:"1f687",mexico:"1f1f2-1f1fd",microbe:"1f9a0",micronesia:"1f1eb-1f1f2",microphone:"1f3a4",microscope:"1f52c",middle_finger:"1f595",milk_glass:"1f95b",milky_way:"1f30c",minibus:"1f690",minidisc:"1f4bd",mobile_phone_off:"1f4f4",moldova:"1f1f2-1f1e9",monaco:"1f1f2-1f1e8",money_mouth_face:"1f911",money_with_wings:"1f4b8",moneybag:"1f4b0",mongolia:"1f1f2-1f1f3",monkey:"1f412",monkey_face:"1f435",monocle_face:"1f9d0",monorail:"1f69d",montenegro:"1f1f2-1f1ea",montserrat:"1f1f2-1f1f8",moon:"1f314",moon_cake:"1f96e",morocco:"1f1f2-1f1e6",mortar_board:"1f393",mosque:"1f54c",mosquito:"1f99f",motor_boat:"1f6e5",motor_scooter:"1f6f5",motorcycle:"1f3cd",motorized_wheelchair:"1f9bc",motorway:"1f6e3",mount_fuji:"1f5fb",mountain:"26f0",mountain_bicyclist:"1f6b5",mountain_biking_man:"1f6b5-2642",mountain_biking_woman:"1f6b5-2640",mountain_cableway:"1f6a0",mountain_railway:"1f69e",mountain_snow:"1f3d4",mouse:"1f42d",mouse2:"1f401",movie_camera:"1f3a5",moyai:"1f5ff",mozambique:"1f1f2-1f1ff",mrs_claus:"1f936",muscle:"1f4aa",mushroom:"1f344",musical_keyboard:"1f3b9",musical_note:"1f3b5",musical_score:"1f3bc",mute:"1f507",myanmar:"1f1f2-1f1f2",nail_care:"1f485",name_badge:"1f4db",namibia:"1f1f3-1f1e6",national_park:"1f3de",nauru:"1f1f3-1f1f7",nauseated_face:"1f922",nazar_amulet:"1f9ff",necktie:"1f454",negative_squared_cross_mark:"274e",nepal:"1f1f3-1f1f5",nerd_face:"1f913",netherlands:"1f1f3-1f1f1",neutral_face:"1f610",new:"1f195",new_caledonia:"1f1f3-1f1e8",new_moon:"1f311",new_moon_with_face:"1f31a",new_zealand:"1f1f3-1f1ff",newspaper:"1f4f0",newspaper_roll:"1f5de",next_track_button:"23ed",ng:"1f196",ng_man:"1f645-2642",ng_woman:"1f645-2640",nicaragua:"1f1f3-1f1ee",niger:"1f1f3-1f1ea",nigeria:"1f1f3-1f1ec",night_with_stars:"1f303",nine:"0039-20e3",niue:"1f1f3-1f1fa",no_bell:"1f515",no_bicycles:"1f6b3",no_entry:"26d4",no_entry_sign:"1f6ab",no_good:"1f645",no_good_man:"1f645-2642",no_good_woman:"1f645-2640",no_mobile_phones:"1f4f5",no_mouth:"1f636",no_pedestrians:"1f6b7",no_smoking:"1f6ad","non-potable_water":"1f6b1",norfolk_island:"1f1f3-1f1eb",north_korea:"1f1f0-1f1f5",northern_mariana_islands:"1f1f2-1f1f5",norway:"1f1f3-1f1f4",nose:"1f443",notebook:"1f4d3",notebook_with_decorative_cover:"1f4d4",notes:"1f3b6",nut_and_bolt:"1f529",o:"2b55",o2:"1f17e",ocean:"1f30a",octopus:"1f419",oden:"1f362",office:"1f3e2",office_worker:"1f9d1-1f4bc",oil_drum:"1f6e2",ok:"1f197",ok_hand:"1f44c",ok_man:"1f646-2642",ok_person:"1f646",ok_woman:"1f646-2640",old_key:"1f5dd",older_adult:"1f9d3",older_man:"1f474",older_woman:"1f475",om:"1f549",oman:"1f1f4-1f1f2",on:"1f51b",oncoming_automobile:"1f698",oncoming_bus:"1f68d",oncoming_police_car:"1f694",oncoming_taxi:"1f696",one:"0031-20e3",one_piece_swimsuit:"1fa71",onion:"1f9c5",open_book:"1f4d6",open_file_folder:"1f4c2",open_hands:"1f450",open_mouth:"1f62e",open_umbrella:"2602",ophiuchus:"26ce",orange:"1f34a",orange_book:"1f4d9",orange_circle:"1f7e0",orange_heart:"1f9e1",orange_square:"1f7e7",orangutan:"1f9a7",orthodox_cross:"2626",otter:"1f9a6",outbox_tray:"1f4e4",owl:"1f989",ox:"1f402",oyster:"1f9aa",package:"1f4e6",page_facing_up:"1f4c4",page_with_curl:"1f4c3",pager:"1f4df",paintbrush:"1f58c",pakistan:"1f1f5-1f1f0",palau:"1f1f5-1f1fc",palestinian_territories:"1f1f5-1f1f8",palm_tree:"1f334",palms_up_together:"1f932",panama:"1f1f5-1f1e6",pancakes:"1f95e",panda_face:"1f43c",paperclip:"1f4ce",paperclips:"1f587",papua_new_guinea:"1f1f5-1f1ec",parachute:"1fa82",paraguay:"1f1f5-1f1fe",parasol_on_ground:"26f1",parking:"1f17f",parrot:"1f99c",part_alternation_mark:"303d",partly_sunny:"26c5",partying_face:"1f973",passenger_ship:"1f6f3",passport_control:"1f6c2",pause_button:"23f8",paw_prints:"1f43e",peace_symbol:"262e",peach:"1f351",peacock:"1f99a",peanuts:"1f95c",pear:"1f350",pen:"1f58a",pencil:"1f4dd",pencil2:"270f",penguin:"1f427",pensive:"1f614",people_holding_hands:"1f9d1-1f91d-1f9d1",performing_arts:"1f3ad",persevere:"1f623",person_bald:"1f9d1-1f9b2",person_curly_hair:"1f9d1-1f9b1",person_fencing:"1f93a",person_in_manual_wheelchair:"1f9d1-1f9bd",person_in_motorized_wheelchair:"1f9d1-1f9bc",person_red_hair:"1f9d1-1f9b0",person_white_hair:"1f9d1-1f9b3",person_with_probing_cane:"1f9d1-1f9af",person_with_turban:"1f473",peru:"1f1f5-1f1ea",petri_dish:"1f9eb",philippines:"1f1f5-1f1ed",phone:"260e",pick:"26cf",pie:"1f967",pig:"1f437",pig2:"1f416",pig_nose:"1f43d",pill:"1f48a",pilot:"1f9d1-2708",pinching_hand:"1f90f",pineapple:"1f34d",ping_pong:"1f3d3",pirate_flag:"1f3f4-2620",pisces:"2653",pitcairn_islands:"1f1f5-1f1f3",pizza:"1f355",place_of_worship:"1f6d0",plate_with_cutlery:"1f37d",play_or_pause_button:"23ef",pleading_face:"1f97a",point_down:"1f447",point_left:"1f448",point_right:"1f449",point_up:"261d",point_up_2:"1f446",poland:"1f1f5-1f1f1",police_car:"1f693",police_officer:"1f46e",policeman:"1f46e-2642",policewoman:"1f46e-2640",poodle:"1f429",poop:"1f4a9",popcorn:"1f37f",portugal:"1f1f5-1f1f9",post_office:"1f3e3",postal_horn:"1f4ef",postbox:"1f4ee",potable_water:"1f6b0",potato:"1f954",pouch:"1f45d",poultry_leg:"1f357",pound:"1f4b7",pout:"1f621",pouting_cat:"1f63e",pouting_face:"1f64e",pouting_man:"1f64e-2642",pouting_woman:"1f64e-2640",pray:"1f64f",prayer_beads:"1f4ff",pregnant_woman:"1f930",pretzel:"1f968",previous_track_button:"23ee",prince:"1f934",princess:"1f478",printer:"1f5a8",probing_cane:"1f9af",puerto_rico:"1f1f5-1f1f7",punch:"1f44a",purple_circle:"1f7e3",purple_heart:"1f49c",purple_square:"1f7ea",purse:"1f45b",pushpin:"1f4cc",put_litter_in_its_place:"1f6ae",qatar:"1f1f6-1f1e6",question:"2753",rabbit:"1f430",rabbit2:"1f407",raccoon:"1f99d",racehorse:"1f40e",racing_car:"1f3ce",radio:"1f4fb",radio_button:"1f518",radioactive:"2622",rage:"1f621",railway_car:"1f683",railway_track:"1f6e4",rainbow:"1f308",rainbow_flag:"1f3f3-1f308",raised_back_of_hand:"1f91a",raised_eyebrow:"1f928",raised_hand:"270b",raised_hand_with_fingers_splayed:"1f590",raised_hands:"1f64c",raising_hand:"1f64b",raising_hand_man:"1f64b-2642",raising_hand_woman:"1f64b-2640",ram:"1f40f",ramen:"1f35c",rat:"1f400",razor:"1fa92",receipt:"1f9fe",record_button:"23fa",recycle:"267b",red_car:"1f697",red_circle:"1f534",red_envelope:"1f9e7",red_haired_man:"1f468-1f9b0",red_haired_woman:"1f469-1f9b0",red_square:"1f7e5",registered:"00ae",relaxed:"263a",relieved:"1f60c",reminder_ribbon:"1f397",repeat:"1f501",repeat_one:"1f502",rescue_worker_helmet:"26d1",restroom:"1f6bb",reunion:"1f1f7-1f1ea",revolving_hearts:"1f49e",rewind:"23ea",rhinoceros:"1f98f",ribbon:"1f380",rice:"1f35a",rice_ball:"1f359",rice_cracker:"1f358",rice_scene:"1f391",right_anger_bubble:"1f5ef",ring:"1f48d",ringed_planet:"1fa90",robot:"1f916",rocket:"1f680",rofl:"1f923",roll_eyes:"1f644",roll_of_paper:"1f9fb",roller_coaster:"1f3a2",romania:"1f1f7-1f1f4",rooster:"1f413",rose:"1f339",rosette:"1f3f5",rotating_light:"1f6a8",round_pushpin:"1f4cd",rowboat:"1f6a3",rowing_man:"1f6a3-2642",rowing_woman:"1f6a3-2640",ru:"1f1f7-1f1fa",rugby_football:"1f3c9",runner:"1f3c3",running:"1f3c3",running_man:"1f3c3-2642",running_shirt_with_sash:"1f3bd",running_woman:"1f3c3-2640",rwanda:"1f1f7-1f1fc",sa:"1f202",safety_pin:"1f9f7",safety_vest:"1f9ba",sagittarius:"2650",sailboat:"26f5",sake:"1f376",salt:"1f9c2",samoa:"1f1fc-1f1f8",san_marino:"1f1f8-1f1f2",sandal:"1f461",sandwich:"1f96a",santa:"1f385",sao_tome_principe:"1f1f8-1f1f9",sari:"1f97b",sassy_man:"1f481-2642",sassy_woman:"1f481-2640",satellite:"1f4e1",satisfied:"1f606",saudi_arabia:"1f1f8-1f1e6",sauna_man:"1f9d6-2642",sauna_person:"1f9d6",sauna_woman:"1f9d6-2640",sauropod:"1f995",saxophone:"1f3b7",scarf:"1f9e3",school:"1f3eb",school_satchel:"1f392",scientist:"1f9d1-1f52c",scissors:"2702",scorpion:"1f982",scorpius:"264f",scotland:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",scream:"1f631",scream_cat:"1f640",scroll:"1f4dc",seat:"1f4ba",secret:"3299",see_no_evil:"1f648",seedling:"1f331",selfie:"1f933",senegal:"1f1f8-1f1f3",serbia:"1f1f7-1f1f8",service_dog:"1f415-1f9ba",seven:"0037-20e3",seychelles:"1f1f8-1f1e8",shallow_pan_of_food:"1f958",shamrock:"2618",shark:"1f988",shaved_ice:"1f367",sheep:"1f411",shell:"1f41a",shield:"1f6e1",shinto_shrine:"26e9",ship:"1f6a2",shirt:"1f455",poo:"1f4a9",shoe:"1f45e",shopping:"1f6cd",shopping_cart:"1f6d2",shorts:"1fa73",shower:"1f6bf",shrimp:"1f990",shrug:"1f937",shushing_face:"1f92b",sierra_leone:"1f1f8-1f1f1",signal_strength:"1f4f6",singapore:"1f1f8-1f1ec",singer:"1f9d1-1f3a4",sint_maarten:"1f1f8-1f1fd",six:"0036-20e3",six_pointed_star:"1f52f",skateboard:"1f6f9",ski:"1f3bf",skier:"26f7",skull:"1f480",skull_and_crossbones:"2620",skunk:"1f9a8",sled:"1f6f7",sleeping:"1f634",sleeping_bed:"1f6cc",sleepy:"1f62a",slightly_frowning_face:"1f641",slightly_smiling_face:"1f642",slot_machine:"1f3b0",sloth:"1f9a5",slovakia:"1f1f8-1f1f0",slovenia:"1f1f8-1f1ee",small_airplane:"1f6e9",small_blue_diamond:"1f539",small_orange_diamond:"1f538",small_red_triangle:"1f53a",small_red_triangle_down:"1f53b",smile:"1f604",smile_cat:"1f638",smiley:"1f603",smiley_cat:"1f63a",smiling_face_with_three_hearts:"1f970",smiling_imp:"1f608",smirk:"1f60f",smirk_cat:"1f63c",smoking:"1f6ac",snail:"1f40c",snake:"1f40d",sneezing_face:"1f927",snowboarder:"1f3c2",snowflake:"2744",snowman:"26c4",snowman_with_snow:"2603",soap:"1f9fc",sob:"1f62d",soccer:"26bd",socks:"1f9e6",softball:"1f94e",solomon_islands:"1f1f8-1f1e7",somalia:"1f1f8-1f1f4",soon:"1f51c",sos:"1f198",sound:"1f509",south_africa:"1f1ff-1f1e6",south_georgia_south_sandwich_islands:"1f1ec-1f1f8",south_sudan:"1f1f8-1f1f8",space_invader:"1f47e",spades:"2660",spaghetti:"1f35d",sparkle:"2747",sparkler:"1f387",sparkles:"2728",sparkling_heart:"1f496",speak_no_evil:"1f64a",speaker:"1f508",speaking_head:"1f5e3",speech_balloon:"1f4ac",speedboat:"1f6a4",spider:"1f577",spider_web:"1f578",spiral_calendar:"1f5d3",spiral_notepad:"1f5d2",sponge:"1f9fd",spoon:"1f944",squid:"1f991",sri_lanka:"1f1f1-1f1f0",st_barthelemy:"1f1e7-1f1f1",st_helena:"1f1f8-1f1ed",st_kitts_nevis:"1f1f0-1f1f3",st_lucia:"1f1f1-1f1e8",st_martin:"1f1f2-1f1eb",st_pierre_miquelon:"1f1f5-1f1f2",st_vincent_grenadines:"1f1fb-1f1e8",stadium:"1f3df",standing_man:"1f9cd-2642",standing_person:"1f9cd",standing_woman:"1f9cd-2640",star:"2b50",star2:"1f31f",star_and_crescent:"262a",star_of_david:"2721",star_struck:"1f929",stars:"1f320",station:"1f689",statue_of_liberty:"1f5fd",steam_locomotive:"1f682",stethoscope:"1fa7a",stew:"1f372",stop_button:"23f9",stop_sign:"1f6d1",stopwatch:"23f1",straight_ruler:"1f4cf",strawberry:"1f353",stuck_out_tongue:"1f61b",stuck_out_tongue_closed_eyes:"1f61d",stuck_out_tongue_winking_eye:"1f61c",student:"1f9d1-1f393",studio_microphone:"1f399",stuffed_flatbread:"1f959",sudan:"1f1f8-1f1e9",sun_behind_large_cloud:"1f325",sun_behind_rain_cloud:"1f326",sun_behind_small_cloud:"1f324",sun_with_face:"1f31e",sunflower:"1f33b",sunglasses:"1f60e",sunny:"2600",sunrise:"1f305",sunrise_over_mountains:"1f304",superhero:"1f9b8",superhero_man:"1f9b8-2642",superhero_woman:"1f9b8-2640",supervillain:"1f9b9",supervillain_man:"1f9b9-2642",supervillain_woman:"1f9b9-2640",surfer:"1f3c4",surfing_man:"1f3c4-2642",surfing_woman:"1f3c4-2640",suriname:"1f1f8-1f1f7",sushi:"1f363",suspension_railway:"1f69f",svalbard_jan_mayen:"1f1f8-1f1ef",swan:"1f9a2",swaziland:"1f1f8-1f1ff",sweat:"1f613",sweat_drops:"1f4a6",sweat_smile:"1f605",sweden:"1f1f8-1f1ea",sweet_potato:"1f360",swim_brief:"1fa72",swimmer:"1f3ca",swimming_man:"1f3ca-2642",swimming_woman:"1f3ca-2640",switzerland:"1f1e8-1f1ed",symbols:"1f523",synagogue:"1f54d",syria:"1f1f8-1f1fe",syringe:"1f489","t-rex":"1f996",taco:"1f32e",tada:"1f389",taiwan:"1f1f9-1f1fc",tajikistan:"1f1f9-1f1ef",takeout_box:"1f961",tanabata_tree:"1f38b",tangerine:"1f34a",tanzania:"1f1f9-1f1ff",taurus:"2649",taxi:"1f695",tea:"1f375",teacher:"1f9d1-1f3eb",technologist:"1f9d1-1f4bb",teddy_bear:"1f9f8",telephone:"260e",telephone_receiver:"1f4de",telescope:"1f52d",tennis:"1f3be",tent:"26fa",test_tube:"1f9ea",thailand:"1f1f9-1f1ed",thermometer:"1f321",thinking:"1f914",thought_balloon:"1f4ad",thread:"1f9f5",three:"0033-20e3",thumbsdown:"1f44e",thumbsup:"1f44d",ticket:"1f3ab",tickets:"1f39f",tiger:"1f42f",tiger2:"1f405",timer_clock:"23f2",timor_leste:"1f1f9-1f1f1",tipping_hand_man:"1f481-2642",tipping_hand_person:"1f481",tipping_hand_woman:"1f481-2640",tired_face:"1f62b",tm:"2122",togo:"1f1f9-1f1ec",toilet:"1f6bd",tokelau:"1f1f9-1f1f0",tokyo_tower:"1f5fc",tomato:"1f345",tonga:"1f1f9-1f1f4",tongue:"1f445",toolbox:"1f9f0",tooth:"1f9b7",top:"1f51d",tophat:"1f3a9",tornado:"1f32a",tr:"1f1f9-1f1f7",trackball:"1f5b2",tractor:"1f69c",traffic_light:"1f6a5",train:"1f68b",train2:"1f686",tram:"1f68a",triangular_flag_on_post:"1f6a9",triangular_ruler:"1f4d0",trident:"1f531",trinidad_tobago:"1f1f9-1f1f9",tristan_da_cunha:"1f1f9-1f1e6",triumph:"1f624",trolleybus:"1f68e",trophy:"1f3c6",tropical_drink:"1f379",tropical_fish:"1f420",truck:"1f69a",trumpet:"1f3ba",tshirt:"1f455",tulip:"1f337",tumbler_glass:"1f943",tunisia:"1f1f9-1f1f3",turkey:"1f983",turkmenistan:"1f1f9-1f1f2",turks_caicos_islands:"1f1f9-1f1e8",turtle:"1f422",tuvalu:"1f1f9-1f1fb",tv:"1f4fa",twisted_rightwards_arrows:"1f500",two:"0032-20e3",two_hearts:"1f495",two_men_holding_hands:"1f46c",two_women_holding_hands:"1f46d",u5272:"1f239",u5408:"1f234",u55b6:"1f23a",u6307:"1f22f",u6708:"1f237",u6709:"1f236",u6e80:"1f235",u7121:"1f21a",u7533:"1f238",u7981:"1f232",u7a7a:"1f233",uganda:"1f1fa-1f1ec",uk:"1f1ec-1f1e7",ukraine:"1f1fa-1f1e6",umbrella:"2614",unamused:"1f612",underage:"1f51e",unicorn:"1f984",united_arab_emirates:"1f1e6-1f1ea",united_nations:"1f1fa-1f1f3",unlock:"1f513",up:"1f199",upside_down_face:"1f643",uruguay:"1f1fa-1f1fe",us:"1f1fa-1f1f8",us_outlying_islands:"1f1fa-1f1f2",us_virgin_islands:"1f1fb-1f1ee",uzbekistan:"1f1fa-1f1ff",v:"270c",vampire:"1f9db",vampire_man:"1f9db-2642",vampire_woman:"1f9db-2640",vanuatu:"1f1fb-1f1fa",vatican_city:"1f1fb-1f1e6",venezuela:"1f1fb-1f1ea",vertical_traffic_light:"1f6a6",vhs:"1f4fc",vibration_mode:"1f4f3",video_camera:"1f4f9",video_game:"1f3ae",vietnam:"1f1fb-1f1f3",violin:"1f3bb",virgo:"264d",volcano:"1f30b",volleyball:"1f3d0",vomiting_face:"1f92e",vs:"1f19a",vulcan_salute:"1f596",waffle:"1f9c7",wales:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",walking:"1f6b6",walking_man:"1f6b6-2642",walking_woman:"1f6b6-2640",wallis_futuna:"1f1fc-1f1eb",waning_crescent_moon:"1f318",waning_gibbous_moon:"1f316",warning:"26a0",wastebasket:"1f5d1",watch:"231a",water_buffalo:"1f403",water_polo:"1f93d",watermelon:"1f349",wave:"1f44b",wavy_dash:"3030",waxing_crescent_moon:"1f312",waxing_gibbous_moon:"1f314",wc:"1f6be",weary:"1f629",wedding:"1f492",weight_lifting:"1f3cb",weight_lifting_man:"1f3cb-2642",weight_lifting_woman:"1f3cb-2640",western_sahara:"1f1ea-1f1ed",whale:"1f433",whale2:"1f40b",wheel_of_dharma:"2638",wheelchair:"267f",white_check_mark:"2705",white_circle:"26aa",white_flag:"1f3f3",white_flower:"1f4ae",white_haired_man:"1f468-1f9b3",white_haired_woman:"1f469-1f9b3",white_heart:"1f90d",white_large_square:"2b1c",white_medium_small_square:"25fd",white_medium_square:"25fb",white_small_square:"25ab",white_square_button:"1f533",wilted_flower:"1f940",wind_chime:"1f390",wind_face:"1f32c",wine_glass:"1f377",wink:"1f609",wolf:"1f43a",woman:"1f469",woman_artist:"1f469-1f3a8",woman_astronaut:"1f469-1f680",woman_cartwheeling:"1f938-2640",woman_cook:"1f469-1f373",woman_dancing:"1f483",woman_facepalming:"1f926-2640",woman_factory_worker:"1f469-1f3ed",woman_farmer:"1f469-1f33e",woman_firefighter:"1f469-1f692",woman_health_worker:"1f469-2695",woman_in_manual_wheelchair:"1f469-1f9bd",woman_in_motorized_wheelchair:"1f469-1f9bc",woman_judge:"1f469-2696",woman_juggling:"1f939-2640",woman_mechanic:"1f469-1f527",woman_office_worker:"1f469-1f4bc",woman_pilot:"1f469-2708",woman_playing_handball:"1f93e-2640",woman_playing_water_polo:"1f93d-2640",woman_scientist:"1f469-1f52c",woman_shrugging:"1f937-2640",woman_singer:"1f469-1f3a4",woman_student:"1f469-1f393",woman_teacher:"1f469-1f3eb",woman_technologist:"1f469-1f4bb",woman_with_headscarf:"1f9d5",woman_with_probing_cane:"1f469-1f9af",woman_with_turban:"1f473-2640",womans_clothes:"1f45a",womans_hat:"1f452",women_wrestling:"1f93c-2640",womens:"1f6ba",woozy_face:"1f974",world_map:"1f5fa",worried:"1f61f",wrench:"1f527",wrestling:"1f93c",writing_hand:"270d",x:"274c",yarn:"1f9f6",yawning_face:"1f971",yellow_circle:"1f7e1",yellow_heart:"1f49b",yellow_square:"1f7e8",yemen:"1f1fe-1f1ea",yen:"1f4b4",yin_yang:"262f",yo_yo:"1fa80",yum:"1f60b",zambia:"1f1ff-1f1f2",zany_face:"1f92a",zap:"26a1",zebra:"1f993",zero:"0030-20e3",zimbabwe:"1f1ff-1f1fc",zipper_mouth_face:"1f910",zombie:"1f9df",zombie_man:"1f9df-2642",zombie_woman:"1f9df-2640",zzz:"1f4a4"};function gd(e,t){var n=Ao(e);if(cc){var r=cc(e);t&&(r=Ro(r).call(r,(function(t){return pc(e,t).enumerable}))),n.push.apply(n,r)}return n}function md(e){for(var t=1;t<arguments.length;t++){var n,r=null!=arguments[t]?arguments[t]:{};if(t%2)Co(n=gd(Object(r),!0)).call(n,(function(t){Ir(e,t,r[t])}));else if(gc)mc(e,gc(r));else{var i;Co(i=gd(Object(r))).call(i,(function(t){co(e,t,pc(r,t))}))}}return e}function vd(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}function yd(){for(var e=[],t=0,n="",r=0,i=arguments.length;r!==i;++r){var a=+(r<0||arguments.length<=r?void 0:arguments[r]);if(!(a<1114111&&a>>>0===a))throw new RangeError("Invalid code point: ".concat(a));a<=65535?t=e.push(a):(a-=65536,t=e.push(55296+(a>>10),a%1024+56320)),t>=16383&&(n+=String.fromCharCode.apply(null,e),e.length=0)}return n+String.fromCharCode.apply(null,e)}var bd=function(e){St(n,e);var t=vd(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:void 0},i=r.config;if(vt(this,n),(e=t.call(this,{config:i})).options={useUnicode:!0,upperCase:!1,customHandled:!1,resourceURL:"https://github.githubassets.com/images/icons/emoji/unicode/${code}.png?v8",emojis:md({},hd)},"object"!==Er(i))return Or(e);var a=i.useUnicode,o=i.customResourceURL,s=i.customRenderer,l=i.upperCase;return e.options.useUnicode="boolean"==typeof a?a:e.options.useUnicode,e.options.upperCase="boolean"==typeof a?l:e.options.upperCase,!1===a&&"string"==typeof o&&(e.options.resourceURL=o),"function"==typeof s&&(e.options.customHandled=!0,e.options.customRenderer=s),e}return lo(n,[{key:"makeHtml",value:function(e,t){var n=this;return this.test(e)?e.replace(this.RULE.reg,(function(e,t){var r;if(n.options.customHandled&&"function"==typeof n.options.customRenderer)return n.options.customRenderer(t);var i=n.options.emojis[t];if("string"!=typeof i)return e;if(n.options.useUnicode){var a,o=Jo(a=i.split("-")).call(a,(function(e){return"0x".concat(e)}));return yd.apply(void 0,ic(o))}n.options.upperCase&&(i=i.toUpperCase());var s=n.options.resourceURL.replace(/\$\{code\}/g,i);return yo(r='<img class="emoji" src="'.concat(s,'" alt="')).call(r,nu(t),'" />')})):e}},{key:"rule",value:function(){var e={begin:":",content:"([a-zA-Z0-9+_]+?)",end:":"};return e.reg=Cl(e,"g"),e}}]),n}(Ko);function wd(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(bd,"HOOK_NAME","emoji");var _d=function(e){St(n,e);var t=wd(n);function n(){return vt(this,n),t.apply(this,arguments)}return lo(n,[{key:"makeHtml",value:function(e){return this.test(e)?e.replace(this.RULE.reg,'$1<span style="text-decoration: underline;">$2</span>$3'):e}},{key:"rule",value:function(){var e={begin:"(^| )\\/",end:"\\/( |$)",content:"([^\\n]+?)"};return e.reg=new RegExp(e.begin+e.content+e.end,"g"),e}}]),n}(Ko);function kd(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}Ir(_d,"HOOK_NAME","underline");var xd=function(e){St(n,e);var t=kd(n);function n(){return vt(this,n),t.apply(this,arguments)}return lo(n,[{key:"makeHtml",value:function(e){return this.test(e)?e.replace(this.RULE.reg,"$1<mark>$2</mark>$3"):e}},{key:"rule",value:function(){var e={begin:"(^| )==",end:"==( |$|\\n)",content:"([^\\n]+?)"};return e.reg=new RegExp(e.begin+e.content+e.end,"g"),e}}]),n}(Ko);Ir(xd,"HOOK_NAME","highLight");var Sd=S("JSON","stringify"),Cd=/[\uD800-\uDFFF]/g,Ed=/^[\uD800-\uDBFF]$/,Ad=/^[\uDC00-\uDFFF]$/,Td=function(e,t,n){var r=n.charAt(t-1),i=n.charAt(t+1);return Ed.test(e)&&!Ad.test(i)||Ad.test(e)&&!Ed.test(r)?"\\u"+e.charCodeAt(0).toString(16):e},Od=c((function(){return'"\\udf06\\ud834"'!==Sd("\udf06\ud834")||'"\\udead"'!==Sd("\udead")}));Sd&&ye({target:"JSON",stat:!0,forced:Od},{stringify:function(e,t,n){var r=Sd.apply(null,arguments);return"string"==typeof r?r.replace(Cd,Td):r}}),k.JSON||(k.JSON={stringify:JSON.stringify});var Ld=function(e,t,n){return k.JSON.stringify.apply(null,arguments)},Md=Ge.includes;ye({target:"Array",proto:!0},{includes:function(e){return Md(this,e,arguments.length>1?arguments[1]:void 0)}});var Rd=uo("Array").includes;ye({target:"String",proto:!0,forced:!Af("includes")},{includes:function(e){return!!~Ht(b(this)).indexOf(Ht(Cf(e)),arguments.length>1?arguments[1]:void 0)}});var Nd=uo("String").includes,Pd=Array.prototype,$d=String.prototype,Id=function(e){var t=e.includes;return e===Pd||e instanceof Array&&t===Pd.includes?Rd:"string"==typeof e||e===$d||e instanceof String&&t===$d.includes?Nd:t},Dd=[].slice,Hd=/MSIE .\./.test(C),Fd=function(e){return function(t,n){var r=arguments.length>2,i=r?Dd.call(arguments,2):void 0;return e(r?function(){(l(t)?t:Function(t)).apply(this,i)}:t,n)}};ye({global:!0,bind:!0,forced:Hd},{setTimeout:Fd(s.setTimeout),setInterval:Fd(s.setInterval)});var jd=k.setTimeout;var Bd=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var zd=function(e){return"symbol"==typeof e||fa(e)&&"[object Symbol]"==ci(e)},Wd=ei?ei.prototype:void 0,Ud=Wd?Wd.toString:void 0;var Gd=function e(t){if("string"==typeof t)return t;if(va(t))return Bd(t,e)+"";if(zd(t))return Ud?Ud.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var Kd=function(e){return null==e?"":Gd(e)},qd=/[\\^$.*+?()[\]{}|]/g,Xd=RegExp(qd.source);var Yd=function(e){return(e=Kd(e))&&Xd.test(e)?e.replace(qd,"\\$&"):e},Vd=r((function(e,t){e.exports=function(){var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),l=!a&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!a&&/Chrome\//.test(e),f=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),g=!a&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),m=/Android/.test(e),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),_=f&&e.match(/Version\/(\d*\.\d*)/);_&&(_=Number(_[1])),_&&_>=15&&(f=!1,l=!0);var k=y&&(c||f&&(null==_||_<12.11)),x=n||o&&s>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C,E=function(e,t){var n=e.className,r=S(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function A(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return A(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function L(e,t,n,r){var i=O(e,t,n,r);return i.setAttribute("role","presentation"),i}function M(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function R(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function N(e,t){var n=e.className;S(t).test(n)||(e.className+=(n?" ":"")+t)}function P(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!S(n[r]).test(t)&&(t+=" "+n[r]);return t}C=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var $=function(e){e.select()};function I(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function D(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function H(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var a=r||0,o=i||0;;){var s=e.indexOf("\t",a);if(s<0||s>=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}}g?$=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&($=function(e){try{e.select()}catch(e){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=I(this.onTimeout,this)};function j(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}F.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},F.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var B={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},W={origin:"*mouse"},U={origin:"+move"};function G(e,t,n){for(var r=0,i=0;;){var a=e.indexOf("\t",r);-1==a&&(a=e.length);var o=a-r;if(a==e.length||i+o>=t)return r+Math.min(o,t-i);if(i+=a-r,r=a+1,(i+=n-i%n)>=t)return r}}var K=[""];function q(e){for(;K.length<=e;)K.push(X(K)+" ");return K[e]}function X(e){return e[e.length-1]}function Y(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function V(){}function Z(e,t){var n;return Object.create?n=Object.create(e):(V.prototype=e,n=new V),t&&D(t,n),n}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Q(e))||t.test(e):Q(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:t<e.length)&&re(e.charAt(t));)t+=n;return t}function ae(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}var oe=null;function se(e,t,n){var r;oe=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&"before"==n?r=i:oe=i),a.from==t&&(a.from!=a.to&&"before"!=n?r=i:oe=i)}return null!=r?r:oe}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function a(e,t,n){this.level=e,this.from=t,this.to=n}return function(o,s){var l="ltr"==s?"L":"R";if(0==o.length||"ltr"==s&&!e.test(o))return!1;for(var c,u=o.length,f=[],d=0;d<u;++d)f.push((c=o.charCodeAt(d))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":8204==c?"b":"L");for(var p=0,h=l;p<u;++p){var g=f[p];"m"==g?f[p]=h:h=g}for(var m=0,v=l;m<u;++m){var y=f[m];"1"==y&&"r"==v?f[m]="n":n.test(y)&&(v=y,"r"==y&&(f[m]="R"))}for(var b=1,w=f[0];b<u-1;++b){var _=f[b];"+"==_&&"1"==w&&"1"==f[b+1]?f[b]="1":","!=_||w!=f[b+1]||"1"!=w&&"n"!=w||(f[b]=w),w=_}for(var k=0;k<u;++k){var x=f[k];if(","==x)f[k]="N";else if("%"==x){var S=void 0;for(S=k+1;S<u&&"%"==f[S];++S);for(var C=k&&"!"==f[k-1]||S<u&&"1"==f[S]?"1":"N",E=k;E<S;++E)f[E]=C;k=S-1}}for(var A=0,T=l;A<u;++A){var O=f[A];"L"==T&&"1"==O?f[A]="L":n.test(O)&&(T=O)}for(var L=0;L<u;++L)if(t.test(f[L])){var M=void 0;for(M=L+1;M<u&&t.test(f[M]);++M);for(var R="L"==(L?f[L-1]:l),N=R==("L"==(M<u?f[M]:l))?R?"L":"R":l,P=L;P<M;++P)f[P]=N;L=M-1}for(var $,I=[],D=0;D<u;)if(r.test(f[D])){var H=D;for(++D;D<u&&r.test(f[D]);++D);I.push(new a(0,H,D))}else{var F=D,j=I.length,B="rtl"==s?1:0;for(++D;D<u&&"L"!=f[D];++D);for(var z=F;z<D;)if(i.test(f[z])){F<z&&(I.splice(j,0,new a(1,F,z)),j+=B);var W=z;for(++z;z<D&&i.test(f[z]);++z);I.splice(j,0,new a(2,W,z)),j+=B,F=z}else++z;F<D&&I.splice(j,0,new a(1,F,D))}return"ltr"==s&&(1==I[0].level&&($=o.match(/^\s+/))&&(I[0].from=$[0].length,I.unshift(new a(0,0,$[0].length))),1==X(I).level&&($=o.match(/\s+$/))&&(X(I).to-=$[0].length,I.push(new a(0,u-$[0].length,u)))),"rtl"==s?I.reverse():I}}();function ce(e,t){var n=e.order;return null==n&&(n=e.order=le(e.text,t)),n}var ue=[],fe=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ue).concat(n)}};function de(e,t){return e._handlers&&e._handlers[t]||ue}function pe(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var a=j(i,n);a>-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function he(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function ge(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),he(e,n||t.type,e,t),_e(t)||t.codemirrorIgnore}function me(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==j(n,t[r])&&n.push(t[r])}function ve(e,t){return de(e,t).length>0}function ye(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function we(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function _e(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ke(e){be(e),we(e)}function xe(e){return e.target||e.srcElement}function Se(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Ce,Ee,Ae=function(){if(o&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Te(e){if(null==Ce){var t=O("span","​");T(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ce=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=Ce?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Oe(e){if(null!=Ee)return Ee;var t=T(e,document.createTextNode("AخA")),n=C(t,0,1).getBoundingClientRect(),r=C(t,1,2).getBoundingClientRect();return A(e),!(!n||n.left==n.right)&&(Ee=r.right-n.right<3)}var Le,Me=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var a=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),o=a.indexOf("\r");-1!=o?(n.push(a.slice(0,o)),t+=o+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ne="oncopy"in(Le=O("div"))||(Le.setAttribute("oncopy","return;"),"function"==typeof Le.oncopy),Pe=null,$e={},Ie={};function De(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),$e[e]=t}function He(e){if("string"==typeof e&&Ie.hasOwnProperty(e))e=Ie[e];else if(e&&"string"==typeof e.name&&Ie.hasOwnProperty(e.name)){var t=Ie[e.name];"string"==typeof t&&(t={name:t}),(e=Z(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return He("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return He("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Fe(e,t){t=He(t);var n=$e[t.name];if(!n)return Fe(e,"text/plain");var r=n(e,t);if(je.hasOwnProperty(t.name)){var i=je[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var je={};function Be(e,t){D(t,je.hasOwnProperty(e)?je[e]:je[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function We(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ue(e,t,n){return!e.startState||e.startState(t,n)}var Ge=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t<a){n=i;break}t-=a}return n.lines[t]}function qe(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var a=e.text;i==n.line&&(a=a.slice(0,n.ch)),i==t.line&&(a=a.slice(t.ch)),r.push(a),++i})),r}function Xe(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Ye(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ve(e){if(null==e.parent)return null;for(var t=e.parent,n=j(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Ze(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],a=i.height;if(t<a){e=i;continue e}t-=a,n+=i.chunkSize()}return n}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o].height;if(t<s)break;t-=s}return n+o}function Je(e,t){return t>=e.first&&t<e.first+e.size}function Qe(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,n){if(void 0===n&&(n=null),!(this instanceof et))return new et(e,t,n);this.line=e,this.ch=t,this.sticky=n}function tt(e,t){return e.line-t.line||e.ch-t.ch}function nt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function rt(e){return et(e.line,e.ch)}function it(e,t){return tt(e,t)<0?t:e}function at(e,t){return tt(e,t)<0?e:t}function ot(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function st(e,t){if(t.line<e.first)return et(e.first,0);var n=e.first+e.size-1;return t.line>n?et(n,Ke(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ke(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=st(e,t[r]);return n}Ge.prototype.eol=function(){return this.pos>=this.string.length},Ge.prototype.sol=function(){return this.pos==this.lineStart},Ge.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ge.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ge.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ge.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ge.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ge.prototype.skipToEnd=function(){this.pos=this.string.length},Ge.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ge.prototype.backUp=function(e){this.pos-=e},Ge.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=H(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?H(this.string,this.lineStart,this.tabSize):0)},Ge.prototype.indentation=function(){return H(this.string,null,this.tabSize)-(this.lineStart?H(this.string,this.lineStart,this.tabSize):0)},Ge.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ge.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ge.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ge.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ge.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ft(e,t,n,r){var i=[e.state.modeGen],a={};wt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,wt(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var a=i[n+1];i[n+1]=(a?a+" ":"")+"overlay "+t}}),a),n.state=o,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function dt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=pt(e,Ve(t)),i=t.text.length>e.options.maxHighlightLength&&ze(e.doc.mode,r.state),a=ft(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function pt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ut(r,!0,t);var a=function(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var l=Ke(a,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=a.modeFrontier))return s;var u=H(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),o=a>r.first&&Ke(r,a-1).stateAfter,s=o?ut.fromSaved(r,o,a):new ut(r,Ue(r.mode),a);return r.iter(a,t,(function(n){ht(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function ht(e,t,n,r){var i=e.doc.mode,a=new Ge(t,e.options.tabSize,n);for(a.start=a.pos=r||0,""==t&&gt(i,n.state);!a.eol();)mt(i,a,n.state),a.start=a.pos}function gt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=We(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function mt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=We(e,n).mode);var a=e.token(t,n);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,ze(e.mode,t.state),n,t.lookAhead):new ut(e,ze(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,a,o=e.doc,s=o.mode,l=Ke(o,(t=st(o,t)).line),c=pt(e,t.line,n),u=new Ge(l.text,e.options.tabSize,c);for(r&&(a=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=mt(s,u,c.state),r&&a.push(new vt(u,i,ze(o.mode,c.state)));return r?a:new vt(u,i,c.state)}function bt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function wt(e,t,n,r,i,a,o){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,f=new Ge(t,e.options.tabSize,r),d=e.options.addModeClass&&[null];for(""==t&&bt(gt(n,r.state),a);!f.eol();){if(f.pos>e.options.maxHighlightLength?(s=!1,o&&ht(e,t,r,f.pos),f.pos=t.length,l=null):l=bt(mt(n,f,r.state,d),a),d){var p=d[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c<f.start;)i(c=Math.min(f.start,c+5e3),u);u=l}f.start=f.pos}for(;c<f.pos;){var h=Math.min(f.pos,c+5e3);i(h,u),c=h}}var _t=!1,kt=!1;function xt(e,t,n){this.marker=e,this.from=t,this.to=n}function St(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ct(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Et(e,t){if(t.full)return null;var n=Je(e,t.from.line)&&Ke(e,t.from.line).markedSpans,r=Je(e,t.to.line)&&Ke(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,a=t.to.ch,o=0==tt(t.from,t.to),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(null==a.from||(o.inclusiveLeft?a.from<=t:a.from<t)||a.from==t&&"bookmark"==o.type&&(!n||!a.marker.insertLeft)){var s=null==a.to||(o.inclusiveRight?a.to>=t:a.to>t);(r||(r=[])).push(new xt(o,a.from,s?null:a.to))}}return r}(n,i,o),l=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(null==a.to||(o.inclusiveRight?a.to>=t:a.to>t)||a.from==t&&"bookmark"==o.type&&(!n||a.marker.insertLeft)){var s=null==a.from||(o.inclusiveLeft?a.from<=t:a.from<t);(r||(r=[])).push(new xt(o,s?null:a.from-t,null==a.to?null:a.to-t))}}return r}(r,a,o),c=1==t.text.length,u=X(t.text).length+(c?i:0);if(s)for(var f=0;f<s.length;++f){var d=s[f];if(null==d.to){var p=St(l,d.marker);p?c&&(d.to=null==p.to?null:p.to+u):d.to=i}}if(l)for(var h=0;h<l.length;++h){var g=l[h];null!=g.to&&(g.to+=u),null==g.from?St(s,g.marker)||(g.from=u,c&&(s||(s=[])).push(g)):(g.from+=u,c&&(s||(s=[])).push(g))}s&&(s=At(s)),l&&l!=s&&(l=At(l));var m=[s];if(!c){var v,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new xt(s[b].marker,null,null));for(var w=0;w<y;++w)m.push(v);m.push(l)}return m}function At(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Tt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Ot(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Lt(e){return e.inclusiveLeft?-1:0}function Mt(e){return e.inclusiveRight?1:0}function Rt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),a=tt(r.from,i.from)||Lt(e)-Lt(t);if(a)return-a;var o=tt(r.to,i.to)||Mt(e)-Mt(t);return o||t.id-e.id}function Nt(e,t){var n,r=kt&&e.markedSpans;if(r)for(var i=void 0,a=0;a<r.length;++a)(i=r[a]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Rt(n,i.marker)<0)&&(n=i.marker);return n}function Pt(e){return Nt(e,!0)}function $t(e){return Nt(e,!1)}function It(e,t){var n,r=kt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var a=r[i];a.marker.collapsed&&(null==a.from||a.from<t)&&(null==a.to||a.to>t)&&(!n||Rt(n,a.marker)<0)&&(n=a.marker)}return n}function Dt(e,t,n,r,i){var a=Ke(e,t),o=kt&&a.markedSpans;if(o)for(var s=0;s<o.length;++s){var l=o[s];if(l.marker.collapsed){var c=l.marker.find(0),u=tt(c.from,n)||Lt(l.marker)-Lt(i),f=tt(c.to,r)||Mt(l.marker)-Mt(i);if(!(u>=0&&f<=0||u<=0&&f>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Ht(e){for(var t;t=Pt(e);)e=t.find(-1,!0).line;return e}function Ft(e,t){var n=Ke(e,t),r=Ht(n);return n==r?t:Ve(r)}function jt(e,t){if(t>e.lastLine())return t;var n,r=Ke(e,t);if(!Bt(e,r))return t;for(;n=$t(r);)r=n.find(1,!0).line;return Ve(r)+1}function Bt(e,t){var n=kt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&zt(e,t,r))return!0}}function zt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return zt(e,r.line,St(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if((i=t.markedSpans[a]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&zt(e,t,i))return!0}function Wt(e){for(var t=0,n=(e=Ht(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var a=n.parent;a;a=(n=a).parent)for(var o=0;o<a.children.length;++o){var s=a.children[o];if(s==n)break;t+=s.height}return t}function Ut(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Pt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=$t(r);){var a=t.find(0,!0);n-=r.text.length-a.from.ch,n+=(r=a.to.line).text.length-a.to.ch}return n}function Gt(e){var t=e.display,n=e.doc;t.maxLine=Ke(n,n.first),t.maxLineLength=Ut(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Ut(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Kt=function(e,t,n){this.text=e,Ot(this,t),this.height=n?n(this):1};function qt(e){e.parent=null,Tt(e)}Kt.prototype.lineNo=function(){return Ve(this)},ye(Kt);var Xt={},Yt={};function Vt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Yt:Xt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var n=L("span",null,null,l?"padding-right: .1px":null),r={pre:L("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=Qt,Oe(e.display.measure)&&(o=ce(a,e.doc.direction))&&(r.addToken=en(r.addToken,o)),r.map=[],nn(a,r,dt(e,a,t!=e.display.externalMeasured&&Ve(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=P(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=P(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Te(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=P(r.pre.className,r.textClass||"")),r}function Jt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Qt(e,t,n,r,i,a,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/  /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var a=e.charAt(i);" "!=a||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(a=" "),r+=a,n=" "==a}return r}(t,e.trailingSpace):t,f=e.cm.state.specialChars,d=!1;if(f.test(t)){c=document.createDocumentFragment();for(var p=0;;){f.lastIndex=p;var h=f.exec(t),g=h?h.index-p:t.length-p;if(g){var m=document.createTextNode(u.slice(p,p+g));o&&s<9?c.appendChild(O("span",[m])):c.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!h)break;p+=g+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=c.appendChild(O("span",q(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=c.appendChild(O("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),o&&s<9?c.appendChild(O("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),o&&s<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||d||a||l){var w=n||"";r&&(w+=r),i&&(w+=i);var _=O("span",[c],w,a);if(l)for(var k in l)l.hasOwnProperty(k)&&"style"!=k&&"class"!=k&&_.setAttribute(k,l[k]);return e.content.appendChild(_)}e.content.appendChild(c)}}function en(e,t){return function(n,r,i,a,o,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var f=void 0,d=0;d<t.length&&!((f=t[d]).to>c&&f.from<=c);d++);if(f.to>=u)return e(n,r,i,a,o,s,l);e(n,r.slice(0,f.to-c),i,a,null,s,l),a=null,r=r.slice(f.to-c),c=f.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(r)for(var o,s,l,c,u,f,d,p=i.length,h=0,g=1,m="",v=0;;){if(v==h){l=c=u=s="",d=null,f=null,v=1/0;for(var y=[],b=void 0,w=0;w<r.length;++w){var _=r[w],k=_.marker;if("bookmark"==k.type&&_.from==h&&k.widgetNode)y.push(k);else if(_.from<=h&&(null==_.to||_.to>h||k.collapsed&&_.to==h&&_.from==h)){if(null!=_.to&&_.to!=h&&v>_.to&&(v=_.to,c=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&_.from==h&&(u+=" "+k.startStyle),k.endStyle&&_.to==v&&(b||(b=[])).push(k.endStyle,_.to),k.title&&((d||(d={})).title=k.title),k.attributes)for(var x in k.attributes)(d||(d={}))[x]=k.attributes[x];k.collapsed&&(!f||Rt(f.marker,k)<0)&&(f=_)}else _.from>h&&v>_.from&&(v=_.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==v&&(c+=" "+b[S]);if(!f||f.from==h)for(var C=0;C<y.length;++C)tn(t,0,y[C]);if(f&&(f.from||0)==h){if(tn(t,(null==f.to?p+1:f.to)-h,f.marker,null==f.from),null==f.to)return;f.to==h&&(f=!1)}}if(h>=p)break;for(var E=Math.min(p,v);;){if(m){var A=h+m.length;if(!f){var T=A>E?m.slice(0,E-h):m;t.addToken(t,T,o?o+l:l,u,h+T.length==v?c:"",s,d)}if(A>=E){m=m.slice(E-h),h=E;break}h=A,u=""}m=i.slice(a,a=n[g++]),o=Vt(n[g++],t.cm.options)}}else for(var O=1;O<n.length;O+=2)t.addToken(t,i.slice(a,a=n[O]),Vt(n[O+1],t.cm.options))}function rn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=$t(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Ve(X(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Bt(e,t)}function an(e,t,n){for(var r,i=[],a=t;a<n;a=r){var o=new rn(e.doc,Ke(e.doc,a),a);r=a+o.size,i.push(o)}return i}var on=null,sn=null;function ln(e,t){var n=de(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);on?r=on.delayedCallbacks:sn?r=sn:(r=sn=[],setTimeout(cn,0));for(var a=function(e){r.push((function(){return n[e].apply(null,i)}))},o=0;o<n.length;++o)a(o)}}function cn(){var e=sn;sn=null;for(var t=0;t<e.length;++t)e[t]()}function un(e,t,n,r){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];"text"==a?pn(e,t):"gutter"==a?gn(e,t,n,r):"class"==a?hn(e,t):"widget"==a&&mn(e,t,r)}t.changes=null}function fn(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),o&&s<8&&(e.node.style.zIndex=2)),e.node}function dn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Zt(e,t)}function pn(e,t){var n=t.text.className,r=dn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,hn(e,t)):n&&(t.text.className=n)}function hn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=fn(t);t.background=r.insertBefore(O("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?fn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function gn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=fn(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=fn(t),s=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(O("div",Qe(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=a.hasOwnProperty(c)&&a[c];u&&s.appendChild(O("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function mn(e,t,n){t.alignable&&(t.alignable=null);for(var r=S("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);yn(e,t,n)}function vn(e,t,n,r){var i=dn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),hn(e,t),gn(e,t,n,r),yn(e,t,r),t.node}function yn(e,t,n){if(bn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)bn(e,t.rest[r],t,n,!1)}function bn(e,t,n,r,i){if(t.widgets)for(var a=fn(n),o=0,s=t.widgets;o<s.length;++o){var l=s[o],c=O("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),wn(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?a.insertBefore(c,n.gutter||n.text):a.appendChild(c),ln(l,"redraw")}}function wn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function _n(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!M(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),T(t.display.measure,O("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function kn(e,t){for(var n=xe(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function xn(e){return e.lineSpace.offsetTop}function Sn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Cn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=T(e.measure,O("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function En(e){return 50-e.display.nativeBarWidth}function An(e){return e.display.scroller.clientWidth-En(e)-e.display.barWidth}function Tn(e){return e.display.scroller.clientHeight-En(e)-e.display.barHeight}function On(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(Ve(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ln(e,t,n,r){return Nn(e,Rn(e,t),n,r)}function Mn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ur(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Rn(e,t){var n=Ve(t),r=Mn(e,n);r&&!r.text?r=null:r&&r.changes&&(un(e,r,n,ar(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=Ve(t=Ht(t)),r=e.display.externalMeasured=new rn(e.doc,t,n);r.lineN=n;var i=r.built=Zt(e,r);return r.text=i.pre,T(e.display.lineMeasure,i.pre),r}(e,t));var i=On(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Nn(e,t,n,r,i){t.before&&(n=-1);var a,l=n+(r||"");return t.cache.hasOwnProperty(l)?a=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&An(e);if(!t.measure.heights||r&&t.measure.width!=i){var a=t.measure.heights=[];if(r){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var l=o[s],c=o[s+1];Math.abs(l.bottom-c.bottom)>2&&a.push((l.bottom+c.top)/2-n.top)}}a.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(a=function(e,t,n,r){var i,a=In(t.map,n,r),l=a.node,c=a.start,u=a.end,f=a.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&re(t.line.text.charAt(a.coverStart+c));)--c;for(;a.coverStart+u<a.coverEnd&&re(t.line.text.charAt(a.coverStart+u));)++u;if((i=o&&s<9&&0==c&&u==a.coverEnd-a.coverStart?l.parentNode.getBoundingClientRect():Dn(C(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,f="right"}o&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Pe)return Pe;var t=T(e,O("span","x")),n=t.getBoundingClientRect(),r=C(t,0,1).getBoundingClientRect();return Pe=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var p;c>0&&(f=r="right"),i=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!c&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+ir(e.display),top:h.top,bottom:h.bottom}:$n}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var w=b?y[b-1]:0,_=y[b],k={left:("right"==f?i.right:i.left)-t.rect.left,right:("left"==f?i.left:i.right)-t.rect.left,top:w,bottom:_};return i.left||i.right||(k.bogus=!0),e.options.singleCursorHeightPerLine||(k.rtop=g,k.rbottom=m),k}(e,t,n,r)).bogus||(t.cache[l]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var Pn,$n={left:0,right:0,top:0,bottom:0};function In(e,t,n){for(var r,i,a,o,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,a=1,o="left"):t<l?a=1+(i=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(i=(a=l-s)-1,t>=l&&(o="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],o="left";if("right"==n&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],o="right";break}return{node:r,start:i,end:a,collapse:o,coverStart:s,coverEnd:l}}function Dn(e,t){var n=$n;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function Hn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Fn(e){e.display.externalMeasure=null,A(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Hn(e.display.view[t])}function jn(e){Fn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Bn(){return u&&m?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function zn(){return u&&m?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Wn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=_n(e.widgets[n]));return t}function Un(e,t,n,r,i){if(!i){var a=Wn(t);n.top+=a,n.bottom+=a}if("line"==r)return n;r||(r="local");var o=Wt(t);if("local"==r?o+=xn(e.display):o-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+("window"==r?0:zn());var l=s.left+("window"==r?0:Bn());n.left+=l,n.right+=l}return n.top+=o,n.bottom+=o,n}function Gn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Bn(),i-=zn();else if("local"==n||!n){var a=e.display.sizer.getBoundingClientRect();r+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:i-o.top}}function Kn(e,t,n,r,i){return r||(r=Ke(e.doc,t.line)),Un(e,r,Ln(e,r,t.ch,i),n)}function qn(e,t,n,r,i,a){function o(t,o){var s=Nn(e,i,t,o?"right":"left",a);return o?s.left=s.right:s.right=s.left,Un(e,r,s,n)}r=r||Ke(e.doc,t.line),i||(i=Rn(e,r));var s=ce(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return o("before"==c?l-1:l,"before"==c);function u(e,t,n){return o(n?e-1:e,1==s[t].level!=n)}var f=se(s,l,c),d=oe,p=u(l,f,"before"==c);return null!=d&&(p.other=u(l,d,"before"!=c)),p}function Xn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ke(e.doc,t.line),i=Wt(r)+xn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Yn(e,t,n,r,i){var a=et(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function Vn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Yn(r.first,0,null,-1,-1);var i=Ze(r,n),a=r.first+r.size-1;if(i>a)return Yn(r.first+r.size-1,Ke(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=Ke(r,i);;){var s=er(e,o,i,t,n),l=It(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;o=Ke(r,i=c.line)}}function Zn(e,t,n,r){r-=Wn(t);var i=t.text.length,a=ae((function(t){return Nn(e,n,t-1).bottom<=r}),i,0);return{begin:a,end:i=ae((function(t){return Nn(e,n,t).top>r}),a,i)}}function Jn(e,t,n,r){return n||(n=Rn(e,t)),Zn(e,t,n,Un(e,t,Nn(e,n,r),"line").top)}function Qn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Wt(t);var a=Rn(e,t),o=Wn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var f=(e.options.lineWrapping?nr:tr)(e,t,n,a,u,r,i);s=(c=1!=f.level)?f.from:f.to-1,l=c?f.to:f.from-1}var d,p,h=null,g=null,m=ae((function(t){var n=Nn(e,a,t);return n.top+=o,n.bottom+=o,!!Qn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,g=n),!0)}),s,l),v=!1;if(g){var y=r-g.left<g.right-r,b=y==c;m=h+(b?0:1),p=b?"after":"before",d=y?g.left:g.right}else{c||m!=l&&m!=s||m++,p=0==m?"after":m==t.text.length?"before":Nn(e,a,m-(c?1:0)).bottom+o<=i==c?"after":"before";var w=qn(e,et(n,m,p),"line",t,a);d=w.left,v=i<w.top?-1:i>=w.bottom?1:0}return Yn(n,m=ie(t.text,m,1),p,v,r-d)}function tr(e,t,n,r,i,a,o){var s=ae((function(s){var l=i[s],c=1!=l.level;return Qn(qn(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),a,o,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=qn(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Qn(u,a,o,!0)&&u.top>o&&(l=i[s-1])}return l}function nr(e,t,n,r,i,a,o){var s=Zn(e,t,r,o),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,f=null,d=0;d<i.length;d++){var p=i[d];if(!(p.from>=c||p.to<=l)){var h=Nn(e,r,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,g=h<a?a-h+1e9:h-a;(!u||f>g)&&(u=p,f=g)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Pn){Pn=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Pn.appendChild(document.createTextNode("x")),Pn.appendChild(O("br"));Pn.appendChild(document.createTextNode("x"))}T(e.measure,Pn);var n=Pn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),A(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ar(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:or(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(Bt(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return n?a+(Math.ceil(i.text.length/r)||1)*t:a+t}}function lr(e){var t=e.doc,n=sr(e);t.iter((function(e){var t=n(e);t!=e.height&&Ye(e,t)}))}function cr(e,t,n,r){var i=e.display;if(!n&&"true"==xe(t).getAttribute("cm-not-content"))return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch(e){return null}var l,c=Vn(e,a,o);if(r&&c.xRel>0&&(l=Ke(e.doc,c.line).text).length==c.ch){var u=H(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((a-Cn(e.display).left)/ir(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function fr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)kt&&Ft(e.doc,t)<i.viewTo&&pr(e);else if(n<=i.viewFrom)kt&&jt(e.doc,n+r)>i.viewFrom?pr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)pr(e);else if(t<=i.viewFrom){var a=hr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):pr(e)}else if(n>=i.viewTo){var o=hr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):pr(e)}else{var s=hr(e,t,t,-1),l=hr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(an(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):pr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function dr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var a=r.view[ur(e,t)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==j(o,n)&&o.push(n)}}}function pr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function hr(e,t,n,r){var i,a=ur(e,t),o=e.display.view;if(!kt||n==e.doc.first+e.doc.size)return{index:a,lineN:n};for(var s=e.display.viewFrom,l=0;l<a;l++)s+=o[l].size;if(s!=t){if(r>0){if(a==o.length-1)return null;i=s+o[a].size-t,a++}else i=s-t;t+=i,n+=i}for(;Ft(e.doc,n)!=n;){if(a==(r<0?0:o.length-1))return null;n+=r*o[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function gr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function mr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),a=r.selection=document.createDocumentFragment(),o=0;o<n.sel.ranges.length;o++)if(t||o!=n.sel.primIndex){var s=n.sel.ranges[o];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&yr(e,s.head,i),l||wr(e,s,a)}}return r}function yr(e,t,n){var r=qn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(O("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var a=n.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function br(e,t){return e.top-t.top||e.left-t.left}function wr(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),o=Cn(e.display),s=o.left,l=Math.max(r.sizerWidth,An(e)-r.sizer.offsetLeft)-o.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n                             height: "+(r-t)+"px"))}function f(t,n,r){var a,o,f=Ke(i,t),d=f.text.length;function p(n,r){return Kn(e,et(t,n),"div",f,r)}function h(t,n,r){var i=Jn(e,f,null,t),a="ltr"==n==("after"==r)?"left":"right";return p("after"==r?i.begin:i.end-(/\s/.test(f.text.charAt(i.end-1))?2:1),a)[a]}var g=ce(f,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<n&&o.to>t||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),1==o.level?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}(g,n||0,null==r?d:r,(function(e,t,i,f){var m="ltr"==i,v=p(e,m?"left":"right"),y=p(t-1,m?"right":"left"),b=null==n&&0==e,w=null==r&&t==d,_=0==f,k=!g||f==g.length-1;if(y.top-v.top<=3){var x=(c?w:b)&&k,S=(c?b:w)&&_?s:(m?v:y).left,C=x?l:(m?y:v).right;u(S,v.top,C-S,v.bottom)}else{var E,A,T,O;m?(E=c&&b&&_?s:v.left,A=c?l:h(e,i,"before"),T=c?s:h(t,i,"after"),O=c&&w&&k?l:y.right):(E=c?h(e,i,"before"):s,A=!c&&b&&_?l:v.right,T=!c&&w&&k?s:y.left,O=c?h(t,i,"after"):l),u(E,v.top,A-E,v.bottom),v.bottom<y.top&&u(s,v.bottom,null,y.top),u(T,y.top,O-T,y.bottom)}(!a||br(v,a)<0)&&(a=v),br(y,a)<0&&(a=y),(!o||br(v,o)<0)&&(o=v),br(y,o)<0&&(o=y)})),{start:a,end:o}}var d=t.from(),p=t.to();if(d.line==p.line)f(d.line,d.ch,p.ch);else{var h=Ke(i,d.line),g=Ke(i,p.line),m=Ht(h)==Ht(g),v=f(d.line,d.ch,m?h.text.length+1:null).end,y=f(p.line,m?0:null,p.ch).start;m&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(s,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(s,v.bottom,null,y.top)}n.appendChild(a)}function _r(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Cr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function kr(e){e.state.focused||(e.display.input.focus(),Sr(e))}function xr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Cr(e))}),100)}function Sr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,N(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),_r(e))}function Cr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Er(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],a=e.options.lineWrapping,l=void 0,c=0;if(!i.hidden){if(o&&s<8){var u=i.node.offsetTop+i.node.offsetHeight;l=u-n,n=u}else{var f=i.node.getBoundingClientRect();l=f.bottom-f.top,!a&&i.text.firstChild&&(c=i.text.firstChild.getBoundingClientRect().right-f.left-1)}var d=i.line.height-l;if((d>.005||d<-.005)&&(Ye(i.line,l),Ar(i.line),i.rest))for(var p=0;p<i.rest.length;p++)Ar(i.rest[p]);if(c>e.display.sizerWidth){var h=Math.ceil(c/ir(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Ar(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Tr(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-xn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,a=Ze(t,r),o=Ze(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<a?(a=s,o=Ze(t,Wt(Ke(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=o&&(a=Ze(t,Wt(Ke(t,l))-e.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function Or(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,a=Tn(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+Sn(n),l=t.top<r,c=t.bottom>s-r;if(t.top<i)o.scrollTop=l?0:t.top;else if(t.bottom>i+a){var u=Math.min(t.top,(c?s:t.bottom)-a);u!=i&&(o.scrollTop=u)}var f=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-f,p=An(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?o.scrollLeft=0:t.left<d?o.scrollLeft=Math.max(0,t.left+f-(h?0:10)):t.right>p+d-3&&(o.scrollLeft=t.right+(h?0:10)-p),o}function Lr(e,t){null!=t&&(Nr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mr(e){Nr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Rr(e,t,n){null==t&&null==n||Nr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Nr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Pr(e,Xn(e,t.from),Xn(e,t.to),t.margin))}function Pr(e,t,n,r){var i=Or(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Rr(e,i.scrollLeft,i.scrollTop)}function $r(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),Ir(e,t,!0),n&&li(e),ri(e,100))}function Ir(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Dr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,fi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Hr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Sn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+En(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Fr=function(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),fe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),fe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Fr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},Fr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Fr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var jr=function(){};function Br(e,t){t||(t=Hr(e));var n=e.display.barWidth,r=e.display.barHeight;zr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Er(e),zr(e,Hr(e)),n=e.display.barWidth,r=e.display.barHeight}function zr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}jr.prototype.update=function(){return{bottom:0,right:0}},jr.prototype.setScrollLeft=function(){},jr.prototype.setScrollTop=function(){},jr.prototype.clear=function(){};var Wr={native:Fr,null:jr};function Ur(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Wr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Dr(e,t):$r(e,t)}),e),e.display.scrollbars.addClass&&N(e.display.wrapper,e.display.scrollbars.addClass)}var Gr=0;function Kr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Gr},t=e.curOp,on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}function qr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{on=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Xr(t[n]);for(var r=0;r<t.length;r++)Yr(t[r]);for(var i=0;i<t.length;i++)Vr(t[i]);for(var a=0;a<t.length;a++)Zr(t[a]);for(var o=0;o<t.length;o++)Jr(t[o])}(e)}))}function Xr(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=En(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=En(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Gt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ai(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Yr(e){e.updatedDisplay=e.mustUpdate&&oi(e.cm,e.update)}function Vr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Er(t),e.barMeasure=Hr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ln(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+En(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-An(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Zr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Dr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==R();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Br(t,e.barMeasure),e.updatedDisplay&&ui(t,e.barMeasure),e.selectionChanged&&_r(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&kr(e.cm)}function Jr(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&si(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Ir(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Dr(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!ge(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var a=O("div","​",null,"position: absolute;\n                         top: "+(t.top-n.viewOffset-xn(e.display))+"px;\n                         height: "+(t.bottom-t.top+En(e)+n.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=qn(e,t),l=n&&n!=t?qn(e,n):s,c=Or(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=c.scrollTop&&($r(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Dr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(o=!0)),!o)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var o=0;o<i.length;++o)i[o].lines.length||he(i[o],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&he(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&he(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qr(e,t){if(e.curOp)return t();Kr(e);try{return t()}finally{qr(e)}}function ei(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Kr(e);try{return t.apply(e,arguments)}finally{qr(e)}}}function ti(e){return function(){if(this.curOp)return e.apply(this,arguments);Kr(this);try{return e.apply(this,arguments)}finally{qr(this)}}}function ni(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Kr(t);try{return e.apply(this,arguments)}finally{qr(t)}}}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,I(ii,e))}function ii(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=pt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(a){if(r.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?ze(t.mode,r.state):null,l=ft(e,a,r,!0);s&&(r.state=s),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var f=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!f&&d<o.length;++d)f=o[d]!=a.styles[d];f&&i.push(r.line),a.stateAfter=r.save(),r.nextLine()}else a.text.length<=e.options.maxHighlightLength&&ht(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Qr(e,(function(){for(var t=0;t<i.length;t++)dr(e,i[t],"text")}))}}var ai=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Tr(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=An(e),this.force=n,this.dims=ar(e),this.events=[]};function oi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return pr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==gr(e))return!1;di(e)&&(pr(e),t.dims=ar(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(r.first,n.viewFrom)),n.viewTo>o&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),kt&&(a=Ft(e.doc,a),o=jt(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=an(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=an(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(ur(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(an(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,a,o),n.viewOffset=Wt(Ke(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=gr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=R();if(!t||!M(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&M(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,f=0;f<c.length;f++){var d=c[f];if(d.hidden);else if(d.node&&d.node.parentNode==a){for(;o!=d.node;)o=s(o);var p=i&&null!=t&&t<=u&&d.lineNumber;d.changes&&(j(d.changes,"gutter")>-1&&(p=!1),un(e,d,u,n)),p&&(A(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Qe(e.options,u)))),o=d.node.nextSibling}else{var h=vn(e,d,u,n);a.insertBefore(h,o)}u+=d.size}for(;o;)o=s(o)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=R()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&M(document.body,e.anchorNode)&&M(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),A(n.cursorDiv),A(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=An(e))r&&(t.visible=Tr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Sn(e.display)-Tn(e),n.top)}),t.visible=Tr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!oi(e,t))break;Er(e);var i=Hr(e);mr(e),Br(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new ai(e,t);if(oi(e,n)){Er(e),si(e,n);var r=Hr(e);mr(e),Br(e,r),ui(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+En(e)+"px"}function fi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=or(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",o=0;o<n.length;o++)if(!n[o].hidden){e.options.fixedGutter&&(n[o].gutter&&(n[o].gutter.style.left=a),n[o].gutterBackground&&(n[o].gutterBackground.style.left=a));var s=n[o].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function di(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Qe(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(O("div",[O("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(a,r.lineGutter.offsetWidth-o)+1,r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ci(e.display),!0}return!1}function pi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var a=e[i],o=null;if("string"!=typeof a&&(o=a.style,a=a.className),"CodeMirror-linenumbers"==a){if(!t)continue;r=!0}n.push({className:a,style:o})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function hi(e){var t=e.gutters,n=e.gutterSpecs;A(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],a=i.className,o=i.style,s=t.appendChild(O("div",null,"CodeMirror-gutter "+a));o&&(s.style.cssText=o),"CodeMirror-linenumbers"==a&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ci(e)}function gi(e){hi(e.display),fr(e),fi(e)}function mi(e,t,r,i){var a=this;this.input=r,a.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),a.scrollbarFiller.setAttribute("cm-not-content","true"),a.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),a.gutterFiller.setAttribute("cm-not-content","true"),a.lineDiv=L("div",null,"CodeMirror-code"),a.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),a.cursorDiv=O("div",null,"CodeMirror-cursors"),a.measure=O("div",null,"CodeMirror-measure"),a.lineMeasure=O("div",null,"CodeMirror-measure"),a.lineSpace=L("div",[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,"position: relative; outline: none");var c=L("div",[a.lineSpace],"CodeMirror-lines");a.mover=O("div",[c],null,"position: relative"),a.sizer=O("div",[a.mover],"CodeMirror-sizer"),a.sizerWidth=null,a.heightForcer=O("div",null,null,"position: absolute; height: 50px; width: 1px;"),a.gutters=O("div",null,"CodeMirror-gutters"),a.lineGutter=null,a.scroller=O("div",[a.sizer,a.heightForcer,a.gutters],"CodeMirror-scroll"),a.scroller.setAttribute("tabIndex","-1"),a.wrapper=O("div",[a.scrollbarFiller,a.gutterFiller,a.scroller],"CodeMirror"),o&&s<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),l||n&&v||(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=pi(i.gutters,i.lineNumbers),hi(a),r.init(a)}ai.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},ai.prototype.finish=function(){for(var e=0;e<this.events.length;e++)he.apply(null,this.events[e])};var vi=0,yi=null;function bi(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function wi(e){var t=bi(e);return t.x*=yi,t.y*=yi,t}function _i(e,t){var r=bi(t),i=r.x,a=r.y,o=e.display,s=o.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||a&&u){if(a&&y&&l)e:for(var d=t.target,p=o.view;d!=s;d=d.parentNode)for(var h=0;h<p.length;h++)if(p[h].node==d){e.display.currentWheelTarget=d;break e}if(i&&!n&&!f&&null!=yi)return a&&u&&$r(e,Math.max(0,s.scrollTop+a*yi)),Dr(e,Math.max(0,s.scrollLeft+i*yi)),(!a||a&&u)&&be(t),void(o.wheelStartX=null);if(a&&null!=yi){var g=a*yi,m=e.doc.scrollTop,v=m+o.wrapper.clientHeight;g<0?m=Math.max(0,m+g-50):v=Math.min(e.doc.height,v+g+50),li(e,{top:m,bottom:v})}vi<20&&(null==o.wheelStartX?(o.wheelStartX=s.scrollLeft,o.wheelStartY=s.scrollTop,o.wheelDX=i,o.wheelDY=a,setTimeout((function(){if(null!=o.wheelStartX){var e=s.scrollLeft-o.wheelStartX,t=s.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(yi=(yi*vi+n)/(vi+1),++vi)}}),200)):(o.wheelDX+=i,o.wheelDY+=a))}}o?yi=-.53:n?yi=15:u?yi=-.7:d&&(yi=-1/3);var ki=function(e,t){this.ranges=e,this.primIndex=t};ki.prototype.primary=function(){return this.ranges[this.primIndex]},ki.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!nt(n.anchor,r.anchor)||!nt(n.head,r.head))return!1}return!0},ki.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new xi(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new ki(e,this.primIndex)},ki.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ki.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(tt(t,r.from())>=0&&tt(e,r.to())<=0)return n}return-1};var xi=function(e,t){this.anchor=e,this.head=t};function Si(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=j(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],l=tt(s.to(),o.from());if(r&&!o.empty()?l>0:l>=0){var c=at(s.from(),o.from()),u=it(s.to(),o.to()),f=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new xi(f?u:c,f?c:u))}}return new ki(t,n)}function Ci(e,t){return new ki([new xi(e,t||e)],0)}function Ei(e){return e.text?et(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ai(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Ei(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ei(t).ch-t.to.ch),et(n,r)}function Ti(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new xi(Ai(i.anchor,t),Ai(i.head,t)))}return Si(e.cm,n,e.sel.primIndex)}function Oi(e,t,n){return e.line==t.line?et(n.line,e.ch-t.ch+n.ch):et(n.line+(e.line-t.line),e.ch)}function Li(e){e.doc.mode=Fe(e.options,e.doc.modeOption),Mi(e)}function Mi(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ri(e,100),e.state.modeGen++,e.curOp&&fr(e)}function Ri(e,t){return 0==t.from.ch&&0==t.to.ch&&""==X(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ni(e,t,n,r){function i(e){return n?n[e]:null}function a(e,n,i){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Tt(e),Ot(e,n);var i=r?r(e):1;i!=e.height&&Ye(e,i)}(e,n,i,r),ln(e,"change",e,t)}function o(e,t){for(var n=[],a=e;a<t;++a)n.push(new Kt(c[a],i(a),r));return n}var s=t.from,l=t.to,c=t.text,u=Ke(e,s.line),f=Ke(e,l.line),d=X(c),p=i(c.length-1),h=l.line-s.line;if(t.full)e.insert(0,o(0,c.length)),e.remove(c.length,e.size-c.length);else if(Ri(e,t)){var g=o(0,c.length-1);a(f,f.text,p),h&&e.remove(s.line,h),g.length&&e.insert(s.line,g)}else if(u==f)if(1==c.length)a(u,u.text.slice(0,s.ch)+d+u.text.slice(l.ch),p);else{var m=o(1,c.length-1);m.push(new Kt(d+u.text.slice(l.ch),p,r)),a(u,u.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,m)}else if(1==c.length)a(u,u.text.slice(0,s.ch)+c[0]+f.text.slice(l.ch),i(0)),e.remove(s.line+1,h);else{a(u,u.text.slice(0,s.ch)+c[0],i(0)),a(f,d+f.text.slice(l.ch),p);var v=o(1,c.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Pi(e,t,n){!function e(r,i,a){if(r.linked)for(var o=0;o<r.linked.length;++o){var s=r.linked[o];if(s.doc!=i){var l=a&&s.sharedHist;n&&!l||(t(s.doc,l),e(s.doc,r,l))}}}(e,null,!0)}function $i(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,lr(e),Li(e),Ii(e),e.options.lineWrapping||Gt(e),e.options.mode=t.modeOption,fr(e)}function Ii(e){("rtl"==e.doc.direction?N:E)(e.display.lineDiv,"CodeMirror-rtl")}function Di(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Hi(e,t){var n={from:rt(t.from),to:Ei(t),text:qe(e,t.from,t.to)};return Wi(e,n,t.from.line,t.to.line+1),Pi(e,(function(e){return Wi(e,n,t.from.line,t.to.line+1)}),!0),n}function Fi(e){for(;e.length&&X(e).ranges;)e.pop()}function ji(e,t,n,r){var i=e.history;i.undone.length=0;var a,o,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(a=function(e,t){return t?(Fi(e.done),X(e.done)):e.done.length&&!X(e.done).ranges?X(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),X(e.done)):void 0}(i,i.lastOp==r)))o=X(a.changes),0==tt(t.from,t.to)&&0==tt(t.from,o.to)?o.to=Ei(t):a.changes.push(Hi(e,t));else{var l=X(i.done);for(l&&l.ranges||zi(e.sel,i.done),a={changes:[Hi(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||he(e,"historyAdded")}function Bi(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,a,X(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&!1!==r.clearRedo&&Fi(i.undone)}function zi(e,t){var n=X(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Wi(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=n.markedSpans),++a}))}function Ui(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Gi(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Ui(n[i]));return r}(e,t),r=Et(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var a=n[i],o=r[i];if(a&&o)e:for(var s=0;s<o.length;++s){for(var l=o[s],c=0;c<a.length;++c)if(a[c].marker==l.marker)continue e;a.push(l)}else o&&(n[i]=o)}return n}function Ki(e,t,n){for(var r=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges)r.push(n?ki.prototype.deepCopy.call(a):a);else{var o=a.changes,s=[];r.push({changes:s});for(var l=0;l<o.length;++l){var c=o[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&j(t,Number(u[1]))>-1&&(X(s)[f]=c[f],delete c[f])}}}return r}function qi(e,t,n,r){if(r){var i=e.anchor;if(n){var a=tt(t,i)<0;a!=tt(n,i)<0?(i=t,t=n):a!=tt(t,n)<0&&(t=n)}return new xi(i,t)}return new xi(n||t,t)}function Xi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Qi(e,new ki([qi(e.sel.primary(),t,n,i)],0),r)}function Yi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)r[a]=qi(e.sel.ranges[a],t[a],null,i);Qi(e,Si(e.cm,r,e.sel.primIndex),n)}function Vi(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Qi(e,Si(e.cm,i,e.sel.primIndex),r)}function Zi(e,t,n,r){Qi(e,Ci(t,n),r)}function Ji(e,t,n){var r=e.history.done,i=X(r);i&&i.ranges?(r[r.length-1]=t,ea(e,t,n)):Qi(e,t,n)}function Qi(e,t,n){ea(e,t,n),Bi(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ea(e,t,n){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new xi(st(e,t[n].anchor),st(e,t[n].head))},origin:n&&n.origin};return he(e,"beforeSelectionChange",e,r),e.cm&&he(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Si(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);ta(e,ra(e,t,r,!0)),n&&!1===n.scroll||!e.cm||Mr(e.cm)}function ta(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,me(e.cm)),ln(e,"cursorActivity",e))}function na(e){ta(e,ra(e,e.sel,null,!1))}function ra(e,t,n,r){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],l=aa(e,o.anchor,s&&s.anchor,n,r),c=aa(e,o.head,s&&s.head,n,r);(i||l!=o.anchor||c!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new xi(l,c))}return i?Si(e.cm,i,t.primIndex):t}function ia(e,t,n,r,i){var a=Ke(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var s=a.markedSpans[o],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(he(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(n){var f=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(f=oa(e,f,-r,f&&f.line==t.line?a:null)),f&&f.line==t.line&&(d=tt(f,n))&&(r<0?d<0:d>0))return ia(e,f,t,r,i)}var p=l.find(r<0?-1:1);return(r<0?c:u)&&(p=oa(e,p,r,p.line==t.line?a:null)),p?ia(e,p,t,r,i):null}}return t}function aa(e,t,n,r,i){var a=r||1,o=ia(e,t,n,a,i)||!i&&ia(e,t,n,a,!0)||ia(e,t,n,-a,i)||!i&&ia(e,t,n,-a,!0);return o||(e.cantEdit=!0,et(e.first,0))}function oa(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ke(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+n)}function sa(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),z)}function la(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,a){t&&(r.from=st(e,t)),n&&(r.to=st(e,n)),i&&(r.text=i),void 0!==a&&(r.origin=a)}),he(e,"beforeChange",e,r),e.cm&&he(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function ca(e,t,n){if(e.cm){if(!e.cm.curOp)return ei(e.cm,ca)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=la(e,t,!0))){var r=_t&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=j(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],a=0;a<r.length;++a)for(var o=r[a],s=o.find(0),l=0;l<i.length;++l){var c=i[l];if(!(tt(c.to,s.from)<0||tt(c.from,s.to)>0)){var u=[l,1],f=tt(c.from,s.from),d=tt(c.to,s.to);(f<0||!o.inclusiveLeft&&!f)&&u.push({from:c.from,to:s.from}),(d>0||!o.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ua(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else ua(e,t)}}function ua(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Ti(e,t);ji(e,t,n,e.cm?e.cm.curOp.id:NaN),pa(e,t,n,Et(e,t));var r=[];Pi(e,(function(e,n){n||-1!=j(r,e.history)||(va(e.history,t),r.push(e.history)),pa(e,t,null,Et(e,t))}))}}function fa(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,a=e.history,o=e.sel,s="undo"==t?a.done:a.undone,l="undo"==t?a.undone:a.done,c=0;c<s.length&&(i=s[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=s.length){for(a.lastOrigin=a.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(r)return void s.push(i);break}if(zi(i,l),n&&!i.equals(e.sel))return void Qi(e,i,{clearRedo:!1});o=i}var u=[];zi(o,l),l.push({changes:u,generation:a.generation}),a.generation=i.generation||++a.maxGeneration;for(var f=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),d=function(n){var r=i.changes[n];if(r.origin=t,f&&!la(e,r,!1))return s.length=0,{};u.push(Hi(e,r));var a=n?Ti(e,r):X(s);pa(e,r,a,Gi(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Ei(r)});var o=[];Pi(e,(function(e,t){t||-1!=j(o,e.history)||(va(e.history,r),o.push(e.history)),pa(e,r,null,Gi(e,r))}))},p=i.changes.length-1;p>=0;--p){var h=d(p);if(h)return h.v}}}}function da(e,t){if(0!=t&&(e.first+=t,e.sel=new ki(Y(e.sel.ranges,(function(e){return new xi(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){fr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)dr(e.cm,r,"gutter")}}function pa(e,t,n,r){if(e.cm&&!e.cm.curOp)return ei(e.cm,pa)(e,t,n,r);if(t.to.line<e.first)da(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);da(e,i),t={from:et(e.first,0),to:et(t.to.line+i,t.to.ch),text:[X(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:et(a,Ke(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=qe(e,t.from,t.to),n||(n=Ti(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,s=!1,l=a.line;e.options.lineWrapping||(l=Ve(Ht(Ke(r,a.line))),r.iter(l,o.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&me(e),Ni(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,a.line+t.text.length,(function(e){var t=Ut(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=Ke(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,a.line),ri(e,400);var c=t.text.length-(o.line-a.line)-1;t.full?fr(e):a.line!=o.line||1!=t.text.length||Ri(e.doc,t)?fr(e,a.line,o.line+1,c):dr(e,a.line,"text");var u=ve(e,"changes"),f=ve(e,"change");if(f||u){var d={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};f&&ln(e,"change",e,d),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}(e.cm,t,r):Ni(e,t,r),ea(e,n,z),e.cantEdit&&aa(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function ha(e,t,n,r,i){var a;r||(r=n),tt(r,n)<0&&(n=(a=[r,n])[0],r=a[1]),"string"==typeof t&&(t=e.splitLines(t)),ca(e,{from:n,to:r,text:t,origin:i})}function ga(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function ma(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||((a=e[i]=a.deepCopy()).copied=!0);for(var s=0;s<a.ranges.length;s++)ga(a.ranges[s].anchor,t,n,r),ga(a.ranges[s].head,t,n,r)}else{for(var l=0;l<a.changes.length;++l){var c=a.changes[l];if(n<c.from.line)c.from=et(c.from.line+r,c.from.ch),c.to=et(c.to.line+r,c.to.ch);else if(t<=c.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}}function va(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;ma(e.done,n,r,i),ma(e.undone,n,r,i)}function ya(e,t,n,r){var i=t,a=t;return"number"==typeof t?a=Ke(e,ot(e,t)):i=Ve(t),null==i?null:(r(a,i)&&e.cm&&dr(e.cm,i,n),a)}function ba(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function wa(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}xi.prototype.from=function(){return at(this.anchor,this.head)},xi.prototype.to=function(){return it(this.anchor,this.head)},xi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ba.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,qt(i),ln(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},wa.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var a=Math.min(t,i-e),o=r.height;if(r.removeInner(e,a),this.height-=o-r.height,i==a&&(this.children.splice(n--,1),r.parent=null),0==(t-=a))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ba))){var s=[];this.collapse(s),this.children=[new ba(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,s=o;s<i.lines.length;){var l=new ba(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new wa(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=j(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new wa(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,n))return!0;if(0==(t-=o))break;e=0}else e-=a}}};var _a=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function ka(e,t,n){Wt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Lr(e,n)}_a.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ve(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var a=_n(this);Ye(n,Math.max(0,n.height-a)),e&&(Qr(e,(function(){ka(e,n,-a),dr(e,r,"widget")})),ln(e,"lineWidgetCleared",e,this,r))}},_a.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=_n(this)-t;i&&(Bt(this.doc,r)||Ye(r,r.height+i),n&&Qr(n,(function(){n.curOp.forceUpdate=!0,ka(n,r,i),ln(n,"lineWidgetChanged",n,e,Ve(r))})))},ye(_a);var xa=0,Sa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++xa};function Ca(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=D(r)).shared=!1;var a=[Ca(e,t,n,r,i)],o=a[0],s=r.widgetNode;return Pi(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),a.push(Ca(e,st(e,t),st(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;o=X(a)})),new Ea(a,o)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return ei(e.cm,Ca)(e,t,n,r,i);var a=new Sa(e,i),o=tt(t,n);if(r&&D(r,a,!1),o>0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=L("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Dt(e,t.line,t,n,a)||t.line!=n.line&&Dt(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");kt=!0}a.addToHistory&&ji(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&a.collapsed&&!c.options.lineWrapping&&Ht(e)==c.display.maxLine&&(s=!0),a.collapsed&&l!=t.line&&Ye(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new xt(a,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),a.collapsed&&e.iter(t.line,n.line+1,(function(t){Bt(e,t)&&Ye(t,0)})),a.clearOnEnter&&fe(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(_t=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++xa,a.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),a.collapsed)fr(c,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=t.line;u<=n.line;u++)dr(c,u,"text");a.atomic&&na(c.doc),ln(c,"markerAdded",c,a)}return a}Sa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kr(e),ve(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],s=St(o.markedSpans,this);e&&!this.collapsed?dr(e,Ve(o),"text"):e&&(null!=s.to&&(i=Ve(o)),null!=s.from&&(r=Ve(o))),o.markedSpans=Ct(o.markedSpans,s),null==s.from&&this.collapsed&&!Bt(this.doc,o)&&e&&Ye(o,rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Ht(this.lines[l]),u=Ut(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&fr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&na(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&qr(e),this.parent&&this.parent.clear()}},Sa.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var a=this.lines[i],o=St(a.markedSpans,this);if(null!=o.from&&(n=et(t?a:Ve(a),o.from),-1==e))return n;if(null!=o.to&&(r=et(t?a:Ve(a),o.to),1==e))return r}return n&&{from:n,to:r}},Sa.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Qr(r,(function(){var i=t.line,a=Ve(t.line),o=Mn(r,a);if(o&&(Hn(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Bt(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var l=_n(n)-s;l&&Ye(i,i.height+l)}ln(r,"markerChanged",r,e)}))},Sa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=j(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Sa.prototype.detachLine=function(e){if(this.lines.splice(j(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ye(Sa);var Ea=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Aa(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function Ta(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Pi(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var a=n.markers[i];-1==j(r,a.doc)&&(a.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}Ea.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ln(this,"clear")}},Ea.prototype.find=function(e,t){return this.primary.find(e,t)},ye(Ea);var Oa=0,La=function(e,t,n,r,i){if(!(this instanceof La))return new La(e,t,n,r,i);null==n&&(n=0),wa.call(this,[new ba([new Kt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var a=et(n,0);this.sel=Ci(a),this.history=new Di(null),this.id=++Oa,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ni(this,{from:a,to:a,text:e}),Qi(this,Ci(a),z)};La.prototype=Z(wa.prototype,{constructor:La,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Xe(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:ni((function(e){var t=et(this.first,0),n=this.first+this.size-1;ca(this,{from:t,to:et(n,Ke(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Rr(this.cm,0,0),Qi(this,Ci(t),z)})),replaceRange:function(e,t,n,r){ha(this,e,t=st(this,t),n=n?st(this,n):t,r)},getRange:function(e,t,n){var r=qe(this,st(this,e),st(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Je(this,e))return Ke(this,e)},getLineNumber:function(e){return Ve(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ke(this,e)),Ht(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ni((function(e,t,n){Zi(this,st(this,"number"==typeof e?et(e,t||0):e),null,n)})),setSelection:ni((function(e,t,n){Zi(this,st(this,e),st(this,t||e),n)})),extendSelection:ni((function(e,t,n){Xi(this,st(this,e),t&&st(this,t),n)})),extendSelections:ni((function(e,t){Yi(this,lt(this,e),t)})),extendSelectionsBy:ni((function(e,t){Yi(this,lt(this,Y(this.sel.ranges,e)),t)})),setSelections:ni((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new xi(st(this,e[i].anchor),st(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Qi(this,Si(this.cm,r,t),n)}})),addSelection:ni((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new xi(st(this,e),st(this,t||e))),Qi(this,Si(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=qe(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=qe(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:ni((function(e,t,n){for(var r=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];r[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:n}}for(var s=t&&"end"!=t&&function(e,t,n){for(var r=[],i=et(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],l=Oi(s.from,i,a),c=Oi(Ei(s),i,a);if(i=s.to,a=c,"around"==n){var u=e.sel.ranges[o],f=tt(u.head,u.anchor)<0;r[o]=new xi(f?c:l,f?l:c)}else r[o]=new xi(l,l)}return new ki(r,e.sel.primIndex)}(this,r,t),l=r.length-1;l>=0;l--)ca(this,r[l]);s?Ji(this,s):this.cm&&Mr(this.cm)})),undo:ni((function(){fa(this,"undo")})),redo:ni((function(){fa(this,"redo")})),undoSelection:ni((function(){fa(this,"undo",!0)})),redoSelection:ni((function(){fa(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Di(this.history.maxGeneration),Pi(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ki(this.history.done),undone:Ki(this.history.undone)}},setHistory:function(e){var t=this.history=new Di(this.history.maxGeneration);t.done=Ki(e.done.slice(0),null,!0),t.undone=Ki(e.undone.slice(0),null,!0)},setGutterMarker:ni((function(e,t,n){return ya(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&te(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:ni((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&ya(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,te(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Je(this,e))return null;if(t=e,!(e=Ke(this,e)))return null}else if(null==(t=Ve(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:ni((function(e,t,n){return ya(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(S(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:ni((function(e,t,n){return ya(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var a=i.match(S(n));if(!a)return!1;var o=a.index+a[0].length;e[r]=i.slice(0,a.index)+(a.index&&o!=i.length?" ":"")+i.slice(o)||null}return!0}))})),addLineWidget:ni((function(e,t,n){return function(e,t,n,r){var i=new _a(e,n,r),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),ya(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,a&&!Bt(e,t)){var r=Wt(t)<e.scrollTop;Ye(t,t.height+_n(i)),r&&Lr(a,i.height),a.curOp.forceUpdate=!0}return!0})),a&&ln(a,"lineWidgetAdded",a,i,"number"==typeof t?t:Ve(t)),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Ca(this,st(this,e),st(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Ca(this,e=st(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ke(this,(e=st(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(a){var o=a.markedSpans;if(o)for(var s=0;s<o.length;s++){var l=o[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var a=i.text.length+r;if(a>e)return t=e,!0;e-=a,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new La(Xe(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new La(Xe(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(tt(a,o)){var s=Ca(e,a,o,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,Aa(this)),r},unlinkDoc:function(e){if(e instanceof Ao&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ta(Aa(this));break}if(e.history==this.history){var n=[e.id];Pi(e,(function(e){return n.push(e.id)}),!0),e.history=new Di(null),e.history.done=Ki(this.history.done,n),e.history.undone=Ki(this.history.undone,n)}},iterLinkedDocs:function(e){Pi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Me(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ni((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Qr(t=this.cm,(function(){Ii(t),fr(t)})))}))}),La.prototype.eachLine=La.prototype.iter;var Ma=0;function Ra(e){var t=this;if(Na(t),!ge(t,e)&&!kn(t.display,e)){be(e),o&&(Ma=+new Date);var n=cr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),s=0,l=function(){++s==i&&ei(t,(function(){var e={from:n=st(t.doc,n),to:n,text:t.doc.splitLines(a.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};ca(t.doc,e),Ji(t.doc,Ci(st(t.doc,n),st(t.doc,Ei(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==j(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(a[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),ea(t.doc,Ci(n,n)),d)for(var p=0;p<d.length;++p)ha(t.doc,"",d[p].anchor,d[p].head,"drag");t.replaceSelection(f,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Na(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Pa(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var $a=!1;function Ia(){var e;$a||(fe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Pa(Da)}),100))})),fe(window,"blur",(function(){return Pa(Cr)})),$a=!0)}function Da(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ha={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Fa=0;Fa<10;Fa++)Ha[Fa+48]=Ha[Fa+96]=String(Fa);for(var ja=65;ja<=90;ja++)Ha[ja]=String.fromCharCode(ja);for(var Ba=1;Ba<=12;Ba++)Ha[Ba+111]=Ha[Ba+63235]="F"+Ba;var za={};function Wa(e){var t,n,r,i,a=e.split(/-(?!$)/);e=a[a.length-1];for(var o=0;o<a.length-1;o++){var s=a[o];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ua(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Y(n.split(" "),Wa),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(" "),o=r):(s=i.slice(0,a+1).join(" "),o="...");var l=t[s];if(l){if(l!=o)throw new Error("Inconsistent bindings for "+s)}else t[s]=o}delete e[n]}for(var c in t)e[c]=t[c];return e}function Ga(e,t,n,r){var i=(t=Ya(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ga(e,t.fallthrough,n,r);for(var a=0;a<t.fallthrough.length;a++){var o=Ga(e,t.fallthrough[a],n,r);if(o)return o}}}function Ka(e){var t="string"==typeof e?e:Ha[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function qa(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(k?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(k?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Xa(e,t){if(f&&34==e.keyCode&&e.char)return!1;var n=Ha[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),qa(n,e,t))}function Ya(e){return"string"==typeof e?za[e]:e}function Va(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var a=t(n[i]);r.length&&tt(a.from,X(r).to)<=0;){var o=r.pop();if(tt(o.from,a.from)<0){a.from=o.from;break}}r.push(a)}Qr(e,(function(){for(var t=r.length-1;t>=0;t--)ha(e.doc,"",r[t].from,r[t].to,"+delete");Mr(e)}))}function Za(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ja(e,t,n){var r=Za(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function Qa(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var a=ce(n,t.doc.direction);if(a){var o,s=i<0?X(a):a[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Rn(t,n);o=i<0?n.text.length-1:0;var u=Nn(t,c,o).top;o=ae((function(e){return Nn(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,o),"before"==l&&(o=Za(n,o,1))}else o=i<0?s.to:s.from;return new et(r,o,l)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}za.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},za.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},za.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},za.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},za.default=y?za.macDefault:za.pcDefault;var eo={selectAll:sa,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return Va(e,(function(t){if(t.empty()){var n=Ke(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Va(e,(function(t){return{from:et(t.from().line,0),to:st(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return Va(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Va(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Va(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return to(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return no(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Ke(e.doc,t),r=function(e){for(var t;t=$t(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=Ve(r)),Qa(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),U)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),U)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?no(e,t.head):r}),U)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var a=n[i].from(),o=H(e.getLine(a.line),a.ch,r);t.push(q(r-o%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Qr(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,a=Ke(e.doc,i.line).text;if(a)if(i.ch==a.length&&(i=new et(i.line,i.ch-1)),i.ch>0)i=new et(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Ke(e.doc,i.line-1).text;o&&(i=new et(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),et(i.line-1,o.length-1),i,"+transpose"))}n.push(new xi(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Qr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Mr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function to(e,t){var n=Ke(e.doc,t),r=Ht(n);return r!=n&&(t=Ve(r)),Qa(!0,e,r,t,1)}function no(e,t){var n=to(e,t.line),r=Ke(e.doc,n.line),i=ce(r,e.doc.direction);if(!i||0==i[0].level){var a=Math.max(n.ch,r.text.search(/\S/)),o=t.line==n.line&&t.ch<=a&&t.ch;return et(n.line,o?0:a,n.sticky)}return n}function ro(e,t,n){if("string"==typeof t&&!(t=eo[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=B}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var io=new F;function ao(e,t,n,r){var i=e.state.keySeq;if(i){if(Ka(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:io.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),oo(e,i+" "+t,n,r))return!0}return oo(e,t,n,r)}function oo(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Ga(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Ga(t,e.options.extraKeys,n,e)||Ga(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&ln(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(be(n),_r(e)),!!i}function so(e,t){var n=Xa(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?ao(e,"Shift-"+n,t,(function(t){return ro(e,t,!0)}))||ao(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ro(e,t)})):ao(e,n,t,(function(t){return ro(e,t)})))}var lo=null;function co(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=R(),ge(t,e)))){o&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=so(t,e);f&&(lo=i?r:null,i||88!=r||Ne||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(E(t,"CodeMirror-crosshair"),pe(document,"keyup",n),pe(document,"mouseover",n))}N(t,"CodeMirror-crosshair"),fe(document,"keyup",n),fe(document,"mouseover",n)}(t)}}function uo(e){16==e.keyCode&&(this.doc.sel.shift=!1),ge(this,e)}function fo(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||kn(t.display,e)||ge(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(f&&n==lo)return lo=null,void be(e);if(!f||e.which&&!(e.which<10)||!so(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(e,t,n){return ao(e,"'"+n+"'",t,(function(t){return ro(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var po,ho,go=function(e,t,n){this.time=e,this.pos=t,this.button=n};function mo(e){var t=this,n=t.display;if(!(ge(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,kn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!bo(t,e)){var r=cr(t,e),i=Se(e),a=r?function(e,t){var n=+new Date;return ho&&ho.compare(n,e,t)?(po=ho=null,"triple"):po&&po.compare(n,e,t)?(ho=new go(n,e,t),po=null,"double"):(po=new go(n,e,t),ho=null,"single")}(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,i){var a="Click";return"double"==r?a="Double"+a:"triple"==r&&(a="Triple"+a),ao(e,qa(a=(1==t?"Left":2==t?"Middle":"Right")+a,i),i,(function(t){if("string"==typeof t&&(t=eo[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=B}finally{e.state.suppressEdits=!1}return r}))}(t,i,r,a,e)||(1==i?r?function(e,t,n,r){o?setTimeout(I(kr,e),0):e.curOp.focus=R();var i,a=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var a=b?n.shiftKey&&n.metaKey:n.altKey;i.unit=a?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=y?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?n.altKey:n.ctrlKey)),i}(e,n,r),c=e.doc.sel;e.options.dragDrop&&Ae&&!e.isReadOnly()&&"single"==n&&(i=c.contains(t))>-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,a=!1,c=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,pe(i.wrapper.ownerDocument,"mouseup",c),pe(i.wrapper.ownerDocument,"mousemove",u),pe(i.scroller,"dragstart",f),pe(i.scroller,"drop",c),a||(be(t),r.addNew||Xi(e.doc,n,null,null,r.extend),l&&!d||o&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){a=a||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return a=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),fe(i.wrapper.ownerDocument,"mouseup",c),fe(i.wrapper.ownerDocument,"mousemove",u),fe(i.scroller,"dragstart",f),fe(i.scroller,"drop",c),xr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,a):function(e,t,n,r){var i=e.display,a=e.doc;be(t);var o,s,l=a.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=a.sel.contains(n),o=s>-1?c[s]:new xi(n,n)):(o=a.sel.primary(),s=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new xi(n,n)),n=cr(e,t,!0,!0),s=-1;else{var u=vo(e,n,r.unit);o=r.extend?qi(o,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Qi(a,Si(e,c.concat([o]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Qi(a,Si(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):Vi(a,s,o,W):(s=0,Qi(a,new ki([o],0),W),l=a.sel);var f=n;function d(t){if(0!=tt(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=H(Ke(a,n.line).text,n.ch,c),d=H(Ke(a,t.line).text,t.ch,c),p=Math.min(u,d),h=Math.max(u,d),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=Ke(a,g).text,y=G(v,p,c);p==h?i.push(new xi(et(g,y),et(g,y))):v.length>y&&i.push(new xi(et(g,y),et(g,G(v,h,c))))}i.length||i.push(new xi(n,n)),Qi(a,Si(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=o,_=vo(e,t,r.unit),k=w.anchor;tt(_.anchor,k)>0?(b=_.head,k=at(w.from(),_.anchor)):(b=_.anchor,k=it(w.to(),_.head));var x=l.ranges.slice(0);x[s]=function(e,t){var n=t.anchor,r=t.head,i=Ke(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var a=ce(i);if(!a)return t;var o=se(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=o+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==a.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(a,r.ch,r.sticky),f=u-o||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?f<0:f>0}var d=a[c+(l?-1:0)],p=l==(1==d.level),h=p?d.from:d.to,g=p?"after":"before";return n.ch==h&&n.sticky==g?t:new xi(new et(n.line,h,g),r)}(e,new xi(st(a,k),b)),Qi(a,Si(e,x,s),W)}}var p=i.wrapper.getBoundingClientRect(),h=0;function g(t){e.state.selectingText=!1,h=1/0,t&&(be(t),i.input.focus()),pe(i.wrapper.ownerDocument,"mousemove",m),pe(i.wrapper.ownerDocument,"mouseup",v),a.history.lastSelOrigin=null}var m=ei(e,(function(t){0!==t.buttons&&Se(t)?function t(n){var o=++h,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,f)){e.curOp.focus=R(),d(s);var l=Tr(i,a);(s.line>=l.to||s.line<l.from)&&setTimeout(ei(e,(function(){h==o&&t(n)})),150)}else{var c=n.clientY<p.top?-20:n.clientY>p.bottom?20:0;c&&setTimeout(ei(e,(function(){h==o&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):g(t)})),v=ei(e,g);e.state.selectingText=v,fe(i.wrapper.ownerDocument,"mousemove",m),fe(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,a)}(t,r,a,e):xe(e)==n.scroller&&be(e):2==i?(r&&Xi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(x?t.display.input.onContextMenu(e):xr(t)))}}function vo(e,t,n){if("char"==n)return new xi(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new xi(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new xi(r.from,r.to)}function yo(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!ve(e,n))return _e(t);a-=s.top-o.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=o.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return he(e,n,e,Ze(e.doc,a),e.display.gutterSpecs[l].className,t),_e(t)}}function bo(e,t){return yo(e,t,"gutterClick",!0)}function wo(e,t){kn(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&yo(e,t,"gutterContextMenu",!1)}(e,t)||ge(e,t,"contextmenu")||x||e.display.input.onContextMenu(t)}function _o(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),jn(e)}go.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var ko={toString:function(){return"CodeMirror.Init"}},xo={},So={};function Co(e,t,n){if(!t!=!(n&&n!=ko)){var r=e.display.dragFunctions,i=t?fe:pe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Eo(e){e.options.lineWrapping?(N(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),Gt(e)),lr(e),fr(e),jn(e),setTimeout((function(){return Br(e)}),100)}function Ao(e,t){var n=this;if(!(this instanceof Ao))return new Ao(e,t);this.options=t=t?D(t):{},D(xo,t,!1);var r=t.value;"string"==typeof r?r=new La(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ao.inputStyles[t.inputStyle](this),a=this.display=new mi(e,r,i,t);for(var c in a.wrapper.CodeMirror=this,_o(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ur(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new F,keySeq:null,specialChars:null},t.autofocus&&!v&&a.input.focus(),o&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;fe(t.scroller,"mousedown",ei(e,mo)),fe(t.scroller,"dblclick",o&&s<11?ei(e,(function(t){if(!ge(e,t)){var n=cr(e,t);if(n&&!bo(e,t)&&!kn(e.display,t)){be(t);var r=e.findWordAt(n);Xi(e.doc,r.anchor,r.head)}}})):function(t){return ge(e,t)||be(t)}),fe(t.scroller,"contextmenu",(function(t){return wo(e,t)})),fe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||wo(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function a(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}fe(t.scroller,"touchstart",(function(i){if(!ge(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!bo(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),fe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),fe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!kn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=e.coordsChar(t.activeTouch,"page");o=!r.prev||a(r,r.prev)?new xi(s,s):!r.prev.prev||a(r,r.prev.prev)?e.findWordAt(s):new xi(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),be(n)}i()})),fe(t.scroller,"touchcancel",i),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&($r(e,t.scroller.scrollTop),Dr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return _i(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return _i(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ge(e,t)||ke(t)},over:function(t){ge(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,r)}}(e,t),ke(t))},start:function(t){return function(e,t){if(o&&(!e.state.draggingText||+new Date-Ma<100))ke(t);else if(!ge(e,t)&&!kn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Ra),leave:function(t){ge(e,t)||Na(e)}};var l=t.input.getField();fe(l,"keyup",(function(t){return uo.call(e,t)})),fe(l,"keydown",ei(e,co)),fe(l,"keypress",ei(e,fo)),fe(l,"focus",(function(t){return Sr(e,t)})),fe(l,"blur",(function(t){return Cr(e,t)}))}(this),Ia(),Kr(this),this.curOp.forceUpdate=!0,$i(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Sr(n)}),20):Cr(this),So)So.hasOwnProperty(c)&&So[c](this,t[c],ko);di(this),t.finishInit&&t.finishInit(this);for(var u=0;u<To.length;++u)To[u](this);qr(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(a.lineDiv).textRendering&&(a.lineDiv.style.textRendering="auto")}Ao.defaults=xo,Ao.optionHandlers=So;var To=[];function Oo(e,t,n,r){var i,a=e.doc;null==n&&(n="add"),"smart"==n&&(a.mode.indent?i=pt(e,t).state:n="prev");var o=e.options.tabSize,s=Ke(a,t),l=H(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=a.mode.indent(i,s.text.slice(u.length),s.text))==B||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>a.first?H(Ke(a,t-1).text,null,o):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var f="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/o);p;--p)d+=o,f+="\t";if(d<c&&(f+=q(c-d)),f!=u)return ha(a,f,et(t,0),et(t,u.length),"+input"),s.stateAfter=null,!0;for(var h=0;h<a.sel.ranges.length;h++){var g=a.sel.ranges[h];if(g.head.line==t&&g.head.ch<u.length){var m=et(t,u.length);Vi(a,h,new xi(m,m));break}}}Ao.defineInitHook=function(e){return To.push(e)};var Lo=null;function Mo(e){Lo=e}function Ro(e,t,n,r,i){var a=e.doc;e.display.shift=!1,r||(r=a.sel);var o=+new Date-200,s="paste"==i||e.state.pasteIncoming>o,l=Me(t),c=null;if(s&&r.ranges.length>1)if(Lo&&Lo.text.join("\n")==t){if(r.ranges.length%Lo.text.length==0){c=[];for(var u=0;u<Lo.text.length;u++)c.push(a.splitLines(Lo.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=Y(l,(function(e){return[e]})));for(var f=e.curOp.updateInput,d=r.ranges.length-1;d>=0;d--){var p=r.ranges[d],h=p.from(),g=p.to();p.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!s?g=et(g.line,Math.min(Ke(a,g.line).text.length,g.ch+X(l).length)):s&&Lo&&Lo.lineWise&&Lo.text.join("\n")==l.join("\n")&&(h=g=et(h.line,0)));var m={from:h,to:g,text:c?c[d%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};ca(e.doc,m),ln(e,"inputRead",e,m)}t&&!s&&Po(e,t),Mr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function No(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Qr(t,(function(){return Ro(t,n,0,null,"paste")})),!0}function Po(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=Oo(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Oo(e,i.head.line,"smart"));o&&ln(e,"electricInput",e,i.head.line)}}}function $o(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,a={anchor:et(i,0),head:et(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function Io(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Do(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),Io(e),t}function Ho(e,t,n,r,i){var a=t,o=n,s=Ke(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(a){var o,c;if("codepoint"==r){var u=s.text.charCodeAt(t.ch+(r>0?0:-1));o=isNaN(u)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else o=i?function(e,t,n,r){var i=ce(t,e.doc.direction);if(!i)return Ja(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=se(i,n.ch,n.sticky),o=i[a];if("ltr"==e.doc.direction&&o.level%2==0&&(r>0?o.to>n.ch:o.from<n.ch))return Ja(t,n,r);var s,l=function(e,n){return Za(t,e instanceof et?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||Rn(e,t),Jn(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==o.level){var f=1==o.level==r<0,d=l(n,f?1:-1);if(null!=d&&(f?d<=o.to&&d<=u.end:d>=o.from&&d>=u.begin)){var p=f?"before":"after";return new et(n.line,d,p)}}var h=function(e,t,r){for(var a=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e<i.length;e+=t){var o=i[e],s=t>0==(1!=o.level),c=s?r.begin:l(r.end,-1);if(o.from<=c&&c<o.to)return a(c,s);if(c=s?o.from:l(o.to,-1),r.begin<=c&&c<r.end)return a(c,s)}},g=h(a+r,r,u);if(g)return g;var m=r>0?u.end:l(u.begin,-1);return null==m||r>0&&m==t.text.length||!(g=h(r>0?0:i.length-1,r,c(m)))?null:g}(e.cm,s,t,n):Ja(s,t,n);if(null==o){if(a||(c=t.line+l)<e.first||c>=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=Ke(e,c))))return!1;t=Qa(i,e.cm,s,t.line,l)}else t=o;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,f="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||c(!p);p=!1){var h=s.text.charAt(t.ch)||"\n",g=ee(h,d)?"w":f&&"\n"==h?"n":!f||/\s/.test(h)?null:"p";if(!f||p||g||(g="s"),u&&u!=g){n<0&&(n=1,c(),t.sticky="after");break}if(g&&(u=g),n>0&&!c(!p))break}var m=aa(e,t,a,o,!0);return nt(a,m)&&(m.hitSide=!0),m}function Fo(e,t,n,r){var i,a,o=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(a=Vn(e,s,i)).outside;){if(n<0?i<=0:i>=o.height){a.hitSide=!0;break}i+=5*n}return a}var jo=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new F,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Bo(e,t){var n=Mn(e,t.line);if(!n||n.hidden)return null;var r=Ke(e.doc,t.line),i=On(n,r,t.line),a=ce(r,e.doc.direction),o="left";a&&(o=se(a,t.ch)%2?"right":"left");var s=In(i.map,t.ch,o);return s.offset="right"==s.collapse?s.end:s.start,s}function zo(e,t){return t&&(e.bad=!0),e}function Wo(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return zo(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==r)return Uo(a,t,n)}}function Uo(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!M(r,t))return zo(et(Ve(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var a=e.rest?X(e.rest):e.line;return zo(et(Ve(a),a.text.length),i)}var o=3==t.nodeType?t:null,s=t;for(o||1!=t.childNodes.length||3!=t.firstChild.nodeType||(o=t.firstChild,n&&(n=o.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var a=i<0?l.map:c[i],o=0;o<a.length;o+=3){var s=a[o+2];if(s==t||s==n){var u=Ve(i<0?e.line:e.rest[i]),f=a[o]+r;return(r<0||s!=t)&&(f=a[o+(r?1:0)]),et(u,f)}}}var f=u(o,s,n);if(f)return zo(f,i);for(var d=s.nextSibling,p=o?o.nodeValue.length-n:0;d;d=d.nextSibling){if(f=u(d,d.firstChild,0))return zo(et(f.line,f.ch-p),i);p+=d.textContent.length}for(var h=s.previousSibling,g=n;h;h=h.previousSibling){if(f=u(h,h.firstChild,-1))return zo(et(f.line,f.ch+g),i);g+=h.textContent.length}}jo.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function a(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function o(e){if(a(e)&&!ge(r,e)){if(r.somethingSelected())Mo({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=$o(r);Mo({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,z),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var o=Lo.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var s=Do(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=Lo.text.join("\n");var c=document.activeElement;$(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==i&&n.showPrimarySelection()}),50)}}Io(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),fe(i,"paste",(function(e){!a(e)||ge(r,e)||No(e,r)||s<=11&&setTimeout(ei(r,(function(){return t.updateFromDOM()})),20)})),fe(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),fe(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),fe(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),fe(i,"touchstart",(function(){return n.forceCompositionEnd()})),fe(i,"input",(function(){t.composing||t.readFromDOMSoon()})),fe(i,"copy",o),fe(i,"cut",o)},jo.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},jo.prototype.prepareSelection=function(){var e=vr(this.cm,!1);return e.focus=document.activeElement==this.div,e},jo.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},jo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},jo.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),a=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||a.line<t.display.viewFrom)e.removeAllRanges();else{var o=Wo(t,e.anchorNode,e.anchorOffset),s=Wo(t,e.focusNode,e.focusOffset);if(!o||o.bad||!s||s.bad||0!=tt(at(o,s),i)||0!=tt(it(o,s),a)){var l=t.display.view,c=i.line>=t.display.viewFrom&&Bo(t,i)||{node:l[0].measure.map[2],offset:0},u=a.line<t.display.viewTo&&Bo(t,a);if(!u){var f=l[l.length-1].measure,d=f.maps?f.maps[f.maps.length-1]:f.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(c&&u){var p,h=e.rangeCount&&e.getRangeAt(0);try{p=C(c.node,c.offset,u.offset,u.node)}catch(e){}p&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),h&&null==e.anchorNode?e.addRange(h):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},jo.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},jo.prototype.showMultipleSelections=function(e){T(this.cm.display.cursorDiv,e.cursors),T(this.cm.display.selectionDiv,e.selection)},jo.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},jo.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return M(this.div,t)},jo.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},jo.prototype.blur=function(){this.div.blur()},jo.prototype.getField=function(){return this.div},jo.prototype.supportsTouch=function(){return!0},jo.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Qr(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}))},jo.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},jo.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(m&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Wo(t,e.anchorNode,e.anchorOffset),r=Wo(t,e.focusNode,e.focusOffset);n&&r&&Qr(t,(function(){Qi(t.doc,Ci(n,r),z),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},jo.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,a=r.doc.sel.primary(),o=a.from(),s=a.to();if(0==o.ch&&o.line>r.firstLine()&&(o=et(o.line-1,Ke(r.doc,o.line-1).length)),s.ch==Ke(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=et(s.line+1,0)),o.line<i.viewFrom||s.line>i.viewTo-1)return!1;o.line==i.viewFrom||0==(e=ur(r,o.line))?(t=Ve(i.view[0].line),n=i.view[0].node):(t=Ve(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=Ve(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(e,t,n,r,i){var a="",o=!1,s=e.doc.lineSeparator(),l=!1;function c(){o&&(a+=s,l&&(a+=s),o=l=!1)}function u(e){e&&(c(),a+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var a,d=t.getAttribute("cm-marker");if(d){var p=e.findMarks(et(r,0),et(i+1,0),function(e){return function(t){return t.id==e}}(+d));return void(p.length&&(a=p[0].find(0))&&u(qe(e.doc,a.from,a.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&c();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),h&&(o=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;f(t),t!=n;)t=t.nextSibling,l=!1;return a}(r,n,c,t,l)),d=qe(r.doc,et(t,0),et(l,Ke(r.doc,l).text.length));f.length>1&&d.length>1;)if(X(f)==X(d))f.pop(),d.pop(),l--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var p=0,h=0,g=f[0],m=d[0],v=Math.min(g.length,m.length);p<v&&g.charCodeAt(p)==m.charCodeAt(p);)++p;for(var y=X(f),b=X(d),w=Math.min(y.length-(1==f.length?p:0),b.length-(1==d.length?p:0));h<w&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;if(1==f.length&&1==d.length&&t==o.line)for(;p&&p>o.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;f[f.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(p).replace(/\u200b+$/,"");var _=et(t,p),k=et(l,d.length?X(d).length-h:0);return f.length>1||f[0]||tt(_,k)?(ha(r.doc,f,_,k,"+input"),!0):void 0},jo.prototype.ensurePolled=function(){this.forceCompositionEnd()},jo.prototype.reset=function(){this.forceCompositionEnd()},jo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},jo.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},jo.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return fr(e.cm)}))},jo.prototype.setUneditable=function(e){e.contentEditable="false"},jo.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Ro)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},jo.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},jo.prototype.onContextMenu=function(){},jo.prototype.resetPosition=function(){},jo.prototype.needsContentAttribute=!0;var Go=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new F,this.hasSelection=!1,this.composing=null};Go.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function a(e){if(!ge(r,e)){if(r.somethingSelected())Mo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=$o(r);Mo({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,z):(n.prevInput="",i.value=t.text.join("\n"),$(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),fe(i,"input",(function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),fe(i,"paste",(function(e){ge(r,e)||No(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),fe(i,"cut",a),fe(i,"copy",a),fe(e.scroller,"paste",(function(t){if(!kn(e,t)&&!ge(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var a=new Event("paste");a.clipboardData=t.clipboardData,i.dispatchEvent(a)}})),fe(e.lineSpace,"selectstart",(function(t){kn(e,t)||be(t)})),fe(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),fe(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Go.prototype.createField=function(e){this.wrapper=Do(),this.textarea=this.wrapper.firstChild},Go.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Go.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=qn(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},Go.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Go.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&$(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null))}},Go.prototype.getField=function(){return this.textarea},Go.prototype.supportsTouch=function(){return!1},Go.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||R()!=this.textarea))try{this.textarea.focus()}catch(e){}},Go.prototype.blur=function(){this.textarea.blur()},Go.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Go.prototype.receivedFocus=function(){this.slowPoll()},Go.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Go.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Go.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(8203!=a||r||(r="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Qr(t,(function(){Ro(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Go.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Go.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},Go.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=cr(n,e),c=r.scroller.scrollTop;if(a&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&ei(n,Qi)(n.doc,Ci(a),z);var u,d=i.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n      z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&s>=9&&m(),x){ke(e);var g=function(){pe(window,"mouseup",g),setTimeout(v,20)};fe(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),a="​"+(e?i.value:"");i.value="⇚",i.value=a,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=d,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!o||o&&s<9)&&m();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ei(n,sa)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},Go.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Go.prototype.setUneditable=function(){},Go.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=ko&&i(e,t,n)}:i)}e.defineOption=n,e.Init=ko,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Li(e)}),!0),n("indentUnit",2,Li,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Mi(e),jn(e),fr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(-1==a)break;i=a+t.length,n.push(et(r,a))}r++}));for(var i=n.length-1;i>=0;i--)ha(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=ko&&e.refresh()})),n("specialCharPlaceholder",Jt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){_o(e),gi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Ya(t),i=n!=ko&&Ya(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Eo,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=pi(t,e.options.lineNumbers),gi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?or(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Br(e)}),!0),n("scrollbarStyle","native",(function(e){Ur(e),Br(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=pi(e.options.gutters,t),gi(e)}),!0),n("firstLineNumber",1,gi,!0),n("lineNumberFormatter",(function(e){return e}),gi,!0),n("showCursorWhenSelecting",!1,mr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Cr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Co),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,mr,!0),n("singleCursorHeightPerLine",!0,mr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Mi,!0),n("addModeClass",!1,Mi,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Mi,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ao),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),he(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ya(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ti((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,fr(this)})),removeOverlay:ti((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void fr(this)}})),indentLine:ti((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Je(this.doc,e)&&Oo(this,e,t,n)})),indentSelection:ti((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Oo(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Mr(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l<n;++l)Oo(this,l,e);var c=this.doc.sel.ranges;0==a.ch&&t.length==c.length&&c[r].from().ch>0&&Vi(this.doc,r,new xi(a,c[r].to()),z)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=dt(this,Ke(this.doc,e.line)),r=0,i=(n.length-1)/2,a=e.ch;if(0==a)t=n[2];else for(;;){var o=r+i>>1;if((o?n[2*o-1]:0)>=a)i=o;else{if(!(n[2*o+1]<a)){t=n[2*o+2];break}r=o+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],a=this.getModeAt(e);if("string"==typeof a[t])i[a[t]]&&r.push(i[a[t]]);else if(a[t])for(var o=0;o<a[t].length;o++){var s=i[a[t][o]];s&&r.push(s)}else a.helperType&&i[a.helperType]?r.push(i[a.helperType]):i[a.name]&&r.push(i[a.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(a,this)&&-1==j(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return pt(this,(e=ot(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return qn(this,null==e?n.head:"object"==typeof e?st(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Kn(this,st(this.doc,e),t||"page")},coordsChar:function(e,t){return Vn(this,(e=Gn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Gn(this,{top:e,left:0},t||"page").top,Ze(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var a=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>a&&(e=a,i=!0),r=Ke(this.doc,e)}else r=e;return Un(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Wt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a,o,s,l=this.display,c=(e=qn(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var f=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(c=e.bottom),u+t.offsetWidth>d&&(u=d-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(a=this,o={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Or(a,o)).scrollTop&&$r(a,s.scrollTop),null!=s.scrollLeft&&Dr(a,s.scrollLeft))},triggerOnKeyDown:ti(co),triggerOnKeyPress:ti(fo),triggerOnKeyUp:uo,triggerOnMouseDown:ti(mo),execCommand:function(e){if(eo.hasOwnProperty(e))return eo[e].call(null,this)},triggerElectric:ti((function(e){Po(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=st(this.doc,e),o=0;o<t&&!(a=Ho(this.doc,a,i,n,r)).hitSide;++o);return a},moveH:ti((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Ho(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),U)})),deleteH:ti((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Va(this,(function(n){var i=Ho(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,a=r;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),s=0;s<t;++s){var l=qn(this,o,"div");if(null==a?a=l.left:l.left=a,(o=Fo(this,l,i,n)).hitSide)break}return o},moveV:ti((function(e,t){var n=this,r=this.doc,i=[],a=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(o){if(a)return e<0?o.from():o.to();var s=qn(n,o.head,"div");null!=o.goalColumn&&(s.left=o.goalColumn),i.push(s.left);var l=Fo(n,s,e,t);return"page"==t&&o==r.sel.primary()&&Lr(n,Kn(n,l,"div").top-s.top),l}),U),i.length)for(var o=0;o<r.sel.ranges.length;o++)r.sel.ranges[o].goalColumn=i[o]})),findWordAt:function(e){var t=Ke(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var a=t.charAt(n),o=ee(a,i)?function(e){return ee(e,i)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ee(e)};n>0&&o(t.charAt(n-1));)--n;for(;r<t.length&&o(t.charAt(r));)++r}return new xi(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?N(this.display.cursorDiv,"CodeMirror-overwrite"):E(this.display.cursorDiv,"CodeMirror-overwrite"),he(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==R()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ti((function(e,t){Rr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-En(this)-this.display.barHeight,width:e.scrollWidth-En(this)-this.display.barWidth,clientHeight:Tn(this),clientWidth:An(this)}},scrollIntoView:ti((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:et(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Nr(e),e.curOp.scrollToPos=t}(this,e):Pr(this,e.from,e.to,e.margin)})),setSize:ti((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Fn(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){dr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,he(this,"refresh",this)})),operation:function(e){return Qr(this,e)},startOperation:function(){return Kr(this)},endOperation:function(){return qr(this)},refresh:ti((function(){var e=this.display.cachedTextHeight;fr(this),this.curOp.forceUpdate=!0,jn(this),Rr(this,this.doc.scrollLeft,this.doc.scrollTop),ci(this.display),(null==e||Math.abs(e-rr(this.display))>.5||this.options.lineWrapping)&&lr(this),he(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),$i(this,e),jn(this),this.display.input.reset(),Rr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,a){e.registerHelper(t,r,a),n[t]._global.push({pred:i,val:a})}}(Ao);var Ko="iter insert remove copy getEditor constructor".split(" ");for(var qo in La.prototype)La.prototype.hasOwnProperty(qo)&&j(Ko,qo)<0&&(Ao.prototype[qo]=function(e){return function(){return e.apply(this.doc,arguments)}}(La.prototype[qo]));return ye(La),Ao.inputStyles={textarea:Go,contenteditable:jo},Ao.defineMode=function(e){Ao.defaults.mode||"null"==e||(Ao.defaults.mode=e),De.apply(this,arguments)},Ao.defineMIME=function(e,t){Ie[e]=t},Ao.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ao.defineMIME("text/plain","null"),Ao.defineExtension=function(e,t){Ao.prototype[e]=t},Ao.defineDocExtension=function(e,t){La.prototype[e]=t},Ao.fromTextArea=function(e,t){if((t=t?D(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=R();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(fe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Ao((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=pe,e.on=fe,e.wheelEventPixels=wi,e.Doc=La,e.splitLines=Me,e.countColumn=H,e.findColumn=G,e.isWordChar=Q,e.Pass=B,e.signal=he,e.Line=Kt,e.changeEnd=Ei,e.scrollbarModel=Wr,e.Pos=et,e.cmpPos=tt,e.modes=$e,e.mimeModes=Ie,e.resolveMode=He,e.getMode=Fe,e.modeExtensions=je,e.extendMode=Be,e.copyState=ze,e.startState=Ue,e.innerMode=We,e.commands=eo,e.keyMap=za,e.keyName=Xa,e.isModifierKey=Ka,e.lookupKey=Ga,e.normalizeKeyMap=Ua,e.StringStream=Ge,e.SharedTextMarker=Ea,e.TextMarker=Sa,e.LineWidget=_a,e.e_preventDefault=be,e.e_stopPropagation=we,e.e_stop=ke,e.addClass=N,e.contains=M,e.rmClass=E,e.keyNames=Ha}(Ao),Ao.version="5.58.2",Ao}()}));function Zd(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}var Jd=function(e){St(n,e);var t=Zd(n);function n(e){var r,i=e.config;return vt(this,n),(r=t.call(this,{needCache:!0})).initConfig(i),r.RULE=r.rule(),r}return lo(n,[{key:"initConfig",value:function(e){var t=this,n=e.suggester;this.suggester={},n&&(Co(n).call(n,(function(e){e.suggestList?(e.keyword||(e.keyword="@"),t.suggester[e.keyword]=e):console.warn("[cherry-suggester]: the suggestList of config is missing.")})),ep.hasEditor()&&(ep.editor=null))}},{key:"makeHtml",value:function(e){var t,n;if(!this.RULE.reg)return e;if(!ep.hasEditor()){var r=this.$engine.$cherry.editor;ep.setEditor(r),ep.setSuggester(this.suggester),ep.bindEvent()}return El()?e.replace(this.RULE.reg,go(n=this.toHtml).call(n,this)):wc(e,this.RULE.reg,go(t=this.toHtml).call(t,this),!0,1)}},{key:"toHtml",value:function(e,t,n,r){var i,a,o,s,l;return r?(null===(a=this.suggester[n])||void 0===a||null===(o=a.echo)||void 0===o?void 0:o.call(this,r))||yo(s=yo(l="".concat(t,'<span class="cherry-suggestion">')).call(l,n)).call(s,r,"</span>"):!1===(null===(i=this.suggester[n])||void 0===i?void 0:i.echo)?"".concat(t):this.suggester[n]?r?t+r:"".concat(t):t+r}},{key:"rule",value:function(){var e,t,n;if(!this.suggester||Ao(this.suggester).length<=0)return{};var r=Jo(e=Ao(this.suggester)).call(e,(function(e){return Yd(e)})).join("|");return{reg:new RegExp(yo(t=yo(n="".concat(El()?"((?<!\\\\))[ ]":"(^|[^\\\\])[ ]","(")).call(n,r,")(([^")).call(t,r,"\\s])+)"),"g")}}},{key:"mounted",value:function(){if(!ep.hasEditor()){var e=this.$engine.$cherry.editor;ep.setEditor(e),ep.setSuggester(this.suggester),ep.bindEvent()}}}]),n}(Ko);Ir(Jd,"HOOK_NAME","suggester");var Qd=function(){function e(){vt(this,e),this.searchCache=!1,this.searchKeyCache=[],this.optionList=[],this.cursorMove=!0,this.suggesterConfig={},this.$suggesterPanel||(document.body.append(this.createDom(e.panelWrap)),this.$suggesterPanel=document.querySelector(".cherry-suggester-panel"))}return lo(e,[{key:"hasEditor",value:function(){return!!this.editor&&!!this.editor.editor.display&&!!this.editor.editor.display.wrapper}},{key:"setEditor",value:function(e){this.editor=e}},{key:"setSuggester",value:function(e){this.suggesterConfig=e}},{key:"bindEvent",value:function(){var e=this,t=!1;this.editor.editor.on("change",(function(n,r){t=!0,e.onCodeMirrorChange(n,r)})),this.editor.editor.on("keydown",(function(n,r){t=!0,e.enableRelate()&&e.onKeyDown(n,r)})),this.editor.editor.on("cursorActivity",(function(){t||e.stopRelate(),t=!1})),this.editor.editor.setOption("extraKeys",{Up:function(){if(ep.cursorMove)return Vd.Pass},Down:function(){if(ep.cursorMove)return Vd.Pass},Enter:function(){if(ep.cursorMove)return Vd.Pass}}),this.editor.editor.on("scroll",(function(t,n){e.searchCache&&e.relocatePanel(e.editor.editor)})),this.onClickPancelItem()}},{key:"onClickPancelItem",value:function(){var e=this;this.$suggesterPanel.addEventListener("click",(function(t){var n,r,i,a,o=(n=e.$suggesterPanel,r=t.target,a=-1,Co(i=n.childNodes).call(i,(function(e,t){return e===r?a=t:""})),a);o>-1&&e.pasteSelectResult(o),e.stopRelate()}),!1)}},{key:"showsuggesterPanel",value:function(t){var n=t.left,r=t.top,i=t.items;this.$suggesterPanel||(document.body.append(this.createDom(e.panelWrap)),this.$suggesterPanel=document.querySelector(".cherry-suggester-panel")),this.updatePanel(i),this.$suggesterPanel.style.left="".concat(n,"px"),this.$suggesterPanel.style.top="".concat(r,"px"),this.$suggesterPanel.style.display="block",this.$suggesterPanel.style.position="absolute",this.$suggesterPanel.style.zIndex="100"}},{key:"hidesuggesterPanel",value:function(){this.$suggesterPanel&&(this.$suggesterPanel.style.display="none")}},{key:"updatePanel",value:function(e){var t=this,n=Jo(e).call(e,(function(e,n){return t.renderPanelItem(e,0===n)})).join("");this.suggesterConfig[this.keyword]&&this.suggesterConfig[this.keyword].suggestListRender&&(n=this.suggesterConfig[this.keyword].suggestListRender.call(this,e)||n),"string"==typeof n?this.$suggesterPanel.innerHTML=n:"object"===Er(n)&&1===n.nodeType&&this.$suggesterPanel.append(n)}},{key:"renderPanelItem",value:function(e,t){return t?'<div class="cherry-suggester-panel__item cherry-suggester-panel__item--selected">'.concat(e,"</div>"):'<div class="cherry-suggester-panel__item">'.concat(e,"</div>")}},{key:"createDom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.template||(this.template=document.createElement("div")),this.template.innerHTML=cs(e).call(e);var t=document.createDocumentFragment();return Jo(Array.prototype).call(this.template.childNodes,(function(e,n){t.appendChild(e)})),t}},{key:"relocatePanel",value:function(e){var t=document.querySelector(".CodeMirror-cursors .CodeMirror-cursor");if(!t)return!1;var n=e.getCursor(),r=e.lineInfo(n.line).handle.height,i=t.getBoundingClientRect(),a=i.top+r,o=i.left;this.showsuggesterPanel({left:o,top:a,items:this.optionList})}},{key:"startRelate",value:function(e,t,n){this.cursorFrom=n,this.keyword=t,this.searchCache=!0,this.searchKeyCache=[t],this.relocatePanel(e)}},{key:"stopRelate",value:function(){this.hidesuggesterPanel(),this.cursorFrom=null,this.cursorTo=null,this.keyword="",this.searchKeyCache=[],this.searchCache=!1,this.cursorMove=!0}},{key:"pasteSelectResult",value:function(e){if(this.cursorTo||(this.cursorTo=JSON.parse(Ld(this.cursorFrom))),this.cursorTo&&(this.cursorTo.ch+=1,this.optionList[e])){var t,n=yo(t=" ".concat(this.keyword)).call(t,this.optionList[e]," ");this.editor.editor.replaceRange(n,this.cursorFrom,this.cursorTo)}}},{key:"findSelectedItemIndex",value:function(){return Do(Array.prototype).call(this.$suggesterPanel.childNodes,(function(e){return e.classList.contains("cherry-suggester-panel__item--selected")}))}},{key:"enableRelate",value:function(){return this.searchCache}},{key:"onCodeMirrorChange",value:function(e,t){var n=this,r=t.text,i=t.from,a=t.to,o=t.origin,s=1===r.length?r[0]:"";if(this.suggesterConfig[s])this.startRelate(e,s,i);else if(this.enableRelate()&&(s||"+delete"===o)){if(this.cursorTo=a,s)this.searchKeyCache.push(s);else if("+delete"===o&&(this.searchKeyCache.pop(),0===this.searchKeyCache.length))return void this.stopRelate();this.suggesterConfig[this.keyword].suggestList(this.searchKeyCache.join(""),(function(e){e&&e.length&&(n.optionList=e,n.updatePanel(n.optionList))}))}}},{key:"onKeyDown",value:function(e,t){var n,r=this;if(!this.$suggesterPanel)return!1;var i=t.keyCode;if(Id(n=[38,40]).call(n,i)){this.cursorMove=!1;var a=this.$suggesterPanel.querySelector(".cherry-suggester-panel__item--selected"),o=null;38!==i||a.previousElementSibling?40!==i||a.nextElementSibling?38===i?o=a.previousElementSibling:40===i&&(o=a.nextElementSibling):o=this.$suggesterPanel.firstElementChild:o=this.$suggesterPanel.lastElementChild,a.classList.remove("cherry-suggester-panel__item--selected"),o.classList.add("cherry-suggester-panel__item--selected")}else 13===i&&(this.cursorMove=!1,this.pasteSelectResult(this.findSelectedItemIndex()),e.focus(),jd((function(){r.stopRelate()}),0))}}]),e}();Ir(Qd,"panelWrap",'<div class="cherry-suggester-panel"></div>');var ep=new Qd,tp=[cu,fu,Df,Ff,pd,Xf,ad,Ru,qu,Uu,pf,Kf,Lu,Yu,uf,wu,bd,tf,pu,gf,yu,Sc,kc,Ec,Rc,Lc,Tc,_d,xd,Jd],np={run:function(e){var t,n="<div>".concat(e,"</div>");this.tagParser.formatEngine=this.mdFormatEngine,n=n.replace(/<!--[\s\S]*?-->/g,"");var r=this.htmlParser.parseHtml(n);return r=this.paragraphStyleClear(r),cs(t=this.$dealHtml(r).replace(/\n{3,}/g,"\n\n\n").replace(/&gt;/g,">").replace(/&lt;/g,"<")).call(t,"\n")},$dealHtml:function(e){for(var t="",n=0;n<e.length;n++){var r=e[n];"tag"===r.type?t=this.$handleTagObject(r,t):"text"===r.type&&r.content.length>0&&(t+=r.content.replace(/&nbsp;/g," ").replace(/[\n]+/g,"\n"))}return t},$handleTagObject:function(e,t){var n,r,i,a=t;if(e.attrs.class&&$c(n=e.attrs.class).call(n,"mermaid")>=0)try{a+=["\n```",e.attrs["data-type"],"\n",decodeURIComponent(atob(e.attrs["data-code"])),"\n```\n"].join("")}catch(t){a+=["\n```",e.attrs["data-type"],"\n",decodeURIComponent(e.attrs["data-code"]),"\n```\n"].join("")}else if(e.attrs.class&&$c(r=e.attrs.class).call(r,"mathjax-wrapper")>=0)try{a+=" ".concat(decodeURIComponent(atob(e.attrs["data-source"]))," ")}catch(t){a+=" ".concat(decodeURIComponent(e.attrs["data-source"])," ")}else if(e.attrs["data-control"]&&"tapd-table"===e.attrs["data-control"]){if(a+=["\n```"," tapd-table ",e.attrs["data-size"],"\n"].join(""),e.children[1]&&e.children[1].children[0].content)a+=["\n",e.children[1].children[0].content.replace(/\s+/g,""),"\n```\n"].join("");else a+=["\n",'"工作表":{"数据":{"19::25":" "}} ',"\n```\n"].join("")}else if(e.attrs.class&&$c(i=e.attrs.class).call(i,"ch-icon")>=0){var o;$c(o=e.attrs.class).call(o,"ch-icon-check")>=0?a+="[x]":a+="[ ]"}else a+=this.$dealTag(e);return a},$dealTag:function(e){var t="";return e.children&&(t=this.$dealHtml(e.children)),"style"===e.name?"":"code"===e.name||"pre"===e.name?this.tagParser.codeParser(e,this.$dealCodeTag(e)):"function"==typeof this.tagParser["".concat(e.name,"Parser")]?this.tagParser["".concat(e.name,"Parser")](e,t):t},$dealCodeTag:function(e){if(e.children.length<0)return"";for(var t="",n=0;n<e.children.length;n++){var r=e.children[n];"text"!==r.type?("li"===r.name&&(t+="\n"),"br"===r.name&&(t+="\n"),t+=this.$dealCodeTag(r)):t+=r.content.replace(/&lt;/g,"<").replace(/&gt;/g,">")}return t},htmlParser:{attrRE:/([\w-]+)|['"]{1}([^'"]*)['"]{1}/g,lookup:{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,video:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},tagRE:/<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>/g,empty:bt?bt(null):{},parseTags:function(e){var t,n=this,r=0,i={type:"tag",name:"",voidElement:!1,attrs:{},children:[]};return e.replace(this.attrRE,(function(a){r%2?t=a:0===r?((n.lookup[a]||"/"===e.charAt(e.length-2))&&(i.voidElement=!0),i.name=a):i.attrs[t]=a.replace(/['"]/g,""),r+=1})),i},parseHtml:function(e,t){var n=this,r=t||{};r.components||(r.components=this.empty);var i,a=[],o=-1,s=[],l={},c=!1;return e.replace(this.tagRE,(function(t,u){if(c){if(t!=="</".concat(i.name,">"))return;c=!1}var f,d="/"!==t.charAt(1),p=u+t.length,h=e.charAt(p);d&&(o+=1,"tag"===(i=n.parseTags(t)).type&&r.components[i.name]&&(i.type="component",c=!0),i.voidElement||c||!h||"<"===h||i.children.push({type:"text",content:lc(e).call(e,p,$c(e).call(e,"<",p))}),l[i.tagName]=i,0===o&&a.push(i),(f=s[o-1])&&f.children.push(i),s[o]=i),d&&!i.voidElement||(o-=1,!c&&"<"!==h&&h&&s[o]&&s[o].children.push({type:"text",content:lc(e).call(e,p,$c(e).call(e,"<",p))}))})),a}},tagParser:{formatEngine:{},pParser:function(e,t){var n=t.replace(/\t/g,"");return/\n$/.test(n)?n:"".concat(n,"\n")},divParser:function(e,t){var n=t.replace(/\t/g,"");return/\n$/.test(n)?n:"".concat(n,"\n")},spanParser:function(e,t){var n=t.replace(/\t/g,"");return e.attrs&&e.attrs.style,n},codeParser:function(e,t){return this.formatEngine.convertCode(t)},brParser:function(e,t){return this.formatEngine.convertBr(t,"\n")},imgParser:function(e,t){return e.attrs&&"tapd-graph"===e.attrs["data-control"]?this.formatEngine.convertGraph(e.attrs.title,e.attrs.src,e.attrs["data-origin-xml"],e):e.attrs&&e.attrs.src?this.formatEngine.convertImg(e.attrs.alt,e.attrs.src):void 0},videoParser:function(e,t){if(e.attrs&&e.attrs.src)return this.formatEngine.convertVideo(t,e.attrs.src,e.attrs.poster,e.attrs.title)},bParser:function(e,t){for(var n=t.split("\n"),r=[],i=0;i<n.length;i++)r.push(this.formatEngine.convertB(n[i]));return r.join("\n")},iParser:function(e,t){for(var n=t.split("\n"),r=[],i=0;i<n.length;i++)r.push(this.formatEngine.convertI(n[i]));return r.join("\n")},strikeParser:function(e,t){for(var n=t.split("\n"),r=[],i=0;i<n.length;i++)r.push(this.formatEngine.convertStrike(n[i]));return r.join("\n")},delParser:function(e,t){for(var n=t.split("\n"),r=[],i=0;i<n.length;i++)r.push(this.formatEngine.convertDel(n[i]));return r.join("\n")},uParser:function(e,t){for(var n=t.split("\n"),r=[],i=0;i<n.length;i++)r.push(this.formatEngine.convertU(n[i]));return r.join("\n")},aParser:function(e,t){return e.attrs&&e.attrs.href?this.formatEngine.convertA(t,e.attrs.href):""},supParser:function(e,t){return this.formatEngine.convertSup(t)},subParser:function(e,t){return this.formatEngine.convertSub(t)},tdParser:function(e,t){return this.formatEngine.convertTd(t)},trParser:function(e,t){return this.formatEngine.convertTr(t)},thParser:function(e,t){return this.formatEngine.convertTh(t)},theadParser:function(e,t){return this.formatEngine.convertThead(t)},tableParser:function(e,t){return this.formatEngine.convertTable(t)},liParser:function(e,t){return this.formatEngine.convertLi(t)},ulParser:function(e,t){return this.formatEngine.convertUl(t)},olParser:function(e,t){return this.formatEngine.convertOl(t)},strongParser:function(e,t){return this.formatEngine.convertStrong(t)},hrParser:function(e,t){return this.formatEngine.convertHr(t)},h1Parser:function(e,t){return this.formatEngine.convertH1(t)},h2Parser:function(e,t){return this.formatEngine.convertH2(t)},h3Parser:function(e,t){return this.formatEngine.convertH3(t)},h4Parser:function(e,t){return this.formatEngine.convertH4(t)},h5Parser:function(e,t){return this.formatEngine.convertH5(t)},h6Parser:function(e,t){return this.formatEngine.convertH6(t)},blockquoteParser:function(e,t){return this.formatEngine.convertBlockquote(t.replace(/\n+/g,"\n"))},addressParser:function(e,t){return this.formatEngine.convertAddress(t.replace(/\n+/g,"\n"))},styleParser:{colorAttrParser:function(e){var t=e.match(/color:\s*(#[a-zA-Z0-9]{3,6});/);return t&&t[1]?t[1]:""},sizeAttrParser:function(e){var t=e.match(/font-size:\s*([a-zA-Z0-9-]+?);/);if(t&&t[1]){var n,r=0;if(/[0-9]+px/.test(t[1]))r=cs(n=t[1].replace(/px/,"")).call(n);else switch(t[1]){case"x-small":r=10;break;case"small":r=12;break;case"medium":r=16;break;case"large":r=18;break;case"x-large":r=24;break;case"xx-large":r=32;break;default:r=""}return r>0?r:""}return""},bgColorAttrParser:function(e){var t=e.match(/background-color:\s*([^;]+?);/);if(t&&t[1]){var n="";if(/rgb\([ 0-9]+,[ 0-9]+,[ 0-9]+\)/.test(t[1])){var r,i,a,o,s,l=t[1].match(/rgb\(([ 0-9]+),([ 0-9]+),([ 0-9]+)\)/);if(l[1]&&l[2]&&l[3])l[1]=ms(cs(r=l[1]).call(r),10),l[2]=ms(cs(i=l[2]).call(i),10),l[3]=ms(cs(a=l[3]).call(a),10),n=yo(o=yo(s="#".concat(l[1].toString(16))).call(s,l[2].toString(16))).call(o,l[3].toString(16))}else{n=Pc(t,2)[1]}return n}return""}}},mdFormatEngine:{convertColor:function(e,t){var n,r=cs(e).call(e);return!r||/\n/.test(r)?r:t?yo(n="!!".concat(t," ")).call(n,r,"!!"):r},convertSize:function(e,t){var n,r=cs(e).call(e);return!r||/\n/.test(r)?r:t?yo(n="!".concat(t," ")).call(n,r,"!"):r},convertBgColor:function(e,t){var n,r=cs(e).call(e);return!r||/\n/.test(r)?r:t?yo(n="!!!".concat(t," ")).call(n,r,"!!!"):r},convertBr:function(e,t){return e+t},convertCode:function(e){return/\n/.test(e)?"\n```\n".concat(e.replace(/\n+$/,""),"\n```\n"):" `".concat(e.replace(/`/g,"\\`"),"` ")},convertB:function(e){return/^\s*$/.test(e)?"":"**".concat(e,"**")},convertI:function(e){return/^\s*$/.test(e)?"":"*".concat(e,"*")},convertU:function(e){return/^\s*$/.test(e)?"":" /".concat(e,"/ ")},convertImg:function(e,t){var n,r=e&&e.length>0?r:"image";return yo(n="![".concat(r,"](")).call(n,t,")")},convertGraph:function(e,t,n,r){var i,a,o,s=e&&e.length>0?e:"graph",l="";if(r)try{var c,u=r.attrs;Co(c=Ao(u)).call(c,(function(e){var t;Object.prototype.hasOwnProperty.call(u,e)&&($c(e).call(e,"data-graph-")>=0&&u[e]&&(l+=yo(t=" ".concat(e,"=")).call(t,u[e])))}))}catch(e){}return yo(i=yo(a=yo(o="![".concat(s,"](")).call(o,t,"){data-control=tapd-graph data-origin-xml=")).call(a,n)).call(i,l,"}")},convertVideo:function(e,t,n,r){var i,a,o=r&&r.length>0?r:"video";return yo(i=yo(a="!video[".concat(o,"](")).call(a,t,"){poster=")).call(i,n,"}")},convertA:function(e,t){var n;if(e===t)return"".concat(e," ");var r=cs(e).call(e);return r?yo(n="[".concat(r,"](")).call(n,t,")"):r},convertSup:function(e){return"^".concat(cs(e).call(e).replace(/\^/g,"\\^"),"^")},convertSub:function(e){return"^^".concat(cs(e).call(e).replace(/\^\^/g,"\\^\\^"),"^^")},convertTd:function(e){return"~|".concat(cs(e).call(e).replace(/\n/g,"<br>")," ~|")},convertTh:function(e){return"~|".concat(cs(e).call(e).replace(/\n/g,"<br>")," ~|")},convertTr:function(e){return"".concat(e,"\n")},convertThead:function(e){return"".concat(e.replace(/~\|~\|/g,"~|").replace(/~\|/g,"|"),"|:--|\n")},convertTable:function(e){var t="\n".concat(e.replace(/~\|~\|/g,"~|").replace(/~\|/g,"|"),"\n");return/\|:--\|/.test(t)?t:"\n| |\n|:--|".concat(t)},convertLi:function(e){return"- ".concat(e.replace(/^\n/,"").replace(/\n+$/,"").replace(/\n+/g,"\n\t"),"\n")},convertUl:function(e){return"\n\n".concat(e,"\n\n")},convertOl:function(e){for(var t=e.split("\n"),n=1,r=0;r<t.length;r++)/^- /.test(t[r])&&(t[r]=t[r].replace(/^- /,"".concat(n,". ")),n+=1);var i=t.join("\n");return"\n\n".concat(i,"\n\n")},convertStrong:function(e){return/^\s*$/.test(e)?"":"**".concat(e,"**")},convertStrike:function(e){return/^\s*$/.test(e)?"":"~~".concat(e,"~~")},convertDel:function(e){return/^\s*$/.test(e)?"":"~~".concat(e,"~~")},convertHr:function(e){return/^\s*$/.test(e)?"\n\n----\n":"\n\n----\n".concat(e)},convertH1:function(e){return"# ".concat(cs(e).call(e).replace(/\n+$/,""),"\n\n")},convertH2:function(e){return"## ".concat(cs(e).call(e).replace(/\n+$/,""),"\n\n")},convertH3:function(e){return"### ".concat(cs(e).call(e).replace(/\n+$/,""),"\n\n")},convertH4:function(e){return"#### ".concat(cs(e).call(e).replace(/\n+$/,""),"\n\n")},convertH5:function(e){return"##### ".concat(cs(e).call(e).replace(/\n+$/,""),"\n\n")},convertH6:function(e){return"###### ".concat(cs(e).call(e).replace(/\n+$/,""),"\n\n")},convertBlockquote:function(e){return"\n>".concat(cs(e).call(e),"\n\n")},convertAddress:function(e){return"\n>".concat(cs(e).call(e),"\n\n")}},paragraphStyleClear:function(e){for(var t=0;t<e[0].children.length;t++){for(var n=[e[0].children[t]],r=[];n.length;){var i=n.shift(),a=this.notEmptyTagCount(i);if(1===a)r.push(i);else if(a>1)for(var o=0;o<i.children.length;o++)n.push(i.children[o]);else 1===r.length&&this.clearChildColorAttrs(r.pop()),r=[]}1===r.length&&this.clearChildColorAttrs(r.pop())}return e},notEmptyTagCount:function(e){if(!e||e.voidElement||"tag"===e.type&&!e.children.length||"text"===e.type&&!e.content.replace(/(\r|\n|\s)+/g,""))return 0;if(e.children&&e.children.length){for(var t=0,n=0;n<e.children.length;n++)t+=this.notEmptyTagCount(e.children[n]);return t}return 1},clearChildColorAttrs:function(e){var t=this;this.forEachHtmlParsedItems(e,(function(e){t.clearSelfNodeColorAttrs(e)}))},clearSelfNodeColorAttrs:function(e){if(e.attrs&&e.attrs.style){for(var t=e.attrs.style.split(";"),n=[],r=0;r<t.length;r++){var i;t[r]&&-1===$c(i=t[r]).call(i,"color")&&n.push(t[r])}n.length?e.attrs.style="".concat(n.join(";"),";"):delete e.attrs.style}},forEachHtmlParsedItems:function(e,t){if(e&&(t(e),e.children&&e.children.length))for(var n=0;n<e.children.length;n++)this.forEachHtmlParsedItems(e.children[n],t)}},rp=function(){function e(t,n){vt(this,e),this.$cherry=n,co(this,"_cherry",{get:function(){return yl.warn("`_engine._cherry` is deprecated. Use `$engine.$cherry` instead."),this.$cherry}}),this.initMath(t),this.$configInit(t),this.hookCenter=new Sl(tp,t),this.hooks=this.hookCenter.getHookList(),this.md5Cache={},this.md5StrMap={},this.markdownParams=t,this.currentStrMd5=[],this.htmlWhiteListAppend=t.engine.global.htmlWhiteList}return lo(e,[{key:"initMath",value:function(e){var t=e.externals,n=e.engine.syntax,r=n.mathBlock.plugins;if(Gu()&&(n.mathBlock.src||n.inlineMath.src)&&!t.MathJax&&!window.MathJax){!function(e){if(Gu()){var t=e?["input/asciimath","[tex]/noerrors","[tex]/cancel","[tex]/color","[tex]/boldsymbol"]:[];window.MathJax={startup:{elements:[".Cherry-Math",".Cherry-InlineMath"],typeset:!0},tex:{inlineMath:[["$","$"],["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],tags:"ams",packages:{"[+]":["noerrors","cancel","color"]},macros:{bm:["{\\boldsymbol{#1}}",1]}},options:{skipHtmlTags:["script","noscript","style","textarea","pre","code","a"],ignoreHtmlClass:"tex2jax_ignore",processHtmlClass:"tex2jax_process",enableMenu:!1},loader:{load:t}}}}(r);var i=document.createElement("script");i.src=n.mathBlock.src?n.mathBlock.src:n.inlineMath.src,i.async=!0,i.src&&document.head.appendChild(i)}}},{key:"$configInit",value:function(e){if(e.hooksConfig&&hl(e.hooksConfig.hooksList,Array))for(var t=0;t<e.hooksConfig.hooksList.length;t++){var n=e.hooksConfig.hooksList[t];try{"sentence"===n.getType()&&gl(n,Ko),"paragraph"===n.getType()&&gl(n,_s),ml(n),tp.push(n)}catch(e){throw new Error("the hook does not correctly inherit")}}}},{key:"$beforeMakeHtml",value:function(e){var t=e.replace(/~/g,"~T");return"\n"!==(t=(t=(t=t.replace(/\$/g,"~D")).replace(/\r\n/g,"\n")).replace(/\r/g,"\n"))[t.length-1]&&(t+="\n"),t=this.$fireHookAction(t,"sentence","beforeMakeHtml"),t=this.$fireHookAction(t,"paragraph","beforeMakeHtml")}},{key:"$afterMakeHtml",value:function(e){var t=this.$fireHookAction(e,"paragraph","afterMakeHtml");return t=(t=(t=(t=(t=t.replace(/~D/g,"$")).replace(/~T/g,"~")).replace(/\\<\//g,"\\ </")).replace(new RegExp("\\\\(".concat(Tl,")"),"g"),(function(e,t){return"&"===t?e:tu(t)})).replace(/\\&(?!(amp|lt|gt|quot|apos);)/,(function(){return"&amp;"}))).replace(/\\ <\//g,"\\</")}},{key:"$dealSentenceByCache",value:function(e){var t=this;return this.$checkCache(e,(function(e){return t.$dealSentence(e)}))}},{key:"$dealSentence",value:function(e){var t;return this.$fireHookAction(e,"sentence","makeHtml",go(t=this.$dealSentenceByCache).call(t,this))}},{key:"$fireHookAction",value:function(e,t,n,r){var i=this,a=e,o="afterMakeHtml"===n?"reduceRight":"reduce";if(!this.hooks&&!this.hooks[t]&&!this.hooks[t][o])return a;try{a=this.hooks[t][o]((function(e,t){return t.$engine||(t.$engine=i,co(t,"_engine",{get:function(){return yl.warn("`this._engine` is deprecated. Use `this.$engine` instead."),this.$engine}})),t[n]?t[n](e,r,i.markdownParams):e}),a)}catch(e){throw new vl("Invalid syntax hooks definitions: define at least one sort mapping or one type mapping",e)}return a}},{key:"md5",value:function(e){return this.md5StrMap[e]||(this.md5StrMap[e]=ed(e)),this.md5StrMap[e]}},{key:"$checkCache",value:function(e,t){var n=this.md5(e);return void 0===this.md5Cache[n]&&(this.md5Cache[n]=t(e)),{sign:n,html:this.md5Cache[n]}}},{key:"$dealParagraph",value:function(e){var t;return this.$fireHookAction(e,"paragraph","makeHtml",go(t=this.$dealSentenceByCache).call(t,this))}},{key:"makeHtml",value:function(e){var t=this.$beforeMakeHtml(e);return t=this.$dealParagraph(t),t=this.$afterMakeHtml(t)}},{key:"mounted",value:function(){this.$fireHookAction("","sentence","mounted"),this.$fireHookAction("","paragraph","mounted"),rd.clear()}},{key:"makeMarkdown",value:function(e){return np.run(e)}}]),e}(),ip={zh_CN:{bold:"加粗",code:"代码",graph:"画图",h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",header:"标题",insert:"插入",italic:"斜体",list:"列表",quickTable:"表格",quote:"引用",size:"大小",color:"文字颜色&背景",strikethrough:"删除线",sub:"下标",sup:"上标",togglePreview:"预览",fullScreen:"全屏",image:"图片",audio:"音频",video:"视频",link:"超链接",hr:"分隔线",br:"换行",toc:"目录",pdf:"pdf",word:"word",table:"表格","line-table":"折线表格","bar-table":"柱状表格",formula:"公式",insertFormula:"公式",insertFlow:"流程图",insertSeq:"时序图",insertState:"状态图",insertClass:"类图",insertPie:"饼图",insertGantt:"甘特图",checklist:"清单",ol:"有序列表",ul:"无序列表",undo:"撤销",redo:"恢复",previewClose:"关闭预览",codeTheme:"代码主题",switchModel:"模式切换",switchPreview:"预览",switchEdit:"返回编辑",classicBr:"经典换行",normalBr:"常规换行",settings:"设置",mobilePreview:"移动端预览",copy:"复制内容",export:"导出"}};function ap(e,t){return e.style.left="".concat(t.left+t.width/2,"px"),e.style.top="".concat(t.top+t.height,"px"),e}function op(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"absolute",n=e.getBoundingClientRect();return"fixed"===t?n:{left:e.offsetLeft,top:e.offsetTop,width:n.width,height:n.height}}var sp=function(){function e(t,n,r,i,a){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"absolute";vt(this,e),this.name=n,this.dom=null,this.visible=!1,this.context=t,this.positionModel=o,this.init(n,r,i,a)}return lo(e,[{key:"init",value:function(e,t,n,r){var i=this,a=function(e,t,n){var r=$f("div",t,{name:e});return ap(r,n),r}(e,"cherry-dropdown",t);a.style.position=this.positionModel;var o="function"==typeof(null==r?void 0:r.click)?r.click:this.onClick;Co(n).call(n,(function(e){var t=$f("span","cherry-dropdown-item");if(e.noIcon)t.innerHTML="".concat(e.name);else{var n=$f("i","ch-icon ch-icon-".concat(e.iconName));t.appendChild(n),t.innerHTML+=ip.zh_CN[e.name]||nu(e.name)}t.addEventListener("click",go(o).call(o,i.context,e.onclick,e.async),!1),a.appendChild(t)})),a.addEventListener("EditorHideToolbarSubMenu",(function(){i.hide()})),this.dom=a}},{key:"show",value:function(e){e&&ap(this.dom,e),this.dom.style.display="block",this.visible=!0}},{key:"hide",value:function(){this.dom.style.display="none",this.visible=!1}},{key:"onClick",value:function(){}}]),e}(),lp=function(){function e(t){vt(this,e),Ir(this,"_onClick",void 0),this.bubbleMenu=!1,this.subMenu=null,this.name="",this.editor=t,this.dom=null,this.updateMarkdown=!0,this.subMenuConfig=[],this.positionModel="absolute","function"==typeof this._onClick&&(yl.warn("`MenuBase._onClick` is deprecated. Override `$onClick` instead"),this.$onClick=this._onClick)}return lo(e,[{key:"getSubMenuConfig",value:function(){return this.subMenuConfig}},{key:"setName",value:function(e,t){this.name=e,this.iconName=t}},{key:"createBtn",value:function(){var e,t,n=[];this.subMenuConfig.length>0&&n.push("cherry-toolbar-dropdown"),n.push("cherry-toolbar-button","cherry-toolbar-".concat(this.iconName?this.iconName:this.name));var r=$f("span",n.join(" "));if(this.iconName&&!Id(e=["insert","graph"]).call(e,this.name)){var i=$f("i","ch-icon ch-icon-".concat(this.iconName),{title:ip.zh_CN[this.name]||nu(this.name)});r.appendChild(i)}else r.innerHTML=ip.zh_CN[this.name]||nu(this.name);return r.addEventListener("click",go(t=this.$onClick).call(t,this),!1),this.dom=r,r}},{key:"$onClick",value:function(t){var n=this;if(t.stopPropagation(),this.subMenuConfig.length)return this.toggleSubMenu();if("function"==typeof this.onClick){e.cleanSubMenu();var r=this.editor.editor.getSelections(),i=Jo(r).call(r,(function(e,r,i){return n.onClick(e,"",t)||i[r]}));!this.bubbleMenu&&this.updateMarkdown&&(this.editor.editor.replaceSelections(i),this.editor.editor.focus())}}},{key:"onKeyDown",value:function(e,t,n){var r=this,i=Jo(t).call(t,(function(e){return r.onClick(e,n)}));return e.replaceSelections(i)}},{key:"bindSubClick",value:function(e,t){return this.onClick(t,e)}},{key:"onClick",value:function(e,t,n){return e}},{key:"shortcutKeys",get:function(){return[]}},{key:"shortcutKey",value:function(e){var t,n=this;return ju(t=this.shortcutKeys).call(t,(function(t,r){var i;return t[(i=r,e&&e.isMac?i.replace(/mod/i,"Command"):i.replace(/mod/i,"Ctrl"))]=function(e,t){return n.onKeyDown(t,t.getSelections(),r)},t}),{})}},{key:"initSubMenu",value:function(){if(this.subMenuConfig.length){/cherry-bubble/.test(this.dom.parentElement.className)?this.positionModel="fixed":this.positionModel="absolute";var e=op(this.dom,this.positionModel);this.subMenu=new sp(this,this.name,e,this.subMenuConfig,{click:this.onSubClick},this.positionModel),this.editor.options.wrapperDom.appendChild(this.subMenu.dom)}}},{key:"showSubMenu",value:function(){if(!this.subMenu)return this.initSubMenu(),e.hideSubMenuExcept(this.subMenu.name),void this.subMenu.show();e.hideSubMenuExcept(this.subMenu.name),/cherry-bubble/.test(this.dom.parentElement.className)?this.positionModel="fixed":this.positionModel="absolute";var t=op(this.dom,this.positionModel);this.subMenu.show(t)}},{key:"hideSubMenu",value:function(){this.subMenu&&this.subMenu.hide()}},{key:"toggleSubMenu",value:function(){if(this.subMenu&&this.subMenu.visible)return this.hideSubMenu();this.showSubMenu()}},{key:"onSubClick",value:function(e,t,n){if(t){var r,i=this.editor.editor.getSelection();e(i,!0,go(r=this.editor.editor.replaceSelection).call(r,this.editor.editor))}else{var a=this.editor.editor.getSelections(),o=Jo(a).call(a,(function(t,n,r){return e(t)||r[n]}));this.updateMarkdown&&(this.editor.editor.replaceSelections(o),this.editor.editor.focus())}this.hideSubMenu()}}],[{key:"cleanSubMenu",value:function(){this.hideSubMenuExcept(null)}},{key:"hideSubMenuExcept",value:function(e){var t=document.querySelectorAll(".cherry-dropdown");Co(t).call(t,(function(t){e&&t.dataset.name===e||t.dispatchEvent(new Event("EditorHideToolbarSubMenu"))}))}}]),e}();function cp(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}function up(e,t,n){var r,i={};return Co(r=Ao(e)).call(r,(function(r){-1!==$c(t).call(t,r)&&("object"===Er(n)?"string"==typeof n[r]?Er(e[r])===n[r]&&(i[r]=e[r]):e[r]instanceof n[r]&&(i[r]=e[r]):"string"==typeof n&&Er(e[r])===n&&(i[r]=e[r]))})),i}var fp={HOOKS_TYPE_LIST:Go},dp=[];Gu()||Co(dp).call(dp,(function(e){}));var pp=function(){function e(){vt(this,e)}return lo(e,null,[{key:"usePlugin",value:function(t){var n;if(this===e)throw new Error("`usePlugin` is not allowed to called through CherryStatic class.");if(this.initialized)throw new Error("The function `usePlugin` should be called before Cherry is instantiated.");if(!0!==t.$cherry$mounted){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];t.install.apply(t,yo(n=[this.config.defaults]).call(n,i)),t.$cherry$mounted=!0}}}]),e}();Ir(pp,"createSyntaxHook",(function(e,t,n){var r,i,a=t===Go.PAR?_s:Ko,o=up(n,["beforeMakeHtml","makeHtml","afterMakeHtml","rule","test"],"function");return i=r=function(e){St(n,e);var t=cp(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return vt(this,n),(e=t.call(this)).config=r.config,e}return lo(n,[{key:"beforeMakeHtml",value:function(){for(var e,t,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o.beforeMakeHtml?o.beforeMakeHtml.apply(this,i):(e=Cu(Nr(n.prototype),"beforeMakeHtml",this)).call.apply(e,yo(t=[this]).call(t,i))}},{key:"makeHtml",value:function(){for(var e,t,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o.makeHtml?o.makeHtml.apply(this,i):(e=Cu(Nr(n.prototype),"makeHtml",this)).call.apply(e,yo(t=[this]).call(t,i))}},{key:"afterMakeHtml",value:function(){for(var e,t,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o.afterMakeHtml?o.afterMakeHtml.apply(this,i):(e=Cu(Nr(n.prototype),"afterMakeHtml",this)).call.apply(e,yo(t=[this]).call(t,i))}},{key:"test",value:function(){for(var e,t,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o.test?o.test.apply(this,i):(e=Cu(Nr(n.prototype),"test",this)).call.apply(e,yo(t=[this]).call(t,i))}},{key:"rule",value:function(){for(var e,t,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o.rule?o.rule.apply(this,i):(e=Cu(Nr(n.prototype),"rule",this)).call.apply(e,yo(t=[this]).call(t,i))}}]),n}(a),Ir(r,"HOOK_NAME",e),i})),Ir(pp,"createMenuHook",(function(e,t){var n=up(t,["subMenuConfig","onClick","shortcutKeys","iconName"],{subMenuConfig:Array,onClick:"function",shortcutKeys:Array,iconName:"string"});return function(t){St(i,t);var r=cp(i);function i(t){var a;return vt(this,i),(a=r.call(this,t)).setName(e,n.iconName),a.subMenuConfig=n.subMenuConfig||[],a}return lo(i,[{key:"onClick",value:function(){for(var e,t,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n.onClick?n.onClick.apply(this,a):(e=Cu(Nr(i.prototype),"onClick",this)).call.apply(e,yo(t=[this]).call(t,a))}},{key:"shortcutKeys",get:function(){return n.shortcutKeys?n.shortcutKeys:[]}}]),i}(lp)})),Ir(pp,"constants",fp),Ir(pp,"VERSION","0.6.4");var hp=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},gp=oa(Object.keys,Object),mp=Object.prototype.hasOwnProperty;var vp=function(e){if(!ca(e))return gp(e);var t=[];for(var n in Object(e))mp.call(e,n)&&"constructor"!=n&&t.push(n);return t};var yp=function(e){return ba(e)?Wa(e):vp(e)};var bp=function(e,t){return e&&Ha(t,yp(t),e)};var wp=function(e,t){return e&&Ha(t,qa(t),e)};var _p=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a};var kp=function(){return[]},xp=Object.prototype.propertyIsEnumerable,Sp=Object.getOwnPropertySymbols,Cp=Sp?function(e){return null==e?[]:(e=Object(e),_p(Sp(e),(function(t){return xp.call(e,t)})))}:kp;var Ep=function(e,t){return Ha(e,Cp(e),t)};var Ap=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},Tp=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ap(t,Cp(e)),e=sa(e);return t}:kp;var Op=function(e,t){return Ha(e,Tp(e),t)};var Lp=function(e,t,n){var r=t(e);return va(e)?r:Ap(r,n(e))};var Mp=function(e){return Lp(e,yp,Cp)};var Rp=function(e){return Lp(e,qa,Tp)},Np=Ci(Qr,"DataView"),Pp=Ci(Qr,"Promise"),$p=Ci(Qr,"Set"),Ip=Ci(Qr,"WeakMap"),Dp=mi(Np),Hp=mi(Ei),Fp=mi(Pp),jp=mi($p),Bp=mi(Ip),zp=ci;(Np&&"[object DataView]"!=zp(new Np(new ArrayBuffer(1)))||Ei&&"[object Map]"!=zp(new Ei)||Pp&&"[object Promise]"!=zp(Pp.resolve())||$p&&"[object Set]"!=zp(new $p)||Ip&&"[object WeakMap]"!=zp(new Ip))&&(zp=function(e){var t=ci(e),n="[object Object]"==t?e.constructor:void 0,r=n?mi(n):"";if(r)switch(r){case Dp:return"[object DataView]";case Hp:return"[object Map]";case Fp:return"[object Promise]";case jp:return"[object Set]";case Bp:return"[object WeakMap]"}return t});var Wp=zp,Up=Object.prototype.hasOwnProperty;var Gp=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Up.call(e,"index")&&(n.index=e.index,n.input=e.input),n};var Kp=function(e,t){var n=t?ta(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},qp=/\w*$/;var Xp=function(e){var t=new e.constructor(e.source,qp.exec(e));return t.lastIndex=e.lastIndex,t},Yp=ei?ei.prototype:void 0,Vp=Yp?Yp.valueOf:void 0;var Zp=function(e){return Vp?Object(Vp.call(e)):{}};var Jp=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return ta(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return Kp(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return na(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return Xp(e);case"[object Set]":return new r;case"[object Symbol]":return Zp(e)}};var Qp=function(e){return fa(e)&&"[object Map]"==Wp(e)},eh=Ra&&Ra.isMap,th=eh?Ma(eh):Qp;var nh=function(e){return fa(e)&&"[object Set]"==Wp(e)},rh=Ra&&Ra.isSet,ih=rh?Ma(rh):nh,ah={};ah["[object Arguments]"]=ah["[object Array]"]=ah["[object ArrayBuffer]"]=ah["[object DataView]"]=ah["[object Boolean]"]=ah["[object Date]"]=ah["[object Float32Array]"]=ah["[object Float64Array]"]=ah["[object Int8Array]"]=ah["[object Int16Array]"]=ah["[object Int32Array]"]=ah["[object Map]"]=ah["[object Number]"]=ah["[object Object]"]=ah["[object RegExp]"]=ah["[object Set]"]=ah["[object String]"]=ah["[object Symbol]"]=ah["[object Uint8Array]"]=ah["[object Uint8ClampedArray]"]=ah["[object Uint16Array]"]=ah["[object Uint32Array]"]=!0,ah["[object Error]"]=ah["[object Function]"]=ah["[object WeakMap]"]=!1;var oh=function e(t,n,r,i,a,o){var s,l=1&n,c=2&n,u=4&n;if(r&&(s=a?r(t,i,a,o):r(t)),void 0!==s)return s;if(!ui(t))return t;var f=va(t);if(f){if(s=Gp(t),!l)return ra(t,s)}else{var d=Wp(t),p="[object Function]"==d||"[object GeneratorFunction]"==d;if(ka(t))return Qi(t,l);if("[object Object]"==d||"[object Arguments]"==d||p&&!a){if(s=c||p?{}:ua(t),!l)return c?Op(t,wp(s,t)):Ep(t,bp(s,t))}else{if(!ah[d])return a?t:{};s=Jp(t,d,l)}}o||(o=new Xi);var h=o.get(t);if(h)return h;o.set(t,s),ih(t)?t.forEach((function(i){s.add(e(i,n,r,i,t,o))})):th(t)&&t.forEach((function(i,a){s.set(a,e(i,n,r,a,t,o))}));var g=f?void 0:(u?c?Rp:Mp:c?qa:yp)(t);return hp(g||t,(function(i,a){g&&(i=t[a=i]),Da(s,a,e(i,n,r,a,t,o))})),s};var sh=function(e){return oh(e,5)},lh={urlProcessor:function(e,t){return e},fileUpload:function(e,t){t("images/demo-dog.png")},afterChange:function(e,t){},afterInit:function(e,t){},beforeImageMounted:function(e,t){return{srcProp:e,src:t}}},ch=sh({externals:{},engine:{global:{classicBr:!1,urlProcessor:lh.urlProcessor,htmlWhiteList:""},syntax:{list:{listNested:!1,indentSpace:2},table:{enableChart:!1},inlineCode:{theme:"red"},codeBlock:{theme:"dark",wrap:!0,lineNumber:!0,customRenderer:{}},emoji:{useUnicode:!0},fontEmphasis:{allowWhitespace:!1},strikethrough:{needWhitespace:!1},mathBlock:{engine:"MathJax",src:"",plugins:!0},inlineMath:{engine:"MathJax",src:""},toc:{allowMultiToc:!1}}},editor:{theme:"default",height:"100%",defaultModel:"edit&preview"},toolbars:{theme:"dark",showToolbar:!0,toolbar:["bold","italic","strikethrough","|","color","header","|","list",{insert:["image","audio","video","link","hr","br","code","formula","toc","table","line-table","bar-table","pdf","word"]},"graph","settings"],sidebar:[],bubble:["bold","italic","underline","strikethrough","sub","sup","|","size","color"],float:["h1","h2","h3","|","checklist","quote","quickTable","code"]},fileUpload:lh.fileUpload,callback:{afterChange:lh.afterChange,afterInit:lh.afterInit,beforeImageMounted:lh.beforeImageMounted},previewer:{dom:!1,className:"cherry-markdown"},isPreviewOnly:!1,autoScrollByCursor:!0,forceAppend:!0});function uh(e,t){if(dl(t))return t}function fh(e){var t=function(){if("undefined"==typeof Reflect||!mt)return!1;if(mt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(mt(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nr(e);if(t){var i=Nr(this).constructor;n=mt(r,arguments,i)}else n=r.apply(this,arguments);return Or(this,n)}}var dh=function(e){St(n,e);var t=fh(n);function n(e){var r;vt(this,n),r=t.call(this),n.initialized=!0;var i,a=sh(n.config.defaults),o=so({},a,e,uh);"function"==typeof o.engine.global.urlProcessor&&(o.engine.global.urlProcessor=(i=o.engine.global.urlProcessor,function(e,t){if(rd.isInnerLink(e)){var n=i(rd.get(e),t);return rd.replace(e,n)}return i(e,t)}));var s=new rp(o,{options:o});return Or(r,s)}return n}(pp);Ir(dh,"initialized",!1),Ir(dh,"config",{defaults:ch}),e.MenuHookBase=lp,e.SyntaxHookBase=Ko,e.default=dh,Object.defineProperty(e,"__esModule",{value:!0})}));