diff --git a/DatenLord.png b/DatenLord.png new file mode 100644 index 0000000..f87d53e Binary files /dev/null and b/DatenLord.png differ diff --git a/assets/cncf-logo-text-9f32c1ea.png b/assets/cncf-logo-text-9f32c1ea.png new file mode 100644 index 0000000..2c09bb4 Binary files /dev/null and b/assets/cncf-logo-text-9f32c1ea.png differ diff --git a/assets/contribute-cover-754f3436.svg b/assets/contribute-cover-754f3436.svg new file mode 100644 index 0000000..2818940 --- /dev/null +++ b/assets/contribute-cover-754f3436.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/contribute-how-f55a255f.svg b/assets/contribute-how-f55a255f.svg new file mode 100644 index 0000000..1c15b88 --- /dev/null +++ b/assets/contribute-how-f55a255f.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/discord-icon-7417d9bb.svg b/assets/discord-icon-7417d9bb.svg new file mode 100644 index 0000000..952f47f --- /dev/null +++ b/assets/discord-icon-7417d9bb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/dot-37a9b3fe.svg b/assets/dot-37a9b3fe.svg new file mode 100644 index 0000000..7a9ffca --- /dev/null +++ b/assets/dot-37a9b3fe.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/dropIcon-525fd0e1.svg b/assets/dropIcon-525fd0e1.svg new file mode 100644 index 0000000..dcdb17d --- /dev/null +++ b/assets/dropIcon-525fd0e1.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/dropIconActive-9bdef1aa.svg b/assets/dropIconActive-9bdef1aa.svg new file mode 100644 index 0000000..daf414d --- /dev/null +++ b/assets/dropIconActive-9bdef1aa.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/dropdown-active-7d279a33.svg b/assets/dropdown-active-7d279a33.svg new file mode 100644 index 0000000..c1625a6 --- /dev/null +++ b/assets/dropdown-active-7d279a33.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/dropdown-close-533c3c65.svg b/assets/dropdown-close-533c3c65.svg new file mode 100644 index 0000000..c57875f --- /dev/null +++ b/assets/dropdown-close-533c3c65.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/footer-background-8643bf7b.svg b/assets/footer-background-8643bf7b.svg new file mode 100644 index 0000000..efd7d38 --- /dev/null +++ b/assets/footer-background-8643bf7b.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/github-icon-7701b5d6.svg b/assets/github-icon-7701b5d6.svg new file mode 100644 index 0000000..256b1a3 --- /dev/null +++ b/assets/github-icon-7701b5d6.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/home-cover-d1b85aac.png b/assets/home-cover-d1b85aac.png new file mode 100644 index 0000000..46042d7 Binary files /dev/null and b/assets/home-cover-d1b85aac.png differ diff --git a/assets/home-feature-e6cc5478.png b/assets/home-feature-e6cc5478.png new file mode 100644 index 0000000..7847209 Binary files /dev/null and b/assets/home-feature-e6cc5478.png differ diff --git a/assets/home-feature-icon-1-633a0944.svg b/assets/home-feature-icon-1-633a0944.svg new file mode 100644 index 0000000..81c584b --- /dev/null +++ b/assets/home-feature-icon-1-633a0944.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/home-feature-icon-2-f72f9c54.svg b/assets/home-feature-icon-2-f72f9c54.svg new file mode 100644 index 0000000..14e807f --- /dev/null +++ b/assets/home-feature-icon-2-f72f9c54.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/home-feature-icon-3-f98e76a4.svg b/assets/home-feature-icon-3-f98e76a4.svg new file mode 100644 index 0000000..b6056de --- /dev/null +++ b/assets/home-feature-icon-3-f98e76a4.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assets/home-feature-icon-4-25befa9a.svg b/assets/home-feature-icon-4-25befa9a.svg new file mode 100644 index 0000000..38e3457 --- /dev/null +++ b/assets/home-feature-icon-4-25befa9a.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/home-innovation-48569455.svg b/assets/home-innovation-48569455.svg new file mode 100644 index 0000000..b3b4ebc --- /dev/null +++ b/assets/home-innovation-48569455.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/home-introduction-7de62c15.png b/assets/home-introduction-7de62c15.png new file mode 100644 index 0000000..24b4738 Binary files /dev/null and b/assets/home-introduction-7de62c15.png differ diff --git a/assets/home-menu-icon-459d13f5.svg b/assets/home-menu-icon-459d13f5.svg new file mode 100644 index 0000000..26f88ef --- /dev/null +++ b/assets/home-menu-icon-459d13f5.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/image1-9be52310.png b/assets/image1-9be52310.png new file mode 100644 index 0000000..b9bd183 Binary files /dev/null and b/assets/image1-9be52310.png differ diff --git a/assets/image2-baebe8ee.png b/assets/image2-baebe8ee.png new file mode 100644 index 0000000..7acd7c0 Binary files /dev/null and b/assets/image2-baebe8ee.png differ diff --git a/assets/image3-a2f91129.png b/assets/image3-a2f91129.png new file mode 100644 index 0000000..7ac3e0d Binary files /dev/null and b/assets/image3-a2f91129.png differ diff --git a/assets/image4-feb06521.png b/assets/image4-feb06521.png new file mode 100644 index 0000000..f360dde Binary files /dev/null and b/assets/image4-feb06521.png differ diff --git a/assets/index-2a23f03d.js b/assets/index-2a23f03d.js new file mode 100644 index 0000000..1014b6b --- /dev/null +++ b/assets/index-2a23f03d.js @@ -0,0 +1,5778 @@ +var Y8=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var DV=Y8((UV,pd)=>{function V8(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function s2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var k={},G8={get exports(){return k},set exports(e){k=e}},hh={},ce={},K8={get exports(){return ce},set exports(e){ce=e}},Qe={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var hc=Symbol.for("react.element"),X8=Symbol.for("react.portal"),Q8=Symbol.for("react.fragment"),Z8=Symbol.for("react.strict_mode"),J8=Symbol.for("react.profiler"),eS=Symbol.for("react.provider"),tS=Symbol.for("react.context"),nS=Symbol.for("react.forward_ref"),rS=Symbol.for("react.suspense"),iS=Symbol.for("react.memo"),aS=Symbol.for("react.lazy"),Dy=Symbol.iterator;function sS(e){return e===null||typeof e!="object"?null:(e=Dy&&e[Dy]||e["@@iterator"],typeof e=="function"?e:null)}var o2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},l2=Object.assign,c2={};function Ao(e,t,n){this.props=e,this.context=t,this.refs=c2,this.updater=n||o2}Ao.prototype.isReactComponent={};Ao.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ao.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function u2(){}u2.prototype=Ao.prototype;function rg(e,t,n){this.props=e,this.context=t,this.refs=c2,this.updater=n||o2}var ig=rg.prototype=new u2;ig.constructor=rg;l2(ig,Ao.prototype);ig.isPureReactComponent=!0;var Ly=Array.isArray,d2=Object.prototype.hasOwnProperty,ag={current:null},h2={key:!0,ref:!0,__self:!0,__source:!0};function f2(e,t,n){var r,i={},a=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(a=""+t.key),t)d2.call(t,r)&&!h2.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1>>1,T=B[N];if(0>>1;Ni(ge,X))$i(Ee,ge)?(B[N]=Ee,B[$]=X,N=$):(B[N]=ge,B[ne]=X,N=ne);else if($i(Ee,X))B[N]=Ee,B[$]=X,N=$;else break e}}return Y}function i(B,Y){var X=B.sortIndex-Y.sortIndex;return X!==0?X:B.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],c=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(B){for(var Y=n(c);Y!==null;){if(Y.callback===null)r(c);else if(Y.startTime<=B)r(c),Y.sortIndex=Y.expirationTime,t(l,Y);else break;Y=n(c)}}function _(B){if(h=!1,x(B),!m)if(n(l)!==null)m=!0,O(A);else{var Y=n(c);Y!==null&&V(_,Y.startTime-B)}}function A(B,Y){m=!1,h&&(h=!1,y(F),F=-1),p=!0;var X=f;try{for(x(Y),d=n(l);d!==null&&(!(d.expirationTime>Y)||B&&!W());){var N=d.callback;if(typeof N=="function"){d.callback=null,f=d.priorityLevel;var T=N(d.expirationTime<=Y);Y=e.unstable_now(),typeof T=="function"?d.callback=T:d===n(l)&&r(l),x(Y)}else r(l);d=n(l)}if(d!==null)var Q=!0;else{var ne=n(c);ne!==null&&V(_,ne.startTime-Y),Q=!1}return Q}finally{d=null,f=X,p=!1}}var E=!1,R=null,F=-1,q=5,K=-1;function W(){return!(e.unstable_now()-KB||125N?(B.sortIndex=X,t(c,B),n(l)===null&&B===n(c)&&(h?(y(F),F=-1):h=!0,V(_,X-N))):(B.sortIndex=T,t(l,B),m||p||(m=!0,O(A))),B},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(B){var Y=f;return function(){var X=f;f=Y;try{return B.apply(this,arguments)}finally{f=X}}}})(m2);(function(e){e.exports=m2})(bS);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var g2=ce,Qn=bp;function re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vp=Object.prototype.hasOwnProperty,vS=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,zy={},Fy={};function wS(e){return vp.call(Fy,e)?!0:vp.call(zy,e)?!1:vS.test(e)?Fy[e]=!0:(zy[e]=!0,!1)}function xS(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function kS(e,t,n,r){if(t===null||typeof t>"u"||xS(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function An(e,t,n,r,i,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var hn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){hn[e]=new An(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];hn[t]=new An(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){hn[e]=new An(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){hn[e]=new An(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){hn[e]=new An(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){hn[e]=new An(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){hn[e]=new An(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){hn[e]=new An(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){hn[e]=new An(e,5,!1,e.toLowerCase(),null,!1,!1)});var og=/[\-:]([a-z])/g;function lg(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(og,lg);hn[t]=new An(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(og,lg);hn[t]=new An(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(og,lg);hn[t]=new An(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){hn[e]=new An(e,1,!1,e.toLowerCase(),null,!1,!1)});hn.xlinkHref=new An("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){hn[e]=new An(e,1,!1,e.toLowerCase(),null,!0,!0)});function cg(e,t,n,r){var i=hn.hasOwnProperty(t)?hn[t]:null;(i!==null?i.type!==0:r||!(2o||i[s]!==a[o]){var l=` +`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=o);break}}}finally{q0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ol(e):""}function SS(e){switch(e.tag){case 5:return ol(e.type);case 16:return ol("Lazy");case 13:return ol("Suspense");case 19:return ol("SuspenseList");case 0:case 2:case 15:return e=H0(e.type,!1),e;case 11:return e=H0(e.type.render,!1),e;case 1:return e=H0(e.type,!0),e;default:return""}}function Sp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ps:return"Fragment";case Ls:return"Portal";case wp:return"Profiler";case ug:return"StrictMode";case xp:return"Suspense";case kp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case v2:return(e.displayName||"Context")+".Consumer";case b2:return(e._context.displayName||"Context")+".Provider";case dg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hg:return t=e.displayName||null,t!==null?t:Sp(e.type)||"Memo";case Ji:t=e._payload,e=e._init;try{return Sp(e(t))}catch{}}return null}function _S(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Sp(t);case 8:return t===ug?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function x2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ES(e){var t=x2(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,a.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vc(e){e._valueTracker||(e._valueTracker=ES(e))}function k2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=x2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function md(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function _p(e,t){var n=t.checked;return Ft({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $y(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xa(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function S2(e,t){t=t.checked,t!=null&&cg(e,"checked",t,!1)}function Ep(e,t){S2(e,t);var n=xa(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Cp(e,t.type,n):t.hasOwnProperty("defaultValue")&&Cp(e,t.type,xa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Uy(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Cp(e,t,n){(t!=="number"||md(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ll=Array.isArray;function eo(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Gc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ol(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CS=["Webkit","ms","Moz","O"];Object.keys(pl).forEach(function(e){CS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pl[t]=pl[e]})});function T2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pl.hasOwnProperty(e)&&pl[e]?(""+t).trim():t+"px"}function A2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=T2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var TS=Ft({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Np(e,t){if(t){if(TS[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(re(62))}}function Mp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rp=null;function fg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ip=null,to=null,no=null;function Hy(e){if(e=mc(e)){if(typeof Ip!="function")throw Error(re(280));var t=e.stateNode;t&&(t=yh(t),Ip(e.stateNode,e.type,t))}}function N2(e){to?no?no.push(e):no=[e]:to=e}function M2(){if(to){var e=to,t=no;if(no=to=null,Hy(e),t)for(e=0;e>>=0,e===0?32:31-(FS(e)/BS|0)|0}var Kc=64,Xc=4194304;function cl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vd(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=n&268435455;if(s!==0){var o=s&~i;o!==0?r=cl(o):(a&=s,a!==0&&(r=cl(a)))}else s=n&~i,s!==0?r=cl(s):a!==0&&(r=cl(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function fc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lr(t),e[t]=n}function qS(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=gl),Jy=String.fromCharCode(32),eb=!1;function X2(e,t){switch(e){case"keyup":return y9.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Q2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zs=!1;function v9(e,t){switch(e){case"compositionend":return Q2(t);case"keypress":return t.which!==32?null:(eb=!0,Jy);case"textInput":return e=t.data,e===Jy&&eb?null:e;default:return null}}function w9(e,t){if(zs)return e==="compositionend"||!xg&&X2(e,t)?(e=G2(),Yu=bg=ra=null,zs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ib(n)}}function tx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nx(){for(var e=window,t=md();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=md(e.document)}return t}function kg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function N9(e){var t=nx(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tx(n.ownerDocument.documentElement,n)){if(r!==null&&kg(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=ab(n,a);var s=ab(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Fs=null,Fp=null,bl=null,Bp=!1;function sb(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Bp||Fs==null||Fs!==md(r)||(r=Fs,"selectionStart"in r&&kg(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),bl&&Bl(bl,r)||(bl=r,r=kd(Fp,"onSelect"),0Us||(e.current=Wp[Us],Wp[Us]=null,Us--)}function vt(e,t){Us++,Wp[Us]=e.current,e.current=t}var ka={},vn=Aa(ka),Bn=Aa(!1),ts=ka;function bo(e,t){var n=e.type.contextTypes;if(!n)return ka;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function $n(e){return e=e.childContextTypes,e!=null}function _d(){Ct(Bn),Ct(vn)}function fb(e,t,n){if(vn.current!==ka)throw Error(re(168));vt(vn,t),vt(Bn,n)}function dx(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(re(108,_S(e)||"Unknown",i));return Ft({},n,r)}function Ed(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ka,ts=vn.current,vt(vn,e),vt(Bn,Bn.current),!0}function pb(e,t,n){var r=e.stateNode;if(!r)throw Error(re(169));n?(e=dx(e,t,ts),r.__reactInternalMemoizedMergedChildContext=e,Ct(Bn),Ct(vn),vt(vn,e)):Ct(Bn),vt(Bn,n)}var xi=null,bh=!1,af=!1;function hx(e){xi===null?xi=[e]:xi.push(e)}function U9(e){bh=!0,hx(e)}function Na(){if(!af&&xi!==null){af=!0;var e=0,t=dt;try{var n=xi;for(dt=1;e>=s,i-=s,Si=1<<32-Lr(t)+i|n<F?(q=R,R=null):q=R.sibling;var K=f(y,R,x[F],_);if(K===null){R===null&&(R=q);break}e&&R&&K.alternate===null&&t(y,R),v=a(K,v,F),E===null?A=K:E.sibling=K,E=K,R=q}if(F===x.length)return n(y,R),Mt&&$a(y,F),A;if(R===null){for(;FF?(q=R,R=null):q=R.sibling;var W=f(y,R,K.value,_);if(W===null){R===null&&(R=q);break}e&&R&&W.alternate===null&&t(y,R),v=a(W,v,F),E===null?A=W:E.sibling=W,E=W,R=q}if(K.done)return n(y,R),Mt&&$a(y,F),A;if(R===null){for(;!K.done;F++,K=x.next())K=d(y,K.value,_),K!==null&&(v=a(K,v,F),E===null?A=K:E.sibling=K,E=K);return Mt&&$a(y,F),A}for(R=r(y,R);!K.done;F++,K=x.next())K=p(R,y,F,K.value,_),K!==null&&(e&&K.alternate!==null&&R.delete(K.key===null?F:K.key),v=a(K,v,F),E===null?A=K:E.sibling=K,E=K);return e&&R.forEach(function(G){return t(y,G)}),Mt&&$a(y,F),A}function w(y,v,x,_){if(typeof x=="object"&&x!==null&&x.type===Ps&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Yc:e:{for(var A=x.key,E=v;E!==null;){if(E.key===A){if(A=x.type,A===Ps){if(E.tag===7){n(y,E.sibling),v=i(E,x.props.children),v.return=y,y=v;break e}}else if(E.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Ji&&xb(A)===E.type){n(y,E.sibling),v=i(E,x.props),v.ref=Zo(y,E,x),v.return=y,y=v;break e}n(y,E);break}else t(y,E);E=E.sibling}x.type===Ps?(v=Za(x.props.children,y.mode,_,x.key),v.return=y,y=v):(_=ed(x.type,x.key,x.props,null,y.mode,_),_.ref=Zo(y,v,x),_.return=y,y=_)}return s(y);case Ls:e:{for(E=x.key;v!==null;){if(v.key===E)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){n(y,v.sibling),v=i(v,x.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=ff(x,y.mode,_),v.return=y,y=v}return s(y);case Ji:return E=x._init,w(y,v,E(x._payload),_)}if(ll(x))return m(y,v,x,_);if(Vo(x))return h(y,v,x,_);ru(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,v!==null&&v.tag===6?(n(y,v.sibling),v=i(v,x),v.return=y,y=v):(n(y,v),v=hf(x,y.mode,_),v.return=y,y=v),s(y)):n(y,v)}return w}var wo=wx(!0),xx=wx(!1),gc={},ei=Aa(gc),ql=Aa(gc),Hl=Aa(gc);function Ya(e){if(e===gc)throw Error(re(174));return e}function Rg(e,t){switch(vt(Hl,t),vt(ql,e),vt(ei,gc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ap(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ap(t,e)}Ct(ei),vt(ei,t)}function xo(){Ct(ei),Ct(ql),Ct(Hl)}function kx(e){Ya(Hl.current);var t=Ya(ei.current),n=Ap(t,e.type);t!==n&&(vt(ql,e),vt(ei,n))}function Ig(e){ql.current===e&&(Ct(ei),Ct(ql))}var Dt=Aa(0);function Rd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sf=[];function Og(){for(var e=0;en?n:4,e(!0);var r=of.transition;of.transition={};try{e(!1),t()}finally{dt=n,of.transition=r}}function Fx(){return mr().memoizedState}function W9(e,t,n){var r=ga(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bx(e))$x(t,n);else if(n=gx(e,t,n,r),n!==null){var i=Cn();Pr(n,e,r,i),Ux(n,t,r)}}function Y9(e,t,n){var r=ga(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bx(e))$x(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,o=a(s,n);if(i.hasEagerState=!0,i.eagerState=o,Fr(o,s)){var l=t.interleaved;l===null?(i.next=i,Ng(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=gx(e,t,i,r),n!==null&&(i=Cn(),Pr(n,e,r,i),Ux(n,t,r))}}function Bx(e){var t=e.alternate;return e===zt||t!==null&&t===zt}function $x(e,t){vl=Id=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ux(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mg(e,n)}}var Od={readContext:pr,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useInsertionEffect:pn,useLayoutEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useMutableSource:pn,useSyncExternalStore:pn,useId:pn,unstable_isNewReconciler:!1},V9={readContext:pr,useCallback:function(e,t){return Yr().memoizedState=[e,t===void 0?null:t],e},useContext:pr,useEffect:Sb,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Xu(4194308,4,Ox.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xu(4,2,e,t)},useMemo:function(e,t){var n=Yr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Yr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=W9.bind(null,zt,e),[r.memoizedState,e]},useRef:function(e){var t=Yr();return e={current:e},t.memoizedState=e},useState:kb,useDebugValue:Fg,useDeferredValue:function(e){return Yr().memoizedState=e},useTransition:function(){var e=kb(!1),t=e[0];return e=H9.bind(null,e[1]),Yr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=zt,i=Yr();if(Mt){if(n===void 0)throw Error(re(407));n=n()}else{if(n=t(),on===null)throw Error(re(349));rs&30||Ex(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Sb(Tx.bind(null,r,a,e),[e]),r.flags|=2048,Vl(9,Cx.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Yr(),t=on.identifierPrefix;if(Mt){var n=_i,r=Si;n=(r&~(1<<32-Lr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Wl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Xr]=t,e[jl]=r,Xx(e,t,!1,!1),t.stateNode=e;e:{switch(s=Mp(n,r),n){case"dialog":St("cancel",e),St("close",e),i=r;break;case"iframe":case"object":case"embed":St("load",e),i=r;break;case"video":case"audio":for(i=0;iSo&&(t.flags|=128,r=!0,Jo(a,!1),t.lanes=4194304)}else{if(!r)if(e=Rd(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Jo(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!Mt)return mn(t),null}else 2*Ht()-a.renderingStartTime>So&&n!==1073741824&&(t.flags|=128,r=!0,Jo(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(n=a.last,n!==null?n.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ht(),t.sibling=null,n=Dt.current,vt(Dt,r?n&1|2:n&1),t):(mn(t),null);case 22:case 23:return Hg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Wn&1073741824&&(mn(t),t.subtreeFlags&6&&(t.flags|=8192)):mn(t),null;case 24:return null;case 25:return null}throw Error(re(156,t.tag))}function t_(e,t){switch(_g(t),t.tag){case 1:return $n(t.type)&&_d(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xo(),Ct(Bn),Ct(vn),Og(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ig(t),null;case 13:if(Ct(Dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(re(340));vo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ct(Dt),null;case 4:return xo(),null;case 10:return Ag(t.type._context),null;case 22:case 23:return Hg(),null;case 24:return null;default:return null}}var au=!1,gn=!1,n_=typeof WeakSet=="function"?WeakSet:Set,we=null;function Ws(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Bt(e,t,r)}else n.current=null}function rm(e,t,n){try{n()}catch(r){Bt(e,t,r)}}var Ib=!1;function r_(e,t){if($p=wd,e=nx(),kg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var s=0,o=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(o=s+i),d!==a||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===i&&(o=s),f===a&&++u===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Up={focusedElem:e,selectionRange:n},wd=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var h=m.memoizedProps,w=m.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?h:Ar(t.type,h),w);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(re(163))}}catch(_){Bt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return m=Ib,Ib=!1,m}function wl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&rm(t,n,a)}i=i.next}while(i!==r)}}function xh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function im(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Jx(e){var t=e.alternate;t!==null&&(e.alternate=null,Jx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xr],delete t[jl],delete t[Hp],delete t[B9],delete t[$9])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function e3(e){return e.tag===5||e.tag===3||e.tag===4}function Ob(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||e3(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function am(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Sd));else if(r!==4&&(e=e.child,e!==null))for(am(e,t,n),e=e.sibling;e!==null;)am(e,t,n),e=e.sibling}function sm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(sm(e,t,n),e=e.sibling;e!==null;)sm(e,t,n),e=e.sibling}var un=null,Nr=!1;function Ki(e,t,n){for(n=n.child;n!==null;)t3(e,t,n),n=n.sibling}function t3(e,t,n){if(Jr&&typeof Jr.onCommitFiberUnmount=="function")try{Jr.onCommitFiberUnmount(fh,n)}catch{}switch(n.tag){case 5:gn||Ws(n,t);case 6:var r=un,i=Nr;un=null,Ki(e,t,n),un=r,Nr=i,un!==null&&(Nr?(e=un,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):un.removeChild(n.stateNode));break;case 18:un!==null&&(Nr?(e=un,n=n.stateNode,e.nodeType===8?rf(e.parentNode,n):e.nodeType===1&&rf(e,n),zl(e)):rf(un,n.stateNode));break;case 4:r=un,i=Nr,un=n.stateNode.containerInfo,Nr=!0,Ki(e,t,n),un=r,Nr=i;break;case 0:case 11:case 14:case 15:if(!gn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,s=a.destroy;a=a.tag,s!==void 0&&(a&2||a&4)&&rm(n,t,s),i=i.next}while(i!==r)}Ki(e,t,n);break;case 1:if(!gn&&(Ws(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){Bt(n,t,o)}Ki(e,t,n);break;case 21:Ki(e,t,n);break;case 22:n.mode&1?(gn=(r=gn)||n.memoizedState!==null,Ki(e,t,n),gn=r):Ki(e,t,n);break;default:Ki(e,t,n)}}function Db(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new n_),t.forEach(function(r){var i=h_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Cr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~a}if(r=i,r=Ht()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*a_(r/1960))-r,10e?16:e,ia===null)var r=!1;else{if(e=ia,ia=null,Pd=0,rt&6)throw Error(re(331));var i=rt;for(rt|=4,we=e.current;we!==null;){var a=we,s=a.child;if(we.flags&16){var o=a.deletions;if(o!==null){for(var l=0;lHt()-jg?Qa(e,0):Ug|=n),Un(e,t)}function c3(e,t){t===0&&(e.mode&1?(t=Xc,Xc<<=1,!(Xc&130023424)&&(Xc=4194304)):t=1);var n=Cn();e=Li(e,t),e!==null&&(fc(e,t,n),Un(e,n))}function d_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),c3(e,n)}function h_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(re(314))}r!==null&&r.delete(t),c3(e,n)}var u3;u3=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Bn.current)zn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zn=!1,J9(e,t,n);zn=!!(e.flags&131072)}else zn=!1,Mt&&t.flags&1048576&&fx(t,Td,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qu(e,t),e=t.pendingProps;var i=bo(t,vn.current);io(t,n),i=Lg(null,t,r,e,i,n);var a=Pg();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$n(r)?(a=!0,Ed(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Mg(t),i.updater=vh,t.stateNode=i,i._reactInternals=t,Xp(t,r,e,n),t=Jp(null,t,r,!0,a,n)):(t.tag=0,Mt&&a&&Sg(t),kn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qu(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=p_(r),e=Ar(r,e),i){case 0:t=Zp(null,t,r,e,n);break e;case 1:t=Nb(null,t,r,e,n);break e;case 11:t=Tb(null,t,r,e,n);break e;case 14:t=Ab(null,t,r,Ar(r.type,e),n);break e}throw Error(re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ar(r,i),Zp(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ar(r,i),Nb(e,t,r,i,n);case 3:e:{if(Vx(t),e===null)throw Error(re(387));r=t.pendingProps,a=t.memoizedState,i=a.element,yx(e,t),Md(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=ko(Error(re(423)),t),t=Mb(e,t,r,n,i);break e}else if(r!==i){i=ko(Error(re(424)),t),t=Mb(e,t,r,n,i);break e}else for(Gn=fa(t.stateNode.containerInfo.firstChild),Kn=t,Mt=!0,Rr=null,n=xx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vo(),r===i){t=Pi(e,t,n);break e}kn(e,t,r,n)}t=t.child}return t;case 5:return kx(t),e===null&&Vp(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,jp(r,i)?s=null:a!==null&&jp(r,a)&&(t.flags|=32),Yx(e,t),kn(e,t,s,n),t.child;case 6:return e===null&&Vp(t),null;case 13:return Gx(e,t,n);case 4:return Rg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=wo(t,null,r,n):kn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ar(r,i),Tb(e,t,r,i,n);case 7:return kn(e,t,t.pendingProps,n),t.child;case 8:return kn(e,t,t.pendingProps.children,n),t.child;case 12:return kn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,vt(Ad,r._currentValue),r._currentValue=s,a!==null)if(Fr(a.value,s)){if(a.children===i.children&&!Bn.current){t=Pi(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var o=a.dependencies;if(o!==null){s=a.child;for(var l=o.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=Ai(-1,n&-n),l.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),Gp(a.return,n,t),o.lanes|=n;break}l=l.next}}else if(a.tag===10)s=a.type===t.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(re(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Gp(s,n,t),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}kn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,io(t,n),i=pr(i),r=r(i),t.flags|=1,kn(e,t,r,n),t.child;case 14:return r=t.type,i=Ar(r,t.pendingProps),i=Ar(r.type,i),Ab(e,t,r,i,n);case 15:return Hx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ar(r,i),Qu(e,t),t.tag=1,$n(r)?(e=!0,Ed(t)):e=!1,io(t,n),vx(t,r,i),Xp(t,r,i,n),Jp(null,t,r,!0,e,n);case 19:return Kx(e,t,n);case 22:return Wx(e,t,n)}throw Error(re(156,t.tag))};function d3(e,t){return z2(e,t)}function f_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dr(e,t,n,r){return new f_(e,t,n,r)}function Yg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function p_(e){if(typeof e=="function")return Yg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===dg)return 11;if(e===hg)return 14}return 2}function ya(e,t){var n=e.alternate;return n===null?(n=dr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ed(e,t,n,r,i,a){var s=2;if(r=e,typeof e=="function")Yg(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Ps:return Za(n.children,i,a,t);case ug:s=8,i|=8;break;case wp:return e=dr(12,n,t,i|2),e.elementType=wp,e.lanes=a,e;case xp:return e=dr(13,n,t,i),e.elementType=xp,e.lanes=a,e;case kp:return e=dr(19,n,t,i),e.elementType=kp,e.lanes=a,e;case w2:return Sh(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case b2:s=10;break e;case v2:s=9;break e;case dg:s=11;break e;case hg:s=14;break e;case Ji:s=16,r=null;break e}throw Error(re(130,e==null?e:typeof e,""))}return t=dr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Za(e,t,n,r){return e=dr(7,e,r,t),e.lanes=n,e}function Sh(e,t,n,r){return e=dr(22,e,r,t),e.elementType=w2,e.lanes=n,e.stateNode={isHidden:!1},e}function hf(e,t,n){return e=dr(6,e,null,t),e.lanes=n,e}function ff(e,t,n){return t=dr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function m_(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Y0(0),this.expirationTimes=Y0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Y0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Vg(e,t,n,r,i,a,s,o,l){return e=new m_(e,t,n,o,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=dr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mg(a),e}function g_(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Zn})(yS);var jb=yp;gp.createRoot=jb.createRoot,gp.hydrateRoot=jb.hydrateRoot;/** + * @remix-run/router v1.4.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function nt(){return nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ss(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function k_(){return Math.random().toString(36).substr(2,8)}function Hb(e,t){return{usr:e.state,key:e.key,idx:t}}function Kl(e,t,n,r){return n===void 0&&(n=null),nt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?oi(t):t,{state:n,key:t&&t.key||r||k_()})}function zi(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function oi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function S_(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,s=i.history,o=jt.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(nt({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){o=jt.Pop;let w=u(),y=w==null?null:w-c;c=w,l&&l({action:o,location:h.location,delta:y})}function f(w,y){o=jt.Push;let v=Kl(h.location,w,y);n&&n(v,w),c=u()+1;let x=Hb(v,c),_=h.createHref(v);try{s.pushState(x,"",_)}catch{i.location.assign(_)}a&&l&&l({action:o,location:h.location,delta:1})}function p(w,y){o=jt.Replace;let v=Kl(h.location,w,y);n&&n(v,w),c=u();let x=Hb(v,c),_=h.createHref(v);s.replaceState(x,"",_),a&&l&&l({action:o,location:h.location,delta:0})}function m(w){let y=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof w=="string"?w:zi(w);return He(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let h={get action(){return o},get location(){return e(i,s)},listen(w){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(qb,d),l=w,()=>{i.removeEventListener(qb,d),l=null}},createHref(w){return t(i,w)},createURL:m,encodeLocation(w){let y=m(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:p,go(w){return s.go(w)}};return h}var Jt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Jt||(Jt={}));const __=new Set(["lazy","caseSensitive","path","id","index","children"]);function E_(e){return e.index===!0}function m3(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,a)=>{let s=[...n,a],o=typeof i.id=="string"?i.id:s.join("-");if(He(i.index!==!0||!i.children,"Cannot specify children on an index route"),He(!r[o],'Found a route id collision on id "'+o+`". Route id's must be globally unique within Data Router usages`),E_(i)){let l=nt({},i,{hasErrorBoundary:t(i),id:o});return r[o]=l,l}else{let l=nt({},i,{id:o,hasErrorBoundary:t(i),children:void 0});return r[o]=l,i.children&&(l.children=m3(i.children,t,s,r)),l}})}function Vs(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?oi(t):t,i=yc(r.pathname||"/",n);if(i==null)return null;let a=g3(e);C_(a);let s=null;for(let o=0;s==null&&o{let l={relativePath:o===void 0?a.path||"":o,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};l.relativePath.startsWith("/")&&(He(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Ni([r,l.relativePath]),u=n.concat(l);a.children&&a.children.length>0&&(He(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),g3(a.children,t,u,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:O_(c,a.index),routesMeta:u})};return e.forEach((a,s)=>{var o;if(a.path===""||!((o=a.path)!=null&&o.includes("?")))i(a,s);else for(let l of y3(a.path))i(a,s,l)}),t}function y3(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let s=y3(r.join("/")),o=[];return o.push(...s.map(l=>l===""?a:[a,l].join("/"))),i&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function C_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:D_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const T_=/^:\w+$/,A_=3,N_=2,M_=1,R_=10,I_=-2,Wb=e=>e==="*";function O_(e,t){let n=e.split("/"),r=n.length;return n.some(Wb)&&(r+=I_),t&&(r+=N_),n.filter(i=>!Wb(i)).reduce((i,a)=>i+(T_.test(a)?A_:a===""?M_:R_),r)}function D_(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function L_(e,t){let{routesMeta:n}=e,r={},i="/",a=[];for(let s=0;s{if(u==="*"){let f=o[d]||"";s=a.slice(0,a.length-f.length).replace(/(.)\/+$/,"$1")}return c[u]=B_(o[d]||"",u),c},{}),pathname:a,pathnameBase:s,pattern:e}}function z_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ss(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,o)=>(r.push(o),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function F_(e){try{return decodeURI(e)}catch(t){return ss(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function B_(e,t){try{return decodeURIComponent(e)}catch(n){return ss(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function yc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function $_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?oi(e):e;return{pathname:n?n.startsWith("/")?n:U_(n,t):t,search:q_(r),hash:H_(i)}}function U_(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function pf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Ah(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Qg(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=oi(e):(i=nt({},e),He(!i.pathname||!i.pathname.includes("?"),pf("?","pathname","search",i)),He(!i.pathname||!i.pathname.includes("#"),pf("#","pathname","hash",i)),He(!i.search||!i.search.includes("#"),pf("#","search","hash",i)));let a=e===""||i.pathname==="",s=a?"/":i.pathname,o;if(r||s==null)o=n;else{let d=t.length-1;if(s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}o=d>=0?t[d]:"/"}let l=$_(i,o),c=s&&s!=="/"&&s.endsWith("/"),u=(a||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Ni=e=>e.join("/").replace(/\/\/+/g,"/"),j_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),q_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,H_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Yb extends Error{}class W_{constructor(t,n){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],He(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let r;this.abortPromise=new Promise((a,s)=>r=s),this.controller=new AbortController;let i=()=>r(new Yb("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",i),this.controller.signal.addEventListener("abort",i),this.data=Object.entries(t).reduce((a,s)=>{let[o,l]=s;return Object.assign(a,{[o]:this.trackPromise(o,l)})},{}),this.done&&this.unlistenAbortSignal(),this.init=n}trackPromise(t,n){if(!(n instanceof Promise))return n;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let r=Promise.race([n,this.abortPromise]).then(i=>this.onSettle(r,t,null,i),i=>this.onSettle(r,t,i));return r.catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(t,n,r,i){return this.controller.signal.aborted&&r instanceof Yb?(this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>r}),Promise.reject(r)):(this.pendingKeysSet.delete(n),this.done&&this.unlistenAbortSignal(),r?(Object.defineProperty(t,"_error",{get:()=>r}),this.emit(!1,n),Promise.reject(r)):(Object.defineProperty(t,"_data",{get:()=>i}),this.emit(!1,n),i))}emit(t,n){this.subscribers.forEach(r=>r(t,n))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,n)=>this.pendingKeysSet.delete(n)),this.emit(!0)}async resolveData(t){let n=!1;if(!this.done){let r=()=>this.cancel();t.addEventListener("abort",r),n=await new Promise(i=>{this.subscribe(a=>{t.removeEventListener("abort",r),(a||this.done)&&i(a)})})}return n}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return He(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,n)=>{let[r,i]=n;return Object.assign(t,{[r]:V_(i)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function Y_(e){return e instanceof Promise&&e._tracked===!0}function V_(e){if(!Y_(e))return e;if(e._error)throw e._error;return e._data}class Zg{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function b3(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const v3=["post","put","patch","delete"],G_=new Set(v3),K_=["get",...v3],X_=new Set(K_),Q_=new Set([301,302,303,307,308]),Z_=new Set([307,308]),mf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},J_={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Vb={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},w3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,x3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",eE=!x3,tE=e=>!!e.hasErrorBoundary;function nE(e){He(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let t=e.detectErrorBoundary||tE,n={},r=m3(e.routes,t,void 0,n),i,a=null,s=new Set,o=null,l=null,c=null,u=e.hydrationData!=null,d=Vs(r,e.history.location,e.basename),f=null;if(d==null){let M=Vr(404,{pathname:e.history.location.pathname}),{matches:z,route:H}=Jb(r);d=z,f={[H.id]:M}}let p=!d.some(M=>M.route.lazy)&&(!d.some(M=>M.route.loader)||e.hydrationData!=null),m,h={historyAction:e.history.action,location:e.history.location,matches:d,initialized:p,navigation:mf,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||f,fetchers:new Map,blockers:new Map},w=jt.Pop,y=!1,v,x=!1,_=!1,A=[],E=[],R=new Map,F=0,q=-1,K=new Map,W=new Set,G=new Map,ue=new Map,fe=new Map,Ce=!1;function O(){if(a=e.history.listen(H=>{let{action:le,location:ye,delta:Te}=H;if(Ce){Ce=!1;return}ss(fe.size===0||Te!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ke=an({currentLocation:h.location,nextLocation:ye,historyAction:le});if(ke&&Te!=null){Ce=!0,e.history.go(Te*-1),cn(ke,{state:"blocked",location:ye,proceed(){cn(ke,{state:"proceeding",proceed:void 0,reset:void 0,location:ye}),e.history.go(Te)},reset(){Ie(ke),Y({blockers:new Map(m.state.blockers)})}});return}return Q(le,ye)}),h.initialized)return m;let M=h.matches.filter(H=>H.route.lazy);if(M.length===0)return Q(jt.Pop,h.location),m;let z=M.map(H=>dm(H.route,t,n));return Promise.all(z).then(()=>{!h.matches.some(le=>le.route.loader)||e.hydrationData!=null?Y({initialized:!0}):Q(jt.Pop,h.location)}),m}function V(){a&&a(),s.clear(),v&&v.abort(),h.fetchers.forEach((M,z)=>et(z)),h.blockers.forEach((M,z)=>Ie(z))}function B(M){return s.add(M),()=>s.delete(M)}function Y(M){h=nt({},h,M),s.forEach(z=>z(h))}function X(M,z){var H,le;let ye=h.actionData!=null&&h.navigation.formMethod!=null&&vi(h.navigation.formMethod)&&h.navigation.state==="loading"&&((H=M.state)==null?void 0:H._isRedirect)!==!0,Te;z.actionData?Object.keys(z.actionData).length>0?Te=z.actionData:Te=null:ye?Te=h.actionData:Te=null;let ke=z.loaderData?Zb(h.loaderData,z.loaderData,z.matches||[],z.errors):h.loaderData;for(let[_e]of fe)Ie(_e);let ze=y===!0||h.navigation.formMethod!=null&&vi(h.navigation.formMethod)&&((le=M.state)==null?void 0:le._isRedirect)!==!0;i&&(r=i,i=void 0),Y(nt({},z,{actionData:Te,loaderData:ke,historyAction:w,location:M,initialized:!0,navigation:mf,revalidation:"idle",restoreScrollPosition:xe(M,z.matches||h.matches),preventScrollReset:ze,blockers:new Map(h.blockers)})),x||w===jt.Pop||(w===jt.Push?e.history.push(M,M.state):w===jt.Replace&&e.history.replace(M,M.state)),w=jt.Pop,y=!1,x=!1,_=!1,A=[],E=[]}async function N(M,z){if(typeof M=="number"){e.history.go(M);return}let{path:H,submission:le,error:ye}=Gb(M,z),Te=h.location,ke=Kl(h.location,H,z&&z.state);ke=nt({},ke,e.history.encodeLocation(ke));let ze=z&&z.replace!=null?z.replace:void 0,_e=jt.Push;ze===!0?_e=jt.Replace:ze===!1||le!=null&&vi(le.formMethod)&&le.formAction===h.location.pathname+h.location.search&&(_e=jt.Replace);let Ke=z&&"preventScrollReset"in z?z.preventScrollReset===!0:void 0,Ze=an({currentLocation:Te,nextLocation:ke,historyAction:_e});if(Ze){cn(Ze,{state:"blocked",location:ke,proceed(){cn(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:ke}),N(M,z)},reset(){Ie(Ze),Y({blockers:new Map(h.blockers)})}});return}return await Q(_e,ke,{submission:le,pendingError:ye,preventScrollReset:Ke,replace:z&&z.replace})}function T(){if(Ae(),Y({revalidation:"loading"}),h.navigation.state!=="submitting"){if(h.navigation.state==="idle"){Q(h.historyAction,h.location,{startUninterruptedRevalidation:!0});return}Q(w||h.historyAction,h.navigation.location,{overrideNavigation:h.navigation})}}async function Q(M,z,H){v&&v.abort(),v=null,w=M,x=(H&&H.startUninterruptedRevalidation)===!0,ee(h.location,h.matches),y=(H&&H.preventScrollReset)===!0;let le=i||r,ye=H&&H.overrideNavigation,Te=Vs(le,z,e.basename);if(!Te){let Ut=Vr(404,{pathname:z.pathname}),{matches:qr,route:Er}=Jb(le);$t(),X(z,{matches:qr,loaderData:{},errors:{[Er.id]:Ut}});return}if(oE(h.location,z)&&!(H&&H.submission&&vi(H.submission.formMethod))){X(z,{matches:Te});return}v=new AbortController;let ke=nl(e.history,z,v.signal,H&&H.submission),ze,_e;if(H&&H.pendingError)_e={[Gs(Te).route.id]:H.pendingError};else if(H&&H.submission&&vi(H.submission.formMethod)){let Ut=await ne(ke,z,H.submission,Te,{replace:H.replace});if(Ut.shortCircuited)return;ze=Ut.pendingActionData,_e=Ut.pendingActionError,ye=nt({state:"loading",location:z},H.submission),ke=new Request(ke.url,{signal:ke.signal})}let{shortCircuited:Ke,loaderData:Ze,errors:kt}=await ge(ke,z,Te,ye,H&&H.submission,H&&H.replace,ze,_e);Ke||(v=null,X(z,nt({matches:Te},ze?{actionData:ze}:{},{loaderData:Ze,errors:kt})))}async function ne(M,z,H,le,ye){Ae();let Te=nt({state:"submitting",location:z},H);Y({navigation:Te});let ke,ze=hm(le,z);if(!ze.route.action&&!ze.route.lazy)ke={type:Jt.error,error:Vr(405,{method:M.method,pathname:z.pathname,routeId:ze.route.id})};else if(ke=await tl("action",M,ze,le,n,t,m.basename),M.signal.aborted)return{shortCircuited:!0};if(so(ke)){let _e;return ye&&ye.replace!=null?_e=ye.replace:_e=ke.location===h.location.pathname+h.location.search,await Re(h,ke,{submission:H,replace:_e}),{shortCircuited:!0}}if(Sl(ke)){let _e=Gs(le,ze.route.id);return(ye&&ye.replace)!==!0&&(w=jt.Push),{pendingActionData:{},pendingActionError:{[_e.route.id]:ke.error}}}if(Va(ke))throw Vr(400,{type:"defer-action"});return{pendingActionData:{[ze.route.id]:ke.data}}}async function ge(M,z,H,le,ye,Te,ke,ze){let _e=le;_e||(_e=nt({state:"loading",location:z,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},ye));let Ke=ye||(_e.formMethod&&_e.formAction&&_e.formData&&_e.formEncType?{formMethod:_e.formMethod,formAction:_e.formAction,formData:_e.formData,formEncType:_e.formEncType}:void 0),Ze=i||r,[kt,Ut]=Kb(e.history,h,H,Ke,z,_,A,E,G,Ze,e.basename,ke,ze);if($t(fn=>!(H&&H.some(Hr=>Hr.route.id===fn))||kt&&kt.some(Hr=>Hr.route.id===fn)),kt.length===0&&Ut.length===0)return X(z,nt({matches:H,loaderData:{},errors:ze||null},ke?{actionData:ke}:{})),{shortCircuited:!0};if(!x){Ut.forEach(Hr=>{let Da=h.fetchers.get(Hr.key),Hc={state:"loading",data:Da&&Da.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(Hr.key,Hc)});let fn=ke||h.actionData;Y(nt({navigation:_e},fn?Object.keys(fn).length===0?{actionData:null}:{actionData:fn}:{},Ut.length>0?{fetchers:new Map(h.fetchers)}:{}))}q=++F,Ut.forEach(fn=>R.set(fn.key,v));let{results:qr,loaderResults:Er,fetcherResults:Yo}=await Ue(h.matches,H,kt,Ut,M);if(M.signal.aborted)return{shortCircuited:!0};Ut.forEach(fn=>R.delete(fn.key));let jc=ev(qr);if(jc)return await Re(h,jc,{replace:Te}),{shortCircuited:!0};let{loaderData:qc,errors:Ss}=Qb(h,H,kt,Er,ze,Ut,Yo,ue);ue.forEach((fn,Hr)=>{fn.subscribe(Da=>{(Da||fn.done)&&ue.delete(Hr)})}),de();let F0=lt(q);return nt({loaderData:qc,errors:Ss},F0||Ut.length>0?{fetchers:new Map(h.fetchers)}:{})}function $(M){return h.fetchers.get(M)||J_}function Ee(M,z,H,le){if(eE)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");R.has(M)&&$e(M);let Te=Vs(i||r,H,e.basename);if(!Te){pt(M,z,Vr(404,{pathname:H}));return}let{path:ke,submission:ze}=Gb(H,le,!0),_e=hm(Te,ke);if(y=(le&&le.preventScrollReset)===!0,ze&&vi(ze.formMethod)){J(M,z,ke,_e,Te,ze);return}G.set(M,{routeId:z,path:ke}),Se(M,z,ke,_e,Te,ze)}async function J(M,z,H,le,ye,Te){if(Ae(),G.delete(M),!le.route.action&&!le.route.lazy){let pi=Vr(405,{method:Te.formMethod,pathname:H,routeId:z});pt(M,z,pi);return}let ke=h.fetchers.get(M),ze=nt({state:"submitting"},Te,{data:ke&&ke.data," _hasFetcherDoneAnything ":!0});h.fetchers.set(M,ze),Y({fetchers:new Map(h.fetchers)});let _e=new AbortController,Ke=nl(e.history,H,_e.signal,Te);R.set(M,_e);let Ze=await tl("action",Ke,le,ye,n,t,m.basename);if(Ke.signal.aborted){R.get(M)===_e&&R.delete(M);return}if(so(Ze)){R.delete(M),W.add(M);let pi=nt({state:"loading"},Te,{data:void 0," _hasFetcherDoneAnything ":!0});return h.fetchers.set(M,pi),Y({fetchers:new Map(h.fetchers)}),Re(h,Ze,{isFetchActionRedirect:!0})}if(Sl(Ze)){pt(M,z,Ze.error);return}if(Va(Ze))throw Vr(400,{type:"defer-action"});let kt=h.navigation.location||h.location,Ut=nl(e.history,kt,_e.signal),qr=i||r,Er=h.navigation.state!=="idle"?Vs(qr,h.navigation.location,e.basename):h.matches;He(Er,"Didn't find any matches after fetcher action");let Yo=++F;K.set(M,Yo);let jc=nt({state:"loading",data:Ze.data},Te,{" _hasFetcherDoneAnything ":!0});h.fetchers.set(M,jc);let[qc,Ss]=Kb(e.history,h,Er,Te,kt,_,A,E,G,qr,e.basename,{[le.route.id]:Ze.data},void 0);Ss.filter(pi=>pi.key!==M).forEach(pi=>{let $0=pi.key,Oy=h.fetchers.get($0),W8={state:"loading",data:Oy&&Oy.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set($0,W8),R.set($0,_e)}),Y({fetchers:new Map(h.fetchers)});let{results:F0,loaderResults:fn,fetcherResults:Hr}=await Ue(h.matches,Er,qc,Ss,Ut);if(_e.signal.aborted)return;K.delete(M),R.delete(M),Ss.forEach(pi=>R.delete(pi.key));let Da=ev(F0);if(Da)return Re(h,Da);let{loaderData:Hc,errors:B0}=Qb(h,h.matches,qc,fn,void 0,Ss,Hr,ue),q8={state:"idle",data:Ze.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(M,q8);let H8=lt(Yo);h.navigation.state==="loading"&&Yo>q?(He(w,"Expected pending action"),v&&v.abort(),X(h.navigation.location,{matches:Er,loaderData:Hc,errors:B0,fetchers:new Map(h.fetchers)})):(Y(nt({errors:B0,loaderData:Zb(h.loaderData,Hc,Er,B0)},H8?{fetchers:new Map(h.fetchers)}:{})),_=!1)}async function Se(M,z,H,le,ye,Te){let ke=h.fetchers.get(M),ze=nt({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Te,{data:ke&&ke.data," _hasFetcherDoneAnything ":!0});h.fetchers.set(M,ze),Y({fetchers:new Map(h.fetchers)});let _e=new AbortController,Ke=nl(e.history,H,_e.signal);R.set(M,_e);let Ze=await tl("loader",Ke,le,ye,n,t,m.basename);if(Va(Ze)&&(Ze=await E3(Ze,Ke.signal,!0)||Ze),R.get(M)===_e&&R.delete(M),Ke.signal.aborted)return;if(so(Ze)){await Re(h,Ze);return}if(Sl(Ze)){let Ut=Gs(h.matches,z);h.fetchers.delete(M),Y({fetchers:new Map(h.fetchers),errors:{[Ut.route.id]:Ze.error}});return}He(!Va(Ze),"Unhandled fetcher deferred data");let kt={state:"idle",data:Ze.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(M,kt),Y({fetchers:new Map(h.fetchers)})}async function Re(M,z,H){var le;let{submission:ye,replace:Te,isFetchActionRedirect:ke}=H===void 0?{}:H;z.revalidate&&(_=!0);let ze=Kl(M.location,z.location,nt({_isRedirect:!0},ke?{_isFetchActionRedirect:!0}:{}));if(He(ze,"Expected a location on the redirect navigation"),w3.test(z.location)&&x3&&typeof((le=window)==null?void 0:le.location)<"u"){let qr=e.history.createURL(z.location),Er=yc(qr.pathname,e.basename||"/")==null;if(window.location.origin!==qr.origin||Er){Te?window.location.replace(z.location):window.location.assign(z.location);return}}v=null;let _e=Te===!0?jt.Replace:jt.Push,{formMethod:Ke,formAction:Ze,formEncType:kt,formData:Ut}=M.navigation;!ye&&Ke&&Ze&&Ut&&kt&&(ye={formMethod:Ke,formAction:Ze,formEncType:kt,formData:Ut}),Z_.has(z.status)&&ye&&vi(ye.formMethod)?await Q(_e,ze,{submission:nt({},ye,{formAction:z.location}),preventScrollReset:y}):await Q(_e,ze,{overrideNavigation:{state:"loading",location:ze,formMethod:ye?ye.formMethod:void 0,formAction:ye?ye.formAction:void 0,formEncType:ye?ye.formEncType:void 0,formData:ye?ye.formData:void 0},preventScrollReset:y})}async function Ue(M,z,H,le,ye){let Te=await Promise.all([...H.map(_e=>tl("loader",ye,_e,z,n,t,m.basename)),...le.map(_e=>_e.matches&&_e.match?tl("loader",nl(e.history,_e.path,ye.signal),_e.match,_e.matches,n,t,m.basename):{type:Jt.error,error:Vr(404,{pathname:_e.path})})]),ke=Te.slice(0,H.length),ze=Te.slice(H.length);return await Promise.all([tv(M,H,ke,ye.signal,!1,h.loaderData),tv(M,le.map(_e=>_e.match),ze,ye.signal,!0)]),{results:Te,loaderResults:ke,fetcherResults:ze}}function Ae(){_=!0,A.push(...$t()),G.forEach((M,z)=>{R.has(z)&&(E.push(z),$e(z))})}function pt(M,z,H){let le=Gs(h.matches,z);et(M),Y({errors:{[le.route.id]:H},fetchers:new Map(h.fetchers)})}function et(M){R.has(M)&&$e(M),G.delete(M),K.delete(M),W.delete(M),h.fetchers.delete(M)}function $e(M){let z=R.get(M);He(z,"Expected fetch controller: "+M),z.abort(),R.delete(M)}function ut(M){for(let z of M){let le={state:"idle",data:$(z).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(z,le)}}function de(){let M=[];for(let z of W){let H=h.fetchers.get(z);He(H,"Expected fetcher: "+z),H.state==="loading"&&(W.delete(z),M.push(z))}ut(M)}function lt(M){let z=[];for(let[H,le]of K)if(le0}function tt(M,z){let H=h.blockers.get(M)||Vb;return fe.get(M)!==z&&fe.set(M,z),H}function Ie(M){h.blockers.delete(M),fe.delete(M)}function cn(M,z){let H=h.blockers.get(M)||Vb;He(H.state==="unblocked"&&z.state==="blocked"||H.state==="blocked"&&z.state==="blocked"||H.state==="blocked"&&z.state==="proceeding"||H.state==="blocked"&&z.state==="unblocked"||H.state==="proceeding"&&z.state==="unblocked","Invalid blocker state transition: "+H.state+" -> "+z.state),h.blockers.set(M,z),Y({blockers:new Map(h.blockers)})}function an(M){let{currentLocation:z,nextLocation:H,historyAction:le}=M;if(fe.size===0)return;fe.size>1&&ss(!1,"A router only supports one blocker at a time");let ye=Array.from(fe.entries()),[Te,ke]=ye[ye.length-1],ze=h.blockers.get(Te);if(!(ze&&ze.state==="proceeding")&&ke({currentLocation:z,nextLocation:H,historyAction:le}))return Te}function $t(M){let z=[];return ue.forEach((H,le)=>{(!M||M(le))&&(H.cancel(),z.push(le),ue.delete(le))}),z}function Oe(M,z,H){if(o=M,c=z,l=H||(le=>le.key),!u&&h.navigation===mf){u=!0;let le=xe(h.location,h.matches);le!=null&&Y({restoreScrollPosition:le})}return()=>{o=null,c=null,l=null}}function ee(M,z){if(o&&l&&c){let H=z.map(ye=>nv(ye,h.loaderData)),le=l(M,H)||M.key;o[le]=c()}}function xe(M,z){if(o&&l&&c){let H=z.map(Te=>nv(Te,h.loaderData)),le=l(M,H)||M.key,ye=o[le];if(typeof ye=="number")return ye}return null}function U(M){i=M}return m={get basename(){return e.basename},get state(){return h},get routes(){return r},initialize:O,subscribe:B,enableScrollRestoration:Oe,navigate:N,fetch:Ee,revalidate:T,createHref:M=>e.history.createHref(M),encodeLocation:M=>e.history.encodeLocation(M),getFetcher:$,deleteFetcher:et,dispose:V,getBlocker:tt,deleteBlocker:Ie,_internalFetchControllers:R,_internalActiveDeferreds:ue,_internalSetRoutes:U},m}function rE(e){return e!=null&&"formData"in e}function Gb(e,t,n){n===void 0&&(n=!1);let r=typeof e=="string"?e:zi(e);if(!t||!rE(t))return{path:r};if(t.formMethod&&!cE(t.formMethod))return{path:r,error:Vr(405,{method:t.formMethod})};let i;if(t.formData&&(i={formMethod:t.formMethod||"get",formAction:_3(r),formEncType:t&&t.formEncType||"application/x-www-form-urlencoded",formData:t.formData},vi(i.formMethod)))return{path:r,submission:i};let a=oi(r),s=S3(t.formData);return n&&a.search&&C3(a.search)&&s.append("index",""),a.search="?"+s,{path:zi(a),submission:i}}function iE(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Kb(e,t,n,r,i,a,s,o,l,c,u,d,f){let p=f?Object.values(f)[0]:d?Object.values(d)[0]:void 0,m=e.createURL(t.location),h=e.createURL(i),w=a||m.toString()===h.toString()||m.search!==h.search,y=f?Object.keys(f)[0]:void 0,x=iE(n,y).filter((A,E)=>{if(A.route.lazy)return!0;if(A.route.loader==null)return!1;if(aE(t.loaderData,t.matches[E],A)||s.some(q=>q===A.route.id))return!0;let R=t.matches[E],F=A;return Xb(A,nt({currentUrl:m,currentParams:R.params,nextUrl:h,nextParams:F.params},r,{actionResult:p,defaultShouldRevalidate:w||k3(R,F)}))}),_=[];return l.forEach((A,E)=>{if(!n.some(K=>K.route.id===A.routeId))return;let R=Vs(c,A.path,u);if(!R){_.push(nt({key:E},A,{matches:null,match:null}));return}let F=hm(R,A.path);if(o.includes(E)){_.push(nt({key:E,matches:R,match:F},A));return}Xb(F,nt({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:n[n.length-1].params},r,{actionResult:p,defaultShouldRevalidate:w}))&&_.push(nt({key:E,matches:R,match:F},A))}),[x,_]}function aE(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function k3(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Xb(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function dm(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];He(i,"No route found in manifest");let a={};for(let s in r){let l=i[s]!==void 0&&s!=="hasErrorBoundary";ss(!l,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!__.has(s)&&(a[s]=r[s])}Object.assign(i,a),Object.assign(i,{hasErrorBoundary:t(nt({},i)),lazy:void 0})}async function tl(e,t,n,r,i,a,s,o,l,c){s===void 0&&(s="/"),o===void 0&&(o=!1),l===void 0&&(l=!1);let u,d,f,p=w=>{let y,v=new Promise((x,_)=>y=_);return f=()=>y(),t.signal.addEventListener("abort",f),Promise.race([w({request:t,params:n.params,context:c}),v])};try{let w=n.route[e];if(n.route.lazy)if(w)d=(await Promise.all([p(w),dm(n.route,a,i)]))[0];else if(await dm(n.route,a,i),w=n.route[e],w)d=await p(w);else{if(e==="action")throw Vr(405,{method:t.method,pathname:new URL(t.url).pathname,routeId:n.route.id});return{type:Jt.data,data:void 0}}else He(w,"Could not find the "+e+' to run on the "'+n.route.id+'" route'),d=await p(w);He(d!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(w){u=Jt.error,d=w}finally{f&&t.signal.removeEventListener("abort",f)}if(lE(d)){let w=d.status;if(Q_.has(w)){let x=d.headers.get("Location");if(He(x,"Redirects returned/thrown from loaders/actions must have a Location header"),w3.test(x)){if(!o){let _=new URL(t.url),A=x.startsWith("//")?new URL(_.protocol+x):new URL(x),E=yc(A.pathname,s)!=null;A.origin===_.origin&&E&&(x=A.pathname+A.search+A.hash)}}else{let _=r.slice(0,r.indexOf(n)+1),A=Ah(_).map(R=>R.pathnameBase),E=Qg(x,A,new URL(t.url).pathname);if(He(zi(E),"Unable to resolve redirect location: "+x),s){let R=E.pathname;E.pathname=R==="/"?s:Ni([s,R])}x=zi(E)}if(o)throw d.headers.set("Location",x),d;return{type:Jt.redirect,status:w,location:x,revalidate:d.headers.get("X-Remix-Revalidate")!==null}}if(l)throw{type:u||Jt.data,response:d};let y,v=d.headers.get("Content-Type");return v&&/\bapplication\/json\b/.test(v)?y=await d.json():y=await d.text(),u===Jt.error?{type:u,error:new Zg(w,d.statusText,y),headers:d.headers}:{type:Jt.data,data:y,statusCode:d.status,headers:d.headers}}if(u===Jt.error)return{type:u,error:d};if(d instanceof W_){var m,h;return{type:Jt.deferred,deferredData:d,statusCode:(m=d.init)==null?void 0:m.status,headers:((h=d.init)==null?void 0:h.headers)&&new Headers(d.init.headers)}}return{type:Jt.data,data:d}}function nl(e,t,n,r){let i=e.createURL(_3(t)).toString(),a={signal:n};if(r&&vi(r.formMethod)){let{formMethod:s,formEncType:o,formData:l}=r;a.method=s.toUpperCase(),a.body=o==="application/x-www-form-urlencoded"?S3(l):l}return new Request(i,a)}function S3(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,r instanceof File?r.name:r);return t}function sE(e,t,n,r,i){let a={},s=null,o,l=!1,c={};return n.forEach((u,d)=>{let f=t[d].route.id;if(He(!so(u),"Cannot handle redirect results in processLoaderData"),Sl(u)){let p=Gs(e,f),m=u.error;r&&(m=Object.values(r)[0],r=void 0),s=s||{},s[p.route.id]==null&&(s[p.route.id]=m),a[f]=void 0,l||(l=!0,o=b3(u.error)?u.error.status:500),u.headers&&(c[f]=u.headers)}else Va(u)?(i.set(f,u.deferredData),a[f]=u.deferredData.data):a[f]=u.data,u.statusCode!=null&&u.statusCode!==200&&!l&&(o=u.statusCode),u.headers&&(c[f]=u.headers)}),r&&(s=r,a[Object.keys(r)[0]]=void 0),{loaderData:a,errors:s,statusCode:o||200,loaderHeaders:c}}function Qb(e,t,n,r,i,a,s,o){let{loaderData:l,errors:c}=sE(t,n,r,i,o);for(let u=0;ur.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Jb(e){let t=e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Vr(e,t){let{pathname:n,routeId:r,method:i,type:a}=t===void 0?{}:t,s="Unknown Server Error",o="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?o="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"&&(o="defer() is not supported in actions")):e===403?(s="Forbidden",o='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",o='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?o="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(o='Invalid request method "'+i.toUpperCase()+'"')),new Zg(e||500,s,new Error(o),!0)}function ev(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(so(n))return n}}function _3(e){let t=typeof e=="string"?oi(e):e;return zi(nt({},t,{hash:""}))}function oE(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash!==t.hash}function Va(e){return e.type===Jt.deferred}function Sl(e){return e.type===Jt.error}function so(e){return(e&&e.type)===Jt.redirect}function lE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function cE(e){return X_.has(e)}function vi(e){return G_.has(e)}async function tv(e,t,n,r,i,a){for(let s=0;sd.route.id===l.route.id),u=c!=null&&!k3(c,l)&&(a&&a[l.route.id])!==void 0;Va(o)&&(i||u)&&await E3(o,r,i).then(d=>{d&&(n[s]=d||n[s])})}}async function E3(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Jt.data,data:e.deferredData.unwrappedData}}catch(i){return{type:Jt.error,error:i}}return{type:Jt.data,data:e.deferredData.data}}}function C3(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function nv(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function hm(e,t){let n=typeof t=="string"?oi(t).search:t.search;if(e[e.length-1].route.index&&C3(n||""))return e[e.length-1];let r=Ah(e);return r[r.length-1]}/** + * React Router v6.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function uE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const dE=typeof Object.is=="function"?Object.is:uE,{useState:hE,useEffect:fE,useLayoutEffect:pE,useDebugValue:mE}=mp;function gE(e,t,n){const r=t(),[{inst:i},a]=hE({inst:{value:r,getSnapshot:t}});return pE(()=>{i.value=r,i.getSnapshot=t,gf(i)&&a({inst:i})},[e,r,t]),fE(()=>(gf(i)&&a({inst:i}),e(()=>{gf(i)&&a({inst:i})})),[e]),mE(r),r}function gf(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!dE(n,r)}catch{return!0}}function yE(e,t,n){return t()}const bE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vE=!bE,wE=vE?yE:gE,xE="useSyncExternalStore"in mp?(e=>e.useSyncExternalStore)(mp):wE,Jg=ce.createContext(null),e1=ce.createContext(null),bc=ce.createContext(null),Nh=ce.createContext(null),Ma=ce.createContext({outlet:null,matches:[]}),T3=ce.createContext(null);function fm(){return fm=Object.assign?Object.assign.bind():function(e){for(var t=1;to.pathnameBase)),a=ce.useRef(!1);return ce.useEffect(()=>{a.current=!0}),ce.useCallback(function(o,l){if(l===void 0&&(l={}),!a.current)return;if(typeof o=="number"){t.go(o);return}let c=Qg(o,JSON.parse(i),r,l.relative==="path");e!=="/"&&(c.pathname=c.pathname==="/"?e:Ni([e,c.pathname])),(l.replace?t.replace:t.push)(c,l.state,l)},[e,t,i,r])}const SE=ce.createContext(null);function _E(e){let t=ce.useContext(Ma).outlet;return t&&ce.createElement(SE.Provider,{value:e},t)}function t1(){let{matches:e}=ce.useContext(Ma),t=e[e.length-1];return t?t.params:{}}function A3(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=ce.useContext(Ma),{pathname:i}=Mh(),a=JSON.stringify(Ah(r).map(s=>s.pathnameBase));return ce.useMemo(()=>Qg(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function EE(e,t){vc()||He(!1);let{navigator:n}=ce.useContext(bc),r=ce.useContext(e1),{matches:i}=ce.useContext(Ma),a=i[i.length-1],s=a?a.params:{};a&&a.pathname;let o=a?a.pathnameBase:"/";a&&a.route;let l=Mh(),c;if(t){var u;let h=typeof t=="string"?oi(t):t;o==="/"||(u=h.pathname)!=null&&u.startsWith(o)||He(!1),c=h}else c=l;let d=c.pathname||"/",f=o==="/"?d:d.slice(o.length)||"/",p=Vs(e,{pathname:f}),m=NE(p&&p.map(h=>Object.assign({},h,{params:Object.assign({},s,h.params),pathname:Ni([o,n.encodeLocation?n.encodeLocation(h.pathname).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?o:Ni([o,n.encodeLocation?n.encodeLocation(h.pathnameBase).pathname:h.pathnameBase])})),i,r||void 0);return t&&m?ce.createElement(Nh.Provider,{value:{location:fm({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:jt.Pop}},m):m}function CE(){let e=OE(),t=b3(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return ce.createElement(ce.Fragment,null,ce.createElement("h2",null,"Unexpected Application Error!"),ce.createElement("h3",{style:{fontStyle:"italic"}},t),n?ce.createElement("pre",{style:i},n):null,a)}class TE extends ce.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?ce.createElement(Ma.Provider,{value:this.props.routeContext},ce.createElement(T3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function AE(e){let{routeContext:t,match:n,children:r}=e,i=ce.useContext(Jg);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),ce.createElement(Ma.Provider,{value:t},r)}function NE(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,i=n==null?void 0:n.errors;if(i!=null){let a=r.findIndex(s=>s.route.id&&(i==null?void 0:i[s.route.id]));a>=0||He(!1),r=r.slice(0,Math.min(r.length,a+1))}return r.reduceRight((a,s,o)=>{let l=s.route.id?i==null?void 0:i[s.route.id]:null,c=null;n&&(s.route.ErrorBoundary?c=ce.createElement(s.route.ErrorBoundary,null):s.route.errorElement?c=s.route.errorElement:c=ce.createElement(CE,null));let u=t.concat(r.slice(0,o+1)),d=()=>{let f=a;return l?f=c:s.route.Component?f=ce.createElement(s.route.Component,null):s.route.element&&(f=s.route.element),ce.createElement(AE,{match:s,routeContext:{outlet:a,matches:u},children:f})};return n&&(s.route.ErrorBoundary||s.route.errorElement||o===0)?ce.createElement(TE,{location:n.location,component:c,error:l,children:d(),routeContext:{outlet:null,matches:u}}):d()},null)}var rv;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(rv||(rv={}));var Bd;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Bd||(Bd={}));function ME(e){let t=ce.useContext(e1);return t||He(!1),t}function RE(e){let t=ce.useContext(Ma);return t||He(!1),t}function IE(e){let t=RE(),n=t.matches[t.matches.length-1];return n.route.id||He(!1),n.route.id}function OE(){var e;let t=ce.useContext(T3),n=ME(Bd.UseRouteError),r=IE(Bd.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function DE(e){let{fallbackElement:t,router:n}=e,r=ce.useCallback(()=>n.state,[n]),i=xE(n.subscribe,r,r),a=ce.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:l=>n.navigate(l),push:(l,c,u)=>n.navigate(l,{state:c,preventScrollReset:u==null?void 0:u.preventScrollReset}),replace:(l,c,u)=>n.navigate(l,{replace:!0,state:c,preventScrollReset:u==null?void 0:u.preventScrollReset})}),[n]),s=n.basename||"/",o=ce.useMemo(()=>({router:n,navigator:a,static:!1,basename:s}),[n,a,s]);return ce.createElement(ce.Fragment,null,ce.createElement(Jg.Provider,{value:o},ce.createElement(e1.Provider,{value:i},ce.createElement(zE,{basename:n.basename,location:n.state.location,navigationType:n.state.historyAction,navigator:a},n.state.initialized?ce.createElement(FE,null):t))),null)}function LE(e){return _E(e.context)}function PE(e){He(!1)}function zE(e){let{basename:t="/",children:n=null,location:r,navigationType:i=jt.Pop,navigator:a,static:s=!1}=e;vc()&&He(!1);let o=t.replace(/^\/*/,"/"),l=ce.useMemo(()=>({basename:o,navigator:a,static:s}),[o,a,s]);typeof r=="string"&&(r=oi(r));let{pathname:c="/",search:u="",hash:d="",state:f=null,key:p="default"}=r,m=ce.useMemo(()=>{let h=yc(c,o);return h==null?null:{location:{pathname:h,search:u,hash:d,state:f,key:p},navigationType:i}},[o,c,u,d,f,p,i]);return m==null?null:ce.createElement(bc.Provider,{value:l},ce.createElement(Nh.Provider,{children:n,value:m}))}function FE(e){let{children:t,location:n}=e,r=ce.useContext(Jg),i=r&&!t?r.router.routes:pm(t);return EE(i,n)}var iv;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(iv||(iv={}));new Promise(()=>{});function pm(e,t){t===void 0&&(t=[]);let n=[];return ce.Children.forEach(e,(r,i)=>{if(!ce.isValidElement(r))return;if(r.type===ce.Fragment){n.push.apply(n,pm(r.props.children,t));return}r.type!==PE&&He(!1),!r.props.index||!r.props.children||He(!1);let a=[...t,i],s={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=pm(r.props.children,a)),n.push(s)}),n}function BE(e){return!!e.ErrorBoundary||!!e.errorElement}/** + * React Router DOM v6.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function $d(){return $d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function UE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jE(e,t){return e.button===0&&(!t||t==="_self")&&!UE(e)}const qE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function HE(e,t){return nE({basename:t==null?void 0:t.basename,history:x_({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||WE(),routes:e,detectErrorBoundary:BE}).initialize()}function WE(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=$d({},t,{errors:YE(t.errors)})),t}function YE(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new Zg(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){let a=new Error(i.message);a.stack="",n[r]=a}else n[r]=i;return n}const VE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",GE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ro=ce.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:s,state:o,target:l,to:c,preventScrollReset:u}=t,d=$E(t,qE),{basename:f}=ce.useContext(bc),p,m=!1;if(typeof c=="string"&&GE.test(c)&&(p=c,VE)){let v=new URL(window.location.href),x=c.startsWith("//")?new URL(v.protocol+c):new URL(c),_=yc(x.pathname,f);x.origin===v.origin&&_!=null?c=_+x.search+x.hash:m=!0}let h=kE(c,{relative:i}),w=KE(c,{replace:s,state:o,target:l,preventScrollReset:u,relative:i});function y(v){r&&r(v),v.defaultPrevented||w(v)}return ce.createElement("a",$d({},d,{href:p||h,onClick:m||a?r:y,ref:n,target:l}))});var av;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(av||(av={}));var sv;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(sv||(sv={}));function KE(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:s}=t===void 0?{}:t,o=Hi(),l=Mh(),c=A3(e,{relative:s});return ce.useCallback(u=>{if(jE(u,n)){u.preventDefault();let d=r!==void 0?r:zi(l)===zi(c);o(e,{replace:d,state:i,preventScrollReset:a,relative:s})}},[l,o,c,r,i,n,e,a,s])}var Xl={},XE={get exports(){return Xl},set exports(e){Xl=e}},ht={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var n1=Symbol.for("react.element"),r1=Symbol.for("react.portal"),Rh=Symbol.for("react.fragment"),Ih=Symbol.for("react.strict_mode"),Oh=Symbol.for("react.profiler"),Dh=Symbol.for("react.provider"),Lh=Symbol.for("react.context"),QE=Symbol.for("react.server_context"),Ph=Symbol.for("react.forward_ref"),zh=Symbol.for("react.suspense"),Fh=Symbol.for("react.suspense_list"),Bh=Symbol.for("react.memo"),$h=Symbol.for("react.lazy"),ZE=Symbol.for("react.offscreen"),N3;N3=Symbol.for("react.module.reference");function vr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case n1:switch(e=e.type,e){case Rh:case Oh:case Ih:case zh:case Fh:return e;default:switch(e=e&&e.$$typeof,e){case QE:case Lh:case Ph:case $h:case Bh:case Dh:return e;default:return t}}case r1:return t}}}ht.ContextConsumer=Lh;ht.ContextProvider=Dh;ht.Element=n1;ht.ForwardRef=Ph;ht.Fragment=Rh;ht.Lazy=$h;ht.Memo=Bh;ht.Portal=r1;ht.Profiler=Oh;ht.StrictMode=Ih;ht.Suspense=zh;ht.SuspenseList=Fh;ht.isAsyncMode=function(){return!1};ht.isConcurrentMode=function(){return!1};ht.isContextConsumer=function(e){return vr(e)===Lh};ht.isContextProvider=function(e){return vr(e)===Dh};ht.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===n1};ht.isForwardRef=function(e){return vr(e)===Ph};ht.isFragment=function(e){return vr(e)===Rh};ht.isLazy=function(e){return vr(e)===$h};ht.isMemo=function(e){return vr(e)===Bh};ht.isPortal=function(e){return vr(e)===r1};ht.isProfiler=function(e){return vr(e)===Oh};ht.isStrictMode=function(e){return vr(e)===Ih};ht.isSuspense=function(e){return vr(e)===zh};ht.isSuspenseList=function(e){return vr(e)===Fh};ht.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Rh||e===Oh||e===Ih||e===zh||e===Fh||e===ZE||typeof e=="object"&&e!==null&&(e.$$typeof===$h||e.$$typeof===Bh||e.$$typeof===Dh||e.$$typeof===Lh||e.$$typeof===Ph||e.$$typeof===N3||e.getModuleId!==void 0)};ht.typeOf=vr;(function(e){e.exports=ht})(XE);const JE=s2(Xl);function eC(e){function t(T,Q,ne,ge,$){for(var Ee=0,J=0,Se=0,Re=0,Ue,Ae,pt=0,et=0,$e,ut=$e=Ue=0,de=0,lt=0,tt=0,Ie=0,cn=ne.length,an=cn-1,$t,Oe="",ee="",xe="",U="",M;deUe)&&(Ie=(Oe=Oe.replace(" ",":")).length),0ge&&(ge=(Q=Q.trim()).charCodeAt(0)),ge){case 38:return Q.replace(y,"$1"+T.trim());case 58:return T.trim()+Q.replace(y,"$1"+T.trim());default:if(0<1*ne&&0J.charCodeAt(8))break;case 115:$=$.replace(J,"-webkit-"+J)+";"+$;break;case 207:case 102:$=$.replace(J,"-webkit-"+(102ne.charCodeAt(0)&&(ne=ne.trim()),N=ne,ne=[N],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var wC=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,i=0;i=this.groupSizes.length){for(var i=this.groupSizes,a=i.length,s=a;n>=s;)(s<<=1)<0&&os(16,""+n);this.groupSizes=new Uint32Array(s),this.groupSizes.set(i),this.length=s;for(var o=a;o=this.length||this.groupSizes[n]===0)return r;for(var i=this.groupSizes[n],a=this.indexOfGroup(n),s=a+i,o=a;o=_l&&(_l=t+1),td.set(e,t),jd.set(t,e)},SC="style["+Eo+'][data-styled-version="5.3.9"]',_C=new RegExp("^"+Eo+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),EC=function(e,t,n){for(var r,i=n.split(","),a=0,s=i.length;a=0;c--){var u=l[c];if(u&&u.nodeType===1&&u.hasAttribute(Eo))return u}}(n),a=i!==void 0?i.nextSibling:null;r.setAttribute(Eo,"active"),r.setAttribute("data-styled-version","5.3.9");var s=TC();return s&&r.setAttribute("nonce",s),n.insertBefore(r,a),r},AC=function(){function e(n){var r=this.element=O3(n);r.appendChild(document.createTextNode("")),this.sheet=function(i){if(i.sheet)return i.sheet;for(var a=document.styleSheets,s=0,o=a.length;s=0){var i=document.createTextNode(r),a=this.nodes[n];return this.element.insertBefore(i,a||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n0&&(d+=f+",")}),a+=""+c+u+'{content:"'+d+`"}/*!sc*/ +`}}}return a}(this)},e}(),IC=/(a)(d)/gi,pv=function(e){return String.fromCharCode(e+(e>25?39:97))};function ym(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=pv(t%52)+n;return(pv(t%52)+n).replace(IC,"$1-$2")}var Ks=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},D3=function(e){return Ks(5381,e)};function L3(e){for(var t=0;t>>0);if(!n.hasNameForId(i,o)){var l=r(s,"."+o,void 0,i);n.insertRules(i,o,l)}a.push(o),this.staticRulesId=o}else{for(var c=this.rules.length,u=Ks(this.baseHash,r.hash),d="",f=0;f>>0);if(!n.hasNameForId(i,w)){var y=r(d,"."+w,void 0,i);n.insertRules(i,w,y)}a.push(w)}}return a.join(" ")},e}(),LC=/^\s*\/\/.*$/gm,PC=[":","[",".","#"];function zC(e){var t,n,r,i,a=e===void 0?ba:e,s=a.options,o=s===void 0?ba:s,l=a.plugins,c=l===void 0?Ud:l,u=new eC(o),d=[],f=function(h){function w(y){if(y)try{h(y+"}")}catch{}}return function(y,v,x,_,A,E,R,F,q,K){switch(y){case 1:if(q===0&&v.charCodeAt(0)===64)return h(v+";"),"";break;case 2:if(F===0)return v+"/*|*/";break;case 3:switch(F){case 102:case 112:return h(x[0]+v),"";default:return v+(K===0?"/*|*/":"")}case-2:v.split("/*|*/}").forEach(w)}}}(function(h){d.push(h)}),p=function(h,w,y){return w===0&&PC.indexOf(y[n.length])!==-1||y.match(i)?h:"."+t};function m(h,w,y,v){v===void 0&&(v="&");var x=h.replace(LC,""),_=w&&y?y+" "+w+" { "+x+" }":x;return t=v,n=w,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),u(y||!w?"":w,_)}return u.use([].concat(c,[function(h,w,y){h===2&&y.length&&y[0].lastIndexOf(n)>0&&(y[0]=y[0].replace(r,p))},f,function(h){if(h===-2){var w=d;return d=[],w}}])),m.hash=c.length?c.reduce(function(h,w){return w.name||os(15),Ks(h,w.name)},5381).toString():"",m}var P3=Fn.createContext();P3.Consumer;var z3=Fn.createContext(),FC=(z3.Consumer,new qd),bm=zC();function F3(){return ce.useContext(P3)||FC}function B3(){return ce.useContext(z3)||bm}var BC=function(){function e(t,n){var r=this;this.inject=function(i,a){a===void 0&&(a=bm);var s=r.name+a.hash;i.hasNameForId(r.id,s)||i.insertRules(r.id,s,a(r.rules,s,"@keyframes"))},this.toString=function(){return os(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=bm),this.name+t.hash},e}(),$C=/([A-Z])/,UC=/([A-Z])/g,jC=/^ms-/,qC=function(e){return"-"+e.toLowerCase()};function mv(e){return $C.test(e)?e.replace(UC,qC).replace(jC,"-ms-"):e}var gv=function(e){return e==null||e===!1||e===""};function ls(e,t,n,r){if(Array.isArray(e)){for(var i,a=[],s=0,o=e.length;s1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,WC=/(^-|-$)/g;function yf(e){return e.replace(HC,"-").replace(WC,"")}var j3=function(e){return ym(D3(e)>>>0)};function cu(e){return typeof e=="string"&&!0}var vm=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},YC=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function VC(e,t,n){var r=e[n];vm(t)&&vm(r)?q3(r,t):e[n]=t}function q3(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(K[F]=E[F]);return K}(t,["componentId"]),A=x&&x+"-"+(cu(v)?v:yf(hv(v)));return H3(v,Ir({},_,{attrs:f,componentId:A}),n)},Object.defineProperty(m,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(v){this._foldedDefaultProps=r?q3({},e.defaultProps,v):v}}),Object.defineProperty(m,"toString",{value:function(){return"."+m.styledComponentId}}),i&&yC(m,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),m}var wm=function(e){return function t(n,r,i){if(i===void 0&&(i=ba),!Xl.isValidElementType(r))return os(1,String(r));var a=function(){return n(r,i,$3.apply(void 0,arguments))};return a.withConfig=function(s){return t(n,r,Ir({},i,{},s))},a.attrs=function(s){return t(n,r,Ir({},i,{attrs:Array.prototype.concat(i.attrs,s).filter(Boolean)}))},a}(H3,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){wm[e]=wm(e)});var KC=function(){function e(n,r){this.rules=n,this.componentId=r,this.isStatic=L3(n),qd.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(n,r,i,a){var s=a(ls(this.rules,r,i,a).join(""),""),o=this.componentId+n;i.insertRules(o,o,s)},t.removeStyles=function(n,r){r.clearRules(this.componentId+n)},t.renderStyles=function(n,r,i,a){n>2&&qd.registerId(this.componentId+n),this.removeStyles(n,i),this.createStyles(n,r,i,a)},e}();function XC(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re.isDropdown?"4px solid hsla(234, 60%, 66%, 1)":"none"}; + transition: all 0.05s; + cursor: pointer; + @media screen and (max-width: 1024px) { + font-size: 16px; + font-weight: 300; + padding-inline: 16px; + } +`,JC=L.ul` + position: absolute; + top: 86px; + left: 0; + display: ${e=>e.isDropdown?"block":"none"}; + padding: 16px 20px; + background: hsl(231, 14%, 18%); + border-radius: 8px; + transition: all 0s ease 0.1s; + width: 200px; +`,eT=L.li` + display: block; + padding-block: 8px; + color: hsl(0, 0%, 88%); + font-weight: 400; + font-size: 14px; + &:hover { + color: hsl(234, 60%, 66%); + } +`,W3=(e,t)=>{t&&(t.startsWith("http")||t.startsWith("https")?window.location.href=t:e(t))},tT=({label:e,url:t})=>{const n=Hi();return k.jsx(eT,{onClick:()=>W3(n,t),children:e})},nT=({subNavItems:e,isDropdown:t})=>k.jsx(JC,{isDropdown:t,children:e==null?void 0:e.map(({key:n,label:r,url:i})=>k.jsx(tT,{label:r,url:i},n))}),rT=({label:e,subNavItems:t,url:n})=>{const r=Hi(),[i,a]=ce.useState(!1);return k.jsxs(ZC,{isDropdown:i,onMouseOver:()=>a(!0),onMouseOut:()=>a(!1),onClick:()=>W3(r,n),children:[e,t&&k.jsx(nT,{subNavItems:t,isDropdown:i})]})},iT=({items:e})=>k.jsx(QC,{children:e.map(({key:t,label:n,url:r,children:i})=>k.jsx(rT,{label:n,url:r,subNavItems:i},t))}),aT="/xline-home/assets/home-menu-icon-459d13f5.svg",sT="/xline-home/assets/dropIcon-525fd0e1.svg",oT="/xline-home/assets/dropIconActive-9bdef1aa.svg",lT=L.img` + display: none; + margin-left: 12px; + @media screen and (max-width: 768px) { + display: block; + } +`,cT=L.ul` + display: ${e=>e.isDropDown?"flex":"none"}; + flex-direction: column; + position: absolute; + top: 53px; + left: 0; + width: 100%; + z-index: 1000; + @media screen and (min-width: 768px) { + display: none; + } +`,uT=L.li` + display: flex; + align-items: center; + height: 42px; + padding-inline: 20px; +`,dT=L(uT)` + background: #111429; + color: ${e=>e.isDropdown?"#7680DD":"#E0E0E0"}; + font-weight: 500; + font-size: 16px; + line-height: 1; +`,hT=L.p` + /* min-width: 100px; */ +`,fT=L.ul` + display: ${e=>e.isDropdown?"block":"none"}; + height: ${e=>e.isDropdown?"min-content":"0px"}; + transition: all 1s; +`,pT=L.li` + display: flex; + align-items: center; + height: 42px; + padding-inline: 20px; +`,mT=L(pT)` + background: #242840; + color: #e0e0e0; +`,bv=L.img` + margin-left: 12px; + height: 12px; + width: 12px; +`,Y3=(e,t,n,r)=>{t?t.startsWith("http")||t.startsWith("https")?window.location.href=t:e(t):r&&r(!n)},gT=({label:e,url:t})=>{const n=Hi();return k.jsx(mT,{onClick:()=>Y3(n,t),children:e})},yT=({isDropdown:e,subNavItems:t})=>k.jsx(fT,{isDropdown:e,children:t==null?void 0:t.map(({key:n,label:r,url:i})=>k.jsx(gT,{label:r,url:i},n))}),bT=({label:e,url:t,subNavItems:n})=>{const r=Hi(),[i,a]=ce.useState(!1);return k.jsxs(k.Fragment,{children:[k.jsxs(dT,{isDropdown:i,onClick:()=>Y3(r,t,i,a),children:[k.jsx(hT,{children:e}),(n==null?void 0:n.length)!==0&&k.jsx(k.Fragment,{children:i?k.jsx(bv,{src:oT}):k.jsx(bv,{src:sT})})]}),k.jsx(yT,{isDropdown:i,subNavItems:n})]})},vT=({items:e})=>{const[t,n]=ce.useState(!1);return k.jsxs(k.Fragment,{children:[k.jsx(lT,{src:aT,onClick:()=>n(!t)}),k.jsx(cT,{isDropDown:t,children:(e||[]).map(({key:r,label:i,url:a,children:s})=>k.jsx(bT,{label:i,url:a,subNavItems:s},r))})]})},d1="/xline-home/assets/logo-9c6940ee.svg",V3="/xline-home/assets/github-icon-7701b5d6.svg",vv=[{key:"docs",label:"Docs",children:[{key:"what's-new",label:"What's new",url:"/docs/What's-New"},{key:"get-started",label:"Get started",url:"/docs/Get-Started"},{key:"deploy",label:"Deploy",url:"/docs/Deploy"},{key:"develop",label:"Develop",url:"/docs/Develop"},{key:"reference",label:"reference",url:"/docs/Xline-Architecture-Details"}]},{key:"deep-dive",label:"Deep dive",children:[{key:"consensus",label:"Consensus",url:"/deep-dive/Consensus"},{key:"kv-engine",label:"KV engine",url:"/deep-dive/Key-value-Engine"},{key:"rpc",label:"RPC",url:"/deep-dive/Remote-Procedure-Calls-(RPC)"},{key:"test",label:"Test",url:"/deep-dive/Testing"}]},{key:"community",label:"Community",children:[{key:"contribute",label:"Contribute",url:"/contribute"},{key:"chat",label:"Chat",url:"https://discord.gg/XyFXGpSfvb"},{key:"GSoC 2024",label:"GSoC 2024",url:"/GSoC"}]},{key:"resources",label:"Resources",children:[{key:"blog",label:"Blog",url:"/blog"},{key:"video",label:"Video",url:"/video"}]}],wT=L.header` + position: absolute; + top: 0; + left: 0; + height: 86px; + width: 100%; + background-color: hsla(236, 60%, 10%, 0.4); + color: ${e=>e.theme.color.white}; + @media screen and (max-width: 1024px) { + height: 69px; + } + @media screen and (max-width: 768px) { + height: 53px; + } +`,xT=L.div` + position: relative; + display: flex; + align-items: center; + height: inherit; + width: 100%; + max-width: 1440px; + margin-inline: auto; + padding-left: 105px; + padding-right: 101px; + @media screen and (max-width: 1024px) { + padding-inline: 64px; + } + @media screen and (max-width: 768px) { + padding-inline: 20px; + } +`,kT=L.img` + width: 111px; + height: 32px; + margin-right: calc(68px - 20px); + @media screen and (max-width: 1024px) { + width: 86px; + height: 22px; + margin-right: 24px; + } + @media screen and (max-width: 768px) { + width: 64px; + height: 18px; + margin-right: 0; + } +`,ST=L.div` + flex: 1; + min-width: ${e=>e.theme.scale.md}; + @media screen and (max-width: 1024px) { + min-width: 16px; + } +`,_T=L.button` + display: flex; + align-items: center; + justify-content: center; + width: 131px; + height: 48px; + /* padding: 8px 16px; */ + color: ${e=>e.theme.color.white}; + background: linear-gradient( + 90deg, + hsla(270, 50%, 60%, 1), + hsla(257, 97%, 73%, 1) 50%, + hsla(266, 87%, 75%, 1) + ); + border: none; + border-radius: 50vh; + cursor: pointer; + @media screen and (max-width: 1024px) { + width: 106px; + height: 36px; + } + @media screen and (max-width: 768px) { + width: 84px; + height: 24px; + } +`,ET=L.img` + width: 24.94px; + height: 24.94px; + margin-right: 8px; + @media screen and (max-width: 1024px) { + width: 18px; + margin-right: 7px; + } + @media screen and (max-width: 768px) { + width: 15px; + margin-right: 6px; + } +`,CT=L.p` + font-size: 18px; + line-height: 1; + text-transform: capitalize; + transform: translateY(5%); + @media screen and (max-width: 1024px) { + font-size: 15px; + } + @media screen and (max-width: 768px) { + font-size: 11px; + } +`,TT=()=>{const e=Hi();return k.jsx(wT,{children:k.jsxs(xT,{children:[k.jsx(kT,{src:d1,alt:"Xline",onClick:()=>e("/")}),k.jsx(iT,{items:vv}),k.jsx(ST,{}),k.jsxs(_T,{as:"a",href:"https://github.com/datenlord/xline",children:[k.jsx(ET,{src:V3,alt:"icon"}),k.jsx(CT,{children:"github"})]}),k.jsx(vT,{items:vv})]})})},G3=[{title:"What's New",url:"/docs/What's-New",children:[{type:"heading",title:"v0.1.0",url:"/docs/What's-New",id:"v0.1.0"},{type:"heading",title:"v0.2.0",url:"/docs/What's-New",id:"v0.2.0"},{type:"heading",title:"v0.3.0",url:"/docs/What's-New",id:"v0.3.0"},{type:"heading",title:"v0.4.0",url:"/docs/What's-New",id:"v0.4.0"},{type:"heading",title:"v0.4.1",url:"/docs/What's-New",id:"v0.4.1"},{type:"heading",title:"v0.5.0",url:"/docs/What's-New",id:"v0.5.0"},{type:"heading",title:"v0.6.0",url:"/docs/What's-New",id:"v0.6.0"}]},{title:"Get Started",url:"/docs/Get-Started",children:[{type:"heading",title:"Architecture",url:"/docs/Get-Started",id:"Architecture"},{type:"heading",title:"Xline In 5 Minutes",url:"/docs/Get-Started",id:"Xline-In-5-Minutes"}]},{title:"Deploy",url:"/docs/Deploy",children:[{type:"heading",title:"Install",url:"/docs/Deploy",id:"Install"}]},{title:"Develop",url:"/docs/Develop",children:[{type:"heading",title:"Xline API",url:"/docs/Develop",id:"Xline-API"}]},{title:"Reference",url:"/docs/Xline-Architecture-Details",children:[{type:"article",title:"Xline Architecture Details",url:"/docs/Xline-Architecture-Details"},{type:"article",title:"Performance Comparison",url:"/docs/Performance-Comparison"}]}],K3=[{title:"Consensus",url:"/deep-dive/Consensus",children:[{type:"heading",title:"Basic Concept",url:"/deep-dive/Consensus",id:"Basic-Concept"},{type:"heading",title:"Consensus Protocol",url:"/deep-dive/Consensus",id:"Consensus-Protocol"}]},{title:"KV Engine",url:"/deep-dive/Key-value-Engine",children:[{type:"heading",title:"Metrics",url:"/deep-dive/Key-value-Engine",id:"Metrics"},{type:"heading",title:"LSM Tree And B-Tree",url:"/deep-dive/Key-value-Engine",id:"LSM-Tree-And-B-Tree"}]},{title:"RPC",url:"/deep-dive/Remote-Procedure-Calls-(RPC)",children:[{type:"heading",title:"Remote Procedure Call (RPC)",url:"/deep-dive/Remote-Procedure-Calls-(RPC)"}]},{title:"Test",url:"/deep-dive/Testing",children:[{type:"heading",title:"Unit Testing",url:"/deep-dive/Testing",id:"Unit-Testing"},{type:"heading",title:"Mock Testing",url:"/deep-dive/Testing",id:"Mock-Testing"},{type:"heading",title:"Integration Testing",url:"/deep-dive/Testing",id:"Integration-Testing"},{type:"heading",title:"Validation Testing",url:"/deep-dive/Testing",id:"Validation-Testing"}]}],AT="/xline-home/assets/footer-background-8643bf7b.svg",NT="/xline-home/assets/discord-icon-7417d9bb.svg",MT="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAAAuCAYAAACh8K6vAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANFSURBVHgB7Zs/axRBGId/s7N7t8YoKtqkUjSlKOQ7iNqInZ0gUcFWBK3UQkXUQksLO8HCNDYBxS+gnWAZSCEiqFFMJJvb3Xl99yRkY+YMcznmz2Yf2LvNuzebvWcnM+/OTIAWJwhY4kePjkcKEyZl4hjUIZQwpCcgi8Lsu5UCn/Z1xQdYIoYlpMIVIXDRpIxQvA1xhaIAIsMqJQiz/HYalojQ4oRWvCNa8Y5oxTvCWuc6CCI84H5wXnswwm5+vcrb/lpUcZmH3BnODTpnqSAxIGPj7GUPH7wDxzgXH0d4OdYR7wYdz3N6LyReYE1+xErPFjlOpamYgyFfiSZkz71475uaJBFvqcQ53v22GuOqPCk7mM0yOoxACaKNb6L8YDrXpskPKqtpkvzg0smmyA8yj2+CfGvpZDdBorvLLOwyEaeMgjNzA/ryiY7yblqPx10scDzh8+W6cuNcNI71F2ITe3k8KSEi7R/YBX7g4YciumQqnz//RRfPS3rMNf+JLs/Pskzs6qYbLw928aOpEZhm+U9Z/mjqnfjb7PD5DsBT/GnjRyy/avNL6svfCw/xq3Mddc0Hplj+Gx/lOxfPbevsusA2ke9evMAtHm28vy64VfklHqGWasJD+V40NYkU13Xyecr1Loagluf/rIX78jsy9UK+N228Vj7hJIakkg+Fad4tauGpbowZeIBXnatW/haIYzHD8quaX5d/CB7g3ZCBJfnO8XKsZjvI93aQrJKfK9zEiKjk52W/z1iGB1gbqykQFaQ2xpUcXCaNxStOAQ9ysfP1eFnicyLxjMdqjJb37eAON8vpDGdMr/89RpYHa6yJLwsopcnKpfp/OZY7z4Ne/LZW+6uxtkJhkm/KDVP5izE+pr2Ncdviw5hzlaJ6yLpdj/GNuMby77F8iQAJZ861YfLDmnNtkPzw5lwbIj/MOdcGyA920Wro8p2vnSwIz3+t0ILuWByBOnLTf8VZ4a27+kMlf7nACT7nivbTPXhxU5yL59T+yMCDw+bWhGOWFw0Y066Pd0Qr3hGteEdYa+O5zc345bdpIUbBnMh0ZZioul2LWOuDOMUbW1rCThgyPm4ufrFKbpbMvlv1e3jA7TtaWlpamsMfwGp0UFDsZm0AAAAASUVORK5CYII=",RT="/xline-home/assets/cncf-logo-text-9f32c1ea.png",IT=L.footer` + background-image: url(${AT}); + background-size: cover; +`,OT=L.div` + max-width: 1440px; + margin-inline: auto; + padding-inline: 128px; + padding-block: 64px; + @media screen and (max-width: 1024px) { + padding-inline: 96px; + padding-block: 48px; + } + @media screen and (max-width: 768px) { + padding-inline: 64px; + padding-block: 32px; + } +`,DT=L.div` + display: flex; + flex-wrap: wrap; + justify-content: space-around; +`,uu=L.div` + margin-inline: 32px; + margin-bottom: 48px; + color: white; + width: 200px; + @media screen and (max-width: 1024px) { + margin-inline: 24px; + margin-bottom: 36px; + } + @media screen and (max-width: 768px) { + margin-inline: 16px; + margin-bottom: 24px; + } +`,du=L.h2` + padding-bottom: 32px; + margin-bottom: 32px; + font-weight: 500; + font-size: 28px; + text-transform: capitalize; + border-bottom: 1px solid white; + cursor: default; + @media screen and (max-width: 1024px) { + font-size: 21px; + padding-bottom: 24px; + margin-bottom: 24px; + } + @media screen and (max-width: 768px) { + font-size: 14px; + padding-bottom: 16px; + margin-bottom: 16px; + } +`,hu=L.ul``,Es=L.li` + margin-bottom: 28px; + font-weight: 400; + font-size: 22px; + text-transform: capitalize; + cursor: pointer; + @media screen and (max-width: 1024px) { + margin-bottom: 21px; + font-size: 16.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 14px; + font-size: 11px; + } +`,LT=L.div` + padding-bottom: 40px; + display: flex; + justify-content: space-between; + align-items: center; + /* flex-wrap: wrap; */ + @media screen and (max-width: 1024px) { + padding-bottom: 36px; + } + @media screen and (max-width: 768px) { + padding-bottom: 24px; + } +`,PT=L.img` + height: 48px; + margin-bottom: 8px; + cursor: pointer; + @media screen and (max-width: 1024px) { + height: 34px; + } + @media screen and (max-width: 768px) { + height: 22px; + } + /* @media screen and (max-width: 512px) { + display: none; + } */ + @media screen and (max-width: 320px) { + height: 18px; + } +`;L.div` + flex: 1; + /* @media screen and (max-width: 512px) { + display: none; + } */ +`;const xm=L.div` + display: flex; + align-items: center; + height: 32px; + margin-left: 32px; + margin-bottom: 8px; + color: white; + cursor: pointer; + @media screen and (max-width: 1024px) { + height: 24px; + margin-left: 24px; + } + @media screen and (max-width: 768px) { + height: 16px; + margin-left: 16px; + } +`,wv=L.img` + height: 100%; + margin-right: 16px; + @media screen and (max-width: 1024px) { + margin-right: 12px; + } + @media screen and (max-width: 768px) { + margin-right: 8px; + } +`,xv=L.p` + font-weight: 600; + font-size: 24px; + line-height: 1; + @media screen and (max-width: 1024px) { + font-size: 18px; + } + @media screen and (max-width: 768px) { + font-size: 12px; + } +`,zT=L.div` + margin-left: -4%; + width: 108%; + padding-top: 32px; + + color: #fff; + border-top: 1px solid #fff; +`,kv=L.div` + padding-bottom: 16px; + text-align: center; + font-weight: 600; + font-size: 18px; + line-height: 1; + &:last-child { + padding-bottom: 0; + } + @media screen and (max-width: 1024px) { + padding-bottom: 12px; + font-size: 13.5px; + } + @media screen and (max-width: 768px) { + padding-bottom: 8px; + font-size: 9px; + } +`,FT=L(xm)` + cursor: default; +`,BT=L.img` + height: 100%; +`,$T=L.img` + height: 100%; +`,UT=()=>{const e=Hi();return k.jsx(k.Fragment,{children:k.jsx(IT,{children:k.jsxs(OT,{children:[k.jsxs(DT,{children:[k.jsxs(uu,{children:[k.jsx(du,{children:"docs"}),k.jsx(hu,{children:G3.map(({title:t,url:n})=>k.jsx(Es,{onClick:()=>{e(n),window.scrollTo(0,0)},children:t},t))})]}),k.jsxs(uu,{children:[k.jsx(du,{children:"deep dive"}),k.jsx(hu,{children:K3.map(({title:t,url:n})=>k.jsx(Es,{onClick:()=>{e(n),window.scrollTo(0,0)},children:t},t))})]}),k.jsxs(uu,{children:[k.jsx(du,{children:"community"}),k.jsxs(hu,{children:[k.jsx(Es,{onClick:()=>{e("/contribute"),window.scrollTo(0,0)},children:"contribute"}),k.jsx(Es,{onClick:()=>window.location.href="https://discord.gg/XyFXGpSfvb",children:"chat"})]})]}),k.jsxs(uu,{children:[k.jsx(du,{children:"resources"}),k.jsxs(hu,{children:[k.jsx(Es,{onClick:()=>{e("/blog"),window.scrollTo(0,0)},children:"blog"}),k.jsx(Es,{onClick:()=>{e("/video"),window.scrollTo(0,0)},children:"video"})]})]})]}),k.jsxs(LT,{children:[k.jsx(PT,{src:d1,alt:"Xline",onClick:()=>{window.scrollTo(0,0),e("/")}}),k.jsxs("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center"},children:[k.jsxs(FT,{children:[k.jsx(BT,{src:MT}),k.jsx($T,{src:RT})]}),k.jsxs(xm,{as:"a",href:"https://github.com/datenlord/xline",children:[k.jsx(wv,{src:V3,alt:"icon"}),k.jsx(xv,{children:"GitHub"})]}),k.jsxs(xm,{as:"a",href:"https://discord.gg/XyFXGpSfvb",children:[k.jsx(wv,{src:NT,alt:"icon"}),k.jsx(xv,{children:"Discord"})]})]})]}),k.jsxs(zT,{children:[k.jsx(kv,{children:"We are a Cloud Native Computing Foundation sandbox project."}),k.jsx(kv,{children:"Xline for The Linux Foundation®"})]})]})})})},jT=()=>k.jsxs(k.Fragment,{children:[k.jsx(TT,{}),k.jsx(LE,{}),k.jsx(UT,{})]}),qT="/xline-home/assets/home-cover-d1b85aac.png",Ra="/xline-home/assets/underline-992439df.svg",HT="/xline-home/assets/home-introduction-7de62c15.png",WT="/xline-home/assets/home-feature-e6cc5478.png",YT="/xline-home/assets/home-feature-icon-1-633a0944.svg",VT="/xline-home/assets/home-feature-icon-2-f72f9c54.svg",GT="/xline-home/assets/home-feature-icon-3-f98e76a4.svg",KT="/xline-home/assets/home-feature-icon-4-25befa9a.svg",XT="/xline-home/assets/home-innovation-48569455.svg",QT=L.div` + background-image: url(${qT}); + background-size: cover; +`,ZT=L.div` + max-width: 1440px; + margin-inline: auto; + padding-top: calc(86px + 134px); + padding-bottom: 96px; + padding-inline: 156px; + color: white; + @media screen and (max-width: 1024px) { + padding-top: calc(69px + 100px); + padding-bottom: 72px; + padding-inline: 117px; + } + @media screen and (max-width: 768px) { + padding-top: calc(53px + 67px); + padding-bottom: 48px; + padding-inline: 78px; + } +`,JT=L.img` + width: 346px; + height: 100px; + margin-bottom: 36px; + @media screen and (max-width: 1024px) { + width: 225px; + height: 65px; + margin-bottom: 28px; + } + @media screen and (max-width: 786px) { + width: 104px; + height: 30px; + margin-bottom: 24px; + } +`,eA=L.h1` + max-width: 90%; + margin-bottom: 32px; + font-weight: 500; + font-size: 39px; + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + font-size: 28.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + font-size: 19px; + } +`,tA=L.button` + display: flex; + align-items: center; + height: 56px; + padding-inline: 48px; + color: ${e=>e.theme.color.white}; + font-size: 26px; + text-transform: capitalize; + background: linear-gradient( + 90deg, + hsla(270, 50%, 60%, 1), + hsla(257, 97%, 73%, 1) 50%, + hsla(266, 87%, 75%, 1) + ); + border: none; + border-radius: 50vh; + cursor: pointer; + @media screen and (max-width: 1024px) { + height: 42px; + padding-inline: 36px; + font-size: 19.5px; + } + @media screen and (max-width: 768px) { + height: 28px; + padding-inline: 24px; + font-size: 13px; + } +`,nA=L.div` + background: hsl(210, 20%, 98%); +`,rA=L.div` + /* display: flex; */ + max-width: 1440px; + margin-inline: auto; + padding-block: ${({theme:e})=>e.scale.xxl}; + padding-inline: 96px; + @media screen and (max-width: 1024px) { + padding-block: 96px; + padding-inline: 72px; + } + @media screen and (max-width: 768px) { + padding-block: 64px; + padding-inline: 48px; + } +`,iA=L.img` + float: right; + width: 40%; + margin-left: 40px; + margin-bottom: 40px; + object-fit: contain; + @media screen and (max-width: 1024px) { + margin-left: 30px; + margin-bottom: 30px; + } + @media screen and (max-width: 768px) { + margin-left: 20px; + margin-bottom: 20px; + } + @media screen and (max-width: 425px) { + width: 100%; + margin-left: 0px; + } +`,aA=L.div``,sA=L.p` + margin-bottom: ${({theme:e})=>e.scale.md}; + font-weight: 400; + font-size: 20px; + line-height: 1.6; + @media screen and (max-width: 1024px) { + font-size: 15px; + } + @media screen and (max-width: 768px) { + font-size: 10px; + } +`,oA=L.ul` + padding-left: ${({theme:e})=>e.scale.lg}; + @media screen and (max-width: 1024px) { + padding-left: 48px; + } + @media screen and (max-width: 768px) { + padding-left: 32px; + } +`,vf=L.li` + position: relative; + margin-bottom: ${({theme:e})=>e.scale.sm}; + font-weight: 400; + font-size: 20px; + line-height: 1.7; + @media screen and (max-width: 1024px) { + font-size: 15px; + } + @media screen and (max-width: 768px) { + font-size: 10px; + } + ::before { + content: ''; + position: absolute; + left: -48px; + top: 4px; + height: 32px; + width: 32px; + background: linear-gradient(90deg, #767ee5, #9966cc); + border-radius: 50%; + @media screen and (max-width: 1024px) { + left: -36px; + top: 3px; + width: 24px; + height: 24px; + } + @media screen and (max-width: 768px) { + left: -24px; + top: 2px; + width: 16px; + height: 16px; + } + } +`,lA=L.div``,cA=L.div` + display: flex; + /* align-items: center; */ + max-width: 1440px; + margin-inline: auto; + padding-block: ${({theme:e})=>e.scale.xxl}; + padding-inline: 96px; + @media screen and (max-width: 1440px) { + flex-direction: column; + } + @media screen and (max-width: 1024px) { + padding-block: 96px; + padding-inline: 72px; + } + @media screen and (max-width: 768px) { + padding-block: 64px; + padding-inline: 48px; + } +`,uA=L.div` + flex-shrink: 0; + width: 25%; + margin-right: 48px; + @media screen and (max-width: 1440px) { + width: 100%; + margin-right: 0; + margin-bottom: 16px; + } +`,dA=L.h2` + position: relative; + margin-top: 104px; + margin-bottom: 96px; + font-weight: 700; + font-size: 44px; + line-height: 1.4; + @media screen and (max-width: 1440px) { + margin-top: 0; + margin-bottom: 0px; + text-align: center; + } + @media screen and (max-width: 1024px) { + font-size: 36px; + } + @media screen and (max-width: 768px) { + font-size: 24px; + } + /* ::after { + content: ''; + z-index: -1; + position: absolute; + bottom: 0; + right: 50px; + display: inline-block; + width: 250px; + height: 30px; + background-image: url(${Ra}); + background-repeat: no-repeat; + background-size: contain; + } */ +`,hA=L.img` + display: block; + margin-inline: auto; + width: 100%; + @media screen and (max-width: 1440px) { + width: 30%; + } +`,fA=L.div` + display: flex; + justify-content: space-between; + align-content: space-between; + flex: 1; + flex-flow: wrap; +`,fu=L.div` + width: 48%; + padding: 16px; + @media screen and (max-width: 425px) { + width: 100%; + } +`,pu=L.div` + display: flex; + align-items: center; + justify-content: center; + width: 102px; + height: 102px; + margin-bottom: 32px; + background: linear-gradient(90deg, #767ee5, #9966cc); + border-radius: 24px; + @media screen and (max-width: 1024px) { + width: 76.5px; + height: 76.5px; + margin-bottom: 24px; + border-radius: 18px; + } + @media screen and (max-width: 768px) { + width: 51px; + height: 51px; + margin-bottom: 16px; + border-radius: 12px; + } +`,mu=L.img` + width: 50%; + height: 50%; +`,gu=L.h3` + margin-bottom: 16px; + font-weight: 500; + font-size: 28px; + line-height: 1.2; + @media screen and (max-width: 1024px) { + font-size: 21px; + margin-bottom: 12px; + } + @media screen and (max-width: 768px) { + font-size: 14px; + margin-bottom: 8px; + } +`,yu=L.p` + font-weight: 400; + font-size: 16px; + line-height: 1.5; + color: hsla(0, 0%, 0%, 0.6); + @media screen and (max-width: 1024px) { + font-size: 12px; + line-height: 1.3; + } + @media screen and (max-width: 768px) { + font-size: 8px; + line-height: 1.1; + } +`,pA=L.div` + background: #f9fafb; +`,mA=L.div` + display: flex; + max-width: 1440px; + margin-inline: auto; + padding-block: ${({theme:e})=>e.scale.xxl}; + padding-inline: 96px; + @media screen and (max-width: 1440px) { + flex-direction: column; + } + @media screen and (max-width: 1024px) { + padding-block: 96px; + padding-inline: 72px; + } + @media screen and (max-width: 768px) { + padding-block: 64px; + padding-inline: 48px; + } +`,gA=L.div` + flex-shrink: 0; + width: 25%; + margin-right: 48px; + @media screen and (max-width: 1440px) { + width: 100%; + margin-right: 0; + margin-bottom: 16px; + } +`,yA=L.div` + text-align: center; +`,bA=L.div` + display: inline-block; + position: relative; + width: 100%; + /* height: 70px; */ + margin-inline: auto; + margin-top: 72px; + margin-bottom: 48px; + font-weight: 700; + font-size: 44px; + line-height: 1.4; + /* background-image: url(${Ra}); + background-repeat: no-repeat; + background-position: bottom 0 right 0; */ + @media screen and (max-width: 1440px) { + margin-top: 0; + margin-bottom: 0; + } + @media screen and (max-width: 1024px) { + font-size: 36px; + } + @media screen and (max-width: 768px) { + font-size: 24px; + } +`,vA=L.img` + display: block; + position: relative; + left: 16px; + width: 100%; + margin-inline: auto; + object-fit: contain; + @media screen and (max-width: 1440px) { + left: 12px; + width: 30%; + } +`,wA=L.div` + flex: 1; + padding: 48px; + height: min-content; + background: white; + border-radius: 24px; + @media screen and (max-width: 1024px) { + padding: 36px; + border-radius: 18px; + } + @media screen and (max-width: 768px) { + padding: 24px; + border-radius: 12px; + } +`,wf=L.p` + margin-bottom: 32px; + font-weight: 400; + font-size: 18px; + line-height: 1.4; + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + font-size: 13.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + font-size: 9px; + } +`,xA=()=>{const e=Hi();return k.jsxs(k.Fragment,{children:[k.jsx(QT,{children:k.jsxs(ZT,{children:[k.jsx(JT,{src:d1,alt:"Xline"}),k.jsx(eA,{children:"A High-Performance Geo-distributed Metadata Management System"}),k.jsx(tA,{onClick:()=>e("/docs/Get-Started"),children:"get start"})]})}),k.jsx(nA,{children:k.jsxs(rA,{children:[k.jsx(iA,{src:HT,alt:"Image"}),k.jsxs(aA,{children:[k.jsx(sA,{children:"Data isolation and data fragmentation resulting from cloud barriers have become impediments to business growth. The biggest challenge of multi-data center architecture is how to maintain strong data consistency and ensure high performance. Traditional single-data center solutions cannot meet the availability, performance, and consistency requirements of multi-data center scenarios."}),k.jsxs(oA,{children:[k.jsx(vf,{children:"Xline is a distributed KV storage for metadata management. Xline makes it possible to manage metadata, such as indexes, permissions, and configurations across multiple clusters."}),k.jsx(vf,{children:"Xline can achieve high-performance data access and strong consistency in cross data center scenarios."}),k.jsx(vf,{children:"Xline is compatible with the ETCD interface, so that existing ETCD users can seamlessly switch to Xline and get high-performance metadata management across multiple clusters."})]})]})]})}),k.jsx(lA,{children:k.jsxs(cA,{children:[k.jsxs(uA,{children:[k.jsx(dA,{children:"Key Features of Xline"}),k.jsx(hA,{src:WT,alt:"Image"})]}),k.jsxs(fA,{children:[k.jsxs(fu,{children:[k.jsx(pu,{children:k.jsx(mu,{src:YT,alt:"icon"})}),k.jsx(gu,{children:"A distributed KV storage engine for multi-cluster"}),k.jsx(yu,{children:"Unified data management for multi-cluster scenarios, making mutual access, discovery, and modification simple and convenient."})]}),k.jsxs(fu,{children:[k.jsx(pu,{children:k.jsx(mu,{src:VT,alt:"icon"})}),k.jsx(gu,{children:"A unified metadata management system"}),k.jsx(yu,{children:"Data access across clouds by caching hot data in memory, and provide unified data management to automate data migration and backup."})]}),k.jsxs(fu,{children:[k.jsx(pu,{children:k.jsx(mu,{src:GT,alt:"icon"})}),k.jsx(gu,{children:"A high-performance multi-datacenter consensus protocol"}),k.jsx(yu,{children:"It is the first geo distributed consistency management service based on the WAN consensus protocol. It addresses the challenges of convergence and consistency across clouds."})]}),k.jsxs(fu,{children:[k.jsx(pu,{children:k.jsx(mu,{src:KT,alt:"icon"})}),k.jsx(gu,{children:"Compatible with the ETCD interface"}),k.jsx(yu,{children:"Provide KV interface, Multi-Version Concurrency Control and is compatible with K8S."})]})]})]})}),k.jsx(pA,{children:k.jsxs(mA,{children:[k.jsxs(gA,{children:[k.jsx(yA,{children:k.jsx(bA,{children:"Innovation"})}),k.jsx(vA,{src:XT,alt:"image"})]}),k.jsxs(wA,{children:[k.jsx(wf,{children:"Cross-datacenter network latency is the most important factor that impacts the performance of geo-distributed systems, especially when a consensus protocol is used. As is well known, consensus protocols are frequently used to achieve high availability. For instance, Etcd uses the Raft protocol, which is quite popular in recently developed systems."}),k.jsx(wf,{children:"Although Raft is stable and easy to implement, it takes 2 RTTs to complete a consensus request from the view of a client. One RTT takes place between the client and the leader server, and the leader server takes another RTT to broadcast the message to the follower servers. In a geo-distributed environment where an RTT can run from tens to hundreds of milliseconds, two RTTs would be too expensive."}),k.jsx(wf,{children:"We adopt a new consensus protocol named CURP to resolve the above issue. Please refer to the paper for a detailed description. The main benefit of the protocol is reducing 1 RTT when contention is not too high. As far as we know, Xline is the first product to use CURP."})]})]})})]})},kA="/xline-home/assets/contribute-cover-754f3436.svg",SA="/xline-home/assets/contribute-how-f55a255f.svg",_A="/xline-home/assets/protocol-icon-f31ce54b.svg",EA="/xline-home/assets/sever-icon-1e1bff49.svg",bu=L.div` + text-align: center; + margin-bottom: 24px; + @media screen and (max-width: 1024px) { + margin-bottom: 18px; + } + @media screen and (max-width: 768px) { + margin-bottom: 12px; + } +`,vu=L.div` + display: inline-block; + position: relative; + margin-inline: auto; + font-weight: 700; + font-size: 46px; + line-height: 2; + background-image: url(${Ra}); + background-repeat: no-repeat; + background-position: bottom 0 right 0; + background-size: 50%; + @media screen and (max-width: 1024px) { + font-size: 34.5px; + line-height: 1.3; + } + @media screen and (max-width: 768px) { + font-size: 23px; + } +`,Sv=L.p` + text-align: center; + margin-bottom: 48px; + font-weight: 500; + font-size: 28px; + line-height: 1.5; + @media screen and (max-width: 1024px) { + margin-bottom: 36px; + font-size: 21px; + } + @media screen and (max-width: 768px) { + margin-bottom: 24px; + font-size: 14px; + } +`,CA=L.div` + display: flex; + align-items: center; + padding-block: calc(160px + 86px); + color: white; + background-image: url(${kA}); + background-repeat: no-repeat; + background-size: cover; + @media screen and (max-width: 1024px) { + padding-block: calc(120px + 69px); + } + @media screen and (max-width: 768px) { + padding-block: calc(80px + 53px); + } +`,TA=L.div` + width: 100%; + max-width: ${e=>e.theme.scale.scale12}; + margin-inline: auto; + padding-inline: 128px; + @media screen and (max-width: 1024px) { + padding-inline: 96px; + } + @media screen and (max-width: 768px) { + padding-inline: 64px; + } +`,AA=L.h1` + margin-bottom: 20px; + font-weight: 700; + font-size: 72px; + line-height: 80px; + text-transform: capitalize; + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 54px; + line-height: 60px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 36px; + line-height: 40px; + } +`,NA=L.p` + font-weight: 500; + font-size: 30px; + line-height: 1.5; + @media screen and (max-width: 1024px) { + font-size: 22.5px; + } + @media screen and (max-width: 768px) { + font-size: 22.5px; + } +`,MA=L.div``,RA=L.div` + max-width: ${e=>e.theme.scale.scale12}; + margin-inline: auto; + padding-inline: 128px; + padding-block: 80px; + line-height: 1.5; + @media screen and (max-width: 1024px) { + padding-inline: 96px; + padding-block: 60px; + } + @media screen and (max-width: 768px) { + padding-inline: 64px; + padding-block: 40px; + } +`,IA=L.div` + display: flex; + align-items: center; + text-align: left; + @media screen and (max-width: 768px) { + flex-direction: column; + } +`,OA=L.p` + height: min-content; + padding: ${e=>e.theme.scale.scale06}; + background: #f9fafb; + font-weight: 600; + font-size: 28px; + line-height: 1.5; + border-radius: 24px; + @media screen and (max-width: 1024px) { + padding: 60px; + font-size: 21px; + border-radius: 18px; + } + @media screen and (max-width: 768px) { + padding: 40px; + font-size: 14px; + border-radius: 12px; + margin-bottom: 24px; + } + @media screen and (max-width: 768px) { + padding: 20px; + } +`,DA=L.img` + width: 40%; + @media screen and (max-width: 425px) { + width: 70%; + } +`,LA=L.div` + background: #f9fafb; +`,PA=L.div` + width: 100%; + max-width: ${e=>e.theme.scale.scale12}; + margin-inline: auto; + padding-inline: 128px; + padding-block: ${e=>e.theme.scale.scale06}; + @media screen and (max-width: 1024px) { + padding-inline: 96px; + padding-block: 60px; + } + @media screen and (max-width: 768px) { + padding-inline: 64px; + padding-block: 40px; + } +`,zA=L.div` + display: flex; + justify-content: space-between; + @media screen and (max-width: 768px) { + flex-direction: column; + } +`,_v=L.div` + display: flex; + flex-flow: column; + align-items: center; + width: 48%; + padding: 64px; + background: #fff; + box-shadow: 0px 2px 15px -4px rgba(0, 0, 0, 0.11); + border-radius: 24px; + @media screen and (max-width: 1024px) { + padding: 48px; + border-radius: 18px; + } + @media screen and (max-width: 768px) { + padding: 32px; + border-radius: 12px; + width: 100%; + margin-bottom: 24px; + :last-child { + margin-bottom: 0; + } + } +`,Ev=L.img` + width: 54px; + margin-bottom: 32px; + @media screen and (max-width: 1024px) { + width: 40.5px; + } + @media screen and (max-width: 768px) { + width: 27px; + } +`,Cv=L.h3` + margin-bottom: 32px; + font-weight: 500; + font-size: 28px; + line-height: 1.5; + @media screen and (max-width: 1024px) { + font-size: 21px; + margin-bottom: 24px; + } + @media screen and (max-width: 768px) { + font-size: 14px; + margin-bottom: 16px; + } +`,Tv=L.p` + font-weight: 400; + font-size: 18px; + line-height: 1.5; + @media screen and (max-width: 1024px) { + font-size: 13.5px; + } + @media screen and (max-width: 768px) { + font-size: 9px; + } +`,FA=L.div``,BA=L.div` + max-width: ${e=>e.theme.scale.scale12}; + margin-inline: auto; + padding-inline: ${e=>e.theme.scale.scale07}; + padding-block: ${e=>e.theme.scale.scale06}; + @media screen and (max-width: 1024px) { + padding-inline: 96px; + padding-block: 60px; + } + @media screen and (max-width: 768px) { + padding-inline: 64px; + padding-block: 40px; + } +`,$A=L.div` + padding: 64px; + background: #f9fafb; + border-radius: 24px; + text-align: left; + @media screen and (max-width: 1024px) { + padding: 48px; + border-radius: 18px; + } + @media screen and (max-width: 768px) { + padding: 32px; + border-radius: 12px; + } +`,UA=L.p` + font-weight: 400; + font-size: 22px; + line-height: 1.6; + @media screen and (max-width: 1024px) { + font-size: 16.5px; + } + @media screen and (max-width: 768px) { + font-size: 11px; + } +`,jA=L.ul` + list-style-type: disc; + padding-left: 2em; +`,Cs=L.li` + font-weight: 400; + font-size: 22px; + line-height: 1.6; + @media screen and (max-width: 1024px) { + font-size: 16.5px; + } + @media screen and (max-width: 768px) { + font-size: 11px; + } +`,qA=L.div` + background: #f9fafb; +`,HA=L.div` + max-width: ${e=>e.theme.scale.scale12}; + margin-inline: auto; + padding-inline: ${e=>e.theme.scale.scale07}; + padding-block: ${e=>e.theme.scale.scale06}; + @media screen and (max-width: 1024px) { + padding-inline: 96px; + padding-block: 60px; + } + @media screen and (max-width: 768px) { + padding-inline: 64px; + padding-block: 40px; + } +`,WA=L.p` + text-align: center; + font-weight: 500; + font-size: 28px; + line-height: 1.5; + margin-bottom: 256px; + @media screen and (max-width: 1024px) { + margin-bottom: 192px; + font-size: 21px; + } + @media screen and (max-width: 768px) { + margin-bottom: 128px; + font-size: 14px; + } +`,YA=()=>k.jsxs(k.Fragment,{children:[k.jsx(CA,{children:k.jsxs(TA,{children:[k.jsx(AA,{children:"contribute"}),k.jsx(NA,{children:"As an open-source project, Xline cannot grow without the support and participation of contributors from the community. If you would like to contribute to this project, be it Xline's code, documentation, or even our website, we would appreciate your help. We are glad to provide any support along the way."})]})}),k.jsx(MA,{children:k.jsxs(RA,{children:[k.jsx(bu,{children:k.jsx(vu,{children:"How to be a contributor?"})}),k.jsxs(IA,{children:[k.jsx(OA,{children:"As soon as a PR(Pull Request) proposed by you is approved and merged, you can become an Xline contributor!"}),k.jsx(DA,{src:SA,alt:"image"})]})]})}),k.jsx(LA,{children:k.jsxs(PA,{children:[k.jsx(bu,{children:k.jsx(vu,{children:"Pick an area to contribute"})}),k.jsx(Sv,{children:"You can choose one of the following areas to contribute to:"}),k.jsxs(zA,{children:[k.jsxs(_v,{children:[k.jsx(Ev,{src:_A,alt:"icon"}),k.jsx(Cv,{children:"CURP Protocol"}),k.jsx(Tv,{children:"The CURP distributed consensus algorithm implemented in Rust. Read Contribute to Xline for details on how to make contributions to the CURP code base."})]}),k.jsxs(_v,{children:[k.jsx(Ev,{src:EA,alt:"icon"}),k.jsx(Cv,{children:"Xline Server"}),k.jsx(Tv,{children:"The Xline distributed KV storage backend implemented in Rust. Read Contribute to Xline for details on how to make contributions to the CURP code base."})]})]})]})}),k.jsx(FA,{children:k.jsxs(BA,{children:[k.jsx(bu,{children:k.jsx(vu,{children:"Find an issue to work on"})}),k.jsx(Sv,{children:"For beginners, we have prepared many suitable tasks for you. You can check out, for example, our Help Wanted issues in the repository."}),k.jsxs($A,{children:[k.jsx(UA,{children:"See below for some commonly used labels across major repositories listed in:"}),k.jsxs(jA,{children:[k.jsx(Cs,{children:"bug - Indicates an unexpected problem or unintended behavior; it can be small or big in scope"}),k.jsx(Cs,{children:"good first issue - An ideal first issue to work on for first-time contributors, with mentoring available"}),k.jsx(Cs,{children:"help wanted - Indicates that a maintainer wants help on an issue or pull request"}),k.jsx(Cs,{children:"discussion - Status: Under discussion or needs discussion"}),k.jsx(Cs,{children:"enhancement - New feature or request"}),k.jsx(Cs,{children:"question - Further information is requested, or the question is to be answered."})]})]})]})}),k.jsx(qA,{children:k.jsxs(HA,{children:[k.jsx(bu,{children:k.jsx(vu,{children:"Ask a question"})}),k.jsxs(WA,{children:["If you need any help to get started, understand the codebase, or make a PR(or anything else really), please feel free to ask us on",k.jsx("a",{href:"https://discord.gg/8PrRCP3s",children:" Discord"}),"."]})]})})]}),Av=["http","https","mailto","tel"];function VA(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++ii||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */var GA=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};const X3=GA;function El(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Nv(e.position):"start"in e||"end"in e?Nv(e):"line"in e||"column"in e?km(e):""}function km(e){return Mv(e&&e.line)+":"+Mv(e&&e.column)}function Nv(e){return km(e&&e.start)+"-"+km(e&&e.end)}function Mv(e){return e&&typeof e=="number"?e:1}class wr extends Error{constructor(t,n,r){const i=[null,null];let a={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const s=r.indexOf(":");s===-1?i[1]=r:(i[0]=r.slice(0,s),i[1]=r.slice(s+1))}n&&("type"in n||"position"in n?n.position&&(a=n.position):"start"in n||"end"in n?a=n:("line"in n||"column"in n)&&(a.start=n)),this.name=El(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=a.start.line,this.column=a.start.column,this.position=a,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}wr.prototype.file="";wr.prototype.name="";wr.prototype.reason="";wr.prototype.message="";wr.prototype.stack="";wr.prototype.fatal=null;wr.prototype.column=null;wr.prototype.line=null;wr.prototype.source=null;wr.prototype.ruleId=null;wr.prototype.position=null;const Gr={basename:KA,dirname:XA,extname:QA,join:ZA,sep:"/"};function KA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');wc(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.charCodeAt(i)===t.charCodeAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function XA(e){if(wc(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function QA(e){wc(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.charCodeAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function ZA(...e){let t=-1,n;for(;++t0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function eN(e,t){let n="",r=0,i=-1,a=0,s=-1,o,l;for(;++s<=e.length;){if(s2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return n}function wc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tN={cwd:nN};function nN(){return"/"}function Sm(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function rN(e){if(typeof e=="string")e=new URL(e);else if(!Sm(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return iN(e)}function iN(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n"u"||nd.call(t,i)},zv=function(t,n){Ov&&n.name==="__proto__"?Ov(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Fv=function(t,n){if(n==="__proto__")if(nd.call(t,n)){if(Dv)return Dv(t,n).value}else return;return t[n]},Bv=function e(){var t,n,r,i,a,s,o=arguments[0],l=1,c=arguments.length,u=!1;for(typeof o=="boolean"&&(u=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});ls.length;let l;o&&s.push(i);try{l=e.apply(this,s)}catch(c){const u=c;if(o&&n)throw u;return i(u)}o||(l instanceof Promise?l.then(a,i):l instanceof Error?i(l):a(l))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const lN=e6().freeze(),J3={}.hasOwnProperty;function e6(){const e=sN(),t=[];let n={},r,i=-1;return a.data=s,a.Parser=void 0,a.Compiler=void 0,a.freeze=o,a.attachers=t,a.use=l,a.parse=c,a.stringify=u,a.run=d,a.runSync=f,a.process=p,a.processSync=m,a;function a(){const h=e6();let w=-1;for(;++w{if(E||!R||!F)A(E);else{const q=a.stringify(R,F);q==null||(dN(q)?F.value=q:F.result=q),A(E,F)}});function A(E,R){E||!R?x(E):v?v(R):w(null,R)}}}function m(h){let w;a.freeze(),_f("processSync",a.Parser),Ef("processSync",a.Compiler);const y=rl(h);return a.process(y,v),jv("processSync","process",w),y;function v(x){w=!0,Iv(x)}}}function $v(e,t){return typeof e=="function"&&e.prototype&&(cN(e.prototype)||t in e.prototype)}function cN(e){let t;for(t in e)if(J3.call(e,t))return!0;return!1}function _f(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function Ef(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Cf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Uv(e){if(!_m(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function jv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rl(e){return uN(e)?e:new Q3(e)}function uN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function dN(e){return typeof e=="string"||X3(e)}function hN(e,t){const n=(t||{}).includeImageAlt;return t6(e,typeof n=="boolean"?n:!0)}function t6(e,t){return fN(e)&&("value"in e&&e.value||t&&"alt"in e&&e.alt||"children"in e&&qv(e.children,t))||Array.isArray(e)&&qv(e,t)||""}function qv(e,t){const n=[];let r=-1;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),[].splice.apply(e,s);else for(n&&[].splice.apply(e,[t,n]);a0?(Xn(e,e.length,0,t),e):t}const Hv={}.hasOwnProperty;function n6(e){const t={};let n=-1;for(;++ns))return;const R=t.events.length;let F=R,q,K;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if(q){K=t.events[F][1].end;break}q=!0}for(y(r),E=R;Ex;){const A=n[_];t.containerState=A[1],A[0].exit.call(t,e)}n.length=x}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function SN(e,t,n){return it(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Wd(e){if(e===null||Qt(e)||Qh(e))return 1;if(Zh(e))return 2}function Jh(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d=Object.assign({},e[r][1].end),f=Object.assign({},e[n][1].start);Vv(d,-l),Vv(f,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},o={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:f},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=sr(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=sr(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=sr(c,Jh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=sr(c,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=sr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Xn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n=4?s(c):n(c)}function s(c){return c===null?l(c):Me(c)?e.attempt(LN,s,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||Me(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function zN(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Me(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):it(e,a,"linePrefix",4+1)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):Me(s)?i(s):n(s)}}const FN={name:"codeText",tokenize:UN,resolve:BN,previous:$N};function BN(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function o6(e,t,n,r,i,a,s,o,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),f):y===null||y===41||Zl(y)?n(y):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),h(y))}function f(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(o),f(y)):y===null||y===60||Me(y)?n(y):(e.consume(y),y===92?m:p)}function m(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function h(y){return y===40?++u>c?n(y):(e.consume(y),h):y===41?u--?(e.consume(y),h):(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(y)):y===null||Qt(y)?u?n(y):(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(y)):Zl(y)?n(y):(e.consume(y),y===92?w:h)}function w(y){return y===40||y===41||y===92?(e.consume(y),h):h(y)}}function l6(e,t,n,r,i,a){const s=this;let o=0,l;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),u}function u(p){return p===null||p===91||p===93&&!l||p===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs||o>999?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Me(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Me(p)||o++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l=l||!gt(p),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),o++,d):d(p)}}function c6(e,t,n,r,i,a){let s;return o;function o(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,l}function l(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(a),c(f))}function c(f){return f===s?(e.exit(a),l(s)):f===null?n(f):Me(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),it(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===s||f===null||Me(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===s||f===92?(e.consume(f),u):u(f)}}function Cl(e,t){let n;return r;function r(i){return Me(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):gt(i)?it(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function zr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const GN={name:"definition",tokenize:XN},KN={tokenize:QN,partial:!0};function XN(e,t,n){const r=this;let i;return a;function a(l){return e.enter("definition"),l6.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(l)}function s(l){return i=zr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),l===58?(e.enter("definitionMarker"),e.consume(l),e.exit("definitionMarker"),Cl(e,o6(e,e.attempt(KN,it(e,o,"whitespace"),it(e,o,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(l)}function o(l){return l===null||Me(l)?(e.exit("definition"),r.parser.defined.includes(i)||r.parser.defined.push(i),t(l)):n(l)}}function QN(e,t,n){return r;function r(s){return Qt(s)?Cl(e,i)(s):n(s)}function i(s){return s===34||s===39||s===40?c6(e,it(e,a,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s):n(s)}function a(s){return s===null||Me(s)?t(s):n(s)}}const ZN={name:"hardBreakEscape",tokenize:JN};function JN(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(a),i}function i(a){return Me(a)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(a)):n(a)}}const eM={name:"headingAtx",tokenize:nM,resolve:tM};function tM(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function nM(e,t,n){const r=this;let i=0;return a;function a(u){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&i++<6?(e.consume(u),s):u===null||Qt(u)?(e.exit("atxHeadingSequence"),r.interrupt?t(u):o(u)):n(u)}function o(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Me(u)?(e.exit("atxHeading"),t(u)):gt(u)?it(e,o,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),o(u))}function c(u){return u===null||u===35||Qt(u)?(e.exit("atxHeadingText"),o(u)):(e.consume(u),c)}}const rM=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Xv=["pre","script","style","textarea"],iM={name:"htmlFlow",tokenize:oM,resolveTo:sM,concrete:!0},aM={tokenize:lM,partial:!0};function sM(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function oM(e,t,n){const r=this;let i,a,s,o,l;return c;function c(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),u}function u(T){return T===33?(e.consume(T),d):T===47?(e.consume(T),m):T===63?(e.consume(T),i=3,r.interrupt?t:Y):lr(T)?(e.consume(T),s=String.fromCharCode(T),a=!0,h):n(T)}function d(T){return T===45?(e.consume(T),i=2,f):T===91?(e.consume(T),i=5,s="CDATA[",o=0,p):lr(T)?(e.consume(T),i=4,r.interrupt?t:Y):n(T)}function f(T){return T===45?(e.consume(T),r.interrupt?t:Y):n(T)}function p(T){return T===s.charCodeAt(o++)?(e.consume(T),o===s.length?r.interrupt?t:W:p):n(T)}function m(T){return lr(T)?(e.consume(T),s=String.fromCharCode(T),h):n(T)}function h(T){return T===null||T===47||T===62||Qt(T)?T!==47&&a&&Xv.includes(s.toLowerCase())?(i=1,r.interrupt?t(T):W(T)):rM.includes(s.toLowerCase())?(i=6,T===47?(e.consume(T),w):r.interrupt?t(T):W(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):a?v(T):y(T)):T===45||_n(T)?(e.consume(T),s+=String.fromCharCode(T),h):n(T)}function w(T){return T===62?(e.consume(T),r.interrupt?t:W):n(T)}function y(T){return gt(T)?(e.consume(T),y):q(T)}function v(T){return T===47?(e.consume(T),q):T===58||T===95||lr(T)?(e.consume(T),x):gt(T)?(e.consume(T),v):q(T)}function x(T){return T===45||T===46||T===58||T===95||_n(T)?(e.consume(T),x):_(T)}function _(T){return T===61?(e.consume(T),A):gt(T)?(e.consume(T),_):v(T)}function A(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),l=T,E):gt(T)?(e.consume(T),A):(l=null,R(T))}function E(T){return T===null||Me(T)?n(T):T===l?(e.consume(T),F):(e.consume(T),E)}function R(T){return T===null||T===34||T===39||T===60||T===61||T===62||T===96||Qt(T)?_(T):(e.consume(T),R)}function F(T){return T===47||T===62||gt(T)?v(T):n(T)}function q(T){return T===62?(e.consume(T),K):n(T)}function K(T){return gt(T)?(e.consume(T),K):T===null||Me(T)?W(T):n(T)}function W(T){return T===45&&i===2?(e.consume(T),Ce):T===60&&i===1?(e.consume(T),O):T===62&&i===4?(e.consume(T),X):T===63&&i===3?(e.consume(T),Y):T===93&&i===5?(e.consume(T),B):Me(T)&&(i===6||i===7)?e.check(aM,X,G)(T):T===null||Me(T)?G(T):(e.consume(T),W)}function G(T){return e.exit("htmlFlowData"),ue(T)}function ue(T){return T===null?N(T):Me(T)?e.attempt({tokenize:fe,partial:!0},ue,N)(T):(e.enter("htmlFlowData"),W(T))}function fe(T,Q,ne){return ge;function ge(Ee){return T.enter("lineEnding"),T.consume(Ee),T.exit("lineEnding"),$}function $(Ee){return r.parser.lazy[r.now().line]?ne(Ee):Q(Ee)}}function Ce(T){return T===45?(e.consume(T),Y):W(T)}function O(T){return T===47?(e.consume(T),s="",V):W(T)}function V(T){return T===62&&Xv.includes(s.toLowerCase())?(e.consume(T),X):lr(T)&&s.length<8?(e.consume(T),s+=String.fromCharCode(T),V):W(T)}function B(T){return T===93?(e.consume(T),Y):W(T)}function Y(T){return T===62?(e.consume(T),X):T===45&&i===2?(e.consume(T),Y):W(T)}function X(T){return T===null||Me(T)?(e.exit("htmlFlowData"),N(T)):(e.consume(T),X)}function N(T){return e.exit("htmlFlow"),t(T)}}function lM(e,t,n){return r;function r(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(xc,t,n)}}const cM={name:"htmlText",tokenize:uM};function uM(e,t,n){const r=this;let i,a,s,o;return l;function l(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),c}function c(N){return N===33?(e.consume(N),u):N===47?(e.consume(N),R):N===63?(e.consume(N),A):lr(N)?(e.consume(N),K):n(N)}function u(N){return N===45?(e.consume(N),d):N===91?(e.consume(N),a="CDATA[",s=0,w):lr(N)?(e.consume(N),_):n(N)}function d(N){return N===45?(e.consume(N),f):n(N)}function f(N){return N===null||N===62?n(N):N===45?(e.consume(N),p):m(N)}function p(N){return N===null||N===62?n(N):m(N)}function m(N){return N===null?n(N):N===45?(e.consume(N),h):Me(N)?(o=m,B(N)):(e.consume(N),m)}function h(N){return N===45?(e.consume(N),X):m(N)}function w(N){return N===a.charCodeAt(s++)?(e.consume(N),s===a.length?y:w):n(N)}function y(N){return N===null?n(N):N===93?(e.consume(N),v):Me(N)?(o=y,B(N)):(e.consume(N),y)}function v(N){return N===93?(e.consume(N),x):y(N)}function x(N){return N===62?X(N):N===93?(e.consume(N),x):y(N)}function _(N){return N===null||N===62?X(N):Me(N)?(o=_,B(N)):(e.consume(N),_)}function A(N){return N===null?n(N):N===63?(e.consume(N),E):Me(N)?(o=A,B(N)):(e.consume(N),A)}function E(N){return N===62?X(N):A(N)}function R(N){return lr(N)?(e.consume(N),F):n(N)}function F(N){return N===45||_n(N)?(e.consume(N),F):q(N)}function q(N){return Me(N)?(o=q,B(N)):gt(N)?(e.consume(N),q):X(N)}function K(N){return N===45||_n(N)?(e.consume(N),K):N===47||N===62||Qt(N)?W(N):n(N)}function W(N){return N===47?(e.consume(N),X):N===58||N===95||lr(N)?(e.consume(N),G):Me(N)?(o=W,B(N)):gt(N)?(e.consume(N),W):X(N)}function G(N){return N===45||N===46||N===58||N===95||_n(N)?(e.consume(N),G):ue(N)}function ue(N){return N===61?(e.consume(N),fe):Me(N)?(o=ue,B(N)):gt(N)?(e.consume(N),ue):W(N)}function fe(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),i=N,Ce):Me(N)?(o=fe,B(N)):gt(N)?(e.consume(N),fe):(e.consume(N),i=void 0,V)}function Ce(N){return N===i?(e.consume(N),O):N===null?n(N):Me(N)?(o=Ce,B(N)):(e.consume(N),Ce)}function O(N){return N===62||N===47||Qt(N)?W(N):n(N)}function V(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===62||Qt(N)?W(N):(e.consume(N),V)}function B(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),it(e,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Y(N){return e.enter("htmlTextData"),o(N)}function X(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}}const f1={name:"labelEnd",tokenize:gM,resolveTo:mM,resolveAll:pM},dM={tokenize:yM},hM={tokenize:bM},fM={tokenize:vM};function pM(e){let t=-1,n;for(;++t-1&&(s[0]=s[0].slice(r)),a>0&&s.push(e[i].slice(0,a))),s}function qM(e,t){let n=-1;const r=[];let i;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const rR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function f6(e){return e.replace(rR,iR)}function iR(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return h6(n.slice(a?2:1),a?16:10)}return h1(n)||e}const p6={}.hasOwnProperty,aR=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),sR(n)(nR(eR(n).document().write(tR()(e,t,!0))))};function sR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ie),autolinkProtocol:W,autolinkEmail:W,atxHeading:o(ut),blockQuote:o(Ue),characterEscape:W,characterReference:W,codeFenced:o(Ae),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Ae,l),codeText:o(pt,l),codeTextData:W,data:W,codeFlowValue:W,definition:o(et),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o($e),hardBreakEscape:o(de),hardBreakTrailing:o(de),htmlFlow:o(lt,l),htmlFlowData:W,htmlText:o(lt,l),htmlTextData:W,image:o(tt),label:l,link:o(Ie),listItem:o(an),listItemValue:m,listOrdered:o(cn,p),listUnordered:o(cn),paragraph:o($t),reference:ge,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(ut),strong:o(Oe),thematicBreak:o(xe)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:Re,autolinkProtocol:Se,blockQuote:u(),characterEscapeValue:G,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:J,codeFenced:u(v),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:w,codeFlowValue:G,codeIndented:u(x),codeText:u(V),codeTextData:G,data:G,definition:u(),definitionDestinationString:E,definitionLabelString:_,definitionTitleString:A,emphasis:u(),hardBreakEscape:u(fe),hardBreakTrailing:u(fe),htmlFlow:u(Ce),htmlFlowData:G,htmlText:u(O),htmlTextData:G,image:u(Y),label:N,labelText:X,lineEnding:ue,link:u(B),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:$,resourceDestinationString:T,resourceTitleString:Q,resource:ne,setextHeading:u(K),setextHeadingLineSequence:q,setextHeadingText:F,strong:u(),thematicBreak:u()}};m6(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(U){let M={type:"root",children:[]};const z={stack:[M],tokenStack:[],config:t,enter:c,exit:d,buffer:l,resume:f,setData:a,getData:s},H=[];let le=-1;for(;++le0){const ye=z.tokenStack[z.tokenStack.length-1];(ye[1]||Jv).call(z,void 0,ye[0])}for(M.position={start:Xi(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:Xi(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},le=-1;++le{const r=this.data("settings");return aR(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function cR(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function uR(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` +`}]}function dR(e,t){const n=t.value?t.value+` +`:"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function hR(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fR(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Io(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function g6(e,t){const n=String(t.identifier).toUpperCase(),r=Io(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let a;i===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,a=e.footnoteOrder.length):(e.footnoteCounts[n]++,a=i+1);const s=e.footnoteCounts[n],o={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,o);const l={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,l),e.applyData(t,l)}function pR(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},g6(e,{type:"footnoteReference",identifier:i,position:t.position})}function mR(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gR(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function y6(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+r};const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function yR(e,t){const n=e.definition(t.identifier);if(!n)return y6(e,t);const r={src:Io(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function bR(e,t){const n={src:Io(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function vR(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function wR(e,t){const n=e.definition(t.identifier);if(!n)return y6(e,t);const r={href:Io(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function xR(e,t){const n={href:Io(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function kR(e,t,n){const r=e.all(t),i=n?SR(n):b6(t),a={},s=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o1}function _R(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i-1?r.offset:null}}}function NR(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=p1(t.children[1]),l=m1(t.children[t.children.length-1]);o.line&&l.line&&(s.position={start:o,end:l}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function MR(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let l=-1;const c=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(nw(t.slice(i),i>0,!1)),a.join("")}function nw(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===ew||a===tw;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===ew||a===tw;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function OR(e,t){const n={type:"text",value:IR(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function DR(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const LR={blockquote:cR,break:uR,code:dR,delete:hR,emphasis:fR,footnoteReference:g6,footnote:pR,heading:mR,html:gR,imageReference:yR,image:bR,inlineCode:vR,linkReference:wR,link:xR,listItem:kR,list:_R,paragraph:ER,root:CR,strong:TR,table:NR,tableCell:RR,tableRow:MR,text:OR,thematicBreak:DR,toml:wu,yaml:wu,definition:wu,footnoteDefinition:wu};function wu(){return null}const e0=function(e){if(e==null)return BR;if(typeof e=="string")return FR(e);if(typeof e=="object")return Array.isArray(e)?PR(e):zR(e);if(typeof e=="function")return t0(e);throw new Error("Expected function, string, or object as test")};function PR(e){const t=[];let n=-1;for(;++n":""))+")"})}return d;function d(){let f=[],p,m,h;if((!t||i(o,l,c[c.length-1]||null))&&(f=jR(n(o,c)),f[0]===rw))return f;if(o.children&&f[0]!==UR)for(m=(r?o.children.length:-1)+a,h=c.concat(o);m>-1&&m{const i=aw(r.identifier);i&&!iw.call(t,i)&&(t[i]=r)}),n;function n(r){const i=aw(r);return i&&iw.call(t,i)?t[i]:null}}function aw(e){return String(e||"").toUpperCase()}const Yd={}.hasOwnProperty;function WR(e,t){const n=t||{},r=n.allowDangerousHtml||!1,i={};return s.dangerous=r,s.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,s.footnoteLabel=n.footnoteLabel||"Footnotes",s.footnoteLabelTagName=n.footnoteLabelTagName||"h2",s.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},s.footnoteBackLabel=n.footnoteBackLabel||"Back to content",s.unknownHandler=n.unknownHandler,s.passThrough=n.passThrough,s.handlers={...LR,...n.handlers},s.definition=HR(e),s.footnoteById=i,s.footnoteOrder=[],s.footnoteCounts={},s.patch=YR,s.applyData=VR,s.one=o,s.all=l,s.wrap=KR,s.augment=a,n0(e,"footnoteDefinition",c=>{const u=String(c.identifier).toUpperCase();Yd.call(i,u)||(i[u]=c)}),s;function a(c,u){if(c&&"data"in c&&c.data){const d=c.data;d.hName&&(u.type!=="element"&&(u={type:"element",tagName:"",properties:{},children:[]}),u.tagName=d.hName),u.type==="element"&&d.hProperties&&(u.properties={...u.properties,...d.hProperties}),"children"in u&&u.children&&d.hChildren&&(u.children=d.hChildren)}if(c){const d="type"in c?c:{position:c};qR(d)||(u.position={start:p1(d),end:m1(d)})}return u}function s(c,u,d,f){return Array.isArray(d)&&(f=d,d={}),a(c,{type:"element",tagName:u,properties:d||{},children:f||[]})}function o(c,u){return x6(s,c,u)}function l(c){return g1(s,c)}}function YR(e,t){e.position&&(t.position=AR(e))}function VR(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&a&&(n.properties={...n.properties,...a}),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function x6(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return Yd.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:g1(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):GR(e,t)}function g1(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i0&&n.push({type:"text",value:` +`}),n}function XR(e){const t=[];let n=-1;for(;++n1?"-"+o:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};o>1&&d.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(o)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(d)}const c=i[i.length-1];if(c&&c.type==="element"&&c.tagName==="p"){const d=c.children[c.children.length-1];d&&d.type==="text"?d.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...l)}else i.push(...l);const u={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+s},children:e.wrap(i,!0)};e.patch(r,u),t.push(u)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:` +`}]}}function k6(e,t){const n=WR(e,t),r=n.one(e,null),i=XR(n);return i&&r.children.push({type:"text",value:` +`},i),Array.isArray(r)?{type:"root",children:r}:r}const QR=function(e,t){return e&&"run"in e?JR(e,t):eI(e||t)},ZR=QR;function JR(e,t){return(n,r,i)=>{e.run(k6(n,t),r,a=>{i(a)})}}function eI(e){return t=>k6(t,e)}var Fe={},tI={get exports(){return Fe},set exports(e){Fe=e}},nI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",rI=nI,iI=rI;function S6(){}function _6(){}_6.resetWarningCache=S6;var aI=function(){function e(r,i,a,s,o,l){if(l!==iI){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:_6,resetWarningCache:S6};return n.PropTypes=n,n};tI.exports=aI();let kc=class{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}};kc.prototype.property={};kc.prototype.normal={};kc.prototype.space=null;function E6(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&uI.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ow,pI);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ow.test(a)){let s=a.replace(dI,fI);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=y1}return new i(r,t)}function fI(e){return"-"+e.toLowerCase()}function pI(e){return e.charAt(1).toUpperCase()}const lw={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},mI=E6([A6,T6,R6,I6,lI],"html"),gI=E6([A6,T6,R6,I6,cI],"svg");function yI(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{n0(t,"element",(n,r,i)=>{const a=i;let s;if(e.allowedElements?s=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(s=e.disallowedElements.includes(n.tagName)),!s&&e.allowElement&&typeof r=="number"&&(s=!e.allowElement(n,r,a)),s&&typeof r=="number")return e.unwrapDisallowed&&n.children?a.children.splice(r,1,...n.children):a.children.splice(r,1),r})}}function bI(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function vI(e){return e.join(" ").trim()}function wI(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Vd={},xI={get exports(){return Vd},set exports(e){Vd=e}},cw=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,kI=/\n/g,SI=/^\s*/,_I=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,EI=/^:\s*/,CI=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,TI=/^[;\s]*/,AI=/^\s+|\s+$/g,NI=` +`,uw="/",dw="*",ja="",MI="comment",RI="declaration",II=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var h=m.match(kI);h&&(n+=h.length);var w=m.lastIndexOf(NI);r=~w?m.length-w:r+m.length}function a(){var m={line:n,column:r};return function(h){return h.position=new s(m),c(),h}}function s(m){this.start=m,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function o(m){var h=new Error(t.source+":"+n+":"+r+": "+m);if(h.reason=m,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(m){var h=m.exec(e);if(h){var w=h[0];return i(w),e=e.slice(w.length),h}}function c(){l(SI)}function u(m){var h;for(m=m||[];h=d();)h!==!1&&m.push(h);return m}function d(){var m=a();if(!(uw!=e.charAt(0)||dw!=e.charAt(1))){for(var h=2;ja!=e.charAt(h)&&(dw!=e.charAt(h)||uw!=e.charAt(h+1));)++h;if(h+=2,ja===e.charAt(h-1))return o("End of comment missing");var w=e.slice(2,h-2);return r+=2,i(w),e=e.slice(h),r+=2,m({type:MI,comment:w})}}function f(){var m=a(),h=l(_I);if(h){if(d(),!l(EI))return o("property missing ':'");var w=l(CI),y=m({type:RI,property:hw(h[0].replace(cw,ja)),value:w?hw(w[0].replace(cw,ja)):ja});return l(TI),y}}function p(){var m=[];u(m);for(var h;h=f();)h!==!1&&(m.push(h),u(m));return m}return c(),p()};function hw(e){return e?e.replace(AI,ja):ja}var OI=II;function O6(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,i=OI(e),a=typeof t=="function",s,o,l=0,c=i.length;l0?Fn.createElement(p,l,d):Fn.createElement(p,l)}function zI(e){let t=-1;for(;++t for more info)`),delete xu[a]}const t=lN().use(lR).use(e.remarkPlugins||[]).use(ZR,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(yI,e),n=new Q3;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=Fn.createElement(Fn.Fragment,{},D6({options:e,schema:mI,listDepth:0},r));return e.className&&(i=Fn.createElement("div",{className:e.className},i)),i}Do.propTypes={children:Fe.string,className:Fe.string,allowElement:Fe.func,allowedElements:Fe.arrayOf(Fe.string),disallowedElements:Fe.arrayOf(Fe.string),unwrapDisallowed:Fe.bool,remarkPlugins:Fe.arrayOf(Fe.oneOfType([Fe.object,Fe.func,Fe.arrayOf(Fe.oneOfType([Fe.bool,Fe.string,Fe.object,Fe.func,Fe.arrayOf(Fe.any)]))])),rehypePlugins:Fe.arrayOf(Fe.oneOfType([Fe.object,Fe.func,Fe.arrayOf(Fe.oneOfType([Fe.bool,Fe.string,Fe.object,Fe.func,Fe.arrayOf(Fe.any)]))])),sourcePos:Fe.bool,rawSourcePos:Fe.bool,skipHtml:Fe.bool,includeElementIndex:Fe.bool,transformLinkUri:Fe.oneOfType([Fe.func,Fe.bool]),linkTarget:Fe.oneOfType([Fe.func,Fe.string]),transformImageUri:Fe.func,components:Fe.object};const qI={tokenize:GI,partial:!0},L6={tokenize:KI,partial:!0},P6={tokenize:XI,partial:!0},lo={tokenize:ZI,partial:!0},z6={tokenize:QI,partial:!0},F6={tokenize:YI,previous:U6},B6={tokenize:VI,previous:v1},Wi={tokenize:WI,previous:j6},li={},HI={text:li};let La=48;for(;La<123;)li[La]=Wi,La++,La===58?La=65:La===91&&(La=97);li[43]=Wi;li[45]=Wi;li[46]=Wi;li[95]=Wi;li[72]=[Wi,B6];li[104]=[Wi,B6];li[87]=[Wi,F6];li[119]=[Wi,F6];function WI(e,t,n){const r=this;let i,a;return s;function s(p){return!pw(p)||!j6(r.previous)||w1(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(p))}function o(p){return pw(p)?(e.consume(p),o):p===64?(e.consume(p),l):n(p)}function l(p){return p===46?e.check(lo,f,c)(p):p===45||p===95?e.check(lo,n,u)(p):_n(p)?(!a&&Hd(p)&&(a=!0),e.consume(p),l):f(p)}function c(p){return e.consume(p),i=!0,a=void 0,l}function u(p){return e.consume(p),d}function d(p){return p===46?e.check(lo,n,c)(p):l(p)}function f(p){return i&&!a?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function YI(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!U6(r.previous)||w1(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(qI,e.attempt(L6,e.attempt(P6,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function VI(e,t,n){const r=this;return i;function i(m){return m!==72&&m!==104||!v1(r.previous)||w1(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(m),a)}function a(m){return m===84||m===116?(e.consume(m),s):n(m)}function s(m){return m===84||m===116?(e.consume(m),o):n(m)}function o(m){return m===80||m===112?(e.consume(m),l):n(m)}function l(m){return m===83||m===115?(e.consume(m),c):c(m)}function c(m){return m===58?(e.consume(m),u):n(m)}function u(m){return m===47?(e.consume(m),d):n(m)}function d(m){return m===47?(e.consume(m),f):n(m)}function f(m){return m===null||Zl(m)||Qh(m)||Zh(m)?n(m):e.attempt(L6,e.attempt(P6,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function GI(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return l===87||l===119?(e.consume(l),a):n(l)}function a(l){return l===87||l===119?(e.consume(l),s):n(l)}function s(l){return l===46?(e.consume(l),o):n(l)}function o(l){return l===null||Me(l)?n(l):t(l)}}function KI(e,t,n){let r,i;return a;function a(l){return l===38?e.check(z6,o,s)(l):l===46||l===95?e.check(lo,o,s)(l):l===null||Zl(l)||Qh(l)||l!==45&&Zh(l)?o(l):(e.consume(l),a)}function s(l){return l===46?(i=r,r=void 0,e.consume(l),a):(l===95&&(r=!0),e.consume(l),a)}function o(l){return!i&&!r?t(l):n(l)}}function XI(e,t){let n=0;return r;function r(s){return s===38?e.check(z6,t,i)(s):(s===40&&n++,s===41?e.check(lo,a,i)(s):b1(s)?t(s):$6(s)?e.check(lo,t,i)(s):(e.consume(s),r))}function i(s){return e.consume(s),r}function a(s){return n--,n<0?t(s):i(s)}}function QI(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return lr(s)?(e.consume(s),i):s===59?(e.consume(s),a):n(s)}function a(s){return b1(s)?t(s):n(s)}}function ZI(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return $6(a)?(e.consume(a),i):b1(a)?t(a):n(a)}}function $6(e){return e===33||e===34||e===39||e===41||e===42||e===44||e===46||e===58||e===59||e===60||e===63||e===95||e===126}function b1(e){return e===null||e===60||Qt(e)}function pw(e){return e===43||e===45||e===46||e===95||_n(e)}function U6(e){return e===null||e===40||e===42||e===95||e===126||Qt(e)}function v1(e){return e===null||!lr(e)}function j6(e){return e!==47&&v1(e)}function w1(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const JI={tokenize:oO,partial:!0};function eO(){return{document:{[91]:{tokenize:iO,continuation:{tokenize:aO},exit:sO}},text:{[91]:{tokenize:rO},[93]:{add:"after",tokenize:tO,resolveTo:nO}}}}function tO(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!s||!s._balanced)return n(l);const c=zr(r.sliceSerialize({start:s.end,end:r.now()}));return c.charCodeAt(0)!==94||!a.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function nO(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function rO(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){let p;return f===null||f===91||a++>999?n(f):f===93?s?(e.exit("chunkString"),p=e.exit("gfmFootnoteCallString"),i.includes(zr(r.sliceSerialize(p)))?d(f):n(f)):n(f):(e.consume(f),Qt(f)||(s=!0),f===92?u:c)}function u(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}function d(f){return e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t}}function iO(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),u):n(h)}function u(h){let w;return h===null||h===91||s>999?n(h):h===93?o?(w=e.exit("gfmFootnoteDefinitionLabelString"),a=zr(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p):n(h):Me(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),s++,u):(e.enter("chunkString").contentType="string",d(h))}function d(h){return h===null||Me(h)||h===91||h===93||s>999?(e.exit("chunkString"),u(h)):(Qt(h)||(o=!0),s++,e.consume(h),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),s++,d):d(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),it(e,m,"gfmFootnoteDefinitionWhitespace")):n(h)}function m(h){return i.includes(a)||i.push(a),t(h)}}function aO(e,t,n){return e.check(xc,t,e.attempt(JI,t,n))}function sO(e){e.exit("gfmFootnoteDefinition")}function oO(e,t,n){const r=this;return it(e,i,"gfmFootnoteDefinitionIndent",4+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function lO(e={}){let t=e.singleTilde;const n={tokenize:i,resolveAll:r};return t==null&&(t=!0),{text:{[126]:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(a,s){let o=-1;for(;++o1?o(p):(a.consume(p),u++,f);if(u<2&&!t)return o(p);const h=a.exit("strikethroughSequenceTemporary"),w=Wd(p);return h._open=!w||w===2&&!!m,h._close=!m||m===2&&!!w,s(p)}}}const cO={flow:{null:{tokenize:dO,resolve:uO}}},mw={tokenize:hO,partial:!0};function uO(e,t){let n=-1,r,i,a,s,o,l,c;for(;++n=4?B(N):(r._gfmTableDynamicInterruptHack=!0,O.check(r.parser.constructs.flow,function(Q){return r._gfmTableDynamicInterruptHack=!1,B(Q)},function(Q){return r._gfmTableDynamicInterruptHack=!1,V(Q)})(N))}}}function hO(e,t,n){let r=0;return i;function i(s){return e.enter("check"),e.consume(s),a}function a(s){return s===-1||s===32?(e.consume(s),r++,r===4?t:a):s===null||Qt(s)?t(s):n(s)}}const fO={tokenize:mO},pO={text:{[91]:fO}};function mO(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return Qt(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:gO},t,n)):n(o)}}function gO(e,t,n){const r=this;return it(e,i,"whitespace");function i(a){const s=r.events[r.events.length-1];return(s&&s[1].type==="whitespace"||Me(a))&&a!==null?t(a):n(a)}}function yO(e){return n6([HI,eO(),lO(e),cO,pO])}function gw(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function bO(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const vO={}.hasOwnProperty,wO=function(e,t,n,r){let i,a;typeof t=="string"||t instanceof RegExp?(a=[[t,n]],i=r):(a=t,i=n),i||(i={});const s=e0(i.ignore||[]),o=xO(a);let l=-1;for(;++l0?{type:"text",value:R}:void 0),R!==!1&&(w!==A&&x.push({type:"text",value:d.value.slice(w,A)}),Array.isArray(R)?x.push(...R):R&&x.push(R),w=A+_[0].length,v=!0),!m.global)break;_=m.exec(d.value)}return v?(we}const Rf="phrasing",If=["autolink","link","image","label"],kO={transforms:[NO],enter:{literalAutolink:_O,literalAutolinkEmail:Of,literalAutolinkHttp:Of,literalAutolinkWww:Of},exit:{literalAutolink:AO,literalAutolinkEmail:TO,literalAutolinkHttp:EO,literalAutolinkWww:CO}},SO={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Rf,notInConstruct:If},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Rf,notInConstruct:If},{character:":",before:"[ps]",after:"\\/",inConstruct:Rf,notInConstruct:If}]};function _O(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Of(e){this.config.enter.autolinkProtocol.call(this,e)}function EO(e){this.config.exit.autolinkProtocol.call(this,e)}function CO(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}function TO(e){this.config.exit.autolinkEmail.call(this,e)}function AO(e){this.exit(e)}function NO(e){wO(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,MO],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,RO]],{ignore:["link","linkReference"]})}function MO(e,t,n,r,i){let a="";if(!q6(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!IO(n)))return!1;const s=OO(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function RO(e,t,n,r){return!q6(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function IO(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function OO(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=gw(e,"(");let a=gw(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function q6(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Qh(n)||Zh(n))&&(!t||n!==47)}function H6(e){return e.label||!e.identifier?e.label||"":f6(e.identifier)}function DO(e,t,n){const r=t.indexStack,i=e.children||[],a=t.createTracker(n),s=[];let o=-1;for(r.push(-1);++o + +`}return` + +`}const PO=/\r?\n|\r/g;function zO(e,t){const n=[];let r=0,i=0,a;for(;a=PO.exec(e);)s(e.slice(r,a.index)),n.push(a[0]),r=a.index+a[0].length,i++;return s(e.slice(r)),n.join("");function s(o){n.push(t(o,i,!o))}}function W6(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function FO(e,t){return vw(e,t.inConstruct,!0)&&!vw(e,t.notInConstruct,!1)}function vw(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r=c||u+10?" ":"")),i.shift(4),a+=i.move(zO(DO(e,n,i.current()),ZO)),s(),a}function ZO(e,t,n){return t===0?e:(n?"":" ")+e}function G6(e,t,n){const r=t.indexStack,i=e.children||[],a=[];let s=-1,o=n.before;r.push(-1);let l=t.createTracker(n);for(;++s0&&(o==="\r"||o===` +`)&&c.type==="html"&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/," "),o=" ",l=t.createTracker(n),l.move(a.join(""))),a.push(l.move(t.handle(c,e,t,{...l.current(),before:o,after:u}))),o=a[a.length-1].slice(-1)}return r.pop(),a.join("")}const JO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];K6.peek=iD;const eD={canContainEols:["delete"],enter:{strikethrough:nD},exit:{strikethrough:rD}},tD={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:JO}],handlers:{delete:K6}};function nD(e){this.enter({type:"delete",children:[]},e)}function rD(e){this.exit(e)}function K6(e,t,n,r){const i=r0(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=G6(e,n,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function iD(){return"~"}X6.peek=aD;function X6(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++al&&(l=e[c].length);++wo[w])&&(o[w]=v)}m.push(y)}a[c]=m,s[c]=h}let u=-1;if(typeof n=="object"&&"length"in n)for(;++uo[u]&&(o[u]=y),f[u]=y),d[u]=v}a.splice(1,0,d),s.splice(1,0,f),c=-1;const p=[];for(;++cn==="none"?null:n),children:[]},e),this.setData("inTable",!0)}function dD(e){this.exit(e),this.setData("inTable")}function hD(e){this.enter({type:"tableRow",children:[]},e)}function Df(e){this.exit(e)}function kw(e){this.enter({type:"tableCell",children:[]},e)}function fD(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,pD));const n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function pD(e,t){return t==="|"?t:e}function mD(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:s,tableRow:o,tableCell:l,inlineCode:f}};function s(p,m,h,w){return c(u(p,h,w),p.align)}function o(p,m,h,w){const y=d(p,h,w),v=c([y]);return v.slice(0,v.indexOf(` +`))}function l(p,m,h,w){const y=h.enter("tableCell"),v=h.enter("phrasing"),x=G6(p,h,{...w,before:a,after:a});return v(),y(),x}function c(p,m){return sD(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function u(p,m,h){const w=p.children;let y=-1;const v=[],x=m.enter("table");for(;++y-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),u);return l(),c;function u(d,f,p){return f?(p?"":" ".repeat(s))+d:(p?a:a+" ".repeat(s-a.length))+d}}const vD={exit:{taskListCheckValueChecked:Sw,taskListCheckValueUnchecked:Sw,paragraph:xD}},wD={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:kD}};function Sw(e){const t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function xD(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1],r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a]+>",s="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional(a)+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+l+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",m=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],h=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:h,keyword:m,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},A={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[A,d,o,n,e.C_BLOCK_COMMENT_MODE,u,c],R={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:E.concat([{begin:/\(/,end:/\)/,keywords:_,contains:E.concat(["self"]),relevance:0}]),relevance:0},F={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,o,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"",keywords:_,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function CD(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=ED(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function TD(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);const o={className:"",begin:/\\"/},l={className:"string",begin:/'/,end:/'/},c={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},u=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],d=e.SHEBANG({binary:`(${u.join("|")})`,relevance:10}),f={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},p=["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],m=["true","false"],h={match:/(\/[a-z._-]+)+/},w=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],y=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias"],v=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],x=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:p,literal:m,built_in:[...w,...y,"set","shopt",...v,...x]},contains:[d,e.SHEBANG(),f,c,e.HASH_COMMENT_MODE,a,h,s,o,l,n]}}function AD(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="<[^<>]+>",s="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional(a)+")",o={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+l+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",w={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[d,o,n,e.C_BLOCK_COMMENT_MODE,u,c],v={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:w,contains:y.concat([{begin:/\(/,end:/\)/,keywords:w,contains:y.concat(["self"]),relevance:0}]),relevance:0},x={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:w,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:w,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,o,{begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:w,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:c,keywords:w}}}function ND(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="<[^<>]+>",s="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional(a)+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+l+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",m=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],h=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:h,keyword:m,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},A={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},E=[A,d,o,n,e.C_BLOCK_COMMENT_MODE,u,c],R={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:E.concat([{begin:/\(/,end:/\)/,keywords:_,contains:E.concat(["self"]),relevance:0}]),relevance:0},F={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,o,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"",keywords:_,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function MD(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"],s={keyword:i.concat(a),built_in:t,literal:r},o=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},u=e.inherit(c,{illegal:/\n/}),d={className:"subst",begin:/\{/,end:/\}/,keywords:s},f=e.inherit(d,{illegal:/\n/}),p={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,f]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},d]},h=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});d.contains=[m,p,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],f.contains=[h,p,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const w={variants:[m,p,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},o]},v=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",x={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:s,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},w,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},o,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+v+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:s,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,relevance:0,contains:[w,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},x]}}const RD=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),ID=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],OD=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],DD=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],LD=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],PD=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function zD(e){const t=e.regex,n=RD(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",a=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",o=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+DD.join("|")+")"},{begin:":(:)?("+LD.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+PD.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...o,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...o,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:OD.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...o,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+ID.join("|")+")\\b"}]}}function FD(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function BD(e){const a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"Q6(e,t,n-1))}function jD(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Q6("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},u={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,_w,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_w,c]}}const Ew="[A-Za-z$_][0-9A-Za-z$_]*",qD=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],HD=["true","false","null","undefined","NaN","Infinity"],Z6=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],J6=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],e5=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],WD=["arguments","this","super","console","window","document","localStorage","module","global"],YD=[].concat(e5,Z6,J6);function VD(e){const t=e.regex,n=(V,{after:B})=>{const Y="",end:""},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,B)=>{const Y=V[0].length+V.index,X=V.input[Y];if(X==="<"||X===","){B.ignoreMatch();return}X===">"&&(n(V,{after:Y})||B.ignoreMatch());let N;const T=V.input.substring(Y);if(N=T.match(/^\s*=/)){B.ignoreMatch();return}if((N=T.match(/^\s+extends\s+/))&&N.index===0){B.ignoreMatch();return}}},o={$pattern:Ew,keyword:qD,literal:HD,built_in:YD,"variable.language":WD},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},p={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},m={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},h={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(v)});const x=[].concat(y,f.contains),_=x.concat([{begin:/\(/,end:/\)/,keywords:o,contains:["self"].concat(x)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:_},E={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},R={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Z6,...J6]}},F={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},q={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function W(V){return t.concat("(?!",V.join("|"),")")}const G={match:t.concat(/\b/,W([...e5,"super","import"]),r,t.lookahead(/\(/)),className:"title.function",relevance:0},ue={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},fe={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},Ce="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(Ce)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:_,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),F,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,y,{match:/\$\d+/},d,R,{className:"attr",begin:r+t.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:Ce,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:_}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},q,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},ue,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},G,K,E,fe,{match:/\$[(.]/}]}}function GD(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Os="[0-9](_*[0-9])*",_u=`\\.(${Os})`,Eu="[0-9a-fA-F](_*[0-9a-fA-F])*",KD={className:"number",variants:[{begin:`(\\b(${Os})((${_u})|\\.)?|(${_u}))[eE][+-]?(${Os})[fFdD]?\\b`},{begin:`\\b(${Os})((${_u})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${_u})[fFdD]?\\b`},{begin:`\\b(${Os})[fFdD]\\b`},{begin:`\\b0[xX]((${Eu})\\.?|(${Eu})?\\.(${Eu}))[pP][+-]?(${Os})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Eu})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function XD(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},s={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,i]}]};i.contains.push(s);const o={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(s,{className:"string"}),"self"]}]},c=KD,u=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,u,n,r,o,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,o,l,s,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},o,l]},s,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` +`},c]}}const QD=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),ZD=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],JD=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],t5=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],n5=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],eL=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),tL=t5.concat(n5);function nL(e){const t=QD(e),n=tL,r="and or not only",i="[\\w-]+",a="("+i+"|@\\{"+i+"\\})",s=[],o=[],l=function(x){return{className:"string",begin:"~?"+x+".*?"+x}},c=function(x,_,A){return{className:x,begin:_,relevance:A}},u={$pattern:/[a-z-]+/,keyword:r,attribute:JD.join(" ")},d={begin:"\\(",end:"\\)",contains:o,keywords:u,relevance:0};o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const f=o.concat({begin:/\{/,end:/\}/,contains:s}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(o)},m={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+eL.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:o}}]},h={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:o,relevance:0}},w={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:f}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+ZD.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",a,0),c("selector-id","#"+a),c("selector-class","\\."+a,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+t5.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n5.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},v={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[y]};return s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h,w,v,m,y,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:s}}function rL(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function iL(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},o=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,o,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},u={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(c,{contains:[]}),f=e.inherit(u,{contains:[]});c.contains.push(f),u.contains.push(d);let p=[n,l];return[c,u,d,f].forEach(w=>{w.contains=w.contains.concat(p)}),p=p.concat(c,u),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,a,c,u,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,r,l,s]}}function sL(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,o={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:o,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function oL(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},s={begin:/->\{/,end:/\}/},o={variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},l=[e.BACKSLASH_ESCAPE,a,o],c=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],u=(p,m,h="\\1")=>{const w=h==="\\1"?h:t.concat(h,m);return t.concat(t.concat("(?:",p,")"),m,/(?:\\.|[^\\\/])*?/,w,/(?:\\.|[^\\\/])*?/,h,r)},d=(p,m,h)=>t.concat(t.concat("(?:",p,")"),m,/(?:\\.|[^\\\/])*?/,h,r),f=[o,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),s,{className:"string",contains:l,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:u("s|tr|y",t.either(...c,{capture:!0}))},{begin:u("s|tr|y","\\(","\\)")},{begin:u("s|tr|y","\\[","\\]")},{begin:u("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",t.either(...c,{capture:!0}),/\1/)},{begin:d("m|qr",/\(/,/\)/)},{begin:d("m|qr",/\[/,/\]/)},{begin:d("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=f,s.contains=f,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:f}}function lL(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a={scope:"variable",match:"\\$+"+r},s={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},o={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),c=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(o)}),u=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(o)}),d=`[ +]`,f={scope:"string",variants:[c,l,u]},p={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},m=["false","null","true"],h=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],w=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],v={keyword:h,literal:(G=>{const ue=[];return G.forEach(fe=>{ue.push(fe),fe.toLowerCase()===fe?ue.push(fe.toUpperCase()):ue.push(fe.toLowerCase())}),ue})(m),built_in:w},x=G=>G.map(ue=>ue.replace(/\|\d+$/,"")),_={variants:[{match:[/new/,t.concat(d,"+"),t.concat("(?!",x(w).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},A=t.concat(r,"\\b(?!\\()"),E={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),A],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),A],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},R={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},F={relevance:0,begin:/\(/,end:/\)/,keywords:v,contains:[R,a,E,e.C_BLOCK_COMMENT_MODE,f,p,_]},q={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",x(h).join("\\b|"),"|",x(w).join("\\b|"),"\\b)"),r,t.concat(d,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[F]};F.contains.push(q);const K=[R,E,e.C_BLOCK_COMMENT_MODE,f,p,_],W={begin:t.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:m,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:m,keyword:["new","array"]},contains:["self",...K]},...K,{scope:"meta",match:i}]};return{case_insensitive:!1,keywords:v,contains:[W,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},s,{scope:"variable.language",match:/\$this\b/},a,q,E,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},_,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:v,contains:["self",a,E,e.C_BLOCK_COMMENT_MODE,f,p]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},f,p]}}function cL(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function uL(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function dL(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},u={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,u,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,m=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${m})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${m})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${m})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${m})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${m})`},{begin:`\\b(${f})[jJ](?=${m})`}]},w={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",l,h,d,e.HASH_COMMENT_MODE]}]};return c.contains=[d,h,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|->|\?)|=>/,contains:[l,h,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},d,w,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,y,d]}]}}function hL(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function fL(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function pL(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},o={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],u={className:"subst",begin:/#\{/,end:/\}/,keywords:s},d={className:"string",contains:[e.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,u]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",m={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},E=[d,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:s},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},m,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);u.contains=E,h.contains=E;const R="[>?]>",F="[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]",q="(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>",K=[{begin:/^\s*=>/,starts:{end:"$",contains:E}},{className:"meta.prompt",begin:"^("+R+"|"+F+"|"+q+")(?=[ ])",starts:{end:"$",keywords:s,contains:E}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(K).concat(c).concat(E)}}function mL(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},r="([ui](8|16|32|64|128|size)|f(32|64))?",i=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],a=["true","false","Some","None","Ok","Err"],s=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],o=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:o,keyword:i,literal:a,built_in:s},illegal:""},n]}}const gL=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),yL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],bL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],vL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],wL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],xL=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function kL(e){const t=gL(e),n=wL,r=vL,i="@[a-z-]+",a="and or not only",o={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+yL.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+xL.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:bL.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function SL(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function _L(e){const t=e.regex,n=e.COMMENT("--","$"),r={className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},i={begin:/"/,end:/"/,contains:[{begin:/""/}]},a=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],u=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=u,m=[...c,...l].filter(x=>!u.includes(x)),h={className:"variable",begin:/@[a-z0-9]+/},w={className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={begin:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(x,{exceptions:_,when:A}={}){const E=A;return _=_||[],x.map(R=>R.match(/\|\d+$/)||_.includes(R)?R:E(R)?`${R}|0`:R)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:v(m,{when:x=>x.length<3}),literal:a,type:o,built_in:d},contains:[{begin:t.either(...f),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:m.concat(f),literal:a,type:o}},{className:"type",begin:t.either(...s)},y,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,w]}}function r5(e){return e?typeof e=="string"?e:e.source:null}function Cu(e){return bt("(?=",e,")")}function bt(...e){return e.map(n=>r5(n)).join("")}function EL(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Dn(...e){return"("+(EL(e).capture?"":"?:")+e.map(r=>r5(r)).join("|")+")"}const x1=e=>bt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),CL=["Protocol","Type"].map(x1),Cw=["init","self"].map(x1),TL=["Any","Self"],Lf=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Tw=["false","nil","true"],AL=["assignment","associativity","higherThan","left","lowerThan","none","right"],NL=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],Aw=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],i5=Dn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),a5=Dn(i5,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Pf=bt(i5,a5,"*"),s5=Dn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Gd=Dn(s5,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),yi=bt(s5,Gd,"*"),zf=bt(/[A-Z]/,Gd,"*"),ML=["autoclosure",bt(/convention\(/,Dn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",bt(/objc\(/,yi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],RL=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function IL(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,Dn(...CL,...Cw)],className:{2:"keyword"}},a={match:bt(/\./,Dn(...Lf)),relevance:0},s=Lf.filter(Se=>typeof Se=="string").concat(["_|0"]),o=Lf.filter(Se=>typeof Se!="string").concat(TL).map(x1),l={variants:[{className:"keyword",match:Dn(...o,...Cw)}]},c={$pattern:Dn(/\b\w+/,/#\w+/),keyword:s.concat(NL),literal:Tw},u=[i,a,l],d={match:bt(/\./,Dn(...Aw)),relevance:0},f={className:"built_in",match:bt(/\b/,Dn(...Aw),/(?=\()/)},p=[d,f],m={match:/->/,relevance:0},h={className:"operator",relevance:0,variants:[{match:Pf},{match:`\\.(\\.|${a5})+`}]},w=[m,h],y="([0-9]_*)+",v="([0-9a-fA-F]_*)+",x={className:"number",relevance:0,variants:[{match:`\\b(${y})(\\.(${y}))?([eE][+-]?(${y}))?\\b`},{match:`\\b0x(${v})(\\.(${v}))?([pP][+-]?(${y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},_=(Se="")=>({className:"subst",variants:[{match:bt(/\\/,Se,/[0\\tnr"']/)},{match:bt(/\\/,Se,/u\{[0-9a-fA-F]{1,8}\}/)}]}),A=(Se="")=>({className:"subst",match:bt(/\\/,Se,/[\t ]*(?:[\r\n]|\r\n)/)}),E=(Se="")=>({className:"subst",label:"interpol",begin:bt(/\\/,Se,/\(/),end:/\)/}),R=(Se="")=>({begin:bt(Se,/"""/),end:bt(/"""/,Se),contains:[_(Se),A(Se),E(Se)]}),F=(Se="")=>({begin:bt(Se,/"/),end:bt(/"/,Se),contains:[_(Se),E(Se)]}),q={className:"string",variants:[R(),R("#"),R("##"),R("###"),F(),F("#"),F("##"),F("###")]},K={match:bt(/`/,yi,/`/)},W={className:"variable",match:/\$\d+/},G={className:"variable",match:`\\$${Gd}+`},ue=[K,W,G],fe={match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:RL,contains:[...w,x,q]}]}},Ce={className:"keyword",match:bt(/@/,Dn(...ML))},O={className:"meta",match:bt(/@/,yi)},V=[fe,Ce,O],B={match:Cu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:bt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Gd,"+")},{className:"type",match:zf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:bt(/\s+&\s+/,Cu(zf)),relevance:0}]},Y={begin://,keywords:c,contains:[...r,...u,...V,m,B]};B.contains.push(Y);const X={match:bt(yi,/\s*:/),keywords:"_|0",relevance:0},N={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",X,...r,...u,...p,...w,x,q,...ue,...V,B]},T={begin://,contains:[...r,B]},Q={begin:Dn(Cu(bt(yi,/\s*:/)),Cu(bt(yi,/\s+/,yi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:yi}]},ne={begin:/\(/,end:/\)/,keywords:c,contains:[Q,...r,...u,...w,x,q,...V,B,N],endsParent:!0,illegal:/["']/},ge={match:[/func/,/\s+/,Dn(K.match,yi,Pf)],className:{1:"keyword",3:"title.function"},contains:[T,ne,t],illegal:[/\[/,/%/]},$={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[T,ne,t],illegal:/\[|%/},Ee={match:[/operator/,/\s+/,Pf],className:{1:"keyword",3:"title"}},J={begin:[/precedencegroup/,/\s+/,zf],className:{1:"keyword",3:"title"},contains:[B],keywords:[...AL,...Tw],end:/}/};for(const Se of q.variants){const Re=Se.contains.find(Ae=>Ae.label==="interpol");Re.keywords=c;const Ue=[...u,...p,...w,x,q,...ue];Re.contains=[...Ue,{begin:/\(/,end:/\)/,contains:["self",...Ue]}]}return{name:"Swift",keywords:c,contains:[...r,ge,$,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:c,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...u]},Ee,J,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},...u,...p,...w,x,q,...ue,...V,B,N]}}const Kd="[A-Za-z$_][0-9A-Za-z$_]*",o5=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],l5=["true","false","null","undefined","NaN","Infinity"],c5=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],u5=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],d5=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],h5=["arguments","this","super","console","window","document","localStorage","module","global"],f5=[].concat(d5,c5,u5);function OL(e){const t=e.regex,n=(V,{after:B})=>{const Y="",end:""},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,B)=>{const Y=V[0].length+V.index,X=V.input[Y];if(X==="<"||X===","){B.ignoreMatch();return}X===">"&&(n(V,{after:Y})||B.ignoreMatch());let N;const T=V.input.substring(Y);if(N=T.match(/^\s*=/)){B.ignoreMatch();return}if((N=T.match(/^\s+extends\s+/))&&N.index===0){B.ignoreMatch();return}}},o={$pattern:Kd,keyword:o5,literal:l5,built_in:f5,"variable.language":h5},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},p={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},m={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},h={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(v)});const x=[].concat(y,f.contains),_=x.concat([{begin:/\(/,end:/\)/,keywords:o,contains:["self"].concat(x)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:_},E={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},R={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...c5,...u5]}},F={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},q={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function W(V){return t.concat("(?!",V.join("|"),")")}const G={match:t.concat(/\b/,W([...d5,"super","import"]),r,t.lookahead(/\(/)),className:"title.function",relevance:0},ue={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},fe={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},Ce="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(Ce)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:_,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),F,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,y,{match:/\$\d+/},d,R,{className:"attr",begin:r+t.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:Ce,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:_}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},q,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},ue,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},G,K,E,fe,{match:/\$[(.]/}]}}function DL(e){const t=OL(e),n=Kd,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},a={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[t.exports.CLASS_REFERENCE]},s={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},o=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],l={$pattern:Kd,keyword:o5.concat(o),literal:l5,built_in:f5.concat(r),"variable.language":h5},c={className:"meta",begin:"@"+n},u=(f,p,m)=>{const h=f.contains.findIndex(w=>w.label===p);if(h===-1)throw new Error("can not find mode to replace");f.contains.splice(h,1,m)};Object.assign(t.keywords,l),t.exports.PARAMS_CONTAINS.push(c),t.contains=t.contains.concat([c,i,a]),u(t,"shebang",e.SHEBANG()),u(t,"use_strict",s);const d=t.contains.find(f=>f.label==="func.def");return d.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx"]}),t}function LL(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,i),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,t.either(a,i),/ +/,t.either(s,o),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,c,u,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function PL(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},s={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},o={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,s,i,e.QUOTE_STRING_MODE,l,c,o]}}function zL(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(a,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[a,l,o,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[a,s,l,o]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function FL(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ ]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ ]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ ]|$)"}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(a,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o="[0-9]{4}(-[0-9][0-9]){0,2}",l="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",c="(\\.[0-9]*)?",u="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",d={className:"number",begin:"\\b"+o+l+c+u+"\\b"},f={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},p={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},h=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},d,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},p,m,a],w=[...h];return w.pop(),w.push(s),f.contains=w,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:h}}var k1={exports:{}};function S1(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];typeof n=="object"&&!Object.isFrozen(n)&&S1(n)}),e}k1.exports=S1;k1.exports.default=S1;class Nw{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function p5(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function aa(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const BL="",Mw=e=>!!e.scope||e.sublanguage&&e.language,$L=(e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class UL{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=p5(t)}openNode(t){if(!Mw(t))return;let n="";t.sublanguage?n=`language-${t.language}`:n=$L(t.scope,{prefix:this.classPrefix}),this.span(n)}closeNode(t){Mw(t)&&(this.buffer+=BL)}value(){return this.buffer}span(t){this.buffer+=``}}const Rw=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class _1{constructor(){this.rootNode=Rw(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=Rw({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{_1._collapse(n)}))}}class jL extends _1{constructor(t){super(),this.options=t}addKeyword(t,n){t!==""&&(this.openNode(n),this.addText(t),this.closeNode())}addText(t){t!==""&&this.add(t)}addSublanguage(t,n){const r=t.root;r.sublanguage=!0,r.language=n,this.add(r)}toHTML(){return new UL(this,this.options).value()}finalize(){return!0}}function Jl(e){return e?typeof e=="string"?e:e.source:null}function m5(e){return ps("(?=",e,")")}function qL(e){return ps("(?:",e,")*")}function HL(e){return ps("(?:",e,")?")}function ps(...e){return e.map(n=>Jl(n)).join("")}function WL(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function E1(...e){return"("+(WL(e).capture?"":"?:")+e.map(r=>Jl(r)).join("|")+")"}function g5(e){return new RegExp(e.toString()+"|").exec("").length-1}function YL(e,t){const n=e&&e.exec(t);return n&&n.index===0}const VL=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C1(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let a=Jl(r),s="";for(;a.length>0;){const o=VL.exec(a);if(!o){s+=a;break}s+=a.substring(0,o.index),a=a.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?s+="\\"+String(Number(o[1])+i):(s+=o[0],o[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}const GL=/\b\B/,y5="[a-zA-Z]\\w*",T1="[a-zA-Z_]\\w*",b5="\\b\\d+(\\.\\d+)?",v5="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",w5="\\b(0b[01]+)",KL="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",XL=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ps(t,/.*\b/,e.binary,/\b.*/)),aa({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},ec={begin:"\\\\[\\s\\S]",relevance:0},QL={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ec]},ZL={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ec]},JL={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},i0=function(e,t,n={}){const r=aa({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=E1("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:ps(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},eP=i0("//","$"),tP=i0("/\\*","\\*/"),nP=i0("#","$"),rP={scope:"number",begin:b5,relevance:0},iP={scope:"number",begin:v5,relevance:0},aP={scope:"number",begin:w5,relevance:0},sP={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[ec,{begin:/\[/,end:/\]/,relevance:0,contains:[ec]}]}]},oP={scope:"title",begin:y5,relevance:0},lP={scope:"title",begin:T1,relevance:0},cP={begin:"\\.\\s*"+T1,relevance:0},uP=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var Tu=Object.freeze({__proto__:null,MATCH_NOTHING_RE:GL,IDENT_RE:y5,UNDERSCORE_IDENT_RE:T1,NUMBER_RE:b5,C_NUMBER_RE:v5,BINARY_NUMBER_RE:w5,RE_STARTERS_RE:KL,SHEBANG:XL,BACKSLASH_ESCAPE:ec,APOS_STRING_MODE:QL,QUOTE_STRING_MODE:ZL,PHRASAL_WORDS_MODE:JL,COMMENT:i0,C_LINE_COMMENT_MODE:eP,C_BLOCK_COMMENT_MODE:tP,HASH_COMMENT_MODE:nP,NUMBER_MODE:rP,C_NUMBER_MODE:iP,BINARY_NUMBER_MODE:aP,REGEXP_MODE:sP,TITLE_MODE:oP,UNDERSCORE_TITLE_MODE:lP,METHOD_GUARD:cP,END_SAME_AS_BEGIN:uP});function dP(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function hP(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function fP(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=dP,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function pP(e,t){Array.isArray(e.illegal)&&(e.illegal=E1(...e.illegal))}function mP(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function gP(e,t){e.relevance===void 0&&(e.relevance=1)}const yP=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=ps(n.beforeMatch,m5(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},bP=["of","and","for","in","not","or","if","then","parent","list","value"],vP="keyword";function x5(e,t,n=vP){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(a){Object.assign(r,x5(e[a],t,a))}),r;function i(a,s){t&&(s=s.map(o=>o.toLowerCase())),s.forEach(function(o){const l=o.split("|");r[l[0]]=[a,wP(l[0],l[1])]})}}function wP(e,t){return t?Number(t):xP(e)?0:1}function xP(e){return bP.includes(e.toLowerCase())}const Iw={},Ja=e=>{console.error(e)},Ow=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Ts=(e,t)=>{Iw[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Iw[`${e}/${t}`]=!0)},Xd=new Error;function k5(e,t,{key:n}){let r=0;const i=e[n],a={},s={};for(let o=1;o<=t.length;o++)s[o+r]=i[o],a[o+r]=!0,r+=g5(t[o-1]);e[n]=s,e[n]._emit=a,e[n]._multi=!0}function kP(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Ja("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Xd;if(typeof e.beginScope!="object"||e.beginScope===null)throw Ja("beginScope must be object"),Xd;k5(e,e.begin,{key:"beginScope"}),e.begin=C1(e.begin,{joinWith:""})}}function SP(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Ja("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Xd;if(typeof e.endScope!="object"||e.endScope===null)throw Ja("endScope must be object"),Xd;k5(e,e.end,{key:"endScope"}),e.end=C1(e.end,{joinWith:""})}}function _P(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function EP(e){_P(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),kP(e),SP(e)}function CP(e){function t(s,o){return new RegExp(Jl(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(o?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=g5(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const o=this.regexes.map(l=>l[1]);this.matcherRe=t(C1(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(o);if(!l)return null;const c=l.findIndex((d,f)=>f>0&&d!==void 0),u=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const l=new n;return this.rules.slice(o).forEach(([c,u])=>l.addRule(c,u)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(o);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,c=u.exec(o)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(s){const o=new r;return s.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&o.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&o.addRule(s.illegal,{type:"illegal"}),o}function a(s,o){const l=s;if(s.isCompiled)return l;[hP,mP,EP,yP].forEach(u=>u(s,o)),e.compilerExtensions.forEach(u=>u(s,o)),s.__beforeBegin=null,[fP,pP,gP].forEach(u=>u(s,o)),s.isCompiled=!0;let c=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),c=s.keywords.$pattern,delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=x5(s.keywords,e.case_insensitive)),l.keywordPatternRe=t(c,!0),o&&(s.begin||(s.begin=/\B|\b/),l.beginRe=t(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=t(l.end)),l.terminatorEnd=Jl(l.end)||"",s.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+o.terminatorEnd)),s.illegal&&(l.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(u){return TP(u==="self"?s:u)})),s.contains.forEach(function(u){a(u,l)}),s.starts&&a(s.starts,o),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=aa(e.classNameAliases||{}),a(e)}function S5(e){return e?e.endsWithParent||S5(e.starts):!1}function TP(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return aa(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:S5(e)?aa(e,{starts:e.starts?aa(e.starts):null}):Object.isFrozen(e)?aa(e):e}var AP="11.7.0";class NP extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Ff=p5,Dw=aa,Lw=Symbol("nomatch"),MP=7,RP=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:jL};function l(O){return o.noHighlightRe.test(O)}function c(O){let V=O.className+" ";V+=O.parentNode?O.parentNode.className:"";const B=o.languageDetectRe.exec(V);if(B){const Y=q(B[1]);return Y||(Ow(a.replace("{}",B[1])),Ow("Falling back to no-highlight mode for this block.",O)),Y?B[1]:"no-highlight"}return V.split(/\s+/).find(Y=>l(Y)||q(Y))}function u(O,V,B){let Y="",X="";typeof V=="object"?(Y=O,B=V.ignoreIllegals,X=V.language):(Ts("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ts("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),X=O,Y=V),B===void 0&&(B=!0);const N={code:Y,language:X};fe("before:highlight",N);const T=N.result?N.result:d(N.language,N.code,B);return T.code=N.code,fe("after:highlight",T),T}function d(O,V,B,Y){const X=Object.create(null);function N(ee,xe){return ee.keywords[xe]}function T(){if(!de.keywords){tt.addText(Ie);return}let ee=0;de.keywordPatternRe.lastIndex=0;let xe=de.keywordPatternRe.exec(Ie),U="";for(;xe;){U+=Ie.substring(ee,xe.index);const M=et.case_insensitive?xe[0].toLowerCase():xe[0],z=N(de,M);if(z){const[H,le]=z;if(tt.addText(U),U="",X[M]=(X[M]||0)+1,X[M]<=MP&&(cn+=le),H.startsWith("_"))U+=xe[0];else{const ye=et.classNameAliases[H]||H;tt.addKeyword(xe[0],ye)}}else U+=xe[0];ee=de.keywordPatternRe.lastIndex,xe=de.keywordPatternRe.exec(Ie)}U+=Ie.substring(ee),tt.addText(U)}function Q(){if(Ie==="")return;let ee=null;if(typeof de.subLanguage=="string"){if(!t[de.subLanguage]){tt.addText(Ie);return}ee=d(de.subLanguage,Ie,!0,lt[de.subLanguage]),lt[de.subLanguage]=ee._top}else ee=p(Ie,de.subLanguage.length?de.subLanguage:null);de.relevance>0&&(cn+=ee.relevance),tt.addSublanguage(ee._emitter,ee.language)}function ne(){de.subLanguage!=null?Q():T(),Ie=""}function ge(ee,xe){let U=1;const M=xe.length-1;for(;U<=M;){if(!ee._emit[U]){U++;continue}const z=et.classNameAliases[ee[U]]||ee[U],H=xe[U];z?tt.addKeyword(H,z):(Ie=H,T(),Ie=""),U++}}function $(ee,xe){return ee.scope&&typeof ee.scope=="string"&&tt.openNode(et.classNameAliases[ee.scope]||ee.scope),ee.beginScope&&(ee.beginScope._wrap?(tt.addKeyword(Ie,et.classNameAliases[ee.beginScope._wrap]||ee.beginScope._wrap),Ie=""):ee.beginScope._multi&&(ge(ee.beginScope,xe),Ie="")),de=Object.create(ee,{parent:{value:de}}),de}function Ee(ee,xe,U){let M=YL(ee.endRe,U);if(M){if(ee["on:end"]){const z=new Nw(ee);ee["on:end"](xe,z),z.isMatchIgnored&&(M=!1)}if(M){for(;ee.endsParent&&ee.parent;)ee=ee.parent;return ee}}if(ee.endsWithParent)return Ee(ee.parent,xe,U)}function J(ee){return de.matcher.regexIndex===0?(Ie+=ee[0],1):(Oe=!0,0)}function Se(ee){const xe=ee[0],U=ee.rule,M=new Nw(U),z=[U.__beforeBegin,U["on:begin"]];for(const H of z)if(H&&(H(ee,M),M.isMatchIgnored))return J(xe);return U.skip?Ie+=xe:(U.excludeBegin&&(Ie+=xe),ne(),!U.returnBegin&&!U.excludeBegin&&(Ie=xe)),$(U,ee),U.returnBegin?0:xe.length}function Re(ee){const xe=ee[0],U=V.substring(ee.index),M=Ee(de,ee,U);if(!M)return Lw;const z=de;de.endScope&&de.endScope._wrap?(ne(),tt.addKeyword(xe,de.endScope._wrap)):de.endScope&&de.endScope._multi?(ne(),ge(de.endScope,ee)):z.skip?Ie+=xe:(z.returnEnd||z.excludeEnd||(Ie+=xe),ne(),z.excludeEnd&&(Ie=xe));do de.scope&&tt.closeNode(),!de.skip&&!de.subLanguage&&(cn+=de.relevance),de=de.parent;while(de!==M.parent);return M.starts&&$(M.starts,ee),z.returnEnd?0:xe.length}function Ue(){const ee=[];for(let xe=de;xe!==et;xe=xe.parent)xe.scope&&ee.unshift(xe.scope);ee.forEach(xe=>tt.openNode(xe))}let Ae={};function pt(ee,xe){const U=xe&&xe[0];if(Ie+=ee,U==null)return ne(),0;if(Ae.type==="begin"&&xe.type==="end"&&Ae.index===xe.index&&U===""){if(Ie+=V.slice(xe.index,xe.index+1),!i){const M=new Error(`0 width match regex (${O})`);throw M.languageName=O,M.badRule=Ae.rule,M}return 1}if(Ae=xe,xe.type==="begin")return Se(xe);if(xe.type==="illegal"&&!B){const M=new Error('Illegal lexeme "'+U+'" for mode "'+(de.scope||"")+'"');throw M.mode=de,M}else if(xe.type==="end"){const M=Re(xe);if(M!==Lw)return M}if(xe.type==="illegal"&&U==="")return 1;if($t>1e5&&$t>xe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ie+=U,U.length}const et=q(O);if(!et)throw Ja(a.replace("{}",O)),new Error('Unknown language: "'+O+'"');const $e=CP(et);let ut="",de=Y||$e;const lt={},tt=new o.__emitter(o);Ue();let Ie="",cn=0,an=0,$t=0,Oe=!1;try{for(de.matcher.considerAll();;){$t++,Oe?Oe=!1:de.matcher.considerAll(),de.matcher.lastIndex=an;const ee=de.matcher.exec(V);if(!ee)break;const xe=V.substring(an,ee.index),U=pt(xe,ee);an=ee.index+U}return pt(V.substring(an)),tt.closeAllNodes(),tt.finalize(),ut=tt.toHTML(),{language:O,value:ut,relevance:cn,illegal:!1,_emitter:tt,_top:de}}catch(ee){if(ee.message&&ee.message.includes("Illegal"))return{language:O,value:Ff(V),illegal:!0,relevance:0,_illegalBy:{message:ee.message,index:an,context:V.slice(an-100,an+100),mode:ee.mode,resultSoFar:ut},_emitter:tt};if(i)return{language:O,value:Ff(V),illegal:!1,relevance:0,errorRaised:ee,_emitter:tt,_top:de};throw ee}}function f(O){const V={value:Ff(O),illegal:!1,relevance:0,_top:s,_emitter:new o.__emitter(o)};return V._emitter.addText(O),V}function p(O,V){V=V||o.languages||Object.keys(t);const B=f(O),Y=V.filter(q).filter(W).map(ne=>d(ne,O,!1));Y.unshift(B);const X=Y.sort((ne,ge)=>{if(ne.relevance!==ge.relevance)return ge.relevance-ne.relevance;if(ne.language&&ge.language){if(q(ne.language).supersetOf===ge.language)return 1;if(q(ge.language).supersetOf===ne.language)return-1}return 0}),[N,T]=X,Q=N;return Q.secondBest=T,Q}function m(O,V,B){const Y=V&&n[V]||B;O.classList.add("hljs"),O.classList.add(`language-${Y}`)}function h(O){let V=null;const B=c(O);if(l(B))return;if(fe("before:highlightElement",{el:O,language:B}),O.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(O)),o.throwUnescapedHTML))throw new NP("One of your code blocks includes unescaped HTML.",O.innerHTML);V=O;const Y=V.textContent,X=B?u(Y,{language:B,ignoreIllegals:!0}):p(Y);O.innerHTML=X.value,m(O,B,X.language),O.result={language:X.language,re:X.relevance,relevance:X.relevance},X.secondBest&&(O.secondBest={language:X.secondBest.language,relevance:X.secondBest.relevance}),fe("after:highlightElement",{el:O,result:X,text:Y})}function w(O){o=Dw(o,O)}const y=()=>{_(),Ts("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function v(){_(),Ts("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let x=!1;function _(){if(document.readyState==="loading"){x=!0;return}document.querySelectorAll(o.cssSelector).forEach(h)}function A(){x&&_()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function E(O,V){let B=null;try{B=V(e)}catch(Y){if(Ja("Language definition for '{}' could not be registered.".replace("{}",O)),i)Ja(Y);else throw Y;B=s}B.name||(B.name=O),t[O]=B,B.rawDefinition=V.bind(null,e),B.aliases&&K(B.aliases,{languageName:O})}function R(O){delete t[O];for(const V of Object.keys(n))n[V]===O&&delete n[V]}function F(){return Object.keys(t)}function q(O){return O=(O||"").toLowerCase(),t[O]||t[n[O]]}function K(O,{languageName:V}){typeof O=="string"&&(O=[O]),O.forEach(B=>{n[B.toLowerCase()]=V})}function W(O){const V=q(O);return V&&!V.disableAutodetect}function G(O){O["before:highlightBlock"]&&!O["before:highlightElement"]&&(O["before:highlightElement"]=V=>{O["before:highlightBlock"](Object.assign({block:V.el},V))}),O["after:highlightBlock"]&&!O["after:highlightElement"]&&(O["after:highlightElement"]=V=>{O["after:highlightBlock"](Object.assign({block:V.el},V))})}function ue(O){G(O),r.push(O)}function fe(O,V){const B=O;r.forEach(function(Y){Y[B]&&Y[B](V)})}function Ce(O){return Ts("10.7.0","highlightBlock will be removed entirely in v12.0"),Ts("10.7.0","Please use highlightElement now."),h(O)}Object.assign(e,{highlight:u,highlightAuto:p,highlightAll:_,highlightElement:h,highlightBlock:Ce,configure:w,initHighlighting:y,initHighlightingOnLoad:v,registerLanguage:E,unregisterLanguage:R,listLanguages:F,getLanguage:q,registerAliases:K,autoDetection:W,inherit:Dw,addPlugin:ue}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=AP,e.regex={concat:ps,lookahead:m5,either:E1,optional:HL,anyNumberOfTimes:qL};for(const O in Tu)typeof Tu[O]=="object"&&k1.exports(Tu[O]);return Object.assign(e,Tu),e};var tc=RP({}),IP=tc;tc.HighlightJS=tc;tc.default=tc;const Or=IP;var Nm={},OP={get exports(){return Nm},set exports(e){Nm=e}};(function(e){(function(){var t;t=e.exports=i,t.format=i,t.vsprintf=r,typeof console<"u"&&typeof console.log=="function"&&(t.printf=n);function n(){console.log(i.apply(null,arguments))}function r(a,s){return i.apply(null,[a].concat(s))}function i(a){for(var s=1,o=[].slice.call(arguments),l=0,c=a.length,u="",d,f=!1,p,m,h=!1,w,y=function(){return o[s++]},v=function(){for(var x="";/\d/.test(a[l]);)x+=a[l++],d=a[l];return x.length>0?parseInt(x):null};li.data.relevance&&(i=s)}return i}function FP(e,t){Or.registerLanguage(e,t)}const BP=function(e,t){if(typeof e=="string")Or.registerAliases(t,{languageName:e});else{let n;for(n in e)LP.call(e,n)&&Or.registerAliases(e[n],{languageName:n})}};function $P(e){return!!Or.getLanguage(e)}function UP(){return Or.listLanguages()}class jP{constructor(t){this.options=t,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}addKeyword(t,n){this.openNode(n),this.addText(t),this.closeNode()}addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=t.split(".").map((a,s)=>s?a+"_".repeat(s):this.options.classPrefix+a),r=this.stack[this.stack.length-1],i={type:"element",tagName:"span",properties:{className:n},children:[]};r.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}closeAllNodes(){}finalize(){}toHTML(){return""}}const We={highlight:_5,highlightAuto:zP,registerLanguage:FP,registered:$P,listLanguages:UP,registerAlias:BP};We.registerLanguage("arduino",CD);We.registerLanguage("bash",TD);We.registerLanguage("c",AD);We.registerLanguage("cpp",ND);We.registerLanguage("csharp",MD);We.registerLanguage("css",zD);We.registerLanguage("diff",FD);We.registerLanguage("go",BD);We.registerLanguage("graphql",$D);We.registerLanguage("ini",UD);We.registerLanguage("java",jD);We.registerLanguage("javascript",VD);We.registerLanguage("json",GD);We.registerLanguage("kotlin",XD);We.registerLanguage("less",nL);We.registerLanguage("lua",rL);We.registerLanguage("makefile",iL);We.registerLanguage("markdown",aL);We.registerLanguage("objectivec",sL);We.registerLanguage("perl",oL);We.registerLanguage("php",lL);We.registerLanguage("php-template",cL);We.registerLanguage("plaintext",uL);We.registerLanguage("python",dL);We.registerLanguage("python-repl",hL);We.registerLanguage("r",fL);We.registerLanguage("ruby",pL);We.registerLanguage("rust",mL);We.registerLanguage("scss",kL);We.registerLanguage("shell",SL);We.registerLanguage("sql",_L);We.registerLanguage("swift",IL);We.registerLanguage("typescript",DL);We.registerLanguage("vbnet",LL);We.registerLanguage("wasm",PL);We.registerLanguage("xml",zL);We.registerLanguage("yaml",FL);const ms=function(e){if(e==null)return A1;if(typeof e=="string")return HP(e);if(typeof e=="object")return qP(e);if(typeof e=="function")return E5(e);throw new Error("Expected function, string, or array as test")};function qP(e){const t=[];let n=-1;for(;++nl&&(l=c):c&&(l!==void 0&&l>-1&&o.push(` +`.repeat(l)||" "),l=-1,o.push(c))}return o.join("")}function T5(e,t,n){return e.type==="element"?VP(e,t,n):e.type==="text"?n.whitespace==="normal"?A5(e,n):GP(e):[]}function VP(e,t,n){const r=N5(e,n),i=e.children||[];let a=-1,s=[];if(YP(e))return s;let o,l;for(Mm(e)||$w(e)&&Pw(t,e,$w)?l=` +`:WP(e)?(o=2,l=2):C5(e)&&(o=1,l=1);++a-1?r.slice(0,c):r}return(c,u)=>{n0(c,"element",(d,f,p)=>{const m=p;if(!m||!("tagName"in m)||m.tagName!=="pre"||d.tagName!=="code"||!d.properties)return;const h=JP(d);if(h===!1||!h&&!o||h&&i&&i.includes(h))return;Array.isArray(d.properties.className)||(d.properties.className=[]),d.properties.className.includes(l)||d.properties.className.unshift(l);let w;try{w=h?We.highlight(h,Uw(m),{prefix:r}):We.highlightAuto(Uw(m),{prefix:r,subset:s})}catch(y){const v=y;(!a||!/Unknown language/.test(v.message))&&u.fail(v,d,"rehype-highlight:missing-language");return}!h&&w.data.language&&d.properties.className.push("language-"+w.data.language),Array.isArray(w.children)&&w.children.length>0&&(d.children=w.children)})}}function JP(e){const t=e.properties&&e.properties.className;let n=-1;if(Array.isArray(t))for(;++ne.theme.font.fontFamily}; + font-weight: 700; +`,jw=L(Lo)` + margin-block: 48px; + font-size: 48px; + line-height: 56px; + @media screen and (max-width: 768px) { + margin-block: 36px; + font-size: 36px; + line-height: 42px; + } +`,ez=L(Lo)` + margin-block: 48px; + font-size: 36px; + line-height: 44px; + @media screen and (max-width: 768px) { + margin-block: 36px; + font-size: 27px; + line-height: 33px; + } +`,tz=L(Lo)` + margin-block: 40px; + font-size: 28px; + line-height: 36px; + @media screen and (max-width: 768px) { + margin-block: 30px; + font-size: 21px; + line-height: 27px; + } +`,nz=L(Lo)` + margin-block: 32px; + font-size: 24px; + line-height: 32px; + @media screen and (max-width: 768px) { + margin-block: 24px; + font-size: 18px; + line-height: 24px; + } +`,rz=L(Lo)` + margin-block: 32px; + font-size: 20px; + line-height: 28px; + @media screen and (max-width: 768px) { + margin-block: 24px; + font-size: 15px; + line-height: 21px; + } +`,iz=L(Lo)` + margin-block: 24px; + font-size: 16px; + line-height: 24px; + @media screen and (max-width: 768px) { + margin-block: 18px; + font-size: 12px; + line-height: 18px; + } +`,ct=({level:e,children:t})=>{const n=String(t).split(" ").join("-");switch(e){case 1:return k.jsx(jw,{id:n,children:t});case 2:return k.jsx(ez,{id:n,as:"h2",children:t});case 3:return k.jsx(tz,{id:n,as:"h3",children:t});case 4:return k.jsx(nz,{id:n,as:"h4",children:t});case 5:return k.jsx(rz,{id:n,as:"h5",children:t});case 6:return k.jsx(iz,{id:n,as:"h6",children:t});default:return k.jsx(jw,{id:n,children:t})}},az=L.p` + margin-block: 0; + margin-block: 32px; + color: #000000e5; + font-family: ${e=>e.theme.font.fontFamily}; + font-weight: 400; + font-size: 18px; + line-height: 28px; + @media screen and (max-width: 768px) { + margin-block: 24px; + font-size: 13.5px; + line-height: 21px; + } +`,Ec=({children:e})=>k.jsx(az,{children:e}),sz=L.strong` + font-weight: ${e=>e.theme.font.fontWeightBold}; +`,ii=({children:e,type:t="italic"})=>{switch(t){case"italic":return k.jsx("em",{children:e});case"bold":return k.jsx(sz,{children:e});default:return k.jsx("em",{children:e})}},oz=L.div` + height: 1px; + margin-bottom: ${e=>e.theme.scale.scale04}; + background: ${e=>e.theme.color.neutral.gray08}; +`,Cc=()=>k.jsx(oz,{}),Bf=L.ul` + margin-block: 0; + margin-block: 32px; + padding-inline-start: ${e=>e.theme.scale.scale03}; + list-style-type: ${e=>e.ordered?"decimal":"disc"}; + @media screen and (max-width: 768px) { + margin-block: 24px; + } +`,lz=L.li` + margin-block: 8px; + font-weight: 400px; + font-size: 18px; + line-height: 28px; + @media screen and (max-width: 768px) { + margin-block: 6px; + font-size: 13.5px; + line-height: 21px; + } +`,ai=({ordered:e,children:t})=>{switch(e){case!1:return k.jsx(Bf,{ordered:e,children:t});case!0:return k.jsx(Bf,{as:"ol",ordered:e,children:t});default:return k.jsx(Bf,{ordered:e,children:t})}},Tc=({children:e})=>k.jsx(lz,{children:e}),cz=L.img` + display: block; + max-width: 90%; + margin-block: 32px; + margin-inline: auto; + border-radius: 12px; + @media screen and (max-width: 768px) { + margin-block: 24px; + } +`,Ac=({src:e,alt:t})=>k.jsx(cz,{src:e,alt:t}),uz=L.blockquote` + margin-inline: 0; + margin-block: 0; + margin-block: 32px; + padding-left: 12px; + border-left: 4px solid #c8c8c8; +`,Nc=({children:e})=>k.jsx(uz,{children:e}),dz=L.main` + padding: 64px; +`,hz=` + # Header 1 + ## Header 2 + ### Header 3 + #### Header 4 + ##### Header 5 + ###### Header 6 + + + This text is *italic* _italic_. + + This text is **bold** __bold__. + + This text is ***mix*** ___mix___. + + This text is ~~mix~~ ~~mix~~. + + - - - + + This is a unordered list + + - list 1 + - list 2 + - list 3 + + This is a ordered list + + 1. list 1 + 2. list 2 + 3. list 3 + + > This is a zone + + This is a javascripe code block: \`const hello = 'Hello Word'\` + + ~~~ ts + let num: number = 1 + console.log(num) + ~~~ + +`,fz=()=>k.jsx(dz,{children:k.jsx(Do,{children:hz,remarkPlugins:[Sc],rehypePlugins:[_c],components:{h1:({level:e,children:t})=>k.jsx(ct,{level:e,children:t}),h2:({level:e,children:t})=>k.jsx(ct,{level:e,children:t}),h3:({level:e,children:t})=>k.jsx(ct,{level:e,children:t}),h4:({level:e,children:t})=>k.jsx(ct,{level:e,children:t}),h5:({level:e,children:t})=>k.jsx(ct,{level:e,children:t}),h6:({level:e,children:t})=>k.jsx(ct,{level:e,children:t}),p:({children:e})=>k.jsx(Ec,{children:e}),em:({children:e})=>k.jsx(ii,{children:e}),strong:({children:e})=>k.jsx(ii,{type:"bold",children:e}),hr:()=>k.jsx(Cc,{}),ul:({depth:e,ordered:t,className:n,children:r})=>k.jsx(ai,{depth:e,ordered:t,className:n,children:r}),ol:({depth:e,ordered:t,className:n,children:r})=>k.jsx(ai,{depth:e,ordered:t,className:n,children:r}),li:({children:e})=>k.jsx(Tc,{children:e}),img:({src:e,alt:t})=>k.jsx(Ac,{src:e,alt:t}),blockquote:({children:e})=>k.jsx(Nc,{children:e})}})}),pz=`# Install + +Read the [quick start](https://github.com/xline-kv/Xline/blob/master/doc/quick-start/README.md) for more information about how to start an xline cluster.`,mz=`# Xline API + +The current version of Xline implements some etcd-compatible APIs, such as KV API, Auth API, Watch API and so on. In the next release, we will further implement the remaining etcd APIs ( v0.3 ~ v0.5 ) ,such as Maintenance, Lease, and provide a client in different languages ( v0.6 ~ v0.8 ). Read the [roadmap](https://github.com/datenlord/Xline#roadmap) for more details. + +Since Xline is fully compatible with etcd interfaces, you can use etcdctl to interact with Xline cluster in the current version. etcdctl can be used as described in the documentation. For more information, please refer to the [documentation](https://github.com/etcd-io/etcd/tree/main/etcdctl) on how to use etcdctl. Read the etcd-compatible API validation test report for more details.`,gz=`Xline is a high-performance distributed key-value storage engine for multi-cluster. It can provide unified data management for multi-cluster scenarios, making mutual access, discovery, and modification simple and convenient. It also provides KV interface, Multi-Version Concurrency Control and is compatible with etcd and K8S. + +Xline is the first geo-distributed consistency management service based on CURP(a WAN consensus protocol, read the paper for more details). It addresses the challenges of convergence and consistency across clouds. + +# Architecture + +**An Xline instance consists of the following layers:** + +- Client Layer: Provides a simple and easy-to-use API for clients to use, which can greatly reduce the complexity of using Xline for business. Xline clients in different languages will be implemented in the later release, and currently etcdctl can be used to initiate requests because Xline APIs are compatible with etcd. +- Access Layer: The access layer mainly includes the communication protocol between client to server or server to server. Xline API is based on gRPC protocol. +- CURP Protocol Layer: The CURP protocol layer implements the core algorithm features, such as leader election, log replication, fast-path and slow-path, which are used to ensure data consistency among Xline multi-node and improve service availability. CURP protocol is the cornerstone and highlight of Xline. +- Functional Logic Layer: This layer implements Xline business logic, including the typical KV Server, Auth Server, Lease Server and Watch Server, etc. Client sends requests to Xline Server through the access layer, and Xline Server dispatches the requests to specific servers for execution. +- Storage Layer: This layer contains two components, Index and DB, where Index is based on BTreeMap while DB is mainly responsible for persistent storage of data. At present, Xline is still in the early stage of development, so DB is mainly implemented based on memory. We will introduce persistent storage in the next release. + +![image](/xline-home/docs/Get-Started/image1.png) + +For more information about the Architecture of Xline, read [Xline Architecture Details](/xline-home/#/docs/Xline-Architecture-Details). + +# Xline In 5 Minutes + +1. Download binary from [release](https://github.com/datenlord/Xline/releases) page. +2. Use the following command to start cluster: +~~~bash +$ ./xline --name node1 --cluster-peers 127.0.0.1:2380 127.0.0.1:2381 --self-ip-port 127.0.0.1:2379 --leader-ip-port 127.0.0.1:2379 +$ ./xline --name node2 --cluster-peers 127.0.0.1:2379 127.0.0.1:2381 --self-ip-port 127.0.0.1:2380 --leader-ip-port 127.0.0.1:2379 +$ ./xline --name node3 --cluster-peers 127.0.0.1:2379 127.0.0.1:2380 --self-ip-port 127.0.0.1:2381 --leader-ip-port 127.0.0.1:2379 +~~~ +3. Download or build etcdctl from [etcd](https://github.com/etcd-io/etcd) project. +4. Use etcdctl to operate the cluster: +~~~bash +$ etcdctl --endpoints=http://127.0.0.1:2379 put foo bar +$ etcdctl --endpoints=http://127.0.0.1:2379 get foo +~~~`,yz=`# Performance Comparison + +We compare Xline with ETCD in a simulated multi-cluster environment. The details of the deployment are shown below. + +![image](/xline-home/docs/Deploy/image1.png) + +We compare the performance with two different workloads. One is 1 key case, the other is 100k key space case. Here is the test result. + +![image](/xline-home/docs/Deploy/xline-key-perf.png)`,bz=`# v0.1.0 + +#### What is it? + +\`Xline\` is a geo-distributed KV store for metadata management, which is based on the \`Curp\` protocol. + +#### Why make it? + +Existing distributed KV stores mostly adopt the \`Raft\` consensus protocol, which takes two RTTs to complete a request. When deployed in a single data center, the latency between nodes is low, so it will not have a big impact on performance. However, when deployed across data centers, the latency between nodes may be tens or hundreds of milliseconds, at which point the \`Raft\` protocol will become a performance bottleneck. The \`Curp\` protocol is designed to solve this problem. It can reduce one RTT when commands do not conflict, thus improving performance. + +#### What does it provide? + +- Etcd Compatible API + - \`Kv\` service + - \`Watch\` service + - \`Auth\` service +- basic implementation of the \`Curp\` protocol +- basic \`Xline\` client (use \`Curp\` directly) +- benchmark tool + +#### Usage + +[Usage doc](https://github.com/datenlord/Xline/blob/v0.1.0/USAGE.md) + +#### Note + +In this release, we only provide binary files for X86_64 linux. Other platforms need to be compiled by yourself. we will add more support in the future. + +#### Links + +GitHub: https://github.com/datenlord/Xline +Paper of Curp: https://www.usenix.org/system/files/nsdi19-park.pdf + +# v0.2.0 + +#### Features: + +- Enable Xline to boot up from the config file xline_server.conf ([#145](https://github.com/datenlord/Xline/pull/145)) +- Support ETCD APIs, like the lease API and the lock API ([#142](https://github.com/datenlord/Xline/pull/145), [#153](https://github.com/datenlord/Xline/pull/145)) +- Enable the recovery mechanism in the CURP module ([#146](https://github.com/datenlord/Xline/pull/145)) +- Add ETCD APIs compatibility test (test report: (report)[./VALIDATION_REPORT.md]) + +#### Fix Bugs + +- Fix panic in the benchmark ([#123](https://github.com/datenlord/Xline/pull/123)) +- Fix the issue that modifies kv pairs will fail after watching them in etcdctl ([#148](https://github.com/datenlord/Xline/pull/123)) + +# v0.3.0 + +#### Features: + +Implement a persistent storage layer to enable durability, including: +Implement a storage engine layer to abstract the concrete storage engine, like rocksdb, +and enable upper layer storage function ([#185](https://github.com/datenlord/Xline/pull/185), [#187](https://github.com/datenlord/Xline/pull/187)) +Enable recover logic for curp and xline ([#194](https://github.com/datenlord/Xline/pull/194), [#184](https://github.com/datenlord/Xline/pull/194)) + +#### Fix Bugs: + +Fix concurrent cmd order bug ([#197](https://github.com/datenlord/Xline/issues/197)) + +# v0.4.0 + +#### Features: + +1. Introduce batching mechanism to improve network bandwidth utilization +2. Implement the snapshot feature for CURP consensus protocol, +3. Implement the snapshot relevant API,which is compatible with etcdctl. The rest of other APIs in etcdctl maintenance will be implemented in the future. + +#### Fix Bugs: + +1. Fix a bug that commands will execute out of order in some concurrent cases (issue [#197](https://github.com/datenlord/Xline/issues/197)), resolve in the pr [#195](https://github.com/datenlord/Xline/issues/195) +2. Fix a bug that the gc task will panic during benchmark(issue [#206](https://github.com/datenlord/Xline/issues/206)), resolve in the pr [#210](https://github.com/datenlord/Xline/issues/210) +3. Fix a bug that the lock feature will work abnormally in some cases(issue [#209](https://github.com/datenlord/Xline/issues/209)), resolve in the pr [#212](https://github.com/datenlord/Xline/issues/212) +4. Fix a bug that some concurrent put requests will get wrong revisions (issue [#209](https://github.com/datenlord/Xline/issues/212)), resolve in the pr [#238](https://github.com/datenlord/Xline/issues/238) + +#### Benchmark: + +Since we implemented the persistence feature for xline in v0.3.0, we have re-benchmarked xline in this release. The benchmark report can be viewed in the Performance Comparison section in our README file. + +# v0.4.1 + +#### Features + +- Watch Progress Notify [#309](https://github.com/datenlord/Xline/issues/309) + +#### Refactors + +- Sharing state between CurpServer and CurpClient [#299](https://github.com/datenlord/Xline/issues/299) +- Refactor the XlineServer [#293](https://github.com/datenlord/Xline/issues/293) +- Refactor curp fast read implementation [#270](https://github.com/datenlord/Xline/issues/270) +- Improve the read and write logic for the RocksSnapshot [#263](https://github.com/datenlord/Xline/issues/263) +- Refactor the watch server implementation [#253](https://github.com/datenlord/Xline/issues/253) +- Refactor the dependencies of lease server [#251](https://github.com/datenlord/Xline/issues/251) + +#### Fix Bugs + +- Test_kv_authorization block [#291](https://github.com/datenlord/Xline/issues/291) +- The background command workers will panic in the integration test "recovery_after_compaction" [#285](https://github.com/datenlord/Xline/issues/285) +- Handle_propose in raw_cup will panic when try notify events [#280](https://github.com/datenlord/Xline/issues/280) +- Watch prev_kv [#277](https://github.com/datenlord/Xline/issues/277) + +# v0.5.0 + +#### Features: + +- [Feature]: Implemented the Compact feature, which includes the following two aspects (Read issue [#188](https://github.com/xline-kv/Xline/issues/188) for more details about compaction design): + - Implemented historical version compaction feature. The compaction API is compatible with the etcd interface. Resolved in pr [#311](https://github.com/xline-kv/Xline/pull/311) + - Implemented an automatic compaction mode, supporting both periodic Strategy and Revision Strategy. It is not enabled by default. Resolved in pr [#401](https://github.com/xline-kv/Xline/pull/401) +- [Feature]: Implement a Rust SDK for the Xline client (xline-client crate) to fully leverage the performance of CURP protocol. Currently, the SDK covers functionalities: + - Watch: Implemented in pr #[321](https://github.com/xline-kv/Xline/pull/321) + - Kv: Implemented in pr #[318](https://github.com/xline-kv/Xline/pull/318) + - Maintenance: Implemented in pr #[323](https://github.com/xline-kv/Xline/pull/323) + - Auth: Implemented in pr #[320](https://github.com/xline-kv/Xline/pull/320) + - Lease: Implemented in pr #[319](https://github.com/xline-kv/Xline/pull/319) + - Lock: Implemented in pr #[322](https://github.com/xline-kv/Xline/pull/322) + - Compaction: Implemented in pr #[389](https://github.com/xline-kv/Xline/pull/389) +- [Feature]: Implement a command line tool for Xline, which is named xlinectl. Resolved in pr #[348](https://github.com/xline-kv/Xline/pull/348) +- [Feature]: Support single node cluster #[335](https://github.com/xline-kv/Xline/issues/335) +- [Feature]: Support multiplatform for Xline. Read #[doc](https://github.com/xline-kv/Xline/tree/master/doc/quick-start) for more details. +- [Feature]: Support dns resolution for Xline cluster #[351](https://github.com/xline-kv/Xline/issues/351) +- [Feature]: Support grpc health checking protocol, resolved in pr #[385](https://github.com/xline-kv/Xline/pull/385) +- [Feature]: Add madsim simulation in Curp tests #[282](https://github.com/xline-kv/Xline/issues/282) + +#### Fix Bugs + +- [Bug]: Madsim Curp integration tests sometimes fail #[361](https://github.com/xline-kv/Xline/issues/361) +- [Bug]: lease may not synced in lease server #[343](https://github.com/xline-kv/Xline/issues/343) +- [Bug]: EventListener will lose event since it's not cancellation safe. #[339](https://github.com/xline-kv/Xline/issues/339) +- [Bug]: Resolve failing tests related to serialized size. #[259](https://github.com/xline-kv/Xline/issues/259) + +#### Contributors + +We'd like to thank all the contributors who worked on this release! + +[@liubog2008](https://github.com/liubog2008) + +# v0.6.0 + +#### New Features + +- [Feature]: Add membership change mechanism for CUPR consensus Protocol (Read design doc [#306](https://github.com/xline-kv/Xline/issues/306) for more details) +- [Feature]: Implement cluster server and client [#464](https://github.com/xline-kv/Xline/pull/464), [#465](https://github.com/xline-kv/Xline/pull/465) +- [Feature]: Implement the graceful shutdown feature. +- [Feature]: Implement the xlinctl to communicate with the xline cluster. Currently, the xlinectl covers functionalities: + - Compaction and member command: Implemented in pr [#484](https://github.com/xline-kv/Xline/pull/484) + - Txn, watch and lock command: Implemented in pr [#428](https://github.com/xline-kv/Xline/pull/484) + - Role command: Implemented in pr [#427](https://github.com/xline-kv/Xline/pull/427) + - User command: Implemented in pr [#426](https://github.com/xline-kv/Xline/pull/426) + - Snapshot and auth command: Implemented in pr [#425](https://github.com/xline-kv/Xline/pull/425) + - Delete and lease command: Implemented in pr [#424](https://github.com/xline-kv/Xline/pull/424) + +#### Bug Fixes + +- [Bug]: benchmark client cannot connect to server [#462](https://github.com/xline-kv/Xline/pull/462) +- [Bug]: remove stop in simulation tests [#458](https://github.com/xline-kv/Xline/pull/458) +- [Bug]: execute out of order [#454](https://github.com/xline-kv/Xline/pull/454) +- [Bug]: check the password on leader [#435](https://github.com/xline-kv/Xline/pull/435) +- [Bug]: remove recovery of uncommitted pool [#419](https://github.com/xline-kv/Xline/pull/419) +- [Bug]: CURP TLA+ quorum size calculation & property check [#418](https://github.com/xline-kv/Xline/pull/418) +- [Bug]: fix propose doesn't handle SyncedError [#407](https://github.com/xline-kv/Xline/pull/407) + +#### Refactor + +- [Refactor]: reduce code duplication [#407](https://github.com/xline-kv/Xline/pull/407) +- [Refactor]: Take into account the interleaving states of a request broadcast in TLA+ [#429](https://github.com/xline-kv/Xline/pull/429) +- [Refactor]: Refine the bench client implementation [#496](https://github.com/xline-kv/Xline/pull/496) +- [Refactor]: Simplified the error handling logic [#480](https://github.com/xline-kv/Xline/pull/480) +- [Refactor]: Improve readability of bootstrap errors [#432](https://github.com/xline-kv/Xline/pull/432) +- [Refactor]: Imporve command serialization in execution and after-sync [#421](https://github.com/xline-kv/Xline/pull/421), [#422](https://github.com/xline-kv/Xline/pull/422) + +#### Contributors + +- [@EAimTY](https://github.com/EAimTY) +- [@MarkGaox](https://github.com/MarkGaox) +- [@Kikkon](https://github.com/Kikkon) + +Note: +Known issue: If the cluster is shut down immediately after adding a member, the leader node may not shut down properly, continuously trying to send entries to the shut-down new node. Read issue [#526](https://github.com/xline-kv/Xline/issues/526) for more details. + +# v0.6.1 + +#### Bug Fixes + +- [Bug]: Fixed a bug causing panic during the update node process. [issue #531](https://github.com/xline-kv/Xline/issues/531) +- [Bug]: Fixed a bug causing panic during the CI process due to reading state. [issue #527](https://github.com/xline-kv/Xline/issues/527) +- [Bug]: Fixed a bug in the previous version where immediately shutting down the cluster after executing "member add" would cause the leader to fail to shut down properly. [issue #526](https://github.com/xline-kv/Xline/issues/526) +- [Bug]: Fixed an issue in TXN where the conflict detection process would ignore the key of child requests. [issue #470](https://github.com/xline-kv/Xline/issues/470) +- [Bug]: Fixed a panic issue in watch caused by closing the channel. [issue #370](https://github.com/xline-kv/Xline/issues/370) + - pr 576: [fix: fix ce event tx logs](https://github.com/xline-kv/Xline/pull/576) + - pr 556: [[Fix]: kv update channel panic](https://github.com/xline-kv/Xline/pull/556) +- [Bug]: Changed the calculation method for the cluster version to a hash to avoid misjudgments. [pr #590](https://github.com/xline-kv/Xline/pull/590) +- [Bug]: Fixed a bug that caused the compact operation to behave abnormally in specific scenarios. [pr #570](https://github.com/xline-kv/Xline/pull/570) + +#### Refactor + +- [Refactor]: Refactored the implementation of the Curp client, reducing code complexity. : + - pr 582: [Refactor/curp client tests suits](https://github.com/xline-kv/Xline/pull/582) + - pr 584: [Refactor/curp client retry](https://github.com/xline-kv/Xline/pull/584) + - pr 585: [Refactor/replace curp client](https://github.com/xline-kv/Xline/pull/585) +- [Refactor]: Removed some command-related data structures from xline and xline-client. [pr #469](https://github.com/xline-kv/Xline/pull/469) +`,vz=`# Xline Architecture Details + +![image](/xline-home/docs/Xline-Architecture-Details/image1.jpg)`,wz="/xline-home/assets/dropdown-close-533c3c65.svg",xz="/xline-home/assets/dropdown-active-7d279a33.svg",kz=L.div` + height: 10px; + width: 10px; + margin-inline: 8px; + border-radius: 50%; + background: ${e=>e.theme.color.neutral.gray05}; +`,M5=L.li` + display: flex; + align-items: center; + margin-bottom: ${e=>e.theme.scale.scale03}; +`,Sz=L(M5)` + display: ${e=>e.isActive?"flex":"none"}; + padding-left: 14px; +`,_z=L.div` + display: inline-block; + padding-inline: 8px; + height: 100%; +`,qw=L.img` + width: 12px; + height: 12px; +`,R5=L.p` + color: ${e=>e.theme.color.neutral.gray10}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: 16px; + line-height: 18px; + cursor: pointer; +`,Ez=L(R5)` + font-weight: ${e=>e.theme.font.fontWeightRegular}; + cursor: pointer; +`,I5=({item:e})=>k.jsx("ul",{children:e.map(t=>k.jsx(Cz,{items:t},t.title))}),Cz=({items:e})=>{const[t,n]=ce.useState(!1);return k.jsxs(k.Fragment,{children:[k.jsxs(M5,{onClick:()=>n(!t),children:[k.jsx(_z,{children:t?k.jsx(qw,{src:xz}):k.jsx(qw,{src:wz})}),k.jsx(R5,{children:e.title})]}),k.jsx("ul",{children:k.jsx(Tz,{items:e.children,isActive:t})})]})},Tz=({items:e,isActive:t})=>{const n=Hi();return k.jsx(k.Fragment,{children:e.map(r=>k.jsxs(Sz,{isActive:t,children:[k.jsx(kz,{}),k.jsx(Ez,{onClick:()=>{n(r.url),setTimeout(()=>{const i=document.getElementById(r.id||"");console.log(i),i==null||i.scrollIntoView({behavior:"smooth"})},100)},children:r.title})]},r.id))})},Az=Object.assign({"/src/docs/Deploy.md":pz,"/src/docs/Develop.md":mz,"/src/docs/Get-Started.md":gz,"/src/docs/Performance-Comparison.md":yz,"/src/docs/What's-New.md":bz,"/src/docs/Xline-Architecture-Details.md":vz}),Nz=L.div` + display: flex; + align-items: center; + justify-content: center; + height: calc(86px + 416px); + padding-top: 86px; + background: #0a0c28; + @media screen and (max-width: 1024px) { + height: calc(63px + 312px); + padding-top: 64.5px; + } + @media screen and (max-width: 768px) { + height: calc(53px + 208px); + padding-top: 43px; + } +`,Mz=L.h1` + position: relative; + display: inline-block; + padding-inline: 32px; + color: white; + font-weight: 700; + font-size: 72px; + line-height: 80.64px; + /* text-transform: capitalize; */ + line-height: 1.1; + transform: translateY(-10%); + @media screen and (max-width: 1024px) { + padding-inline: 24px; + font-size: 54px; + } + @media screen and (max-width: 768px) { + padding-inline: 16px; + font-size: 36px; + } +`,Rz=L.img` + z-index: -1; + position: absolute; + left: 50%; + bottom: -17px; + transform: translateX(-45%); + width: 295.01px; + height: 35.35px; + @media screen and (max-width: 1024px) { + bottom: -12px; + width: 222px; + height: 27px; + } + @media screen and (max-width: 768px) { + bottom: -8px; + width: 148px; + height: 18px; + } +`,Iz=L.main` + display: flex; + margin-inline: auto; + padding-block: ${e=>e.theme.scale.scale05}; + padding-inline: ${e=>e.theme.scale.scale07}; + max-width: ${e=>e.theme.scale.scale12}; + // - - - + /* height: 200px; + background-color: lightcoral; */ + @media screen and (max-width: 1024px) { + padding-block: 36px; + padding-inline: 96px; + } + @media screen and (max-width: 768px) { + padding-block: 24px; + padding-inline: 64px; + } +`,Oz=L.div` + width: 75%; + /* flex: 1; */ + + // - - - + /* min-height: 100px; + background-color: lightcyan; */ + @media screen and (max-width: 1024px) { + width: 100%; + } +`,Dz=L.div` + flex-shrink: 0; + width: 25%; + margin-right: ${e=>e.theme.scale.scale05}; + // - - - + /* height: 100px; + background-color: lightblue; */ + @media screen and (max-width: 1024px) { + display: none; + } +`,Lz=L.p` + margin-bottom: ${e=>e.theme.scale.scale06}; + color: ${e=>e.theme.color.neutral.gray07}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize5}; + line-height: ${e=>e.theme.font.lineHeight5}; +`,Pz=()=>{const{params:e}=t1();return ce.useEffect(()=>{e==="Xline-Architecture-Details"&&window.scrollTo(0,0)},[e]),k.jsxs(k.Fragment,{children:[k.jsx(Nz,{children:k.jsxs(Mz,{children:[e==null?void 0:e.split("-").join(" "),k.jsx(Rz,{src:Ra,alt:"underline"})]})}),k.jsxs(Iz,{children:[k.jsxs(Dz,{children:[k.jsx(Lz,{children:"Docs"}),k.jsx(I5,{item:G3})]}),k.jsx(Oz,{children:k.jsx(Do,{children:Az[`/src/docs/${e}.md`],remarkPlugins:[Sc],rehypePlugins:[_c],components:{h1:({level:t,children:n})=>k.jsx(ct,{level:t,children:n}),h2:({level:t,children:n})=>k.jsx(ct,{level:t,children:n}),h3:({level:t,children:n})=>k.jsx(ct,{level:t,children:n}),h4:({level:t,children:n})=>k.jsx(ct,{level:t,children:n}),h5:({level:t,children:n})=>k.jsx(ct,{level:t,children:n}),h6:({level:t,children:n})=>k.jsx(ct,{level:t,children:n}),p:({children:t})=>k.jsx(Ec,{children:t}),em:({children:t})=>k.jsx(ii,{children:t}),strong:({children:t})=>k.jsx(ii,{type:"bold",children:t}),hr:()=>k.jsx(Cc,{}),ul:({depth:t,ordered:n,className:r,children:i})=>k.jsx(ai,{depth:t,ordered:n,className:r,children:i}),ol:({depth:t,ordered:n,className:r,children:i})=>k.jsx(ai,{depth:t,ordered:n,className:r,children:i}),li:({children:t})=>k.jsx(Tc,{children:t}),img:({src:t,alt:n})=>k.jsx(Ac,{src:t,alt:n}),blockquote:({children:t})=>k.jsx(Nc,{children:t})}})})]})]})},zz=`# Basic Concept + +## CAP Theorem and PACELC theorem + +In theoretical computer science, the CAP theorem, also named Brewer's theorem after computer scientist Eric Brewer, states that any distributed data store can provide only two of the following three guarantees: + +- Consistency: Every read receives the most recent write or an error. +- Availability: Every Request receives a (non-error) response, without the guarantee that it contains the most recent write. +- Partition tolerance: The system continues to operate despite an arbitrary number of messages being dropped (or delayed) by the network between nodes. + +To deal with a [network partition](https://en.wikipedia.org/wiki/Network_partition) failure, one of the following options must be chosen: + +- cancel the operation and thus decrease the availability but ensure consistency. +- proceed with the operation and thus provide availability but risk inconsistency. + +Thus, if there is a network partition, one has to choose between consistency or availability. Note that consistency as defined in the CAP theorem is quite different from the consistency guaranteed in [ACID database transactions](https://en.wikipedia.org/wiki/ACID). + +Eric Brewer argues that the often-used "two out of three" concept can be somewhat misleading because system designers need only to sacrifice consistency or availability in the presence of partitions, but that in many systems partitions are rare. The **PACELC theorem** is an extension to the CAP theorem. It states that in case of network partitioning (P) in a distributed computer system, one has to choose between availability (A) and consistency (C) (as per the CAP theorem), but else (E), even when the system is running normally in the absence of partitions, one has to choose between latency (L) and consistency (C). + +Read the following docs for more information: + +1. CAP Theorem: + - Paper: [Brewer's Conjecture and the Feasibility of Consistent Available Partition-Tolerant Web Services](https://users.ece.cmu.edu/~adrian/731-sp04/readings/GL-cap.pdf) + - Blog: [An Illustrated Proof of the CAP Theorem](https://mwhittaker.github.io/blog/an_illustrated_proof_of_the_cap_theorem/) +2. PACELC Theorem(Paper): [Consistency Tradeoffs in Modern Distributed Database System Design](https://www.cs.umd.edu/~abadi/papers/abadi-pacelc.pdf) + +## FLP Impossibility + +The paper "[Impossibility of Distributed Consensus with One Faulty Process](https://groups.csail.mit.edu/tds/papers/Lynch/jacm85.pdf)", published by Fischer, Lynch and Patterson in April 1985, proposed the "FLP Impossibility", specifying an upper bound on what is possible using distributed processes in an asynchronous environment. The consensus problem is solvable in a synchronous environment where processes can proceed simultaneously. The synchronous model allows detecting faults by waiting the entire length of a step for a process to reply, and assuming it has crashed if no reply is received. + +Mechanisms that determine whether a failure has occurred based on how long a reply has been received do not work in a fully asynchronous message-passing distributed system. This is because in an asynchronous environment, there is no upper limit to how long a process can reply to a message after completing its work. Thus, it is impossible to tell whether a process has crashed or has taken a long time to respond. The FLP impossibility shows that in a completely asynchronous system, even if only one node fails, there is no algorithm that can bring the system to consensus. This impossibility comes from the worst-case scheduling scenario, which is unlikely to happen in practice except in adversarial situations, such as an intelligent denial-of-service attacker in the network. In most normal cases, process scheduling has a degree of natural randomness. + +A randomized consensus algorithm can circumvent the FLP Impossibility, achieving security and effectiveness with overwhelming probability, even in the worst case scheduling scenario, such as an intelligent denial-of-service attacker in the network. + +# Consensus Protocol + +## Paxos + +Paxos is a consensus algorithm proposed by Leslie Lamport in 1989. The initial paper was "[The Part-Time Parliament](http://lamport.azurewebsites.net/pubs/pubs.html#lamport-paxos)", but it was not published. Lamport wrote “[Paxos Made Simple](https://lamport.azurewebsites.net/pubs/paxos-simple.pdf)” in 2001 and formally proposed the algorithm. + +Paxos uses proposals to drive the entire algorithm, so that the system resolves to the same proposal. Each node continuously proposes a proposal through messaging, and each proposal includes a proposal number and a proposal value. Paxos considers that if more than half of the nodes in the cluster unanimously accept the proposal, a consensus on the proposal is reached and the proposal is said to be **chosen**. + +Paxos divides the system into the following roles: + +- Client: The client sends a request to the distributed system and waits for a response. +- Proposer: When the proposer receives a request from the client, it makes a relevant proposal, tries to get the receiver to accept the proposal, and coordinates in case of conflict to drive the algorithm to run. +- Acceptor: also called voter, votes to accept or reject the proposer's proposal, and if more than half of the receivers accept the proposal, the proposal is chosen. +- Learners: Learners can only learn the chosen proposal and do not participate in the proposal voting. Once the client's request is unified by the acceptors, the learner can execute the requested operation in the proposal and initiate a response to the client. To improve system availability, multiple learners can be added. + +Paxos represents a family of protocols, including: + +- Basic Paxos: The basic protocol, allowing consensus about a single value. +- Multi Paxos: Allow the protocol to handle a stream of messages with less overhead than Basic Paxos. +- [Cheap Paxos](https://lamport.azurewebsites.net/pubs/web-dsn-submission.pdf): Reduce number of nodes needed via dynamic reconfiguration in exchange for reduced burst fault tolerance. +- [Fast Paxos](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tr-2005-112.pdf): Reduce the number of round trips in exchange for reduced fault tolerance. + +Since Paxos is difficult to understand, algorithms like Raft are designed to be easier to understand. + +## Raft + +In 2013, Diego Ongaro and John Ousterhout of Stanford University published “[In Search of an Understandable Consensus Algorithm with the goal of comprehensibility](https://raft.github.io/raft.pdf)”, formally proposing the Raft algorithm, which aims to optimize the Paxos family of algorithms into a consensus algorithm that is easier to understand and equally satisfying in terms of [safety and liveness](https://en.wikipedia.org/wiki/Safety_and_liveness_properties). + +Raft is similar to Multi-Paxos in that it is a leader-based consensus algorithm. Nodes in the Raft algorithm can only be in one of three states at any given time. + +- Leader: The leader is responsible for handling all client requests and log replication. There can be at most one working leader in the system at the same time. +- Follower: Passively handling requests from the leader. Most of the nodes in the cluster are in this state. +- Candidate: A transitional state between leader and follower, used to elect a new leader. + +Follower persists requests from the leader as log entries as soon as they are received. When a quorum (majority) of nodes confirm that the entry has persisted in their logs, the leader commits the log and followers apply the log entry to its own state machine. When there is a network partition in the system, the partition containing the majority of nodes can still process client requests normally. + +Raft ensures strong consistency of the distributed system through the leader. Raft supports leader election. When the leader crashes, one of the followers is elected as the new leader. Only the follower with more complete logs than the majority of nodes in the cluster can be elected as a leader. From this implementation of leader election, Raft is not a Byzantine fault-tolerant consensus algorithm. Any node can interfere with the cluster by initiating an election and falsely claiming to have the latest logs. + +In addition, there are several optimizations that can be applied to Raft. Prevote can be used to introduce a pre-selection of possible leaders, allowing them to gauge their ability to become leaders before potentially disrupting the cluster. Joint consensus can support arbitrary grouping changes, allowing for better scaling. Batching and pipelining can help high-throughput systems perform better. + +## CURP + +The CURP algorithm was proposed by Seo Jin Park and John Ousterhout of Stanford University in their paper “[Exploiting Commutativity For Practical Fast Replication](https://www.usenix.org/system/files/nsdi19-park.pdf)” published in 2019. + +Traditional approaches to replication, be it Raft or Multi-Paxos, require client requests to be ordered before making them durable by copying them to replica. As a result, clients must wait for two round-trip times (RTTs) before updates complete. The Consistent Unordered Replication Protocol (CURP) allows clients to replicate requests that have not yet been ordered, as long as they are commutative. This strategy allows most operations to complete in 1 RTT. + +CURP supplements a system's existing replication mechanism with a lightweight form of replication without ordering based on witness. A client replicates each operation to one or more witnesses in parallel with sending the request to the primary server. The primary can execute the operation and return to the client without waiting for normal replication, which happens asynchronously. This allows operations to complete in 1 RTT, as long as all witnessed-but-not-yet-replicated operations are commutative. Noncommutative operations still require 2 RTTs. If the primary crashes, information from witnesses is combined with that from the normal replicas to re-create a consistent server state. + +Xline is a distributed key-value store engine which can achieve high-performance data access and strong consistency in cross data center scenarios. The network latency between different data centers is very high, often tens or even hundreds of milliseconds. Ideally, since CURP protocol can save an RTT to reach consensus than Raft or Multi-Paxos does, Xline uses CURP to achieve high-performance data access and strong consistency in cross data center situations. + +Read the [blog](/xline-home/#/blog) for more information about the CURP Protocol.`,Fz=`Key-value stores are used as stand-alone NoSQL systems but they are also used as a part of more complex pipelines and systems such as machine learning and relational systems. + +B-trees and Log-Structured Merge-trees (LSM trees) are two of the most widely used data structures for organizing and storing data in data-intensive applications. However, each of them has its own trade-offs. The purpose of this paper is to compare these two data structures using a quantitative approach. + +# Metrics + +In general, there are three key metrics to measure the performance of a data structure: write amplification, read amplification, and spatial amplification. This section aims to describe these metrics. + +For hard disk drives (HDDs), the cost of disk seek is enormous, such that the performance of random read/write is worse than that of sequential read/write. Therefore, the performance of sequential disk reads and writes is much better than that of random reads and writes. Even for SSDs, sequential read and write performance is better than random read and write. + +## Write Amplification + +Write amplification means that the actual amount of data written to the storage media is greater than the amount of data expected to be written. + +Write amplification occurs because the database itself, in addition to storing data, also needs to store some metadata, such as indexes, wal logs, etc., to improve performance or crash consistency. In addition to metadata, write amplification can also occur on the storage media itself. For example, SSDs have their own garbage collection mechanism that can cause write amplification. Since the lifetime of flash-based storage devices is related to the number of erases, write amplification can reduce the lifetime of flash memory. + +## Read Amplification + +Read amplification is when the amount of data needed to be read per query is greater than the amount of data expected to be read. + +Read amplification occurs because databases often require metadata, such as indexes, to be queried first. The use of caching can reduce read amplification. Also, note that the units of write amplification and read amplification are different. Write amplification measures how much more data is written than the application thinks, while read amplification counts the number of disk reads to execute a query. + +## Space Amplification + +Space amplification is when the data stored in a storage medium is larger than the data stored in a database application + +# LSM Tree And B-Tree + +In the [LSM tree](https://en.wikipedia.org/wiki/Log-structured_merge-tree), data is organized into levels. The data at level 0 resides entirely in memory, while the rest of the levels reside on disk. New records are inserted into level 0. As more data is inserted, when level 0 exceeds a certain size threshold, it is merged into leve 1. If level 1 exceeds a certain size threshold, it is merged into level 2, and so on, with a limit on the size of each level. In order to perform a query on a specific key to get its associated value, a search must be performed in level 0 and also in each level. + +[B-tree](https://en.wikipedia.org/wiki/B-tree) is a self-balancing tree data structure that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time. The B-tree generalizes the binary search tree, allowing for nodes with more than two children.([2]) Unlike other self-balancing binary search trees, the B-tree is well suited for storage systems that read and write relatively large blocks of data, such as databases and file systems. + +Generally speaking, a data structure can be optimized in at most two ways: read, write, or space amplification. This means that one data structure is unlikely to be better than another in all three. The LSM-tree has a better writer performance than the B+ tree, while its read performance is not as good as the B+ tree. + +LSM Tree has better write performance than B+ Tree because the former has lower write amplification than the latter. B+ Tree indexes require at least two writes of data, one to the WAL and one to the page itself. LSMs can have greater write throughput than B+ Trees partly because they sometimes have lower write amplification (which requires the right configuration) and partly because they write compact SSTable files sequentially. LSM Trees can be compressed well enough to produce smaller files on the disk. The B+ Tree storage engine, on the other hand, generates some space fragmentation due to the paging mechanism. + +The B+ Tree has better read performance compared to the LSM Tree because the former has lower read amplification than the latter. LSM Tree requires reading several different data structures with SSTable during the read process. In addition, since each key of the B tree exists in only one location in the index, the LSM tree storage engine, on the other hand, may have multiple copies of the same key in different segments. This also makes B-trees attractive in databases that need to provide strong transactional semantics, because in most relational databases, transactional isolation is achieved by using locks on key ranges. In a B-tree index, these locks can be attached directly to the tree.`,Bz=`In [distributed computing](https://en.wikipedia.org/wiki/Distributed_computing), a **remote procedure call (RPC)** is when a computer program causes a procedure (subroutine) to execute in a different address space (commonly on another computer on a shared network), which is coded as if it were a normal (local) procedure call, without the programmer explicitly coding the details for the remote interaction. That is, the programmer writes essentially the same code whether the subroutine is local to the executing program, or remote. This is a form of client–server interaction (caller is client, executor is server), typically implemented via a request–response message-passing system. In the object-oriented programming paradigm, RPCs are represented by remote method invocation (RMI). The RPC model implies a level of location transparency, namely that calling procedures are largely the same whether they are local or remote, but usually, they are not identical, so local calls can be distinguished from remote calls. Remote calls are usually orders of magnitude slower and less reliable than local calls, so distinguishing them is important. + +RPCs are a form of [inter-process communication](https://en.wikipedia.org/wiki/Inter-process_communication) (IPC), in that different processes have different address spaces: if on the same host machine, they have distinct virtual address spaces, even though the physical address space is the same; while if they are on different hosts, the physical address space is different. Many different (often incompatible) technologies have been used to implement the concept. + +Read the [protobuf doc](https://protobuf.dev/programming-guides/encoding/) and the [gRPC](https://grpc.io/docs/) doc for more details. + +[tonic]() is a gRPC over HTTP/2 implementation focused on **high performance**, **interoperability**, and **flexibility**. This library was created to have first-class support of async/await and to act as a core building block for production systems written in Rust.`,$z=`Few can argue against the need for quality control when developing software. Any known or unknown software defects can be very costly for the users of the software. Testing can help developers identify these software defects in advance. The sooner development teams receive feedback from testing, the sooner they can address issues such as: + +- Architectural flaws +- Poor design decisions +- Invalid or incorrect functionality +- Security vulnerabilites +- Scalability issues + +Xline, as a distributed key-value store engine, is designed to run in the presence of many failure scenarios and degraded states, which greatly increases the testing surface. These states also must be tested in addition to the normal testing done on a project. + +In futher sections we’ll investigate how to test distributed systems under the influence of these almost infinite variables. For now, let's examine the basics that every project requires. These simple tests will lay the foundation for many later tests that can be run millions of times throughout the life of a project. + +Often, these tests are written before or alongside the code which they test, and they're used to guide the development process. + +# Unit Testing + +Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. This testing methodology is done during the development process by the software developers and sometimes QA staff. + +Xline includes many unit tests that run by cargo test. These tests typically involve simple functionality and are tested using assertions. Many languages, like Rust, offer built-in unit testing functionality: + +~~~rust +#[test] +fn test_parse_members() { + let s1 = ""; + assert!(parse_members(s1).is_err()); + let s2 = "a=1"; + let m2 = HashMap::from_iter(vec![("a".to_owned(), "1".to_owned())]); + assert_eq!(parse_members(s2).unwrap(), m2); + + let s3 = "a=1,b=2,c=3"; + let m3 = HashMap::from_iter(vec![ + ("a".to_owned(), "1".to_owned()), + ("b".to_owned(), "2".to_owned()), + ("c".to_owned(), "3".to_owned()), + ]); + assert_eq!(parse_members(s3).unwrap(), m3); + let s4 = "abcde"; + assert!(parse_members(s4).is_err()); +} +~~~ + +The main objective of unit testing is to isolate written code to test and determine if it works as intended. + +# Mock Testing + +Doing testing is essentially a way to test system or component in a controlled environment. The biggest problem with having a lot of reliance on third-party code is that the third-party code is not controllable. So we need to isolate the tested code and replace the uncontrollable component with a controllable one. That's a so-called mock test. + +mockall is a powerful mock object library for Rust. It provides tools to create mock versions of almost any trait or struct. They can be used in unit tests as a stand-in for the real object. We use mockall to do some mock tests in Xline: + +~~~rust +#[traced_test] +#[tokio::test] +async fn logs_will_be_resent() { + let state = new_test_state(); + + let mut mock_connect = MockConnectInterface::default(); + mock_connect + .expect_append_entries() + .times(4) + .returning(|_, _| Err(ProposeError::RpcStatus("timeout".to_owned()))); + mock_connect + .expect_id() + .return_const(FOLLOWER_ID1.to_owned()); + + let handle = tokio::spawn(async move { + let req = AppendEntriesRequest::new( + 1, + LEADER_ID.to_owned(), + 0, + 0, + vec![LogEntry::new(1, &[Arc::new(TestCommand::default())])], + 0, + ) + .unwrap(); + send_log_until_succeed(1, req, Arc::new(mock_connect), state).await; + }); + sleep_secs(3).await; + assert!(!handle.is_finished()); + handle.abort(); +} +~~~ + +Read the [mock document](https://docs.rs/mockall/0.11.3/mockall/) for more information. + +# Integration Testing + +ntegration tests are often used to ensure that software components or functions operate together properly. + +In Rust, integration tests are entirely external to your library and use your code in the same way any other external code would, using only the public interface and potentially exercising multiple modules per test. It can also exist as documentation. That means it's possible to document your project and benefit from a full test suite simultaneously. + +~~~rust +/// Create a new Xline Server instance with the given config +/// +/// \`\`\`rust +/// let config = if let Ok(path) = env::var("XLINE_SERVER_CONFIG") { +/// fs::read_to_string(&path).await? +/// } else { +/// include_str!("/etc/xline/xline_server.conf").to_owned() +/// }; +/// let xline_server = XlineServer::new(config)?; +/// \`\`\` +struct XlineServer { /*...*/ } +~~~ + +The [Rust Book](https://doc.rust-lang.org/book/ch11-01-writing-tests.html) has a great chapter on how to write tests in Rust, and which testing strategies are appropriate for which problems. + +# Validation Testing + +Since one of the design goals of Xline is to be fully compatible with the etcd API, the validation test is mainly used to test the compatibility of the Xline interface with the etcd client. We used etcdctl to test the compatibility. + +Read the "[Start Xline Servers](https://github.com/datenlord/Xline/blob/master/QUICK_START.md#start-xline-servers)" and "[Send Etcd requests](https://github.com/datenlord/Xline/blob/master/QUICK_START.md#send-etcd-requests)" for more information. + +Read the etcdctl doc for more detail about how to use etcdctl + +Click [here](https://datenlord.feishu.cn/sheets/shtcnTuzElmgDO6NMOlobsCG2Jd) to view the test report.`,Uz=Object.assign({"/src/deep-dive/Consensus.md":zz,"/src/deep-dive/Key-value-Engine.md":Fz,"/src/deep-dive/Remote-Procedure-Calls-(RPC).md":Bz,"/src/deep-dive/Testing.md":$z}),jz=L.div` + display: flex; + align-items: center; + justify-content: center; + height: calc(86px + 416px); + padding-top: 86px; + background: #0a0c28; + @media screen and (max-width: 1024px) { + height: calc(63px + 312px); + padding-top: 64.5px; + } + @media screen and (max-width: 768px) { + height: calc(53px + 208px); + padding-top: 43px; + } +`,qz=L.h1` + position: relative; + display: inline-block; + padding-inline: 32px; + color: white; + font-weight: 700; + font-size: 72px; + /* line-height: 80.64px; */ + line-height: 1.1; + text-transform: capitalize; + transform: translateY(-10%); + @media screen and (max-width: 1024px) { + padding-inline: 24px; + font-size: 54px; + } + @media screen and (max-width: 768px) { + padding-inline: 16px; + font-size: 36px; + } +`,Hz=L.img` + z-index: -1; + position: absolute; + left: 50%; + bottom: -17px; + transform: translateX(-45%); + width: 295.01px; + height: 35.35px; + @media screen and (max-width: 1024px) { + bottom: -12px; + width: 222px; + height: 27px; + } + @media screen and (max-width: 768px) { + bottom: -8px; + width: 148px; + height: 18px; + } +`,Wz=L.main` + display: flex; + margin-inline: auto; + padding-block: ${e=>e.theme.scale.scale05}; + padding-inline: ${e=>e.theme.scale.scale07}; + max-width: ${e=>e.theme.scale.scale12}; + // - - - + /* height: 200px; + background-color: lightcoral; */ + @media screen and (max-width: 1024px) { + padding-block: 36px; + padding-inline: 96px; + } + @media screen and (max-width: 768px) { + padding-block: 24px; + padding-inline: 64px; + } +`,Yz=L.div` + width: 75%; + /* flex: 1; */ + + // - - - + /* min-height: 100px; + background-color: lightcyan; */ + @media screen and (max-width: 1024px) { + width: 100%; + } +`,Vz=L.div` + flex-shrink: 0; + width: 25%; + margin-right: ${e=>e.theme.scale.scale05}; + // - - - + /* height: 100px; + background-color: lightblue; */ + @media screen and (max-width: 1024px) { + display: none; + } +`,Gz=L.p` + margin-bottom: ${e=>e.theme.scale.scale06}; + color: ${e=>e.theme.color.neutral.gray07}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize5}; + line-height: ${e=>e.theme.font.lineHeight5}; +`,Kz=()=>{const{params:e}=t1(),t=e==null?void 0:e.split("-").join(" ");return k.jsxs(k.Fragment,{children:[k.jsx(jz,{children:k.jsxs(qz,{children:[t==="Testing"?"Test":t,k.jsx(Hz,{src:Ra,alt:"underline"})]})}),k.jsxs(Wz,{children:[k.jsxs(Vz,{children:[k.jsx(Gz,{children:"Deep Dive"}),k.jsx(I5,{item:K3})]}),k.jsx(Yz,{children:k.jsx(Do,{children:Uz[`/src/deep-dive/${e}.md`],remarkPlugins:[Sc],rehypePlugins:[_c],components:{h1:({level:n,children:r})=>k.jsx(ct,{level:n,children:r}),h2:({level:n,children:r})=>k.jsx(ct,{level:n,children:r}),h3:({level:n,children:r})=>k.jsx(ct,{level:n,children:r}),h4:({level:n,children:r})=>k.jsx(ct,{level:n,children:r}),h5:({level:n,children:r})=>k.jsx(ct,{level:n,children:r}),h6:({level:n,children:r})=>k.jsx(ct,{level:n,children:r}),p:({children:n})=>k.jsx(Ec,{children:n}),em:({children:n})=>k.jsx(ii,{children:n}),strong:({children:n})=>k.jsx(ii,{type:"bold",children:n}),hr:()=>k.jsx(Cc,{}),ul:({depth:n,ordered:r,className:i,children:a})=>k.jsx(ai,{depth:n,ordered:r,className:i,children:a}),ol:({depth:n,ordered:r,className:i,children:a})=>k.jsx(ai,{depth:n,ordered:r,className:i,children:a}),li:({children:n})=>k.jsx(Tc,{children:n}),img:({src:n,alt:r})=>k.jsx(Ac,{src:n,alt:r}),blockquote:({children:n})=>k.jsx(Nc,{children:n})}})})]})]})},O5=`--- + cover: /xline-home/blog/Revisit-the-Consensus-Protocol/cover.png + author: + name: Jicheng Shi + url: https://github.com/rogercloud + img_url: https://avatars.githubusercontent.com/u/939078?v=4 + read_time: 7 +--- + +Revisit-Consensus protocol is a protocol to keep the information consistent and durable in multiple servers. + +--- + +## Introduction of consensus + +Consensus protocol is a protocol to keep the information consistent and durable in multiple servers, and the property is kept even if some servers fail. When we talk about consensus, usually protocols like classic Paxos or Raft come into our minds. They are the foundation of many later invented protocols like Multi-Paxos or Fast-Paxos. Let’s first review these two protocols to see how they work. + +First let’s take a look at Paxos, which is shown in the below graph. Paxos has two phases. The first phase is Prepare, and its main assignment is to take a Slot on the Log. The second phase is Accept, which makes sure this specific Slot has been explicitly occupied, and not taken by others between two phases. When Client receives OK response from the majority of servers, it means this particular record has been submitted and a consensus is reached. Here we can take Client and Proposer as a whole, and there are two messages delivered in the whole process and one message in each phase respectively. + +![image](/xline-home/blog/Revisit-the-Consensus-Protocol/image1.jpg) + +Then let’s move on to talk about Raft, which is also shown below. In Raft protocol a Client sends a request to the leader server, then the leader broadcast the request to all the follower servers. When the leader collects the OK response from the majority of all servers, including itself, a consensus is reached, then it tells the result to Client. There are two messages delivered during the process, one is between Client and the leader, the other is between the leader and the followers. + +![image](/xline-home/blog/Revisit-the-Consensus-Protocol/image2.webp) + +It thus can be told that the above two protocols take two RTTs to complete a request and reach a consensus. It usually does not have a big impact on performance if the protocol runs in a single data center, while the situation is totally different if we run the protocol in multiple data centers. Because the latency between the data-centers is too high, up to hundreds of milliseconds. Therefore, in multi-data center scenarios, it is critical to reduce the number of messages delivered in the process. + +Then, the next question is “Are two phases necessary?”. The answer is yes if we want to keep the following properties: + +1. Any committed request cannot be revised or lost. +2. The order of committed requests cannot be revised or lost.d +3. The order of committed requests cannot be revised or lost.d + +In terms of the protocol that has no leader, like Paxos, one-message delivery can only make sure that the majority learns the message, but the ordering is out of control. And for the protocol that has a leader (e.g., Raft), two messages are also required to duplicate the message to all the servers, as one message can only make sure the leader learns the request. In other words, one-message delivery can only make the leader decide the execution sequence (the 2nd property),but cannot guarantee the committed request will not be lost, since only the leader is entitled to acquire this particular request. + +Then how do we come up with a way to reduce one number of message delivery? The answer is to compromise the second property, which is to abandon the “globally unique execution order” and change it to “guarantee a globally unique execution order for conflicting requests, and irrelevant requests can be executed out of order”. The CURP protocol introduces this idea and partially gives up the second property. Let’s see how CURP works in the next section. + +## CURP protocol + +We won’t discuss all the details of the CURP protocol for it’s too complicated, so only the critical parts will be covered. Here’s the process diagram of the CURP protocol: + +![image](/xline-home/blog/Revisit-the-Consensus-Protocol/image3.webp) + +To start with, let’s describe the main procedures briefly below: + +1. The Client sends a request to all the CURP servers including the master (leader). +2. Every server maintains a waiting pool, which is the blue part in the above graph. The requests in the waiting pool maybe haven’t reached a consensus yet. +3. Once a server receives a request from the Client, it checks if the request conflicts with the requests in the waiting pool. +4. If there’s a conflict, the server rejects the Client request. +5. Otherwise, it accepts the request and let the Client knows. +6. If the Client received no less than (f + (f + 1)/ 2 + 1) Accept replies, including the reply from the master, it knows the request has been committed. Otherwise, Client waits for the master server to duplicate the request to the follower servers. Once the duplication process completes, the request is removed from the waiting pool and the master server tells the Client that the request has been committed. + +It’s not easy to understand the protocol if we only list the above four steps. Let me put it in a question-and-answer format for further explanations. + +**Q1: Why can the Client make sure a request is committed when no less than (f + (f + 1)/ 2 + 1) Accept responses including the reply from the master are received?** + +A1: Because the waiting pool is exclusive as conflict requests won’t be in the same pool at the same time, once a request is accepted by the majority, the other conflict request won’t get the majority vote until the previous one is removed. Even if there’s f server failures, we can easily recover the request from the remaining (f + 1)/ 2 + 1 servers, which are also the majority of the remaining servers. So as a result CURP protocol keeps the committed request and the ordering of the conflicting requests. + +**Q2: The number (f + (f + 1)/ 2 + 1) is strange, why not f + 1?** + +A2: The reason is the recovery procedure requires the number. In the worst case, there are at most f failures, we must find out the committed requests in the waiting pool according to the remaining informed (f + 1)/ 2 + 1 servers, which are the majority of all remaining servers. + +The consensus protocol allows at most f server failures, so the remaining server is f+1. In the worst case, all failed servers contain that request, then the remaining f+1 still have at least (f+1\\_)/2+1 servers containing that particular request, accounting for the vast majority and is convenient for the recovery process to restore the request and prevent any losses. + +**Q3: Do all the requests reach the consensus after one message delivery?** + +A3: It is not guaranteed. If there’s no conflicting request, one message is enough to reach the consensus. Otherwise, in terms of conflicting requests, the Client must wait for the master (leader) server to complete synchronization, which takes another message delivery. Then the Client can confirm that the request is committed. In this case, two messages are delivered, similar to Raft. Therefore, 1RTT for the best case and 2RTT for the worst case. + +**Q4: How does the master duplicate the message to the follower servers?** + +A4: The same as Raft. + +**Q5: What is the recovery process for the CURP protocol?** + +A5: First, the recovery process needs to elect a new master (leader), which is the same as Raft. Then the process can be roughly divided into two modules. For the synchronized request, the recovery process is consistent with the Raft protocol. For the requests that have not been synchronized yet, they need to be collected from all servers. When f+1 servers (including the new leader itself) are collected information, keep the requests that appear at least (f+1)/2+1 times, because these requests may have been committed, thus cannot be lost. + +## Summary + +We find that the CURP protocol is very similar to the Raft protocol except for the waiting pool. The pool is used to keep the ordering of the conflicting requests, making sure there’s at most one request committed among all the conflicts. In other words, all requests need to wait for the synchronization of the master at the time when the pool is sorting conflicting requests. The waiting pool is the root reason for the outperforming result. + +To sum up, under optimal condition, the CURP takes one round of message delivery to reach consensus. In the worst case, it takes two rounds of message delivery to achieve consensus, just as the Raft protocol. + +For more details about the CURP protocol, please refer here to the original paper. + +Xline, an open source project by DatenLord, is a geo-distributed KV store for metadata management, which is based on the CURP protocol. + +GitHub Links: https://github.com/datenlord/Xline +`,D5=`--- + + cover: /xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/cover.png + author: + name: Ye Tian + url: https://github.com/datenlord + img_url: /xline-home/DatenLord.png + read_time: 13 + +--- + +Thinking About-The purpose of this article is concerning how to think about computer systems and algorithms from a mathematics perspective. + +--- + +The purpose of this article is to provide readers who have not been exposed to formal methods with a new perspective on computer systems and algorithms, rather than formal methods or TLA+ tutorials. Therefore, the focus of this article is how to think about programs from a mathematical perspective, without using a lot of space to explain the syntax of TLA+. + +## How do we write correct programs? + +The goal of programming is always to write correct programs. Our programs become more complex over time, and the errors that may exist in them become more numerous. To write correct programs, we should first understand what errors may occur in our programs. + +### What errors will there be in the program? + +I will roughly divide the errors that may occur in the program into two categories: simple errors and logical errors. + +#### Simple errors + +Simple errors include semantic errors, memory errors, etc. For these easy-to-analyze errors, we already have many mature methods and tools to avoid them, such as compilers, static analysis tools, garbage collector. Because these errors can be relatively easily found and fixed, they are not the focus of our attention. + +#### Logical errors + +Logical errors are the most difficult to find and fix in programs, such as deadlocks, race conditions, data inconsistencies. Logical errors affect the correctness, performance and reliability of the program, and are usually caused by insufficient design of the program. For these errors, we need to analyze and solve them from a higher level, rather than just from the implementation details of the code. + +We usually use some methods to avoid logical errors, such as: + +- **Optimize software architecture design** - Consider the correctness of the program in the design stage +- **Testing** - Use various testing methods to reduce the errors in the program, but it cannot guarantee the complete correctness of the program + +### Experience + +It is not hard to see that the theories above are derived from experience. Experience is accumulated in practice, and we summarize the experience to derive guiding principles, methods and steps that can help us design better programs. + +#### But can we rely only on experience? + +The more experienced people are, the more details and possibilities they can think of, and the systems they design are usually more stable. But we can't just rely on experience: + +- **Experience is limited** - Human experience is limited and unreliable +- **The behavior and state of complex systems are numerous** - A complex system has too many behaviors and states to predict +- **The requirements for correctness of a specific program are very high** - Some programs have very high requirements for correctness, such as financial systems, medical systems, which are difficult to guarantee through experience +- **Unable to verify correctness from theory** - Can only reduce the occurrence of errors as much as possible, but cannot prove the correctness of the program from theory + +Therefore, we need a more rigorous method to guarantee the correctness of the program from the design. + +### Formal methods + +If we can verify the correctness of a program from mathematical perspective, we can solve the above problems. Actually, this is the goal of formal methods. + +Formal methods are based on mathematics, by establishing mathematical models for systems to define the behavior, state, etc. of the system, and then defining the constraints of the system, such as safety, liveness, and finally proving that the model satisfies the formal specification of the system to verify the correctness of the system. For finite-state systems, model checking based on finite-state search can be used to verify the behavior of the system to verify whether the system has the expected properties. For systems with infinite state spaces, deductive verification based on logical inference is used to verify the correctness of the system using induction. + +This article uses the TLA+ language as a tool to introduce formal methods. + +## TLA+ + +Leslie Lamport, the author of TLA+, is a computer scientist who won the Turing Award in 2013 for his groundbreaking work in the field of concurrent and distributed systems. + +### What's TLA+ + +TLA+ is an high-level language for modeling programs and systems - especially concurrent and distributed programs and systems. Its core idea is that the best way to precisely describe things is to use simple mathematics. TLA+ and its tools can be used to eliminate design errors that are difficult to find and correct in code and are expensive to correct. + +TLA+ specifications are not real engineering code and cannot be used in production environments because the goal of TLA+ is to find and solve logical errors at the design stage of the system. In TLA+ we abstract programs as finite-state mathematical models, usually state machines, and then use the TLC Model Checker to exhaustively search all possible states of the program and verify its correctness. + +The following two simple examples introduce TLA+. These two examples are from [Leslie Lamport's The TLA+ Video Course](https://www.youtube.com/playlist?list=PLWAv2Etpa7AOAwkreYImYt0gIpOdWQevD). The goal of this article is to provide a new perspective on computer systems and algorithms for readers who have not been exposed to formal methods, rather than a TLA+ tutorial, so the syntax and use of TLA+ tools will not be discussed in detail. + +### Simple Example + +TLA+ allows us to use simple mathematics to abstract system models, mainly set theory and boolean logic. In the process of abstraction, we need to abandon some implementation details and only focus on the logic of the program itself. + +Here is a simple C program that we try to abstract as a TLA+ program: + +\`\`\`c +int i; +void main() { + i = someNumber(); // someNumber() returns a number between 0 and 1000 + i = i + 1; +} +\`\`\` + +#### State Abstraction + +We need to abstract this program into a series of independent **states**. Obviously, the difference between each state is only the value of \`i\`. Suppose that the default value of \`i\` is 0 after initialization, and that \`someNumber()\` returns 42 when this program is run, then the state transition relationship of this program is: + +[i : 0] -> [i : 42] -> [i : 43] + +There are three states in this, and the difference between each state is that the value of \`i\` is different. + +It seems that the abstraction is complete, but there are problems. Suppose that \`someNumber()\` returns 43 in another run, then the state transition relationship of this program is: + +[i : 0] -> [i : 43] -> [i : 44] + +This is inconsistent with the previous abstraction, because the state transition relationship of the two runs is different. This is because we have not considered the return value of \`someNumber()\`. + +The _state_ of a program refers to the time point when the program is at each stage, not the process of the program running. Therefore, each state is independent, and the transition between states is atomic. This is very different from traditional programming, which is procedural, and TLA+ is state-oriented. We only care about what state the program is currently running in, so we can introduce a new variable \`pc\` to represent which stage the program is running in, so that we can clearly represent the sub-state relationship of the program: + +\`\`\`c +int i; +void main() { + i = someNumber(); // pc = "start" + i = i + 1; // pc = "middle" +} // pc = "done" +\`\`\` + +In this way, we no longer need to consider the value of \`i\`, but only the value of \`pc\`: + +[pc : start] -> [pc : middle] -> [pc : done] + +#### Writing States + +The initial value of \`i\` is 0, and the initial value of \`pc\` is \`start\`, so we can write the sub-state relationship as: + +![image1](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image1.png) + +In which, for the variable \`i\`, its next state is represented as \`i'\`, which is the way TLA+ defines the state transition of variables. \`i' ∈ 0..1000\` means that the value of \`i\` in the next state is a number between 0 and 1000, that is, \`someNumber()\`, \`0..1000\` represents the set \`{0,1,...,1000}\`. \`∧\` is the logical and in Boolean logic, which can be understood as "and". Finally, the program runs to completion and there is no next state, so it is represented as \`FALSE\`. + +In TLA+ , we write a state. Therefore, it is not "because \`pc = start\` so \`i' ∈ 0..1000\`", in fact, the relationship between the two is parallel: **In this state, the value of \`pc\` is \`start\` and the value of \`i\` in the next state \`∈ 0..1000\`**. With this idea, we can rewrite the above abstraction as: + +![image2](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image2.png) + +In which, the "or" is used to connect two states, which can be represented by the logical or \`∨\` in Boolean logic. In this way, we can clearly represent the state transition relationship of the program. For the sake of beauty, the same Boolean logic symbol can also be supplemented before the first sentence in TLA+ : + +![image3](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image3.png) + +We finally get the two states after the initial state of this simple program, and then we will complete the initial state and supplement the entire specification according to the requirements of the TLA+ language: + +![image4](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image4.png) + +- \`EXTENDS\` is used to introduce modules defined in other specifications, which is mainly used in \`i' ∈ 0..1000\` here. +- \`VARIABLES\` is used to define variables, which are defined as \`i\` and \`pc\` here. +- \`Init\` is used to define the initial state, which is defined as \`i = 0\` and \`pc = "start"\` here. +- \`Next\` is used to define the state transition relationship. + +Now we have a complete TLA+ specification. Later, we can use the TLC Model Checker to check the model, but this is not within the scope of this article. + +For simple systems, modeling with TLA+ cannot bring many benefits. Generally speaking, TLA+ is only used when designing very complex, very critical, and very experience-based systems. Concurrency and distributed systems are usually the fields where TLA+ is used. Let's take a look at an example of a distributed system algorithm: Two-Phase Commit. + +### Two-Phase Commit + +> In transaction processing, databases, and computer networking, the two-phase commit protocol (2PC) is a type of atomic commitment protocol (ACP). It is a distributed algorithm that coordinates all the processes that participate in a distributed atomic transaction on whether to commit or abort (roll back) the transaction. This protocol (a specialised type of consensus protocol) achieves its goal even in many cases of temporary system failure (involving either process, network node, communication, etc. failures), and is thus widely used. —— [Two-phase commit protocol (Wikipedia)](https://en.wikipedia.org/wiki/Two-phase_commit_protocol) + +Lamport explains Two-Phase Commit in the following analogy in [Leslie Lamport's The TLA+ Video Course](https://www.youtube.com/playlist?list=PLWAv2Etpa7AOAwkreYImYt0gIpOdWQevD): + +![image5](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image5.png) + +In a wedding, the minister is the coordinator, the groom and the bride are the participants. When the groom and the bride both agree to the marriage, the minister will officially announce the marriage. If one of them does not agree, the minister will abort the marriage: + +1. The minister asks the groom: Do you agree to this marriage? +2. The groom answers: I agree (prepared). +3. The minister asks the bride: Do you agree to this marriage? +4. The bride answers: I agree (prepared). +5. The minister announces: The marriage is officially established (committed). + +If one of them does not agree, the minister will abort the marriage. + +In a database, the Transaction Manager is the coordinator (the minister). When the Transaction Manager asks all the participants Resource Managers (the groom / bride), if all the Resource Managers agree to commit the transaction, the Transaction Manager will commit the transaction. If one of them does not agree, the Transaction Manager will abort the transaction. + +The detailed introduction and process of Two-Phase Commit can be found on [Wikipedia](https://en.wikipedia.org/wiki/Two-phase_commit_protocol). + +First, let's define some constants and variables and their initial state: + +![image6](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image6.png) + +- The constant \`RM\` is the set of all Resource Manager identifiers, for example, it can be set to the set \`{"r1", "r2", "r3"}\`. +- The variable \`rmState\` is used to record the state of each Resource Manager, and \`rmState[r]\` is used to represent the state of \`r\`, which has four states: \`working\`, \`prepared\`, \`committed\`, \`aborted\`. The initial state of each \`RM\` is \`working\`. +- The variable \`tmState\` is used to record the state of the Transaction Manager, which has three states: \`init\`, \`committed\`, \`aborted\`. The initial state is \`init\`. +- The variable \`tmPrepared\` is used to record the Resource Manager that is ready (in the \`prepared\` state). The initial value is an empty set. +- The variable \`msgs\` is used as a message pool to record all messages that are being transmitted. The initial value is an empty set. + +Next, let's define the actions that the system may perform. + +![image7](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image7.png) + +- In TLA+, expressions similar to the "function" concept in other programming languages can be defined in the above way, so there is no need to define an expression for each Resource Manager. +- \`[type → "prepare", rm → r]\` is a record in TLA+, similar to a struct in other programming languages. +- \`UNCHANGED ⟨rmState, tmState, msgs⟩\` means that this action will not change the values of the variables \`rmState\`, \`tmState\`, \`msgs\`. In TLA+, it is necessary to explicitly declare whether the value of each variable changes or not. + +When the state of \`TM\` is \`init\`, and there is a \`Prepared\` message from \`r\` in the message pool, the value of \`tmPrepared\` in the next state will be the union of \`tmPrepared\` and \`{r}\`. + +![image8](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image8.png) + +The above two actions are Transaction Manager performing Commit and Abort. + +![image9](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image9.png) + +The above 4 Resource Manager actions are Resource Manager choosing Prepare and Abort, and handling the Commit and Abort decided by the Transaction Manager. + +The syntax \`rmState' = [rmState except ![r] = "prepared"]\` means "in the next state, the value of \`rmState[r]\` is changed to \`prepared\`, and the other parts remain unchanged". + +If we use a form like \`rmState[r]' = "prepared"\`, we have not explicitly stated the values of the other parts of \`rmState\` in the next state, so it is incorrect. + +TLA+ is different from the programs we usually write, it is mathematics. In programming, we use arrays, and in TLA+, we use functions to express similar concepts, and the set of array indices is the domain of the function. + +After writing all the actions that the system may exist, we can start to deduce the state transition of the system: + +![image10](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image10.png) + +We use the existential quantifier \`∃r ∈ RM\` to represent "for any element \`r\` in the set \`RM\`, there is such an action". The state transition in TLA+ is atomic, so in a state, only one \`r\` will be selected in this "or" branch, which can be compared to the \`for r in RM\` in the programming language, but fundamentally different. + +At this point, the modeling of the system is complete. Now we need to write the system's constraint conditions: + +![image11](/xline-home/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image11.png) + +In the constraint condition \`TypeOK\`, we have limited the possible values of each variable. The \`[RM → {"working", "prepared", "committed", "aborted"}]\` is similar to the Cartesian product of the set \`RM\` and the set \`{"working", "prepared", "committed", "aborted"}\`, but the result is a set composed of records: + +\`\`\`rust +{ + [r1 |-> "working", r2 |-> "working"], + [r1 |-> "working", r2 |-> "prepared"], + [r1 |-> "working", r2 |-> "committed"], + ... + [r1 |-> "aborted", r2 |-> "committed"], + [r1 |-> "aborted", r2 |-> "aborted"] +} +\`\`\` + +In \`TypeOK\`, we use the set \`Messages\` defined above. When defining \`Messages\`, we used the syntax: \`[type: {"Prepared"}, rm: RM]\`. This syntax is also similar to the Cartesian product of \`{"Prepared"}\` and \`RM\`, but the result is also a record set: + +\`\`\`rust +{ + [type |-> "Prepared", rm |-> r1], + [type |-> "Prepared", rm |-> r2], + ... +} +\`\`\` + +The final constraint condition \`Consistent\` is used to ensure the consistency of the system: at any time, it is impossible for two Resource Managers to be in the \`committed\` and \`abort\` state respectively. + +Finally, we will give the constraint conditions as invariants, together with the system model, to the TLC Model Checker for verification, and we can prove the correctness of the system. + +## Summary + +From the above two examples, we have a preliminary understanding of the idea of formal methods. TLA+ is designed for verifying distributed systems, but its ideas can be applied to fields far beyond distributed systems. When writing programs, if we can not only consider the contents on the code level, but also think from a higher level, from a mathematical point of view, we can write more robust programs. + +If you are interested in TLA+, you can refer to [Leslie Lamport's The TLA+ Video Course - YouTube](https://youtube.com/playlist?list=PLWAv2Etpa7AOAwkreYImYt0gIpOdWQevD) and [Learn TLA+](https://learntla.com). +`,L5=`--- + + cover: /xline-home/blog/How-to-elegantly-organize-async-Rust-code/cover.png + author: + name: Tianyu Chen + url: https://github.com/datenlord + img_url: /xline-home/DatenLord.png + read_time: 5 + +--- + +Elegant-The article starts from my experience of writing async Rust code and concludes with my practice of applying the principles in a recent refractoring of Curp. + +--- + +## Summary + +Anyone who has worked with async Rust has likely struggled with the bounds it requires, e.g., the \`'static\` bound on spawned tasks, \`MutexGuard\` can not be held across \`.await\` point. Overcoming these constraints requires carefully structured scopes, which might result in opaque and nested code that is challenging for both the developer to write and for reviewers to read. In this talk, I will first list some pain points from my experience of writing async Rust code. Then, I will point out scenarios where we actually need async code and argue why we should separate async and non-async code. Finally, I will demonstrate how I've practiced this principle in a recent refactoring of Curp. + +## Pain Point + +### Spawned Task must be \`'static\` + +The compiler has no idea how long an asynchronous task will run for when we create it; it may be ephemeral or it may continue to run until the program terminates. For this reason, the compiler requires all types owned by the tasks to be \`'static\`. +Such a limitation often leads to a lot of cloning before spawning a task. Admittedly, these codes help programmers to better understand which variables' ownership should be transferred to the new task. Unfortunately, the code will look tedious. + +\`\`\`rust +let a_arc = Arc::clone(&a); +let b_arc = Arc::clone(&b); +tokio::spawn(async move { + // ... +}); +\`\`\` + +### \`Non-Send\` variables cannot be held across \`.await\` point + +The Tokio runtime can move a task between threads at every \`.await\`. That's why all variables that are held across\` .await\` must be sent, bringing a lot of trouble when writing async functions. + +For example, the following code does not compile because \`log_l\`, a non-\`Send\` \`MutexGuard\`, can not be held across the \`.await\` point. + +\`\`\`rust +let mut log_l = log.lock(); +log_l.append(new_entry.clone()); +broadcast(new_entry).await; +\`\`\` + +As the broadcast could take a while, we don't want the \`MutexGuard\` to be held across the.await point either. The compiler does a great job at pointing up places for possible performance improvement. + +To avoid this, we naturally add a line to drop the lock just before broadcasting. + +\`\`\`rust +let mut log_l = log.lock(); +log_l.append(new_entry.clone()); +drop(log_l); +broadcast(new_entry).await; +\`\`\` + +Sadly, it still won't compile. The explanation here is from \`tokio\` official website: + +> The compiler currently calculates whether a future is \`Send\` based on scope information only. The compiler will hopefully be updated to support explicitly dropping it in the future, but for now, you must explicitly use a scope. + +To get around, we must wrap our code in an redundant scope. The code is not elegant anymore🙁. + +\`\`\`rust +{ + let mut log_w = log.write(); + log_w.append(new_entry.clone()); +} +broadcast(new_entry).await; +\`\`\` + +More nested scope will be created if multiple locks must be acquired by an async function. When this happens, the code becomes unreadable and unmaintainable. + +> Side Note: You might be wondering why we don't make use of the async lock(\`tokio::sync::Mutex\`) tokio offers. It can be held across the \`.await\` point and will save us a lot of trouble. That's because it has relatively limited use cases in practice. Normally, we don't want critical sections to be too long. For example, we don't want to hold the lock when we are broadcasting the new entry. Therefore, be careful about async mutex, you don't want to accidentally use it. + +## Async scenarios + +The previously mentioned problems are, in my opinion, caused by a lack of clarity in the separation between async and non-async code. In other words, we may fail to separate the async part and non-async part when designing our application's architecture. So, I will sort out the scenarios where we can actually take advantage of async Rust. + +### I/O + +You don't want I/O to block the current thread since I/O can take a long time. Async I/O helps us to hand out control flow to other tasks when we are waiting for I/O resources. + +\`\`\`rust +// .await will enable other scheduled tasks to progress +let mut file = File::create("foo.txt").await?; + +file.write(b"some bytes").await?; +\`\`\` + +### Background tasks + +You want to spawn a background task in order to handle things in the background(usually paired with the receive end of an async channel). + +\`\`\`rust +tokio::spawn(async move { + while let Some(job) = rx.recv().await { + // ... + } +}; +\`\`\` + +### Concurrent tasks + +You want to spawn multiple tasks to utilize multicore. + +\`\`\`rust +let chunks = data.chunks(data.len() / N_TASKS); +for chunk in chunks { + tokio::spawn(work_on(chunk)); +} +\`\`\` + +### Wait for others + +You want to pause the current thread and wait for some other events. + +\`\`\`rust +// wait for some event +event.listen().await; + +// barrier +barrier.wait().await; +\`\`\` + +As can be seen, async code usually resides in limited places: I/O, concurrent, and background tasks. Therefore, when we are designing our code, we can consciously identify async functions and try to minimize them. Separating these two parts can not only alleviate the pain points mentioned at the beginning of the article, but also help us to clarify the code structure. + +\`\`\`rust +// before +{ + let mut log_w = log.write(); + log_w.append(new_entry.clone()); + // ... +} +broadcast(new_entry).await; + +// after: move the logic to another function instead + +fn update_log(log: &mut Log, new_entry: Entry) { + log.append(new_entry); + // ... +} + +update_log(&mut log.write(), new_entry.clone()); +broadcast(new_entry).await; +\`\`\` + +## Regarding a recent major refactor of curp + +Before refactoring, due to multiple iterations, the readability and structure of the code became increasingly poor. Specifically, we had several lock structures that needed to be shared among various parts of the Curp server, and most functions of Curp server were async. The async and locking code were mixed together, frequently leading to the aforementioned pain points during development. + +Therefore, we reorganized the structure of Curp server, dividing it into an async part called CurpNode and a non-async part called Rawcurp: + +- CurpNode includes only async code + - I/O tasks: receiving, sending network requests, persisting log entries + - Background tasks: periodically checking leader activity, copying and aligning data on each node +- Rawcurp can be considered as a state machine that receives calls from CurpNode and updates the state. It includes only non-async code. If RawCurp wants to perform some async operations (such as broadcasting heartbeat), it can use return values and channels to let CurpNode make requests on its behalf. + +![image1](/xline-home/blog/How-to-elegantly-organize-async-Rust-code/image1.png) + +Take our tick function as an example. Before refactoring, due to the limitation that LockGuard cannot pass the await point and the restriction of multiple logical branches, we had to organize the code in this way: + +\`\`\`rust + loop { + let _now = ticker.tick().await; + let task = { + let state_c = Arc::clone(&state); + let state_r = state.upgradable_read(); + if state_r.is_leader() { + if state_r.needs_hb + { + let resps = bcast_heartbeats(connects.clone(), state_r, rpc_timeout); + Either::Left(handle_heartbeat_responses( + resps, + state_c, + Arc::clone(&timeout), + )) + } else { + continue; + } + } else { + let mut state_w = RwLockUgradableReadGuard::upgrade(state_r); + // ... + let resps = bcast_votes(connects.clone(), state_r, rpc_timeout); + Either::Right(handle_vote_responses(resps, state_c)) + } + }; + task.await; + } +\`\`\` + +After the refactoring, the code is significantly more understandable because all of the non-async functionality has been transferred to \`RawCurp\`. + +\`\`\`rust +loop { + let _now = ticker.tick().await; + let action = raw_curp.tick(); + match action { + TickAction::Heartbeat(hbs) => { + Self::bcast_heartbeats(Arc::clone(&raw_curp), &connects, hbs).await; + } + TickAction::Votes(votes) => { + Self::bcast_votes(Arc::clone(&raw_curp), &connects, votes).await; + } + TickAction::Nothing => {} + } +} +\`\`\` +`,P5=`--- + cover: /xline-home/blog/Database-Isolation-Levels-and-MVCC/cover.png + author: + name: Jicheng Shi + url: https://github.com/rogercloud + img_url: https://avatars.githubusercontent.com/u/939078?v=4 + read_time: 5 +--- + +When processing multiple transactions at the same time, the database needs to decide whether the transactions can see each other's changes, how much they can see, etc. + +--- + +## Introduction to database isolation levels + +When processing multiple transactions at the same time, the database needs to decide whether the transactions can see each other's changes, how much they can see, etc. According to the strict level of isolation, they can be classified from strict to loose as Serializable, Repeatable reads, Read committed, Read uncommitted. We use the following example of KV storage to explain these four isolation levels. The initial situations of the KV storage are as follows: + +![image1](/xline-home/blog/Database-Isolation-Levels-and-MVCC/image1.png) + +### Read uncommitted + +When two transactions are being executed at the same time, top-down is the order of execution. + +![image2](/xline-home/blog/Database-Isolation-Levels-and-MVCC/image2.png) + +Under the isolation level of Read uncommitted, multiple transactions executing at the same time are able to see each other not committing the writing operations, which can be considered almost useless. +In the above example, Operation 2 reads "AA" and even though the second transaction eventually Rollback, Operation 4 still reads "DD". When two transactions are being executed simultaneously in the Read committed, they follow top-down order. + +![image3](/xline-home/blog/Database-Isolation-Levels-and-MVCC/image3.png) + +Under the isolation level of Read committed, only the result after Commit can be seen. So in the execution order of Table 2, both Operation 2 and 4 can read the value of "AA", that is, the value of Key 1 is not changed. If two transactions are executed as in Table 3, Operation 2 will read "AA" and Operation 5 will read "DD", because Transaction 2 has been executed successfully at the time. + +### Repeatable read + +If Transaction 1 in Table 3 has two consecutive read operations while the user wants to guarantee that the same value is read, then the repeatable read isolation level should be used. Under this isolation level, multiple reads of the same data in the same transaction are guaranteed to yield the same value, even if the data is modified by other committed transactions in the process. Of course, there are cases where isolation is not guaranteed in this isolation level, which is shown as follows: + +![image4](/xline-home/blog/Database-Isolation-Levels-and-MVCC/image4.png) + +Under the isolation level of repeatable read, Operation 2 returns ["CC"] as result, which means only the value of Key 3 is returned, while that of Operation 5 is [“CC", "DD"]. To summarize, the isolation level of repeatable read still cannot perfectly handle situations involving multiple pieces of data, especially when new data is inserted or deleted. + +### Serializable + +The strictest isolation level is called Serializable, which is also the most perspicuously defined. The execution result under this level is "as if" all transactions were serialized and executed one by one. + +It is worth emphasizing the word "as if" in the above sentence. To improve performance, few databases use serial execution on the real meaning of physical to ensure Serializable, but only to achieve a similar effect, which can be achieved in a variety of ways. There is a subcategory under the Serializable level called Snapshot, which is similar to Serializable but slightly less constrained. It is because of the relaxation of constraints that gives a better-performed implementation and makes it the default supported isolation level by most databases. + +Let's talk about Snapshot, and by extension, the MVCC implementation. + +## Snapshot isolation level and MVCC + +To distinguish between the strictest Serializable and Snapshot, let's look at the following two transactions as examples. + +![image5](/xline-home/blog/Database-Isolation-Levels-and-MVCC/image5.png) + +If strictly following the Serializable isolation level, regardless of either Transaction 1 or 2 is executed first, the ultimate value of Key 1 and 2 is the same, either "AA" or "BB". + +However, when executed under the Snapshot level, the result is that the values of Key 1 and 2 are swapped. + +The isolation power of Snapshot is obviously weaker in this case. Isolation seems helpless in dealing with the order of transactions with read-write intersections, while only ensuring the order of transactions with write conflicts. + +While the above example looks specifically at the differences between the Snapshot isolation level and Serializable, we have not yet fully described the characteristics of Snapshot: + +- Transactions in Snapshot have two important timestamps, a read timestamp R and a write timestamp W. All read operations after R can only read the data committed before R. +- Snapshot allows two transactions that do not have a write intersection to execute simultaneously and in parallel. + +In order to satisfy both of these features, it is natural to think of saving multiple versions for each data, so that when a write operation is committed, the new data is saved in the new version while the old one is not covered, which is what we call MVCC (Multiversion concurrency control). + +We know that there is no conflict between read operations, and write operations cannot be executed simultaneously under the Snapshot level (or Roll back if a conflict is found), so MVCC works mainly when there is a conflict between read and write operations, allowing two seemingly conflicting transactions to execute concurrently. + +MVCC also requires garbage collection, otherwise too much old version data will take up unnecessary storage space. The next question is, how do you determine whether a version of data can be deleted? The answer is that it can be deleted when all read operations involved in such version of data are completed, provided that there is a newer version of data ahead. + +## Some little thoughts + +In the process of introducing MVCC we can easily capture the following key points: +1.Multiple versions. +2.Garbage handling. +3.Improving the efficiency of concurrent operations. + +In a previous article by DatenLord titled "Memory Management for Rust Language Lock-Free Data Structures", we introduced another technology related to these keywords, which is the "epoch-based memory management" (epoch) method for lock-free data structures. Epoch maintains the memory state of two generations, and when the memory of the oldest generation is no longer accessible, then the corresponding memory will be reclaimed and released, and a new generation will be opened. The purpose of doing this is also to allow the operation of modifying the data of the new generation and the operation of reading the data of the old generation to be parallelized, also to achieve read-write concurrency optimization. Of course, in addition to these similarities, there are also differences in that MVCC can simultaneously exist in many versions, while epoch always exists in two versions. This can be interpreted as epoch's memory management being more granular, so when contention is heavy epoch can sometimes cause an increase in memory pressure. + +In general, MVCC and epoch are similar in the central idea of using multi-version memory control technology to solve the problem of concurrent read/write conflicts. + +## Summary + +In this paper, we introduced the four isolation levels of the database and the differences between the different isolation levels with examples. + +Later, we dug into details about Snapshot, a most widely used insolation level and its most frequently used implementing method MVCC. +Finally, compared and discussed the memory management mechanisms of MVCC and lock-free data structures. + +DatenLord project Xline focuses on cross-cloud metadata management KV storage and is currently using MVCC for database isolation in practice. If you want to learn more about it, please refer to the Xline GitHub link: [https://github.com/datenlord/Xline](https://github.com/datenlord/Xline) +`,z5=`--- + cover: /xline-home/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/cover.png + author: + name: Jiawei Zhao + url: https://github.com/Phoenix500526 + img_url: https://avatars.githubusercontent.com/u/9337239?v=4 + read_time: 20 +--- + +In the early prototype phase of Xline, we used in-memory storage for data persistence. While this simplified the complexity of the Xline prototype design and speeded up the development and iteration of the project, it also had significant consequences: since the data was stored in memory, the recovery of node data after a process crash relied on pulling the full data from other healthy nodes, resulting in longer recovery times. + +--- + +## Introduction + +In the early prototype phase of Xline, we used in-memory storage for data persistence. While this simplified the complexity of the Xline prototype design and speeded up the development and iteration of the project, it also had significant consequences: since the data was stored in memory, the recovery of node data after a process crash relied on pulling the full data from other healthy nodes, resulting in longer recovery times. + +With this consideration in mind, Xline introduced a Persistent Storage Layer in its latest release v0.3.0 to persist data to disk and shield upper-layer callers from irrelevant low-level details. + +## Selection of Storage Engines + +Currently, mainstream storage engines in the industry can be broadly categorized into B+ Tree-based storage engines and LSM Tree-based storage engines. Each has its own advantages and disadvantages. + +### Analysis of B+ Tree Read and Write Amplification + +When reading data from B+ Tree, we need to first search along the root node, and then move down the index until we finally reach the bottom leaf node. Each access corresponds to one disk IO. Similarly, when writing data, the search starts from the root node and goes down to the appropriate leaf node for data insertion. + +To facilitate the analysis, let's make the following assumption: the block size of the B+ Tree is denoted as B, so each internal node contains O(B) child nodes, and each leaf node contains O(B) data entries. Assuming the size of the dataset is N, the height of the B+ Tree is approximately $$O(\\log_B(\\frac{N}{B}))$$ + +Write Amplification: Each insert operation in the B+ Tree writes data to a leaf node, regardless of the actual size of the data. This means that each insert operation requires writing a block of size B, resulting in a write amplification of O(B). + +Read Amplification: A single query in the B+ Tree requires traversing from the root node to a specific leaf node, resulting in a number of I/O operations equal to the height of the tree, which is approximately O(log_B(N/B)). Thus, the read amplification is O(log_B(N/B)). + +### LSM Tree Read and Write Amplification Analysis + +In LSM Tree, when data is written, it is first written to an in-memory file called the memtable (Level 0) in an append-only manner. When the memtable reaches a certain size, it is converted into an immutable memtable and merged into the next level. For data retrieval, the search starts in the memtable, and if the search fails, it proceeds to search in lower levels until the element is found. LSM Tree often utilizes Bloom Filters to optimize read operations by filtering out elements that do not exist in the database. + +Assuming the dataset size is N, the amplification factor is k, and the minimum file size in each level is B, with each level having the same file size as B but a different number of files. + +Write Amplification: Assuming we write a record, it will be compacted to the next level after being written k times in the current level. Therefore, the average write amplification per level is $$\\frac{\\sum_{i=1}^{k} k_i}{k} = \\frac{k+1}{2} $$. There are $$\\log_k(\\frac{N}{B} ) $$ levels in total, so the write amplification is $$O(k\\log_k(\\frac{N}{B}))$$. + +Read Amplification: In the worst-case scenario, data is compacted to the last level, and a binary search is required at each level until the data is found at the last level. +For the highest level, $$level_i$$, with data size O(N), a binary search requires $$O(\\log \\frac{N}{B}) $$ disk read operations. +For the next level, $$level_{i-1}$$, with data size $$O(\\frac{N}{k})$$, a binary search requires $$O(\\log \\frac{N}{kB}) $$ disk read operations. +For $$level_{i-2}$$, with data size $$O(\\frac{N}{k^2})$$, a binary search requires $$O(\\log \\frac{N}{k^2B})$$ disk read operations. +..... +Continuing this pattern, the final read amplification can be calculated as R = $$\\sum_{i=0}^{n}(\\log(\\frac{N}{k^iB} )) = O(\\frac{\\log^2\\frac{N}{B}}{log_k}) $$ + +### Summary + +![image](/xline-home/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image1.PNG) + +From the analysis of read and write amplification, it can be concluded that B+ Tree-based storage engines are more suitable for scenarios with more reads and fewer writes, while LSM Tree-based storage engines are more suitable for scenarios with more writes and fewer reads. + +As an open-source distributed KV storage software written in Rust, Xline needs to consider the following factors when selecting a persistent storage engine: + +1. In terms of Performance: Storage engines often become one of the performance bottlenecks in a system, so it is necessary to choose a high-performance storage engine. High-performance storage engines are typically implemented in high-performance languages, preferably with asynchronous implementations. Rust language is the first choice, followed by C/C++. + +2. From a development perspective: Prioritize the implementation in Rust language to reduce additional development work at the current stage. + +3. From a maintenance perspective: + +- Consider the supporters behind the engine, with priority given to large commercial companies and open-source communities. +- It should be widely used in the industry to facilitate learning from experiences in debugging and tuning processes. +- It should have high visibility and popularity (GitHub stars) to attract excellent contributors. + +4. From a functional perspective: The storage engine should provide transactional semantics, support basic KV operations, and batch processing operations. + +The priority order of requirements is: Functionality > Maintenance > =Performance > Development. + +We conducted research on several open-source embedded databases, including Sled, ForestDB, RocksDB, Bbolt, and Badger. Among them, only RocksDB fulfilled all four requirements mentioned earlier. RocksDB, implemented and open-sourced by Facebook, has been widely adopted in the industry with good production practices. It also maintains a stable release cycle and perfectly covers our functional requirements. + +Xline primarily serves the consistency metadata management across cloud data centers, where the workload is predominantly read-intensive with fewer writes. Some readers may wonder why we chose RocksDB even though it is an LSM Tree-based storage engine, which is more suitable for write-intensive, read-light scenarios. + +Indeed, in theory, the most suitable storage engine should be based on B+ Trees. However, considering that B+ Tree-based embedded databases like Sled and ForestDB lack extensive production practices and their version maintenance has stalled, we made a trade-off and selected RocksDB as the storage backend for Xline. Additionally, we designed the Persistent Storage Layer with good interface separation and encapsulation to minimize the cost of changing the storage engine in the future, considering the possibility of more suitable storage engines becoming available. + +## Design and Implementation of the Persistent Storage Layer + +Before discussing the design and implementation of the persistent storage layer, it is important to clarify our expectations and requirements for persistent storage: + +1. As mentioned earlier, after considering the trade-offs, we have chosen RocksDB as the backend storage engine for Xline. However, we cannot rule out the possibility of replacing this storage engine in the future. Therefore, the design of the StorageEngine should adhere to the Open-Closed Principle (OCP) and support configurability and easy replacement. +2. We need to provide a basic key-value (KV) interface for the upper-layer users. +3. A comprehensive recovery mechanism needs to be implemented. + +### Overall Architecture and Write Flow + +Let's first take a look at the current overall architecture of Xline, as shown in the following diagram: +![image](/xline-home/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image2.png) +From top to bottom, the overall architecture of Xline can be divided into the access layer, consensus module, business logic module, storage API layer, and storage engine layer. The storage API layer is responsible for providing business-related StorageApi to both the business module and the consensus module, while abstracting the implementation details of the underlying storage engine. The storage engine layer is responsible for the actual data persistence operations. +Let's take a PUT request as an example to understand the data writing process. When a client initiates a PUT request to the Xline Server, the following events occur: + +1. The KvServer receives the PutRequest from the client and performs validity checks. Once the request passes the checks, it sends a propose RPC request to the Curp Server using its own CurpClient. +2. Upon receiving the Propose request, the Curp Server first enters the fast path flow. It stores the command from the request in the Speculative Executed Pool (aka. spec_pool) to determine if it conflicts with any existing commands in the pool. If there is a conflict, it returns ProposeError::KeyConflict and waits for the slow path to complete. Otherwise, it continues with the current fast path. +3. In the fast path, if a command is neither conflicting nor duplicated, it notifies the background cmd_worker for execution through a specific channel. Once the cmd_worker starts executing the command, it stores the corresponding command in the CommandBoard to track the execution progress. +4. When consensus is reached among multiple nodes in the cluster, the state machine log is committed and persisted in the CurpStore. Finally, the log is applied, triggering the corresponding CommandExecutor in the business module. Each server's store module is responsible for persisting the actual data to the backend database using the DB interface during the apply process. + +### Interface Design + +The following diagram illustrates the relationships between the StorageApi and StorageEngine traits, as well as their corresponding data structures. + +![image](/xline-home/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image3.png) + +#### Storage Engine Layer + +The Storage Engine Layer primarily defines the StorageEngine trait and related errors. +Definition of StorageEngine Trait (engine/src/engine_api.rs): + +\`\`\`rust +/// Write operation +#[non_exhaustive] +#[derive(Debug)] +pub enum WriteOperation<'a> { + /// \`Put\` operation + Put { table: &'a str, key: Vec, value: Vec }, + /// \`Delete\` operation + Delete { table: &'a str, key: &'a [u8] }, + /// Delete range operation, it will remove the database entries in the range [from, to) + DeleteRange { table: &'a str, from: &'a [u8], to: &'a [u8] }, +} + +/// The \`StorageEngine\` trait +pub trait StorageEngine: Send + Sync + 'static + std::fmt::Debug { + /// Get the value associated with a key value and the given table + /// + /// # Errors + /// Return \`EngineError::TableNotFound\` if the given table does not exist + /// Return \`EngineError\` if met some errors + fn get(&self, table: &str, key: impl AsRef<[u8]>) -> Result>, EngineError>; + + /// Get the values associated with the given keys + /// + /// # Errors + /// Return \`EngineError::TableNotFound\` if the given table does not exist + /// Return \`EngineError\` if met some errors + fn get_multi( + &self, + table: &str, + keys: &[impl AsRef<[u8]>], + ) -> Result>>, EngineError>; + + /// Get all the values of the given table + /// # Errors + /// Return \`EngineError::TableNotFound\` if the given table does not exist + /// Return \`EngineError\` if met some errors + #[allow(clippy::type_complexity)] // it's clear that (Vec, Vec) is a key-value pair + fn get_all(&self, table: &str) -> Result, Vec)>, EngineError>; + + /// Commit a batch of write operations + /// If sync is true, the write will be flushed from the operating system + /// buffer cache before the write is considered complete. If this + /// flag is true, writes will be slower. + /// + /// # Errors + /// Return \`EngineError::TableNotFound\` if the given table does not exist + /// Return \`EngineError\` if met some errors + fn write_batch(&self, wr_ops: Vec>, sync: bool) -> Result<(), EngineError>; +} +\`\`\` + +Related Error Definitions + +\`\`\`rust +#[non_exhaustive] +#[derive(Error, Debug)] +pub enum EngineError { + /// Met I/O Error during persisting data + #[error("I/O Error: {0}")] + IoError(#[from] std::io::Error), + /// Table Not Found + #[error("Table {0} Not Found")] + TableNotFound(String), + /// DB File Corrupted + #[error("DB File {0} Corrupted")] + Corruption(String), + /// Invalid Argument Error + #[error("Invalid Argument: {0}")] + InvalidArgument(String), + /// The Underlying Database Error + #[error("The Underlying Database Error: {0}")] + UnderlyingError(String), +} +\`\`\` + +\`MemoryEngine\` (engine/src/memory_engine.rs) and \`RocksEngine\` (engine/src/rocksdb_engine.rs) implement the StorageEngine trait. MemoryEngine is mainly used for testing purposes, while the definition of RocksEngine is as follows: + +\`\`\`rust +/// \`RocksDB\` Storage Engine +#[derive(Debug, Clone)] +pub struct RocksEngine { + /// The inner storage engine of \`RocksDB\` + inner: Arc, +} + +/// Translate a \`RocksError\` into an \`EngineError\` +impl From for EngineError { + #[inline] + fn from(err: RocksError) -> Self { + let err = err.into_string(); + if let Some((err_kind, err_msg)) = err.split_once(':') { + match err_kind { + "Corruption" => EngineError::Corruption(err_msg.to_owned()), + "Invalid argument" => { + if let Some(table_name) = err_msg.strip_prefix(" Column family not found: ") { + EngineError::TableNotFound(table_name.to_owned()) + } else { + EngineError::InvalidArgument(err_msg.to_owned()) + } + } + "IO error" => EngineError::IoError(IoError::new(Other, err_msg)), + _ => EngineError::UnderlyingError(err_msg.to_owned()), + } + } else { + EngineError::UnderlyingError(err) + } + } +} + +impl StorageEngine for RocksEngine { + /// omit some code +} +\`\`\` + +#### StorageApi Layer + +##### Business Module + +Definition of StorageApi in the business module: + +\`\`\`rust +/// The Stable Storage Api +pub trait StorageApi: Send + Sync + 'static + std::fmt::Debug { + /// Get values by keys from storage + fn get_values(&self, table: &'static str, keys: &[K]) -> Result>>, ExecuteError> + where + K: AsRef<[u8]> + std::fmt::Debug; + + /// Get values by keys from storage + fn get_value(&self, table: &'static str, key: K) -> Result>, ExecuteError> + where + K: AsRef<[u8]> + std::fmt::Debug; + + /// Get all values of the given table from the storage + fn get_all(&self, table: &'static str) -> Result, Vec)>, ExecuteError>; + + /// Reset the storage + fn reset(&self) -> Result<(), ExecuteError>; + + /// Flush the operations to storage + fn flush_ops(&self, ops: Vec) -> Result<(), ExecuteError>; +} +\`\`\` + +In the business module, \`DB\` (xline/src/storage/db.rs) is responsible for converting StorageEngine into \`StorageApi\` for upper-level calls. Its definition is as follows: + +\`\`\`rust +/// Database to store revision to kv mapping +#[derive(Debug)] +pub struct DB { + /// internal storage of \`DB\` + engine: Arc, +} + +impl StorageApi for DB +where + S: StorageEngine +{ + /// omit some code +} +\`\`\` + +In the business module, different servers have their own Store backends, and the core data structure is the \`DB\` in the \`StorageApi\` Layer. + +##### Consensus Module + +The \`StorageApi\` definition of the Curp module is located in curp/src/server/storage/mod.rs. + +\`\`\`rust +/// Curp storage api +#[async_trait] +pub(super) trait StorageApi: Send + Sync { + /// Command + type Command: Command; + + /// Put \`voted_for\` in storage, must be flushed on disk before returning + async fn flush_voted_for(&self, term: u64, voted_for: ServerId) -> Result<(), StorageError>; + + /// Put log entries in the storage + async fn put_log_entry(&self, entry: LogEntry) -> Result<(), StorageError>; + + /// Recover from persisted storage + /// Return \`voted_for\` and all log entries + async fn recover( + &self, + ) -> Result<(Option<(u64, ServerId)>, Vec>), StorageError>; +} +\`\`\` + +\`RocksDBStorage\` (curp/src/server/storage/rocksdb.rs) is the CurpStore mentioned in the previous architectural diagram. It is responsible for converting \`StorageApi\` into underlying \`RocksEngine\` operations. + +\`\`\`rust +/// \`RocksDB\` storage implementation +pub(in crate::server) struct RocksDBStorage { + /// DB handle + db: RocksEngine, + /// Phantom + phantom: PhantomData, +} + +#[async_trait] +impl StorageApi for RocksDBStorage { + /// Command + type Command = C; + /// omit some code +} +\`\`\` + +#### Implementation Details + +##### Data Views + +With the introduction of the Persistent Storage Layer, Xline uses logical tables to separate different namespaces. Currently, these tables correspond to Column Families in the underlying RocksDB. +The following tables are currently available: + +1. curp: Stores persistent information related to curp, including log entries, voted_for, and corresponding term information. +2. lease: Stores granted lease information. +3. kv: Stores key-value information. +4. auth: Stores the enablement status of auth in Xline and the corresponding enable revision. +5. user: Stores user information added in Xline. +6. role: Stores role information added in Xline. +7. meta: Stores the current applied log index. + +##### Scalability + +Xline separates storage-related operations into two different traits, StorageEngine and StorageApi, and distributes them across two different layers to isolate changes. The StorageEngine trait provides a mechanism, while the StorageApi is defined by upper-level modules, allowing different modules to have their own definitions and implement specific storage strategies. The CurpStore and DB in the StorageApi layer are responsible for implementing the conversion between these two traits. Since the upper-level callers do not directly depend on the underlying Storage Engine, changing the storage engine later would not require extensive modifications to the code of the upper-level modules. + +##### Recovery Process + +For the recovery process, two important aspects need to be considered: what data to recover and when to perform the recovery. Let's first examine the data involved in recovery between different modules. + +###### Consensus Module + +In the consensus module, since RocksDBStorage is exclusive to Curp Server, the recovery process can be directly added to the respective StorageApi trait. The specific implementation is as follows: + +\`\`\`rust +#[async_trait] +impl StorageApi for RocksDBStorage { + /// Command + type Command = C; + /// omit some code + async fn recover( + &self, + ) -> Result<(Option<(u64, ServerId)>, Vec>), StorageError> { + let voted_for = self + .db + .get(CF, VOTE_FOR)? + .map(|bytes| bincode::deserialize::<(u64, ServerId)>(&bytes)) + .transpose()?; + + let mut entries = vec![]; + let mut prev_index = 0; + for (k, v) in self.db.get_all(CF)? { + // we can identify whether a kv is a state or entry by the key length + if k.len() == VOTE_FOR.len() { + continue; + } + let entry: LogEntry = bincode::deserialize(&v)?; + #[allow(clippy::integer_arithmetic)] // won't overflow + if entry.index != prev_index + 1 { + // break when logs are no longer consistent + break; + } + prev_index = entry.index; + entries.push(entry); + } + + Ok((voted_for, entries)) + } +} +\`\`\` + +For the consensus module, during the recovery process, the voted_for value and the corresponding term are first loaded from the underlying database. This is a security guarantee for the consensus algorithm to prevent voting twice within the same term. Subsequently, the corresponding log entries are loaded. + +###### Business Module + +For the business module, different servers have different stores and rely on the mechanisms provided by the underlying DB. Therefore, the recovery process is not defined in the StorageApi trait but exists as separate methods in LeaseStore (xline/src/storage/lease_store/mod.rs), AuthStore (xline/src/storage/auth_store/store.rs), and KvStore (xline/src/storage/kv_store.rs). + +\`\`\`rust +/// Lease store +#[derive(Debug)] +pub(crate) struct LeaseStore +where + DB: StorageApi, +{ + /// Lease store Backend + inner: Arc>, +} + +impl LeaseStoreBackend +where + DB: StorageApi, +{ + /// omit some code + /// Recover data form persistent storage + fn recover_from_current_db(&self) -> Result<(), ExecuteError> { + let leases = self.get_all()?; + for lease in leases { + let _ignore = self + .lease_collection + .write() + .grant(lease.id, lease.ttl, false); + } + Ok(()) + } +} + +impl AuthStore +where + S: StorageApi, +{ + /// Recover data from persistent storage + pub(crate) fn recover(&self) -> Result<(), ExecuteError> { + let enabled = self.backend.get_enable()?; + if enabled { + self.enabled.store(true, AtomicOrdering::Relaxed); + } + let revision = self.backend.get_revision()?; + self.revision.set(revision); + self.create_permission_cache()?; + Ok(()) + } +} +\`\`\` + +Among them, the recovery logic for \`LeaseStore\` and \`AuthStore\` is relatively simple, and we won't delve into it too much. Let's focus on the recovery process of \`KvStore\`. The flowchart for its recovery process is as follows: + +![image](/xline-home/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image4.png) + +###### Recovery Timing + +The recovery timing in Xline primarily occurs during the initial system startup. The recovery of the business module is prioritized, followed by the recovery of the consensus module. Since the recovery of KvStore depends on the recovery of LeaseStore, the recovery of LeaseStore needs to take place before the recovery of KvStore. The corresponding code in xline/src/server/xline_server.rs is as follows: + +\`\`\`rust +impl XlineServer +where + S: StorageApi, +{ + /// Start \`XlineServer\` + #[inline] + pub async fn start(&self, addr: SocketAddr) -> Result<()> { + // lease storage must recover before kv storage + self.lease_storage.recover()?; + self.kv_storage.recover().await?; + self.auth_storage.recover()?; + let (kv_server, lock_server, lease_server, auth_server, watch_server, curp_server) = + self.init_servers().await; + Ok(Server::builder() + .add_service(RpcLockServer::new(lock_server)) + .add_service(RpcKvServer::new(kv_server)) + .add_service(RpcLeaseServer::from_arc(lease_server)) + .add_service(RpcAuthServer::new(auth_server)) + .add_service(RpcWatchServer::new(watch_server)) + .add_service(ProtocolServer::new(curp_server)) + .serve(addr) + .await?) + } +\`\`\` + +The recovery process of the consensus module (curp/src/server/curp_node.rs) is as follows, with the function call chain: XlineServer::start -> XlineServer::init_servers -> CurpServer::new -> CurpNode::new + +\`\`\`rust +// utils +impl CurpNode { + /// Create a new server instance + #[inline] + pub(super) async fn new + 'static>( + id: ServerId, + is_leader: bool, + others: HashMap, + cmd_executor: CE, + curp_cfg: Arc, + tx_filter: Option>, + ) -> Result { + // omit some code + // create curp state machine + let (voted_for, entries) = storage.recover().await?; + let curp = if voted_for.is_none() && entries.is_empty() { + Arc::new(RawCurp::new( + id, + others.keys().cloned().collect(), + is_leader, + Arc::clone(&cmd_board), + Arc::clone(&spec_pool), + uncommitted_pool, + curp_cfg, + Box::new(exe_tx), + sync_tx, + calibrate_tx, + log_tx, + )) + } else { + info!( + "{} recovered voted_for({voted_for:?}), entries from {:?} to {:?}", + id, + entries.first(), + entries.last() + ); + Arc::new(RawCurp::recover_from( + id, + others.keys().cloned().collect(), + is_leader, + Arc::clone(&cmd_board), + Arc::clone(&spec_pool), + uncommitted_pool, + curp_cfg, + Box::new(exe_tx), + sync_tx, + calibrate_tx, + log_tx, + voted_for, + entries, + last_applied.numeric_cast(), + )) + }; + // omit some code + Ok(Self { + curp, + spec_pool, + cmd_board, + shutdown_trigger, + storage, + }) + } +\`\`\` + +Performance Evaluation +In v0.3.0, except for introducing the persistent storage layer, we also conducted significant refactoring on certain parts of CURP. After completing the refactoring and adding new features, we recently passed the validation test and integration test. The performance testing information has already been released in Xline v 0.4.0. +Xline GitHub :https://github.com/datenlord/Xline +`,F5=`--- + cover: /xline-home/blog/Introduction-to-CURP-Protocol/cover.png + author: + name: Jiawei Zhao + url: https://github.com/Phoenix500526 + img_url: https://avatars.githubusercontent.com/u/9337239?v=4 + read_time: 20 +--- + +Xline is an open source distributed KV storage engine, its core purpose is to achieve high-performance strong consistency across data centers, providing cross-data center metadata management. So how does Xline achieve this high-performance strong consistency across data centers? This article will lead you to find out. + +--- + +## 1. What is Xline + +Xline is an open source distributed KV storage engine, its core purpose is to achieve high-performance strong consistency across data centers, providing cross-data center metadata management. So how does Xline achieve this high-performance strong consistency across data centers? This article will lead you to find out. + +## 2. The Overall Architecture of Xline + +Let's take a look at the overall architecture of Xline, as shown below: + +![Graph1](/xline-home/blog/Introduction-to-CURP-Protocol/graph1.jpg) + +From top to bottom, Xline can be roughly divided into three layers, namely + +- Access layer: Implemented using the gRPC framework, responsible for receiving requests from clients. +- Middle Layer: it can be divided into CURP Consensus Module (left) and Business Server Module (right), where: + - CURP Consensus Module: Implements the CURP consensus algorithm, the code corresponds to the curp crate in Xline, while the corresponding RPC service is defined in curp/proto. + - Business Server Module: It is responsible for realizing the upper layer business logic of Xline, such as KvServer for KV-related requests and AuthServer for authentication requests, etc. The code corresponds to the xline crate, while the corresponding RPC service is defined in the xlineapi crate. +- Storage layer: responsible for the persistence of data and metadata within Xline, providing abstract interfaces to the upper layer, the code corresponds to the engine crate. + +## 3. Introduction to the CURP protocol + +### What is CURP? + +The consensus protocol used in Xline is not Paxos or Raft, but a new consensus protocol called CURP, which is called "Consistent Unordered Replication Protocol (CURP)". It was initiated in NSDI 2019's paper "Exploiting Commutativity For Practical Fast Replication," which was authored by Seo Jin Park, a PhD student from Stanford, and Prof. John Ousterhout, who is also the authors of Raft algorithm. + +### Why the CURP Protocol? + +Why did Xline use a new protocol like CURP instead of Raft or Multi-Paxos as the underlying consensus protocol? To illustrate, let's look at the problems with Raft and Multi-Paxos. +The following figure shows a flow of Raft's consensus process: + +![Graph2](/xline-home/blog/Introduction-to-CURP-Protocol/graph2.jpg) + +In this timing diagram, we can see how the Raft protocol reaches consensus: + +1. The client makes a proposal request to the leader. +2. The leader receives the proposal request from the client, appends it to its state machine log, and broadcasts the AppendEntries request to other followers in the cluster. +3. After receiving the AppendEntries request from the leader, the follower performs a log consistency check to determine whether it can be added to its own state machine log. It responds with a success message if the check is successful or a failure message if the check fails. +4. The leader counts the number of successful responses received, and if it exceeds half of the number of cluster nodes, the consensus is considered reached and the proposal is successful, otherwise the proposal is considered to have failed and the result is returned to the client. + +The following figure shows the flow of Multi-Paxos protocol to reach a consensus: + +![Graph3](/xline-home/blog/Introduction-to-CURP-Protocol/graph3.jpg) + +In this timing diagram, we can understand the flow of Multi-Paxos protocol to reach consensus: + +1. The client makes a proposal request to the leader. +2. The leader finds the index of the first unapproved log entry in its state machine log, and then executes the Basic Paxos algorithm to propose the log at index with the proposal value requested by the client. +3. The follower receives the proposal value from the leader and decides whether to accept the proposal value and return a successful response, or to return a failing response. +4. The leader counts the number of successful responses received, and if it exceeds half of the number of nodes in the cluster, it considers that the consensus has been reached and the proposal is successful, otherwise, it considers that the proposal fails and returns the result to the client. + +Be it Multi-Paxos or Raft, reaching consensus inevitably requires 2 RTTs. Both of them are based on a core assumption: the criteria of being durably stored and ordered must be met after command approval or log commit. As a result, the state machine can directly perform the approved commands or apply committed logs. Due to the inherent asynchrony of the network, ensuring orderliness is challenging. Therefore, a leader is required to enforce the execution order of different commands and achieve persistence by obtaining replication from the majority through broadcasting. This process cannot be completed within a single RTT. + +That's why Xline didn't choose Raft or Multi-Paxos as the underlying consensus algorithm. Xline was primarily designed to manage metadata across data centers. As we all know, for a single data center, the latency of its intranet is often very low, only a few milliseconds or even less than 1ms, while for a cross-datacenter wide area network, the network latency can reach tens of milliseconds or even hundreds of milliseconds. Traditional consensus algorithms, such as Raft or Multi-Paxos, require 2 RTTs to reach a consensus, regardless of the state of the consensus, which often leads to serious performance bottlenecks in such high latency network environments. This makes us wonder whether two or more RTTs are necessary to reach consensus in any case. + +The CURP algorithm is an unordered replication algorithm that breaks down the consensus scenarios into the following two categories: +**Fast path**: In non-conflicting scenarios , relaxing the ordering requirements for consensus does not affect the final consensus under the premise of persistent storage. Since the fast path only requires storage persistency, only 1 RTT is needed to reach consensus. We call fast path the front-end of the protocol. +**Slow path**: In conflicting scenarios, both the requirement for ordered concurrent request and persistent storage need to be satisfied, thus requring 2 RTTs to achieve consensus. We refer to the slow path as the back-end of the protocol. + +Then reader may wonder, what exactly is the conflict here? Let's use a simple KV operation as an example. In the nodes of a distributed system, the operations we do on the state machine are just read and write, and in the case of concurrent operations on the state machine, there are four scenarios: read-after-read, read-after-write, write-after-read, and write-after-write. Obviously, for read-after-read, which is a read-only operation with no side-effects, there is no conflict under any circumstances, and the final result is always the same, whether it is read first or next. When operating on different keys, for example, PUT A=1, PUT B=2, then for the final state of the state machine, no matter whether to execute PUT A=1 first, PUT B=2 next, or vice versa, the final result of reading from the state machine is A=1, B=2. The same applies to the scenario of read-write mixing. Therefore, when there is no intersection between the keys of multiple operations performed concurrently on a state machine, we say that these operations are non-conflicting. Conversely, if the concurrent operations include at least one write operation, and the keys of those operations are intersected, the operations are in conflict. + +### fast path vs. slow path + +How does CURP implement fast path and slow path? Below is a sketch of the cluster topology in the CURP algorithm. + +Let's take a look at what's going on in this diagram: + +![Graph4](/xline-home/blog/Introduction-to-CURP-Protocol/graph4.jpg) + +1. Client: the client that makes the request to the cluster. +2. Master: Corresponds to the leader node in the cluster, which holds the state machine logs, where the green part represents the logs that have been persisted to disk, and the blue part represents the logs that are stored in memory. +3. Follower nodes: Corresponds to the yellow dotted box in the figure above, each follower contains the following two components. + a. Witness: it can be approximated as a memory-based HashMap, on one hand, it is responsible for logging the current requests in the cluster in the fast path process, on the other hand, CURP will also use Witness to determine whether there is a conflict in the current request. All the records saved in Witness are unordered. + b. Backup: Keeps state machine logs that are persisted to disk. + +Next, let's take the example PUT z=7 in the figure to see the execution flow of fast path: + +1. Client broadcasts a request for PUT z=7 to all nodes in the cluster. +2. When a node in the cluster receives the request, it executes different logic depending on its role. + a. The leader receives the request and immediately writes the data z = 7 locally (that is, the blue part in the state machine log) and returns OK immediately. + b. When the follower receives the request, it uses witness to determine whether the request is in conflict . Since z = 7 does not conflict with y = 5, which is the only one in the witness, the follower saves z = 7 to the witness and returns OK to the client. +3. Client collects and counts the number of successful responses received. For a cluster with 2f + 1 nodes, when the number of received successful responses reaches f+f/2+1, the operation is confirmed to be persisted to the cluster, which takes 1 RTT for the whole process. + +Next, based on the previous fast path example, let's take PUT z = 9 as an example to see the execution flow of slow path. Since z = 9 conflicts with z = 7, the fast path initiated by the client will fail and the slow path will be executed: + +1. Client broadcasts a PUT z=9 request to all nodes in the cluster. +2. The nodes in the cluster receive the request and perform different logic according to their roles. + a. The leader receives the request and writes z = 9 to the state machine log. Since z = 9 conflicts with z = 7, it returns a KeyConflict response to the client and asynchronously initiates an AppendEntries request to synchronize the state machine log to the other nodes in the cluster. + b. The follower receives the request and refuses to save the proposal since z = 9 conflicts with z = 7 in the witness. +3. Client collects and counts the number of successful responses received. Since the number of rejected responses received exceeds f/2, client needs to wait for the slow path to complete. +4. When the AppendEntries in step 2 are executed successfully, the follower appends all three state machine logs (y = 5, z = 7, z = 9) of the leader to the Backup, removes the relevant logs from the witness, and returns the successful responses to the leader. +5. The leader counts the number of successful responses received. If it exceeds half of the number of cluster nodes, the consensus is considered reached and the proposal succeeds. Otherwise, the proposal fails and the result is returned to the client. + +## 4. Summary + +Xline is a distributed KV storage that provides strong consistency across data centers. One of its core problems is how to provide high-performance strong consistency in a high latency WAN environment across data centers. Traditional distributed consensus algorithms, such as Raft and Multi-Paxos, guarantee state machine consistency by making all operations satisfy storage persistency and the ordering prerequisite. The CURP protocol, makes a finer-grained division of consensus scenarios, splitting the protocol into front-end (fast path) and back-end (slow path), where the front-end only guarantees that the proposal will be persisted to the cluster, while the back-end not only guarantees persistence, but also ensures that all nodes that have saved the proposal will execute the commands in the same order, guaranteeing the consistency of the state machine. + +This is the end of the introduction to the CURP protocol. For more details, please refer to our other articles and shares, as follows: +Rethinking the Curp Consensus Protocol +DatenLord | Xline Geo-distributed KV Storage + +Xline is a geo-distributed KV storage for metadata management. Xline project is written in Rust, and you are welcomed to participate in our open-source project! +GitHub link: +https://github.com/xline-kv/Xline +Xline official website: www.xline.cloud +Xline Discord: +https://discord.gg/XyFXGpSfvb +`,B5=`--- + cover: /xline-home/blog/Mechanism-and-Implementation-of-Lease/cover.png + author: + name: Yu Guan + url: https://github.com/themanforfree + img_url: https://avatars.githubusercontent.com/u/56149350?v=4 + read_time: 20 +--- + +Xline is an open source distributed KV storage engine for managing small amounts of critical data, with the aim of high performance data access and strong consistency across data centers. Xline provides a series of etcd-compatible access interfaces, including KV, Watch, Lease, and more. In this article, we will focus on the Lease interface. + +--- + +## 1. Introduction + +Xline is an open source distributed KV storage engine for managing small amounts of critical data, with the aim of high performance data access and strong consistency across data centers. Xline provides a series of etcd-compatible access interfaces, including KV, Watch, Lease, and more. In this article, we will focus on the Lease interface. + +Lease is a lease mechanism between client and server. Similar to the car rental service in our real life, when we need to use a car, we can apply for a lease from the car rental company, the car rental company will assign a car to us, and guarantee that the car will not be assigned to other people during the validity period agreed between us and the car rental company. If we want to use it for a longer period of time, we can renew the lease to the car rental company. If we no longer want to use the car, we can either return and cancel it, or wait for the lease to expire and return it automatically. + +The use of Lease in Xline is very similar to the real life car rental service. The client can apply for a lease from the server, the server will then ensure that the lease will not be revoked during the validity period. The client can also end the lease early or extend the TTL of lease through the corresponding interface. Unlike real-life car rental, we can bind some key-values to the lease, while they will be deleted with the expiration of the lease. + +According to the ability of Lease introduced above, we can use Lease to realize our purpose in many scenarios, the following are some common Lease application scenarios: +Distributed locks: Distributed locks are realized through several mechanisms, while Lease play a role in avoiding deadlocks in distributed locks. When a client requests for a distributed lock, it creates a lease and renews the lease continuously, while also writes key-value and attaches it to the lease. This key-value represents the occupancy state of the distributed lock, and if the client occupying the lock is unable to release the lock actively due to a failure, the Lease mechanism ensures that the corresponding key-value will be deleted automatically to release the current lock after the expiration of the lease. +Service Registry: A lease is created when registering a new service, and written the key-value of service-related information with lease. During the survival of the service, the service will renew its lease continuously. If the lease cannot be renewed automatically after the service fails, the corresponding key-value will be deleted automatically, and the corresponding service will be deregistered in the registry center. +Authorization Management in Distributed Systems: Clients apply for a lease to gain permissions for resources, if the client loses connection with the server, or if the lease expires due to failure to renew the lease in time, the client loses the corresponding permissions. + +## 2. Architecture + +![Image](/xline-home/blog/Mechanism-and-Implementation-of-Lease/image1.PNG) + +The above figure is a simple architecture diagram of Lease implementation. There are two ways for an external client to send a request to the Xline cluster. One is to directly broadcast the request to all nodes in the cluster through the Curp protocol. After the Curp module reaches a consensus, it applies the request to the state machine, which is to write the request to the storage layer. + +Another way is for the client to directly send the request to the LeaseServer of one of the nodes in the cluster, which is also the service request method that is compatible with etcd. After the request reaches the LeaseServer, there will be two different processing paths, most of the requests will be broadcasted to all the nodes in the cluster through the Curp client bound to the server, and the remaining small number of requests may only be handled by some of the nodes, which will be forwarded to the LeaseServer of the specific nodes and applied to the state machine. + +## 3. Source Code Analysis + +### Source Code Organization + +The Lease-related source code is mainly stored in the following files, which are roughly organized into three sections: + +1. RPC Definitions: + +- xlineapi/proto/rpc.proto: rpc interface definitions for each Server within Xline, including the LeaseServer interface definition. +- xlineapi/proto/lease.proto: rpc message definition for Lease. + +2. LeaseServer implementation: + +- xline/src/server/lease_server.rs: Responsible for providing the implementation of the Lease RPC service, the main purpose is to provide etcd compliant interface.If the client send the propose directly through the external curp, this interface can be omitted, while some of the requests that do not go through the consensus protocol must be processed through the LeaseServer. + +3. LeaseStore implementation: + +- xline/src/storage/lease_store/lease.rs: Defines the Lease data structure, which is used to store Lease-related information, such as all the keys bound on the Lease, the expiration time of the Lease, the remaining TTL of the Lease, etc. It also implements some practical methods for it. +- xline/src/storage/lease_store/lease_queue.rs: Defines LeaseQueue and related methods. LeaseQueue is a priority queue consisting of lease IDs and lease expiration times, while a background-resident task will capture all the expired lease IDs through this structure at regular intervals. +- xline/src/storage/lease_store/lease_collection.rs: Defines the LeaseCollection and related methods. The LeaseCollection is a collection of the core data structures of a lease, providing the core capabilities of the lease mechanism. The structure contains three parts: lease_map saves all the lease structures; item_map caches the key to lease ID mapping; and expired_queue manages the lease expiration time. expired_queue is only used on the leader node, and is empty on other nodes. +- xline/src/storage/lease_store/mod.rs: Definition and method implementation of LeaseStore. It is responsible for providing the storage layer abstraction for lease and the storage layer interface for all lease related operations externally. Its inner part contains LeaseCollection and some data structures which are shared with KvStore. + +### Lease Creation + +If you want to use a lease, you must create a lease first, and when doing so, you need to use the LeaseGrant interface provided by LeaseServer. The LeaseGrant RPC is quite straightforward, which is to assign a lease ID, and submit the request to the consensus protocol through propose interface?. Once consensus is reached, the request is executed in the LeaseStore. + +LeaseStore will create and insert a new lease in LeaseCollection. The core code logic is as follows: + +\`\`\`rust +... +if is_leader { + let expiry = lease.refresh(Duration::ZERO); + let _ignore = inner.expired_queue.insert(lease_id, expiry); +} else { + lease.forever(); +} +let _ignore = inner.lease_map.insert(lease_id, lease.clone()); +... +\`\`\` + +Note that if the current node is the leader node, it also needs to manage the lease's expiration time. Therefore, it must calculate the expiration time of the lease through the refresh method and insert it into the expired_queue. The other nodes do not need this step, they just need to insert the new lease into the lease_map. + +After the lease is created, the server returns a response to the client containing the lease ID. + +### Using Lease + +![Image](/xline-home/blog/Mechanism-and-Implementation-of-Lease/image2.png) + +After getting the lease ID, the client can use the lease through the lease ID. When putting a pair of key values, lease ID can be attached. When this Put request is applied to the state machine, in addition to writing the key-value directly to the index and DB of the KvStore, it will detach the current key from the old lease by the detach method provided by the LeaseCollection, and attach the key that needs to be put to the new lease ID by attach. + +\`\`\`bash +pub(crate) fn attach(&self, lease_id: i64, key: Vec) -> Result<(), ExecuteError> { + let mut inner = self.inner.write(); + let Some(lease) = inner.lease_map.get_mut(&lease_id) else { + return Err(ExecuteError::lease_not_found(lease_id)); + }; + lease.insert_key(key.clone()); + let _ignore = inner.item_map.insert(key, lease_id); + Ok(()) +} +\`\`\` + +The implementation of attach is to find the corresponding lease by the lease ID, attach the key to the lease, and add the mapping of the key to the lease ID to the item_map. Detach is the opposite of attach, it removes the content inserted when attaching. + +After the above process, we have successfully associated the key with the lease ID. If the lease is actively revoked or times out, the lease and all the keys associated with it will be deleted. + +## Active Lease Deletion + +To delete a lease, you need to use the LeaseRevoke interface, which is basically the same as LeaseGrant in LeaseServer. Both of them pass the request to the consensus protocol for processing, while the only difference is that LeaseRevoke doesn't need to assign a lease ID. + +\`\`\`rust +let del_keys = match self.lease_collection.look_up(req.id) { + Some(l) => l.keys(), + None => return Err(ExecuteError::lease_not_found(req.id)), +}; +if del_keys.is_empty() { + let _ignore = self.lease_collection.revoke(req.id); + return Ok(Vec::new()); +} + +// delete keys ... + +let _ignore = self.lease_collection.revoke(req.id); +\`\`\` + +When LeaseRevoke is executed, it first tries to find out if the lease has any associated keys, if not, it can directly remove the lease through the revoke method on the LeaseCollection. If there are associated keys, it needs to remove all associated keys from the KV Store and clean up the relationship between these keys and the lease ID in the LeaseCollection before you can revoke the lease from the LeaseCollection. + +### Lease expiration + +![Image](/xline-home/blog/Mechanism-and-Implementation-of-Lease/image3.png) + +The Lease expiration process is shown in the above figure, which omits the consensus part. When initializing LeaseServer, a background resident revoke_expired_leases_task is created, the main code of this task is as follows: + +\`\`\`bash +loop { + // only leader will check expired lease + if lease_server.lease_storage.is_primary() { + for id in lease_server.lease_storage.find_expired_leases() { + let _handle = tokio::spawn({ + let s = Arc::clone(&lease_server); + async move { + let request = tonic::Request::new(LeaseRevokeRequest { id }); + if let Err(e) = s.lease_revoke(request).await { + warn!("Failed to revoke expired leases: {}", e); + } + } + }); + } + } + time::sleep(DEFAULT_LEASE_REQUEST_TIME).await; +} +\`\`\` + +On the node responsible for managing Lease expiration time, this task will periodically captures all the expired lease IDs through find_expired_leases, and calls the lease_revoke interface on the lease server to delete the expired Leases, utilizing the same interface as clients use to actively delete Leases. +find_expired_leases is a core method in LeaseCollection, and its implementation is as follows: + +\`\`\`rust +pub(crate) fn find_expired_leases(&self) -> Vec { + let mut expired_leases = vec![]; + let mut inner = self.inner.write(); + while let Some(expiry) = inner.expired_queue.peek() { + if *expiry <= Instant::now() { + #[allow(clippy::unwrap_used)] // queue.peek() returns Some + let id = inner.expired_queue.pop().unwrap(); + if inner.lease_map.contains_key(&id) { + expired_leases.push(id); + } + } else { + break; + } + } + expired_leases +} +\`\`\` + +When a lease is created, the expiration time of the lease is already calculated and inserted into the expired_queue. When calling find_expired_queue, the process continuously attempts to extract the expired leases from the head of the priority queue until it encounters the first one that has not yet expired. It then returns all the lease ID obtained in this process. + +### Lease Renewal + +If you want the created lease to last longer, you need to maintain a stream between the client and the server, where the client sends LeaseKeepAlive requests to the server at regular intervals. Unlike the previous requests, LeaseKeepAlive requests do not need to go through the consensus protocol because they rely on the expiration time of a lease that exists only on the leader node, so only the leader node can process LeaseKeepAlive requests, while the follower node forwards the request to the leader node for processing. The forwarding logic can be found in the source code of lease_server.rs. +After the stream is established between the leader and the client, whenever the leader receives a lease ID from the stream, it will renew the lease. The final renewal logic is realized by the renewal method provided by LeaseCollection. This method is defined as follows: + +\`\`\`bash +pub(crate) fn renew(&self, lease_id: i64) -> Result { + let mut inner = self.inner.write(); + let (expiry, ttl) = { + let Some(lease) = inner.lease_map.get_mut(&lease_id) else { + return Err(ExecuteError::lease_not_found(lease_id)); + }; + if lease.expired() { + return Err(ExecuteError::lease_expired(lease_id)); + } + let expiry = lease.refresh(Duration::default()); + let ttl = lease.ttl().as_secs().cast(); + (expiry, ttl) + }; + let _ignore = inner.expired_queue.update(lease_id, expiry); + Ok(ttl) +} +\`\`\` + +Renew will first check whether the corresponding lease has expired or not. If not, it will recalculate the expiration time, and then update its order in the expired_queue. +As long as the connection between the client and the server is not interrupted, the client will continue to send LeaseKeepAlive requests to the server via stream, preventing the lease from timing out. The primary application scenarios for leases, as mentioned in the previous section, almost always use this feature to determine whether the client is running normally. + +### Lease information reading + +Lease has two reading interfaces. One is LeaseTimeToLive, which will read the detailed information of a lease, including its expiration time. Same as LeaseKeepAlive, because the expiration time only exists in the leader node, so the request needs to be forwarded to only the leader for processing. +Another reading interface is LeaseLeases, which lists all the lease IDs in the system. This interface doesn't need information about the lease expiration time, so it can be handed over to the consensus protocol directly, which makes the processing in LeaseServer similar to that of LeaseGrant and LeaseRevoke. We wouldn’t go into further details here. +The ability of LeaseTimeToLive and LeaseLeases to read information is finally realized by LeaseCollection, the source code is as follows: + +\`\`\`rust +pub(crate) fn look_up(&self, lease_id: i64) -> Option { + self.inner.read().lease_map.get(&lease_id).cloned() +} + +pub(crate) fn leases(&self) -> Vec { + let mut leases = self + .inner + .read() + .lease_map + .values() + .cloned() + .collect::>(); + leases.sort_by_key(Lease::remaining); + leases +} +\`\`\` + +## 4. Summary + +In this article, we have introduced Lease, an important interface of Xline, which allows users to realize the on-time expiration of a set of keys and renew the lease through KeepAlive interface. This feature also allows the server to monitor the client's status. Relying on these features of the Lease mechanism, many typical application scenarios have been born, such as distributed locks, service registries, authorization management and so on, as described in this article. +The article also explains how users can utilize the Lease interface, and outlines the realization of key functionalities within this process. If you want to learn more about the detailed code, you can also refer to our open source repository: https://github.com/xline-kv/Xline . + +Xline is a geo-distributed KV storage for metadata management. the Xline project is written in Rust, and you are welcome to participate in our open source project! + +GitHub link: +https://github.com/xline-kv/Xline +Xline official website: www.xline.cloud +Xline Discord: +https://discord.gg/XyFXGpSfvb +`,$5=`--- + cover: /xline-home/blog/Implementation-of-CURP-Server/cover.jpg + author: + name: Jiawei Zhao + url: https://github.com/Phoenix500526 + img_url: https://avatars.githubusercontent.com/u/9337239?v=4 + read_time: 14 +--- + +In the previous article, An Introduction to the CURP Protocol, we gave a preliminary introduction to the CURP Protocol. Now, let’s continue from where we left off and delve into the internal workings of the CURP Server. + +--- + +In the previous article, An Introduction to the CURP Protocol, we gave a preliminary introduction to the CURP Protocol. Now, let’s continue from where we left off and delve into the internal workings of the CURP Server. + +## Organization of the Curp Crate’s Source Code + +Now, let’s focus on the curp consensus module. The curp module is a separate crate in Xline, with all of its source code stored in the curp directory, which is organized as follows: + +> curp/proto: Holds the definition of the rpc interfaces and messages related to the curp protocol. +> curp/tla+: Holds content related to the tla+ specification of the curp protocol +> curp/tests: integration tests +> curp/src: the main implementation code of the CURP protocol, which can be divided into: +> client.rs: CURP client-side implementation. +> cmd.rs: defines key traits for interacting with external mods +> log_entry.rs: state machine log entries. +> rpc/: CURP server implementation of rpc methods. +> server/: CURP server-side implementation, including the following + +Key data structure definitions: cmd_board.rs, spec_pool.rs + +Key background tasks: cmd_worker/, gc.rs + +CURP server front and backend implementations: curp_node.rs, raw_curp/ + +storage/: implements the interface definition of the persistence layer, used to interact with the storage layer + +## Curp Server Architecture and Task Division + +After understanding the rpc services provided by Curp Server and the corresponding traits, let’s take a look at the architecture and startup process of Curp Server. + +![image1](/xline-home/blog/Implementation-of-CURP-Server/image1.png) + +Architecturally, the entire Curp Server can be divided into the front-end CurpNode and the back-end RawCurp. Such a design primarily aims to separate synchronous and asynchronous code. Regarding Rust’s asynchronous code: + +1. For tasks spawned by tokio, since the compiler inherently doesn’t know how long the task will run, it enforces that all tasks must have a ‘static lifetime. This often requires us to clone certain reference data structures. +2. Non-Send variables, like MutexGuard, are prohibited from crossing .await statements. When synchronous and asynchronous code are mixed, it necessitates manually releasing this MutexGuard before the await, either within a block or through an explicit drop. This leads to nested code structures, making it more challenging to read.By separating CurpNode (handling synchronous requests) and RawCurp (handling asynchronous requests), the code boundaries are more transparent, enhancing code readability. + +For insights on organizing asynchronous code gracefully in Rust projects, you can refer to another article: How to Gracefully Organize Asynchronous Code in Rust Projects. + +Within the CurpNode structure, there are spec_pool and cmd_board structures. The spec_pool corresponds to the witness structure in the CURP paper, responsible for storing commands executed in the fast path. In contrast, cmd_board stores the results of command executions. CurpNode can register a listener to cmd_board. Once the RawCurp backend asynchronously completes command execution, the result is inserted into cmd_board, and CurpNode is notified via the listener to return the command execution outcome to the user. When RawCurp receives a request from CurpNode, it inserts the command into the conflict detection queue — the conflict_checked_channel. + +As the name implies, a conflict_checked_channel is essentially an mpmc channel that accepts cmd’s from a CurpNode concurrently and dynamically maintains conflict relationships between different cmd’s to ensure that the commands a command worker receives from the channel will always conflict with the currently executing command. + +As the name suggests, the conflict_checked_channel is essentially an mpmc channel, capable of concurrently accepting cmds from CurpNode. It dynamically maintains the conflict relationships between different cmds, ensuring that commands retrieved by the command worker from the channel always not conflict with the currently executed commands. The command worker is the command execution entity. While the conflict_checked_channel focuses on relationships between various commands, the command worker is concerned with how to execute the commands. After the command worker completes the command and obtains the result, it inserts the result into cmd_board, triggering the listener and notifying CurpNode that the command execution is finished. + +## How Curp Server Interacts with Business Server + +From the architecture diagram mentioned earlier, we can see that the Curp consensus module provides a Curp Server, which offers rpc services externally. In Xline, the Business Servers make requests to Curp Server via rpc calls. Once the Curp Server processes the request, it notifies the Business Server through the corresponding trait. + +## Service Definitions + +Let’s first take a look at the services defined by Curp Server: + +\`\`\` +service Protocol { + rpc Propose (ProposeRequest) returns (ProposeResponse); + rpc WaitSynced (WaitSyncedRequest) returns (WaitSyncedResponse); + rpc AppendEntries (AppendEntriesRequest) returns (AppendEntriesResponse); + rpc Vote (VoteRequest) returns (VoteResponse); + rpc FetchLeader (FetchLeaderRequest) returns (FetchLeaderResponse); + rpc InstallSnapshot (stream InstallSnapshotRequest) returns (InstallSnapshotResponse); +} +\`\`\` + +The purposes of these services are: + +- Propose: To initiate a proposal request to the Curp cluster. +- WaitSynced: To wait for the Curp cluster to complete requests in the after-sync phase. +- AppendEntries: To initiate a request to the Curp cluster to append state machine logs. +- Vote: When a Curp Server initiates an election, it transitions its role to Candidate and uses this interface to send voting requests to other Curp Servers. If it receives a majority of positive responses, it becomes the leader; otherwise, it reverts to follower. +- FetchLeader: To retrieve the current leader node of the Curp cluster. +- InstallSnapshot: If a Curp Server’s state machine log lags significantly behind the leader, it can request a snapshot from the leader through this interface to catch up with the leader’s state machine log. Except for Propose and FetchLeader, the other services are primarily for internal use by Curp Server. The Business Servers fetch the current leader information via FetchLeader and makes proposals to the Curp cluster through Propose. + +## Interface Definitions + +Next, let’s see which traits are defined by the Curp module. From a design perspective, the traits defined in Curp can be divided into two categories: + +1. Command-related: Once the Curp module reaches a consensus on a specific command, it notifies the Business Server to execute the corresponding command via related traits. +2. Role-related: When the role of a Curp node changes, it notifies the corresponding business component (e.g., Lessor, Compactor) via related traits. + +### Command-related Traits + +The command-related traits defined in the Curp module mainly include Command, ConflictCheck, and CommandExecutor. Let’s first examine the Command and ConflictCheck traits, which are defined as: + +\`\`\`rust +pub trait ConflictCheck { + fn is_conflict(&self, other: &Self) -> bool; +} + +#[async_trait] +pub trait Command{ + /// omit some code... + + #[inline] + fn prepare(&self, e: &E, index: LogIndex) -> Result + where + E: CommandExecutor + Send + Sync, + { + >::prepare(e, self, index) + } + + #[inline] + async fn execute(&self, e: &E, index: LogIndex) -> Result + where + E: CommandExecutor + Send + Sync, + { + >::execute(e, self, index).await + } + + #[inline] + async fn after_sync( + &self, + e: &E, + index: LogIndex, + prepare_res: Self::PR, + ) -> Result + where + E: CommandExecutor + Send + Sync, + { + >::after_sync(e, self, index, prepare_res).await + } +}The Command trait describes a command entity that can be executed by Business Server. ConflictCheck detects whether conflicts exist between multiple commands. The conflict criterion is whether there’s an intersection between keys of two different commands. +\`\`\` + +Command defines four associated types (K, PR, ER, and ASR). Here, K represents the Key corresponding to the command, while ER and ASR correspond to the results of the command in the execute and after_sync phases of the Curp protocol, respectively. What does PR represent? PR denotes the result of the command in the prepare phase. + +To explain the need for a prepare phase, let’s consider an example. Since Xline employs the MVCC mechanism for multi-version management of key-value pairs, each key is assigned a revision. If a client sends two consecutive commands to Xline: PUT A=1 and PUT B=1 (denoted as cmd1 and cmd2) with expected revisions of 3 and 4, respectively, Xline can execute these two non-conflicting commands concurrently and out of order. If cmd2 finishes before cmd1, the revision order may be reversed, leading to errors. + +To solve this, a prepare phase is introduced to Command. Curp ensures that the execution in the prepare phase is serialized and always precedes the execute phase. By moving the revision calculation from the after_sync phase to the prepare phase, Xline ensures that the revision order matches the order of user requests arriving at Xline while still allowing for concurrent out-of-order execution of non-conflicting commands. + +Next, let’s look at the CommandExecutor trait definition: + +\`\`\`rust +#[async_trait] +pub trait CommandExecutor{ + fn prepare(&self, cmd: &C, index: LogIndex) -> Result; + + async fn execute(&self, cmd: &C, index: LogIndex) -> Result; + + async fn after_sync( + &self, + cmd: &C, + index: LogIndex, + prepare_res: C::PR, + ) -> Result; + + /// omit some code ... +} + +\`\`\` + +CommandExecutor describes the command execution entity. The Curp module uses it to notify the Business Server to execute related commands. + +The relationship among these three traits is: ConflictCheck describes the relationship between two different commands; the Curp Server cares only about whether commands conflict, not how they are executed. CommandExecutor describes how commands are executed without concerning themselves with their interrelationships. Their dependency is CommandExecutor ←> Command → ConflictCheck. + +### Traits for Role Change + +The role-related trait defined in Curp is RoleChange: + +\`\`\`rust +/// Callback when the leadership changes +pub trait RoleChange { + /// The \`on_election_win\` will be invoked when the current server win the election. + /// It means that the current server's role will change from Candidate to Leader. + fn on_election_win(&self); + + /// The \`on_calibrate\` will be invoked when the current server has been calibrated. + /// It means that the current server's role will change from Leader to Follower. + fn on_calibrate(&self); +} +\`\`\` + +In Xline’s Curp module, the protocol backend uses the Raft protocol. The so-called backend means that when a conflict occurs, the Curp module automatically falls back to the Raft protocol. In this scenario, the latency to reach a consensus is the same as the Raft protocol, both being 2 RTT. As we know, the original Raft paper defined three roles for nodes in a Raft cluster: Leader, Follower, and Candidate, with their transition relationships as follows: + +![image2](/xline-home/blog/Implementation-of-CURP-Server/image2.png) + +Initially, a node is a Follower. If it doesn’t receive any messages from the current cluster Leader within the election_timeout, including heartbeats or AppendEntries requests, it initiates an election operation and transitions to Candidate. If it wins the election, it becomes the Leader; otherwise, it reverts to the Follower. If a network partition occurs, two Leaders might emerge. Once the network partition resolves, the Leader with a smaller term will calibrate itself upon receiving any message from the Leader with a larger term, updating its term and transitioning to the Follower. + +Why does Xline need to define a trait like RoleChange? In some Xline business scenarios, some components, like LeaseServer and LeaseStore, perform different operations on Leader node and non-Leader nodes. Thus, when a node’s role changes, the corresponding components need to be notified. Currently, because Lease-related components only differentiate between Leader and non-Leader nodes, the defined callback only covers the election_win and calibrate events. If future business requires finer-grained role differentiation, more callback methods will be added to cover those requirements. + +## How Curp Server Handles Requests + +Let’s assume there are two PutRequests: PUT A=1 and PUT A=2. Let’s see how the curp server handles these conflicting requests. As mentioned earlier, users need to initiate a proposal to Curp Server through the propose method of the Curp Client. Let’s first look at the pseudocode implementation of propose. + +\`\`\`rust +/// Propose the request to servers +#[inline] +pub async fn propose(&self, cmd: C) -> Result { + // create two futures + let fast_round = self.fast_round(cmd); + let slow_round = self.slow_round(cmd); + + // Wait for the fast and slow round at the same time + match which_one_complete_first(fast_round, slow_round).await { + fast_round returns fast_result => { + let (fast_er, success) = fast_result?; + if success { + Ok(fast_er.unwrap()) + } else { + let (_asr, er) = wait for slow_round to finish; + Ok(er) + } + } + slow_round returns slow_result => match slow_result { + Ok((_asr, er)) => Ok(er), + Err(e) => { + if let Ok((Some(er), true)) = wait for fast_round to finish { + return Ok(er); + } + Err(e) + } + }, + } +} +\`\`\` + +As the code suggests, when a Client calls propose, it simultaneously starts two different futures, namely fast_round and slow_round, corresponding to the fast path and slow path of the Curp protocol, respectively. The process waits for one of the futures to complete. Clearly, when the first request arrives, there will be no conflict with other requests. Thus, it can be assumed that this request will be processed during the fast round. Let’s first look at the implementation of fast_round. + +## Curp Consensus Process — Fast Round + +The fast_round code is defined in curp/src/client, corresponding to the frontend process of the Curp protocol. + +\`\`\`rust +/// The fast round of Curp protocol +/// It broadcasts the requests to all the curp servers. +async fn fast_round( + &self, + cmd_arc: Arc, +) -> Result<(Option<::ER>, bool), ProposeError> { + let request = create a new ProposeRequest; + let mut rpcs = broadcast request to each node and put responses into a stream; + + let mut ok_cnt: usize = 0; + let mut execute_result: Option = None; + let superquorum = superquorum(self.connects.len()); + + while let Some(resp_result) = rpcs.next().await { + let resp = match resp_result { + Ok(resp) => resp.into_inner(), + Err(e) => { + warn!("Propose error: {}", e); + continue; + } + }; + + update_state(resp.term, resp.leader_id); + + resp.map_or_else::( + |er| { + if let Some(er) = er { + execute_result = Some(er); + } + ok_cnt += 1; + Ok(()) + }, + |err| { + if let ProposeError::ExecutionError(_) = err { + return Err(err); + } + Ok(()) + }, + )??; + if (ok_cnt >= superquorum) && execute_result.is_some() { + return Ok((execute_result, true)); + } + } + Ok((execute_result, false)) +} +\`\`\` + +Overall, the logic of fast_round can be divided into three steps: + +1. Wrap Command into the corresponding ProposeRequest. +2. Broadcast the ProposeRequest to all nodes in the Curp cluster. +3. Summarize the results. If the current Command doesn’t conflict with the others, a successful execution result will be obtained. If the number of successful ProposeResponses received exceeds the super quorum (approximately 3/4 of the cluster node count), the command is deemed successfully executed; otherwise, it fails. + +Some readers might wonder why, in a distributed cluster with 2f + 1 nodes, consensus protocols like Raft or Paxos only need f + 1 nodes to return a successful response, but Curp requires more than f + f/2+1 nodes to return successful responses in the fast path. Here, f represents the fault tolerance of the cluster. To understand this discrepancy, let’s consider what would happen if the Curp protocol also used f+1as the criterion for success in the fast path. + +Assume Client_A broadcasts ProposeRequest (marked as A) to 2f + 1 nodes and receives f + 1 successful responses. There must be one leader node among them, with the remaining f nodes being followers. Suppose f nodes, including the leader, crashed and all had request A. Among the remaining f+1 nodes, only one follower retains request A in its in-memory spec_pool. Then, the client broadcasts another ProposeRequest (marked as B, conflicting with A). Since each node uses its in-memory spec_pool to determine whether incoming requests conflict with speculatively executed requests, even though Client_B won’t receive a successful result, request B will still be saved in the spec_pool of f nodes. If the leader node recovers and replays all requests saved in spec_pool across all nodes to restore the state machine (a process we call “recover”), the originally executed request A becomes the minority, while the unsuccessfully executed request B becomes the majority. This leads to an error during the leader’s recovery process. + +When the Curp protocol usesf+ f/2+ 1 as the criterion for success in the fast path, even if all f nodes containing request A crash, there are still more than half the nodes in the remaining f + 1 nodes that retain the request. This ensures that a later conflicting request will not outnumber the originally successfully executed request. + +Returning to our example, since Curp Server didn’t encounter conflicts when processing the request PUT A=1, it smoothly completes in the fast_round. For the Leader node, the request goes through CurpNode, to RawCurp, to the conflict detection queue Conflict_Checked_MPMC, and finally handed over to cmd_worker for execution. After the cmd_worker executes PUT A=1, it inserts the corresponding result into cmd_board, notifying CurpNode to return the command execution response to the Client. The following diagram depicts the sequence of events in the fast_round process. + +![image3](/xline-home/blog/Implementation-of-CURP-Server/image3.png) + +## Curp Consensus Process — Slow Round + +When the Client sends the request PUT A=2 to the Curp Server, as known from the previous propose method, the Client will simultaneously start both the fast_round and slow_round futures. Clearly, since the request PUT A=2 is in obvious conflict with the previous request PUT A=1, fast_round cannot be successfully executed, hence waiting for the completion of slow_round. The code for slow_round is defined in curp/src/client, corresponding to the backend process of the Curp protocol, i.e., the wait_synced process. + +\`\`\`rust +/// The slow round of Curp protocol +async fn slow_round( + &self, + cmd: Arc, +) -> Result<(::ASR, ::ER), ProposeError> { + loop { + let leader_id = self.get_leader_id().await; + + let resp = match call wait_synced from leader node { + Ok(resp) => resp.into_inner(), + Err(e) => { + wait for retry_timeout to retry propose again; + continue; + } + }; + + match resp? { + SyncResult::Success { er, asr } => { + return Ok((asr, er)); + } + SyncResult::Error(Redirect(new_leader, term)) => { + let new_leader = new_leader.and_then(|id| { + update_state(new_leader, term) + }) + }); + self.resend_propose(Arc::clone(&cmd), new_leader).await?; // resend the propose to the new leader + } + SyncResult::Error(Timeout) => { + return Err(ProposeError::SyncedError("wait sync timeout".to_owned())); + } + SyncResult::Error(e) => { + return Err(ProposeError::SyncedError(format!("{e:?}"))); + } + } + } +}Overall, the slow_round logic can also be divided into two steps: +\`\`\` + +1. Obtain the current leader of the cluster and send a WaitSyncedRequest to it. +2. Wait for the leader to return the execution result of WaitSyncedRequest. If failed, wait for retry_timeout and try again. + +In the Client’s propose method, because fast_round determines that the newly arrived request conflicts with the previously speculatively executed request, RawCurp will first save this Command in the state machine log and initiate an AppendEntries request to the cluster. After completion, it will return a ProposeError::KeyConflict error to the client, waiting for the end of slow_round. After the Leader completes the AppendEntries operation to the Followers in the cluster, the apply operation will be performed to apply the log to the state machine. It’s during this process that the leader will send the Command to the conflict detection queue, Conflict_Checked_MPMC. Only after the cmd_worker has executed all commands conflicting with PUT A=2 can the PUT A=2 command be popped from the conflict detection queue for execution. Unlike fast_round, in the slow_round process, after the command is executed and the execution result is saved in cmd_board, it will not return directly. Instead, the command will be put back into the conflict detection queue until the command completes the after_sync operation and saves the corresponding result to cmd_board. Only then will it return to CurpNode and finally return the corresponding ProposeResponse to the Client. The sequence diagram for the entire slow_round operation is as follows: + +![image4](/xline-home/blog/Implementation-of-CURP-Server/image4.png) + +## Summary + +In this article, we discussed how the Curp Server in Xline interacts with the business Servers. The business Server initiates requests to the Curp Server through the RPC interfaces predefined by Curp Server. Curp Server, on the other hand, notifies the business Server through two different types of traits. The command-related Traits, such as Command, ConflictCheck, and CommandExecutor, are mainly responsible for notifying the business Server after reaching consensus on commands. The RoleChange trait mainly notifies the business Server when the role of a cluster node changes. + +In Xline, the Curp Server is divided into two parts: the front-end CurpNode and the backend RawCurp. CurpNode mainly handles synchronous RPC call requests and forwards the requests to RawCurp for asynchronous execution. RawCurp submits commands to the conflict_checked_channel, with the command workers responsible for execution. After execution, the result is inserted into cmd_board, notifying CurpNode of the execution result. +`,U5=`--- + cover: /xline-home/blog/CURP-State-Machine-Engine/cover.png + author: + name: Jiawei Zhao + url: https://github.com/Phoenix500526 + img_url: https://avatars.githubusercontent.com/u/9337239?v=4 + read_time: 20 +--- + +In the previous article on code interpretation, we briefly explained how the CurpServer of Xline is implemented. Now, let's delve deeper into some core data structures in the CurpServer, particularly the conflict_checked_channel and command worker, as they collaborate to drive the state transitions of the internal state machine in the CurpServer. + +--- + +In the previous article on code interpretation, we briefly explained how the CurpServer of Xline is implemented. Now, let's delve deeper into some core data structures in the CurpServer, particularly the conflict_checked_channel and command worker, as they collaborate to drive the state transitions of the internal state machine in the CurpServer. + +## Why do we need a conflict detection queue? + +The conflict detection queue serves as a multi-producer multi-consumer channel, and its primary responsibility is to maintain dynamical conflict relationships. It ensures that, at any given time, all receivers will not receive conflicting commands. The order of commands received by the receiver (referred to as the "conflict order") follows these criteria: + +1. If cmd A conflicts with cmd B, and A is enqueued before B, A will be dequeued first. B can only be dequeued after A has executed. +2. If cmd A doesn't conflict with cmd B, and A is enqueued before B, they will be dequeued in FIFO order, with A dequeued first and B afterwards. + +Understanding this in text might seem abstract, but no worries. Let's look at a simple example: Assume we now have commands A, B, and C. They enter the conflict detection queue in the order A, B, and C. Where A conflicts with B, and C does not conflict with either A or B, the initial state of the conflict detection queue is as follows: + +![图片](/xline-home/blog/CURP-State-Machine-Engine/image1.PNG) + +After A, B, and C enter the queue, three different cmd_workers retrieve commands from the channel. Since cmd_worker_1 receives A first, B remains in the queue due to its conflict with A. C, having no conflicts, can be received by cmd_worker_2. B will only be dequeued after A has been executed and dropped, as illustrated in the following diagram: + +![图片](/xline-home/blog/CURP-State-Machine-Engine/image2.PNG) + +Some readers might question why we introduce another conflict detection queue when the spec_pool's duty is to determine conflicts in the fast path, corresponding to the "witness" in the CURP paper. There are two main reasons for this: + +1. Every command, whether it's on the fast path or the slow path, must ultimately be executed on the leader. Hence, the leader must find a reasonable execution order among these mixed commands to ensure the execution does not break CURP's assumptions about command execution order. Spec_pool only stores commands executable in the fast path and doesn't involve commands in the slow path. +2. During the consensus process, we first determine whether a command exists in the spec_pool. This is a synchronous operation. If we put the complicated conflict order calculations into the spec_pool, it would easily create a bottleneck. Hence, we split the responsibilities of determining conflicts and calculating conflict order, placing the former in the synchronous spec_pool and the latter in the asynchronous conflict detection queue. + +## How does the conflict detection queue work? + +To understand the working principle of the conflict detection queue, we need to address two questions: + +1. How should we model the conflict relationships? +2. Given dynamic conflict relationships, how do we quickly identify all non-conflicting commands? + +For the first question, we can view all commands as vertices in a Directed Acyclic Graph (DAG), with the conflict relationships represented as directed edges between vertices. Suppose there's a conflict between command A and command B (A arrives before B), we can represent this conflict with an arc , where the head of the arc always points to the later-arriving vertex (this ensures no cycles in the graph). + +Once we define the conflict relationship as an edge in a disconnected DAG, the problem of determining the conflict order when executing a command becomes a matter of finding the topological order of the connected component in the DAG that the command belongs to. For each command, successors store which cmds conflict with the current cmd. The length of successors represents the out-degree of the vertex. Predecessor_cnt represents the in-degree, indicating how many preceding cmds conflict with the current cmd. + +Returning to the earlier example of commands A, B, and C, when using a DAG to describe their conflict relationships, the situation is shown in the following diagram: + +![图片](/xline-home/blog/CURP-State-Machine-Engine/image3.PNG) + +When cmd_workers retrieve commands from the channel, the channel only needs to traverse each connected component of this DAG and find the first vertex with an in-degree of 0. Only after the command has been executed will the channel update B's predecessor_cnt to resolve the conflict between A and B. + +## Architecture of the state machine engine + +As mentioned at the beginning of this article, the conflict detection queue and command worker together constitute the state machine engine of CurpServer. The conflict detection queue supplies conflict-free commands to the command workers, which then executes these commands and updates the conflict relationships in the conflict detection queue based on the results. + +Structurally, the CurpServer's state machine engine consists of three pairs of channels and a filter. These three channel pairs are: +(send_tx, filter_rx), (filter_tx, recv_rx), and (done_tx, done_rx). The specific structure can be seen in the diagram below: + +![图片](/xline-home/blog/CURP-State-Machine-Engine/image4.PNG) + +The data flow direction is: send_tx -> filter_rx -> filter -> filter_tx -> recv_rx -> done_tx -> done_rx. + +Here, the send_tx owned by the RawCurp object is responsible for sending the corresponding CEEvent to the Conflict Detection Queue during propose (corresponding to CURP's fast path) and applying logs (corresponding to CURP's slow path). After determining the conflict order, the Conflict Detection Queue converts the CEEvent into a Task and delivers it to the command worker for execution via (filter_tx, recv_rx). After executing the Task, the command worker sends the results back to the Conflict Detection Queue through (done_tx, done_rx) and updates the vertex information in the dependency graph. + +## How States Transition + +To understand the working principle of a state machine, we need to address the following two questions: + +1. What events and states are provided by the state machine? +2. Which events will cause the state to transition? + +Let's first look at the events provided by the Curp Server's state machine engine. + +\`\`\`rust +/// Event for command executor +enum CEEvent { + /// The cmd is ready for speculative execution + SpecExeReady(Arc>), + /// The cmd is ready for after sync + ASReady(Arc>), + /// omit some code... +} + +/// CE task +struct Task { + /// Corresponding vertex id + vid: u64, + /// Task type + inner: TaskType, +} + +/// Task Type +enum TaskType { + /// Execute a cmd + SpecExe(Arc>, Option), + /// After sync a cmd + AS(Arc>, C::PR), + /// omit some code... +} +\`\`\` + +From the previous description, we can see that the main events of the CurpServer's state machine engine can be divided into two types. One type is CEEvent, which describes the information of the command itself, including the source of the command. Here, SpecExeReady indicates that the command comes from the fast path, while ASReadey indicates that it comes from the slow path. The other type is Task, describing the vertex id of the command in the dependency graph and the operations that the current command needs to perform. + +The state machine engine of CurpServer also defines the following states: + +\`\`\`rust +/// Execute state of a cmd +enum ExeState { + /// Is ready to execute + ExecuteReady, + /// Executing + Executing, + /// Has been executed, and the result + Executed(bool), +} + +/// After sync state of a cmd +enum AsState { + /// Not Synced yet + NotSynced(Option), + /// Is ready to do after sync + AfterSyncReady(Option), + /// Is doing after syncing + AfterSyncing, + /// Has been after synced + AfterSynced, +} +\`\`\` + +Here, ExeState represents the execution state of the command, while AsState represents whether the command has completed the after_sync phase. CurpServer uses a combination of ExeState and AsState to represent different stages in the command execution process. The semantics represented by different states are as follows: + +- (ExecuteReady, NotSynced(None)): Represents that the command is ready to proceed to the execute phase and that the command belongs to the fast path. There's no need to wait for the after_sync to complete before returning results to the user. This state is also the initial state of the state machine engine in the fast path. +- (ExecuteReady, AfterSyncRead(None)): Indicates the command is ready for the execute phase and belongs to the slow path. It needs to wait for after_sync to finish before results can be returned to the user. This is also the initial state of the state machine engine in the slow path. +- (Executing, NotSynced(Some(C::PR))): Represents successful pre_execute execution of the command, having obtained the execution result of pre_execute as Some(C::PR), and the command has also entered the execution state. +- (Executing, NotSynced(None)): Represents the failure of the command's pre_execute phase. +- (Executed(true), NotSynced(Some(C::PR))): Represents successful command execution. +- (Executed(false), NotSynced(None)): Indicates a command failure in the fast path. +- (Executed(true), AfterSyncRead(LogIndex, Some(C::PR))): Indicates the command has been executed and is preparing for the after_sync phase. +- (Executed(true), AfterSyncing): Represents the command has been executed and is currently in the after_sync phase. +- (Executed(true), AfterSynced): Indicates the successful command execution, and the after_sync phase was also successful. +- (Executing, AfterSyncReady(Some(C::PR))): Represents the command is executing and is preparing for the after_sync phase. +- (Executing, AfterSyncReady(None)): Represents the failure of the command's pre_execute phase. +- (Executed(false), AfterSyncReady(None)): Indicates a command failure in the slow path. + +The relationship between various state transitions is as follows: + +![图片](/xline-home/blog/CURP-State-Machine-Engine/image5.png) + +## Summary + +In Xline, whether commands are from the fast path or the slow path, these commands will eventually be executed on the leader node. It is evident that just relying on spec_pool to determine if there's a command conflict is not enough. This is because spec_pool can only judge whether a new command conflicts with a command that is currently in the execute phase but hasn't gone through the after_sync yet. It cannot dynamically maintain command conflict relationships. To address the dynamic maintenance of conflict relationships, we introduced the Conflict Detection Queue and constructed the CurpServer's state machine engine in conjunction with the command worker. Through the execution by the command worker, commands from different paths (fast path and slow path) can transition states based on their current state and return corresponding results to users. +`,j5=`--- + cover: /xline-home/blog/Xline-Command-Deduplication-Mechanism-(Part-One)—Introduction-to-RIFL/cover.png + author: + name: Hengyu Wang + url: https://github.com/GTwhy + img_url: https://avatars.githubusercontent.com/u/32484423?v=4 + read_time: 20 +--- + +In a system that receives external commands, it is common for a command to be executed at least once, which we refer to as at-least-once semantics. If a command fails, the system often implements a retry mechanism to attempt to resolve the issue. This raises a problem: repeated submission of the same command can impact the system's state. + +--- + +## Why is deduplication of commands necessary? + +In a system that receives external commands, it is common for a command to be executed at least once, which we refer to as at-least-once semantics. If a command fails, the system often implements a retry mechanism to attempt to resolve the issue. This raises a problem: repeated submission of the same command can impact the system's state. + +For example, to achieve linearizable semantics (where each user operation appears to be executed immediately, exactly once, and at some point between its invocation and response), it's necessary to deduplicate commands. In Raft implementations without command deduplication, a command might be executed multiple times. The leader might crash after committing but before responding to the client, and if the client retries the same command with a new leader, the command could be executed twice. + +There are two solutions to this problem: one is similar to the etcd approach, which distinguishes between commands that can be retried and commands that cannot be retried, and returns the error results of the commands that cannot be retried to the user, without providing any guarantees, even though the command may have already been executed by the system. Another option is to implement a command tracking mechanism that checks the commands executed in the system to realize command de-duplication. When the system implements this deduplication mechanism, it can realize exactly-once semantics of command execution, and thus realize a higher level of consistency assurance. + +The implementation of retries in etcd's gRPC client interceptor: + +\`\`\`go +// unaryClientInterceptor returns a new retrying unary client interceptor. +// +// The default configuration of the interceptor is to not retry *at all*. This behaviour can be +// changed through options (e.g. WithMax) on creation of the interceptor or on call (through grpc.CallOptions). +func (c *Client) unaryClientInterceptor(optFuncs ...retryOption) grpc.UnaryClientInterceptor { + intOpts := reuseOrNewWithCallOptions(defaultOptions, optFuncs) + return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { + ctx = withVersion(ctx) + grpcOpts, retryOpts := filterCallOptions(opts) + callOpts := reuseOrNewWithCallOptions(intOpts, retryOpts) + ... + var lastErr error + for attempt := uint(0); attempt < callOpts.max; attempt++ { + if err := waitRetryBackoff(ctx, attempt, callOpts); err != nil { + return err + } + + ... + + lastErr = invoker(ctx, method, req, reply, cc, grpcOpts...) + if lastErr == nil { + return nil + } + + ... + + // Retry here + if !isSafeRetry(c, lastErr, callOpts) { + return lastErr + } + } + return lastErr + } +} +\`\`\` + +## At what stage is deduplication completed? + +First, it's important to understand the purpose of deduplication: to prevent duplicate commands from affecting the state machine. There are two stages where commands can be deduplicated: upon receiving the command and when applying it to the state machine. + +Regardless of the method, a data structure is needed to track the progress of received and executed commands for deduplicating incoming client commands. + +Deduplicating commands at the stage of applying them to the state machine naturally involves using the backend storage of the state machine to retrieve previously executed commands (for example, Log::get_cmd_ids can retrieve all command IDs in the log). This set of command IDs can be used to deduplicate commands about to be applied to the state machine. + +To deduplicate upon receiving a command, an additional data structure must be maintained, typically in memory for efficient read-write access. This structure should not occupy a significant amount of memory and may need a garbage collection mechanism. + +For the first approach, a primary issue is that log compaction mechanisms can render the deduplication ineffective. In Raft systems, log compaction is implemented to prevent excessive memory usage by logs. If a command log has been compacted, deduplication for the repeated command becomes impossible. Secondly, duplicate commands still undergo preparation and speculative execution before being sent to the state machine, consuming additional CPU. Finally, accessing the state machine is costly, and this method of deduplication can significantly impact performance. + +Therefore, it's more efficient to deduplicate commands upon receipt, rejecting duplicate command submissions as early as possible. + +## Current Flaws in Command Deduplication Design + +In Xline CURP, commands are implemented as a trait by external mechanisms. Unlike etcd, we do not differentiate the retry behavior of some commands, so we have not defined retry characteristics in the command trait. + +Currently, the CURP client retries all commands, so a simple deduplication mechanism has been implemented in the curp server: + +The CommandBoard contains an IndexSet for recording the IDs of previously executed commands. + +\`\`\`rust +/// Command board is a buffer to track cmd states and store notifiers for requests that need to wait for a cmd +#[derive(Debug)] +pub(super) struct CommandBoard { + ... + /// The cmd has been received before, this is used for dedup + pub(super) sync: IndexSet, + ... +} +\`\`\` + +Thus, we can deduplicate commands at the propose stage with an O(1) overhead. + +\`\`\`rust +pub(super) fn handle_propose( + &self, + cmd: Arc, + ) -> Result<((Option, u64), Result), CurpError> { + ... + if !self.ctx.cb.map_write(|mut cb_w| cb_w.sync.insert(id)) { + return Ok((info, Err(ProposeError::Duplicated))); + } + ... + } +\`\`\` + +To ensure that CURP does not lose the IDs of commands currently being executed during a leadership transfer, this structure is also restored in the recovery of the Speculative Pool. + +\`\`\`rust +/// Recover from all voter's spec pools + fn recover_from_spec_pools( + &self, + st: &mut State, + log: &mut Log, + spec_pools: HashMap>>, + ) { + ... + for cmd in recovered_cmds { + let _ig_sync = cb_w.sync.insert(cmd.id()); // may have been inserted before + ... + } + } +\`\`\` + +Finally, to prevent the IndexSet from occupying too much memory, the GC mechanism mentioned in the Xline source code analysis article periodically clears this structure. + +However, under extreme network conditions, if the interval between a client initiating a command and receiving a response exceeds the GC interval, the ProposeId recorded in the IndexSet might be cleared by GC. In such cases, if the client retries the command, the deduplication mechanism would fail. We observed this extreme scenario in madsim tests (due to madsim's clock running much faster than real time, this issue was triggered), necessitating a new deduplication structure to address the problem. The latter part of this article will introduce the working principle of RIFL (Reusable Infrastructure for Linearizability) and how it is applied in CURP. + +## Introduction to RIFL + +[RIFL (Reusable Infrastructure for Linearizability)](https://web.stanford.edu/~ouster/cgi-bin/papers/rifl.pdf) is an infrastructure designed to ensure exactly-once semantics for RPCs (remote procedure calls) in large-scale clusters. To align the terminology of RIFL with that of the Xline system, in this context, RPCs and Commands are synonymous. + +## Overview of RIFL + +In RIFL, each RPC is assigned a unique identifier, composed of a 64-bit client_id and a 64-bit incrementing sequence_number under this client_id. + +A system-wide structure, typically a Lease Manager module in RIFL, generates the client_id. This module assigns a client_id to each client and creates a corresponding lease, which clients must continually keep alive. Servers need to check this lease to determine if a client has crashed. + +Furthermore, RIFL requires persistent tracking and recording of completed RPCs. During system migrations, these completion records must also be transferred to ensure that RIFL maintains the non-repetition of RPCs during the migration process. RPCs that have been executed previously will directly retrieve their prior completion records. + +Finally, RPC completion records should be cleared upon client confirmation (or after a client crash) to safely remove unnecessary storage. + +## Specific Components and Functions of RIFL + +The following are key components of RIFL and their corresponding functions: + +1. Request Tracker (Client-Side): Tracks commands sent by the client. + - newSequenceNum(): Generates an incrementing sequence number for an RPC. + - firstIncomplete(): Retrieves the current smallest sequence number for which the RPC response has not been received. + - rpcComplete(sequenceNumber): Marks the given sequenceNumber as received, which is later used to update firstIncomplete. +2. Lease Manager: A unified Lease Manager module where clients renew their client_id, and servers check the expiration of client_id leases. + - getClientId(): Clients obtain their client_id, or request the lease server to create one if it doesn't exist. + - checkAlive(clientId): Servers check whether the lease for a given client_id has expired to determine if the client is alive. +3. Result Tracker (Server-Side): Tracks received commands and the progress confirmed by the client. + - checkDuplicate(clientId, sequenceNumber): Determines if an RPC is a duplicate based on completion records. + - recordCompletion(clientId, sequenceNumber, completionRecord): Marks an RPC as executed and stores the completionRecord before returning to the client. + - processAck(clientId, firstIncomplete): Recycles all completion records for RPCs preceding firstIncomplete for a client. + +![图片]() + +When a server receives an RPC (client_id, seq_num, first_incomplete), it checks the RPC's status using checkDuplicate: + +1. NEW: A new RPC, processed according to standard logic. +2. COMPLETED: An already completed RPC, returning the completion record. +3. IN_PROGRESS: An RPC that is currently being executed, returning an IN_PROGRESS error. +4. STALE: An RPC that has been acknowledged and recycled by the client, returning a STALE error. + +Additionally, the server uses the first_incomplete field from the incoming RPC to call processAck, recycling the completion records of acknowledged RPCs. Lastly, when an RPC is completed and before returning to the client, recordCompletion is called to persist the completion record and mark the RPC as COMPLETED. + +Furthermore, the server checks if the client_id's lease is still valid to determine if a client is alive. If the lease has expired, all completion records under that client_id are recycled. + +## Performance Analysis of RIFL + +In the RIFL architecture, a noticeable overhead arises from the communication between clients and servers with the Lease Manager. The RIFL paper mentions that servers can cache the expiration time of a client_id lease and query the Lease Manager only as it nears expiration, reducing network communication. + +In the aforementioned processes, either checkDuplicate or processAck involves at least one O(n) complexity operation (either checking duplicates in sequenceNumber order or filtering unordered sequenceNumbers but needing to traverse and filter those less than first_incomplete for processAck). Compared to the O(1) complexity of the previous IndexSet approach, RIFL incurs some additional overhead. Performance can be optimized by making processAck a separate RPC to notify the server to recycle completion records. + +Finally, since the first mechanism for recycling only checks first_incomplete, it may encounter a long-running RPC that blocks the recycling of subsequent RPC completion records, potentially leading to excessive memory usage on the server. The RIFL paper suggests setting a maximum number of inflight RPCs for a client, refusing excess RPCs, and considering early recycling of subsequent RPC completion records, which could make RIFL more complex. + +## Summary + +The above describes the mechanism by which RIFL maintains exactly-once semantics for unary RPCs. Section 6 of the RIFL paper, titled "Implementing Transactions with RIFL," details the mechanism for maintaining exactly-once semantics for transactions involving multiple objects. However, as transactions in the Xline system are sent to the server as a single command, they do not require separate handling. Readers interested in this aspect can refer to the paper for more details, as it will not be elaborated upon here. + +The first half of this article begins with the need for command deduplication and discusses the existing problems with the current deduplication mechanism in Xline. The latter half details the working principle of RIFL (Reusable Infrastructure for Linearizability) and provides a performance analysis. Future articles will continue to discuss how RIFL is applied in Xline, along with necessary modifications and optimizations made to RIFL. +`,N1=Symbol.for("yaml.alias"),Rm=Symbol.for("yaml.document"),va=Symbol.for("yaml.map"),q5=Symbol.for("yaml.pair"),Fi=Symbol.for("yaml.scalar"),Po=Symbol.for("yaml.seq"),gr=Symbol.for("yaml.node.type"),gs=e=>!!e&&typeof e=="object"&&e[gr]===N1,Mc=e=>!!e&&typeof e=="object"&&e[gr]===Rm,ys=e=>!!e&&typeof e=="object"&&e[gr]===va,Rt=e=>!!e&&typeof e=="object"&&e[gr]===q5,xt=e=>!!e&&typeof e=="object"&&e[gr]===Fi,zo=e=>!!e&&typeof e=="object"&&e[gr]===Po;function Pt(e){if(e&&typeof e=="object")switch(e[gr]){case va:case Po:return!0}return!1}function Yt(e){if(e&&typeof e=="object")switch(e[gr]){case N1:case va:case Fi:case Po:return!0}return!1}const Xz=e=>(xt(e)||Pt(e))&&!!e.anchor;class M1{constructor(t){Object.defineProperty(this,gr,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}}const Pn=Symbol("break visit"),H5=Symbol("skip children"),ti=Symbol("remove node");function Sa(e,t){const n=W5(t);Mc(e)?Xs(null,e.contents,n,Object.freeze([e]))===ti&&(e.contents=null):Xs(null,e,n,Object.freeze([]))}Sa.BREAK=Pn;Sa.SKIP=H5;Sa.REMOVE=ti;function Xs(e,t,n,r){const i=Y5(e,t,n,r);if(Yt(i)||Rt(i))return V5(e,r,i),Xs(e,i,n,r);if(typeof i!="symbol"){if(Pt(t)){r=Object.freeze(r.concat(t));for(let a=0;ae.replace(/[!,[\]{}]/g,t=>Qz[t]);class Sn{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Sn.defaultYaml,t),this.tags=Object.assign({},Sn.defaultTags,n)}clone(){const t=new Sn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Sn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Sn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Sn.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Sn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Sn.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[a,s]=r;return this.tags[a]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[a]=r;if(a==="1.1"||a==="1.2")return this.yaml.version=a,!0;{const s=/^\d+\.\d+$/.test(a);return n(6,`Unsupported YAML version ${a}`,s),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const s=t.slice(2,-1);return s==="!"||s==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),s)}const[,r,i]=t.match(/^(.*!)([^!]*)$/);i||n(`The ${t} tag has no suffix`);const a=this.tags[r];return a?a+decodeURIComponent(i):r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+Zz(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(t&&r.length>0&&Yt(t.contents)){const a={};Sa(t.contents,(s,o)=>{Yt(o)&&o.tag&&(a[o.tag]=!0)}),i=Object.keys(a)}else i=[];for(const[a,s]of r)a==="!!"&&s==="tag:yaml.org,2002:"||(!t||i.some(o=>o.startsWith(s)))&&n.push(`%TAG ${a} ${s}`);return n.join(` +`)}}Sn.defaultYaml={explicit:!1,version:"1.2"};Sn.defaultTags={"!!":"tag:yaml.org,2002:"};function G5(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function K5(e){const t=new Set;return Sa(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function X5(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function Jz(e,t){const n=[],r=new Map;let i=null;return{onAnchor:a=>{n.push(a),i||(i=K5(e));const s=X5(t,i);return i.add(s),s},setAnchors:()=>{for(const a of n){const s=r.get(a);if(typeof s=="object"&&s.anchor&&(xt(s.node)||Pt(s.node)))s.node.anchor=s.anchor;else{const o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=a,o}}},sourceObjects:r}}class s0 extends M1{constructor(t){super(N1),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let n;return Sa(t,{Node:(r,i)=>{if(i===this)return Sa.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:a}=n,s=this.resolve(i);if(!s){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}const o=r.get(s);if(!o||o.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(a>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=ad(i,s,r)),o.count*o.aliasCount>a)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return o.res}toString(t,n,r){const i=`*${this.source}`;if(t){if(G5(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(a)}if(t.implicitKey)return`${i} `}return i}}function ad(e,t,n){if(gs(t)){const r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Pt(t)){let r=0;for(const i of t.items){const a=ad(e,i,n);a>r&&(r=a)}return r}else if(Rt(t)){const r=ad(e,t.key,n),i=ad(e,t.value,n);return Math.max(r,i)}return 1}function ni(e,t,n){if(Array.isArray(e))return e.map((r,i)=>ni(r,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!Xz(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=a=>{r.res=a,delete n.onCreate};const i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}const Q5=e=>!e||typeof e!="function"&&typeof e!="object";class je extends M1{constructor(t){super(Fi),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:ni(this.value,t,n)}toString(){return String(this.value)}}je.BLOCK_FOLDED="BLOCK_FOLDED";je.BLOCK_LITERAL="BLOCK_LITERAL";je.PLAIN="PLAIN";je.QUOTE_DOUBLE="QUOTE_DOUBLE";je.QUOTE_SINGLE="QUOTE_SINGLE";const eF="tag:yaml.org,2002:";function tF(e,t,n){if(t){const r=n.filter(a=>a.tag===t),i=r.find(a=>!a.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>{var i;return((i=r.identify)==null?void 0:i.call(r,e))&&!r.format})}function nc(e,t,n){var d,f;if(Mc(e)&&(e=e.contents),Yt(e))return e;if(Rt(e)){const p=(f=(d=n.schema[va]).createNode)==null?void 0:f.call(d,n.schema,null,n);return p.items.push(e),p}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:s,sourceObjects:o}=n;let l;if(r&&e&&typeof e=="object"){if(l=o.get(e),l)return l.anchor||(l.anchor=i(e)),new s0(l.anchor);l={anchor:null,node:null},o.set(e,l)}t!=null&&t.startsWith("!!")&&(t=eF+t.slice(2));let c=tF(e,t,s.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const p=new je(e);return l&&(l.node=p),p}c=e instanceof Map?s[va]:Symbol.iterator in Object(e)?s[Po]:s[va]}a&&(a(c),delete n.onTagObj);const u=c!=null&&c.createNode?c.createNode(n.schema,e,n):new je(e);return t&&(u.tag=t),l&&(l.node=u),u}function Qd(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){const a=t[i];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){const s=[];s[a]=r,r=s}else r=new Map([[a,r]])}return nc(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const dl=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class o0 extends M1{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>Yt(r)||Rt(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(dl(t))this.add(n);else{const[r,...i]=t,a=this.get(r,!0);if(Pt(a))a.addIn(i,n);else if(a===void 0&&this.schema)this.set(r,Qd(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(Pt(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...i]=t,a=this.get(r,!0);return i.length===0?!n&&xt(a)?a.value:a:Pt(a)?a.getIn(i,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Rt(n))return!1;const r=n.value;return r==null||t&&xt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const i=this.get(n,!0);return Pt(i)?i.hasIn(r):!1}setIn(t,n){const[r,...i]=t;if(i.length===0)this.set(r,n);else{const a=this.get(r,!0);if(Pt(a))a.setIn(i,n);else if(a===void 0&&this.schema)this.set(r,Qd(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}o0.maxFlowStringSingleLineLength=60;const nF=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Ei(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const sa=(e,t,n)=>e.endsWith(` +`)?Ei(n,t):n.includes(` +`)?` +`+Ei(n,t):(e.endsWith(" ")?"":" ")+n,Z5="flow",Im="block",sd="quoted";function l0(e,t,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:s,onOverflow:o}={}){if(!i||i<0)return e;const l=Math.max(1+a,1+i-t.length);if(e.length<=l)return e;const c=[],u={};let d=i-t.length;typeof r=="number"&&(r>i-Math.max(2,a)?c.push(0):d=i-r);let f,p,m=!1,h=-1,w=-1,y=-1;n===Im&&(h=Hw(e,h),h!==-1&&(d=h+l));for(let x;x=e[h+=1];){if(n===sd&&x==="\\"){switch(w=h,e[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}y=h}if(x===` +`)n===Im&&(h=Hw(e,h)),d=h+l,f=void 0;else{if(x===" "&&p&&p!==" "&&p!==` +`&&p!==" "){const _=e[h+1];_&&_!==" "&&_!==` +`&&_!==" "&&(f=h)}if(h>=d)if(f)c.push(f),d=f+l,f=void 0;else if(n===sd){for(;p===" "||p===" ";)p=x,x=e[h+=1],m=!0;const _=h>y+1?h-2:w-1;if(u[_])return e;c.push(_),u[_]=!0,d=_+l,f=void 0}else m=!0}p=x}if(m&&o&&o(),c.length===0)return e;s&&s();let v=e.slice(0,c[0]);for(let x=0;x({indentAtStart:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),u0=e=>/^(%|---|\.\.\.)/m.test(e);function rF(e,t,n){if(!t||t<0)return!1;const r=t-n,i=e.length;if(i<=r)return!1;for(let a=0,s=0;ar)return!0;if(s=a+1,i-s<=r)return!1}return!0}function Tl(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(u0(e)?" ":"");let s="",o=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(s+=n.slice(o,l)+"\\ ",l+=1,o=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{s+=n.slice(o,l);const u=n.substr(l+2,4);switch(u){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:u.substr(0,2)==="00"?s+="\\x"+u.substr(2):s+=n.substr(l,6)}l+=5,o=l+1}break;case"n":if(r||n[l+2]==='"'||n.length +`;let d,f;for(f=n.length;f>0;--f){const E=n[f-1];if(E!==` +`&&E!==" "&&E!==" ")break}let p=n.substring(f);const m=p.indexOf(` +`);m===-1?d="-":n===p||m!==p.length-1?(d="+",a&&a()):d="",p&&(n=n.slice(0,-p.length),p[p.length-1]===` +`&&(p=p.slice(0,-1)),p=p.replace(/\n+(?!\n|$)/g,`$&${c}`));let h=!1,w,y=-1;for(w=0;w")+(h?c?"2":"1":"")+d;if(e&&(_+=" "+o(e.replace(/ ?[\r\n]+/g," ")),i&&i()),u)return n=n.replace(/\n+/g,`$&${c}`),`${_} +${c}${v}${n}${p}`;n=n.replace(/\n+/g,` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);const A=l0(`${v}${n}${p}`,c,Im,c0(r));return`${_} +${c}${A}`}function iF(e,t,n,r){const{type:i,value:a}=e,{actualString:s,implicitKey:o,indent:l,indentStep:c,inFlow:u}=t;if(o&&/[\n[\]{},]/.test(a)||u&&/[[\]{},]/.test(a))return Zs(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return o||u||!a.includes(` +`)?Zs(a,t):od(e,t,n,r);if(!o&&!u&&i!==je.PLAIN&&a.includes(` +`))return od(e,t,n,r);if(u0(a)){if(l==="")return t.forceBlockIndent=!0,od(e,t,n,r);if(o&&l===c)return Zs(a,t)}const d=a.replace(/\n+/g,`$& +${l}`);if(s){const f=h=>{var w;return h.default&&h.tag!=="tag:yaml.org,2002:str"&&((w=h.test)==null?void 0:w.test(d))},{compat:p,tags:m}=t.doc.schema;if(m.some(f)||p!=null&&p.some(f))return Zs(a,t)}return o?d:l0(d,l,Z5,c0(t))}function Rc(e,t,n,r){const{implicitKey:i,inFlow:a}=t,s=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==je.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(o=je.QUOTE_DOUBLE);const l=u=>{switch(u){case je.BLOCK_FOLDED:case je.BLOCK_LITERAL:return i||a?Zs(s.value,t):od(s,t,n,r);case je.QUOTE_DOUBLE:return Tl(s.value,t);case je.QUOTE_SINGLE:return Om(s.value,t);case je.PLAIN:return iF(s,t,n,r);default:return null}};let c=l(o);if(c===null){const{defaultKeyType:u,defaultStringType:d}=t.options,f=i&&u||d;if(c=l(f),c===null)throw new Error(`Unsupported default string type ${f}`)}return c}function J5(e,t){const n=Object.assign({blockQuote:!0,commentString:nF,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function aF(e,t){var i;if(t.tag){const a=e.filter(s=>s.tag===t.tag);if(a.length>0)return a.find(s=>s.format===t.format)??a[0]}let n,r;if(xt(t)){r=t.value;const a=e.filter(s=>{var o;return(o=s.identify)==null?void 0:o.call(s,r)});n=a.find(s=>s.format===t.format)??a.find(s=>!s.format)}else r=t,n=e.find(a=>a.nodeClass&&r instanceof a.nodeClass);if(!n){const a=((i=r==null?void 0:r.constructor)==null?void 0:i.name)??typeof r;throw new Error(`Tag not resolved for ${a} value`)}return n}function sF(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],a=(xt(e)||Pt(e))&&e.anchor;a&&G5(a)&&(n.add(a),i.push(`&${a}`));const s=e.tag?e.tag:t.default?null:t.tag;return s&&i.push(r.directives.tagString(s)),i.join(" ")}function cs(e,t,n,r){var l;if(Rt(e))return e.toString(t,n,r);if(gs(e)){if(t.doc.directives)return e.toString(t);if((l=t.resolvedAliases)!=null&&l.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i;const a=Yt(e)?e:t.doc.createNode(e,{onTagObj:c=>i=c});i||(i=aF(t.doc.schema.tags,a));const s=sF(a,i,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const o=typeof i.stringify=="function"?i.stringify(a,t,n,r):xt(a)?Rc(a,t,n,r):a.toString(t,n,r);return s?xt(a)||o[0]==="{"||o[0]==="["?`${s} ${o}`:`${s} +${t.indent}${o}`:o}function oF({key:e,value:t},n,r,i){const{allNullValues:a,doc:s,indent:o,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:d}}=n;let f=Yt(e)&&e.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(Pt(e)){const R="With simple keys, collection cannot be used as a key value";throw new Error(R)}}let p=!d&&(!e||f&&t==null&&!n.inFlow||Pt(e)||(xt(e)?e.type===je.BLOCK_FOLDED||e.type===je.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:o+l});let m=!1,h=!1,w=cs(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&w.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),w===""?"?":p?`? ${w}`:w}else if(a&&!d||t==null&&p)return w=`? ${w}`,f&&!m?w+=sa(w,n.indent,c(f)):h&&i&&i(),w;m&&(f=null),p?(f&&(w+=sa(w,n.indent,c(f))),w=`? ${w} +${o}:`):(w=`${w}:`,f&&(w+=sa(w,n.indent,c(f))));let y,v,x;Yt(t)?(y=!!t.spaceBefore,v=t.commentBefore,x=t.comment):(y=!1,v=null,x=null,t&&typeof t=="object"&&(t=s.createNode(t))),n.implicitKey=!1,!p&&!f&&xt(t)&&(n.indentAtStart=w.length+1),h=!1,!u&&l.length>=2&&!n.inFlow&&!p&&zo(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let _=!1;const A=cs(t,n,()=>_=!0,()=>h=!0);let E=" ";if(f||y||v){if(E=y?` +`:"",v){const R=c(v);E+=` +${Ei(R,n.indent)}`}A===""&&!n.inFlow?E===` +`&&(E=` + +`):E+=` +${n.indent}`}else if(!p&&Pt(t)){const R=A[0],F=A.indexOf(` +`),q=F!==-1,K=n.inFlow??t.flow??t.items.length===0;if(q||!K){let W=!1;if(q&&(R==="&"||R==="!")){let G=A.indexOf(" ");R==="&"&&G!==-1&&Ge===Ww||xt(e)&&e.value===Ww&&(!e.type||e.type===je.PLAIN);function $f(e,t,n){const r=e&&gs(n)?n.resolve(e.doc):n;if(!ys(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,e,Map);for(const[a,s]of i)t instanceof Map?t.has(a)||t.set(a,s):t instanceof Set?t.add(a):Object.prototype.hasOwnProperty.call(t,a)||Object.defineProperty(t,a,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function cF(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Yt(e)&&n&&n.doc){const r=J5(n.doc,{});r.anchors=new Set;for(const a of n.anchors.keys())r.anchors.add(a.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=e.toString(r);if(!n.mapKeyWarned){let a=JSON.stringify(i);a.length>40&&(a=a.substring(0,36)+'..."'),e7(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${a}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(t)}function R1(e,t,n){const r=nc(e,void 0,n),i=nc(t,void 0,n);return new yn(r,i)}class yn{constructor(t,n=null){Object.defineProperty(this,gr,{value:q5}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return Yt(n)&&(n=n.clone(t)),Yt(r)&&(r=r.clone(t)),new yn(n,r)}toJSON(t,n){const r=n!=null&&n.mapAsMap?new Map:{};return t7(n,r,this)}toString(t,n,r){return t!=null&&t.doc?oF(this,t,n,r):JSON.stringify(this)}}function n7(e,t,n){return(t.inFlow??e.flow?dF:uF)(e,t,n)}function uF({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:s,onComment:o}){const{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:a,type:null});let d=!1;const f=[];for(let m=0;mw=null,()=>d=!0);w&&(y+=sa(y,a,c(w))),d&&w&&(d=!1),f.push(r+y)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let m=1;mx=null);yf||_.includes(` +`))&&(d=!0),p.push(_),f=p.length}let m;const{start:h,end:w}=r;if(p.length===0)m=h+w;else if(d||(d=p.reduce((v,x)=>v+x.length+2,2)>o0.maxFlowStringSingleLineLength),d){m=h;for(const y of p)m+=y?` +${o}${s}${y}`:` +`;m+=` +${s}${w}`}else m=`${h}${l}${p.join(" ")}${l}${w}`;return e&&(m+=sa(m,c(e),s),a&&a()),m}function Zd({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const a=Ei(t(r),e);n.push(a.trimStart())}}function Ga(e,t){const n=xt(t)?t.value:t;for(const r of e)if(Rt(r)&&(r.key===t||r.key===n||xt(r.key)&&r.key.value===n))return r}class cr extends o0{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(va,t),this.items=[]}add(t,n){var s;let r;Rt(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new yn(t,t==null?void 0:t.value):r=new yn(t.key,t.value);const i=Ga(this.items,r.key),a=(s=this.schema)==null?void 0:s.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);xt(i.value)&&Q5(r.value)?i.value.value=r.value:i.value=r.value}else if(a){const o=this.items.findIndex(l=>a(r,l)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(t){const n=Ga(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const r=Ga(this.items,t),i=r==null?void 0:r.value;return(!n&&xt(i)?i.value:i)??void 0}has(t){return!!Ga(this.items,t)}set(t,n){this.add(new yn(t,n),!0)}toJSON(t,n,r){const i=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(i);for(const a of this.items)t7(n,i,a);return i}toString(t,n,r){if(!t)return JSON.stringify(this);for(const i of this.items)if(!Rt(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),n7(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}function hF(e,t,n){const{keepUndefined:r,replacer:i}=n,a=new cr(e),s=(o,l)=>{if(typeof i=="function")l=i.call(t,o,l);else if(Array.isArray(i)&&!i.includes(o))return;(l!==void 0||r)&&a.items.push(R1(o,l,n))};if(t instanceof Map)for(const[o,l]of t)s(o,l);else if(t&&typeof t=="object")for(const o of Object.keys(t))s(o,t[o]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}const Fo={collection:"map",createNode:hF,default:!0,nodeClass:cr,tag:"tag:yaml.org,2002:map",resolve(e,t){return ys(e)||t("Expected a mapping for this tag"),e}};class bs extends o0{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Po,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Au(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Au(t);if(typeof r!="number")return;const i=this.items[r];return!n&&xt(i)?i.value:i}has(t){const n=Au(t);return typeof n=="number"&&n=0?t:null}function fF(e,t,n){const{replacer:r}=n,i=new bs(e);if(t&&Symbol.iterator in Object(t)){let a=0;for(let s of t){if(typeof r=="function"){const o=t instanceof Set?s:String(a++);s=r.call(t,o,s)}i.items.push(nc(s,void 0,n))}}return i}const Bo={collection:"seq",createNode:fF,default:!0,nodeClass:bs,tag:"tag:yaml.org,2002:seq",resolve(e,t){return zo(e)||t("Expected a sequence for this tag"),e}},d0={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),Rc(e,t,n,r)}},h0={identify:e=>e==null,createNode:()=>new je(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new je(null),stringify:({source:e},t)=>typeof e=="string"&&h0.test.test(e)?e:t.options.nullStr},I1={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new je(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&I1.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};function Ur({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let a=JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(a)){let s=a.indexOf(".");s<0&&(s=a.length,a+=".");let o=t-(a.length-s-1);for(;o-- >0;)a+="0"}return a}const r7={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ur},i7={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Ur(e)}},a7={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new je(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Ur},f0=e=>typeof e=="bigint"||Number.isInteger(e),O1=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function s7(e,t,n){const{value:r}=e;return f0(r)&&r>=0?n+r.toString(t):Ur(e)}const o7={identify:e=>f0(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>O1(e,2,8,n),stringify:e=>s7(e,8,"0o")},l7={identify:f0,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>O1(e,0,10,n),stringify:Ur},c7={identify:e=>f0(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>O1(e,2,16,n),stringify:e=>s7(e,16,"0x")},pF=[Fo,Bo,d0,h0,I1,o7,l7,c7,r7,i7,a7];function Yw(e){return typeof e=="bigint"||Number.isInteger(e)}const Nu=({value:e})=>JSON.stringify(e),mF=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Nu},{identify:e=>e==null,createNode:()=>new je(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Nu},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>e==="true",stringify:Nu},{identify:Yw,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Yw(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Nu}],gF={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},yF=[Fo,Bo].concat(mF,gF),D1={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Buffer=="function")return Buffer.from(e,"base64");if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i1&&t("Each pair must have its own sequence indicator");const i=r.items[0]||new yn(new je(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore} +${i.key.commentBefore}`:r.commentBefore),r.comment){const a=i.value??i.key;a.comment=a.comment?`${r.comment} +${a.comment}`:r.comment}r=i}e.items[n]=Rt(r)?r:new yn(r)}}else t("Expected a sequence for this tag");return e}function d7(e,t,n){const{replacer:r}=n,i=new bs(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let s of t){typeof r=="function"&&(s=r.call(t,String(a++),s));let o,l;if(Array.isArray(s))if(s.length===2)o=s[0],l=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){const c=Object.keys(s);if(c.length===1)o=c[0],l=s[o];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else o=s;i.items.push(R1(o,l,n))}return i}const L1={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:u7,createNode:d7};class co extends bs{constructor(){super(),this.add=cr.prototype.add.bind(this),this.delete=cr.prototype.delete.bind(this),this.get=cr.prototype.get.bind(this),this.has=cr.prototype.has.bind(this),this.set=cr.prototype.set.bind(this),this.tag=co.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const i of this.items){let a,s;if(Rt(i)?(a=ni(i.key,"",n),s=ni(i.value,a,n)):a=ni(i,"",n),r.has(a))throw new Error("Ordered maps must not include duplicate keys");r.set(a,s)}return r}}co.tag="tag:yaml.org,2002:omap";const P1={collection:"seq",identify:e=>e instanceof Map,nodeClass:co,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=u7(e,t),r=[];for(const{key:i}of n.items)xt(i)&&(r.includes(i.value)?t(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new co,n)},createNode(e,t,n){const r=d7(e,t,n),i=new co;return i.items=r.items,i}};function h7({value:e,source:t},n){return t&&(e?f7:p7).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const f7={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new je(!0),stringify:h7},p7={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new je(!1),stringify:h7},bF={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ur},vF={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Ur(e)}},wF={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new je(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const r=e.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:Ur},Ic=e=>typeof e=="bigint"||Number.isInteger(e);function p0(e,t,n,{intAsBigInt:r}){const i=e[0];if((i==="-"||i==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const s=BigInt(e);return i==="-"?BigInt(-1)*s:s}const a=parseInt(e,n);return i==="-"?-1*a:a}function z1(e,t,n){const{value:r}=e;if(Ic(r)){const i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return Ur(e)}const xF={identify:Ic,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>p0(e,2,2,n),stringify:e=>z1(e,2,"0b")},kF={identify:Ic,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>p0(e,1,8,n),stringify:e=>z1(e,8,"0")},SF={identify:Ic,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>p0(e,0,10,n),stringify:Ur},_F={identify:Ic,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>p0(e,2,16,n),stringify:e=>z1(e,16,"0x")};class uo extends cr{constructor(t){super(t),this.tag=uo.tag}add(t){let n;Rt(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new yn(t.key,null):n=new yn(t,null),Ga(this.items,n.key)||this.items.push(n)}get(t,n){const r=Ga(this.items,t);return!n&&Rt(r)?xt(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Ga(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new yn(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}}uo.tag="tag:yaml.org,2002:set";const F1={collection:"map",identify:e=>e instanceof Set,nodeClass:uo,default:!1,tag:"tag:yaml.org,2002:set",resolve(e,t){if(ys(e)){if(e.hasAllNullValues(!0))return Object.assign(new uo,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e},createNode(e,t,n){const{replacer:r}=n,i=new uo(e);if(t&&Symbol.iterator in Object(t))for(let a of t)typeof r=="function"&&(a=r.call(t,a,a)),i.items.push(R1(a,null,n));return i}};function B1(e,t){const n=e[0],r=n==="-"||n==="+"?e.substring(1):e,i=s=>t?BigInt(s):Number(s),a=r.replace(/_/g,"").split(":").reduce((s,o)=>s*i(60)+i(o),i(0));return n==="-"?i(-1)*a:a}function m7(e){let{value:t}=e,n=s=>s;if(typeof t=="bigint")n=s=>BigInt(s);else if(isNaN(t)||!isFinite(t))return Ur(e);let r="";t<0&&(r="-",t*=n(-1));const i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(s=>s<10?"0"+String(s):String(s)).join(":").replace(/000000\d*$/,"")}const g7={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>B1(e,n),stringify:m7},y7={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>B1(e,!1),stringify:m7},m0={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(m0.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,a,s,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let c=Date.UTC(n,r-1,i,a||0,s||0,o||0,l);const u=t[8];if(u&&u!=="Z"){let d=B1(u,!1);Math.abs(d)<30&&(d*=60),c-=6e4*d}return new Date(c)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Vw=[Fo,Bo,d0,h0,f7,p7,xF,kF,SF,_F,bF,vF,wF,D1,P1,L1,F1,g7,y7,m0],Gw=new Map([["core",pF],["failsafe",[Fo,Bo,d0]],["json",yF],["yaml11",Vw],["yaml-1.1",Vw]]),Kw={binary:D1,bool:I1,float:a7,floatExp:i7,floatNaN:r7,floatTime:y7,int:l7,intHex:c7,intOct:o7,intTime:g7,map:Fo,null:h0,omap:P1,pairs:L1,seq:Bo,set:F1,timestamp:m0},EF={"tag:yaml.org,2002:binary":D1,"tag:yaml.org,2002:omap":P1,"tag:yaml.org,2002:pairs":L1,"tag:yaml.org,2002:set":F1,"tag:yaml.org,2002:timestamp":m0};function Uf(e,t){let n=Gw.get(t);if(!n)if(Array.isArray(e))n=[];else{const r=Array.from(Gw.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${r} or define customTags array`)}if(Array.isArray(e))for(const r of e)n=n.concat(r);else typeof e=="function"&&(n=e(n.slice()));return n.map(r=>{if(typeof r!="string")return r;const i=Kw[r];if(i)return i;const a=Object.keys(Kw).map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown custom tag "${r}"; use one of ${a}`)})}const CF=(e,t)=>e.keyt.key?1:0;let b7=class v7{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:i,schema:a,sortMapEntries:s,toStringDefaults:o}){this.compat=Array.isArray(t)?Uf(t,"compat"):t?Uf(null,t):null,this.merge=!!r,this.name=typeof a=="string"&&a||"core",this.knownTags=i?EF:{},this.tags=Uf(n,this.name),this.toStringOptions=o??null,Object.defineProperty(this,va,{value:Fo}),Object.defineProperty(this,Fi,{value:d0}),Object.defineProperty(this,Po,{value:Bo}),this.sortMapEntries=typeof s=="function"?s:s===!0?CF:null}clone(){const t=Object.create(v7.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function TF(e,t){var l;const n=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const c=e.directives.toString(e);c?(n.push(c),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");const i=J5(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift("");const c=a(e.commentBefore);n.unshift(Ei(c,""))}let s=!1,o=null;if(e.contents){if(Yt(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){const d=a(e.contents.commentBefore);n.push(Ei(d,""))}i.forceBlockIndent=!!e.comment,o=e.contents.comment}const c=o?void 0:()=>s=!0;let u=cs(e.contents,i,()=>o=null,c);o&&(u+=sa(u,"",a(o))),(u[0]==="|"||u[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${u}`:n.push(u)}else n.push(cs(e.contents,i));if((l=e.directives)!=null&&l.docEnd)if(e.comment){const c=a(e.comment);c.includes(` +`)?(n.push("..."),n.push(Ei(c,""))):n.push(`... ${c}`)}else n.push("...");else{let c=e.comment;c&&s&&(c=c.replace(/^\n+/,"")),c&&((!s||o)&&n[n.length-1]!==""&&n.push(""),n.push(Ei(a(c),"")))}return n.join(` +`)+` +`}function hl(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,a=r.length;itypeof v=="number"||v instanceof String||v instanceof Number,y=n.filter(w).map(String);y.length>0&&(n=n.concat(y)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:a,anchorPrefix:s,flow:o,keepUndefined:l,onTagObj:c,tag:u}=r??{},{onAnchor:d,setAnchors:f,sourceObjects:p}=Jz(this,s||"a"),m={aliasDuplicateObjects:a??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:p},h=nc(t,u,m);return o&&Pt(h)&&(h.flow=!0),f(),h}createPair(t,n,r={}){const i=this.createNode(t,null,r),a=this.createNode(n,null,r);return new yn(i,a)}delete(t){return As(this.contents)?this.contents.delete(t):!1}deleteIn(t){return dl(t)?this.contents==null?!1:(this.contents=null,!0):As(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Pt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return dl(t)?!n&&xt(this.contents)?this.contents.value:this.contents:Pt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Pt(this.contents)?this.contents.has(t):!1}hasIn(t){return dl(t)?this.contents!==void 0:Pt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Qd(this.schema,[t],n):As(this.contents)&&this.contents.set(t,n)}setIn(t,n){dl(t)?this.contents=n:this.contents==null?this.contents=Qd(this.schema,Array.from(t),n):As(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Sn({version:"1.1"}),r={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Sn({version:t}),r={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new b7(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:a,reviver:s}={}){const o={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100,stringify:cs},l=ni(this.contents,n??"",o);if(typeof a=="function")for(const{count:c,res:u}of o.anchors.values())a(u,c);return typeof s=="function"?hl(s,{"":l},"",l):l}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return TF(this,t)}}function As(e){if(Pt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class $1 extends Error{constructor(t,n,r,i){super(),this.name=t,this.code=r,this.message=i,this.pos=n}}class Ka extends $1{constructor(t,n,r){super("YAMLParseError",t,n,r)}}class w7 extends $1{constructor(t,n,r){super("YAMLWarning",t,n,r)}}const Jd=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(o=>t.linePos(o));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,s=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(a>=60&&s.length>80){const o=Math.min(a-39,s.length-79);s="…"+s.substring(o),a-=o-1}if(s.length>80&&(s=s.substring(0,79)+"…"),r>1&&/^ *$/.test(s.substring(0,a))){let o=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`… +`),s=o+s}if(/[^ ]/.test(s)){let o=1;const l=n.linePos[1];l&&l.line===r&&l.col>i&&(o=Math.min(l.col-i,80-a));const c=" ".repeat(a)+"^".repeat(o);n.message+=`: + +${s} +${c} +`}};function Co(e,{flow:t,indicator:n,next:r,offset:i,onError:a,startOnNewline:s}){let o=!1,l=s,c=s,u="",d="",f=!1,p=!1,m=!1,h=null,w=null,y=null,v=null,x=null;for(const E of e)switch(m&&(E.type!=="space"&&E.type!=="newline"&&E.type!=="comma"&&a(E.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),E.type){case"space":!t&&l&&n!=="doc-start"&&E.source[0]===" "&&a(E,"TAB_AS_INDENT","Tabs are not allowed as indentation"),c=!0;break;case"comment":{c||a(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const R=E.source.substring(1)||" ";u?u+=d+R:u=R,d="",l=!1;break}case"newline":l?u?u+=E.source:o=!0:d+=E.source,l=!0,f=!0,(h||w)&&(p=!0),c=!0;break;case"anchor":h&&a(E,"MULTIPLE_ANCHORS","A node can have at most one anchor"),E.source.endsWith(":")&&a(E.offset+E.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),h=E,x===null&&(x=E.offset),l=!1,c=!1,m=!0;break;case"tag":{w&&a(E,"MULTIPLE_TAGS","A node can have at most one tag"),w=E,x===null&&(x=E.offset),l=!1,c=!1,m=!0;break}case n:(h||w)&&a(E,"BAD_PROP_ORDER",`Anchors and tags must be after the ${E.source} indicator`),v&&a(E,"UNEXPECTED_TOKEN",`Unexpected ${E.source} in ${t??"collection"}`),v=E,l=!1,c=!1;break;case"comma":if(t){y&&a(E,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),y=E,l=!1,c=!1;break}default:a(E,"UNEXPECTED_TOKEN",`Unexpected ${E.type} token`),l=!1,c=!1}const _=e[e.length-1],A=_?_.offset+_.source.length:i;return m&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&a(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:y,found:v,spaceBefore:o,comment:u,hasNewline:f,hasNewlineAfterProp:p,anchor:h,tag:w,end:A,start:x??A}}function rc(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(` +`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(rc(t.key)||rc(t.value))return!0}return!1;default:return!0}}function Dm(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&rc(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function x7(e,t,n){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const i=typeof r=="function"?r:(a,s)=>a===s||xt(a)&&xt(s)&&a.value===s.value&&!(a.value==="<<"&&e.schema.merge);return t.some(a=>i(a.key,n))}const Xw="All mapping items must start at the same column";function AF({composeNode:e,composeEmptyNode:t},n,r,i){var l;const a=new cr(n.schema);n.atRoot&&(n.atRoot=!1);let s=r.offset,o=null;for(const c of r.items){const{start:u,key:d,sep:f,value:p}=c,m=Co(u,{indicator:"explicit-key-ind",next:d??(f==null?void 0:f[0]),offset:s,onError:i,startOnNewline:!0}),h=!m.found;if(h){if(d&&(d.type==="block-seq"?i(s,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==r.indent&&i(s,"BAD_INDENT",Xw)),!m.anchor&&!m.tag&&!f){o=m.end,m.comment&&(a.comment?a.comment+=` +`+m.comment:a.comment=m.comment);continue}(m.hasNewlineAfterProp||rc(d))&&i(d??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((l=m.found)==null?void 0:l.indent)!==r.indent&&i(s,"BAD_INDENT",Xw);const w=m.end,y=d?e(n,d,m,i):t(n,w,u,null,m,i);n.schema.compat&&Dm(r.indent,d,i),x7(n,a.items,y)&&i(w,"DUPLICATE_KEY","Map keys must be unique");const v=Co(f??[],{indicator:"map-value-ind",next:p,offset:y.range[2],onError:i,startOnNewline:!d||d.type==="block-scalar"});if(s=v.end,v.found){h&&((p==null?void 0:p.type)==="block-map"&&!v.hasNewline&&i(s,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&m.starte&&(e.type==="block-map"||e.type==="block-seq");function MF({composeNode:e,composeEmptyNode:t},n,r,i){const a=r.start.source==="{",s=a?"flow map":"flow sequence",o=a?new cr(n.schema):new bs(n.schema);o.flow=!0;const l=n.atRoot;l&&(n.atRoot=!1);let c=r.offset+r.start.source.length;for(let m=0;m0){const m=Oc(f,p,n.options.strict,i);m.comment&&(o.comment?o.comment+=` +`+m.comment:o.comment=m.comment),o.range=[r.offset,p,m.offset]}else o.range=[r.offset,p,p];return o}function RF(e,t,n,r,i){let a;switch(n.type){case"block-map":{a=AF(e,t,n,i);break}case"block-seq":{a=NF(e,t,n,i);break}case"flow-collection":{a=MF(e,t,n,i);break}}if(!r)return a;const s=t.directives.tagName(r.source,f=>i(r,"TAG_RESOLVE_FAILED",f));if(!s)return a;const o=a.constructor;if(s==="!"||s===o.tagName)return a.tag=o.tagName,a;const l=ys(a)?"map":"seq";let c=t.schema.tags.find(f=>f.collection===l&&f.tag===s);if(!c){const f=t.schema.knownTags[s];if(f&&f.collection===l)t.schema.tags.push(Object.assign({},f,{default:!1})),c=f;else return i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),a.tag=s,a}const u=c.resolve(a,f=>i(r,"TAG_RESOLVE_FAILED",f),t.options),d=Yt(u)?u:new je(u);return d.range=a.range,d.tag=s,c!=null&&c.format&&(d.format=c.format),d}function k7(e,t,n){const r=e.offset,i=IF(e,t,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const a=i.mode===">"?je.BLOCK_FOLDED:je.BLOCK_LITERAL,s=e.source?OF(e.source):[];let o=s.length;for(let h=s.length-1;h>=0;--h){const w=s[h][1];if(w===""||w==="\r")o=h;else break}if(o===0){const h=i.chomp==="+"&&s.length>0?` +`.repeat(Math.max(1,s.length-1)):"";let w=r+i.length;return e.source&&(w+=e.source.length),{value:h,type:a,comment:i.comment,range:[r,w,w]}}let l=e.indent+i.indent,c=e.offset+i.length,u=0;for(let h=0;hl&&(l=w.length);else{if(w.length=o;--h)s[h][0].length>l&&(o=h+1);let d="",f="",p=!1;for(let h=0;hl||y[0]===" "?(f===" "?f=` +`:!p&&f===` +`&&(f=` + +`),d+=f+w.slice(l)+y,f=` +`,p=!0):y===""?f===` +`?d+=` +`:f=` +`:(d+=f+y,f=" ",p=!1)}switch(i.chomp){case"-":break;case"+":for(let h=o;hn(r+f,p,m);switch(i){case"scalar":o=je.PLAIN,l=DF(a,c);break;case"single-quoted-scalar":o=je.QUOTE_SINGLE,l=LF(a,c);break;case"double-quoted-scalar":o=je.QUOTE_DOUBLE,l=PF(a,c);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+a.length,r+a.length]}}const u=r+a.length,d=Oc(s,u,t,n);return{value:l,type:o,comment:d.comment,range:[r,u,d.offset]}}function DF(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),_7(e)}function LF(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),_7(e.slice(1,-1)).replace(/''/g,"'")}function _7(e){let t,n;try{t=new RegExp(`(.*?)(?a?e.slice(a,r+1):i)}else n+=i}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function zF(e,t){let n="",r=e[t+1];for(;(r===" "||r===" "||r===` +`||r==="\r")&&!(r==="\r"&&e[t+2]!==` +`);)r===` +`&&(n+=` +`),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}const FF={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` +`,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function BF(e,t,n,r){const i=e.substr(t,n),s=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(s)){const o=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(s)}function E7(e,t,n,r){const{value:i,type:a,comment:s,range:o}=t.type==="block-scalar"?k7(t,e.options.strict,r):S7(t,e.options.strict,r),l=n?e.directives.tagName(n.source,d=>r(n,"TAG_RESOLVE_FAILED",d)):null,c=n&&l?$F(e.schema,i,l,n,r):t.type==="scalar"?UF(e,i,t,r):e.schema[Fi];let u;try{const d=c.resolve(i,f=>r(n??t,"TAG_RESOLVE_FAILED",f),e.options);u=xt(d)?d:new je(d)}catch(d){const f=d instanceof Error?d.message:String(d);r(n??t,"TAG_RESOLVE_FAILED",f),u=new je(i)}return u.range=o,u.source=i,a&&(u.type=a),l&&(u.tag=l),c.format&&(u.format=c.format),s&&(u.comment=s),u}function $F(e,t,n,r,i){var o;if(n==="!")return e[Fi];const a=[];for(const l of e.tags)if(!l.collection&&l.tag===n)if(l.default&&l.test)a.push(l);else return l;for(const l of a)if((o=l.test)!=null&&o.test(t))return l;const s=e.knownTags[n];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Fi])}function UF({directives:e,schema:t},n,r,i){const a=t.tags.find(s=>{var o;return s.default&&((o=s.test)==null?void 0:o.test(n))})||t[Fi];if(t.compat){const s=t.compat.find(o=>{var l;return o.default&&((l=o.test)==null?void 0:l.test(n))})??t[Fi];if(a.tag!==s.tag){const o=e.tagString(a.tag),l=e.tagString(s.tag),c=`Value may be parsed as either ${o} or ${l}`;i(r,"TAG_RESOLVE_FAILED",c,!0)}}return a}function jF(e,t,n){if(t){n===null&&(n=t.length);for(let r=n-1;r>=0;--r){let i=t[r];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}for(i=t[++r];(i==null?void 0:i.type)==="space";)e+=i.source.length,i=t[++r];break}}return e}const qF={composeNode:C7,composeEmptyNode:U1};function C7(e,t,n,r){const{spaceBefore:i,comment:a,anchor:s,tag:o}=n;let l,c=!0;switch(t.type){case"alias":l=HF(e,t,r),(s||o)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=E7(e,t,o,r),s&&(l.anchor=s.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":l=RF(qF,e,t,o,r),s&&(l.anchor=s.source.substring(1));break;default:{const u=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",u),l=U1(e,t.offset,void 0,null,n,r),c=!1}}return s&&l.anchor===""&&r(s,"BAD_ALIAS","Anchor cannot be an empty string"),i&&(l.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?l.comment=a:l.commentBefore=a),e.options.keepSourceTokens&&c&&(l.srcToken=t),l}function U1(e,t,n,r,{spaceBefore:i,comment:a,anchor:s,tag:o,end:l},c){const u={type:"scalar",offset:jF(t,n,r),indent:-1,source:""},d=E7(e,u,o,c);return s&&(d.anchor=s.source.substring(1),d.anchor===""&&c(s,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}function HF({options:e},{offset:t,source:n,end:r},i){const a=new s0(n.substring(1));a.source===""&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+n.length,o=Oc(r,s,e.strict,i);return a.range=[t,s,o.offset],o.comment&&(a.comment=o.comment),a}function WF(e,t,{offset:n,start:r,value:i,end:a},s){const o=Object.assign({_directives:t},e),l=new $o(void 0,o),c={atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=Co(r,{indicator:"doc-start",next:i??(a==null?void 0:a[0]),offset:n,onError:s,startOnNewline:!0});u.found&&(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!u.hasNewline&&s(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?C7(c,i,u,s):U1(c,u.end,r,null,u,s);const d=l.contents.range[2],f=Oc(a,d,!1,s);return f.comment&&(l.comment=f.comment),l.range=[n,d,f.offset],l}function il(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function Qw(e){var i;let t="",n=!1,r=!1;for(let a=0;a{const s=il(n);a?this.warnings.push(new w7(s,r,i)):this.errors.push(new Ka(s,r,i))},this.directives=new Sn({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:r,afterEmptyLine:i}=Qw(this.prelude);if(r){const a=t.contents;if(n)t.comment=t.comment?`${t.comment} +${r}`:r;else if(i||t.directives.docStart||!a)t.commentBefore=r;else if(Pt(a)&&!a.flow&&a.items.length>0){let s=a.items[0];Rt(s)&&(s=s.key);const o=s.commentBefore;s.commentBefore=o?`${r} +${o}`:r}else{const s=a.commentBefore;a.commentBefore=s?`${r} +${s}`:r}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Qw(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,r=-1){for(const i of t)yield*this.next(i);yield*this.end(n,r)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,r,i)=>{const a=il(t);a[0]+=n,this.onError(a,"BAD_DIRECTIVE",r,i)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=WF(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new Ka(il(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Ka(il(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=Oc(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r} +${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ka(il(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const r=Object.assign({_directives:this.directives},this.options),i=new $o(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}function YF(e,t=!0,n){if(e){const r=(i,a,s)=>{const o=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(o,a,s);else throw new Ka([o,o+1],a,s)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return S7(e,t,r);case"block-scalar":return k7(e,t,r)}}return null}function VF(e,t){const{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:a=-1,type:s="PLAIN"}=t,o=Rc({type:s,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:r,source:` +`}];switch(o[0]){case"|":case">":{const c=o.indexOf(` +`),u=o.substring(0,c),d=o.substring(c+1)+` +`,f=[{type:"block-scalar-header",offset:a,indent:r,source:u}];return T7(f,l)||f.push({type:"newline",offset:-1,indent:r,source:` +`}),{type:"block-scalar",offset:a,indent:r,props:f,source:d}}case'"':return{type:"double-quoted-scalar",offset:a,indent:r,source:o,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:r,source:o,end:l};default:return{type:"scalar",offset:a,indent:r,source:o,end:l}}}function GF(e,t,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:a=!1,type:s}=n,o="indent"in e?e.indent:null;if(r&&typeof o=="number"&&(o+=2),!s)switch(e.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{const c=e.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}const l=Rc({type:s,value:t},{implicitKey:i||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":KF(e,l);break;case'"':Hf(e,l,"double-quoted-scalar");break;case"'":Hf(e,l,"single-quoted-scalar");break;default:Hf(e,l,"scalar")}}function KF(e,t){const n=t.indexOf(` +`),r=t.substring(0,n),i=t.substring(n+1)+` +`;if(e.type==="block-scalar"){const a=e.props[0];if(a.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a.source=r,e.source=i}else{const{offset:a}=e,s="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:a,indent:s,source:r}];T7(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:s,source:` +`});for(const l of Object.keys(e))l!=="type"&&l!=="offset"&&delete e[l];Object.assign(e,{type:"block-scalar",indent:s,props:o,source:i})}}function T7(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function Hf(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let i=t.length;e.props[0].type==="block-scalar-header"&&(i-=e.props[0].source.length);for(const a of r)a.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const i={type:"newline",offset:e.offset+t.length,indent:e.indent,source:` +`};delete e.items,Object.assign(e,{type:n,source:t,end:[i]});break}default:{const r="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(a=>a.type==="space"||a.type==="comment"||a.type==="newline"):[];for(const a of Object.keys(e))a!=="type"&&a!=="offset"&&delete e[a];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}const XF=e=>"type"in e?eh(e):ld(e);function eh(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=eh(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=ld(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=ld(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=ld(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function ld({start:e,key:t,sep:n,value:r}){let i="";for(const a of e)i+=a.source;if(t&&(i+=eh(t)),n)for(const a of n)i+=a.source;return r&&(i+=eh(r)),i}const Lm=Symbol("break visit"),QF=Symbol("skip children"),A7=Symbol("remove item");function us(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),N7(Object.freeze([]),e,t)}us.BREAK=Lm;us.SKIP=QF;us.REMOVE=A7;us.itemAtPath=(e,t)=>{let n=e;for(const[r,i]of t){const a=n==null?void 0:n[r];if(a&&"items"in a)n=a.items[i];else return}return n};us.parentCollection=(e,t)=>{const n=us.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n==null?void 0:n[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function N7(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(const i of["key","value"]){const a=t[i];if(a&&"items"in a){for(let s=0;s!!e&&"items"in e,JF=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function eB(e){switch(e){case g0:return"";case y0:return"";case b0:return"";case ic:return"";default:return JSON.stringify(e)}}function M7(e){switch(e){case g0:return"byte-order-mark";case y0:return"doc-mode";case b0:return"flow-error-end";case ic:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` +`:case`\r +`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const tB=Object.freeze(Object.defineProperty({__proto__:null,BOM:g0,DOCUMENT:y0,FLOW_END:b0,SCALAR:ic,createScalarToken:VF,isCollection:ZF,isScalar:JF,prettyToken:eB,resolveAsScalar:YF,setScalarValue:GF,stringify:XF,tokenType:M7,visit:us},Symbol.toStringTag,{value:"Module"}));function rr(e){switch(e){case void 0:case" ":case` +`:case"\r":case" ":return!0;default:return!1}}const Zw="0123456789ABCDEFabcdef".split(""),nB="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),Wf=",[]{}".split(""),rB=` ,[]{} +\r `.split(""),Yf=e=>!e||rB.includes(e);let R7=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){t&&(this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null),this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===` +`?!0:n==="\r"?this.buffer[t+1]===` +`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+t];if(n==="\r"){const i=this.buffer[r+t+1];if(i===` +`||!i&&!this.atEnd)return t+r+1}return n===` +`||r>=this.indentNext||!n&&!this.atEnd?t+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&rr(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&tthis.indentValue&&!rr(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&rr(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Yf),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,r=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&r"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>rr(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":n+=1;break;case` +`:t=i,n=0;break;case"\r":{const a=this.buffer[i+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===` +`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext+=this.blockScalarIndent;do{const i=this.continueScalar(t+1);if(i===-1)break;t=this.buffer.indexOf(` +`,i)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}if(!this.blockScalarKeep)do{let i=t-1,a=this.buffer[i];a==="\r"&&(a=this.buffer[--i]);const s=i;for(;a===" "||a===" ";)a=this.buffer[--i];if(a===` +`&&i>=this.pos&&i+1+n>s)t=i;else break}while(!0);return yield ic,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){const a=this.buffer[r+1];if(rr(a)||t&&a===",")break;n=r}else if(rr(i)){let a=this.buffer[r+1];if(i==="\r"&&(a===` +`?(r+=1,i=` +`,a=this.buffer[r+1]):n=r),a==="#"||t&&Wf.includes(a))break;if(i===` +`){const s=this.continueScalar(r+1);if(s===-1)break;r=Math.max(r,s-2)}}else{if(t&&Wf.includes(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield ic,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const r=this.buffer.slice(this.pos,t);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Yf))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(rr(n)||t&&Wf.includes(n))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!rr(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(nB.includes(n))n=this.buffer[++t];else if(n==="%"&&Zw.includes(this.buffer[t+1])&&Zw.includes(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===` +`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===` +`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||t&&r===" ");const i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(t){let n=this.pos,r=this.buffer[n];for(;!t(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};class I7{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,r=this.lineStarts.length;for(;n>1;this.lineStarts[a]=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function e4(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!Tr(t.start,"explicit-key-ind")&&!Tr(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,O7(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}let q1=class{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new R7,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(t,n))yield*this.next(r);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=M7(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const r=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(!t||t.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(n)if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&e4(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!Tr(i.start,"explicit-key-ind");return}break}case"block-seq":{const i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:n}):i.value=n;break}case"flow-collection":{const i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&Jw(i.start)===-1&&(n.indent===0||i.start.every(a=>a.type!=="comment"||a.indent=t.indent){const i=!this.onKeyLine&&this.indent===t.indent&&n.sep;let a=[];if(i&&n.sep&&!n.value){const s=[];for(let o=0;ot.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(a=n.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(a.push(this.sourceToken),t.items.push({start:a}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!Tr(n.start,"explicit-key-ind")?n.start.push(this.sourceToken):i||n.value?(a.push(this.sourceToken),t.items.push({start:a})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}),this.onKeyLine=!0;return;case"map-value-ind":if(Tr(n.start,"explicit-key-ind"))if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Tr(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(O7(n.key)&&!Tr(n.sep,"newline")){const s=Ns(n.start),o=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:o,sep:l}]})}else a.length>0?n.sep=n.sep.concat(a,this.sourceToken):n.sep.push(this.sourceToken);else if(Tr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const s=Ns(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?t.items.push({start:a,key:null,sep:[this.sourceToken]}):Tr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);i||n.value?(t.items.push({start:a,key:s,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(s):(Object.assign(n,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{const s=this.startBlockValue(t);if(s){i&&s.type!=="block-seq"&&Tr(n.start,"explicit-key-ind")&&t.items.push({start:a}),this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var r;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const i="end"in n.value?n.value.end:void 0,a=Array.isArray(i)?i[i.length-1]:void 0;(a==null?void 0:a.type)==="comment"?i==null||i.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const i=t.items[t.items.length-2],a=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(a)){Array.prototype.push.apply(a,n.start),a.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||Tr(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const i=this.startBlockValue(t);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const i=Mu(r),a=Ns(i);e4(t);const s=t.end.splice(1,t.end.length);s.push(this.sourceToken);const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:a,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(` +`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(` +`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Mu(t),r=Ns(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Mu(t),r=Ns(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function D7(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new I7||null,prettyErrors:t}}function iB(e,t={}){const{lineCounter:n,prettyErrors:r}=D7(t),i=new q1(n==null?void 0:n.addNewLine),a=new j1(t),s=Array.from(a.compose(i.parse(e)));if(r&&n)for(const o of s)o.errors.forEach(Jd(e,n)),o.warnings.forEach(Jd(e,n));return s.length>0?s:Object.assign([],{empty:!0},a.streamInfo())}function L7(e,t={}){const{lineCounter:n,prettyErrors:r}=D7(t),i=new q1(n==null?void 0:n.addNewLine),a=new j1(t);let s=null;for(const o of a.compose(i.parse(e),!0,e.length))if(!s)s=o;else if(s.options.logLevel!=="silent"){s.errors.push(new Ka(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(Jd(e,n)),s.warnings.forEach(Jd(e,n))),s}function aB(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);const i=L7(e,n);if(!i)return null;if(i.warnings.forEach(a=>e7(i.options.logLevel,a)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function sB(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){const{keepUndefined:i}=n??t??{};if(!i)return}return new $o(e,r,n).toString(n)}const Pm=Object.freeze(Object.defineProperty({__proto__:null,Alias:s0,CST:tB,Composer:j1,Document:$o,Lexer:R7,LineCounter:I7,Pair:yn,Parser:q1,Scalar:je,Schema:b7,YAMLError:$1,YAMLMap:cr,YAMLParseError:Ka,YAMLSeq:bs,YAMLWarning:w7,isAlias:gs,isCollection:Pt,isDocument:Mc,isMap:ys,isNode:Yt,isPair:Rt,isScalar:xt,isSeq:zo,parse:aB,parseAllDocuments:iB,parseDocument:L7,stringify:sB,visit:Sa,visitAsync:a0},Symbol.toStringTag,{value:"Module"})),oB=L.div` + display: flex; + align-items: center; + justify-content: center; + height: calc(86px + 416px); + padding-top: 86px; + background: #0a0c28; + @media screen and (max-width: 1024px) { + padding-top: 69px; + height: calc(312px + 69px); + } + @media screen and (max-width: 1024px) { + padding-top: 53px; + height: calc(208px + 53px); + } +`,lB=L.h1` + position: relative; + display: inline-block; + padding-inline: 32px; + color: white; + font-weight: 700; + font-size: 72px; + line-height: 1.5; + text-transform: capitalize; + transform: translateY(-10%); + @media screen and (max-width: 1024px) { + padding-inline: 24px; + font-size: 54px; + } + @media screen and (max-width: 768px) { + padding-inline: 16px; + font-size: 36px; + } +`,cB=L.img` + z-index: -1; + position: absolute; + left: 50%; + bottom: -17px; + transform: translateX(-45%); + width: 295.01px; + height: 35.35px; + @media screen and (max-width: 1024px) { + bottom: -12%; + width: 221px; + height: 27px; + } + @media screen and (max-width: 768px) { + bottom: -8%; + width: 148px; + height: 18px; + } +`,uB=L.main` + display: flex; + margin-inline: auto; + padding-block: ${e=>e.theme.scale.scale06}; + padding-inline: ${e=>e.theme.scale.scale07}; + max-width: ${e=>e.theme.scale.scale12}; + // - - - + /* height: 200px; + background-color: lightcoral; */ + @media screen and (max-width: 1024px) { + padding-block: 60px; + padding-inline: 96px; + } + @media screen and (max-width: 768px) { + padding-block: 40px; + padding-inline: 64px; + } +`,dB=L.div` + flex-shrink: 0; + width: ${e=>e.theme.scale.scale08}; + margin-right: ${e=>e.theme.scale.scale06}; + padding-block: ${e=>e.theme.scale.scale07}; + // - - - + /* height: 100px; + background-color: lightblue; */ + @media screen and (max-width: 1440px) { + display: none; + } +`,hB=L.p` + margin-bottom: ${e=>e.theme.scale.scale04}; + color: #a6a6a6; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize4}; + line-height: ${e=>e.theme.font.lineHeight4}; +`,fB=L(Ro)` + display: block; + margin-bottom: ${e=>e.theme.scale.scale03}; + padding: ${e=>e.theme.scale.scale03}; + color: #454545; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize3}; + line-height: ${e=>e.theme.font.lineHeight3}; + border: 1px solid #dfdfdf; + border-radius: ${e=>e.theme.scale.scale01}; + box-shadow: 5px 5px 15px -5px ${e=>e.theme.color.neutral.gray06}; +`,pB=L.div` + display: flex; + flex-flow: wrap; + justify-content: space-between; + /* flex: 1; */ + /* padding-inline: ${e=>e.theme.scale.scale05}; */ + // - - - + /* min-height: 100px; + background-color: lightcyan; */ + @media screen and (max-width: 1024px) { + flex-direction: column; + } +`,mB=L.div` + width: 48%; + margin-bottom: ${e=>e.theme.scale.scale04}; + border: 1px solid #dfdfdf; + border-radius: ${e=>e.theme.scale.scale03}; + box-shadow: 5px 5px 15px -5px ${e=>e.theme.color.neutral.gray06}; + overflow: hidden; + // - - - + /* height: 400px; */ + /* background: lightpink; */ + @media screen and (max-width: 1024px) { + width: 100%; + } +`,gB=L.img` + width: 100%; + /* height: ${e=>e.theme.scale.scale08}; */ +`,yB=L.div` + padding: ${e=>e.theme.scale.scale03}; + // - - - + /* height: 100px; */ + @media screen and (max-width: 1024px) { + padding: 15px; + } + @media screen and (max-width: 768px) { + padding: 10px; + } +`,bB=L.h1` + margin-bottom: ${e=>e.theme.scale.scale03}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize4}; + /* line-height: ${e=>e.theme.font.lineHeight4}; */ + line-height: 1.5; + /* white-space: nowrap; */ + overflow: hidden; + text-overflow: ellipsis; + /* text-transform: capitalize; */ + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 15px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 10px; + } +`,vB=L.p` + display: -webkit-box; + margin-bottom: ${e=>e.theme.scale.scale03}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize3}; + /* line-height: ${e=>e.theme.font.lineHeight3}; */ + line-height: 1.5; + word-break: break-all; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + text-overflow: ellipsis; + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 12px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 8px; + } +`,wB=L(Ro)` + display: inline-block; + margin-bottom: ${e=>e.theme.scale.scale01}; + padding-block: ${e=>e.theme.scale.scale01}; + padding-inline: ${e=>e.theme.scale.scale04}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize2}; + /* line-height: ${e=>e.theme.font.lineHeight2}; */ + line-height: 1.5; + background: linear-gradient(90deg, #767ee5, #9966cc); + border-radius: 20px; + @media screen and (max-width: 1024px) { + margin-bottom: 6px; + padding-block: 6px; + padding-inline: 24px; + font-size: 10.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 4px; + padding-block: 4px; + padding-inline: 16px; + font-size: 7px; + } +`,Vf=Object.assign({"/src/blog/2023-01-07-Curp:-Revisit-the-Consensus-Protocol.md":O5,"/src/blog/2023-02-19-Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness.md":D5,"/src/blog/2023-03-10-How-to-Elegantly-Organize-Async-Rust-Code.md":L5,"/src/blog/2023-04-19-Database-Isolation-Levels-and-MVCC.md":P5,"/src/blog/2023-05-21-The-design-and-Implementation-of-the-Xline-Persistent-Storage-Layer.md":z5,"/src/blog/2023-08-18-Introduction-to-CURP-Protocol.md":F5,"/src/blog/2023-09-23-Mechanism-and-Implementation-of-Lease.md":B5,"/src/blog/2023-11-01-Implementation-of-CURP-Server.md":$5,"/src/blog/2023-12-13-CURP-State-Machine-Engine.md":U5,"/src/blog/2024-01-04-Xline-Command-Deduplication-Mechanism-(Part-One)—Introduction-to-RIFL.md":j5}),xB=()=>(ce.useEffect(()=>{window.scrollTo(0,0)},[]),k.jsxs(k.Fragment,{children:[k.jsx(oB,{children:k.jsxs(lB,{children:["blog",k.jsx(cB,{src:Ra,alt:"underline"})]})}),k.jsxs(uB,{children:[k.jsxs(dB,{children:[k.jsx(hB,{children:"Blog"}),Object.keys(Vf).map(e=>{const t=e.split(/[/,.]/),[n,r,i,...a]=t[3].split("-"),s=a.join(" "),o=t[3];return k.jsx(fB,{to:o,children:s},s)})]}),k.jsx(pB,{children:Object.keys(Vf).reverse().map((e,t)=>{const n=e.split(/[/,.]/),r=n[3],[i,a,s,...o]=n[3].split("-"),l=o.join(" ");console.log(l);const[c,u,d,f]=Vf[e].split(`--- +`),p=Pm.parse(u);return k.jsxs(mB,{children:[k.jsx(gB,{src:p.cover,alt:"cover"}),k.jsxs(yB,{children:[k.jsx(bB,{children:l}),k.jsx(vB,{children:d}),k.jsx(wB,{to:r,children:"Read more"})]})]},t)})})]})]}));//! moment.js +//! version : 2.29.4 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +var P7;function pe(){return P7.apply(null,arguments)}function kB(e){P7=e}function Br(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function es(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function st(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function H1(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(st(e,t))return!1;return!0}function In(e){return e===void 0}function Bi(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Dc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function z7(e,t){var n=[],r,i=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var G1=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ru=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Kf={},ho={};function Ne(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(ho[e]=i),t&&(ho[t[0]]=function(){return si(i.apply(this,arguments),t[1],t[2])}),n&&(ho[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function TB(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function AB(e){var t=e.match(G1),n,r;for(n=0,r=t.length;n=0&&Ru.test(e);)e=e.replace(Ru,r),Ru.lastIndex=0,n-=1;return e}var NB={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function MB(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(G1).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var RB="Invalid date";function IB(){return this._invalidDate}var OB="%d",DB=/\d{1,2}/;function LB(e){return this._ordinal.replace("%d",e)}var PB={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function zB(e,t,n,r){var i=this._relativeTime[n];return ui(i)?i(e,t,n,r):i.replace(/%d/i,e)}function FB(e,t){var n=this._relativeTime[e>0?"future":"past"];return ui(n)?n(t):n.replace(/%s/i,t)}var Al={};function wn(e,t){var n=e.toLowerCase();Al[n]=Al[n+"s"]=Al[t]=e}function Sr(e){return typeof e=="string"?Al[e]||Al[e.toLowerCase()]:void 0}function K1(e){var t={},n,r;for(r in e)st(e,r)&&(n=Sr(r),n&&(t[n]=e[r]));return t}var U7={};function xn(e,t){U7[e]=t}function BB(e){var t=[],n;for(n in e)st(e,n)&&t.push({unit:n,priority:U7[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function w0(e){return e%4===0&&e%100!==0||e%400===0}function or(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Xe(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=or(t)),n}function Uo(e,t){return function(n){return n!=null?(j7(this,e,n),pe.updateOffset(this,t),this):th(this,e)}}function th(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function j7(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&w0(e.year())&&e.month()===1&&e.date()===29?(n=Xe(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),C0(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function $B(e){return e=Sr(e),ui(this[e])?this[e]():this}function UB(e,t){if(typeof e=="object"){e=K1(e);var n=BB(e),r,i=n.length;for(r=0;r68?1900:2e3)};var Z7=Uo("FullYear",!0);function s$(){return w0(this.year())}function o$(e,t,n,r,i,a,s){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,a,s),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,a,s),o}function ac(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function rh(e,t,n){var r=7+t-n,i=(7+ac(e,0,r).getUTCDay()-t)%7;return-i+r-1}function J7(e,t,n,r,i){var a=(7+n-r)%7,s=rh(e,r,i),o=1+7*(t-1)+a+s,l,c;return o<=0?(l=e-1,c=Nl(l)+o):o>Nl(e)?(l=e+1,c=o-Nl(e)):(l=e,c=o),{year:l,dayOfYear:c}}function sc(e,t,n){var r=rh(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,s;return i<1?(s=e.year()-1,a=i+Mi(s,t,n)):i>Mi(e.year(),t,n)?(a=i-Mi(e.year(),t,n),s=e.year()+1):(s=e.year(),a=i),{week:a,year:s}}function Mi(e,t,n){var r=rh(e,t,n),i=rh(e+1,t,n);return(Nl(e)-r+i)/7}Ne("w",["ww",2],"wo","week");Ne("W",["WW",2],"Wo","isoWeek");wn("week","w");wn("isoWeek","W");xn("week",5);xn("isoWeek",5);ve("w",At);ve("ww",At,tr);ve("W",At);ve("WW",At,tr);zc(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Xe(e)});function l$(e){return sc(e,this._week.dow,this._week.doy).week}var c$={dow:0,doy:6};function u$(){return this._week.dow}function d$(){return this._week.doy}function h$(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function f$(e){var t=sc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Ne("d",0,"do","day");Ne("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Ne("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Ne("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Ne("e",0,0,"weekday");Ne("E",0,0,"isoWeekday");wn("day","d");wn("weekday","e");wn("isoWeekday","E");xn("day",11);xn("weekday",11);xn("isoWeekday",11);ve("d",At);ve("e",At);ve("E",At);ve("dd",function(e,t){return t.weekdaysMinRegex(e)});ve("ddd",function(e,t){return t.weekdaysShortRegex(e)});ve("dddd",function(e,t){return t.weekdaysRegex(e)});zc(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:qe(n).invalidWeekday=e});zc(["d","e","E"],function(e,t,n,r){t[r]=Xe(e)});function p$(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function m$(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Z1(e,t){return e.slice(t,7).concat(e.slice(0,t))}var g$="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ek="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),y$="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),b$=Pc,v$=Pc,w$=Pc;function x$(e,t){var n=Br(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Z1(n,this._week.dow):e?n[e.day()]:n}function k$(e){return e===!0?Z1(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function S$(e){return e===!0?Z1(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function _$(e,t,n){var r,i,a,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=ci([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(i=qt.call(this._weekdaysParse,s),i!==-1?i:null):t==="ddd"?(i=qt.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=qt.call(this._minWeekdaysParse,s),i!==-1?i:null):t==="dddd"?(i=qt.call(this._weekdaysParse,s),i!==-1||(i=qt.call(this._shortWeekdaysParse,s),i!==-1)?i:(i=qt.call(this._minWeekdaysParse,s),i!==-1?i:null)):t==="ddd"?(i=qt.call(this._shortWeekdaysParse,s),i!==-1||(i=qt.call(this._weekdaysParse,s),i!==-1)?i:(i=qt.call(this._minWeekdaysParse,s),i!==-1?i:null)):(i=qt.call(this._minWeekdaysParse,s),i!==-1||(i=qt.call(this._weekdaysParse,s),i!==-1)?i:(i=qt.call(this._shortWeekdaysParse,s),i!==-1?i:null))}function E$(e,t,n){var r,i,a;if(this._weekdaysParseExact)return _$.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=ci([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function C$(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=p$(e,this.localeData()),this.add(e-t,"d")):t}function T$(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function A$(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=m$(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function N$(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||J1.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(st(this,"_weekdaysRegex")||(this._weekdaysRegex=b$),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function M$(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||J1.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(st(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=v$),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function R$(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||J1.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(st(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=w$),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function J1(){function e(u,d){return d.length-u.length}var t=[],n=[],r=[],i=[],a,s,o,l,c;for(a=0;a<7;a++)s=ci([2e3,1]).day(a),o=Vn(this.weekdaysMin(s,"")),l=Vn(this.weekdaysShort(s,"")),c=Vn(this.weekdays(s,"")),t.push(o),n.push(l),r.push(c),i.push(o),i.push(l),i.push(c);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ey(){return this.hours()%12||12}function I$(){return this.hours()||24}Ne("H",["HH",2],0,"hour");Ne("h",["hh",2],0,ey);Ne("k",["kk",2],0,I$);Ne("hmm",0,0,function(){return""+ey.apply(this)+si(this.minutes(),2)});Ne("hmmss",0,0,function(){return""+ey.apply(this)+si(this.minutes(),2)+si(this.seconds(),2)});Ne("Hmm",0,0,function(){return""+this.hours()+si(this.minutes(),2)});Ne("Hmmss",0,0,function(){return""+this.hours()+si(this.minutes(),2)+si(this.seconds(),2)});function tk(e,t){Ne(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}tk("a",!0);tk("A",!1);wn("hour","h");xn("hour",13);function nk(e,t){return t._meridiemParse}ve("a",nk);ve("A",nk);ve("H",At);ve("h",At);ve("k",At);ve("HH",At,tr);ve("hh",At,tr);ve("kk",At,tr);ve("hmm",W7);ve("hmmss",Y7);ve("Hmm",W7);ve("Hmmss",Y7);mt(["H","HH"],nn);mt(["k","kk"],function(e,t,n){var r=Xe(e);t[nn]=r===24?0:r});mt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});mt(["h","hh"],function(e,t,n){t[nn]=Xe(e),qe(n).bigHour=!0});mt("hmm",function(e,t,n){var r=e.length-2;t[nn]=Xe(e.substr(0,r)),t[Dr]=Xe(e.substr(r)),qe(n).bigHour=!0});mt("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[nn]=Xe(e.substr(0,r)),t[Dr]=Xe(e.substr(r,2)),t[Ti]=Xe(e.substr(i)),qe(n).bigHour=!0});mt("Hmm",function(e,t,n){var r=e.length-2;t[nn]=Xe(e.substr(0,r)),t[Dr]=Xe(e.substr(r))});mt("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[nn]=Xe(e.substr(0,r)),t[Dr]=Xe(e.substr(r,2)),t[Ti]=Xe(e.substr(i))});function O$(e){return(e+"").toLowerCase().charAt(0)==="p"}var D$=/[ap]\.?m?\.?/i,L$=Uo("Hours",!0);function P$(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var rk={calendar:EB,longDateFormat:NB,invalidDate:RB,ordinal:OB,dayOfMonthOrdinalParse:DB,relativeTime:PB,months:XB,monthsShort:V7,week:c$,weekdays:g$,weekdaysMin:y$,weekdaysShort:ek,meridiemParse:D$},Nt={},al={},oc;function z$(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(i=T0(a.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&z$(a,r)>=n-1)break;n--}t++}return oc}function B$(e){return e.match("^[^/\\\\]*$")!=null}function T0(e){var t=null,n;if(Nt[e]===void 0&&typeof pd<"u"&&pd&&pd.exports&&B$(e))try{t=oc._abbr,n=require,n("./locale/"+e),wa(t)}catch{Nt[e]=null}return Nt[e]}function wa(e,t){var n;return e&&(In(t)?n=Yi(e):n=ty(e,t),n?oc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),oc._abbr}function ty(e,t){if(t!==null){var n,r=rk;if(t.abbr=e,Nt[e]!=null)B7("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Nt[e]._config;else if(t.parentLocale!=null)if(Nt[t.parentLocale]!=null)r=Nt[t.parentLocale]._config;else if(n=T0(t.parentLocale),n!=null)r=n._config;else return al[t.parentLocale]||(al[t.parentLocale]=[]),al[t.parentLocale].push({name:e,config:t}),null;return Nt[e]=new V1(Fm(r,t)),al[e]&&al[e].forEach(function(i){ty(i.name,i.config)}),wa(e),Nt[e]}else return delete Nt[e],null}function $$(e,t){if(t!=null){var n,r,i=rk;Nt[e]!=null&&Nt[e].parentLocale!=null?Nt[e].set(Fm(Nt[e]._config,t)):(r=T0(e),r!=null&&(i=r._config),t=Fm(i,t),r==null&&(t.abbr=e),n=new V1(t),n.parentLocale=Nt[e],Nt[e]=n),wa(e)}else Nt[e]!=null&&(Nt[e].parentLocale!=null?(Nt[e]=Nt[e].parentLocale,e===wa()&&wa(e)):Nt[e]!=null&&delete Nt[e]);return Nt[e]}function Yi(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return oc;if(!Br(e)){if(t=T0(e),t)return t;e=[e]}return F$(e)}function U$(){return Bm(Nt)}function ny(e){var t,n=e._a;return n&&qe(e).overflow===-2&&(t=n[Ci]<0||n[Ci]>11?Ci:n[Qr]<1||n[Qr]>C0(n[bn],n[Ci])?Qr:n[nn]<0||n[nn]>24||n[nn]===24&&(n[Dr]!==0||n[Ti]!==0||n[Xa]!==0)?nn:n[Dr]<0||n[Dr]>59?Dr:n[Ti]<0||n[Ti]>59?Ti:n[Xa]<0||n[Xa]>999?Xa:-1,qe(e)._overflowDayOfYear&&(tQr)&&(t=Qr),qe(e)._overflowWeeks&&t===-1&&(t=VB),qe(e)._overflowWeekday&&t===-1&&(t=GB),qe(e).overflow=t),e}var j$=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,q$=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,H$=/Z|[+-]\d\d(?::?\d\d)?/,Iu=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Xf=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],W$=/^\/?Date\((-?\d+)/i,Y$=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,V$={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function ik(e){var t,n,r=e._i,i=j$.exec(r)||q$.exec(r),a,s,o,l,c=Iu.length,u=Xf.length;if(i){for(qe(e).iso=!0,t=0,n=c;tNl(s)||e._dayOfYear===0)&&(qe(e)._overflowDayOfYear=!0),n=ac(s,0,e._dayOfYear),e._a[Ci]=n.getUTCMonth(),e._a[Qr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[nn]===24&&e._a[Dr]===0&&e._a[Ti]===0&&e._a[Xa]===0&&(e._nextDay=!0,e._a[nn]=0),e._d=(e._useUTC?ac:o$).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[nn]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(qe(e).weekdayMismatch=!0)}}function tU(e){var t,n,r,i,a,s,o,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,s=4,n=Ds(t.GG,e._a[bn],sc(Tt(),1,4).year),r=Ds(t.W,1),i=Ds(t.E,1),(i<1||i>7)&&(l=!0)):(a=e._locale._week.dow,s=e._locale._week.doy,c=sc(Tt(),a,s),n=Ds(t.gg,e._a[bn],c.year),r=Ds(t.w,c.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+a,(t.e<0||t.e>6)&&(l=!0)):i=a),r<1||r>Mi(n,a,s)?qe(e)._overflowWeeks=!0:l!=null?qe(e)._overflowWeekday=!0:(o=J7(n,r,i,a,s),e._a[bn]=o.year,e._dayOfYear=o.dayOfYear)}pe.ISO_8601=function(){};pe.RFC_2822=function(){};function iy(e){if(e._f===pe.ISO_8601){ik(e);return}if(e._f===pe.RFC_2822){ak(e);return}e._a=[],qe(e).empty=!0;var t=""+e._i,n,r,i,a,s,o=t.length,l=0,c,u;for(i=$7(e._f,e._locale).match(G1)||[],u=i.length,n=0;n0&&qe(e).unusedInput.push(s),t=t.slice(t.indexOf(r)+r.length),l+=r.length),ho[a]?(r?qe(e).empty=!1:qe(e).unusedTokens.push(a),YB(a,r,e)):e._strict&&!r&&qe(e).unusedTokens.push(a);qe(e).charsLeftOver=o-l,t.length>0&&qe(e).unusedInput.push(t),e._a[nn]<=12&&qe(e).bigHour===!0&&e._a[nn]>0&&(qe(e).bigHour=void 0),qe(e).parsedDateParts=e._a.slice(0),qe(e).meridiem=e._meridiem,e._a[nn]=nU(e._locale,e._a[nn],e._meridiem),c=qe(e).era,c!==null&&(e._a[bn]=e._locale.erasConvertYear(c,e._a[bn])),ry(e),ny(e)}function nU(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function rU(e){var t,n,r,i,a,s,o=!1,l=e._f.length;if(l===0){qe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;ithis?this:e:v0()});function lk(e,t){var n,r;if(t.length===1&&Br(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _U(){if(!In(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Y1(e,this),e=sk(e),e._a?(t=e._isUTC?ci(e._a):Tt(e._a),this._isDSTShifted=this.isValid()&&mU(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function EU(){return this.isValid()?!this._isUTC:!1}function CU(){return this.isValid()?this._isUTC:!1}function uk(){return this.isValid()?this._isUTC&&this._offset===0:!1}var TU=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,AU=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function jr(e,t){var n=e,r=null,i,a,s;return ud(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Bi(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=TU.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:Xe(r[Qr])*i,h:Xe(r[nn])*i,m:Xe(r[Dr])*i,s:Xe(r[Ti])*i,ms:Xe(Um(r[Xa]*1e3))*i}):(r=AU.exec(e))?(i=r[1]==="-"?-1:1,n={y:za(r[2],i),M:za(r[3],i),w:za(r[4],i),d:za(r[5],i),h:za(r[6],i),m:za(r[7],i),s:za(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(s=NU(Tt(n.from),Tt(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),a=new A0(n),ud(e)&&st(e,"_locale")&&(a._locale=e._locale),ud(e)&&st(e,"_isValid")&&(a._isValid=e._isValid),a}jr.fn=A0.prototype;jr.invalid=pU;function za(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function i4(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function NU(e,t){var n;return e.isValid()&&t.isValid()?(t=sy(t,e),e.isBefore(t)?n=i4(e,t):(n=i4(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function dk(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(B7(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),i=jr(n,r),hk(this,i,e),this}}function hk(e,t,n,r){var i=t._milliseconds,a=Um(t._days),s=Um(t._months);e.isValid()&&(r=r??!0,s&&K7(e,th(e,"Month")+s*n),a&&j7(e,"Date",th(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&pe.updateOffset(e,a||s))}var MU=dk(1,"add"),RU=dk(-1,"subtract");function fk(e){return typeof e=="string"||e instanceof String}function IU(e){return $r(e)||Dc(e)||fk(e)||Bi(e)||DU(e)||OU(e)||e===null||e===void 0}function OU(e){var t=es(e)&&!H1(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,s=r.length;for(i=0;in.valueOf():n.valueOf()9999?cd(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ui(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cd(n,"Z")):cd(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function GU(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+r+i+a)}function KU(e){e||(e=this.isUtc()?pe.defaultFormatUtc:pe.defaultFormat);var t=cd(this,e);return this.localeData().postformat(t)}function XU(e,t){return this.isValid()&&($r(e)&&e.isValid()||Tt(e).isValid())?jr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function QU(e){return this.from(Tt(),e)}function ZU(e,t){return this.isValid()&&($r(e)&&e.isValid()||Tt(e).isValid())?jr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function JU(e){return this.to(Tt(),e)}function pk(e){var t;return e===void 0?this._locale._abbr:(t=Yi(e),t!=null&&(this._locale=t),this)}var mk=kr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function gk(){return this._locale}var ih=1e3,fo=60*ih,ah=60*fo,yk=(365*400+97)*24*ah;function po(e,t){return(e%t+t)%t}function bk(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-yk:new Date(e,t,n).valueOf()}function vk(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-yk:Date.UTC(e,t,n)}function ej(e){var t,n;if(e=Sr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?vk:bk,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=po(t+(this._isUTC?0:this.utcOffset()*fo),ah);break;case"minute":t=this._d.valueOf(),t-=po(t,fo);break;case"second":t=this._d.valueOf(),t-=po(t,ih);break}return this._d.setTime(t),pe.updateOffset(this,!0),this}function tj(e){var t,n;if(e=Sr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?vk:bk,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ah-po(t+(this._isUTC?0:this.utcOffset()*fo),ah)-1;break;case"minute":t=this._d.valueOf(),t+=fo-po(t,fo)-1;break;case"second":t=this._d.valueOf(),t+=ih-po(t,ih)-1;break}return this._d.setTime(t),pe.updateOffset(this,!0),this}function nj(){return this._d.valueOf()-(this._offset||0)*6e4}function rj(){return Math.floor(this.valueOf()/1e3)}function ij(){return new Date(this.valueOf())}function aj(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function sj(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function oj(){return this.isValid()?this.toISOString():null}function lj(){return W1(this)}function cj(){return oa({},qe(this))}function uj(){return qe(this).overflow}function dj(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ne("N",0,0,"eraAbbr");Ne("NN",0,0,"eraAbbr");Ne("NNN",0,0,"eraAbbr");Ne("NNNN",0,0,"eraName");Ne("NNNNN",0,0,"eraNarrow");Ne("y",["y",1],"yo","eraYear");Ne("y",["yy",2],0,"eraYear");Ne("y",["yyy",3],0,"eraYear");Ne("y",["yyyy",4],0,"eraYear");ve("N",oy);ve("NN",oy);ve("NNN",oy);ve("NNNN",kj);ve("NNNNN",Sj);mt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?qe(n).era=i:qe(n).invalidEra=e});ve("y",jo);ve("yy",jo);ve("yyy",jo);ve("yyyy",jo);ve("yo",_j);mt(["y","yy","yyy","yyyy"],bn);mt(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[bn]=n._locale.eraYearOrdinalParse(e,i):t[bn]=parseInt(e,10)});function hj(e,t){var n,r,i,a=this._eras||Yi("en")._eras;for(n=0,r=a.length;n=0)return a[r]}function pj(e,t){var n=e.since<=e.until?1:-1;return t===void 0?pe(e.since).year():pe(e.since).year()+(t-e.offset)*n}function mj(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ea&&(t=a),Rj.call(this,e,t,n,r,i))}function Rj(e,t,n,r,i){var a=J7(e,t,n,r,i),s=ac(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}Ne("Q",0,"Qo","quarter");wn("quarter","Q");xn("quarter",7);ve("Q",q7);mt("Q",function(e,t){t[Ci]=(Xe(e)-1)*3});function Ij(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Ne("D",["DD",2],"Do","date");wn("date","D");xn("date",9);ve("D",At);ve("DD",At,tr);ve("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});mt(["D","DD"],Qr);mt("Do",function(e,t){t[Qr]=Xe(e.match(At)[0])});var xk=Uo("Date",!0);Ne("DDD",["DDDD",3],"DDDo","dayOfYear");wn("dayOfYear","DDD");xn("dayOfYear",4);ve("DDD",k0);ve("DDDD",H7);mt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Xe(e)});function Oj(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Ne("m",["mm",2],0,"minute");wn("minute","m");xn("minute",14);ve("m",At);ve("mm",At,tr);mt(["m","mm"],Dr);var Dj=Uo("Minutes",!1);Ne("s",["ss",2],0,"second");wn("second","s");xn("second",15);ve("s",At);ve("ss",At,tr);mt(["s","ss"],Ti);var Lj=Uo("Seconds",!1);Ne("S",0,0,function(){return~~(this.millisecond()/100)});Ne(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Ne(0,["SSS",3],0,"millisecond");Ne(0,["SSSS",4],0,function(){return this.millisecond()*10});Ne(0,["SSSSS",5],0,function(){return this.millisecond()*100});Ne(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Ne(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Ne(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Ne(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});wn("millisecond","ms");xn("millisecond",16);ve("S",k0,q7);ve("SS",k0,tr);ve("SSS",k0,H7);var la,kk;for(la="SSSS";la.length<=9;la+="S")ve(la,jo);function Pj(e,t){t[Xa]=Xe(("0."+e)*1e3)}for(la="S";la.length<=9;la+="S")mt(la,Pj);kk=Uo("Milliseconds",!1);Ne("z",0,0,"zoneAbbr");Ne("zz",0,0,"zoneName");function zj(){return this._isUTC?"UTC":""}function Fj(){return this._isUTC?"Coordinated Universal Time":""}var ae=Lc.prototype;ae.add=MU;ae.calendar=zU;ae.clone=FU;ae.diff=WU;ae.endOf=tj;ae.format=KU;ae.from=XU;ae.fromNow=QU;ae.to=ZU;ae.toNow=JU;ae.get=$B;ae.invalidAt=uj;ae.isAfter=BU;ae.isBefore=$U;ae.isBetween=UU;ae.isSame=jU;ae.isSameOrAfter=qU;ae.isSameOrBefore=HU;ae.isValid=lj;ae.lang=mk;ae.locale=pk;ae.localeData=gk;ae.max=lU;ae.min=oU;ae.parsingFlags=cj;ae.set=UB;ae.startOf=ej;ae.subtract=RU;ae.toArray=aj;ae.toObject=sj;ae.toDate=ij;ae.toISOString=VU;ae.inspect=GU;typeof Symbol<"u"&&Symbol.for!=null&&(ae[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ae.toJSON=oj;ae.toString=YU;ae.unix=rj;ae.valueOf=nj;ae.creationData=dj;ae.eraName=mj;ae.eraNarrow=gj;ae.eraAbbr=yj;ae.eraYear=bj;ae.year=Z7;ae.isLeapYear=s$;ae.weekYear=Ej;ae.isoWeekYear=Cj;ae.quarter=ae.quarters=Ij;ae.month=X7;ae.daysInMonth=r$;ae.week=ae.weeks=h$;ae.isoWeek=ae.isoWeeks=f$;ae.weeksInYear=Nj;ae.weeksInWeekYear=Mj;ae.isoWeeksInYear=Tj;ae.isoWeeksInISOWeekYear=Aj;ae.date=xk;ae.day=ae.days=C$;ae.weekday=T$;ae.isoWeekday=A$;ae.dayOfYear=Oj;ae.hour=ae.hours=L$;ae.minute=ae.minutes=Dj;ae.second=ae.seconds=Lj;ae.millisecond=ae.milliseconds=kk;ae.utcOffset=yU;ae.utc=vU;ae.local=wU;ae.parseZone=xU;ae.hasAlignedHourOffset=kU;ae.isDST=SU;ae.isLocal=EU;ae.isUtcOffset=CU;ae.isUtc=uk;ae.isUTC=uk;ae.zoneAbbr=zj;ae.zoneName=Fj;ae.dates=kr("dates accessor is deprecated. Use date instead.",xk);ae.months=kr("months accessor is deprecated. Use month instead",X7);ae.years=kr("years accessor is deprecated. Use year instead",Z7);ae.zone=kr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",bU);ae.isDSTShifted=kr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_U);function Bj(e){return Tt(e*1e3)}function $j(){return Tt.apply(null,arguments).parseZone()}function Sk(e){return e}var ot=V1.prototype;ot.calendar=CB;ot.longDateFormat=MB;ot.invalidDate=IB;ot.ordinal=LB;ot.preparse=Sk;ot.postformat=Sk;ot.relativeTime=zB;ot.pastFuture=FB;ot.set=_B;ot.eras=hj;ot.erasParse=fj;ot.erasConvertYear=pj;ot.erasAbbrRegex=wj;ot.erasNameRegex=vj;ot.erasNarrowRegex=xj;ot.months=JB;ot.monthsShort=e$;ot.monthsParse=n$;ot.monthsRegex=a$;ot.monthsShortRegex=i$;ot.week=l$;ot.firstDayOfYear=d$;ot.firstDayOfWeek=u$;ot.weekdays=x$;ot.weekdaysMin=S$;ot.weekdaysShort=k$;ot.weekdaysParse=E$;ot.weekdaysRegex=N$;ot.weekdaysShortRegex=M$;ot.weekdaysMinRegex=R$;ot.isPM=O$;ot.meridiem=P$;function sh(e,t,n,r){var i=Yi(),a=ci().set(r,t);return i[n](a,e)}function _k(e,t,n){if(Bi(e)&&(t=e,e=void 0),e=e||"",t!=null)return sh(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=sh(e,r,n,"month");return i}function cy(e,t,n,r){typeof e=="boolean"?(Bi(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Bi(t)&&(n=t,t=void 0),t=t||"");var i=Yi(),a=e?i._week.dow:0,s,o=[];if(n!=null)return sh(t,(n+a)%7,r,"day");for(s=0;s<7;s++)o[s]=sh(t,(s+a)%7,r,"day");return o}function Uj(e,t){return _k(e,t,"months")}function jj(e,t){return _k(e,t,"monthsShort")}function qj(e,t,n){return cy(e,t,n,"weekdays")}function Hj(e,t,n){return cy(e,t,n,"weekdaysShort")}function Wj(e,t,n){return cy(e,t,n,"weekdaysMin")}wa("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Xe(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});pe.lang=kr("moment.lang is deprecated. Use moment.locale instead.",wa);pe.langData=kr("moment.langData is deprecated. Use moment.localeData instead.",Yi);var mi=Math.abs;function Yj(){var e=this._data;return this._milliseconds=mi(this._milliseconds),this._days=mi(this._days),this._months=mi(this._months),e.milliseconds=mi(e.milliseconds),e.seconds=mi(e.seconds),e.minutes=mi(e.minutes),e.hours=mi(e.hours),e.months=mi(e.months),e.years=mi(e.years),this}function Ek(e,t,n,r){var i=jr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Vj(e,t){return Ek(this,e,t,1)}function Gj(e,t){return Ek(this,e,t,-1)}function a4(e){return e<0?Math.floor(e):Math.ceil(e)}function Kj(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,s,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=a4(qm(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=or(e/1e3),r.seconds=i%60,a=or(i/60),r.minutes=a%60,s=or(a/60),r.hours=s%24,t+=or(s/24),l=or(Ck(t)),n+=l,t-=a4(qm(l)),o=or(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function Ck(e){return e*4800/146097}function qm(e){return e*146097/4800}function Xj(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Sr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+Ck(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(qm(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Qj(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Xe(this._months/12)*31536e6:NaN}function Vi(e){return function(){return this.as(e)}}var Zj=Vi("ms"),Jj=Vi("s"),eq=Vi("m"),tq=Vi("h"),nq=Vi("d"),rq=Vi("w"),iq=Vi("M"),aq=Vi("Q"),sq=Vi("y");function oq(){return jr(this)}function lq(e){return e=Sr(e),this.isValid()?this[e+"s"]():NaN}function vs(e){return function(){return this.isValid()?this._data[e]:NaN}}var cq=vs("milliseconds"),uq=vs("seconds"),dq=vs("minutes"),hq=vs("hours"),fq=vs("days"),pq=vs("months"),mq=vs("years");function gq(){return or(this.days()/7)}var wi=Math.round,Js={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function yq(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function bq(e,t,n,r){var i=jr(e).abs(),a=wi(i.as("s")),s=wi(i.as("m")),o=wi(i.as("h")),l=wi(i.as("d")),c=wi(i.as("M")),u=wi(i.as("w")),d=wi(i.as("y")),f=a<=n.ss&&["s",a]||a0,f[4]=r,yq.apply(null,f)}function vq(e){return e===void 0?wi:typeof e=="function"?(wi=e,!0):!1}function wq(e,t){return Js[e]===void 0?!1:t===void 0?Js[e]:(Js[e]=t,e==="s"&&(Js.ss=t-1),!0)}function xq(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Js,i,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Js,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=bq(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var Qf=Math.abs;function Ms(e){return(e>0)-(e<0)||+e}function M0(){if(!this.isValid())return this.localeData().invalidDate();var e=Qf(this._milliseconds)/1e3,t=Qf(this._days),n=Qf(this._months),r,i,a,s,o=this.asSeconds(),l,c,u,d;return o?(r=or(e/60),i=or(r/60),e%=60,r%=60,a=or(n/12),n%=12,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",c=Ms(this._months)!==Ms(o)?"-":"",u=Ms(this._days)!==Ms(o)?"-":"",d=Ms(this._milliseconds)!==Ms(o)?"-":"",l+"P"+(a?c+a+"Y":"")+(n?c+n+"M":"")+(t?u+t+"D":"")+(i||r||e?"T":"")+(i?d+i+"H":"")+(r?d+r+"M":"")+(e?d+s+"S":"")):"P0D"}var Je=A0.prototype;Je.isValid=fU;Je.abs=Yj;Je.add=Vj;Je.subtract=Gj;Je.as=Xj;Je.asMilliseconds=Zj;Je.asSeconds=Jj;Je.asMinutes=eq;Je.asHours=tq;Je.asDays=nq;Je.asWeeks=rq;Je.asMonths=iq;Je.asQuarters=aq;Je.asYears=sq;Je.valueOf=Qj;Je._bubble=Kj;Je.clone=oq;Je.get=lq;Je.milliseconds=cq;Je.seconds=uq;Je.minutes=dq;Je.hours=hq;Je.days=fq;Je.weeks=gq;Je.months=pq;Je.years=mq;Je.humanize=xq;Je.toISOString=M0;Je.toString=M0;Je.toJSON=M0;Je.locale=pk;Je.localeData=gk;Je.toIsoString=kr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",M0);Je.lang=mk;Ne("X",0,0,"unix");Ne("x",0,0,"valueOf");ve("x",_0);ve("X",qB);mt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});mt("x",function(e,t,n){n._d=new Date(Xe(e))});//! moment.js +pe.version="2.29.4";kB(Tt);pe.fn=ae;pe.min=cU;pe.max=uU;pe.now=dU;pe.utc=ci;pe.unix=Bj;pe.months=Uj;pe.isDate=Dc;pe.locale=wa;pe.invalid=v0;pe.duration=jr;pe.isMoment=$r;pe.weekdays=qj;pe.parseZone=$j;pe.localeData=Yi;pe.isDuration=ud;pe.monthsShort=jj;pe.weekdaysMin=Wj;pe.defineLocale=ty;pe.updateLocale=$$;pe.locales=U$;pe.weekdaysShort=Hj;pe.normalizeUnits=Sr;pe.relativeTimeRounding=vq;pe.relativeTimeThreshold=wq;pe.calendarFormat=PU;pe.prototype=ae;pe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function qa(e){return e!==null&&e<-2}function s4(e){return e===-2||e===-1||e===32}function Ou(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(l){return s4(l)?(e.enter(n),o(l)):t(l)}function o(l){return s4(l)&&a++15?c="…"+s.slice(i-15,i):c=s.slice(0,i);var u;o+15":">","<":"<",'"':""","'":"'"},Dq=/[&><"']/g;function Lq(e){return String(e).replace(Dq,t=>Oq[t])}var Tk=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},Pq=function(t){var n=Tk(t);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},zq=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},Fq=function(t){var n=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(t);return n!=null?n[1]:"_relative"},Pe={contains:Nq,deflt:Mq,escape:Lq,hyphenate:Iq,getBaseElem:Tk,isCharacterBox:Pq,protocolFromUrl:Fq},hd={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Bq(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if(typeof n!="string")return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class uy{constructor(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var n in hd)if(hd.hasOwnProperty(n)){var r=hd[n];this[n]=t[n]!==void 0?r.processor?r.processor(t[n]):t[n]:Bq(r)}}reportNonstrict(t,n,r){var i=this.strict;if(typeof i=="function"&&(i=i(t,n,r)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new ie("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),r);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,r){var i=this.strict;if(typeof i=="function")try{i=i(t,n,r)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+n+" ["+t+"]")),!1)}isTrusted(t){t.url&&!t.protocol&&(t.protocol=Pe.protocolFromUrl(t.url));var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}}class Qi{constructor(t,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=r}sup(){return Kr[$q[this.id]]}sub(){return Kr[Uq[this.id]]}fracNum(){return Kr[jq[this.id]]}fracDen(){return Kr[qq[this.id]]}cramp(){return Kr[Hq[this.id]]}text(){return Kr[Wq[this.id]]}isTight(){return this.size>=2}}var dy=0,oh=1,mo=2,Ri=3,lc=4,hr=5,To=6,En=7,Kr=[new Qi(dy,0,!1),new Qi(oh,0,!0),new Qi(mo,1,!1),new Qi(Ri,1,!0),new Qi(lc,2,!1),new Qi(hr,2,!0),new Qi(To,3,!1),new Qi(En,3,!0)],$q=[lc,hr,lc,hr,To,En,To,En],Uq=[hr,hr,hr,hr,En,En,En,En],jq=[mo,Ri,lc,hr,To,En,To,En],qq=[Ri,Ri,hr,hr,En,En,En,En],Hq=[oh,oh,Ri,Ri,hr,hr,En,En],Wq=[dy,oh,mo,Ri,mo,Ri,mo,Ri],De={DISPLAY:Kr[dy],TEXT:Kr[mo],SCRIPT:Kr[lc],SCRIPTSCRIPT:Kr[To]},Hm=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Yq(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var fd=[];Hm.forEach(e=>e.blocks.forEach(t=>fd.push(...t)));function Ak(e){for(var t=0;t=fd[t]&&e<=fd[t+1])return!0;return!1}var Rs=80,Vq=function(t,n){return"M95,"+(622+t+n)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+t/2.075+" -"+t+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+t)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Gq=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+t/2.084+" -"+t+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+t)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Kq=function(t,n){return"M983 "+(10+t+n)+` +l`+t/3.13+" -"+t+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Xq=function(t,n){return"M424,"+(2398+t+n)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+t)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+` +h400000v`+(40+t)+"h-400000z"},Qq=function(t,n){return"M473,"+(2713+t+n)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},Zq=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},Jq=function(t,n,r){var i=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+` +H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},eH=function(t,n,r){n=1e3*n;var i="";switch(t){case"sqrtMain":i=Vq(n,Rs);break;case"sqrtSize1":i=Gq(n,Rs);break;case"sqrtSize2":i=Kq(n,Rs);break;case"sqrtSize3":i=Xq(n,Rs);break;case"sqrtSize4":i=Qq(n,Rs);break;case"sqrtTall":i=Jq(n,Rs,r)}return i},tH=function(t,n){switch(t){case"⎜":return"M291 0 H417 V"+n+" H291z M291 0 H417 V"+n+" H291z";case"∣":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z";case"∥":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z"+("M367 0 H410 V"+n+" H367z M367 0 H410 V"+n+" H367z");case"⎟":return"M457 0 H583 V"+n+" H457z M457 0 H583 V"+n+" H457z";case"⎢":return"M319 0 H403 V"+n+" H319z M319 0 H403 V"+n+" H319z";case"⎥":return"M263 0 H347 V"+n+" H263z M263 0 H347 V"+n+" H263z";case"⎪":return"M384 0 H504 V"+n+" H384z M384 0 H504 V"+n+" H384z";case"⏐":return"M312 0 H355 V"+n+" H312z M312 0 H355 V"+n+" H312z";case"‖":return"M257 0 H300 V"+n+" H257z M257 0 H300 V"+n+" H257z"+("M478 0 H521 V"+n+" H478z M478 0 H521 V"+n+" H478z");default:return""}},l4={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},nH=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+n+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z +M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z +M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z +M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class Fc{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return Pe.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),n=0;nn.toText();return this.children.map(t).join("")}}var Zr={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Du={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},c4={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function rH(e,t){Zr[e]=t}function hy(e,t,n){if(!Zr[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=Zr[t][r];if(!i&&e[0]in c4&&(r=c4[e[0]].charCodeAt(0),i=Zr[t][r]),!i&&n==="text"&&Ak(r)&&(i=Zr[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Zf={};function iH(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Zf[t]){var n=Zf[t]={cssEmPerMu:Du.quad[t]/18};for(var r in Du)Du.hasOwnProperty(r)&&(n[r]=Du[r][t])}return Zf[t]}var aH=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],u4=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],d4=function(t,n){return n.size<2?t:aH[t-1][n.size-1]};class ki{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||ki.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=u4[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return new ki(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:d4(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:u4[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=d4(ki.BASESIZE,t);return this.size===n&&this.textSize===ki.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==ki.BASESIZE?["sizing","reset-size"+this.size,"size"+ki.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=iH(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}ki.BASESIZE=6;var Wm={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},sH={ex:!0,em:!0,mu:!0},Nk=function(t){return typeof t!="string"&&(t=t.unit),t in Wm||t in sH||t==="ex"},Lt=function(t,n){var r;if(t.unit in Wm)r=Wm[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var i;if(n.style.isTight()?i=n.havingStyle(n.style.text()):i=n,t.unit==="ex")r=i.fontMetrics().xHeight;else if(t.unit==="em")r=i.fontMetrics().quad;else throw new ie("Invalid unit: '"+t.unit+"'");i!==n&&(r*=i.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*r,n.maxSize)},he=function(t){return+t.toFixed(4)+"em"},_a=function(t){return t.filter(n=>n).join(" ")},Mk=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){n.style.isTight()&&this.classes.push("mtight");var i=n.getColor();i&&(this.style.color=i)}},Rk=function(t){var n=document.createElement(t);n.className=_a(this.classes);for(var r in this.style)this.style.hasOwnProperty(r)&&(n.style[r]=this.style[r]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&n.setAttribute(i,this.attributes[i]);for(var a=0;a",n};class Bc{constructor(t,n,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Mk.call(this,t,r,i),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return Pe.contains(this.classes,t)}toNode(){return Rk.call(this,"span")}toMarkup(){return Ik.call(this,"span")}}class fy{constructor(t,n,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Mk.call(this,n,i),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return Pe.contains(this.classes,t)}toNode(){return Rk.call(this,"a")}toMarkup(){return Ik.call(this,"a")}}class oH{constructor(t,n,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return Pe.contains(this.classes,t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var n in this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);return t}toMarkup(){var t=""+this.alt+"0&&(n=document.createElement("span"),n.style.marginRight=he(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=_a(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(n=n||document.createElement("span"),n.style[r]=this.style[r]);return n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="0&&(r+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(r+=Pe.hyphenate(i)+":"+this.style[i]+";");r&&(t=!0,n+=' style="'+Pe.escape(r)+'"');var a=Pe.escape(this.text);return t?(n+=">",n+=a,n+="",n):a}}class $i{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i":""}}class Ym{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var t=" but got "+String(e)+".")}var uH={bin:1,close:1,inner:1,open:1,punct:1,rel:1},dH={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},wt={math:{},text:{}};function g(e,t,n,r,i,a){wt[e][i]={font:t,group:n,replace:r},a&&r&&(wt[e][r]=wt[e][i])}var b="math",Z="text",S="main",I="ams",It="accent-token",be="bin",Nn="close",qo="inner",Le="mathord",Zt="op-token",nr="open",R0="punct",D="rel",Gi="spacing",P="textord";g(b,S,D,"≡","\\equiv",!0);g(b,S,D,"≺","\\prec",!0);g(b,S,D,"≻","\\succ",!0);g(b,S,D,"∼","\\sim",!0);g(b,S,D,"⊥","\\perp");g(b,S,D,"⪯","\\preceq",!0);g(b,S,D,"⪰","\\succeq",!0);g(b,S,D,"≃","\\simeq",!0);g(b,S,D,"∣","\\mid",!0);g(b,S,D,"≪","\\ll",!0);g(b,S,D,"≫","\\gg",!0);g(b,S,D,"≍","\\asymp",!0);g(b,S,D,"∥","\\parallel");g(b,S,D,"⋈","\\bowtie",!0);g(b,S,D,"⌣","\\smile",!0);g(b,S,D,"⊑","\\sqsubseteq",!0);g(b,S,D,"⊒","\\sqsupseteq",!0);g(b,S,D,"≐","\\doteq",!0);g(b,S,D,"⌢","\\frown",!0);g(b,S,D,"∋","\\ni",!0);g(b,S,D,"∝","\\propto",!0);g(b,S,D,"⊢","\\vdash",!0);g(b,S,D,"⊣","\\dashv",!0);g(b,S,D,"∋","\\owns");g(b,S,R0,".","\\ldotp");g(b,S,R0,"⋅","\\cdotp");g(b,S,P,"#","\\#");g(Z,S,P,"#","\\#");g(b,S,P,"&","\\&");g(Z,S,P,"&","\\&");g(b,S,P,"ℵ","\\aleph",!0);g(b,S,P,"∀","\\forall",!0);g(b,S,P,"ℏ","\\hbar",!0);g(b,S,P,"∃","\\exists",!0);g(b,S,P,"∇","\\nabla",!0);g(b,S,P,"♭","\\flat",!0);g(b,S,P,"ℓ","\\ell",!0);g(b,S,P,"♮","\\natural",!0);g(b,S,P,"♣","\\clubsuit",!0);g(b,S,P,"℘","\\wp",!0);g(b,S,P,"♯","\\sharp",!0);g(b,S,P,"♢","\\diamondsuit",!0);g(b,S,P,"ℜ","\\Re",!0);g(b,S,P,"♡","\\heartsuit",!0);g(b,S,P,"ℑ","\\Im",!0);g(b,S,P,"♠","\\spadesuit",!0);g(b,S,P,"§","\\S",!0);g(Z,S,P,"§","\\S");g(b,S,P,"¶","\\P",!0);g(Z,S,P,"¶","\\P");g(b,S,P,"†","\\dag");g(Z,S,P,"†","\\dag");g(Z,S,P,"†","\\textdagger");g(b,S,P,"‡","\\ddag");g(Z,S,P,"‡","\\ddag");g(Z,S,P,"‡","\\textdaggerdbl");g(b,S,Nn,"⎱","\\rmoustache",!0);g(b,S,nr,"⎰","\\lmoustache",!0);g(b,S,Nn,"⟯","\\rgroup",!0);g(b,S,nr,"⟮","\\lgroup",!0);g(b,S,be,"∓","\\mp",!0);g(b,S,be,"⊖","\\ominus",!0);g(b,S,be,"⊎","\\uplus",!0);g(b,S,be,"⊓","\\sqcap",!0);g(b,S,be,"∗","\\ast");g(b,S,be,"⊔","\\sqcup",!0);g(b,S,be,"◯","\\bigcirc",!0);g(b,S,be,"∙","\\bullet",!0);g(b,S,be,"‡","\\ddagger");g(b,S,be,"≀","\\wr",!0);g(b,S,be,"⨿","\\amalg");g(b,S,be,"&","\\And");g(b,S,D,"⟵","\\longleftarrow",!0);g(b,S,D,"⇐","\\Leftarrow",!0);g(b,S,D,"⟸","\\Longleftarrow",!0);g(b,S,D,"⟶","\\longrightarrow",!0);g(b,S,D,"⇒","\\Rightarrow",!0);g(b,S,D,"⟹","\\Longrightarrow",!0);g(b,S,D,"↔","\\leftrightarrow",!0);g(b,S,D,"⟷","\\longleftrightarrow",!0);g(b,S,D,"⇔","\\Leftrightarrow",!0);g(b,S,D,"⟺","\\Longleftrightarrow",!0);g(b,S,D,"↦","\\mapsto",!0);g(b,S,D,"⟼","\\longmapsto",!0);g(b,S,D,"↗","\\nearrow",!0);g(b,S,D,"↩","\\hookleftarrow",!0);g(b,S,D,"↪","\\hookrightarrow",!0);g(b,S,D,"↘","\\searrow",!0);g(b,S,D,"↼","\\leftharpoonup",!0);g(b,S,D,"⇀","\\rightharpoonup",!0);g(b,S,D,"↙","\\swarrow",!0);g(b,S,D,"↽","\\leftharpoondown",!0);g(b,S,D,"⇁","\\rightharpoondown",!0);g(b,S,D,"↖","\\nwarrow",!0);g(b,S,D,"⇌","\\rightleftharpoons",!0);g(b,I,D,"≮","\\nless",!0);g(b,I,D,"","\\@nleqslant");g(b,I,D,"","\\@nleqq");g(b,I,D,"⪇","\\lneq",!0);g(b,I,D,"≨","\\lneqq",!0);g(b,I,D,"","\\@lvertneqq");g(b,I,D,"⋦","\\lnsim",!0);g(b,I,D,"⪉","\\lnapprox",!0);g(b,I,D,"⊀","\\nprec",!0);g(b,I,D,"⋠","\\npreceq",!0);g(b,I,D,"⋨","\\precnsim",!0);g(b,I,D,"⪹","\\precnapprox",!0);g(b,I,D,"≁","\\nsim",!0);g(b,I,D,"","\\@nshortmid");g(b,I,D,"∤","\\nmid",!0);g(b,I,D,"⊬","\\nvdash",!0);g(b,I,D,"⊭","\\nvDash",!0);g(b,I,D,"⋪","\\ntriangleleft");g(b,I,D,"⋬","\\ntrianglelefteq",!0);g(b,I,D,"⊊","\\subsetneq",!0);g(b,I,D,"","\\@varsubsetneq");g(b,I,D,"⫋","\\subsetneqq",!0);g(b,I,D,"","\\@varsubsetneqq");g(b,I,D,"≯","\\ngtr",!0);g(b,I,D,"","\\@ngeqslant");g(b,I,D,"","\\@ngeqq");g(b,I,D,"⪈","\\gneq",!0);g(b,I,D,"≩","\\gneqq",!0);g(b,I,D,"","\\@gvertneqq");g(b,I,D,"⋧","\\gnsim",!0);g(b,I,D,"⪊","\\gnapprox",!0);g(b,I,D,"⊁","\\nsucc",!0);g(b,I,D,"⋡","\\nsucceq",!0);g(b,I,D,"⋩","\\succnsim",!0);g(b,I,D,"⪺","\\succnapprox",!0);g(b,I,D,"≆","\\ncong",!0);g(b,I,D,"","\\@nshortparallel");g(b,I,D,"∦","\\nparallel",!0);g(b,I,D,"⊯","\\nVDash",!0);g(b,I,D,"⋫","\\ntriangleright");g(b,I,D,"⋭","\\ntrianglerighteq",!0);g(b,I,D,"","\\@nsupseteqq");g(b,I,D,"⊋","\\supsetneq",!0);g(b,I,D,"","\\@varsupsetneq");g(b,I,D,"⫌","\\supsetneqq",!0);g(b,I,D,"","\\@varsupsetneqq");g(b,I,D,"⊮","\\nVdash",!0);g(b,I,D,"⪵","\\precneqq",!0);g(b,I,D,"⪶","\\succneqq",!0);g(b,I,D,"","\\@nsubseteqq");g(b,I,be,"⊴","\\unlhd");g(b,I,be,"⊵","\\unrhd");g(b,I,D,"↚","\\nleftarrow",!0);g(b,I,D,"↛","\\nrightarrow",!0);g(b,I,D,"⇍","\\nLeftarrow",!0);g(b,I,D,"⇏","\\nRightarrow",!0);g(b,I,D,"↮","\\nleftrightarrow",!0);g(b,I,D,"⇎","\\nLeftrightarrow",!0);g(b,I,D,"△","\\vartriangle");g(b,I,P,"ℏ","\\hslash");g(b,I,P,"▽","\\triangledown");g(b,I,P,"◊","\\lozenge");g(b,I,P,"Ⓢ","\\circledS");g(b,I,P,"®","\\circledR");g(Z,I,P,"®","\\circledR");g(b,I,P,"∡","\\measuredangle",!0);g(b,I,P,"∄","\\nexists");g(b,I,P,"℧","\\mho");g(b,I,P,"Ⅎ","\\Finv",!0);g(b,I,P,"⅁","\\Game",!0);g(b,I,P,"‵","\\backprime");g(b,I,P,"▲","\\blacktriangle");g(b,I,P,"▼","\\blacktriangledown");g(b,I,P,"■","\\blacksquare");g(b,I,P,"⧫","\\blacklozenge");g(b,I,P,"★","\\bigstar");g(b,I,P,"∢","\\sphericalangle",!0);g(b,I,P,"∁","\\complement",!0);g(b,I,P,"ð","\\eth",!0);g(Z,S,P,"ð","ð");g(b,I,P,"╱","\\diagup");g(b,I,P,"╲","\\diagdown");g(b,I,P,"□","\\square");g(b,I,P,"□","\\Box");g(b,I,P,"◊","\\Diamond");g(b,I,P,"¥","\\yen",!0);g(Z,I,P,"¥","\\yen",!0);g(b,I,P,"✓","\\checkmark",!0);g(Z,I,P,"✓","\\checkmark");g(b,I,P,"ℶ","\\beth",!0);g(b,I,P,"ℸ","\\daleth",!0);g(b,I,P,"ℷ","\\gimel",!0);g(b,I,P,"ϝ","\\digamma",!0);g(b,I,P,"ϰ","\\varkappa");g(b,I,nr,"┌","\\@ulcorner",!0);g(b,I,Nn,"┐","\\@urcorner",!0);g(b,I,nr,"└","\\@llcorner",!0);g(b,I,Nn,"┘","\\@lrcorner",!0);g(b,I,D,"≦","\\leqq",!0);g(b,I,D,"⩽","\\leqslant",!0);g(b,I,D,"⪕","\\eqslantless",!0);g(b,I,D,"≲","\\lesssim",!0);g(b,I,D,"⪅","\\lessapprox",!0);g(b,I,D,"≊","\\approxeq",!0);g(b,I,be,"⋖","\\lessdot");g(b,I,D,"⋘","\\lll",!0);g(b,I,D,"≶","\\lessgtr",!0);g(b,I,D,"⋚","\\lesseqgtr",!0);g(b,I,D,"⪋","\\lesseqqgtr",!0);g(b,I,D,"≑","\\doteqdot");g(b,I,D,"≓","\\risingdotseq",!0);g(b,I,D,"≒","\\fallingdotseq",!0);g(b,I,D,"∽","\\backsim",!0);g(b,I,D,"⋍","\\backsimeq",!0);g(b,I,D,"⫅","\\subseteqq",!0);g(b,I,D,"⋐","\\Subset",!0);g(b,I,D,"⊏","\\sqsubset",!0);g(b,I,D,"≼","\\preccurlyeq",!0);g(b,I,D,"⋞","\\curlyeqprec",!0);g(b,I,D,"≾","\\precsim",!0);g(b,I,D,"⪷","\\precapprox",!0);g(b,I,D,"⊲","\\vartriangleleft");g(b,I,D,"⊴","\\trianglelefteq");g(b,I,D,"⊨","\\vDash",!0);g(b,I,D,"⊪","\\Vvdash",!0);g(b,I,D,"⌣","\\smallsmile");g(b,I,D,"⌢","\\smallfrown");g(b,I,D,"≏","\\bumpeq",!0);g(b,I,D,"≎","\\Bumpeq",!0);g(b,I,D,"≧","\\geqq",!0);g(b,I,D,"⩾","\\geqslant",!0);g(b,I,D,"⪖","\\eqslantgtr",!0);g(b,I,D,"≳","\\gtrsim",!0);g(b,I,D,"⪆","\\gtrapprox",!0);g(b,I,be,"⋗","\\gtrdot");g(b,I,D,"⋙","\\ggg",!0);g(b,I,D,"≷","\\gtrless",!0);g(b,I,D,"⋛","\\gtreqless",!0);g(b,I,D,"⪌","\\gtreqqless",!0);g(b,I,D,"≖","\\eqcirc",!0);g(b,I,D,"≗","\\circeq",!0);g(b,I,D,"≜","\\triangleq",!0);g(b,I,D,"∼","\\thicksim");g(b,I,D,"≈","\\thickapprox");g(b,I,D,"⫆","\\supseteqq",!0);g(b,I,D,"⋑","\\Supset",!0);g(b,I,D,"⊐","\\sqsupset",!0);g(b,I,D,"≽","\\succcurlyeq",!0);g(b,I,D,"⋟","\\curlyeqsucc",!0);g(b,I,D,"≿","\\succsim",!0);g(b,I,D,"⪸","\\succapprox",!0);g(b,I,D,"⊳","\\vartriangleright");g(b,I,D,"⊵","\\trianglerighteq");g(b,I,D,"⊩","\\Vdash",!0);g(b,I,D,"∣","\\shortmid");g(b,I,D,"∥","\\shortparallel");g(b,I,D,"≬","\\between",!0);g(b,I,D,"⋔","\\pitchfork",!0);g(b,I,D,"∝","\\varpropto");g(b,I,D,"◀","\\blacktriangleleft");g(b,I,D,"∴","\\therefore",!0);g(b,I,D,"∍","\\backepsilon");g(b,I,D,"▶","\\blacktriangleright");g(b,I,D,"∵","\\because",!0);g(b,I,D,"⋘","\\llless");g(b,I,D,"⋙","\\gggtr");g(b,I,be,"⊲","\\lhd");g(b,I,be,"⊳","\\rhd");g(b,I,D,"≂","\\eqsim",!0);g(b,S,D,"⋈","\\Join");g(b,I,D,"≑","\\Doteq",!0);g(b,I,be,"∔","\\dotplus",!0);g(b,I,be,"∖","\\smallsetminus");g(b,I,be,"⋒","\\Cap",!0);g(b,I,be,"⋓","\\Cup",!0);g(b,I,be,"⩞","\\doublebarwedge",!0);g(b,I,be,"⊟","\\boxminus",!0);g(b,I,be,"⊞","\\boxplus",!0);g(b,I,be,"⋇","\\divideontimes",!0);g(b,I,be,"⋉","\\ltimes",!0);g(b,I,be,"⋊","\\rtimes",!0);g(b,I,be,"⋋","\\leftthreetimes",!0);g(b,I,be,"⋌","\\rightthreetimes",!0);g(b,I,be,"⋏","\\curlywedge",!0);g(b,I,be,"⋎","\\curlyvee",!0);g(b,I,be,"⊝","\\circleddash",!0);g(b,I,be,"⊛","\\circledast",!0);g(b,I,be,"⋅","\\centerdot");g(b,I,be,"⊺","\\intercal",!0);g(b,I,be,"⋒","\\doublecap");g(b,I,be,"⋓","\\doublecup");g(b,I,be,"⊠","\\boxtimes",!0);g(b,I,D,"⇢","\\dashrightarrow",!0);g(b,I,D,"⇠","\\dashleftarrow",!0);g(b,I,D,"⇇","\\leftleftarrows",!0);g(b,I,D,"⇆","\\leftrightarrows",!0);g(b,I,D,"⇚","\\Lleftarrow",!0);g(b,I,D,"↞","\\twoheadleftarrow",!0);g(b,I,D,"↢","\\leftarrowtail",!0);g(b,I,D,"↫","\\looparrowleft",!0);g(b,I,D,"⇋","\\leftrightharpoons",!0);g(b,I,D,"↶","\\curvearrowleft",!0);g(b,I,D,"↺","\\circlearrowleft",!0);g(b,I,D,"↰","\\Lsh",!0);g(b,I,D,"⇈","\\upuparrows",!0);g(b,I,D,"↿","\\upharpoonleft",!0);g(b,I,D,"⇃","\\downharpoonleft",!0);g(b,S,D,"⊶","\\origof",!0);g(b,S,D,"⊷","\\imageof",!0);g(b,I,D,"⊸","\\multimap",!0);g(b,I,D,"↭","\\leftrightsquigarrow",!0);g(b,I,D,"⇉","\\rightrightarrows",!0);g(b,I,D,"⇄","\\rightleftarrows",!0);g(b,I,D,"↠","\\twoheadrightarrow",!0);g(b,I,D,"↣","\\rightarrowtail",!0);g(b,I,D,"↬","\\looparrowright",!0);g(b,I,D,"↷","\\curvearrowright",!0);g(b,I,D,"↻","\\circlearrowright",!0);g(b,I,D,"↱","\\Rsh",!0);g(b,I,D,"⇊","\\downdownarrows",!0);g(b,I,D,"↾","\\upharpoonright",!0);g(b,I,D,"⇂","\\downharpoonright",!0);g(b,I,D,"⇝","\\rightsquigarrow",!0);g(b,I,D,"⇝","\\leadsto");g(b,I,D,"⇛","\\Rrightarrow",!0);g(b,I,D,"↾","\\restriction");g(b,S,P,"‘","`");g(b,S,P,"$","\\$");g(Z,S,P,"$","\\$");g(Z,S,P,"$","\\textdollar");g(b,S,P,"%","\\%");g(Z,S,P,"%","\\%");g(b,S,P,"_","\\_");g(Z,S,P,"_","\\_");g(Z,S,P,"_","\\textunderscore");g(b,S,P,"∠","\\angle",!0);g(b,S,P,"∞","\\infty",!0);g(b,S,P,"′","\\prime");g(b,S,P,"△","\\triangle");g(b,S,P,"Γ","\\Gamma",!0);g(b,S,P,"Δ","\\Delta",!0);g(b,S,P,"Θ","\\Theta",!0);g(b,S,P,"Λ","\\Lambda",!0);g(b,S,P,"Ξ","\\Xi",!0);g(b,S,P,"Π","\\Pi",!0);g(b,S,P,"Σ","\\Sigma",!0);g(b,S,P,"Υ","\\Upsilon",!0);g(b,S,P,"Φ","\\Phi",!0);g(b,S,P,"Ψ","\\Psi",!0);g(b,S,P,"Ω","\\Omega",!0);g(b,S,P,"A","Α");g(b,S,P,"B","Β");g(b,S,P,"E","Ε");g(b,S,P,"Z","Ζ");g(b,S,P,"H","Η");g(b,S,P,"I","Ι");g(b,S,P,"K","Κ");g(b,S,P,"M","Μ");g(b,S,P,"N","Ν");g(b,S,P,"O","Ο");g(b,S,P,"P","Ρ");g(b,S,P,"T","Τ");g(b,S,P,"X","Χ");g(b,S,P,"¬","\\neg",!0);g(b,S,P,"¬","\\lnot");g(b,S,P,"⊤","\\top");g(b,S,P,"⊥","\\bot");g(b,S,P,"∅","\\emptyset");g(b,I,P,"∅","\\varnothing");g(b,S,Le,"α","\\alpha",!0);g(b,S,Le,"β","\\beta",!0);g(b,S,Le,"γ","\\gamma",!0);g(b,S,Le,"δ","\\delta",!0);g(b,S,Le,"ϵ","\\epsilon",!0);g(b,S,Le,"ζ","\\zeta",!0);g(b,S,Le,"η","\\eta",!0);g(b,S,Le,"θ","\\theta",!0);g(b,S,Le,"ι","\\iota",!0);g(b,S,Le,"κ","\\kappa",!0);g(b,S,Le,"λ","\\lambda",!0);g(b,S,Le,"μ","\\mu",!0);g(b,S,Le,"ν","\\nu",!0);g(b,S,Le,"ξ","\\xi",!0);g(b,S,Le,"ο","\\omicron",!0);g(b,S,Le,"π","\\pi",!0);g(b,S,Le,"ρ","\\rho",!0);g(b,S,Le,"σ","\\sigma",!0);g(b,S,Le,"τ","\\tau",!0);g(b,S,Le,"υ","\\upsilon",!0);g(b,S,Le,"ϕ","\\phi",!0);g(b,S,Le,"χ","\\chi",!0);g(b,S,Le,"ψ","\\psi",!0);g(b,S,Le,"ω","\\omega",!0);g(b,S,Le,"ε","\\varepsilon",!0);g(b,S,Le,"ϑ","\\vartheta",!0);g(b,S,Le,"ϖ","\\varpi",!0);g(b,S,Le,"ϱ","\\varrho",!0);g(b,S,Le,"ς","\\varsigma",!0);g(b,S,Le,"φ","\\varphi",!0);g(b,S,be,"∗","*",!0);g(b,S,be,"+","+");g(b,S,be,"−","-",!0);g(b,S,be,"⋅","\\cdot",!0);g(b,S,be,"∘","\\circ",!0);g(b,S,be,"÷","\\div",!0);g(b,S,be,"±","\\pm",!0);g(b,S,be,"×","\\times",!0);g(b,S,be,"∩","\\cap",!0);g(b,S,be,"∪","\\cup",!0);g(b,S,be,"∖","\\setminus",!0);g(b,S,be,"∧","\\land");g(b,S,be,"∨","\\lor");g(b,S,be,"∧","\\wedge",!0);g(b,S,be,"∨","\\vee",!0);g(b,S,P,"√","\\surd");g(b,S,nr,"⟨","\\langle",!0);g(b,S,nr,"∣","\\lvert");g(b,S,nr,"∥","\\lVert");g(b,S,Nn,"?","?");g(b,S,Nn,"!","!");g(b,S,Nn,"⟩","\\rangle",!0);g(b,S,Nn,"∣","\\rvert");g(b,S,Nn,"∥","\\rVert");g(b,S,D,"=","=");g(b,S,D,":",":");g(b,S,D,"≈","\\approx",!0);g(b,S,D,"≅","\\cong",!0);g(b,S,D,"≥","\\ge");g(b,S,D,"≥","\\geq",!0);g(b,S,D,"←","\\gets");g(b,S,D,">","\\gt",!0);g(b,S,D,"∈","\\in",!0);g(b,S,D,"","\\@not");g(b,S,D,"⊂","\\subset",!0);g(b,S,D,"⊃","\\supset",!0);g(b,S,D,"⊆","\\subseteq",!0);g(b,S,D,"⊇","\\supseteq",!0);g(b,I,D,"⊈","\\nsubseteq",!0);g(b,I,D,"⊉","\\nsupseteq",!0);g(b,S,D,"⊨","\\models");g(b,S,D,"←","\\leftarrow",!0);g(b,S,D,"≤","\\le");g(b,S,D,"≤","\\leq",!0);g(b,S,D,"<","\\lt",!0);g(b,S,D,"→","\\rightarrow",!0);g(b,S,D,"→","\\to");g(b,I,D,"≱","\\ngeq",!0);g(b,I,D,"≰","\\nleq",!0);g(b,S,Gi," ","\\ ");g(b,S,Gi," ","\\space");g(b,S,Gi," ","\\nobreakspace");g(Z,S,Gi," ","\\ ");g(Z,S,Gi," "," ");g(Z,S,Gi," ","\\space");g(Z,S,Gi," ","\\nobreakspace");g(b,S,Gi,null,"\\nobreak");g(b,S,Gi,null,"\\allowbreak");g(b,S,R0,",",",");g(b,S,R0,";",";");g(b,I,be,"⊼","\\barwedge",!0);g(b,I,be,"⊻","\\veebar",!0);g(b,S,be,"⊙","\\odot",!0);g(b,S,be,"⊕","\\oplus",!0);g(b,S,be,"⊗","\\otimes",!0);g(b,S,P,"∂","\\partial",!0);g(b,S,be,"⊘","\\oslash",!0);g(b,I,be,"⊚","\\circledcirc",!0);g(b,I,be,"⊡","\\boxdot",!0);g(b,S,be,"△","\\bigtriangleup");g(b,S,be,"▽","\\bigtriangledown");g(b,S,be,"†","\\dagger");g(b,S,be,"⋄","\\diamond");g(b,S,be,"⋆","\\star");g(b,S,be,"◃","\\triangleleft");g(b,S,be,"▹","\\triangleright");g(b,S,nr,"{","\\{");g(Z,S,P,"{","\\{");g(Z,S,P,"{","\\textbraceleft");g(b,S,Nn,"}","\\}");g(Z,S,P,"}","\\}");g(Z,S,P,"}","\\textbraceright");g(b,S,nr,"{","\\lbrace");g(b,S,Nn,"}","\\rbrace");g(b,S,nr,"[","\\lbrack",!0);g(Z,S,P,"[","\\lbrack",!0);g(b,S,Nn,"]","\\rbrack",!0);g(Z,S,P,"]","\\rbrack",!0);g(b,S,nr,"(","\\lparen",!0);g(b,S,Nn,")","\\rparen",!0);g(Z,S,P,"<","\\textless",!0);g(Z,S,P,">","\\textgreater",!0);g(b,S,nr,"⌊","\\lfloor",!0);g(b,S,Nn,"⌋","\\rfloor",!0);g(b,S,nr,"⌈","\\lceil",!0);g(b,S,Nn,"⌉","\\rceil",!0);g(b,S,P,"\\","\\backslash");g(b,S,P,"∣","|");g(b,S,P,"∣","\\vert");g(Z,S,P,"|","\\textbar",!0);g(b,S,P,"∥","\\|");g(b,S,P,"∥","\\Vert");g(Z,S,P,"∥","\\textbardbl");g(Z,S,P,"~","\\textasciitilde");g(Z,S,P,"\\","\\textbackslash");g(Z,S,P,"^","\\textasciicircum");g(b,S,D,"↑","\\uparrow",!0);g(b,S,D,"⇑","\\Uparrow",!0);g(b,S,D,"↓","\\downarrow",!0);g(b,S,D,"⇓","\\Downarrow",!0);g(b,S,D,"↕","\\updownarrow",!0);g(b,S,D,"⇕","\\Updownarrow",!0);g(b,S,Zt,"∐","\\coprod");g(b,S,Zt,"⋁","\\bigvee");g(b,S,Zt,"⋀","\\bigwedge");g(b,S,Zt,"⨄","\\biguplus");g(b,S,Zt,"⋂","\\bigcap");g(b,S,Zt,"⋃","\\bigcup");g(b,S,Zt,"∫","\\int");g(b,S,Zt,"∫","\\intop");g(b,S,Zt,"∬","\\iint");g(b,S,Zt,"∭","\\iiint");g(b,S,Zt,"∏","\\prod");g(b,S,Zt,"∑","\\sum");g(b,S,Zt,"⨂","\\bigotimes");g(b,S,Zt,"⨁","\\bigoplus");g(b,S,Zt,"⨀","\\bigodot");g(b,S,Zt,"∮","\\oint");g(b,S,Zt,"∯","\\oiint");g(b,S,Zt,"∰","\\oiiint");g(b,S,Zt,"⨆","\\bigsqcup");g(b,S,Zt,"∫","\\smallint");g(Z,S,qo,"…","\\textellipsis");g(b,S,qo,"…","\\mathellipsis");g(Z,S,qo,"…","\\ldots",!0);g(b,S,qo,"…","\\ldots",!0);g(b,S,qo,"⋯","\\@cdots",!0);g(b,S,qo,"⋱","\\ddots",!0);g(b,S,P,"⋮","\\varvdots");g(b,S,It,"ˊ","\\acute");g(b,S,It,"ˋ","\\grave");g(b,S,It,"¨","\\ddot");g(b,S,It,"~","\\tilde");g(b,S,It,"ˉ","\\bar");g(b,S,It,"˘","\\breve");g(b,S,It,"ˇ","\\check");g(b,S,It,"^","\\hat");g(b,S,It,"⃗","\\vec");g(b,S,It,"˙","\\dot");g(b,S,It,"˚","\\mathring");g(b,S,Le,"","\\@imath");g(b,S,Le,"","\\@jmath");g(b,S,P,"ı","ı");g(b,S,P,"ȷ","ȷ");g(Z,S,P,"ı","\\i",!0);g(Z,S,P,"ȷ","\\j",!0);g(Z,S,P,"ß","\\ss",!0);g(Z,S,P,"æ","\\ae",!0);g(Z,S,P,"œ","\\oe",!0);g(Z,S,P,"ø","\\o",!0);g(Z,S,P,"Æ","\\AE",!0);g(Z,S,P,"Œ","\\OE",!0);g(Z,S,P,"Ø","\\O",!0);g(Z,S,It,"ˊ","\\'");g(Z,S,It,"ˋ","\\`");g(Z,S,It,"ˆ","\\^");g(Z,S,It,"˜","\\~");g(Z,S,It,"ˉ","\\=");g(Z,S,It,"˘","\\u");g(Z,S,It,"˙","\\.");g(Z,S,It,"¸","\\c");g(Z,S,It,"˚","\\r");g(Z,S,It,"ˇ","\\v");g(Z,S,It,"¨",'\\"');g(Z,S,It,"˝","\\H");g(Z,S,It,"◯","\\textcircled");var Ok={"--":!0,"---":!0,"``":!0,"''":!0};g(Z,S,P,"–","--",!0);g(Z,S,P,"–","\\textendash");g(Z,S,P,"—","---",!0);g(Z,S,P,"—","\\textemdash");g(Z,S,P,"‘","`",!0);g(Z,S,P,"‘","\\textquoteleft");g(Z,S,P,"’","'",!0);g(Z,S,P,"’","\\textquoteright");g(Z,S,P,"“","``",!0);g(Z,S,P,"“","\\textquotedblleft");g(Z,S,P,"”","''",!0);g(Z,S,P,"”","\\textquotedblright");g(b,S,P,"°","\\degree",!0);g(Z,S,P,"°","\\degree");g(Z,S,P,"°","\\textdegree",!0);g(b,S,P,"£","\\pounds");g(b,S,P,"£","\\mathsterling",!0);g(Z,S,P,"£","\\pounds");g(Z,S,P,"£","\\textsterling",!0);g(b,I,P,"✠","\\maltese");g(Z,I,P,"✠","\\maltese");var f4='0123456789/@."';for(var Jf=0;Jf{if(_a(e.classes)!==_a(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},yH=e=>{for(var t=0;tn&&(n=s.height),s.depth>r&&(r=s.depth),s.maxFontSize>i&&(i=s.maxFontSize)}t.height=n,t.depth=r,t.maxFontSize=i},On=function(t,n,r,i){var a=new Bc(t,n,r,i);return py(a),a},Dk=(e,t,n,r)=>new Bc(e,t,n,r),bH=function(t,n,r){var i=On([t],[],n);return i.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),i.style.borderBottomWidth=he(i.height),i.maxFontSize=1,i},vH=function(t,n,r,i){var a=new fy(t,n,r,i);return py(a),a},Lk=function(t){var n=new Fc(t);return py(n),n},wH=function(t,n){return t instanceof Fc?On([],[t],n):t},xH=function(t){if(t.positionType==="individualShift"){for(var n=t.children,r=[n[0]],i=-n[0].shift-n[0].elem.depth,a=i,s=1;s{var n=On(["mspace"],[],t),r=Lt(e,t);return n.style.marginRight=he(r),n},Fu=function(t,n,r){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}var a;return n==="textbf"&&r==="textit"?a="BoldItalic":n==="textbf"?a="Bold":n==="textit"?a="Italic":a="Regular",i+"-"+a},Pk={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},zk={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},_H=function(t,n){var[r,i,a]=zk[t],s=new Ea(r),o=new $i([s],{width:he(i),height:he(a),style:"width:"+he(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=Dk(["overlay"],[o],n);return l.height=a,l.style.height=he(a),l.style.width=he(i),l},j={fontMap:Pk,makeSymbol:Mr,mathsym:fH,makeSpan:On,makeSvgSpan:Dk,makeLineSpan:bH,makeAnchor:vH,makeFragment:Lk,wrapFragment:wH,makeVList:kH,makeOrd:mH,makeGlue:SH,staticSvg:_H,svgData:zk,tryCombineChars:yH},Ot={number:3,unit:"mu"},Ba={number:4,unit:"mu"},gi={number:5,unit:"mu"},EH={mord:{mop:Ot,mbin:Ba,mrel:gi,minner:Ot},mop:{mord:Ot,mop:Ot,mrel:gi,minner:Ot},mbin:{mord:Ba,mop:Ba,mopen:Ba,minner:Ba},mrel:{mord:gi,mop:gi,mopen:gi,minner:gi},mopen:{},mclose:{mop:Ot,mbin:Ba,mrel:gi,minner:Ot},mpunct:{mord:Ot,mop:Ot,mrel:gi,mopen:Ot,mclose:Ot,mpunct:Ot,minner:Ot},minner:{mord:Ot,mop:Ot,mbin:Ba,mrel:gi,mopen:Ot,mpunct:Ot,minner:Ot}},CH={mord:{mop:Ot},mop:{mord:Ot,mop:Ot},mbin:{},mrel:{},mopen:{},mclose:{mop:Ot},mpunct:{},minner:{mop:Ot}},Fk={},ch={},uh={};function me(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:s}=e,o={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l{var w=h.classes[0],y=m.classes[0];w==="mbin"&&Pe.contains(AH,y)?h.classes[0]="mord":y==="mbin"&&Pe.contains(TH,w)&&(m.classes[0]="mord")},{node:d},f,p),b4(a,(m,h)=>{var w=Gm(h),y=Gm(m),v=w&&y?m.hasClass("mtight")?CH[w][y]:EH[w][y]:null;if(v)return j.makeGlue(v,c)},{node:d},f,p),a},b4=function e(t,n,r,i,a){i&&t.push(i);for(var s=0;sf=>{t.splice(d+1,0,f),s++})(s)}i&&t.pop()},Bk=function(t){return t instanceof Fc||t instanceof fy||t instanceof Bc&&t.hasClass("enclosing")?t:null},RH=function e(t,n){var r=Bk(t);if(r){var i=r.children;if(i.length){if(n==="right")return e(i[i.length-1],"right");if(n==="left")return e(i[0],"left")}}return t},Gm=function(t,n){return t?(n&&(t=RH(t,n)),MH[t.classes[0]]||null):null},cc=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return Ui(n.concat(r))},at=function(t,n,r){if(!t)return Ui();if(ch[t.type]){var i=ch[t.type](t,n);if(r&&n.size!==r.size){i=Ui(n.sizingClasses(r),[i],n);var a=n.sizeMultiplier/r.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new ie("Got group of unknown type: '"+t.type+"'")};function Bu(e,t){var n=Ui(["base"],e,t),r=Ui(["strut"]);return r.style.height=he(n.height+n.depth),n.depth&&(r.style.verticalAlign=he(-n.depth)),n.children.unshift(r),n}function Km(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var r=rn(e,t,"root"),i;r.length===2&&r[1].hasClass("tag")&&(i=r.pop());for(var a=[],s=[],o=0;o0&&(a.push(Bu(s,t)),s=[]),a.push(r[o]));s.length>0&&a.push(Bu(s,t));var c;n?(c=Bu(rn(n,t,!0)),c.classes=["tag"],a.push(c)):i&&a.push(i);var u=Ui(["katex-html"],a);if(u.setAttribute("aria-hidden","true"),c){var d=c.children[0];d.style.height=he(u.height+u.depth),u.depth&&(d.style.verticalAlign=he(-u.depth))}return u}function $k(e){return new Fc(e)}class ur{constructor(t,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=_a(this.classes));for(var r=0;r0&&(t+=' class ="'+Pe.escape(_a(this.classes))+'"'),t+=">";for(var r=0;r",t}toText(){return this.children.map(t=>t.toText()).join("")}}class Ml{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return Pe.escape(this.toText())}toText(){return this.text}}class IH{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character="  ":t>=-.05556&&t<=-.05555?this.character=" ⁣":t>=-.1667&&t<=-.1666?this.character=" ⁣":t>=-.2223&&t<=-.2222?this.character=" ⁣":t>=-.2778&&t<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",he(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var te={MathNode:ur,TextNode:Ml,SpaceNode:IH,newDocumentFragment:$k},br=function(t,n,r){return wt[n][t]&&wt[n][t].replace&&t.charCodeAt(0)!==55349&&!(Ok.hasOwnProperty(t)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(t=wt[n][t].replace),new te.TextNode(t)},my=function(t){return t.length===1?t[0]:new te.MathNode("mrow",t)},gy=function(t,n){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold";var r=n.font;if(!r||r==="mathnormal")return null;var i=t.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var a=t.text;if(Pe.contains(["\\imath","\\jmath"],a))return null;wt[i][a]&&wt[i][a].replace&&(a=wt[i][a].replace);var s=j.fontMap[r].fontName;return hy(a,s,i)?j.fontMap[r].variant:null},jn=function(t,n,r){if(t.length===1){var i=yt(t[0],n);return r&&i instanceof ur&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],s,o=0;o0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),a.pop())}}}a.push(l),s=l}return a},Ca=function(t,n,r){return my(jn(t,n,r))},yt=function(t,n){if(!t)return new te.MathNode("mrow");if(uh[t.type]){var r=uh[t.type](t,n);return r}else throw new ie("Got group of unknown type: '"+t.type+"'")};function v4(e,t,n,r,i){var a=jn(e,n),s;a.length===1&&a[0]instanceof ur&&Pe.contains(["mrow","mtable"],a[0].type)?s=a[0]:s=new te.MathNode("mrow",a);var o=new te.MathNode("annotation",[new te.TextNode(t)]);o.setAttribute("encoding","application/x-tex");var l=new te.MathNode("semantics",[s,o]),c=new te.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var u=i?"katex":"katex-mathml";return j.makeSpan([u],[c])}var Uk=function(t){return new ki({style:t.displayMode?De.DISPLAY:De.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},jk=function(t,n){if(n.displayMode){var r=["katex-display"];n.leqno&&r.push("leqno"),n.fleqn&&r.push("fleqn"),t=j.makeSpan(r,[t])}return t},OH=function(t,n,r){var i=Uk(r),a;if(r.output==="mathml")return v4(t,n,i,r.displayMode,!0);if(r.output==="html"){var s=Km(t,i);a=j.makeSpan(["katex"],[s])}else{var o=v4(t,n,i,r.displayMode,!1),l=Km(t,i);a=j.makeSpan(["katex"],[o,l])}return jk(a,r)},DH=function(t,n,r){var i=Uk(r),a=Km(t,i),s=j.makeSpan(["katex"],[a]);return jk(s,r)},LH={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},PH=function(t){var n=new te.MathNode("mo",[new te.TextNode(LH[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},zH={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},FH=function(t){return t.type==="ordgroup"?t.body.length:1},BH=function(t,n){function r(){var o=4e5,l=t.label.slice(1);if(Pe.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=t,u=FH(c.base),d,f,p;if(u>5)l==="widehat"||l==="widecheck"?(d=420,o=2364,p=.42,f=l+"4"):(d=312,o=2340,p=.34,f="tilde4");else{var m=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][m],d=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],f=l+m):(o=[0,600,1033,2339,2340][m],d=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],f="tilde"+m)}var h=new Ea(f),w=new $i([h],{width:"100%",height:he(p),viewBox:"0 0 "+o+" "+d,preserveAspectRatio:"none"});return{span:j.makeSvgSpan([],[w],n),minWidth:0,height:p}}else{var y=[],v=zH[l],[x,_,A]=v,E=A/1e3,R=x.length,F,q;if(R===1){var K=v[3];F=["hide-tail"],q=[K]}else if(R===2)F=["halfarrow-left","halfarrow-right"],q=["xMinYMin","xMaxYMin"];else if(R===3)F=["brace-left","brace-center","brace-right"],q=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+R+" children.");for(var W=0;W0&&(i.style.minWidth=he(a)),i},$H=function(t,n,r,i,a){var s,o=t.height+t.depth+r+i;if(/fbox|color|angl/.test(n)){if(s=j.makeSpan(["stretchy",n],[],a),n==="fbox"){var l=a.color&&a.getColor();l&&(s.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(n)&&c.push(new Ym({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&c.push(new Ym({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new $i(c,{width:"100%",height:he(o)});s=j.makeSvgSpan([],[u],a)}return s.height=o,s.style.height=he(o),s},ji={encloseSpan:$H,mathMLnode:PH,svgSpan:BH};function Ye(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function yy(e){var t=O0(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function O0(e){return e&&(e.type==="atom"||dH.hasOwnProperty(e.type))?e:null}var by=(e,t)=>{var n,r,i;e&&e.type==="supsub"?(r=Ye(e.base,"accent"),n=r.base,e.base=n,i=cH(at(e,t)),e.base=r):(r=Ye(e,"accent"),n=r.base);var a=at(n,t.havingCrampedStyle()),s=r.isShifty&&Pe.isCharacterBox(n),o=0;if(s){var l=Pe.getBaseElem(n),c=at(l,t.havingCrampedStyle());o=h4(c).skew}var u=r.label==="\\c",d=u?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),f;if(r.isStretchy)f=ji.svgSpan(r,t),f=j.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:f,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+he(2*o)+")",marginLeft:he(2*o)}:void 0}]},t);else{var p,m;r.label==="\\vec"?(p=j.staticSvg("vec",t),m=j.svgData.vec[1]):(p=j.makeOrd({mode:r.mode,text:r.label},t,"textord"),p=h4(p),p.italic=0,m=p.width,u&&(d+=p.depth)),f=j.makeSpan(["accent-body"],[p]);var h=r.label==="\\textcircled";h&&(f.classes.push("accent-full"),d=a.height);var w=o;h||(w-=m/2),f.style.left=he(w),r.label==="\\textcircled"&&(f.style.top=".2em"),f=j.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-d},{type:"elem",elem:f}]},t)}var y=j.makeSpan(["mord","accent"],[f],t);return i?(i.children[0]=y,i.height=Math.max(y.height,i.height),i.classes[0]="mord",i):y},qk=(e,t)=>{var n=e.isStretchy?ji.mathMLnode(e.label):new te.MathNode("mo",[br(e.label,e.mode)]),r=new te.MathNode("mover",[yt(e.base,t),n]);return r.setAttribute("accent","true"),r},UH=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));me({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=dh(t[0]),r=!UH.test(e.funcName),i=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:by,mathmlBuilder:qk});me({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:by,mathmlBuilder:qk});me({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=at(e.base,t),r=ji.svgSpan(e,t),i=e.label==="\\utilde"?.12:0,a=j.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t);return j.makeSpan(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var n=ji.mathMLnode(e.label),r=new te.MathNode("munder",[yt(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var $u=e=>{var t=new te.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};me({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=j.wrapFragment(at(e.body,r,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;e.below&&(r=t.havingStyle(n.sub()),s=j.wrapFragment(at(e.below,r,t),t),s.classes.push(a+"-arrow-pad"));var o=ji.svgSpan(e,t),l=-t.fontMetrics().axisHeight+.5*o.height,c=-t.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(c-=i.depth);var u;if(s){var d=-t.fontMetrics().axisHeight+s.height+.5*o.height+.111;u=j.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:o,shift:l},{type:"elem",elem:s,shift:d}]},t)}else u=j.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:o,shift:l}]},t);return u.children[0].children[0].children[1].classes.push("svg-align"),j.makeSpan(["mrel","x-arrow"],[u],t)},mathmlBuilder(e,t){var n=ji.mathMLnode(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var i=$u(yt(e.body,t));if(e.below){var a=$u(yt(e.below,t));r=new te.MathNode("munderover",[n,a,i])}else r=new te.MathNode("mover",[n,i])}else if(e.below){var s=$u(yt(e.below,t));r=new te.MathNode("munder",[n,s])}else r=$u(),r=new te.MathNode("mover",[n,r]);return r}});var jH=j.makeSpan;function Hk(e,t){var n=rn(e.body,t,!0);return jH([e.mclass],n,t)}function Wk(e,t){var n,r=jn(e.body,t);return e.mclass==="minner"?n=new te.MathNode("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(n=r[0],n.type="mi"):n=new te.MathNode("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new te.MathNode("mo",r),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):e.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}me({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Wt(i),isCharacterBox:Pe.isCharacterBox(i)}},htmlBuilder:Hk,mathmlBuilder:Wk});var D0=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};me({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:D0(t[0]),body:Wt(t[1]),isCharacterBox:Pe.isCharacterBox(t[1])}}});me({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],s;r!=="\\stackrel"?s=D0(i):s="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Wt(i)},l={type:"supsub",mode:a.mode,base:o,sup:r==="\\underset"?null:a,sub:r==="\\underset"?a:null};return{type:"mclass",mode:n.mode,mclass:s,body:[l],isCharacterBox:Pe.isCharacterBox(l)}},htmlBuilder:Hk,mathmlBuilder:Wk});me({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:D0(t[0]),body:Wt(t[0])}},htmlBuilder(e,t){var n=rn(e.body,t,!0),r=j.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=jn(e.body,t),r=new te.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var qH={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},w4=()=>({type:"styling",body:[],mode:"math",style:"display"}),x4=e=>e.type==="textord"&&e.text==="@",HH=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function WH(e,t,n){var r=qH[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=n.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:r,mode:"math",family:"rel"},s=n.callFunction("\\Big",[a],[]),o=n.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[i,s,o]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function YH(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new ie("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],i=[r],a=0;a-1))if("<>AV".indexOf(c)>-1)for(var d=0;d<2;d++){for(var f=!0,p=l+1;pAV=|." after @',s[l]);var m=WH(c,u,e),h={type:"styling",body:[m],mode:"math",style:"display"};r.push(h),o=w4()}a%2===0?r.push(o):r.shift(),r=[],i.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var w=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:w,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}me({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=j.wrapFragment(at(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=he(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new te.MathNode("mrow",[yt(e.label,t)]);return n=new te.MathNode("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new te.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});me({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=j.wrapFragment(at(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new te.MathNode("mrow",[yt(e.fragment,t)])}});me({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=Ye(t[0],"ordgroup"),i=r.body,a="",s=0;s=1114111)throw new ie("\\@char with invalid code point "+a);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:n.mode,text:c}}});var Yk=(e,t)=>{var n=rn(e.body,t.withColor(e.color),!1);return j.makeFragment(n)},Vk=(e,t)=>{var n=jn(e.body,t.withColor(e.color)),r=new te.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};me({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=Ye(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:Wt(i)}},htmlBuilder:Yk,mathmlBuilder:Vk});me({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=Ye(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var a=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:a}},htmlBuilder:Yk,mathmlBuilder:Vk});me({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:i&&Ye(i,"size").value}},htmlBuilder(e,t){var n=j.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=he(Lt(e.size,t)))),n},mathmlBuilder(e,t){var n=new te.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",he(Lt(e.size,t)))),n}});var Xm={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Gk=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new ie("Expected a control sequence",e);return t},VH=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},Kk=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i==null&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};me({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Xm[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=Xm[r.text]),Ye(t.parseFunction(),"internal");throw new ie("Invalid token after macro prefix",r)}});me({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new ie("Expected a control sequence",r);for(var a=0,s,o=[[]];t.gullet.future().text!=="{";)if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){s=t.gullet.future(),o[a].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new ie('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new ie('Argument number "'+r.text+'" out of order');a++,o.push([])}else{if(r.text==="EOF")throw new ie("Expected a macro definition");o[a].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return s&&l.unshift(s),(n==="\\edef"||n==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:o},n===Xm[n]),{type:"internal",mode:t.mode}}});me({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Gk(t.gullet.popToken());t.gullet.consumeSpaces();var i=VH(t);return Kk(t,r,i,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});me({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Gk(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Kk(t,r,a,n==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var fl=function(t,n,r){var i=wt.math[t]&&wt.math[t].replace,a=hy(i||t,n,r);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return a},vy=function(t,n,r,i){var a=r.havingBaseStyle(n),s=j.makeSpan(i.concat(a.sizingClasses(r)),[t],r),o=a.sizeMultiplier/r.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=a.sizeMultiplier,s},Xk=function(t,n,r){var i=n.havingBaseStyle(r),a=(1-n.sizeMultiplier/i.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=he(a),t.height-=a,t.depth+=a},GH=function(t,n,r,i,a,s){var o=j.makeSymbol(t,"Main-Regular",a,i),l=vy(o,n,i,s);return r&&Xk(l,i,n),l},KH=function(t,n,r,i){return j.makeSymbol(t,"Size"+n+"-Regular",r,i)},Qk=function(t,n,r,i,a,s){var o=KH(t,n,a,i),l=vy(j.makeSpan(["delimsizing","size"+n],[o],i),De.TEXT,i,s);return r&&Xk(l,i,De.TEXT),l},rp=function(t,n,r){var i;n==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=j.makeSpan(["delimsizinginner",i],[j.makeSpan([],[j.makeSymbol(t,n,r)])]);return{type:"elem",elem:a}},ip=function(t,n,r){var i=Zr["Size4-Regular"][t.charCodeAt(0)]?Zr["Size4-Regular"][t.charCodeAt(0)][4]:Zr["Size1-Regular"][t.charCodeAt(0)][4],a=new Ea("inner",tH(t,Math.round(1e3*n))),s=new $i([a],{width:he(i),height:he(n),style:"width:"+he(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),o=j.makeSvgSpan([],[s],r);return o.height=n,o.style.height=he(n),o.style.width=he(i),{type:"elem",elem:o}},Qm=.008,Uu={type:"kern",size:-1*Qm},XH=["|","\\lvert","\\rvert","\\vert"],QH=["\\|","\\lVert","\\rVert","\\Vert"],Zk=function(t,n,r,i,a,s){var o,l,c,u,d="",f=0;o=c=u=t,l=null;var p="Size1-Regular";t==="\\uparrow"?c=u="⏐":t==="\\Uparrow"?c=u="‖":t==="\\downarrow"?o=c="⏐":t==="\\Downarrow"?o=c="‖":t==="\\updownarrow"?(o="\\uparrow",c="⏐",u="\\downarrow"):t==="\\Updownarrow"?(o="\\Uparrow",c="‖",u="\\Downarrow"):Pe.contains(XH,t)?(c="∣",d="vert",f=333):Pe.contains(QH,t)?(c="∥",d="doublevert",f=556):t==="["||t==="\\lbrack"?(o="⎡",c="⎢",u="⎣",p="Size4-Regular",d="lbrack",f=667):t==="]"||t==="\\rbrack"?(o="⎤",c="⎥",u="⎦",p="Size4-Regular",d="rbrack",f=667):t==="\\lfloor"||t==="⌊"?(c=o="⎢",u="⎣",p="Size4-Regular",d="lfloor",f=667):t==="\\lceil"||t==="⌈"?(o="⎡",c=u="⎢",p="Size4-Regular",d="lceil",f=667):t==="\\rfloor"||t==="⌋"?(c=o="⎥",u="⎦",p="Size4-Regular",d="rfloor",f=667):t==="\\rceil"||t==="⌉"?(o="⎤",c=u="⎥",p="Size4-Regular",d="rceil",f=667):t==="("||t==="\\lparen"?(o="⎛",c="⎜",u="⎝",p="Size4-Regular",d="lparen",f=875):t===")"||t==="\\rparen"?(o="⎞",c="⎟",u="⎠",p="Size4-Regular",d="rparen",f=875):t==="\\{"||t==="\\lbrace"?(o="⎧",l="⎨",u="⎩",c="⎪",p="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(o="⎫",l="⎬",u="⎭",c="⎪",p="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(o="⎧",u="⎩",c="⎪",p="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(o="⎫",u="⎭",c="⎪",p="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(o="⎧",u="⎭",c="⎪",p="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(o="⎫",u="⎩",c="⎪",p="Size4-Regular");var m=fl(o,p,a),h=m.height+m.depth,w=fl(c,p,a),y=w.height+w.depth,v=fl(u,p,a),x=v.height+v.depth,_=0,A=1;if(l!==null){var E=fl(l,p,a);_=E.height+E.depth,A=2}var R=h+x+_,F=Math.max(0,Math.ceil((n-R)/(A*y))),q=R+F*A*y,K=i.fontMetrics().axisHeight;r&&(K*=i.sizeMultiplier);var W=q/2-K,G=[];if(d.length>0){var ue=q-h-x,fe=Math.round(q*1e3),Ce=nH(d,Math.round(ue*1e3)),O=new Ea(d,Ce),V=(f/1e3).toFixed(3)+"em",B=(fe/1e3).toFixed(3)+"em",Y=new $i([O],{width:V,height:B,viewBox:"0 0 "+f+" "+fe}),X=j.makeSvgSpan([],[Y],i);X.height=fe/1e3,X.style.width=V,X.style.height=B,G.push({type:"elem",elem:X})}else{if(G.push(rp(u,p,a)),G.push(Uu),l===null){var N=q-h-x+2*Qm;G.push(ip(c,N,i))}else{var T=(q-h-x-_)/2+2*Qm;G.push(ip(c,T,i)),G.push(Uu),G.push(rp(l,p,a)),G.push(Uu),G.push(ip(c,T,i))}G.push(Uu),G.push(rp(o,p,a))}var Q=i.havingBaseStyle(De.TEXT),ne=j.makeVList({positionType:"bottom",positionData:W,children:G},Q);return vy(j.makeSpan(["delimsizing","mult"],[ne],Q),De.TEXT,i,s)},ap=80,sp=.08,op=function(t,n,r,i,a){var s=eH(t,i,r),o=new Ea(t,s),l=new $i([o],{width:"400em",height:he(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return j.makeSvgSpan(["hide-tail"],[l],a)},ZH=function(t,n){var r=n.havingBaseSizing(),i=n8("\\surd",t*r.sizeMultiplier,t8,r),a=r.sizeMultiplier,s=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),o,l=0,c=0,u=0,d;return i.type==="small"?(u=1e3+1e3*s+ap,t<1?a=1:t<1.4&&(a=.7),l=(1+s+sp)/a,c=(1+s)/a,o=op("sqrtMain",l,u,s,n),o.style.minWidth="0.853em",d=.833/a):i.type==="large"?(u=(1e3+ap)*Rl[i.size],c=(Rl[i.size]+s)/a,l=(Rl[i.size]+s+sp)/a,o=op("sqrtSize"+i.size,l,u,s,n),o.style.minWidth="1.02em",d=1/a):(l=t+s+sp,c=t+s,u=Math.floor(1e3*t+s)+ap,o=op("sqrtTall",l,u,s,n),o.style.minWidth="0.742em",d=1.056),o.height=c,o.style.height=he(l),{span:o,advanceWidth:d,ruleWidth:(n.fontMetrics().sqrtRuleThickness+s)*a}},Jk=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],JH=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],e8=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Rl=[0,1.2,1.8,2.4,3],eW=function(t,n,r,i,a){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),Pe.contains(Jk,t)||Pe.contains(e8,t))return Qk(t,n,!1,r,i,a);if(Pe.contains(JH,t))return Zk(t,Rl[n],!1,r,i,a);throw new ie("Illegal delimiter: '"+t+"'")},tW=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],nW=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"stack"}],t8=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],rW=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},n8=function(t,n,r,i){for(var a=Math.min(2,3-i.style.size),s=a;sn)return r[s]}return r[r.length-1]},r8=function(t,n,r,i,a,s){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var o;Pe.contains(e8,t)?o=tW:Pe.contains(Jk,t)?o=t8:o=nW;var l=n8(t,n,o,i);return l.type==="small"?GH(t,l.style,r,i,a,s):l.type==="large"?Qk(t,l.size,r,i,a,s):Zk(t,n,r,i,a,s)},iW=function(t,n,r,i,a,s){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,c=5/i.fontMetrics().ptPerEm,u=Math.max(n-o,r+o),d=Math.max(u/500*l,2*u-c);return r8(t,d,!0,i,a,s)},Ii={sqrtImage:ZH,sizedDelim:eW,sizeToMaxHeight:Rl,customSizedDelim:r8,leftRightDelim:iW},k4={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},aW=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function L0(e,t){var n=O0(e);if(n&&Pe.contains(aW,n.text))return n;throw n?new ie("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new ie("Invalid delimiter type '"+e.type+"'",e)}me({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=L0(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:k4[e.funcName].size,mclass:k4[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?j.makeSpan([e.mclass]):Ii.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(br(e.delim,e.mode));var n=new te.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=he(Ii.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function S4(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}me({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new ie("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:L0(t[0],e).text,color:n}}});me({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=L0(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=Ye(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{S4(e);for(var n=rn(e.body,t,!0,["mopen","mclose"]),r=0,i=0,a=!1,s=0;s{S4(e);var n=jn(e.body,t);if(e.left!=="."){var r=new te.MathNode("mo",[br(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var i=new te.MathNode("mo",[br(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return my(n)}});me({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=L0(t[0],e);if(!e.parser.leftrightDepth)throw new ie("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=cc(t,[]);else{n=Ii.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?br("|","text"):br(e.delim,e.mode),r=new te.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var wy=(e,t)=>{var n=j.wrapFragment(at(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,s=0,o=Pe.isCharacterBox(e.body);if(r==="sout")a=j.makeSpan(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/i,s=-.5*t.fontMetrics().xHeight;else if(r==="phase"){var l=Lt({number:.6,unit:"pt"},t),c=Lt({number:.35,unit:"ex"},t),u=t.havingBaseSizing();i=i/u.sizeMultiplier;var d=n.height+n.depth+l+c;n.style.paddingLeft=he(d/2+l);var f=Math.floor(1e3*d*i),p=Zq(f),m=new $i([new Ea("phase",p)],{width:"400em",height:he(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});a=j.makeSvgSpan(["hide-tail"],[m],t),a.style.height=he(d),s=n.depth+l+c}else{/cancel/.test(r)?o||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var h=0,w=0,y=0;/box/.test(r)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),h=t.fontMetrics().fboxsep+(r==="colorbox"?0:y),w=h):r==="angl"?(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),h=4*y,w=Math.max(0,.25-n.depth)):(h=o?.2:0,w=h),a=ji.encloseSpan(n,r,h,w,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle="solid",a.style.borderWidth=he(y)):r==="angl"&&y!==.049&&(a.style.borderTopWidth=he(y),a.style.borderRightWidth=he(y)),s=n.depth+w,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var v;if(e.backgroundColor)v=j.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:n,shift:0}]},t);else{var x=/cancel|phase/.test(r)?["svg-align"]:[];v=j.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:x}]},t)}return/cancel/.test(r)&&(v.height=n.height,v.depth=n.depth),/cancel/.test(r)&&!o?j.makeSpan(["mord","cancel-lap"],[v],t):j.makeSpan(["mord"],[v],t)},xy=(e,t)=>{var n=0,r=new te.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[yt(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};me({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,a=Ye(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:wy,mathmlBuilder:xy});me({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,a=Ye(t[0],"color-token").color,s=Ye(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:wy,mathmlBuilder:xy});me({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});me({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:wy,mathmlBuilder:xy});me({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var i8={};function di(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:s}=e,o={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{var t=e.parser.settings;if(!t.displayMode)throw new ie("{"+e.envName+"} can be used only in display mode.")};function ky(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function Oa(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:s,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var p=e.gullet.expandMacroAsText("\\arraystretch");if(p==null)s=1;else if(s=parseFloat(p),!s||s<0)throw new ie("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var m=[],h=[m],w=[],y=[],v=l!=null?[]:void 0;function x(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function _(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new ri("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(x(),y.push(_4(e));;){var A=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),A={type:"ordgroup",mode:e.mode,body:A},n&&(A={type:"styling",mode:e.mode,style:n,body:[A]}),m.push(A);var E=e.fetch().text;if(E==="&"){if(d&&m.length===d){if(c||o)throw new ie("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(E==="\\end"){_(),m.length===1&&A.type==="styling"&&A.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),y.length0&&(x+=.25),c.push({pos:x,isDashed:lt[tt]})}for(_(s[0]),r=0;r0&&(W+=v,Rlt))for(r=0;r=o)){var Ee=void 0;(i>0||t.hskipBeforeAndAfter)&&(Ee=Pe.deflt(T.pregap,f),Ee!==0&&(Ce=j.makeSpan(["arraycolsep"],[]),Ce.style.width=he(Ee),fe.push(Ce)));var J=[];for(r=0;r0){for(var Ae=j.makeLineSpan("hline",n,u),pt=j.makeLineSpan("hdashline",n,u),et=[{type:"elem",elem:l,shift:0}];c.length>0;){var $e=c.pop(),ut=$e.pos-G;$e.isDashed?et.push({type:"elem",elem:pt,shift:ut}):et.push({type:"elem",elem:Ae,shift:ut})}l=j.makeVList({positionType:"individualShift",children:et},n)}if(V.length===0)return j.makeSpan(["mord"],[l],n);var de=j.makeVList({positionType:"individualShift",children:V},n);return de=j.makeSpan(["tag"],[de],n),j.makeFragment([l,de])},sW={c:"center ",l:"left ",r:"right "},fi=function(t,n){for(var r=[],i=new te.MathNode("mtd",[],["mtr-glue"]),a=new te.MathNode("mtd",[],["mml-eqn-num"]),s=0;s0){var m=t.cols,h="",w=!1,y=0,v=m.length;m[0].type==="separator"&&(f+="top ",y=1),m[m.length-1].type==="separator"&&(f+="bottom ",v-=1);for(var x=y;x0?"left ":"",f+=F[F.length-1].length>0?"right ":"";for(var q=1;q-1?"alignat":"align",a=t.envName==="split",s=Oa(t.parser,{cols:r,addJot:!0,autoTag:a?void 0:ky(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),o,l=0,c={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var u="",d=0;d0&&p&&(w=1),r[m]={type:"align",align:h,pregap:w,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};di({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=O0(t[0]),r=n?[t[0]]:Ye(t[0],"ordgroup").body,i=r.map(function(s){var o=yy(s),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new ie("Unknown column alignment: "+l,s)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Oa(e.parser,a,Sy(e.envName))},htmlBuilder:hi,mathmlBuilder:fi});di({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,"lcr".indexOf(n)===-1)throw new ie("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var a=Oa(e.parser,r,Sy(e.envName)),s=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(s).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:hi,mathmlBuilder:fi});di({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=Oa(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:hi,mathmlBuilder:fi});di({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=O0(t[0]),r=n?[t[0]]:Ye(t[0],"ordgroup").body,i=r.map(function(s){var o=yy(s),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new ie("Unknown column alignment: "+l,s)});if(i.length>1)throw new ie("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=Oa(e.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new ie("{subarray} can contain only one column");return a},htmlBuilder:hi,mathmlBuilder:fi});di({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=Oa(e.parser,t,Sy(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:hi,mathmlBuilder:fi});di({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:s8,htmlBuilder:hi,mathmlBuilder:fi});di({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Pe.contains(["gather","gather*"],e.envName)&&P0(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ky(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Oa(e.parser,t,"display")},htmlBuilder:hi,mathmlBuilder:fi});di({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:s8,htmlBuilder:hi,mathmlBuilder:fi});di({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){P0(e);var t={autoTag:ky(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Oa(e.parser,t,"display")},htmlBuilder:hi,mathmlBuilder:fi});di({type:"array",names:["CD"],props:{numArgs:0},handler(e){return P0(e),YH(e.parser)},htmlBuilder:hi,mathmlBuilder:fi});C("\\nonumber","\\gdef\\@eqnsw{0}");C("\\notag","\\nonumber");me({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new ie(e.funcName+" valid only within array environment")}});var E4=i8;me({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!=="ordgroup")throw new ie("Invalid environment name",i);for(var a="",s=0;s{var n=e.font,r=t.withFont(n);return at(e.body,r)},l8=(e,t)=>{var n=e.font,r=t.withFont(n);return yt(e.body,r)},C4={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};me({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=dh(t[0]),a=r;return a in C4&&(a=C4[a]),{type:"font",mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:o8,mathmlBuilder:l8});me({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=Pe.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:D0(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}});me({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,s=n.parseExpression(!0,i),o="math"+r.slice(1);return{type:"font",mode:a,font:o,body:{type:"ordgroup",mode:n.mode,body:s}}},htmlBuilder:o8,mathmlBuilder:l8});var c8=(e,t)=>{var n=t;return e==="display"?n=n.id>=De.SCRIPT.id?n.text():De.DISPLAY:e==="text"&&n.size===De.DISPLAY.size?n=De.TEXT:e==="script"?n=De.SCRIPT:e==="scriptscript"&&(n=De.SCRIPTSCRIPT),n},_y=(e,t)=>{var n=c8(e.size,t.style),r=n.fracNum(),i=n.fracDen(),a;a=t.havingStyle(r);var s=at(e.numer,a,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height0?m=3*f:m=7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var w;if(u){var v=t.fontMetrics().axisHeight;p-s.depth-(v+.5*d){var n=new te.MathNode("mfrac",[yt(e.numer,t),yt(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=Lt(e.barSize,t);n.setAttribute("linethickness",he(r))}var i=c8(e.size,t.style);if(i.size!==t.style.size){n=new te.MathNode("mstyle",[n]);var a=i.size===De.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",a),n.setAttribute("scriptlevel","0")}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var o=new te.MathNode("mo",[new te.TextNode(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(n),e.rightDelim!=null){var l=new te.MathNode("mo",[new te.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return my(s)}return n};me({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],s,o=null,l=null,c="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,o="(",l=")";break;case"\\\\bracefrac":s=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:n.mode,continued:!1,numer:i,denom:a,hasBarLine:s,leftDelim:o,rightDelim:l,size:c,barSize:null}},htmlBuilder:_y,mathmlBuilder:Ey});me({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});me({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:r}}});var T4=["display","text","script","scriptscript"],A4=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};me({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=dh(t[0]),s=a.type==="atom"&&a.family==="open"?A4(a.text):null,o=dh(t[1]),l=o.type==="atom"&&o.family==="close"?A4(o.text):null,c=Ye(t[2],"size"),u,d=null;c.isBlank?u=!0:(d=c.value,u=d.number>0);var f="auto",p=t[3];if(p.type==="ordgroup"){if(p.body.length>0){var m=Ye(p.body[0],"textord");f=T4[Number(m.text)]}}else p=Ye(p,"textord"),f=T4[Number(p.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:s,rightDelim:l,size:f}},htmlBuilder:_y,mathmlBuilder:Ey});me({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Ye(t[0],"size").value,token:i}}});me({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=zq(Ye(t[1],"infix").size),s=t[2],o=a.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:_y,mathmlBuilder:Ey});var u8=(e,t)=>{var n=t.style,r,i;e.type==="supsub"?(r=e.sup?at(e.sup,t.havingStyle(n.sup()),t):at(e.sub,t.havingStyle(n.sub()),t),i=Ye(e.base,"horizBrace")):i=Ye(e,"horizBrace");var a=at(i.base,t.havingBaseStyle(De.DISPLAY)),s=ji.svgSpan(i,t),o;if(i.isOver?(o=j.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},t),o.children[0].children[0].children[1].classes.push("svg-align")):(o=j.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t),o.children[0].children[0].children[0].classes.push("svg-align")),r){var l=j.makeSpan(["mord",i.isOver?"mover":"munder"],[o],t);i.isOver?o=j.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):o=j.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return j.makeSpan(["mord",i.isOver?"mover":"munder"],[o],t)},oW=(e,t)=>{var n=ji.mathMLnode(e.label);return new te.MathNode(e.isOver?"mover":"munder",[yt(e.base,t),n])};me({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:u8,mathmlBuilder:oW});me({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=Ye(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:Wt(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=rn(e.body,t,!1);return j.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Ca(e.body,t);return n instanceof ur||(n=new ur("mrow",[n])),n.setAttribute("href",e.href),n}});me({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=Ye(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],a=0;a{var{parser:n,funcName:r,token:i}=e,a=Ye(t[0],"raw").string,s=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(r){case"\\htmlClass":l.class=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var c=a.split(","),u=0;u{var n=rn(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=j.makeSpan(r,n,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>Ca(e.body,t)});me({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Wt(t[0]),mathml:Wt(t[1])}},htmlBuilder:(e,t)=>{var n=rn(e.html,t,!1);return j.makeFragment(n)},mathmlBuilder:(e,t)=>Ca(e.mathml,t)});var lp=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new ie("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!Nk(r))throw new ie("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};me({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(n[0])for(var l=Ye(n[0],"raw").string,c=l.split(","),u=0;u{var n=Lt(e.height,t),r=0;e.totalheight.number>0&&(r=Lt(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=Lt(e.width,t));var a={height:he(n+r)};i>0&&(a.width=he(i)),r>0&&(a.verticalAlign=he(-r));var s=new oH(e.src,e.alt,a);return s.height=n,s.depth=r,s},mathmlBuilder:(e,t)=>{var n=new te.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=Lt(e.height,t),i=0;if(e.totalheight.number>0&&(i=Lt(e.totalheight,t)-r,n.setAttribute("valign",he(-i))),n.setAttribute("height",he(r+i)),e.width.number>0){var a=Lt(e.width,t);n.setAttribute("width",he(a))}return n.setAttribute("src",e.src),n}});me({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=Ye(t[0],"size");if(n.settings.strict){var a=r[1]==="m",s=i.value.unit==="mu";a?(s||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+i.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):s&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return j.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var n=Lt(e.dimension,t);return new te.SpaceNode(n)}});me({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=j.makeSpan([],[at(e.body,t)]),n=j.makeSpan(["inner"],[n],t)):n=j.makeSpan(["inner"],[at(e.body,t)]);var r=j.makeSpan(["fix"],[]),i=j.makeSpan([e.alignment],[n,r],t),a=j.makeSpan(["strut"]);return a.style.height=he(i.height+i.depth),i.depth&&(a.style.verticalAlign=he(-i.depth)),i.children.unshift(a),i=j.makeSpan(["thinbox"],[i],t),j.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new te.MathNode("mpadded",[yt(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});me({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode("math");var a=n==="\\("?"\\)":"$",s=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:s}}});me({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new ie("Mismatched "+e.funcName)}});var N4=(e,t)=>{switch(t.style.size){case De.DISPLAY.size:return e.display;case De.TEXT.size:return e.text;case De.SCRIPT.size:return e.script;case De.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};me({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Wt(t[0]),text:Wt(t[1]),script:Wt(t[2]),scriptscript:Wt(t[3])}},htmlBuilder:(e,t)=>{var n=N4(e,t),r=rn(n,t,!1);return j.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=N4(e,t);return Ca(n,t)}});var d8=(e,t,n,r,i,a,s)=>{e=j.makeSpan([],[e]);var o=n&&Pe.isCharacterBox(n),l,c;if(t){var u=at(t,r.havingStyle(i.sup()),r);c={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=at(n,r.havingStyle(i.sub()),r);l={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(c&&l){var p=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+s;f=j.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:he(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:he(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(l){var m=e.height-s;f=j.makeVList({positionType:"top",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:he(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},r)}else if(c){var h=e.depth+s;f=j.makeVList({positionType:"bottom",positionData:h,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:he(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return e;var w=[f];if(l&&a!==0&&!o){var y=j.makeSpan(["mspace"],[],r);y.style.marginRight=he(a),w.unshift(y)}return j.makeSpan(["mop","op-limits"],w,r)},h8=["\\smallint"],Ho=(e,t)=>{var n,r,i=!1,a;e.type==="supsub"?(n=e.sup,r=e.sub,a=Ye(e.base,"op"),i=!0):a=Ye(e,"op");var s=t.style,o=!1;s.size===De.DISPLAY.size&&a.symbol&&!Pe.contains(h8,a.name)&&(o=!0);var l;if(a.symbol){var c=o?"Size2-Regular":"Size1-Regular",u="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(u=a.name.slice(1),a.name=u==="oiint"?"\\iint":"\\iiint"),l=j.makeSymbol(a.name,c,"math",t,["mop","op-symbol",o?"large-op":"small-op"]),u.length>0){var d=l.italic,f=j.staticSvg(u+"Size"+(o?"2":"1"),t);l=j.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:f,shift:o?.08:0}]},t),a.name="\\"+u,l.classes.unshift("mop"),l.italic=d}}else if(a.body){var p=rn(a.body,t,!0);p.length===1&&p[0]instanceof yr?(l=p[0],l.classes[0]="mop"):l=j.makeSpan(["mop"],p,t)}else{for(var m=[],h=1;h{var n;if(e.symbol)n=new ur("mo",[br(e.name,e.mode)]),Pe.contains(h8,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new ur("mo",jn(e.body,t));else{n=new ur("mi",[new Ml(e.name.slice(1))]);var r=new ur("mo",[br("⁡","text")]);e.parentIsSupSub?n=new ur("mrow",[n,r]):n=$k([n,r])}return n},lW={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};me({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=lW[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Ho,mathmlBuilder:$c});me({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Wt(r)}},htmlBuilder:Ho,mathmlBuilder:$c});var cW={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};me({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Ho,mathmlBuilder:$c});me({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Ho,mathmlBuilder:$c});me({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=cW[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Ho,mathmlBuilder:$c});var f8=(e,t)=>{var n,r,i=!1,a;e.type==="supsub"?(n=e.sup,r=e.sub,a=Ye(e.base,"operatorname"),i=!0):a=Ye(e,"operatorname");var s;if(a.body.length>0){for(var o=a.body.map(d=>{var f=d.text;return typeof f=="string"?{type:"textord",mode:d.mode,text:f}:d}),l=rn(o,t.withFont("mathrm"),!0),c=0;c{for(var n=jn(e.body,t.withFont("mathrm")),r=!0,i=0;iu.toText()).join("");n=[new te.TextNode(o)]}var l=new te.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new te.MathNode("mo",[br("⁡","text")]);return e.parentIsSupSub?new te.MathNode("mrow",[l,c]):te.newDocumentFragment([l,c])};me({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:Wt(i),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:f8,mathmlBuilder:uW});C("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");ws({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?j.makeFragment(rn(e.body,t,!1)):j.makeSpan(["mord"],rn(e.body,t,!0),t)},mathmlBuilder(e,t){return Ca(e.body,t,!0)}});me({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=at(e.body,t.havingCrampedStyle()),r=j.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,a=j.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return j.makeSpan(["mord","overline"],[a],t)},mathmlBuilder(e,t){var n=new te.MathNode("mo",[new te.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new te.MathNode("mover",[yt(e.body,t),n]);return r.setAttribute("accent","true"),r}});me({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Wt(r)}},htmlBuilder:(e,t)=>{var n=rn(e.body,t.withPhantom(),!1);return j.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=jn(e.body,t);return new te.MathNode("mphantom",n)}});me({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=j.makeSpan([],[at(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r{var n=jn(Wt(e.body),t),r=new te.MathNode("mphantom",n),i=new te.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});me({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=j.makeSpan(["inner"],[at(e.body,t.withPhantom())]),r=j.makeSpan(["fix"],[]);return j.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=jn(Wt(e.body),t),r=new te.MathNode("mphantom",n),i=new te.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}});me({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=Ye(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=at(e.body,t),r=Lt(e.dy,t);return j.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new te.MathNode("mpadded",[yt(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});me({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});me({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,i=n[0],a=Ye(t[0],"size"),s=Ye(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&Ye(i,"size").value,width:a.value,height:s.value}},htmlBuilder(e,t){var n=j.makeSpan(["mord","rule"],[],t),r=Lt(e.width,t),i=Lt(e.height,t),a=e.shift?Lt(e.shift,t):0;return n.style.borderRightWidth=he(r),n.style.borderTopWidth=he(i),n.style.bottom=he(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Lt(e.width,t),r=Lt(e.height,t),i=e.shift?Lt(e.shift,t):0,a=t.color&&t.getColor()||"black",s=new te.MathNode("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",he(n)),s.setAttribute("height",he(r));var o=new te.MathNode("mpadded",[s]);return i>=0?o.setAttribute("height",he(i)):(o.setAttribute("height",he(i)),o.setAttribute("depth",he(-i))),o.setAttribute("voffset",he(i)),o}});function p8(e,t,n){for(var r=rn(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a{var n=t.havingSize(e.size);return p8(e.body,n,t)};me({type:"sizing",names:M4,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:M4.indexOf(r)+1,body:a}},htmlBuilder:dW,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=jn(e.body,n),i=new te.MathNode("mstyle",r);return i.setAttribute("mathsize",he(n.sizeMultiplier)),i}});me({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,s=n[0]&&Ye(n[0],"ordgroup");if(s)for(var o="",l=0;l{var n=j.makeSpan([],[at(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r{var n=new te.MathNode("mpadded",[yt(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});me({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:"sqrt",mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=at(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=j.wrapFragment(n,t);var r=t.fontMetrics(),i=r.defaultRuleThickness,a=i;t.style.idn.height+n.depth+s&&(s=(s+d-n.height-n.depth)/2);var f=l.height-n.height-s-c;n.style.paddingLeft=he(u);var p=j.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+f)},{type:"elem",elem:l},{type:"kern",size:c}]},t);if(e.index){var m=t.havingStyle(De.SCRIPTSCRIPT),h=at(e.index,m,t),w=.6*(p.height-p.depth),y=j.makeVList({positionType:"shift",positionData:-w,children:[{type:"elem",elem:h}]},t),v=j.makeSpan(["root"],[y]);return j.makeSpan(["mord","sqrt"],[v,p],t)}else return j.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new te.MathNode("mroot",[yt(n,t),yt(r,t)]):new te.MathNode("msqrt",[yt(n,t)])}});var R4={display:De.DISPLAY,text:De.TEXT,script:De.SCRIPT,scriptscript:De.SCRIPTSCRIPT};me({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),s=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(e,t){var n=R4[e.style],r=t.havingStyle(n).withFont("");return p8(e.body,r,t)},mathmlBuilder(e,t){var n=R4[e.style],r=t.havingStyle(n),i=jn(e.body,r),a=new te.MathNode("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[e.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});var hW=function(t,n){var r=t.base;if(r)if(r.type==="op"){var i=r.limits&&(n.style.size===De.DISPLAY.size||r.alwaysHandleSupSub);return i?Ho:null}else if(r.type==="operatorname"){var a=r.alwaysHandleSupSub&&(n.style.size===De.DISPLAY.size||r.limits);return a?f8:null}else{if(r.type==="accent")return Pe.isCharacterBox(r.base)?by:null;if(r.type==="horizBrace"){var s=!t.sub;return s===r.isOver?u8:null}else return null}else return null};ws({type:"supsub",htmlBuilder(e,t){var n=hW(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,s=at(r,t),o,l,c=t.fontMetrics(),u=0,d=0,f=r&&Pe.isCharacterBox(r);if(i){var p=t.havingStyle(t.style.sup());o=at(i,p,t),f||(u=s.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());l=at(a,m,t),f||(d=s.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h;t.style===De.DISPLAY?h=c.sup1:t.style.cramped?h=c.sup3:h=c.sup2;var w=t.sizeMultiplier,y=he(.5/c.ptPerEm/w),v=null;if(l){var x=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(s instanceof yr||x)&&(v=he(-s.italic))}var _;if(o&&l){u=Math.max(u,h,o.depth+.25*c.xHeight),d=Math.max(d,c.sub2);var A=c.defaultRuleThickness,E=4*A;if(u-o.depth-(l.height-d)0&&(u+=R,d-=R)}var F=[{type:"elem",elem:l,shift:d,marginRight:y,marginLeft:v},{type:"elem",elem:o,shift:-u,marginRight:y}];_=j.makeVList({positionType:"individualShift",children:F},t)}else if(l){d=Math.max(d,c.sub1,l.height-.8*c.xHeight);var q=[{type:"elem",elem:l,marginLeft:v,marginRight:y}];_=j.makeVList({positionType:"shift",positionData:d,children:q},t)}else if(o)u=Math.max(u,h,o.depth+.25*c.xHeight),_=j.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:o,marginRight:y}]},t);else throw new Error("supsub must have either sup or sub.");var K=Gm(s,"right")||"mord";return j.makeSpan([K],[s,j.makeSpan(["msupsub"],[_])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[yt(e.base,t)];e.sub&&a.push(yt(e.sub,t)),e.sup&&a.push(yt(e.sup,t));var s;if(n)s=r?"mover":"munder";else if(e.sub)if(e.sup){var c=e.base;c&&c.type==="op"&&c.limits&&t.style===De.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(t.style===De.DISPLAY||c.limits)?s="munderover":s="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===De.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===De.DISPLAY)?s="munder":s="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===De.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===De.DISPLAY)?s="mover":s="msup"}return new te.MathNode(s,a)}});ws({type:"atom",htmlBuilder(e,t){return j.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new te.MathNode("mo",[br(e.text,e.mode)]);if(e.family==="bin"){var r=gy(e,t);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var m8={mi:"italic",mn:"normal",mtext:"normal"};ws({type:"mathord",htmlBuilder(e,t){return j.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var n=new te.MathNode("mi",[br(e.text,e.mode,t)]),r=gy(e,t)||"italic";return r!==m8[n.type]&&n.setAttribute("mathvariant",r),n}});ws({type:"textord",htmlBuilder(e,t){return j.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var n=br(e.text,e.mode,t),r=gy(e,t)||"normal",i;return e.mode==="text"?i=new te.MathNode("mtext",[n]):/[0-9]/.test(e.text)?i=new te.MathNode("mn",[n]):e.text==="\\prime"?i=new te.MathNode("mo",[n]):i=new te.MathNode("mi",[n]),r!==m8[i.type]&&i.setAttribute("mathvariant",r),i}});var cp={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},up={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ws({type:"spacing",htmlBuilder(e,t){if(up.hasOwnProperty(e.text)){var n=up[e.text].className||"";if(e.mode==="text"){var r=j.makeOrd(e,t,"textord");return r.classes.push(n),r}else return j.makeSpan(["mspace",n],[j.mathsym(e.text,e.mode,t)],t)}else{if(cp.hasOwnProperty(e.text))return j.makeSpan(["mspace",cp[e.text]],[],t);throw new ie('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(up.hasOwnProperty(e.text))n=new te.MathNode("mtext",[new te.TextNode(" ")]);else{if(cp.hasOwnProperty(e.text))return new te.MathNode("mspace");throw new ie('Unknown type of space "'+e.text+'"')}return n}});var I4=()=>{var e=new te.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};ws({type:"tag",mathmlBuilder(e,t){var n=new te.MathNode("mtable",[new te.MathNode("mtr",[I4(),new te.MathNode("mtd",[Ca(e.body,t)]),I4(),new te.MathNode("mtd",[Ca(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var O4={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},D4={"\\textbf":"textbf","\\textmd":"textmd"},fW={"\\textit":"textit","\\textup":"textup"},L4=(e,t)=>{var n=e.font;return n?O4[n]?t.withTextFontFamily(O4[n]):D4[n]?t.withTextFontWeight(D4[n]):t.withTextFontShape(fW[n]):t};me({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"text",mode:n.mode,body:Wt(i),font:r}},htmlBuilder(e,t){var n=L4(e,t),r=rn(e.body,n,!0);return j.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=L4(e,t);return Ca(e.body,n)}});me({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=at(e.body,t),r=j.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,a=j.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},t);return j.makeSpan(["mord","underline"],[a],t)},mathmlBuilder(e,t){var n=new te.MathNode("mo",[new te.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new te.MathNode("munder",[yt(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});me({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=at(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return j.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){return new te.MathNode("mpadded",[yt(e.body,t)],["vcenter"])}});me({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new ie("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=P4(e),r=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),ca=Fk,g8=`[ \r + ]`,pW="\\\\[a-zA-Z@]+",mW="\\\\[^\uD800-\uDFFF]",gW="("+pW+")"+g8+"*",yW=`\\\\( +|[ \r ]+ +?)[ \r ]*`,Zm="[̀-ͯ]",bW=new RegExp(Zm+"+$"),vW="("+g8+"+)|"+(yW+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(Zm+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Zm+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+gW)+("|"+mW+")");class z4{constructor(t,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=n,this.tokenRegex=new RegExp(vW,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,n){this.catcodes[t]=n}lex(){var t=this.input,n=this.tokenRegex.lastIndex;if(n===t.length)return new ri("EOF",new Yn(this,n,n));var r=this.tokenRegex.exec(t);if(r===null||r.index!==n)throw new ie("Unexpected character: '"+t[n]+"'",new ri(t[n],new Yn(this,n,n+1)));var i=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=t.indexOf(` +`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new ri(i,new Yn(this,n,this.tokenRegex.lastIndex))}}class wW{constructor(t,n){t===void 0&&(t={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new ie("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var n in t)t.hasOwnProperty(n)&&(t[n]==null?delete this.current[n]:this.current[n]=t[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,n,r){if(r===void 0&&(r=!1),r){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(t)&&(a[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var xW=a8;C("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});C("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});C("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});C("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});C("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});C("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");C("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var F4={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};C("\\char",function(e){var t=e.popToken(),n,r="";if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")r=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new ie("\\char` missing argument");r=t.text.charCodeAt(0)}else n=10;if(n){if(r=F4[t.text],r==null||r>=n)throw new ie("Invalid base-"+n+" digit "+t.text);for(var i;(i=F4[e.future().text])!=null&&i{var r=e.consumeArg().tokens;if(r.length!==1)throw new ie("\\newcommand's first argument must be a macro name");var i=r[0].text,a=e.isDefined(i);if(a&&!t)throw new ie("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!n)throw new ie("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(r=e.consumeArg().tokens,r.length===1&&r[0].text==="["){for(var o="",l=e.expandNextToken();l.text!=="]"&&l.text!=="EOF";)o+=l.text,l=e.expandNextToken();if(!o.match(/^\s*[0-9]+\s*$/))throw new ie("Invalid number of arguments: "+o);s=parseInt(o),r=e.consumeArg().tokens}return e.macros.set(i,{tokens:r,numArgs:s}),""};C("\\newcommand",e=>Cy(e,!1,!0));C("\\renewcommand",e=>Cy(e,!0,!1));C("\\providecommand",e=>Cy(e,!0,!0));C("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});C("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});C("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),ca[n],wt.math[n],wt.text[n]),""});C("\\bgroup","{");C("\\egroup","}");C("~","\\nobreakspace");C("\\lq","`");C("\\rq","'");C("\\aa","\\r a");C("\\AA","\\r A");C("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");C("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");C("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");C("ℬ","\\mathscr{B}");C("ℰ","\\mathscr{E}");C("ℱ","\\mathscr{F}");C("ℋ","\\mathscr{H}");C("ℐ","\\mathscr{I}");C("ℒ","\\mathscr{L}");C("ℳ","\\mathscr{M}");C("ℛ","\\mathscr{R}");C("ℭ","\\mathfrak{C}");C("ℌ","\\mathfrak{H}");C("ℨ","\\mathfrak{Z}");C("\\Bbbk","\\Bbb{k}");C("·","\\cdotp");C("\\llap","\\mathllap{\\textrm{#1}}");C("\\rlap","\\mathrlap{\\textrm{#1}}");C("\\clap","\\mathclap{\\textrm{#1}}");C("\\mathstrut","\\vphantom{(}");C("\\underbar","\\underline{\\text{#1}}");C("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');C("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");C("\\ne","\\neq");C("≠","\\neq");C("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");C("∉","\\notin");C("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");C("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");C("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");C("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");C("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");C("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");C("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");C("⟂","\\perp");C("‼","\\mathclose{!\\mkern-0.8mu!}");C("∌","\\notni");C("⌜","\\ulcorner");C("⌝","\\urcorner");C("⌞","\\llcorner");C("⌟","\\lrcorner");C("©","\\copyright");C("®","\\textregistered");C("️","\\textregistered");C("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');C("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');C("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');C("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');C("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");C("⋮","\\vdots");C("\\varGamma","\\mathit{\\Gamma}");C("\\varDelta","\\mathit{\\Delta}");C("\\varTheta","\\mathit{\\Theta}");C("\\varLambda","\\mathit{\\Lambda}");C("\\varXi","\\mathit{\\Xi}");C("\\varPi","\\mathit{\\Pi}");C("\\varSigma","\\mathit{\\Sigma}");C("\\varUpsilon","\\mathit{\\Upsilon}");C("\\varPhi","\\mathit{\\Phi}");C("\\varPsi","\\mathit{\\Psi}");C("\\varOmega","\\mathit{\\Omega}");C("\\substack","\\begin{subarray}{c}#1\\end{subarray}");C("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");C("\\boxed","\\fbox{$\\displaystyle{#1}$}");C("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");C("\\implies","\\DOTSB\\;\\Longrightarrow\\;");C("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var B4={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};C("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in B4?t=B4[n]:(n.slice(0,4)==="\\not"||n in wt.math&&Pe.contains(["bin","rel"],wt.math[n].group))&&(t="\\dotsb"),t});var Ty={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};C("\\dotso",function(e){var t=e.future().text;return t in Ty?"\\ldots\\,":"\\ldots"});C("\\dotsc",function(e){var t=e.future().text;return t in Ty&&t!==","?"\\ldots\\,":"\\ldots"});C("\\cdots",function(e){var t=e.future().text;return t in Ty?"\\@cdots\\,":"\\@cdots"});C("\\dotsb","\\cdots");C("\\dotsm","\\cdots");C("\\dotsi","\\!\\cdots");C("\\dotsx","\\ldots\\,");C("\\DOTSI","\\relax");C("\\DOTSB","\\relax");C("\\DOTSX","\\relax");C("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");C("\\,","\\tmspace+{3mu}{.1667em}");C("\\thinspace","\\,");C("\\>","\\mskip{4mu}");C("\\:","\\tmspace+{4mu}{.2222em}");C("\\medspace","\\:");C("\\;","\\tmspace+{5mu}{.2777em}");C("\\thickspace","\\;");C("\\!","\\tmspace-{3mu}{.1667em}");C("\\negthinspace","\\!");C("\\negmedspace","\\tmspace-{4mu}{.2222em}");C("\\negthickspace","\\tmspace-{5mu}{.277em}");C("\\enspace","\\kern.5em ");C("\\enskip","\\hskip.5em\\relax");C("\\quad","\\hskip1em\\relax");C("\\qquad","\\hskip2em\\relax");C("\\tag","\\@ifstar\\tag@literal\\tag@paren");C("\\tag@paren","\\tag@literal{({#1})}");C("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new ie("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});C("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");C("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");C("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");C("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");C("\\newline","\\\\\\relax");C("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var y8=he(Zr["Main-Regular"]["T".charCodeAt(0)][1]-.7*Zr["Main-Regular"]["A".charCodeAt(0)][1]);C("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+y8+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");C("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+y8+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");C("\\hspace","\\@ifstar\\@hspacer\\@hspace");C("\\@hspace","\\hskip #1\\relax");C("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");C("\\ordinarycolon",":");C("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");C("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');C("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');C("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');C("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');C("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');C("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');C("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');C("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');C("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');C("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');C("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');C("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');C("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');C("∷","\\dblcolon");C("∹","\\eqcolon");C("≔","\\coloneqq");C("≕","\\eqqcolon");C("⩴","\\Coloneqq");C("\\ratio","\\vcentcolon");C("\\coloncolon","\\dblcolon");C("\\colonequals","\\coloneqq");C("\\coloncolonequals","\\Coloneqq");C("\\equalscolon","\\eqqcolon");C("\\equalscoloncolon","\\Eqqcolon");C("\\colonminus","\\coloneq");C("\\coloncolonminus","\\Coloneq");C("\\minuscolon","\\eqcolon");C("\\minuscoloncolon","\\Eqcolon");C("\\coloncolonapprox","\\Colonapprox");C("\\coloncolonsim","\\Colonsim");C("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");C("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");C("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");C("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");C("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");C("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");C("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");C("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");C("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");C("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");C("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");C("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");C("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");C("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");C("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");C("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");C("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");C("\\nleqq","\\html@mathml{\\@nleqq}{≰}");C("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");C("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");C("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");C("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");C("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");C("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");C("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");C("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");C("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");C("\\imath","\\html@mathml{\\@imath}{ı}");C("\\jmath","\\html@mathml{\\@jmath}{ȷ}");C("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");C("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");C("⟦","\\llbracket");C("⟧","\\rrbracket");C("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");C("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");C("⦃","\\lBrace");C("⦄","\\rBrace");C("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");C("⦵","\\minuso");C("\\darr","\\downarrow");C("\\dArr","\\Downarrow");C("\\Darr","\\Downarrow");C("\\lang","\\langle");C("\\rang","\\rangle");C("\\uarr","\\uparrow");C("\\uArr","\\Uparrow");C("\\Uarr","\\Uparrow");C("\\N","\\mathbb{N}");C("\\R","\\mathbb{R}");C("\\Z","\\mathbb{Z}");C("\\alef","\\aleph");C("\\alefsym","\\aleph");C("\\Alpha","\\mathrm{A}");C("\\Beta","\\mathrm{B}");C("\\bull","\\bullet");C("\\Chi","\\mathrm{X}");C("\\clubs","\\clubsuit");C("\\cnums","\\mathbb{C}");C("\\Complex","\\mathbb{C}");C("\\Dagger","\\ddagger");C("\\diamonds","\\diamondsuit");C("\\empty","\\emptyset");C("\\Epsilon","\\mathrm{E}");C("\\Eta","\\mathrm{H}");C("\\exist","\\exists");C("\\harr","\\leftrightarrow");C("\\hArr","\\Leftrightarrow");C("\\Harr","\\Leftrightarrow");C("\\hearts","\\heartsuit");C("\\image","\\Im");C("\\infin","\\infty");C("\\Iota","\\mathrm{I}");C("\\isin","\\in");C("\\Kappa","\\mathrm{K}");C("\\larr","\\leftarrow");C("\\lArr","\\Leftarrow");C("\\Larr","\\Leftarrow");C("\\lrarr","\\leftrightarrow");C("\\lrArr","\\Leftrightarrow");C("\\Lrarr","\\Leftrightarrow");C("\\Mu","\\mathrm{M}");C("\\natnums","\\mathbb{N}");C("\\Nu","\\mathrm{N}");C("\\Omicron","\\mathrm{O}");C("\\plusmn","\\pm");C("\\rarr","\\rightarrow");C("\\rArr","\\Rightarrow");C("\\Rarr","\\Rightarrow");C("\\real","\\Re");C("\\reals","\\mathbb{R}");C("\\Reals","\\mathbb{R}");C("\\Rho","\\mathrm{P}");C("\\sdot","\\cdot");C("\\sect","\\S");C("\\spades","\\spadesuit");C("\\sub","\\subset");C("\\sube","\\subseteq");C("\\supe","\\supseteq");C("\\Tau","\\mathrm{T}");C("\\thetasym","\\vartheta");C("\\weierp","\\wp");C("\\Zeta","\\mathrm{Z}");C("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");C("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");C("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");C("\\bra","\\mathinner{\\langle{#1}|}");C("\\ket","\\mathinner{|{#1}\\rangle}");C("\\braket","\\mathinner{\\langle{#1}\\rangle}");C("\\Bra","\\left\\langle#1\\right|");C("\\Ket","\\left|#1\\right\\rangle");var b8=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,s=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=d=>f=>{e&&(f.macros.set("|",s),i.length&&f.macros.set("\\|",o));var p=d;if(!d&&i.length){var m=f.future();m.text==="|"&&(f.popToken(),p=!0)}return{tokens:p?i:r,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,u=t.expandTokens([...a,...c,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};C("\\bra@ket",b8(!1));C("\\bra@set",b8(!0));C("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");C("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");C("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");C("\\angln","{\\angl n}");C("\\blue","\\textcolor{##6495ed}{#1}");C("\\orange","\\textcolor{##ffa500}{#1}");C("\\pink","\\textcolor{##ff00af}{#1}");C("\\red","\\textcolor{##df0030}{#1}");C("\\green","\\textcolor{##28ae7b}{#1}");C("\\gray","\\textcolor{gray}{#1}");C("\\purple","\\textcolor{##9d38bd}{#1}");C("\\blueA","\\textcolor{##ccfaff}{#1}");C("\\blueB","\\textcolor{##80f6ff}{#1}");C("\\blueC","\\textcolor{##63d9ea}{#1}");C("\\blueD","\\textcolor{##11accd}{#1}");C("\\blueE","\\textcolor{##0c7f99}{#1}");C("\\tealA","\\textcolor{##94fff5}{#1}");C("\\tealB","\\textcolor{##26edd5}{#1}");C("\\tealC","\\textcolor{##01d1c1}{#1}");C("\\tealD","\\textcolor{##01a995}{#1}");C("\\tealE","\\textcolor{##208170}{#1}");C("\\greenA","\\textcolor{##b6ffb0}{#1}");C("\\greenB","\\textcolor{##8af281}{#1}");C("\\greenC","\\textcolor{##74cf70}{#1}");C("\\greenD","\\textcolor{##1fab54}{#1}");C("\\greenE","\\textcolor{##0d923f}{#1}");C("\\goldA","\\textcolor{##ffd0a9}{#1}");C("\\goldB","\\textcolor{##ffbb71}{#1}");C("\\goldC","\\textcolor{##ff9c39}{#1}");C("\\goldD","\\textcolor{##e07d10}{#1}");C("\\goldE","\\textcolor{##a75a05}{#1}");C("\\redA","\\textcolor{##fca9a9}{#1}");C("\\redB","\\textcolor{##ff8482}{#1}");C("\\redC","\\textcolor{##f9685d}{#1}");C("\\redD","\\textcolor{##e84d39}{#1}");C("\\redE","\\textcolor{##bc2612}{#1}");C("\\maroonA","\\textcolor{##ffbde0}{#1}");C("\\maroonB","\\textcolor{##ff92c6}{#1}");C("\\maroonC","\\textcolor{##ed5fa6}{#1}");C("\\maroonD","\\textcolor{##ca337c}{#1}");C("\\maroonE","\\textcolor{##9e034e}{#1}");C("\\purpleA","\\textcolor{##ddd7ff}{#1}");C("\\purpleB","\\textcolor{##c6b9fc}{#1}");C("\\purpleC","\\textcolor{##aa87ff}{#1}");C("\\purpleD","\\textcolor{##7854ab}{#1}");C("\\purpleE","\\textcolor{##543b78}{#1}");C("\\mintA","\\textcolor{##f5f9e8}{#1}");C("\\mintB","\\textcolor{##edf2df}{#1}");C("\\mintC","\\textcolor{##e0e5cc}{#1}");C("\\grayA","\\textcolor{##f6f7f7}{#1}");C("\\grayB","\\textcolor{##f0f1f2}{#1}");C("\\grayC","\\textcolor{##e3e5e6}{#1}");C("\\grayD","\\textcolor{##d6d8da}{#1}");C("\\grayE","\\textcolor{##babec2}{#1}");C("\\grayF","\\textcolor{##888d93}{#1}");C("\\grayG","\\textcolor{##626569}{#1}");C("\\grayH","\\textcolor{##3b3e40}{#1}");C("\\grayI","\\textcolor{##21242c}{#1}");C("\\kaBlue","\\textcolor{##314453}{#1}");C("\\kaGreen","\\textcolor{##71B307}{#1}");var v8={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class kW{constructor(t,n,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=n,this.expansionCount=0,this.feed(t),this.macros=new wW(xW,n.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new z4(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var n,r,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:i,end:r}=this.consumeArg(["]"])}else({tokens:i,start:n,end:r}=this.consumeArg());return this.pushToken(new ri("EOF",r.loc)),this.pushTokens(i),n.range(r,"")}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var n=[],r=t&&t.length>0;r||this.consumeSpaces();var i=this.future(),a,s=0,o=0;do{if(a=this.popToken(),n.push(a),a.text==="{")++s;else if(a.text==="}"){if(--s,s===-1)throw new ie("Extra }",a)}else if(a.text==="EOF")throw new ie("Unexpected end of input in a macro argument, expected '"+(t&&r?t[o]:"}")+"'",a);if(t&&r)if((s===0||s===1&&t[o]==="{")&&a.text===t[o]){if(++o,o===t.length){n.splice(-o,o);break}}else o=0}while(s!==0||r);return i.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:i,end:a}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new ie("The length of delimiters doesn't match the number of args!");for(var r=n[0],i=0;ithis.settings.maxExpand)throw new ie("Too many expansions: infinite loop or need to increase maxExpand setting");var a=i.tokens,s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var l=a[o];if(l.text==="#"){if(o===0)throw new ie("Incomplete placeholder at end of macro body",l);if(l=a[--o],l.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(l.text))a.splice(o,2,...s[+l.text-1]);else throw new ie("Not a valid argument number",l)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new ri(t)]):void 0}expandTokens(t){var n=[],r=this.stack.length;for(this.pushTokens(t);this.stack.length>r;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),n.push(i)}return n}expandMacroAsText(t){var n=this.expandMacro(t);return n&&n.map(r=>r.text).join("")}_getExpansion(t){var n=this.macros.get(t);if(n==null)return n;if(t.length===1){var r=this.lexer.catcodes[t];if(r!=null&&r!==13)return}var i=typeof n=="function"?n(this):n;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var s=i.replace(/##/g,"");s.indexOf("#"+(a+1))!==-1;)++a;for(var o=new z4(i,this.settings),l=[],c=o.lex();c.text!=="EOF";)l.push(c),c=o.lex();l.reverse();var u={tokens:l,numArgs:a};return u}return i}isDefined(t){return this.macros.has(t)||ca.hasOwnProperty(t)||wt.math.hasOwnProperty(t)||wt.text.hasOwnProperty(t)||v8.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:ca.hasOwnProperty(t)&&!ca[t].primitive}}var $4=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ju=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),dp={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},U4={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class uc{constructor(t,n){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new kW(t,n,this.mode),this.settings=n,this.leftrightDepth=0}expect(t,n){if(n===void 0&&(n=!0),this.fetch().text!==t)throw new ie("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var n=this.nextToken;this.consume(),this.gullet.pushToken(new ri("}")),this.gullet.pushTokens(t);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,r}parseExpression(t,n){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(uc.endOfExpression.indexOf(i.text)!==-1||n&&i.text===n||t&&ca[i.text]&&ca[i.text].infix)break;var a=this.parseAtom(n);if(a){if(a.type==="internal")continue}else break;r.push(a)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var n=-1,r,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var o=wt[this.mode][n].group,l=Yn.range(t),c;if(uH.hasOwnProperty(o)){var u=o;c={type:"atom",mode:this.mode,family:u,loc:l,text:n}}else c={type:o,mode:this.mode,loc:l,text:n};s=c}else if(n.charCodeAt(0)>=128)this.settings.strict&&(Ak(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),t)),s={type:"textord",mode:"text",loc:Yn.range(t),text:n};else return null;if(this.consume(),a)for(var d=0;ds&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function k8(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function TW(e,t){return q4(e,t.inConstruct,!0)&&!q4(e,t.notInConstruct,!1)}function q4(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r=c||u+1":""))+")"})}return d;function d(){let f=[],p,m,h;if((!t||i(o,l,c[c.length-1]||null))&&(f=$W(n(o,c)),f[0]===W4))return f;if(o.children&&f[0]!==FW)for(m=(r?o.children.length:-1)+a,h=c.concat(o);m>-1&&ml&&(l=c):c&&(l!==void 0&&l>-1&&o.push(` +`.repeat(l)||" "),l=-1,o.push(c))}return o.join("")}function C8(e,t,n){return e.type==="element"?VW(e,t,n):e.type==="text"?n.whitespace==="normal"?T8(e,n):GW(e):[]}function VW(e,t,n){const r=A8(e,n),i=e.children||[];let a=-1,s=[];if(WW(e))return s;let o,l;for(Jm(e)||X4(e)&&Y4(t,e,X4)?l=` +`:HW(e)?(o=2,l=2):E8(e)&&(o=1,l=1);++a4&&n.slice(0,4)==="data"&&nY.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Z4,sY);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Z4.test(a)){let s=a.replace(rY,aY);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Iy}return new i(r,t)}function aY(e){return"-"+e.toLowerCase()}function sY(e){return e.charAt(1).toUpperCase()}const oY=N8([I8,R8,L8,P8,eY],"html"),lY=N8([I8,R8,L8,P8,tY],"svg"),J4=/[#.]/g;function cY(e,t){const n=e||"",r={};let i=0,a,s;for(;i{UW(r,"element",a=>{const s=a.properties&&Array.isArray(a.properties.className)?a.properties.className:[],o=s.includes("math-inline"),l=s.includes("math-display");if(!o&&!l)return;const c=YW(a,{whitespace:"pre"});let u;try{u=j4.renderToString(c,i2({},t,{displayMode:l,throwOnError:!0}))}catch(f){const p=f,m=n?"fail":"message",h=[TY,p.name.toLowerCase()].join(":");if(i[m](p.message,a.position,h),p.name!=="ParseError"){a.children=[{type:"element",tagName:"span",properties:{className:["katex-error"],title:String(p),style:"color:"+(t.errorColor||"#cc0000")},children:[{type:"text",value:c}]}];return}u=j4.renderToString(c,i2({},t,{displayMode:l,throwOnError:!1,strict:"ignore"}))}const d=EY(u,{fragment:!0});a.children=d.children})}}const AY=L.div` + height: ${e=>e.theme.scale.scale10}; + background: #0a0c28; + @media screen and (max-width: 1024px) { + height: 414px; + } + @media screen and (max-width: 768px) { + height: 276px; + } +`,NY=L.main` + max-width: 1024px; + margin-top: -${e=>e.theme.scale.scale09}; + margin-bottom: ${e=>e.theme.scale.scale07}; + margin-inline: auto; + padding-inline: 64px; + // - - - + /* height: 400px; */ + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 15px; + } + @media screen and (max-width: 1024px) { + margin-top: -252px; + } + @media screen and (max-width: 768px) { + margin-top: -168px; + padding-inline: 32px; + } +`,MY=L.h1` + margin-bottom: ${e=>e.theme.scale.scale03}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize8}; + /* line-height: ${e=>e.theme.font.lineHeight9}; */ + line-height: 1.4; + text-transform: capitalize; + /* word-break: break-all; */ + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 34.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 23px; + } +`,U8=L.p` + margin-bottom: ${e=>e.theme.scale.scale04}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize5}; + /* line-height: ${e=>e.theme.font.lineHeight5}; */ + line-height: 1.3; + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + font-size: 18px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + font-size: 12px; + } +`,RY=L.a` + display: flex; + align-items: center; + margin-bottom: ${e=>e.theme.scale.scale04}; + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + } +`,IY=L.img` + margin-right: 24px; + height: ${e=>e.theme.scale.scale06}; + width: ${e=>e.theme.scale.scale06}; + border: 2px solid ${e=>e.theme.color.neutral.gray01}; + border-radius: 50%; + @media screen and (max-width: 1024px) { + margin-right: 18px; + height: 60px; + width: 60px; + } + @media screen and (max-width: 768px) { + margin-right: 12px; + height: 60px; + width: 60px; + } +`,OY=L(U8)` + margin-bottom: 0; +`,DY=L.img` + width: 100%; + margin-bottom: ${e=>e.theme.scale.scale04}; + border-radius: ${e=>e.theme.scale.scale02}; + /* height: 336px; */ + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + border-radius: 9px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + border-radius: 6px; + } +`,LY=L.div` + margin-bottom: ${e=>e.theme.scale.scale08}; + @media screen and (max-width: 1024px) { + margin-bottom: 156px; + } + @media screen and (max-width: 768px) { + margin-bottom: 104px; + } +`,PY=L.div``,zY=L.div` + text-align: center; + margin-bottom: ${e=>e.theme.scale.scale06}; + @media screen and (max-width: 1024px) { + margin-bottom: 60px; + } + @media screen and (max-width: 768px) { + margin-bottom: 40px; + } +`,FY=L.span` + padding-inline: ${e=>e.theme.scale.scale06}; + padding-bottom: ${e=>e.theme.scale.scale01}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize8}; + /* line-height: ${e=>e.theme.font.lineHeight8}; */ + line-height: 1.2; + text-transform: capitalize; + background-image: url(${Ra}); + background-clip: border-box; + background-repeat: no-repeat; + background-position: bottom 0 right 0; + background-size: 50%; + @media screen and (max-width: 768px) { + padding-inline: 60px; + padding-bottom: 6px; + font-size: 34.5px; + } +`,BY=L.ul` + display: flex; + flex-flow: wrap; + justify-content: space-between; + flex: 1; + margin-bottom: ${e=>e.theme.scale.scale04}; + @media screen and (max-width: 1024px) { + } + @media screen and (max-width: 768px) { + flex-direction: column; + + margin-bottom: 24px; + } +`,$Y=L.li` + width: 48%; + margin-bottom: ${e=>e.theme.scale.scale04}; + border: 1px solid #dfdfdf; + border-radius: ${e=>e.theme.scale.scale03}; + box-shadow: 5px 5px 15px -5px ${e=>e.theme.color.neutral.gray06}; + overflow: hidden; + @media screen and (max-width: 768px) { + width: 100%; + margin-bottom: 16px; + border-radius: 15px; + } +`,UY=L.img` + width: 100%; + height: ${e=>e.theme.scale.scale08}; + flex-direction: column; + @media screen and (max-width: 1024px) { + height: 156px; + } +`,jY=L.div` + padding: ${e=>e.theme.scale.scale03}; + // - - - + /* height: 100px; */ + @media screen and (max-width: 768px) { + padding: 15px; + } +`,qY=L.h1` + margin-bottom: ${e=>e.theme.scale.scale03}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize4}; + /* line-height: ${e=>e.theme.font.lineHeight4}; */ + line-height: 1.4; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-transform: capitalize; + @media screen and (max-width: 768px) { + margin-bottom: 15px; + font-size: 15px; + } +`,HY=L.p` + display: -webkit-box; + margin-bottom: ${e=>e.theme.scale.scale03}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize3}; + /* line-height: ${e=>e.theme.font.lineHeight3}; */ + line-height: 1.5; + word-break: break-all; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + text-overflow: ellipsis; + @media screen and (max-width: 768px) { + margin-bottom: 15px; + font-size: 12px; + } +`,WY=L(Ro)` + display: inline-block; + margin-bottom: ${e=>e.theme.scale.scale01}; + padding-block: ${e=>e.theme.scale.scale01}; + padding-inline: ${e=>e.theme.scale.scale04}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize2}; + /* line-height: ${e=>e.theme.font.lineHeight2}; */ + line-height: 1.5; + background: linear-gradient(90deg, #767ee5, #9966cc); + border-radius: 20px; + @media screen and (max-width: 768px) { + margin-bottom: 6px; + padding-block: 6px; + padding-inline: 24px; + font-size: 10.5px; + border-radius: 15px; + } +`,YY=L(Ro)` + display: block; + text-align: right; + color: #7680dd; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize4}; + /* line-height: ${e=>e.theme.font.lineHeight4}; */ + line-height: 1.4; + @media screen and (max-width: 768px) { + font-size: 15px; + } +`,pp=Object.assign({"/src/blog/2023-01-07-Curp:-Revisit-the-Consensus-Protocol.md":O5,"/src/blog/2023-02-19-Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness.md":D5,"/src/blog/2023-03-10-How-to-Elegantly-Organize-Async-Rust-Code.md":L5,"/src/blog/2023-04-19-Database-Isolation-Levels-and-MVCC.md":P5,"/src/blog/2023-05-21-The-design-and-Implementation-of-the-Xline-Persistent-Storage-Layer.md":z5,"/src/blog/2023-08-18-Introduction-to-CURP-Protocol.md":F5,"/src/blog/2023-09-23-Mechanism-and-Implementation-of-Lease.md":B5,"/src/blog/2023-11-01-Implementation-of-CURP-Server.md":$5,"/src/blog/2023-12-13-CURP-State-Machine-Engine.md":U5,"/src/blog/2024-01-04-Xline-Command-Deduplication-Mechanism-(Part-One)—Introduction-to-RIFL.md":j5}),VY=()=>{const{msg:e}=t1();ce.useEffect(()=>{window.scrollTo(0,0)},[]);const[t,n,r,...i]=(e||"").split("-"),a=i.join(" "),s=pp[`/src/blog/${e}.md`],[o,l,c,u]=s.split(`--- +`),d=Pm.parse(l);let f=0;return k.jsxs(k.Fragment,{children:[k.jsx(AY,{}),k.jsxs(NY,{children:[k.jsx(MY,{children:a}),k.jsxs(U8,{children:[pe(`${t}-${n}-${r}`).format("MMM Do")," ·"," ",d.read_time," min read"]}),k.jsxs(RY,{href:d.author.url,children:[k.jsx(IY,{src:d.author.img_url}),k.jsx(OY,{children:d.author.name})]}),k.jsx(DY,{src:d.cover}),k.jsx(LY,{children:k.jsx(Do,{children:u,rehypePlugins:[_c,$8],remarkPlugins:[Sc,S8],components:{h1:({level:p,children:m})=>k.jsx(ct,{level:p,children:m}),h2:({level:p,children:m})=>k.jsx(ct,{level:p,children:m}),h3:({level:p,children:m})=>k.jsx(ct,{level:p,children:m}),h4:({level:p,children:m})=>k.jsx(ct,{level:p,children:m}),h5:({level:p,children:m})=>k.jsx(ct,{level:p,children:m}),h6:({level:p,children:m})=>k.jsx(ct,{level:p,children:m}),p:({children:p})=>k.jsx(Ec,{children:p}),em:({children:p})=>k.jsx(ii,{children:p}),strong:({children:p})=>k.jsx(ii,{type:"bold",children:p}),hr:()=>k.jsx(Cc,{}),ul:({depth:p,ordered:m,className:h,children:w})=>k.jsx(ai,{depth:p,ordered:m,className:h,children:w}),ol:({depth:p,ordered:m,className:h,children:w})=>k.jsx(ai,{depth:p,ordered:m,className:h,children:w}),li:({children:p})=>k.jsx(Tc,{children:p}),img:({src:p,alt:m})=>k.jsx(Ac,{src:p,alt:m}),blockquote:({children:p})=>k.jsx(Nc,{children:p})}})}),k.jsxs(PY,{children:[k.jsx(zY,{children:k.jsx(FY,{children:"related resources"})}),k.jsx(BY,{children:Object.keys(pp).reverse().map((p,m)=>{f++;const h=p.split(/[/,.]/),w=h[3],[y,v,x,..._]=h[3].split("-"),A=_.join(" "),[E,R,F,q]=pp[p].split(`--- +`),K=Pm.parse(R),W=`/src/blog/${e}.md`;return p===W||f>2?(f--,null):k.jsxs($Y,{children:[k.jsx(UY,{src:K.cover,alt:"cover"}),k.jsxs(jY,{children:[k.jsx(qY,{children:A}),k.jsx(HY,{children:F}),k.jsx(WY,{onClick:()=>window.scrollTo(0,0),to:`/blog/${w}`,children:"Read more"})]})]},m)})}),k.jsx(YY,{to:"/blog",children:"View All →"})]})]})]})},GY="/xline-home/assets/image1-9be52310.png",KY="/xline-home/assets/image2-baebe8ee.png",XY="/xline-home/assets/image3-a2f91129.png",QY="/xline-home/assets/image4-feb06521.png",ZY="/xline-home/assets/dot-37a9b3fe.svg",JY=L.div` + display: flex; + align-items: center; + justify-content: center; + height: calc(86px + 416px); + padding-top: 86px; + background: #0a0c28; + @media screen and (max-width: 1024px) { + padding-top: 69px; + height: calc(312px + 69px); + } + @media screen and (max-width: 1024px) { + padding-top: 53px; + height: calc(208px + 53px); + } +`,eV=L.h1` + position: relative; + display: inline-block; + padding-inline: 32px; + color: white; + font-weight: 700; + font-size: 72px; + line-height: 1.5; + text-transform: capitalize; + transform: translateY(-10%); + @media screen and (max-width: 1024px) { + padding-inline: 24px; + font-size: 54px; + } + @media screen and (max-width: 768px) { + padding-inline: 16px; + font-size: 36px; + } +`,tV=L.img` + z-index: -1; + position: absolute; + left: 50%; + bottom: -17px; + transform: translateX(-45%); + width: 295.01px; + height: 35.35px; + @media screen and (max-width: 1024px) { + bottom: -12%; + width: 221px; + height: 27px; + } + @media screen and (max-width: 768px) { + bottom: -8%; + width: 148px; + height: 18px; + } +`,nV=L.main` + display: flex; + margin-inline: auto; + padding-block: ${e=>e.theme.scale.scale06}; + padding-inline: ${e=>e.theme.scale.scale07}; + max-width: ${e=>e.theme.scale.scale12}; + // - - - + /* height: 200px; + background-color: lightcoral; */ + @media screen and (max-width: 1024px) { + padding-block: 60px; + padding-inline: 96px; + } + @media screen and (max-width: 768px) { + padding-block: 40px; + padding-inline: 64px; + } +`,rV=L.div` + flex-shrink: 0; + width: ${e=>e.theme.scale.scale08}; + margin-right: ${e=>e.theme.scale.scale06}; + padding-block: ${e=>e.theme.scale.scale07}; + // - - - + /* height: 100px; + background-color: lightblue; */ + @media screen and (max-width: 1440px) { + display: none; + } +`,iV=L.p` + margin-bottom: ${e=>e.theme.scale.scale04}; + color: #a6a6a6; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize4}; + line-height: ${e=>e.theme.font.lineHeight4}; +`,aV=L(Ro)` + display: block; + margin-bottom: ${e=>e.theme.scale.scale03}; + padding: ${e=>e.theme.scale.scale03}; + color: #454545; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize3}; + line-height: ${e=>e.theme.font.lineHeight3}; + border: 1px solid #dfdfdf; + border-radius: ${e=>e.theme.scale.scale01}; + box-shadow: 5px 5px 15px -5px ${e=>e.theme.color.neutral.gray06}; +`;L.div` + display: flex; + flex-flow: wrap; + justify-content: space-between; + /* flex: 1; */ + /* padding-inline: ${e=>e.theme.scale.scale05}; */ + // - - - + /* min-height: 100px; + background-color: lightcyan; */ + @media screen and (max-width: 1024px) { + flex-direction: column; + } +`;L.div` + width: 48%; + margin-bottom: ${e=>e.theme.scale.scale04}; + border: 1px solid #dfdfdf; + border-radius: ${e=>e.theme.scale.scale03}; + box-shadow: 5px 5px 15px -5px ${e=>e.theme.color.neutral.gray06}; + overflow: hidden; + // - - - + /* height: 400px; */ + /* background: lightpink; */ + @media screen and (max-width: 1024px) { + width: 100%; + } +`;L.img` + width: 100%; + /* height: ${e=>e.theme.scale.scale08}; */ +`;L.div` + padding: ${e=>e.theme.scale.scale03}; + // - - - + /* height: 100px; */ + @media screen and (max-width: 1024px) { + padding: 15px; + } + @media screen and (max-width: 768px) { + padding: 10px; + } +`;L.h1` + margin-bottom: ${e=>e.theme.scale.scale03}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize4}; + /* line-height: ${e=>e.theme.font.lineHeight4}; */ + line-height: 1.5; + /* white-space: nowrap; */ + overflow: hidden; + text-overflow: ellipsis; + text-transform: capitalize; + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 15px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 10px; + } +`;L.p` + display: -webkit-box; + margin-bottom: ${e=>e.theme.scale.scale03}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize3}; + /* line-height: ${e=>e.theme.font.lineHeight3}; */ + line-height: 1.5; + word-break: break-all; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + text-overflow: ellipsis; + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 12px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 8px; + } +`;L(Ro)` + display: inline-block; + margin-bottom: ${e=>e.theme.scale.scale01}; + padding-block: ${e=>e.theme.scale.scale01}; + padding-inline: ${e=>e.theme.scale.scale04}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize2}; + /* line-height: ${e=>e.theme.font.lineHeight2}; */ + line-height: 1.5; + background: linear-gradient(90deg, #767ee5, #9966cc); + border-radius: 20px; + @media screen and (max-width: 1024px) { + margin-bottom: 6px; + padding-block: 6px; + padding-inline: 24px; + font-size: 10.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 4px; + padding-block: 4px; + padding-inline: 16px; + font-size: 7px; + } +`;const sV=L.ul``,oV=L.li` + display: flex; + align-items: center; + padding-block: 24px; + padding-inline: 12px; + border-bottom: 0.5px solid #9a9a9a; + cursor: pointer; + /* :last-child { + border-bottom: none; + } */ + @media screen and (max-width: 1024px) { + flex-direction: column; + padding-block: 18px; + padding-inline: 9px; + } + @media screen and (max-width: 768px) { + padding-block: 12px; + padding-inline: 6px; + } +`,lV=L.div` + flex-grow: 1; + margin-right: 48px; + @media screen and (max-width: 1024px) { + margin-right: 0; + } +`,cV=L.img` + width: 40%; + @media screen and (max-width: 1024px) { + width: 100%; + } +`,uV=L.div` + margin-bottom: 6px; + font-size: 15px; + line-height: 2; + font-weight: 600px; + color: #7680dd; + @media screen and (max-width: 1024px) { + margin-bottom: 4.5px; + font-size: 12px; + } + @media screen and (max-width: 768px) { + margin-bottom: 3px; + } +`,dV=L.div` + margin-bottom: 27px; + font-size: 27px; + line-height: 1.22; + font-weight: 600; + color: #1e1e1e; + @media screen and (max-width: 1024px) { + margin-bottom: 20.25px; + font-size: 20.25; + } + @media screen and (max-width: 768px) { + margin-bottom: 13.5px; + font-size: 16px; + } +`,hV=L.div` + margin-bottom: 6px; + font-size: 13.5px; + line-height: 1.77; + font-weight: 400; + color: #7d7d7d; + @media screen and (max-width: 1024px) { + margin-bottom: 4.5px; + font-size: 12px; + } + @media screen and (max-width: 768px) { + margin-bottom: 3px; + } +`,fV=L.div` + display: flex; + align-items: center; + font-size: 12px; + line-height: 1%.5; + font-weight: 600; + @media screen and (max-width: 1024px) { + font-size: 9px; + } + @media screen and (max-width: 768px) { + font-size: 6px; + } +`,pV=L.img` + width: 22px; + height: 22px; + padding-inline: 8px; + @media screen and (max-width: 1024px) { + width: 16.5px; + height: 16.5px; + padding-inline: 6px; + } + @media screen and (max-width: 768px) { + width: 11px; + height: 11px; + padding-inline: 4px; + } +`,mV=L.div` + color: #797979; +`,gV=L.div` + color: #7680dd; +`,a2=[{date:"2023-01-19",title:"Geo distributed Metadata Management System",description:"The webinar aims to briefly introduce DatenLord’s open source project Xline, a distributed metadata management system for multi-clusters. It reveals the motivation of Xline, the architecture of it and the important consensus protocol, CURP. The performance comparison shows the advantage of Xline over the current solution.",author:"By Jicheng Shi",read:"19min",img:GY,url:"https://www.cncf.io/online-programs/cncf-on-demand-webinar-geo-distributed-metadata-management-system/"},{date:"2023-05-04",title:"Proofing the Correctness of the CURP Consensus Protocol Using TLA+",description:"The CURP Replication Protocol (NSDI ’19) aims to eliminate the additional round trips between servers in replicated state machines. We extended CURP into a consensus protocol and used it in our open source project Xline. This webinar is about how we modeled the CURP consensus protocol in TLA+ and verified the correctness of it.",author:"By Ye Tian",read:"20min",img:KY,url:"https://www.cncf.io/online-programs/cncf-on-demand-webinar-proofing-the-correctness-of-the-curp-consensus-protocol-using-tla/"},{date:"2023-09-08",title:"How to Write a Distributed Key-value store in Rust",description:"In this presentation, we will explore how to use Rust to build a distributed key-value store, taking the open-source distributed KV storage Xline as an example. ",author:"By Jiawei Zhao",read:"35min",img:XY,url:"https://community.cncf.io/events/details/cncf-cncf-online-programs-presents-cncf-on-demand-webinar-how-to-write-a-distributed-key-value-store-in-rust/"},{date:"2023-12-14",title:"Application and Analysis of Jepsen Tests in Xline",description:"This presentation offers an overview of applying Jepsen tests to Xline, a distributed KV Store. It begins with a brief introduction to Jepsen, followed by an exploration of the application of Jepsen tests to Xline. The presentation then delves into the test results and system analysis. Finally, it discusses the lessons learned and outlines future work in chaos engineering for Xline. ",author:"By Zhenghao Yin",read:"13min",img:QY,url:"https://www.cncf.io/online-programs/cncf-on-demand-webinar-application-and-analysis-of-jepsen-tests-in-xline/"}],yV=e=>{const{date:t,title:n,description:r,author:i,read:a,img:s,url:o}=e.data;return k.jsxs(oV,{onClick:()=>window.location.href=`${o}`,children:[k.jsxs(lV,{children:[k.jsx(uV,{children:pe(t,"YYYY-MM-DD").format("dddd MMMM D, YYYY")}),k.jsx(dV,{children:n}),k.jsx(hV,{children:r}),k.jsxs(fV,{children:[k.jsx(mV,{children:i}),k.jsx(pV,{src:ZY}),k.jsx(gV,{children:a})]})]}),k.jsx(cV,{src:s})]})},bV=()=>k.jsxs(k.Fragment,{children:[k.jsx(JY,{children:k.jsxs(eV,{children:["video",k.jsx(tV,{src:Ra,alt:"underline"})]})}),k.jsxs(nV,{children:[k.jsxs(rV,{children:[k.jsx(iV,{children:"Video"}),a2.map(({title:e,url:t})=>k.jsx(aV,{to:t,children:e},e))]}),k.jsx(sV,{children:a2.map(e=>k.jsx(yV,{data:e},e.title))})]})]}),vV=`## Introduction + +This page lists the project ideas for Google Summer of Code 2024. +The ideas comes from serveral projects: + +- DatenLord + An application-orientated, cloud-native distributed storage system. Repo +- Xline + A geo-distributed KV store for metadata management. Repo +- Xline Client + Xline client SDK, we currently provides clients written in rust/go/python/java. Repo + We use Rust as our main language for all our projects. The Xline client project may require the use of additional languages. + +## About GSoC + +Google Summer of Code is a global, online program focused on bringing new contributors into open source software development. GSoC Contributors work with an open source organization on a 12+ week programming project under the guidance of mentors. If you are new to GSoC, please refer to the GSoC website to learn how it works. Please note that the deadline for this year’s GSoC application is April 2nd at 18:00 UTC. + +## Information for contributors + +- You can choose an idea from this page, but if you have something else in mind, you may modify the ideas or submit your own proposals. +- Get in touch on Github or Discord, feel free to ask questions and tell us what you are passionate about. +- All projects require a good knowledge of Rust and distributed systems. +- Please read the Contribute Guide(Xline, datenlord) of each project before you start working on the coding. +- If you are unable to participate in our GSoC program for any reason, you are still welcome to choose an idea from this page if there are no existing contributors. +- Contributors are selected based on their past experience and skills. Please contact us in advance to confirm your eligibility for the tasks. +- We will continue to update tasks and descriptions. Please check this page from time to time if you want to participate in our projects. + +## Ideas + +### Integrating Xline to datenLord + +- Difficulty: Easy +- Skills required: Rust, Etcd +- Expected Project size: 90 hours +- Description: The primary objective of DatenLord is to enable high availability across multi-cloud, hybrid-cloud, and multiple data centers, which often results in high latency situations. Currently, we utilize Etcd as the metadata storage in the DatenLord project. However, we are planning to transition to Xline, which offers improved throughput in such scenarios. +- Expected Outcome: + - Replace Etcd with Xline in datenlord project + - Benchmark the performance before and after changes +- Possible mentors: Yang Fengming, Su Jinyang + +### Improve Transaction Validation + +- Difficulty: Medium +- Skills required: Rust, Etcd, knowledge to common data structures +- Expected Project size: 90 hours +- Description: We want to ensure that in Xline, individual transactions do not have overlapping puts and deletes operations. The current validation implementation has a high time complexity and can potentially impact performance for transactions with multiple operations. Additionally, we are uncertain about the correctness of this implementation and there may be potential bugs present. +- Expected Outcome: + - Implement the Interval Tree for range overlapping checks. + - Refactor txn validation and provides correctness proof. + - Write unit tests. +- Possible mentors: Yin Zhenghao, Zhao Jiawei + +### Xline C Client + +- Difficulty: Medium +- Skills required: Rust, C +- Expected Project size: 175 hours +- Description: We currently have several Xline client implementations in different languages. We want to provide a C SDK to make Xline even more accessible. The client needs to implement all the current Xline APIs. +- Expected Outcome: + - Implement Curp protocol client in C. + - Implement Xline client in C. + - Write unit tests for Xline C client. + - Performance benchmark for the client. + - Write docs for Xline C client. +- Possible mentors: Shi Jicheng, Guan Yu + +### Joint consensus correctness testing + +- Difficulty: Hard +- Skills required: Rust, Knowledge to consensus algorithms and chaos engineering +- Expected Project size: 350 hours +- Description: We have implemented joint consensus in Xline, which allows for arbitrary configuration changes. The joint consensus is more complex than single-server membership change and we want to add integration and chaos tests to verify the correctness of our implementation. +- Expected Outcome: + - Write Integration tests. + - Write Chaos testing. + - Find and fix possible bugs. +- Possible mentors: Guan Yu, Zhao Jiawei + +### Implementing Chaos testing in Madsim + +- Difficulty: Hard +- Skills required: Rust, Jepsen, Knowledge of chaos engineering and deterministic simulation +- Expected Project size: 350 hours + - Description: Jepsen is a widely-used framework for verifying distributed systems. Although Jepsen is effective at finding issues within a system, it lacks determinism in its testing methodology, making the debugging process more difficult. On the other hand, [Madsim](https:// github.com/madsim-rs/madsim) is a deterministic simulator designed for distributed systems, offering fault injection capabilities. Our goal is to combine the strengths of Madsim and Jepsen, creating a lightweight framework for chaos testing within a single-machine environment. With its deterministic nature, this framework allows for reproducible tests and facilitates the debugging process. +- Expected Outcome: + - Write operations/faults generators under the Madsim framework. + - Write a linearizability checker in Rust, similar to Knossos. + - Write a transactional safety checker in Rust, similar to Elle. + - Setup chaos testing using these components. +- Possible mentors: Yin Zhenghao, Shi Jicheng + +## Communication + +Discord will serve as the primary communication platform during this year’s GSoC program. This includes the following: + +- Communicating with your mentor +- Participating in meetings + It’s also worth mentioning that our Discord server is not created solely for the GSoC program; it is also used as our regular project channel. This ensures all contributors are aware of the progress of the project and offer suggestions and advice. While you will be assigned a mentor, but the entire community is available to help you with any problems you may face. + Please make sure to read the server’s rules before participating. Be specific when asking questions so that everyone can understand. We will respond as soon as we are available and able to assist you with your questions. + Use English for communication is a mandatory requirement as we rely on it for effective collaboration. + Invite link to our server: https://discord.com/invite/hqDRtYkWzm + +## Expectations + +### Weekly working hours + +For the GSoC project labeled "hard", you are expected to work at least 40 hours a week. For medium and easy tasks, you may choose your own working hours, but please communicate with your mentor in advance and make sure to keep on schedule. + +### Self-motivation + +Our program requires self-motivation, as it involves individual research, problem solving, and coding efforts. While mentor support is available, the majority of the project’s success hinges on your own self-motivation and dedication. + +### Frequent communication with mentor + +Regular communication with your mentor is essential. They need to be constantly updated about your progress, your plans, obstacles faced, and how you overcame them or if you’re stuck. +Before starting the project, establish a communication schedule for interactions with your mentor. + +### Design documents + +We expect you to maintain a design document for the project. It should includes your project plan, issues and technical specifications. Your design document will be reviewed by your mentor before starting the actual coding. + +## Resources + +### Learning materials + +Mentors will provide project-specific tutorials, documentation and research articles to makes sure that you understand the project’s framework. + +### Development environment + +Development in our project can be resource-intensive. If you struggle with coding and benchmarking on your local machine, you can get an account and perform your work on our shared Linux server. + +## Contributor Guidance + +### Application Process + +1. Read the links and instructions given on this site and choose one or more ideas. +2. Join our Discord server: https://discord.com/invite/hqDRtYkWzm . We provide a dedicated channel for the GSoC program. +3. Talk with your prospective mentor for the chosen project in the Discord server. +4. Submit the application/proposal including all requirements at the Google Summer of Code Site before deadline. + +## What goes in an application? + +Please provide the following information in your application: + +1. Your brief CV including contact information. +2. Answers to the following questions: + +- What do you find most attractive about our program and the reason you choose us? +- How does your current skills match with the requirements of our program? +- What do you expect to gain from this program and how can we get the best out of you? +- Have you ever participated in GSoC (or a similar program) before? + +3. Information about your proposed project, which includes a detailed and weekly schedule with breakdowns and clear milestones +`,wV=L.div` + height: 600px; + background: #0a0c28; + @media screen and (max-width: 1024px) { + height: 414px; + } + @media screen and (max-width: 768px) { + height: 276px; + } +`,xV=L.main` + max-width: 1024px; + margin-left: 30vw; + padding-inline: 5vw; + margin-top: -${e=>e.theme.scale.scale09}; + margin-bottom: ${e=>e.theme.scale.scale07}; + /* margin-left: auto; */ + /* padding-inline: 64px; */ + // - - - + /* height: 400px; */ + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 15px; + } + @media screen and (max-width: 1024px) { + margin-top: -252px; + } + @media screen and (max-width: 768px) { + margin-top: -168px; + /* padding-inline: 32px; */ + } +`,kV=L.div` + margin-bottom: ${e=>e.theme.scale.scale08}; + @media screen and (max-width: 1024px) { + margin-bottom: 156px; + } + @media screen and (max-width: 768px) { + margin-bottom: 104px; + } +`;L.div` + margin-bottom: ${e=>e.theme.scale.scale07}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize10}; + /* line-height: ${e=>e.theme.font.lineHeight9}; */ + line-height: 1.4; + text-transform: capitalize; + /* word-break: break-all; */ + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 34.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 23px; + } +`;const SV=L.h1` + margin-bottom: ${e=>e.theme.scale.scale03}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightBold}; + font-size: ${e=>e.theme.font.fontSize8}; + /* line-height: ${e=>e.theme.font.lineHeight9}; */ + line-height: 1.4; + text-transform: capitalize; + /* word-break: break-all; */ + @media screen and (max-width: 1024px) { + margin-bottom: 15px; + font-size: 34.5px; + } + @media screen and (max-width: 768px) { + margin-bottom: 10px; + font-size: 23px; + } +`,j8=L.p` + margin-bottom: ${e=>e.theme.scale.scale04}; + color: ${e=>e.theme.color.neutral.gray01}; + font-weight: ${e=>e.theme.font.fontWeightRegular}; + font-size: ${e=>e.theme.font.fontSize5}; + /* line-height: ${e=>e.theme.font.lineHeight5}; */ + line-height: 1.3; + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + font-size: 18px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + font-size: 12px; + } +`,_V=L.a` + display: flex; + align-items: center; + margin-bottom: ${e=>e.theme.scale.scale08}; + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + } +`,EV=L.img` + margin-right: 24px; + height: ${e=>e.theme.scale.scale06}; + width: ${e=>e.theme.scale.scale06}; + border: 2px solid ${e=>e.theme.color.neutral.gray01}; + border-radius: 50%; + @media screen and (max-width: 1024px) { + margin-right: 18px; + height: 60px; + width: 60px; + } + @media screen and (max-width: 768px) { + margin-right: 12px; + height: 60px; + width: 60px; + } +`;L.img` + width: 100%; + margin-bottom: ${e=>e.theme.scale.scale04}; + border-radius: ${e=>e.theme.scale.scale02}; + /* height: 336px; */ + @media screen and (max-width: 1024px) { + margin-bottom: 24px; + border-radius: 9px; + } + @media screen and (max-width: 768px) { + margin-bottom: 16px; + border-radius: 6px; + } +`;const CV=L(j8)` + margin-bottom: 0; +`;L.div` + display: flex; + padding-inline: 4vw; +`;const TV=L.div` + position: sticky; + top: 0; + float: left; + width: 30vw; + padding-block: 5vh; + padding-inline: 5vw; + height: 100vh; + overflow-y: scroll; +`,AV=Object.assign({"/src/pages/GSoC/index.md":vV}),NV=AV["/src/pages/GSoC/index.md"],MV=()=>{const[e,t]=ce.useState();ce.useEffect(()=>{window.scrollTo(0,0)},[]),ce.useEffect(()=>{const r=document.getElementById("article"),i=r==null?void 0:r.querySelectorAll("h2, h3");i!=null&&t(Array.from(i))},[]);const n=r=>{var i;console.log(document.querySelector(`#${r}`)),(i=document.querySelector(`#${r}`))==null||i.scrollIntoView({})};return k.jsxs(k.Fragment,{children:[k.jsx(wV,{}),k.jsx(TV,{children:e&&e.map(r=>r.tagName=="H2"?k.jsx("div",{style:{fontSize:"18px",fontWeight:"600",paddingBlock:"4px",cursor:"pointer"},onClick:()=>n(r.id),children:r.textContent}):k.jsx("div",{style:{paddingLeft:"16px",fontSize:"16px",paddingBlock:"4px",cursor:"pointer"},onClick:()=>n(r.id),children:r.textContent}))}),k.jsxs(xV,{children:[k.jsx(SV,{children:"GSoC 2024 Ideas Page"}),k.jsxs(j8,{children:[pe("2024-02-04").format("MMM Do")," · 10 min read"]}),k.jsxs(_V,{href:"https://github.com/bsbds",children:[k.jsx(EV,{src:"https://avatars.githubusercontent.com/u/69835502?v=4"}),k.jsx(CV,{children:"bsbdf"})]}),k.jsx(kV,{id:"article",children:k.jsx(Do,{children:NV,rehypePlugins:[_c,$8],remarkPlugins:[Sc,S8],components:{h1:({level:r,children:i})=>k.jsx(ct,{level:r,children:i}),h2:({level:r,children:i})=>k.jsx(ct,{level:r,children:i}),h3:({level:r,children:i})=>k.jsx(ct,{level:r,children:i}),h4:({level:r,children:i})=>k.jsx(ct,{level:r,children:i}),h5:({level:r,children:i})=>k.jsx(ct,{level:r,children:i}),h6:({level:r,children:i})=>k.jsx(ct,{level:r,children:i}),p:({children:r})=>k.jsx(Ec,{children:r}),em:({children:r})=>k.jsx(ii,{children:r}),strong:({children:r})=>k.jsx(ii,{type:"bold",children:r}),hr:()=>k.jsx(Cc,{}),ul:({depth:r,ordered:i,className:a,children:s})=>k.jsx(ai,{depth:r,ordered:i,className:a,children:s}),ol:({depth:r,ordered:i,className:a,children:s})=>k.jsx(ai,{depth:r,ordered:i,className:a,children:s}),li:({children:r})=>k.jsx(Tc,{children:r}),img:({src:r,alt:i})=>k.jsx(Ac,{src:r,alt:i}),blockquote:({children:r})=>k.jsx(Nc,{children:r})}})})]})]})},RV=HE([{path:"/",element:k.jsx(jT,{}),children:[{path:"/",element:k.jsx(xA,{})},{path:"/contribute",element:k.jsx(YA,{})},{path:"/GsoC",element:k.jsx(MV,{})},{path:"/blog",element:k.jsx(xB,{})},{path:"/blog/:msg",element:k.jsx(VY,{})},{path:"/docs/:params",element:k.jsx(Pz,{})},{path:"/deep-dive/:params",element:k.jsx(Kz,{})},{path:"/video",element:k.jsx(bV,{})}]},{path:"test",element:k.jsx(fz,{})}]),IV={color:{neutral:{gray01:"#ffffff",gray02:"#fafafa",gray03:"#f5f5f5",gray04:"#f0f0f0",gray05:"#d9d9d9",gray06:"#bfbfbf",gray07:"#8c8c8c",gray08:"#595959",gray09:"#434343",gray10:"#262626",gray11:"#1f1f1f",gray12:"#141414",gray13:"#000000"},white:"white"},scale:{scale01:"8px",scale02:"12px",scale03:"20px",scale04:"32px",scale05:"48px",scale06:"80px",scale07:"128px",scale08:"208px",scale09:"336px",scale10:"552px",scale11:"896px",scale12:"1440px",sm:"16px",md:"32px",lg:"64px",xl:"96px",xxl:"128px"},font:{fontFamily:"Arial",fontSize1:"12px",fontSize2:"14px",fontSize3:"16px",fontSize4:"20px",fontSize5:"24px",fontSize6:"30px",fontSize7:"38px",fontSize8:"46px",fontSize9:"56px",fontSize10:"68px",lineHeight1:"20px",lineHeight2:"22px",lineHeight3:"24px",lineHeight4:"28px",lineHeight5:"32px",lineHeight6:"38px",lineHeight7:"46px",lineHeight8:"54px",lineHeight9:"64px",lineHeight10:"76px",fontWeightRegular:"500",fontWeightBold:"600"}},OV=XC` + * { + box-sizing: border-box; + } + + body { + margin: 0; + font-family: Inter; + line-height: 1.5; + } + + a { + text-decoration: none; + } + + h1, h2, h3, h4, h5, h6 { + margin-block: 0; + } + + p { + margin-block: 0; + line-height: 1.2; + } + + ul, ol { + list-style-type: none; + margin-block: 0; + padding-inline-start: 0; + } + + ol + ul { + margin-left: 20px; + } + + pre { + background: ${e=>e.theme.color.neutral.gray04}; + padding: 12px; + border-radius: 4px; + overflow-x: scroll; + } + + code { + font-size: 16px; + padding: 4px; + border-radius: 4px; + background: ${e=>e.theme.color.neutral.gray04}; + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + } + + pre code { + padding: 0; + } + + .hljs { + font-size: 16px; + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + color: #333; + overflow: hidden; + } + /* .hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #f8f8f8; +} */ + .hljs-comment, + .hljs-quote { + color: #998; + font-style: italic; + } + .hljs-keyword, + .hljs-selector-tag, + .hljs-subst { + color: #333; + font-weight: 700; + } + .hljs-literal, + .hljs-number, + .hljs-tag .hljs-attr, + .hljs-template-variable, + .hljs-variable { + color: teal; + } + .hljs-doctag, + .hljs-string { + color: #d14; + } + .hljs-section, + .hljs-selector-id, + .hljs-title { + color: #900; + font-weight: 700; + } + .hljs-subst { + font-weight: 400; + } + .hljs-class .hljs-title, + .hljs-type { + color: #458; + font-weight: 700; + } + .hljs-attribute, + .hljs-name, + .hljs-tag { + color: navy; + font-weight: 400; + } + .hljs-link, + .hljs-regexp { + color: #009926; + } + .hljs-bullet, + .hljs-symbol { + color: #990073; + } + .hljs-built_in, + .hljs-builtin-name { + color: #0086b3; + } + .hljs-meta { + color: #999; + font-weight: 700; + } + .hljs-deletion { + background: #fdd; + } + .hljs-addition { + background: #dfd; + } + .hljs-emphasis { + font-style: italic; + } + .hljs-strong { + font-weight: 700; + } +`;gp.createRoot(document.getElementById("root")).render(k.jsx(Fn.StrictMode,{children:k.jsxs(GC,{theme:IV,children:[k.jsx(DE,{router:RV}),k.jsx(OV,{})]})}))});export default DV(); diff --git a/assets/logo-9c6940ee.svg b/assets/logo-9c6940ee.svg new file mode 100644 index 0000000..18ff884 --- /dev/null +++ b/assets/logo-9c6940ee.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/assets/protocol-icon-f31ce54b.svg b/assets/protocol-icon-f31ce54b.svg new file mode 100644 index 0000000..46cacbe --- /dev/null +++ b/assets/protocol-icon-f31ce54b.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/sever-icon-1e1bff49.svg b/assets/sever-icon-1e1bff49.svg new file mode 100644 index 0000000..1bc6af1 --- /dev/null +++ b/assets/sever-icon-1e1bff49.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/underline-992439df.svg b/assets/underline-992439df.svg new file mode 100644 index 0000000..039bc25 --- /dev/null +++ b/assets/underline-992439df.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/blog/CURP-State-Machine-Engine/cover.png b/blog/CURP-State-Machine-Engine/cover.png new file mode 100644 index 0000000..aafc7d6 Binary files /dev/null and b/blog/CURP-State-Machine-Engine/cover.png differ diff --git a/blog/CURP-State-Machine-Engine/image1.PNG b/blog/CURP-State-Machine-Engine/image1.PNG new file mode 100644 index 0000000..3e4e763 Binary files /dev/null and b/blog/CURP-State-Machine-Engine/image1.PNG differ diff --git a/blog/CURP-State-Machine-Engine/image2.PNG b/blog/CURP-State-Machine-Engine/image2.PNG new file mode 100644 index 0000000..447245e Binary files /dev/null and b/blog/CURP-State-Machine-Engine/image2.PNG differ diff --git a/blog/CURP-State-Machine-Engine/image3.PNG b/blog/CURP-State-Machine-Engine/image3.PNG new file mode 100644 index 0000000..90293ac Binary files /dev/null and b/blog/CURP-State-Machine-Engine/image3.PNG differ diff --git a/blog/CURP-State-Machine-Engine/image4.PNG b/blog/CURP-State-Machine-Engine/image4.PNG new file mode 100644 index 0000000..0cb92b3 Binary files /dev/null and b/blog/CURP-State-Machine-Engine/image4.PNG differ diff --git a/blog/CURP-State-Machine-Engine/image5.png b/blog/CURP-State-Machine-Engine/image5.png new file mode 100644 index 0000000..c30625b Binary files /dev/null and b/blog/CURP-State-Machine-Engine/image5.png differ diff --git a/blog/Database-Isolation-Levels-and-MVCC/cover.png b/blog/Database-Isolation-Levels-and-MVCC/cover.png new file mode 100644 index 0000000..ef9bd6d Binary files /dev/null and b/blog/Database-Isolation-Levels-and-MVCC/cover.png differ diff --git a/blog/Database-Isolation-Levels-and-MVCC/image1.png b/blog/Database-Isolation-Levels-and-MVCC/image1.png new file mode 100644 index 0000000..6de0ffd Binary files /dev/null and b/blog/Database-Isolation-Levels-and-MVCC/image1.png differ diff --git a/blog/Database-Isolation-Levels-and-MVCC/image2.png b/blog/Database-Isolation-Levels-and-MVCC/image2.png new file mode 100644 index 0000000..aacba33 Binary files /dev/null and b/blog/Database-Isolation-Levels-and-MVCC/image2.png differ diff --git a/blog/Database-Isolation-Levels-and-MVCC/image3.png b/blog/Database-Isolation-Levels-and-MVCC/image3.png new file mode 100644 index 0000000..0eb0d9e Binary files /dev/null and b/blog/Database-Isolation-Levels-and-MVCC/image3.png differ diff --git a/blog/Database-Isolation-Levels-and-MVCC/image4.png b/blog/Database-Isolation-Levels-and-MVCC/image4.png new file mode 100644 index 0000000..6e2aaa2 Binary files /dev/null and b/blog/Database-Isolation-Levels-and-MVCC/image4.png differ diff --git a/blog/Database-Isolation-Levels-and-MVCC/image5.png b/blog/Database-Isolation-Levels-and-MVCC/image5.png new file mode 100644 index 0000000..081b4cd Binary files /dev/null and b/blog/Database-Isolation-Levels-and-MVCC/image5.png differ diff --git a/blog/How-to-elegantly-organize-async-Rust-code/cover.png b/blog/How-to-elegantly-organize-async-Rust-code/cover.png new file mode 100644 index 0000000..6def882 Binary files /dev/null and b/blog/How-to-elegantly-organize-async-Rust-code/cover.png differ diff --git a/blog/How-to-elegantly-organize-async-Rust-code/image1.png b/blog/How-to-elegantly-organize-async-Rust-code/image1.png new file mode 100644 index 0000000..edbe629 Binary files /dev/null and b/blog/How-to-elegantly-organize-async-Rust-code/image1.png differ diff --git a/blog/Implementation-of-CURP-Server/cover.jpg b/blog/Implementation-of-CURP-Server/cover.jpg new file mode 100644 index 0000000..beb8ee6 Binary files /dev/null and b/blog/Implementation-of-CURP-Server/cover.jpg differ diff --git a/blog/Implementation-of-CURP-Server/image1.png b/blog/Implementation-of-CURP-Server/image1.png new file mode 100644 index 0000000..467596e Binary files /dev/null and b/blog/Implementation-of-CURP-Server/image1.png differ diff --git a/blog/Implementation-of-CURP-Server/image2.png b/blog/Implementation-of-CURP-Server/image2.png new file mode 100644 index 0000000..e09b412 Binary files /dev/null and b/blog/Implementation-of-CURP-Server/image2.png differ diff --git a/blog/Implementation-of-CURP-Server/image3.png b/blog/Implementation-of-CURP-Server/image3.png new file mode 100644 index 0000000..0c06f32 Binary files /dev/null and b/blog/Implementation-of-CURP-Server/image3.png differ diff --git a/blog/Implementation-of-CURP-Server/image4.png b/blog/Implementation-of-CURP-Server/image4.png new file mode 100644 index 0000000..bc5c48f Binary files /dev/null and b/blog/Implementation-of-CURP-Server/image4.png differ diff --git a/blog/Introduction-to-CURP-Protocol/cover.png b/blog/Introduction-to-CURP-Protocol/cover.png new file mode 100644 index 0000000..affd766 Binary files /dev/null and b/blog/Introduction-to-CURP-Protocol/cover.png differ diff --git a/blog/Introduction-to-CURP-Protocol/graph1.jpg b/blog/Introduction-to-CURP-Protocol/graph1.jpg new file mode 100644 index 0000000..8101a77 Binary files /dev/null and b/blog/Introduction-to-CURP-Protocol/graph1.jpg differ diff --git a/blog/Introduction-to-CURP-Protocol/graph2.jpg b/blog/Introduction-to-CURP-Protocol/graph2.jpg new file mode 100644 index 0000000..ef7e2e9 Binary files /dev/null and b/blog/Introduction-to-CURP-Protocol/graph2.jpg differ diff --git a/blog/Introduction-to-CURP-Protocol/graph3.jpg b/blog/Introduction-to-CURP-Protocol/graph3.jpg new file mode 100644 index 0000000..bd2f355 Binary files /dev/null and b/blog/Introduction-to-CURP-Protocol/graph3.jpg differ diff --git a/blog/Introduction-to-CURP-Protocol/graph4.jpg b/blog/Introduction-to-CURP-Protocol/graph4.jpg new file mode 100644 index 0000000..d7416cc Binary files /dev/null and b/blog/Introduction-to-CURP-Protocol/graph4.jpg differ diff --git a/blog/Mechanism-and-Implementation-of-Lease/cover.png b/blog/Mechanism-and-Implementation-of-Lease/cover.png new file mode 100644 index 0000000..7c2abd8 Binary files /dev/null and b/blog/Mechanism-and-Implementation-of-Lease/cover.png differ diff --git a/blog/Mechanism-and-Implementation-of-Lease/image1.PNG b/blog/Mechanism-and-Implementation-of-Lease/image1.PNG new file mode 100644 index 0000000..bdb67ed Binary files /dev/null and b/blog/Mechanism-and-Implementation-of-Lease/image1.PNG differ diff --git a/blog/Mechanism-and-Implementation-of-Lease/image2.png b/blog/Mechanism-and-Implementation-of-Lease/image2.png new file mode 100644 index 0000000..3312d73 Binary files /dev/null and b/blog/Mechanism-and-Implementation-of-Lease/image2.png differ diff --git a/blog/Mechanism-and-Implementation-of-Lease/image3.png b/blog/Mechanism-and-Implementation-of-Lease/image3.png new file mode 100644 index 0000000..125bd60 Binary files /dev/null and b/blog/Mechanism-and-Implementation-of-Lease/image3.png differ diff --git a/blog/Revisit-the-Consensus-Protocol/cover.png b/blog/Revisit-the-Consensus-Protocol/cover.png new file mode 100644 index 0000000..69892cf Binary files /dev/null and b/blog/Revisit-the-Consensus-Protocol/cover.png differ diff --git a/blog/Revisit-the-Consensus-Protocol/image1.jpg b/blog/Revisit-the-Consensus-Protocol/image1.jpg new file mode 100644 index 0000000..f4f1afb Binary files /dev/null and b/blog/Revisit-the-Consensus-Protocol/image1.jpg differ diff --git a/blog/Revisit-the-Consensus-Protocol/image2.webp b/blog/Revisit-the-Consensus-Protocol/image2.webp new file mode 100644 index 0000000..4d244e3 Binary files /dev/null and b/blog/Revisit-the-Consensus-Protocol/image2.webp differ diff --git a/blog/Revisit-the-Consensus-Protocol/image3.webp b/blog/Revisit-the-Consensus-Protocol/image3.webp new file mode 100644 index 0000000..11d9128 Binary files /dev/null and b/blog/Revisit-the-Consensus-Protocol/image3.webp differ diff --git a/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/cover.png b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/cover.png new file mode 100644 index 0000000..925adbd Binary files /dev/null and b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/cover.png differ diff --git a/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image1.PNG b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image1.PNG new file mode 100644 index 0000000..76f0120 Binary files /dev/null and b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image1.PNG differ diff --git a/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image2.png b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image2.png new file mode 100644 index 0000000..db420f8 Binary files /dev/null and b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image2.png differ diff --git a/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image3.png b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image3.png new file mode 100644 index 0000000..aa4dfa6 Binary files /dev/null and b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image3.png differ diff --git a/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image4.png b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image4.png new file mode 100644 index 0000000..13f893c Binary files /dev/null and b/blog/The-design-and-implementation-of-the-Xline-persistent-storage-layer/image4.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/cover.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/cover.png new file mode 100644 index 0000000..4f8bb78 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/cover.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image1.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image1.png new file mode 100644 index 0000000..544ab70 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image1.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image10.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image10.png new file mode 100644 index 0000000..7d1a095 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image10.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image11.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image11.png new file mode 100644 index 0000000..eed8123 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image11.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image2.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image2.png new file mode 100644 index 0000000..b71e109 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image2.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image3.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image3.png new file mode 100644 index 0000000..97a2399 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image3.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image4.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image4.png new file mode 100644 index 0000000..d0d37f9 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image4.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image5.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image5.png new file mode 100644 index 0000000..47db263 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image5.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image6.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image6.png new file mode 100644 index 0000000..d05e4a8 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image6.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image7.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image7.png new file mode 100644 index 0000000..c78511e Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image7.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image8.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image8.png new file mode 100644 index 0000000..b6baba4 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image8.png differ diff --git a/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image9.png b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image9.png new file mode 100644 index 0000000..1d41505 Binary files /dev/null and b/blog/Thinking-About-Programs-from-Mathematical-Perspective-to-Verify-Their-Correctness/image9.png differ diff --git "a/blog/Xline-Command-Deduplication-Mechanism-(Part-One)\342\200\224Introduction-to-RIFL/cover.png" "b/blog/Xline-Command-Deduplication-Mechanism-(Part-One)\342\200\224Introduction-to-RIFL/cover.png" new file mode 100644 index 0000000..0744db8 Binary files /dev/null and "b/blog/Xline-Command-Deduplication-Mechanism-(Part-One)\342\200\224Introduction-to-RIFL/cover.png" differ diff --git "a/blog/Xline-Command-Deduplication-Mechanism-(Part-One)\342\200\224Introduction-to-RIFL/image1.png" "b/blog/Xline-Command-Deduplication-Mechanism-(Part-One)\342\200\224Introduction-to-RIFL/image1.png" new file mode 100644 index 0000000..71cc25a Binary files /dev/null and "b/blog/Xline-Command-Deduplication-Mechanism-(Part-One)\342\200\224Introduction-to-RIFL/image1.png" differ diff --git a/docs/Deploy/image1.png b/docs/Deploy/image1.png new file mode 100644 index 0000000..dab7063 Binary files /dev/null and b/docs/Deploy/image1.png differ diff --git a/docs/Deploy/image2.png b/docs/Deploy/image2.png new file mode 100644 index 0000000..5d97891 Binary files /dev/null and b/docs/Deploy/image2.png differ diff --git a/docs/Deploy/image3.png b/docs/Deploy/image3.png new file mode 100644 index 0000000..cb48b46 Binary files /dev/null and b/docs/Deploy/image3.png differ diff --git a/docs/Deploy/xline-key-perf.png b/docs/Deploy/xline-key-perf.png new file mode 100644 index 0000000..ad555cd Binary files /dev/null and b/docs/Deploy/xline-key-perf.png differ diff --git a/docs/Get-Started/image1.png b/docs/Get-Started/image1.png new file mode 100644 index 0000000..0226073 Binary files /dev/null and b/docs/Get-Started/image1.png differ diff --git a/docs/Xline-Architecture-Details/image1.jpg b/docs/Xline-Architecture-Details/image1.jpg new file mode 100644 index 0000000..115c975 Binary files /dev/null and b/docs/Xline-Architecture-Details/image1.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..2cd8e4b --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + Xline + + + +
+ + + diff --git a/xline.svg b/xline.svg new file mode 100644 index 0000000..18ff884 --- /dev/null +++ b/xline.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + +