diff --git a/dist/copilot_web/App-BjmOSNfO.js b/dist/copilot_web/App-BjmOSNfO.js new file mode 100644 index 0000000..c11b202 --- /dev/null +++ b/dist/copilot_web/App-BjmOSNfO.js @@ -0,0 +1,6 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/workflowChat-nlzNpdzN.js","copilot_web/input.js","copilot_web/assets/input-BiPrIQoG.css"].map(path => { + const apiBase = window.comfyAPI?.api?.api?.api_base; + const prefix = apiBase ? `${apiBase.substring(1)}/` : ''; + return `${prefix}${path}`; + }))))=>i.map(i=>d[i]); +import{r as t,j as s,R as w,_}from"./input.js";const D=9999999,f={EXPLAIN_NODE:"copilot:explain-node"},b=w.lazy(()=>_(()=>import("./workflowChat-nlzNpdzN.js"),__vite__mapDeps([0,1,2])));function N(){const g=t.useRef(null),[E,r]=t.useState(!1),[i,l]=t.useState(),[o,u]=t.useState(!1),[a,m]=t.useState({x:0,y:0}),[h,c]=t.useState(!1);t.useEffect(()=>{const e=()=>{console.log("Explain node event received"),r(!0),c(!0)};return window.addEventListener(f.EXPLAIN_NODE,e),()=>window.removeEventListener(f.EXPLAIN_NODE,e)},[]),t.useEffect(()=>{l({x:window.innerWidth-160,y:20})},[]);const x=e=>{e.preventDefault(),u(!0);const n=e.currentTarget.getBoundingClientRect();m({x:e.clientX-n.left,y:e.clientY-n.top})};return t.useEffect(()=>{const e=d=>{if(o){const p=Math.min(Math.max(0,d.clientX-a.x),window.innerWidth-100),v=Math.min(Math.max(0,d.clientY-a.y),window.innerHeight-40);l({x:p,y:v})}},n=()=>{u(!1)};return o&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}},[o,a]),i?s.jsx("div",{ref:g,children:s.jsxs("div",{className:"fixed",style:{zIndex:D,left:i.x,top:i.y,cursor:o?"grabbing":"grab"},children:[s.jsx("button",{onMouseDown:x,onClick:()=>{r(!0)},className:"px-4 py-2 border border-gray-300 rounded-md bg-white text-black hover:bg-green-600 transition-colors select-none",children:"copilot"}),s.jsx(b,{onClose:()=>{r(!1),c(!1)},visible:E,triggerUsage:h,onUsageTriggered:()=>c(!1)})]})}):null}export{N as default}; diff --git a/dist/copilot_web/App-CTe-5GKB.js b/dist/copilot_web/App-CTe-5GKB.js deleted file mode 100644 index f208108..0000000 --- a/dist/copilot_web/App-CTe-5GKB.js +++ /dev/null @@ -1,6 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/workflowChat-2b2JOI-A.js","copilot_web/input.js","copilot_web/assets/input-BiPrIQoG.css"].map(path => { - const apiBase = window.comfyAPI?.api?.api?.api_base; - const prefix = apiBase ? `${apiBase.substring(1)}/` : ''; - return `${prefix}${path}`; - }))))=>i.map(i=>d[i]); -import{r as t,j as s,R as p,_ as v}from"./input.js";const w=9999999,E=p.lazy(()=>v(()=>import("./workflowChat-2b2JOI-A.js"),__vite__mapDeps([0,1,2])));function y(){const d=t.useRef(null),[f,a]=t.useState(!1),[r,c]=t.useState(),[o,u]=t.useState(!1),[i,m]=t.useState({x:0,y:0});t.useEffect(()=>{c({x:window.innerWidth-160,y:20})},[]);const h=e=>{e.preventDefault(),u(!0);const n=e.currentTarget.getBoundingClientRect();m({x:e.clientX-n.left,y:e.clientY-n.top})};return t.useEffect(()=>{const e=l=>{if(o){const x=Math.min(Math.max(0,l.clientX-i.x),window.innerWidth-100),g=Math.min(Math.max(0,l.clientY-i.y),window.innerHeight-40);c({x,y:g})}},n=()=>{u(!1)};return o&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}},[o,i]),r?s.jsx("div",{ref:d,children:s.jsxs("div",{className:"fixed",style:{zIndex:w,left:r.x,top:r.y,cursor:o?"grabbing":"grab"},children:[s.jsx("button",{onMouseDown:h,onClick:()=>a(!0),className:"px-4 py-2 border border-gray-300 rounded-md bg-white text-black hover:bg-green-600 transition-colors select-none",children:"copilot"}),s.jsx(E,{onClose:()=>a(!1),visible:f})]})}):null}export{y as default}; diff --git a/dist/copilot_web/input.js b/dist/copilot_web/input.js index 853b7ca..eec2329 100644 --- a/dist/copilot_web/input.js +++ b/dist/copilot_web/input.js @@ -37,4 +37,4 @@ const of="modulepreload",sf=function(e){return"/"+e},Oi={},af=function(n,t,r){le `+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=o);break}}}finally{wl=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?vt(e):""}function jf(e){switch(e.tag){case 5:return vt(e.type);case 16:return vt("Lazy");case 13:return vt("Suspense");case 19:return vt("SuspenseList");case 0:case 2:case 15:return e=Sl(e.type,!1),e;case 11:return e=Sl(e.type.render,!1),e;case 1:return e=Sl(e.type,!0),e;default:return""}}function Xl(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 Dn:return"Fragment";case On:return"Portal";case Ql:return"Profiler";case Wu:return"StrictMode";case Kl:return"Suspense";case Yl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ss:return(e.displayName||"Context")+".Consumer";case os:return(e._context.displayName||"Context")+".Provider";case Qu:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ku:return n=e.displayName||null,n!==null?n:Xl(e.type)||"Memo";case Ge:n=e._payload,e=e._init;try{return Xl(e(n))}catch{}}return null}function Uf(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Xl(n);case 8:return n===Wu?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function fn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fs(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function $f(e){var n=fs(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var l=t.get,u=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,u.call(this,i)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function nr(e){e._valueTracker||(e._valueTracker=$f(e))}function cs(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=fs(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function zr(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 Gl(e,n){var t=n.checked;return A({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function Ai(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=fn(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function ds(e,n){n=n.checked,n!=null&&Hu(e,"checked",n,!1)}function Zl(e,n){ds(e,n);var t=fn(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Jl(e,n.type,t):n.hasOwnProperty("defaultValue")&&Jl(e,n.type,fn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Vi(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function Jl(e,n,t){(n!=="number"||zr(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var yt=Array.isArray;function Wn(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l"+n.valueOf().toString()+"",n=tr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Lt(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var St={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},Af=["Webkit","ms","Moz","O"];Object.keys(St).forEach(function(e){Af.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),St[n]=St[e]})});function vs(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||St.hasOwnProperty(e)&&St[e]?(""+n).trim():n+"px"}function ys(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,l=vs(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}var Vf=A({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 eu(e,n){if(n){if(Vf[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(y(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(y(61))}if(n.style!=null&&typeof n.style!="object")throw Error(y(62))}}function nu(e,n){if(e.indexOf("-")===-1)return typeof n.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 tu=null;function Yu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ru=null,Qn=null,Kn=null;function Wi(e){if(e=Gt(e)){if(typeof ru!="function")throw Error(y(280));var n=e.stateNode;n&&(n=rl(n),ru(e.stateNode,e.type,n))}}function gs(e){Qn?Kn?Kn.push(e):Kn=[e]:Qn=e}function ws(){if(Qn){var e=Qn,n=Kn;if(Kn=Qn=null,Wi(e),n)for(e=0;e>>=0,e===0?32:31-(qf(e)/bf|0)|0}var rr=64,lr=4194304;function gt(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 Or(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,l=e.suspendedLanes,u=e.pingedLanes,i=t&268435455;if(i!==0){var o=i&~l;o!==0?r=gt(o):(u&=i,u!==0&&(r=gt(u)))}else i=t&~l,i!==0?r=gt(i):u!==0&&(r=gt(u));if(r===0)return 0;if(n!==0&&n!==r&&!(n&l)&&(l=r&-r,u=n&-n,l>=u||l===16&&(u&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function Yt(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Le(n),e[n]=t}function rc(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Et),bi=" ",eo=!1;function $s(e,n){switch(e){case"keyup":return Rc.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function As(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mn=!1;function Dc(e,n){switch(e){case"compositionend":return As(n);case"keypress":return n.which!==32?null:(eo=!0,bi);case"textInput":return e=n.data,e===bi&&eo?null:e;default:return null}}function Mc(e,n){if(Mn)return e==="compositionend"||!ni&&$s(e,n)?(e=js(),wr=qu=be=null,Mn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=lo(t)}}function Ws(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Ws(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Qs(){for(var e=window,n=zr();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=zr(e.document)}return n}function ti(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Hc(e){var n=Qs(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Ws(t.ownerDocument.documentElement,t)){if(r!==null&&ti(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var l=t.textContent.length,u=Math.min(r.start,l);r=r.end===void 0?u:Math.min(r.end,l),!e.extend&&u>r&&(l=r,r=u,u=l),l=uo(t,u);var i=uo(t,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(n=n.createRange(),n.setStart(l.node,l.offset),e.removeAllRanges(),u>r?(e.addRange(n),e.extend(i.node,i.offset)):(n.setEnd(i.node,i.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Fn=null,au=null,Ct=null,fu=!1;function io(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;fu||Fn==null||Fn!==zr(r)||(r=Fn,"selectionStart"in r&&ti(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}),Ct&&It(Ct,r)||(Ct=r,r=Fr(au,"onSelect"),0Un||(e.current=vu[Un],vu[Un]=null,Un--)}function D(e,n){Un++,vu[Un]=e.current,e.current=n}var cn={},re=pn(cn),fe=pn(!1),Cn=cn;function Jn(e,n){var t=e.type.contextTypes;if(!t)return cn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l={},u;for(u in t)l[u]=n[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=l),l}function ce(e){return e=e.childContextTypes,e!=null}function jr(){F(fe),F(re)}function mo(e,n,t){if(re.current!==cn)throw Error(y(168));D(re,n),D(fe,t)}function ea(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var l in r)if(!(l in n))throw Error(y(108,Uf(e)||"Unknown",l));return A({},t,r)}function Ur(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cn,Cn=re.current,D(re,e),D(fe,fe.current),!0}function ho(e,n,t){var r=e.stateNode;if(!r)throw Error(y(169));t?(e=ea(e,n,Cn),r.__reactInternalMemoizedMergedChildContext=e,F(fe),F(re),D(re,e)):F(fe),D(fe,t)}var $e=null,ll=!1,Ml=!1;function na(e){$e===null?$e=[e]:$e.push(e)}function nd(e){ll=!0,na(e)}function mn(){if(!Ml&&$e!==null){Ml=!0;var e=0,n=O;try{var t=$e;for(O=1;e>=i,l-=i,Ae=1<<32-Le(n)+l|t<P?(B=x,x=null):B=x.sibling;var L=p(c,x,d[P],v);if(L===null){x===null&&(x=B);break}e&&x&&L.alternate===null&&n(c,x),a=u(L,a,P),C===null?E=L:C.sibling=L,C=L,x=B}if(P===d.length)return t(c,x),j&&yn(c,P),E;if(x===null){for(;PP?(B=x,x=null):B=x.sibling;var xe=p(c,x,L.value,v);if(xe===null){x===null&&(x=B);break}e&&x&&xe.alternate===null&&n(c,x),a=u(xe,a,P),C===null?E=xe:C.sibling=xe,C=xe,x=B}if(L.done)return t(c,x),j&&yn(c,P),E;if(x===null){for(;!L.done;P++,L=d.next())L=m(c,L.value,v),L!==null&&(a=u(L,a,P),C===null?E=L:C.sibling=L,C=L);return j&&yn(c,P),E}for(x=r(c,x);!L.done;P++,L=d.next())L=g(x,c,P,L.value,v),L!==null&&(e&&L.alternate!==null&&x.delete(L.key===null?P:L.key),a=u(L,a,P),C===null?E=L:C.sibling=L,C=L);return e&&x.forEach(function(it){return n(c,it)}),j&&yn(c,P),E}function I(c,a,d,v){if(typeof d=="object"&&d!==null&&d.type===Dn&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case er:e:{for(var E=d.key,C=a;C!==null;){if(C.key===E){if(E=d.type,E===Dn){if(C.tag===7){t(c,C.sibling),a=l(C,d.props.children),a.return=c,c=a;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ge&&Eo(E)===C.type){t(c,C.sibling),a=l(C,d.props),a.ref=pt(c,C,d),a.return=c,c=a;break e}t(c,C);break}else n(c,C);C=C.sibling}d.type===Dn?(a=_n(d.props.children,c.mode,v,d.key),a.return=c,c=a):(v=Nr(d.type,d.key,d.props,null,c.mode,v),v.ref=pt(c,a,d),v.return=c,c=v)}return i(c);case On:e:{for(C=d.key;a!==null;){if(a.key===C)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){t(c,a.sibling),a=l(a,d.children||[]),a.return=c,c=a;break e}else{t(c,a);break}else n(c,a);a=a.sibling}a=Bl(d,c.mode,v),a.return=c,c=a}return i(c);case Ge:return C=d._init,I(c,a,C(d._payload),v)}if(yt(d))return w(c,a,d,v);if(st(d))return S(c,a,d,v);cr(c,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(t(c,a.sibling),a=l(a,d),a.return=c,c=a):(t(c,a),a=Vl(d,c.mode,v),a.return=c,c=a),i(c)):t(c,a)}return I}var bn=aa(!0),fa=aa(!1),Zt={},je=pn(Zt),At=pn(Zt),Vt=pn(Zt);function kn(e){if(e===Zt)throw Error(y(174));return e}function ci(e,n){switch(D(Vt,n),D(At,e),D(je,Zt),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:bl(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=bl(n,e)}F(je),D(je,n)}function et(){F(je),F(At),F(Vt)}function ca(e){kn(Vt.current);var n=kn(je.current),t=bl(n,e.type);n!==t&&(D(At,e),D(je,t))}function di(e){At.current===e&&(F(je),F(At))}var U=pn(0);function Wr(e){for(var n=e;n!==null;){if(n.tag===13){var t=n.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Fl=[];function pi(){for(var e=0;et?t:4,e(!0);var r=Il.transition;Il.transition={};try{e(!1),n()}finally{O=t,Il.transition=r}}function Na(){return Ce().memoizedState}function ud(e,n,t){var r=sn(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},za(e))Ta(n,t);else if(t=ua(e,n,t,r),t!==null){var l=ue();Re(t,e,r,l),La(t,n,r)}}function id(e,n,t){var r=sn(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(za(e))Ta(n,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=n.lastRenderedReducer,u!==null))try{var i=n.lastRenderedState,o=u(i,t);if(l.hasEagerState=!0,l.eagerState=o,Oe(o,i)){var s=n.interleaved;s===null?(l.next=l,ai(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=ua(e,n,l,r),t!==null&&(l=ue(),Re(t,e,r,l),La(t,n,r))}}function za(e){var n=e.alternate;return e===$||n!==null&&n===$}function Ta(e,n){xt=Qr=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function La(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Gu(e,t)}}var Kr={readContext:_e,useCallback:ee,useContext:ee,useEffect:ee,useImperativeHandle:ee,useInsertionEffect:ee,useLayoutEffect:ee,useMemo:ee,useReducer:ee,useRef:ee,useState:ee,useDebugValue:ee,useDeferredValue:ee,useTransition:ee,useMutableSource:ee,useSyncExternalStore:ee,useId:ee,unstable_isNewReconciler:!1},od={readContext:_e,useCallback:function(e,n){return Me().memoizedState=[e,n===void 0?null:n],e},useContext:_e,useEffect:Co,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,_r(4194308,4,Ea.bind(null,n,e),t)},useLayoutEffect:function(e,n){return _r(4194308,4,e,n)},useInsertionEffect:function(e,n){return _r(4,2,e,n)},useMemo:function(e,n){var t=Me();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=Me();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=ud.bind(null,$,e),[r.memoizedState,e]},useRef:function(e){var n=Me();return e={current:e},n.memoizedState=e},useState:_o,useDebugValue:gi,useDeferredValue:function(e){return Me().memoizedState=e},useTransition:function(){var e=_o(!1),n=e[0];return e=ld.bind(null,e[1]),Me().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=$,l=Me();if(j){if(t===void 0)throw Error(y(407));t=t()}else{if(t=n(),Z===null)throw Error(y(349));Pn&30||ma(r,n,t)}l.memoizedState=t;var u={value:t,getSnapshot:n};return l.queue=u,Co(va.bind(null,r,u,e),[e]),r.flags|=2048,Wt(9,ha.bind(null,r,u,t,n),void 0,null),t},useId:function(){var e=Me(),n=Z.identifierPrefix;if(j){var t=Ve,r=Ae;t=(r&~(1<<32-Le(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=Bt++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(t,{is:r.is}):(e=i.createElement(t),t==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,t),e[Fe]=n,e[$t]=r,$a(e,n,!1,!1),n.stateNode=e;e:{switch(i=nu(t,r),t){case"dialog":M("cancel",e),M("close",e),l=r;break;case"iframe":case"object":case"embed":M("load",e),l=r;break;case"video":case"audio":for(l=0;ltt&&(n.flags|=128,r=!0,mt(u,!1),n.lanes=4194304)}else{if(!r)if(e=Wr(i),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),mt(u,!0),u.tail===null&&u.tailMode==="hidden"&&!i.alternate&&!j)return ne(n),null}else 2*W()-u.renderingStartTime>tt&&t!==1073741824&&(n.flags|=128,r=!0,mt(u,!1),n.lanes=4194304);u.isBackwards?(i.sibling=n.child,n.child=i):(t=u.last,t!==null?t.sibling=i:n.child=i,u.last=i)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=W(),n.sibling=null,t=U.current,D(U,r?t&1|2:t&1),n):(ne(n),null);case 22:case 23:return Ci(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?pe&1073741824&&(ne(n),n.subtreeFlags&6&&(n.flags|=8192)):ne(n),null;case 24:return null;case 25:return null}throw Error(y(156,n.tag))}function hd(e,n){switch(li(n),n.tag){case 1:return ce(n.type)&&jr(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return et(),F(fe),F(re),pi(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return di(n),null;case 13:if(F(U),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(y(340));qn()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return F(U),null;case 4:return et(),null;case 10:return si(n.type._context),null;case 22:case 23:return Ci(),null;case 24:return null;default:return null}}var pr=!1,te=!1,vd=typeof WeakSet=="function"?WeakSet:Set,k=null;function Bn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){V(e,n,r)}else t.current=null}function zu(e,n,t){try{t()}catch(r){V(e,n,r)}}var Do=!1;function yd(e,n){if(cu=Dr,e=Qs(),ti(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{t.nodeType,u.nodeType}catch{t=null;break e}var i=0,o=-1,s=-1,f=0,h=0,m=e,p=null;n:for(;;){for(var g;m!==t||l!==0&&m.nodeType!==3||(o=i+l),m!==u||r!==0&&m.nodeType!==3||(s=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(g=m.firstChild)!==null;)p=m,m=g;for(;;){if(m===e)break n;if(p===t&&++f===l&&(o=i),p===u&&++h===r&&(s=i),(g=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=g}t=o===-1||s===-1?null:{start:o,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(du={focusedElem:e,selectionRange:t},Dr=!1,k=n;k!==null;)if(n=k,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,k=e;else for(;k!==null;){n=k;try{var w=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,I=w.memoizedState,c=n.stateNode,a=c.getSnapshotBeforeUpdate(n.elementType===n.type?S:Ne(n.type,S),I);c.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=n.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(v){V(n,n.return,v)}if(e=n.sibling,e!==null){e.return=n.return,k=e;break}k=n.return}return w=Do,Do=!1,w}function Pt(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var u=l.destroy;l.destroy=void 0,u!==void 0&&zu(n,t,u)}l=l.next}while(l!==r)}}function ol(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function Tu(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function Ba(e){var n=e.alternate;n!==null&&(e.alternate=null,Ba(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Fe],delete n[$t],delete n[hu],delete n[bc],delete n[ed])),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 Ha(e){return e.tag===5||e.tag===3||e.tag===4}function Mo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ha(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 Lu(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Ir));else if(r!==4&&(e=e.child,e!==null))for(Lu(e,n,t),e=e.sibling;e!==null;)Lu(e,n,t),e=e.sibling}function Ru(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ru(e,n,t),e=e.sibling;e!==null;)Ru(e,n,t),e=e.sibling}var J=null,ze=!1;function Xe(e,n,t){for(t=t.child;t!==null;)Wa(e,n,t),t=t.sibling}function Wa(e,n,t){if(Ie&&typeof Ie.onCommitFiberUnmount=="function")try{Ie.onCommitFiberUnmount(br,t)}catch{}switch(t.tag){case 5:te||Bn(t,n);case 6:var r=J,l=ze;J=null,Xe(e,n,t),J=r,ze=l,J!==null&&(ze?(e=J,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):J.removeChild(t.stateNode));break;case 18:J!==null&&(ze?(e=J,t=t.stateNode,e.nodeType===8?Dl(e.parentNode,t):e.nodeType===1&&Dl(e,t),Mt(e)):Dl(J,t.stateNode));break;case 4:r=J,l=ze,J=t.stateNode.containerInfo,ze=!0,Xe(e,n,t),J=r,ze=l;break;case 0:case 11:case 14:case 15:if(!te&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var u=l,i=u.destroy;u=u.tag,i!==void 0&&(u&2||u&4)&&zu(t,n,i),l=l.next}while(l!==r)}Xe(e,n,t);break;case 1:if(!te&&(Bn(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(o){V(t,n,o)}Xe(e,n,t);break;case 21:Xe(e,n,t);break;case 22:t.mode&1?(te=(r=te)||t.memoizedState!==null,Xe(e,n,t),te=r):Xe(e,n,t);break;default:Xe(e,n,t)}}function Fo(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new vd),n.forEach(function(r){var l=Pd.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function Pe(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=i),r&=~u}if(r=l,r=W()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wd(r/1960))-r,10e?16:e,en===null)var r=!1;else{if(e=en,en=null,Gr=0,R&6)throw Error(y(331));var l=R;for(R|=4,k=e.current;k!==null;){var u=k,i=u.child;if(k.flags&16){var o=u.deletions;if(o!==null){for(var s=0;sW()-Ei?En(e,0):ki|=t),de(e,n)}function qa(e,n){n===0&&(e.mode&1?(n=lr,lr<<=1,!(lr&130023424)&&(lr=4194304)):n=1);var t=ue();e=Qe(e,n),e!==null&&(Yt(e,n,t),de(e,t))}function xd(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),qa(e,t)}function Pd(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(n),qa(e,t)}var ba;ba=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||fe.current)ae=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return ae=!1,pd(e,n,t);ae=!!(e.flags&131072)}else ae=!1,j&&n.flags&1048576&&ta(n,Ar,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;Cr(e,n),e=n.pendingProps;var l=Jn(n,re.current);Xn(n,t),l=hi(null,n,r,e,l,t);var u=vi();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,ce(r)?(u=!0,Ur(n)):u=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,fi(n),l.updater=ul,n.stateNode=l,l._reactInternals=n,ku(n,r,e,t),n=Cu(null,n,r,!0,u,t)):(n.tag=0,j&&u&&ri(n),le(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(Cr(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=zd(r),e=Ne(r,e),l){case 0:n=_u(null,n,r,e,t);break e;case 1:n=Lo(null,n,r,e,t);break e;case 11:n=zo(null,n,r,e,t);break e;case 14:n=To(null,n,r,Ne(r.type,e),t);break e}throw Error(y(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),_u(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),Lo(e,n,r,l,t);case 3:e:{if(Ia(n),e===null)throw Error(y(387));r=n.pendingProps,u=n.memoizedState,l=u.element,ia(e,n),Hr(n,r,null,t);var i=n.memoizedState;if(r=i.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},n.updateQueue.baseState=u,n.memoizedState=u,n.flags&256){l=nt(Error(y(423)),n),n=Ro(e,n,r,t,l);break e}else if(r!==l){l=nt(Error(y(424)),n),n=Ro(e,n,r,t,l);break e}else for(me=ln(n.stateNode.containerInfo.firstChild),he=n,j=!0,Te=null,t=fa(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(qn(),r===l){n=Ke(e,n,t);break e}le(e,n,r,t)}n=n.child}return n;case 5:return ca(n),e===null&&gu(n),r=n.type,l=n.pendingProps,u=e!==null?e.memoizedProps:null,i=l.children,pu(r,l)?i=null:u!==null&&pu(r,u)&&(n.flags|=32),Fa(e,n),le(e,n,i,t),n.child;case 6:return e===null&&gu(n),null;case 13:return ja(e,n,t);case 4:return ci(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=bn(n,null,r,t):le(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),zo(e,n,r,l,t);case 7:return le(e,n,n.pendingProps,t),n.child;case 8:return le(e,n,n.pendingProps.children,t),n.child;case 12:return le(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,u=n.memoizedProps,i=l.value,D(Vr,r._currentValue),r._currentValue=i,u!==null)if(Oe(u.value,i)){if(u.children===l.children&&!fe.current){n=Ke(e,n,t);break e}}else for(u=n.child,u!==null&&(u.return=n);u!==null;){var o=u.dependencies;if(o!==null){i=u.child;for(var s=o.firstContext;s!==null;){if(s.context===r){if(u.tag===1){s=Be(-1,t&-t),s.tag=2;var f=u.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?s.next=s:(s.next=h.next,h.next=s),f.pending=s}}u.lanes|=t,s=u.alternate,s!==null&&(s.lanes|=t),wu(u.return,t,n),o.lanes|=t;break}s=s.next}}else if(u.tag===10)i=u.type===n.type?null:u.child;else if(u.tag===18){if(i=u.return,i===null)throw Error(y(341));i.lanes|=t,o=i.alternate,o!==null&&(o.lanes|=t),wu(i,t,n),i=u.sibling}else i=u.child;if(i!==null)i.return=u;else for(i=u;i!==null;){if(i===n){i=null;break}if(u=i.sibling,u!==null){u.return=i.return,i=u;break}i=i.return}u=i}le(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,Xn(n,t),l=_e(l),r=r(l),n.flags|=1,le(e,n,r,t),n.child;case 14:return r=n.type,l=Ne(r,n.pendingProps),l=Ne(r.type,l),To(e,n,r,l,t);case 15:return Da(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),Cr(e,n),n.tag=1,ce(r)?(e=!0,Ur(n)):e=!1,Xn(n,t),sa(n,r,l),ku(n,r,l,t),Cu(null,n,r,!0,e,t);case 19:return Ua(e,n,t);case 22:return Ma(e,n,t)}throw Error(y(156,n.tag))};function ef(e,n){return Ps(e,n)}function Nd(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,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 ke(e,n,t,r){return new Nd(e,n,t,r)}function Pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zd(e){if(typeof e=="function")return Pi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qu)return 11;if(e===Ku)return 14}return 2}function an(e,n){var t=e.alternate;return t===null?(t=ke(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Nr(e,n,t,r,l,u){var i=2;if(r=e,typeof e=="function")Pi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Dn:return _n(t.children,l,u,n);case Wu:i=8,l|=8;break;case Ql:return e=ke(12,t,n,l|2),e.elementType=Ql,e.lanes=u,e;case Kl:return e=ke(13,t,n,l),e.elementType=Kl,e.lanes=u,e;case Yl:return e=ke(19,t,n,l),e.elementType=Yl,e.lanes=u,e;case as:return al(t,l,u,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case os:i=10;break e;case ss:i=9;break e;case Qu:i=11;break e;case Ku:i=14;break e;case Ge:i=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return n=ke(i,t,n,l),n.elementType=e,n.type=r,n.lanes=u,n}function _n(e,n,t,r){return e=ke(7,e,r,n),e.lanes=t,e}function al(e,n,t,r){return e=ke(22,e,r,n),e.elementType=as,e.lanes=t,e.stateNode={isHidden:!1},e}function Vl(e,n,t){return e=ke(6,e,null,n),e.lanes=t,e}function Bl(e,n,t){return n=ke(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Td(e,n,t,r,l){this.tag=n,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=El(0),this.expirationTimes=El(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=El(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ni(e,n,t,r,l,u,i,o,s){return e=new Td(e,n,t,o,s),n===1?(n=1,u===!0&&(n|=8)):n=0,u=ke(3,null,null,n),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},fi(u),e}function Ld(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lf)}catch(e){console.error(e)}}lf(),ts.exports=ye;var Md=ts.exports,Ho=Md;Hl.createRoot=Ho.createRoot,Hl.hydrateRoot=Ho.hydrateRoot;let Fd=null;const Wo=location.pathname.split("/").slice(0,-1).join("/");let Id=null;async function jd(){try{await Promise.all([import(Wo+"/scripts/api.js").then(e=>{Id=e==null?void 0:e.api}),import(Wo+"/scripts/app.js").then(e=>{Fd=e==null?void 0:e.app})])}catch(e){console.error("waitForApp error",e)}}const Ud=es.lazy(()=>af(async()=>{const{default:e}=await import("./App-CTe-5GKB.js");return{default:e}},[]).then(({default:e})=>({default:e})));function $d(){return new Promise(e=>{if(document.body)return e(document.body);document.addEventListener("DOMContentLoaded",()=>{e(document.body)})})}$d().then(()=>jd()).then(()=>{const e=document.createElement("div");document.body.append(e),Hl.createRoot(e).render(Ii.jsx(es.StrictMode,{children:Ii.jsx(Ud,{})}))});export{es as R,af as _,Fd as a,Id as b,Ad as c,ff as g,Ii as j,Au as r}; +`+u.stack}return{value:e,source:n,stack:l,digest:null}}function $l(e,n,t){return{value:e,source:null,stack:t??null,digest:n??null}}function Eu(e,n){try{console.error(n.value)}catch(t){setTimeout(function(){throw t})}}var fd=typeof WeakMap=="function"?WeakMap:Map;function Ra(e,n,t){t=Be(-1,t),t.tag=3,t.payload={element:null};var r=n.value;return t.callback=function(){Xr||(Xr=!0,Ou=r),Eu(e,n)},t}function Oa(e,n,t){t=Be(-1,t),t.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=n.value;t.payload=function(){return r(l)},t.callback=function(){Eu(e,n)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(t.callback=function(){Eu(e,n),typeof r!="function"&&(on===null?on=new Set([this]):on.add(this));var i=n.stack;this.componentDidCatch(n.value,{componentStack:i!==null?i:""})}),t}function xo(e,n,t){var r=e.pingCache;if(r===null){r=e.pingCache=new fd;var l=new Set;r.set(n,l)}else l=r.get(n),l===void 0&&(l=new Set,r.set(n,l));l.has(t)||(l.add(t),e=Cd.bind(null,e,n,t),n.then(e,e))}function Po(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function No(e,n,t,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===n?e.flags|=65536:(e.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(n=Be(-1,1),n.tag=2,un(t,n,1))),t.lanes|=1),e)}var cd=Ye.ReactCurrentOwner,ae=!1;function le(e,n,t,r){n.child=e===null?fa(n,null,t,r):bn(n,e.child,t,r)}function zo(e,n,t,r,l){t=t.render;var u=n.ref;return Xn(n,l),r=hi(e,n,t,r,u,l),t=vi(),e!==null&&!ae?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,Ke(e,n,l)):(j&&t&&ri(n),n.flags|=1,le(e,n,r,l),n.child)}function To(e,n,t,r,l){if(e===null){var u=t.type;return typeof u=="function"&&!Pi(u)&&u.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(n.tag=15,n.type=u,Da(e,n,u,r,l)):(e=Nr(t.type,null,r,n,n.mode,l),e.ref=n.ref,e.return=n,n.child=e)}if(u=e.child,!(e.lanes&l)){var i=u.memoizedProps;if(t=t.compare,t=t!==null?t:It,t(i,r)&&e.ref===n.ref)return Ke(e,n,l)}return n.flags|=1,e=an(u,r),e.ref=n.ref,e.return=n,n.child=e}function Da(e,n,t,r,l){if(e!==null){var u=e.memoizedProps;if(It(u,r)&&e.ref===n.ref)if(ae=!1,n.pendingProps=r=u,(e.lanes&l)!==0)e.flags&131072&&(ae=!0);else return n.lanes=e.lanes,Ke(e,n,l)}return _u(e,n,t,r,l)}function Ma(e,n,t){var r=n.pendingProps,l=r.children,u=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(n.mode&1))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},D(Hn,pe),pe|=t;else{if(!(t&1073741824))return e=u!==null?u.baseLanes|t:t,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,D(Hn,pe),pe|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=u!==null?u.baseLanes:t,D(Hn,pe),pe|=r}else u!==null?(r=u.baseLanes|t,n.memoizedState=null):r=t,D(Hn,pe),pe|=r;return le(e,n,l,t),n.child}function Fa(e,n){var t=n.ref;(e===null&&t!==null||e!==null&&e.ref!==t)&&(n.flags|=512,n.flags|=2097152)}function _u(e,n,t,r,l){var u=ce(t)?Cn:re.current;return u=Jn(n,u),Xn(n,l),t=hi(e,n,t,r,u,l),r=vi(),e!==null&&!ae?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,Ke(e,n,l)):(j&&r&&ri(n),n.flags|=1,le(e,n,t,l),n.child)}function Lo(e,n,t,r,l){if(ce(t)){var u=!0;Ur(n)}else u=!1;if(Xn(n,l),n.stateNode===null)Cr(e,n),sa(n,t,r),ku(n,t,r,l),r=!0;else if(e===null){var i=n.stateNode,o=n.memoizedProps;i.props=o;var s=i.context,f=t.contextType;typeof f=="object"&&f!==null?f=_e(f):(f=ce(t)?Cn:re.current,f=Jn(n,f));var h=t.getDerivedStateFromProps,m=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function";m||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==r||s!==f)&&ko(n,i,r,f),Ze=!1;var p=n.memoizedState;i.state=p,Hr(n,r,i,l),s=n.memoizedState,o!==r||p!==s||fe.current||Ze?(typeof h=="function"&&(Su(n,t,h,r),s=n.memoizedState),(o=Ze||So(n,t,o,r,p,s,f))?(m||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(n.flags|=4194308)):(typeof i.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=s),i.props=r,i.state=s,i.context=f,r=o):(typeof i.componentDidMount=="function"&&(n.flags|=4194308),r=!1)}else{i=n.stateNode,ia(e,n),o=n.memoizedProps,f=n.type===n.elementType?o:Ne(n.type,o),i.props=f,m=n.pendingProps,p=i.context,s=t.contextType,typeof s=="object"&&s!==null?s=_e(s):(s=ce(t)?Cn:re.current,s=Jn(n,s));var g=t.getDerivedStateFromProps;(h=typeof g=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==m||p!==s)&&ko(n,i,r,s),Ze=!1,p=n.memoizedState,i.state=p,Hr(n,r,i,l);var w=n.memoizedState;o!==m||p!==w||fe.current||Ze?(typeof g=="function"&&(Su(n,t,g,r),w=n.memoizedState),(f=Ze||So(n,t,f,r,p,w,s)||!1)?(h||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,w,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,w,s)),typeof i.componentDidUpdate=="function"&&(n.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=w),i.props=r,i.state=w,i.context=s,r=f):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),r=!1)}return Cu(e,n,t,r,u,l)}function Cu(e,n,t,r,l,u){Fa(e,n);var i=(n.flags&128)!==0;if(!r&&!i)return l&&ho(n,t,!1),Ke(e,n,u);r=n.stateNode,cd.current=n;var o=i&&typeof t.getDerivedStateFromError!="function"?null:r.render();return n.flags|=1,e!==null&&i?(n.child=bn(n,e.child,null,u),n.child=bn(n,null,o,u)):le(e,n,o,u),n.memoizedState=r.state,l&&ho(n,t,!0),n.child}function Ia(e){var n=e.stateNode;n.pendingContext?mo(e,n.pendingContext,n.pendingContext!==n.context):n.context&&mo(e,n.context,!1),ci(e,n.containerInfo)}function Ro(e,n,t,r,l){return qn(),ui(l),n.flags|=256,le(e,n,t,r),n.child}var xu={dehydrated:null,treeContext:null,retryLane:0};function Pu(e){return{baseLanes:e,cachePool:null,transitions:null}}function ja(e,n,t){var r=n.pendingProps,l=U.current,u=!1,i=(n.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(l&2)!==0),o?(u=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),D(U,l&1),e===null)return gu(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(n.mode&1?e.data==="$!"?n.lanes=8:n.lanes=1073741824:n.lanes=1,null):(i=r.children,e=r.fallback,u?(r=n.mode,u=n.child,i={mode:"hidden",children:i},!(r&1)&&u!==null?(u.childLanes=0,u.pendingProps=i):u=al(i,r,0,null),e=_n(e,r,t,null),u.return=n,e.return=n,u.sibling=e,n.child=u,n.child.memoizedState=Pu(t),n.memoizedState=xu,e):wi(n,i));if(l=e.memoizedState,l!==null&&(o=l.dehydrated,o!==null))return dd(e,n,i,r,o,l,t);if(u){u=r.fallback,i=n.mode,l=e.child,o=l.sibling;var s={mode:"hidden",children:r.children};return!(i&1)&&n.child!==l?(r=n.child,r.childLanes=0,r.pendingProps=s,n.deletions=null):(r=an(l,s),r.subtreeFlags=l.subtreeFlags&14680064),o!==null?u=an(o,u):(u=_n(u,i,t,null),u.flags|=2),u.return=n,r.return=n,r.sibling=u,n.child=r,r=u,u=n.child,i=e.child.memoizedState,i=i===null?Pu(t):{baseLanes:i.baseLanes|t,cachePool:null,transitions:i.transitions},u.memoizedState=i,u.childLanes=e.childLanes&~t,n.memoizedState=xu,r}return u=e.child,e=u.sibling,r=an(u,{mode:"visible",children:r.children}),!(n.mode&1)&&(r.lanes=t),r.return=n,r.sibling=null,e!==null&&(t=n.deletions,t===null?(n.deletions=[e],n.flags|=16):t.push(e)),n.child=r,n.memoizedState=null,r}function wi(e,n){return n=al({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function dr(e,n,t,r){return r!==null&&ui(r),bn(n,e.child,null,t),e=wi(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function dd(e,n,t,r,l,u,i){if(t)return n.flags&256?(n.flags&=-257,r=$l(Error(y(422))),dr(e,n,i,r)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(u=r.fallback,l=n.mode,r=al({mode:"visible",children:r.children},l,0,null),u=_n(u,l,i,null),u.flags|=2,r.return=n,u.return=n,r.sibling=u,n.child=r,n.mode&1&&bn(n,e.child,null,i),n.child.memoizedState=Pu(i),n.memoizedState=xu,u);if(!(n.mode&1))return dr(e,n,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var o=r.dgst;return r=o,u=Error(y(419)),r=$l(u,r,void 0),dr(e,n,i,r)}if(o=(i&e.childLanes)!==0,ae||o){if(r=Z,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==u.retryLane&&(u.retryLane=l,Qe(e,l),Re(r,e,l,-1))}return xi(),r=$l(Error(y(421))),dr(e,n,i,r)}return l.data==="$?"?(n.flags|=128,n.child=e.child,n=xd.bind(null,e),l._reactRetry=n,null):(e=u.treeContext,me=ln(l.nextSibling),he=n,j=!0,Te=null,e!==null&&(we[Se++]=Ae,we[Se++]=Ve,we[Se++]=xn,Ae=e.id,Ve=e.overflow,xn=n),n=wi(n,r.children),n.flags|=4096,n)}function Oo(e,n,t){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n),wu(e.return,n,t)}function Al(e,n,t,r,l){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:t,tailMode:l}:(u.isBackwards=n,u.rendering=null,u.renderingStartTime=0,u.last=r,u.tail=t,u.tailMode=l)}function Ua(e,n,t){var r=n.pendingProps,l=r.revealOrder,u=r.tail;if(le(e,n,r.children,t),r=U.current,r&2)r=r&1|2,n.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oo(e,t,n);else if(e.tag===19)Oo(e,t,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(D(U,r),!(n.mode&1))n.memoizedState=null;else switch(l){case"forwards":for(t=n.child,l=null;t!==null;)e=t.alternate,e!==null&&Wr(e)===null&&(l=t),t=t.sibling;t=l,t===null?(l=n.child,n.child=null):(l=t.sibling,t.sibling=null),Al(n,!1,l,t,u);break;case"backwards":for(t=null,l=n.child,n.child=null;l!==null;){if(e=l.alternate,e!==null&&Wr(e)===null){n.child=l;break}e=l.sibling,l.sibling=t,t=l,l=e}Al(n,!0,t,null,u);break;case"together":Al(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Cr(e,n){!(n.mode&1)&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Ke(e,n,t){if(e!==null&&(n.dependencies=e.dependencies),Nn|=n.lanes,!(t&n.childLanes))return null;if(e!==null&&n.child!==e.child)throw Error(y(153));if(n.child!==null){for(e=n.child,t=an(e,e.pendingProps),n.child=t,t.return=n;e.sibling!==null;)e=e.sibling,t=t.sibling=an(e,e.pendingProps),t.return=n;t.sibling=null}return n.child}function pd(e,n,t){switch(n.tag){case 3:Ia(n),qn();break;case 5:ca(n);break;case 1:ce(n.type)&&Ur(n);break;case 4:ci(n,n.stateNode.containerInfo);break;case 10:var r=n.type._context,l=n.memoizedProps.value;D(Vr,r._currentValue),r._currentValue=l;break;case 13:if(r=n.memoizedState,r!==null)return r.dehydrated!==null?(D(U,U.current&1),n.flags|=128,null):t&n.child.childLanes?ja(e,n,t):(D(U,U.current&1),e=Ke(e,n,t),e!==null?e.sibling:null);D(U,U.current&1);break;case 19:if(r=(t&n.childLanes)!==0,e.flags&128){if(r)return Ua(e,n,t);n.flags|=128}if(l=n.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),D(U,U.current),r)break;return null;case 22:case 23:return n.lanes=0,Ma(e,n,t)}return Ke(e,n,t)}var $a,Nu,Aa,Va;$a=function(e,n){for(var t=n.child;t!==null;){if(t.tag===5||t.tag===6)e.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break;for(;t.sibling===null;){if(t.return===null||t.return===n)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};Nu=function(){};Aa=function(e,n,t,r){var l=e.memoizedProps;if(l!==r){e=n.stateNode,kn(je.current);var u=null;switch(t){case"input":l=Gl(e,l),r=Gl(e,r),u=[];break;case"select":l=A({},l,{value:void 0}),r=A({},r,{value:void 0}),u=[];break;case"textarea":l=ql(e,l),r=ql(e,r),u=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ir)}eu(t,r);var i;t=null;for(f in l)if(!r.hasOwnProperty(f)&&l.hasOwnProperty(f)&&l[f]!=null)if(f==="style"){var o=l[f];for(i in o)o.hasOwnProperty(i)&&(t||(t={}),t[i]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(Tt.hasOwnProperty(f)?u||(u=[]):(u=u||[]).push(f,null));for(f in r){var s=r[f];if(o=l!=null?l[f]:void 0,r.hasOwnProperty(f)&&s!==o&&(s!=null||o!=null))if(f==="style")if(o){for(i in o)!o.hasOwnProperty(i)||s&&s.hasOwnProperty(i)||(t||(t={}),t[i]="");for(i in s)s.hasOwnProperty(i)&&o[i]!==s[i]&&(t||(t={}),t[i]=s[i])}else t||(u||(u=[]),u.push(f,t)),t=s;else f==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,o=o?o.__html:void 0,s!=null&&o!==s&&(u=u||[]).push(f,s)):f==="children"?typeof s!="string"&&typeof s!="number"||(u=u||[]).push(f,""+s):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(Tt.hasOwnProperty(f)?(s!=null&&f==="onScroll"&&M("scroll",e),u||o===s||(u=[])):(u=u||[]).push(f,s))}t&&(u=u||[]).push("style",t);var f=u;(n.updateQueue=f)&&(n.flags|=4)}};Va=function(e,n,t,r){t!==r&&(n.flags|=4)};function mt(e,n){if(!j)switch(e.tailMode){case"hidden":n=e.tail;for(var t=null;n!==null;)n.alternate!==null&&(t=n),n=n.sibling;t===null?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ne(e){var n=e.alternate!==null&&e.alternate.child===e.child,t=0,r=0;if(n)for(var l=e.child;l!==null;)t|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)t|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=t,n}function md(e,n,t){var r=n.pendingProps;switch(li(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ne(n),null;case 1:return ce(n.type)&&jr(),ne(n),null;case 3:return r=n.stateNode,et(),F(fe),F(re),pi(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(fr(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,Te!==null&&(Fu(Te),Te=null))),Nu(e,n),ne(n),null;case 5:di(n);var l=kn(Vt.current);if(t=n.type,e!==null&&n.stateNode!=null)Aa(e,n,t,r,l),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!r){if(n.stateNode===null)throw Error(y(166));return ne(n),null}if(e=kn(je.current),fr(n)){r=n.stateNode,t=n.type;var u=n.memoizedProps;switch(r[Fe]=n,r[$t]=u,e=(n.mode&1)!==0,t){case"dialog":M("cancel",r),M("close",r);break;case"iframe":case"object":case"embed":M("load",r);break;case"video":case"audio":for(l=0;l<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(t,{is:r.is}):(e=i.createElement(t),t==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,t),e[Fe]=n,e[$t]=r,$a(e,n,!1,!1),n.stateNode=e;e:{switch(i=nu(t,r),t){case"dialog":M("cancel",e),M("close",e),l=r;break;case"iframe":case"object":case"embed":M("load",e),l=r;break;case"video":case"audio":for(l=0;ltt&&(n.flags|=128,r=!0,mt(u,!1),n.lanes=4194304)}else{if(!r)if(e=Wr(i),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),mt(u,!0),u.tail===null&&u.tailMode==="hidden"&&!i.alternate&&!j)return ne(n),null}else 2*W()-u.renderingStartTime>tt&&t!==1073741824&&(n.flags|=128,r=!0,mt(u,!1),n.lanes=4194304);u.isBackwards?(i.sibling=n.child,n.child=i):(t=u.last,t!==null?t.sibling=i:n.child=i,u.last=i)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=W(),n.sibling=null,t=U.current,D(U,r?t&1|2:t&1),n):(ne(n),null);case 22:case 23:return Ci(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?pe&1073741824&&(ne(n),n.subtreeFlags&6&&(n.flags|=8192)):ne(n),null;case 24:return null;case 25:return null}throw Error(y(156,n.tag))}function hd(e,n){switch(li(n),n.tag){case 1:return ce(n.type)&&jr(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return et(),F(fe),F(re),pi(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return di(n),null;case 13:if(F(U),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(y(340));qn()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return F(U),null;case 4:return et(),null;case 10:return si(n.type._context),null;case 22:case 23:return Ci(),null;case 24:return null;default:return null}}var pr=!1,te=!1,vd=typeof WeakSet=="function"?WeakSet:Set,k=null;function Bn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){V(e,n,r)}else t.current=null}function zu(e,n,t){try{t()}catch(r){V(e,n,r)}}var Do=!1;function yd(e,n){if(cu=Dr,e=Qs(),ti(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{t.nodeType,u.nodeType}catch{t=null;break e}var i=0,o=-1,s=-1,f=0,h=0,m=e,p=null;n:for(;;){for(var g;m!==t||l!==0&&m.nodeType!==3||(o=i+l),m!==u||r!==0&&m.nodeType!==3||(s=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(g=m.firstChild)!==null;)p=m,m=g;for(;;){if(m===e)break n;if(p===t&&++f===l&&(o=i),p===u&&++h===r&&(s=i),(g=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=g}t=o===-1||s===-1?null:{start:o,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(du={focusedElem:e,selectionRange:t},Dr=!1,k=n;k!==null;)if(n=k,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,k=e;else for(;k!==null;){n=k;try{var w=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,I=w.memoizedState,c=n.stateNode,a=c.getSnapshotBeforeUpdate(n.elementType===n.type?S:Ne(n.type,S),I);c.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=n.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(v){V(n,n.return,v)}if(e=n.sibling,e!==null){e.return=n.return,k=e;break}k=n.return}return w=Do,Do=!1,w}function Pt(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var u=l.destroy;l.destroy=void 0,u!==void 0&&zu(n,t,u)}l=l.next}while(l!==r)}}function ol(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function Tu(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function Ba(e){var n=e.alternate;n!==null&&(e.alternate=null,Ba(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Fe],delete n[$t],delete n[hu],delete n[bc],delete n[ed])),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 Ha(e){return e.tag===5||e.tag===3||e.tag===4}function Mo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ha(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 Lu(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Ir));else if(r!==4&&(e=e.child,e!==null))for(Lu(e,n,t),e=e.sibling;e!==null;)Lu(e,n,t),e=e.sibling}function Ru(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ru(e,n,t),e=e.sibling;e!==null;)Ru(e,n,t),e=e.sibling}var J=null,ze=!1;function Xe(e,n,t){for(t=t.child;t!==null;)Wa(e,n,t),t=t.sibling}function Wa(e,n,t){if(Ie&&typeof Ie.onCommitFiberUnmount=="function")try{Ie.onCommitFiberUnmount(br,t)}catch{}switch(t.tag){case 5:te||Bn(t,n);case 6:var r=J,l=ze;J=null,Xe(e,n,t),J=r,ze=l,J!==null&&(ze?(e=J,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):J.removeChild(t.stateNode));break;case 18:J!==null&&(ze?(e=J,t=t.stateNode,e.nodeType===8?Dl(e.parentNode,t):e.nodeType===1&&Dl(e,t),Mt(e)):Dl(J,t.stateNode));break;case 4:r=J,l=ze,J=t.stateNode.containerInfo,ze=!0,Xe(e,n,t),J=r,ze=l;break;case 0:case 11:case 14:case 15:if(!te&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var u=l,i=u.destroy;u=u.tag,i!==void 0&&(u&2||u&4)&&zu(t,n,i),l=l.next}while(l!==r)}Xe(e,n,t);break;case 1:if(!te&&(Bn(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(o){V(t,n,o)}Xe(e,n,t);break;case 21:Xe(e,n,t);break;case 22:t.mode&1?(te=(r=te)||t.memoizedState!==null,Xe(e,n,t),te=r):Xe(e,n,t);break;default:Xe(e,n,t)}}function Fo(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new vd),n.forEach(function(r){var l=Pd.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function Pe(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=i),r&=~u}if(r=l,r=W()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wd(r/1960))-r,10e?16:e,en===null)var r=!1;else{if(e=en,en=null,Gr=0,R&6)throw Error(y(331));var l=R;for(R|=4,k=e.current;k!==null;){var u=k,i=u.child;if(k.flags&16){var o=u.deletions;if(o!==null){for(var s=0;sW()-Ei?En(e,0):ki|=t),de(e,n)}function qa(e,n){n===0&&(e.mode&1?(n=lr,lr<<=1,!(lr&130023424)&&(lr=4194304)):n=1);var t=ue();e=Qe(e,n),e!==null&&(Yt(e,n,t),de(e,t))}function xd(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),qa(e,t)}function Pd(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(n),qa(e,t)}var ba;ba=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||fe.current)ae=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return ae=!1,pd(e,n,t);ae=!!(e.flags&131072)}else ae=!1,j&&n.flags&1048576&&ta(n,Ar,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;Cr(e,n),e=n.pendingProps;var l=Jn(n,re.current);Xn(n,t),l=hi(null,n,r,e,l,t);var u=vi();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,ce(r)?(u=!0,Ur(n)):u=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,fi(n),l.updater=ul,n.stateNode=l,l._reactInternals=n,ku(n,r,e,t),n=Cu(null,n,r,!0,u,t)):(n.tag=0,j&&u&&ri(n),le(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(Cr(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=zd(r),e=Ne(r,e),l){case 0:n=_u(null,n,r,e,t);break e;case 1:n=Lo(null,n,r,e,t);break e;case 11:n=zo(null,n,r,e,t);break e;case 14:n=To(null,n,r,Ne(r.type,e),t);break e}throw Error(y(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),_u(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),Lo(e,n,r,l,t);case 3:e:{if(Ia(n),e===null)throw Error(y(387));r=n.pendingProps,u=n.memoizedState,l=u.element,ia(e,n),Hr(n,r,null,t);var i=n.memoizedState;if(r=i.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},n.updateQueue.baseState=u,n.memoizedState=u,n.flags&256){l=nt(Error(y(423)),n),n=Ro(e,n,r,t,l);break e}else if(r!==l){l=nt(Error(y(424)),n),n=Ro(e,n,r,t,l);break e}else for(me=ln(n.stateNode.containerInfo.firstChild),he=n,j=!0,Te=null,t=fa(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(qn(),r===l){n=Ke(e,n,t);break e}le(e,n,r,t)}n=n.child}return n;case 5:return ca(n),e===null&&gu(n),r=n.type,l=n.pendingProps,u=e!==null?e.memoizedProps:null,i=l.children,pu(r,l)?i=null:u!==null&&pu(r,u)&&(n.flags|=32),Fa(e,n),le(e,n,i,t),n.child;case 6:return e===null&&gu(n),null;case 13:return ja(e,n,t);case 4:return ci(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=bn(n,null,r,t):le(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),zo(e,n,r,l,t);case 7:return le(e,n,n.pendingProps,t),n.child;case 8:return le(e,n,n.pendingProps.children,t),n.child;case 12:return le(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,u=n.memoizedProps,i=l.value,D(Vr,r._currentValue),r._currentValue=i,u!==null)if(Oe(u.value,i)){if(u.children===l.children&&!fe.current){n=Ke(e,n,t);break e}}else for(u=n.child,u!==null&&(u.return=n);u!==null;){var o=u.dependencies;if(o!==null){i=u.child;for(var s=o.firstContext;s!==null;){if(s.context===r){if(u.tag===1){s=Be(-1,t&-t),s.tag=2;var f=u.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?s.next=s:(s.next=h.next,h.next=s),f.pending=s}}u.lanes|=t,s=u.alternate,s!==null&&(s.lanes|=t),wu(u.return,t,n),o.lanes|=t;break}s=s.next}}else if(u.tag===10)i=u.type===n.type?null:u.child;else if(u.tag===18){if(i=u.return,i===null)throw Error(y(341));i.lanes|=t,o=i.alternate,o!==null&&(o.lanes|=t),wu(i,t,n),i=u.sibling}else i=u.child;if(i!==null)i.return=u;else for(i=u;i!==null;){if(i===n){i=null;break}if(u=i.sibling,u!==null){u.return=i.return,i=u;break}i=i.return}u=i}le(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,Xn(n,t),l=_e(l),r=r(l),n.flags|=1,le(e,n,r,t),n.child;case 14:return r=n.type,l=Ne(r,n.pendingProps),l=Ne(r.type,l),To(e,n,r,l,t);case 15:return Da(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),Cr(e,n),n.tag=1,ce(r)?(e=!0,Ur(n)):e=!1,Xn(n,t),sa(n,r,l),ku(n,r,l,t),Cu(null,n,r,!0,e,t);case 19:return Ua(e,n,t);case 22:return Ma(e,n,t)}throw Error(y(156,n.tag))};function ef(e,n){return Ps(e,n)}function Nd(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,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 ke(e,n,t,r){return new Nd(e,n,t,r)}function Pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zd(e){if(typeof e=="function")return Pi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qu)return 11;if(e===Ku)return 14}return 2}function an(e,n){var t=e.alternate;return t===null?(t=ke(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Nr(e,n,t,r,l,u){var i=2;if(r=e,typeof e=="function")Pi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Dn:return _n(t.children,l,u,n);case Wu:i=8,l|=8;break;case Ql:return e=ke(12,t,n,l|2),e.elementType=Ql,e.lanes=u,e;case Kl:return e=ke(13,t,n,l),e.elementType=Kl,e.lanes=u,e;case Yl:return e=ke(19,t,n,l),e.elementType=Yl,e.lanes=u,e;case as:return al(t,l,u,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case os:i=10;break e;case ss:i=9;break e;case Qu:i=11;break e;case Ku:i=14;break e;case Ge:i=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return n=ke(i,t,n,l),n.elementType=e,n.type=r,n.lanes=u,n}function _n(e,n,t,r){return e=ke(7,e,r,n),e.lanes=t,e}function al(e,n,t,r){return e=ke(22,e,r,n),e.elementType=as,e.lanes=t,e.stateNode={isHidden:!1},e}function Vl(e,n,t){return e=ke(6,e,null,n),e.lanes=t,e}function Bl(e,n,t){return n=ke(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Td(e,n,t,r,l){this.tag=n,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=El(0),this.expirationTimes=El(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=El(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ni(e,n,t,r,l,u,i,o,s){return e=new Td(e,n,t,o,s),n===1?(n=1,u===!0&&(n|=8)):n=0,u=ke(3,null,null,n),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},fi(u),e}function Ld(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lf)}catch(e){console.error(e)}}lf(),ts.exports=ye;var Md=ts.exports,Ho=Md;Hl.createRoot=Ho.createRoot,Hl.hydrateRoot=Ho.hydrateRoot;let Fd=null;const Wo=location.pathname.split("/").slice(0,-1).join("/");let Id=null;async function jd(){try{await Promise.all([import(Wo+"/scripts/api.js").then(e=>{Id=e==null?void 0:e.api}),import(Wo+"/scripts/app.js").then(e=>{Fd=e==null?void 0:e.app})])}catch(e){console.error("waitForApp error",e)}}const Ud=es.lazy(()=>af(async()=>{const{default:e}=await import("./App-BjmOSNfO.js");return{default:e}},[]).then(({default:e})=>({default:e})));function $d(){return new Promise(e=>{if(document.body)return e(document.body);document.addEventListener("DOMContentLoaded",()=>{e(document.body)})})}$d().then(()=>jd()).then(()=>{const e=document.createElement("div");document.body.append(e),Hl.createRoot(e).render(Ii.jsx(es.StrictMode,{children:Ii.jsx(Ud,{})}))});export{es as R,af as _,Fd as a,Id as b,Ad as c,ff as g,Ii as j,Au as r}; diff --git a/dist/copilot_web/workflowChat-2b2JOI-A.js b/dist/copilot_web/workflowChat-nlzNpdzN.js similarity index 88% rename from dist/copilot_web/workflowChat-2b2JOI-A.js rename to dist/copilot_web/workflowChat-nlzNpdzN.js index 8259de0..30ad90e 100644 --- a/dist/copilot_web/workflowChat-2b2JOI-A.js +++ b/dist/copilot_web/workflowChat-nlzNpdzN.js @@ -1,13 +1,13 @@ -import{j as C,r as Ke,R as Nw,a as sr,c as Ag,g as t_,b as r_}from"./input.js";const n_={apiBaseUrl:"https://comfyui-copilot-server.onrender.com"};function br(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const r=Math.random()*16|0;return(t==="x"?r:r&3|8).toString(16)})}const $u=n_.apiBaseUrl,xu=()=>localStorage.getItem("chatApiKey");var _i;(t=>{async function*r(a,o,s=[],l=null,u=null){try{const c=xu();if(!c){yield{text:`API key is required. Please set your API key first.⚙ -If you don't have an API key, please email us at ComfyUI-Copilot@service.alibaba.com and we will get back to you as soon as possible.`,finished:!0};return}const h=(s||[]).map(b=>new Promise((y,$)=>{const k=new FileReader;k.onloadend=()=>y(k.result),k.onerror=$,k.readAsDataURL(b)})),d=await Promise.all(h),v=(await fetch(`${$u}/api/chat/invoke`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${c}`,"trace-id":br()},body:JSON.stringify({session_id:a,prompt:o,mock:!1,intent:l,ext:u,images:d.map((b,y)=>({filename:s[y].name,data:b}))})})).body.getReader();let g="";for(;;){const{done:b,value:y}=await v.read();if(b)break;g+=new TextDecoder().decode(y);const $=g.split(` -`);g=$.pop()||"";for(const k of $)k.trim()&&(yield JSON.parse(k))}g.trim()&&(yield JSON.parse(g))}catch(c){throw console.error("Error in streamInvokeServer:",c),alert(c instanceof Error?c.message:"An error occurred while streaming, please refresh the page and try again."),c}}t.streamInvokeServer=r;async function e(a,o){try{const s=xu(),u=await(await fetch(`${$u}/api/chat/get_optimized_workflow`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${s}`,"trace-id":br()},body:JSON.stringify({workflow_id:a,prompt:o})})).json();if(!u.success){const c=u.message||"Failed to get optimized workflow";throw alert(c),new Error(c)}return u.data}catch(s){throw console.error("Error getting optimized workflow:",s),alert(s instanceof Error?s.message:"Failed to get optimized workflow"),s}}t.getOptimizedWorkflow=e;async function n(a){const o=xu(),l=await(await fetch(`${$u}/api/chat/get_node_info_by_types`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`,"trace-id":br()},body:JSON.stringify({node_types:a})})).json();if(!l.success){const u=l.message||"Failed to get node info by types";throw alert(u),new Error(u)}return l.data}t.batchGetNodeInfo=n;async function i(a){try{const o=xu(),l=await(await fetch(`${$u}/api/chat/get_messages_by_session_id?session_id=${a}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${o}`,"trace-id":br()}})).json();if(!l.success){const u=l.message||"Failed to fetch messages";throw alert(u+", please refresh the page and try again."),new Error(u)}return l.data.map(u=>(console.log("msg.ext",u.ext),{id:u.id.toString(),content:u.role==="ai"?JSON.stringify({session_id:a,text:u.content,finished:u.finished||!1,format:u.format||"markdown",ext:u.ext}):u.content,role:u.role,name:u.role==="ai"?"Assistant":void 0,format:u.format||"markdown",finished:u.finished}))}catch(o){throw console.error("Error fetching messages:",o),alert(o instanceof Error?o.message:"Failed to fetch messages, please refresh the page and try again."),o}}t.fetchMessages=i})(_i||(_i={}));function i_(t){return C.jsxs("svg",{...t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"m22 2-7 20-4-9-9-4Z"}),C.jsx("path",{d:"M22 2 11 13"})]})}function $c(t){return C.jsxs("svg",{...t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M18 6 6 18"}),C.jsx("path",{d:"m6 6 12 12"})]})}function a_(t){return C.jsxs("svg",{...t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M3 6h18"}),C.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),C.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})}function o_(t){return C.jsxs("svg",{...t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),C.jsx("circle",{cx:"9",cy:"9",r:"2"}),C.jsx("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]})}function s_(t){return C.jsxs("svg",{...t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M12 5v14"}),C.jsx("path",{d:"M5 12h14"})]})}function l_(t){return C.jsxs("svg",{...t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}),C.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function u_({isOpen:t,onClose:r,onSave:e,initialApiKey:n=""}){const[i,a]=Ke.useState(n),[o,s]=Ke.useState(!1);return Ke.useEffect(()=>{a(n)},[n]),t?C.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-25 flex items-center justify-center z-50",children:C.jsxs("div",{className:"bg-white rounded-lg p-6 w-96 shadow-xl",children:[C.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Set API Key"}),C.jsxs("div",{className:"relative",children:[C.jsx("input",{type:o?"text":"password",value:i,onChange:l=>a(l.target.value),placeholder:"Enter your API key",className:"w-full px-3 py-2 border border-gray-300 rounded-md mb-4 pr-10 bg-gray-50"}),C.jsx("button",{type:"button",className:"absolute inset-y-0 right-0 pr-3 flex items-center text-gray-600 hover:text-gray-800",onClick:()=>s(!o),children:o?C.jsxs("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}):C.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})})})]}),C.jsxs("div",{className:"mb-4 text-sm text-gray-600",children:[C.jsx("span",{children:"Don't have an API key? "}),C.jsx("a",{href:"https://form.typeform.com/to/d1AaMgIL",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-600 underline",children:"Click here to request one"})]}),C.jsxs("div",{className:"flex justify-end gap-2",children:[C.jsx("button",{onClick:r,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md",children:"Cancel"}),C.jsx("button",{onClick:()=>{e(i),r()},className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600",children:"Save"})]})]})}):null}function c_({onClose:t,onClear:r,hasMessages:e}){const[n,i]=Ke.useState(!1),a=()=>{i(!0)},o=s=>{localStorage.setItem("chatApiKey",s)};return C.jsxs("div",{className:`flex items-center justify-between border-b px-4 py-3 +import{j as C,r as Ve,R as Nw,a as sr,c as Ag,g as t_,b as r_}from"./input.js";const n_={apiBaseUrl:"https://comfyui-copilot-server.onrender.com"};function br(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const r=Math.random()*16|0;return(t==="x"?r:r&3|8).toString(16)})}const $u=n_.apiBaseUrl,xu=()=>localStorage.getItem("chatApiKey");var _i;(t=>{async function*r(a,o,s=[],l=null,u=null){try{const c=xu();if(!c){yield{text:`API key is required. Please set your API key first.⚙ +If you don't have an API key, please email us at ComfyUI-Copilot@service.alibaba.com and we will get back to you as soon as possible.`,finished:!0};return}const h=(s||[]).map(b=>new Promise((y,$)=>{const k=new FileReader;k.onloadend=()=>y(k.result),k.onerror=$,k.readAsDataURL(b)})),d=await Promise.all(h),v=(await fetch(`${$u}/api/chat/invoke`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${c}`,"trace-id":br()},body:JSON.stringify({session_id:a,prompt:o,mock:!1,intent:l,ext:u,images:d.map((b,y)=>({filename:s[y].name,data:b}))})})).body.getReader();let m="";for(;;){const{done:b,value:y}=await v.read();if(b)break;m+=new TextDecoder().decode(y);const $=m.split(` +`);m=$.pop()||"";for(const k of $)k.trim()&&(yield JSON.parse(k))}m.trim()&&(yield JSON.parse(m))}catch(c){throw console.error("Error in streamInvokeServer:",c),alert(c instanceof Error?c.message:"An error occurred while streaming, please refresh the page and try again."),c}}t.streamInvokeServer=r;async function e(a,o){try{const s=xu(),u=await(await fetch(`${$u}/api/chat/get_optimized_workflow`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${s}`,"trace-id":br()},body:JSON.stringify({workflow_id:a,prompt:o})})).json();if(!u.success){const c=u.message||"Failed to get optimized workflow";throw alert(c),new Error(c)}return u.data}catch(s){throw console.error("Error getting optimized workflow:",s),alert(s instanceof Error?s.message:"Failed to get optimized workflow"),s}}t.getOptimizedWorkflow=e;async function n(a){const o=xu(),l=await(await fetch(`${$u}/api/chat/get_node_info_by_types`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`,"trace-id":br()},body:JSON.stringify({node_types:a})})).json();if(!l.success){const u=l.message||"Failed to get node info by types";throw alert(u),new Error(u)}return l.data}t.batchGetNodeInfo=n;async function i(a){try{const o=xu(),l=await(await fetch(`${$u}/api/chat/get_messages_by_session_id?session_id=${a}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${o}`,"trace-id":br()}})).json();if(!l.success){const u=l.message||"Failed to fetch messages";throw alert(u+", please refresh the page and try again."),new Error(u)}return l.data.map(u=>(console.log("msg.ext",u.ext),{id:u.id.toString(),content:u.role==="ai"?JSON.stringify({session_id:a,text:u.content,finished:u.finished||!1,format:u.format||"markdown",ext:u.ext}):u.content,role:u.role,name:u.role==="ai"?"Assistant":void 0,format:u.format||"markdown",finished:u.finished}))}catch(o){throw console.error("Error fetching messages:",o),alert(o instanceof Error?o.message:"Failed to fetch messages, please refresh the page and try again."),o}}t.fetchMessages=i})(_i||(_i={}));function i_(t){return C.jsxs("svg",{...t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"m22 2-7 20-4-9-9-4Z"}),C.jsx("path",{d:"M22 2 11 13"})]})}function $c(t){return C.jsxs("svg",{...t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M18 6 6 18"}),C.jsx("path",{d:"m6 6 12 12"})]})}function a_(t){return C.jsxs("svg",{...t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M3 6h18"}),C.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),C.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})}function o_(t){return C.jsxs("svg",{...t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),C.jsx("circle",{cx:"9",cy:"9",r:"2"}),C.jsx("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]})}function s_(t){return C.jsxs("svg",{...t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M12 5v14"}),C.jsx("path",{d:"M5 12h14"})]})}function l_(t){return C.jsxs("svg",{...t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}),C.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function u_({isOpen:t,onClose:r,onSave:e,initialApiKey:n=""}){const[i,a]=Ve.useState(n),[o,s]=Ve.useState(!1);return Ve.useEffect(()=>{a(n)},[n]),t?C.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-25 flex items-center justify-center z-50",children:C.jsxs("div",{className:"bg-white rounded-lg p-6 w-96 shadow-xl",children:[C.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Set API Key"}),C.jsxs("div",{className:"relative",children:[C.jsx("input",{type:o?"text":"password",value:i,onChange:l=>a(l.target.value),placeholder:"Enter your API key",className:"w-full px-3 py-2 border border-gray-300 rounded-md mb-4 pr-10 bg-gray-50"}),C.jsx("button",{type:"button",className:"absolute inset-y-0 right-0 pr-3 flex items-center text-gray-600 hover:text-gray-800",onClick:()=>s(!o),children:o?C.jsxs("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}):C.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})})})]}),C.jsxs("div",{className:"mb-4 text-sm text-gray-600",children:[C.jsx("span",{children:"Don't have an API key? "}),C.jsx("a",{href:"https://form.typeform.com/to/d1AaMgIL",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-600 underline",children:"Click here to request one"})]}),C.jsxs("div",{className:"flex justify-end gap-2",children:[C.jsx("button",{onClick:r,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md",children:"Cancel"}),C.jsx("button",{onClick:()=>{e(i),r()},className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600",children:"Save"})]})]})}):null}function c_({onClose:t,onClear:r,hasMessages:e}){const[n,i]=Ve.useState(!1),a=()=>{i(!0)},o=s=>{localStorage.setItem("chatApiKey",s)};return C.jsxs("div",{className:`flex items-center justify-between border-b px-4 py-3 bg-white border-gray-200 sticky top-0 z-10`,children:[C.jsxs("div",{className:"flex items-center space-x-2",children:[C.jsx("h3",{className:"text-lg font-medium text-gray-800",children:"copilot"}),C.jsx("button",{onClick:a,className:"p-1 hover:bg-gray-100 rounded text-gray-500",children:C.jsx(l_,{className:"h-5 w-5"})})]}),C.jsxs("div",{className:"flex items-center gap-1",children:[C.jsx("button",{className:`inline-flex items-center justify-center rounded-md p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-600 disabled:opacity-50 transition-colors duration-200`,disabled:!e,onClick:r,children:C.jsx(a_,{className:"h-5 w-5"})}),C.jsx("button",{className:`inline-flex items-center justify-center rounded-md p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-600 - transition-colors duration-200`,onClick:t,children:C.jsx($c,{className:"h-5 w-5"})})]}),C.jsx(u_,{isOpen:n,onClose:()=>i(!1),onSave:o,initialApiKey:localStorage.getItem("chatApiKey")||""})]})}const h_=5*1024*1024,Mg=["image/jpeg","image/png","image/gif","image/webp"];function d_({input:t,loading:r,onChange:e,onSend:n,onKeyPress:i,onUploadImages:a,uploadedImages:o,onRemoveImage:s}){const[l,u]=Ke.useState(!1),c=Nw.useRef(null),h=d=>{if(d.target.files){const f=[],v=[];if(Array.from(d.target.files).forEach(g=>{Mg.includes(g.type)?g.size>h_?f.push(`${g.name} (exceeds 5MB)`):v.push(g):f.push(`${g.name} (unsupported format)`)}),f.length>0&&alert(`The following files couldn't be uploaded: + transition-colors duration-200`,onClick:t,children:C.jsx($c,{className:"h-5 w-5"})})]}),C.jsx(u_,{isOpen:n,onClose:()=>i(!1),onSave:o,initialApiKey:localStorage.getItem("chatApiKey")||""})]})}const h_=5*1024*1024,Mg=["image/jpeg","image/png","image/gif","image/webp"];function d_({input:t,loading:r,onChange:e,onSend:n,onKeyPress:i,onUploadImages:a,uploadedImages:o,onRemoveImage:s}){const[l,u]=Ve.useState(!1),c=Nw.useRef(null),h=d=>{if(d.target.files){const f=[],v=[];if(Array.from(d.target.files).forEach(m=>{Mg.includes(m.type)?m.size>h_?f.push(`${m.name} (exceeds 5MB)`):v.push(m):f.push(`${m.name} (unsupported format)`)}),f.length>0&&alert(`The following files couldn't be uploaded: ${f.join(` -`)}`),v.length>0){const g=new DataTransfer;v.forEach(b=>g.items.add(b)),a(g.files)}}};return C.jsxs("div",{className:`relative ${o.length>0?"mt-12":""}`,children:[o.length>0&&C.jsx("div",{className:"absolute -top-10 left-0 flex gap-2",children:o.map(d=>C.jsxs("div",{className:"relative group",children:[C.jsx("img",{src:d.preview,alt:"uploaded",className:"w-8 h-8 rounded object-cover"}),C.jsx("button",{onClick:()=>s(d.id),className:`absolute -top-1 -right-1 bg-red-500 text-white rounded-full p-0.5 +`)}`),v.length>0){const m=new DataTransfer;v.forEach(b=>m.items.add(b)),a(m.files)}}};return C.jsxs("div",{className:`relative ${o.length>0?"mt-12":""}`,children:[o.length>0&&C.jsx("div",{className:"absolute -top-10 left-0 flex gap-2",children:o.map(d=>C.jsxs("div",{className:"relative group",children:[C.jsx("img",{src:d.preview,alt:"uploaded",className:"w-8 h-8 rounded object-cover"}),C.jsx("button",{onClick:()=>s(d.id),className:`absolute -top-1 -right-1 bg-red-500 text-white rounded-full p-0.5 opacity-0 group-hover:opacity-100 transition-opacity`,children:C.jsx($c,{className:"w-3 h-3"})})]},d.id))}),C.jsx("textarea",{onChange:e,onKeyDown:d=>{if(d.key==="Enter"&&!d.shiftKey){if(d.nativeEvent.isComposing)return;d.preventDefault(),n()}i(d)},value:t,placeholder:"Type your message...",className:`w-full min-h-[80px] resize-none rounded-md border border-gray-200 px-3 py-2 pr-12 text-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 @@ -28,20 +28,20 @@ ${f.join(` hover:bg-blue-100 text-blue-700 transition-all duration-200 hover:shadow-sm active:scale-95`,onClick:()=>r("node_explain"),disabled:e,children:"Usage"}),C.jsx("button",{className:`px-3 py-1 text-xs rounded bg-green-100 hover:bg-green-200 text-green-700 transition-colors`,onClick:()=>r("node_params"),disabled:e,children:"Parameters"}),C.jsx("button",{className:`px-3 py-1 text-xs rounded bg-purple-100 - hover:bg-purple-200 text-purple-700 transition-colors`,onClick:()=>r("downstream_subgraph_search",f_()),disabled:e,children:"Downstream Nodes"})]})]})})}function pm({name:t,isUser:r=!1,children:e}){return C.jsx("div",{className:"flex flex-col w-full items-start gap-2 py-2 animate-fadeIn",children:C.jsx("div",{className:"w-full",children:e})})}function p_({content:t}){return C.jsx(pm,{name:"User",isUser:!0,children:C.jsx("div",{className:"w-full rounded-lg border border-gray-700 p-4 text-gray-700 text-sm break-words",children:C.jsx("p",{className:"whitespace-pre-wrap",children:t})})})}function Dg(t){const r=[],e=String(t||"");let n=e.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=e.length,a=!0);const o=e.slice(i,n).trim();(o||!a)&&r.push(o),i=n+1,n=e.indexOf(",",i)}return r}function m_(t,r){const e={};return(t[t.length-1]===""?[...t,""]:t).join((e.padRight?" ":"")+","+(e.padLeft===!1?"":" ")).trim()}const g_=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,y_=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,b_={};function Ng(t,r){return(b_.jsx?y_:g_).test(t)}const w_=/[ \t\n\f\r]/g;function $_(t){return typeof t=="object"?t.type==="text"?Rg(t.value):!1:Rg(t)}function Rg(t){return t.replace(w_,"")===""}class xl{constructor(r,e,n){this.property=r,this.normal=e,n&&(this.space=n)}}xl.prototype.property={};xl.prototype.normal={};xl.prototype.space=null;function Rw(t,r){const e={},n={};let i=-1;for(;++i4&&e.slice(0,4)==="data"&&T_.test(r)){if(r.charAt(4)==="-"){const a=r.slice(5).replace(zg,I_);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=r.slice(4);if(!zg.test(a)){let o=a.replace(__,O_);o.charAt(0)!=="-"&&(o="-"+o),r="data"+o}}i=mm}return new i(n,r)}function O_(t){return"-"+t.toLowerCase()}function I_(t){return t.charAt(1).toUpperCase()}const C_={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"},Uw=Rw([Bw,zw,Hw,Ww,S_],"html"),Eh=Rw([Bw,zw,Hw,Ww,E_],"svg");function Dv(t){const r=String(t||"").trim();return r?r.split(/[ \t\n\r\f]+/g):[]}function P_(t){return t.join(" ").trim()}var Vw={},Bg=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,A_=/\n/g,M_=/^\s*/,D_=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,N_=/^:\s*/,R_=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,F_=/^[;\s]*/,z_=/^\s+|\s+$/g,B_=` -`,Lg="/",jg="*",aa="",L_="comment",j_="declaration",H_=function(t,r){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];r=r||{};var e=1,n=1;function i(v){var g=v.match(A_);g&&(e+=g.length);var b=v.lastIndexOf(B_);n=~b?v.length-b:n+v.length}function a(){var v={line:e,column:n};return function(g){return g.position=new o(v),u(),g}}function o(v){this.start=v,this.end={line:e,column:n},this.source=r.source}o.prototype.content=t;function s(v){var g=new Error(r.source+":"+e+":"+n+": "+v);if(g.reason=v,g.filename=r.source,g.line=e,g.column=n,g.source=t,!r.silent)throw g}function l(v){var g=v.exec(t);if(g){var b=g[0];return i(b),t=t.slice(b.length),g}}function u(){l(M_)}function c(v){var g;for(v=v||[];g=h();)g!==!1&&v.push(g);return v}function h(){var v=a();if(!(Lg!=t.charAt(0)||jg!=t.charAt(1))){for(var g=2;aa!=t.charAt(g)&&(jg!=t.charAt(g)||Lg!=t.charAt(g+1));)++g;if(g+=2,aa===t.charAt(g-1))return s("End of comment missing");var b=t.slice(2,g-2);return n+=2,i(b),t=t.slice(g),n+=2,v({type:L_,comment:b})}}function d(){var v=a(),g=l(D_);if(g){if(h(),!l(N_))return s("property missing ':'");var b=l(R_),y=v({type:j_,property:Hg(g[0].replace(Bg,aa)),value:b?Hg(b[0].replace(Bg,aa)):aa});return l(F_),y}}function f(){var v=[];c(v);for(var g;g=d();)g!==!1&&(v.push(g),c(v));return v}return u(),f()};function Hg(t){return t?t.replace(z_,aa):aa}var W_=Ag&&Ag.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Vw,"__esModule",{value:!0});var Wg=Vw.default=U_,q_=W_(H_);function U_(t,r){var e=null;if(!t||typeof t!="string")return e;var n=(0,q_.default)(t),i=typeof r=="function";return n.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?r(o,s,a):s&&(e=e||{},e[o]=s)}}),e}const V_=Wg.default||Wg,Gw=Kw("end"),gm=Kw("start");function Kw(t){return r;function r(e){const n=e&&e.position&&e.position[t]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function G_(t){const r=gm(t),e=Gw(t);if(r&&e)return{start:r,end:e}}function Bs(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?qg(t.position):"start"in t||"end"in t?qg(t):"line"in t||"column"in t?Nv(t):""}function Nv(t){return Ug(t&&t.line)+":"+Ug(t&&t.column)}function qg(t){return Nv(t&&t.start)+"-"+Nv(t&&t.end)}function Ug(t){return t&&typeof t=="number"?t:1}class er extends Error{constructor(r,e,n){super(),typeof e=="string"&&(n=e,e=void 0);let i="",a={},o=!1;if(e&&("line"in e&&"column"in e?a={place:e}:"start"in e&&"end"in e?a={place:e}:"type"in e?a={ancestors:[e],place:e.position}:a={...e}),typeof r=="string"?i=r:!a.cause&&r&&(o=!0,i=r.message,a.cause=r),!a.ruleId&&!a.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?a.ruleId=n:(a.source=n.slice(0,l),a.ruleId=n.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Bs(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}er.prototype.file="";er.prototype.name="";er.prototype.reason="";er.prototype.message="";er.prototype.stack="";er.prototype.column=void 0;er.prototype.line=void 0;er.prototype.ancestors=void 0;er.prototype.cause=void 0;er.prototype.fatal=void 0;er.prototype.place=void 0;er.prototype.ruleId=void 0;er.prototype.source=void 0;const ym={}.hasOwnProperty,K_=new Map,Y_=/[A-Z]/g,X_=/-([a-z])/g,J_=new Set(["table","tbody","thead","tfoot","tr"]),Z_=new Set(["td","th"]),Yw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Q_(t,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const e=r.filePath||void 0;let n;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=sO(e,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=oO(e,r.jsx,r.jsxs)}const i={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:n,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:e,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Eh:Uw,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},a=Xw(i,t,void 0);return a&&typeof a!="string"?a:i.create(t,i.Fragment,{children:a||void 0},void 0)}function Xw(t,r,e){if(r.type==="element")return eO(t,r,e);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return tO(t,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return nO(t,r,e);if(r.type==="mdxjsEsm")return rO(t,r);if(r.type==="root")return iO(t,r,e);if(r.type==="text")return aO(t,r)}function eO(t,r,e){const n=t.schema;let i=n;r.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=Eh,t.schema=i),t.ancestors.push(r);const a=Zw(t,r.tagName,!1),o=lO(t,r);let s=wm(t,r);return J_.has(r.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!$_(l):!0})),Jw(t,o,a,r),bm(o,s),t.ancestors.pop(),t.schema=n,t.create(r,a,o,e)}function tO(t,r){if(r.data&&r.data.estree&&t.evaluater){const n=r.data.estree.body[0];return n.type,t.evaluater.evaluateExpression(n.expression)}tl(t,r.position)}function rO(t,r){if(r.data&&r.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(r.data.estree);tl(t,r.position)}function nO(t,r,e){const n=t.schema;let i=n;r.name==="svg"&&n.space==="html"&&(i=Eh,t.schema=i),t.ancestors.push(r);const a=r.name===null?t.Fragment:Zw(t,r.name,!0),o=uO(t,r),s=wm(t,r);return Jw(t,o,a,r),bm(o,s),t.ancestors.pop(),t.schema=n,t.create(r,a,o,e)}function iO(t,r,e){const n={};return bm(n,wm(t,r)),t.create(r,t.Fragment,n,e)}function aO(t,r){return r.value}function Jw(t,r,e,n){typeof e!="string"&&e!==t.Fragment&&t.passNode&&(r.node=n)}function bm(t,r){if(r.length>0){const e=r.length>1?r:r[0];e&&(t.children=e)}}function oO(t,r,e){return n;function n(i,a,o,s){const u=Array.isArray(o.children)?e:r;return s?u(a,o,s):u(a,o)}}function sO(t,r){return e;function e(n,i,a,o){const s=Array.isArray(a.children),l=gm(n);return r(i,a,o,s,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function lO(t,r){const e={};let n,i;for(i in r.properties)if(i!=="children"&&ym.call(r.properties,i)){const a=cO(t,i,r.properties[i]);if(a){const[o,s]=a;t.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&Z_.has(r.tagName)?n=s:e[o]=s}}if(n){const a=e.style||(e.style={});a[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return e}function uO(t,r){const e={};for(const n of r.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&t.evaluater){const a=n.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(e,t.evaluater.evaluateExpression(s.argument))}else tl(t,r.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&t.evaluater){const s=n.value.data.estree.body[0];s.type,a=t.evaluater.evaluateExpression(s.expression)}else tl(t,r.position);else a=n.value===null?!0:n.value;e[i]=a}return e}function wm(t,r){const e=[];let n=-1;const i=t.passKeys?new Map:K_;for(;++ni?0:i+r:r=r>i?i:r,e=e>0?e:0,n.length<1e4)o=Array.from(n),o.unshift(r,e),t.splice(...o);else for(e&&t.splice(r,e);a0?(Fr(t,t.length,0,r),t):r}const Kg={}.hasOwnProperty;function e7(t){const r={};let e=-1;for(;++e13&&e<32||e>126&&e<160||e>55295&&e<57344||e>64975&&e<65008||(e&65535)===65535||(e&65535)===65534||e>1114111?"�":String.fromCodePoint(e)}function pn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const or=Hi(/[A-Za-z]/),Qt=Hi(/[\dA-Za-z]/),wO=Hi(/[#-'*+\--9=?A-Z^-~]/);function qc(t){return t!==null&&(t<32||t===127)}const Rv=Hi(/\d/),$O=Hi(/[\dA-Fa-f]/),xO=Hi(/[!-/:-@[-`{-~]/);function ve(t){return t!==null&&t<-2}function rt(t){return t!==null&&(t<0||t===32)}function Fe(t){return t===-2||t===-1||t===32}const Th=Hi(new RegExp("\\p{P}|\\p{S}","u")),$a=Hi(/\s/);function Hi(t){return r;function r(e){return e!==null&&e>-1&&t.test(String.fromCharCode(e))}}function Vo(t){const r=[];let e=-1,n=0,i=0;for(;++e55295&&a<57344){const s=t.charCodeAt(e+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(r.push(t.slice(n,e),encodeURIComponent(o)),n=e+i+1,o=""),i&&(e+=i,i=0)}return r.join("")+t.slice(n)}function Re(t,r,e,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(l){return Fe(l)?(t.enter(e),s(l)):r(l)}function s(l){return Fe(l)&&a++o))return;const D=r.events.length;let B=D,R,A;for(;B--;)if(r.events[B][0]==="exit"&&r.events[B][1].type==="chunkFlow"){if(R){A=r.events[B][1].end;break}R=!0}for(y(n),S=D;Sk;){const P=e[_];r.containerState=P[1],P[0].exit.call(r,t)}e.length=k}function $(){i.write([null]),a=void 0,i=void 0,r.containerState._closeFlow=void 0}}function _O(t,r,e){return Re(t,t.attempt(this.parser.constructs.document,r,e),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Io(t){if(t===null||rt(t)||$a(t))return 1;if(Th(t))return 2}function _h(t,r,e){const n=[];let i=-1;for(;++i1&&t[e][1].end.offset-t[e][1].start.offset>1?2:1;const h={...t[n][1].end},d={...t[e][1].start};Xg(h,-l),Xg(d,l),o={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...t[n][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...t[e][1].start},end:d},a={type:l>1?"strongText":"emphasisText",start:{...t[n][1].end},end:{...t[e][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},t[n][1].end={...o.start},t[e][1].start={...s.end},u=[],t[n][1].end.offset-t[n][1].start.offset&&(u=Vr(u,[["enter",t[n][1],r],["exit",t[n][1],r]])),u=Vr(u,[["enter",i,r],["enter",o,r],["exit",o,r],["enter",a,r]]),u=Vr(u,_h(r.parser.constructs.insideSpan.null,t.slice(n+1,e),r)),u=Vr(u,[["exit",a,r],["enter",s,r],["exit",s,r],["exit",i,r]]),t[e][1].end.offset-t[e][1].start.offset?(c=2,u=Vr(u,[["enter",t[e][1],r],["exit",t[e][1],r]])):c=0,Fr(t,n-1,e-n+3,u),e=n+u.length-c-2;break}}for(e=-1;++e0&&Fe(S)?Re(t,$,"linePrefix",a+1)(S):$(S)}function $(S){return S===null||ve(S)?t.check(Jg,g,_)(S):(t.enter("codeFlowValue"),k(S))}function k(S){return S===null||ve(S)?(t.exit("codeFlowValue"),$(S)):(t.consume(S),k)}function _(S){return t.exit("codeFenced"),r(S)}function P(S,D,B){let R=0;return A;function A(oe){return S.enter("lineEnding"),S.consume(oe),S.exit("lineEnding"),z}function z(oe){return S.enter("codeFencedFence"),Fe(oe)?Re(S,L,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):L(oe)}function L(oe){return oe===s?(S.enter("codeFencedFenceSequence"),J(oe)):B(oe)}function J(oe){return oe===s?(R++,S.consume(oe),J):R>=o?(S.exit("codeFencedFenceSequence"),Fe(oe)?Re(S,ie,"whitespace")(oe):ie(oe)):B(oe)}function ie(oe){return oe===null||ve(oe)?(S.exit("codeFencedFence"),D(oe)):B(oe)}}}function BO(t,r,e){const n=this;return i;function i(o){return o===null?e(o):(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),a)}function a(o){return n.parser.lazy[n.now().line]?e(o):r(o)}}const W0={name:"codeIndented",tokenize:jO},LO={partial:!0,tokenize:HO};function jO(t,r,e){const n=this;return i;function i(u){return t.enter("codeIndented"),Re(t,a,"linePrefix",5)(u)}function a(u){const c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):e(u)}function o(u){return u===null?l(u):ve(u)?t.attempt(LO,o,l)(u):(t.enter("codeFlowValue"),s(u))}function s(u){return u===null||ve(u)?(t.exit("codeFlowValue"),o(u)):(t.consume(u),s)}function l(u){return t.exit("codeIndented"),r(u)}}function HO(t,r,e){const n=this;return i;function i(o){return n.parser.lazy[n.now().line]?e(o):ve(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i):Re(t,a,"linePrefix",5)(o)}function a(o){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?r(o):ve(o)?i(o):e(o)}}const WO={name:"codeText",previous:UO,resolve:qO,tokenize:VO};function qO(t){let r=t.length-4,e=3,n,i;if((t[e][1].type==="lineEnding"||t[e][1].type==="space")&&(t[r][1].type==="lineEnding"||t[r][1].type==="space")){for(n=e;++n=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return rthis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(r,e,n){const i=e||0;this.setCursor(Math.trunc(r));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Ss(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Ss(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Ss(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r=4?r(o):t.interrupt(n.parser.constructs.flow,e,r)(o)}}function o7(t,r,e,n,i,a,o,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return h;function h(y){return y===60?(t.enter(n),t.enter(i),t.enter(a),t.consume(y),t.exit(a),d):y===null||y===32||y===41||qc(y)?e(y):(t.enter(n),t.enter(o),t.enter(s),t.enter("chunkString",{contentType:"string"}),g(y))}function d(y){return y===62?(t.enter(a),t.consume(y),t.exit(a),t.exit(i),t.exit(n),r):(t.enter(s),t.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(t.exit("chunkString"),t.exit(s),d(y)):y===null||y===60||ve(y)?e(y):(t.consume(y),y===92?v:f)}function v(y){return y===60||y===62||y===92?(t.consume(y),f):f(y)}function g(y){return!c&&(y===null||y===41||rt(y))?(t.exit("chunkString"),t.exit(s),t.exit(o),t.exit(n),r(y)):c999||f===null||f===91||f===93&&!l||f===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?e(f):f===93?(t.exit(a),t.enter(i),t.consume(f),t.exit(i),t.exit(n),r):ve(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||ve(f)||s++>999?(t.exit("chunkString"),c(f)):(t.consume(f),l||(l=!Fe(f)),f===92?d:h)}function d(f){return f===91||f===92||f===93?(t.consume(f),s++,h):h(f)}}function l7(t,r,e,n,i,a){let o;return s;function s(d){return d===34||d===39||d===40?(t.enter(n),t.enter(i),t.consume(d),t.exit(i),o=d===40?41:d,l):e(d)}function l(d){return d===o?(t.enter(i),t.consume(d),t.exit(i),t.exit(n),r):(t.enter(a),u(d))}function u(d){return d===o?(t.exit(a),l(o)):d===null?e(d):ve(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Re(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||ve(d)?(t.exit("chunkString"),u(d)):(t.consume(d),d===92?h:c)}function h(d){return d===o||d===92?(t.consume(d),c):c(d)}}function Ls(t,r){let e;return n;function n(i){return ve(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),e=!0,n):Fe(i)?Re(t,n,e?"linePrefix":"lineSuffix")(i):r(i)}}const eI={name:"definition",tokenize:rI},tI={partial:!0,tokenize:nI};function rI(t,r,e){const n=this;let i;return a;function a(f){return t.enter("definition"),o(f)}function o(f){return s7.call(n,t,s,e,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return i=pn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(t.enter("definitionMarker"),t.consume(f),t.exit("definitionMarker"),l):e(f)}function l(f){return rt(f)?Ls(t,u)(f):u(f)}function u(f){return o7(t,c,e,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return t.attempt(tI,h,h)(f)}function h(f){return Fe(f)?Re(t,d,"whitespace")(f):d(f)}function d(f){return f===null||ve(f)?(t.exit("definition"),n.parser.defined.push(i),r(f)):e(f)}}function nI(t,r,e){return n;function n(s){return rt(s)?Ls(t,i)(s):e(s)}function i(s){return l7(t,a,e,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Fe(s)?Re(t,o,"whitespace")(s):o(s)}function o(s){return s===null||ve(s)?r(s):e(s)}}const iI={name:"hardBreakEscape",tokenize:aI};function aI(t,r,e){return n;function n(a){return t.enter("hardBreakEscape"),t.consume(a),i}function i(a){return ve(a)?(t.exit("hardBreakEscape"),r(a)):e(a)}}const oI={name:"headingAtx",resolve:sI,tokenize:lI};function sI(t,r){let e=t.length-2,n=3,i,a;return t[n][1].type==="whitespace"&&(n+=2),e-2>n&&t[e][1].type==="whitespace"&&(e-=2),t[e][1].type==="atxHeadingSequence"&&(n===e-1||e-4>n&&t[e-2][1].type==="whitespace")&&(e-=n+1===e?2:4),e>n&&(i={type:"atxHeadingText",start:t[n][1].start,end:t[e][1].end},a={type:"chunkText",start:t[n][1].start,end:t[e][1].end,contentType:"text"},Fr(t,n,e-n+1,[["enter",i,r],["enter",a,r],["exit",a,r],["exit",i,r]])),t}function lI(t,r,e){let n=0;return i;function i(c){return t.enter("atxHeading"),a(c)}function a(c){return t.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&n++<6?(t.consume(c),o):c===null||rt(c)?(t.exit("atxHeadingSequence"),s(c)):e(c)}function s(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||ve(c)?(t.exit("atxHeading"),r(c)):Fe(c)?Re(t,s,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function l(c){return c===35?(t.consume(c),l):(t.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||rt(c)?(t.exit("atxHeadingText"),s(c)):(t.consume(c),u)}}const uI=["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","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Qg=["pre","script","style","textarea"],cI={concrete:!0,name:"htmlFlow",resolveTo:fI,tokenize:vI},hI={partial:!0,tokenize:mI},dI={partial:!0,tokenize:pI};function fI(t){let r=t.length;for(;r--&&!(t[r][0]==="enter"&&t[r][1].type==="htmlFlow"););return r>1&&t[r-2][1].type==="linePrefix"&&(t[r][1].start=t[r-2][1].start,t[r+1][1].start=t[r-2][1].start,t.splice(r-2,2)),t}function vI(t,r,e){const n=this;let i,a,o,s,l;return u;function u(I){return c(I)}function c(I){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(I),h}function h(I){return I===33?(t.consume(I),d):I===47?(t.consume(I),a=!0,g):I===63?(t.consume(I),i=3,n.interrupt?r:T):or(I)?(t.consume(I),o=String.fromCharCode(I),b):e(I)}function d(I){return I===45?(t.consume(I),i=2,f):I===91?(t.consume(I),i=5,s=0,v):or(I)?(t.consume(I),i=4,n.interrupt?r:T):e(I)}function f(I){return I===45?(t.consume(I),n.interrupt?r:T):e(I)}function v(I){const De="CDATA[";return I===De.charCodeAt(s++)?(t.consume(I),s===De.length?n.interrupt?r:L:v):e(I)}function g(I){return or(I)?(t.consume(I),o=String.fromCharCode(I),b):e(I)}function b(I){if(I===null||I===47||I===62||rt(I)){const De=I===47,qe=o.toLowerCase();return!De&&!a&&Qg.includes(qe)?(i=1,n.interrupt?r(I):L(I)):uI.includes(o.toLowerCase())?(i=6,De?(t.consume(I),y):n.interrupt?r(I):L(I)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?e(I):a?$(I):k(I))}return I===45||Qt(I)?(t.consume(I),o+=String.fromCharCode(I),b):e(I)}function y(I){return I===62?(t.consume(I),n.interrupt?r:L):e(I)}function $(I){return Fe(I)?(t.consume(I),$):A(I)}function k(I){return I===47?(t.consume(I),A):I===58||I===95||or(I)?(t.consume(I),_):Fe(I)?(t.consume(I),k):A(I)}function _(I){return I===45||I===46||I===58||I===95||Qt(I)?(t.consume(I),_):P(I)}function P(I){return I===61?(t.consume(I),S):Fe(I)?(t.consume(I),P):k(I)}function S(I){return I===null||I===60||I===61||I===62||I===96?e(I):I===34||I===39?(t.consume(I),l=I,D):Fe(I)?(t.consume(I),S):B(I)}function D(I){return I===l?(t.consume(I),l=null,R):I===null||ve(I)?e(I):(t.consume(I),D)}function B(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||rt(I)?P(I):(t.consume(I),B)}function R(I){return I===47||I===62||Fe(I)?k(I):e(I)}function A(I){return I===62?(t.consume(I),z):e(I)}function z(I){return I===null||ve(I)?L(I):Fe(I)?(t.consume(I),z):e(I)}function L(I){return I===45&&i===2?(t.consume(I),me):I===60&&i===1?(t.consume(I),Ce):I===62&&i===4?(t.consume(I),ge):I===63&&i===3?(t.consume(I),T):I===93&&i===5?(t.consume(I),ue):ve(I)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(hI,ye,J)(I)):I===null||ve(I)?(t.exit("htmlFlowData"),J(I)):(t.consume(I),L)}function J(I){return t.check(dI,ie,ye)(I)}function ie(I){return t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),oe}function oe(I){return I===null||ve(I)?J(I):(t.enter("htmlFlowData"),L(I))}function me(I){return I===45?(t.consume(I),T):L(I)}function Ce(I){return I===47?(t.consume(I),o="",ne):L(I)}function ne(I){if(I===62){const De=o.toLowerCase();return Qg.includes(De)?(t.consume(I),ge):L(I)}return or(I)&&o.length<8?(t.consume(I),o+=String.fromCharCode(I),ne):L(I)}function ue(I){return I===93?(t.consume(I),T):L(I)}function T(I){return I===62?(t.consume(I),ge):I===45&&i===2?(t.consume(I),T):L(I)}function ge(I){return I===null||ve(I)?(t.exit("htmlFlowData"),ye(I)):(t.consume(I),ge)}function ye(I){return t.exit("htmlFlow"),r(I)}}function pI(t,r,e){const n=this;return i;function i(o){return ve(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),a):e(o)}function a(o){return n.parser.lazy[n.now().line]?e(o):r(o)}}function mI(t,r,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(kl,r,e)}}const gI={name:"htmlText",tokenize:yI};function yI(t,r,e){const n=this;let i,a,o;return s;function s(T){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(T),l}function l(T){return T===33?(t.consume(T),u):T===47?(t.consume(T),P):T===63?(t.consume(T),k):or(T)?(t.consume(T),B):e(T)}function u(T){return T===45?(t.consume(T),c):T===91?(t.consume(T),a=0,v):or(T)?(t.consume(T),$):e(T)}function c(T){return T===45?(t.consume(T),f):e(T)}function h(T){return T===null?e(T):T===45?(t.consume(T),d):ve(T)?(o=h,Ce(T)):(t.consume(T),h)}function d(T){return T===45?(t.consume(T),f):h(T)}function f(T){return T===62?me(T):T===45?d(T):h(T)}function v(T){const ge="CDATA[";return T===ge.charCodeAt(a++)?(t.consume(T),a===ge.length?g:v):e(T)}function g(T){return T===null?e(T):T===93?(t.consume(T),b):ve(T)?(o=g,Ce(T)):(t.consume(T),g)}function b(T){return T===93?(t.consume(T),y):g(T)}function y(T){return T===62?me(T):T===93?(t.consume(T),y):g(T)}function $(T){return T===null||T===62?me(T):ve(T)?(o=$,Ce(T)):(t.consume(T),$)}function k(T){return T===null?e(T):T===63?(t.consume(T),_):ve(T)?(o=k,Ce(T)):(t.consume(T),k)}function _(T){return T===62?me(T):k(T)}function P(T){return or(T)?(t.consume(T),S):e(T)}function S(T){return T===45||Qt(T)?(t.consume(T),S):D(T)}function D(T){return ve(T)?(o=D,Ce(T)):Fe(T)?(t.consume(T),D):me(T)}function B(T){return T===45||Qt(T)?(t.consume(T),B):T===47||T===62||rt(T)?R(T):e(T)}function R(T){return T===47?(t.consume(T),me):T===58||T===95||or(T)?(t.consume(T),A):ve(T)?(o=R,Ce(T)):Fe(T)?(t.consume(T),R):me(T)}function A(T){return T===45||T===46||T===58||T===95||Qt(T)?(t.consume(T),A):z(T)}function z(T){return T===61?(t.consume(T),L):ve(T)?(o=z,Ce(T)):Fe(T)?(t.consume(T),z):R(T)}function L(T){return T===null||T===60||T===61||T===62||T===96?e(T):T===34||T===39?(t.consume(T),i=T,J):ve(T)?(o=L,Ce(T)):Fe(T)?(t.consume(T),L):(t.consume(T),ie)}function J(T){return T===i?(t.consume(T),i=void 0,oe):T===null?e(T):ve(T)?(o=J,Ce(T)):(t.consume(T),J)}function ie(T){return T===null||T===34||T===39||T===60||T===61||T===96?e(T):T===47||T===62||rt(T)?R(T):(t.consume(T),ie)}function oe(T){return T===47||T===62||rt(T)?R(T):e(T)}function me(T){return T===62?(t.consume(T),t.exit("htmlTextData"),t.exit("htmlText"),r):e(T)}function Ce(T){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),ne}function ne(T){return Fe(T)?Re(t,ue,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):ue(T)}function ue(T){return t.enter("htmlTextData"),o(T)}}const km={name:"labelEnd",resolveAll:xI,resolveTo:kI,tokenize:SI},bI={tokenize:EI},wI={tokenize:TI},$I={tokenize:_I};function xI(t){let r=-1;const e=[];for(;++r=3&&(u===null||ve(u))?(t.exit("thematicBreak"),r(u)):e(u)}function l(u){return u===i?(t.consume(u),n++,l):(t.exit("thematicBreakSequence"),Fe(u)?Re(t,s,"whitespace")(u):s(u))}}const pr={continuation:{tokenize:FI},exit:BI,name:"list",tokenize:RI},DI={partial:!0,tokenize:LI},NI={partial:!0,tokenize:zI};function RI(t,r,e){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(f){const v=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:Rv(f)){if(n.containerState.type||(n.containerState.type=v,t.enter(v,{_container:!0})),v==="listUnordered")return t.enter("listItemPrefix"),f===42||f===45?t.check(xc,e,u)(f):u(f);if(!n.interrupt||f===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(f)}return e(f)}function l(f){return Rv(f)&&++o<10?(t.consume(f),l):(!n.interrupt||o<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(t.exit("listItemValue"),u(f)):e(f)}function u(f){return t.enter("listItemMarker"),t.consume(f),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,t.check(kl,n.interrupt?e:c,t.attempt(DI,d,h))}function c(f){return n.containerState.initialBlankLine=!0,a++,d(f)}function h(f){return Fe(f)?(t.enter("listItemPrefixWhitespace"),t.consume(f),t.exit("listItemPrefixWhitespace"),d):e(f)}function d(f){return n.containerState.size=a+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,r(f)}}function FI(t,r,e){const n=this;return n.containerState._closeFlow=void 0,t.check(kl,i,a);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Re(t,r,"listItemIndent",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!Fe(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(NI,r,o)(s))}function o(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,Re(t,t.attempt(pr,r,e),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function zI(t,r,e){const n=this;return Re(t,i,"listItemIndent",n.containerState.size+1);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?r(a):e(a)}}function BI(t){t.exit(this.containerState.type)}function LI(t,r,e){const n=this;return Re(t,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=n.events[n.events.length-1];return!Fe(a)&&o&&o[1].type==="listItemPrefixWhitespace"?r(a):e(a)}}const ey={name:"setextUnderline",resolveTo:jI,tokenize:HI};function jI(t,r){let e=t.length,n,i,a;for(;e--;)if(t[e][0]==="enter"){if(t[e][1].type==="content"){n=e;break}t[e][1].type==="paragraph"&&(i=e)}else t[e][1].type==="content"&&t.splice(e,1),!a&&t[e][1].type==="definition"&&(a=e);const o={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",a?(t.splice(i,0,["enter",o,r]),t.splice(a+1,0,["exit",t[n][1],r]),t[n][1].end={...t[a][1].end}):t[n][1]=o,t.push(["exit",o,r]),t}function HI(t,r,e){const n=this;let i;return a;function a(u){let c=n.events.length,h;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){h=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(t.enter("setextHeadingLine"),i=u,o(u)):e(u)}function o(u){return t.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(t.consume(u),s):(t.exit("setextHeadingLineSequence"),Fe(u)?Re(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ve(u)?(t.exit("setextHeadingLine"),r(u)):e(u)}}const WI={tokenize:qI};function qI(t){const r=this,e=t.attempt(kl,n,t.attempt(this.parser.constructs.flowInitial,i,Re(t,t.attempt(this.parser.constructs.flow,i,t.attempt(YO,i)),"linePrefix")));return e;function n(a){if(a===null){t.consume(a);return}return t.enter("lineEndingBlank"),t.consume(a),t.exit("lineEndingBlank"),r.currentConstruct=void 0,e}function i(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),r.currentConstruct=void 0,e}}const UI={resolveAll:c7()},VI=u7("string"),GI=u7("text");function u7(t){return{resolveAll:c7(t==="text"?KI:void 0),tokenize:r};function r(e){const n=this,i=this.parser.constructs[t],a=e.attempt(i,o,s);return o;function o(c){return u(c)?a(c):s(c)}function s(c){if(c===null){e.consume(c);return}return e.enter("data"),e.consume(c),l}function l(c){return u(c)?(e.exit("data"),a(c)):(e.consume(c),l)}function u(c){if(c===null)return!0;const h=i[c];let d=-1;if(h)for(;++d-1){const s=o[0];typeof s=="string"?o[0]=s.slice(n):o.shift()}a>0&&o.push(t[i].slice(0,a))}return o}function sC(t,r){let e=-1;const n=[];let i;for(;++er("downstream_subgraph_search",f_()),disabled:e,children:"Downstream Nodes"})]})]})})}function pm({name:t,isUser:r=!1,children:e}){return C.jsx("div",{className:"flex flex-col w-full items-start gap-2 py-2 animate-fadeIn",children:C.jsx("div",{className:"w-full",children:e})})}function p_({content:t}){return C.jsx(pm,{name:"User",isUser:!0,children:C.jsx("div",{className:"w-full rounded-lg border border-gray-700 p-4 text-gray-700 text-sm break-words",children:C.jsx("p",{className:"whitespace-pre-wrap",children:t})})})}function Dg(t){const r=[],e=String(t||"");let n=e.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=e.length,a=!0);const o=e.slice(i,n).trim();(o||!a)&&r.push(o),i=n+1,n=e.indexOf(",",i)}return r}function m_(t,r){const e={};return(t[t.length-1]===""?[...t,""]:t).join((e.padRight?" ":"")+","+(e.padLeft===!1?"":" ")).trim()}const g_=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,y_=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,b_={};function Ng(t,r){return(b_.jsx?y_:g_).test(t)}const w_=/[ \t\n\f\r]/g;function $_(t){return typeof t=="object"?t.type==="text"?Rg(t.value):!1:Rg(t)}function Rg(t){return t.replace(w_,"")===""}class xl{constructor(r,e,n){this.property=r,this.normal=e,n&&(this.space=n)}}xl.prototype.property={};xl.prototype.normal={};xl.prototype.space=null;function Rw(t,r){const e={},n={};let i=-1;for(;++i4&&e.slice(0,4)==="data"&&T_.test(r)){if(r.charAt(4)==="-"){const a=r.slice(5).replace(zg,I_);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=r.slice(4);if(!zg.test(a)){let o=a.replace(__,O_);o.charAt(0)!=="-"&&(o="-"+o),r="data"+o}}i=mm}return new i(n,r)}function O_(t){return"-"+t.toLowerCase()}function I_(t){return t.charAt(1).toUpperCase()}const C_={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"},Uw=Rw([Bw,zw,Hw,Ww,S_],"html"),Eh=Rw([Bw,zw,Hw,Ww,E_],"svg");function Dv(t){const r=String(t||"").trim();return r?r.split(/[ \t\n\r\f]+/g):[]}function P_(t){return t.join(" ").trim()}var Vw={},Bg=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,A_=/\n/g,M_=/^\s*/,D_=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,N_=/^:\s*/,R_=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,F_=/^[;\s]*/,z_=/^\s+|\s+$/g,B_=` +`,Lg="/",jg="*",aa="",L_="comment",j_="declaration",H_=function(t,r){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];r=r||{};var e=1,n=1;function i(v){var m=v.match(A_);m&&(e+=m.length);var b=v.lastIndexOf(B_);n=~b?v.length-b:n+v.length}function a(){var v={line:e,column:n};return function(m){return m.position=new o(v),u(),m}}function o(v){this.start=v,this.end={line:e,column:n},this.source=r.source}o.prototype.content=t;function s(v){var m=new Error(r.source+":"+e+":"+n+": "+v);if(m.reason=v,m.filename=r.source,m.line=e,m.column=n,m.source=t,!r.silent)throw m}function l(v){var m=v.exec(t);if(m){var b=m[0];return i(b),t=t.slice(b.length),m}}function u(){l(M_)}function c(v){var m;for(v=v||[];m=h();)m!==!1&&v.push(m);return v}function h(){var v=a();if(!(Lg!=t.charAt(0)||jg!=t.charAt(1))){for(var m=2;aa!=t.charAt(m)&&(jg!=t.charAt(m)||Lg!=t.charAt(m+1));)++m;if(m+=2,aa===t.charAt(m-1))return s("End of comment missing");var b=t.slice(2,m-2);return n+=2,i(b),t=t.slice(m),n+=2,v({type:L_,comment:b})}}function d(){var v=a(),m=l(D_);if(m){if(h(),!l(N_))return s("property missing ':'");var b=l(R_),y=v({type:j_,property:Hg(m[0].replace(Bg,aa)),value:b?Hg(b[0].replace(Bg,aa)):aa});return l(F_),y}}function f(){var v=[];c(v);for(var m;m=d();)m!==!1&&(v.push(m),c(v));return v}return u(),f()};function Hg(t){return t?t.replace(z_,aa):aa}var W_=Ag&&Ag.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Vw,"__esModule",{value:!0});var Wg=Vw.default=U_,q_=W_(H_);function U_(t,r){var e=null;if(!t||typeof t!="string")return e;var n=(0,q_.default)(t),i=typeof r=="function";return n.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?r(o,s,a):s&&(e=e||{},e[o]=s)}}),e}const V_=Wg.default||Wg,Gw=Kw("end"),gm=Kw("start");function Kw(t){return r;function r(e){const n=e&&e.position&&e.position[t]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function G_(t){const r=gm(t),e=Gw(t);if(r&&e)return{start:r,end:e}}function Bs(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?qg(t.position):"start"in t||"end"in t?qg(t):"line"in t||"column"in t?Nv(t):""}function Nv(t){return Ug(t&&t.line)+":"+Ug(t&&t.column)}function qg(t){return Nv(t&&t.start)+"-"+Nv(t&&t.end)}function Ug(t){return t&&typeof t=="number"?t:1}class er extends Error{constructor(r,e,n){super(),typeof e=="string"&&(n=e,e=void 0);let i="",a={},o=!1;if(e&&("line"in e&&"column"in e?a={place:e}:"start"in e&&"end"in e?a={place:e}:"type"in e?a={ancestors:[e],place:e.position}:a={...e}),typeof r=="string"?i=r:!a.cause&&r&&(o=!0,i=r.message,a.cause=r),!a.ruleId&&!a.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?a.ruleId=n:(a.source=n.slice(0,l),a.ruleId=n.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Bs(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}er.prototype.file="";er.prototype.name="";er.prototype.reason="";er.prototype.message="";er.prototype.stack="";er.prototype.column=void 0;er.prototype.line=void 0;er.prototype.ancestors=void 0;er.prototype.cause=void 0;er.prototype.fatal=void 0;er.prototype.place=void 0;er.prototype.ruleId=void 0;er.prototype.source=void 0;const ym={}.hasOwnProperty,K_=new Map,Y_=/[A-Z]/g,X_=/-([a-z])/g,J_=new Set(["table","tbody","thead","tfoot","tr"]),Z_=new Set(["td","th"]),Yw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Q_(t,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const e=r.filePath||void 0;let n;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=sO(e,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=oO(e,r.jsx,r.jsxs)}const i={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:n,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:e,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Eh:Uw,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},a=Xw(i,t,void 0);return a&&typeof a!="string"?a:i.create(t,i.Fragment,{children:a||void 0},void 0)}function Xw(t,r,e){if(r.type==="element")return eO(t,r,e);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return tO(t,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return nO(t,r,e);if(r.type==="mdxjsEsm")return rO(t,r);if(r.type==="root")return iO(t,r,e);if(r.type==="text")return aO(t,r)}function eO(t,r,e){const n=t.schema;let i=n;r.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=Eh,t.schema=i),t.ancestors.push(r);const a=Zw(t,r.tagName,!1),o=lO(t,r);let s=wm(t,r);return J_.has(r.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!$_(l):!0})),Jw(t,o,a,r),bm(o,s),t.ancestors.pop(),t.schema=n,t.create(r,a,o,e)}function tO(t,r){if(r.data&&r.data.estree&&t.evaluater){const n=r.data.estree.body[0];return n.type,t.evaluater.evaluateExpression(n.expression)}tl(t,r.position)}function rO(t,r){if(r.data&&r.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(r.data.estree);tl(t,r.position)}function nO(t,r,e){const n=t.schema;let i=n;r.name==="svg"&&n.space==="html"&&(i=Eh,t.schema=i),t.ancestors.push(r);const a=r.name===null?t.Fragment:Zw(t,r.name,!0),o=uO(t,r),s=wm(t,r);return Jw(t,o,a,r),bm(o,s),t.ancestors.pop(),t.schema=n,t.create(r,a,o,e)}function iO(t,r,e){const n={};return bm(n,wm(t,r)),t.create(r,t.Fragment,n,e)}function aO(t,r){return r.value}function Jw(t,r,e,n){typeof e!="string"&&e!==t.Fragment&&t.passNode&&(r.node=n)}function bm(t,r){if(r.length>0){const e=r.length>1?r:r[0];e&&(t.children=e)}}function oO(t,r,e){return n;function n(i,a,o,s){const u=Array.isArray(o.children)?e:r;return s?u(a,o,s):u(a,o)}}function sO(t,r){return e;function e(n,i,a,o){const s=Array.isArray(a.children),l=gm(n);return r(i,a,o,s,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function lO(t,r){const e={};let n,i;for(i in r.properties)if(i!=="children"&&ym.call(r.properties,i)){const a=cO(t,i,r.properties[i]);if(a){const[o,s]=a;t.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&Z_.has(r.tagName)?n=s:e[o]=s}}if(n){const a=e.style||(e.style={});a[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return e}function uO(t,r){const e={};for(const n of r.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&t.evaluater){const a=n.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(e,t.evaluater.evaluateExpression(s.argument))}else tl(t,r.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&t.evaluater){const s=n.value.data.estree.body[0];s.type,a=t.evaluater.evaluateExpression(s.expression)}else tl(t,r.position);else a=n.value===null?!0:n.value;e[i]=a}return e}function wm(t,r){const e=[];let n=-1;const i=t.passKeys?new Map:K_;for(;++ni?0:i+r:r=r>i?i:r,e=e>0?e:0,n.length<1e4)o=Array.from(n),o.unshift(r,e),t.splice(...o);else for(e&&t.splice(r,e);a0?(Fr(t,t.length,0,r),t):r}const Kg={}.hasOwnProperty;function e7(t){const r={};let e=-1;for(;++e13&&e<32||e>126&&e<160||e>55295&&e<57344||e>64975&&e<65008||(e&65535)===65535||(e&65535)===65534||e>1114111?"�":String.fromCodePoint(e)}function pn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const or=Hi(/[A-Za-z]/),Qt=Hi(/[\dA-Za-z]/),wO=Hi(/[#-'*+\--9=?A-Z^-~]/);function qc(t){return t!==null&&(t<32||t===127)}const Rv=Hi(/\d/),$O=Hi(/[\dA-Fa-f]/),xO=Hi(/[!-/:-@[-`{-~]/);function ve(t){return t!==null&&t<-2}function rt(t){return t!==null&&(t<0||t===32)}function Ne(t){return t===-2||t===-1||t===32}const Th=Hi(new RegExp("\\p{P}|\\p{S}","u")),$a=Hi(/\s/);function Hi(t){return r;function r(e){return e!==null&&e>-1&&t.test(String.fromCharCode(e))}}function Vo(t){const r=[];let e=-1,n=0,i=0;for(;++e55295&&a<57344){const s=t.charCodeAt(e+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(r.push(t.slice(n,e),encodeURIComponent(o)),n=e+i+1,o=""),i&&(e+=i,i=0)}return r.join("")+t.slice(n)}function De(t,r,e,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(l){return Ne(l)?(t.enter(e),s(l)):r(l)}function s(l){return Ne(l)&&a++o))return;const D=r.events.length;let B=D,R,A;for(;B--;)if(r.events[B][0]==="exit"&&r.events[B][1].type==="chunkFlow"){if(R){A=r.events[B][1].end;break}R=!0}for(y(n),E=D;Ek;){const P=e[O];r.containerState=P[1],P[0].exit.call(r,t)}e.length=k}function $(){i.write([null]),a=void 0,i=void 0,r.containerState._closeFlow=void 0}}function _O(t,r,e){return De(t,t.attempt(this.parser.constructs.document,r,e),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Io(t){if(t===null||rt(t)||$a(t))return 1;if(Th(t))return 2}function _h(t,r,e){const n=[];let i=-1;for(;++i1&&t[e][1].end.offset-t[e][1].start.offset>1?2:1;const h={...t[n][1].end},d={...t[e][1].start};Xg(h,-l),Xg(d,l),o={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...t[n][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...t[e][1].start},end:d},a={type:l>1?"strongText":"emphasisText",start:{...t[n][1].end},end:{...t[e][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},t[n][1].end={...o.start},t[e][1].start={...s.end},u=[],t[n][1].end.offset-t[n][1].start.offset&&(u=Vr(u,[["enter",t[n][1],r],["exit",t[n][1],r]])),u=Vr(u,[["enter",i,r],["enter",o,r],["exit",o,r],["enter",a,r]]),u=Vr(u,_h(r.parser.constructs.insideSpan.null,t.slice(n+1,e),r)),u=Vr(u,[["exit",a,r],["enter",s,r],["exit",s,r],["exit",i,r]]),t[e][1].end.offset-t[e][1].start.offset?(c=2,u=Vr(u,[["enter",t[e][1],r],["exit",t[e][1],r]])):c=0,Fr(t,n-1,e-n+3,u),e=n+u.length-c-2;break}}for(e=-1;++e0&&Ne(E)?De(t,$,"linePrefix",a+1)(E):$(E)}function $(E){return E===null||ve(E)?t.check(Jg,m,O)(E):(t.enter("codeFlowValue"),k(E))}function k(E){return E===null||ve(E)?(t.exit("codeFlowValue"),$(E)):(t.consume(E),k)}function O(E){return t.exit("codeFenced"),r(E)}function P(E,D,B){let R=0;return A;function A(ae){return E.enter("lineEnding"),E.consume(ae),E.exit("lineEnding"),z}function z(ae){return E.enter("codeFencedFence"),Ne(ae)?De(E,L,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):L(ae)}function L(ae){return ae===s?(E.enter("codeFencedFenceSequence"),J(ae)):B(ae)}function J(ae){return ae===s?(R++,E.consume(ae),J):R>=o?(E.exit("codeFencedFenceSequence"),Ne(ae)?De(E,ne,"whitespace")(ae):ne(ae)):B(ae)}function ne(ae){return ae===null||ve(ae)?(E.exit("codeFencedFence"),D(ae)):B(ae)}}}function BO(t,r,e){const n=this;return i;function i(o){return o===null?e(o):(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),a)}function a(o){return n.parser.lazy[n.now().line]?e(o):r(o)}}const W0={name:"codeIndented",tokenize:jO},LO={partial:!0,tokenize:HO};function jO(t,r,e){const n=this;return i;function i(u){return t.enter("codeIndented"),De(t,a,"linePrefix",5)(u)}function a(u){const c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):e(u)}function o(u){return u===null?l(u):ve(u)?t.attempt(LO,o,l)(u):(t.enter("codeFlowValue"),s(u))}function s(u){return u===null||ve(u)?(t.exit("codeFlowValue"),o(u)):(t.consume(u),s)}function l(u){return t.exit("codeIndented"),r(u)}}function HO(t,r,e){const n=this;return i;function i(o){return n.parser.lazy[n.now().line]?e(o):ve(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i):De(t,a,"linePrefix",5)(o)}function a(o){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?r(o):ve(o)?i(o):e(o)}}const WO={name:"codeText",previous:UO,resolve:qO,tokenize:VO};function qO(t){let r=t.length-4,e=3,n,i;if((t[e][1].type==="lineEnding"||t[e][1].type==="space")&&(t[r][1].type==="lineEnding"||t[r][1].type==="space")){for(n=e;++n=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return rthis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(r,e,n){const i=e||0;this.setCursor(Math.trunc(r));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Ss(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Ss(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Ss(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r=4?r(o):t.interrupt(n.parser.constructs.flow,e,r)(o)}}function o7(t,r,e,n,i,a,o,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return h;function h(y){return y===60?(t.enter(n),t.enter(i),t.enter(a),t.consume(y),t.exit(a),d):y===null||y===32||y===41||qc(y)?e(y):(t.enter(n),t.enter(o),t.enter(s),t.enter("chunkString",{contentType:"string"}),m(y))}function d(y){return y===62?(t.enter(a),t.consume(y),t.exit(a),t.exit(i),t.exit(n),r):(t.enter(s),t.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(t.exit("chunkString"),t.exit(s),d(y)):y===null||y===60||ve(y)?e(y):(t.consume(y),y===92?v:f)}function v(y){return y===60||y===62||y===92?(t.consume(y),f):f(y)}function m(y){return!c&&(y===null||y===41||rt(y))?(t.exit("chunkString"),t.exit(s),t.exit(o),t.exit(n),r(y)):c999||f===null||f===91||f===93&&!l||f===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?e(f):f===93?(t.exit(a),t.enter(i),t.consume(f),t.exit(i),t.exit(n),r):ve(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||ve(f)||s++>999?(t.exit("chunkString"),c(f)):(t.consume(f),l||(l=!Ne(f)),f===92?d:h)}function d(f){return f===91||f===92||f===93?(t.consume(f),s++,h):h(f)}}function l7(t,r,e,n,i,a){let o;return s;function s(d){return d===34||d===39||d===40?(t.enter(n),t.enter(i),t.consume(d),t.exit(i),o=d===40?41:d,l):e(d)}function l(d){return d===o?(t.enter(i),t.consume(d),t.exit(i),t.exit(n),r):(t.enter(a),u(d))}function u(d){return d===o?(t.exit(a),l(o)):d===null?e(d):ve(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),De(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||ve(d)?(t.exit("chunkString"),u(d)):(t.consume(d),d===92?h:c)}function h(d){return d===o||d===92?(t.consume(d),c):c(d)}}function Ls(t,r){let e;return n;function n(i){return ve(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),e=!0,n):Ne(i)?De(t,n,e?"linePrefix":"lineSuffix")(i):r(i)}}const eI={name:"definition",tokenize:rI},tI={partial:!0,tokenize:nI};function rI(t,r,e){const n=this;let i;return a;function a(f){return t.enter("definition"),o(f)}function o(f){return s7.call(n,t,s,e,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return i=pn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(t.enter("definitionMarker"),t.consume(f),t.exit("definitionMarker"),l):e(f)}function l(f){return rt(f)?Ls(t,u)(f):u(f)}function u(f){return o7(t,c,e,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return t.attempt(tI,h,h)(f)}function h(f){return Ne(f)?De(t,d,"whitespace")(f):d(f)}function d(f){return f===null||ve(f)?(t.exit("definition"),n.parser.defined.push(i),r(f)):e(f)}}function nI(t,r,e){return n;function n(s){return rt(s)?Ls(t,i)(s):e(s)}function i(s){return l7(t,a,e,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ne(s)?De(t,o,"whitespace")(s):o(s)}function o(s){return s===null||ve(s)?r(s):e(s)}}const iI={name:"hardBreakEscape",tokenize:aI};function aI(t,r,e){return n;function n(a){return t.enter("hardBreakEscape"),t.consume(a),i}function i(a){return ve(a)?(t.exit("hardBreakEscape"),r(a)):e(a)}}const oI={name:"headingAtx",resolve:sI,tokenize:lI};function sI(t,r){let e=t.length-2,n=3,i,a;return t[n][1].type==="whitespace"&&(n+=2),e-2>n&&t[e][1].type==="whitespace"&&(e-=2),t[e][1].type==="atxHeadingSequence"&&(n===e-1||e-4>n&&t[e-2][1].type==="whitespace")&&(e-=n+1===e?2:4),e>n&&(i={type:"atxHeadingText",start:t[n][1].start,end:t[e][1].end},a={type:"chunkText",start:t[n][1].start,end:t[e][1].end,contentType:"text"},Fr(t,n,e-n+1,[["enter",i,r],["enter",a,r],["exit",a,r],["exit",i,r]])),t}function lI(t,r,e){let n=0;return i;function i(c){return t.enter("atxHeading"),a(c)}function a(c){return t.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&n++<6?(t.consume(c),o):c===null||rt(c)?(t.exit("atxHeadingSequence"),s(c)):e(c)}function s(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||ve(c)?(t.exit("atxHeading"),r(c)):Ne(c)?De(t,s,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function l(c){return c===35?(t.consume(c),l):(t.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||rt(c)?(t.exit("atxHeadingText"),s(c)):(t.consume(c),u)}}const uI=["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","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Qg=["pre","script","style","textarea"],cI={concrete:!0,name:"htmlFlow",resolveTo:fI,tokenize:vI},hI={partial:!0,tokenize:mI},dI={partial:!0,tokenize:pI};function fI(t){let r=t.length;for(;r--&&!(t[r][0]==="enter"&&t[r][1].type==="htmlFlow"););return r>1&&t[r-2][1].type==="linePrefix"&&(t[r][1].start=t[r-2][1].start,t[r+1][1].start=t[r-2][1].start,t.splice(r-2,2)),t}function vI(t,r,e){const n=this;let i,a,o,s,l;return u;function u(_){return c(_)}function c(_){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(_),h}function h(_){return _===33?(t.consume(_),d):_===47?(t.consume(_),a=!0,m):_===63?(t.consume(_),i=3,n.interrupt?r:S):or(_)?(t.consume(_),o=String.fromCharCode(_),b):e(_)}function d(_){return _===45?(t.consume(_),i=2,f):_===91?(t.consume(_),i=5,s=0,v):or(_)?(t.consume(_),i=4,n.interrupt?r:S):e(_)}function f(_){return _===45?(t.consume(_),n.interrupt?r:S):e(_)}function v(_){const _e="CDATA[";return _===_e.charCodeAt(s++)?(t.consume(_),s===_e.length?n.interrupt?r:L:v):e(_)}function m(_){return or(_)?(t.consume(_),o=String.fromCharCode(_),b):e(_)}function b(_){if(_===null||_===47||_===62||rt(_)){const _e=_===47,Fe=o.toLowerCase();return!_e&&!a&&Qg.includes(Fe)?(i=1,n.interrupt?r(_):L(_)):uI.includes(o.toLowerCase())?(i=6,_e?(t.consume(_),y):n.interrupt?r(_):L(_)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?e(_):a?$(_):k(_))}return _===45||Qt(_)?(t.consume(_),o+=String.fromCharCode(_),b):e(_)}function y(_){return _===62?(t.consume(_),n.interrupt?r:L):e(_)}function $(_){return Ne(_)?(t.consume(_),$):A(_)}function k(_){return _===47?(t.consume(_),A):_===58||_===95||or(_)?(t.consume(_),O):Ne(_)?(t.consume(_),k):A(_)}function O(_){return _===45||_===46||_===58||_===95||Qt(_)?(t.consume(_),O):P(_)}function P(_){return _===61?(t.consume(_),E):Ne(_)?(t.consume(_),P):k(_)}function E(_){return _===null||_===60||_===61||_===62||_===96?e(_):_===34||_===39?(t.consume(_),l=_,D):Ne(_)?(t.consume(_),E):B(_)}function D(_){return _===l?(t.consume(_),l=null,R):_===null||ve(_)?e(_):(t.consume(_),D)}function B(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||rt(_)?P(_):(t.consume(_),B)}function R(_){return _===47||_===62||Ne(_)?k(_):e(_)}function A(_){return _===62?(t.consume(_),z):e(_)}function z(_){return _===null||ve(_)?L(_):Ne(_)?(t.consume(_),z):e(_)}function L(_){return _===45&&i===2?(t.consume(_),me):_===60&&i===1?(t.consume(_),Ie):_===62&&i===4?(t.consume(_),se):_===63&&i===3?(t.consume(_),S):_===93&&i===5?(t.consume(_),Le):ve(_)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(hI,ue,J)(_)):_===null||ve(_)?(t.exit("htmlFlowData"),J(_)):(t.consume(_),L)}function J(_){return t.check(dI,ne,ue)(_)}function ne(_){return t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),ae}function ae(_){return _===null||ve(_)?J(_):(t.enter("htmlFlowData"),L(_))}function me(_){return _===45?(t.consume(_),S):L(_)}function Ie(_){return _===47?(t.consume(_),o="",Re):L(_)}function Re(_){if(_===62){const _e=o.toLowerCase();return Qg.includes(_e)?(t.consume(_),se):L(_)}return or(_)&&o.length<8?(t.consume(_),o+=String.fromCharCode(_),Re):L(_)}function Le(_){return _===93?(t.consume(_),S):L(_)}function S(_){return _===62?(t.consume(_),se):_===45&&i===2?(t.consume(_),S):L(_)}function se(_){return _===null||ve(_)?(t.exit("htmlFlowData"),ue(_)):(t.consume(_),se)}function ue(_){return t.exit("htmlFlow"),r(_)}}function pI(t,r,e){const n=this;return i;function i(o){return ve(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),a):e(o)}function a(o){return n.parser.lazy[n.now().line]?e(o):r(o)}}function mI(t,r,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(kl,r,e)}}const gI={name:"htmlText",tokenize:yI};function yI(t,r,e){const n=this;let i,a,o;return s;function s(S){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(S),l}function l(S){return S===33?(t.consume(S),u):S===47?(t.consume(S),P):S===63?(t.consume(S),k):or(S)?(t.consume(S),B):e(S)}function u(S){return S===45?(t.consume(S),c):S===91?(t.consume(S),a=0,v):or(S)?(t.consume(S),$):e(S)}function c(S){return S===45?(t.consume(S),f):e(S)}function h(S){return S===null?e(S):S===45?(t.consume(S),d):ve(S)?(o=h,Ie(S)):(t.consume(S),h)}function d(S){return S===45?(t.consume(S),f):h(S)}function f(S){return S===62?me(S):S===45?d(S):h(S)}function v(S){const se="CDATA[";return S===se.charCodeAt(a++)?(t.consume(S),a===se.length?m:v):e(S)}function m(S){return S===null?e(S):S===93?(t.consume(S),b):ve(S)?(o=m,Ie(S)):(t.consume(S),m)}function b(S){return S===93?(t.consume(S),y):m(S)}function y(S){return S===62?me(S):S===93?(t.consume(S),y):m(S)}function $(S){return S===null||S===62?me(S):ve(S)?(o=$,Ie(S)):(t.consume(S),$)}function k(S){return S===null?e(S):S===63?(t.consume(S),O):ve(S)?(o=k,Ie(S)):(t.consume(S),k)}function O(S){return S===62?me(S):k(S)}function P(S){return or(S)?(t.consume(S),E):e(S)}function E(S){return S===45||Qt(S)?(t.consume(S),E):D(S)}function D(S){return ve(S)?(o=D,Ie(S)):Ne(S)?(t.consume(S),D):me(S)}function B(S){return S===45||Qt(S)?(t.consume(S),B):S===47||S===62||rt(S)?R(S):e(S)}function R(S){return S===47?(t.consume(S),me):S===58||S===95||or(S)?(t.consume(S),A):ve(S)?(o=R,Ie(S)):Ne(S)?(t.consume(S),R):me(S)}function A(S){return S===45||S===46||S===58||S===95||Qt(S)?(t.consume(S),A):z(S)}function z(S){return S===61?(t.consume(S),L):ve(S)?(o=z,Ie(S)):Ne(S)?(t.consume(S),z):R(S)}function L(S){return S===null||S===60||S===61||S===62||S===96?e(S):S===34||S===39?(t.consume(S),i=S,J):ve(S)?(o=L,Ie(S)):Ne(S)?(t.consume(S),L):(t.consume(S),ne)}function J(S){return S===i?(t.consume(S),i=void 0,ae):S===null?e(S):ve(S)?(o=J,Ie(S)):(t.consume(S),J)}function ne(S){return S===null||S===34||S===39||S===60||S===61||S===96?e(S):S===47||S===62||rt(S)?R(S):(t.consume(S),ne)}function ae(S){return S===47||S===62||rt(S)?R(S):e(S)}function me(S){return S===62?(t.consume(S),t.exit("htmlTextData"),t.exit("htmlText"),r):e(S)}function Ie(S){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),Re}function Re(S){return Ne(S)?De(t,Le,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):Le(S)}function Le(S){return t.enter("htmlTextData"),o(S)}}const km={name:"labelEnd",resolveAll:xI,resolveTo:kI,tokenize:SI},bI={tokenize:EI},wI={tokenize:TI},$I={tokenize:_I};function xI(t){let r=-1;const e=[];for(;++r=3&&(u===null||ve(u))?(t.exit("thematicBreak"),r(u)):e(u)}function l(u){return u===i?(t.consume(u),n++,l):(t.exit("thematicBreakSequence"),Ne(u)?De(t,s,"whitespace")(u):s(u))}}const pr={continuation:{tokenize:FI},exit:BI,name:"list",tokenize:RI},DI={partial:!0,tokenize:LI},NI={partial:!0,tokenize:zI};function RI(t,r,e){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(f){const v=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:Rv(f)){if(n.containerState.type||(n.containerState.type=v,t.enter(v,{_container:!0})),v==="listUnordered")return t.enter("listItemPrefix"),f===42||f===45?t.check(xc,e,u)(f):u(f);if(!n.interrupt||f===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(f)}return e(f)}function l(f){return Rv(f)&&++o<10?(t.consume(f),l):(!n.interrupt||o<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(t.exit("listItemValue"),u(f)):e(f)}function u(f){return t.enter("listItemMarker"),t.consume(f),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,t.check(kl,n.interrupt?e:c,t.attempt(DI,d,h))}function c(f){return n.containerState.initialBlankLine=!0,a++,d(f)}function h(f){return Ne(f)?(t.enter("listItemPrefixWhitespace"),t.consume(f),t.exit("listItemPrefixWhitespace"),d):e(f)}function d(f){return n.containerState.size=a+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,r(f)}}function FI(t,r,e){const n=this;return n.containerState._closeFlow=void 0,t.check(kl,i,a);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,De(t,r,"listItemIndent",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!Ne(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(NI,r,o)(s))}function o(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,De(t,t.attempt(pr,r,e),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function zI(t,r,e){const n=this;return De(t,i,"listItemIndent",n.containerState.size+1);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?r(a):e(a)}}function BI(t){t.exit(this.containerState.type)}function LI(t,r,e){const n=this;return De(t,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=n.events[n.events.length-1];return!Ne(a)&&o&&o[1].type==="listItemPrefixWhitespace"?r(a):e(a)}}const ey={name:"setextUnderline",resolveTo:jI,tokenize:HI};function jI(t,r){let e=t.length,n,i,a;for(;e--;)if(t[e][0]==="enter"){if(t[e][1].type==="content"){n=e;break}t[e][1].type==="paragraph"&&(i=e)}else t[e][1].type==="content"&&t.splice(e,1),!a&&t[e][1].type==="definition"&&(a=e);const o={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",a?(t.splice(i,0,["enter",o,r]),t.splice(a+1,0,["exit",t[n][1],r]),t[n][1].end={...t[a][1].end}):t[n][1]=o,t.push(["exit",o,r]),t}function HI(t,r,e){const n=this;let i;return a;function a(u){let c=n.events.length,h;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){h=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(t.enter("setextHeadingLine"),i=u,o(u)):e(u)}function o(u){return t.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(t.consume(u),s):(t.exit("setextHeadingLineSequence"),Ne(u)?De(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ve(u)?(t.exit("setextHeadingLine"),r(u)):e(u)}}const WI={tokenize:qI};function qI(t){const r=this,e=t.attempt(kl,n,t.attempt(this.parser.constructs.flowInitial,i,De(t,t.attempt(this.parser.constructs.flow,i,t.attempt(YO,i)),"linePrefix")));return e;function n(a){if(a===null){t.consume(a);return}return t.enter("lineEndingBlank"),t.consume(a),t.exit("lineEndingBlank"),r.currentConstruct=void 0,e}function i(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),r.currentConstruct=void 0,e}}const UI={resolveAll:c7()},VI=u7("string"),GI=u7("text");function u7(t){return{resolveAll:c7(t==="text"?KI:void 0),tokenize:r};function r(e){const n=this,i=this.parser.constructs[t],a=e.attempt(i,o,s);return o;function o(c){return u(c)?a(c):s(c)}function s(c){if(c===null){e.consume(c);return}return e.enter("data"),e.consume(c),l}function l(c){return u(c)?(e.exit("data"),a(c)):(e.consume(c),l)}function u(c){if(c===null)return!0;const h=i[c];let d=-1;if(h)for(;++d-1){const s=o[0];typeof s=="string"?o[0]=s.slice(n):o.shift()}a>0&&o.push(t[i].slice(0,a))}return o}function sC(t,r){let e=-1;const n=[];let i;for(;++e0){const sn=Ie.tokenStack[Ie.tokenStack.length-1];(sn[1]||ry).call(Ie,void 0,sn[0])}for(ae.position={start:vi(j.length>0?j[0][1].start:{line:1,column:1,offset:0}),end:vi(j.length>0?j[j.length-2][1].end:{line:1,column:1,offset:0})},et=-1;++et0){const sn=Oe.tokenStack[Oe.tokenStack.length-1];(sn[1]||ry).call(Oe,void 0,sn[0])}for(ie.position={start:vi(j.length>0?j[0][1].start:{line:1,column:1,offset:0}),end:vi(j.length>0?j[j.length-2][1].end:{line:1,column:1,offset:0})},et=-1;++et1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};t.patch(r,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(r,u),t.applyData(r,u)}function SC(t,r){const e={type:"element",tagName:"h"+r.depth,properties:{},children:t.all(r)};return t.patch(r,e),t.applyData(r,e)}function EC(t,r){if(t.options.allowDangerousHtml){const e={type:"raw",value:r.value};return t.patch(r,e),t.applyData(r,e)}}function f7(t,r){const e=r.referenceType;let n="]";if(e==="collapsed"?n+="[]":e==="full"&&(n+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+n}];const i=t.all(r),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=n:i.push({type:"text",value:n}),i}function TC(t,r){const e=String(r.identifier).toUpperCase(),n=t.definitionById.get(e);if(!n)return f7(t,r);const i={src:Vo(n.url||""),alt:r.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return t.patch(r,a),t.applyData(r,a)}function _C(t,r){const e={src:Vo(r.url)};r.alt!==null&&r.alt!==void 0&&(e.alt=r.alt),r.title!==null&&r.title!==void 0&&(e.title=r.title);const n={type:"element",tagName:"img",properties:e,children:[]};return t.patch(r,n),t.applyData(r,n)}function OC(t,r){const e={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};t.patch(r,e);const n={type:"element",tagName:"code",properties:{},children:[e]};return t.patch(r,n),t.applyData(r,n)}function IC(t,r){const e=String(r.identifier).toUpperCase(),n=t.definitionById.get(e);if(!n)return f7(t,r);const i={href:Vo(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:t.all(r)};return t.patch(r,a),t.applyData(r,a)}function CC(t,r){const e={href:Vo(r.url)};r.title!==null&&r.title!==void 0&&(e.title=r.title);const n={type:"element",tagName:"a",properties:e,children:t.all(r)};return t.patch(r,n),t.applyData(r,n)}function PC(t,r,e){const n=t.all(r),i=e?AC(e):v7(r),a={},o=[];if(typeof r.checked=="boolean"){const c=n[0];let h;c&&c.type==="element"&&c.tagName==="p"?h=c:(h={type:"element",tagName:"p",properties:{},children:[]},n.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s1}function MC(t,r){const e={},n=t.all(r);let i=-1;for(typeof r.start=="number"&&r.start!==1&&(e.start=r.start);++i0){const o={type:"element",tagName:"tbody",properties:{},children:t.wrap(e,!0)},s=gm(r.children[1]),l=Gw(r.children[r.children.length-1]);s&&l&&(o.position={start:s,end:l}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(r,a),t.applyData(r,a)}function zC(t,r,e){const n=e?e.children:void 0,a=(n?n.indexOf(r):1)===0?"th":"td",o=e&&e.type==="table"?e.align:void 0,s=o?o.length:r.children.length;let l=-1;const u=[];for(;++l0,!0),n[0]),i=n.index+n[0].length,n=e.exec(r);return a.push(ay(r.slice(i),i>0,!1)),a.join("")}function ay(t,r,e){let n=0,i=t.length;if(r){let a=t.codePointAt(n);for(;a===ny||a===iy;)n++,a=t.codePointAt(n)}if(e){let a=t.codePointAt(i-1);for(;a===ny||a===iy;)i--,a=t.codePointAt(i-1)}return i>n?t.slice(n,i):""}function jC(t,r){const e={type:"text",value:LC(String(r.value))};return t.patch(r,e),t.applyData(r,e)}function HC(t,r){const e={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(r,e),t.applyData(r,e)}const WC={blockquote:yC,break:bC,code:wC,delete:$C,emphasis:xC,footnoteReference:kC,heading:SC,html:EC,imageReference:TC,image:_C,inlineCode:OC,linkReference:IC,link:CC,listItem:PC,list:MC,paragraph:DC,root:NC,strong:RC,table:FC,tableCell:BC,tableRow:zC,text:jC,thematicBreak:HC,toml:ku,yaml:ku,definition:ku,footnoteDefinition:ku};function ku(){}const p7=-1,Oh=0,Uc=1,Vc=2,Sm=3,Em=4,Tm=5,_m=6,m7=7,g7=8,oy=typeof self=="object"?self:globalThis,qC=(t,r)=>{const e=(i,a)=>(t.set(a,i),i),n=i=>{if(t.has(i))return t.get(i);const[a,o]=r[i];switch(a){case Oh:case p7:return e(o,i);case Uc:{const s=e([],i);for(const l of o)s.push(n(l));return s}case Vc:{const s=e({},i);for(const[l,u]of o)s[n(l)]=n(u);return s}case Sm:return e(new Date(o),i);case Em:{const{source:s,flags:l}=o;return e(new RegExp(s,l),i)}case Tm:{const s=e(new Map,i);for(const[l,u]of o)s.set(n(l),n(u));return s}case _m:{const s=e(new Set,i);for(const l of o)s.add(n(l));return s}case m7:{const{name:s,message:l}=o;return e(new oy[s](l),i)}case g7:return e(BigInt(o),i);case"BigInt":return e(Object(BigInt(o)),i)}return e(new oy[a](o),i)};return n},sy=t=>qC(new Map,t)(0),Ya="",{toString:UC}={},{keys:VC}=Object,Es=t=>{const r=typeof t;if(r!=="object"||!t)return[Oh,r];const e=UC.call(t).slice(8,-1);switch(e){case"Array":return[Uc,Ya];case"Object":return[Vc,Ya];case"Date":return[Sm,Ya];case"RegExp":return[Em,Ya];case"Map":return[Tm,Ya];case"Set":return[_m,Ya]}return e.includes("Array")?[Uc,e]:e.includes("Error")?[m7,e]:[Vc,e]},Su=([t,r])=>t===Oh&&(r==="function"||r==="symbol"),GC=(t,r,e,n)=>{const i=(o,s)=>{const l=n.push(o)-1;return e.set(s,l),l},a=o=>{if(e.has(o))return e.get(o);let[s,l]=Es(o);switch(s){case Oh:{let c=o;switch(l){case"bigint":s=g7,c=o.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([p7],o)}return i([s,c],o)}case Uc:{if(l)return i([l,[...o]],o);const c=[],h=i([s,c],o);for(const d of o)c.push(a(d));return h}case Vc:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(r&&"toJSON"in o)return a(o.toJSON());const c=[],h=i([s,c],o);for(const d of VC(o))(t||!Su(Es(o[d])))&&c.push([a(d),a(o[d])]);return h}case Sm:return i([s,o.toISOString()],o);case Em:{const{source:c,flags:h}=o;return i([s,{source:c,flags:h}],o)}case Tm:{const c=[],h=i([s,c],o);for(const[d,f]of o)(t||!(Su(Es(d))||Su(Es(f))))&&c.push([a(d),a(f)]);return h}case _m:{const c=[],h=i([s,c],o);for(const d of o)(t||!Su(Es(d)))&&c.push(a(d));return h}}const{message:u}=o;return i([s,{name:l,message:u}],o)};return a},ly=(t,{json:r,lossy:e}={})=>{const n=[];return GC(!(r||e),!!r,new Map,n)(t),n},ca=typeof structuredClone=="function"?(t,r)=>r&&("json"in r||"lossy"in r)?sy(ly(t,r)):structuredClone(t):(t,r)=>sy(ly(t,r));function KC(t,r){const e=[{type:"text",value:"↩"}];return r>1&&e.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),e}function YC(t,r){return"Back to reference "+(t+1)+(r>1?"-"+r:"")}function XC(t){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",e=t.options.footnoteBackContent||KC,n=t.options.footnoteBackLabel||YC,i=t.options.footnoteLabel||"Footnotes",a=t.options.footnoteLabelTagName||"h2",o=t.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l0&&v.push({type:"text",value:" "});let $=typeof e=="string"?e:e(l,f);typeof $=="string"&&($={type:"text",value:$}),v.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+d+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,f),className:["data-footnote-backref"]},children:Array.isArray($)?$:[$]})}const b=c[c.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const $=b.children[b.children.length-1];$&&$.type==="text"?$.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...v)}else c.push(...v);const y={type:"element",tagName:"li",properties:{id:r+"fn-"+d},children:t.wrap(c,!0)};t.patch(u,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ca(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`});const u={type:"element",tagName:"li",properties:a,children:o};return t.patch(r,u),t.applyData(r,u)}function AC(t){let r=!1;if(t.type==="list"){r=t.spread||!1;const e=t.children;let n=-1;for(;!r&&++n1}function MC(t,r){const e={},n=t.all(r);let i=-1;for(typeof r.start=="number"&&r.start!==1&&(e.start=r.start);++i0){const o={type:"element",tagName:"tbody",properties:{},children:t.wrap(e,!0)},s=gm(r.children[1]),l=Gw(r.children[r.children.length-1]);s&&l&&(o.position={start:s,end:l}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(r,a),t.applyData(r,a)}function zC(t,r,e){const n=e?e.children:void 0,a=(n?n.indexOf(r):1)===0?"th":"td",o=e&&e.type==="table"?e.align:void 0,s=o?o.length:r.children.length;let l=-1;const u=[];for(;++l0,!0),n[0]),i=n.index+n[0].length,n=e.exec(r);return a.push(ay(r.slice(i),i>0,!1)),a.join("")}function ay(t,r,e){let n=0,i=t.length;if(r){let a=t.codePointAt(n);for(;a===ny||a===iy;)n++,a=t.codePointAt(n)}if(e){let a=t.codePointAt(i-1);for(;a===ny||a===iy;)i--,a=t.codePointAt(i-1)}return i>n?t.slice(n,i):""}function jC(t,r){const e={type:"text",value:LC(String(r.value))};return t.patch(r,e),t.applyData(r,e)}function HC(t,r){const e={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(r,e),t.applyData(r,e)}const WC={blockquote:yC,break:bC,code:wC,delete:$C,emphasis:xC,footnoteReference:kC,heading:SC,html:EC,imageReference:TC,image:_C,inlineCode:OC,linkReference:IC,link:CC,listItem:PC,list:MC,paragraph:DC,root:NC,strong:RC,table:FC,tableCell:BC,tableRow:zC,text:jC,thematicBreak:HC,toml:ku,yaml:ku,definition:ku,footnoteDefinition:ku};function ku(){}const p7=-1,Oh=0,Uc=1,Vc=2,Sm=3,Em=4,Tm=5,_m=6,m7=7,g7=8,oy=typeof self=="object"?self:globalThis,qC=(t,r)=>{const e=(i,a)=>(t.set(a,i),i),n=i=>{if(t.has(i))return t.get(i);const[a,o]=r[i];switch(a){case Oh:case p7:return e(o,i);case Uc:{const s=e([],i);for(const l of o)s.push(n(l));return s}case Vc:{const s=e({},i);for(const[l,u]of o)s[n(l)]=n(u);return s}case Sm:return e(new Date(o),i);case Em:{const{source:s,flags:l}=o;return e(new RegExp(s,l),i)}case Tm:{const s=e(new Map,i);for(const[l,u]of o)s.set(n(l),n(u));return s}case _m:{const s=e(new Set,i);for(const l of o)s.add(n(l));return s}case m7:{const{name:s,message:l}=o;return e(new oy[s](l),i)}case g7:return e(BigInt(o),i);case"BigInt":return e(Object(BigInt(o)),i)}return e(new oy[a](o),i)};return n},sy=t=>qC(new Map,t)(0),Ya="",{toString:UC}={},{keys:VC}=Object,Es=t=>{const r=typeof t;if(r!=="object"||!t)return[Oh,r];const e=UC.call(t).slice(8,-1);switch(e){case"Array":return[Uc,Ya];case"Object":return[Vc,Ya];case"Date":return[Sm,Ya];case"RegExp":return[Em,Ya];case"Map":return[Tm,Ya];case"Set":return[_m,Ya]}return e.includes("Array")?[Uc,e]:e.includes("Error")?[m7,e]:[Vc,e]},Su=([t,r])=>t===Oh&&(r==="function"||r==="symbol"),GC=(t,r,e,n)=>{const i=(o,s)=>{const l=n.push(o)-1;return e.set(s,l),l},a=o=>{if(e.has(o))return e.get(o);let[s,l]=Es(o);switch(s){case Oh:{let c=o;switch(l){case"bigint":s=g7,c=o.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([p7],o)}return i([s,c],o)}case Uc:{if(l)return i([l,[...o]],o);const c=[],h=i([s,c],o);for(const d of o)c.push(a(d));return h}case Vc:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(r&&"toJSON"in o)return a(o.toJSON());const c=[],h=i([s,c],o);for(const d of VC(o))(t||!Su(Es(o[d])))&&c.push([a(d),a(o[d])]);return h}case Sm:return i([s,o.toISOString()],o);case Em:{const{source:c,flags:h}=o;return i([s,{source:c,flags:h}],o)}case Tm:{const c=[],h=i([s,c],o);for(const[d,f]of o)(t||!(Su(Es(d))||Su(Es(f))))&&c.push([a(d),a(f)]);return h}case _m:{const c=[],h=i([s,c],o);for(const d of o)(t||!Su(Es(d)))&&c.push(a(d));return h}}const{message:u}=o;return i([s,{name:l,message:u}],o)};return a},ly=(t,{json:r,lossy:e}={})=>{const n=[];return GC(!(r||e),!!r,new Map,n)(t),n},ca=typeof structuredClone=="function"?(t,r)=>r&&("json"in r||"lossy"in r)?sy(ly(t,r)):structuredClone(t):(t,r)=>sy(ly(t,r));function KC(t,r){const e=[{type:"text",value:"↩"}];return r>1&&e.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),e}function YC(t,r){return"Back to reference "+(t+1)+(r>1?"-"+r:"")}function XC(t){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",e=t.options.footnoteBackContent||KC,n=t.options.footnoteBackLabel||YC,i=t.options.footnoteLabel||"Footnotes",a=t.options.footnoteLabelTagName||"h2",o=t.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l0&&v.push({type:"text",value:" "});let $=typeof e=="string"?e:e(l,f);typeof $=="string"&&($={type:"text",value:$}),v.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+d+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,f),className:["data-footnote-backref"]},children:Array.isArray($)?$:[$]})}const b=c[c.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const $=b.children[b.children.length-1];$&&$.type==="text"?$.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...v)}else c.push(...v);const y={type:"element",tagName:"li",properties:{id:r+"fn-"+d},children:t.wrap(c,!0)};t.patch(u,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ca(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:t.wrap(s,!0)},{type:"text",value:` -`}]}}const Sl=function(t){if(t==null)return eP;if(typeof t=="function")return Ih(t);if(typeof t=="object")return Array.isArray(t)?JC(t):ZC(t);if(typeof t=="string")return QC(t);throw new Error("Expected function, string, or object as test")};function JC(t){const r=[];let e=-1;for(;++e":""))+")"})}return d;function d(){let f=y7,v,g,b;if((!r||a(l,u,c[c.length-1]||void 0))&&(f=nP(e(l,c)),f[0]===zv))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==b7)for(g=(n?y.children.length:-1)+o,b=c.concat(y);g>-1&&g":""))+")"})}return d;function d(){let f=y7,v,m,b;if((!r||a(l,u,c[c.length-1]||void 0))&&(f=nP(e(l,c)),f[0]===zv))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==b7)for(m=(n?y.children.length:-1)+o,b=c.concat(y);m>-1&&m0&&e.push({type:"text",value:` `}),e}function uy(t){let r=0,e=t.charCodeAt(r);for(;e===9||e===32;)r++,e=t.charCodeAt(r);return t.slice(r)}function cy(t,r){const e=aP(t,r),n=e.one(t,void 0),i=XC(e),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:` -`},i),a}function cP(t,r){return t&&"run"in t?async function(e,n){const i=cy(e,{file:n,...r});await t.run(i,n)}:function(e,n){return cy(e,{file:n,...t||r})}}function hy(t){if(t)throw t}var kc=Object.prototype.hasOwnProperty,w7=Object.prototype.toString,dy=Object.defineProperty,fy=Object.getOwnPropertyDescriptor,vy=function(r){return typeof Array.isArray=="function"?Array.isArray(r):w7.call(r)==="[object Array]"},py=function(r){if(!r||w7.call(r)!=="[object Object]")return!1;var e=kc.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&&kc.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!e&&!n)return!1;var i;for(i in r);return typeof i>"u"||kc.call(r,i)},my=function(r,e){dy&&e.name==="__proto__"?dy(r,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):r[e.name]=e.newValue},gy=function(r,e){if(e==="__proto__")if(kc.call(r,e)){if(fy)return fy(r,e).value}else return;return r[e]},hP=function t(){var r,e,n,i,a,o,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});lo.length;let l;s&&o.push(i);try{l=t.apply(this,o)}catch(u){const c=u;if(s&&e)throw c;return i(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){e||(e=!0,r(o,...s))}function a(o){i(null,o)}}const xn={basename:vP,dirname:pP,extname:mP,join:gP,sep:"/"};function vP(t,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');El(t);let e=0,n=-1,i=t.length,a;if(r===void 0||r.length===0||r.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(a){e=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":t.slice(e,n)}if(r===t)return"";let o=-1,s=r.length-1;for(;i--;)if(t.codePointAt(i)===47){if(a){e=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(t.codePointAt(i)===r.codePointAt(s--)?s<0&&(n=i):(s=-1,n=o));return e===n?n=o:n<0&&(n=t.length),t.slice(e,n)}function pP(t){if(El(t),t.length===0)return".";let r=-1,e=t.length,n;for(;--e;)if(t.codePointAt(e)===47){if(n){r=e;break}}else n||(n=!0);return r<0?t.codePointAt(0)===47?"/":".":r===1&&t.codePointAt(0)===47?"//":t.slice(0,r)}function mP(t){El(t);let r=t.length,e=-1,n=0,i=-1,a=0,o;for(;r--;){const s=t.codePointAt(r);if(s===47){if(o){n=r+1;break}continue}e<0&&(o=!0,e=r+1),s===46?i<0?i=r:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||e<0||a===0||a===1&&i===e-1&&i===n+1?"":t.slice(i,e)}function gP(...t){let r=-1,e;for(;++r0&&t.codePointAt(t.length-1)===47&&(e+="/"),r?"/"+e:e}function bP(t,r){let e="",n=0,i=-1,a=0,o=-1,s,l;for(;++o<=t.length;){if(o2){if(l=e.lastIndexOf("/"),l!==e.length-1){l<0?(e="",n=0):(e=e.slice(0,l),n=e.length-1-e.lastIndexOf("/")),i=o,a=0;continue}}else if(e.length>0){e="",n=0,i=o,a=0;continue}}r&&(e=e.length>0?e+"/..":"..",n=2)}else e.length>0?e+="/"+t.slice(i+1,o):e=t.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return e}function El(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const wP={cwd:$P};function $P(){return"/"}function jv(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function xP(t){if(typeof t=="string")t=new URL(t);else if(!jv(t)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(t.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return kP(t)}function kP(t){if(t.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const r=t.pathname;let e=-1;for(;++e0){let[f,...v]=c;const g=n[d][1];Lv(g)&&Lv(f)&&(f=U0(!0,g,f)),n[d]=[u,f,...v]}}}}const _P=new Im().freeze();function Y0(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function X0(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function J0(t,r){if(r)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function by(t){if(!Lv(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function wy(t,r,e){if(!e)throw new Error("`"+t+"` finished async. Use `"+r+"` instead")}function Eu(t){return OP(t)?t:new $7(t)}function OP(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function IP(t){return typeof t=="string"||CP(t)}function CP(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const PP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",$y=[],xy={allowDangerousHtml:!0},AP=/^(https?|ircs?|mailto|xmpp)$/i,MP=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function DP(t){const r=t.allowedElements,e=t.allowElement,n=t.children||"",i=t.className,a=t.components,o=t.disallowedElements,s=t.rehypePlugins||$y,l=t.remarkPlugins||$y,u=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...xy}:xy,c=t.skipHtml,h=t.unwrapDisallowed,d=t.urlTransform||NP,f=_P().use(gC).use(l).use(cP,u).use(s),v=new $7;typeof n=="string"&&(v.value=n);for(const $ of MP)Object.hasOwn(t,$.from)&&(""+$.from+($.to?"use `"+$.to+"` instead":"remove it")+PP+$.id,void 0);const g=f.parse(v);let b=f.runSync(g,v);return i&&(b={type:"element",tagName:"div",properties:{className:i},children:b.type==="root"?b.children:[b]}),Ch(b,y),Q_(b,{Fragment:C.Fragment,components:a,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function y($,k,_){if($.type==="raw"&&_&&typeof k=="number")return c?_.children.splice(k,1):_.children[k]={type:"text",value:$.value},k;if($.type==="element"){let P;for(P in H0)if(Object.hasOwn(H0,P)&&Object.hasOwn($.properties,P)){const S=$.properties[P],D=H0[P];(D===null||D.includes($.tagName))&&($.properties[P]=d(String(S||""),P,$))}}if($.type==="element"){let P=r?!r.includes($.tagName):o?o.includes($.tagName):!1;if(!P&&e&&typeof k=="number"&&(P=!e($,k,_)),P&&_&&typeof k=="number")return h&&$.children?_.children.splice(k,1,...$.children):_.children.splice(k,1),k}}}function NP(t){const r=t.indexOf(":"),e=t.indexOf("?"),n=t.indexOf("#"),i=t.indexOf("/");return r<0||i>-1&&r>i||e>-1&&r>e||n>-1&&r>n||AP.test(t.slice(0,r))?t:""}const RP=Ke.memo(DP,(t,r)=>t.children===r.children&&t.className===r.className);function ky(t,r){const e=String(t);if(typeof r!="string")throw new TypeError("Expected character");let n=0,i=e.indexOf(r);for(;i!==-1;)n++,i=e.indexOf(r,i+r.length);return n}function FP(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function zP(t,r,e){const i=Sl(e.ignore||[]),a=BP(r);let o=-1;for(;++o0?{type:"text",value:S}:void 0),S===!1?d.lastIndex=_+1:(v!==_&&$.push({type:"text",value:u.value.slice(v,_)}),Array.isArray(S)?$.push(...S):S&&$.push(S),v=_+k[0].length,y=!0),!d.global)break;k=d.exec(u.value)}return y?(v?\]}]+$/.exec(t);if(!r)return[t,void 0];t=t.slice(0,r.index);let e=r[0],n=e.indexOf(")");const i=ky(t,"(");let a=ky(t,")");for(;n!==-1&&i>a;)t+=e.slice(0,n+1),e=e.slice(n+1),n=e.indexOf(")"),a++;return[t,e]}function x7(t,r){const e=t.input.charCodeAt(t.index-1);return(t.index===0||$a(e)||Th(e))&&(!r||e!==47)}k7.peek=cA;function eA(){return{enter:{gfmFootnoteDefinition:rA,gfmFootnoteDefinitionLabelString:nA,gfmFootnoteCall:oA,gfmFootnoteCallString:sA},exit:{gfmFootnoteDefinition:aA,gfmFootnoteDefinitionLabelString:iA,gfmFootnoteCall:uA,gfmFootnoteCallString:lA}}}function tA(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:hA,footnoteReference:k7}}}function rA(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function nA(){this.buffer()}function iA(t){const r=this.resume(),e=this.stack[this.stack.length-1];e.type,e.label=r,e.identifier=pn(this.sliceSerialize(t)).toLowerCase()}function aA(t){this.exit(t)}function oA(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function sA(){this.buffer()}function lA(t){const r=this.resume(),e=this.stack[this.stack.length-1];e.type,e.label=r,e.identifier=pn(this.sliceSerialize(t)).toLowerCase()}function uA(t){this.exit(t)}function k7(t,r,e,n){const i=e.createTracker(n);let a=i.move("[^");const o=e.enter("footnoteReference"),s=e.enter("reference");return a+=i.move(e.safe(e.associationId(t),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function cA(){return"["}function hA(t,r,e,n){const i=e.createTracker(n);let a=i.move("[^");const o=e.enter("footnoteDefinition"),s=e.enter("label");return a+=i.move(e.safe(e.associationId(t),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(t.children&&t.children.length>0?" ":"")),i.shift(4),a+=i.move(e.indentLines(e.containerFlow(t,i.current()),dA)),o(),a}function dA(t,r,e){return r===0?t:(e?"":" ")+t}const fA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];S7.peek=yA;function vA(){return{canContainEols:["delete"],enter:{strikethrough:mA},exit:{strikethrough:gA}}}function pA(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:fA}],handlers:{delete:S7}}}function mA(t){this.enter({type:"delete",children:[]},t)}function gA(t){this.exit(t)}function S7(t,r,e,n){const i=e.createTracker(n),a=e.enter("strikethrough");let o=i.move("~~");return o+=e.containerPhrasing(t,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function yA(){return"~"}function bA(t){return t.length}function wA(t,r){const e=r,n=(e.align||[]).concat(),i=e.stringLength||bA,a=[],o=[],s=[],l=[];let u=0,c=-1;for(;++cu&&(u=t[c].length);++yl[y])&&(l[y]=k)}g.push($)}o[c]=g,s[c]=b}let h=-1;if(typeof n=="object"&&"length"in n)for(;++hl[h]&&(l[h]=$),f[h]=$),d[h]=k}o.splice(1,0,d),s.splice(1,0,f),c=-1;const v=[];for(;++c"u"||kc.call(r,i)},my=function(r,e){dy&&e.name==="__proto__"?dy(r,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):r[e.name]=e.newValue},gy=function(r,e){if(e==="__proto__")if(kc.call(r,e)){if(fy)return fy(r,e).value}else return;return r[e]},hP=function t(){var r,e,n,i,a,o,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});lo.length;let l;s&&o.push(i);try{l=t.apply(this,o)}catch(u){const c=u;if(s&&e)throw c;return i(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){e||(e=!0,r(o,...s))}function a(o){i(null,o)}}const xn={basename:vP,dirname:pP,extname:mP,join:gP,sep:"/"};function vP(t,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');El(t);let e=0,n=-1,i=t.length,a;if(r===void 0||r.length===0||r.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(a){e=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":t.slice(e,n)}if(r===t)return"";let o=-1,s=r.length-1;for(;i--;)if(t.codePointAt(i)===47){if(a){e=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(t.codePointAt(i)===r.codePointAt(s--)?s<0&&(n=i):(s=-1,n=o));return e===n?n=o:n<0&&(n=t.length),t.slice(e,n)}function pP(t){if(El(t),t.length===0)return".";let r=-1,e=t.length,n;for(;--e;)if(t.codePointAt(e)===47){if(n){r=e;break}}else n||(n=!0);return r<0?t.codePointAt(0)===47?"/":".":r===1&&t.codePointAt(0)===47?"//":t.slice(0,r)}function mP(t){El(t);let r=t.length,e=-1,n=0,i=-1,a=0,o;for(;r--;){const s=t.codePointAt(r);if(s===47){if(o){n=r+1;break}continue}e<0&&(o=!0,e=r+1),s===46?i<0?i=r:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||e<0||a===0||a===1&&i===e-1&&i===n+1?"":t.slice(i,e)}function gP(...t){let r=-1,e;for(;++r0&&t.codePointAt(t.length-1)===47&&(e+="/"),r?"/"+e:e}function bP(t,r){let e="",n=0,i=-1,a=0,o=-1,s,l;for(;++o<=t.length;){if(o2){if(l=e.lastIndexOf("/"),l!==e.length-1){l<0?(e="",n=0):(e=e.slice(0,l),n=e.length-1-e.lastIndexOf("/")),i=o,a=0;continue}}else if(e.length>0){e="",n=0,i=o,a=0;continue}}r&&(e=e.length>0?e+"/..":"..",n=2)}else e.length>0?e+="/"+t.slice(i+1,o):e=t.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return e}function El(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const wP={cwd:$P};function $P(){return"/"}function jv(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function xP(t){if(typeof t=="string")t=new URL(t);else if(!jv(t)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(t.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return kP(t)}function kP(t){if(t.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const r=t.pathname;let e=-1;for(;++e0){let[f,...v]=c;const m=n[d][1];Lv(m)&&Lv(f)&&(f=U0(!0,m,f)),n[d]=[u,f,...v]}}}}const _P=new Im().freeze();function Y0(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function X0(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function J0(t,r){if(r)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function by(t){if(!Lv(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function wy(t,r,e){if(!e)throw new Error("`"+t+"` finished async. Use `"+r+"` instead")}function Eu(t){return OP(t)?t:new $7(t)}function OP(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function IP(t){return typeof t=="string"||CP(t)}function CP(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const PP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",$y=[],xy={allowDangerousHtml:!0},AP=/^(https?|ircs?|mailto|xmpp)$/i,MP=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function DP(t){const r=t.allowedElements,e=t.allowElement,n=t.children||"",i=t.className,a=t.components,o=t.disallowedElements,s=t.rehypePlugins||$y,l=t.remarkPlugins||$y,u=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...xy}:xy,c=t.skipHtml,h=t.unwrapDisallowed,d=t.urlTransform||NP,f=_P().use(gC).use(l).use(cP,u).use(s),v=new $7;typeof n=="string"&&(v.value=n);for(const $ of MP)Object.hasOwn(t,$.from)&&(""+$.from+($.to?"use `"+$.to+"` instead":"remove it")+PP+$.id,void 0);const m=f.parse(v);let b=f.runSync(m,v);return i&&(b={type:"element",tagName:"div",properties:{className:i},children:b.type==="root"?b.children:[b]}),Ch(b,y),Q_(b,{Fragment:C.Fragment,components:a,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function y($,k,O){if($.type==="raw"&&O&&typeof k=="number")return c?O.children.splice(k,1):O.children[k]={type:"text",value:$.value},k;if($.type==="element"){let P;for(P in H0)if(Object.hasOwn(H0,P)&&Object.hasOwn($.properties,P)){const E=$.properties[P],D=H0[P];(D===null||D.includes($.tagName))&&($.properties[P]=d(String(E||""),P,$))}}if($.type==="element"){let P=r?!r.includes($.tagName):o?o.includes($.tagName):!1;if(!P&&e&&typeof k=="number"&&(P=!e($,k,O)),P&&O&&typeof k=="number")return h&&$.children?O.children.splice(k,1,...$.children):O.children.splice(k,1),k}}}function NP(t){const r=t.indexOf(":"),e=t.indexOf("?"),n=t.indexOf("#"),i=t.indexOf("/");return r<0||i>-1&&r>i||e>-1&&r>e||n>-1&&r>n||AP.test(t.slice(0,r))?t:""}const RP=Ve.memo(DP,(t,r)=>t.children===r.children&&t.className===r.className);function ky(t,r){const e=String(t);if(typeof r!="string")throw new TypeError("Expected character");let n=0,i=e.indexOf(r);for(;i!==-1;)n++,i=e.indexOf(r,i+r.length);return n}function FP(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function zP(t,r,e){const i=Sl(e.ignore||[]),a=BP(r);let o=-1;for(;++o0?{type:"text",value:E}:void 0),E===!1?d.lastIndex=O+1:(v!==O&&$.push({type:"text",value:u.value.slice(v,O)}),Array.isArray(E)?$.push(...E):E&&$.push(E),v=O+k[0].length,y=!0),!d.global)break;k=d.exec(u.value)}return y?(v?\]}]+$/.exec(t);if(!r)return[t,void 0];t=t.slice(0,r.index);let e=r[0],n=e.indexOf(")");const i=ky(t,"(");let a=ky(t,")");for(;n!==-1&&i>a;)t+=e.slice(0,n+1),e=e.slice(n+1),n=e.indexOf(")"),a++;return[t,e]}function x7(t,r){const e=t.input.charCodeAt(t.index-1);return(t.index===0||$a(e)||Th(e))&&(!r||e!==47)}k7.peek=cA;function eA(){return{enter:{gfmFootnoteDefinition:rA,gfmFootnoteDefinitionLabelString:nA,gfmFootnoteCall:oA,gfmFootnoteCallString:sA},exit:{gfmFootnoteDefinition:aA,gfmFootnoteDefinitionLabelString:iA,gfmFootnoteCall:uA,gfmFootnoteCallString:lA}}}function tA(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:hA,footnoteReference:k7}}}function rA(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function nA(){this.buffer()}function iA(t){const r=this.resume(),e=this.stack[this.stack.length-1];e.type,e.label=r,e.identifier=pn(this.sliceSerialize(t)).toLowerCase()}function aA(t){this.exit(t)}function oA(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function sA(){this.buffer()}function lA(t){const r=this.resume(),e=this.stack[this.stack.length-1];e.type,e.label=r,e.identifier=pn(this.sliceSerialize(t)).toLowerCase()}function uA(t){this.exit(t)}function k7(t,r,e,n){const i=e.createTracker(n);let a=i.move("[^");const o=e.enter("footnoteReference"),s=e.enter("reference");return a+=i.move(e.safe(e.associationId(t),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function cA(){return"["}function hA(t,r,e,n){const i=e.createTracker(n);let a=i.move("[^");const o=e.enter("footnoteDefinition"),s=e.enter("label");return a+=i.move(e.safe(e.associationId(t),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(t.children&&t.children.length>0?" ":"")),i.shift(4),a+=i.move(e.indentLines(e.containerFlow(t,i.current()),dA)),o(),a}function dA(t,r,e){return r===0?t:(e?"":" ")+t}const fA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];S7.peek=yA;function vA(){return{canContainEols:["delete"],enter:{strikethrough:mA},exit:{strikethrough:gA}}}function pA(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:fA}],handlers:{delete:S7}}}function mA(t){this.enter({type:"delete",children:[]},t)}function gA(t){this.exit(t)}function S7(t,r,e,n){const i=e.createTracker(n),a=e.enter("strikethrough");let o=i.move("~~");return o+=e.containerPhrasing(t,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function yA(){return"~"}function bA(t){return t.length}function wA(t,r){const e=r,n=(e.align||[]).concat(),i=e.stringLength||bA,a=[],o=[],s=[],l=[];let u=0,c=-1;for(;++cu&&(u=t[c].length);++yl[y])&&(l[y]=k)}m.push($)}o[c]=m,s[c]=b}let h=-1;if(typeof n=="object"&&"length"in n)for(;++hl[h]&&(l[h]=$),f[h]=$),d[h]=k}o.splice(1,0,d),s.splice(1,0,f),c=-1;const v=[];for(;++c "),a.shift(2);const o=e.indentLines(e.containerFlow(t,a.current()),kA);return i(),o}function kA(t,r,e){return">"+(e?"":" ")+t}function SA(t,r){return Ey(t,r.inConstruct,!0)&&!Ey(t,r.notInConstruct,!1)}function Ey(t,r,e){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return e;let n=-1;for(;++no&&(o=a):a=1,i=n+r.length,n=e.indexOf(r,i);return o}function EA(t,r){return!!(r.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function TA(t){const r=t.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function _A(t,r,e,n){const i=TA(e),a=t.value||"",o=i==="`"?"GraveAccent":"Tilde";if(EA(t,e)){const h=e.enter("codeIndented"),d=e.indentLines(a,OA);return h(),d}const s=e.createTracker(n),l=i.repeat(Math.max(E7(a,i)+1,3)),u=e.enter("codeFenced");let c=s.move(l);if(t.lang){const h=e.enter(`codeFencedLang${o}`);c+=s.move(e.safe(t.lang,{before:c,after:" ",encode:["`"],...s.current()})),h()}if(t.lang&&t.meta){const h=e.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(e.safe(t.meta,{before:c,after:` @@ -54,12 +54,12 @@ ${f.join(` `+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(` `))+1))}const o="#".repeat(i),s=e.enter("headingAtx"),l=e.enter("phrasing");a.move(o+" ");let u=e.containerPhrasing(t,{before:"# ",after:` `,...a.current()});return/^[\t ]/.test(u)&&(u=rl(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,e.options.closeAtx&&(u+=" "+o),l(),s(),u}_7.peek=DA;function _7(t){return t.value||""}function DA(){return"<"}O7.peek=NA;function O7(t,r,e,n){const i=Cm(e),a=i==='"'?"Quote":"Apostrophe",o=e.enter("image");let s=e.enter("label");const l=e.createTracker(n);let u=l.move("![");return u+=l.move(e.safe(t.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(s=e.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(e.safe(t.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=e.enter("destinationRaw"),u+=l.move(e.safe(t.url,{before:u,after:t.title?" ":")",...l.current()}))),s(),t.title&&(s=e.enter(`title${a}`),u+=l.move(" "+i),u+=l.move(e.safe(t.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),o(),u}function NA(){return"!"}I7.peek=RA;function I7(t,r,e,n){const i=t.referenceType,a=e.enter("imageReference");let o=e.enter("label");const s=e.createTracker(n);let l=s.move("![");const u=e.safe(t.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),o();const c=e.stack;e.stack=[],o=e.enter("reference");const h=e.safe(e.associationId(t),{before:l,after:"]",...s.current()});return o(),e.stack=c,a(),i==="full"||!u||u!==h?l+=s.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function RA(){return"!"}C7.peek=FA;function C7(t,r,e){let n=t.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a\u007F]/.test(t.url))}A7.peek=zA;function A7(t,r,e,n){const i=Cm(e),a=i==='"'?"Quote":"Apostrophe",o=e.createTracker(n);let s,l;if(P7(t,e)){const c=e.stack;e.stack=[],s=e.enter("autolink");let h=o.move("<");return h+=o.move(e.containerPhrasing(t,{before:h,after:">",...o.current()})),h+=o.move(">"),s(),e.stack=c,h}s=e.enter("link"),l=e.enter("label");let u=o.move("[");return u+=o.move(e.containerPhrasing(t,{before:u,after:"](",...o.current()})),u+=o.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=e.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(e.safe(t.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=e.enter("destinationRaw"),u+=o.move(e.safe(t.url,{before:u,after:t.title?" ":")",...o.current()}))),l(),t.title&&(l=e.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(e.safe(t.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),u+=o.move(")"),s(),u}function zA(t,r,e){return P7(t,e)?"<":"["}M7.peek=BA;function M7(t,r,e,n){const i=t.referenceType,a=e.enter("linkReference");let o=e.enter("label");const s=e.createTracker(n);let l=s.move("[");const u=e.containerPhrasing(t,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),o();const c=e.stack;e.stack=[],o=e.enter("reference");const h=e.safe(e.associationId(t),{before:l,after:"]",...s.current()});return o(),e.stack=c,a(),i==="full"||!u||u!==h?l+=s.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function BA(){return"["}function Pm(t){const r=t.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function LA(t){const r=Pm(t),e=t.options.bulletOther;if(!e)return r==="*"?"-":"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(e===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+e+"`) to be different");return e}function jA(t){const r=t.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function D7(t){const r=t.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function HA(t,r,e,n){const i=e.enter("list"),a=e.bulletCurrent;let o=t.ordered?jA(e):Pm(e);const s=t.ordered?o==="."?")":".":LA(e);let l=r&&e.bulletLastUsed?o===e.bulletLastUsed:!1;if(!t.ordered){const c=t.children?t.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.children[0])&&e.stack[e.stack.length-1]==="list"&&e.stack[e.stack.length-2]==="listItem"&&e.stack[e.stack.length-3]==="list"&&e.stack[e.stack.length-4]==="listItem"&&e.indexStack[e.indexStack.length-1]===0&&e.indexStack[e.indexStack.length-2]===0&&e.indexStack[e.indexStack.length-3]===0&&(l=!0),D7(e)===o&&c){let h=-1;for(;++h-1?r.start:1)+(e.options.incrementListMarker===!1?0:r.children.indexOf(t))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(r&&r.type==="list"&&r.spread||t.spread))&&(o=Math.ceil(o/4)*4);const s=e.createTracker(n);s.move(a+" ".repeat(o-a.length)),s.shift(o);const l=e.enter("listItem"),u=e.indentLines(e.containerFlow(t,s.current()),c);return l(),u;function c(h,d,f){return d?(f?"":" ".repeat(o))+h:(f?a:a+" ".repeat(o-a.length))+h}}function UA(t,r,e,n){const i=e.enter("paragraph"),a=e.enter("phrasing"),o=e.containerPhrasing(t,n);return a(),i(),o}const VA=Sl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function GA(t,r,e,n){return(t.children.some(function(o){return VA(o)})?e.containerPhrasing:e.containerFlow).call(e,t,n)}function KA(t){const r=t.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}N7.peek=YA;function N7(t,r,e,n){const i=KA(e),a=e.enter("strong"),o=e.createTracker(n),s=o.move(i+i);let l=o.move(e.containerPhrasing(t,{after:i,before:s,...o.current()}));const u=l.charCodeAt(0),c=Gc(n.before.charCodeAt(n.before.length-1),u,i);c.inside&&(l=rl(u)+l.slice(1));const h=l.charCodeAt(l.length-1),d=Gc(n.after.charCodeAt(0),h,i);d.inside&&(l=l.slice(0,-1)+rl(h));const f=o.move(i+i);return a(),e.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},s+l+f}function YA(t,r,e){return e.options.strong||"*"}function XA(t,r,e,n){return e.safe(t.value,n)}function JA(t){const r=t.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function ZA(t,r,e){const n=(D7(e)+(e.options.ruleSpaces?" ":"")).repeat(JA(e));return e.options.ruleSpaces?n.slice(0,-1):n}const R7={blockquote:xA,break:Ty,code:_A,definition:IA,emphasis:T7,hardBreak:Ty,heading:MA,html:_7,image:O7,imageReference:I7,inlineCode:C7,link:A7,linkReference:M7,list:HA,listItem:qA,paragraph:UA,root:GA,strong:N7,text:XA,thematicBreak:ZA};function QA(){return{enter:{table:eM,tableData:_y,tableHeader:_y,tableRow:rM},exit:{codeText:nM,table:tM,tableData:td,tableHeader:td,tableRow:td}}}function eM(t){const r=t._align;this.enter({type:"table",align:r.map(function(e){return e==="none"?null:e}),children:[]},t),this.data.inTable=!0}function tM(t){this.exit(t),this.data.inTable=void 0}function rM(t){this.enter({type:"tableRow",children:[]},t)}function td(t){this.exit(t)}function _y(t){this.enter({type:"tableCell",children:[]},t)}function nM(t){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,iM));const e=this.stack[this.stack.length-1];e.type,e.value=r,this.exit(t)}function iM(t,r){return r==="|"?r:t}function aM(t){const r=t,e=r.tableCellPadding,n=r.tablePipeAlign,i=r.stringLength,a=e?" ":"|";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:{inlineCode:d,table:o,tableCell:l,tableRow:s}};function o(f,v,g,b){return u(c(f,g,b),f.align)}function s(f,v,g,b){const y=h(f,g,b),$=u([y]);return $.slice(0,$.indexOf(` -`))}function l(f,v,g,b){const y=g.enter("tableCell"),$=g.enter("phrasing"),k=g.containerPhrasing(f,{...b,before:a,after:a});return $(),y(),k}function u(f,v){return wA(f,{align:v,alignDelimiters:n,padding:e,stringLength:i})}function c(f,v,g){const b=f.children;let y=-1;const $=[],k=v.enter("table");for(;++y0&&!e&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),e}const kM={tokenize:PM,partial:!0};function SM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:OM,continuation:{tokenize:IM},exit:CM}},text:{91:{name:"gfmFootnoteCall",tokenize:_M},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:EM,resolveTo:TM}}}}function EM(t,r,e){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;i--;){const l=n.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return e(l);const u=pn(n.sliceSerialize({start:o.end,end:n.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?e(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),r(l))}}function TM(t,r){let e=t.length;for(;e--;)if(t[e][1].type==="labelImage"&&t[e][0]==="enter"){t[e][1];break}t[e+1][1].type="data",t[e+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},t[e+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[e+3][1].end),end:Object.assign({},t[e+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[t[e+1],t[e+2],["enter",n,r],t[e+3],t[e+4],["enter",i,r],["exit",i,r],["enter",a,r],["enter",o,r],["exit",o,r],["exit",a,r],t[t.length-2],t[t.length-1],["exit",n,r]];return t.splice(e,t.length-e+1,...s),t}function _M(t,r,e){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,o;return s;function s(h){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?e(h):(t.enter("gfmFootnoteCallMarker"),t.consume(h),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",u)}function u(h){if(a>999||h===93&&!o||h===null||h===91||rt(h))return e(h);if(h===93){t.exit("chunkString");const d=t.exit("gfmFootnoteCallString");return i.includes(pn(n.sliceSerialize(d)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),r):e(h)}return rt(h)||(o=!0),a++,t.consume(h),h===92?c:u}function c(h){return h===91||h===92||h===93?(t.consume(h),a++,u):u(h)}}function OM(t,r,e){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o=0,s;return l;function l(v){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(v),t.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(v){return v===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(v),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",c):e(v)}function c(v){if(o>999||v===93&&!s||v===null||v===91||rt(v))return e(v);if(v===93){t.exit("chunkString");const g=t.exit("gfmFootnoteDefinitionLabelString");return a=pn(n.sliceSerialize(g)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(v),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),d}return rt(v)||(s=!0),o++,t.consume(v),v===92?h:c}function h(v){return v===91||v===92||v===93?(t.consume(v),o++,c):c(v)}function d(v){return v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),i.includes(a)||i.push(a),Re(t,f,"gfmFootnoteDefinitionWhitespace")):e(v)}function f(v){return r(v)}}function IM(t,r,e){return t.check(kl,r,t.attempt(kM,r,e))}function CM(t){t.exit("gfmFootnoteDefinition")}function PM(t,r,e){const n=this;return Re(t,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?r(a):e(a)}}function AM(t){let e=t.singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:i};return e==null&&(e=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(o,s){let l=-1;for(;++l1?l(v):(o.consume(v),h++,f);if(h<2&&!e)return l(v);const b=o.exit("strikethroughSequenceTemporary"),y=Io(v);return b._open=!y||y===2&&!!g,b._close=!g||g===2&&!!y,s(v)}}}class MM{constructor(){this.map=[]}add(r,e,n){DM(this,r,e,n)}consume(r){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let e=this.map.length;const n=[];for(;e>0;)e-=1,n.push(r.slice(this.map[e][0]+this.map[e][1]),this.map[e][2]),r.length=this.map[e][0];n.push([...r]),r.length=0;let i=n.pop();for(;i;)r.push(...i),i=n.pop();this.map.length=0}}function DM(t,r,e,n){let i=0;if(!(e===0&&n.length===0)){for(;i-1;){const ie=n.events[z][1].type;if(ie==="lineEnding"||ie==="linePrefix")z--;else break}const L=z>-1?n.events[z][1].type:null,J=L==="tableHead"||L==="tableRow"?S:l;return J===S&&n.parser.lazy[n.now().line]?e(A):J(A)}function l(A){return t.enter("tableHead"),t.enter("tableRow"),u(A)}function u(A){return A===124||(o=!0,a+=1),c(A)}function c(A){return A===null?e(A):ve(A)?a>1?(a=0,n.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),f):e(A):Fe(A)?Re(t,c,"whitespace")(A):(a+=1,o&&(o=!1,i+=1),A===124?(t.enter("tableCellDivider"),t.consume(A),t.exit("tableCellDivider"),o=!0,c):(t.enter("data"),h(A)))}function h(A){return A===null||A===124||rt(A)?(t.exit("data"),c(A)):(t.consume(A),A===92?d:h)}function d(A){return A===92||A===124?(t.consume(A),h):h(A)}function f(A){return n.interrupt=!1,n.parser.lazy[n.now().line]?e(A):(t.enter("tableDelimiterRow"),o=!1,Fe(A)?Re(t,v,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):v(A))}function v(A){return A===45||A===58?b(A):A===124?(o=!0,t.enter("tableCellDivider"),t.consume(A),t.exit("tableCellDivider"),g):P(A)}function g(A){return Fe(A)?Re(t,b,"whitespace")(A):b(A)}function b(A){return A===58?(a+=1,o=!0,t.enter("tableDelimiterMarker"),t.consume(A),t.exit("tableDelimiterMarker"),y):A===45?(a+=1,y(A)):A===null||ve(A)?_(A):P(A)}function y(A){return A===45?(t.enter("tableDelimiterFiller"),$(A)):P(A)}function $(A){return A===45?(t.consume(A),$):A===58?(o=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(A),t.exit("tableDelimiterMarker"),k):(t.exit("tableDelimiterFiller"),k(A))}function k(A){return Fe(A)?Re(t,_,"whitespace")(A):_(A)}function _(A){return A===124?v(A):A===null||ve(A)?!o||i!==a?P(A):(t.exit("tableDelimiterRow"),t.exit("tableHead"),r(A)):P(A)}function P(A){return e(A)}function S(A){return t.enter("tableRow"),D(A)}function D(A){return A===124?(t.enter("tableCellDivider"),t.consume(A),t.exit("tableCellDivider"),D):A===null||ve(A)?(t.exit("tableRow"),r(A)):Fe(A)?Re(t,D,"whitespace")(A):(t.enter("data"),B(A))}function B(A){return A===null||A===124||rt(A)?(t.exit("data"),D(A)):(t.consume(A),A===92?R:B)}function R(A){return A===92||A===124?(t.consume(A),B):B(A)}}function zM(t,r){let e=-1,n=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,u,c,h;const d=new MM;for(;++ee[2]+1){const v=e[2]+1,g=e[3]-e[2]-1;t.add(v,g,[])}}t.add(e[3]+1,0,[["exit",h,r]])}return i!==void 0&&(a.end=Object.assign({},lo(r.events,i)),t.add(i,0,[["exit",a,r]]),a=void 0),a}function Iy(t,r,e,n,i){const a=[],o=lo(r.events,e);i&&(i.end=Object.assign({},o),a.push(["exit",i,r])),n.end=Object.assign({},o),a.push(["exit",n,r]),t.add(e+1,0,a)}function lo(t,r){const e=t[r],n=e[0]==="enter"?"start":"end";return e[1][n]}const BM={name:"tasklistCheck",tokenize:jM};function LM(){return{text:{91:BM}}}function jM(t,r,e){const n=this;return i;function i(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?e(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),a)}function a(l){return rt(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),o):e(l)}function o(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),s):e(l)}function s(l){return ve(l)?r(l):Fe(l)?t.check({tokenize:HM},r,e)(l):e(l)}}function HM(t,r,e){return Re(t,n,"whitespace");function n(i){return i===null?e(i):r(i)}}function WM(t){return e7([vM(),SM(),AM(t),RM(),LM()])}const qM={};function UM(t){const r=this,e=t||qM,n=r.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(WM(e)),a.push(cM()),o.push(hM(e))}function VM(){return{enter:{mathFlow:t,mathFlowFenceMeta:r,mathText:a},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:e,mathFlowValue:s,mathText:o,mathTextData:s}};function t(l){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},l)}function r(){this.buffer()}function e(){const l=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=l}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(l){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),c=this.stack[this.stack.length-1];c.type,this.exit(l),c.value=u;const h=c.data.hChildren[0];h.type,h.tagName,h.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function a(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function o(l){const u=this.resume(),c=this.stack[this.stack.length-1];c.type,this.exit(l),c.value=u,c.data.hChildren.push({type:"text",value:u})}function s(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function GM(t){let r=(t||{}).singleDollarTextMath;return r==null&&(r=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:l,tableRow:s}};function o(f,v,m,b){return u(c(f,m,b),f.align)}function s(f,v,m,b){const y=h(f,m,b),$=u([y]);return $.slice(0,$.indexOf(` +`))}function l(f,v,m,b){const y=m.enter("tableCell"),$=m.enter("phrasing"),k=m.containerPhrasing(f,{...b,before:a,after:a});return $(),y(),k}function u(f,v){return wA(f,{align:v,alignDelimiters:n,padding:e,stringLength:i})}function c(f,v,m){const b=f.children;let y=-1;const $=[],k=v.enter("table");for(;++y0&&!e&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),e}const kM={tokenize:PM,partial:!0};function SM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:OM,continuation:{tokenize:IM},exit:CM}},text:{91:{name:"gfmFootnoteCall",tokenize:_M},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:EM,resolveTo:TM}}}}function EM(t,r,e){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;i--;){const l=n.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return e(l);const u=pn(n.sliceSerialize({start:o.end,end:n.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?e(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),r(l))}}function TM(t,r){let e=t.length;for(;e--;)if(t[e][1].type==="labelImage"&&t[e][0]==="enter"){t[e][1];break}t[e+1][1].type="data",t[e+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},t[e+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[e+3][1].end),end:Object.assign({},t[e+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[t[e+1],t[e+2],["enter",n,r],t[e+3],t[e+4],["enter",i,r],["exit",i,r],["enter",a,r],["enter",o,r],["exit",o,r],["exit",a,r],t[t.length-2],t[t.length-1],["exit",n,r]];return t.splice(e,t.length-e+1,...s),t}function _M(t,r,e){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,o;return s;function s(h){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?e(h):(t.enter("gfmFootnoteCallMarker"),t.consume(h),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",u)}function u(h){if(a>999||h===93&&!o||h===null||h===91||rt(h))return e(h);if(h===93){t.exit("chunkString");const d=t.exit("gfmFootnoteCallString");return i.includes(pn(n.sliceSerialize(d)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),r):e(h)}return rt(h)||(o=!0),a++,t.consume(h),h===92?c:u}function c(h){return h===91||h===92||h===93?(t.consume(h),a++,u):u(h)}}function OM(t,r,e){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o=0,s;return l;function l(v){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(v),t.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(v){return v===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(v),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",c):e(v)}function c(v){if(o>999||v===93&&!s||v===null||v===91||rt(v))return e(v);if(v===93){t.exit("chunkString");const m=t.exit("gfmFootnoteDefinitionLabelString");return a=pn(n.sliceSerialize(m)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(v),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),d}return rt(v)||(s=!0),o++,t.consume(v),v===92?h:c}function h(v){return v===91||v===92||v===93?(t.consume(v),o++,c):c(v)}function d(v){return v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),i.includes(a)||i.push(a),De(t,f,"gfmFootnoteDefinitionWhitespace")):e(v)}function f(v){return r(v)}}function IM(t,r,e){return t.check(kl,r,t.attempt(kM,r,e))}function CM(t){t.exit("gfmFootnoteDefinition")}function PM(t,r,e){const n=this;return De(t,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?r(a):e(a)}}function AM(t){let e=t.singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:i};return e==null&&(e=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(o,s){let l=-1;for(;++l1?l(v):(o.consume(v),h++,f);if(h<2&&!e)return l(v);const b=o.exit("strikethroughSequenceTemporary"),y=Io(v);return b._open=!y||y===2&&!!m,b._close=!m||m===2&&!!y,s(v)}}}class MM{constructor(){this.map=[]}add(r,e,n){DM(this,r,e,n)}consume(r){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let e=this.map.length;const n=[];for(;e>0;)e-=1,n.push(r.slice(this.map[e][0]+this.map[e][1]),this.map[e][2]),r.length=this.map[e][0];n.push([...r]),r.length=0;let i=n.pop();for(;i;)r.push(...i),i=n.pop();this.map.length=0}}function DM(t,r,e,n){let i=0;if(!(e===0&&n.length===0)){for(;i-1;){const ne=n.events[z][1].type;if(ne==="lineEnding"||ne==="linePrefix")z--;else break}const L=z>-1?n.events[z][1].type:null,J=L==="tableHead"||L==="tableRow"?E:l;return J===E&&n.parser.lazy[n.now().line]?e(A):J(A)}function l(A){return t.enter("tableHead"),t.enter("tableRow"),u(A)}function u(A){return A===124||(o=!0,a+=1),c(A)}function c(A){return A===null?e(A):ve(A)?a>1?(a=0,n.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),f):e(A):Ne(A)?De(t,c,"whitespace")(A):(a+=1,o&&(o=!1,i+=1),A===124?(t.enter("tableCellDivider"),t.consume(A),t.exit("tableCellDivider"),o=!0,c):(t.enter("data"),h(A)))}function h(A){return A===null||A===124||rt(A)?(t.exit("data"),c(A)):(t.consume(A),A===92?d:h)}function d(A){return A===92||A===124?(t.consume(A),h):h(A)}function f(A){return n.interrupt=!1,n.parser.lazy[n.now().line]?e(A):(t.enter("tableDelimiterRow"),o=!1,Ne(A)?De(t,v,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):v(A))}function v(A){return A===45||A===58?b(A):A===124?(o=!0,t.enter("tableCellDivider"),t.consume(A),t.exit("tableCellDivider"),m):P(A)}function m(A){return Ne(A)?De(t,b,"whitespace")(A):b(A)}function b(A){return A===58?(a+=1,o=!0,t.enter("tableDelimiterMarker"),t.consume(A),t.exit("tableDelimiterMarker"),y):A===45?(a+=1,y(A)):A===null||ve(A)?O(A):P(A)}function y(A){return A===45?(t.enter("tableDelimiterFiller"),$(A)):P(A)}function $(A){return A===45?(t.consume(A),$):A===58?(o=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(A),t.exit("tableDelimiterMarker"),k):(t.exit("tableDelimiterFiller"),k(A))}function k(A){return Ne(A)?De(t,O,"whitespace")(A):O(A)}function O(A){return A===124?v(A):A===null||ve(A)?!o||i!==a?P(A):(t.exit("tableDelimiterRow"),t.exit("tableHead"),r(A)):P(A)}function P(A){return e(A)}function E(A){return t.enter("tableRow"),D(A)}function D(A){return A===124?(t.enter("tableCellDivider"),t.consume(A),t.exit("tableCellDivider"),D):A===null||ve(A)?(t.exit("tableRow"),r(A)):Ne(A)?De(t,D,"whitespace")(A):(t.enter("data"),B(A))}function B(A){return A===null||A===124||rt(A)?(t.exit("data"),D(A)):(t.consume(A),A===92?R:B)}function R(A){return A===92||A===124?(t.consume(A),B):B(A)}}function zM(t,r){let e=-1,n=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,u,c,h;const d=new MM;for(;++ee[2]+1){const v=e[2]+1,m=e[3]-e[2]-1;t.add(v,m,[])}}t.add(e[3]+1,0,[["exit",h,r]])}return i!==void 0&&(a.end=Object.assign({},lo(r.events,i)),t.add(i,0,[["exit",a,r]]),a=void 0),a}function Iy(t,r,e,n,i){const a=[],o=lo(r.events,e);i&&(i.end=Object.assign({},o),a.push(["exit",i,r])),n.end=Object.assign({},o),a.push(["exit",n,r]),t.add(e+1,0,a)}function lo(t,r){const e=t[r],n=e[0]==="enter"?"start":"end";return e[1][n]}const BM={name:"tasklistCheck",tokenize:jM};function LM(){return{text:{91:BM}}}function jM(t,r,e){const n=this;return i;function i(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?e(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),a)}function a(l){return rt(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),o):e(l)}function o(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),s):e(l)}function s(l){return ve(l)?r(l):Ne(l)?t.check({tokenize:HM},r,e)(l):e(l)}}function HM(t,r,e){return De(t,n,"whitespace");function n(i){return i===null?e(i):r(i)}}function WM(t){return e7([vM(),SM(),AM(t),RM(),LM()])}const qM={};function UM(t){const r=this,e=t||qM,n=r.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(WM(e)),a.push(cM()),o.push(hM(e))}function VM(){return{enter:{mathFlow:t,mathFlowFenceMeta:r,mathText:a},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:e,mathFlowValue:s,mathText:o,mathTextData:s}};function t(l){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},l)}function r(){this.buffer()}function e(){const l=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=l}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(l){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),c=this.stack[this.stack.length-1];c.type,this.exit(l),c.value=u;const h=c.data.hChildren[0];h.type,h.tagName,h.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function a(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function o(l){const u=this.resume(),c=this.stack[this.stack.length-1];c.type,this.exit(l),c.value=u,c.data.hChildren.push({type:"text",value:u})}function s(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function GM(t){let r=(t||{}).singleDollarTextMath;return r==null&&(r=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` `,inConstruct:"mathFlowMeta"},{character:"$",after:r?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:e,inlineMath:n}};function e(a,o,s,l){const u=a.value||"",c=s.createTracker(l),h="$".repeat(Math.max(E7(u,"$")+1,2)),d=s.enter("mathFlow");let f=c.move(h);if(a.meta){const v=s.enter("mathFlowMeta");f+=c.move(s.safe(a.meta,{after:` `,before:f,encode:["$"],...c.current()})),v()}return f+=c.move(` `),u&&(f+=c.move(u+` -`)),f+=c.move(h),d(),f}function n(a,o,s){let l=a.value||"",u=1;for(r||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(l);)u++;const c="$".repeat(u);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let h=-1;for(;++h15?u="…"+s.slice(i-15,i):u=s.slice(0,i);var c;a+15":">","<":"<",'"':""","'":"'"},oD=/[&><"']/g;function sD(t){return String(t).replace(oD,r=>aD[r])}var U7=function t(r){return r.type==="ordgroup"||r.type==="color"?r.body.length===1?t(r.body[0]):r:r.type==="font"?t(r.body):r},lD=function(r){var e=U7(r);return e.type==="mathord"||e.type==="textord"||e.type==="atom"},uD=function(r){if(!r)throw new Error("Expected non-null, but got "+String(r));return r},cD=function(r){var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(r);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},be={contains:tD,deflt:rD,escape:sD,hyphenate:iD,getBaseElem:U7,isCharacterBox:lD,protocolFromUrl:cD},Sc={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:t=>"#"+t},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,r)=>(r.push(t),r)},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:t=>Math.max(0,t),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:t=>Math.max(0,t),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:t=>Math.max(0,t),cli:"-e, --max-expand ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function hD(t){if(t.default)return t.default;var r=t.type,e=Array.isArray(r)?r[0]:r;if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Mm{constructor(r){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,r=r||{};for(var e in Sc)if(Sc.hasOwnProperty(e)){var n=Sc[e];this[e]=r[e]!==void 0?n.processor?n.processor(r[e]):r[e]:hD(n)}}reportNonstrict(r,e,n){var i=this.strict;if(typeof i=="function"&&(i=i(r,e,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new K("LaTeX-incompatible input and strict mode is set to 'error': "+(e+" ["+r+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(e+" ["+r+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+e+" ["+r+"]"))}}useStrictBehavior(r,e,n){var i=this.strict;if(typeof i=="function")try{i=i(r,e,n)}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': "+(e+" ["+r+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+e+" ["+r+"]")),!1)}isTrusted(r){if(r.url&&!r.protocol){var e=be.protocolFromUrl(r.url);if(e==null)return!1;r.protocol=e}var n=typeof this.trust=="function"?this.trust(r):this.trust;return!!n}}class pi{constructor(r,e,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=r,this.size=e,this.cramped=n}sup(){return kn[dD[this.id]]}sub(){return kn[fD[this.id]]}fracNum(){return kn[vD[this.id]]}fracDen(){return kn[pD[this.id]]}cramp(){return kn[mD[this.id]]}text(){return kn[gD[this.id]]}isTight(){return this.size>=2}}var Dm=0,Kc=1,So=2,Un=3,nl=4,Yr=5,Co=6,lr=7,kn=[new pi(Dm,0,!1),new pi(Kc,0,!0),new pi(So,1,!1),new pi(Un,1,!0),new pi(nl,2,!1),new pi(Yr,2,!0),new pi(Co,3,!1),new pi(lr,3,!0)],dD=[nl,Yr,nl,Yr,Co,lr,Co,lr],fD=[Yr,Yr,Yr,Yr,lr,lr,lr,lr],vD=[So,Un,nl,Yr,Co,lr,Co,lr],pD=[Un,Un,Yr,Yr,lr,lr,lr,lr],mD=[Kc,Kc,Un,Un,Yr,Yr,lr,lr],gD=[Dm,Kc,So,Un,So,Un,So,Un],xe={DISPLAY:kn[Dm],TEXT:kn[So],SCRIPT:kn[nl],SCRIPTSCRIPT:kn[Co]},Wv=[{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 yD(t){for(var r=0;r=i[0]&&t<=i[1])return e.name}return null}var Ec=[];Wv.forEach(t=>t.blocks.forEach(r=>Ec.push(...r)));function V7(t){for(var r=0;r=Ec[r]&&t<=Ec[r+1])return!0;return!1}var Xa=80,bD=function(r,e){return"M95,"+(622+r+e)+` +`)),f+=c.move(h),d(),f}function n(a,o,s){let l=a.value||"",u=1;for(r||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(l);)u++;const c="$".repeat(u);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let h=-1;for(;++h15?u="…"+s.slice(i-15,i):u=s.slice(0,i);var c;a+15":">","<":"<",'"':""","'":"'"},oD=/[&><"']/g;function sD(t){return String(t).replace(oD,r=>aD[r])}var U7=function t(r){return r.type==="ordgroup"||r.type==="color"?r.body.length===1?t(r.body[0]):r:r.type==="font"?t(r.body):r},lD=function(r){var e=U7(r);return e.type==="mathord"||e.type==="textord"||e.type==="atom"},uD=function(r){if(!r)throw new Error("Expected non-null, but got "+String(r));return r},cD=function(r){var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(r);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},ge={contains:tD,deflt:rD,escape:sD,hyphenate:iD,getBaseElem:U7,isCharacterBox:lD,protocolFromUrl:cD},Sc={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:t=>"#"+t},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,r)=>(r.push(t),r)},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:t=>Math.max(0,t),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:t=>Math.max(0,t),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:t=>Math.max(0,t),cli:"-e, --max-expand ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function hD(t){if(t.default)return t.default;var r=t.type,e=Array.isArray(r)?r[0]:r;if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Mm{constructor(r){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,r=r||{};for(var e in Sc)if(Sc.hasOwnProperty(e)){var n=Sc[e];this[e]=r[e]!==void 0?n.processor?n.processor(r[e]):r[e]:hD(n)}}reportNonstrict(r,e,n){var i=this.strict;if(typeof i=="function"&&(i=i(r,e,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new K("LaTeX-incompatible input and strict mode is set to 'error': "+(e+" ["+r+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(e+" ["+r+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+e+" ["+r+"]"))}}useStrictBehavior(r,e,n){var i=this.strict;if(typeof i=="function")try{i=i(r,e,n)}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': "+(e+" ["+r+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+e+" ["+r+"]")),!1)}isTrusted(r){if(r.url&&!r.protocol){var e=ge.protocolFromUrl(r.url);if(e==null)return!1;r.protocol=e}var n=typeof this.trust=="function"?this.trust(r):this.trust;return!!n}}class pi{constructor(r,e,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=r,this.size=e,this.cramped=n}sup(){return kn[dD[this.id]]}sub(){return kn[fD[this.id]]}fracNum(){return kn[vD[this.id]]}fracDen(){return kn[pD[this.id]]}cramp(){return kn[mD[this.id]]}text(){return kn[gD[this.id]]}isTight(){return this.size>=2}}var Dm=0,Kc=1,So=2,Un=3,nl=4,Yr=5,Co=6,lr=7,kn=[new pi(Dm,0,!1),new pi(Kc,0,!0),new pi(So,1,!1),new pi(Un,1,!0),new pi(nl,2,!1),new pi(Yr,2,!0),new pi(Co,3,!1),new pi(lr,3,!0)],dD=[nl,Yr,nl,Yr,Co,lr,Co,lr],fD=[Yr,Yr,Yr,Yr,lr,lr,lr,lr],vD=[So,Un,nl,Yr,Co,lr,Co,lr],pD=[Un,Un,Yr,Yr,lr,lr,lr,lr],mD=[Kc,Kc,Un,Un,Yr,Yr,lr,lr],gD=[Dm,Kc,So,Un,So,Un,So,Un],we={DISPLAY:kn[Dm],TEXT:kn[So],SCRIPT:kn[nl],SCRIPTSCRIPT:kn[Co]},Wv=[{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 yD(t){for(var r=0;r=i[0]&&t<=i[1])return e.name}return null}var Ec=[];Wv.forEach(t=>t.blocks.forEach(r=>Ec.push(...r)));function V7(t){for(var r=0;r=Ec[r]&&t<=Ec[r+1])return!0;return!1}var Xa=80,bD=function(r,e){return"M95,"+(622+r+e)+` 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 @@ -313,15 +313,15 @@ 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 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,-`+(e+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 Tl{constructor(r){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=r,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(r){return be.contains(this.classes,r)}toNode(){for(var r=document.createDocumentFragment(),e=0;ee.toText();return this.children.map(r).join("")}}var En={"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]}},_u={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]},Ay={Å:"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 ID(t,r){En[t]=r}function Nm(t,r,e){if(!En[r])throw new Error("Font metrics not found for font: "+r+".");var n=t.charCodeAt(0),i=En[r][n];if(!i&&t[0]in Ay&&(n=Ay[t[0]].charCodeAt(0),i=En[r][n]),!i&&e==="text"&&V7(n)&&(i=En[r][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var rd={};function CD(t){var r;if(t>=5?r=0:t>=3?r=1:r=2,!rd[r]){var e=rd[r]={cssEmPerMu:_u.quad[r]/18};for(var n in _u)_u.hasOwnProperty(n)&&(e[n]=_u[n][r])}return rd[r]}var PD=[[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]],My=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Dy=function(r,e){return e.size<2?r:PD[r-1][e.size-1]};class Wn{constructor(r){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=r.style,this.color=r.color,this.size=r.size||Wn.BASESIZE,this.textSize=r.textSize||this.size,this.phantom=!!r.phantom,this.font=r.font||"",this.fontFamily=r.fontFamily||"",this.fontWeight=r.fontWeight||"",this.fontShape=r.fontShape||"",this.sizeMultiplier=My[this.size-1],this.maxSize=r.maxSize,this.minRuleThickness=r.minRuleThickness,this._fontMetrics=void 0}extend(r){var e={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 n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);return new Wn(e)}havingStyle(r){return this.style===r?this:this.extend({style:r,size:Dy(this.textSize,r)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(r){return this.size===r&&this.textSize===r?this:this.extend({style:this.style.text(),size:r,textSize:r,sizeMultiplier:My[r-1]})}havingBaseStyle(r){r=r||this.style.text();var e=Dy(Wn.BASESIZE,r);return this.size===e&&this.textSize===Wn.BASESIZE&&this.style===r?this:this.extend({style:r,size:e})}havingBaseSizing(){var r;switch(this.style.id){case 4:case 5:r=3;break;case 6:case 7:r=1;break;default:r=6}return this.extend({style:this.style.text(),size:r})}withColor(r){return this.extend({color:r})}withPhantom(){return this.extend({phantom:!0})}withFont(r){return this.extend({font:r})}withTextFontFamily(r){return this.extend({fontFamily:r,font:""})}withTextFontWeight(r){return this.extend({fontWeight:r,font:""})}withTextFontShape(r){return this.extend({fontShape:r,font:""})}sizingClasses(r){return r.size!==this.size?["sizing","reset-size"+r.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Wn.BASESIZE?["sizing","reset-size"+this.size,"size"+Wn.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=CD(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Wn.BASESIZE=6;var qv={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},AD={ex:!0,em:!0,mu:!0},G7=function(r){return typeof r!="string"&&(r=r.unit),r in qv||r in AD||r==="ex"},pt=function(r,e){var n;if(r.unit in qv)n=qv[r.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if(r.unit==="mu")n=e.fontMetrics().cssEmPerMu;else{var i;if(e.style.isTight()?i=e.havingStyle(e.style.text()):i=e,r.unit==="ex")n=i.fontMetrics().xHeight;else if(r.unit==="em")n=i.fontMetrics().quad;else throw new K("Invalid unit: '"+r.unit+"'");i!==e&&(n*=i.sizeMultiplier/e.sizeMultiplier)}return Math.min(r.number*n,e.maxSize)},ee=function(r){return+r.toFixed(4)+"em"},Ni=function(r){return r.filter(e=>e).join(" ")},K7=function(r,e,n){if(this.classes=r||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},e){e.style.isTight()&&this.classes.push("mtight");var i=e.getColor();i&&(this.style.color=i)}},Y7=function(r){var e=document.createElement(r);e.className=Ni(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(e.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&e.setAttribute(i,this.attributes[i]);for(var a=0;a",e};class _l{constructor(r,e,n,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,K7.call(this,r,n,i),this.children=e||[]}setAttribute(r,e){this.attributes[r]=e}hasClass(r){return be.contains(this.classes,r)}toNode(){return Y7.call(this,"span")}toMarkup(){return X7.call(this,"span")}}class Rm{constructor(r,e,n,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,K7.call(this,e,i),this.children=n||[],this.setAttribute("href",r)}setAttribute(r,e){this.attributes[r]=e}hasClass(r){return be.contains(this.classes,r)}toNode(){return Y7.call(this,"a")}toMarkup(){return X7.call(this,"a")}}class MD{constructor(r,e,n){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=e,this.src=r,this.classes=["mord"],this.style=n}hasClass(r){return be.contains(this.classes,r)}toNode(){var r=document.createElement("img");r.src=this.src,r.alt=this.alt,r.className="mord";for(var e in this.style)this.style.hasOwnProperty(e)&&(r.style[e]=this.style[e]);return r}toMarkup(){var r=''+be.escape(this.alt)+'0&&(e=document.createElement("span"),e.style.marginRight=ee(this.italic)),this.classes.length>0&&(e=e||document.createElement("span"),e.className=Ni(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(e=e||document.createElement("span"),e.style[n]=this.style[n]);return e?(e.appendChild(r),e):r}toMarkup(){var r=!1,e="0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=be.hyphenate(i)+":"+this.style[i]+";");n&&(r=!0,e+=' style="'+be.escape(n)+'"');var a=be.escape(this.text);return r?(e+=">",e+=a,e+="",e):a}}class ri{constructor(r,e){this.children=void 0,this.attributes=void 0,this.children=r||[],this.attributes=e||{}}toNode(){var r="http://www.w3.org/2000/svg",e=document.createElementNS(r,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&e.setAttribute(n,this.attributes[n]);for(var i=0;i':''}}class Uv{constructor(r){this.attributes=void 0,this.attributes=r||{}}toNode(){var r="http://www.w3.org/2000/svg",e=document.createElementNS(r,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&e.setAttribute(n,this.attributes[n]);return e}toMarkup(){var r=" but got "+String(t)+".")}var RD={bin:1,close:1,inner:1,open:1,punct:1,rel:1},FD={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ut={math:{},text:{}};function p(t,r,e,n,i,a){ut[t][i]={font:r,group:e,replace:n},a&&n&&(ut[t][n]=ut[t][i])}var m="math",q="text",w="main",E="ams",ht="accent-token",le="bin",hr="close",Go="inner",$e="mathord",Dt="op-token",zr="open",Ph="punct",O="rel",ci="spacing",M="textord";p(m,w,O,"≡","\\equiv",!0);p(m,w,O,"≺","\\prec",!0);p(m,w,O,"≻","\\succ",!0);p(m,w,O,"∼","\\sim",!0);p(m,w,O,"⊥","\\perp");p(m,w,O,"⪯","\\preceq",!0);p(m,w,O,"⪰","\\succeq",!0);p(m,w,O,"≃","\\simeq",!0);p(m,w,O,"∣","\\mid",!0);p(m,w,O,"≪","\\ll",!0);p(m,w,O,"≫","\\gg",!0);p(m,w,O,"≍","\\asymp",!0);p(m,w,O,"∥","\\parallel");p(m,w,O,"⋈","\\bowtie",!0);p(m,w,O,"⌣","\\smile",!0);p(m,w,O,"⊑","\\sqsubseteq",!0);p(m,w,O,"⊒","\\sqsupseteq",!0);p(m,w,O,"≐","\\doteq",!0);p(m,w,O,"⌢","\\frown",!0);p(m,w,O,"∋","\\ni",!0);p(m,w,O,"∝","\\propto",!0);p(m,w,O,"⊢","\\vdash",!0);p(m,w,O,"⊣","\\dashv",!0);p(m,w,O,"∋","\\owns");p(m,w,Ph,".","\\ldotp");p(m,w,Ph,"⋅","\\cdotp");p(m,w,M,"#","\\#");p(q,w,M,"#","\\#");p(m,w,M,"&","\\&");p(q,w,M,"&","\\&");p(m,w,M,"ℵ","\\aleph",!0);p(m,w,M,"∀","\\forall",!0);p(m,w,M,"ℏ","\\hbar",!0);p(m,w,M,"∃","\\exists",!0);p(m,w,M,"∇","\\nabla",!0);p(m,w,M,"♭","\\flat",!0);p(m,w,M,"ℓ","\\ell",!0);p(m,w,M,"♮","\\natural",!0);p(m,w,M,"♣","\\clubsuit",!0);p(m,w,M,"℘","\\wp",!0);p(m,w,M,"♯","\\sharp",!0);p(m,w,M,"♢","\\diamondsuit",!0);p(m,w,M,"ℜ","\\Re",!0);p(m,w,M,"♡","\\heartsuit",!0);p(m,w,M,"ℑ","\\Im",!0);p(m,w,M,"♠","\\spadesuit",!0);p(m,w,M,"§","\\S",!0);p(q,w,M,"§","\\S");p(m,w,M,"¶","\\P",!0);p(q,w,M,"¶","\\P");p(m,w,M,"†","\\dag");p(q,w,M,"†","\\dag");p(q,w,M,"†","\\textdagger");p(m,w,M,"‡","\\ddag");p(q,w,M,"‡","\\ddag");p(q,w,M,"‡","\\textdaggerdbl");p(m,w,hr,"⎱","\\rmoustache",!0);p(m,w,zr,"⎰","\\lmoustache",!0);p(m,w,hr,"⟯","\\rgroup",!0);p(m,w,zr,"⟮","\\lgroup",!0);p(m,w,le,"∓","\\mp",!0);p(m,w,le,"⊖","\\ominus",!0);p(m,w,le,"⊎","\\uplus",!0);p(m,w,le,"⊓","\\sqcap",!0);p(m,w,le,"∗","\\ast");p(m,w,le,"⊔","\\sqcup",!0);p(m,w,le,"◯","\\bigcirc",!0);p(m,w,le,"∙","\\bullet",!0);p(m,w,le,"‡","\\ddagger");p(m,w,le,"≀","\\wr",!0);p(m,w,le,"⨿","\\amalg");p(m,w,le,"&","\\And");p(m,w,O,"⟵","\\longleftarrow",!0);p(m,w,O,"⇐","\\Leftarrow",!0);p(m,w,O,"⟸","\\Longleftarrow",!0);p(m,w,O,"⟶","\\longrightarrow",!0);p(m,w,O,"⇒","\\Rightarrow",!0);p(m,w,O,"⟹","\\Longrightarrow",!0);p(m,w,O,"↔","\\leftrightarrow",!0);p(m,w,O,"⟷","\\longleftrightarrow",!0);p(m,w,O,"⇔","\\Leftrightarrow",!0);p(m,w,O,"⟺","\\Longleftrightarrow",!0);p(m,w,O,"↦","\\mapsto",!0);p(m,w,O,"⟼","\\longmapsto",!0);p(m,w,O,"↗","\\nearrow",!0);p(m,w,O,"↩","\\hookleftarrow",!0);p(m,w,O,"↪","\\hookrightarrow",!0);p(m,w,O,"↘","\\searrow",!0);p(m,w,O,"↼","\\leftharpoonup",!0);p(m,w,O,"⇀","\\rightharpoonup",!0);p(m,w,O,"↙","\\swarrow",!0);p(m,w,O,"↽","\\leftharpoondown",!0);p(m,w,O,"⇁","\\rightharpoondown",!0);p(m,w,O,"↖","\\nwarrow",!0);p(m,w,O,"⇌","\\rightleftharpoons",!0);p(m,E,O,"≮","\\nless",!0);p(m,E,O,"","\\@nleqslant");p(m,E,O,"","\\@nleqq");p(m,E,O,"⪇","\\lneq",!0);p(m,E,O,"≨","\\lneqq",!0);p(m,E,O,"","\\@lvertneqq");p(m,E,O,"⋦","\\lnsim",!0);p(m,E,O,"⪉","\\lnapprox",!0);p(m,E,O,"⊀","\\nprec",!0);p(m,E,O,"⋠","\\npreceq",!0);p(m,E,O,"⋨","\\precnsim",!0);p(m,E,O,"⪹","\\precnapprox",!0);p(m,E,O,"≁","\\nsim",!0);p(m,E,O,"","\\@nshortmid");p(m,E,O,"∤","\\nmid",!0);p(m,E,O,"⊬","\\nvdash",!0);p(m,E,O,"⊭","\\nvDash",!0);p(m,E,O,"⋪","\\ntriangleleft");p(m,E,O,"⋬","\\ntrianglelefteq",!0);p(m,E,O,"⊊","\\subsetneq",!0);p(m,E,O,"","\\@varsubsetneq");p(m,E,O,"⫋","\\subsetneqq",!0);p(m,E,O,"","\\@varsubsetneqq");p(m,E,O,"≯","\\ngtr",!0);p(m,E,O,"","\\@ngeqslant");p(m,E,O,"","\\@ngeqq");p(m,E,O,"⪈","\\gneq",!0);p(m,E,O,"≩","\\gneqq",!0);p(m,E,O,"","\\@gvertneqq");p(m,E,O,"⋧","\\gnsim",!0);p(m,E,O,"⪊","\\gnapprox",!0);p(m,E,O,"⊁","\\nsucc",!0);p(m,E,O,"⋡","\\nsucceq",!0);p(m,E,O,"⋩","\\succnsim",!0);p(m,E,O,"⪺","\\succnapprox",!0);p(m,E,O,"≆","\\ncong",!0);p(m,E,O,"","\\@nshortparallel");p(m,E,O,"∦","\\nparallel",!0);p(m,E,O,"⊯","\\nVDash",!0);p(m,E,O,"⋫","\\ntriangleright");p(m,E,O,"⋭","\\ntrianglerighteq",!0);p(m,E,O,"","\\@nsupseteqq");p(m,E,O,"⊋","\\supsetneq",!0);p(m,E,O,"","\\@varsupsetneq");p(m,E,O,"⫌","\\supsetneqq",!0);p(m,E,O,"","\\@varsupsetneqq");p(m,E,O,"⊮","\\nVdash",!0);p(m,E,O,"⪵","\\precneqq",!0);p(m,E,O,"⪶","\\succneqq",!0);p(m,E,O,"","\\@nsubseteqq");p(m,E,le,"⊴","\\unlhd");p(m,E,le,"⊵","\\unrhd");p(m,E,O,"↚","\\nleftarrow",!0);p(m,E,O,"↛","\\nrightarrow",!0);p(m,E,O,"⇍","\\nLeftarrow",!0);p(m,E,O,"⇏","\\nRightarrow",!0);p(m,E,O,"↮","\\nleftrightarrow",!0);p(m,E,O,"⇎","\\nLeftrightarrow",!0);p(m,E,O,"△","\\vartriangle");p(m,E,M,"ℏ","\\hslash");p(m,E,M,"▽","\\triangledown");p(m,E,M,"◊","\\lozenge");p(m,E,M,"Ⓢ","\\circledS");p(m,E,M,"®","\\circledR");p(q,E,M,"®","\\circledR");p(m,E,M,"∡","\\measuredangle",!0);p(m,E,M,"∄","\\nexists");p(m,E,M,"℧","\\mho");p(m,E,M,"Ⅎ","\\Finv",!0);p(m,E,M,"⅁","\\Game",!0);p(m,E,M,"‵","\\backprime");p(m,E,M,"▲","\\blacktriangle");p(m,E,M,"▼","\\blacktriangledown");p(m,E,M,"■","\\blacksquare");p(m,E,M,"⧫","\\blacklozenge");p(m,E,M,"★","\\bigstar");p(m,E,M,"∢","\\sphericalangle",!0);p(m,E,M,"∁","\\complement",!0);p(m,E,M,"ð","\\eth",!0);p(q,w,M,"ð","ð");p(m,E,M,"╱","\\diagup");p(m,E,M,"╲","\\diagdown");p(m,E,M,"□","\\square");p(m,E,M,"□","\\Box");p(m,E,M,"◊","\\Diamond");p(m,E,M,"¥","\\yen",!0);p(q,E,M,"¥","\\yen",!0);p(m,E,M,"✓","\\checkmark",!0);p(q,E,M,"✓","\\checkmark");p(m,E,M,"ℶ","\\beth",!0);p(m,E,M,"ℸ","\\daleth",!0);p(m,E,M,"ℷ","\\gimel",!0);p(m,E,M,"ϝ","\\digamma",!0);p(m,E,M,"ϰ","\\varkappa");p(m,E,zr,"┌","\\@ulcorner",!0);p(m,E,hr,"┐","\\@urcorner",!0);p(m,E,zr,"└","\\@llcorner",!0);p(m,E,hr,"┘","\\@lrcorner",!0);p(m,E,O,"≦","\\leqq",!0);p(m,E,O,"⩽","\\leqslant",!0);p(m,E,O,"⪕","\\eqslantless",!0);p(m,E,O,"≲","\\lesssim",!0);p(m,E,O,"⪅","\\lessapprox",!0);p(m,E,O,"≊","\\approxeq",!0);p(m,E,le,"⋖","\\lessdot");p(m,E,O,"⋘","\\lll",!0);p(m,E,O,"≶","\\lessgtr",!0);p(m,E,O,"⋚","\\lesseqgtr",!0);p(m,E,O,"⪋","\\lesseqqgtr",!0);p(m,E,O,"≑","\\doteqdot");p(m,E,O,"≓","\\risingdotseq",!0);p(m,E,O,"≒","\\fallingdotseq",!0);p(m,E,O,"∽","\\backsim",!0);p(m,E,O,"⋍","\\backsimeq",!0);p(m,E,O,"⫅","\\subseteqq",!0);p(m,E,O,"⋐","\\Subset",!0);p(m,E,O,"⊏","\\sqsubset",!0);p(m,E,O,"≼","\\preccurlyeq",!0);p(m,E,O,"⋞","\\curlyeqprec",!0);p(m,E,O,"≾","\\precsim",!0);p(m,E,O,"⪷","\\precapprox",!0);p(m,E,O,"⊲","\\vartriangleleft");p(m,E,O,"⊴","\\trianglelefteq");p(m,E,O,"⊨","\\vDash",!0);p(m,E,O,"⊪","\\Vvdash",!0);p(m,E,O,"⌣","\\smallsmile");p(m,E,O,"⌢","\\smallfrown");p(m,E,O,"≏","\\bumpeq",!0);p(m,E,O,"≎","\\Bumpeq",!0);p(m,E,O,"≧","\\geqq",!0);p(m,E,O,"⩾","\\geqslant",!0);p(m,E,O,"⪖","\\eqslantgtr",!0);p(m,E,O,"≳","\\gtrsim",!0);p(m,E,O,"⪆","\\gtrapprox",!0);p(m,E,le,"⋗","\\gtrdot");p(m,E,O,"⋙","\\ggg",!0);p(m,E,O,"≷","\\gtrless",!0);p(m,E,O,"⋛","\\gtreqless",!0);p(m,E,O,"⪌","\\gtreqqless",!0);p(m,E,O,"≖","\\eqcirc",!0);p(m,E,O,"≗","\\circeq",!0);p(m,E,O,"≜","\\triangleq",!0);p(m,E,O,"∼","\\thicksim");p(m,E,O,"≈","\\thickapprox");p(m,E,O,"⫆","\\supseteqq",!0);p(m,E,O,"⋑","\\Supset",!0);p(m,E,O,"⊐","\\sqsupset",!0);p(m,E,O,"≽","\\succcurlyeq",!0);p(m,E,O,"⋟","\\curlyeqsucc",!0);p(m,E,O,"≿","\\succsim",!0);p(m,E,O,"⪸","\\succapprox",!0);p(m,E,O,"⊳","\\vartriangleright");p(m,E,O,"⊵","\\trianglerighteq");p(m,E,O,"⊩","\\Vdash",!0);p(m,E,O,"∣","\\shortmid");p(m,E,O,"∥","\\shortparallel");p(m,E,O,"≬","\\between",!0);p(m,E,O,"⋔","\\pitchfork",!0);p(m,E,O,"∝","\\varpropto");p(m,E,O,"◀","\\blacktriangleleft");p(m,E,O,"∴","\\therefore",!0);p(m,E,O,"∍","\\backepsilon");p(m,E,O,"▶","\\blacktriangleright");p(m,E,O,"∵","\\because",!0);p(m,E,O,"⋘","\\llless");p(m,E,O,"⋙","\\gggtr");p(m,E,le,"⊲","\\lhd");p(m,E,le,"⊳","\\rhd");p(m,E,O,"≂","\\eqsim",!0);p(m,w,O,"⋈","\\Join");p(m,E,O,"≑","\\Doteq",!0);p(m,E,le,"∔","\\dotplus",!0);p(m,E,le,"∖","\\smallsetminus");p(m,E,le,"⋒","\\Cap",!0);p(m,E,le,"⋓","\\Cup",!0);p(m,E,le,"⩞","\\doublebarwedge",!0);p(m,E,le,"⊟","\\boxminus",!0);p(m,E,le,"⊞","\\boxplus",!0);p(m,E,le,"⋇","\\divideontimes",!0);p(m,E,le,"⋉","\\ltimes",!0);p(m,E,le,"⋊","\\rtimes",!0);p(m,E,le,"⋋","\\leftthreetimes",!0);p(m,E,le,"⋌","\\rightthreetimes",!0);p(m,E,le,"⋏","\\curlywedge",!0);p(m,E,le,"⋎","\\curlyvee",!0);p(m,E,le,"⊝","\\circleddash",!0);p(m,E,le,"⊛","\\circledast",!0);p(m,E,le,"⋅","\\centerdot");p(m,E,le,"⊺","\\intercal",!0);p(m,E,le,"⋒","\\doublecap");p(m,E,le,"⋓","\\doublecup");p(m,E,le,"⊠","\\boxtimes",!0);p(m,E,O,"⇢","\\dashrightarrow",!0);p(m,E,O,"⇠","\\dashleftarrow",!0);p(m,E,O,"⇇","\\leftleftarrows",!0);p(m,E,O,"⇆","\\leftrightarrows",!0);p(m,E,O,"⇚","\\Lleftarrow",!0);p(m,E,O,"↞","\\twoheadleftarrow",!0);p(m,E,O,"↢","\\leftarrowtail",!0);p(m,E,O,"↫","\\looparrowleft",!0);p(m,E,O,"⇋","\\leftrightharpoons",!0);p(m,E,O,"↶","\\curvearrowleft",!0);p(m,E,O,"↺","\\circlearrowleft",!0);p(m,E,O,"↰","\\Lsh",!0);p(m,E,O,"⇈","\\upuparrows",!0);p(m,E,O,"↿","\\upharpoonleft",!0);p(m,E,O,"⇃","\\downharpoonleft",!0);p(m,w,O,"⊶","\\origof",!0);p(m,w,O,"⊷","\\imageof",!0);p(m,E,O,"⊸","\\multimap",!0);p(m,E,O,"↭","\\leftrightsquigarrow",!0);p(m,E,O,"⇉","\\rightrightarrows",!0);p(m,E,O,"⇄","\\rightleftarrows",!0);p(m,E,O,"↠","\\twoheadrightarrow",!0);p(m,E,O,"↣","\\rightarrowtail",!0);p(m,E,O,"↬","\\looparrowright",!0);p(m,E,O,"↷","\\curvearrowright",!0);p(m,E,O,"↻","\\circlearrowright",!0);p(m,E,O,"↱","\\Rsh",!0);p(m,E,O,"⇊","\\downdownarrows",!0);p(m,E,O,"↾","\\upharpoonright",!0);p(m,E,O,"⇂","\\downharpoonright",!0);p(m,E,O,"⇝","\\rightsquigarrow",!0);p(m,E,O,"⇝","\\leadsto");p(m,E,O,"⇛","\\Rrightarrow",!0);p(m,E,O,"↾","\\restriction");p(m,w,M,"‘","`");p(m,w,M,"$","\\$");p(q,w,M,"$","\\$");p(q,w,M,"$","\\textdollar");p(m,w,M,"%","\\%");p(q,w,M,"%","\\%");p(m,w,M,"_","\\_");p(q,w,M,"_","\\_");p(q,w,M,"_","\\textunderscore");p(m,w,M,"∠","\\angle",!0);p(m,w,M,"∞","\\infty",!0);p(m,w,M,"′","\\prime");p(m,w,M,"△","\\triangle");p(m,w,M,"Γ","\\Gamma",!0);p(m,w,M,"Δ","\\Delta",!0);p(m,w,M,"Θ","\\Theta",!0);p(m,w,M,"Λ","\\Lambda",!0);p(m,w,M,"Ξ","\\Xi",!0);p(m,w,M,"Π","\\Pi",!0);p(m,w,M,"Σ","\\Sigma",!0);p(m,w,M,"Υ","\\Upsilon",!0);p(m,w,M,"Φ","\\Phi",!0);p(m,w,M,"Ψ","\\Psi",!0);p(m,w,M,"Ω","\\Omega",!0);p(m,w,M,"A","Α");p(m,w,M,"B","Β");p(m,w,M,"E","Ε");p(m,w,M,"Z","Ζ");p(m,w,M,"H","Η");p(m,w,M,"I","Ι");p(m,w,M,"K","Κ");p(m,w,M,"M","Μ");p(m,w,M,"N","Ν");p(m,w,M,"O","Ο");p(m,w,M,"P","Ρ");p(m,w,M,"T","Τ");p(m,w,M,"X","Χ");p(m,w,M,"¬","\\neg",!0);p(m,w,M,"¬","\\lnot");p(m,w,M,"⊤","\\top");p(m,w,M,"⊥","\\bot");p(m,w,M,"∅","\\emptyset");p(m,E,M,"∅","\\varnothing");p(m,w,$e,"α","\\alpha",!0);p(m,w,$e,"β","\\beta",!0);p(m,w,$e,"γ","\\gamma",!0);p(m,w,$e,"δ","\\delta",!0);p(m,w,$e,"ϵ","\\epsilon",!0);p(m,w,$e,"ζ","\\zeta",!0);p(m,w,$e,"η","\\eta",!0);p(m,w,$e,"θ","\\theta",!0);p(m,w,$e,"ι","\\iota",!0);p(m,w,$e,"κ","\\kappa",!0);p(m,w,$e,"λ","\\lambda",!0);p(m,w,$e,"μ","\\mu",!0);p(m,w,$e,"ν","\\nu",!0);p(m,w,$e,"ξ","\\xi",!0);p(m,w,$e,"ο","\\omicron",!0);p(m,w,$e,"π","\\pi",!0);p(m,w,$e,"ρ","\\rho",!0);p(m,w,$e,"σ","\\sigma",!0);p(m,w,$e,"τ","\\tau",!0);p(m,w,$e,"υ","\\upsilon",!0);p(m,w,$e,"ϕ","\\phi",!0);p(m,w,$e,"χ","\\chi",!0);p(m,w,$e,"ψ","\\psi",!0);p(m,w,$e,"ω","\\omega",!0);p(m,w,$e,"ε","\\varepsilon",!0);p(m,w,$e,"ϑ","\\vartheta",!0);p(m,w,$e,"ϖ","\\varpi",!0);p(m,w,$e,"ϱ","\\varrho",!0);p(m,w,$e,"ς","\\varsigma",!0);p(m,w,$e,"φ","\\varphi",!0);p(m,w,le,"∗","*",!0);p(m,w,le,"+","+");p(m,w,le,"−","-",!0);p(m,w,le,"⋅","\\cdot",!0);p(m,w,le,"∘","\\circ",!0);p(m,w,le,"÷","\\div",!0);p(m,w,le,"±","\\pm",!0);p(m,w,le,"×","\\times",!0);p(m,w,le,"∩","\\cap",!0);p(m,w,le,"∪","\\cup",!0);p(m,w,le,"∖","\\setminus",!0);p(m,w,le,"∧","\\land");p(m,w,le,"∨","\\lor");p(m,w,le,"∧","\\wedge",!0);p(m,w,le,"∨","\\vee",!0);p(m,w,M,"√","\\surd");p(m,w,zr,"⟨","\\langle",!0);p(m,w,zr,"∣","\\lvert");p(m,w,zr,"∥","\\lVert");p(m,w,hr,"?","?");p(m,w,hr,"!","!");p(m,w,hr,"⟩","\\rangle",!0);p(m,w,hr,"∣","\\rvert");p(m,w,hr,"∥","\\rVert");p(m,w,O,"=","=");p(m,w,O,":",":");p(m,w,O,"≈","\\approx",!0);p(m,w,O,"≅","\\cong",!0);p(m,w,O,"≥","\\ge");p(m,w,O,"≥","\\geq",!0);p(m,w,O,"←","\\gets");p(m,w,O,">","\\gt",!0);p(m,w,O,"∈","\\in",!0);p(m,w,O,"","\\@not");p(m,w,O,"⊂","\\subset",!0);p(m,w,O,"⊃","\\supset",!0);p(m,w,O,"⊆","\\subseteq",!0);p(m,w,O,"⊇","\\supseteq",!0);p(m,E,O,"⊈","\\nsubseteq",!0);p(m,E,O,"⊉","\\nsupseteq",!0);p(m,w,O,"⊨","\\models");p(m,w,O,"←","\\leftarrow",!0);p(m,w,O,"≤","\\le");p(m,w,O,"≤","\\leq",!0);p(m,w,O,"<","\\lt",!0);p(m,w,O,"→","\\rightarrow",!0);p(m,w,O,"→","\\to");p(m,E,O,"≱","\\ngeq",!0);p(m,E,O,"≰","\\nleq",!0);p(m,w,ci," ","\\ ");p(m,w,ci," ","\\space");p(m,w,ci," ","\\nobreakspace");p(q,w,ci," ","\\ ");p(q,w,ci," "," ");p(q,w,ci," ","\\space");p(q,w,ci," ","\\nobreakspace");p(m,w,ci,null,"\\nobreak");p(m,w,ci,null,"\\allowbreak");p(m,w,Ph,",",",");p(m,w,Ph,";",";");p(m,E,le,"⊼","\\barwedge",!0);p(m,E,le,"⊻","\\veebar",!0);p(m,w,le,"⊙","\\odot",!0);p(m,w,le,"⊕","\\oplus",!0);p(m,w,le,"⊗","\\otimes",!0);p(m,w,M,"∂","\\partial",!0);p(m,w,le,"⊘","\\oslash",!0);p(m,E,le,"⊚","\\circledcirc",!0);p(m,E,le,"⊡","\\boxdot",!0);p(m,w,le,"△","\\bigtriangleup");p(m,w,le,"▽","\\bigtriangledown");p(m,w,le,"†","\\dagger");p(m,w,le,"⋄","\\diamond");p(m,w,le,"⋆","\\star");p(m,w,le,"◃","\\triangleleft");p(m,w,le,"▹","\\triangleright");p(m,w,zr,"{","\\{");p(q,w,M,"{","\\{");p(q,w,M,"{","\\textbraceleft");p(m,w,hr,"}","\\}");p(q,w,M,"}","\\}");p(q,w,M,"}","\\textbraceright");p(m,w,zr,"{","\\lbrace");p(m,w,hr,"}","\\rbrace");p(m,w,zr,"[","\\lbrack",!0);p(q,w,M,"[","\\lbrack",!0);p(m,w,hr,"]","\\rbrack",!0);p(q,w,M,"]","\\rbrack",!0);p(m,w,zr,"(","\\lparen",!0);p(m,w,hr,")","\\rparen",!0);p(q,w,M,"<","\\textless",!0);p(q,w,M,">","\\textgreater",!0);p(m,w,zr,"⌊","\\lfloor",!0);p(m,w,hr,"⌋","\\rfloor",!0);p(m,w,zr,"⌈","\\lceil",!0);p(m,w,hr,"⌉","\\rceil",!0);p(m,w,M,"\\","\\backslash");p(m,w,M,"∣","|");p(m,w,M,"∣","\\vert");p(q,w,M,"|","\\textbar",!0);p(m,w,M,"∥","\\|");p(m,w,M,"∥","\\Vert");p(q,w,M,"∥","\\textbardbl");p(q,w,M,"~","\\textasciitilde");p(q,w,M,"\\","\\textbackslash");p(q,w,M,"^","\\textasciicircum");p(m,w,O,"↑","\\uparrow",!0);p(m,w,O,"⇑","\\Uparrow",!0);p(m,w,O,"↓","\\downarrow",!0);p(m,w,O,"⇓","\\Downarrow",!0);p(m,w,O,"↕","\\updownarrow",!0);p(m,w,O,"⇕","\\Updownarrow",!0);p(m,w,Dt,"∐","\\coprod");p(m,w,Dt,"⋁","\\bigvee");p(m,w,Dt,"⋀","\\bigwedge");p(m,w,Dt,"⨄","\\biguplus");p(m,w,Dt,"⋂","\\bigcap");p(m,w,Dt,"⋃","\\bigcup");p(m,w,Dt,"∫","\\int");p(m,w,Dt,"∫","\\intop");p(m,w,Dt,"∬","\\iint");p(m,w,Dt,"∭","\\iiint");p(m,w,Dt,"∏","\\prod");p(m,w,Dt,"∑","\\sum");p(m,w,Dt,"⨂","\\bigotimes");p(m,w,Dt,"⨁","\\bigoplus");p(m,w,Dt,"⨀","\\bigodot");p(m,w,Dt,"∮","\\oint");p(m,w,Dt,"∯","\\oiint");p(m,w,Dt,"∰","\\oiiint");p(m,w,Dt,"⨆","\\bigsqcup");p(m,w,Dt,"∫","\\smallint");p(q,w,Go,"…","\\textellipsis");p(m,w,Go,"…","\\mathellipsis");p(q,w,Go,"…","\\ldots",!0);p(m,w,Go,"…","\\ldots",!0);p(m,w,Go,"⋯","\\@cdots",!0);p(m,w,Go,"⋱","\\ddots",!0);p(m,w,M,"⋮","\\varvdots");p(m,w,ht,"ˊ","\\acute");p(m,w,ht,"ˋ","\\grave");p(m,w,ht,"¨","\\ddot");p(m,w,ht,"~","\\tilde");p(m,w,ht,"ˉ","\\bar");p(m,w,ht,"˘","\\breve");p(m,w,ht,"ˇ","\\check");p(m,w,ht,"^","\\hat");p(m,w,ht,"⃗","\\vec");p(m,w,ht,"˙","\\dot");p(m,w,ht,"˚","\\mathring");p(m,w,$e,"","\\@imath");p(m,w,$e,"","\\@jmath");p(m,w,M,"ı","ı");p(m,w,M,"ȷ","ȷ");p(q,w,M,"ı","\\i",!0);p(q,w,M,"ȷ","\\j",!0);p(q,w,M,"ß","\\ss",!0);p(q,w,M,"æ","\\ae",!0);p(q,w,M,"œ","\\oe",!0);p(q,w,M,"ø","\\o",!0);p(q,w,M,"Æ","\\AE",!0);p(q,w,M,"Œ","\\OE",!0);p(q,w,M,"Ø","\\O",!0);p(q,w,ht,"ˊ","\\'");p(q,w,ht,"ˋ","\\`");p(q,w,ht,"ˆ","\\^");p(q,w,ht,"˜","\\~");p(q,w,ht,"ˉ","\\=");p(q,w,ht,"˘","\\u");p(q,w,ht,"˙","\\.");p(q,w,ht,"¸","\\c");p(q,w,ht,"˚","\\r");p(q,w,ht,"ˇ","\\v");p(q,w,ht,"¨",'\\"');p(q,w,ht,"˝","\\H");p(q,w,ht,"◯","\\textcircled");var J7={"--":!0,"---":!0,"``":!0,"''":!0};p(q,w,M,"–","--",!0);p(q,w,M,"–","\\textendash");p(q,w,M,"—","---",!0);p(q,w,M,"—","\\textemdash");p(q,w,M,"‘","`",!0);p(q,w,M,"‘","\\textquoteleft");p(q,w,M,"’","'",!0);p(q,w,M,"’","\\textquoteright");p(q,w,M,"“","``",!0);p(q,w,M,"“","\\textquotedblleft");p(q,w,M,"”","''",!0);p(q,w,M,"”","\\textquotedblright");p(m,w,M,"°","\\degree",!0);p(q,w,M,"°","\\degree");p(q,w,M,"°","\\textdegree",!0);p(m,w,M,"£","\\pounds");p(m,w,M,"£","\\mathsterling",!0);p(q,w,M,"£","\\pounds");p(q,w,M,"£","\\textsterling",!0);p(m,E,M,"✠","\\maltese");p(q,E,M,"✠","\\maltese");var Ry='0123456789/@."';for(var nd=0;nd0)return ln(a,u,i,e,o.concat(c));if(l){var h,d;if(l==="boldsymbol"){var f=LD(a,i,e,o,n);h=f.fontName,d=[f.fontClass]}else s?(h=e$[l].fontName,d=[l]):(h=Pu(l,e.fontWeight,e.fontShape),d=[l,e.fontWeight,e.fontShape]);if(Ah(a,h,i).metrics)return ln(a,h,i,e,o.concat(d));if(J7.hasOwnProperty(a)&&h.slice(0,10)==="Typewriter"){for(var v=[],g=0;g{if(Ni(t.classes)!==Ni(r.classes)||t.skew!==r.skew||t.maxFontSize!==r.maxFontSize)return!1;if(t.classes.length===1){var e=t.classes[0];if(e==="mbin"||e==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==r.style[n])return!1;for(var i in r.style)if(r.style.hasOwnProperty(i)&&t.style[i]!==r.style[i])return!1;return!0},WD=t=>{for(var r=0;re&&(e=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>i&&(i=o.maxFontSize)}r.height=e,r.depth=n,r.maxFontSize=i},gr=function(r,e,n,i){var a=new _l(r,e,n,i);return Fm(a),a},Z7=(t,r,e,n)=>new _l(t,r,e,n),qD=function(r,e,n){var i=gr([r],[],e);return i.height=Math.max(n||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),i.style.borderBottomWidth=ee(i.height),i.maxFontSize=1,i},UD=function(r,e,n,i){var a=new Rm(r,e,n,i);return Fm(a),a},Q7=function(r){var e=new Tl(r);return Fm(e),e},VD=function(r,e){return r instanceof Tl?gr([],[r],e):r},GD=function(r){if(r.positionType==="individualShift"){for(var e=r.children,n=[e[0]],i=-e[0].shift-e[0].elem.depth,a=i,o=1;o{var e=gr(["mspace"],[],r),n=pt(t,r);return e.style.marginRight=ee(n),e},Pu=function(r,e,n){var i="";switch(r){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=r}var a;return e==="textbf"&&n==="textit"?a="BoldItalic":e==="textbf"?a="Bold":e==="textit"?a="Italic":a="Regular",i+"-"+a},e$={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"}},t$={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},XD=function(r,e){var[n,i,a]=t$[r],o=new Ri(n),s=new ri([o],{width:ee(i),height:ee(a),style:"width:"+ee(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=Z7(["overlay"],[s],e);return l.height=a,l.style.height=ee(a),l.style.width=ee(i),l},N={fontMap:e$,makeSymbol:ln,mathsym:BD,makeSpan:gr,makeSvgSpan:Z7,makeLineSpan:qD,makeAnchor:UD,makeFragment:Q7,wrapFragment:VD,makeVList:KD,makeOrd:jD,makeGlue:YD,staticSvg:XD,svgData:t$,tryCombineChars:WD},vt={number:3,unit:"mu"},ra={number:4,unit:"mu"},Hn={number:5,unit:"mu"},JD={mord:{mop:vt,mbin:ra,mrel:Hn,minner:vt},mop:{mord:vt,mop:vt,mrel:Hn,minner:vt},mbin:{mord:ra,mop:ra,mopen:ra,minner:ra},mrel:{mord:Hn,mop:Hn,mopen:Hn,minner:Hn},mopen:{},mclose:{mop:vt,mbin:ra,mrel:Hn,minner:vt},mpunct:{mord:vt,mop:vt,mrel:Hn,mopen:vt,mclose:vt,mpunct:vt,minner:vt},minner:{mord:vt,mop:vt,mbin:ra,mrel:Hn,mopen:vt,mpunct:vt,minner:vt}},ZD={mord:{mop:vt},mop:{mord:vt,mop:vt},mbin:{},mrel:{},mopen:{},mclose:{mop:vt},mpunct:{},minner:{mop:vt}},r$={},Xc={},Jc={};function se(t){for(var{type:r,names:e,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=t,s={type:r,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l{var b=g.classes[0],y=v.classes[0];b==="mbin"&&be.contains(eN,y)?g.classes[0]="mord":y==="mbin"&&be.contains(QD,b)&&(v.classes[0]="mord")},{node:h},d,f),jy(a,(v,g)=>{var b=Gv(g),y=Gv(v),$=b&&y?v.hasClass("mtight")?ZD[b][y]:JD[b][y]:null;if($)return N.makeGlue($,u)},{node:h},d,f),a},jy=function t(r,e,n,i,a){i&&r.push(i);for(var o=0;od=>{r.splice(h+1,0,d),o++})(o)}i&&r.pop()},n$=function(r){return r instanceof Tl||r instanceof Rm||r instanceof _l&&r.hasClass("enclosing")?r:null},nN=function t(r,e){var n=n$(r);if(n){var i=n.children;if(i.length){if(e==="right")return t(i[i.length-1],"right");if(e==="left")return t(i[0],"left")}}return r},Gv=function(r,e){return r?(e&&(r=nN(r,e)),rN[r.classes[0]]||null):null},il=function(r,e){var n=["nulldelimiter"].concat(r.baseSizingClasses());return ni(e.concat(n))},Be=function(r,e,n){if(!r)return ni();if(Xc[r.type]){var i=Xc[r.type](r,e);if(n&&e.size!==n.size){i=ni(e.sizingClasses(n),[i],e);var a=e.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new K("Got group of unknown type: '"+r.type+"'")};function Au(t,r){var e=ni(["base"],t,r),n=ni(["strut"]);return n.style.height=ee(e.height+e.depth),e.depth&&(n.style.verticalAlign=ee(-e.depth)),e.children.unshift(n),e}function Kv(t,r){var e=null;t.length===1&&t[0].type==="tag"&&(e=t[0].tag,t=t[0].body);var n=Ft(t,r,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var a=[],o=[],s=0;s0&&(a.push(Au(o,r)),o=[]),a.push(n[s]));o.length>0&&a.push(Au(o,r));var u;e?(u=Au(Ft(e,r,!0)),u.classes=["tag"],a.push(u)):i&&a.push(i);var c=ni(["katex-html"],a);if(c.setAttribute("aria-hidden","true"),u){var h=u.children[0];h.style.height=ee(c.height+c.depth),c.depth&&(h.style.verticalAlign=ee(-c.depth))}return c}function i$(t){return new Tl(t)}class Gr{constructor(r,e,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=r,this.attributes={},this.children=e||[],this.classes=n||[]}setAttribute(r,e){this.attributes[r]=e}getAttribute(r){return this.attributes[r]}toNode(){var r=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&r.setAttribute(e,this.attributes[e]);this.classes.length>0&&(r.className=Ni(this.classes));for(var n=0;n0&&(r+=' class ="'+be.escape(Ni(this.classes))+'"'),r+=">";for(var n=0;n",r}toText(){return this.children.map(r=>r.toText()).join("")}}class js{constructor(r){this.text=void 0,this.text=r}toNode(){return document.createTextNode(this.text)}toMarkup(){return be.escape(this.toText())}toText(){return this.text}}class iN{constructor(r){this.width=void 0,this.character=void 0,this.width=r,r>=.05555&&r<=.05556?this.character=" ":r>=.1666&&r<=.1667?this.character=" ":r>=.2222&&r<=.2223?this.character=" ":r>=.2777&&r<=.2778?this.character="  ":r>=-.05556&&r<=-.05555?this.character=" ⁣":r>=-.1667&&r<=-.1666?this.character=" ⁣":r>=-.2223&&r<=-.2222?this.character=" ⁣":r>=-.2778&&r<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var r=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return r.setAttribute("width",ee(this.width)),r}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var U={MathNode:Gr,TextNode:js,SpaceNode:iN,newDocumentFragment:i$},en=function(r,e,n){return ut[e][r]&&ut[e][r].replace&&r.charCodeAt(0)!==55349&&!(J7.hasOwnProperty(r)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(r=ut[e][r].replace),new U.TextNode(r)},zm=function(r){return r.length===1?r[0]:new U.MathNode("mrow",r)},Bm=function(r,e){if(e.fontFamily==="texttt")return"monospace";if(e.fontFamily==="textsf")return e.fontShape==="textit"&&e.fontWeight==="textbf"?"sans-serif-bold-italic":e.fontShape==="textit"?"sans-serif-italic":e.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(e.fontShape==="textit"&&e.fontWeight==="textbf")return"bold-italic";if(e.fontShape==="textit")return"italic";if(e.fontWeight==="textbf")return"bold";var n=e.font;if(!n||n==="mathnormal")return null;var i=r.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return r.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=r.text;if(be.contains(["\\imath","\\jmath"],a))return null;ut[i][a]&&ut[i][a].replace&&(a=ut[i][a].replace);var o=N.fontMap[n].fontName;return Nm(a,o,i)?N.fontMap[n].variant:null},Tr=function(r,e,n){if(r.length===1){var i=nt(r[0],e);return n&&i instanceof Gr&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],o,s=0;s0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(l),o=l}return a},Fi=function(r,e,n){return zm(Tr(r,e,n))},nt=function(r,e){if(!r)return new U.MathNode("mrow");if(Jc[r.type]){var n=Jc[r.type](r,e);return n}else throw new K("Got group of unknown type: '"+r.type+"'")};function Hy(t,r,e,n,i){var a=Tr(t,e),o;a.length===1&&a[0]instanceof Gr&&be.contains(["mrow","mtable"],a[0].type)?o=a[0]:o=new U.MathNode("mrow",a);var s=new U.MathNode("annotation",[new U.TextNode(r)]);s.setAttribute("encoding","application/x-tex");var l=new U.MathNode("semantics",[o,s]),u=new U.MathNode("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var c=i?"katex":"katex-mathml";return N.makeSpan([c],[u])}var a$=function(r){return new Wn({style:r.displayMode?xe.DISPLAY:xe.TEXT,maxSize:r.maxSize,minRuleThickness:r.minRuleThickness})},o$=function(r,e){if(e.displayMode){var n=["katex-display"];e.leqno&&n.push("leqno"),e.fleqn&&n.push("fleqn"),r=N.makeSpan(n,[r])}return r},aN=function(r,e,n){var i=a$(n),a;if(n.output==="mathml")return Hy(r,e,i,n.displayMode,!0);if(n.output==="html"){var o=Kv(r,i);a=N.makeSpan(["katex"],[o])}else{var s=Hy(r,e,i,n.displayMode,!1),l=Kv(r,i);a=N.makeSpan(["katex"],[s,l])}return o$(a,n)},oN=function(r,e,n){var i=a$(n),a=Kv(r,i),o=N.makeSpan(["katex"],[a]);return o$(o,n)},sN={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":"="},lN=function(r){var e=new U.MathNode("mo",[new U.TextNode(sN[r.replace(/^\\/,"")])]);return e.setAttribute("stretchy","true"),e},uN={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]},cN=function(r){return r.type==="ordgroup"?r.body.length:1},hN=function(r,e){function n(){var s=4e5,l=r.label.slice(1);if(be.contains(["widehat","widecheck","widetilde","utilde"],l)){var u=r,c=cN(u.base),h,d,f;if(c>5)l==="widehat"||l==="widecheck"?(h=420,s=2364,f=.42,d=l+"4"):(h=312,s=2340,f=.34,d="tilde4");else{var v=[1,1,2,2,3,3][c];l==="widehat"||l==="widecheck"?(s=[0,1062,2364,2364,2364][v],h=[0,239,300,360,420][v],f=[0,.24,.3,.3,.36,.42][v],d=l+v):(s=[0,600,1033,2339,2340][v],h=[0,260,286,306,312][v],f=[0,.26,.286,.3,.306,.34][v],d="tilde"+v)}var g=new Ri(d),b=new ri([g],{width:"100%",height:ee(f),viewBox:"0 0 "+s+" "+h,preserveAspectRatio:"none"});return{span:N.makeSvgSpan([],[b],e),minWidth:0,height:f}}else{var y=[],$=uN[l],[k,_,P]=$,S=P/1e3,D=k.length,B,R;if(D===1){var A=$[3];B=["hide-tail"],R=[A]}else if(D===2)B=["halfarrow-left","halfarrow-right"],R=["xMinYMin","xMaxYMin"];else if(D===3)B=["brace-left","brace-center","brace-right"],R=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+D+" children.");for(var z=0;z0&&(i.style.minWidth=ee(a)),i},dN=function(r,e,n,i,a){var o,s=r.height+r.depth+n+i;if(/fbox|color|angl/.test(e)){if(o=N.makeSpan(["stretchy",e],[],a),e==="fbox"){var l=a.color&&a.getColor();l&&(o.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(e)&&u.push(new Uv({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&u.push(new Uv({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new ri(u,{width:"100%",height:ee(s)});o=N.makeSvgSpan([],[c],a)}return o.height=s,o.style.height=ee(s),o},ii={encloseSpan:dN,mathMLnode:lN,svgSpan:hN};function Ae(t,r){if(!t||t.type!==r)throw new Error("Expected node of type "+r+", but got "+(t?"node of type "+t.type:String(t)));return t}function Lm(t){var r=Mh(t);if(!r)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return r}function Mh(t){return t&&(t.type==="atom"||FD.hasOwnProperty(t.type))?t:null}var jm=(t,r)=>{var e,n,i;t&&t.type==="supsub"?(n=Ae(t.base,"accent"),e=n.base,t.base=e,i=ND(Be(t,r)),t.base=n):(n=Ae(t,"accent"),e=n.base);var a=Be(e,r.havingCrampedStyle()),o=n.isShifty&&be.isCharacterBox(e),s=0;if(o){var l=be.getBaseElem(e),u=Be(l,r.havingCrampedStyle());s=Ny(u).skew}var c=n.label==="\\c",h=c?a.height+a.depth:Math.min(a.height,r.fontMetrics().xHeight),d;if(n.isStretchy)d=ii.svgSpan(n,r),d=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+ee(2*s)+")",marginLeft:ee(2*s)}:void 0}]},r);else{var f,v;n.label==="\\vec"?(f=N.staticSvg("vec",r),v=N.svgData.vec[1]):(f=N.makeOrd({mode:n.mode,text:n.label},r,"textord"),f=Ny(f),f.italic=0,v=f.width,c&&(h+=f.depth)),d=N.makeSpan(["accent-body"],[f]);var g=n.label==="\\textcircled";g&&(d.classes.push("accent-full"),h=a.height);var b=s;g||(b-=v/2),d.style.left=ee(b),n.label==="\\textcircled"&&(d.style.top=".2em"),d=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-h},{type:"elem",elem:d}]},r)}var y=N.makeSpan(["mord","accent"],[d],r);return i?(i.children[0]=y,i.height=Math.max(y.height,i.height),i.classes[0]="mord",i):y},s$=(t,r)=>{var e=t.isStretchy?ii.mathMLnode(t.label):new U.MathNode("mo",[en(t.label,t.mode)]),n=new U.MathNode("mover",[nt(t.base,r),e]);return n.setAttribute("accent","true"),n},fN=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));se({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:(t,r)=>{var e=Zc(r[0]),n=!fN.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:e}},htmlBuilder:jm,mathmlBuilder:s$});se({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,r)=>{var e=r[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:e}},htmlBuilder:jm,mathmlBuilder:s$});se({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=r[0];return{type:"accentUnder",mode:e.mode,label:n,base:i}},htmlBuilder:(t,r)=>{var e=Be(t.base,r),n=ii.svgSpan(t,r),i=t.label==="\\utilde"?.12:0,a=N.makeVList({positionType:"top",positionData:e.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:e}]},r);return N.makeSpan(["mord","accentunder"],[a],r)},mathmlBuilder:(t,r)=>{var e=ii.mathMLnode(t.label),n=new U.MathNode("munder",[nt(t.base,r),e]);return n.setAttribute("accentunder","true"),n}});var Mu=t=>{var r=new U.MathNode("mpadded",t?[t]:[]);return r.setAttribute("width","+0.6em"),r.setAttribute("lspace","0.3em"),r};se({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(t,r,e){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:r[0],below:e[0]}},htmlBuilder(t,r){var e=r.style,n=r.havingStyle(e.sup()),i=N.wrapFragment(Be(t.body,n,r),r),a=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var o;t.below&&(n=r.havingStyle(e.sub()),o=N.wrapFragment(Be(t.below,n,r),r),o.classes.push(a+"-arrow-pad"));var s=ii.svgSpan(t,r),l=-r.fontMetrics().axisHeight+.5*s.height,u=-r.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(u-=i.depth);var c;if(o){var h=-r.fontMetrics().axisHeight+o.height+.5*s.height+.111;c=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:s,shift:l},{type:"elem",elem:o,shift:h}]},r)}else c=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:s,shift:l}]},r);return c.children[0].children[0].children[1].classes.push("svg-align"),N.makeSpan(["mrel","x-arrow"],[c],r)},mathmlBuilder(t,r){var e=ii.mathMLnode(t.label);e.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=Mu(nt(t.body,r));if(t.below){var a=Mu(nt(t.below,r));n=new U.MathNode("munderover",[e,a,i])}else n=new U.MathNode("mover",[e,i])}else if(t.below){var o=Mu(nt(t.below,r));n=new U.MathNode("munder",[e,o])}else n=Mu(),n=new U.MathNode("mover",[e,n]);return n}});var vN=N.makeSpan;function l$(t,r){var e=Ft(t.body,r,!0);return vN([t.mclass],e,r)}function u$(t,r){var e,n=Tr(t.body,r);return t.mclass==="minner"?e=new U.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(e=n[0],e.type="mi"):e=new U.MathNode("mi",n):(t.isCharacterBox?(e=n[0],e.type="mo"):e=new U.MathNode("mo",n),t.mclass==="mbin"?(e.attributes.lspace="0.22em",e.attributes.rspace="0.22em"):t.mclass==="mpunct"?(e.attributes.lspace="0em",e.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(e.attributes.lspace="0em",e.attributes.rspace="0em"):t.mclass==="minner"&&(e.attributes.lspace="0.0556em",e.attributes.width="+0.1111em")),e}se({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,r){var{parser:e,funcName:n}=t,i=r[0];return{type:"mclass",mode:e.mode,mclass:"m"+n.slice(5),body:_t(i),isCharacterBox:be.isCharacterBox(i)}},htmlBuilder:l$,mathmlBuilder:u$});var Dh=t=>{var r=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return r.type==="atom"&&(r.family==="bin"||r.family==="rel")?"m"+r.family:"mord"};se({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,r){var{parser:e}=t;return{type:"mclass",mode:e.mode,mclass:Dh(r[0]),body:_t(r[1]),isCharacterBox:be.isCharacterBox(r[1])}}});se({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,r){var{parser:e,funcName:n}=t,i=r[1],a=r[0],o;n!=="\\stackrel"?o=Dh(i):o="mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:_t(i)},l={type:"supsub",mode:a.mode,base:s,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:e.mode,mclass:o,body:[l],isCharacterBox:be.isCharacterBox(l)}},htmlBuilder:l$,mathmlBuilder:u$});se({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,r){var{parser:e}=t;return{type:"pmb",mode:e.mode,mclass:Dh(r[0]),body:_t(r[0])}},htmlBuilder(t,r){var e=Ft(t.body,r,!0),n=N.makeSpan([t.mclass],e,r);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,r){var e=Tr(t.body,r),n=new U.MathNode("mstyle",e);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var pN={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Wy=()=>({type:"styling",body:[],mode:"math",style:"display"}),qy=t=>t.type==="textord"&&t.text==="@",mN=(t,r)=>(t.type==="mathord"||t.type==="atom")&&t.text===r;function gN(t,r,e){var n=pN[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return e.callFunction(n,[r[0]],[r[1]]);case"\\uparrow":case"\\downarrow":{var i=e.callFunction("\\\\cdleft",[r[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},o=e.callFunction("\\Big",[a],[]),s=e.callFunction("\\\\cdright",[r[1]],[]),l={type:"ordgroup",mode:"math",body:[i,o,s]};return e.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return e.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return e.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function yN(t){var r=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){r.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var e=t.fetch().text;if(e==="&"||e==="\\\\")t.consume();else if(e==="\\end"){r[r.length-1].length===0&&r.pop();break}else throw new K("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],i=[n],a=0;a-1))if("<>AV".indexOf(u)>-1)for(var h=0;h<2;h++){for(var d=!0,f=l+1;fAV=|." after @',o[l]);var v=gN(u,c,t),g={type:"styling",body:[v],mode:"math",style:"display"};n.push(g),s=Wy()}a%2===0?n.push(s):n.shift(),n=[],i.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var b=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:b,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}se({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,r){var{parser:e,funcName:n}=t;return{type:"cdlabel",mode:e.mode,side:n.slice(4),label:r[0]}},htmlBuilder(t,r){var e=r.havingStyle(r.style.sup()),n=N.wrapFragment(Be(t.label,e,r),r);return n.classes.push("cd-label-"+t.side),n.style.bottom=ee(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,r){var e=new U.MathNode("mrow",[nt(t.label,r)]);return e=new U.MathNode("mpadded",[e]),e.setAttribute("width","0"),t.side==="left"&&e.setAttribute("lspace","-1width"),e.setAttribute("voffset","0.7em"),e=new U.MathNode("mstyle",[e]),e.setAttribute("displaystyle","false"),e.setAttribute("scriptlevel","1"),e}});se({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,r){var{parser:e}=t;return{type:"cdlabelparent",mode:e.mode,fragment:r[0]}},htmlBuilder(t,r){var e=N.wrapFragment(Be(t.fragment,r),r);return e.classes.push("cd-vert-arrow"),e},mathmlBuilder(t,r){return new U.MathNode("mrow",[nt(t.fragment,r)])}});se({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,r){for(var{parser:e}=t,n=Ae(r[0],"ordgroup"),i=n.body,a="",o=0;o=1114111)throw new K("\\@char with invalid code point "+a);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:e.mode,text:u}}});var c$=(t,r)=>{var e=Ft(t.body,r.withColor(t.color),!1);return N.makeFragment(e)},h$=(t,r)=>{var e=Tr(t.body,r.withColor(t.color)),n=new U.MathNode("mstyle",e);return n.setAttribute("mathcolor",t.color),n};se({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,r){var{parser:e}=t,n=Ae(r[0],"color-token").color,i=r[1];return{type:"color",mode:e.mode,color:n,body:_t(i)}},htmlBuilder:c$,mathmlBuilder:h$});se({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,r){var{parser:e,breakOnTokenText:n}=t,i=Ae(r[0],"color-token").color;e.gullet.macros.set("\\current@color",i);var a=e.parseExpression(!0,n);return{type:"color",mode:e.mode,color:i,body:a}},htmlBuilder:c$,mathmlBuilder:h$});se({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,r,e){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&Ae(i,"size").value}},htmlBuilder(t,r){var e=N.makeSpan(["mspace"],[],r);return t.newLine&&(e.classes.push("newline"),t.size&&(e.style.marginTop=ee(pt(t.size,r)))),e},mathmlBuilder(t,r){var e=new U.MathNode("mspace");return t.newLine&&(e.setAttribute("linebreak","newline"),t.size&&e.setAttribute("height",ee(pt(t.size,r)))),e}});var Yv={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},d$=t=>{var r=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new K("Expected a control sequence",t);return r},bN=t=>{var r=t.gullet.popToken();return r.text==="="&&(r=t.gullet.popToken(),r.text===" "&&(r=t.gullet.popToken())),r},f$=(t,r,e,n)=>{var i=t.gullet.macros.get(e.text);i==null&&(e.noexpand=!0,i={tokens:[e],numArgs:0,unexpandable:!t.gullet.isExpandable(e.text)}),t.gullet.macros.set(r,i,n)};se({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:r,funcName:e}=t;r.consumeSpaces();var n=r.fetch();if(Yv[n.text])return(e==="\\global"||e==="\\\\globallong")&&(n.text=Yv[n.text]),Ae(r.parseFunction(),"internal");throw new K("Invalid token after macro prefix",n)}});se({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:r,funcName:e}=t,n=r.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new K("Expected a control sequence",n);for(var a=0,o,s=[[]];r.gullet.future().text!=="{";)if(n=r.gullet.popToken(),n.text==="#"){if(r.gullet.future().text==="{"){o=r.gullet.future(),s[a].push("{");break}if(n=r.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new K('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new K('Argument number "'+n.text+'" out of order');a++,s.push([])}else{if(n.text==="EOF")throw new K("Expected a macro definition");s[a].push(n.text)}var{tokens:l}=r.gullet.consumeArg();return o&&l.unshift(o),(e==="\\edef"||e==="\\xdef")&&(l=r.gullet.expandTokens(l),l.reverse()),r.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:s},e===Yv[e]),{type:"internal",mode:r.mode}}});se({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:r,funcName:e}=t,n=d$(r.gullet.popToken());r.gullet.consumeSpaces();var i=bN(r);return f$(r,n,i,e==="\\\\globallet"),{type:"internal",mode:r.mode}}});se({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:r,funcName:e}=t,n=d$(r.gullet.popToken()),i=r.gullet.popToken(),a=r.gullet.popToken();return f$(r,n,a,e==="\\\\globalfuture"),r.gullet.pushToken(a),r.gullet.pushToken(i),{type:"internal",mode:r.mode}}});var Ds=function(r,e,n){var i=ut.math[r]&&ut.math[r].replace,a=Nm(i||r,e,n);if(!a)throw new Error("Unsupported symbol "+r+" and font size "+e+".");return a},Hm=function(r,e,n,i){var a=n.havingBaseStyle(e),o=N.makeSpan(i.concat(a.sizingClasses(n)),[r],n),s=a.sizeMultiplier/n.sizeMultiplier;return o.height*=s,o.depth*=s,o.maxFontSize=a.sizeMultiplier,o},v$=function(r,e,n){var i=e.havingBaseStyle(n),a=(1-e.sizeMultiplier/i.sizeMultiplier)*e.fontMetrics().axisHeight;r.classes.push("delimcenter"),r.style.top=ee(a),r.height-=a,r.depth+=a},wN=function(r,e,n,i,a,o){var s=N.makeSymbol(r,"Main-Regular",a,i),l=Hm(s,e,i,o);return n&&v$(l,i,e),l},$N=function(r,e,n,i){return N.makeSymbol(r,"Size"+e+"-Regular",n,i)},p$=function(r,e,n,i,a,o){var s=$N(r,e,a,i),l=Hm(N.makeSpan(["delimsizing","size"+e],[s],i),xe.TEXT,i,o);return n&&v$(l,i,xe.TEXT),l},sd=function(r,e,n){var i;e==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=N.makeSpan(["delimsizinginner",i],[N.makeSpan([],[N.makeSymbol(r,e,n)])]);return{type:"elem",elem:a}},ld=function(r,e,n){var i=En["Size4-Regular"][r.charCodeAt(0)]?En["Size4-Regular"][r.charCodeAt(0)][4]:En["Size1-Regular"][r.charCodeAt(0)][4],a=new Ri("inner",_D(r,Math.round(1e3*e))),o=new ri([a],{width:ee(i),height:ee(e),style:"width:"+ee(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"}),s=N.makeSvgSpan([],[o],n);return s.height=e,s.style.height=ee(e),s.style.width=ee(i),{type:"elem",elem:s}},Xv=.008,Du={type:"kern",size:-1*Xv},xN=["|","\\lvert","\\rvert","\\vert"],kN=["\\|","\\lVert","\\rVert","\\Vert"],m$=function(r,e,n,i,a,o){var s,l,u,c,h="",d=0;s=u=c=r,l=null;var f="Size1-Regular";r==="\\uparrow"?u=c="⏐":r==="\\Uparrow"?u=c="‖":r==="\\downarrow"?s=u="⏐":r==="\\Downarrow"?s=u="‖":r==="\\updownarrow"?(s="\\uparrow",u="⏐",c="\\downarrow"):r==="\\Updownarrow"?(s="\\Uparrow",u="‖",c="\\Downarrow"):be.contains(xN,r)?(u="∣",h="vert",d=333):be.contains(kN,r)?(u="∥",h="doublevert",d=556):r==="["||r==="\\lbrack"?(s="⎡",u="⎢",c="⎣",f="Size4-Regular",h="lbrack",d=667):r==="]"||r==="\\rbrack"?(s="⎤",u="⎥",c="⎦",f="Size4-Regular",h="rbrack",d=667):r==="\\lfloor"||r==="⌊"?(u=s="⎢",c="⎣",f="Size4-Regular",h="lfloor",d=667):r==="\\lceil"||r==="⌈"?(s="⎡",u=c="⎢",f="Size4-Regular",h="lceil",d=667):r==="\\rfloor"||r==="⌋"?(u=s="⎥",c="⎦",f="Size4-Regular",h="rfloor",d=667):r==="\\rceil"||r==="⌉"?(s="⎤",u=c="⎥",f="Size4-Regular",h="rceil",d=667):r==="("||r==="\\lparen"?(s="⎛",u="⎜",c="⎝",f="Size4-Regular",h="lparen",d=875):r===")"||r==="\\rparen"?(s="⎞",u="⎟",c="⎠",f="Size4-Regular",h="rparen",d=875):r==="\\{"||r==="\\lbrace"?(s="⎧",l="⎨",c="⎩",u="⎪",f="Size4-Regular"):r==="\\}"||r==="\\rbrace"?(s="⎫",l="⎬",c="⎭",u="⎪",f="Size4-Regular"):r==="\\lgroup"||r==="⟮"?(s="⎧",c="⎩",u="⎪",f="Size4-Regular"):r==="\\rgroup"||r==="⟯"?(s="⎫",c="⎭",u="⎪",f="Size4-Regular"):r==="\\lmoustache"||r==="⎰"?(s="⎧",c="⎭",u="⎪",f="Size4-Regular"):(r==="\\rmoustache"||r==="⎱")&&(s="⎫",c="⎩",u="⎪",f="Size4-Regular");var v=Ds(s,f,a),g=v.height+v.depth,b=Ds(u,f,a),y=b.height+b.depth,$=Ds(c,f,a),k=$.height+$.depth,_=0,P=1;if(l!==null){var S=Ds(l,f,a);_=S.height+S.depth,P=2}var D=g+k+_,B=Math.max(0,Math.ceil((e-D)/(P*y))),R=D+B*P*y,A=i.fontMetrics().axisHeight;n&&(A*=i.sizeMultiplier);var z=R/2-A,L=[];if(h.length>0){var J=R-g-k,ie=Math.round(R*1e3),oe=OD(h,Math.round(J*1e3)),me=new Ri(h,oe),Ce=(d/1e3).toFixed(3)+"em",ne=(ie/1e3).toFixed(3)+"em",ue=new ri([me],{width:Ce,height:ne,viewBox:"0 0 "+d+" "+ie}),T=N.makeSvgSpan([],[ue],i);T.height=ie/1e3,T.style.width=Ce,T.style.height=ne,L.push({type:"elem",elem:T})}else{if(L.push(sd(c,f,a)),L.push(Du),l===null){var ge=R-g-k+2*Xv;L.push(ld(u,ge,i))}else{var ye=(R-g-k-_)/2+2*Xv;L.push(ld(u,ye,i)),L.push(Du),L.push(sd(l,f,a)),L.push(Du),L.push(ld(u,ye,i))}L.push(Du),L.push(sd(s,f,a))}var I=i.havingBaseStyle(xe.TEXT),De=N.makeVList({positionType:"bottom",positionData:z,children:L},I);return Hm(N.makeSpan(["delimsizing","mult"],[De],I),xe.TEXT,i,o)},ud=80,cd=.08,hd=function(r,e,n,i,a){var o=TD(r,i,n),s=new Ri(r,o),l=new ri([s],{width:"400em",height:ee(e),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return N.makeSvgSpan(["hide-tail"],[l],a)},SN=function(r,e){var n=e.havingBaseSizing(),i=w$("\\surd",r*n.sizeMultiplier,b$,n),a=n.sizeMultiplier,o=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness),s,l=0,u=0,c=0,h;return i.type==="small"?(c=1e3+1e3*o+ud,r<1?a=1:r<1.4&&(a=.7),l=(1+o+cd)/a,u=(1+o)/a,s=hd("sqrtMain",l,c,o,e),s.style.minWidth="0.853em",h=.833/a):i.type==="large"?(c=(1e3+ud)*Hs[i.size],u=(Hs[i.size]+o)/a,l=(Hs[i.size]+o+cd)/a,s=hd("sqrtSize"+i.size,l,c,o,e),s.style.minWidth="1.02em",h=1/a):(l=r+o+cd,u=r+o,c=Math.floor(1e3*r+o)+ud,s=hd("sqrtTall",l,c,o,e),s.style.minWidth="0.742em",h=1.056),s.height=u,s.style.height=ee(l),{span:s,advanceWidth:h,ruleWidth:(e.fontMetrics().sqrtRuleThickness+o)*a}},g$=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],EN=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],y$=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Hs=[0,1.2,1.8,2.4,3],TN=function(r,e,n,i,a){if(r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle"),be.contains(g$,r)||be.contains(y$,r))return p$(r,e,!1,n,i,a);if(be.contains(EN,r))return m$(r,Hs[e],!1,n,i,a);throw new K("Illegal delimiter: '"+r+"'")},_N=[{type:"small",style:xe.SCRIPTSCRIPT},{type:"small",style:xe.SCRIPT},{type:"small",style:xe.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ON=[{type:"small",style:xe.SCRIPTSCRIPT},{type:"small",style:xe.SCRIPT},{type:"small",style:xe.TEXT},{type:"stack"}],b$=[{type:"small",style:xe.SCRIPTSCRIPT},{type:"small",style:xe.SCRIPT},{type:"small",style:xe.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],IN=function(r){if(r.type==="small")return"Main-Regular";if(r.type==="large")return"Size"+r.size+"-Regular";if(r.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+r.type+"' here.")},w$=function(r,e,n,i){for(var a=Math.min(2,3-i.style.size),o=a;oe)return n[o]}return n[n.length-1]},$$=function(r,e,n,i,a,o){r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle");var s;be.contains(y$,r)?s=_N:be.contains(g$,r)?s=b$:s=ON;var l=w$(r,e,s,i);return l.type==="small"?wN(r,l.style,n,i,a,o):l.type==="large"?p$(r,l.size,n,i,a,o):m$(r,e,n,i,a,o)},CN=function(r,e,n,i,a,o){var s=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,u=5/i.fontMetrics().ptPerEm,c=Math.max(e-s,n+s),h=Math.max(c/500*l,2*c-u);return $$(r,h,!0,i,a,o)},Vn={sqrtImage:SN,sizedDelim:TN,sizeToMaxHeight:Hs,customSizedDelim:$$,leftRightDelim:CN},Uy={"\\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}},PN=["(","\\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 Nh(t,r){var e=Mh(t);if(e&&be.contains(PN,e.text))return e;throw e?new K("Invalid delimiter '"+e.text+"' after '"+r.funcName+"'",t):new K("Invalid delimiter type '"+t.type+"'",t)}se({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:(t,r)=>{var e=Nh(r[0],t);return{type:"delimsizing",mode:t.parser.mode,size:Uy[t.funcName].size,mclass:Uy[t.funcName].mclass,delim:e.text}},htmlBuilder:(t,r)=>t.delim==="."?N.makeSpan([t.mclass]):Vn.sizedDelim(t.delim,t.size,r,t.mode,[t.mclass]),mathmlBuilder:t=>{var r=[];t.delim!=="."&&r.push(en(t.delim,t.mode));var e=new U.MathNode("mo",r);t.mclass==="mopen"||t.mclass==="mclose"?e.setAttribute("fence","true"):e.setAttribute("fence","false"),e.setAttribute("stretchy","true");var n=ee(Vn.sizeToMaxHeight[t.size]);return e.setAttribute("minsize",n),e.setAttribute("maxsize",n),e}});function Vy(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}se({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,r)=>{var e=t.parser.gullet.macros.get("\\current@color");if(e&&typeof e!="string")throw new K("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:Nh(r[0],t).text,color:e}}});se({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,r)=>{var e=Nh(r[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=Ae(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:e.text,right:a.delim,rightColor:a.color}},htmlBuilder:(t,r)=>{Vy(t);for(var e=Ft(t.body,r,!0,["mopen","mclose"]),n=0,i=0,a=!1,o=0;o{Vy(t);var e=Tr(t.body,r);if(t.left!=="."){var n=new U.MathNode("mo",[en(t.left,t.mode)]);n.setAttribute("fence","true"),e.unshift(n)}if(t.right!=="."){var i=new U.MathNode("mo",[en(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),e.push(i)}return zm(e)}});se({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,r)=>{var e=Nh(r[0],t);if(!t.parser.leftrightDepth)throw new K("\\middle without preceding \\left",e);return{type:"middle",mode:t.parser.mode,delim:e.text}},htmlBuilder:(t,r)=>{var e;if(t.delim===".")e=il(r,[]);else{e=Vn.sizedDelim(t.delim,1,r,t.mode,[]);var n={delim:t.delim,options:r};e.isMiddle=n}return e},mathmlBuilder:(t,r)=>{var e=t.delim==="\\vert"||t.delim==="|"?en("|","text"):en(t.delim,t.mode),n=new U.MathNode("mo",[e]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Wm=(t,r)=>{var e=N.wrapFragment(Be(t.body,r),r),n=t.label.slice(1),i=r.sizeMultiplier,a,o=0,s=be.isCharacterBox(t.body);if(n==="sout")a=N.makeSpan(["stretchy","sout"]),a.height=r.fontMetrics().defaultRuleThickness/i,o=-.5*r.fontMetrics().xHeight;else if(n==="phase"){var l=pt({number:.6,unit:"pt"},r),u=pt({number:.35,unit:"ex"},r),c=r.havingBaseSizing();i=i/c.sizeMultiplier;var h=e.height+e.depth+l+u;e.style.paddingLeft=ee(h/2+l);var d=Math.floor(1e3*h*i),f=SD(d),v=new ri([new Ri("phase",f)],{width:"400em",height:ee(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});a=N.makeSvgSpan(["hide-tail"],[v],r),a.style.height=ee(h),o=e.depth+l+u}else{/cancel/.test(n)?s||e.classes.push("cancel-pad"):n==="angl"?e.classes.push("anglpad"):e.classes.push("boxpad");var g=0,b=0,y=0;/box/.test(n)?(y=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness),g=r.fontMetrics().fboxsep+(n==="colorbox"?0:y),b=g):n==="angl"?(y=Math.max(r.fontMetrics().defaultRuleThickness,r.minRuleThickness),g=4*y,b=Math.max(0,.25-e.depth)):(g=s?.2:0,b=g),a=ii.encloseSpan(e,n,g,b,r),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=ee(y)):n==="angl"&&y!==.049&&(a.style.borderTopWidth=ee(y),a.style.borderRightWidth=ee(y)),o=e.depth+b,t.backgroundColor&&(a.style.backgroundColor=t.backgroundColor,t.borderColor&&(a.style.borderColor=t.borderColor))}var $;if(t.backgroundColor)$=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:e,shift:0}]},r);else{var k=/cancel|phase/.test(n)?["svg-align"]:[];$=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:e,shift:0},{type:"elem",elem:a,shift:o,wrapperClasses:k}]},r)}return/cancel/.test(n)&&($.height=e.height,$.depth=e.depth),/cancel/.test(n)&&!s?N.makeSpan(["mord","cancel-lap"],[$],r):N.makeSpan(["mord"],[$],r)},qm=(t,r)=>{var e=0,n=new U.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[nt(t.body,r)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(e=r.fontMetrics().fboxsep*r.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*e+"pt"),n.setAttribute("height","+"+2*e+"pt"),n.setAttribute("lspace",e+"pt"),n.setAttribute("voffset",e+"pt"),t.label==="\\fcolorbox"){var i=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};se({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,r,e){var{parser:n,funcName:i}=t,a=Ae(r[0],"color-token").color,o=r[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:Wm,mathmlBuilder:qm});se({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,r,e){var{parser:n,funcName:i}=t,a=Ae(r[0],"color-token").color,o=Ae(r[1],"color-token").color,s=r[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:Wm,mathmlBuilder:qm});se({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,r){var{parser:e}=t;return{type:"enclose",mode:e.mode,label:"\\fbox",body:r[0]}}});se({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,r){var{parser:e,funcName:n}=t,i=r[0];return{type:"enclose",mode:e.mode,label:n,body:i}},htmlBuilder:Wm,mathmlBuilder:qm});se({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,r){var{parser:e}=t;return{type:"enclose",mode:e.mode,label:"\\angl",body:r[0]}}});var x$={};function Mn(t){for(var{type:r,names:e,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=t,s={type:r,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{var r=t.parser.settings;if(!r.displayMode)throw new K("{"+t.envName+"} can be used only in display mode.")};function Um(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function Wi(t,r,e){var{hskipBeforeAndAfter:n,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:l,singleRow:u,emptySingleRow:c,maxNumCols:h,leqno:d}=r;if(t.gullet.beginGroup(),u||t.gullet.macros.set("\\cr","\\\\\\relax"),!o){var f=t.gullet.expandMacroAsText("\\arraystretch");if(f==null)o=1;else if(o=parseFloat(f),!o||o<0)throw new K("Invalid \\arraystretch: "+f)}t.gullet.beginGroup();var v=[],g=[v],b=[],y=[],$=l!=null?[]:void 0;function k(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function _(){$&&(t.gullet.macros.get("\\df@tag")?($.push(t.subparse([new Xr("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):$.push(!!l&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(k(),y.push(Gy(t));;){var P=t.parseExpression(!1,u?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),P={type:"ordgroup",mode:t.mode,body:P},e&&(P={type:"styling",mode:t.mode,style:e,body:[P]}),v.push(P);var S=t.fetch().text;if(S==="&"){if(h&&v.length===h){if(u||s)throw new K("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(S==="\\end"){_(),v.length===1&&P.type==="styling"&&P.body[0].body.length===0&&(g.length>1||!c)&&g.pop(),y.length0&&(k+=.25),u.push({pos:k,isDashed:fr[Zt]})}for(_(o[0]),n=0;n0&&(z+=$,Dfr))for(n=0;n=s)){var it=void 0;(i>0||r.hskipBeforeAndAfter)&&(it=be.deflt(ye.pregap,d),it!==0&&(oe=N.makeSpan(["arraycolsep"],[]),oe.style.width=ee(it),ie.push(oe)));var Le=[];for(n=0;n0){for(var de=N.makeLineSpan("hline",e,c),Oe=N.makeLineSpan("hdashline",e,c),we=[{type:"elem",elem:l,shift:0}];u.length>0;){var Qe=u.pop(),Et=Qe.pos-L;Qe.isDashed?we.push({type:"elem",elem:Oe,shift:Et}):we.push({type:"elem",elem:de,shift:Et})}l=N.makeVList({positionType:"individualShift",children:we},e)}if(Ce.length===0)return N.makeSpan(["mord"],[l],e);var Tt=N.makeVList({positionType:"individualShift",children:Ce},e);return Tt=N.makeSpan(["tag"],[Tt],e),N.makeFragment([l,Tt])},AN={c:"center ",l:"left ",r:"right "},Nn=function(r,e){for(var n=[],i=new U.MathNode("mtd",[],["mtr-glue"]),a=new U.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var v=r.cols,g="",b=!1,y=0,$=v.length;v[0].type==="separator"&&(d+="top ",y=1),v[v.length-1].type==="separator"&&(d+="bottom ",$-=1);for(var k=y;k<$;k++)v[k].type==="align"?(f+=AN[v[k].align],b&&(g+="none "),b=!0):v[k].type==="separator"&&b&&(g+=v[k].separator==="|"?"solid ":"dashed ",b=!1);c.setAttribute("columnalign",f.trim()),/[sd]/.test(g)&&c.setAttribute("columnlines",g.trim())}if(r.colSeparationType==="align"){for(var _=r.cols||[],P="",S=1;S<_.length;S++)P+=S%2?"0em ":"1em ";c.setAttribute("columnspacing",P.trim())}else r.colSeparationType==="alignat"||r.colSeparationType==="gather"?c.setAttribute("columnspacing","0em"):r.colSeparationType==="small"?c.setAttribute("columnspacing","0.2778em"):r.colSeparationType==="CD"?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var D="",B=r.hLinesBeforeRow;d+=B[0].length>0?"left ":"",d+=B[B.length-1].length>0?"right ":"";for(var R=1;R-1?"alignat":"align",a=r.envName==="split",o=Wi(r.parser,{cols:n,addJot:!0,autoTag:a?void 0:Um(r.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:r.parser.settings.leqno},"display"),s,l=0,u={type:"ordgroup",mode:r.mode,body:[]};if(e[0]&&e[0].type==="ordgroup"){for(var c="",h=0;h0&&f&&(b=1),n[v]={type:"align",align:g,pregap:b,postgap:0}}return o.colSeparationType=f?"align":"alignat",o};Mn({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,r){var e=Mh(r[0]),n=e?[r[0]]:Ae(r[0],"ordgroup").body,i=n.map(function(o){var s=Lm(o),l=s.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 K("Unknown column alignment: "+l,o)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Wi(t.parser,a,Vm(t.envName))},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var r={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],e="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:e}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),e=i.fetch().text,"lcr".indexOf(e)===-1)throw new K("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:e}]}}var a=Wi(t.parser,n,Vm(t.envName)),o=Math.max(0,...a.body.map(s=>s.length));return a.cols=new Array(o).fill({type:"align",align:e}),r?{type:"leftright",mode:t.mode,body:[a],left:r[0],right:r[1],rightColor:void 0}:a},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var r={arraystretch:.5},e=Wi(t.parser,r,"script");return e.colSeparationType="small",e},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["subarray"],props:{numArgs:1},handler(t,r){var e=Mh(r[0]),n=e?[r[0]]:Ae(r[0],"ordgroup").body,i=n.map(function(o){var s=Lm(o),l=s.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new K("Unknown column alignment: "+l,o)});if(i.length>1)throw new K("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=Wi(t.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new K("{subarray} can contain only one column");return a},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var r={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},e=Wi(t.parser,r,Vm(t.envName));return{type:"leftright",mode:t.mode,body:[e],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:S$,htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){be.contains(["gather","gather*"],t.envName)&&Rh(t);var r={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Um(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return Wi(t.parser,r,"display")},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:S$,htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){Rh(t);var r={autoTag:Um(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return Wi(t.parser,r,"display")},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["CD"],props:{numArgs:0},handler(t){return Rh(t),yN(t.parser)},htmlBuilder:Dn,mathmlBuilder:Nn});x("\\nonumber","\\gdef\\@eqnsw{0}");x("\\notag","\\nonumber");se({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,r){throw new K(t.funcName+" valid only within array environment")}});var Ky=x$;se({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,r){var{parser:e,funcName:n}=t,i=r[0];if(i.type!=="ordgroup")throw new K("Invalid environment name",i);for(var a="",o=0;o{var e=t.font,n=r.withFont(e);return Be(t.body,n)},T$=(t,r)=>{var e=t.font,n=r.withFont(e);return nt(t.body,n)},Yy={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};se({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=Zc(r[0]),a=n;return a in Yy&&(a=Yy[a]),{type:"font",mode:e.mode,font:a.slice(1),body:i}},htmlBuilder:E$,mathmlBuilder:T$});se({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,r)=>{var{parser:e}=t,n=r[0],i=be.isCharacterBox(n);return{type:"mclass",mode:e.mode,mclass:Dh(n),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});se({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,r)=>{var{parser:e,funcName:n,breakOnTokenText:i}=t,{mode:a}=e,o=e.parseExpression(!0,i),s="math"+n.slice(1);return{type:"font",mode:a,font:s,body:{type:"ordgroup",mode:e.mode,body:o}}},htmlBuilder:E$,mathmlBuilder:T$});var _$=(t,r)=>{var e=r;return t==="display"?e=e.id>=xe.SCRIPT.id?e.text():xe.DISPLAY:t==="text"&&e.size===xe.DISPLAY.size?e=xe.TEXT:t==="script"?e=xe.SCRIPT:t==="scriptscript"&&(e=xe.SCRIPTSCRIPT),e},Gm=(t,r)=>{var e=_$(t.size,r.style),n=e.fracNum(),i=e.fracDen(),a;a=r.havingStyle(n);var o=Be(t.numer,a,r);if(t.continued){var s=8.5/r.fontMetrics().ptPerEm,l=3.5/r.fontMetrics().ptPerEm;o.height=o.height0?v=3*d:v=7*d,g=r.fontMetrics().denom1):(h>0?(f=r.fontMetrics().num2,v=d):(f=r.fontMetrics().num3,v=3*d),g=r.fontMetrics().denom2);var b;if(c){var $=r.fontMetrics().axisHeight;f-o.depth-($+.5*h){var e=new U.MathNode("mfrac",[nt(t.numer,r),nt(t.denom,r)]);if(!t.hasBarLine)e.setAttribute("linethickness","0px");else if(t.barSize){var n=pt(t.barSize,r);e.setAttribute("linethickness",ee(n))}var i=_$(t.size,r.style);if(i.size!==r.style.size){e=new U.MathNode("mstyle",[e]);var a=i.size===xe.DISPLAY.size?"true":"false";e.setAttribute("displaystyle",a),e.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var o=[];if(t.leftDelim!=null){var s=new U.MathNode("mo",[new U.TextNode(t.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(e),t.rightDelim!=null){var l=new U.MathNode("mo",[new U.TextNode(t.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return zm(o)}return e};se({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=r[0],a=r[1],o,s=null,l=null,u="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,s="(",l=")";break;case"\\\\bracefrac":o=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":o=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":u="display";break;case"\\tfrac":case"\\tbinom":u="text";break}return{type:"genfrac",mode:e.mode,continued:!1,numer:i,denom:a,hasBarLine:o,leftDelim:s,rightDelim:l,size:u,barSize:null}},htmlBuilder:Gm,mathmlBuilder:Km});se({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=r[0],a=r[1];return{type:"genfrac",mode:e.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});se({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:r,funcName:e,token:n}=t,i;switch(e){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:r.mode,replaceWith:i,token:n}}});var Xy=["display","text","script","scriptscript"],Jy=function(r){var e=null;return r.length>0&&(e=r,e=e==="."?null:e),e};se({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,r){var{parser:e}=t,n=r[4],i=r[5],a=Zc(r[0]),o=a.type==="atom"&&a.family==="open"?Jy(a.text):null,s=Zc(r[1]),l=s.type==="atom"&&s.family==="close"?Jy(s.text):null,u=Ae(r[2],"size"),c,h=null;u.isBlank?c=!0:(h=u.value,c=h.number>0);var d="auto",f=r[3];if(f.type==="ordgroup"){if(f.body.length>0){var v=Ae(f.body[0],"textord");d=Xy[Number(v.text)]}}else f=Ae(f,"textord"),d=Xy[Number(f.text)];return{type:"genfrac",mode:e.mode,numer:n,denom:i,continued:!1,hasBarLine:c,barSize:h,leftDelim:o,rightDelim:l,size:d}},htmlBuilder:Gm,mathmlBuilder:Km});se({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,r){var{parser:e,funcName:n,token:i}=t;return{type:"infix",mode:e.mode,replaceWith:"\\\\abovefrac",size:Ae(r[0],"size").value,token:i}}});se({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=r[0],a=uD(Ae(r[1],"infix").size),o=r[2],s=a.number>0;return{type:"genfrac",mode:e.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Gm,mathmlBuilder:Km});var O$=(t,r)=>{var e=r.style,n,i;t.type==="supsub"?(n=t.sup?Be(t.sup,r.havingStyle(e.sup()),r):Be(t.sub,r.havingStyle(e.sub()),r),i=Ae(t.base,"horizBrace")):i=Ae(t,"horizBrace");var a=Be(i.base,r.havingBaseStyle(xe.DISPLAY)),o=ii.svgSpan(i,r),s;if(i.isOver?(s=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o}]},r),s.children[0].children[0].children[1].classes.push("svg-align")):(s=N.makeVList({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:a}]},r),s.children[0].children[0].children[0].classes.push("svg-align")),n){var l=N.makeSpan(["mord",i.isOver?"mover":"munder"],[s],r);i.isOver?s=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},r):s=N.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},r)}return N.makeSpan(["mord",i.isOver?"mover":"munder"],[s],r)},MN=(t,r)=>{var e=ii.mathMLnode(t.label);return new U.MathNode(t.isOver?"mover":"munder",[nt(t.base,r),e])};se({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,r){var{parser:e,funcName:n}=t;return{type:"horizBrace",mode:e.mode,label:n,isOver:/^\\over/.test(n),base:r[0]}},htmlBuilder:O$,mathmlBuilder:MN});se({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,r)=>{var{parser:e}=t,n=r[1],i=Ae(r[0],"url").url;return e.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:e.mode,href:i,body:_t(n)}:e.formatUnsupportedCmd("\\href")},htmlBuilder:(t,r)=>{var e=Ft(t.body,r,!1);return N.makeAnchor(t.href,[],e,r)},mathmlBuilder:(t,r)=>{var e=Fi(t.body,r);return e instanceof Gr||(e=new Gr("mrow",[e])),e.setAttribute("href",t.href),e}});se({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,r)=>{var{parser:e}=t,n=Ae(r[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:n}))return e.formatUnsupportedCmd("\\url");for(var i=[],a=0;a{var{parser:e,funcName:n,token:i}=t,a=Ae(r[0],"raw").string,o=r[1];e.settings.strict&&e.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s,l={};switch(n){case"\\htmlClass":l.class=a,s={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,s={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,s={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var u=a.split(","),c=0;c{var e=Ft(t.body,r,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=N.makeSpan(n,e,r);for(var a in t.attributes)a!=="class"&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},mathmlBuilder:(t,r)=>Fi(t.body,r)});se({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,r)=>{var{parser:e}=t;return{type:"htmlmathml",mode:e.mode,html:_t(r[0]),mathml:_t(r[1])}},htmlBuilder:(t,r)=>{var e=Ft(t.html,r,!1);return N.makeFragment(e)},mathmlBuilder:(t,r)=>Fi(t.mathml,r)});var dd=function(r){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(r))return{number:+r,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r);if(!e)throw new K("Invalid size: '"+r+"' in \\includegraphics");var n={number:+(e[1]+e[2]),unit:e[3]};if(!G7(n))throw new K("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};se({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,r,e)=>{var{parser:n}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},o={number:0,unit:"em"},s="";if(e[0])for(var l=Ae(e[0],"raw").string,u=l.split(","),c=0;c{var e=pt(t.height,r),n=0;t.totalheight.number>0&&(n=pt(t.totalheight,r)-e);var i=0;t.width.number>0&&(i=pt(t.width,r));var a={height:ee(e+n)};i>0&&(a.width=ee(i)),n>0&&(a.verticalAlign=ee(-n));var o=new MD(t.src,t.alt,a);return o.height=e,o.depth=n,o},mathmlBuilder:(t,r)=>{var e=new U.MathNode("mglyph",[]);e.setAttribute("alt",t.alt);var n=pt(t.height,r),i=0;if(t.totalheight.number>0&&(i=pt(t.totalheight,r)-n,e.setAttribute("valign",ee(-i))),e.setAttribute("height",ee(n+i)),t.width.number>0){var a=pt(t.width,r);e.setAttribute("width",ee(a))}return e.setAttribute("src",t.src),e}});se({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,r){var{parser:e,funcName:n}=t,i=Ae(r[0],"size");if(e.settings.strict){var a=n[1]==="m",o=i.value.unit==="mu";a?(o||e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),e.mode!=="math"&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:e.mode,dimension:i.value}},htmlBuilder(t,r){return N.makeGlue(t.dimension,r)},mathmlBuilder(t,r){var e=pt(t.dimension,r);return new U.SpaceNode(e)}});se({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=r[0];return{type:"lap",mode:e.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,r)=>{var e;t.alignment==="clap"?(e=N.makeSpan([],[Be(t.body,r)]),e=N.makeSpan(["inner"],[e],r)):e=N.makeSpan(["inner"],[Be(t.body,r)]);var n=N.makeSpan(["fix"],[]),i=N.makeSpan([t.alignment],[e,n],r),a=N.makeSpan(["strut"]);return a.style.height=ee(i.height+i.depth),i.depth&&(a.style.verticalAlign=ee(-i.depth)),i.children.unshift(a),i=N.makeSpan(["thinbox"],[i],r),N.makeSpan(["mord","vbox"],[i],r)},mathmlBuilder:(t,r)=>{var e=new U.MathNode("mpadded",[nt(t.body,r)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";e.setAttribute("lspace",n+"width")}return e.setAttribute("width","0px"),e}});se({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,r){var{funcName:e,parser:n}=t,i=n.mode;n.switchMode("math");var a=e==="\\("?"\\)":"$",o=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:o}}});se({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,r){throw new K("Mismatched "+t.funcName)}});var Zy=(t,r)=>{switch(r.style.size){case xe.DISPLAY.size:return t.display;case xe.TEXT.size:return t.text;case xe.SCRIPT.size:return t.script;case xe.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};se({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,r)=>{var{parser:e}=t;return{type:"mathchoice",mode:e.mode,display:_t(r[0]),text:_t(r[1]),script:_t(r[2]),scriptscript:_t(r[3])}},htmlBuilder:(t,r)=>{var e=Zy(t,r),n=Ft(e,r,!1);return N.makeFragment(n)},mathmlBuilder:(t,r)=>{var e=Zy(t,r);return Fi(e,r)}});var I$=(t,r,e,n,i,a,o)=>{t=N.makeSpan([],[t]);var s=e&&be.isCharacterBox(e),l,u;if(r){var c=Be(r,n.havingStyle(i.sup()),n);u={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}}if(e){var h=Be(e,n.havingStyle(i.sub()),n);l={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}var d;if(u&&l){var f=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+o;d=N.makeVList({positionType:"bottom",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ee(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ee(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var v=t.height-o;d=N.makeVList({positionType:"top",positionData:v,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ee(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n)}else if(u){var g=t.depth+o;d=N.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ee(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var b=[d];if(l&&a!==0&&!s){var y=N.makeSpan(["mspace"],[],n);y.style.marginRight=ee(a),b.unshift(y)}return N.makeSpan(["mop","op-limits"],b,n)},C$=["\\smallint"],Ko=(t,r)=>{var e,n,i=!1,a;t.type==="supsub"?(e=t.sup,n=t.sub,a=Ae(t.base,"op"),i=!0):a=Ae(t,"op");var o=r.style,s=!1;o.size===xe.DISPLAY.size&&a.symbol&&!be.contains(C$,a.name)&&(s=!0);var l;if(a.symbol){var u=s?"Size2-Regular":"Size1-Regular",c="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(c=a.name.slice(1),a.name=c==="oiint"?"\\iint":"\\iiint"),l=N.makeSymbol(a.name,u,"math",r,["mop","op-symbol",s?"large-op":"small-op"]),c.length>0){var h=l.italic,d=N.staticSvg(c+"Size"+(s?"2":"1"),r);l=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:d,shift:s?.08:0}]},r),a.name="\\"+c,l.classes.unshift("mop"),l.italic=h}}else if(a.body){var f=Ft(a.body,r,!0);f.length===1&&f[0]instanceof Qr?(l=f[0],l.classes[0]="mop"):l=N.makeSpan(["mop"],f,r)}else{for(var v=[],g=1;g{var e;if(t.symbol)e=new Gr("mo",[en(t.name,t.mode)]),be.contains(C$,t.name)&&e.setAttribute("largeop","false");else if(t.body)e=new Gr("mo",Tr(t.body,r));else{e=new Gr("mi",[new js(t.name.slice(1))]);var n=new Gr("mo",[en("⁡","text")]);t.parentIsSupSub?e=new Gr("mrow",[e,n]):e=i$([e,n])}return e},DN={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};se({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=n;return i.length===1&&(i=DN[i]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Ko,mathmlBuilder:Ol});se({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,r)=>{var{parser:e}=t,n=r[0];return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:_t(n)}},htmlBuilder:Ko,mathmlBuilder:Ol});var NN={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};se({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(t){var{parser:r,funcName:e}=t;return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Ko,mathmlBuilder:Ol});se({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:r,funcName:e}=t;return{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Ko,mathmlBuilder:Ol});se({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:r,funcName:e}=t,n=e;return n.length===1&&(n=NN[n]),{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Ko,mathmlBuilder:Ol});var P$=(t,r)=>{var e,n,i=!1,a;t.type==="supsub"?(e=t.sup,n=t.sub,a=Ae(t.base,"operatorname"),i=!0):a=Ae(t,"operatorname");var o;if(a.body.length>0){for(var s=a.body.map(h=>{var d=h.text;return typeof d=="string"?{type:"textord",mode:h.mode,text:d}:h}),l=Ft(s,r.withFont("mathrm"),!0),u=0;u{for(var e=Tr(t.body,r.withFont("mathrm")),n=!0,i=0;ic.toText()).join("");e=[new U.TextNode(s)]}var l=new U.MathNode("mi",e);l.setAttribute("mathvariant","normal");var u=new U.MathNode("mo",[en("⁡","text")]);return t.parentIsSupSub?new U.MathNode("mrow",[l,u]):U.newDocumentFragment([l,u])};se({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=r[0];return{type:"operatorname",mode:e.mode,body:_t(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:P$,mathmlBuilder:RN});x("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Aa({type:"ordgroup",htmlBuilder(t,r){return t.semisimple?N.makeFragment(Ft(t.body,r,!1)):N.makeSpan(["mord"],Ft(t.body,r,!0),r)},mathmlBuilder(t,r){return Fi(t.body,r,!0)}});se({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,r){var{parser:e}=t,n=r[0];return{type:"overline",mode:e.mode,body:n}},htmlBuilder(t,r){var e=Be(t.body,r.havingCrampedStyle()),n=N.makeLineSpan("overline-line",r),i=r.fontMetrics().defaultRuleThickness,a=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},r);return N.makeSpan(["mord","overline"],[a],r)},mathmlBuilder(t,r){var e=new U.MathNode("mo",[new U.TextNode("‾")]);e.setAttribute("stretchy","true");var n=new U.MathNode("mover",[nt(t.body,r),e]);return n.setAttribute("accent","true"),n}});se({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,r)=>{var{parser:e}=t,n=r[0];return{type:"phantom",mode:e.mode,body:_t(n)}},htmlBuilder:(t,r)=>{var e=Ft(t.body,r.withPhantom(),!1);return N.makeFragment(e)},mathmlBuilder:(t,r)=>{var e=Tr(t.body,r);return new U.MathNode("mphantom",e)}});se({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,r)=>{var{parser:e}=t,n=r[0];return{type:"hphantom",mode:e.mode,body:n}},htmlBuilder:(t,r)=>{var e=N.makeSpan([],[Be(t.body,r.withPhantom())]);if(e.height=0,e.depth=0,e.children)for(var n=0;n{var e=Tr(_t(t.body),r),n=new U.MathNode("mphantom",e),i=new U.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});se({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,r)=>{var{parser:e}=t,n=r[0];return{type:"vphantom",mode:e.mode,body:n}},htmlBuilder:(t,r)=>{var e=N.makeSpan(["inner"],[Be(t.body,r.withPhantom())]),n=N.makeSpan(["fix"],[]);return N.makeSpan(["mord","rlap"],[e,n],r)},mathmlBuilder:(t,r)=>{var e=Tr(_t(t.body),r),n=new U.MathNode("mphantom",e),i=new U.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});se({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,r){var{parser:e}=t,n=Ae(r[0],"size").value,i=r[1];return{type:"raisebox",mode:e.mode,dy:n,body:i}},htmlBuilder(t,r){var e=Be(t.body,r),n=pt(t.dy,r);return N.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:e}]},r)},mathmlBuilder(t,r){var e=new U.MathNode("mpadded",[nt(t.body,r)]),n=t.dy.number+t.dy.unit;return e.setAttribute("voffset",n),e}});se({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:r}=t;return{type:"internal",mode:r.mode}}});se({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,r,e){var{parser:n}=t,i=e[0],a=Ae(r[0],"size"),o=Ae(r[1],"size");return{type:"rule",mode:n.mode,shift:i&&Ae(i,"size").value,width:a.value,height:o.value}},htmlBuilder(t,r){var e=N.makeSpan(["mord","rule"],[],r),n=pt(t.width,r),i=pt(t.height,r),a=t.shift?pt(t.shift,r):0;return e.style.borderRightWidth=ee(n),e.style.borderTopWidth=ee(i),e.style.bottom=ee(a),e.width=n,e.height=i+a,e.depth=-a,e.maxFontSize=i*1.125*r.sizeMultiplier,e},mathmlBuilder(t,r){var e=pt(t.width,r),n=pt(t.height,r),i=t.shift?pt(t.shift,r):0,a=r.color&&r.getColor()||"black",o=new U.MathNode("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",ee(e)),o.setAttribute("height",ee(n));var s=new U.MathNode("mpadded",[o]);return i>=0?s.setAttribute("height",ee(i)):(s.setAttribute("height",ee(i)),s.setAttribute("depth",ee(-i))),s.setAttribute("voffset",ee(i)),s}});function A$(t,r,e){for(var n=Ft(t,r,!1),i=r.sizeMultiplier/e.sizeMultiplier,a=0;a{var e=r.havingSize(t.size);return A$(t.body,e,r)};se({type:"sizing",names:Qy,props:{numArgs:0,allowedInText:!0},handler:(t,r)=>{var{breakOnTokenText:e,funcName:n,parser:i}=t,a=i.parseExpression(!1,e);return{type:"sizing",mode:i.mode,size:Qy.indexOf(n)+1,body:a}},htmlBuilder:FN,mathmlBuilder:(t,r)=>{var e=r.havingSize(t.size),n=Tr(t.body,e),i=new U.MathNode("mstyle",n);return i.setAttribute("mathsize",ee(e.sizeMultiplier)),i}});se({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,r,e)=>{var{parser:n}=t,i=!1,a=!1,o=e[0]&&Ae(e[0],"ordgroup");if(o)for(var s="",l=0;l{var e=N.makeSpan([],[Be(t.body,r)]);if(!t.smashHeight&&!t.smashDepth)return e;if(t.smashHeight&&(e.height=0,e.children))for(var n=0;n{var e=new U.MathNode("mpadded",[nt(t.body,r)]);return t.smashHeight&&e.setAttribute("height","0px"),t.smashDepth&&e.setAttribute("depth","0px"),e}});se({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,r,e){var{parser:n}=t,i=e[0],a=r[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(t,r){var e=Be(t.body,r.havingCrampedStyle());e.height===0&&(e.height=r.fontMetrics().xHeight),e=N.wrapFragment(e,r);var n=r.fontMetrics(),i=n.defaultRuleThickness,a=i;r.style.ide.height+e.depth+o&&(o=(o+h-e.height-e.depth)/2);var d=l.height-e.height-o-u;e.style.paddingLeft=ee(c);var f=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e,wrapperClasses:["svg-align"]},{type:"kern",size:-(e.height+d)},{type:"elem",elem:l},{type:"kern",size:u}]},r);if(t.index){var v=r.havingStyle(xe.SCRIPTSCRIPT),g=Be(t.index,v,r),b=.6*(f.height-f.depth),y=N.makeVList({positionType:"shift",positionData:-b,children:[{type:"elem",elem:g}]},r),$=N.makeSpan(["root"],[y]);return N.makeSpan(["mord","sqrt"],[$,f],r)}else return N.makeSpan(["mord","sqrt"],[f],r)},mathmlBuilder(t,r){var{body:e,index:n}=t;return n?new U.MathNode("mroot",[nt(e,r),nt(n,r)]):new U.MathNode("msqrt",[nt(e,r)])}});var eb={display:xe.DISPLAY,text:xe.TEXT,script:xe.SCRIPT,scriptscript:xe.SCRIPTSCRIPT};se({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,r){var{breakOnTokenText:e,funcName:n,parser:i}=t,a=i.parseExpression(!0,e),o=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:o,body:a}},htmlBuilder(t,r){var e=eb[t.style],n=r.havingStyle(e).withFont("");return A$(t.body,n,r)},mathmlBuilder(t,r){var e=eb[t.style],n=r.havingStyle(e),i=Tr(t.body,n),a=new U.MathNode("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},s=o[t.style];return a.setAttribute("scriptlevel",s[0]),a.setAttribute("displaystyle",s[1]),a}});var zN=function(r,e){var n=r.base;if(n)if(n.type==="op"){var i=n.limits&&(e.style.size===xe.DISPLAY.size||n.alwaysHandleSupSub);return i?Ko:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(e.style.size===xe.DISPLAY.size||n.limits);return a?P$:null}else{if(n.type==="accent")return be.isCharacterBox(n.base)?jm:null;if(n.type==="horizBrace"){var o=!r.sub;return o===n.isOver?O$:null}else return null}else return null};Aa({type:"supsub",htmlBuilder(t,r){var e=zN(t,r);if(e)return e(t,r);var{base:n,sup:i,sub:a}=t,o=Be(n,r),s,l,u=r.fontMetrics(),c=0,h=0,d=n&&be.isCharacterBox(n);if(i){var f=r.havingStyle(r.style.sup());s=Be(i,f,r),d||(c=o.height-f.fontMetrics().supDrop*f.sizeMultiplier/r.sizeMultiplier)}if(a){var v=r.havingStyle(r.style.sub());l=Be(a,v,r),d||(h=o.depth+v.fontMetrics().subDrop*v.sizeMultiplier/r.sizeMultiplier)}var g;r.style===xe.DISPLAY?g=u.sup1:r.style.cramped?g=u.sup3:g=u.sup2;var b=r.sizeMultiplier,y=ee(.5/u.ptPerEm/b),$=null;if(l){var k=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(o instanceof Qr||k)&&($=ee(-o.italic))}var _;if(s&&l){c=Math.max(c,g,s.depth+.25*u.xHeight),h=Math.max(h,u.sub2);var P=u.defaultRuleThickness,S=4*P;if(c-s.depth-(l.height-h)0&&(c+=D,h-=D)}var B=[{type:"elem",elem:l,shift:h,marginRight:y,marginLeft:$},{type:"elem",elem:s,shift:-c,marginRight:y}];_=N.makeVList({positionType:"individualShift",children:B},r)}else if(l){h=Math.max(h,u.sub1,l.height-.8*u.xHeight);var R=[{type:"elem",elem:l,marginLeft:$,marginRight:y}];_=N.makeVList({positionType:"shift",positionData:h,children:R},r)}else if(s)c=Math.max(c,g,s.depth+.25*u.xHeight),_=N.makeVList({positionType:"shift",positionData:-c,children:[{type:"elem",elem:s,marginRight:y}]},r);else throw new Error("supsub must have either sup or sub.");var A=Gv(o,"right")||"mord";return N.makeSpan([A],[o,N.makeSpan(["msupsub"],[_])],r)},mathmlBuilder(t,r){var e=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(e=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var a=[nt(t.base,r)];t.sub&&a.push(nt(t.sub,r)),t.sup&&a.push(nt(t.sup,r));var o;if(e)o=n?"mover":"munder";else if(t.sub)if(t.sup){var u=t.base;u&&u.type==="op"&&u.limits&&r.style===xe.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(r.style===xe.DISPLAY||u.limits)?o="munderover":o="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(r.style===xe.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||r.style===xe.DISPLAY)?o="munder":o="msub"}else{var s=t.base;s&&s.type==="op"&&s.limits&&(r.style===xe.DISPLAY||s.alwaysHandleSupSub)||s&&s.type==="operatorname"&&s.alwaysHandleSupSub&&(s.limits||r.style===xe.DISPLAY)?o="mover":o="msup"}return new U.MathNode(o,a)}});Aa({type:"atom",htmlBuilder(t,r){return N.mathsym(t.text,t.mode,r,["m"+t.family])},mathmlBuilder(t,r){var e=new U.MathNode("mo",[en(t.text,t.mode)]);if(t.family==="bin"){var n=Bm(t,r);n==="bold-italic"&&e.setAttribute("mathvariant",n)}else t.family==="punct"?e.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&e.setAttribute("stretchy","false");return e}});var M$={mi:"italic",mn:"normal",mtext:"normal"};Aa({type:"mathord",htmlBuilder(t,r){return N.makeOrd(t,r,"mathord")},mathmlBuilder(t,r){var e=new U.MathNode("mi",[en(t.text,t.mode,r)]),n=Bm(t,r)||"italic";return n!==M$[e.type]&&e.setAttribute("mathvariant",n),e}});Aa({type:"textord",htmlBuilder(t,r){return N.makeOrd(t,r,"textord")},mathmlBuilder(t,r){var e=en(t.text,t.mode,r),n=Bm(t,r)||"normal",i;return t.mode==="text"?i=new U.MathNode("mtext",[e]):/[0-9]/.test(t.text)?i=new U.MathNode("mn",[e]):t.text==="\\prime"?i=new U.MathNode("mo",[e]):i=new U.MathNode("mi",[e]),n!==M$[i.type]&&i.setAttribute("mathvariant",n),i}});var fd={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},vd={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Aa({type:"spacing",htmlBuilder(t,r){if(vd.hasOwnProperty(t.text)){var e=vd[t.text].className||"";if(t.mode==="text"){var n=N.makeOrd(t,r,"textord");return n.classes.push(e),n}else return N.makeSpan(["mspace",e],[N.mathsym(t.text,t.mode,r)],r)}else{if(fd.hasOwnProperty(t.text))return N.makeSpan(["mspace",fd[t.text]],[],r);throw new K('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,r){var e;if(vd.hasOwnProperty(t.text))e=new U.MathNode("mtext",[new U.TextNode(" ")]);else{if(fd.hasOwnProperty(t.text))return new U.MathNode("mspace");throw new K('Unknown type of space "'+t.text+'"')}return e}});var tb=()=>{var t=new U.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};Aa({type:"tag",mathmlBuilder(t,r){var e=new U.MathNode("mtable",[new U.MathNode("mtr",[tb(),new U.MathNode("mtd",[Fi(t.body,r)]),tb(),new U.MathNode("mtd",[Fi(t.tag,r)])])]);return e.setAttribute("width","100%"),e}});var rb={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},nb={"\\textbf":"textbf","\\textmd":"textmd"},BN={"\\textit":"textit","\\textup":"textup"},ib=(t,r)=>{var e=t.font;if(e){if(rb[e])return r.withTextFontFamily(rb[e]);if(nb[e])return r.withTextFontWeight(nb[e]);if(e==="\\emph")return r.fontShape==="textit"?r.withTextFontShape("textup"):r.withTextFontShape("textit")}else return r;return r.withTextFontShape(BN[e])};se({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,r){var{parser:e,funcName:n}=t,i=r[0];return{type:"text",mode:e.mode,body:_t(i),font:n}},htmlBuilder(t,r){var e=ib(t,r),n=Ft(t.body,e,!0);return N.makeSpan(["mord","text"],n,e)},mathmlBuilder(t,r){var e=ib(t,r);return Fi(t.body,e)}});se({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,r){var{parser:e}=t;return{type:"underline",mode:e.mode,body:r[0]}},htmlBuilder(t,r){var e=Be(t.body,r),n=N.makeLineSpan("underline-line",r),i=r.fontMetrics().defaultRuleThickness,a=N.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:e}]},r);return N.makeSpan(["mord","underline"],[a],r)},mathmlBuilder(t,r){var e=new U.MathNode("mo",[new U.TextNode("‾")]);e.setAttribute("stretchy","true");var n=new U.MathNode("munder",[nt(t.body,r),e]);return n.setAttribute("accentunder","true"),n}});se({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,r){var{parser:e}=t;return{type:"vcenter",mode:e.mode,body:r[0]}},htmlBuilder(t,r){var e=Be(t.body,r),n=r.fontMetrics().axisHeight,i=.5*(e.height-n-(e.depth+n));return N.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:e}]},r)},mathmlBuilder(t,r){return new U.MathNode("mpadded",[nt(t.body,r)],["vcenter"])}});se({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,r,e){throw new K("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,r){for(var e=ab(t),n=[],i=r.havingStyle(r.style.text()),a=0;at.body.replace(/ /g,t.star?"␣":" "),ki=r$,D$=`[ \r +-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 Tl{constructor(r){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=r,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(r){return ge.contains(this.classes,r)}toNode(){for(var r=document.createDocumentFragment(),e=0;ee.toText();return this.children.map(r).join("")}}var En={"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]}},_u={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]},Ay={Å:"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 ID(t,r){En[t]=r}function Nm(t,r,e){if(!En[r])throw new Error("Font metrics not found for font: "+r+".");var n=t.charCodeAt(0),i=En[r][n];if(!i&&t[0]in Ay&&(n=Ay[t[0]].charCodeAt(0),i=En[r][n]),!i&&e==="text"&&V7(n)&&(i=En[r][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var rd={};function CD(t){var r;if(t>=5?r=0:t>=3?r=1:r=2,!rd[r]){var e=rd[r]={cssEmPerMu:_u.quad[r]/18};for(var n in _u)_u.hasOwnProperty(n)&&(e[n]=_u[n][r])}return rd[r]}var PD=[[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]],My=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Dy=function(r,e){return e.size<2?r:PD[r-1][e.size-1]};class Wn{constructor(r){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=r.style,this.color=r.color,this.size=r.size||Wn.BASESIZE,this.textSize=r.textSize||this.size,this.phantom=!!r.phantom,this.font=r.font||"",this.fontFamily=r.fontFamily||"",this.fontWeight=r.fontWeight||"",this.fontShape=r.fontShape||"",this.sizeMultiplier=My[this.size-1],this.maxSize=r.maxSize,this.minRuleThickness=r.minRuleThickness,this._fontMetrics=void 0}extend(r){var e={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 n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);return new Wn(e)}havingStyle(r){return this.style===r?this:this.extend({style:r,size:Dy(this.textSize,r)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(r){return this.size===r&&this.textSize===r?this:this.extend({style:this.style.text(),size:r,textSize:r,sizeMultiplier:My[r-1]})}havingBaseStyle(r){r=r||this.style.text();var e=Dy(Wn.BASESIZE,r);return this.size===e&&this.textSize===Wn.BASESIZE&&this.style===r?this:this.extend({style:r,size:e})}havingBaseSizing(){var r;switch(this.style.id){case 4:case 5:r=3;break;case 6:case 7:r=1;break;default:r=6}return this.extend({style:this.style.text(),size:r})}withColor(r){return this.extend({color:r})}withPhantom(){return this.extend({phantom:!0})}withFont(r){return this.extend({font:r})}withTextFontFamily(r){return this.extend({fontFamily:r,font:""})}withTextFontWeight(r){return this.extend({fontWeight:r,font:""})}withTextFontShape(r){return this.extend({fontShape:r,font:""})}sizingClasses(r){return r.size!==this.size?["sizing","reset-size"+r.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Wn.BASESIZE?["sizing","reset-size"+this.size,"size"+Wn.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=CD(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Wn.BASESIZE=6;var qv={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},AD={ex:!0,em:!0,mu:!0},G7=function(r){return typeof r!="string"&&(r=r.unit),r in qv||r in AD||r==="ex"},pt=function(r,e){var n;if(r.unit in qv)n=qv[r.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if(r.unit==="mu")n=e.fontMetrics().cssEmPerMu;else{var i;if(e.style.isTight()?i=e.havingStyle(e.style.text()):i=e,r.unit==="ex")n=i.fontMetrics().xHeight;else if(r.unit==="em")n=i.fontMetrics().quad;else throw new K("Invalid unit: '"+r.unit+"'");i!==e&&(n*=i.sizeMultiplier/e.sizeMultiplier)}return Math.min(r.number*n,e.maxSize)},ee=function(r){return+r.toFixed(4)+"em"},Ni=function(r){return r.filter(e=>e).join(" ")},K7=function(r,e,n){if(this.classes=r||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},e){e.style.isTight()&&this.classes.push("mtight");var i=e.getColor();i&&(this.style.color=i)}},Y7=function(r){var e=document.createElement(r);e.className=Ni(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(e.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&e.setAttribute(i,this.attributes[i]);for(var a=0;a",e};class _l{constructor(r,e,n,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,K7.call(this,r,n,i),this.children=e||[]}setAttribute(r,e){this.attributes[r]=e}hasClass(r){return ge.contains(this.classes,r)}toNode(){return Y7.call(this,"span")}toMarkup(){return X7.call(this,"span")}}class Rm{constructor(r,e,n,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,K7.call(this,e,i),this.children=n||[],this.setAttribute("href",r)}setAttribute(r,e){this.attributes[r]=e}hasClass(r){return ge.contains(this.classes,r)}toNode(){return Y7.call(this,"a")}toMarkup(){return X7.call(this,"a")}}class MD{constructor(r,e,n){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=e,this.src=r,this.classes=["mord"],this.style=n}hasClass(r){return ge.contains(this.classes,r)}toNode(){var r=document.createElement("img");r.src=this.src,r.alt=this.alt,r.className="mord";for(var e in this.style)this.style.hasOwnProperty(e)&&(r.style[e]=this.style[e]);return r}toMarkup(){var r=''+ge.escape(this.alt)+'0&&(e=document.createElement("span"),e.style.marginRight=ee(this.italic)),this.classes.length>0&&(e=e||document.createElement("span"),e.className=Ni(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(e=e||document.createElement("span"),e.style[n]=this.style[n]);return e?(e.appendChild(r),e):r}toMarkup(){var r=!1,e="0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=ge.hyphenate(i)+":"+this.style[i]+";");n&&(r=!0,e+=' style="'+ge.escape(n)+'"');var a=ge.escape(this.text);return r?(e+=">",e+=a,e+="",e):a}}class ri{constructor(r,e){this.children=void 0,this.attributes=void 0,this.children=r||[],this.attributes=e||{}}toNode(){var r="http://www.w3.org/2000/svg",e=document.createElementNS(r,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&e.setAttribute(n,this.attributes[n]);for(var i=0;i':''}}class Uv{constructor(r){this.attributes=void 0,this.attributes=r||{}}toNode(){var r="http://www.w3.org/2000/svg",e=document.createElementNS(r,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&e.setAttribute(n,this.attributes[n]);return e}toMarkup(){var r=" but got "+String(t)+".")}var RD={bin:1,close:1,inner:1,open:1,punct:1,rel:1},FD={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ut={math:{},text:{}};function p(t,r,e,n,i,a){ut[t][i]={font:r,group:e,replace:n},a&&n&&(ut[t][n]=ut[t][i])}var g="math",q="text",w="main",T="ams",ht="accent-token",le="bin",hr="close",Go="inner",be="mathord",Dt="op-token",zr="open",Ph="punct",I="rel",ci="spacing",M="textord";p(g,w,I,"≡","\\equiv",!0);p(g,w,I,"≺","\\prec",!0);p(g,w,I,"≻","\\succ",!0);p(g,w,I,"∼","\\sim",!0);p(g,w,I,"⊥","\\perp");p(g,w,I,"⪯","\\preceq",!0);p(g,w,I,"⪰","\\succeq",!0);p(g,w,I,"≃","\\simeq",!0);p(g,w,I,"∣","\\mid",!0);p(g,w,I,"≪","\\ll",!0);p(g,w,I,"≫","\\gg",!0);p(g,w,I,"≍","\\asymp",!0);p(g,w,I,"∥","\\parallel");p(g,w,I,"⋈","\\bowtie",!0);p(g,w,I,"⌣","\\smile",!0);p(g,w,I,"⊑","\\sqsubseteq",!0);p(g,w,I,"⊒","\\sqsupseteq",!0);p(g,w,I,"≐","\\doteq",!0);p(g,w,I,"⌢","\\frown",!0);p(g,w,I,"∋","\\ni",!0);p(g,w,I,"∝","\\propto",!0);p(g,w,I,"⊢","\\vdash",!0);p(g,w,I,"⊣","\\dashv",!0);p(g,w,I,"∋","\\owns");p(g,w,Ph,".","\\ldotp");p(g,w,Ph,"⋅","\\cdotp");p(g,w,M,"#","\\#");p(q,w,M,"#","\\#");p(g,w,M,"&","\\&");p(q,w,M,"&","\\&");p(g,w,M,"ℵ","\\aleph",!0);p(g,w,M,"∀","\\forall",!0);p(g,w,M,"ℏ","\\hbar",!0);p(g,w,M,"∃","\\exists",!0);p(g,w,M,"∇","\\nabla",!0);p(g,w,M,"♭","\\flat",!0);p(g,w,M,"ℓ","\\ell",!0);p(g,w,M,"♮","\\natural",!0);p(g,w,M,"♣","\\clubsuit",!0);p(g,w,M,"℘","\\wp",!0);p(g,w,M,"♯","\\sharp",!0);p(g,w,M,"♢","\\diamondsuit",!0);p(g,w,M,"ℜ","\\Re",!0);p(g,w,M,"♡","\\heartsuit",!0);p(g,w,M,"ℑ","\\Im",!0);p(g,w,M,"♠","\\spadesuit",!0);p(g,w,M,"§","\\S",!0);p(q,w,M,"§","\\S");p(g,w,M,"¶","\\P",!0);p(q,w,M,"¶","\\P");p(g,w,M,"†","\\dag");p(q,w,M,"†","\\dag");p(q,w,M,"†","\\textdagger");p(g,w,M,"‡","\\ddag");p(q,w,M,"‡","\\ddag");p(q,w,M,"‡","\\textdaggerdbl");p(g,w,hr,"⎱","\\rmoustache",!0);p(g,w,zr,"⎰","\\lmoustache",!0);p(g,w,hr,"⟯","\\rgroup",!0);p(g,w,zr,"⟮","\\lgroup",!0);p(g,w,le,"∓","\\mp",!0);p(g,w,le,"⊖","\\ominus",!0);p(g,w,le,"⊎","\\uplus",!0);p(g,w,le,"⊓","\\sqcap",!0);p(g,w,le,"∗","\\ast");p(g,w,le,"⊔","\\sqcup",!0);p(g,w,le,"◯","\\bigcirc",!0);p(g,w,le,"∙","\\bullet",!0);p(g,w,le,"‡","\\ddagger");p(g,w,le,"≀","\\wr",!0);p(g,w,le,"⨿","\\amalg");p(g,w,le,"&","\\And");p(g,w,I,"⟵","\\longleftarrow",!0);p(g,w,I,"⇐","\\Leftarrow",!0);p(g,w,I,"⟸","\\Longleftarrow",!0);p(g,w,I,"⟶","\\longrightarrow",!0);p(g,w,I,"⇒","\\Rightarrow",!0);p(g,w,I,"⟹","\\Longrightarrow",!0);p(g,w,I,"↔","\\leftrightarrow",!0);p(g,w,I,"⟷","\\longleftrightarrow",!0);p(g,w,I,"⇔","\\Leftrightarrow",!0);p(g,w,I,"⟺","\\Longleftrightarrow",!0);p(g,w,I,"↦","\\mapsto",!0);p(g,w,I,"⟼","\\longmapsto",!0);p(g,w,I,"↗","\\nearrow",!0);p(g,w,I,"↩","\\hookleftarrow",!0);p(g,w,I,"↪","\\hookrightarrow",!0);p(g,w,I,"↘","\\searrow",!0);p(g,w,I,"↼","\\leftharpoonup",!0);p(g,w,I,"⇀","\\rightharpoonup",!0);p(g,w,I,"↙","\\swarrow",!0);p(g,w,I,"↽","\\leftharpoondown",!0);p(g,w,I,"⇁","\\rightharpoondown",!0);p(g,w,I,"↖","\\nwarrow",!0);p(g,w,I,"⇌","\\rightleftharpoons",!0);p(g,T,I,"≮","\\nless",!0);p(g,T,I,"","\\@nleqslant");p(g,T,I,"","\\@nleqq");p(g,T,I,"⪇","\\lneq",!0);p(g,T,I,"≨","\\lneqq",!0);p(g,T,I,"","\\@lvertneqq");p(g,T,I,"⋦","\\lnsim",!0);p(g,T,I,"⪉","\\lnapprox",!0);p(g,T,I,"⊀","\\nprec",!0);p(g,T,I,"⋠","\\npreceq",!0);p(g,T,I,"⋨","\\precnsim",!0);p(g,T,I,"⪹","\\precnapprox",!0);p(g,T,I,"≁","\\nsim",!0);p(g,T,I,"","\\@nshortmid");p(g,T,I,"∤","\\nmid",!0);p(g,T,I,"⊬","\\nvdash",!0);p(g,T,I,"⊭","\\nvDash",!0);p(g,T,I,"⋪","\\ntriangleleft");p(g,T,I,"⋬","\\ntrianglelefteq",!0);p(g,T,I,"⊊","\\subsetneq",!0);p(g,T,I,"","\\@varsubsetneq");p(g,T,I,"⫋","\\subsetneqq",!0);p(g,T,I,"","\\@varsubsetneqq");p(g,T,I,"≯","\\ngtr",!0);p(g,T,I,"","\\@ngeqslant");p(g,T,I,"","\\@ngeqq");p(g,T,I,"⪈","\\gneq",!0);p(g,T,I,"≩","\\gneqq",!0);p(g,T,I,"","\\@gvertneqq");p(g,T,I,"⋧","\\gnsim",!0);p(g,T,I,"⪊","\\gnapprox",!0);p(g,T,I,"⊁","\\nsucc",!0);p(g,T,I,"⋡","\\nsucceq",!0);p(g,T,I,"⋩","\\succnsim",!0);p(g,T,I,"⪺","\\succnapprox",!0);p(g,T,I,"≆","\\ncong",!0);p(g,T,I,"","\\@nshortparallel");p(g,T,I,"∦","\\nparallel",!0);p(g,T,I,"⊯","\\nVDash",!0);p(g,T,I,"⋫","\\ntriangleright");p(g,T,I,"⋭","\\ntrianglerighteq",!0);p(g,T,I,"","\\@nsupseteqq");p(g,T,I,"⊋","\\supsetneq",!0);p(g,T,I,"","\\@varsupsetneq");p(g,T,I,"⫌","\\supsetneqq",!0);p(g,T,I,"","\\@varsupsetneqq");p(g,T,I,"⊮","\\nVdash",!0);p(g,T,I,"⪵","\\precneqq",!0);p(g,T,I,"⪶","\\succneqq",!0);p(g,T,I,"","\\@nsubseteqq");p(g,T,le,"⊴","\\unlhd");p(g,T,le,"⊵","\\unrhd");p(g,T,I,"↚","\\nleftarrow",!0);p(g,T,I,"↛","\\nrightarrow",!0);p(g,T,I,"⇍","\\nLeftarrow",!0);p(g,T,I,"⇏","\\nRightarrow",!0);p(g,T,I,"↮","\\nleftrightarrow",!0);p(g,T,I,"⇎","\\nLeftrightarrow",!0);p(g,T,I,"△","\\vartriangle");p(g,T,M,"ℏ","\\hslash");p(g,T,M,"▽","\\triangledown");p(g,T,M,"◊","\\lozenge");p(g,T,M,"Ⓢ","\\circledS");p(g,T,M,"®","\\circledR");p(q,T,M,"®","\\circledR");p(g,T,M,"∡","\\measuredangle",!0);p(g,T,M,"∄","\\nexists");p(g,T,M,"℧","\\mho");p(g,T,M,"Ⅎ","\\Finv",!0);p(g,T,M,"⅁","\\Game",!0);p(g,T,M,"‵","\\backprime");p(g,T,M,"▲","\\blacktriangle");p(g,T,M,"▼","\\blacktriangledown");p(g,T,M,"■","\\blacksquare");p(g,T,M,"⧫","\\blacklozenge");p(g,T,M,"★","\\bigstar");p(g,T,M,"∢","\\sphericalangle",!0);p(g,T,M,"∁","\\complement",!0);p(g,T,M,"ð","\\eth",!0);p(q,w,M,"ð","ð");p(g,T,M,"╱","\\diagup");p(g,T,M,"╲","\\diagdown");p(g,T,M,"□","\\square");p(g,T,M,"□","\\Box");p(g,T,M,"◊","\\Diamond");p(g,T,M,"¥","\\yen",!0);p(q,T,M,"¥","\\yen",!0);p(g,T,M,"✓","\\checkmark",!0);p(q,T,M,"✓","\\checkmark");p(g,T,M,"ℶ","\\beth",!0);p(g,T,M,"ℸ","\\daleth",!0);p(g,T,M,"ℷ","\\gimel",!0);p(g,T,M,"ϝ","\\digamma",!0);p(g,T,M,"ϰ","\\varkappa");p(g,T,zr,"┌","\\@ulcorner",!0);p(g,T,hr,"┐","\\@urcorner",!0);p(g,T,zr,"└","\\@llcorner",!0);p(g,T,hr,"┘","\\@lrcorner",!0);p(g,T,I,"≦","\\leqq",!0);p(g,T,I,"⩽","\\leqslant",!0);p(g,T,I,"⪕","\\eqslantless",!0);p(g,T,I,"≲","\\lesssim",!0);p(g,T,I,"⪅","\\lessapprox",!0);p(g,T,I,"≊","\\approxeq",!0);p(g,T,le,"⋖","\\lessdot");p(g,T,I,"⋘","\\lll",!0);p(g,T,I,"≶","\\lessgtr",!0);p(g,T,I,"⋚","\\lesseqgtr",!0);p(g,T,I,"⪋","\\lesseqqgtr",!0);p(g,T,I,"≑","\\doteqdot");p(g,T,I,"≓","\\risingdotseq",!0);p(g,T,I,"≒","\\fallingdotseq",!0);p(g,T,I,"∽","\\backsim",!0);p(g,T,I,"⋍","\\backsimeq",!0);p(g,T,I,"⫅","\\subseteqq",!0);p(g,T,I,"⋐","\\Subset",!0);p(g,T,I,"⊏","\\sqsubset",!0);p(g,T,I,"≼","\\preccurlyeq",!0);p(g,T,I,"⋞","\\curlyeqprec",!0);p(g,T,I,"≾","\\precsim",!0);p(g,T,I,"⪷","\\precapprox",!0);p(g,T,I,"⊲","\\vartriangleleft");p(g,T,I,"⊴","\\trianglelefteq");p(g,T,I,"⊨","\\vDash",!0);p(g,T,I,"⊪","\\Vvdash",!0);p(g,T,I,"⌣","\\smallsmile");p(g,T,I,"⌢","\\smallfrown");p(g,T,I,"≏","\\bumpeq",!0);p(g,T,I,"≎","\\Bumpeq",!0);p(g,T,I,"≧","\\geqq",!0);p(g,T,I,"⩾","\\geqslant",!0);p(g,T,I,"⪖","\\eqslantgtr",!0);p(g,T,I,"≳","\\gtrsim",!0);p(g,T,I,"⪆","\\gtrapprox",!0);p(g,T,le,"⋗","\\gtrdot");p(g,T,I,"⋙","\\ggg",!0);p(g,T,I,"≷","\\gtrless",!0);p(g,T,I,"⋛","\\gtreqless",!0);p(g,T,I,"⪌","\\gtreqqless",!0);p(g,T,I,"≖","\\eqcirc",!0);p(g,T,I,"≗","\\circeq",!0);p(g,T,I,"≜","\\triangleq",!0);p(g,T,I,"∼","\\thicksim");p(g,T,I,"≈","\\thickapprox");p(g,T,I,"⫆","\\supseteqq",!0);p(g,T,I,"⋑","\\Supset",!0);p(g,T,I,"⊐","\\sqsupset",!0);p(g,T,I,"≽","\\succcurlyeq",!0);p(g,T,I,"⋟","\\curlyeqsucc",!0);p(g,T,I,"≿","\\succsim",!0);p(g,T,I,"⪸","\\succapprox",!0);p(g,T,I,"⊳","\\vartriangleright");p(g,T,I,"⊵","\\trianglerighteq");p(g,T,I,"⊩","\\Vdash",!0);p(g,T,I,"∣","\\shortmid");p(g,T,I,"∥","\\shortparallel");p(g,T,I,"≬","\\between",!0);p(g,T,I,"⋔","\\pitchfork",!0);p(g,T,I,"∝","\\varpropto");p(g,T,I,"◀","\\blacktriangleleft");p(g,T,I,"∴","\\therefore",!0);p(g,T,I,"∍","\\backepsilon");p(g,T,I,"▶","\\blacktriangleright");p(g,T,I,"∵","\\because",!0);p(g,T,I,"⋘","\\llless");p(g,T,I,"⋙","\\gggtr");p(g,T,le,"⊲","\\lhd");p(g,T,le,"⊳","\\rhd");p(g,T,I,"≂","\\eqsim",!0);p(g,w,I,"⋈","\\Join");p(g,T,I,"≑","\\Doteq",!0);p(g,T,le,"∔","\\dotplus",!0);p(g,T,le,"∖","\\smallsetminus");p(g,T,le,"⋒","\\Cap",!0);p(g,T,le,"⋓","\\Cup",!0);p(g,T,le,"⩞","\\doublebarwedge",!0);p(g,T,le,"⊟","\\boxminus",!0);p(g,T,le,"⊞","\\boxplus",!0);p(g,T,le,"⋇","\\divideontimes",!0);p(g,T,le,"⋉","\\ltimes",!0);p(g,T,le,"⋊","\\rtimes",!0);p(g,T,le,"⋋","\\leftthreetimes",!0);p(g,T,le,"⋌","\\rightthreetimes",!0);p(g,T,le,"⋏","\\curlywedge",!0);p(g,T,le,"⋎","\\curlyvee",!0);p(g,T,le,"⊝","\\circleddash",!0);p(g,T,le,"⊛","\\circledast",!0);p(g,T,le,"⋅","\\centerdot");p(g,T,le,"⊺","\\intercal",!0);p(g,T,le,"⋒","\\doublecap");p(g,T,le,"⋓","\\doublecup");p(g,T,le,"⊠","\\boxtimes",!0);p(g,T,I,"⇢","\\dashrightarrow",!0);p(g,T,I,"⇠","\\dashleftarrow",!0);p(g,T,I,"⇇","\\leftleftarrows",!0);p(g,T,I,"⇆","\\leftrightarrows",!0);p(g,T,I,"⇚","\\Lleftarrow",!0);p(g,T,I,"↞","\\twoheadleftarrow",!0);p(g,T,I,"↢","\\leftarrowtail",!0);p(g,T,I,"↫","\\looparrowleft",!0);p(g,T,I,"⇋","\\leftrightharpoons",!0);p(g,T,I,"↶","\\curvearrowleft",!0);p(g,T,I,"↺","\\circlearrowleft",!0);p(g,T,I,"↰","\\Lsh",!0);p(g,T,I,"⇈","\\upuparrows",!0);p(g,T,I,"↿","\\upharpoonleft",!0);p(g,T,I,"⇃","\\downharpoonleft",!0);p(g,w,I,"⊶","\\origof",!0);p(g,w,I,"⊷","\\imageof",!0);p(g,T,I,"⊸","\\multimap",!0);p(g,T,I,"↭","\\leftrightsquigarrow",!0);p(g,T,I,"⇉","\\rightrightarrows",!0);p(g,T,I,"⇄","\\rightleftarrows",!0);p(g,T,I,"↠","\\twoheadrightarrow",!0);p(g,T,I,"↣","\\rightarrowtail",!0);p(g,T,I,"↬","\\looparrowright",!0);p(g,T,I,"↷","\\curvearrowright",!0);p(g,T,I,"↻","\\circlearrowright",!0);p(g,T,I,"↱","\\Rsh",!0);p(g,T,I,"⇊","\\downdownarrows",!0);p(g,T,I,"↾","\\upharpoonright",!0);p(g,T,I,"⇂","\\downharpoonright",!0);p(g,T,I,"⇝","\\rightsquigarrow",!0);p(g,T,I,"⇝","\\leadsto");p(g,T,I,"⇛","\\Rrightarrow",!0);p(g,T,I,"↾","\\restriction");p(g,w,M,"‘","`");p(g,w,M,"$","\\$");p(q,w,M,"$","\\$");p(q,w,M,"$","\\textdollar");p(g,w,M,"%","\\%");p(q,w,M,"%","\\%");p(g,w,M,"_","\\_");p(q,w,M,"_","\\_");p(q,w,M,"_","\\textunderscore");p(g,w,M,"∠","\\angle",!0);p(g,w,M,"∞","\\infty",!0);p(g,w,M,"′","\\prime");p(g,w,M,"△","\\triangle");p(g,w,M,"Γ","\\Gamma",!0);p(g,w,M,"Δ","\\Delta",!0);p(g,w,M,"Θ","\\Theta",!0);p(g,w,M,"Λ","\\Lambda",!0);p(g,w,M,"Ξ","\\Xi",!0);p(g,w,M,"Π","\\Pi",!0);p(g,w,M,"Σ","\\Sigma",!0);p(g,w,M,"Υ","\\Upsilon",!0);p(g,w,M,"Φ","\\Phi",!0);p(g,w,M,"Ψ","\\Psi",!0);p(g,w,M,"Ω","\\Omega",!0);p(g,w,M,"A","Α");p(g,w,M,"B","Β");p(g,w,M,"E","Ε");p(g,w,M,"Z","Ζ");p(g,w,M,"H","Η");p(g,w,M,"I","Ι");p(g,w,M,"K","Κ");p(g,w,M,"M","Μ");p(g,w,M,"N","Ν");p(g,w,M,"O","Ο");p(g,w,M,"P","Ρ");p(g,w,M,"T","Τ");p(g,w,M,"X","Χ");p(g,w,M,"¬","\\neg",!0);p(g,w,M,"¬","\\lnot");p(g,w,M,"⊤","\\top");p(g,w,M,"⊥","\\bot");p(g,w,M,"∅","\\emptyset");p(g,T,M,"∅","\\varnothing");p(g,w,be,"α","\\alpha",!0);p(g,w,be,"β","\\beta",!0);p(g,w,be,"γ","\\gamma",!0);p(g,w,be,"δ","\\delta",!0);p(g,w,be,"ϵ","\\epsilon",!0);p(g,w,be,"ζ","\\zeta",!0);p(g,w,be,"η","\\eta",!0);p(g,w,be,"θ","\\theta",!0);p(g,w,be,"ι","\\iota",!0);p(g,w,be,"κ","\\kappa",!0);p(g,w,be,"λ","\\lambda",!0);p(g,w,be,"μ","\\mu",!0);p(g,w,be,"ν","\\nu",!0);p(g,w,be,"ξ","\\xi",!0);p(g,w,be,"ο","\\omicron",!0);p(g,w,be,"π","\\pi",!0);p(g,w,be,"ρ","\\rho",!0);p(g,w,be,"σ","\\sigma",!0);p(g,w,be,"τ","\\tau",!0);p(g,w,be,"υ","\\upsilon",!0);p(g,w,be,"ϕ","\\phi",!0);p(g,w,be,"χ","\\chi",!0);p(g,w,be,"ψ","\\psi",!0);p(g,w,be,"ω","\\omega",!0);p(g,w,be,"ε","\\varepsilon",!0);p(g,w,be,"ϑ","\\vartheta",!0);p(g,w,be,"ϖ","\\varpi",!0);p(g,w,be,"ϱ","\\varrho",!0);p(g,w,be,"ς","\\varsigma",!0);p(g,w,be,"φ","\\varphi",!0);p(g,w,le,"∗","*",!0);p(g,w,le,"+","+");p(g,w,le,"−","-",!0);p(g,w,le,"⋅","\\cdot",!0);p(g,w,le,"∘","\\circ",!0);p(g,w,le,"÷","\\div",!0);p(g,w,le,"±","\\pm",!0);p(g,w,le,"×","\\times",!0);p(g,w,le,"∩","\\cap",!0);p(g,w,le,"∪","\\cup",!0);p(g,w,le,"∖","\\setminus",!0);p(g,w,le,"∧","\\land");p(g,w,le,"∨","\\lor");p(g,w,le,"∧","\\wedge",!0);p(g,w,le,"∨","\\vee",!0);p(g,w,M,"√","\\surd");p(g,w,zr,"⟨","\\langle",!0);p(g,w,zr,"∣","\\lvert");p(g,w,zr,"∥","\\lVert");p(g,w,hr,"?","?");p(g,w,hr,"!","!");p(g,w,hr,"⟩","\\rangle",!0);p(g,w,hr,"∣","\\rvert");p(g,w,hr,"∥","\\rVert");p(g,w,I,"=","=");p(g,w,I,":",":");p(g,w,I,"≈","\\approx",!0);p(g,w,I,"≅","\\cong",!0);p(g,w,I,"≥","\\ge");p(g,w,I,"≥","\\geq",!0);p(g,w,I,"←","\\gets");p(g,w,I,">","\\gt",!0);p(g,w,I,"∈","\\in",!0);p(g,w,I,"","\\@not");p(g,w,I,"⊂","\\subset",!0);p(g,w,I,"⊃","\\supset",!0);p(g,w,I,"⊆","\\subseteq",!0);p(g,w,I,"⊇","\\supseteq",!0);p(g,T,I,"⊈","\\nsubseteq",!0);p(g,T,I,"⊉","\\nsupseteq",!0);p(g,w,I,"⊨","\\models");p(g,w,I,"←","\\leftarrow",!0);p(g,w,I,"≤","\\le");p(g,w,I,"≤","\\leq",!0);p(g,w,I,"<","\\lt",!0);p(g,w,I,"→","\\rightarrow",!0);p(g,w,I,"→","\\to");p(g,T,I,"≱","\\ngeq",!0);p(g,T,I,"≰","\\nleq",!0);p(g,w,ci," ","\\ ");p(g,w,ci," ","\\space");p(g,w,ci," ","\\nobreakspace");p(q,w,ci," ","\\ ");p(q,w,ci," "," ");p(q,w,ci," ","\\space");p(q,w,ci," ","\\nobreakspace");p(g,w,ci,null,"\\nobreak");p(g,w,ci,null,"\\allowbreak");p(g,w,Ph,",",",");p(g,w,Ph,";",";");p(g,T,le,"⊼","\\barwedge",!0);p(g,T,le,"⊻","\\veebar",!0);p(g,w,le,"⊙","\\odot",!0);p(g,w,le,"⊕","\\oplus",!0);p(g,w,le,"⊗","\\otimes",!0);p(g,w,M,"∂","\\partial",!0);p(g,w,le,"⊘","\\oslash",!0);p(g,T,le,"⊚","\\circledcirc",!0);p(g,T,le,"⊡","\\boxdot",!0);p(g,w,le,"△","\\bigtriangleup");p(g,w,le,"▽","\\bigtriangledown");p(g,w,le,"†","\\dagger");p(g,w,le,"⋄","\\diamond");p(g,w,le,"⋆","\\star");p(g,w,le,"◃","\\triangleleft");p(g,w,le,"▹","\\triangleright");p(g,w,zr,"{","\\{");p(q,w,M,"{","\\{");p(q,w,M,"{","\\textbraceleft");p(g,w,hr,"}","\\}");p(q,w,M,"}","\\}");p(q,w,M,"}","\\textbraceright");p(g,w,zr,"{","\\lbrace");p(g,w,hr,"}","\\rbrace");p(g,w,zr,"[","\\lbrack",!0);p(q,w,M,"[","\\lbrack",!0);p(g,w,hr,"]","\\rbrack",!0);p(q,w,M,"]","\\rbrack",!0);p(g,w,zr,"(","\\lparen",!0);p(g,w,hr,")","\\rparen",!0);p(q,w,M,"<","\\textless",!0);p(q,w,M,">","\\textgreater",!0);p(g,w,zr,"⌊","\\lfloor",!0);p(g,w,hr,"⌋","\\rfloor",!0);p(g,w,zr,"⌈","\\lceil",!0);p(g,w,hr,"⌉","\\rceil",!0);p(g,w,M,"\\","\\backslash");p(g,w,M,"∣","|");p(g,w,M,"∣","\\vert");p(q,w,M,"|","\\textbar",!0);p(g,w,M,"∥","\\|");p(g,w,M,"∥","\\Vert");p(q,w,M,"∥","\\textbardbl");p(q,w,M,"~","\\textasciitilde");p(q,w,M,"\\","\\textbackslash");p(q,w,M,"^","\\textasciicircum");p(g,w,I,"↑","\\uparrow",!0);p(g,w,I,"⇑","\\Uparrow",!0);p(g,w,I,"↓","\\downarrow",!0);p(g,w,I,"⇓","\\Downarrow",!0);p(g,w,I,"↕","\\updownarrow",!0);p(g,w,I,"⇕","\\Updownarrow",!0);p(g,w,Dt,"∐","\\coprod");p(g,w,Dt,"⋁","\\bigvee");p(g,w,Dt,"⋀","\\bigwedge");p(g,w,Dt,"⨄","\\biguplus");p(g,w,Dt,"⋂","\\bigcap");p(g,w,Dt,"⋃","\\bigcup");p(g,w,Dt,"∫","\\int");p(g,w,Dt,"∫","\\intop");p(g,w,Dt,"∬","\\iint");p(g,w,Dt,"∭","\\iiint");p(g,w,Dt,"∏","\\prod");p(g,w,Dt,"∑","\\sum");p(g,w,Dt,"⨂","\\bigotimes");p(g,w,Dt,"⨁","\\bigoplus");p(g,w,Dt,"⨀","\\bigodot");p(g,w,Dt,"∮","\\oint");p(g,w,Dt,"∯","\\oiint");p(g,w,Dt,"∰","\\oiiint");p(g,w,Dt,"⨆","\\bigsqcup");p(g,w,Dt,"∫","\\smallint");p(q,w,Go,"…","\\textellipsis");p(g,w,Go,"…","\\mathellipsis");p(q,w,Go,"…","\\ldots",!0);p(g,w,Go,"…","\\ldots",!0);p(g,w,Go,"⋯","\\@cdots",!0);p(g,w,Go,"⋱","\\ddots",!0);p(g,w,M,"⋮","\\varvdots");p(g,w,ht,"ˊ","\\acute");p(g,w,ht,"ˋ","\\grave");p(g,w,ht,"¨","\\ddot");p(g,w,ht,"~","\\tilde");p(g,w,ht,"ˉ","\\bar");p(g,w,ht,"˘","\\breve");p(g,w,ht,"ˇ","\\check");p(g,w,ht,"^","\\hat");p(g,w,ht,"⃗","\\vec");p(g,w,ht,"˙","\\dot");p(g,w,ht,"˚","\\mathring");p(g,w,be,"","\\@imath");p(g,w,be,"","\\@jmath");p(g,w,M,"ı","ı");p(g,w,M,"ȷ","ȷ");p(q,w,M,"ı","\\i",!0);p(q,w,M,"ȷ","\\j",!0);p(q,w,M,"ß","\\ss",!0);p(q,w,M,"æ","\\ae",!0);p(q,w,M,"œ","\\oe",!0);p(q,w,M,"ø","\\o",!0);p(q,w,M,"Æ","\\AE",!0);p(q,w,M,"Œ","\\OE",!0);p(q,w,M,"Ø","\\O",!0);p(q,w,ht,"ˊ","\\'");p(q,w,ht,"ˋ","\\`");p(q,w,ht,"ˆ","\\^");p(q,w,ht,"˜","\\~");p(q,w,ht,"ˉ","\\=");p(q,w,ht,"˘","\\u");p(q,w,ht,"˙","\\.");p(q,w,ht,"¸","\\c");p(q,w,ht,"˚","\\r");p(q,w,ht,"ˇ","\\v");p(q,w,ht,"¨",'\\"');p(q,w,ht,"˝","\\H");p(q,w,ht,"◯","\\textcircled");var J7={"--":!0,"---":!0,"``":!0,"''":!0};p(q,w,M,"–","--",!0);p(q,w,M,"–","\\textendash");p(q,w,M,"—","---",!0);p(q,w,M,"—","\\textemdash");p(q,w,M,"‘","`",!0);p(q,w,M,"‘","\\textquoteleft");p(q,w,M,"’","'",!0);p(q,w,M,"’","\\textquoteright");p(q,w,M,"“","``",!0);p(q,w,M,"“","\\textquotedblleft");p(q,w,M,"”","''",!0);p(q,w,M,"”","\\textquotedblright");p(g,w,M,"°","\\degree",!0);p(q,w,M,"°","\\degree");p(q,w,M,"°","\\textdegree",!0);p(g,w,M,"£","\\pounds");p(g,w,M,"£","\\mathsterling",!0);p(q,w,M,"£","\\pounds");p(q,w,M,"£","\\textsterling",!0);p(g,T,M,"✠","\\maltese");p(q,T,M,"✠","\\maltese");var Ry='0123456789/@."';for(var nd=0;nd0)return ln(a,u,i,e,o.concat(c));if(l){var h,d;if(l==="boldsymbol"){var f=LD(a,i,e,o,n);h=f.fontName,d=[f.fontClass]}else s?(h=e$[l].fontName,d=[l]):(h=Pu(l,e.fontWeight,e.fontShape),d=[l,e.fontWeight,e.fontShape]);if(Ah(a,h,i).metrics)return ln(a,h,i,e,o.concat(d));if(J7.hasOwnProperty(a)&&h.slice(0,10)==="Typewriter"){for(var v=[],m=0;m{if(Ni(t.classes)!==Ni(r.classes)||t.skew!==r.skew||t.maxFontSize!==r.maxFontSize)return!1;if(t.classes.length===1){var e=t.classes[0];if(e==="mbin"||e==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==r.style[n])return!1;for(var i in r.style)if(r.style.hasOwnProperty(i)&&t.style[i]!==r.style[i])return!1;return!0},WD=t=>{for(var r=0;re&&(e=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>i&&(i=o.maxFontSize)}r.height=e,r.depth=n,r.maxFontSize=i},gr=function(r,e,n,i){var a=new _l(r,e,n,i);return Fm(a),a},Z7=(t,r,e,n)=>new _l(t,r,e,n),qD=function(r,e,n){var i=gr([r],[],e);return i.height=Math.max(n||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),i.style.borderBottomWidth=ee(i.height),i.maxFontSize=1,i},UD=function(r,e,n,i){var a=new Rm(r,e,n,i);return Fm(a),a},Q7=function(r){var e=new Tl(r);return Fm(e),e},VD=function(r,e){return r instanceof Tl?gr([],[r],e):r},GD=function(r){if(r.positionType==="individualShift"){for(var e=r.children,n=[e[0]],i=-e[0].shift-e[0].elem.depth,a=i,o=1;o{var e=gr(["mspace"],[],r),n=pt(t,r);return e.style.marginRight=ee(n),e},Pu=function(r,e,n){var i="";switch(r){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=r}var a;return e==="textbf"&&n==="textit"?a="BoldItalic":e==="textbf"?a="Bold":e==="textit"?a="Italic":a="Regular",i+"-"+a},e$={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"}},t$={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},XD=function(r,e){var[n,i,a]=t$[r],o=new Ri(n),s=new ri([o],{width:ee(i),height:ee(a),style:"width:"+ee(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=Z7(["overlay"],[s],e);return l.height=a,l.style.height=ee(a),l.style.width=ee(i),l},N={fontMap:e$,makeSymbol:ln,mathsym:BD,makeSpan:gr,makeSvgSpan:Z7,makeLineSpan:qD,makeAnchor:UD,makeFragment:Q7,wrapFragment:VD,makeVList:KD,makeOrd:jD,makeGlue:YD,staticSvg:XD,svgData:t$,tryCombineChars:WD},vt={number:3,unit:"mu"},ra={number:4,unit:"mu"},Hn={number:5,unit:"mu"},JD={mord:{mop:vt,mbin:ra,mrel:Hn,minner:vt},mop:{mord:vt,mop:vt,mrel:Hn,minner:vt},mbin:{mord:ra,mop:ra,mopen:ra,minner:ra},mrel:{mord:Hn,mop:Hn,mopen:Hn,minner:Hn},mopen:{},mclose:{mop:vt,mbin:ra,mrel:Hn,minner:vt},mpunct:{mord:vt,mop:vt,mrel:Hn,mopen:vt,mclose:vt,mpunct:vt,minner:vt},minner:{mord:vt,mop:vt,mbin:ra,mrel:Hn,mopen:vt,mpunct:vt,minner:vt}},ZD={mord:{mop:vt},mop:{mord:vt,mop:vt},mbin:{},mrel:{},mopen:{},mclose:{mop:vt},mpunct:{},minner:{mop:vt}},r$={},Xc={},Jc={};function oe(t){for(var{type:r,names:e,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=t,s={type:r,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l{var b=m.classes[0],y=v.classes[0];b==="mbin"&&ge.contains(eN,y)?m.classes[0]="mord":y==="mbin"&&ge.contains(QD,b)&&(v.classes[0]="mord")},{node:h},d,f),jy(a,(v,m)=>{var b=Gv(m),y=Gv(v),$=b&&y?v.hasClass("mtight")?ZD[b][y]:JD[b][y]:null;if($)return N.makeGlue($,u)},{node:h},d,f),a},jy=function t(r,e,n,i,a){i&&r.push(i);for(var o=0;od=>{r.splice(h+1,0,d),o++})(o)}i&&r.pop()},n$=function(r){return r instanceof Tl||r instanceof Rm||r instanceof _l&&r.hasClass("enclosing")?r:null},nN=function t(r,e){var n=n$(r);if(n){var i=n.children;if(i.length){if(e==="right")return t(i[i.length-1],"right");if(e==="left")return t(i[0],"left")}}return r},Gv=function(r,e){return r?(e&&(r=nN(r,e)),rN[r.classes[0]]||null):null},il=function(r,e){var n=["nulldelimiter"].concat(r.baseSizingClasses());return ni(e.concat(n))},Be=function(r,e,n){if(!r)return ni();if(Xc[r.type]){var i=Xc[r.type](r,e);if(n&&e.size!==n.size){i=ni(e.sizingClasses(n),[i],e);var a=e.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new K("Got group of unknown type: '"+r.type+"'")};function Au(t,r){var e=ni(["base"],t,r),n=ni(["strut"]);return n.style.height=ee(e.height+e.depth),e.depth&&(n.style.verticalAlign=ee(-e.depth)),e.children.unshift(n),e}function Kv(t,r){var e=null;t.length===1&&t[0].type==="tag"&&(e=t[0].tag,t=t[0].body);var n=Ft(t,r,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var a=[],o=[],s=0;s0&&(a.push(Au(o,r)),o=[]),a.push(n[s]));o.length>0&&a.push(Au(o,r));var u;e?(u=Au(Ft(e,r,!0)),u.classes=["tag"],a.push(u)):i&&a.push(i);var c=ni(["katex-html"],a);if(c.setAttribute("aria-hidden","true"),u){var h=u.children[0];h.style.height=ee(c.height+c.depth),c.depth&&(h.style.verticalAlign=ee(-c.depth))}return c}function i$(t){return new Tl(t)}class Gr{constructor(r,e,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=r,this.attributes={},this.children=e||[],this.classes=n||[]}setAttribute(r,e){this.attributes[r]=e}getAttribute(r){return this.attributes[r]}toNode(){var r=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&r.setAttribute(e,this.attributes[e]);this.classes.length>0&&(r.className=Ni(this.classes));for(var n=0;n0&&(r+=' class ="'+ge.escape(Ni(this.classes))+'"'),r+=">";for(var n=0;n",r}toText(){return this.children.map(r=>r.toText()).join("")}}class js{constructor(r){this.text=void 0,this.text=r}toNode(){return document.createTextNode(this.text)}toMarkup(){return ge.escape(this.toText())}toText(){return this.text}}class iN{constructor(r){this.width=void 0,this.character=void 0,this.width=r,r>=.05555&&r<=.05556?this.character=" ":r>=.1666&&r<=.1667?this.character=" ":r>=.2222&&r<=.2223?this.character=" ":r>=.2777&&r<=.2778?this.character="  ":r>=-.05556&&r<=-.05555?this.character=" ⁣":r>=-.1667&&r<=-.1666?this.character=" ⁣":r>=-.2223&&r<=-.2222?this.character=" ⁣":r>=-.2778&&r<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var r=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return r.setAttribute("width",ee(this.width)),r}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var U={MathNode:Gr,TextNode:js,SpaceNode:iN,newDocumentFragment:i$},en=function(r,e,n){return ut[e][r]&&ut[e][r].replace&&r.charCodeAt(0)!==55349&&!(J7.hasOwnProperty(r)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(r=ut[e][r].replace),new U.TextNode(r)},zm=function(r){return r.length===1?r[0]:new U.MathNode("mrow",r)},Bm=function(r,e){if(e.fontFamily==="texttt")return"monospace";if(e.fontFamily==="textsf")return e.fontShape==="textit"&&e.fontWeight==="textbf"?"sans-serif-bold-italic":e.fontShape==="textit"?"sans-serif-italic":e.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(e.fontShape==="textit"&&e.fontWeight==="textbf")return"bold-italic";if(e.fontShape==="textit")return"italic";if(e.fontWeight==="textbf")return"bold";var n=e.font;if(!n||n==="mathnormal")return null;var i=r.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return r.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=r.text;if(ge.contains(["\\imath","\\jmath"],a))return null;ut[i][a]&&ut[i][a].replace&&(a=ut[i][a].replace);var o=N.fontMap[n].fontName;return Nm(a,o,i)?N.fontMap[n].variant:null},Tr=function(r,e,n){if(r.length===1){var i=nt(r[0],e);return n&&i instanceof Gr&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],o,s=0;s0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(l),o=l}return a},Fi=function(r,e,n){return zm(Tr(r,e,n))},nt=function(r,e){if(!r)return new U.MathNode("mrow");if(Jc[r.type]){var n=Jc[r.type](r,e);return n}else throw new K("Got group of unknown type: '"+r.type+"'")};function Hy(t,r,e,n,i){var a=Tr(t,e),o;a.length===1&&a[0]instanceof Gr&&ge.contains(["mrow","mtable"],a[0].type)?o=a[0]:o=new U.MathNode("mrow",a);var s=new U.MathNode("annotation",[new U.TextNode(r)]);s.setAttribute("encoding","application/x-tex");var l=new U.MathNode("semantics",[o,s]),u=new U.MathNode("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var c=i?"katex":"katex-mathml";return N.makeSpan([c],[u])}var a$=function(r){return new Wn({style:r.displayMode?we.DISPLAY:we.TEXT,maxSize:r.maxSize,minRuleThickness:r.minRuleThickness})},o$=function(r,e){if(e.displayMode){var n=["katex-display"];e.leqno&&n.push("leqno"),e.fleqn&&n.push("fleqn"),r=N.makeSpan(n,[r])}return r},aN=function(r,e,n){var i=a$(n),a;if(n.output==="mathml")return Hy(r,e,i,n.displayMode,!0);if(n.output==="html"){var o=Kv(r,i);a=N.makeSpan(["katex"],[o])}else{var s=Hy(r,e,i,n.displayMode,!1),l=Kv(r,i);a=N.makeSpan(["katex"],[s,l])}return o$(a,n)},oN=function(r,e,n){var i=a$(n),a=Kv(r,i),o=N.makeSpan(["katex"],[a]);return o$(o,n)},sN={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":"="},lN=function(r){var e=new U.MathNode("mo",[new U.TextNode(sN[r.replace(/^\\/,"")])]);return e.setAttribute("stretchy","true"),e},uN={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]},cN=function(r){return r.type==="ordgroup"?r.body.length:1},hN=function(r,e){function n(){var s=4e5,l=r.label.slice(1);if(ge.contains(["widehat","widecheck","widetilde","utilde"],l)){var u=r,c=cN(u.base),h,d,f;if(c>5)l==="widehat"||l==="widecheck"?(h=420,s=2364,f=.42,d=l+"4"):(h=312,s=2340,f=.34,d="tilde4");else{var v=[1,1,2,2,3,3][c];l==="widehat"||l==="widecheck"?(s=[0,1062,2364,2364,2364][v],h=[0,239,300,360,420][v],f=[0,.24,.3,.3,.36,.42][v],d=l+v):(s=[0,600,1033,2339,2340][v],h=[0,260,286,306,312][v],f=[0,.26,.286,.3,.306,.34][v],d="tilde"+v)}var m=new Ri(d),b=new ri([m],{width:"100%",height:ee(f),viewBox:"0 0 "+s+" "+h,preserveAspectRatio:"none"});return{span:N.makeSvgSpan([],[b],e),minWidth:0,height:f}}else{var y=[],$=uN[l],[k,O,P]=$,E=P/1e3,D=k.length,B,R;if(D===1){var A=$[3];B=["hide-tail"],R=[A]}else if(D===2)B=["halfarrow-left","halfarrow-right"],R=["xMinYMin","xMaxYMin"];else if(D===3)B=["brace-left","brace-center","brace-right"],R=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+D+" children.");for(var z=0;z0&&(i.style.minWidth=ee(a)),i},dN=function(r,e,n,i,a){var o,s=r.height+r.depth+n+i;if(/fbox|color|angl/.test(e)){if(o=N.makeSpan(["stretchy",e],[],a),e==="fbox"){var l=a.color&&a.getColor();l&&(o.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(e)&&u.push(new Uv({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&u.push(new Uv({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new ri(u,{width:"100%",height:ee(s)});o=N.makeSvgSpan([],[c],a)}return o.height=s,o.style.height=ee(s),o},ii={encloseSpan:dN,mathMLnode:lN,svgSpan:hN};function Pe(t,r){if(!t||t.type!==r)throw new Error("Expected node of type "+r+", but got "+(t?"node of type "+t.type:String(t)));return t}function Lm(t){var r=Mh(t);if(!r)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return r}function Mh(t){return t&&(t.type==="atom"||FD.hasOwnProperty(t.type))?t:null}var jm=(t,r)=>{var e,n,i;t&&t.type==="supsub"?(n=Pe(t.base,"accent"),e=n.base,t.base=e,i=ND(Be(t,r)),t.base=n):(n=Pe(t,"accent"),e=n.base);var a=Be(e,r.havingCrampedStyle()),o=n.isShifty&&ge.isCharacterBox(e),s=0;if(o){var l=ge.getBaseElem(e),u=Be(l,r.havingCrampedStyle());s=Ny(u).skew}var c=n.label==="\\c",h=c?a.height+a.depth:Math.min(a.height,r.fontMetrics().xHeight),d;if(n.isStretchy)d=ii.svgSpan(n,r),d=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+ee(2*s)+")",marginLeft:ee(2*s)}:void 0}]},r);else{var f,v;n.label==="\\vec"?(f=N.staticSvg("vec",r),v=N.svgData.vec[1]):(f=N.makeOrd({mode:n.mode,text:n.label},r,"textord"),f=Ny(f),f.italic=0,v=f.width,c&&(h+=f.depth)),d=N.makeSpan(["accent-body"],[f]);var m=n.label==="\\textcircled";m&&(d.classes.push("accent-full"),h=a.height);var b=s;m||(b-=v/2),d.style.left=ee(b),n.label==="\\textcircled"&&(d.style.top=".2em"),d=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-h},{type:"elem",elem:d}]},r)}var y=N.makeSpan(["mord","accent"],[d],r);return i?(i.children[0]=y,i.height=Math.max(y.height,i.height),i.classes[0]="mord",i):y},s$=(t,r)=>{var e=t.isStretchy?ii.mathMLnode(t.label):new U.MathNode("mo",[en(t.label,t.mode)]),n=new U.MathNode("mover",[nt(t.base,r),e]);return n.setAttribute("accent","true"),n},fN=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));oe({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:(t,r)=>{var e=Zc(r[0]),n=!fN.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:e}},htmlBuilder:jm,mathmlBuilder:s$});oe({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,r)=>{var e=r[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:e}},htmlBuilder:jm,mathmlBuilder:s$});oe({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=r[0];return{type:"accentUnder",mode:e.mode,label:n,base:i}},htmlBuilder:(t,r)=>{var e=Be(t.base,r),n=ii.svgSpan(t,r),i=t.label==="\\utilde"?.12:0,a=N.makeVList({positionType:"top",positionData:e.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:e}]},r);return N.makeSpan(["mord","accentunder"],[a],r)},mathmlBuilder:(t,r)=>{var e=ii.mathMLnode(t.label),n=new U.MathNode("munder",[nt(t.base,r),e]);return n.setAttribute("accentunder","true"),n}});var Mu=t=>{var r=new U.MathNode("mpadded",t?[t]:[]);return r.setAttribute("width","+0.6em"),r.setAttribute("lspace","0.3em"),r};oe({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(t,r,e){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:r[0],below:e[0]}},htmlBuilder(t,r){var e=r.style,n=r.havingStyle(e.sup()),i=N.wrapFragment(Be(t.body,n,r),r),a=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var o;t.below&&(n=r.havingStyle(e.sub()),o=N.wrapFragment(Be(t.below,n,r),r),o.classes.push(a+"-arrow-pad"));var s=ii.svgSpan(t,r),l=-r.fontMetrics().axisHeight+.5*s.height,u=-r.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(u-=i.depth);var c;if(o){var h=-r.fontMetrics().axisHeight+o.height+.5*s.height+.111;c=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:s,shift:l},{type:"elem",elem:o,shift:h}]},r)}else c=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:s,shift:l}]},r);return c.children[0].children[0].children[1].classes.push("svg-align"),N.makeSpan(["mrel","x-arrow"],[c],r)},mathmlBuilder(t,r){var e=ii.mathMLnode(t.label);e.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=Mu(nt(t.body,r));if(t.below){var a=Mu(nt(t.below,r));n=new U.MathNode("munderover",[e,a,i])}else n=new U.MathNode("mover",[e,i])}else if(t.below){var o=Mu(nt(t.below,r));n=new U.MathNode("munder",[e,o])}else n=Mu(),n=new U.MathNode("mover",[e,n]);return n}});var vN=N.makeSpan;function l$(t,r){var e=Ft(t.body,r,!0);return vN([t.mclass],e,r)}function u$(t,r){var e,n=Tr(t.body,r);return t.mclass==="minner"?e=new U.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(e=n[0],e.type="mi"):e=new U.MathNode("mi",n):(t.isCharacterBox?(e=n[0],e.type="mo"):e=new U.MathNode("mo",n),t.mclass==="mbin"?(e.attributes.lspace="0.22em",e.attributes.rspace="0.22em"):t.mclass==="mpunct"?(e.attributes.lspace="0em",e.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(e.attributes.lspace="0em",e.attributes.rspace="0em"):t.mclass==="minner"&&(e.attributes.lspace="0.0556em",e.attributes.width="+0.1111em")),e}oe({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,r){var{parser:e,funcName:n}=t,i=r[0];return{type:"mclass",mode:e.mode,mclass:"m"+n.slice(5),body:_t(i),isCharacterBox:ge.isCharacterBox(i)}},htmlBuilder:l$,mathmlBuilder:u$});var Dh=t=>{var r=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return r.type==="atom"&&(r.family==="bin"||r.family==="rel")?"m"+r.family:"mord"};oe({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,r){var{parser:e}=t;return{type:"mclass",mode:e.mode,mclass:Dh(r[0]),body:_t(r[1]),isCharacterBox:ge.isCharacterBox(r[1])}}});oe({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,r){var{parser:e,funcName:n}=t,i=r[1],a=r[0],o;n!=="\\stackrel"?o=Dh(i):o="mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:_t(i)},l={type:"supsub",mode:a.mode,base:s,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:e.mode,mclass:o,body:[l],isCharacterBox:ge.isCharacterBox(l)}},htmlBuilder:l$,mathmlBuilder:u$});oe({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,r){var{parser:e}=t;return{type:"pmb",mode:e.mode,mclass:Dh(r[0]),body:_t(r[0])}},htmlBuilder(t,r){var e=Ft(t.body,r,!0),n=N.makeSpan([t.mclass],e,r);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,r){var e=Tr(t.body,r),n=new U.MathNode("mstyle",e);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var pN={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Wy=()=>({type:"styling",body:[],mode:"math",style:"display"}),qy=t=>t.type==="textord"&&t.text==="@",mN=(t,r)=>(t.type==="mathord"||t.type==="atom")&&t.text===r;function gN(t,r,e){var n=pN[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return e.callFunction(n,[r[0]],[r[1]]);case"\\uparrow":case"\\downarrow":{var i=e.callFunction("\\\\cdleft",[r[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},o=e.callFunction("\\Big",[a],[]),s=e.callFunction("\\\\cdright",[r[1]],[]),l={type:"ordgroup",mode:"math",body:[i,o,s]};return e.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return e.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return e.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function yN(t){var r=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){r.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var e=t.fetch().text;if(e==="&"||e==="\\\\")t.consume();else if(e==="\\end"){r[r.length-1].length===0&&r.pop();break}else throw new K("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],i=[n],a=0;a-1))if("<>AV".indexOf(u)>-1)for(var h=0;h<2;h++){for(var d=!0,f=l+1;fAV=|." after @',o[l]);var v=gN(u,c,t),m={type:"styling",body:[v],mode:"math",style:"display"};n.push(m),s=Wy()}a%2===0?n.push(s):n.shift(),n=[],i.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var b=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:b,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}oe({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,r){var{parser:e,funcName:n}=t;return{type:"cdlabel",mode:e.mode,side:n.slice(4),label:r[0]}},htmlBuilder(t,r){var e=r.havingStyle(r.style.sup()),n=N.wrapFragment(Be(t.label,e,r),r);return n.classes.push("cd-label-"+t.side),n.style.bottom=ee(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,r){var e=new U.MathNode("mrow",[nt(t.label,r)]);return e=new U.MathNode("mpadded",[e]),e.setAttribute("width","0"),t.side==="left"&&e.setAttribute("lspace","-1width"),e.setAttribute("voffset","0.7em"),e=new U.MathNode("mstyle",[e]),e.setAttribute("displaystyle","false"),e.setAttribute("scriptlevel","1"),e}});oe({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,r){var{parser:e}=t;return{type:"cdlabelparent",mode:e.mode,fragment:r[0]}},htmlBuilder(t,r){var e=N.wrapFragment(Be(t.fragment,r),r);return e.classes.push("cd-vert-arrow"),e},mathmlBuilder(t,r){return new U.MathNode("mrow",[nt(t.fragment,r)])}});oe({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,r){for(var{parser:e}=t,n=Pe(r[0],"ordgroup"),i=n.body,a="",o=0;o=1114111)throw new K("\\@char with invalid code point "+a);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:e.mode,text:u}}});var c$=(t,r)=>{var e=Ft(t.body,r.withColor(t.color),!1);return N.makeFragment(e)},h$=(t,r)=>{var e=Tr(t.body,r.withColor(t.color)),n=new U.MathNode("mstyle",e);return n.setAttribute("mathcolor",t.color),n};oe({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,r){var{parser:e}=t,n=Pe(r[0],"color-token").color,i=r[1];return{type:"color",mode:e.mode,color:n,body:_t(i)}},htmlBuilder:c$,mathmlBuilder:h$});oe({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,r){var{parser:e,breakOnTokenText:n}=t,i=Pe(r[0],"color-token").color;e.gullet.macros.set("\\current@color",i);var a=e.parseExpression(!0,n);return{type:"color",mode:e.mode,color:i,body:a}},htmlBuilder:c$,mathmlBuilder:h$});oe({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,r,e){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&Pe(i,"size").value}},htmlBuilder(t,r){var e=N.makeSpan(["mspace"],[],r);return t.newLine&&(e.classes.push("newline"),t.size&&(e.style.marginTop=ee(pt(t.size,r)))),e},mathmlBuilder(t,r){var e=new U.MathNode("mspace");return t.newLine&&(e.setAttribute("linebreak","newline"),t.size&&e.setAttribute("height",ee(pt(t.size,r)))),e}});var Yv={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},d$=t=>{var r=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new K("Expected a control sequence",t);return r},bN=t=>{var r=t.gullet.popToken();return r.text==="="&&(r=t.gullet.popToken(),r.text===" "&&(r=t.gullet.popToken())),r},f$=(t,r,e,n)=>{var i=t.gullet.macros.get(e.text);i==null&&(e.noexpand=!0,i={tokens:[e],numArgs:0,unexpandable:!t.gullet.isExpandable(e.text)}),t.gullet.macros.set(r,i,n)};oe({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:r,funcName:e}=t;r.consumeSpaces();var n=r.fetch();if(Yv[n.text])return(e==="\\global"||e==="\\\\globallong")&&(n.text=Yv[n.text]),Pe(r.parseFunction(),"internal");throw new K("Invalid token after macro prefix",n)}});oe({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:r,funcName:e}=t,n=r.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new K("Expected a control sequence",n);for(var a=0,o,s=[[]];r.gullet.future().text!=="{";)if(n=r.gullet.popToken(),n.text==="#"){if(r.gullet.future().text==="{"){o=r.gullet.future(),s[a].push("{");break}if(n=r.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new K('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new K('Argument number "'+n.text+'" out of order');a++,s.push([])}else{if(n.text==="EOF")throw new K("Expected a macro definition");s[a].push(n.text)}var{tokens:l}=r.gullet.consumeArg();return o&&l.unshift(o),(e==="\\edef"||e==="\\xdef")&&(l=r.gullet.expandTokens(l),l.reverse()),r.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:s},e===Yv[e]),{type:"internal",mode:r.mode}}});oe({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:r,funcName:e}=t,n=d$(r.gullet.popToken());r.gullet.consumeSpaces();var i=bN(r);return f$(r,n,i,e==="\\\\globallet"),{type:"internal",mode:r.mode}}});oe({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:r,funcName:e}=t,n=d$(r.gullet.popToken()),i=r.gullet.popToken(),a=r.gullet.popToken();return f$(r,n,a,e==="\\\\globalfuture"),r.gullet.pushToken(a),r.gullet.pushToken(i),{type:"internal",mode:r.mode}}});var Ds=function(r,e,n){var i=ut.math[r]&&ut.math[r].replace,a=Nm(i||r,e,n);if(!a)throw new Error("Unsupported symbol "+r+" and font size "+e+".");return a},Hm=function(r,e,n,i){var a=n.havingBaseStyle(e),o=N.makeSpan(i.concat(a.sizingClasses(n)),[r],n),s=a.sizeMultiplier/n.sizeMultiplier;return o.height*=s,o.depth*=s,o.maxFontSize=a.sizeMultiplier,o},v$=function(r,e,n){var i=e.havingBaseStyle(n),a=(1-e.sizeMultiplier/i.sizeMultiplier)*e.fontMetrics().axisHeight;r.classes.push("delimcenter"),r.style.top=ee(a),r.height-=a,r.depth+=a},wN=function(r,e,n,i,a,o){var s=N.makeSymbol(r,"Main-Regular",a,i),l=Hm(s,e,i,o);return n&&v$(l,i,e),l},$N=function(r,e,n,i){return N.makeSymbol(r,"Size"+e+"-Regular",n,i)},p$=function(r,e,n,i,a,o){var s=$N(r,e,a,i),l=Hm(N.makeSpan(["delimsizing","size"+e],[s],i),we.TEXT,i,o);return n&&v$(l,i,we.TEXT),l},sd=function(r,e,n){var i;e==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=N.makeSpan(["delimsizinginner",i],[N.makeSpan([],[N.makeSymbol(r,e,n)])]);return{type:"elem",elem:a}},ld=function(r,e,n){var i=En["Size4-Regular"][r.charCodeAt(0)]?En["Size4-Regular"][r.charCodeAt(0)][4]:En["Size1-Regular"][r.charCodeAt(0)][4],a=new Ri("inner",_D(r,Math.round(1e3*e))),o=new ri([a],{width:ee(i),height:ee(e),style:"width:"+ee(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"}),s=N.makeSvgSpan([],[o],n);return s.height=e,s.style.height=ee(e),s.style.width=ee(i),{type:"elem",elem:s}},Xv=.008,Du={type:"kern",size:-1*Xv},xN=["|","\\lvert","\\rvert","\\vert"],kN=["\\|","\\lVert","\\rVert","\\Vert"],m$=function(r,e,n,i,a,o){var s,l,u,c,h="",d=0;s=u=c=r,l=null;var f="Size1-Regular";r==="\\uparrow"?u=c="⏐":r==="\\Uparrow"?u=c="‖":r==="\\downarrow"?s=u="⏐":r==="\\Downarrow"?s=u="‖":r==="\\updownarrow"?(s="\\uparrow",u="⏐",c="\\downarrow"):r==="\\Updownarrow"?(s="\\Uparrow",u="‖",c="\\Downarrow"):ge.contains(xN,r)?(u="∣",h="vert",d=333):ge.contains(kN,r)?(u="∥",h="doublevert",d=556):r==="["||r==="\\lbrack"?(s="⎡",u="⎢",c="⎣",f="Size4-Regular",h="lbrack",d=667):r==="]"||r==="\\rbrack"?(s="⎤",u="⎥",c="⎦",f="Size4-Regular",h="rbrack",d=667):r==="\\lfloor"||r==="⌊"?(u=s="⎢",c="⎣",f="Size4-Regular",h="lfloor",d=667):r==="\\lceil"||r==="⌈"?(s="⎡",u=c="⎢",f="Size4-Regular",h="lceil",d=667):r==="\\rfloor"||r==="⌋"?(u=s="⎥",c="⎦",f="Size4-Regular",h="rfloor",d=667):r==="\\rceil"||r==="⌉"?(s="⎤",u=c="⎥",f="Size4-Regular",h="rceil",d=667):r==="("||r==="\\lparen"?(s="⎛",u="⎜",c="⎝",f="Size4-Regular",h="lparen",d=875):r===")"||r==="\\rparen"?(s="⎞",u="⎟",c="⎠",f="Size4-Regular",h="rparen",d=875):r==="\\{"||r==="\\lbrace"?(s="⎧",l="⎨",c="⎩",u="⎪",f="Size4-Regular"):r==="\\}"||r==="\\rbrace"?(s="⎫",l="⎬",c="⎭",u="⎪",f="Size4-Regular"):r==="\\lgroup"||r==="⟮"?(s="⎧",c="⎩",u="⎪",f="Size4-Regular"):r==="\\rgroup"||r==="⟯"?(s="⎫",c="⎭",u="⎪",f="Size4-Regular"):r==="\\lmoustache"||r==="⎰"?(s="⎧",c="⎭",u="⎪",f="Size4-Regular"):(r==="\\rmoustache"||r==="⎱")&&(s="⎫",c="⎩",u="⎪",f="Size4-Regular");var v=Ds(s,f,a),m=v.height+v.depth,b=Ds(u,f,a),y=b.height+b.depth,$=Ds(c,f,a),k=$.height+$.depth,O=0,P=1;if(l!==null){var E=Ds(l,f,a);O=E.height+E.depth,P=2}var D=m+k+O,B=Math.max(0,Math.ceil((e-D)/(P*y))),R=D+B*P*y,A=i.fontMetrics().axisHeight;n&&(A*=i.sizeMultiplier);var z=R/2-A,L=[];if(h.length>0){var J=R-m-k,ne=Math.round(R*1e3),ae=OD(h,Math.round(J*1e3)),me=new Ri(h,ae),Ie=(d/1e3).toFixed(3)+"em",Re=(ne/1e3).toFixed(3)+"em",Le=new ri([me],{width:Ie,height:Re,viewBox:"0 0 "+d+" "+ne}),S=N.makeSvgSpan([],[Le],i);S.height=ne/1e3,S.style.width=Ie,S.style.height=Re,L.push({type:"elem",elem:S})}else{if(L.push(sd(c,f,a)),L.push(Du),l===null){var se=R-m-k+2*Xv;L.push(ld(u,se,i))}else{var ue=(R-m-k-O)/2+2*Xv;L.push(ld(u,ue,i)),L.push(Du),L.push(sd(l,f,a)),L.push(Du),L.push(ld(u,ue,i))}L.push(Du),L.push(sd(s,f,a))}var _=i.havingBaseStyle(we.TEXT),_e=N.makeVList({positionType:"bottom",positionData:z,children:L},_);return Hm(N.makeSpan(["delimsizing","mult"],[_e],_),we.TEXT,i,o)},ud=80,cd=.08,hd=function(r,e,n,i,a){var o=TD(r,i,n),s=new Ri(r,o),l=new ri([s],{width:"400em",height:ee(e),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return N.makeSvgSpan(["hide-tail"],[l],a)},SN=function(r,e){var n=e.havingBaseSizing(),i=w$("\\surd",r*n.sizeMultiplier,b$,n),a=n.sizeMultiplier,o=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness),s,l=0,u=0,c=0,h;return i.type==="small"?(c=1e3+1e3*o+ud,r<1?a=1:r<1.4&&(a=.7),l=(1+o+cd)/a,u=(1+o)/a,s=hd("sqrtMain",l,c,o,e),s.style.minWidth="0.853em",h=.833/a):i.type==="large"?(c=(1e3+ud)*Hs[i.size],u=(Hs[i.size]+o)/a,l=(Hs[i.size]+o+cd)/a,s=hd("sqrtSize"+i.size,l,c,o,e),s.style.minWidth="1.02em",h=1/a):(l=r+o+cd,u=r+o,c=Math.floor(1e3*r+o)+ud,s=hd("sqrtTall",l,c,o,e),s.style.minWidth="0.742em",h=1.056),s.height=u,s.style.height=ee(l),{span:s,advanceWidth:h,ruleWidth:(e.fontMetrics().sqrtRuleThickness+o)*a}},g$=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],EN=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],y$=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Hs=[0,1.2,1.8,2.4,3],TN=function(r,e,n,i,a){if(r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle"),ge.contains(g$,r)||ge.contains(y$,r))return p$(r,e,!1,n,i,a);if(ge.contains(EN,r))return m$(r,Hs[e],!1,n,i,a);throw new K("Illegal delimiter: '"+r+"'")},_N=[{type:"small",style:we.SCRIPTSCRIPT},{type:"small",style:we.SCRIPT},{type:"small",style:we.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ON=[{type:"small",style:we.SCRIPTSCRIPT},{type:"small",style:we.SCRIPT},{type:"small",style:we.TEXT},{type:"stack"}],b$=[{type:"small",style:we.SCRIPTSCRIPT},{type:"small",style:we.SCRIPT},{type:"small",style:we.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],IN=function(r){if(r.type==="small")return"Main-Regular";if(r.type==="large")return"Size"+r.size+"-Regular";if(r.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+r.type+"' here.")},w$=function(r,e,n,i){for(var a=Math.min(2,3-i.style.size),o=a;oe)return n[o]}return n[n.length-1]},$$=function(r,e,n,i,a,o){r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle");var s;ge.contains(y$,r)?s=_N:ge.contains(g$,r)?s=b$:s=ON;var l=w$(r,e,s,i);return l.type==="small"?wN(r,l.style,n,i,a,o):l.type==="large"?p$(r,l.size,n,i,a,o):m$(r,e,n,i,a,o)},CN=function(r,e,n,i,a,o){var s=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,u=5/i.fontMetrics().ptPerEm,c=Math.max(e-s,n+s),h=Math.max(c/500*l,2*c-u);return $$(r,h,!0,i,a,o)},Vn={sqrtImage:SN,sizedDelim:TN,sizeToMaxHeight:Hs,customSizedDelim:$$,leftRightDelim:CN},Uy={"\\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}},PN=["(","\\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 Nh(t,r){var e=Mh(t);if(e&&ge.contains(PN,e.text))return e;throw e?new K("Invalid delimiter '"+e.text+"' after '"+r.funcName+"'",t):new K("Invalid delimiter type '"+t.type+"'",t)}oe({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:(t,r)=>{var e=Nh(r[0],t);return{type:"delimsizing",mode:t.parser.mode,size:Uy[t.funcName].size,mclass:Uy[t.funcName].mclass,delim:e.text}},htmlBuilder:(t,r)=>t.delim==="."?N.makeSpan([t.mclass]):Vn.sizedDelim(t.delim,t.size,r,t.mode,[t.mclass]),mathmlBuilder:t=>{var r=[];t.delim!=="."&&r.push(en(t.delim,t.mode));var e=new U.MathNode("mo",r);t.mclass==="mopen"||t.mclass==="mclose"?e.setAttribute("fence","true"):e.setAttribute("fence","false"),e.setAttribute("stretchy","true");var n=ee(Vn.sizeToMaxHeight[t.size]);return e.setAttribute("minsize",n),e.setAttribute("maxsize",n),e}});function Vy(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}oe({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,r)=>{var e=t.parser.gullet.macros.get("\\current@color");if(e&&typeof e!="string")throw new K("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:Nh(r[0],t).text,color:e}}});oe({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,r)=>{var e=Nh(r[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=Pe(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:e.text,right:a.delim,rightColor:a.color}},htmlBuilder:(t,r)=>{Vy(t);for(var e=Ft(t.body,r,!0,["mopen","mclose"]),n=0,i=0,a=!1,o=0;o{Vy(t);var e=Tr(t.body,r);if(t.left!=="."){var n=new U.MathNode("mo",[en(t.left,t.mode)]);n.setAttribute("fence","true"),e.unshift(n)}if(t.right!=="."){var i=new U.MathNode("mo",[en(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),e.push(i)}return zm(e)}});oe({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,r)=>{var e=Nh(r[0],t);if(!t.parser.leftrightDepth)throw new K("\\middle without preceding \\left",e);return{type:"middle",mode:t.parser.mode,delim:e.text}},htmlBuilder:(t,r)=>{var e;if(t.delim===".")e=il(r,[]);else{e=Vn.sizedDelim(t.delim,1,r,t.mode,[]);var n={delim:t.delim,options:r};e.isMiddle=n}return e},mathmlBuilder:(t,r)=>{var e=t.delim==="\\vert"||t.delim==="|"?en("|","text"):en(t.delim,t.mode),n=new U.MathNode("mo",[e]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Wm=(t,r)=>{var e=N.wrapFragment(Be(t.body,r),r),n=t.label.slice(1),i=r.sizeMultiplier,a,o=0,s=ge.isCharacterBox(t.body);if(n==="sout")a=N.makeSpan(["stretchy","sout"]),a.height=r.fontMetrics().defaultRuleThickness/i,o=-.5*r.fontMetrics().xHeight;else if(n==="phase"){var l=pt({number:.6,unit:"pt"},r),u=pt({number:.35,unit:"ex"},r),c=r.havingBaseSizing();i=i/c.sizeMultiplier;var h=e.height+e.depth+l+u;e.style.paddingLeft=ee(h/2+l);var d=Math.floor(1e3*h*i),f=SD(d),v=new ri([new Ri("phase",f)],{width:"400em",height:ee(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});a=N.makeSvgSpan(["hide-tail"],[v],r),a.style.height=ee(h),o=e.depth+l+u}else{/cancel/.test(n)?s||e.classes.push("cancel-pad"):n==="angl"?e.classes.push("anglpad"):e.classes.push("boxpad");var m=0,b=0,y=0;/box/.test(n)?(y=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness),m=r.fontMetrics().fboxsep+(n==="colorbox"?0:y),b=m):n==="angl"?(y=Math.max(r.fontMetrics().defaultRuleThickness,r.minRuleThickness),m=4*y,b=Math.max(0,.25-e.depth)):(m=s?.2:0,b=m),a=ii.encloseSpan(e,n,m,b,r),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=ee(y)):n==="angl"&&y!==.049&&(a.style.borderTopWidth=ee(y),a.style.borderRightWidth=ee(y)),o=e.depth+b,t.backgroundColor&&(a.style.backgroundColor=t.backgroundColor,t.borderColor&&(a.style.borderColor=t.borderColor))}var $;if(t.backgroundColor)$=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:e,shift:0}]},r);else{var k=/cancel|phase/.test(n)?["svg-align"]:[];$=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:e,shift:0},{type:"elem",elem:a,shift:o,wrapperClasses:k}]},r)}return/cancel/.test(n)&&($.height=e.height,$.depth=e.depth),/cancel/.test(n)&&!s?N.makeSpan(["mord","cancel-lap"],[$],r):N.makeSpan(["mord"],[$],r)},qm=(t,r)=>{var e=0,n=new U.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[nt(t.body,r)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(e=r.fontMetrics().fboxsep*r.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*e+"pt"),n.setAttribute("height","+"+2*e+"pt"),n.setAttribute("lspace",e+"pt"),n.setAttribute("voffset",e+"pt"),t.label==="\\fcolorbox"){var i=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};oe({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,r,e){var{parser:n,funcName:i}=t,a=Pe(r[0],"color-token").color,o=r[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:Wm,mathmlBuilder:qm});oe({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,r,e){var{parser:n,funcName:i}=t,a=Pe(r[0],"color-token").color,o=Pe(r[1],"color-token").color,s=r[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:Wm,mathmlBuilder:qm});oe({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,r){var{parser:e}=t;return{type:"enclose",mode:e.mode,label:"\\fbox",body:r[0]}}});oe({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,r){var{parser:e,funcName:n}=t,i=r[0];return{type:"enclose",mode:e.mode,label:n,body:i}},htmlBuilder:Wm,mathmlBuilder:qm});oe({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,r){var{parser:e}=t;return{type:"enclose",mode:e.mode,label:"\\angl",body:r[0]}}});var x$={};function Mn(t){for(var{type:r,names:e,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=t,s={type:r,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{var r=t.parser.settings;if(!r.displayMode)throw new K("{"+t.envName+"} can be used only in display mode.")};function Um(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function Wi(t,r,e){var{hskipBeforeAndAfter:n,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:l,singleRow:u,emptySingleRow:c,maxNumCols:h,leqno:d}=r;if(t.gullet.beginGroup(),u||t.gullet.macros.set("\\cr","\\\\\\relax"),!o){var f=t.gullet.expandMacroAsText("\\arraystretch");if(f==null)o=1;else if(o=parseFloat(f),!o||o<0)throw new K("Invalid \\arraystretch: "+f)}t.gullet.beginGroup();var v=[],m=[v],b=[],y=[],$=l!=null?[]:void 0;function k(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function O(){$&&(t.gullet.macros.get("\\df@tag")?($.push(t.subparse([new Xr("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):$.push(!!l&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(k(),y.push(Gy(t));;){var P=t.parseExpression(!1,u?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),P={type:"ordgroup",mode:t.mode,body:P},e&&(P={type:"styling",mode:t.mode,style:e,body:[P]}),v.push(P);var E=t.fetch().text;if(E==="&"){if(h&&v.length===h){if(u||s)throw new K("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(E==="\\end"){O(),v.length===1&&P.type==="styling"&&P.body[0].body.length===0&&(m.length>1||!c)&&m.pop(),y.length0&&(k+=.25),u.push({pos:k,isDashed:fr[Zt]})}for(O(o[0]),n=0;n0&&(z+=$,Dfr))for(n=0;n=s)){var it=void 0;(i>0||r.hskipBeforeAndAfter)&&(it=ge.deflt(ue.pregap,d),it!==0&&(ae=N.makeSpan(["arraycolsep"],[]),ae.style.width=ee(it),ne.push(ae)));var je=[];for(n=0;n0){for(var de=N.makeLineSpan("hline",e,c),Te=N.makeLineSpan("hdashline",e,c),ye=[{type:"elem",elem:l,shift:0}];u.length>0;){var Qe=u.pop(),Et=Qe.pos-L;Qe.isDashed?ye.push({type:"elem",elem:Te,shift:Et}):ye.push({type:"elem",elem:de,shift:Et})}l=N.makeVList({positionType:"individualShift",children:ye},e)}if(Ie.length===0)return N.makeSpan(["mord"],[l],e);var Tt=N.makeVList({positionType:"individualShift",children:Ie},e);return Tt=N.makeSpan(["tag"],[Tt],e),N.makeFragment([l,Tt])},AN={c:"center ",l:"left ",r:"right "},Nn=function(r,e){for(var n=[],i=new U.MathNode("mtd",[],["mtr-glue"]),a=new U.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var v=r.cols,m="",b=!1,y=0,$=v.length;v[0].type==="separator"&&(d+="top ",y=1),v[v.length-1].type==="separator"&&(d+="bottom ",$-=1);for(var k=y;k<$;k++)v[k].type==="align"?(f+=AN[v[k].align],b&&(m+="none "),b=!0):v[k].type==="separator"&&b&&(m+=v[k].separator==="|"?"solid ":"dashed ",b=!1);c.setAttribute("columnalign",f.trim()),/[sd]/.test(m)&&c.setAttribute("columnlines",m.trim())}if(r.colSeparationType==="align"){for(var O=r.cols||[],P="",E=1;E0?"left ":"",d+=B[B.length-1].length>0?"right ":"";for(var R=1;R-1?"alignat":"align",a=r.envName==="split",o=Wi(r.parser,{cols:n,addJot:!0,autoTag:a?void 0:Um(r.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:r.parser.settings.leqno},"display"),s,l=0,u={type:"ordgroup",mode:r.mode,body:[]};if(e[0]&&e[0].type==="ordgroup"){for(var c="",h=0;h0&&f&&(b=1),n[v]={type:"align",align:m,pregap:b,postgap:0}}return o.colSeparationType=f?"align":"alignat",o};Mn({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,r){var e=Mh(r[0]),n=e?[r[0]]:Pe(r[0],"ordgroup").body,i=n.map(function(o){var s=Lm(o),l=s.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 K("Unknown column alignment: "+l,o)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Wi(t.parser,a,Vm(t.envName))},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var r={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],e="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:e}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),e=i.fetch().text,"lcr".indexOf(e)===-1)throw new K("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:e}]}}var a=Wi(t.parser,n,Vm(t.envName)),o=Math.max(0,...a.body.map(s=>s.length));return a.cols=new Array(o).fill({type:"align",align:e}),r?{type:"leftright",mode:t.mode,body:[a],left:r[0],right:r[1],rightColor:void 0}:a},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var r={arraystretch:.5},e=Wi(t.parser,r,"script");return e.colSeparationType="small",e},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["subarray"],props:{numArgs:1},handler(t,r){var e=Mh(r[0]),n=e?[r[0]]:Pe(r[0],"ordgroup").body,i=n.map(function(o){var s=Lm(o),l=s.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new K("Unknown column alignment: "+l,o)});if(i.length>1)throw new K("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=Wi(t.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new K("{subarray} can contain only one column");return a},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var r={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},e=Wi(t.parser,r,Vm(t.envName));return{type:"leftright",mode:t.mode,body:[e],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:S$,htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){ge.contains(["gather","gather*"],t.envName)&&Rh(t);var r={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Um(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return Wi(t.parser,r,"display")},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:S$,htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){Rh(t);var r={autoTag:Um(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return Wi(t.parser,r,"display")},htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["CD"],props:{numArgs:0},handler(t){return Rh(t),yN(t.parser)},htmlBuilder:Dn,mathmlBuilder:Nn});x("\\nonumber","\\gdef\\@eqnsw{0}");x("\\notag","\\nonumber");oe({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,r){throw new K(t.funcName+" valid only within array environment")}});var Ky=x$;oe({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,r){var{parser:e,funcName:n}=t,i=r[0];if(i.type!=="ordgroup")throw new K("Invalid environment name",i);for(var a="",o=0;o{var e=t.font,n=r.withFont(e);return Be(t.body,n)},T$=(t,r)=>{var e=t.font,n=r.withFont(e);return nt(t.body,n)},Yy={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};oe({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=Zc(r[0]),a=n;return a in Yy&&(a=Yy[a]),{type:"font",mode:e.mode,font:a.slice(1),body:i}},htmlBuilder:E$,mathmlBuilder:T$});oe({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,r)=>{var{parser:e}=t,n=r[0],i=ge.isCharacterBox(n);return{type:"mclass",mode:e.mode,mclass:Dh(n),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});oe({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,r)=>{var{parser:e,funcName:n,breakOnTokenText:i}=t,{mode:a}=e,o=e.parseExpression(!0,i),s="math"+n.slice(1);return{type:"font",mode:a,font:s,body:{type:"ordgroup",mode:e.mode,body:o}}},htmlBuilder:E$,mathmlBuilder:T$});var _$=(t,r)=>{var e=r;return t==="display"?e=e.id>=we.SCRIPT.id?e.text():we.DISPLAY:t==="text"&&e.size===we.DISPLAY.size?e=we.TEXT:t==="script"?e=we.SCRIPT:t==="scriptscript"&&(e=we.SCRIPTSCRIPT),e},Gm=(t,r)=>{var e=_$(t.size,r.style),n=e.fracNum(),i=e.fracDen(),a;a=r.havingStyle(n);var o=Be(t.numer,a,r);if(t.continued){var s=8.5/r.fontMetrics().ptPerEm,l=3.5/r.fontMetrics().ptPerEm;o.height=o.height0?v=3*d:v=7*d,m=r.fontMetrics().denom1):(h>0?(f=r.fontMetrics().num2,v=d):(f=r.fontMetrics().num3,v=3*d),m=r.fontMetrics().denom2);var b;if(c){var $=r.fontMetrics().axisHeight;f-o.depth-($+.5*h){var e=new U.MathNode("mfrac",[nt(t.numer,r),nt(t.denom,r)]);if(!t.hasBarLine)e.setAttribute("linethickness","0px");else if(t.barSize){var n=pt(t.barSize,r);e.setAttribute("linethickness",ee(n))}var i=_$(t.size,r.style);if(i.size!==r.style.size){e=new U.MathNode("mstyle",[e]);var a=i.size===we.DISPLAY.size?"true":"false";e.setAttribute("displaystyle",a),e.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var o=[];if(t.leftDelim!=null){var s=new U.MathNode("mo",[new U.TextNode(t.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(e),t.rightDelim!=null){var l=new U.MathNode("mo",[new U.TextNode(t.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return zm(o)}return e};oe({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=r[0],a=r[1],o,s=null,l=null,u="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,s="(",l=")";break;case"\\\\bracefrac":o=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":o=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":u="display";break;case"\\tfrac":case"\\tbinom":u="text";break}return{type:"genfrac",mode:e.mode,continued:!1,numer:i,denom:a,hasBarLine:o,leftDelim:s,rightDelim:l,size:u,barSize:null}},htmlBuilder:Gm,mathmlBuilder:Km});oe({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=r[0],a=r[1];return{type:"genfrac",mode:e.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});oe({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:r,funcName:e,token:n}=t,i;switch(e){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:r.mode,replaceWith:i,token:n}}});var Xy=["display","text","script","scriptscript"],Jy=function(r){var e=null;return r.length>0&&(e=r,e=e==="."?null:e),e};oe({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,r){var{parser:e}=t,n=r[4],i=r[5],a=Zc(r[0]),o=a.type==="atom"&&a.family==="open"?Jy(a.text):null,s=Zc(r[1]),l=s.type==="atom"&&s.family==="close"?Jy(s.text):null,u=Pe(r[2],"size"),c,h=null;u.isBlank?c=!0:(h=u.value,c=h.number>0);var d="auto",f=r[3];if(f.type==="ordgroup"){if(f.body.length>0){var v=Pe(f.body[0],"textord");d=Xy[Number(v.text)]}}else f=Pe(f,"textord"),d=Xy[Number(f.text)];return{type:"genfrac",mode:e.mode,numer:n,denom:i,continued:!1,hasBarLine:c,barSize:h,leftDelim:o,rightDelim:l,size:d}},htmlBuilder:Gm,mathmlBuilder:Km});oe({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,r){var{parser:e,funcName:n,token:i}=t;return{type:"infix",mode:e.mode,replaceWith:"\\\\abovefrac",size:Pe(r[0],"size").value,token:i}}});oe({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=r[0],a=uD(Pe(r[1],"infix").size),o=r[2],s=a.number>0;return{type:"genfrac",mode:e.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Gm,mathmlBuilder:Km});var O$=(t,r)=>{var e=r.style,n,i;t.type==="supsub"?(n=t.sup?Be(t.sup,r.havingStyle(e.sup()),r):Be(t.sub,r.havingStyle(e.sub()),r),i=Pe(t.base,"horizBrace")):i=Pe(t,"horizBrace");var a=Be(i.base,r.havingBaseStyle(we.DISPLAY)),o=ii.svgSpan(i,r),s;if(i.isOver?(s=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o}]},r),s.children[0].children[0].children[1].classes.push("svg-align")):(s=N.makeVList({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:a}]},r),s.children[0].children[0].children[0].classes.push("svg-align")),n){var l=N.makeSpan(["mord",i.isOver?"mover":"munder"],[s],r);i.isOver?s=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},r):s=N.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},r)}return N.makeSpan(["mord",i.isOver?"mover":"munder"],[s],r)},MN=(t,r)=>{var e=ii.mathMLnode(t.label);return new U.MathNode(t.isOver?"mover":"munder",[nt(t.base,r),e])};oe({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,r){var{parser:e,funcName:n}=t;return{type:"horizBrace",mode:e.mode,label:n,isOver:/^\\over/.test(n),base:r[0]}},htmlBuilder:O$,mathmlBuilder:MN});oe({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,r)=>{var{parser:e}=t,n=r[1],i=Pe(r[0],"url").url;return e.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:e.mode,href:i,body:_t(n)}:e.formatUnsupportedCmd("\\href")},htmlBuilder:(t,r)=>{var e=Ft(t.body,r,!1);return N.makeAnchor(t.href,[],e,r)},mathmlBuilder:(t,r)=>{var e=Fi(t.body,r);return e instanceof Gr||(e=new Gr("mrow",[e])),e.setAttribute("href",t.href),e}});oe({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,r)=>{var{parser:e}=t,n=Pe(r[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:n}))return e.formatUnsupportedCmd("\\url");for(var i=[],a=0;a{var{parser:e,funcName:n,token:i}=t,a=Pe(r[0],"raw").string,o=r[1];e.settings.strict&&e.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s,l={};switch(n){case"\\htmlClass":l.class=a,s={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,s={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,s={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var u=a.split(","),c=0;c{var e=Ft(t.body,r,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=N.makeSpan(n,e,r);for(var a in t.attributes)a!=="class"&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},mathmlBuilder:(t,r)=>Fi(t.body,r)});oe({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,r)=>{var{parser:e}=t;return{type:"htmlmathml",mode:e.mode,html:_t(r[0]),mathml:_t(r[1])}},htmlBuilder:(t,r)=>{var e=Ft(t.html,r,!1);return N.makeFragment(e)},mathmlBuilder:(t,r)=>Fi(t.mathml,r)});var dd=function(r){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(r))return{number:+r,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r);if(!e)throw new K("Invalid size: '"+r+"' in \\includegraphics");var n={number:+(e[1]+e[2]),unit:e[3]};if(!G7(n))throw new K("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};oe({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,r,e)=>{var{parser:n}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},o={number:0,unit:"em"},s="";if(e[0])for(var l=Pe(e[0],"raw").string,u=l.split(","),c=0;c{var e=pt(t.height,r),n=0;t.totalheight.number>0&&(n=pt(t.totalheight,r)-e);var i=0;t.width.number>0&&(i=pt(t.width,r));var a={height:ee(e+n)};i>0&&(a.width=ee(i)),n>0&&(a.verticalAlign=ee(-n));var o=new MD(t.src,t.alt,a);return o.height=e,o.depth=n,o},mathmlBuilder:(t,r)=>{var e=new U.MathNode("mglyph",[]);e.setAttribute("alt",t.alt);var n=pt(t.height,r),i=0;if(t.totalheight.number>0&&(i=pt(t.totalheight,r)-n,e.setAttribute("valign",ee(-i))),e.setAttribute("height",ee(n+i)),t.width.number>0){var a=pt(t.width,r);e.setAttribute("width",ee(a))}return e.setAttribute("src",t.src),e}});oe({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,r){var{parser:e,funcName:n}=t,i=Pe(r[0],"size");if(e.settings.strict){var a=n[1]==="m",o=i.value.unit==="mu";a?(o||e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),e.mode!=="math"&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:e.mode,dimension:i.value}},htmlBuilder(t,r){return N.makeGlue(t.dimension,r)},mathmlBuilder(t,r){var e=pt(t.dimension,r);return new U.SpaceNode(e)}});oe({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=r[0];return{type:"lap",mode:e.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,r)=>{var e;t.alignment==="clap"?(e=N.makeSpan([],[Be(t.body,r)]),e=N.makeSpan(["inner"],[e],r)):e=N.makeSpan(["inner"],[Be(t.body,r)]);var n=N.makeSpan(["fix"],[]),i=N.makeSpan([t.alignment],[e,n],r),a=N.makeSpan(["strut"]);return a.style.height=ee(i.height+i.depth),i.depth&&(a.style.verticalAlign=ee(-i.depth)),i.children.unshift(a),i=N.makeSpan(["thinbox"],[i],r),N.makeSpan(["mord","vbox"],[i],r)},mathmlBuilder:(t,r)=>{var e=new U.MathNode("mpadded",[nt(t.body,r)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";e.setAttribute("lspace",n+"width")}return e.setAttribute("width","0px"),e}});oe({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,r){var{funcName:e,parser:n}=t,i=n.mode;n.switchMode("math");var a=e==="\\("?"\\)":"$",o=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:o}}});oe({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,r){throw new K("Mismatched "+t.funcName)}});var Zy=(t,r)=>{switch(r.style.size){case we.DISPLAY.size:return t.display;case we.TEXT.size:return t.text;case we.SCRIPT.size:return t.script;case we.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};oe({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,r)=>{var{parser:e}=t;return{type:"mathchoice",mode:e.mode,display:_t(r[0]),text:_t(r[1]),script:_t(r[2]),scriptscript:_t(r[3])}},htmlBuilder:(t,r)=>{var e=Zy(t,r),n=Ft(e,r,!1);return N.makeFragment(n)},mathmlBuilder:(t,r)=>{var e=Zy(t,r);return Fi(e,r)}});var I$=(t,r,e,n,i,a,o)=>{t=N.makeSpan([],[t]);var s=e&&ge.isCharacterBox(e),l,u;if(r){var c=Be(r,n.havingStyle(i.sup()),n);u={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}}if(e){var h=Be(e,n.havingStyle(i.sub()),n);l={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}var d;if(u&&l){var f=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+o;d=N.makeVList({positionType:"bottom",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ee(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ee(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var v=t.height-o;d=N.makeVList({positionType:"top",positionData:v,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ee(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n)}else if(u){var m=t.depth+o;d=N.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ee(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var b=[d];if(l&&a!==0&&!s){var y=N.makeSpan(["mspace"],[],n);y.style.marginRight=ee(a),b.unshift(y)}return N.makeSpan(["mop","op-limits"],b,n)},C$=["\\smallint"],Ko=(t,r)=>{var e,n,i=!1,a;t.type==="supsub"?(e=t.sup,n=t.sub,a=Pe(t.base,"op"),i=!0):a=Pe(t,"op");var o=r.style,s=!1;o.size===we.DISPLAY.size&&a.symbol&&!ge.contains(C$,a.name)&&(s=!0);var l;if(a.symbol){var u=s?"Size2-Regular":"Size1-Regular",c="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(c=a.name.slice(1),a.name=c==="oiint"?"\\iint":"\\iiint"),l=N.makeSymbol(a.name,u,"math",r,["mop","op-symbol",s?"large-op":"small-op"]),c.length>0){var h=l.italic,d=N.staticSvg(c+"Size"+(s?"2":"1"),r);l=N.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:d,shift:s?.08:0}]},r),a.name="\\"+c,l.classes.unshift("mop"),l.italic=h}}else if(a.body){var f=Ft(a.body,r,!0);f.length===1&&f[0]instanceof Qr?(l=f[0],l.classes[0]="mop"):l=N.makeSpan(["mop"],f,r)}else{for(var v=[],m=1;m{var e;if(t.symbol)e=new Gr("mo",[en(t.name,t.mode)]),ge.contains(C$,t.name)&&e.setAttribute("largeop","false");else if(t.body)e=new Gr("mo",Tr(t.body,r));else{e=new Gr("mi",[new js(t.name.slice(1))]);var n=new Gr("mo",[en("⁡","text")]);t.parentIsSupSub?e=new Gr("mrow",[e,n]):e=i$([e,n])}return e},DN={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};oe({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=n;return i.length===1&&(i=DN[i]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Ko,mathmlBuilder:Ol});oe({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,r)=>{var{parser:e}=t,n=r[0];return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:_t(n)}},htmlBuilder:Ko,mathmlBuilder:Ol});var NN={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};oe({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(t){var{parser:r,funcName:e}=t;return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Ko,mathmlBuilder:Ol});oe({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:r,funcName:e}=t;return{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Ko,mathmlBuilder:Ol});oe({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:r,funcName:e}=t,n=e;return n.length===1&&(n=NN[n]),{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Ko,mathmlBuilder:Ol});var P$=(t,r)=>{var e,n,i=!1,a;t.type==="supsub"?(e=t.sup,n=t.sub,a=Pe(t.base,"operatorname"),i=!0):a=Pe(t,"operatorname");var o;if(a.body.length>0){for(var s=a.body.map(h=>{var d=h.text;return typeof d=="string"?{type:"textord",mode:h.mode,text:d}:h}),l=Ft(s,r.withFont("mathrm"),!0),u=0;u{for(var e=Tr(t.body,r.withFont("mathrm")),n=!0,i=0;ic.toText()).join("");e=[new U.TextNode(s)]}var l=new U.MathNode("mi",e);l.setAttribute("mathvariant","normal");var u=new U.MathNode("mo",[en("⁡","text")]);return t.parentIsSupSub?new U.MathNode("mrow",[l,u]):U.newDocumentFragment([l,u])};oe({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,r)=>{var{parser:e,funcName:n}=t,i=r[0];return{type:"operatorname",mode:e.mode,body:_t(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:P$,mathmlBuilder:RN});x("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Aa({type:"ordgroup",htmlBuilder(t,r){return t.semisimple?N.makeFragment(Ft(t.body,r,!1)):N.makeSpan(["mord"],Ft(t.body,r,!0),r)},mathmlBuilder(t,r){return Fi(t.body,r,!0)}});oe({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,r){var{parser:e}=t,n=r[0];return{type:"overline",mode:e.mode,body:n}},htmlBuilder(t,r){var e=Be(t.body,r.havingCrampedStyle()),n=N.makeLineSpan("overline-line",r),i=r.fontMetrics().defaultRuleThickness,a=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},r);return N.makeSpan(["mord","overline"],[a],r)},mathmlBuilder(t,r){var e=new U.MathNode("mo",[new U.TextNode("‾")]);e.setAttribute("stretchy","true");var n=new U.MathNode("mover",[nt(t.body,r),e]);return n.setAttribute("accent","true"),n}});oe({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,r)=>{var{parser:e}=t,n=r[0];return{type:"phantom",mode:e.mode,body:_t(n)}},htmlBuilder:(t,r)=>{var e=Ft(t.body,r.withPhantom(),!1);return N.makeFragment(e)},mathmlBuilder:(t,r)=>{var e=Tr(t.body,r);return new U.MathNode("mphantom",e)}});oe({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,r)=>{var{parser:e}=t,n=r[0];return{type:"hphantom",mode:e.mode,body:n}},htmlBuilder:(t,r)=>{var e=N.makeSpan([],[Be(t.body,r.withPhantom())]);if(e.height=0,e.depth=0,e.children)for(var n=0;n{var e=Tr(_t(t.body),r),n=new U.MathNode("mphantom",e),i=new U.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});oe({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,r)=>{var{parser:e}=t,n=r[0];return{type:"vphantom",mode:e.mode,body:n}},htmlBuilder:(t,r)=>{var e=N.makeSpan(["inner"],[Be(t.body,r.withPhantom())]),n=N.makeSpan(["fix"],[]);return N.makeSpan(["mord","rlap"],[e,n],r)},mathmlBuilder:(t,r)=>{var e=Tr(_t(t.body),r),n=new U.MathNode("mphantom",e),i=new U.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});oe({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,r){var{parser:e}=t,n=Pe(r[0],"size").value,i=r[1];return{type:"raisebox",mode:e.mode,dy:n,body:i}},htmlBuilder(t,r){var e=Be(t.body,r),n=pt(t.dy,r);return N.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:e}]},r)},mathmlBuilder(t,r){var e=new U.MathNode("mpadded",[nt(t.body,r)]),n=t.dy.number+t.dy.unit;return e.setAttribute("voffset",n),e}});oe({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:r}=t;return{type:"internal",mode:r.mode}}});oe({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,r,e){var{parser:n}=t,i=e[0],a=Pe(r[0],"size"),o=Pe(r[1],"size");return{type:"rule",mode:n.mode,shift:i&&Pe(i,"size").value,width:a.value,height:o.value}},htmlBuilder(t,r){var e=N.makeSpan(["mord","rule"],[],r),n=pt(t.width,r),i=pt(t.height,r),a=t.shift?pt(t.shift,r):0;return e.style.borderRightWidth=ee(n),e.style.borderTopWidth=ee(i),e.style.bottom=ee(a),e.width=n,e.height=i+a,e.depth=-a,e.maxFontSize=i*1.125*r.sizeMultiplier,e},mathmlBuilder(t,r){var e=pt(t.width,r),n=pt(t.height,r),i=t.shift?pt(t.shift,r):0,a=r.color&&r.getColor()||"black",o=new U.MathNode("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",ee(e)),o.setAttribute("height",ee(n));var s=new U.MathNode("mpadded",[o]);return i>=0?s.setAttribute("height",ee(i)):(s.setAttribute("height",ee(i)),s.setAttribute("depth",ee(-i))),s.setAttribute("voffset",ee(i)),s}});function A$(t,r,e){for(var n=Ft(t,r,!1),i=r.sizeMultiplier/e.sizeMultiplier,a=0;a{var e=r.havingSize(t.size);return A$(t.body,e,r)};oe({type:"sizing",names:Qy,props:{numArgs:0,allowedInText:!0},handler:(t,r)=>{var{breakOnTokenText:e,funcName:n,parser:i}=t,a=i.parseExpression(!1,e);return{type:"sizing",mode:i.mode,size:Qy.indexOf(n)+1,body:a}},htmlBuilder:FN,mathmlBuilder:(t,r)=>{var e=r.havingSize(t.size),n=Tr(t.body,e),i=new U.MathNode("mstyle",n);return i.setAttribute("mathsize",ee(e.sizeMultiplier)),i}});oe({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,r,e)=>{var{parser:n}=t,i=!1,a=!1,o=e[0]&&Pe(e[0],"ordgroup");if(o)for(var s="",l=0;l{var e=N.makeSpan([],[Be(t.body,r)]);if(!t.smashHeight&&!t.smashDepth)return e;if(t.smashHeight&&(e.height=0,e.children))for(var n=0;n{var e=new U.MathNode("mpadded",[nt(t.body,r)]);return t.smashHeight&&e.setAttribute("height","0px"),t.smashDepth&&e.setAttribute("depth","0px"),e}});oe({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,r,e){var{parser:n}=t,i=e[0],a=r[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(t,r){var e=Be(t.body,r.havingCrampedStyle());e.height===0&&(e.height=r.fontMetrics().xHeight),e=N.wrapFragment(e,r);var n=r.fontMetrics(),i=n.defaultRuleThickness,a=i;r.style.ide.height+e.depth+o&&(o=(o+h-e.height-e.depth)/2);var d=l.height-e.height-o-u;e.style.paddingLeft=ee(c);var f=N.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e,wrapperClasses:["svg-align"]},{type:"kern",size:-(e.height+d)},{type:"elem",elem:l},{type:"kern",size:u}]},r);if(t.index){var v=r.havingStyle(we.SCRIPTSCRIPT),m=Be(t.index,v,r),b=.6*(f.height-f.depth),y=N.makeVList({positionType:"shift",positionData:-b,children:[{type:"elem",elem:m}]},r),$=N.makeSpan(["root"],[y]);return N.makeSpan(["mord","sqrt"],[$,f],r)}else return N.makeSpan(["mord","sqrt"],[f],r)},mathmlBuilder(t,r){var{body:e,index:n}=t;return n?new U.MathNode("mroot",[nt(e,r),nt(n,r)]):new U.MathNode("msqrt",[nt(e,r)])}});var eb={display:we.DISPLAY,text:we.TEXT,script:we.SCRIPT,scriptscript:we.SCRIPTSCRIPT};oe({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,r){var{breakOnTokenText:e,funcName:n,parser:i}=t,a=i.parseExpression(!0,e),o=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:o,body:a}},htmlBuilder(t,r){var e=eb[t.style],n=r.havingStyle(e).withFont("");return A$(t.body,n,r)},mathmlBuilder(t,r){var e=eb[t.style],n=r.havingStyle(e),i=Tr(t.body,n),a=new U.MathNode("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},s=o[t.style];return a.setAttribute("scriptlevel",s[0]),a.setAttribute("displaystyle",s[1]),a}});var zN=function(r,e){var n=r.base;if(n)if(n.type==="op"){var i=n.limits&&(e.style.size===we.DISPLAY.size||n.alwaysHandleSupSub);return i?Ko:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(e.style.size===we.DISPLAY.size||n.limits);return a?P$:null}else{if(n.type==="accent")return ge.isCharacterBox(n.base)?jm:null;if(n.type==="horizBrace"){var o=!r.sub;return o===n.isOver?O$:null}else return null}else return null};Aa({type:"supsub",htmlBuilder(t,r){var e=zN(t,r);if(e)return e(t,r);var{base:n,sup:i,sub:a}=t,o=Be(n,r),s,l,u=r.fontMetrics(),c=0,h=0,d=n&&ge.isCharacterBox(n);if(i){var f=r.havingStyle(r.style.sup());s=Be(i,f,r),d||(c=o.height-f.fontMetrics().supDrop*f.sizeMultiplier/r.sizeMultiplier)}if(a){var v=r.havingStyle(r.style.sub());l=Be(a,v,r),d||(h=o.depth+v.fontMetrics().subDrop*v.sizeMultiplier/r.sizeMultiplier)}var m;r.style===we.DISPLAY?m=u.sup1:r.style.cramped?m=u.sup3:m=u.sup2;var b=r.sizeMultiplier,y=ee(.5/u.ptPerEm/b),$=null;if(l){var k=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(o instanceof Qr||k)&&($=ee(-o.italic))}var O;if(s&&l){c=Math.max(c,m,s.depth+.25*u.xHeight),h=Math.max(h,u.sub2);var P=u.defaultRuleThickness,E=4*P;if(c-s.depth-(l.height-h)0&&(c+=D,h-=D)}var B=[{type:"elem",elem:l,shift:h,marginRight:y,marginLeft:$},{type:"elem",elem:s,shift:-c,marginRight:y}];O=N.makeVList({positionType:"individualShift",children:B},r)}else if(l){h=Math.max(h,u.sub1,l.height-.8*u.xHeight);var R=[{type:"elem",elem:l,marginLeft:$,marginRight:y}];O=N.makeVList({positionType:"shift",positionData:h,children:R},r)}else if(s)c=Math.max(c,m,s.depth+.25*u.xHeight),O=N.makeVList({positionType:"shift",positionData:-c,children:[{type:"elem",elem:s,marginRight:y}]},r);else throw new Error("supsub must have either sup or sub.");var A=Gv(o,"right")||"mord";return N.makeSpan([A],[o,N.makeSpan(["msupsub"],[O])],r)},mathmlBuilder(t,r){var e=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(e=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var a=[nt(t.base,r)];t.sub&&a.push(nt(t.sub,r)),t.sup&&a.push(nt(t.sup,r));var o;if(e)o=n?"mover":"munder";else if(t.sub)if(t.sup){var u=t.base;u&&u.type==="op"&&u.limits&&r.style===we.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(r.style===we.DISPLAY||u.limits)?o="munderover":o="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(r.style===we.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||r.style===we.DISPLAY)?o="munder":o="msub"}else{var s=t.base;s&&s.type==="op"&&s.limits&&(r.style===we.DISPLAY||s.alwaysHandleSupSub)||s&&s.type==="operatorname"&&s.alwaysHandleSupSub&&(s.limits||r.style===we.DISPLAY)?o="mover":o="msup"}return new U.MathNode(o,a)}});Aa({type:"atom",htmlBuilder(t,r){return N.mathsym(t.text,t.mode,r,["m"+t.family])},mathmlBuilder(t,r){var e=new U.MathNode("mo",[en(t.text,t.mode)]);if(t.family==="bin"){var n=Bm(t,r);n==="bold-italic"&&e.setAttribute("mathvariant",n)}else t.family==="punct"?e.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&e.setAttribute("stretchy","false");return e}});var M$={mi:"italic",mn:"normal",mtext:"normal"};Aa({type:"mathord",htmlBuilder(t,r){return N.makeOrd(t,r,"mathord")},mathmlBuilder(t,r){var e=new U.MathNode("mi",[en(t.text,t.mode,r)]),n=Bm(t,r)||"italic";return n!==M$[e.type]&&e.setAttribute("mathvariant",n),e}});Aa({type:"textord",htmlBuilder(t,r){return N.makeOrd(t,r,"textord")},mathmlBuilder(t,r){var e=en(t.text,t.mode,r),n=Bm(t,r)||"normal",i;return t.mode==="text"?i=new U.MathNode("mtext",[e]):/[0-9]/.test(t.text)?i=new U.MathNode("mn",[e]):t.text==="\\prime"?i=new U.MathNode("mo",[e]):i=new U.MathNode("mi",[e]),n!==M$[i.type]&&i.setAttribute("mathvariant",n),i}});var fd={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},vd={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Aa({type:"spacing",htmlBuilder(t,r){if(vd.hasOwnProperty(t.text)){var e=vd[t.text].className||"";if(t.mode==="text"){var n=N.makeOrd(t,r,"textord");return n.classes.push(e),n}else return N.makeSpan(["mspace",e],[N.mathsym(t.text,t.mode,r)],r)}else{if(fd.hasOwnProperty(t.text))return N.makeSpan(["mspace",fd[t.text]],[],r);throw new K('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,r){var e;if(vd.hasOwnProperty(t.text))e=new U.MathNode("mtext",[new U.TextNode(" ")]);else{if(fd.hasOwnProperty(t.text))return new U.MathNode("mspace");throw new K('Unknown type of space "'+t.text+'"')}return e}});var tb=()=>{var t=new U.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};Aa({type:"tag",mathmlBuilder(t,r){var e=new U.MathNode("mtable",[new U.MathNode("mtr",[tb(),new U.MathNode("mtd",[Fi(t.body,r)]),tb(),new U.MathNode("mtd",[Fi(t.tag,r)])])]);return e.setAttribute("width","100%"),e}});var rb={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},nb={"\\textbf":"textbf","\\textmd":"textmd"},BN={"\\textit":"textit","\\textup":"textup"},ib=(t,r)=>{var e=t.font;if(e){if(rb[e])return r.withTextFontFamily(rb[e]);if(nb[e])return r.withTextFontWeight(nb[e]);if(e==="\\emph")return r.fontShape==="textit"?r.withTextFontShape("textup"):r.withTextFontShape("textit")}else return r;return r.withTextFontShape(BN[e])};oe({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,r){var{parser:e,funcName:n}=t,i=r[0];return{type:"text",mode:e.mode,body:_t(i),font:n}},htmlBuilder(t,r){var e=ib(t,r),n=Ft(t.body,e,!0);return N.makeSpan(["mord","text"],n,e)},mathmlBuilder(t,r){var e=ib(t,r);return Fi(t.body,e)}});oe({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,r){var{parser:e}=t;return{type:"underline",mode:e.mode,body:r[0]}},htmlBuilder(t,r){var e=Be(t.body,r),n=N.makeLineSpan("underline-line",r),i=r.fontMetrics().defaultRuleThickness,a=N.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:e}]},r);return N.makeSpan(["mord","underline"],[a],r)},mathmlBuilder(t,r){var e=new U.MathNode("mo",[new U.TextNode("‾")]);e.setAttribute("stretchy","true");var n=new U.MathNode("munder",[nt(t.body,r),e]);return n.setAttribute("accentunder","true"),n}});oe({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,r){var{parser:e}=t;return{type:"vcenter",mode:e.mode,body:r[0]}},htmlBuilder(t,r){var e=Be(t.body,r),n=r.fontMetrics().axisHeight,i=.5*(e.height-n-(e.depth+n));return N.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:e}]},r)},mathmlBuilder(t,r){return new U.MathNode("mpadded",[nt(t.body,r)],["vcenter"])}});oe({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,r,e){throw new K("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,r){for(var e=ab(t),n=[],i=r.havingStyle(r.style.text()),a=0;at.body.replace(/ /g,t.star?"␣":" "),ki=r$,D$=`[ \r ]`,LN="\\\\[a-zA-Z@]+",jN="\\\\[^\uD800-\uDFFF]",HN="("+LN+")"+D$+"*",WN=`\\\\( |[ \r ]+ ?)[ \r ]*`,Jv="[̀-ͯ]",qN=new RegExp(Jv+"+$"),UN="("+D$+"+)|"+(WN+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(Jv+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Jv+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+HN)+("|"+jN+")");class ob{constructor(r,e){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=r,this.settings=e,this.tokenRegex=new RegExp(UN,"g"),this.catcodes={"%":14,"~":13}}setCatcode(r,e){this.catcodes[r]=e}lex(){var r=this.input,e=this.tokenRegex.lastIndex;if(e===r.length)return new Xr("EOF",new Dr(this,e,e));var n=this.tokenRegex.exec(r);if(n===null||n.index!==e)throw new K("Unexpected character: '"+r[e]+"'",new Xr(r[e],new Dr(this,e,e+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=r.indexOf(` -`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=r.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 Xr(i,new Dr(this,e,this.tokenRegex.lastIndex))}}class VN{constructor(r,e){r===void 0&&(r={}),e===void 0&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=r,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new K("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var r=this.undefStack.pop();for(var e in r)r.hasOwnProperty(e)&&(r[e]==null?delete this.current[e]:this.current[e]=r[e])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(r){return this.current.hasOwnProperty(r)||this.builtins.hasOwnProperty(r)}get(r){return this.current.hasOwnProperty(r)?this.current[r]:this.builtins[r]}set(r,e,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][r]=e)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(r)&&(a[r]=this.current[r])}e==null?delete this.current[r]:this.current[r]=e}}var GN=k$;x("\\noexpand",function(t){var r=t.popToken();return t.isExpandable(r.text)&&(r.noexpand=!0,r.treatAsRelax=!0),{tokens:[r],numArgs:0}});x("\\expandafter",function(t){var r=t.popToken();return t.expandOnce(!0),{tokens:[r],numArgs:0}});x("\\@firstoftwo",function(t){var r=t.consumeArgs(2);return{tokens:r[0],numArgs:0}});x("\\@secondoftwo",function(t){var r=t.consumeArgs(2);return{tokens:r[1],numArgs:0}});x("\\@ifnextchar",function(t){var r=t.consumeArgs(3);t.consumeSpaces();var e=t.future();return r[0].length===1&&r[0][0].text===e.text?{tokens:r[1],numArgs:0}:{tokens:r[2],numArgs:0}});x("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");x("\\TextOrMath",function(t){var r=t.consumeArgs(2);return t.mode==="text"?{tokens:r[0],numArgs:0}:{tokens:r[1],numArgs:0}});var sb={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};x("\\char",function(t){var r=t.popToken(),e,n="";if(r.text==="'")e=8,r=t.popToken();else if(r.text==='"')e=16,r=t.popToken();else if(r.text==="`")if(r=t.popToken(),r.text[0]==="\\")n=r.text.charCodeAt(1);else{if(r.text==="EOF")throw new K("\\char` missing argument");n=r.text.charCodeAt(0)}else e=10;if(e){if(n=sb[r.text],n==null||n>=e)throw new K("Invalid base-"+e+" digit "+r.text);for(var i;(i=sb[t.future().text])!=null&&i{var n=t.consumeArg().tokens;if(n.length!==1)throw new K("\\newcommand's first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!r)throw new K("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!e)throw new K("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(n=t.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var s="",l=t.expandNextToken();l.text!=="]"&&l.text!=="EOF";)s+=l.text,l=t.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new K("Invalid number of arguments: "+s);o=parseInt(s),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:o}),""};x("\\newcommand",t=>Ym(t,!1,!0));x("\\renewcommand",t=>Ym(t,!0,!1));x("\\providecommand",t=>Ym(t,!0,!0));x("\\message",t=>{var r=t.consumeArgs(1)[0];return console.log(r.reverse().map(e=>e.text).join("")),""});x("\\errmessage",t=>{var r=t.consumeArgs(1)[0];return console.error(r.reverse().map(e=>e.text).join("")),""});x("\\show",t=>{var r=t.popToken(),e=r.text;return console.log(r,t.macros.get(e),ki[e],ut.math[e],ut.text[e]),""});x("\\bgroup","{");x("\\egroup","}");x("~","\\nobreakspace");x("\\lq","`");x("\\rq","'");x("\\aa","\\r a");x("\\AA","\\r A");x("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");x("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");x("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");x("ℬ","\\mathscr{B}");x("ℰ","\\mathscr{E}");x("ℱ","\\mathscr{F}");x("ℋ","\\mathscr{H}");x("ℐ","\\mathscr{I}");x("ℒ","\\mathscr{L}");x("ℳ","\\mathscr{M}");x("ℛ","\\mathscr{R}");x("ℭ","\\mathfrak{C}");x("ℌ","\\mathfrak{H}");x("ℨ","\\mathfrak{Z}");x("\\Bbbk","\\Bbb{k}");x("·","\\cdotp");x("\\llap","\\mathllap{\\textrm{#1}}");x("\\rlap","\\mathrlap{\\textrm{#1}}");x("\\clap","\\mathclap{\\textrm{#1}}");x("\\mathstrut","\\vphantom{(}");x("\\underbar","\\underline{\\text{#1}}");x("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');x("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");x("\\ne","\\neq");x("≠","\\neq");x("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");x("∉","\\notin");x("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");x("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");x("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");x("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");x("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");x("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");x("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");x("⟂","\\perp");x("‼","\\mathclose{!\\mkern-0.8mu!}");x("∌","\\notni");x("⌜","\\ulcorner");x("⌝","\\urcorner");x("⌞","\\llcorner");x("⌟","\\lrcorner");x("©","\\copyright");x("®","\\textregistered");x("️","\\textregistered");x("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');x("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');x("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');x("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');x("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");x("⋮","\\vdots");x("\\varGamma","\\mathit{\\Gamma}");x("\\varDelta","\\mathit{\\Delta}");x("\\varTheta","\\mathit{\\Theta}");x("\\varLambda","\\mathit{\\Lambda}");x("\\varXi","\\mathit{\\Xi}");x("\\varPi","\\mathit{\\Pi}");x("\\varSigma","\\mathit{\\Sigma}");x("\\varUpsilon","\\mathit{\\Upsilon}");x("\\varPhi","\\mathit{\\Phi}");x("\\varPsi","\\mathit{\\Psi}");x("\\varOmega","\\mathit{\\Omega}");x("\\substack","\\begin{subarray}{c}#1\\end{subarray}");x("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");x("\\boxed","\\fbox{$\\displaystyle{#1}$}");x("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");x("\\implies","\\DOTSB\\;\\Longrightarrow\\;");x("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var lb={",":"\\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"};x("\\dots",function(t){var r="\\dotso",e=t.expandAfterFuture().text;return e in lb?r=lb[e]:(e.slice(0,4)==="\\not"||e in ut.math&&be.contains(["bin","rel"],ut.math[e].group))&&(r="\\dotsb"),r});var Xm={")":!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};x("\\dotso",function(t){var r=t.future().text;return r in Xm?"\\ldots\\,":"\\ldots"});x("\\dotsc",function(t){var r=t.future().text;return r in Xm&&r!==","?"\\ldots\\,":"\\ldots"});x("\\cdots",function(t){var r=t.future().text;return r in Xm?"\\@cdots\\,":"\\@cdots"});x("\\dotsb","\\cdots");x("\\dotsm","\\cdots");x("\\dotsi","\\!\\cdots");x("\\dotsx","\\ldots\\,");x("\\DOTSI","\\relax");x("\\DOTSB","\\relax");x("\\DOTSX","\\relax");x("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");x("\\,","\\tmspace+{3mu}{.1667em}");x("\\thinspace","\\,");x("\\>","\\mskip{4mu}");x("\\:","\\tmspace+{4mu}{.2222em}");x("\\medspace","\\:");x("\\;","\\tmspace+{5mu}{.2777em}");x("\\thickspace","\\;");x("\\!","\\tmspace-{3mu}{.1667em}");x("\\negthinspace","\\!");x("\\negmedspace","\\tmspace-{4mu}{.2222em}");x("\\negthickspace","\\tmspace-{5mu}{.277em}");x("\\enspace","\\kern.5em ");x("\\enskip","\\hskip.5em\\relax");x("\\quad","\\hskip1em\\relax");x("\\qquad","\\hskip2em\\relax");x("\\tag","\\@ifstar\\tag@literal\\tag@paren");x("\\tag@paren","\\tag@literal{({#1})}");x("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new K("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});x("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");x("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");x("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");x("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");x("\\newline","\\\\\\relax");x("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var N$=ee(En["Main-Regular"][84][1]-.7*En["Main-Regular"][65][1]);x("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+N$+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");x("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+N$+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");x("\\hspace","\\@ifstar\\@hspacer\\@hspace");x("\\@hspace","\\hskip #1\\relax");x("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");x("\\ordinarycolon",":");x("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");x("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');x("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');x("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');x("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');x("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');x("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');x("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');x("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');x("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');x("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');x("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');x("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');x("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');x("∷","\\dblcolon");x("∹","\\eqcolon");x("≔","\\coloneqq");x("≕","\\eqqcolon");x("⩴","\\Coloneqq");x("\\ratio","\\vcentcolon");x("\\coloncolon","\\dblcolon");x("\\colonequals","\\coloneqq");x("\\coloncolonequals","\\Coloneqq");x("\\equalscolon","\\eqqcolon");x("\\equalscoloncolon","\\Eqqcolon");x("\\colonminus","\\coloneq");x("\\coloncolonminus","\\Coloneq");x("\\minuscolon","\\eqcolon");x("\\minuscoloncolon","\\Eqcolon");x("\\coloncolonapprox","\\Colonapprox");x("\\coloncolonsim","\\Colonsim");x("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");x("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");x("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");x("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");x("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");x("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");x("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");x("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");x("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");x("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");x("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");x("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");x("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");x("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");x("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");x("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");x("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");x("\\nleqq","\\html@mathml{\\@nleqq}{≰}");x("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");x("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");x("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");x("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");x("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");x("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");x("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");x("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");x("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");x("\\imath","\\html@mathml{\\@imath}{ı}");x("\\jmath","\\html@mathml{\\@jmath}{ȷ}");x("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");x("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");x("⟦","\\llbracket");x("⟧","\\rrbracket");x("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");x("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");x("⦃","\\lBrace");x("⦄","\\rBrace");x("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");x("⦵","\\minuso");x("\\darr","\\downarrow");x("\\dArr","\\Downarrow");x("\\Darr","\\Downarrow");x("\\lang","\\langle");x("\\rang","\\rangle");x("\\uarr","\\uparrow");x("\\uArr","\\Uparrow");x("\\Uarr","\\Uparrow");x("\\N","\\mathbb{N}");x("\\R","\\mathbb{R}");x("\\Z","\\mathbb{Z}");x("\\alef","\\aleph");x("\\alefsym","\\aleph");x("\\Alpha","\\mathrm{A}");x("\\Beta","\\mathrm{B}");x("\\bull","\\bullet");x("\\Chi","\\mathrm{X}");x("\\clubs","\\clubsuit");x("\\cnums","\\mathbb{C}");x("\\Complex","\\mathbb{C}");x("\\Dagger","\\ddagger");x("\\diamonds","\\diamondsuit");x("\\empty","\\emptyset");x("\\Epsilon","\\mathrm{E}");x("\\Eta","\\mathrm{H}");x("\\exist","\\exists");x("\\harr","\\leftrightarrow");x("\\hArr","\\Leftrightarrow");x("\\Harr","\\Leftrightarrow");x("\\hearts","\\heartsuit");x("\\image","\\Im");x("\\infin","\\infty");x("\\Iota","\\mathrm{I}");x("\\isin","\\in");x("\\Kappa","\\mathrm{K}");x("\\larr","\\leftarrow");x("\\lArr","\\Leftarrow");x("\\Larr","\\Leftarrow");x("\\lrarr","\\leftrightarrow");x("\\lrArr","\\Leftrightarrow");x("\\Lrarr","\\Leftrightarrow");x("\\Mu","\\mathrm{M}");x("\\natnums","\\mathbb{N}");x("\\Nu","\\mathrm{N}");x("\\Omicron","\\mathrm{O}");x("\\plusmn","\\pm");x("\\rarr","\\rightarrow");x("\\rArr","\\Rightarrow");x("\\Rarr","\\Rightarrow");x("\\real","\\Re");x("\\reals","\\mathbb{R}");x("\\Reals","\\mathbb{R}");x("\\Rho","\\mathrm{P}");x("\\sdot","\\cdot");x("\\sect","\\S");x("\\spades","\\spadesuit");x("\\sub","\\subset");x("\\sube","\\subseteq");x("\\supe","\\supseteq");x("\\Tau","\\mathrm{T}");x("\\thetasym","\\vartheta");x("\\weierp","\\wp");x("\\Zeta","\\mathrm{Z}");x("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");x("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");x("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");x("\\bra","\\mathinner{\\langle{#1}|}");x("\\ket","\\mathinner{|{#1}\\rangle}");x("\\braket","\\mathinner{\\langle{#1}\\rangle}");x("\\Bra","\\left\\langle#1\\right|");x("\\Ket","\\left|#1\\right\\rangle");var R$=t=>r=>{var e=r.consumeArg().tokens,n=r.consumeArg().tokens,i=r.consumeArg().tokens,a=r.consumeArg().tokens,o=r.macros.get("|"),s=r.macros.get("\\|");r.macros.beginGroup();var l=h=>d=>{t&&(d.macros.set("|",o),i.length&&d.macros.set("\\|",s));var f=h;if(!h&&i.length){var v=d.future();v.text==="|"&&(d.popToken(),f=!0)}return{tokens:f?i:n,numArgs:0}};r.macros.set("|",l(!1)),i.length&&r.macros.set("\\|",l(!0));var u=r.consumeArg().tokens,c=r.expandTokens([...a,...u,...e]);return r.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};x("\\bra@ket",R$(!1));x("\\bra@set",R$(!0));x("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");x("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");x("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");x("\\angln","{\\angl n}");x("\\blue","\\textcolor{##6495ed}{#1}");x("\\orange","\\textcolor{##ffa500}{#1}");x("\\pink","\\textcolor{##ff00af}{#1}");x("\\red","\\textcolor{##df0030}{#1}");x("\\green","\\textcolor{##28ae7b}{#1}");x("\\gray","\\textcolor{gray}{#1}");x("\\purple","\\textcolor{##9d38bd}{#1}");x("\\blueA","\\textcolor{##ccfaff}{#1}");x("\\blueB","\\textcolor{##80f6ff}{#1}");x("\\blueC","\\textcolor{##63d9ea}{#1}");x("\\blueD","\\textcolor{##11accd}{#1}");x("\\blueE","\\textcolor{##0c7f99}{#1}");x("\\tealA","\\textcolor{##94fff5}{#1}");x("\\tealB","\\textcolor{##26edd5}{#1}");x("\\tealC","\\textcolor{##01d1c1}{#1}");x("\\tealD","\\textcolor{##01a995}{#1}");x("\\tealE","\\textcolor{##208170}{#1}");x("\\greenA","\\textcolor{##b6ffb0}{#1}");x("\\greenB","\\textcolor{##8af281}{#1}");x("\\greenC","\\textcolor{##74cf70}{#1}");x("\\greenD","\\textcolor{##1fab54}{#1}");x("\\greenE","\\textcolor{##0d923f}{#1}");x("\\goldA","\\textcolor{##ffd0a9}{#1}");x("\\goldB","\\textcolor{##ffbb71}{#1}");x("\\goldC","\\textcolor{##ff9c39}{#1}");x("\\goldD","\\textcolor{##e07d10}{#1}");x("\\goldE","\\textcolor{##a75a05}{#1}");x("\\redA","\\textcolor{##fca9a9}{#1}");x("\\redB","\\textcolor{##ff8482}{#1}");x("\\redC","\\textcolor{##f9685d}{#1}");x("\\redD","\\textcolor{##e84d39}{#1}");x("\\redE","\\textcolor{##bc2612}{#1}");x("\\maroonA","\\textcolor{##ffbde0}{#1}");x("\\maroonB","\\textcolor{##ff92c6}{#1}");x("\\maroonC","\\textcolor{##ed5fa6}{#1}");x("\\maroonD","\\textcolor{##ca337c}{#1}");x("\\maroonE","\\textcolor{##9e034e}{#1}");x("\\purpleA","\\textcolor{##ddd7ff}{#1}");x("\\purpleB","\\textcolor{##c6b9fc}{#1}");x("\\purpleC","\\textcolor{##aa87ff}{#1}");x("\\purpleD","\\textcolor{##7854ab}{#1}");x("\\purpleE","\\textcolor{##543b78}{#1}");x("\\mintA","\\textcolor{##f5f9e8}{#1}");x("\\mintB","\\textcolor{##edf2df}{#1}");x("\\mintC","\\textcolor{##e0e5cc}{#1}");x("\\grayA","\\textcolor{##f6f7f7}{#1}");x("\\grayB","\\textcolor{##f0f1f2}{#1}");x("\\grayC","\\textcolor{##e3e5e6}{#1}");x("\\grayD","\\textcolor{##d6d8da}{#1}");x("\\grayE","\\textcolor{##babec2}{#1}");x("\\grayF","\\textcolor{##888d93}{#1}");x("\\grayG","\\textcolor{##626569}{#1}");x("\\grayH","\\textcolor{##3b3e40}{#1}");x("\\grayI","\\textcolor{##21242c}{#1}");x("\\kaBlue","\\textcolor{##314453}{#1}");x("\\kaGreen","\\textcolor{##71B307}{#1}");var F$={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class KN{constructor(r,e,n){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=e,this.expansionCount=0,this.feed(r),this.macros=new VN(GN,e.macros),this.mode=n,this.stack=[]}feed(r){this.lexer=new ob(r,this.settings)}switchMode(r){this.mode=r}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(r){this.stack.push(r)}pushTokens(r){this.stack.push(...r)}scanArgument(r){var e,n,i;if(r){if(this.consumeSpaces(),this.future().text!=="[")return null;e=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:e,end:n}=this.consumeArg());return this.pushToken(new Xr("EOF",n.loc)),this.pushTokens(i),e.range(n,"")}consumeSpaces(){for(;;){var r=this.future();if(r.text===" ")this.stack.pop();else break}}consumeArg(r){var e=[],n=r&&r.length>0;n||this.consumeSpaces();var i=this.future(),a,o=0,s=0;do{if(a=this.popToken(),e.push(a),a.text==="{")++o;else if(a.text==="}"){if(--o,o===-1)throw new K("Extra }",a)}else if(a.text==="EOF")throw new K("Unexpected end of input in a macro argument, expected '"+(r&&n?r[s]:"}")+"'",a);if(r&&n)if((o===0||o===1&&r[s]==="{")&&a.text===r[s]){if(++s,s===r.length){e.splice(-s,s);break}}else s=0}while(o!==0||n);return i.text==="{"&&e[e.length-1].text==="}"&&(e.pop(),e.shift()),e.reverse(),{tokens:e,start:i,end:a}}consumeArgs(r,e){if(e){if(e.length!==r+1)throw new K("The length of delimiters doesn't match the number of args!");for(var n=e[0],i=0;ithis.settings.maxExpand)throw new K("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(r){var e=this.popToken(),n=e.text,i=e.noexpand?null:this._getExpansion(n);if(i==null||r&&i.unexpandable){if(r&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new K("Undefined control sequence: "+n);return this.pushToken(e),!1}this.countExpansion(1);var a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var s=a.length-1;s>=0;--s){var l=a[s];if(l.text==="#"){if(s===0)throw new K("Incomplete placeholder at end of macro body",l);if(l=a[--s],l.text==="#")a.splice(s+1,1);else if(/^[1-9]$/.test(l.text))a.splice(s,2,...o[+l.text-1]);else throw new K("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 r=this.stack.pop();return r.treatAsRelax&&(r.text="\\relax"),r}throw new Error}expandMacro(r){return this.macros.has(r)?this.expandTokens([new Xr(r)]):void 0}expandTokens(r){var e=[],n=this.stack.length;for(this.pushTokens(r);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),e.push(i)}return this.countExpansion(e.length),e}expandMacroAsText(r){var e=this.expandMacro(r);return e&&e.map(n=>n.text).join("")}_getExpansion(r){var e=this.macros.get(r);if(e==null)return e;if(r.length===1){var n=this.lexer.catcodes[r];if(n!=null&&n!==13)return}var i=typeof e=="function"?e(this):e;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var o=i.replace(/##/g,"");o.indexOf("#"+(a+1))!==-1;)++a;for(var s=new ob(i,this.settings),l=[],u=s.lex();u.text!=="EOF";)l.push(u),u=s.lex();l.reverse();var c={tokens:l,numArgs:a};return c}return i}isDefined(r){return this.macros.has(r)||ki.hasOwnProperty(r)||ut.math.hasOwnProperty(r)||ut.text.hasOwnProperty(r)||F$.hasOwnProperty(r)}isExpandable(r){var e=this.macros.get(r);return e!=null?typeof e=="string"||typeof e=="function"||!e.unexpandable:ki.hasOwnProperty(r)&&!ki[r].primitive}}var ub=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Nu=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),pd={"́":{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"}},cb={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Fh{constructor(r,e){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 KN(r,e,this.mode),this.settings=e,this.leftrightDepth=0}expect(r,e){if(e===void 0&&(e=!0),this.fetch().text!==r)throw new K("Expected '"+r+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(r){this.mode=r,this.gullet.switchMode(r)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var r=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),r}finally{this.gullet.endGroups()}}subparse(r){var e=this.nextToken;this.consume(),this.gullet.pushToken(new Xr("}")),this.gullet.pushTokens(r);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=e,n}parseExpression(r,e){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(Fh.endOfExpression.indexOf(i.text)!==-1||e&&i.text===e||r&&ki[i.text]&&ki[i.text].infix)break;var a=this.parseAtom(e);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(r){for(var e=-1,n,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',r);var s=ut[this.mode][e].group,l=Dr.range(r),u;if(RD.hasOwnProperty(s)){var c=s;u={type:"atom",mode:this.mode,family:c,loc:l,text:e}}else u={type:s,mode:this.mode,loc:l,text:e};o=u}else if(e.charCodeAt(0)>=128)this.settings.strict&&(V7(e.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',r):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'"'+(" ("+e.charCodeAt(0)+")"),r)),o={type:"textord",mode:"text",loc:Dr.range(r),text:e};else return null;if(this.consume(),a)for(var h=0;hu&&(u=c):c&&(u!==void 0&&u>-1&&l.push(` +`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=r.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 Xr(i,new Dr(this,e,this.tokenRegex.lastIndex))}}class VN{constructor(r,e){r===void 0&&(r={}),e===void 0&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=r,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new K("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var r=this.undefStack.pop();for(var e in r)r.hasOwnProperty(e)&&(r[e]==null?delete this.current[e]:this.current[e]=r[e])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(r){return this.current.hasOwnProperty(r)||this.builtins.hasOwnProperty(r)}get(r){return this.current.hasOwnProperty(r)?this.current[r]:this.builtins[r]}set(r,e,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][r]=e)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(r)&&(a[r]=this.current[r])}e==null?delete this.current[r]:this.current[r]=e}}var GN=k$;x("\\noexpand",function(t){var r=t.popToken();return t.isExpandable(r.text)&&(r.noexpand=!0,r.treatAsRelax=!0),{tokens:[r],numArgs:0}});x("\\expandafter",function(t){var r=t.popToken();return t.expandOnce(!0),{tokens:[r],numArgs:0}});x("\\@firstoftwo",function(t){var r=t.consumeArgs(2);return{tokens:r[0],numArgs:0}});x("\\@secondoftwo",function(t){var r=t.consumeArgs(2);return{tokens:r[1],numArgs:0}});x("\\@ifnextchar",function(t){var r=t.consumeArgs(3);t.consumeSpaces();var e=t.future();return r[0].length===1&&r[0][0].text===e.text?{tokens:r[1],numArgs:0}:{tokens:r[2],numArgs:0}});x("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");x("\\TextOrMath",function(t){var r=t.consumeArgs(2);return t.mode==="text"?{tokens:r[0],numArgs:0}:{tokens:r[1],numArgs:0}});var sb={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};x("\\char",function(t){var r=t.popToken(),e,n="";if(r.text==="'")e=8,r=t.popToken();else if(r.text==='"')e=16,r=t.popToken();else if(r.text==="`")if(r=t.popToken(),r.text[0]==="\\")n=r.text.charCodeAt(1);else{if(r.text==="EOF")throw new K("\\char` missing argument");n=r.text.charCodeAt(0)}else e=10;if(e){if(n=sb[r.text],n==null||n>=e)throw new K("Invalid base-"+e+" digit "+r.text);for(var i;(i=sb[t.future().text])!=null&&i{var n=t.consumeArg().tokens;if(n.length!==1)throw new K("\\newcommand's first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!r)throw new K("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!e)throw new K("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(n=t.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var s="",l=t.expandNextToken();l.text!=="]"&&l.text!=="EOF";)s+=l.text,l=t.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new K("Invalid number of arguments: "+s);o=parseInt(s),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:o}),""};x("\\newcommand",t=>Ym(t,!1,!0));x("\\renewcommand",t=>Ym(t,!0,!1));x("\\providecommand",t=>Ym(t,!0,!0));x("\\message",t=>{var r=t.consumeArgs(1)[0];return console.log(r.reverse().map(e=>e.text).join("")),""});x("\\errmessage",t=>{var r=t.consumeArgs(1)[0];return console.error(r.reverse().map(e=>e.text).join("")),""});x("\\show",t=>{var r=t.popToken(),e=r.text;return console.log(r,t.macros.get(e),ki[e],ut.math[e],ut.text[e]),""});x("\\bgroup","{");x("\\egroup","}");x("~","\\nobreakspace");x("\\lq","`");x("\\rq","'");x("\\aa","\\r a");x("\\AA","\\r A");x("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");x("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");x("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");x("ℬ","\\mathscr{B}");x("ℰ","\\mathscr{E}");x("ℱ","\\mathscr{F}");x("ℋ","\\mathscr{H}");x("ℐ","\\mathscr{I}");x("ℒ","\\mathscr{L}");x("ℳ","\\mathscr{M}");x("ℛ","\\mathscr{R}");x("ℭ","\\mathfrak{C}");x("ℌ","\\mathfrak{H}");x("ℨ","\\mathfrak{Z}");x("\\Bbbk","\\Bbb{k}");x("·","\\cdotp");x("\\llap","\\mathllap{\\textrm{#1}}");x("\\rlap","\\mathrlap{\\textrm{#1}}");x("\\clap","\\mathclap{\\textrm{#1}}");x("\\mathstrut","\\vphantom{(}");x("\\underbar","\\underline{\\text{#1}}");x("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');x("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");x("\\ne","\\neq");x("≠","\\neq");x("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");x("∉","\\notin");x("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");x("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");x("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");x("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");x("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");x("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");x("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");x("⟂","\\perp");x("‼","\\mathclose{!\\mkern-0.8mu!}");x("∌","\\notni");x("⌜","\\ulcorner");x("⌝","\\urcorner");x("⌞","\\llcorner");x("⌟","\\lrcorner");x("©","\\copyright");x("®","\\textregistered");x("️","\\textregistered");x("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');x("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');x("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');x("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');x("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");x("⋮","\\vdots");x("\\varGamma","\\mathit{\\Gamma}");x("\\varDelta","\\mathit{\\Delta}");x("\\varTheta","\\mathit{\\Theta}");x("\\varLambda","\\mathit{\\Lambda}");x("\\varXi","\\mathit{\\Xi}");x("\\varPi","\\mathit{\\Pi}");x("\\varSigma","\\mathit{\\Sigma}");x("\\varUpsilon","\\mathit{\\Upsilon}");x("\\varPhi","\\mathit{\\Phi}");x("\\varPsi","\\mathit{\\Psi}");x("\\varOmega","\\mathit{\\Omega}");x("\\substack","\\begin{subarray}{c}#1\\end{subarray}");x("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");x("\\boxed","\\fbox{$\\displaystyle{#1}$}");x("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");x("\\implies","\\DOTSB\\;\\Longrightarrow\\;");x("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var lb={",":"\\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"};x("\\dots",function(t){var r="\\dotso",e=t.expandAfterFuture().text;return e in lb?r=lb[e]:(e.slice(0,4)==="\\not"||e in ut.math&&ge.contains(["bin","rel"],ut.math[e].group))&&(r="\\dotsb"),r});var Xm={")":!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};x("\\dotso",function(t){var r=t.future().text;return r in Xm?"\\ldots\\,":"\\ldots"});x("\\dotsc",function(t){var r=t.future().text;return r in Xm&&r!==","?"\\ldots\\,":"\\ldots"});x("\\cdots",function(t){var r=t.future().text;return r in Xm?"\\@cdots\\,":"\\@cdots"});x("\\dotsb","\\cdots");x("\\dotsm","\\cdots");x("\\dotsi","\\!\\cdots");x("\\dotsx","\\ldots\\,");x("\\DOTSI","\\relax");x("\\DOTSB","\\relax");x("\\DOTSX","\\relax");x("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");x("\\,","\\tmspace+{3mu}{.1667em}");x("\\thinspace","\\,");x("\\>","\\mskip{4mu}");x("\\:","\\tmspace+{4mu}{.2222em}");x("\\medspace","\\:");x("\\;","\\tmspace+{5mu}{.2777em}");x("\\thickspace","\\;");x("\\!","\\tmspace-{3mu}{.1667em}");x("\\negthinspace","\\!");x("\\negmedspace","\\tmspace-{4mu}{.2222em}");x("\\negthickspace","\\tmspace-{5mu}{.277em}");x("\\enspace","\\kern.5em ");x("\\enskip","\\hskip.5em\\relax");x("\\quad","\\hskip1em\\relax");x("\\qquad","\\hskip2em\\relax");x("\\tag","\\@ifstar\\tag@literal\\tag@paren");x("\\tag@paren","\\tag@literal{({#1})}");x("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new K("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});x("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");x("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");x("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");x("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");x("\\newline","\\\\\\relax");x("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var N$=ee(En["Main-Regular"][84][1]-.7*En["Main-Regular"][65][1]);x("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+N$+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");x("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+N$+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");x("\\hspace","\\@ifstar\\@hspacer\\@hspace");x("\\@hspace","\\hskip #1\\relax");x("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");x("\\ordinarycolon",":");x("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");x("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');x("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');x("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');x("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');x("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');x("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');x("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');x("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');x("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');x("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');x("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');x("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');x("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');x("∷","\\dblcolon");x("∹","\\eqcolon");x("≔","\\coloneqq");x("≕","\\eqqcolon");x("⩴","\\Coloneqq");x("\\ratio","\\vcentcolon");x("\\coloncolon","\\dblcolon");x("\\colonequals","\\coloneqq");x("\\coloncolonequals","\\Coloneqq");x("\\equalscolon","\\eqqcolon");x("\\equalscoloncolon","\\Eqqcolon");x("\\colonminus","\\coloneq");x("\\coloncolonminus","\\Coloneq");x("\\minuscolon","\\eqcolon");x("\\minuscoloncolon","\\Eqcolon");x("\\coloncolonapprox","\\Colonapprox");x("\\coloncolonsim","\\Colonsim");x("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");x("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");x("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");x("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");x("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");x("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");x("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");x("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");x("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");x("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");x("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");x("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");x("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");x("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");x("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");x("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");x("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");x("\\nleqq","\\html@mathml{\\@nleqq}{≰}");x("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");x("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");x("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");x("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");x("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");x("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");x("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");x("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");x("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");x("\\imath","\\html@mathml{\\@imath}{ı}");x("\\jmath","\\html@mathml{\\@jmath}{ȷ}");x("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");x("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");x("⟦","\\llbracket");x("⟧","\\rrbracket");x("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");x("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");x("⦃","\\lBrace");x("⦄","\\rBrace");x("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");x("⦵","\\minuso");x("\\darr","\\downarrow");x("\\dArr","\\Downarrow");x("\\Darr","\\Downarrow");x("\\lang","\\langle");x("\\rang","\\rangle");x("\\uarr","\\uparrow");x("\\uArr","\\Uparrow");x("\\Uarr","\\Uparrow");x("\\N","\\mathbb{N}");x("\\R","\\mathbb{R}");x("\\Z","\\mathbb{Z}");x("\\alef","\\aleph");x("\\alefsym","\\aleph");x("\\Alpha","\\mathrm{A}");x("\\Beta","\\mathrm{B}");x("\\bull","\\bullet");x("\\Chi","\\mathrm{X}");x("\\clubs","\\clubsuit");x("\\cnums","\\mathbb{C}");x("\\Complex","\\mathbb{C}");x("\\Dagger","\\ddagger");x("\\diamonds","\\diamondsuit");x("\\empty","\\emptyset");x("\\Epsilon","\\mathrm{E}");x("\\Eta","\\mathrm{H}");x("\\exist","\\exists");x("\\harr","\\leftrightarrow");x("\\hArr","\\Leftrightarrow");x("\\Harr","\\Leftrightarrow");x("\\hearts","\\heartsuit");x("\\image","\\Im");x("\\infin","\\infty");x("\\Iota","\\mathrm{I}");x("\\isin","\\in");x("\\Kappa","\\mathrm{K}");x("\\larr","\\leftarrow");x("\\lArr","\\Leftarrow");x("\\Larr","\\Leftarrow");x("\\lrarr","\\leftrightarrow");x("\\lrArr","\\Leftrightarrow");x("\\Lrarr","\\Leftrightarrow");x("\\Mu","\\mathrm{M}");x("\\natnums","\\mathbb{N}");x("\\Nu","\\mathrm{N}");x("\\Omicron","\\mathrm{O}");x("\\plusmn","\\pm");x("\\rarr","\\rightarrow");x("\\rArr","\\Rightarrow");x("\\Rarr","\\Rightarrow");x("\\real","\\Re");x("\\reals","\\mathbb{R}");x("\\Reals","\\mathbb{R}");x("\\Rho","\\mathrm{P}");x("\\sdot","\\cdot");x("\\sect","\\S");x("\\spades","\\spadesuit");x("\\sub","\\subset");x("\\sube","\\subseteq");x("\\supe","\\supseteq");x("\\Tau","\\mathrm{T}");x("\\thetasym","\\vartheta");x("\\weierp","\\wp");x("\\Zeta","\\mathrm{Z}");x("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");x("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");x("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");x("\\bra","\\mathinner{\\langle{#1}|}");x("\\ket","\\mathinner{|{#1}\\rangle}");x("\\braket","\\mathinner{\\langle{#1}\\rangle}");x("\\Bra","\\left\\langle#1\\right|");x("\\Ket","\\left|#1\\right\\rangle");var R$=t=>r=>{var e=r.consumeArg().tokens,n=r.consumeArg().tokens,i=r.consumeArg().tokens,a=r.consumeArg().tokens,o=r.macros.get("|"),s=r.macros.get("\\|");r.macros.beginGroup();var l=h=>d=>{t&&(d.macros.set("|",o),i.length&&d.macros.set("\\|",s));var f=h;if(!h&&i.length){var v=d.future();v.text==="|"&&(d.popToken(),f=!0)}return{tokens:f?i:n,numArgs:0}};r.macros.set("|",l(!1)),i.length&&r.macros.set("\\|",l(!0));var u=r.consumeArg().tokens,c=r.expandTokens([...a,...u,...e]);return r.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};x("\\bra@ket",R$(!1));x("\\bra@set",R$(!0));x("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");x("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");x("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");x("\\angln","{\\angl n}");x("\\blue","\\textcolor{##6495ed}{#1}");x("\\orange","\\textcolor{##ffa500}{#1}");x("\\pink","\\textcolor{##ff00af}{#1}");x("\\red","\\textcolor{##df0030}{#1}");x("\\green","\\textcolor{##28ae7b}{#1}");x("\\gray","\\textcolor{gray}{#1}");x("\\purple","\\textcolor{##9d38bd}{#1}");x("\\blueA","\\textcolor{##ccfaff}{#1}");x("\\blueB","\\textcolor{##80f6ff}{#1}");x("\\blueC","\\textcolor{##63d9ea}{#1}");x("\\blueD","\\textcolor{##11accd}{#1}");x("\\blueE","\\textcolor{##0c7f99}{#1}");x("\\tealA","\\textcolor{##94fff5}{#1}");x("\\tealB","\\textcolor{##26edd5}{#1}");x("\\tealC","\\textcolor{##01d1c1}{#1}");x("\\tealD","\\textcolor{##01a995}{#1}");x("\\tealE","\\textcolor{##208170}{#1}");x("\\greenA","\\textcolor{##b6ffb0}{#1}");x("\\greenB","\\textcolor{##8af281}{#1}");x("\\greenC","\\textcolor{##74cf70}{#1}");x("\\greenD","\\textcolor{##1fab54}{#1}");x("\\greenE","\\textcolor{##0d923f}{#1}");x("\\goldA","\\textcolor{##ffd0a9}{#1}");x("\\goldB","\\textcolor{##ffbb71}{#1}");x("\\goldC","\\textcolor{##ff9c39}{#1}");x("\\goldD","\\textcolor{##e07d10}{#1}");x("\\goldE","\\textcolor{##a75a05}{#1}");x("\\redA","\\textcolor{##fca9a9}{#1}");x("\\redB","\\textcolor{##ff8482}{#1}");x("\\redC","\\textcolor{##f9685d}{#1}");x("\\redD","\\textcolor{##e84d39}{#1}");x("\\redE","\\textcolor{##bc2612}{#1}");x("\\maroonA","\\textcolor{##ffbde0}{#1}");x("\\maroonB","\\textcolor{##ff92c6}{#1}");x("\\maroonC","\\textcolor{##ed5fa6}{#1}");x("\\maroonD","\\textcolor{##ca337c}{#1}");x("\\maroonE","\\textcolor{##9e034e}{#1}");x("\\purpleA","\\textcolor{##ddd7ff}{#1}");x("\\purpleB","\\textcolor{##c6b9fc}{#1}");x("\\purpleC","\\textcolor{##aa87ff}{#1}");x("\\purpleD","\\textcolor{##7854ab}{#1}");x("\\purpleE","\\textcolor{##543b78}{#1}");x("\\mintA","\\textcolor{##f5f9e8}{#1}");x("\\mintB","\\textcolor{##edf2df}{#1}");x("\\mintC","\\textcolor{##e0e5cc}{#1}");x("\\grayA","\\textcolor{##f6f7f7}{#1}");x("\\grayB","\\textcolor{##f0f1f2}{#1}");x("\\grayC","\\textcolor{##e3e5e6}{#1}");x("\\grayD","\\textcolor{##d6d8da}{#1}");x("\\grayE","\\textcolor{##babec2}{#1}");x("\\grayF","\\textcolor{##888d93}{#1}");x("\\grayG","\\textcolor{##626569}{#1}");x("\\grayH","\\textcolor{##3b3e40}{#1}");x("\\grayI","\\textcolor{##21242c}{#1}");x("\\kaBlue","\\textcolor{##314453}{#1}");x("\\kaGreen","\\textcolor{##71B307}{#1}");var F$={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class KN{constructor(r,e,n){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=e,this.expansionCount=0,this.feed(r),this.macros=new VN(GN,e.macros),this.mode=n,this.stack=[]}feed(r){this.lexer=new ob(r,this.settings)}switchMode(r){this.mode=r}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(r){this.stack.push(r)}pushTokens(r){this.stack.push(...r)}scanArgument(r){var e,n,i;if(r){if(this.consumeSpaces(),this.future().text!=="[")return null;e=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:e,end:n}=this.consumeArg());return this.pushToken(new Xr("EOF",n.loc)),this.pushTokens(i),e.range(n,"")}consumeSpaces(){for(;;){var r=this.future();if(r.text===" ")this.stack.pop();else break}}consumeArg(r){var e=[],n=r&&r.length>0;n||this.consumeSpaces();var i=this.future(),a,o=0,s=0;do{if(a=this.popToken(),e.push(a),a.text==="{")++o;else if(a.text==="}"){if(--o,o===-1)throw new K("Extra }",a)}else if(a.text==="EOF")throw new K("Unexpected end of input in a macro argument, expected '"+(r&&n?r[s]:"}")+"'",a);if(r&&n)if((o===0||o===1&&r[s]==="{")&&a.text===r[s]){if(++s,s===r.length){e.splice(-s,s);break}}else s=0}while(o!==0||n);return i.text==="{"&&e[e.length-1].text==="}"&&(e.pop(),e.shift()),e.reverse(),{tokens:e,start:i,end:a}}consumeArgs(r,e){if(e){if(e.length!==r+1)throw new K("The length of delimiters doesn't match the number of args!");for(var n=e[0],i=0;ithis.settings.maxExpand)throw new K("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(r){var e=this.popToken(),n=e.text,i=e.noexpand?null:this._getExpansion(n);if(i==null||r&&i.unexpandable){if(r&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new K("Undefined control sequence: "+n);return this.pushToken(e),!1}this.countExpansion(1);var a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var s=a.length-1;s>=0;--s){var l=a[s];if(l.text==="#"){if(s===0)throw new K("Incomplete placeholder at end of macro body",l);if(l=a[--s],l.text==="#")a.splice(s+1,1);else if(/^[1-9]$/.test(l.text))a.splice(s,2,...o[+l.text-1]);else throw new K("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 r=this.stack.pop();return r.treatAsRelax&&(r.text="\\relax"),r}throw new Error}expandMacro(r){return this.macros.has(r)?this.expandTokens([new Xr(r)]):void 0}expandTokens(r){var e=[],n=this.stack.length;for(this.pushTokens(r);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),e.push(i)}return this.countExpansion(e.length),e}expandMacroAsText(r){var e=this.expandMacro(r);return e&&e.map(n=>n.text).join("")}_getExpansion(r){var e=this.macros.get(r);if(e==null)return e;if(r.length===1){var n=this.lexer.catcodes[r];if(n!=null&&n!==13)return}var i=typeof e=="function"?e(this):e;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var o=i.replace(/##/g,"");o.indexOf("#"+(a+1))!==-1;)++a;for(var s=new ob(i,this.settings),l=[],u=s.lex();u.text!=="EOF";)l.push(u),u=s.lex();l.reverse();var c={tokens:l,numArgs:a};return c}return i}isDefined(r){return this.macros.has(r)||ki.hasOwnProperty(r)||ut.math.hasOwnProperty(r)||ut.text.hasOwnProperty(r)||F$.hasOwnProperty(r)}isExpandable(r){var e=this.macros.get(r);return e!=null?typeof e=="string"||typeof e=="function"||!e.unexpandable:ki.hasOwnProperty(r)&&!ki[r].primitive}}var ub=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Nu=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),pd={"́":{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"}},cb={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Fh{constructor(r,e){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 KN(r,e,this.mode),this.settings=e,this.leftrightDepth=0}expect(r,e){if(e===void 0&&(e=!0),this.fetch().text!==r)throw new K("Expected '"+r+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(r){this.mode=r,this.gullet.switchMode(r)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var r=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),r}finally{this.gullet.endGroups()}}subparse(r){var e=this.nextToken;this.consume(),this.gullet.pushToken(new Xr("}")),this.gullet.pushTokens(r);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=e,n}parseExpression(r,e){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(Fh.endOfExpression.indexOf(i.text)!==-1||e&&i.text===e||r&&ki[i.text]&&ki[i.text].infix)break;var a=this.parseAtom(e);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(r){for(var e=-1,n,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',r);var s=ut[this.mode][e].group,l=Dr.range(r),u;if(RD.hasOwnProperty(s)){var c=s;u={type:"atom",mode:this.mode,family:c,loc:l,text:e}}else u={type:s,mode:this.mode,loc:l,text:e};o=u}else if(e.charCodeAt(0)>=128)this.settings.strict&&(V7(e.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',r):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'"'+(" ("+e.charCodeAt(0)+")"),r)),o={type:"textord",mode:"text",loc:Dr.range(r),text:e};else return null;if(this.consume(),a)for(var h=0;hu&&(u=c):c&&(u!==void 0&&u>-1&&l.push(` `.repeat(u)||" "),u=-1,l.push(c))}return l.join("")}function q$(t,r,e){return t.type==="element"?kR(t,r,e):t.type==="text"?e.whitespace==="normal"?U$(t,e):SR(t):[]}function kR(t,r,e){const n=V$(t,e),i=t.children||[];let a=-1,o=[];if($R(t))return o;let s,l;for(ep(t)||bb(t)&&pb(r,t,bb)?l=` -`:wR(t)?(s=2,l=2):W$(t)&&(s=1,l=1);++a0&&(a.properties.rel=[...d]),f&&(a.properties.target=f),c){const g=Ts(r.contentProperties,a)||{};a.children.push({type:"element",tagName:"span",properties:ca(g),children:ca(c)})}}}})}}function Ts(t,r){return typeof t=="function"?t(r):t}function gd({content:t,name:r="Assistant",format:e,onOptionClick:n,extComponent:i}){const a=Ke.useRef(),o=()=>{var s,l;try{const u=JSON.parse(t),c=((l=(s=u.ext)==null?void 0:s.find(h=>h.type==="guides"))==null?void 0:l.data)||[];return C.jsxs("div",{className:"space-y-3",children:[e==="markdown"&&u.text?C.jsx("div",{ref:a,children:C.jsx(RP,{rehypePlugins:[[zR,{target:"_blank"}],PR],remarkPlugins:[UM,QN],className:`prose prose-xs prose-neutral prose-a:text-accent-foreground/50 break-words [&>*]:!my-1 leading-relaxed text-xs +`:wR(t)?(s=2,l=2):W$(t)&&(s=1,l=1);++a0&&(a.properties.rel=[...d]),f&&(a.properties.target=f),c){const m=Ts(r.contentProperties,a)||{};a.children.push({type:"element",tagName:"span",properties:ca(m),children:ca(c)})}}}})}}function Ts(t,r){return typeof t=="function"?t(r):t}function gd({content:t,name:r="Assistant",format:e,onOptionClick:n,extComponent:i}){const a=Ve.useRef(),o=()=>{var s,l;try{const u=JSON.parse(t),c=((l=(s=u.ext)==null?void 0:s.find(h=>h.type==="guides"))==null?void 0:l.data)||[];return C.jsxs("div",{className:"space-y-3",children:[e==="markdown"&&u.text?C.jsx("div",{ref:a,children:C.jsx(RP,{rehypePlugins:[[zR,{target:"_blank"}],PR],remarkPlugins:[UM,QN],className:`prose prose-xs prose-neutral prose-a:text-accent-foreground/50 break-words [&>*]:!my-1 leading-relaxed text-xs prose-headings:font-semibold prose-h1:text-base prose-h2:text-sm @@ -332,17 +332,17 @@ l0,-`+(e+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, prose-ol:text-xs prose-li:text-xs prose-code:text-xs - prose-pre:text-xs`,components:{p:({children:h})=>C.jsx("p",{className:"!my-0.5 leading-relaxed text-xs",children:h}),h1:({children:h})=>C.jsx("h1",{className:"text-base font-semibold !my-1",children:h}),h2:({children:h})=>C.jsx("h2",{className:"text-sm font-semibold !my-1",children:h}),h3:({children:h})=>C.jsx("h3",{className:"text-xs font-semibold !my-1",children:h}),h4:({children:h})=>C.jsx("h4",{className:"text-xs font-semibold !my-1",children:h}),table:({children:h})=>C.jsx("table",{className:"border-solid border border-[#979797] w-[100%] text-xs",children:h}),th:({children:h})=>C.jsx("th",{className:"border-solid bg-[#E5E7ED] dark:bg-[#FFFFFF] dark:text-[#000000] border border-[#979797] text-center pt-2 text-xs",children:h}),td:({children:h})=>{if(Array.isArray(h)&&(h==null?void 0:h.length)>0){const d=[],f=h.length;for(let v=0;v"?d.push(C.jsx("br",{})):d.push(h[v]);h=d}return C.jsx("td",{className:"border-solid border border-[#979797] text-center text-xs",children:h})},code:({children:h})=>C.jsx("code",{className:"text-xs bg-gray-100 rounded px-1",children:h}),pre:({children:h})=>C.jsx("pre",{className:"text-xs bg-gray-100 rounded p-2 overflow-x-auto",children:h}),img:({node:h,...d})=>C.jsx("img",{...d,loading:"lazy",className:"w-1/2 h-auto mx-auto block",onError:f=>{console.warn("Image failed to load:",d.src,"Error:",f),f.currentTarget.style.display="none"}})},children:u.text})}):u.text?C.jsx("p",{className:"whitespace-pre-wrap text-left",children:u.text}):null,c.length>0&&C.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:c.map((h,d)=>C.jsx("button",{className:"px-3 py-1.5 bg-white text-gray-700 rounded-md hover:bg-gray-50 transition-colors text-[12px] w-[calc(50%-0.25rem)]",onClick:()=>n==null?void 0:n(h),children:h},d))}),i]})}catch{return C.jsx("p",{className:"whitespace-pre-wrap text-left",children:t})}};return C.jsx(pm,{name:r,children:C.jsx("div",{className:"w-full rounded-lg bg-gray-50 p-4 text-gray-700 text-sm break-words overflow-hidden",children:o()})})}function BR({content:t,name:r="Assistant",avatar:e,latestInput:n,installedNodes:i,onAddMessage:a}){var c,h;const s=((h=(c=JSON.parse(t).ext)==null?void 0:c.find(d=>d.type==="workflow"))==null?void 0:h.data)||[],l=async d=>{if(!d.id){console.error("No workflow id provided");return}try{const f=await _i.getOptimizedWorkflow(d.id,n);if(f.workflow){const v=new Set;for(const b of f.workflow.nodes)v.add(b.type);const g=Array.from(v).filter(b=>!i.includes(b));if(console.log("[WorkflowOption] Missing node types:",g),g.length>0)try{console.log("[WorkflowOption] Fetching info for missing nodes");const b=await _i.batchGetNodeInfo(g);console.log("[WorkflowOption] Received node infos:",b);const y={text:"",ext:[{type:"node_install_guide",data:b.map(k=>({name:k.name,repository_url:k.github_url}))}]},$={id:br(),role:"ai",content:JSON.stringify(y),format:"markdown",name:"Assistant",metadata:{pendingWorkflow:f.workflow,optimizedParams:f.optimized_params}};a==null||a($);return}catch(b){console.error("[WorkflowOption] Error fetching node info:",b),alert("Error checking required nodes. Please try again.");return}u(f.workflow,f.optimized_params)}}catch(f){console.error("Failed to optimize workflow:",f)}},u=(d,f)=>{sr.loadGraphData(d);for(const[g,b,y,$,k]of f){const _=sr.graph._nodes_by_id[g].widgets;for(const P of _)P.name===$&&(P.value=k)}sr.graph.setDirtyCanvas(!1,!0);const v={id:br(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};a==null||a(v)};return C.jsx("div",{className:"space-y-3",children:s.length>0&&C.jsx("div",{className:"flex flex-col space-y-4",children:s.map((d,f)=>C.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg border border-gray-200 hover:bg-gray-50",children:[d.image&&C.jsx("img",{src:d.image,alt:d.name,className:"w-14 h-14 object-cover rounded-lg",onError:v=>{const g=v.target;g.onerror=null,g.src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56' fill='none'%3E%3Crect width='56' height='56' fill='%23F3F4F6'/%3E%3Cpath d='M28 28C30.2091 28 32 26.2091 32 24C32 21.7909 30.2091 20 28 20C25.7909 20 24 21.7909 24 24C24 26.2091 25.7909 28 28 28Z' fill='%239CA3AF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18.7253 37.6307C19.8278 35.1533 22.6897 33.6 26 33.6H30C33.3103 33.6 36.1722 35.1533 37.2747 37.6307C37.6419 38.4561 37.0611 39.2 36.1694 39.2H19.8306C18.9389 39.2 18.3581 38.4561 18.7253 37.6307Z' fill='%239CA3AF'/%3E%3C/svg%3E"}}),C.jsxs("div",{className:"flex-1 break-words flex flex-col h-[4.5rem] justify-between",children:[C.jsx("div",{children:C.jsx("h3",{className:"font-medium text-sm line-clamp-2 h-10 overflow-hidden",children:d.name})}),C.jsxs("div",{className:"flex justify-between items-center mt-1",children:[d.description&&C.jsxs("div",{className:"relative group",children:[C.jsx("div",{className:"w-5 h-5 flex items-center justify-center text-gray-500 cursor-help",children:C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-4 h-4",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})})}),C.jsx("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block",children:C.jsx("div",{className:"bg-gray-900 text-white text-xs rounded-md py-1 px-2 max-w-xs",children:d.description})})]}),C.jsx("button",{onClick:()=>l(d),className:"px-3 py-1.5 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors text-xs",children:"Accept"})]})]})]},f))})})}function LR({content:t,name:r="Assistant",avatar:e,installedNodes:n}){var d,f;const i=JSON.parse(t),[a,o]=Ke.useState(null),s=((f=(d=i.ext)==null?void 0:d.find(v=>v.type==="node"))==null?void 0:f.data)||[],l=v=>n.some(g=>g===v),u=s.filter(v=>l(v.name)),c=s.filter(v=>!l(v.name)),h=v=>v>=1e4?`${(v/1e4).toFixed(1)}w`:v>=1e3?`${(v/1e3).toFixed(1)}k`:v.toString();return C.jsxs("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[u.length>0&&C.jsxs("div",{className:"space-y-3",children:[C.jsx("p",{className:"text-xs font-medium",children:"Installed nodes:"}),C.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:u.map(v=>C.jsxs("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 + prose-pre:text-xs`,components:{p:({children:h})=>C.jsx("p",{className:"!my-0.5 leading-relaxed text-xs",children:h}),h1:({children:h})=>C.jsx("h1",{className:"text-base font-semibold !my-1",children:h}),h2:({children:h})=>C.jsx("h2",{className:"text-sm font-semibold !my-1",children:h}),h3:({children:h})=>C.jsx("h3",{className:"text-xs font-semibold !my-1",children:h}),h4:({children:h})=>C.jsx("h4",{className:"text-xs font-semibold !my-1",children:h}),table:({children:h})=>C.jsx("table",{className:"border-solid border border-[#979797] w-[100%] text-xs",children:h}),th:({children:h})=>C.jsx("th",{className:"border-solid bg-[#E5E7ED] dark:bg-[#FFFFFF] dark:text-[#000000] border border-[#979797] text-center pt-2 text-xs",children:h}),td:({children:h})=>{if(Array.isArray(h)&&(h==null?void 0:h.length)>0){const d=[],f=h.length;for(let v=0;v"?d.push(C.jsx("br",{})):d.push(h[v]);h=d}return C.jsx("td",{className:"border-solid border border-[#979797] text-center text-xs",children:h})},code:({children:h})=>C.jsx("code",{className:"text-xs bg-gray-100 rounded px-1",children:h}),pre:({children:h})=>C.jsx("pre",{className:"text-xs bg-gray-100 rounded p-2 overflow-x-auto",children:h}),img:({node:h,...d})=>C.jsx("img",{...d,loading:"lazy",className:"w-1/2 h-auto mx-auto block",onError:f=>{console.warn("Image failed to load:",d.src,"Error:",f),f.currentTarget.style.display="none"}})},children:u.text})}):u.text?C.jsx("p",{className:"whitespace-pre-wrap text-left",children:u.text}):null,c.length>0&&C.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:c.map((h,d)=>C.jsx("button",{className:"px-3 py-1.5 bg-white text-gray-700 rounded-md hover:bg-gray-50 transition-colors text-[12px] w-[calc(50%-0.25rem)]",onClick:()=>n==null?void 0:n(h),children:h},d))}),i]})}catch{return C.jsx("p",{className:"whitespace-pre-wrap text-left",children:t})}};return C.jsx(pm,{name:r,children:C.jsx("div",{className:"w-full rounded-lg bg-gray-50 p-4 text-gray-700 text-sm break-words overflow-hidden",children:o()})})}function BR({content:t,name:r="Assistant",avatar:e,latestInput:n,installedNodes:i,onAddMessage:a}){var c,h;const s=((h=(c=JSON.parse(t).ext)==null?void 0:c.find(d=>d.type==="workflow"))==null?void 0:h.data)||[],l=async d=>{if(!d.id){console.error("No workflow id provided");return}try{const f=await _i.getOptimizedWorkflow(d.id,n);if(f.workflow){const v=new Set;for(const b of f.workflow.nodes)v.add(b.type);const m=Array.from(v).filter(b=>!i.includes(b));if(console.log("[WorkflowOption] Missing node types:",m),m.length>0)try{console.log("[WorkflowOption] Fetching info for missing nodes");const b=await _i.batchGetNodeInfo(m);console.log("[WorkflowOption] Received node infos:",b);const y={text:"",ext:[{type:"node_install_guide",data:b.map(k=>({name:k.name,repository_url:k.github_url}))}]},$={id:br(),role:"ai",content:JSON.stringify(y),format:"markdown",name:"Assistant",metadata:{pendingWorkflow:f.workflow,optimizedParams:f.optimized_params}};a==null||a($);return}catch(b){console.error("[WorkflowOption] Error fetching node info:",b),alert("Error checking required nodes. Please try again.");return}u(f.workflow,f.optimized_params)}}catch(f){console.error("Failed to optimize workflow:",f)}},u=(d,f)=>{sr.loadGraphData(d);for(const[m,b,y,$,k]of f){const O=sr.graph._nodes_by_id[m].widgets;for(const P of O)P.name===$&&(P.value=k)}sr.graph.setDirtyCanvas(!1,!0);const v={id:br(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};a==null||a(v)};return C.jsx("div",{className:"space-y-3",children:s.length>0&&C.jsx("div",{className:"flex flex-col space-y-4",children:s.map((d,f)=>C.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg border border-gray-200 hover:bg-gray-50",children:[d.image&&C.jsx("img",{src:d.image,alt:d.name,className:"w-14 h-14 object-cover rounded-lg",onError:v=>{const m=v.target;m.onerror=null,m.src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56' fill='none'%3E%3Crect width='56' height='56' fill='%23F3F4F6'/%3E%3Cpath d='M28 28C30.2091 28 32 26.2091 32 24C32 21.7909 30.2091 20 28 20C25.7909 20 24 21.7909 24 24C24 26.2091 25.7909 28 28 28Z' fill='%239CA3AF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18.7253 37.6307C19.8278 35.1533 22.6897 33.6 26 33.6H30C33.3103 33.6 36.1722 35.1533 37.2747 37.6307C37.6419 38.4561 37.0611 39.2 36.1694 39.2H19.8306C18.9389 39.2 18.3581 38.4561 18.7253 37.6307Z' fill='%239CA3AF'/%3E%3C/svg%3E"}}),C.jsxs("div",{className:"flex-1 break-words flex flex-col h-[4.5rem] justify-between",children:[C.jsx("div",{children:C.jsx("h3",{className:"font-medium text-sm line-clamp-2 h-10 overflow-hidden",children:d.name})}),C.jsxs("div",{className:"flex justify-between items-center mt-1",children:[d.description&&C.jsxs("div",{className:"relative group",children:[C.jsx("div",{className:"w-5 h-5 flex items-center justify-center text-gray-500 cursor-help",children:C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-4 h-4",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})})}),C.jsx("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block",children:C.jsx("div",{className:"bg-gray-900 text-white text-xs rounded-md py-1 px-2 max-w-xs",children:d.description})})]}),C.jsx("button",{onClick:()=>l(d),className:"px-3 py-1.5 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors text-xs",children:"Accept"})]})]})]},f))})})}function LR({content:t,name:r="Assistant",avatar:e,installedNodes:n}){var d,f;const i=JSON.parse(t),[a,o]=Ve.useState(null),s=((f=(d=i.ext)==null?void 0:d.find(v=>v.type==="node"))==null?void 0:f.data)||[],l=v=>n.some(m=>m===v),u=s.filter(v=>l(v.name)),c=s.filter(v=>!l(v.name)),h=v=>v>=1e4?`${(v/1e4).toFixed(1)}w`:v>=1e3?`${(v/1e3).toFixed(1)}k`:v.toString();return C.jsxs("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[u.length>0&&C.jsxs("div",{className:"space-y-3",children:[C.jsx("p",{className:"text-xs font-medium",children:"Installed nodes:"}),C.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:u.map(v=>C.jsxs("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 hover:shadow-sm transition-all duration-200 relative group`,onMouseEnter:()=>o(v.name),onMouseLeave:()=>o(null),children:[C.jsx("h3",{className:"text-sm font-medium text-gray-800 mb-4",children:v.name}),C.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[C.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[C.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{d:"M12 .25a.75.75 0 0 1 .673.418l3.058 6.197 6.839.994a.75.75 0 0 1 .415 1.279l-4.948 4.823 1.168 6.811a.75.75 0 0 1-1.088.791L12 18.347l-6.117 3.216a.75.75 0 0 1-1.088-.79l1.168-6.812-4.948-4.823a.75.75 0 0 1 .416-1.28l6.838-.993L11.327.668A.75.75 0 0 1 12 .25z"})}),C.jsx("span",{children:h(v.github_stars||0)})]}),C.jsxs("button",{className:`px-2 py-1 bg-blue-500 text-white rounded-md - hover:bg-blue-600 transition-colors text-[10px] flex items-center gap-1`,onClick:()=>{const g=sr.addNodeOnGraph({name:v.name});g&&g.connect(v.from_index,g,v.to_index)},children:[C.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add to Canvas"]})]}),a===v.name&&v.description&&C.jsxs("div",{className:`fixed transform -translate-y-full z-[9999] w-64 p-2 + hover:bg-blue-600 transition-colors text-[10px] flex items-center gap-1`,onClick:()=>{const m=sr.addNodeOnGraph({name:v.name});m&&m.connect(v.from_index,m,v.to_index)},children:[C.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add to Canvas"]})]}),a===v.name&&v.description&&C.jsxs("div",{className:`fixed transform -translate-y-full z-[9999] w-64 p-2 bg-gray-800 text-white text-xs rounded-md shadow-lg mb-2`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:[v.description,C.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 border-4 border-transparent border-t-gray-800`})]})]},v.name))})]}),c.length>0&&C.jsxs("div",{className:`space-y-3 ${u.length>0?"mt-4":""}`,children:[C.jsx("p",{className:"text-xs font-medium",children:"Uninstalled nodes:"}),C.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:c.map(v=>C.jsxs("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 hover:shadow-sm transition-all duration-200 relative group`,onMouseEnter:()=>o(v.name),onMouseLeave:()=>o(null),children:[C.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:v.name}),C.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[C.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[C.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{d:"M12 .25a.75.75 0 0 1 .673.418l3.058 6.197 6.839.994a.75.75 0 0 1 .415 1.279l-4.948 4.823 1.168 6.811a.75.75 0 0 1-1.088.791L12 18.347l-6.117 3.216a.75.75 0 0 1-1.088-.79l1.168-6.812-4.948-4.823a.75.75 0 0 1 .416-1.28l6.838-.993L11.327.668A.75.75 0 0 1 12 .25z"})}),C.jsx("span",{children:h(v.github_stars||0)})]}),C.jsxs("a",{href:v.github_url,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-white text-gray-900 rounded-md border border-gray-900 hover:bg-gray-100 transition-colors text-[10px] flex items-center gap-1`,children:[C.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download"]})]}),a===v.name&&v.description&&C.jsxs("div",{className:`fixed transform -translate-y-full z-[9999] w-64 p-2 bg-gray-800 text-white text-xs rounded-md shadow-lg mb-2`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:[v.description,C.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 - border-4 border-transparent border-t-gray-800`})]})]},v.name))})]})]})}function jR({content:t,name:r="Assistant",avatar:e,installedNodes:n}){var u,c,h;const i=JSON.parse(t),[a,o]=Ke.useState(null),s=((c=(u=i.ext)==null?void 0:u.find(d=>d.type==="node"))==null?void 0:c.data)||[],l=d=>n.some(f=>f===d);return C.jsxs("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[s.length>0&&C.jsxs("div",{className:"space-y-3",children:[C.jsx("p",{className:"text-xs",children:"Recommended downstream nodes that can be connected:"}),C.jsx("div",{className:"flex flex-wrap gap-2",children:s.map(d=>{const f=l(d.name);return C.jsxs("div",{className:"relative group",children:[f?C.jsx("button",{className:`px-3 py-1.5 bg-blue-500 text-white rounded-md - hover:bg-blue-600 transition-colors text-xs`,onClick:()=>{const v=sr.addNodeOnGraph({name:d.name});if(v){const g=Object.values(sr.canvas.selected_nodes)[0];g&&g.connect(d.from_index,v,d.to_index)}},onMouseEnter:()=>o(d.name),onMouseLeave:()=>o(null),children:d.name}):C.jsx("a",{href:d.github_url,target:"_blank",rel:"noopener noreferrer",className:`px-3 py-1.5 bg-gray-100 text-gray-700 rounded-md + border-4 border-transparent border-t-gray-800`})]})]},v.name))})]})]})}function jR({content:t,name:r="Assistant",avatar:e,installedNodes:n}){var u,c,h;const i=JSON.parse(t),[a,o]=Ve.useState(null),s=((c=(u=i.ext)==null?void 0:u.find(d=>d.type==="node"))==null?void 0:c.data)||[],l=d=>n.some(f=>f===d);return C.jsxs("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[s.length>0&&C.jsxs("div",{className:"space-y-3",children:[C.jsx("p",{className:"text-xs",children:"Recommended downstream nodes that can be connected:"}),C.jsx("div",{className:"flex flex-wrap gap-2",children:s.map(d=>{const f=l(d.name);return C.jsxs("div",{className:"relative group",children:[f?C.jsx("button",{className:`px-3 py-1.5 bg-blue-500 text-white rounded-md + hover:bg-blue-600 transition-colors text-xs`,onClick:()=>{const v=sr.addNodeOnGraph({name:d.name});if(v){const m=Object.values(sr.canvas.selected_nodes)[0];m&&m.connect(d.from_index,v,d.to_index)}},onMouseEnter:()=>o(d.name),onMouseLeave:()=>o(null),children:d.name}):C.jsx("a",{href:d.github_url,target:"_blank",rel:"noopener noreferrer",className:`px-3 py-1.5 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition-colors text-xs border border-gray-200`,onMouseEnter:()=>o(d.name),onMouseLeave:()=>o(null),children:d.name}),a===d.name&&d.description&&C.jsxs("div",{className:`fixed transform -translate-y-full z-[9999] w-64 p-2 bg-gray-800 text-white text-xs @@ -376,9 +376,9 @@ l0,-`+(e+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, * http://opensource.org/licenses/MIT * * vis.js may be distributed under either license. - */function zh(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var yd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var G$={exports:{}},Ru=function(t){return t&&t.Math===Math&&t},dt=Ru(typeof globalThis=="object"&&globalThis)||Ru(typeof window=="object"&&window)||Ru(typeof self=="object"&&self)||Ru(typeof yd=="object"&&yd)||function(){return this}()||yd||Function("return this")(),Ye=function(t){try{return!!t()}catch{return!0}},HR=Ye,Il=!HR(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),WR=Il,K$=Function.prototype,wb=K$.apply,$b=K$.call,Yo=typeof Reflect=="object"&&Reflect.apply||(WR?$b.bind(wb):function(){return $b.apply(wb,arguments)}),Y$=Il,X$=Function.prototype,tp=X$.call,qR=Y$&&X$.bind.bind(tp,tp),ct=Y$?qR:function(t){return function(){return tp.apply(t,arguments)}},J$=ct,UR=J$({}.toString),VR=J$("".slice),Ui=function(t){return VR(UR(t),8,-1)},GR=Ui,KR=ct,Z$=function(t){if(GR(t)==="Function")return KR(t)},rp=typeof document=="object"&&document.all,YR=typeof rp>"u"&&rp!==void 0,Q$={all:rp,IS_HTMLDDA:YR},e8=Q$,XR=e8.all,wt=e8.IS_HTMLDDA?function(t){return typeof t=="function"||t===XR}:function(t){return typeof t=="function"},Ma={},JR=Ye,jt=!JR(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ZR=Il,Fu=Function.prototype.call,Ht=ZR?Fu.bind(Fu):function(){return Fu.apply(Fu,arguments)},Bh={},t8={}.propertyIsEnumerable,r8=Object.getOwnPropertyDescriptor,QR=r8&&!t8.call({1:2},1);Bh.f=QR?function(r){var e=r8(this,r);return!!e&&e.enumerable}:t8;var Da=function(t,r){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:r}},eF=ct,tF=Ye,rF=Ui,bd=Object,nF=eF("".split),Lh=tF(function(){return!bd("z").propertyIsEnumerable(0)})?function(t){return rF(t)==="String"?nF(t,""):bd(t)}:bd,Xo=function(t){return t==null},iF=Xo,aF=TypeError,e1=function(t){if(iF(t))throw new aF("Can't call method on "+t);return t},oF=Lh,sF=e1,Rn=function(t){return oF(sF(t))},xb=wt,n8=Q$,lF=n8.all,Jt=n8.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:xb(t)||t===lF}:function(t){return typeof t=="object"?t!==null:xb(t)},ft={},wd=ft,$d=dt,uF=wt,kb=function(t){return uF(t)?t:void 0},dr=function(t,r){return arguments.length<2?kb(wd[t])||kb($d[t]):wd[t]&&wd[t][r]||$d[t]&&$d[t][r]},cF=ct,Nt=cF({}.isPrototypeOf),Vi=typeof navigator<"u"&&String(navigator.userAgent)||"",i8=dt,xd=Vi,Sb=i8.process,Eb=i8.Deno,Tb=Sb&&Sb.versions||Eb&&Eb.version,_b=Tb&&Tb.v8,un,Qc;_b&&(un=_b.split("."),Qc=un[0]>0&&un[0]<4?1:+(un[0]+un[1]));!Qc&&xd&&(un=xd.match(/Edge\/(\d+)/),(!un||un[1]>=74)&&(un=xd.match(/Chrome\/(\d+)/),un&&(Qc=+un[1])));var Jo=Qc,Ob=Jo,hF=Ye,dF=dt,fF=dF.String,Zo=!!Object.getOwnPropertySymbols&&!hF(function(){var t=Symbol("symbol detection");return!fF(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Ob&&Ob<41}),vF=Zo,a8=vF&&!Symbol.sham&&typeof Symbol.iterator=="symbol",pF=dr,mF=wt,gF=Nt,yF=a8,bF=Object,Cl=yF?function(t){return typeof t=="symbol"}:function(t){var r=pF("Symbol");return mF(r)&&gF(r.prototype,bF(t))},wF=String,Qo=function(t){try{return wF(t)}catch{return"Object"}},$F=wt,xF=Qo,kF=TypeError,_r=function(t){if($F(t))return t;throw new kF(xF(t)+" is not a function")},SF=_r,EF=Xo,t1=function(t,r){var e=t[r];return EF(e)?void 0:SF(e)},kd=Ht,Sd=wt,Ed=Jt,TF=TypeError,_F=function(t,r){var e,n;if(r==="string"&&Sd(e=t.toString)&&!Ed(n=kd(e,t))||Sd(e=t.valueOf)&&!Ed(n=kd(e,t))||r!=="string"&&Sd(e=t.toString)&&!Ed(n=kd(e,t)))return n;throw new TF("Can't convert object to primitive value")},o8={exports:{}},OF=!0,Ib=dt,IF=Object.defineProperty,CF=function(t,r){try{IF(Ib,t,{value:r,configurable:!0,writable:!0})}catch{Ib[t]=r}return r},PF=dt,AF=CF,Cb="__core-js_shared__",MF=PF[Cb]||AF(Cb,{}),r1=MF,Pb=r1;(o8.exports=function(t,r){return Pb[t]||(Pb[t]=r!==void 0?r:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var es=o8.exports,DF=e1,NF=Object,Or=function(t){return NF(DF(t))},RF=ct,FF=Or,zF=RF({}.hasOwnProperty),Rt=Object.hasOwn||function(r,e){return zF(FF(r),e)},BF=ct,LF=0,jF=Math.random(),HF=BF(1 .toString),jh=function(t){return"Symbol("+(t===void 0?"":t)+")_"+HF(++LF+jF,36)},WF=dt,qF=es,Ab=Rt,UF=jh,VF=Zo,GF=a8,co=WF.Symbol,Td=qF("wks"),KF=GF?co.for||co:co&&co.withoutSetter||UF,mt=function(t){return Ab(Td,t)||(Td[t]=VF&&Ab(co,t)?co[t]:KF("Symbol."+t)),Td[t]},YF=Ht,Mb=Jt,Db=Cl,XF=t1,JF=_F,ZF=mt,QF=TypeError,ez=ZF("toPrimitive"),tz=function(t,r){if(!Mb(t)||Db(t))return t;var e=XF(t,ez),n;if(e){if(r===void 0&&(r="default"),n=YF(e,t,r),!Mb(n)||Db(n))return n;throw new QF("Can't convert object to primitive value")}return r===void 0&&(r="number"),JF(t,r)},rz=tz,nz=Cl,Hh=function(t){var r=rz(t,"string");return nz(r)?r:r+""},iz=dt,Nb=Jt,np=iz.document,az=Nb(np)&&Nb(np.createElement),n1=function(t){return az?np.createElement(t):{}},oz=jt,sz=Ye,lz=n1,s8=!oz&&!sz(function(){return Object.defineProperty(lz("div"),"a",{get:function(){return 7}}).a!==7}),uz=jt,cz=Ht,hz=Bh,dz=Da,fz=Rn,vz=Hh,pz=Rt,mz=s8,Rb=Object.getOwnPropertyDescriptor;Ma.f=uz?Rb:function(r,e){if(r=fz(r),e=vz(e),mz)try{return Rb(r,e)}catch{}if(pz(r,e))return dz(!cz(hz.f,r,e),r[e])};var gz=Ye,yz=wt,bz=/#|\.prototype\./,Pl=function(t,r){var e=$z[wz(t)];return e===kz?!0:e===xz?!1:yz(r)?gz(r):!!r},wz=Pl.normalize=function(t){return String(t).replace(bz,".").toLowerCase()},$z=Pl.data={},xz=Pl.NATIVE="N",kz=Pl.POLYFILL="P",l8=Pl,Fb=Z$,Sz=_r,Ez=Il,Tz=Fb(Fb.bind),Gi=function(t,r){return Sz(t),r===void 0?t:Ez?Tz(t,r):function(){return t.apply(r,arguments)}},Ir={},_z=jt,Oz=Ye,u8=_z&&Oz(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Iz=Jt,Cz=String,Pz=TypeError,Br=function(t){if(Iz(t))return t;throw new Pz(Cz(t)+" is not an object")},Az=jt,Mz=s8,Dz=u8,zu=Br,zb=Hh,Nz=TypeError,_d=Object.defineProperty,Rz=Object.getOwnPropertyDescriptor,Od="enumerable",Id="configurable",Cd="writable";Ir.f=Az?Dz?function(r,e,n){if(zu(r),e=zb(e),zu(n),typeof r=="function"&&e==="prototype"&&"value"in n&&Cd in n&&!n[Cd]){var i=Rz(r,e);i&&i[Cd]&&(r[e]=n.value,n={configurable:Id in n?n[Id]:i[Id],enumerable:Od in n?n[Od]:i[Od],writable:!1})}return _d(r,e,n)}:_d:function(r,e,n){if(zu(r),e=zb(e),zu(n),Mz)try{return _d(r,e,n)}catch{}if("get"in n||"set"in n)throw new Nz("Accessors not supported");return"value"in n&&(r[e]=n.value),r};var Fz=jt,zz=Ir,Bz=Da,hi=Fz?function(t,r,e){return zz.f(t,r,Bz(1,e))}:function(t,r,e){return t[r]=e,t},Bu=dt,Lz=Yo,jz=Z$,Hz=wt,Wz=Ma.f,qz=l8,Ja=ft,Uz=Gi,Za=hi,Bb=Rt,Vz=function(t){var r=function(e,n,i){if(this instanceof r){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return Lz(t,this,arguments)};return r.prototype=t.prototype,r},ke=function(t,r){var e=t.target,n=t.global,i=t.stat,a=t.proto,o=n?Bu:i?Bu[e]:(Bu[e]||{}).prototype,s=n?Ja:Ja[e]||Za(Ja,e,{})[e],l=s.prototype,u,c,h,d,f,v,g,b,y;for(d in r)u=qz(n?d:e+(i?".":"#")+d,t.forced),c=!u&&o&&Bb(o,d),v=s[d],c&&(t.dontCallGetSet?(y=Wz(o,d),g=y&&y.value):g=o[d]),f=c&&g?g:r[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=Uz(f,Bu):t.wrap&&c?b=Vz(f):a&&Hz(f)?b=jz(f):b=f,(t.sham||f&&f.sham||v&&v.sham)&&Za(b,"sham",!0),Za(s,d,b),a&&(h=e+"Prototype",Bb(Ja,h)||Za(Ja,h,{}),Za(Ja[h],d,f),t.real&&l&&(u||!l[d])&&Za(l,d,f)))},Gz=ke,Kz=jt,Lb=Ir.f;Gz({target:"Object",stat:!0,forced:Object.defineProperty!==Lb,sham:!Kz},{defineProperty:Lb});var Yz=ft,c8=Yz.Object,Xz=G$.exports=function(r,e,n){return c8.defineProperty(r,e,n)};c8.defineProperty.sham&&(Xz.sham=!0);var Jz=G$.exports,Zz=Jz,h8=Zz,Qz=h8,eB=Qz,tB=eB,rB=tB,d8=rB,Wh=Te(d8),nB=Ui,Ki=Array.isArray||function(r){return nB(r)==="Array"},iB=Math.ceil,aB=Math.floor,oB=Math.trunc||function(r){var e=+r;return(e>0?aB:iB)(e)},sB=oB,qh=function(t){var r=+t;return r!==r||r===0?0:sB(r)},lB=qh,uB=Math.min,cB=function(t){return t>0?uB(lB(t),9007199254740991):0},hB=cB,Lr=function(t){return hB(t.length)},dB=TypeError,fB=9007199254740991,Uh=function(t){if(t>fB)throw dB("Maximum allowed index exceeded");return t},vB=Hh,pB=Ir,mB=Da,ts=function(t,r,e){var n=vB(r);n in t?pB.f(t,n,mB(0,e)):t[n]=e},gB=mt,yB=gB("toStringTag"),f8={};f8[yB]="z";var i1=String(f8)==="[object z]",bB=i1,wB=wt,Tc=Ui,$B=mt,xB=$B("toStringTag"),kB=Object,SB=Tc(function(){return arguments}())==="Arguments",EB=function(t,r){try{return t[r]}catch{}},di=bB?Tc:function(t){var r,e,n;return t===void 0?"Undefined":t===null?"Null":typeof(e=EB(r=kB(t),xB))=="string"?e:SB?Tc(r):(n=Tc(r))==="Object"&&wB(r.callee)?"Arguments":n},TB=ct,_B=wt,ip=r1,OB=TB(Function.toString);_B(ip.inspectSource)||(ip.inspectSource=function(t){return OB(t)});var v8=ip.inspectSource,IB=ct,CB=Ye,p8=wt,PB=di,AB=dr,MB=v8,m8=function(){},DB=[],g8=AB("Reflect","construct"),a1=/^\s*(?:class|function)\b/,NB=IB(a1.exec),RB=!a1.test(m8),_s=function(r){if(!p8(r))return!1;try{return g8(m8,DB,r),!0}catch{return!1}},y8=function(r){if(!p8(r))return!1;switch(PB(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return RB||!!NB(a1,MB(r))}catch{return!0}};y8.sham=!0;var Vh=!g8||CB(function(){var t;return _s(_s.call)||!_s(Object)||!_s(function(){t=!0})||t})?y8:_s,jb=Ki,FB=Vh,zB=Jt,BB=mt,LB=BB("species"),Hb=Array,jB=function(t){var r;return jb(t)&&(r=t.constructor,FB(r)&&(r===Hb||jb(r.prototype))?r=void 0:zB(r)&&(r=r[LB],r===null&&(r=void 0))),r===void 0?Hb:r},HB=jB,Gh=function(t,r){return new(HB(t))(r===0?0:r)},WB=Ye,qB=mt,UB=Jo,VB=qB("species"),Al=function(t){return UB>=51||!WB(function(){var r=[],e=r.constructor={};return e[VB]=function(){return{foo:1}},r[t](Boolean).foo!==1})},GB=ke,KB=Ye,YB=Ki,XB=Jt,JB=Or,ZB=Lr,Wb=Uh,qb=ts,QB=Gh,eL=Al,tL=mt,rL=Jo,b8=tL("isConcatSpreadable"),nL=rL>=51||!KB(function(){var t=[];return t[b8]=!1,t.concat()[0]!==t}),iL=function(t){if(!XB(t))return!1;var r=t[b8];return r!==void 0?!!r:YB(t)},aL=!nL||!eL("concat");GB({target:"Array",proto:!0,arity:1,forced:aL},{concat:function(r){var e=JB(this),n=QB(e,0),i=0,a,o,s,l,u;for(a=-1,s=arguments.length;ao;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((t||o in i)&&i[o]===e)return t||o||0;return!t&&-1}},vL={includes:Ub(!0),indexOf:Ub(!1)},Ml={},pL=ct,Pd=Rt,mL=Rn,gL=vL.indexOf,yL=Ml,Vb=pL([].push),w8=function(t,r){var e=mL(t),n=0,i=[],a;for(a in e)!Pd(yL,a)&&Pd(e,a)&&Vb(i,a);for(;r.length>n;)Pd(e,a=r[n++])&&(~gL(i,a)||Vb(i,a));return i},o1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bL=w8,wL=o1,Xh=Object.keys||function(r){return bL(r,wL)},$L=jt,xL=u8,kL=Ir,SL=Br,EL=Rn,TL=Xh;Kh.f=$L&&!xL?Object.defineProperties:function(r,e){SL(r);for(var n=EL(e),i=TL(e),a=i.length,o=0,s;a>o;)kL.f(r,s=i[o++],n[s]);return r};var _L=dr,$8=_L("document","documentElement"),OL=es,IL=jh,Gb=OL("keys"),Jh=function(t){return Gb[t]||(Gb[t]=IL(t))},CL=Br,PL=Kh,Kb=o1,AL=Ml,ML=$8,DL=n1,NL=Jh,Yb=">",Xb="<",ap="prototype",op="script",x8=NL("IE_PROTO"),Ad=function(){},k8=function(t){return Xb+op+Yb+t+Xb+"/"+op+Yb},Jb=function(t){t.write(k8("")),t.close();var r=t.parentWindow.Object;return t=null,r},RL=function(){var t=DL("iframe"),r="java"+op+":",e;return t.style.display="none",ML.appendChild(t),t.src=String(r),e=t.contentWindow.document,e.open(),e.write(k8("document.F=Object")),e.close(),e.F},Lu,_c=function(){try{Lu=new ActiveXObject("htmlfile")}catch{}_c=typeof document<"u"?document.domain&&Lu?Jb(Lu):RL():Jb(Lu);for(var t=Kb.length;t--;)delete _c[ap][Kb[t]];return _c()};AL[x8]=!0;var Ra=Object.create||function(r,e){var n;return r!==null?(Ad[ap]=CL(r),n=new Ad,Ad[ap]=null,n[x8]=r):n=_c(),e===void 0?n:PL.f(n,e)},Dl={},FL=w8,zL=o1,BL=zL.concat("length","prototype");Dl.f=Object.getOwnPropertyNames||function(r){return FL(r,BL)};var s1={},Zb=Yh,LL=Lr,jL=ts,HL=Array,WL=Math.max,S8=function(t,r,e){for(var n=LL(t),i=Zb(r,n),a=Zb(e===void 0?n:e,n),o=HL(WL(a-i,0)),s=0;ib;b++)if((s||b in f)&&(k=f[b],_=v(k,b,d),t))if(r)$[b]=_;else if(_)switch(t){case 3:return!0;case 5:return k;case 6:return b;case 2:n4($,k)}else switch(t){case 4:return!1;case 7:n4($,k)}return a?-1:n||i?i:$}},is={forEach:gi(0),map:gi(1),filter:gi(2),some:gi(3),every:gi(4),find:gi(5),findIndex:gi(6),filterReject:gi(7)},Zh=ke,Fl=dt,u1=Ht,Cj=ct,Po=jt,Ao=Zo,Pj=Ye,Bt=Rt,Aj=Nt,lp=Br,Qh=Rn,c1=Hh,Mj=Na,up=Da,ol=Ra,I8=Xh,Dj=Dl,C8=s1,Nj=Nl,P8=Ma,A8=Ir,Rj=Kh,M8=Bh,i4=rs,Fj=l1,h1=es,zj=Jh,D8=Ml,a4=jh,Bj=mt,Lj=Rl,jj=$t,Hj=_8,Wj=Fa,N8=ns,e0=is.forEach,wr=zj("hidden"),t0="Symbol",sl="prototype",qj=N8.set,o4=N8.getterFor(t0),fn=Object[sl],ha=Fl.Symbol,Ns=ha&&ha[sl],Uj=Fl.RangeError,Vj=Fl.TypeError,Nd=Fl.QObject,R8=P8.f,da=A8.f,F8=C8.f,Gj=M8.f,z8=Cj([].push),ai=h1("symbols"),zl=h1("op-symbols"),Kj=h1("wks"),cp=!Nd||!Nd[sl]||!Nd[sl].findChild,B8=function(t,r,e){var n=R8(fn,r);n&&delete fn[r],da(t,r,e),n&&t!==fn&&da(fn,r,n)},hp=Po&&Pj(function(){return ol(da({},"a",{get:function(){return da(this,"a",{value:7}).a}})).a!==7})?B8:da,Rd=function(t,r){var e=ai[t]=ol(Ns);return qj(e,{type:t0,tag:t,description:r}),Po||(e.description=r),e},r0=function(r,e,n){r===fn&&r0(zl,e,n),lp(r);var i=c1(e);return lp(n),Bt(ai,i)?(n.enumerable?(Bt(r,wr)&&r[wr][i]&&(r[wr][i]=!1),n=ol(n,{enumerable:up(0,!1)})):(Bt(r,wr)||da(r,wr,up(1,{})),r[wr][i]=!0),hp(r,i,n)):da(r,i,n)},d1=function(r,e){lp(r);var n=Qh(e),i=I8(n).concat(W8(n));return e0(i,function(a){(!Po||u1(L8,n,a))&&r0(r,a,n[a])}),r},Yj=function(r,e){return e===void 0?ol(r):d1(ol(r),e)},L8=function(r){var e=c1(r),n=u1(Gj,this,e);return this===fn&&Bt(ai,e)&&!Bt(zl,e)?!1:n||!Bt(this,e)||!Bt(ai,e)||Bt(this,wr)&&this[wr][e]?n:!0},j8=function(r,e){var n=Qh(r),i=c1(e);if(!(n===fn&&Bt(ai,i)&&!Bt(zl,i))){var a=R8(n,i);return a&&Bt(ai,i)&&!(Bt(n,wr)&&n[wr][i])&&(a.enumerable=!0),a}},H8=function(r){var e=F8(Qh(r)),n=[];return e0(e,function(i){!Bt(ai,i)&&!Bt(D8,i)&&z8(n,i)}),n},W8=function(t){var r=t===fn,e=F8(r?zl:Qh(t)),n=[];return e0(e,function(i){Bt(ai,i)&&(!r||Bt(fn,i))&&z8(n,ai[i])}),n};Ao||(ha=function(){if(Aj(Ns,this))throw new Vj("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:Mj(arguments[0]),e=a4(r),n=function(i){var a=this===void 0?Fl:this;a===fn&&u1(n,zl,i),Bt(a,wr)&&Bt(a[wr],e)&&(a[wr][e]=!1);var o=up(1,i);try{hp(a,e,o)}catch(s){if(!(s instanceof Uj))throw s;B8(a,e,o)}};return Po&&cp&&hp(fn,e,{configurable:!0,set:n}),Rd(e,r)},Ns=ha[sl],i4(Ns,"toString",function(){return o4(this).tag}),i4(ha,"withoutSetter",function(t){return Rd(a4(t),t)}),M8.f=L8,A8.f=r0,Rj.f=d1,P8.f=j8,Dj.f=C8.f=H8,Nj.f=W8,Lj.f=function(t){return Rd(Bj(t),t)},Po&&Fj(Ns,"description",{configurable:!0,get:function(){return o4(this).description}}));Zh({global:!0,constructor:!0,wrap:!0,forced:!Ao,sham:!Ao},{Symbol:ha});e0(I8(Kj),function(t){jj(t)});Zh({target:t0,stat:!0,forced:!Ao},{useSetter:function(){cp=!0},useSimple:function(){cp=!1}});Zh({target:"Object",stat:!0,forced:!Ao,sham:!Po},{create:Yj,defineProperty:r0,defineProperties:d1,getOwnPropertyDescriptor:j8});Zh({target:"Object",stat:!0,forced:!Ao},{getOwnPropertyNames:H8});Hj();Wj(ha,t0);D8[wr]=!0;var Xj=Zo,q8=Xj&&!!Symbol.for&&!!Symbol.keyFor,Jj=ke,Zj=dr,Qj=Rt,eH=Na,U8=es,tH=q8,Fd=U8("string-to-symbol-registry"),rH=U8("symbol-to-string-registry");Jj({target:"Symbol",stat:!0,forced:!tH},{for:function(t){var r=eH(t);if(Qj(Fd,r))return Fd[r];var e=Zj("Symbol")(r);return Fd[r]=e,rH[e]=r,e}});var nH=ke,iH=Rt,aH=Cl,oH=Qo,sH=es,lH=q8,s4=sH("symbol-to-string-registry");nH({target:"Symbol",stat:!0,forced:!lH},{keyFor:function(r){if(!aH(r))throw new TypeError(oH(r)+" is not a symbol");if(iH(s4,r))return s4[r]}});var uH=ct,Bl=uH([].slice),cH=ct,l4=Ki,hH=wt,u4=Ui,dH=Na,c4=cH([].push),fH=function(t){if(hH(t))return t;if(l4(t)){for(var r=t.length,e=[],n=0;n=r.length)return t.target=void 0,qu(void 0,!0);switch(t.kind){case"keys":return qu(e,!1);case"values":return qu(r[e],!1)}return qu([e,r[e]],!1)},"values");S4.Arguments=S4.Array;var VW={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},GW=VW,KW=dt,YW=di,XW=hi,E4=as,JW=mt,T4=JW("toStringTag");for(var jd in GW){var _4=KW[jd],Hd=_4&&_4.prototype;Hd&&YW(Hd)!==T4&&XW(Hd,T4,jd),E4[jd]=E4.Array}var ZW=YH,ix=ZW,QW=mt,eq=Ir.f,O4=QW("metadata"),I4=Function.prototype;I4[O4]===void 0&&eq(I4,O4,{value:null});var tq=$t;tq("asyncDispose");var rq=$t;rq("dispose");var nq=$t;nq("metadata");var iq=ix,aq=iq,oq=dr,sq=ct,m1=oq("Symbol"),lq=m1.keyFor,uq=sq(m1.prototype.valueOf),ax=m1.isRegisteredSymbol||function(r){try{return lq(uq(r))!==void 0}catch{return!1}},cq=ke,hq=ax;cq({target:"Symbol",stat:!0},{isRegisteredSymbol:hq});var dq=es,ox=dr,fq=ct,vq=Cl,pq=mt,rh=ox("Symbol"),C4=rh.isWellKnownSymbol,sx=ox("Object","getOwnPropertyNames"),mq=fq(rh.prototype.valueOf),P4=dq("wks");for(var Wd=0,A4=sx(rh),gq=A4.length;Wd=a?t?"":void 0:(o=D4(n,i),o<55296||o>56319||i+1===a||(s=D4(n,i+1))<56320||s>57343?t?Dq(n,i):o:t?Nq(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Rq={codeAt:N4(!1),charAt:N4(!0)},Fq=Rq.charAt,zq=Na,ux=ns,Bq=v1,R4=p1,cx="String Iterator",Lq=ux.set,jq=ux.getterFor(cx);Bq(String,"String",function(t){Lq(this,{type:cx,string:zq(t),index:0})},function(){var r=jq(this),e=r.string,n=r.index,i;return n>=e.length?R4(void 0,!0):(i=Fq(e,n),r.index+=i.length,R4(i,!1))});var Hq=Rl,Wq=Hq.f("iterator"),qq=Wq,hx=qq,Uq=hx,Vq=Uq,Gq=Vq,Kq=Gq,dx=Kq,Yq=Te(dx);function Mo(t){"@babel/helpers - typeof";return Mo=typeof ho=="function"&&typeof Yq=="symbol"?function(r){return typeof r}:function(r){return r&&typeof ho=="function"&&r.constructor===ho&&r!==ho.prototype?"symbol":typeof r},Mo(t)}var Xq=Rl,Jq=Xq.f("toPrimitive"),Zq=Jq,Qq=Zq,eU=Qq,tU=eU,rU=tU,nU=rU,iU=nU,aU=Te(iU);function oU(t,r){if(Mo(t)!=="object"||t===null)return t;var e=t[aU];if(e!==void 0){var n=e.call(t,r||"default");if(Mo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function fx(t){var r=oU(t,"string");return Mo(r)==="symbol"?r:String(r)}function F4(t,r){for(var e=0;e=0:s>l;l+=u)l in o&&(i=e(i,o[l],l,a));return i}},IU={left:L4(!1),right:L4(!0)},CU=Ye,a0=function(t,r){var e=[][t];return!!e&&CU(function(){e.call(null,r||function(){return 1},1)})},PU=dt,AU=Ui,jl=AU(PU.process)==="process",MU=ke,DU=IU.left,NU=a0,j4=Jo,RU=jl,FU=!RU&&j4>79&&j4<83,zU=FU||!NU("reduce");MU({target:"Array",proto:!0,forced:zU},{reduce:function(r){var e=arguments.length;return DU(this,r,e,e>1?arguments[1]:void 0)}});var BU=tr,LU=BU("Array","reduce"),jU=Nt,HU=LU,Vd=Array.prototype,WU=function(t){var r=t.reduce;return t===Vd||jU(Vd,t)&&r===Vd.reduce?HU:r},qU=WU,UU=qU,VU=UU,GU=Te(VU),KU=ke,YU=is.filter,XU=Al,JU=XU("filter");KU({target:"Array",proto:!0,forced:!JU},{filter:function(r){return YU(this,r,arguments.length>1?arguments[1]:void 0)}});var ZU=tr,QU=ZU("Array","filter"),eV=Nt,tV=QU,Gd=Array.prototype,rV=function(t){var r=t.filter;return t===Gd||eV(Gd,t)&&r===Gd.filter?tV:r},nV=rV,iV=nV,aV=iV,fo=Te(aV),oV=ke,sV=is.map,lV=Al,uV=lV("map");oV({target:"Array",proto:!0,forced:!uV},{map:function(r){return sV(this,r,arguments.length>1?arguments[1]:void 0)}});var cV=tr,hV=cV("Array","map"),dV=Nt,fV=hV,Kd=Array.prototype,vV=function(t){var r=t.map;return t===Kd||dV(Kd,t)&&r===Kd.map?fV:r},pV=vV,mV=pV,gV=mV,cn=Te(gV),yV=Ki,bV=Lr,wV=Uh,$V=Gi,bx=function(t,r,e,n,i,a,o,s){for(var l=i,u=0,c=o?$V(o,s):!1,h,d;u0&&yV(h)?(d=bV(h),l=bx(t,r,h,d,l,a-1)-1):(wV(l+1),t[l]=h),l++),u++;return l},xV=bx,kV=ke,SV=xV,EV=_r,TV=Or,_V=Lr,OV=Gh;kV({target:"Array",proto:!0},{flatMap:function(r){var e=TV(this),n=_V(e),i;return EV(r),i=OV(e,0),i.length=SV(i,e,e,n,0,1,r,arguments.length>1?arguments[1]:void 0),i}});var IV=tr;IV("Array","flatMap");var CV=Ht,H4=Br,PV=t1,wx=function(t,r,e){var n,i;H4(t);try{if(n=PV(t,"return"),!n){if(r==="throw")throw e;return e}n=CV(n,t)}catch(a){i=!0,n=a}if(r==="throw")throw e;if(i)throw n;return H4(n),e},AV=Br,MV=wx,DV=function(t,r,e,n){try{return n?r(AV(e)[0],e[1]):r(e)}catch(i){MV(t,"throw",i)}},NV=mt,RV=as,FV=NV("iterator"),zV=Array.prototype,$x=function(t){return t!==void 0&&(RV.Array===t||zV[FV]===t)},BV=di,W4=t1,LV=Xo,jV=as,HV=mt,WV=HV("iterator"),o0=function(t){if(!LV(t))return W4(t,WV)||W4(t,"@@iterator")||jV[BV(t)]},qV=Ht,UV=_r,VV=Br,GV=Qo,KV=o0,YV=TypeError,b1=function(t,r){var e=arguments.length<2?KV(t):r;if(UV(e))return VV(qV(e,t));throw new YV(GV(t)+" is not iterable")},XV=Gi,JV=Ht,ZV=Or,QV=DV,eG=$x,tG=Vh,rG=Lr,q4=ts,nG=b1,iG=o0,U4=Array,aG=function(r){var e=ZV(r),n=tG(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=XV(a,i>2?arguments[2]:void 0));var s=iG(e),l=0,u,c,h,d,f,v;if(s&&!(this===U4&&eG(s)))for(d=nG(e,s),f=d.next,c=n?new this:[];!(h=JV(f,d)).done;l++)v=o?QV(d,a,[h.value,l],!0):h.value,q4(c,l,v);else for(u=rG(e),c=n?new this(u):U4(u);u>l;l++)v=o?a(e[l],l):e[l],q4(c,l,v);return c.length=l,c},oG=mt,xx=oG("iterator"),kx=!1;try{var sG=0,V4={next:function(){return{done:!!sG++}},return:function(){kx=!0}};V4[xx]=function(){return this},Array.from(V4,function(){throw 2})}catch{}var Sx=function(t,r){try{if(!r&&!kx)return!1}catch{return!1}var e=!1;try{var n={};n[xx]=function(){return{next:function(){return{done:e=!0}}}},t(n)}catch{}return e},lG=ke,uG=aG,cG=Sx,hG=!cG(function(t){Array.from(t)});lG({target:"Array",stat:!0,forced:hG},{from:uG});var dG=ft,fG=dG.Array.from,vG=fG,Ex=vG,pG=Ex,w1=Te(pG),mG=o0,gG=mG,yG=gG,bG=yG,wG=bG,$G=wG,xG=$G,kG=xG,Tx=kG,_x=Te(Tx),SG=Tx,$1=Te(SG),EG=ke,TG=Ki;EG({target:"Array",stat:!0},{isArray:TG});var _G=ft,OG=_G.Array.isArray,IG=OG,Ox=IG,CG=Ox,PG=CG,AG=PG,MG=AG,DG=MG,Ix=Te(DG);function NG(t){if(Ix(t))return t}var RG=jt,FG=Ki,zG=TypeError,BG=Object.getOwnPropertyDescriptor,LG=RG&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),Cx=LG?function(t,r){if(FG(t)&&!BG(t,"length").writable)throw new zG("Cannot set read only .length");return t.length=r}:function(t,r){return t.length=r},jG=ke,HG=Or,WG=Lr,qG=Cx,UG=Uh,VG=Ye,GG=VG(function(){return[].push.call({length:4294967296},1)!==4294967297}),KG=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},YG=GG||!KG();jG({target:"Array",proto:!0,arity:1,forced:YG},{push:function(r){var e=HG(this),n=WG(e),i=arguments.length;UG(n+i);for(var a=0;at.length)&&(r=t.length);for(var e=0,n=new Array(r);e"u"&&rp!==void 0,Q$={all:rp,IS_HTMLDDA:YR},e8=Q$,XR=e8.all,wt=e8.IS_HTMLDDA?function(t){return typeof t=="function"||t===XR}:function(t){return typeof t=="function"},Ma={},JR=Ye,jt=!JR(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ZR=Il,Fu=Function.prototype.call,Ht=ZR?Fu.bind(Fu):function(){return Fu.apply(Fu,arguments)},Bh={},t8={}.propertyIsEnumerable,r8=Object.getOwnPropertyDescriptor,QR=r8&&!t8.call({1:2},1);Bh.f=QR?function(r){var e=r8(this,r);return!!e&&e.enumerable}:t8;var Da=function(t,r){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:r}},eF=ct,tF=Ye,rF=Ui,bd=Object,nF=eF("".split),Lh=tF(function(){return!bd("z").propertyIsEnumerable(0)})?function(t){return rF(t)==="String"?nF(t,""):bd(t)}:bd,Xo=function(t){return t==null},iF=Xo,aF=TypeError,e1=function(t){if(iF(t))throw new aF("Can't call method on "+t);return t},oF=Lh,sF=e1,Rn=function(t){return oF(sF(t))},xb=wt,n8=Q$,lF=n8.all,Jt=n8.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:xb(t)||t===lF}:function(t){return typeof t=="object"?t!==null:xb(t)},ft={},wd=ft,$d=dt,uF=wt,kb=function(t){return uF(t)?t:void 0},dr=function(t,r){return arguments.length<2?kb(wd[t])||kb($d[t]):wd[t]&&wd[t][r]||$d[t]&&$d[t][r]},cF=ct,Nt=cF({}.isPrototypeOf),Vi=typeof navigator<"u"&&String(navigator.userAgent)||"",i8=dt,xd=Vi,Sb=i8.process,Eb=i8.Deno,Tb=Sb&&Sb.versions||Eb&&Eb.version,_b=Tb&&Tb.v8,un,Qc;_b&&(un=_b.split("."),Qc=un[0]>0&&un[0]<4?1:+(un[0]+un[1]));!Qc&&xd&&(un=xd.match(/Edge\/(\d+)/),(!un||un[1]>=74)&&(un=xd.match(/Chrome\/(\d+)/),un&&(Qc=+un[1])));var Jo=Qc,Ob=Jo,hF=Ye,dF=dt,fF=dF.String,Zo=!!Object.getOwnPropertySymbols&&!hF(function(){var t=Symbol("symbol detection");return!fF(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Ob&&Ob<41}),vF=Zo,a8=vF&&!Symbol.sham&&typeof Symbol.iterator=="symbol",pF=dr,mF=wt,gF=Nt,yF=a8,bF=Object,Cl=yF?function(t){return typeof t=="symbol"}:function(t){var r=pF("Symbol");return mF(r)&&gF(r.prototype,bF(t))},wF=String,Qo=function(t){try{return wF(t)}catch{return"Object"}},$F=wt,xF=Qo,kF=TypeError,_r=function(t){if($F(t))return t;throw new kF(xF(t)+" is not a function")},SF=_r,EF=Xo,t1=function(t,r){var e=t[r];return EF(e)?void 0:SF(e)},kd=Ht,Sd=wt,Ed=Jt,TF=TypeError,_F=function(t,r){var e,n;if(r==="string"&&Sd(e=t.toString)&&!Ed(n=kd(e,t))||Sd(e=t.valueOf)&&!Ed(n=kd(e,t))||r!=="string"&&Sd(e=t.toString)&&!Ed(n=kd(e,t)))return n;throw new TF("Can't convert object to primitive value")},o8={exports:{}},OF=!0,Ib=dt,IF=Object.defineProperty,CF=function(t,r){try{IF(Ib,t,{value:r,configurable:!0,writable:!0})}catch{Ib[t]=r}return r},PF=dt,AF=CF,Cb="__core-js_shared__",MF=PF[Cb]||AF(Cb,{}),r1=MF,Pb=r1;(o8.exports=function(t,r){return Pb[t]||(Pb[t]=r!==void 0?r:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var es=o8.exports,DF=e1,NF=Object,Or=function(t){return NF(DF(t))},RF=ct,FF=Or,zF=RF({}.hasOwnProperty),Rt=Object.hasOwn||function(r,e){return zF(FF(r),e)},BF=ct,LF=0,jF=Math.random(),HF=BF(1 .toString),jh=function(t){return"Symbol("+(t===void 0?"":t)+")_"+HF(++LF+jF,36)},WF=dt,qF=es,Ab=Rt,UF=jh,VF=Zo,GF=a8,co=WF.Symbol,Td=qF("wks"),KF=GF?co.for||co:co&&co.withoutSetter||UF,mt=function(t){return Ab(Td,t)||(Td[t]=VF&&Ab(co,t)?co[t]:KF("Symbol."+t)),Td[t]},YF=Ht,Mb=Jt,Db=Cl,XF=t1,JF=_F,ZF=mt,QF=TypeError,ez=ZF("toPrimitive"),tz=function(t,r){if(!Mb(t)||Db(t))return t;var e=XF(t,ez),n;if(e){if(r===void 0&&(r="default"),n=YF(e,t,r),!Mb(n)||Db(n))return n;throw new QF("Can't convert object to primitive value")}return r===void 0&&(r="number"),JF(t,r)},rz=tz,nz=Cl,Hh=function(t){var r=rz(t,"string");return nz(r)?r:r+""},iz=dt,Nb=Jt,np=iz.document,az=Nb(np)&&Nb(np.createElement),n1=function(t){return az?np.createElement(t):{}},oz=jt,sz=Ye,lz=n1,s8=!oz&&!sz(function(){return Object.defineProperty(lz("div"),"a",{get:function(){return 7}}).a!==7}),uz=jt,cz=Ht,hz=Bh,dz=Da,fz=Rn,vz=Hh,pz=Rt,mz=s8,Rb=Object.getOwnPropertyDescriptor;Ma.f=uz?Rb:function(r,e){if(r=fz(r),e=vz(e),mz)try{return Rb(r,e)}catch{}if(pz(r,e))return dz(!cz(hz.f,r,e),r[e])};var gz=Ye,yz=wt,bz=/#|\.prototype\./,Pl=function(t,r){var e=$z[wz(t)];return e===kz?!0:e===xz?!1:yz(r)?gz(r):!!r},wz=Pl.normalize=function(t){return String(t).replace(bz,".").toLowerCase()},$z=Pl.data={},xz=Pl.NATIVE="N",kz=Pl.POLYFILL="P",l8=Pl,Fb=Z$,Sz=_r,Ez=Il,Tz=Fb(Fb.bind),Gi=function(t,r){return Sz(t),r===void 0?t:Ez?Tz(t,r):function(){return t.apply(r,arguments)}},Ir={},_z=jt,Oz=Ye,u8=_z&&Oz(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Iz=Jt,Cz=String,Pz=TypeError,Br=function(t){if(Iz(t))return t;throw new Pz(Cz(t)+" is not an object")},Az=jt,Mz=s8,Dz=u8,zu=Br,zb=Hh,Nz=TypeError,_d=Object.defineProperty,Rz=Object.getOwnPropertyDescriptor,Od="enumerable",Id="configurable",Cd="writable";Ir.f=Az?Dz?function(r,e,n){if(zu(r),e=zb(e),zu(n),typeof r=="function"&&e==="prototype"&&"value"in n&&Cd in n&&!n[Cd]){var i=Rz(r,e);i&&i[Cd]&&(r[e]=n.value,n={configurable:Id in n?n[Id]:i[Id],enumerable:Od in n?n[Od]:i[Od],writable:!1})}return _d(r,e,n)}:_d:function(r,e,n){if(zu(r),e=zb(e),zu(n),Mz)try{return _d(r,e,n)}catch{}if("get"in n||"set"in n)throw new Nz("Accessors not supported");return"value"in n&&(r[e]=n.value),r};var Fz=jt,zz=Ir,Bz=Da,hi=Fz?function(t,r,e){return zz.f(t,r,Bz(1,e))}:function(t,r,e){return t[r]=e,t},Bu=dt,Lz=Yo,jz=Z$,Hz=wt,Wz=Ma.f,qz=l8,Ja=ft,Uz=Gi,Za=hi,Bb=Rt,Vz=function(t){var r=function(e,n,i){if(this instanceof r){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return Lz(t,this,arguments)};return r.prototype=t.prototype,r},$e=function(t,r){var e=t.target,n=t.global,i=t.stat,a=t.proto,o=n?Bu:i?Bu[e]:(Bu[e]||{}).prototype,s=n?Ja:Ja[e]||Za(Ja,e,{})[e],l=s.prototype,u,c,h,d,f,v,m,b,y;for(d in r)u=qz(n?d:e+(i?".":"#")+d,t.forced),c=!u&&o&&Bb(o,d),v=s[d],c&&(t.dontCallGetSet?(y=Wz(o,d),m=y&&y.value):m=o[d]),f=c&&m?m:r[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=Uz(f,Bu):t.wrap&&c?b=Vz(f):a&&Hz(f)?b=jz(f):b=f,(t.sham||f&&f.sham||v&&v.sham)&&Za(b,"sham",!0),Za(s,d,b),a&&(h=e+"Prototype",Bb(Ja,h)||Za(Ja,h,{}),Za(Ja[h],d,f),t.real&&l&&(u||!l[d])&&Za(l,d,f)))},Gz=$e,Kz=jt,Lb=Ir.f;Gz({target:"Object",stat:!0,forced:Object.defineProperty!==Lb,sham:!Kz},{defineProperty:Lb});var Yz=ft,c8=Yz.Object,Xz=G$.exports=function(r,e,n){return c8.defineProperty(r,e,n)};c8.defineProperty.sham&&(Xz.sham=!0);var Jz=G$.exports,Zz=Jz,h8=Zz,Qz=h8,eB=Qz,tB=eB,rB=tB,d8=rB,Wh=Se(d8),nB=Ui,Ki=Array.isArray||function(r){return nB(r)==="Array"},iB=Math.ceil,aB=Math.floor,oB=Math.trunc||function(r){var e=+r;return(e>0?aB:iB)(e)},sB=oB,qh=function(t){var r=+t;return r!==r||r===0?0:sB(r)},lB=qh,uB=Math.min,cB=function(t){return t>0?uB(lB(t),9007199254740991):0},hB=cB,Lr=function(t){return hB(t.length)},dB=TypeError,fB=9007199254740991,Uh=function(t){if(t>fB)throw dB("Maximum allowed index exceeded");return t},vB=Hh,pB=Ir,mB=Da,ts=function(t,r,e){var n=vB(r);n in t?pB.f(t,n,mB(0,e)):t[n]=e},gB=mt,yB=gB("toStringTag"),f8={};f8[yB]="z";var i1=String(f8)==="[object z]",bB=i1,wB=wt,Tc=Ui,$B=mt,xB=$B("toStringTag"),kB=Object,SB=Tc(function(){return arguments}())==="Arguments",EB=function(t,r){try{return t[r]}catch{}},di=bB?Tc:function(t){var r,e,n;return t===void 0?"Undefined":t===null?"Null":typeof(e=EB(r=kB(t),xB))=="string"?e:SB?Tc(r):(n=Tc(r))==="Object"&&wB(r.callee)?"Arguments":n},TB=ct,_B=wt,ip=r1,OB=TB(Function.toString);_B(ip.inspectSource)||(ip.inspectSource=function(t){return OB(t)});var v8=ip.inspectSource,IB=ct,CB=Ye,p8=wt,PB=di,AB=dr,MB=v8,m8=function(){},DB=[],g8=AB("Reflect","construct"),a1=/^\s*(?:class|function)\b/,NB=IB(a1.exec),RB=!a1.test(m8),_s=function(r){if(!p8(r))return!1;try{return g8(m8,DB,r),!0}catch{return!1}},y8=function(r){if(!p8(r))return!1;switch(PB(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return RB||!!NB(a1,MB(r))}catch{return!0}};y8.sham=!0;var Vh=!g8||CB(function(){var t;return _s(_s.call)||!_s(Object)||!_s(function(){t=!0})||t})?y8:_s,jb=Ki,FB=Vh,zB=Jt,BB=mt,LB=BB("species"),Hb=Array,jB=function(t){var r;return jb(t)&&(r=t.constructor,FB(r)&&(r===Hb||jb(r.prototype))?r=void 0:zB(r)&&(r=r[LB],r===null&&(r=void 0))),r===void 0?Hb:r},HB=jB,Gh=function(t,r){return new(HB(t))(r===0?0:r)},WB=Ye,qB=mt,UB=Jo,VB=qB("species"),Al=function(t){return UB>=51||!WB(function(){var r=[],e=r.constructor={};return e[VB]=function(){return{foo:1}},r[t](Boolean).foo!==1})},GB=$e,KB=Ye,YB=Ki,XB=Jt,JB=Or,ZB=Lr,Wb=Uh,qb=ts,QB=Gh,eL=Al,tL=mt,rL=Jo,b8=tL("isConcatSpreadable"),nL=rL>=51||!KB(function(){var t=[];return t[b8]=!1,t.concat()[0]!==t}),iL=function(t){if(!XB(t))return!1;var r=t[b8];return r!==void 0?!!r:YB(t)},aL=!nL||!eL("concat");GB({target:"Array",proto:!0,arity:1,forced:aL},{concat:function(r){var e=JB(this),n=QB(e,0),i=0,a,o,s,l,u;for(a=-1,s=arguments.length;ao;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((t||o in i)&&i[o]===e)return t||o||0;return!t&&-1}},vL={includes:Ub(!0),indexOf:Ub(!1)},Ml={},pL=ct,Pd=Rt,mL=Rn,gL=vL.indexOf,yL=Ml,Vb=pL([].push),w8=function(t,r){var e=mL(t),n=0,i=[],a;for(a in e)!Pd(yL,a)&&Pd(e,a)&&Vb(i,a);for(;r.length>n;)Pd(e,a=r[n++])&&(~gL(i,a)||Vb(i,a));return i},o1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bL=w8,wL=o1,Xh=Object.keys||function(r){return bL(r,wL)},$L=jt,xL=u8,kL=Ir,SL=Br,EL=Rn,TL=Xh;Kh.f=$L&&!xL?Object.defineProperties:function(r,e){SL(r);for(var n=EL(e),i=TL(e),a=i.length,o=0,s;a>o;)kL.f(r,s=i[o++],n[s]);return r};var _L=dr,$8=_L("document","documentElement"),OL=es,IL=jh,Gb=OL("keys"),Jh=function(t){return Gb[t]||(Gb[t]=IL(t))},CL=Br,PL=Kh,Kb=o1,AL=Ml,ML=$8,DL=n1,NL=Jh,Yb=">",Xb="<",ap="prototype",op="script",x8=NL("IE_PROTO"),Ad=function(){},k8=function(t){return Xb+op+Yb+t+Xb+"/"+op+Yb},Jb=function(t){t.write(k8("")),t.close();var r=t.parentWindow.Object;return t=null,r},RL=function(){var t=DL("iframe"),r="java"+op+":",e;return t.style.display="none",ML.appendChild(t),t.src=String(r),e=t.contentWindow.document,e.open(),e.write(k8("document.F=Object")),e.close(),e.F},Lu,_c=function(){try{Lu=new ActiveXObject("htmlfile")}catch{}_c=typeof document<"u"?document.domain&&Lu?Jb(Lu):RL():Jb(Lu);for(var t=Kb.length;t--;)delete _c[ap][Kb[t]];return _c()};AL[x8]=!0;var Ra=Object.create||function(r,e){var n;return r!==null?(Ad[ap]=CL(r),n=new Ad,Ad[ap]=null,n[x8]=r):n=_c(),e===void 0?n:PL.f(n,e)},Dl={},FL=w8,zL=o1,BL=zL.concat("length","prototype");Dl.f=Object.getOwnPropertyNames||function(r){return FL(r,BL)};var s1={},Zb=Yh,LL=Lr,jL=ts,HL=Array,WL=Math.max,S8=function(t,r,e){for(var n=LL(t),i=Zb(r,n),a=Zb(e===void 0?n:e,n),o=HL(WL(a-i,0)),s=0;ib;b++)if((s||b in f)&&(k=f[b],O=v(k,b,d),t))if(r)$[b]=O;else if(O)switch(t){case 3:return!0;case 5:return k;case 6:return b;case 2:n4($,k)}else switch(t){case 4:return!1;case 7:n4($,k)}return a?-1:n||i?i:$}},is={forEach:gi(0),map:gi(1),filter:gi(2),some:gi(3),every:gi(4),find:gi(5),findIndex:gi(6),filterReject:gi(7)},Zh=$e,Fl=dt,u1=Ht,Cj=ct,Po=jt,Ao=Zo,Pj=Ye,Bt=Rt,Aj=Nt,lp=Br,Qh=Rn,c1=Hh,Mj=Na,up=Da,ol=Ra,I8=Xh,Dj=Dl,C8=s1,Nj=Nl,P8=Ma,A8=Ir,Rj=Kh,M8=Bh,i4=rs,Fj=l1,h1=es,zj=Jh,D8=Ml,a4=jh,Bj=mt,Lj=Rl,jj=$t,Hj=_8,Wj=Fa,N8=ns,e0=is.forEach,wr=zj("hidden"),t0="Symbol",sl="prototype",qj=N8.set,o4=N8.getterFor(t0),fn=Object[sl],ha=Fl.Symbol,Ns=ha&&ha[sl],Uj=Fl.RangeError,Vj=Fl.TypeError,Nd=Fl.QObject,R8=P8.f,da=A8.f,F8=C8.f,Gj=M8.f,z8=Cj([].push),ai=h1("symbols"),zl=h1("op-symbols"),Kj=h1("wks"),cp=!Nd||!Nd[sl]||!Nd[sl].findChild,B8=function(t,r,e){var n=R8(fn,r);n&&delete fn[r],da(t,r,e),n&&t!==fn&&da(fn,r,n)},hp=Po&&Pj(function(){return ol(da({},"a",{get:function(){return da(this,"a",{value:7}).a}})).a!==7})?B8:da,Rd=function(t,r){var e=ai[t]=ol(Ns);return qj(e,{type:t0,tag:t,description:r}),Po||(e.description=r),e},r0=function(r,e,n){r===fn&&r0(zl,e,n),lp(r);var i=c1(e);return lp(n),Bt(ai,i)?(n.enumerable?(Bt(r,wr)&&r[wr][i]&&(r[wr][i]=!1),n=ol(n,{enumerable:up(0,!1)})):(Bt(r,wr)||da(r,wr,up(1,{})),r[wr][i]=!0),hp(r,i,n)):da(r,i,n)},d1=function(r,e){lp(r);var n=Qh(e),i=I8(n).concat(W8(n));return e0(i,function(a){(!Po||u1(L8,n,a))&&r0(r,a,n[a])}),r},Yj=function(r,e){return e===void 0?ol(r):d1(ol(r),e)},L8=function(r){var e=c1(r),n=u1(Gj,this,e);return this===fn&&Bt(ai,e)&&!Bt(zl,e)?!1:n||!Bt(this,e)||!Bt(ai,e)||Bt(this,wr)&&this[wr][e]?n:!0},j8=function(r,e){var n=Qh(r),i=c1(e);if(!(n===fn&&Bt(ai,i)&&!Bt(zl,i))){var a=R8(n,i);return a&&Bt(ai,i)&&!(Bt(n,wr)&&n[wr][i])&&(a.enumerable=!0),a}},H8=function(r){var e=F8(Qh(r)),n=[];return e0(e,function(i){!Bt(ai,i)&&!Bt(D8,i)&&z8(n,i)}),n},W8=function(t){var r=t===fn,e=F8(r?zl:Qh(t)),n=[];return e0(e,function(i){Bt(ai,i)&&(!r||Bt(fn,i))&&z8(n,ai[i])}),n};Ao||(ha=function(){if(Aj(Ns,this))throw new Vj("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:Mj(arguments[0]),e=a4(r),n=function(i){var a=this===void 0?Fl:this;a===fn&&u1(n,zl,i),Bt(a,wr)&&Bt(a[wr],e)&&(a[wr][e]=!1);var o=up(1,i);try{hp(a,e,o)}catch(s){if(!(s instanceof Uj))throw s;B8(a,e,o)}};return Po&&cp&&hp(fn,e,{configurable:!0,set:n}),Rd(e,r)},Ns=ha[sl],i4(Ns,"toString",function(){return o4(this).tag}),i4(ha,"withoutSetter",function(t){return Rd(a4(t),t)}),M8.f=L8,A8.f=r0,Rj.f=d1,P8.f=j8,Dj.f=C8.f=H8,Nj.f=W8,Lj.f=function(t){return Rd(Bj(t),t)},Po&&Fj(Ns,"description",{configurable:!0,get:function(){return o4(this).description}}));Zh({global:!0,constructor:!0,wrap:!0,forced:!Ao,sham:!Ao},{Symbol:ha});e0(I8(Kj),function(t){jj(t)});Zh({target:t0,stat:!0,forced:!Ao},{useSetter:function(){cp=!0},useSimple:function(){cp=!1}});Zh({target:"Object",stat:!0,forced:!Ao,sham:!Po},{create:Yj,defineProperty:r0,defineProperties:d1,getOwnPropertyDescriptor:j8});Zh({target:"Object",stat:!0,forced:!Ao},{getOwnPropertyNames:H8});Hj();Wj(ha,t0);D8[wr]=!0;var Xj=Zo,q8=Xj&&!!Symbol.for&&!!Symbol.keyFor,Jj=$e,Zj=dr,Qj=Rt,eH=Na,U8=es,tH=q8,Fd=U8("string-to-symbol-registry"),rH=U8("symbol-to-string-registry");Jj({target:"Symbol",stat:!0,forced:!tH},{for:function(t){var r=eH(t);if(Qj(Fd,r))return Fd[r];var e=Zj("Symbol")(r);return Fd[r]=e,rH[e]=r,e}});var nH=$e,iH=Rt,aH=Cl,oH=Qo,sH=es,lH=q8,s4=sH("symbol-to-string-registry");nH({target:"Symbol",stat:!0,forced:!lH},{keyFor:function(r){if(!aH(r))throw new TypeError(oH(r)+" is not a symbol");if(iH(s4,r))return s4[r]}});var uH=ct,Bl=uH([].slice),cH=ct,l4=Ki,hH=wt,u4=Ui,dH=Na,c4=cH([].push),fH=function(t){if(hH(t))return t;if(l4(t)){for(var r=t.length,e=[],n=0;n=r.length)return t.target=void 0,qu(void 0,!0);switch(t.kind){case"keys":return qu(e,!1);case"values":return qu(r[e],!1)}return qu([e,r[e]],!1)},"values");S4.Arguments=S4.Array;var VW={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},GW=VW,KW=dt,YW=di,XW=hi,E4=as,JW=mt,T4=JW("toStringTag");for(var jd in GW){var _4=KW[jd],Hd=_4&&_4.prototype;Hd&&YW(Hd)!==T4&&XW(Hd,T4,jd),E4[jd]=E4.Array}var ZW=YH,ix=ZW,QW=mt,eq=Ir.f,O4=QW("metadata"),I4=Function.prototype;I4[O4]===void 0&&eq(I4,O4,{value:null});var tq=$t;tq("asyncDispose");var rq=$t;rq("dispose");var nq=$t;nq("metadata");var iq=ix,aq=iq,oq=dr,sq=ct,m1=oq("Symbol"),lq=m1.keyFor,uq=sq(m1.prototype.valueOf),ax=m1.isRegisteredSymbol||function(r){try{return lq(uq(r))!==void 0}catch{return!1}},cq=$e,hq=ax;cq({target:"Symbol",stat:!0},{isRegisteredSymbol:hq});var dq=es,ox=dr,fq=ct,vq=Cl,pq=mt,rh=ox("Symbol"),C4=rh.isWellKnownSymbol,sx=ox("Object","getOwnPropertyNames"),mq=fq(rh.prototype.valueOf),P4=dq("wks");for(var Wd=0,A4=sx(rh),gq=A4.length;Wd=a?t?"":void 0:(o=D4(n,i),o<55296||o>56319||i+1===a||(s=D4(n,i+1))<56320||s>57343?t?Dq(n,i):o:t?Nq(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Rq={codeAt:N4(!1),charAt:N4(!0)},Fq=Rq.charAt,zq=Na,ux=ns,Bq=v1,R4=p1,cx="String Iterator",Lq=ux.set,jq=ux.getterFor(cx);Bq(String,"String",function(t){Lq(this,{type:cx,string:zq(t),index:0})},function(){var r=jq(this),e=r.string,n=r.index,i;return n>=e.length?R4(void 0,!0):(i=Fq(e,n),r.index+=i.length,R4(i,!1))});var Hq=Rl,Wq=Hq.f("iterator"),qq=Wq,hx=qq,Uq=hx,Vq=Uq,Gq=Vq,Kq=Gq,dx=Kq,Yq=Se(dx);function Mo(t){"@babel/helpers - typeof";return Mo=typeof ho=="function"&&typeof Yq=="symbol"?function(r){return typeof r}:function(r){return r&&typeof ho=="function"&&r.constructor===ho&&r!==ho.prototype?"symbol":typeof r},Mo(t)}var Xq=Rl,Jq=Xq.f("toPrimitive"),Zq=Jq,Qq=Zq,eU=Qq,tU=eU,rU=tU,nU=rU,iU=nU,aU=Se(iU);function oU(t,r){if(Mo(t)!=="object"||t===null)return t;var e=t[aU];if(e!==void 0){var n=e.call(t,r||"default");if(Mo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function fx(t){var r=oU(t,"string");return Mo(r)==="symbol"?r:String(r)}function F4(t,r){for(var e=0;e=0:s>l;l+=u)l in o&&(i=e(i,o[l],l,a));return i}},IU={left:L4(!1),right:L4(!0)},CU=Ye,a0=function(t,r){var e=[][t];return!!e&&CU(function(){e.call(null,r||function(){return 1},1)})},PU=dt,AU=Ui,jl=AU(PU.process)==="process",MU=$e,DU=IU.left,NU=a0,j4=Jo,RU=jl,FU=!RU&&j4>79&&j4<83,zU=FU||!NU("reduce");MU({target:"Array",proto:!0,forced:zU},{reduce:function(r){var e=arguments.length;return DU(this,r,e,e>1?arguments[1]:void 0)}});var BU=tr,LU=BU("Array","reduce"),jU=Nt,HU=LU,Vd=Array.prototype,WU=function(t){var r=t.reduce;return t===Vd||jU(Vd,t)&&r===Vd.reduce?HU:r},qU=WU,UU=qU,VU=UU,GU=Se(VU),KU=$e,YU=is.filter,XU=Al,JU=XU("filter");KU({target:"Array",proto:!0,forced:!JU},{filter:function(r){return YU(this,r,arguments.length>1?arguments[1]:void 0)}});var ZU=tr,QU=ZU("Array","filter"),eV=Nt,tV=QU,Gd=Array.prototype,rV=function(t){var r=t.filter;return t===Gd||eV(Gd,t)&&r===Gd.filter?tV:r},nV=rV,iV=nV,aV=iV,fo=Se(aV),oV=$e,sV=is.map,lV=Al,uV=lV("map");oV({target:"Array",proto:!0,forced:!uV},{map:function(r){return sV(this,r,arguments.length>1?arguments[1]:void 0)}});var cV=tr,hV=cV("Array","map"),dV=Nt,fV=hV,Kd=Array.prototype,vV=function(t){var r=t.map;return t===Kd||dV(Kd,t)&&r===Kd.map?fV:r},pV=vV,mV=pV,gV=mV,cn=Se(gV),yV=Ki,bV=Lr,wV=Uh,$V=Gi,bx=function(t,r,e,n,i,a,o,s){for(var l=i,u=0,c=o?$V(o,s):!1,h,d;u0&&yV(h)?(d=bV(h),l=bx(t,r,h,d,l,a-1)-1):(wV(l+1),t[l]=h),l++),u++;return l},xV=bx,kV=$e,SV=xV,EV=_r,TV=Or,_V=Lr,OV=Gh;kV({target:"Array",proto:!0},{flatMap:function(r){var e=TV(this),n=_V(e),i;return EV(r),i=OV(e,0),i.length=SV(i,e,e,n,0,1,r,arguments.length>1?arguments[1]:void 0),i}});var IV=tr;IV("Array","flatMap");var CV=Ht,H4=Br,PV=t1,wx=function(t,r,e){var n,i;H4(t);try{if(n=PV(t,"return"),!n){if(r==="throw")throw e;return e}n=CV(n,t)}catch(a){i=!0,n=a}if(r==="throw")throw e;if(i)throw n;return H4(n),e},AV=Br,MV=wx,DV=function(t,r,e,n){try{return n?r(AV(e)[0],e[1]):r(e)}catch(i){MV(t,"throw",i)}},NV=mt,RV=as,FV=NV("iterator"),zV=Array.prototype,$x=function(t){return t!==void 0&&(RV.Array===t||zV[FV]===t)},BV=di,W4=t1,LV=Xo,jV=as,HV=mt,WV=HV("iterator"),o0=function(t){if(!LV(t))return W4(t,WV)||W4(t,"@@iterator")||jV[BV(t)]},qV=Ht,UV=_r,VV=Br,GV=Qo,KV=o0,YV=TypeError,b1=function(t,r){var e=arguments.length<2?KV(t):r;if(UV(e))return VV(qV(e,t));throw new YV(GV(t)+" is not iterable")},XV=Gi,JV=Ht,ZV=Or,QV=DV,eG=$x,tG=Vh,rG=Lr,q4=ts,nG=b1,iG=o0,U4=Array,aG=function(r){var e=ZV(r),n=tG(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=XV(a,i>2?arguments[2]:void 0));var s=iG(e),l=0,u,c,h,d,f,v;if(s&&!(this===U4&&eG(s)))for(d=nG(e,s),f=d.next,c=n?new this:[];!(h=JV(f,d)).done;l++)v=o?QV(d,a,[h.value,l],!0):h.value,q4(c,l,v);else for(u=rG(e),c=n?new this(u):U4(u);u>l;l++)v=o?a(e[l],l):e[l],q4(c,l,v);return c.length=l,c},oG=mt,xx=oG("iterator"),kx=!1;try{var sG=0,V4={next:function(){return{done:!!sG++}},return:function(){kx=!0}};V4[xx]=function(){return this},Array.from(V4,function(){throw 2})}catch{}var Sx=function(t,r){try{if(!r&&!kx)return!1}catch{return!1}var e=!1;try{var n={};n[xx]=function(){return{next:function(){return{done:e=!0}}}},t(n)}catch{}return e},lG=$e,uG=aG,cG=Sx,hG=!cG(function(t){Array.from(t)});lG({target:"Array",stat:!0,forced:hG},{from:uG});var dG=ft,fG=dG.Array.from,vG=fG,Ex=vG,pG=Ex,w1=Se(pG),mG=o0,gG=mG,yG=gG,bG=yG,wG=bG,$G=wG,xG=$G,kG=xG,Tx=kG,_x=Se(Tx),SG=Tx,$1=Se(SG),EG=$e,TG=Ki;EG({target:"Array",stat:!0},{isArray:TG});var _G=ft,OG=_G.Array.isArray,IG=OG,Ox=IG,CG=Ox,PG=CG,AG=PG,MG=AG,DG=MG,Ix=Se(DG);function NG(t){if(Ix(t))return t}var RG=jt,FG=Ki,zG=TypeError,BG=Object.getOwnPropertyDescriptor,LG=RG&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),Cx=LG?function(t,r){if(FG(t)&&!BG(t,"length").writable)throw new zG("Cannot set read only .length");return t.length=r}:function(t,r){return t.length=r},jG=$e,HG=Or,WG=Lr,qG=Cx,UG=Uh,VG=Ye,GG=VG(function(){return[].push.call({length:4294967296},1)!==4294967297}),KG=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},YG=GG||!KG();jG({target:"Array",proto:!0,arity:1,forced:YG},{push:function(r){var e=HG(this),n=WG(e),i=arguments.length;UG(n+i);for(var a=0;at.length)&&(r=t.length);for(var e=0,n=new Array(r);e1?arguments[1]:void 0)},EY=ke,Y4=SY;EY({target:"Array",proto:!0,forced:[].forEach!==Y4},{forEach:Y4});var TY=tr,_Y=TY("Array","forEach"),OY=_Y,IY=OY,CY=di,PY=Rt,AY=Nt,MY=IY,Qd=Array.prototype,DY={DOMTokenList:!0,NodeList:!0},Fx=function(t){var r=t.forEach;return t===Qd||AY(Qd,t)&&r===Qd.forEach||PY(DY,CY(t))?MY:r},NY=Fx,xa=Te(NY),RY=ke,FY=ct,zY=Ki,BY=FY([].reverse),X4=[1,2];RY({target:"Array",proto:!0,forced:String(X4)===String(X4.reverse())},{reverse:function(){return zY(this)&&(this.length=this.length),BY(this)}});var LY=tr,jY=LY("Array","reverse"),HY=Nt,WY=jY,ef=Array.prototype,qY=function(t){var r=t.reverse;return t===ef||HY(ef,t)&&r===ef.reverse?WY:r},UY=qY,zx=UY,VY=zx,GY=Te(VY),J4=Qo,KY=TypeError,Bx=function(t,r){if(!delete t[r])throw new KY("Cannot delete property "+J4(r)+" of "+J4(t))},YY=ke,XY=Or,JY=Yh,ZY=qh,QY=Lr,eX=Cx,tX=Uh,rX=Gh,nX=ts,tf=Bx,iX=Al,aX=iX("splice"),oX=Math.max,sX=Math.min;YY({target:"Array",proto:!0,forced:!aX},{splice:function(r,e){var n=XY(this),i=QY(n),a=JY(r,i),o=arguments.length,s,l,u,c,h,d;for(o===0?s=l=0:o===1?(s=0,l=i-a):(s=o-2,l=sX(oX(ZY(e),0),i-a)),tX(i+s-l),u=rX(n,l),c=0;ci-l+s;c--)tf(n,c-1)}else if(s>l)for(c=i-l;c>a;c--)h=c+l-1,d=c+s-1,h in n?n[d]=n[h]:tf(n,d);for(c=0;ca;)for(var l=xX(arguments[a++]),u=o?kX(nf(l),o(l)):nf(l),c=u.length,h=0,d;c>h;)d=u[h++],(!Z4||gX(s,l,d))&&(n[d]=l[d]);return n}:eo,EX=ke,e2=SX;EX({target:"Object",stat:!0,arity:2,forced:Object.assign!==e2},{assign:e2});var TX=ft,_X=TX.Object.assign,OX=_X,IX=OX,CX=IX,PX=Te(CX),AX=ke,MX=Ye,DX=Or,jx=n0,NX=Z8,RX=MX(function(){jx(1)});AX({target:"Object",stat:!0,forced:RX,sham:!NX},{getPrototypeOf:function(r){return jx(DX(r))}});var FX=ft,zX=FX.Object.getPrototypeOf,BX=zX,LX=BX,jX=ke,HX=jt,WX=Ra;jX({target:"Object",stat:!0,sham:!HX},{create:WX});var qX=ft,UX=qX.Object,VX=function(r,e){return UX.create(r,e)},GX=VX,Hx=GX,KX=Hx,YX=Te(KX),mp=ft,XX=Yo;mp.JSON||(mp.JSON={stringify:JSON.stringify});var JX=function(r,e,n){return XX(mp.JSON.stringify,null,arguments)},ZX=JX,QX=ZX,eJ=QX,tJ=Te(eJ),rJ=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",nJ=TypeError,Wx=function(t,r){if(te,o=aJ(n)?n:cJ(n),s=a?lJ(arguments,e):[],l=a?function(){iJ(o,this,s)}:o;return r?t(l,i):t(l)}:t},dJ=ke,Vx=dt,fJ=Ux,t2=fJ(Vx.setInterval,!0);dJ({global:!0,bind:!0,forced:Vx.setInterval!==t2},{setInterval:t2});var vJ=ke,Gx=dt,pJ=Ux,r2=pJ(Gx.setTimeout,!0);vJ({global:!0,bind:!0,forced:Gx.setTimeout!==r2},{setTimeout:r2});var mJ=ft,gJ=mJ.setTimeout,yJ=gJ,bJ=Te(yJ),Kx={exports:{}};(function(t){function r(n){if(n)return e(n);this._callbacks=new Map}function e(n){return Object.assign(n,r.prototype),n._callbacks=new Map,n}r.prototype.on=function(n,i){const a=this._callbacks.get(n)??[];return a.push(i),this._callbacks.set(n,a),this},r.prototype.once=function(n,i){const a=(...o)=>{this.off(n,a),i.apply(this,o)};return a.fn=i,this.on(n,a),this},r.prototype.off=function(n,i){if(n===void 0&&i===void 0)return this._callbacks.clear(),this;if(i===void 0)return this._callbacks.delete(n),this;const a=this._callbacks.get(n);if(a){for(const[o,s]of a.entries())if(s===i||s.fn===i){a.splice(o,1);break}a.length===0?this._callbacks.delete(n):this._callbacks.set(n,a)}return this},r.prototype.emit=function(n,...i){const a=this._callbacks.get(n);if(a){const o=[...a];for(const s of o)s.apply(this,i)}return this},r.prototype.listeners=function(n){return this._callbacks.get(n)??[]},r.prototype.listenerCount=function(n){if(n)return this.listeners(n).length;let i=0;for(const a of this._callbacks.values())i+=a.length;return i},r.prototype.hasListeners=function(n){return this.listenerCount(n)>0},r.prototype.addEventListener=r.prototype.on,r.prototype.removeListener=r.prototype.off,r.prototype.removeEventListener=r.prototype.off,r.prototype.removeAllListeners=r.prototype.off,t.exports=r})(Kx);var wJ=Kx.exports,$J=Te(wJ);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $r(t){return zK(t)||BK(t)||Nx(t)||LK()}var jK=ix,s0=Se(jK),HK=tr,WK=HK("Array","concat"),qK=Nt,UK=WK,Zd=Array.prototype,VK=function(t){var r=t.concat;return t===Zd||qK(Zd,t)&&r===Zd.concat?UK:r},GK=VK,KK=GK,YK=KK,l0=Se(YK),XK=Ax,u0=Se(XK),JK=dr,ZK=ct,QK=Dl,eY=Nl,tY=Br,rY=ZK([].concat),x1=JK("Reflect","ownKeys")||function(r){var e=QK.f(tY(r)),n=eY.f;return n?rY(e,n(r)):e},nY=$e,iY=x1;nY({target:"Reflect",stat:!0},{ownKeys:iY});var aY=ft,oY=aY.Reflect.ownKeys,sY=oY,lY=sY,uY=lY,cY=Se(uY),hY=Ox,Nr=Se(hY),dY=$e,fY=Or,Rx=Xh,vY=Ye,pY=vY(function(){Rx(1)});dY({target:"Object",stat:!0,forced:pY},{keys:function(r){return Rx(fY(r))}});var mY=ft,gY=mY.Object.keys,yY=gY,bY=yY,wY=bY,k1=Se(wY),$Y=is.forEach,xY=a0,kY=xY("forEach"),SY=kY?[].forEach:function(r){return $Y(this,r,arguments.length>1?arguments[1]:void 0)},EY=$e,Y4=SY;EY({target:"Array",proto:!0,forced:[].forEach!==Y4},{forEach:Y4});var TY=tr,_Y=TY("Array","forEach"),OY=_Y,IY=OY,CY=di,PY=Rt,AY=Nt,MY=IY,Qd=Array.prototype,DY={DOMTokenList:!0,NodeList:!0},Fx=function(t){var r=t.forEach;return t===Qd||AY(Qd,t)&&r===Qd.forEach||PY(DY,CY(t))?MY:r},NY=Fx,xa=Se(NY),RY=$e,FY=ct,zY=Ki,BY=FY([].reverse),X4=[1,2];RY({target:"Array",proto:!0,forced:String(X4)===String(X4.reverse())},{reverse:function(){return zY(this)&&(this.length=this.length),BY(this)}});var LY=tr,jY=LY("Array","reverse"),HY=Nt,WY=jY,ef=Array.prototype,qY=function(t){var r=t.reverse;return t===ef||HY(ef,t)&&r===ef.reverse?WY:r},UY=qY,zx=UY,VY=zx,GY=Se(VY),J4=Qo,KY=TypeError,Bx=function(t,r){if(!delete t[r])throw new KY("Cannot delete property "+J4(r)+" of "+J4(t))},YY=$e,XY=Or,JY=Yh,ZY=qh,QY=Lr,eX=Cx,tX=Uh,rX=Gh,nX=ts,tf=Bx,iX=Al,aX=iX("splice"),oX=Math.max,sX=Math.min;YY({target:"Array",proto:!0,forced:!aX},{splice:function(r,e){var n=XY(this),i=QY(n),a=JY(r,i),o=arguments.length,s,l,u,c,h,d;for(o===0?s=l=0:o===1?(s=0,l=i-a):(s=o-2,l=sX(oX(ZY(e),0),i-a)),tX(i+s-l),u=rX(n,l),c=0;ci-l+s;c--)tf(n,c-1)}else if(s>l)for(c=i-l;c>a;c--)h=c+l-1,d=c+s-1,h in n?n[d]=n[h]:tf(n,d);for(c=0;ca;)for(var l=xX(arguments[a++]),u=o?kX(nf(l),o(l)):nf(l),c=u.length,h=0,d;c>h;)d=u[h++],(!Z4||gX(s,l,d))&&(n[d]=l[d]);return n}:eo,EX=$e,e2=SX;EX({target:"Object",stat:!0,arity:2,forced:Object.assign!==e2},{assign:e2});var TX=ft,_X=TX.Object.assign,OX=_X,IX=OX,CX=IX,PX=Se(CX),AX=$e,MX=Ye,DX=Or,jx=n0,NX=Z8,RX=MX(function(){jx(1)});AX({target:"Object",stat:!0,forced:RX,sham:!NX},{getPrototypeOf:function(r){return jx(DX(r))}});var FX=ft,zX=FX.Object.getPrototypeOf,BX=zX,LX=BX,jX=$e,HX=jt,WX=Ra;jX({target:"Object",stat:!0,sham:!HX},{create:WX});var qX=ft,UX=qX.Object,VX=function(r,e){return UX.create(r,e)},GX=VX,Hx=GX,KX=Hx,YX=Se(KX),mp=ft,XX=Yo;mp.JSON||(mp.JSON={stringify:JSON.stringify});var JX=function(r,e,n){return XX(mp.JSON.stringify,null,arguments)},ZX=JX,QX=ZX,eJ=QX,tJ=Se(eJ),rJ=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",nJ=TypeError,Wx=function(t,r){if(te,o=aJ(n)?n:cJ(n),s=a?lJ(arguments,e):[],l=a?function(){iJ(o,this,s)}:o;return r?t(l,i):t(l)}:t},dJ=$e,Vx=dt,fJ=Ux,t2=fJ(Vx.setInterval,!0);dJ({global:!0,bind:!0,forced:Vx.setInterval!==t2},{setInterval:t2});var vJ=$e,Gx=dt,pJ=Ux,r2=pJ(Gx.setTimeout,!0);vJ({global:!0,bind:!0,forced:Gx.setTimeout!==r2},{setTimeout:r2});var mJ=ft,gJ=mJ.setTimeout,yJ=gJ,bJ=Se(yJ),Kx={exports:{}};(function(t){function r(n){if(n)return e(n);this._callbacks=new Map}function e(n){return Object.assign(n,r.prototype),n._callbacks=new Map,n}r.prototype.on=function(n,i){const a=this._callbacks.get(n)??[];return a.push(i),this._callbacks.set(n,a),this},r.prototype.once=function(n,i){const a=(...o)=>{this.off(n,a),i.apply(this,o)};return a.fn=i,this.on(n,a),this},r.prototype.off=function(n,i){if(n===void 0&&i===void 0)return this._callbacks.clear(),this;if(i===void 0)return this._callbacks.delete(n),this;const a=this._callbacks.get(n);if(a){for(const[o,s]of a.entries())if(s===i||s.fn===i){a.splice(o,1);break}a.length===0?this._callbacks.delete(n):this._callbacks.set(n,a)}return this},r.prototype.emit=function(n,...i){const a=this._callbacks.get(n);if(a){const o=[...a];for(const s of o)s.apply(this,i)}return this},r.prototype.listeners=function(n){return this._callbacks.get(n)??[]},r.prototype.listenerCount=function(n){if(n)return this.listeners(n).length;let i=0;for(const a of this._callbacks.values())i+=a.length;return i},r.prototype.hasListeners=function(n){return this.listenerCount(n)>0},r.prototype.addEventListener=r.prototype.on,r.prototype.removeListener=r.prototype.off,r.prototype.removeEventListener=r.prototype.off,r.prototype.removeAllListeners=r.prototype.off,t.exports=r})(Kx);var wJ=Kx.exports,$J=Se(wJ);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 * http://naver.github.io/egjs * * Forked By Naver egjs @@ -386,9 +386,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * Licensed under the MIT license */function mn(){return mn=Object.assign||function(t){for(var r=1;r"u"?{style:{}}:document.createElement("div"),kJ="function",vo=Math.round,Sa=Math.abs,S1=Date.now;function c0(t,r){for(var e,n,i=r[0].toUpperCase()+r.slice(1),a=0;a"u"?Kn={}:Kn=window;var Yx=c0(xJ.style,"touchAction"),Xx=Yx!==void 0;function SJ(){if(!Xx)return!1;var t={},r=Kn.CSS&&Kn.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return t[e]=r?Kn.CSS.supports("touch-action",e):!0}),t}var Jx="compute",Zx="auto",yp="manipulation",fa="none",ll="pan-x",ul="pan-y",Vu=SJ(),EJ=/mobile|tablet|ip(ad|hone|od)|android/i,Qx="ontouchstart"in Kn,TJ=c0(Kn,"PointerEvent")!==void 0,_J=Qx&&EJ.test(navigator.userAgent),Hl="touch",OJ="pen",E1="mouse",IJ="kinect",CJ=25,ur=1,za=2,Pt=4,Sr=8,nh=1,Wl=2,ql=4,Ul=8,Do=16,In=Wl|ql,va=Ul|Do,e9=In|va,t9=["x","y"],ih=["clientX","clientY"];function Yn(t,r,e){var n;if(t)if(t.forEach)t.forEach(r,e);else if(t.length!==void 0)for(n=0;n-1}function PJ(t){if(sa(t,fa))return fa;var r=sa(t,ll),e=sa(t,ul);return r&&e?fa:r||e?r?ll:ul:sa(t,yp)?yp:Zx}var r9=function(){function t(e,n){this.manager=e,this.set(n)}var r=t.prototype;return r.set=function(n){n===Jx&&(n=this.compute()),Xx&&this.manager.element.style&&Vu[n]&&(this.manager.element.style[Yx]=n),this.actions=n.toLowerCase().trim()},r.update=function(){this.set(this.manager.options.touchAction)},r.compute=function(){var n=[];return Yn(this.manager.recognizers,function(i){h0(i.options.enable,[i])&&(n=n.concat(i.getTouchAction()))}),PJ(n.join(" "))},r.preventDefaults=function(n){var i=n.srcEvent,a=n.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var o=this.actions,s=sa(o,fa)&&!Vu[fa],l=sa(o,ul)&&!Vu[ul],u=sa(o,ll)&&!Vu[ll];if(s){var c=n.pointers.length===1,h=n.distance<2,d=n.deltaTime<250;if(c&&h&&d)return}if(!(u&&l)&&(s||l&&a&In||u&&a&va))return this.preventSrc(i)},r.preventSrc=function(n){this.manager.session.prevented=!0,n.preventDefault()},t}();function T1(t,r){for(;t;){if(t===r)return!0;t=t.parentNode}return!1}function n9(t){var r=t.length;if(r===1)return{x:vo(t[0].clientX),y:vo(t[0].clientY)};for(var e=0,n=0,i=0;i=Sa(r)?t<0?Wl:ql:r<0?Ul:Do}function AJ(t,r){var e=r.center,n=t.offsetDelta||{},i=t.prevDelta||{},a=t.prevInput||{};(r.eventType===ur||a.eventType===Pt)&&(i=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=t.offsetDelta={x:e.x,y:e.y}),r.deltaX=i.x+(e.x-n.x),r.deltaY=i.y+(e.y-n.y)}function a9(t,r,e){return{x:r/t||0,y:e/t||0}}function MJ(t,r){return ah(r[0],r[1],ih)/ah(t[0],t[1],ih)}function DJ(t,r){return bp(r[1],r[0],ih)+bp(t[1],t[0],ih)}function NJ(t,r){var e=t.lastInterval||r,n=r.timeStamp-e.timeStamp,i,a,o,s;if(r.eventType!==Sr&&(n>CJ||e.velocity===void 0)){var l=r.deltaX-e.deltaX,u=r.deltaY-e.deltaY,c=a9(n,l,u);a=c.x,o=c.y,i=Sa(c.x)>Sa(c.y)?c.x:c.y,s=i9(l,u),t.lastInterval=r}else i=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;r.velocity=i,r.velocityX=a,r.velocityY=o,r.direction=s}function RJ(t,r){var e=t.session,n=r.pointers,i=n.length;e.firstInput||(e.firstInput=i2(r)),i>1&&!e.firstMultiple?e.firstMultiple=i2(r):i===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,l=r.center=n9(n);r.timeStamp=S1(),r.deltaTime=r.timeStamp-a.timeStamp,r.angle=bp(s,l),r.distance=ah(s,l),AJ(e,r),r.offsetDirection=i9(r.deltaX,r.deltaY);var u=a9(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=u.x,r.overallVelocityY=u.y,r.overallVelocity=Sa(u.x)>Sa(u.y)?u.x:u.y,r.scale=o?MJ(o.pointers,n):1,r.rotation=o?DJ(o.pointers,n):0,r.maxPointers=e.prevInput?r.pointers.length>e.prevInput.maxPointers?r.pointers.length:e.prevInput.maxPointers:r.pointers.length,NJ(e,r);var c=t.element,h=r.srcEvent,d;h.composedPath?d=h.composedPath()[0]:h.path?d=h.path[0]:d=h.target,T1(d,c)&&(c=d),r.target=c}function FJ(t,r,e){var n=e.pointers.length,i=e.changedPointers.length,a=r&ur&&n-i===0,o=r&(Pt|Sr)&&n-i===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=r,RJ(t,e),t.emit("hammer.input",e),t.recognize(e),t.session.prevInput=e}function cl(t){return t.trim().split(/\s+/g)}function Ws(t,r,e){Yn(cl(r),function(n){t.addEventListener(n,e,!1)})}function qs(t,r,e){Yn(cl(r),function(n){t.removeEventListener(n,e,!1)})}function a2(t){var r=t.ownerDocument||t;return r.defaultView||r.parentWindow||window}var os=function(){function t(e,n){var i=this;this.manager=e,this.callback=n,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){h0(e.options.enable,[e])&&i.handler(a)},this.init()}var r=t.prototype;return r.handler=function(){},r.init=function(){this.evEl&&Ws(this.element,this.evEl,this.domHandler),this.evTarget&&Ws(this.target,this.evTarget,this.domHandler),this.evWin&&Ws(a2(this.element),this.evWin,this.domHandler)},r.destroy=function(){this.evEl&&qs(this.element,this.evEl,this.domHandler),this.evTarget&&qs(this.target,this.evTarget,this.domHandler),this.evWin&&qs(a2(this.element),this.evWin,this.domHandler)},t}();function Ea(t,r,e){if(t.indexOf&&!e)return t.indexOf(r);for(var n=0;nl[r]}):n=n.sort()),n}var LJ={touchstart:ur,touchmove:za,touchend:Pt,touchcancel:Sr},jJ="touchstart touchmove touchend touchcancel",O1=function(t){rn(r,t);function r(){var n;return r.prototype.evTarget=jJ,n=t.apply(this,arguments)||this,n.targetIds={},n}var e=r.prototype;return e.handler=function(i){var a=LJ[i.type],o=HJ.call(this,i,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Hl,srcEvent:i})},r}(os);function HJ(t,r){var e=hl(t.touches),n=this.targetIds;if(r&(ur|za)&&e.length===1)return n[e[0].identifier]=!0,[e,e];var i,a,o=hl(t.changedTouches),s=[],l=this.target;if(a=e.filter(function(u){return T1(u.target,l)}),r===ur)for(i=0;i-1&&i.splice(s,1)};setTimeout(a,VJ)}}function GJ(t,r){t&ur?(this.primaryTouch=r.changedPointers[0].identifier,s2.call(this,r)):t&(Pt|Sr)&&s2.call(this,r)}function KJ(t){for(var r=t.srcEvent.clientX,e=t.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(i,1),this},r.hasRequireFailures=function(){return this.requireFail.length>0},r.canRecognizeWith=function(n){return!!this.simultaneous[n.id]},r.emit=function(n){var i=this,a=this.state;function o(s){i.manager.emit(s,n)}a=Ci&&o(i.options.event+l2(a))},r.tryEmit=function(n){if(this.canEmit())return this.emit(n);this.state=Tn},r.canEmit=function(){for(var n=0;na.threshold&&l&a.direction},e.attrTest=function(i){return Ro.prototype.attrTest.call(this,i)&&(this.state&Jr||!(this.state&Jr)&&this.directionTest(i))},e.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var a=c9(i.direction);a&&(i.additionalEvent=this.options.event+a),t.prototype.emit.call(this,i)},r}(Ro),h9=function(t){rn(r,t);function r(n){return n===void 0&&(n={}),t.call(this,mn({event:"swipe",threshold:10,velocity:.3,direction:In|va,pointers:1},n))||this}var e=r.prototype;return e.getTouchAction=function(){return C1.prototype.getTouchAction.call(this)},e.attrTest=function(i){var a=this.options.direction,o;return a&(In|va)?o=i.overallVelocity:a&In?o=i.overallVelocityX:a&va&&(o=i.overallVelocityY),t.prototype.attrTest.call(this,i)&&a&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&Sa(o)>this.options.velocity&&i.eventType&Pt},e.emit=function(i){var a=c9(i.offsetDirection);a&&this.manager.emit(this.options.event+a,i),this.manager.emit(this.options.event,i)},r}(Ro),d9=function(t){rn(r,t);function r(n){return n===void 0&&(n={}),t.call(this,mn({event:"pinch",threshold:0,pointers:2},n))||this}var e=r.prototype;return e.getTouchAction=function(){return[fa]},e.attrTest=function(i){return t.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&Jr)},e.emit=function(i){if(i.scale!==1){var a=i.scale<1?"in":"out";i.additionalEvent=this.options.event+a}t.prototype.emit.call(this,i)},r}(Ro),f9=function(t){rn(r,t);function r(n){return n===void 0&&(n={}),t.call(this,mn({event:"rotate",threshold:0,pointers:2},n))||this}var e=r.prototype;return e.getTouchAction=function(){return[fa]},e.attrTest=function(i){return t.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&Jr)},r}(Ro),v9=function(t){rn(r,t);function r(n){var i;return n===void 0&&(n={}),i=t.call(this,mn({event:"press",pointers:1,time:251,threshold:9},n))||this,i._timer=null,i._input=null,i}var e=r.prototype;return e.getTouchAction=function(){return[Zx]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,l=i.distanceo.time;if(this._input=i,!l||!s||i.eventType&(Pt|Sr)&&!u)this.reset();else if(i.eventType&ur)this.reset(),this._timer=setTimeout(function(){a.state=Xn,a.tryEmit()},o.time);else if(i.eventType&Pt)return Xn;return Tn},e.reset=function(){clearTimeout(this._timer)},e.emit=function(i){this.state===Xn&&(i&&i.eventType&Pt?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=S1(),this.manager.emit(this.options.event,this._input)))},r}(Vl),p9={domEvents:!1,touchAction:Jx,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},u2=[[f9,{enable:!1}],[d9,{enable:!1},["rotate"]],[h9,{direction:In}],[C1,{direction:In},["swipe"]],[wp],[wp,{event:"doubletap",taps:2},["tap"]],[v9]],ZJ=1,c2=2;function h2(t,r){var e=t.element;if(e.style){var n;Yn(t.options.cssProps,function(i,a){n=c0(e.style,a),r?(t.oldCssProps[n]=e.style[n],e.style[n]=i):e.style[n]=t.oldCssProps[n]||""}),r||(t.oldCssProps={})}}function QJ(t,r){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=r,r.target.dispatchEvent(e)}var d2=function(){function t(e,n){var i=this;this.options=ka({},p9,n||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=YJ(this),this.touchAction=new r9(this,this.options.touchAction),h2(this,!0),Yn(this.options.recognizers,function(a){var o=i.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var r=t.prototype;return r.set=function(n){return ka(this.options,n),n.touchAction&&this.touchAction.update(),n.inputTarget&&(this.input.destroy(),this.input.target=n.inputTarget,this.input.init()),this},r.stop=function(n){this.session.stopped=n?c2:ZJ},r.recognize=function(n){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(n);var a,o=this.recognizers,s=i.curRecognizer;(!s||s&&s.state&Xn)&&(i.curRecognizer=null,s=null);for(var l=0;l\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,n,a),t.apply(this,arguments)}}var g9=m9(function(t,r,e){for(var n=Object.keys(r),i=0;i=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function uZ(t,r){var e;if(t){if(typeof t=="string")return v2(t,r);var n=u0(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return w1(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v2(t,r)}}function v2(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e1?e-1:0),i=1;i2){var n;return oh.apply(void 0,l0(n=[w9(r[0],r[1])]).call(n,$r(u0(r).call(r,2))))}var i=r[0],a=r[1];if(i instanceof Date&&a instanceof Date)return i.setTime(a.getTime()),i;var o=y9(cY(a)),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;Object.prototype.propertyIsEnumerable.call(a,l)&&(a[l]===b9?delete i[l]:i[l]!==null&&a[l]!==null&&typeof i[l]=="object"&&typeof a[l]=="object"&&!Nr(i[l])&&!Nr(a[l])?i[l]=oh(i[l],a[l]):i[l]=$9(a[l]))}}catch(u){o.e(u)}finally{o.f()}return i}function $9(t){return Nr(t)?cn(t).call(t,function(r){return $9(r)}):typeof t=="object"&&t!==null?t instanceof Date?new Date(t.getTime()):oh({},t):t}function x9(t){for(var r=0,e=k1(t);ro;)l=n(e,s=i[o++]),l!==void 0&&YZ(a,s,l);return a}});var XZ=ft,JZ=XZ.Object.getOwnPropertyDescriptors,ZZ=JZ,QZ=ZZ,eQ=QZ,b2=Te(eQ),A9={exports:{}},tQ=ke,rQ=jt,w2=Kh.f;tQ({target:"Object",stat:!0,forced:Object.defineProperties!==w2,sham:!rQ},{defineProperties:w2});var nQ=ft,M9=nQ.Object,iQ=A9.exports=function(r,e){return M9.defineProperties(r,e)};M9.defineProperties.sham&&(iQ.sham=!0);var aQ=A9.exports,oQ=aQ,sQ=oQ,lQ=sQ,uQ=Te(lQ),cQ=h8,hQ=Te(cQ);function D9(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var dQ=Hx,fQ=dQ,vQ=fQ,pQ=vQ,N9=pQ,mQ=Te(N9),gQ=ke,yQ=tx;gQ({target:"Object",stat:!0},{setPrototypeOf:yQ});var bQ=ft,wQ=bQ.Object.setPrototypeOf,$Q=wQ,xQ=$Q,kQ=xQ,SQ=kQ,EQ=SQ,TQ=EQ,R9=TQ,$p=Te(R9),_Q=gx,OQ=_Q,IQ=OQ,CQ=IQ,PQ=CQ,F9=Te(PQ);function xp(t,r){var e;return xp=$p?F9(e=$p).call(e):function(i,a){return i.__proto__=a,i},xp(t,r)}function AQ(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=mQ(r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Wh(t,"prototype",{writable:!1}),xp(t,r)}function MQ(t,r){if(r&&(Mo(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D9(t)}var DQ=LX,NQ=DQ,RQ=NQ,FQ=RQ,z9=FQ,$2=Te(z9);function sh(t){var r;return sh=$p?F9(r=$2).call(r):function(n){return n.__proto__||$2(n)},sh(t)}var B9={exports:{}},L9={exports:{}};(function(t){var r=g1,e=dx;function n(i){"@babel/helpers - typeof";return t.exports=n=typeof r=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof r=="function"&&a.constructor===r&&a!==r.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,n(i)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(L9);var zQ=L9.exports,BQ=Fx,LQ=BQ,jQ=LQ,HQ=jQ,WQ=HQ,x2=Rt,qQ=x1,UQ=Ma,VQ=Ir,GQ=function(t,r,e){for(var n=qQ(r),i=VQ.f,a=UQ.f,o=0;oh;h++)if(f=y(t[h]),f&&S2(T2,f))return f;return new Cc(!1)}u=pee(t,c)}for(v=a?t.next:u.next;!(g=cee(v,u)).done;){try{f=y(g.value)}catch($){E2(u,"throw",$)}if(typeof f=="object"&&f&&S2(T2,f))return f}return new Cc(!1)},yee=Na,bee=function(t,r){return t===void 0?arguments.length<2?"":r:yee(t)},wee=ke,$ee=Nt,xee=n0,lh=tx,kee=GQ,W9=Ra,of=hi,sf=Da,See=XQ,Eee=lee,Tee=Ba,_ee=bee,Oee=mt,Iee=Oee("toStringTag"),uh=Error,Cee=[].push,Fo=function(r,e){var n=$ee(lf,this),i;lh?i=lh(new uh,n?xee(this):lf):(i=n?this:W9(lf),of(i,Iee,"Error")),e!==void 0&&of(i,"message",_ee(e)),Eee(i,Fo,i.stack,1),arguments.length>2&&See(i,arguments[2]);var a=[];return Tee(r,Cee,{that:a}),of(i,"errors",a),i};lh?lh(Fo,uh):kee(Fo,uh,{name:!0});var lf=Fo.prototype=W9(uh.prototype,{constructor:sf(1,Fo),message:sf(1,""),name:sf(1,"AggregateError")});wee({global:!0,constructor:!0,arity:2},{AggregateError:Fo});var Pee=dr,Aee=l1,Mee=mt,Dee=jt,_2=Mee("species"),q9=function(t){var r=Pee(t);Dee&&r&&!r[_2]&&Aee(r,_2,{configurable:!0,get:function(){return this}})},Nee=Nt,Ree=TypeError,A1=function(t,r){if(Nee(r,t))return t;throw new Ree("Incorrect invocation")},O2=Br,Fee=k9,zee=Xo,Bee=mt,Lee=Bee("species"),U9=function(t,r){var e=O2(t).constructor,n;return e===void 0||zee(n=O2(e)[Lee])?r:Fee(n)},jee=Vi,V9=/(?:ipad|iphone|ipod).*applewebkit/i.test(jee),Rr=dt,Hee=Yo,Wee=Gi,I2=wt,qee=Rt,G9=Ye,C2=$8,Uee=Bl,P2=n1,Vee=Wx,Gee=V9,Kee=jl,kp=Rr.setImmediate,Sp=Rr.clearImmediate,Yee=Rr.process,uf=Rr.Dispatch,Xee=Rr.Function,A2=Rr.MessageChannel,Jee=Rr.String,cf=0,Us={},M2="onreadystatechange",fl,na,hf,df;G9(function(){fl=Rr.location});var M1=function(t){if(qee(Us,t)){var r=Us[t];delete Us[t],r()}},ff=function(t){return function(){M1(t)}},D2=function(t){M1(t.data)},N2=function(t){Rr.postMessage(Jee(t),fl.protocol+"//"+fl.host)};(!kp||!Sp)&&(kp=function(r){Vee(arguments.length,1);var e=I2(r)?r:Xee(r),n=Uee(arguments,1);return Us[++cf]=function(){Hee(e,void 0,n)},na(cf),cf},Sp=function(r){delete Us[r]},Kee?na=function(t){Yee.nextTick(ff(t))}:uf&&uf.now?na=function(t){uf.now(ff(t))}:A2&&!Gee?(hf=new A2,df=hf.port2,hf.port1.onmessage=D2,na=Wee(df.postMessage,df)):Rr.addEventListener&&I2(Rr.postMessage)&&!Rr.importScripts&&fl&&fl.protocol!=="file:"&&!G9(N2)?(na=N2,Rr.addEventListener("message",D2,!1)):M2 in P2("script")?na=function(t){C2.appendChild(P2("script"))[M2]=function(){C2.removeChild(this),M1(t)}}:na=function(t){setTimeout(ff(t),0)});var K9={set:kp,clear:Sp},Y9=function(){this.head=null,this.tail=null};Y9.prototype={add:function(t){var r={item:t,next:null},e=this.tail;e?e.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t){var r=this.head=t.next;return r===null&&(this.tail=null),t.item}}};var X9=Y9,Zee=Vi,Qee=/ipad|iphone|ipod/i.test(Zee)&&typeof Pebble<"u",ete=Vi,tte=/web0s(?!.*chrome)/i.test(ete),Ta=dt,R2=Gi,rte=Ma.f,vf=K9.set,nte=X9,ite=V9,ate=Qee,ote=tte,pf=jl,F2=Ta.MutationObserver||Ta.WebKitMutationObserver,z2=Ta.document,B2=Ta.process,Ku=Ta.Promise,L2=rte(Ta,"queueMicrotask"),Ep=L2&&L2.value,to,mf,gf,Yu,j2;if(!Ep){var Xu=new nte,Ju=function(){var t,r;for(pf&&(t=B2.domain)&&t.exit();r=Xu.get();)try{r()}catch(e){throw Xu.head&&to(),e}t&&t.enter()};!ite&&!pf&&!ote&&F2&&z2?(mf=!0,gf=z2.createTextNode(""),new F2(Ju).observe(gf,{characterData:!0}),to=function(){gf.data=mf=!mf}):!ate&&Ku&&Ku.resolve?(Yu=Ku.resolve(void 0),Yu.constructor=Ku,j2=R2(Yu.then,Yu),to=function(){j2(Ju)}):pf?to=function(){B2.nextTick(Ju)}:(vf=R2(vf,Ta),to=function(){vf(Ju)}),Ep=function(t){Xu.head||to(),Xu.add(t)}}var ste=Ep,lte=function(t,r){try{arguments.length===1?console.error(t):console.error(t,r)}catch{}},ss=function(t){try{return{error:!1,value:t()}}catch(r){return{error:!0,value:r}}},ute=dt,ls=ute.Promise,J9=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",cte=J9,hte=jl,dte=!cte&&!hte&&typeof window=="object"&&typeof document=="object",fte=dt,Vs=ls,vte=wt,pte=l8,mte=v8,gte=mt,yte=dte,bte=J9,yf=Jo,H2=Vs&&Vs.prototype,wte=gte("species"),Tp=!1,Z9=vte(fte.PromiseRejectionEvent),$te=pte("Promise",function(){var t=mte(Vs),r=t!==String(Vs);if(!r&&yf===66||!(H2.catch&&H2.finally))return!0;if(!yf||yf<51||!/native code/.test(t)){var e=new Vs(function(a){a(1)}),n=function(a){a(function(){},function(){})},i=e.constructor={};if(i[wte]=n,Tp=e.then(function(){})instanceof n,!Tp)return!0}return!r&&(yte||bte)&&!Z9}),Gl={CONSTRUCTOR:$te,REJECTION_EVENT:Z9,SUBCLASSING:Tp},Fn={},W2=_r,xte=TypeError,kte=function(t){var r,e;this.promise=new t(function(n,i){if(r!==void 0||e!==void 0)throw new xte("Bad Promise constructor");r=n,e=i}),this.resolve=W2(r),this.reject=W2(e)};Fn.f=function(t){return new kte(t)};var Ste=ke,ch=jl,zi=dt,Kl=Ht,Ete=rs,Tte=Fa,_te=q9,Ote=_r,_p=wt,Ite=Jt,Cte=A1,Pte=U9,Q9=K9.set,D1=ste,Ate=lte,Mte=ss,Dte=X9,ek=ns,Op=ls,tk=Gl,rk=Fn,d0="Promise",nk=tk.CONSTRUCTOR,Nte=tk.REJECTION_EVENT,bf=ek.getterFor(d0),Rte=ek.set,Fte=Op&&Op.prototype,mo=Op,wf=Fte,ik=zi.TypeError,Ip=zi.document,N1=zi.process,Cp=rk.f,zte=Cp,Bte=!!(Ip&&Ip.createEvent&&zi.dispatchEvent),ak="unhandledrejection",Lte="rejectionhandled",q2=0,ok=1,jte=2,R1=1,sk=2,Zu,U2,Hte,lk=function(t){var r;return Ite(t)&&_p(r=t.then)?r:!1},uk=function(t,r){var e=r.value,n=r.state===ok,i=n?t.ok:t.fail,a=t.resolve,o=t.reject,s=t.domain,l,u,c;try{i?(n||(r.rejection===sk&&qte(r),r.rejection=R1),i===!0?l=e:(s&&s.enter(),l=i(e),s&&(s.exit(),c=!0)),l===t.promise?o(new ik("Promise-chain cycle")):(u=lk(l))?Kl(u,l,a,o):a(l)):o(e)}catch(h){s&&!c&&s.exit(),o(h)}},ck=function(t,r){t.notified||(t.notified=!0,D1(function(){for(var e=t.reactions,n;n=e.get();)uk(n,t);t.notified=!1,r&&!t.rejection&&Wte(t)}))},hk=function(t,r,e){var n,i;Bte?(n=Ip.createEvent("Event"),n.promise=r,n.reason=e,n.initEvent(t,!1,!0),zi.dispatchEvent(n)):n={promise:r,reason:e},!Nte&&(i=zi["on"+t])?i(n):t===ak&&Ate("Unhandled promise rejection",e)},Wte=function(t){Kl(Q9,zi,function(){var r=t.facade,e=t.value,n=V2(t),i;if(n&&(i=Mte(function(){ch?N1.emit("unhandledRejection",e,r):hk(ak,r,e)}),t.rejection=ch||V2(t)?sk:R1,i.error))throw i.value})},V2=function(t){return t.rejection!==R1&&!t.parent},qte=function(t){Kl(Q9,zi,function(){var r=t.facade;ch?N1.emit("rejectionHandled",r):hk(Lte,r,t.value)})},go=function(t,r,e){return function(n){t(r,n,e)}},Eo=function(t,r,e){t.done||(t.done=!0,e&&(t=e),t.value=r,t.state=jte,ck(t,!0))},Pp=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw new ik("Promise can't be resolved itself");var n=lk(r);n?D1(function(){var i={done:!1};try{Kl(n,r,go(Pp,i,t),go(Eo,i,t))}catch(a){Eo(i,a,t)}}):(t.value=r,t.state=ok,ck(t,!1))}catch(i){Eo({done:!1},i,t)}}};nk&&(mo=function(r){Cte(this,wf),Ote(r),Kl(Zu,this);var e=bf(this);try{r(go(Pp,e),go(Eo,e))}catch(n){Eo(e,n)}},wf=mo.prototype,Zu=function(r){Rte(this,{type:d0,done:!1,notified:!1,parent:!1,reactions:new Dte,rejection:!1,state:q2,value:void 0})},Zu.prototype=Ete(wf,"then",function(r,e){var n=bf(this),i=Cp(Pte(this,mo));return n.parent=!0,i.ok=_p(r)?r:!0,i.fail=_p(e)&&e,i.domain=ch?N1.domain:void 0,n.state===q2?n.reactions.add(i):D1(function(){uk(i,n)}),i.promise}),U2=function(){var t=new Zu,r=bf(t);this.promise=t,this.resolve=go(Pp,r),this.reject=go(Eo,r)},rk.f=Cp=function(t){return t===mo||t===Hte?new U2(t):zte(t)});Ste({global:!0,constructor:!0,wrap:!0,forced:nk},{Promise:mo});Tte(mo,d0,!1,!0);_te(d0);var Ute=ls,Vte=Sx,Gte=Gl.CONSTRUCTOR,f0=Gte||!Vte(function(t){Ute.all(t).then(void 0,function(){})}),Kte=ke,Yte=Ht,Xte=_r,Jte=Fn,Zte=ss,Qte=Ba,ere=f0;Kte({target:"Promise",stat:!0,forced:ere},{all:function(r){var e=this,n=Jte.f(e),i=n.resolve,a=n.reject,o=Zte(function(){var s=Xte(e.resolve),l=[],u=0,c=1;Qte(r,function(h){var d=u++,f=!1;c++,Yte(s,e,h).then(function(v){f||(f=!0,l[d]=v,--c||i(l))},a)}),--c||i(l)});return o.error&&a(o.value),n.promise}});var tre=ke,rre=Gl.CONSTRUCTOR,G2=ls;G2&&G2.prototype;tre({target:"Promise",proto:!0,forced:rre,real:!0},{catch:function(t){return this.then(void 0,t)}});var nre=ke,ire=Ht,are=_r,ore=Fn,sre=ss,lre=Ba,ure=f0;nre({target:"Promise",stat:!0,forced:ure},{race:function(r){var e=this,n=ore.f(e),i=n.reject,a=sre(function(){var o=are(e.resolve);lre(r,function(s){ire(o,e,s).then(n.resolve,i)})});return a.error&&i(a.value),n.promise}});var cre=ke,hre=Ht,dre=Fn,fre=Gl.CONSTRUCTOR;cre({target:"Promise",stat:!0,forced:fre},{reject:function(r){var e=dre.f(this);return hre(e.reject,void 0,r),e.promise}});var vre=Br,pre=Jt,mre=Fn,dk=function(t,r){if(vre(t),pre(r)&&r.constructor===t)return r;var e=mre.f(t),n=e.resolve;return n(r),e.promise},gre=ke,yre=dr,bre=OF,wre=ls,$re=Gl.CONSTRUCTOR,xre=dk,kre=yre("Promise"),Sre=!$re;gre({target:"Promise",stat:!0,forced:bre},{resolve:function(r){return xre(Sre&&this===kre?wre:this,r)}});var Ere=ke,Tre=Ht,_re=_r,Ore=Fn,Ire=ss,Cre=Ba,Pre=f0;Ere({target:"Promise",stat:!0,forced:Pre},{allSettled:function(r){var e=this,n=Ore.f(e),i=n.resolve,a=n.reject,o=Ire(function(){var s=_re(e.resolve),l=[],u=0,c=1;Cre(r,function(h){var d=u++,f=!1;c++,Tre(s,e,h).then(function(v){f||(f=!0,l[d]={status:"fulfilled",value:v},--c||i(l))},function(v){f||(f=!0,l[d]={status:"rejected",reason:v},--c||i(l))})}),--c||i(l)});return o.error&&a(o.value),n.promise}});var Are=ke,Mre=Ht,Dre=_r,Nre=dr,Rre=Fn,Fre=ss,zre=Ba,Bre=f0,K2="No one promise resolved";Are({target:"Promise",stat:!0,forced:Bre},{any:function(r){var e=this,n=Nre("AggregateError"),i=Rre.f(e),a=i.resolve,o=i.reject,s=Fre(function(){var l=Dre(e.resolve),u=[],c=0,h=1,d=!1;zre(r,function(f){var v=c++,g=!1;h++,Mre(l,e,f).then(function(b){g||d||(d=!0,a(b))},function(b){g||d||(g=!0,u[v]=b,--h||o(new n(u,K2)))})}),--h||o(new n(u,K2))});return s.error&&o(s.value),i.promise}});var Lre=ke,Ap=ls,jre=Ye,Hre=dr,Wre=wt,qre=U9,Y2=dk,Ure=Ap&&Ap.prototype,Vre=!!Ap&&jre(function(){Ure.finally.call({then:function(){}},function(){})});Lre({target:"Promise",proto:!0,real:!0,forced:Vre},{finally:function(t){var r=qre(this,Hre("Promise")),e=Wre(t);return this.then(e?function(n){return Y2(r,t()).then(function(){return n})}:t,e?function(n){return Y2(r,t()).then(function(){throw n})}:t)}});var Gre=ft,Kre=Gre.Promise,Yre=Kre,Xre=Yre,Jre=ke,Zre=Fn;Jre({target:"Promise",stat:!0},{withResolvers:function(){var r=Zre.f(this);return{promise:r.promise,resolve:r.resolve,reject:r.reject}}});var Qre=Xre,ene=Qre,tne=ke,rne=Fn,nne=ss;tne({target:"Promise",stat:!0,forced:!0},{try:function(t){var r=rne.f(this),e=nne(t);return(e.error?r.reject:r.resolve)(e.value),r.promise}});var ine=ene,ane=ine,one=ane,sne=zx,lne=sne,une=lne,cne=une,hne=cne;(function(t){var r=zQ.default,e=d8,n=g1,i=N9,a=z9,o=WQ,s=Px,l=R9,u=one,c=hne,h=Mx;function d(){t.exports=d=function(){return v},t.exports.__esModule=!0,t.exports.default=t.exports;var f,v={},g=Object.prototype,b=g.hasOwnProperty,y=e||function(Z,W,V){Z[W]=V.value},$=typeof n=="function"?n:{},k=$.iterator||"@@iterator",_=$.asyncIterator||"@@asyncIterator",P=$.toStringTag||"@@toStringTag";function S(Z,W,V){return e(Z,W,{value:V,enumerable:!0,configurable:!0,writable:!0}),Z[W]}try{S({},"")}catch{S=function(V,de,Oe){return V[de]=Oe}}function D(Z,W,V,de){var Oe=W&&W.prototype instanceof ie?W:ie,we=i(Oe.prototype),Qe=new it(de||[]);return y(we,"_invoke",{value:I(Z,V,Qe)}),we}function B(Z,W,V){try{return{type:"normal",arg:Z.call(W,V)}}catch(de){return{type:"throw",arg:de}}}v.wrap=D;var R="suspendedStart",A="suspendedYield",z="executing",L="completed",J={};function ie(){}function oe(){}function me(){}var Ce={};S(Ce,k,function(){return this});var ne=a,ue=ne&&ne(ne(Le([])));ue&&ue!==g&&b.call(ue,k)&&(Ce=ue);var T=me.prototype=ie.prototype=i(Ce);function ge(Z){var W;o(W=["next","throw","return"]).call(W,function(V){S(Z,V,function(de){return this._invoke(V,de)})})}function ye(Z,W){function V(Oe,we,Qe,Et){var Tt=B(Z[Oe],Z,we);if(Tt.type!=="throw"){var fr=Tt.arg,Zt=fr.value;return Zt&&r(Zt)=="object"&&b.call(Zt,"__await")?W.resolve(Zt.__await).then(function(yn){V("next",yn,Qe,Et)},function(yn){V("throw",yn,Qe,Et)}):W.resolve(Zt).then(function(yn){fr.value=yn,Qe(fr)},function(yn){return V("throw",yn,Qe,Et)})}Et(Tt.arg)}var de;y(this,"_invoke",{value:function(we,Qe){function Et(){return new W(function(Tt,fr){V(we,Qe,Tt,fr)})}return de=de?de.then(Et,Et):Et()}})}function I(Z,W,V){var de=R;return function(Oe,we){if(de===z)throw new Error("Generator is already running");if(de===L){if(Oe==="throw")throw we;return{value:f,done:!0}}for(V.method=Oe,V.arg=we;;){var Qe=V.delegate;if(Qe){var Et=De(Qe,V);if(Et){if(Et===J)continue;return Et}}if(V.method==="next")V.sent=V._sent=V.arg;else if(V.method==="throw"){if(de===R)throw de=L,V.arg;V.dispatchException(V.arg)}else V.method==="return"&&V.abrupt("return",V.arg);de=z;var Tt=B(Z,W,V);if(Tt.type==="normal"){if(de=V.done?L:A,Tt.arg===J)continue;return{value:Tt.arg,done:V.done}}Tt.type==="throw"&&(de=L,V.method="throw",V.arg=Tt.arg)}}}function De(Z,W){var V=W.method,de=Z.iterator[V];if(de===f)return W.delegate=null,V==="throw"&&Z.iterator.return&&(W.method="return",W.arg=f,De(Z,W),W.method==="throw")||V!=="return"&&(W.method="throw",W.arg=new TypeError("The iterator does not provide a '"+V+"' method")),J;var Oe=B(de,Z.iterator,W.arg);if(Oe.type==="throw")return W.method="throw",W.arg=Oe.arg,W.delegate=null,J;var we=Oe.arg;return we?we.done?(W[Z.resultName]=we.value,W.next=Z.nextLoc,W.method!=="return"&&(W.method="next",W.arg=f),W.delegate=null,J):we:(W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,J)}function qe(Z){var W,V={tryLoc:Z[0]};1 in Z&&(V.catchLoc=Z[1]),2 in Z&&(V.finallyLoc=Z[2],V.afterLoc=Z[3]),s(W=this.tryEntries).call(W,V)}function Ge(Z){var W=Z.completion||{};W.type="normal",delete W.arg,Z.completion=W}function it(Z){this.tryEntries=[{tryLoc:"root"}],o(Z).call(Z,qe,this),this.reset(!0)}function Le(Z){if(Z||Z===""){var W=Z[k];if(W)return W.call(Z);if(typeof Z.next=="function")return Z;if(!isNaN(Z.length)){var V=-1,de=function Oe(){for(;++V=0;--Oe){var we=this.tryEntries[Oe],Qe=we.completion;if(we.tryLoc==="root")return de("end");if(we.tryLoc<=this.prev){var Et=b.call(we,"catchLoc"),Tt=b.call(we,"finallyLoc");if(Et&&Tt){if(this.prev=0;--de){var Oe=this.tryEntries[de];if(Oe.tryLoc<=this.prev&&b.call(Oe,"finallyLoc")&&this.prev=0;--V){var de=this.tryEntries[V];if(de.finallyLoc===W)return this.complete(de.completion,de.afterLoc),Ge(de),J}},catch:function(W){for(var V=this.tryEntries.length-1;V>=0;--V){var de=this.tryEntries[V];if(de.tryLoc===W){var Oe=de.completion;if(Oe.type==="throw"){var we=Oe.arg;Ge(de)}return we}}throw new Error("illegal catch attempt")},delegateYield:function(W,V,de){return this.delegate={iterator:Le(W),resultName:V,nextLoc:de},this.method==="next"&&(this.arg=f),J}},v}t.exports=d,t.exports.__esModule=!0,t.exports.default=t.exports})(B9);var dne=B9.exports,Pc=dne(),fne=Pc;try{regeneratorRuntime=Pc}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Pc:Function("r","regeneratorRuntime = r")(Pc)}var mr=Te(fne),fk={exports:{}},vne=Ye,pne=vne(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),mne=Ye,gne=Jt,yne=Ui,X2=pne,Ac=Object.isExtensible,bne=mne(function(){Ac(1)}),wne=bne||X2?function(r){return!gne(r)||X2&&yne(r)==="ArrayBuffer"?!1:Ac?Ac(r):!0}:Ac,$ne=Ye,xne=!$ne(function(){return Object.isExtensible(Object.preventExtensions({}))}),kne=ke,Sne=ct,Ene=Ml,Tne=Jt,F1=Rt,_ne=Ir.f,J2=Dl,One=s1,z1=wne,Ine=jh,Cne=xne,vk=!1,oi=Ine("meta"),Pne=0,B1=function(t){_ne(t,oi,{value:{objectID:"O"+Pne++,weakData:{}}})},Ane=function(t,r){if(!Tne(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!F1(t,oi)){if(!z1(t))return"F";if(!r)return"E";B1(t)}return t[oi].objectID},Mne=function(t,r){if(!F1(t,oi)){if(!z1(t))return!0;if(!r)return!1;B1(t)}return t[oi].weakData},Dne=function(t){return Cne&&vk&&z1(t)&&!F1(t,oi)&&B1(t),t},Nne=function(){Rne.enable=function(){},vk=!0;var t=J2.f,r=Sne([].splice),e={};e[oi]=1,t(e).length&&(J2.f=function(n){for(var i=t(n),a=0,o=i.length;a1?arguments[1]:void 0),f;f=f?f.next:h.first;)for(d(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(c){return!!l(this,c)}}),Z2(a,e?{get:function(c){var h=l(this,c);return h&&h.value},set:function(c,h){return s(this,c===0?0:c,h)}}:{add:function(c){return s(this,c=c===0?0:c,c)}}),Os&&rie(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(t,r,e){var n=r+" Iterator",i=$f(r),a=$f(n);sie(t,r,function(o,s){e5(this,{type:n,target:o,state:i(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,l=o.last;l&&l.removed;)l=l.previous;return!o.target||!(o.last=l=l?l.next:o.state.first)?(o.target=void 0,Qu(void 0,!0)):Qu(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},e?"entries":"values",!e,!0),lie(r)}},uie=gk,cie=bk;uie("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},cie);var hie=ft,die=hie.Map,fie=die,vie=fie,pie=vie,wk=Te(pie),mie=ke,gie=is.some,yie=a0,bie=yie("some");mie({target:"Array",proto:!0,forced:!bie},{some:function(r){return gie(this,r,arguments.length>1?arguments[1]:void 0)}});var wie=tr,$ie=wie("Array","some"),xie=Nt,kie=$ie,xf=Array.prototype,Sie=function(t){var r=t.some;return t===xf||xie(xf,t)&&r===xf.some?kie:r},Eie=Sie,Tie=Eie,_ie=Tie,Oie=Te(_ie),Iie=tr,Cie=Iie("Array","keys"),Pie=Cie,Aie=Pie,Mie=di,Die=Rt,Nie=Nt,Rie=Aie,kf=Array.prototype,Fie={DOMTokenList:!0,NodeList:!0},zie=function(t){var r=t.keys;return t===kf||Nie(kf,t)&&r===kf.keys||Die(Fie,Mie(t))?Rie:r},Bie=zie,ro=Te(Bie),t5=S8,Lie=Math.floor,Mp=function(t,r){var e=t.length,n=Lie(e/2);return e<8?jie(t,r):Hie(t,Mp(t5(t,0,n),r),Mp(t5(t,n),r),r)},jie=function(t,r){for(var e=t.length,n=1,i,a;n0;)t[a]=t[--a];a!==n++&&(t[a]=i)}return t},Hie=function(t,r,e,n){for(var i=r.length,a=e.length,o=0,s=0;o3)){if(rae)return!0;if(l5)return l5<603;var t="",r,e,n,i;for(r=65;r<76;r++){switch(e=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)Si.push({k:e+i,v:n})}for(Si.sort(function(a,o){return o.v-a.v}),i=0;ia5(e)?1:-1}};Xie({target:"Array",proto:!0,forced:sae},{sort:function(r){r!==void 0&&Jie(r);var e=Zie(this);if(xk)return r===void 0?u5(e):u5(e,r);var n=[],i=i5(e),a,o;for(o=0;othis.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=bJ(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,n;xa(e=Lx(n=this._queue).call(n,0)).call(e,function(i){i.fn.apply(i.context||i.fn,i.args||[])})}}],[{key:"extend",value:function(e,n){var i=new t(n);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){i.flush()};var a=[{name:"flush",original:void 0}];if(n&&n.replace)for(var o=0;o=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function uZ(t,r){var e;if(t){if(typeof t=="string")return v2(t,r);var n=u0(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return w1(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v2(t,r)}}function v2(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e1?e-1:0),i=1;i2){var n;return oh.apply(void 0,l0(n=[w9(r[0],r[1])]).call(n,$r(u0(r).call(r,2))))}var i=r[0],a=r[1];if(i instanceof Date&&a instanceof Date)return i.setTime(a.getTime()),i;var o=y9(cY(a)),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;Object.prototype.propertyIsEnumerable.call(a,l)&&(a[l]===b9?delete i[l]:i[l]!==null&&a[l]!==null&&typeof i[l]=="object"&&typeof a[l]=="object"&&!Nr(i[l])&&!Nr(a[l])?i[l]=oh(i[l],a[l]):i[l]=$9(a[l]))}}catch(u){o.e(u)}finally{o.f()}return i}function $9(t){return Nr(t)?cn(t).call(t,function(r){return $9(r)}):typeof t=="object"&&t!==null?t instanceof Date?new Date(t.getTime()):oh({},t):t}function x9(t){for(var r=0,e=k1(t);ro;)l=n(e,s=i[o++]),l!==void 0&&YZ(a,s,l);return a}});var XZ=ft,JZ=XZ.Object.getOwnPropertyDescriptors,ZZ=JZ,QZ=ZZ,eQ=QZ,b2=Se(eQ),A9={exports:{}},tQ=$e,rQ=jt,w2=Kh.f;tQ({target:"Object",stat:!0,forced:Object.defineProperties!==w2,sham:!rQ},{defineProperties:w2});var nQ=ft,M9=nQ.Object,iQ=A9.exports=function(r,e){return M9.defineProperties(r,e)};M9.defineProperties.sham&&(iQ.sham=!0);var aQ=A9.exports,oQ=aQ,sQ=oQ,lQ=sQ,uQ=Se(lQ),cQ=h8,hQ=Se(cQ);function D9(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var dQ=Hx,fQ=dQ,vQ=fQ,pQ=vQ,N9=pQ,mQ=Se(N9),gQ=$e,yQ=tx;gQ({target:"Object",stat:!0},{setPrototypeOf:yQ});var bQ=ft,wQ=bQ.Object.setPrototypeOf,$Q=wQ,xQ=$Q,kQ=xQ,SQ=kQ,EQ=SQ,TQ=EQ,R9=TQ,$p=Se(R9),_Q=gx,OQ=_Q,IQ=OQ,CQ=IQ,PQ=CQ,F9=Se(PQ);function xp(t,r){var e;return xp=$p?F9(e=$p).call(e):function(i,a){return i.__proto__=a,i},xp(t,r)}function AQ(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=mQ(r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Wh(t,"prototype",{writable:!1}),xp(t,r)}function MQ(t,r){if(r&&(Mo(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D9(t)}var DQ=LX,NQ=DQ,RQ=NQ,FQ=RQ,z9=FQ,$2=Se(z9);function sh(t){var r;return sh=$p?F9(r=$2).call(r):function(n){return n.__proto__||$2(n)},sh(t)}var B9={exports:{}},L9={exports:{}};(function(t){var r=g1,e=dx;function n(i){"@babel/helpers - typeof";return t.exports=n=typeof r=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof r=="function"&&a.constructor===r&&a!==r.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,n(i)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(L9);var zQ=L9.exports,BQ=Fx,LQ=BQ,jQ=LQ,HQ=jQ,WQ=HQ,x2=Rt,qQ=x1,UQ=Ma,VQ=Ir,GQ=function(t,r,e){for(var n=qQ(r),i=VQ.f,a=UQ.f,o=0;oh;h++)if(f=y(t[h]),f&&S2(T2,f))return f;return new Cc(!1)}u=pee(t,c)}for(v=a?t.next:u.next;!(m=cee(v,u)).done;){try{f=y(m.value)}catch($){E2(u,"throw",$)}if(typeof f=="object"&&f&&S2(T2,f))return f}return new Cc(!1)},yee=Na,bee=function(t,r){return t===void 0?arguments.length<2?"":r:yee(t)},wee=$e,$ee=Nt,xee=n0,lh=tx,kee=GQ,W9=Ra,of=hi,sf=Da,See=XQ,Eee=lee,Tee=Ba,_ee=bee,Oee=mt,Iee=Oee("toStringTag"),uh=Error,Cee=[].push,Fo=function(r,e){var n=$ee(lf,this),i;lh?i=lh(new uh,n?xee(this):lf):(i=n?this:W9(lf),of(i,Iee,"Error")),e!==void 0&&of(i,"message",_ee(e)),Eee(i,Fo,i.stack,1),arguments.length>2&&See(i,arguments[2]);var a=[];return Tee(r,Cee,{that:a}),of(i,"errors",a),i};lh?lh(Fo,uh):kee(Fo,uh,{name:!0});var lf=Fo.prototype=W9(uh.prototype,{constructor:sf(1,Fo),message:sf(1,""),name:sf(1,"AggregateError")});wee({global:!0,constructor:!0,arity:2},{AggregateError:Fo});var Pee=dr,Aee=l1,Mee=mt,Dee=jt,_2=Mee("species"),q9=function(t){var r=Pee(t);Dee&&r&&!r[_2]&&Aee(r,_2,{configurable:!0,get:function(){return this}})},Nee=Nt,Ree=TypeError,A1=function(t,r){if(Nee(r,t))return t;throw new Ree("Incorrect invocation")},O2=Br,Fee=k9,zee=Xo,Bee=mt,Lee=Bee("species"),U9=function(t,r){var e=O2(t).constructor,n;return e===void 0||zee(n=O2(e)[Lee])?r:Fee(n)},jee=Vi,V9=/(?:ipad|iphone|ipod).*applewebkit/i.test(jee),Rr=dt,Hee=Yo,Wee=Gi,I2=wt,qee=Rt,G9=Ye,C2=$8,Uee=Bl,P2=n1,Vee=Wx,Gee=V9,Kee=jl,kp=Rr.setImmediate,Sp=Rr.clearImmediate,Yee=Rr.process,uf=Rr.Dispatch,Xee=Rr.Function,A2=Rr.MessageChannel,Jee=Rr.String,cf=0,Us={},M2="onreadystatechange",fl,na,hf,df;G9(function(){fl=Rr.location});var M1=function(t){if(qee(Us,t)){var r=Us[t];delete Us[t],r()}},ff=function(t){return function(){M1(t)}},D2=function(t){M1(t.data)},N2=function(t){Rr.postMessage(Jee(t),fl.protocol+"//"+fl.host)};(!kp||!Sp)&&(kp=function(r){Vee(arguments.length,1);var e=I2(r)?r:Xee(r),n=Uee(arguments,1);return Us[++cf]=function(){Hee(e,void 0,n)},na(cf),cf},Sp=function(r){delete Us[r]},Kee?na=function(t){Yee.nextTick(ff(t))}:uf&&uf.now?na=function(t){uf.now(ff(t))}:A2&&!Gee?(hf=new A2,df=hf.port2,hf.port1.onmessage=D2,na=Wee(df.postMessage,df)):Rr.addEventListener&&I2(Rr.postMessage)&&!Rr.importScripts&&fl&&fl.protocol!=="file:"&&!G9(N2)?(na=N2,Rr.addEventListener("message",D2,!1)):M2 in P2("script")?na=function(t){C2.appendChild(P2("script"))[M2]=function(){C2.removeChild(this),M1(t)}}:na=function(t){setTimeout(ff(t),0)});var K9={set:kp,clear:Sp},Y9=function(){this.head=null,this.tail=null};Y9.prototype={add:function(t){var r={item:t,next:null},e=this.tail;e?e.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t){var r=this.head=t.next;return r===null&&(this.tail=null),t.item}}};var X9=Y9,Zee=Vi,Qee=/ipad|iphone|ipod/i.test(Zee)&&typeof Pebble<"u",ete=Vi,tte=/web0s(?!.*chrome)/i.test(ete),Ta=dt,R2=Gi,rte=Ma.f,vf=K9.set,nte=X9,ite=V9,ate=Qee,ote=tte,pf=jl,F2=Ta.MutationObserver||Ta.WebKitMutationObserver,z2=Ta.document,B2=Ta.process,Ku=Ta.Promise,L2=rte(Ta,"queueMicrotask"),Ep=L2&&L2.value,to,mf,gf,Yu,j2;if(!Ep){var Xu=new nte,Ju=function(){var t,r;for(pf&&(t=B2.domain)&&t.exit();r=Xu.get();)try{r()}catch(e){throw Xu.head&&to(),e}t&&t.enter()};!ite&&!pf&&!ote&&F2&&z2?(mf=!0,gf=z2.createTextNode(""),new F2(Ju).observe(gf,{characterData:!0}),to=function(){gf.data=mf=!mf}):!ate&&Ku&&Ku.resolve?(Yu=Ku.resolve(void 0),Yu.constructor=Ku,j2=R2(Yu.then,Yu),to=function(){j2(Ju)}):pf?to=function(){B2.nextTick(Ju)}:(vf=R2(vf,Ta),to=function(){vf(Ju)}),Ep=function(t){Xu.head||to(),Xu.add(t)}}var ste=Ep,lte=function(t,r){try{arguments.length===1?console.error(t):console.error(t,r)}catch{}},ss=function(t){try{return{error:!1,value:t()}}catch(r){return{error:!0,value:r}}},ute=dt,ls=ute.Promise,J9=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",cte=J9,hte=jl,dte=!cte&&!hte&&typeof window=="object"&&typeof document=="object",fte=dt,Vs=ls,vte=wt,pte=l8,mte=v8,gte=mt,yte=dte,bte=J9,yf=Jo,H2=Vs&&Vs.prototype,wte=gte("species"),Tp=!1,Z9=vte(fte.PromiseRejectionEvent),$te=pte("Promise",function(){var t=mte(Vs),r=t!==String(Vs);if(!r&&yf===66||!(H2.catch&&H2.finally))return!0;if(!yf||yf<51||!/native code/.test(t)){var e=new Vs(function(a){a(1)}),n=function(a){a(function(){},function(){})},i=e.constructor={};if(i[wte]=n,Tp=e.then(function(){})instanceof n,!Tp)return!0}return!r&&(yte||bte)&&!Z9}),Gl={CONSTRUCTOR:$te,REJECTION_EVENT:Z9,SUBCLASSING:Tp},Fn={},W2=_r,xte=TypeError,kte=function(t){var r,e;this.promise=new t(function(n,i){if(r!==void 0||e!==void 0)throw new xte("Bad Promise constructor");r=n,e=i}),this.resolve=W2(r),this.reject=W2(e)};Fn.f=function(t){return new kte(t)};var Ste=$e,ch=jl,zi=dt,Kl=Ht,Ete=rs,Tte=Fa,_te=q9,Ote=_r,_p=wt,Ite=Jt,Cte=A1,Pte=U9,Q9=K9.set,D1=ste,Ate=lte,Mte=ss,Dte=X9,ek=ns,Op=ls,tk=Gl,rk=Fn,d0="Promise",nk=tk.CONSTRUCTOR,Nte=tk.REJECTION_EVENT,bf=ek.getterFor(d0),Rte=ek.set,Fte=Op&&Op.prototype,mo=Op,wf=Fte,ik=zi.TypeError,Ip=zi.document,N1=zi.process,Cp=rk.f,zte=Cp,Bte=!!(Ip&&Ip.createEvent&&zi.dispatchEvent),ak="unhandledrejection",Lte="rejectionhandled",q2=0,ok=1,jte=2,R1=1,sk=2,Zu,U2,Hte,lk=function(t){var r;return Ite(t)&&_p(r=t.then)?r:!1},uk=function(t,r){var e=r.value,n=r.state===ok,i=n?t.ok:t.fail,a=t.resolve,o=t.reject,s=t.domain,l,u,c;try{i?(n||(r.rejection===sk&&qte(r),r.rejection=R1),i===!0?l=e:(s&&s.enter(),l=i(e),s&&(s.exit(),c=!0)),l===t.promise?o(new ik("Promise-chain cycle")):(u=lk(l))?Kl(u,l,a,o):a(l)):o(e)}catch(h){s&&!c&&s.exit(),o(h)}},ck=function(t,r){t.notified||(t.notified=!0,D1(function(){for(var e=t.reactions,n;n=e.get();)uk(n,t);t.notified=!1,r&&!t.rejection&&Wte(t)}))},hk=function(t,r,e){var n,i;Bte?(n=Ip.createEvent("Event"),n.promise=r,n.reason=e,n.initEvent(t,!1,!0),zi.dispatchEvent(n)):n={promise:r,reason:e},!Nte&&(i=zi["on"+t])?i(n):t===ak&&Ate("Unhandled promise rejection",e)},Wte=function(t){Kl(Q9,zi,function(){var r=t.facade,e=t.value,n=V2(t),i;if(n&&(i=Mte(function(){ch?N1.emit("unhandledRejection",e,r):hk(ak,r,e)}),t.rejection=ch||V2(t)?sk:R1,i.error))throw i.value})},V2=function(t){return t.rejection!==R1&&!t.parent},qte=function(t){Kl(Q9,zi,function(){var r=t.facade;ch?N1.emit("rejectionHandled",r):hk(Lte,r,t.value)})},go=function(t,r,e){return function(n){t(r,n,e)}},Eo=function(t,r,e){t.done||(t.done=!0,e&&(t=e),t.value=r,t.state=jte,ck(t,!0))},Pp=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw new ik("Promise can't be resolved itself");var n=lk(r);n?D1(function(){var i={done:!1};try{Kl(n,r,go(Pp,i,t),go(Eo,i,t))}catch(a){Eo(i,a,t)}}):(t.value=r,t.state=ok,ck(t,!1))}catch(i){Eo({done:!1},i,t)}}};nk&&(mo=function(r){Cte(this,wf),Ote(r),Kl(Zu,this);var e=bf(this);try{r(go(Pp,e),go(Eo,e))}catch(n){Eo(e,n)}},wf=mo.prototype,Zu=function(r){Rte(this,{type:d0,done:!1,notified:!1,parent:!1,reactions:new Dte,rejection:!1,state:q2,value:void 0})},Zu.prototype=Ete(wf,"then",function(r,e){var n=bf(this),i=Cp(Pte(this,mo));return n.parent=!0,i.ok=_p(r)?r:!0,i.fail=_p(e)&&e,i.domain=ch?N1.domain:void 0,n.state===q2?n.reactions.add(i):D1(function(){uk(i,n)}),i.promise}),U2=function(){var t=new Zu,r=bf(t);this.promise=t,this.resolve=go(Pp,r),this.reject=go(Eo,r)},rk.f=Cp=function(t){return t===mo||t===Hte?new U2(t):zte(t)});Ste({global:!0,constructor:!0,wrap:!0,forced:nk},{Promise:mo});Tte(mo,d0,!1,!0);_te(d0);var Ute=ls,Vte=Sx,Gte=Gl.CONSTRUCTOR,f0=Gte||!Vte(function(t){Ute.all(t).then(void 0,function(){})}),Kte=$e,Yte=Ht,Xte=_r,Jte=Fn,Zte=ss,Qte=Ba,ere=f0;Kte({target:"Promise",stat:!0,forced:ere},{all:function(r){var e=this,n=Jte.f(e),i=n.resolve,a=n.reject,o=Zte(function(){var s=Xte(e.resolve),l=[],u=0,c=1;Qte(r,function(h){var d=u++,f=!1;c++,Yte(s,e,h).then(function(v){f||(f=!0,l[d]=v,--c||i(l))},a)}),--c||i(l)});return o.error&&a(o.value),n.promise}});var tre=$e,rre=Gl.CONSTRUCTOR,G2=ls;G2&&G2.prototype;tre({target:"Promise",proto:!0,forced:rre,real:!0},{catch:function(t){return this.then(void 0,t)}});var nre=$e,ire=Ht,are=_r,ore=Fn,sre=ss,lre=Ba,ure=f0;nre({target:"Promise",stat:!0,forced:ure},{race:function(r){var e=this,n=ore.f(e),i=n.reject,a=sre(function(){var o=are(e.resolve);lre(r,function(s){ire(o,e,s).then(n.resolve,i)})});return a.error&&i(a.value),n.promise}});var cre=$e,hre=Ht,dre=Fn,fre=Gl.CONSTRUCTOR;cre({target:"Promise",stat:!0,forced:fre},{reject:function(r){var e=dre.f(this);return hre(e.reject,void 0,r),e.promise}});var vre=Br,pre=Jt,mre=Fn,dk=function(t,r){if(vre(t),pre(r)&&r.constructor===t)return r;var e=mre.f(t),n=e.resolve;return n(r),e.promise},gre=$e,yre=dr,bre=OF,wre=ls,$re=Gl.CONSTRUCTOR,xre=dk,kre=yre("Promise"),Sre=!$re;gre({target:"Promise",stat:!0,forced:bre},{resolve:function(r){return xre(Sre&&this===kre?wre:this,r)}});var Ere=$e,Tre=Ht,_re=_r,Ore=Fn,Ire=ss,Cre=Ba,Pre=f0;Ere({target:"Promise",stat:!0,forced:Pre},{allSettled:function(r){var e=this,n=Ore.f(e),i=n.resolve,a=n.reject,o=Ire(function(){var s=_re(e.resolve),l=[],u=0,c=1;Cre(r,function(h){var d=u++,f=!1;c++,Tre(s,e,h).then(function(v){f||(f=!0,l[d]={status:"fulfilled",value:v},--c||i(l))},function(v){f||(f=!0,l[d]={status:"rejected",reason:v},--c||i(l))})}),--c||i(l)});return o.error&&a(o.value),n.promise}});var Are=$e,Mre=Ht,Dre=_r,Nre=dr,Rre=Fn,Fre=ss,zre=Ba,Bre=f0,K2="No one promise resolved";Are({target:"Promise",stat:!0,forced:Bre},{any:function(r){var e=this,n=Nre("AggregateError"),i=Rre.f(e),a=i.resolve,o=i.reject,s=Fre(function(){var l=Dre(e.resolve),u=[],c=0,h=1,d=!1;zre(r,function(f){var v=c++,m=!1;h++,Mre(l,e,f).then(function(b){m||d||(d=!0,a(b))},function(b){m||d||(m=!0,u[v]=b,--h||o(new n(u,K2)))})}),--h||o(new n(u,K2))});return s.error&&o(s.value),i.promise}});var Lre=$e,Ap=ls,jre=Ye,Hre=dr,Wre=wt,qre=U9,Y2=dk,Ure=Ap&&Ap.prototype,Vre=!!Ap&&jre(function(){Ure.finally.call({then:function(){}},function(){})});Lre({target:"Promise",proto:!0,real:!0,forced:Vre},{finally:function(t){var r=qre(this,Hre("Promise")),e=Wre(t);return this.then(e?function(n){return Y2(r,t()).then(function(){return n})}:t,e?function(n){return Y2(r,t()).then(function(){throw n})}:t)}});var Gre=ft,Kre=Gre.Promise,Yre=Kre,Xre=Yre,Jre=$e,Zre=Fn;Jre({target:"Promise",stat:!0},{withResolvers:function(){var r=Zre.f(this);return{promise:r.promise,resolve:r.resolve,reject:r.reject}}});var Qre=Xre,ene=Qre,tne=$e,rne=Fn,nne=ss;tne({target:"Promise",stat:!0,forced:!0},{try:function(t){var r=rne.f(this),e=nne(t);return(e.error?r.reject:r.resolve)(e.value),r.promise}});var ine=ene,ane=ine,one=ane,sne=zx,lne=sne,une=lne,cne=une,hne=cne;(function(t){var r=zQ.default,e=d8,n=g1,i=N9,a=z9,o=WQ,s=Px,l=R9,u=one,c=hne,h=Mx;function d(){t.exports=d=function(){return v},t.exports.__esModule=!0,t.exports.default=t.exports;var f,v={},m=Object.prototype,b=m.hasOwnProperty,y=e||function(Z,W,V){Z[W]=V.value},$=typeof n=="function"?n:{},k=$.iterator||"@@iterator",O=$.asyncIterator||"@@asyncIterator",P=$.toStringTag||"@@toStringTag";function E(Z,W,V){return e(Z,W,{value:V,enumerable:!0,configurable:!0,writable:!0}),Z[W]}try{E({},"")}catch{E=function(V,de,Te){return V[de]=Te}}function D(Z,W,V,de){var Te=W&&W.prototype instanceof ne?W:ne,ye=i(Te.prototype),Qe=new it(de||[]);return y(ye,"_invoke",{value:_(Z,V,Qe)}),ye}function B(Z,W,V){try{return{type:"normal",arg:Z.call(W,V)}}catch(de){return{type:"throw",arg:de}}}v.wrap=D;var R="suspendedStart",A="suspendedYield",z="executing",L="completed",J={};function ne(){}function ae(){}function me(){}var Ie={};E(Ie,k,function(){return this});var Re=a,Le=Re&&Re(Re(je([])));Le&&Le!==m&&b.call(Le,k)&&(Ie=Le);var S=me.prototype=ne.prototype=i(Ie);function se(Z){var W;o(W=["next","throw","return"]).call(W,function(V){E(Z,V,function(de){return this._invoke(V,de)})})}function ue(Z,W){function V(Te,ye,Qe,Et){var Tt=B(Z[Te],Z,ye);if(Tt.type!=="throw"){var fr=Tt.arg,Zt=fr.value;return Zt&&r(Zt)=="object"&&b.call(Zt,"__await")?W.resolve(Zt.__await).then(function(yn){V("next",yn,Qe,Et)},function(yn){V("throw",yn,Qe,Et)}):W.resolve(Zt).then(function(yn){fr.value=yn,Qe(fr)},function(yn){return V("throw",yn,Qe,Et)})}Et(Tt.arg)}var de;y(this,"_invoke",{value:function(ye,Qe){function Et(){return new W(function(Tt,fr){V(ye,Qe,Tt,fr)})}return de=de?de.then(Et,Et):Et()}})}function _(Z,W,V){var de=R;return function(Te,ye){if(de===z)throw new Error("Generator is already running");if(de===L){if(Te==="throw")throw ye;return{value:f,done:!0}}for(V.method=Te,V.arg=ye;;){var Qe=V.delegate;if(Qe){var Et=_e(Qe,V);if(Et){if(Et===J)continue;return Et}}if(V.method==="next")V.sent=V._sent=V.arg;else if(V.method==="throw"){if(de===R)throw de=L,V.arg;V.dispatchException(V.arg)}else V.method==="return"&&V.abrupt("return",V.arg);de=z;var Tt=B(Z,W,V);if(Tt.type==="normal"){if(de=V.done?L:A,Tt.arg===J)continue;return{value:Tt.arg,done:V.done}}Tt.type==="throw"&&(de=L,V.method="throw",V.arg=Tt.arg)}}}function _e(Z,W){var V=W.method,de=Z.iterator[V];if(de===f)return W.delegate=null,V==="throw"&&Z.iterator.return&&(W.method="return",W.arg=f,_e(Z,W),W.method==="throw")||V!=="return"&&(W.method="throw",W.arg=new TypeError("The iterator does not provide a '"+V+"' method")),J;var Te=B(de,Z.iterator,W.arg);if(Te.type==="throw")return W.method="throw",W.arg=Te.arg,W.delegate=null,J;var ye=Te.arg;return ye?ye.done?(W[Z.resultName]=ye.value,W.next=Z.nextLoc,W.method!=="return"&&(W.method="next",W.arg=f),W.delegate=null,J):ye:(W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,J)}function Fe(Z){var W,V={tryLoc:Z[0]};1 in Z&&(V.catchLoc=Z[1]),2 in Z&&(V.finallyLoc=Z[2],V.afterLoc=Z[3]),s(W=this.tryEntries).call(W,V)}function Ue(Z){var W=Z.completion||{};W.type="normal",delete W.arg,Z.completion=W}function it(Z){this.tryEntries=[{tryLoc:"root"}],o(Z).call(Z,Fe,this),this.reset(!0)}function je(Z){if(Z||Z===""){var W=Z[k];if(W)return W.call(Z);if(typeof Z.next=="function")return Z;if(!isNaN(Z.length)){var V=-1,de=function Te(){for(;++V=0;--Te){var ye=this.tryEntries[Te],Qe=ye.completion;if(ye.tryLoc==="root")return de("end");if(ye.tryLoc<=this.prev){var Et=b.call(ye,"catchLoc"),Tt=b.call(ye,"finallyLoc");if(Et&&Tt){if(this.prev=0;--de){var Te=this.tryEntries[de];if(Te.tryLoc<=this.prev&&b.call(Te,"finallyLoc")&&this.prev=0;--V){var de=this.tryEntries[V];if(de.finallyLoc===W)return this.complete(de.completion,de.afterLoc),Ue(de),J}},catch:function(W){for(var V=this.tryEntries.length-1;V>=0;--V){var de=this.tryEntries[V];if(de.tryLoc===W){var Te=de.completion;if(Te.type==="throw"){var ye=Te.arg;Ue(de)}return ye}}throw new Error("illegal catch attempt")},delegateYield:function(W,V,de){return this.delegate={iterator:je(W),resultName:V,nextLoc:de},this.method==="next"&&(this.arg=f),J}},v}t.exports=d,t.exports.__esModule=!0,t.exports.default=t.exports})(B9);var dne=B9.exports,Pc=dne(),fne=Pc;try{regeneratorRuntime=Pc}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Pc:Function("r","regeneratorRuntime = r")(Pc)}var mr=Se(fne),fk={exports:{}},vne=Ye,pne=vne(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),mne=Ye,gne=Jt,yne=Ui,X2=pne,Ac=Object.isExtensible,bne=mne(function(){Ac(1)}),wne=bne||X2?function(r){return!gne(r)||X2&&yne(r)==="ArrayBuffer"?!1:Ac?Ac(r):!0}:Ac,$ne=Ye,xne=!$ne(function(){return Object.isExtensible(Object.preventExtensions({}))}),kne=$e,Sne=ct,Ene=Ml,Tne=Jt,F1=Rt,_ne=Ir.f,J2=Dl,One=s1,z1=wne,Ine=jh,Cne=xne,vk=!1,oi=Ine("meta"),Pne=0,B1=function(t){_ne(t,oi,{value:{objectID:"O"+Pne++,weakData:{}}})},Ane=function(t,r){if(!Tne(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!F1(t,oi)){if(!z1(t))return"F";if(!r)return"E";B1(t)}return t[oi].objectID},Mne=function(t,r){if(!F1(t,oi)){if(!z1(t))return!0;if(!r)return!1;B1(t)}return t[oi].weakData},Dne=function(t){return Cne&&vk&&z1(t)&&!F1(t,oi)&&B1(t),t},Nne=function(){Rne.enable=function(){},vk=!0;var t=J2.f,r=Sne([].splice),e={};e[oi]=1,t(e).length&&(J2.f=function(n){for(var i=t(n),a=0,o=i.length;a1?arguments[1]:void 0),f;f=f?f.next:h.first;)for(d(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(c){return!!l(this,c)}}),Z2(a,e?{get:function(c){var h=l(this,c);return h&&h.value},set:function(c,h){return s(this,c===0?0:c,h)}}:{add:function(c){return s(this,c=c===0?0:c,c)}}),Os&&rie(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(t,r,e){var n=r+" Iterator",i=$f(r),a=$f(n);sie(t,r,function(o,s){e5(this,{type:n,target:o,state:i(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,l=o.last;l&&l.removed;)l=l.previous;return!o.target||!(o.last=l=l?l.next:o.state.first)?(o.target=void 0,Qu(void 0,!0)):Qu(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},e?"entries":"values",!e,!0),lie(r)}},uie=gk,cie=bk;uie("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},cie);var hie=ft,die=hie.Map,fie=die,vie=fie,pie=vie,wk=Se(pie),mie=$e,gie=is.some,yie=a0,bie=yie("some");mie({target:"Array",proto:!0,forced:!bie},{some:function(r){return gie(this,r,arguments.length>1?arguments[1]:void 0)}});var wie=tr,$ie=wie("Array","some"),xie=Nt,kie=$ie,xf=Array.prototype,Sie=function(t){var r=t.some;return t===xf||xie(xf,t)&&r===xf.some?kie:r},Eie=Sie,Tie=Eie,_ie=Tie,Oie=Se(_ie),Iie=tr,Cie=Iie("Array","keys"),Pie=Cie,Aie=Pie,Mie=di,Die=Rt,Nie=Nt,Rie=Aie,kf=Array.prototype,Fie={DOMTokenList:!0,NodeList:!0},zie=function(t){var r=t.keys;return t===kf||Nie(kf,t)&&r===kf.keys||Die(Fie,Mie(t))?Rie:r},Bie=zie,ro=Se(Bie),t5=S8,Lie=Math.floor,Mp=function(t,r){var e=t.length,n=Lie(e/2);return e<8?jie(t,r):Hie(t,Mp(t5(t,0,n),r),Mp(t5(t,n),r),r)},jie=function(t,r){for(var e=t.length,n=1,i,a;n0;)t[a]=t[--a];a!==n++&&(t[a]=i)}return t},Hie=function(t,r,e,n){for(var i=r.length,a=e.length,o=0,s=0;o3)){if(rae)return!0;if(l5)return l5<603;var t="",r,e,n,i;for(r=65;r<76;r++){switch(e=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)Si.push({k:e+i,v:n})}for(Si.sort(function(a,o){return o.v-a.v}),i=0;ia5(e)?1:-1}};Xie({target:"Array",proto:!0,forced:sae},{sort:function(r){r!==void 0&&Jie(r);var e=Zie(this);if(xk)return r===void 0?u5(e):u5(e,r);var n=[],i=i5(e),a,o;for(o=0;othis.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=bJ(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,n;xa(e=Lx(n=this._queue).call(n,0)).call(e,function(i){i.fn.apply(i.context||i.fn,i.args||[])})}}],[{key:"extend",value:function(e,n){var i=new t(n);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){i.flush()};var a=[{name:"flush",original:void 0}];if(n&&n.replace)for(var o=0;o=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function hoe(t,r){var e;if(t){if(typeof t=="string")return f5(t,r);var n=u0(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return w1(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f5(t,r)}}function f5(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);es&&(s=h,o=c)}return o}},{key:"min",value:function(n){var i=Of(this._pairs),a=i.next();if(a.done)return null;for(var o=a.value[1],s=n(a.value[1],a.value[0]);!(a=i.next()).done;){var l=vr(a.value,2),u=l[0],c=l[1],h=n(c,u);h=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function doe(t,r){var e;if(t){if(typeof t=="string")return g5(t,r);var n=u0(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return w1(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g5(t,r)}}function g5(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e"u"||!Ic||Ic.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Ic(Boolean,[],function(){})),!0}catch{return!1}}function poe(t,r){return t[r]==null&&(t[r]=Uae()),t}var hh=function(t){AQ(e,t);var r=foe(e);function e(n,i){var a;return zh(this,e),a=r.call(this),Ii(D9(a),"_queue",null),n&&!Nr(n)&&(i=n,n=[]),a._options=i||{},a._data=new wk,a.length=0,a._idProp=a._options.fieldId||"id",n&&n.length&&a.add(n),a.setOptions(i),a}return i0(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(i){i&&i.queue!==void 0&&(i.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=Vae.extend(this,{replace:["add","update","remove"]})),i.queue&&typeof i.queue=="object"&&this._queue.setOptions(i.queue)))}},{key:"add",value:function(i,a){var o=this,s=[],l;if(Nr(i)){var u=cn(i).call(i,function(d){return d[o._idProp]});if(Oie(u).call(u,function(d){return o._data.has(d)}))throw new Error("A duplicate id was found in the parameter array.");for(var c=0,h=i.length;cc?1:us)&&(o=c,s=h)}}catch(d){l.e(d)}finally{l.f()}return o||null}},{key:"min",value:function(i){var a,o=null,s=null,l=If(c5(a=this._data).call(a)),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,h=c[i];typeof h=="number"&&(s==null||ht.length)&&(r=t.length);for(var e=0,n=new Array(r);e"u"||!Ic||Ic.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Ic(Boolean,[],function(){})),!0}catch{return!1}}function poe(t,r){return t[r]==null&&(t[r]=Uae()),t}var hh=function(t){AQ(e,t);var r=foe(e);function e(n,i){var a;return zh(this,e),a=r.call(this),Ii(D9(a),"_queue",null),n&&!Nr(n)&&(i=n,n=[]),a._options=i||{},a._data=new wk,a.length=0,a._idProp=a._options.fieldId||"id",n&&n.length&&a.add(n),a.setOptions(i),a}return i0(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(i){i&&i.queue!==void 0&&(i.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=Vae.extend(this,{replace:["add","update","remove"]})),i.queue&&typeof i.queue=="object"&&this._queue.setOptions(i.queue)))}},{key:"add",value:function(i,a){var o=this,s=[],l;if(Nr(i)){var u=cn(i).call(i,function(d){return d[o._idProp]});if(Oie(u).call(u,function(d){return o._data.has(d)}))throw new Error("A duplicate id was found in the parameter array.");for(var c=0,h=i.length;cc?1:us)&&(o=c,s=h)}}catch(d){l.e(d)}finally{l.f()}return o||null}},{key:"min",value:function(i){var a,o=null,s=null,l=If(c5(a=this._data).call(a)),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,h=c[i];typeof h=="number"&&(s==null||h"u"&&Rp!==void 0,Ok={all:Rp,IS_HTMLDDA:Soe},Ik=Ok,Eoe=Ik.all,Wt=Ik.IS_HTMLDDA?function(t){return typeof t=="function"||t===Eoe}:function(t){return typeof t=="function"},us={},Toe=He,qt=!Toe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),_oe=Yl,rc=Function.prototype.call,jr=_oe?rc.bind(rc):function(){return rc.apply(rc,arguments)},v0={},Ck={}.propertyIsEnumerable,Pk=Object.getOwnPropertyDescriptor,Ooe=Pk&&!Ck.call({1:2},1);v0.f=Ooe?function(r){var e=Pk(this,r);return!!e&&e.enumerable}:Ck;var Jl=function(t,r){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:r}},Ioe=Ue,Coe=He,Poe=fi,Pf=Object,Aoe=Ioe("".split),p0=Coe(function(){return!Pf("z").propertyIsEnumerable(0)})?function(t){return Poe(t)==="String"?Aoe(t,""):Pf(t)}:Pf,cs=function(t){return t==null},Moe=cs,Doe=TypeError,Zl=function(t){if(Moe(t))throw new Doe("Can't call method on "+t);return t},Noe=p0,Roe=Zl,zn=function(t){return Noe(Roe(t))},w5=Wt,Ak=Ok,Foe=Ak.all,Ut=Ak.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:w5(t)||t===Foe}:function(t){return typeof t=="object"?t!==null:w5(t)},We={},Af=We,Mf=xt,zoe=Wt,$5=function(t){return zoe(t)?t:void 0},nn=function(t,r){return arguments.length<2?$5(Af[t])||$5(Mf[t]):Af[t]&&Af[t][r]||Mf[t]&&Mf[t][r]},Boe=Ue,It=Boe({}.isPrototypeOf),Ql=typeof navigator<"u"&&String(navigator.userAgent)||"",Mk=xt,Df=Ql,x5=Mk.process,k5=Mk.Deno,S5=x5&&x5.versions||k5&&k5.version,E5=S5&&S5.v8,hn,dh;E5&&(hn=E5.split("."),dh=hn[0]>0&&hn[0]<4?1:+(hn[0]+hn[1]));!dh&&Df&&(hn=Df.match(/Edge\/(\d+)/),(!hn||hn[1]>=74)&&(hn=Df.match(/Chrome\/(\d+)/),hn&&(dh=+hn[1])));var eu=dh,T5=eu,Loe=He,joe=xt,Hoe=joe.String,hs=!!Object.getOwnPropertySymbols&&!Loe(function(){var t=Symbol("symbol detection");return!Hoe(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&T5&&T5<41}),Woe=hs,Dk=Woe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",qoe=nn,Uoe=Wt,Voe=It,Goe=Dk,Koe=Object,tu=Goe?function(t){return typeof t=="symbol"}:function(t){var r=qoe("Symbol");return Uoe(r)&&Voe(r.prototype,Koe(t))},Yoe=String,ds=function(t){try{return Yoe(t)}catch{return"Object"}},Xoe=Wt,Joe=ds,Zoe=TypeError,La=function(t){if(Xoe(t))return t;throw new Zoe(Joe(t)+" is not a function")},Qoe=La,ese=cs,H1=function(t,r){var e=t[r];return ese(e)?void 0:Qoe(e)},Nf=jr,Rf=Wt,Ff=Ut,tse=TypeError,rse=function(t,r){var e,n;if(r==="string"&&Rf(e=t.toString)&&!Ff(n=Nf(e,t))||Rf(e=t.valueOf)&&!Ff(n=Nf(e,t))||r!=="string"&&Rf(e=t.toString)&&!Ff(n=Nf(e,t)))return n;throw new tse("Can't convert object to primitive value")},Nk={exports:{}},_5=xt,nse=Object.defineProperty,ise=function(t,r){try{nse(_5,t,{value:r,configurable:!0,writable:!0})}catch{_5[t]=r}return r},ase=xt,ose=ise,O5="__core-js_shared__",sse=ase[O5]||ose(O5,{}),W1=sse,I5=W1;(Nk.exports=function(t,r){return I5[t]||(I5[t]=r!==void 0?r:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var fs=Nk.exports,lse=Zl,use=Object,Cr=function(t){return use(lse(t))},cse=Ue,hse=Cr,dse=cse({}.hasOwnProperty),Vt=Object.hasOwn||function(r,e){return dse(hse(r),e)},fse=Ue,vse=0,pse=Math.random(),mse=fse(1 .toString),m0=function(t){return"Symbol("+(t===void 0?"":t)+")_"+mse(++vse+pse,36)},gse=xt,yse=fs,C5=Vt,bse=m0,wse=hs,$se=Dk,bo=gse.Symbol,zf=yse("wks"),xse=$se?bo.for||bo:bo&&bo.withoutSetter||bse,kt=function(t){return C5(zf,t)||(zf[t]=wse&&C5(bo,t)?bo[t]:xse("Symbol."+t)),zf[t]},kse=jr,P5=Ut,A5=tu,Sse=H1,Ese=rse,Tse=kt,_se=TypeError,Ose=Tse("toPrimitive"),Ise=function(t,r){if(!P5(t)||A5(t))return t;var e=Sse(t,Ose),n;if(e){if(r===void 0&&(r="default"),n=kse(e,t,r),!P5(n)||A5(n))return n;throw new _se("Can't convert object to primitive value")}return r===void 0&&(r="number"),Ese(t,r)},Cse=Ise,Pse=tu,g0=function(t){var r=Cse(t,"string");return Pse(r)?r:r+""},Ase=xt,M5=Ut,Fp=Ase.document,Mse=M5(Fp)&&M5(Fp.createElement),Rk=function(t){return Mse?Fp.createElement(t):{}},Dse=qt,Nse=He,Rse=Rk,Fk=!Dse&&!Nse(function(){return Object.defineProperty(Rse("div"),"a",{get:function(){return 7}}).a!==7}),Fse=qt,zse=jr,Bse=v0,Lse=Jl,jse=zn,Hse=g0,Wse=Vt,qse=Fk,D5=Object.getOwnPropertyDescriptor;us.f=Fse?D5:function(r,e){if(r=jse(r),e=Hse(e),qse)try{return D5(r,e)}catch{}if(Wse(r,e))return Lse(!zse(Bse.f,r,e),r[e])};var Use=He,Vse=Wt,Gse=/#|\.prototype\./,ru=function(t,r){var e=Yse[Kse(t)];return e===Jse?!0:e===Xse?!1:Vse(r)?Use(r):!!r},Kse=ru.normalize=function(t){return String(t).replace(Gse,".").toLowerCase()},Yse=ru.data={},Xse=ru.NATIVE="N",Jse=ru.POLYFILL="P",Zse=ru,N5=j1,Qse=La,ele=Yl,tle=N5(N5.bind),nu=function(t,r){return Qse(t),r===void 0?t:ele?tle(t,r):function(){return t.apply(r,arguments)}},Hr={},rle=qt,nle=He,zk=rle&&nle(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),ile=Ut,ale=String,ole=TypeError,Wr=function(t){if(ile(t))return t;throw new ole(ale(t)+" is not an object")},sle=qt,lle=Fk,ule=zk,nc=Wr,R5=g0,cle=TypeError,Bf=Object.defineProperty,hle=Object.getOwnPropertyDescriptor,Lf="enumerable",jf="configurable",Hf="writable";Hr.f=sle?ule?function(r,e,n){if(nc(r),e=R5(e),nc(n),typeof r=="function"&&e==="prototype"&&"value"in n&&Hf in n&&!n[Hf]){var i=hle(r,e);i&&i[Hf]&&(r[e]=n.value,n={configurable:jf in n?n[jf]:i[jf],enumerable:Lf in n?n[Lf]:i[Lf],writable:!1})}return Bf(r,e,n)}:Bf:function(r,e,n){if(nc(r),e=R5(e),nc(n),lle)try{return Bf(r,e,n)}catch{}if("get"in n||"set"in n)throw new cle("Accessors not supported");return"value"in n&&(r[e]=n.value),r};var dle=qt,fle=Hr,vle=Jl,vs=dle?function(t,r,e){return fle.f(t,r,vle(1,e))}:function(t,r,e){return t[r]=e,t},ic=xt,ple=Xl,mle=j1,gle=Wt,yle=us.f,ble=Zse,no=We,wle=nu,io=vs,F5=Vt,$le=function(t){var r=function(e,n,i){if(this instanceof r){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return ple(t,this,arguments)};return r.prototype=t.prototype,r},Ee=function(t,r){var e=t.target,n=t.global,i=t.stat,a=t.proto,o=n?ic:i?ic[e]:(ic[e]||{}).prototype,s=n?no:no[e]||io(no,e,{})[e],l=s.prototype,u,c,h,d,f,v,g,b,y;for(d in r)u=ble(n?d:e+(i?".":"#")+d,t.forced),c=!u&&o&&F5(o,d),v=s[d],c&&(t.dontCallGetSet?(y=yle(o,d),g=y&&y.value):g=o[d]),f=c&&g?g:r[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=wle(f,ic):t.wrap&&c?b=$le(f):a&&gle(f)?b=mle(f):b=f,(t.sham||f&&f.sham||v&&v.sham)&&io(b,"sham",!0),io(s,d,b),a&&(h=e+"Prototype",F5(no,h)||io(no,h,{}),io(no[h],d,f),t.real&&l&&(u||!l[d])&&io(l,d,f)))},xle=Math.ceil,kle=Math.floor,Sle=Math.trunc||function(r){var e=+r;return(e>0?kle:xle)(e)},Ele=Sle,y0=function(t){var r=+t;return r!==r||r===0?0:Ele(r)},Tle=y0,_le=Math.max,Ole=Math.min,iu=function(t,r){var e=Tle(t);return e<0?_le(e+r,0):Ole(e,r)},Ile=y0,Cle=Math.min,Ple=function(t){return t>0?Cle(Ile(t),9007199254740991):0},Ale=Ple,an=function(t){return Ale(t.length)},Mle=zn,Dle=iu,Nle=an,z5=function(t){return function(r,e,n){var i=Mle(r),a=Nle(i),o=Dle(n,a),s;if(t&&e!==e){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((t||o in i)&&i[o]===e)return t||o||0;return!t&&-1}},q1={includes:z5(!0),indexOf:z5(!1)},au={},Rle=Ue,Wf=Vt,Fle=zn,zle=q1.indexOf,Ble=au,B5=Rle([].push),Bk=function(t,r){var e=Fle(t),n=0,i=[],a;for(a in e)!Wf(Ble,a)&&Wf(e,a)&&B5(i,a);for(;r.length>n;)Wf(e,a=r[n++])&&(~zle(i,a)||B5(i,a));return i},U1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Lle=Bk,jle=U1,b0=Object.keys||function(r){return Lle(r,jle)},ou={};ou.f=Object.getOwnPropertySymbols;var L5=qt,Hle=Ue,Wle=jr,qle=He,qf=b0,Ule=ou,Vle=v0,Gle=Cr,Kle=p0,ao=Object.assign,j5=Object.defineProperty,Yle=Hle([].concat),Xle=!ao||qle(function(){if(L5&&ao({b:1},ao(j5({},"a",{enumerable:!0,get:function(){j5(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},r={},e=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[e]=7,n.split("").forEach(function(i){r[i]=i}),ao({},t)[e]!==7||qf(ao({},r)).join("")!==n})?function(r,e){for(var n=Gle(r),i=arguments.length,a=1,o=Ule.f,s=Vle.f;i>a;)for(var l=Kle(arguments[a++]),u=o?Yle(qf(l),o(l)):qf(l),c=u.length,h=0,d;c>h;)d=u[h++],(!L5||Wle(s,l,d))&&(n[d]=l[d]);return n}:ao,Jle=Ee,H5=Xle;Jle({target:"Object",stat:!0,arity:2,forced:Object.assign!==H5},{assign:H5});var Zle=We,Qle=Zle.Object.assign,eue=Qle,tue=eue,rue=tue,At=pe(rue),nue=Ue,w0=nue([].slice),Lk=Ue,iue=La,aue=Ut,oue=Vt,W5=w0,sue=Yl,jk=Function,lue=Lk([].concat),uue=Lk([].join),Uf={},cue=function(t,r,e){if(!oue(Uf,r)){for(var n=[],i=0;i=.1;)v=+a[h++%o],v>c&&(v=c),f=Math.sqrt(v*v/(1+u*u)),f=s<0?-f:f,r+=f,e+=u*f,d===!0?t.lineTo(r,e):t.moveTo(r,e),c-=v,d=!d}function Eue(t,r,e,n){t.beginPath();var i=6,a=Math.PI*2/i;t.moveTo(r+n,e);for(var o=1;o1?e-1:0),i=1;i=a?t?"":void 0:(o=V5(n,i),o<55296||o>56319||i+1===a||(s=V5(n,i+1))<56320||s>57343?t?Hue(n,i):o:t?Wue(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},que={codeAt:G5(!1),charAt:G5(!0)},Uue=xt,Vue=Wt,K5=Uue.WeakMap,Xk=Vue(K5)&&/native code/.test(String(K5)),Gue=fs,Kue=m0,Y5=Gue("keys"),$0=function(t){return Y5[t]||(Y5[t]=Kue(t))},Yue=Xk,Jk=xt,Xue=Ut,Jue=vs,Gf=Vt,Kf=W1,Zue=$0,Que=au,X5="Object already initialized",Bp=Jk.TypeError,ece=Jk.WeakMap,fh,vl,vh,tce=function(t){return vh(t)?vl(t):fh(t,{})},rce=function(t){return function(r){var e;if(!Xue(r)||(e=vl(r)).type!==t)throw new Bp("Incompatible receiver, "+t+" required");return e}};if(Yue||Kf.state){var $n=Kf.state||(Kf.state=new ece);$n.get=$n.get,$n.has=$n.has,$n.set=$n.set,fh=function(t,r){if($n.has(t))throw new Bp(X5);return r.facade=t,$n.set(t,r),r},vl=function(t){return $n.get(t)||{}},vh=function(t){return $n.has(t)}}else{var oo=Zue("state");Que[oo]=!0,fh=function(t,r){if(Gf(t,oo))throw new Bp(X5);return r.facade=t,Jue(t,oo,r),r},vl=function(t){return Gf(t,oo)?t[oo]:{}},vh=function(t){return Gf(t,oo)}}var Ha={set:fh,get:vl,has:vh,enforce:tce,getterFor:rce},Lp=qt,nce=Vt,Zk=Function.prototype,ice=Lp&&Object.getOwnPropertyDescriptor,Y1=nce(Zk,"name"),ace=Y1&&(function(){}).name==="something",oce=Y1&&(!Lp||Lp&&ice(Zk,"name").configurable),sce={EXISTS:Y1,PROPER:ace,CONFIGURABLE:oce},x0={},lce=qt,uce=zk,cce=Hr,hce=Wr,dce=zn,fce=b0;x0.f=lce&&!uce?Object.defineProperties:function(r,e){hce(r);for(var n=dce(e),i=fce(e),a=i.length,o=0,s;a>o;)cce.f(r,s=i[o++],n[s]);return r};var vce=nn,pce=vce("document","documentElement"),mce=Wr,gce=x0,J5=U1,yce=au,bce=pce,wce=Rk,$ce=$0,Z5=">",Q5="<",jp="prototype",Hp="script",Qk=$ce("IE_PROTO"),Yf=function(){},eS=function(t){return Q5+Hp+Z5+t+Q5+"/"+Hp+Z5},e3=function(t){t.write(eS("")),t.close();var r=t.parentWindow.Object;return t=null,r},xce=function(){var t=wce("iframe"),r="java"+Hp+":",e;return t.style.display="none",bce.appendChild(t),t.src=String(r),e=t.contentWindow.document,e.open(),e.write(eS("document.F=Object")),e.close(),e.F},ac,Dc=function(){try{ac=new ActiveXObject("htmlfile")}catch{}Dc=typeof document<"u"?document.domain&&ac?e3(ac):xce():e3(ac);for(var t=J5.length;t--;)delete Dc[jp][J5[t]];return Dc()};yce[Qk]=!0;var ps=Object.create||function(r,e){var n;return r!==null?(Yf[jp]=mce(r),n=new Yf,Yf[jp]=null,n[Qk]=r):n=Dc(),e===void 0?n:gce.f(n,e)},kce=He,tS=!kce(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Sce=Vt,Ece=Wt,Tce=Cr,_ce=$0,Oce=tS,t3=_ce("IE_PROTO"),Wp=Object,Ice=Wp.prototype,k0=Oce?Wp.getPrototypeOf:function(t){var r=Tce(t);if(Sce(r,t3))return r[t3];var e=r.constructor;return Ece(e)&&r instanceof e?e.prototype:r instanceof Wp?Ice:null},Cce=vs,su=function(t,r,e,n){return n&&n.enumerable?t[r]=e:Cce(t,r,e),t},Pce=He,Ace=Wt,Mce=Ut,Dce=ps,r3=k0,Nce=su,Rce=kt,qp=Rce("iterator"),rS=!1,Jn,Xf,Jf;[].keys&&(Jf=[].keys(),"next"in Jf?(Xf=r3(r3(Jf)),Xf!==Object.prototype&&(Jn=Xf)):rS=!0);var Fce=!Mce(Jn)||Pce(function(){var t={};return Jn[qp].call(t)!==t});Fce?Jn={}:Jn=Dce(Jn);Ace(Jn[qp])||Nce(Jn,qp,function(){return this});var nS={IteratorPrototype:Jn,BUGGY_SAFARI_ITERATORS:rS},zce=G1,Bce=ja,Lce=zce?{}.toString:function(){return"[object "+Bce(this)+"]"},jce=G1,Hce=Hr.f,Wce=vs,qce=Vt,Uce=Lce,Vce=kt,n3=Vce("toStringTag"),ms=function(t,r,e,n){if(t){var i=e?t:t.prototype;qce(i,n3)||Hce(i,n3,{configurable:!0,value:r}),n&&!jce&&Wce(i,"toString",Uce)}},gs={},Gce=nS.IteratorPrototype,Kce=ps,Yce=Jl,Xce=ms,Jce=gs,Zce=function(){return this},Qce=function(t,r,e,n){var i=r+" Iterator";return t.prototype=Kce(Gce,{next:Yce(+!n,e)}),Xce(t,i,!1,!0),Jce[i]=Zce,t},ehe=Ue,the=La,rhe=function(t,r,e){try{return ehe(the(Object.getOwnPropertyDescriptor(t,r)[e]))}catch{}},nhe=Wt,ihe=String,ahe=TypeError,ohe=function(t){if(typeof t=="object"||nhe(t))return t;throw new ahe("Can't set "+ihe(t)+" as a prototype")},she=rhe,lhe=Wr,uhe=ohe,che=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,r={},e;try{e=she(Object.prototype,"__proto__","set"),e(r,[]),t=r instanceof Array}catch{}return function(i,a){return lhe(i),uhe(a),t?e(i,a):i.__proto__=a,i}}():void 0),hhe=Ee,dhe=jr,fhe=sce,vhe=Qce,phe=k0,mhe=ms,i3=su,ghe=kt,a3=gs,yhe=nS,bhe=fhe.PROPER,oc=yhe.BUGGY_SAFARI_ITERATORS,Zf=ghe("iterator"),o3="keys",sc="values",s3="entries",whe=function(){return this},X1=function(t,r,e,n,i,a,o){vhe(e,r,n);var s=function(y){if(y===i&&d)return d;if(!oc&&y&&y in c)return c[y];switch(y){case o3:return function(){return new e(this,y)};case sc:return function(){return new e(this,y)};case s3:return function(){return new e(this,y)}}return function(){return new e(this)}},l=r+" Iterator",u=!1,c=t.prototype,h=c[Zf]||c["@@iterator"]||i&&c[i],d=!oc&&h||s(i),f=r==="Array"&&c.entries||h,v,g,b;if(f&&(v=phe(f.call(new t)),v!==Object.prototype&&v.next&&(mhe(v,l,!0,!0),a3[l]=whe)),bhe&&i===sc&&h&&h.name!==sc&&(u=!0,d=function(){return dhe(h,this)}),i)if(g={values:s(sc),keys:a?d:s(o3),entries:s(s3)},o)for(b in g)(oc||u||!(b in c))&&i3(c,b,g[b]);else hhe({target:r,proto:!0,forced:oc||u},g);return o&&c[Zf]!==d&&i3(c,Zf,d,{name:i}),a3[r]=d,g},J1=function(t,r){return{value:t,done:r}},$he=que.charAt,xhe=Bn,iS=Ha,khe=X1,l3=J1,aS="String Iterator",She=iS.set,Ehe=iS.getterFor(aS);khe(String,"String",function(t){She(this,{type:aS,string:xhe(t),index:0})},function(){var r=Ehe(this),e=r.string,n=r.index,i;return n>=e.length?l3(void 0,!0):(i=$he(e,n),r.index+=i.length,l3(i,!1))});var The=jr,u3=Wr,_he=H1,oS=function(t,r,e){var n,i;u3(t);try{if(n=_he(t,"return"),!n){if(r==="throw")throw e;return e}n=The(n,t)}catch(a){i=!0,n=a}if(r==="throw")throw e;if(i)throw n;return u3(n),e},Ohe=Wr,Ihe=oS,Che=function(t,r,e,n){try{return n?r(Ohe(e)[0],e[1]):r(e)}catch(i){Ihe(t,"throw",i)}},Phe=kt,Ahe=gs,Mhe=Phe("iterator"),Dhe=Array.prototype,sS=function(t){return t!==void 0&&(Ahe.Array===t||Dhe[Mhe]===t)},Nhe=Ue,Rhe=Wt,Up=W1,Fhe=Nhe(Function.toString);Rhe(Up.inspectSource)||(Up.inspectSource=function(t){return Fhe(t)});var zhe=Up.inspectSource,Bhe=Ue,Lhe=He,lS=Wt,jhe=ja,Hhe=nn,Whe=zhe,uS=function(){},qhe=[],cS=Hhe("Reflect","construct"),Z1=/^\s*(?:class|function)\b/,Uhe=Bhe(Z1.exec),Vhe=!Z1.test(uS),Is=function(r){if(!lS(r))return!1;try{return cS(uS,qhe,r),!0}catch{return!1}},hS=function(r){if(!lS(r))return!1;switch(jhe(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Vhe||!!Uhe(Z1,Whe(r))}catch{return!0}};hS.sham=!0;var S0=!cS||Lhe(function(){var t;return Is(Is.call)||!Is(Object)||!Is(function(){t=!0})||t})?hS:Is,Ghe=g0,Khe=Hr,Yhe=Jl,ys=function(t,r,e){var n=Ghe(r);n in t?Khe.f(t,n,Yhe(0,e)):t[n]=e},Xhe=ja,c3=H1,Jhe=cs,Zhe=gs,Qhe=kt,e0e=Qhe("iterator"),E0=function(t){if(!Jhe(t))return c3(t,e0e)||c3(t,"@@iterator")||Zhe[Xhe(t)]},t0e=jr,r0e=La,n0e=Wr,i0e=ds,a0e=E0,o0e=TypeError,dS=function(t,r){var e=arguments.length<2?a0e(t):r;if(r0e(e))return n0e(t0e(e,t));throw new o0e(i0e(t)+" is not iterable")},s0e=nu,l0e=jr,u0e=Cr,c0e=Che,h0e=sS,d0e=S0,f0e=an,h3=ys,v0e=dS,p0e=E0,d3=Array,m0e=function(r){var e=u0e(r),n=d0e(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=s0e(a,i>2?arguments[2]:void 0));var s=p0e(e),l=0,u,c,h,d,f,v;if(s&&!(this===d3&&h0e(s)))for(d=v0e(e,s),f=d.next,c=n?new this:[];!(h=l0e(f,d)).done;l++)v=o?c0e(d,a,[h.value,l],!0):h.value,h3(c,l,v);else for(u=f0e(e),c=n?new this(u):d3(u);u>l;l++)v=o?a(e[l],l):e[l],h3(c,l,v);return c.length=l,c},g0e=kt,fS=g0e("iterator"),vS=!1;try{var y0e=0,f3={next:function(){return{done:!!y0e++}},return:function(){vS=!0}};f3[fS]=function(){return this},Array.from(f3,function(){throw 2})}catch{}var b0e=function(t,r){try{if(!r&&!vS)return!1}catch{return!1}var e=!1;try{var n={};n[fS]=function(){return{next:function(){return{done:e=!0}}}},t(n)}catch{}return e},w0e=Ee,$0e=m0e,x0e=b0e,k0e=!x0e(function(t){Array.from(t)});w0e({target:"Array",stat:!0,forced:k0e},{from:$0e});var S0e=We,E0e=S0e.Array.from,T0e=E0e,pS=T0e,_0e=pS,Wa=pe(_0e),O0e=zn,v3=gs,mS=Ha;Hr.f;var I0e=X1,lc=J1,gS="Array Iterator",C0e=mS.set,P0e=mS.getterFor(gS);I0e(Array,"Array",function(t,r){C0e(this,{type:gS,target:O0e(t),index:0,kind:r})},function(){var t=P0e(this),r=t.target,e=t.kind,n=t.index++;if(!r||n>=r.length)return t.target=void 0,lc(void 0,!0);switch(e){case"keys":return lc(n,!1);case"values":return lc(r[n],!1)}return lc([n,r[n]],!1)},"values");v3.Arguments=v3.Array;var A0e=E0,M0e=A0e,D0e={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},N0e=D0e,R0e=xt,F0e=ja,z0e=vs,p3=gs,B0e=kt,m3=B0e("toStringTag");for(var Qf in N0e){var g3=R0e[Qf],ev=g3&&g3.prototype;ev&&F0e(ev)!==m3&&z0e(ev,m3,Qf),p3[Qf]=p3.Array}var L0e=M0e,j0e=L0e,H0e=j0e,W0e=H0e,q0e=W0e,U0e=q0e,yS=U0e,bS=pe(yS),V0e=yS,qa=pe(V0e);function te(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var wS={exports:{}},G0e=Ee,K0e=qt,y3=Hr.f;G0e({target:"Object",stat:!0,forced:Object.defineProperty!==y3,sham:!K0e},{defineProperty:y3});var Y0e=We,$S=Y0e.Object,X0e=wS.exports=function(r,e,n){return $S.defineProperty(r,e,n)};$S.defineProperty.sham&&(X0e.sham=!0);var J0e=wS.exports,Z0e=J0e,xS=Z0e,Q0e=xS,ede=Q0e,tde=ede,rde=tde,nde=rde,T0=pe(nde),ide=fi,Ua=Array.isArray||function(r){return ide(r)==="Array"},ade=TypeError,ode=9007199254740991,Q1=function(t){if(t>ode)throw ade("Maximum allowed index exceeded");return t},b3=Ua,sde=S0,lde=Ut,ude=kt,cde=ude("species"),w3=Array,hde=function(t){var r;return b3(t)&&(r=t.constructor,sde(r)&&(r===w3||b3(r.prototype))?r=void 0:lde(r)&&(r=r[cde],r===null&&(r=void 0))),r===void 0?w3:r},dde=hde,eg=function(t,r){return new(dde(t))(r===0?0:r)},fde=He,vde=kt,pde=eu,mde=vde("species"),lu=function(t){return pde>=51||!fde(function(){var r=[],e=r.constructor={};return e[mde]=function(){return{foo:1}},r[t](Boolean).foo!==1})},gde=Ee,yde=He,bde=Ua,wde=Ut,$de=Cr,xde=an,$3=Q1,x3=ys,kde=eg,Sde=lu,Ede=kt,Tde=eu,kS=Ede("isConcatSpreadable"),_de=Tde>=51||!yde(function(){var t=[];return t[kS]=!1,t.concat()[0]!==t}),Ode=function(t){if(!wde(t))return!1;var r=t[kS];return r!==void 0?!!r:bde(t)},Ide=!_de||!Sde("concat");gde({target:"Array",proto:!0,arity:1,forced:Ide},{concat:function(r){var e=$de(this),n=kde(e,0),i=0,a,o,s,l,u;for(a=-1,s=arguments.length;ab;b++)if((s||b in f)&&(k=f[b],_=v(k,b,d),t))if(r)$[b]=_;else if(_)switch(t){case 3:return!0;case 5:return k;case 6:return b;case 2:E3($,k)}else switch(t){case 4:return!1;case 7:E3($,k)}return a?-1:n||i?i:$}},Yi={forEach:yi(0),map:yi(1),filter:yi(2),some:yi(3),every:yi(4),find:yi(5),findIndex:yi(6),filterReject:yi(7)},O0=Ee,I0=xt,rg=jr,rfe=Ue,zo=qt,Bo=hs,nfe=He,Lt=Vt,ife=It,Vp=Wr,C0=zn,ng=g0,afe=Bn,Gp=Jl,pl=ps,OS=b0,ofe=uu,IS=_0,sfe=ou,CS=us,PS=Hr,lfe=x0,AS=v0,T3=su,ufe=tg,ig=fs,cfe=$0,MS=au,_3=m0,hfe=kt,dfe=cu,ffe=St,vfe=_S,pfe=ms,DS=Ha,P0=Yi.forEach,xr=cfe("hidden"),A0="Symbol",ml="prototype",mfe=DS.set,O3=DS.getterFor(A0),vn=Object[ml],pa=I0.Symbol,Rs=pa&&pa[ml],gfe=I0.RangeError,yfe=I0.TypeError,tv=I0.QObject,NS=CS.f,ma=PS.f,RS=IS.f,bfe=AS.f,FS=rfe([].push),si=ig("symbols"),hu=ig("op-symbols"),wfe=ig("wks"),Kp=!tv||!tv[ml]||!tv[ml].findChild,zS=function(t,r,e){var n=NS(vn,r);n&&delete vn[r],ma(t,r,e),n&&t!==vn&&ma(vn,r,n)},Yp=zo&&nfe(function(){return pl(ma({},"a",{get:function(){return ma(this,"a",{value:7}).a}})).a!==7})?zS:ma,rv=function(t,r){var e=si[t]=pl(Rs);return mfe(e,{type:A0,tag:t,description:r}),zo||(e.description=r),e},M0=function(r,e,n){r===vn&&M0(hu,e,n),Vp(r);var i=ng(e);return Vp(n),Lt(si,i)?(n.enumerable?(Lt(r,xr)&&r[xr][i]&&(r[xr][i]=!1),n=pl(n,{enumerable:Gp(0,!1)})):(Lt(r,xr)||ma(r,xr,Gp(1,{})),r[xr][i]=!0),Yp(r,i,n)):ma(r,i,n)},ag=function(r,e){Vp(r);var n=C0(e),i=OS(n).concat(HS(n));return P0(i,function(a){(!zo||rg(BS,n,a))&&M0(r,a,n[a])}),r},$fe=function(r,e){return e===void 0?pl(r):ag(pl(r),e)},BS=function(r){var e=ng(r),n=rg(bfe,this,e);return this===vn&&Lt(si,e)&&!Lt(hu,e)?!1:n||!Lt(this,e)||!Lt(si,e)||Lt(this,xr)&&this[xr][e]?n:!0},LS=function(r,e){var n=C0(r),i=ng(e);if(!(n===vn&&Lt(si,i)&&!Lt(hu,i))){var a=NS(n,i);return a&&Lt(si,i)&&!(Lt(n,xr)&&n[xr][i])&&(a.enumerable=!0),a}},jS=function(r){var e=RS(C0(r)),n=[];return P0(e,function(i){!Lt(si,i)&&!Lt(MS,i)&&FS(n,i)}),n},HS=function(t){var r=t===vn,e=RS(r?hu:C0(t)),n=[];return P0(e,function(i){Lt(si,i)&&(!r||Lt(vn,i))&&FS(n,si[i])}),n};Bo||(pa=function(){if(ife(Rs,this))throw new yfe("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:afe(arguments[0]),e=_3(r),n=function(i){this===vn&&rg(n,hu,i),Lt(this,xr)&&Lt(this[xr],e)&&(this[xr][e]=!1);var a=Gp(1,i);try{Yp(this,e,a)}catch(o){if(!(o instanceof gfe))throw o;zS(this,e,a)}};return zo&&Kp&&Yp(vn,e,{configurable:!0,set:n}),rv(e,r)},Rs=pa[ml],T3(Rs,"toString",function(){return O3(this).tag}),T3(pa,"withoutSetter",function(t){return rv(_3(t),t)}),AS.f=BS,PS.f=M0,lfe.f=ag,CS.f=LS,ofe.f=IS.f=jS,sfe.f=HS,dfe.f=function(t){return rv(hfe(t),t)},zo&&ufe(Rs,"description",{configurable:!0,get:function(){return O3(this).description}}));O0({global:!0,constructor:!0,wrap:!0,forced:!Bo,sham:!Bo},{Symbol:pa});P0(OS(wfe),function(t){ffe(t)});O0({target:A0,stat:!0,forced:!Bo},{useSetter:function(){Kp=!0},useSimple:function(){Kp=!1}});O0({target:"Object",stat:!0,forced:!Bo,sham:!zo},{create:$fe,defineProperty:M0,defineProperties:ag,getOwnPropertyDescriptor:LS});O0({target:"Object",stat:!0,forced:!Bo},{getOwnPropertyNames:jS});vfe();pfe(pa,A0);MS[xr]=!0;var xfe=hs,WS=xfe&&!!Symbol.for&&!!Symbol.keyFor,kfe=Ee,Sfe=nn,Efe=Vt,Tfe=Bn,qS=fs,_fe=WS,nv=qS("string-to-symbol-registry"),Ofe=qS("symbol-to-string-registry");kfe({target:"Symbol",stat:!0,forced:!_fe},{for:function(t){var r=Tfe(t);if(Efe(nv,r))return nv[r];var e=Sfe("Symbol")(r);return nv[r]=e,Ofe[e]=r,e}});var Ife=Ee,Cfe=Vt,Pfe=tu,Afe=ds,Mfe=fs,Dfe=WS,I3=Mfe("symbol-to-string-registry");Ife({target:"Symbol",stat:!0,forced:!Dfe},{keyFor:function(r){if(!Pfe(r))throw new TypeError(Afe(r)+" is not a symbol");if(Cfe(I3,r))return I3[r]}});var Nfe=Ue,C3=Ua,Rfe=Wt,P3=fi,Ffe=Bn,A3=Nfe([].push),zfe=function(t){if(Rfe(t))return t;if(C3(t)){for(var r=t.length,e=[],n=0;nt.length)&&(r=t.length);for(var e=0,n=new Array(r);e"u"&&Rp!==void 0,Ok={all:Rp,IS_HTMLDDA:Soe},Ik=Ok,Eoe=Ik.all,Wt=Ik.IS_HTMLDDA?function(t){return typeof t=="function"||t===Eoe}:function(t){return typeof t=="function"},us={},Toe=We,qt=!Toe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),_oe=Yl,rc=Function.prototype.call,jr=_oe?rc.bind(rc):function(){return rc.apply(rc,arguments)},v0={},Ck={}.propertyIsEnumerable,Pk=Object.getOwnPropertyDescriptor,Ooe=Pk&&!Ck.call({1:2},1);v0.f=Ooe?function(r){var e=Pk(this,r);return!!e&&e.enumerable}:Ck;var Jl=function(t,r){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:r}},Ioe=Ge,Coe=We,Poe=fi,Pf=Object,Aoe=Ioe("".split),p0=Coe(function(){return!Pf("z").propertyIsEnumerable(0)})?function(t){return Poe(t)==="String"?Aoe(t,""):Pf(t)}:Pf,cs=function(t){return t==null},Moe=cs,Doe=TypeError,Zl=function(t){if(Moe(t))throw new Doe("Can't call method on "+t);return t},Noe=p0,Roe=Zl,zn=function(t){return Noe(Roe(t))},w5=Wt,Ak=Ok,Foe=Ak.all,Ut=Ak.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:w5(t)||t===Foe}:function(t){return typeof t=="object"?t!==null:w5(t)},qe={},Af=qe,Mf=xt,zoe=Wt,$5=function(t){return zoe(t)?t:void 0},nn=function(t,r){return arguments.length<2?$5(Af[t])||$5(Mf[t]):Af[t]&&Af[t][r]||Mf[t]&&Mf[t][r]},Boe=Ge,It=Boe({}.isPrototypeOf),Ql=typeof navigator<"u"&&String(navigator.userAgent)||"",Mk=xt,Df=Ql,x5=Mk.process,k5=Mk.Deno,S5=x5&&x5.versions||k5&&k5.version,E5=S5&&S5.v8,hn,dh;E5&&(hn=E5.split("."),dh=hn[0]>0&&hn[0]<4?1:+(hn[0]+hn[1]));!dh&&Df&&(hn=Df.match(/Edge\/(\d+)/),(!hn||hn[1]>=74)&&(hn=Df.match(/Chrome\/(\d+)/),hn&&(dh=+hn[1])));var eu=dh,T5=eu,Loe=We,joe=xt,Hoe=joe.String,hs=!!Object.getOwnPropertySymbols&&!Loe(function(){var t=Symbol("symbol detection");return!Hoe(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&T5&&T5<41}),Woe=hs,Dk=Woe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",qoe=nn,Uoe=Wt,Voe=It,Goe=Dk,Koe=Object,tu=Goe?function(t){return typeof t=="symbol"}:function(t){var r=qoe("Symbol");return Uoe(r)&&Voe(r.prototype,Koe(t))},Yoe=String,ds=function(t){try{return Yoe(t)}catch{return"Object"}},Xoe=Wt,Joe=ds,Zoe=TypeError,La=function(t){if(Xoe(t))return t;throw new Zoe(Joe(t)+" is not a function")},Qoe=La,ese=cs,H1=function(t,r){var e=t[r];return ese(e)?void 0:Qoe(e)},Nf=jr,Rf=Wt,Ff=Ut,tse=TypeError,rse=function(t,r){var e,n;if(r==="string"&&Rf(e=t.toString)&&!Ff(n=Nf(e,t))||Rf(e=t.valueOf)&&!Ff(n=Nf(e,t))||r!=="string"&&Rf(e=t.toString)&&!Ff(n=Nf(e,t)))return n;throw new tse("Can't convert object to primitive value")},Nk={exports:{}},_5=xt,nse=Object.defineProperty,ise=function(t,r){try{nse(_5,t,{value:r,configurable:!0,writable:!0})}catch{_5[t]=r}return r},ase=xt,ose=ise,O5="__core-js_shared__",sse=ase[O5]||ose(O5,{}),W1=sse,I5=W1;(Nk.exports=function(t,r){return I5[t]||(I5[t]=r!==void 0?r:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var fs=Nk.exports,lse=Zl,use=Object,Cr=function(t){return use(lse(t))},cse=Ge,hse=Cr,dse=cse({}.hasOwnProperty),Vt=Object.hasOwn||function(r,e){return dse(hse(r),e)},fse=Ge,vse=0,pse=Math.random(),mse=fse(1 .toString),m0=function(t){return"Symbol("+(t===void 0?"":t)+")_"+mse(++vse+pse,36)},gse=xt,yse=fs,C5=Vt,bse=m0,wse=hs,$se=Dk,bo=gse.Symbol,zf=yse("wks"),xse=$se?bo.for||bo:bo&&bo.withoutSetter||bse,kt=function(t){return C5(zf,t)||(zf[t]=wse&&C5(bo,t)?bo[t]:xse("Symbol."+t)),zf[t]},kse=jr,P5=Ut,A5=tu,Sse=H1,Ese=rse,Tse=kt,_se=TypeError,Ose=Tse("toPrimitive"),Ise=function(t,r){if(!P5(t)||A5(t))return t;var e=Sse(t,Ose),n;if(e){if(r===void 0&&(r="default"),n=kse(e,t,r),!P5(n)||A5(n))return n;throw new _se("Can't convert object to primitive value")}return r===void 0&&(r="number"),Ese(t,r)},Cse=Ise,Pse=tu,g0=function(t){var r=Cse(t,"string");return Pse(r)?r:r+""},Ase=xt,M5=Ut,Fp=Ase.document,Mse=M5(Fp)&&M5(Fp.createElement),Rk=function(t){return Mse?Fp.createElement(t):{}},Dse=qt,Nse=We,Rse=Rk,Fk=!Dse&&!Nse(function(){return Object.defineProperty(Rse("div"),"a",{get:function(){return 7}}).a!==7}),Fse=qt,zse=jr,Bse=v0,Lse=Jl,jse=zn,Hse=g0,Wse=Vt,qse=Fk,D5=Object.getOwnPropertyDescriptor;us.f=Fse?D5:function(r,e){if(r=jse(r),e=Hse(e),qse)try{return D5(r,e)}catch{}if(Wse(r,e))return Lse(!zse(Bse.f,r,e),r[e])};var Use=We,Vse=Wt,Gse=/#|\.prototype\./,ru=function(t,r){var e=Yse[Kse(t)];return e===Jse?!0:e===Xse?!1:Vse(r)?Use(r):!!r},Kse=ru.normalize=function(t){return String(t).replace(Gse,".").toLowerCase()},Yse=ru.data={},Xse=ru.NATIVE="N",Jse=ru.POLYFILL="P",Zse=ru,N5=j1,Qse=La,ele=Yl,tle=N5(N5.bind),nu=function(t,r){return Qse(t),r===void 0?t:ele?tle(t,r):function(){return t.apply(r,arguments)}},Hr={},rle=qt,nle=We,zk=rle&&nle(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),ile=Ut,ale=String,ole=TypeError,Wr=function(t){if(ile(t))return t;throw new ole(ale(t)+" is not an object")},sle=qt,lle=Fk,ule=zk,nc=Wr,R5=g0,cle=TypeError,Bf=Object.defineProperty,hle=Object.getOwnPropertyDescriptor,Lf="enumerable",jf="configurable",Hf="writable";Hr.f=sle?ule?function(r,e,n){if(nc(r),e=R5(e),nc(n),typeof r=="function"&&e==="prototype"&&"value"in n&&Hf in n&&!n[Hf]){var i=hle(r,e);i&&i[Hf]&&(r[e]=n.value,n={configurable:jf in n?n[jf]:i[jf],enumerable:Lf in n?n[Lf]:i[Lf],writable:!1})}return Bf(r,e,n)}:Bf:function(r,e,n){if(nc(r),e=R5(e),nc(n),lle)try{return Bf(r,e,n)}catch{}if("get"in n||"set"in n)throw new cle("Accessors not supported");return"value"in n&&(r[e]=n.value),r};var dle=qt,fle=Hr,vle=Jl,vs=dle?function(t,r,e){return fle.f(t,r,vle(1,e))}:function(t,r,e){return t[r]=e,t},ic=xt,ple=Xl,mle=j1,gle=Wt,yle=us.f,ble=Zse,no=qe,wle=nu,io=vs,F5=Vt,$le=function(t){var r=function(e,n,i){if(this instanceof r){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return ple(t,this,arguments)};return r.prototype=t.prototype,r},ke=function(t,r){var e=t.target,n=t.global,i=t.stat,a=t.proto,o=n?ic:i?ic[e]:(ic[e]||{}).prototype,s=n?no:no[e]||io(no,e,{})[e],l=s.prototype,u,c,h,d,f,v,m,b,y;for(d in r)u=ble(n?d:e+(i?".":"#")+d,t.forced),c=!u&&o&&F5(o,d),v=s[d],c&&(t.dontCallGetSet?(y=yle(o,d),m=y&&y.value):m=o[d]),f=c&&m?m:r[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=wle(f,ic):t.wrap&&c?b=$le(f):a&&gle(f)?b=mle(f):b=f,(t.sham||f&&f.sham||v&&v.sham)&&io(b,"sham",!0),io(s,d,b),a&&(h=e+"Prototype",F5(no,h)||io(no,h,{}),io(no[h],d,f),t.real&&l&&(u||!l[d])&&io(l,d,f)))},xle=Math.ceil,kle=Math.floor,Sle=Math.trunc||function(r){var e=+r;return(e>0?kle:xle)(e)},Ele=Sle,y0=function(t){var r=+t;return r!==r||r===0?0:Ele(r)},Tle=y0,_le=Math.max,Ole=Math.min,iu=function(t,r){var e=Tle(t);return e<0?_le(e+r,0):Ole(e,r)},Ile=y0,Cle=Math.min,Ple=function(t){return t>0?Cle(Ile(t),9007199254740991):0},Ale=Ple,an=function(t){return Ale(t.length)},Mle=zn,Dle=iu,Nle=an,z5=function(t){return function(r,e,n){var i=Mle(r),a=Nle(i),o=Dle(n,a),s;if(t&&e!==e){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((t||o in i)&&i[o]===e)return t||o||0;return!t&&-1}},q1={includes:z5(!0),indexOf:z5(!1)},au={},Rle=Ge,Wf=Vt,Fle=zn,zle=q1.indexOf,Ble=au,B5=Rle([].push),Bk=function(t,r){var e=Fle(t),n=0,i=[],a;for(a in e)!Wf(Ble,a)&&Wf(e,a)&&B5(i,a);for(;r.length>n;)Wf(e,a=r[n++])&&(~zle(i,a)||B5(i,a));return i},U1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Lle=Bk,jle=U1,b0=Object.keys||function(r){return Lle(r,jle)},ou={};ou.f=Object.getOwnPropertySymbols;var L5=qt,Hle=Ge,Wle=jr,qle=We,qf=b0,Ule=ou,Vle=v0,Gle=Cr,Kle=p0,ao=Object.assign,j5=Object.defineProperty,Yle=Hle([].concat),Xle=!ao||qle(function(){if(L5&&ao({b:1},ao(j5({},"a",{enumerable:!0,get:function(){j5(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},r={},e=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[e]=7,n.split("").forEach(function(i){r[i]=i}),ao({},t)[e]!==7||qf(ao({},r)).join("")!==n})?function(r,e){for(var n=Gle(r),i=arguments.length,a=1,o=Ule.f,s=Vle.f;i>a;)for(var l=Kle(arguments[a++]),u=o?Yle(qf(l),o(l)):qf(l),c=u.length,h=0,d;c>h;)d=u[h++],(!L5||Wle(s,l,d))&&(n[d]=l[d]);return n}:ao,Jle=ke,H5=Xle;Jle({target:"Object",stat:!0,arity:2,forced:Object.assign!==H5},{assign:H5});var Zle=qe,Qle=Zle.Object.assign,eue=Qle,tue=eue,rue=tue,At=pe(rue),nue=Ge,w0=nue([].slice),Lk=Ge,iue=La,aue=Ut,oue=Vt,W5=w0,sue=Yl,jk=Function,lue=Lk([].concat),uue=Lk([].join),Uf={},cue=function(t,r,e){if(!oue(Uf,r)){for(var n=[],i=0;i=.1;)v=+a[h++%o],v>c&&(v=c),f=Math.sqrt(v*v/(1+u*u)),f=s<0?-f:f,r+=f,e+=u*f,d===!0?t.lineTo(r,e):t.moveTo(r,e),c-=v,d=!d}function Eue(t,r,e,n){t.beginPath();var i=6,a=Math.PI*2/i;t.moveTo(r+n,e);for(var o=1;o1?e-1:0),i=1;i=a?t?"":void 0:(o=V5(n,i),o<55296||o>56319||i+1===a||(s=V5(n,i+1))<56320||s>57343?t?Hue(n,i):o:t?Wue(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},que={codeAt:G5(!1),charAt:G5(!0)},Uue=xt,Vue=Wt,K5=Uue.WeakMap,Xk=Vue(K5)&&/native code/.test(String(K5)),Gue=fs,Kue=m0,Y5=Gue("keys"),$0=function(t){return Y5[t]||(Y5[t]=Kue(t))},Yue=Xk,Jk=xt,Xue=Ut,Jue=vs,Gf=Vt,Kf=W1,Zue=$0,Que=au,X5="Object already initialized",Bp=Jk.TypeError,ece=Jk.WeakMap,fh,vl,vh,tce=function(t){return vh(t)?vl(t):fh(t,{})},rce=function(t){return function(r){var e;if(!Xue(r)||(e=vl(r)).type!==t)throw new Bp("Incompatible receiver, "+t+" required");return e}};if(Yue||Kf.state){var $n=Kf.state||(Kf.state=new ece);$n.get=$n.get,$n.has=$n.has,$n.set=$n.set,fh=function(t,r){if($n.has(t))throw new Bp(X5);return r.facade=t,$n.set(t,r),r},vl=function(t){return $n.get(t)||{}},vh=function(t){return $n.has(t)}}else{var oo=Zue("state");Que[oo]=!0,fh=function(t,r){if(Gf(t,oo))throw new Bp(X5);return r.facade=t,Jue(t,oo,r),r},vl=function(t){return Gf(t,oo)?t[oo]:{}},vh=function(t){return Gf(t,oo)}}var Ha={set:fh,get:vl,has:vh,enforce:tce,getterFor:rce},Lp=qt,nce=Vt,Zk=Function.prototype,ice=Lp&&Object.getOwnPropertyDescriptor,Y1=nce(Zk,"name"),ace=Y1&&(function(){}).name==="something",oce=Y1&&(!Lp||Lp&&ice(Zk,"name").configurable),sce={EXISTS:Y1,PROPER:ace,CONFIGURABLE:oce},x0={},lce=qt,uce=zk,cce=Hr,hce=Wr,dce=zn,fce=b0;x0.f=lce&&!uce?Object.defineProperties:function(r,e){hce(r);for(var n=dce(e),i=fce(e),a=i.length,o=0,s;a>o;)cce.f(r,s=i[o++],n[s]);return r};var vce=nn,pce=vce("document","documentElement"),mce=Wr,gce=x0,J5=U1,yce=au,bce=pce,wce=Rk,$ce=$0,Z5=">",Q5="<",jp="prototype",Hp="script",Qk=$ce("IE_PROTO"),Yf=function(){},eS=function(t){return Q5+Hp+Z5+t+Q5+"/"+Hp+Z5},e3=function(t){t.write(eS("")),t.close();var r=t.parentWindow.Object;return t=null,r},xce=function(){var t=wce("iframe"),r="java"+Hp+":",e;return t.style.display="none",bce.appendChild(t),t.src=String(r),e=t.contentWindow.document,e.open(),e.write(eS("document.F=Object")),e.close(),e.F},ac,Dc=function(){try{ac=new ActiveXObject("htmlfile")}catch{}Dc=typeof document<"u"?document.domain&&ac?e3(ac):xce():e3(ac);for(var t=J5.length;t--;)delete Dc[jp][J5[t]];return Dc()};yce[Qk]=!0;var ps=Object.create||function(r,e){var n;return r!==null?(Yf[jp]=mce(r),n=new Yf,Yf[jp]=null,n[Qk]=r):n=Dc(),e===void 0?n:gce.f(n,e)},kce=We,tS=!kce(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Sce=Vt,Ece=Wt,Tce=Cr,_ce=$0,Oce=tS,t3=_ce("IE_PROTO"),Wp=Object,Ice=Wp.prototype,k0=Oce?Wp.getPrototypeOf:function(t){var r=Tce(t);if(Sce(r,t3))return r[t3];var e=r.constructor;return Ece(e)&&r instanceof e?e.prototype:r instanceof Wp?Ice:null},Cce=vs,su=function(t,r,e,n){return n&&n.enumerable?t[r]=e:Cce(t,r,e),t},Pce=We,Ace=Wt,Mce=Ut,Dce=ps,r3=k0,Nce=su,Rce=kt,qp=Rce("iterator"),rS=!1,Jn,Xf,Jf;[].keys&&(Jf=[].keys(),"next"in Jf?(Xf=r3(r3(Jf)),Xf!==Object.prototype&&(Jn=Xf)):rS=!0);var Fce=!Mce(Jn)||Pce(function(){var t={};return Jn[qp].call(t)!==t});Fce?Jn={}:Jn=Dce(Jn);Ace(Jn[qp])||Nce(Jn,qp,function(){return this});var nS={IteratorPrototype:Jn,BUGGY_SAFARI_ITERATORS:rS},zce=G1,Bce=ja,Lce=zce?{}.toString:function(){return"[object "+Bce(this)+"]"},jce=G1,Hce=Hr.f,Wce=vs,qce=Vt,Uce=Lce,Vce=kt,n3=Vce("toStringTag"),ms=function(t,r,e,n){if(t){var i=e?t:t.prototype;qce(i,n3)||Hce(i,n3,{configurable:!0,value:r}),n&&!jce&&Wce(i,"toString",Uce)}},gs={},Gce=nS.IteratorPrototype,Kce=ps,Yce=Jl,Xce=ms,Jce=gs,Zce=function(){return this},Qce=function(t,r,e,n){var i=r+" Iterator";return t.prototype=Kce(Gce,{next:Yce(+!n,e)}),Xce(t,i,!1,!0),Jce[i]=Zce,t},ehe=Ge,the=La,rhe=function(t,r,e){try{return ehe(the(Object.getOwnPropertyDescriptor(t,r)[e]))}catch{}},nhe=Wt,ihe=String,ahe=TypeError,ohe=function(t){if(typeof t=="object"||nhe(t))return t;throw new ahe("Can't set "+ihe(t)+" as a prototype")},she=rhe,lhe=Wr,uhe=ohe,che=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,r={},e;try{e=she(Object.prototype,"__proto__","set"),e(r,[]),t=r instanceof Array}catch{}return function(i,a){return lhe(i),uhe(a),t?e(i,a):i.__proto__=a,i}}():void 0),hhe=ke,dhe=jr,fhe=sce,vhe=Qce,phe=k0,mhe=ms,i3=su,ghe=kt,a3=gs,yhe=nS,bhe=fhe.PROPER,oc=yhe.BUGGY_SAFARI_ITERATORS,Zf=ghe("iterator"),o3="keys",sc="values",s3="entries",whe=function(){return this},X1=function(t,r,e,n,i,a,o){vhe(e,r,n);var s=function(y){if(y===i&&d)return d;if(!oc&&y&&y in c)return c[y];switch(y){case o3:return function(){return new e(this,y)};case sc:return function(){return new e(this,y)};case s3:return function(){return new e(this,y)}}return function(){return new e(this)}},l=r+" Iterator",u=!1,c=t.prototype,h=c[Zf]||c["@@iterator"]||i&&c[i],d=!oc&&h||s(i),f=r==="Array"&&c.entries||h,v,m,b;if(f&&(v=phe(f.call(new t)),v!==Object.prototype&&v.next&&(mhe(v,l,!0,!0),a3[l]=whe)),bhe&&i===sc&&h&&h.name!==sc&&(u=!0,d=function(){return dhe(h,this)}),i)if(m={values:s(sc),keys:a?d:s(o3),entries:s(s3)},o)for(b in m)(oc||u||!(b in c))&&i3(c,b,m[b]);else hhe({target:r,proto:!0,forced:oc||u},m);return o&&c[Zf]!==d&&i3(c,Zf,d,{name:i}),a3[r]=d,m},J1=function(t,r){return{value:t,done:r}},$he=que.charAt,xhe=Bn,iS=Ha,khe=X1,l3=J1,aS="String Iterator",She=iS.set,Ehe=iS.getterFor(aS);khe(String,"String",function(t){She(this,{type:aS,string:xhe(t),index:0})},function(){var r=Ehe(this),e=r.string,n=r.index,i;return n>=e.length?l3(void 0,!0):(i=$he(e,n),r.index+=i.length,l3(i,!1))});var The=jr,u3=Wr,_he=H1,oS=function(t,r,e){var n,i;u3(t);try{if(n=_he(t,"return"),!n){if(r==="throw")throw e;return e}n=The(n,t)}catch(a){i=!0,n=a}if(r==="throw")throw e;if(i)throw n;return u3(n),e},Ohe=Wr,Ihe=oS,Che=function(t,r,e,n){try{return n?r(Ohe(e)[0],e[1]):r(e)}catch(i){Ihe(t,"throw",i)}},Phe=kt,Ahe=gs,Mhe=Phe("iterator"),Dhe=Array.prototype,sS=function(t){return t!==void 0&&(Ahe.Array===t||Dhe[Mhe]===t)},Nhe=Ge,Rhe=Wt,Up=W1,Fhe=Nhe(Function.toString);Rhe(Up.inspectSource)||(Up.inspectSource=function(t){return Fhe(t)});var zhe=Up.inspectSource,Bhe=Ge,Lhe=We,lS=Wt,jhe=ja,Hhe=nn,Whe=zhe,uS=function(){},qhe=[],cS=Hhe("Reflect","construct"),Z1=/^\s*(?:class|function)\b/,Uhe=Bhe(Z1.exec),Vhe=!Z1.test(uS),Is=function(r){if(!lS(r))return!1;try{return cS(uS,qhe,r),!0}catch{return!1}},hS=function(r){if(!lS(r))return!1;switch(jhe(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Vhe||!!Uhe(Z1,Whe(r))}catch{return!0}};hS.sham=!0;var S0=!cS||Lhe(function(){var t;return Is(Is.call)||!Is(Object)||!Is(function(){t=!0})||t})?hS:Is,Ghe=g0,Khe=Hr,Yhe=Jl,ys=function(t,r,e){var n=Ghe(r);n in t?Khe.f(t,n,Yhe(0,e)):t[n]=e},Xhe=ja,c3=H1,Jhe=cs,Zhe=gs,Qhe=kt,e0e=Qhe("iterator"),E0=function(t){if(!Jhe(t))return c3(t,e0e)||c3(t,"@@iterator")||Zhe[Xhe(t)]},t0e=jr,r0e=La,n0e=Wr,i0e=ds,a0e=E0,o0e=TypeError,dS=function(t,r){var e=arguments.length<2?a0e(t):r;if(r0e(e))return n0e(t0e(e,t));throw new o0e(i0e(t)+" is not iterable")},s0e=nu,l0e=jr,u0e=Cr,c0e=Che,h0e=sS,d0e=S0,f0e=an,h3=ys,v0e=dS,p0e=E0,d3=Array,m0e=function(r){var e=u0e(r),n=d0e(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=s0e(a,i>2?arguments[2]:void 0));var s=p0e(e),l=0,u,c,h,d,f,v;if(s&&!(this===d3&&h0e(s)))for(d=v0e(e,s),f=d.next,c=n?new this:[];!(h=l0e(f,d)).done;l++)v=o?c0e(d,a,[h.value,l],!0):h.value,h3(c,l,v);else for(u=f0e(e),c=n?new this(u):d3(u);u>l;l++)v=o?a(e[l],l):e[l],h3(c,l,v);return c.length=l,c},g0e=kt,fS=g0e("iterator"),vS=!1;try{var y0e=0,f3={next:function(){return{done:!!y0e++}},return:function(){vS=!0}};f3[fS]=function(){return this},Array.from(f3,function(){throw 2})}catch{}var b0e=function(t,r){try{if(!r&&!vS)return!1}catch{return!1}var e=!1;try{var n={};n[fS]=function(){return{next:function(){return{done:e=!0}}}},t(n)}catch{}return e},w0e=ke,$0e=m0e,x0e=b0e,k0e=!x0e(function(t){Array.from(t)});w0e({target:"Array",stat:!0,forced:k0e},{from:$0e});var S0e=qe,E0e=S0e.Array.from,T0e=E0e,pS=T0e,_0e=pS,Wa=pe(_0e),O0e=zn,v3=gs,mS=Ha;Hr.f;var I0e=X1,lc=J1,gS="Array Iterator",C0e=mS.set,P0e=mS.getterFor(gS);I0e(Array,"Array",function(t,r){C0e(this,{type:gS,target:O0e(t),index:0,kind:r})},function(){var t=P0e(this),r=t.target,e=t.kind,n=t.index++;if(!r||n>=r.length)return t.target=void 0,lc(void 0,!0);switch(e){case"keys":return lc(n,!1);case"values":return lc(r[n],!1)}return lc([n,r[n]],!1)},"values");v3.Arguments=v3.Array;var A0e=E0,M0e=A0e,D0e={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},N0e=D0e,R0e=xt,F0e=ja,z0e=vs,p3=gs,B0e=kt,m3=B0e("toStringTag");for(var Qf in N0e){var g3=R0e[Qf],ev=g3&&g3.prototype;ev&&F0e(ev)!==m3&&z0e(ev,m3,Qf),p3[Qf]=p3.Array}var L0e=M0e,j0e=L0e,H0e=j0e,W0e=H0e,q0e=W0e,U0e=q0e,yS=U0e,bS=pe(yS),V0e=yS,qa=pe(V0e);function te(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var wS={exports:{}},G0e=ke,K0e=qt,y3=Hr.f;G0e({target:"Object",stat:!0,forced:Object.defineProperty!==y3,sham:!K0e},{defineProperty:y3});var Y0e=qe,$S=Y0e.Object,X0e=wS.exports=function(r,e,n){return $S.defineProperty(r,e,n)};$S.defineProperty.sham&&(X0e.sham=!0);var J0e=wS.exports,Z0e=J0e,xS=Z0e,Q0e=xS,ede=Q0e,tde=ede,rde=tde,nde=rde,T0=pe(nde),ide=fi,Ua=Array.isArray||function(r){return ide(r)==="Array"},ade=TypeError,ode=9007199254740991,Q1=function(t){if(t>ode)throw ade("Maximum allowed index exceeded");return t},b3=Ua,sde=S0,lde=Ut,ude=kt,cde=ude("species"),w3=Array,hde=function(t){var r;return b3(t)&&(r=t.constructor,sde(r)&&(r===w3||b3(r.prototype))?r=void 0:lde(r)&&(r=r[cde],r===null&&(r=void 0))),r===void 0?w3:r},dde=hde,eg=function(t,r){return new(dde(t))(r===0?0:r)},fde=We,vde=kt,pde=eu,mde=vde("species"),lu=function(t){return pde>=51||!fde(function(){var r=[],e=r.constructor={};return e[mde]=function(){return{foo:1}},r[t](Boolean).foo!==1})},gde=ke,yde=We,bde=Ua,wde=Ut,$de=Cr,xde=an,$3=Q1,x3=ys,kde=eg,Sde=lu,Ede=kt,Tde=eu,kS=Ede("isConcatSpreadable"),_de=Tde>=51||!yde(function(){var t=[];return t[kS]=!1,t.concat()[0]!==t}),Ode=function(t){if(!wde(t))return!1;var r=t[kS];return r!==void 0?!!r:bde(t)},Ide=!_de||!Sde("concat");gde({target:"Array",proto:!0,arity:1,forced:Ide},{concat:function(r){var e=$de(this),n=kde(e,0),i=0,a,o,s,l,u;for(a=-1,s=arguments.length;ab;b++)if((s||b in f)&&(k=f[b],O=v(k,b,d),t))if(r)$[b]=O;else if(O)switch(t){case 3:return!0;case 5:return k;case 6:return b;case 2:E3($,k)}else switch(t){case 4:return!1;case 7:E3($,k)}return a?-1:n||i?i:$}},Yi={forEach:yi(0),map:yi(1),filter:yi(2),some:yi(3),every:yi(4),find:yi(5),findIndex:yi(6),filterReject:yi(7)},O0=ke,I0=xt,rg=jr,rfe=Ge,zo=qt,Bo=hs,nfe=We,Lt=Vt,ife=It,Vp=Wr,C0=zn,ng=g0,afe=Bn,Gp=Jl,pl=ps,OS=b0,ofe=uu,IS=_0,sfe=ou,CS=us,PS=Hr,lfe=x0,AS=v0,T3=su,ufe=tg,ig=fs,cfe=$0,MS=au,_3=m0,hfe=kt,dfe=cu,ffe=St,vfe=_S,pfe=ms,DS=Ha,P0=Yi.forEach,xr=cfe("hidden"),A0="Symbol",ml="prototype",mfe=DS.set,O3=DS.getterFor(A0),vn=Object[ml],pa=I0.Symbol,Rs=pa&&pa[ml],gfe=I0.RangeError,yfe=I0.TypeError,tv=I0.QObject,NS=CS.f,ma=PS.f,RS=IS.f,bfe=AS.f,FS=rfe([].push),si=ig("symbols"),hu=ig("op-symbols"),wfe=ig("wks"),Kp=!tv||!tv[ml]||!tv[ml].findChild,zS=function(t,r,e){var n=NS(vn,r);n&&delete vn[r],ma(t,r,e),n&&t!==vn&&ma(vn,r,n)},Yp=zo&&nfe(function(){return pl(ma({},"a",{get:function(){return ma(this,"a",{value:7}).a}})).a!==7})?zS:ma,rv=function(t,r){var e=si[t]=pl(Rs);return mfe(e,{type:A0,tag:t,description:r}),zo||(e.description=r),e},M0=function(r,e,n){r===vn&&M0(hu,e,n),Vp(r);var i=ng(e);return Vp(n),Lt(si,i)?(n.enumerable?(Lt(r,xr)&&r[xr][i]&&(r[xr][i]=!1),n=pl(n,{enumerable:Gp(0,!1)})):(Lt(r,xr)||ma(r,xr,Gp(1,{})),r[xr][i]=!0),Yp(r,i,n)):ma(r,i,n)},ag=function(r,e){Vp(r);var n=C0(e),i=OS(n).concat(HS(n));return P0(i,function(a){(!zo||rg(BS,n,a))&&M0(r,a,n[a])}),r},$fe=function(r,e){return e===void 0?pl(r):ag(pl(r),e)},BS=function(r){var e=ng(r),n=rg(bfe,this,e);return this===vn&&Lt(si,e)&&!Lt(hu,e)?!1:n||!Lt(this,e)||!Lt(si,e)||Lt(this,xr)&&this[xr][e]?n:!0},LS=function(r,e){var n=C0(r),i=ng(e);if(!(n===vn&&Lt(si,i)&&!Lt(hu,i))){var a=NS(n,i);return a&&Lt(si,i)&&!(Lt(n,xr)&&n[xr][i])&&(a.enumerable=!0),a}},jS=function(r){var e=RS(C0(r)),n=[];return P0(e,function(i){!Lt(si,i)&&!Lt(MS,i)&&FS(n,i)}),n},HS=function(t){var r=t===vn,e=RS(r?hu:C0(t)),n=[];return P0(e,function(i){Lt(si,i)&&(!r||Lt(vn,i))&&FS(n,si[i])}),n};Bo||(pa=function(){if(ife(Rs,this))throw new yfe("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:afe(arguments[0]),e=_3(r),n=function(i){this===vn&&rg(n,hu,i),Lt(this,xr)&&Lt(this[xr],e)&&(this[xr][e]=!1);var a=Gp(1,i);try{Yp(this,e,a)}catch(o){if(!(o instanceof gfe))throw o;zS(this,e,a)}};return zo&&Kp&&Yp(vn,e,{configurable:!0,set:n}),rv(e,r)},Rs=pa[ml],T3(Rs,"toString",function(){return O3(this).tag}),T3(pa,"withoutSetter",function(t){return rv(_3(t),t)}),AS.f=BS,PS.f=M0,lfe.f=ag,CS.f=LS,ofe.f=IS.f=jS,sfe.f=HS,dfe.f=function(t){return rv(hfe(t),t)},zo&&ufe(Rs,"description",{configurable:!0,get:function(){return O3(this).description}}));O0({global:!0,constructor:!0,wrap:!0,forced:!Bo,sham:!Bo},{Symbol:pa});P0(OS(wfe),function(t){ffe(t)});O0({target:A0,stat:!0,forced:!Bo},{useSetter:function(){Kp=!0},useSimple:function(){Kp=!1}});O0({target:"Object",stat:!0,forced:!Bo,sham:!zo},{create:$fe,defineProperty:M0,defineProperties:ag,getOwnPropertyDescriptor:LS});O0({target:"Object",stat:!0,forced:!Bo},{getOwnPropertyNames:jS});vfe();pfe(pa,A0);MS[xr]=!0;var xfe=hs,WS=xfe&&!!Symbol.for&&!!Symbol.keyFor,kfe=ke,Sfe=nn,Efe=Vt,Tfe=Bn,qS=fs,_fe=WS,nv=qS("string-to-symbol-registry"),Ofe=qS("symbol-to-string-registry");kfe({target:"Symbol",stat:!0,forced:!_fe},{for:function(t){var r=Tfe(t);if(Efe(nv,r))return nv[r];var e=Sfe("Symbol")(r);return nv[r]=e,Ofe[e]=r,e}});var Ife=ke,Cfe=Vt,Pfe=tu,Afe=ds,Mfe=fs,Dfe=WS,I3=Mfe("symbol-to-string-registry");Ife({target:"Symbol",stat:!0,forced:!Dfe},{keyFor:function(r){if(!Pfe(r))throw new TypeError(Afe(r)+" is not a symbol");if(Cfe(I3,r))return I3[r]}});var Nfe=Ge,C3=Ua,Rfe=Wt,P3=fi,Ffe=Bn,A3=Nfe([].push),zfe=function(t){if(Rfe(t))return t;if(C3(t)){for(var r=t.length,e=[],n=0;nt.length)&&(r=t.length);for(var e=0,n=new Array(r);e1?arguments[1]:void 0)}});var l1e=Gt,u1e=l1e("Array").map,c1e=It,h1e=u1e,uv=Array.prototype,d1e=function(t){var r=t.map;return t===uv||c1e(uv,t)&&r===uv.map?h1e:r},f1e=d1e,v1e=f1e,p1e=v1e,Lo=pe(p1e),m1e=Ee,g1e=Cr,lE=b0,y1e=He,b1e=y1e(function(){lE(1)});m1e({target:"Object",stat:!0,forced:b1e},{keys:function(r){return lE(g1e(r))}});var w1e=We,$1e=w1e.Object.keys,x1e=$1e,k1e=x1e,S1e=k1e,yt=pe(S1e),E1e=Ee,T1e=Ue,uE=Date,_1e=T1e(uE.prototype.getTime);E1e({target:"Date",stat:!0},{now:function(){return _1e(new uE)}});var O1e=We,I1e=O1e.Date.now,C1e=I1e,P1e=C1e,A1e=P1e,mh=pe(A1e),M1e=He,bs=function(t,r){var e=[][t];return!!e&&M1e(function(){e.call(null,r||function(){return 1},1)})},D1e=Yi.forEach,N1e=bs,R1e=N1e("forEach"),F1e=R1e?[].forEach:function(r){return D1e(this,r,arguments.length>1?arguments[1]:void 0)},z1e=Ee,Y3=F1e;z1e({target:"Array",proto:!0,forced:[].forEach!==Y3},{forEach:Y3});var B1e=Gt,L1e=B1e("Array").forEach,j1e=L1e,H1e=j1e,W1e=ja,q1e=Vt,U1e=It,V1e=H1e,cv=Array.prototype,G1e={DOMTokenList:!0,NodeList:!0},K1e=function(t){var r=t.forEach;return t===cv||U1e(cv,t)&&r===cv.forEach||q1e(G1e,W1e(t))?V1e:r},Y1e=K1e,tt=pe(Y1e),X1e=Ee,J1e=Ue,Z1e=Ua,Q1e=J1e([].reverse),X3=[1,2];X1e({target:"Array",proto:!0,forced:String(X3)===String(X3.reverse())},{reverse:function(){return Z1e(this)&&(this.length=this.length),Q1e(this)}});var ege=Gt,tge=ege("Array").reverse,rge=It,nge=tge,hv=Array.prototype,ige=function(t){var r=t.reverse;return t===hv||rge(hv,t)&&r===hv.reverse?nge:r},age=ige,oge=age,sge=oge,ga=pe(sge),J3=ds,lge=TypeError,cE=function(t,r){if(!delete t[r])throw new lge("Cannot delete property "+J3(r)+" of "+J3(t))},uge=Ee,cge=Cr,hge=iu,dge=y0,fge=an,vge=iE,pge=Q1,mge=eg,gge=ys,dv=cE,yge=lu,bge=yge("splice"),wge=Math.max,$ge=Math.min;uge({target:"Array",proto:!0,forced:!bge},{splice:function(r,e){var n=cge(this),i=fge(n),a=hge(r,i),o=arguments.length,s,l,u,c,h,d;for(o===0?s=l=0:o===1?(s=0,l=i-a):(s=o-2,l=$ge(wge(dge(e),0),i-a)),pge(i+s-l),u=mge(n,l),c=0;ci-l+s;c--)dv(n,c-1)}else if(s>l)for(c=i-l;c>a;c--)h=c+l-1,d=c+s-1,h in n?n[d]=n[h]:dv(n,d);for(c=0;c1?arguments[1]:void 0)}});var Dge=Gt,Nge=Dge("Array").includes,Rge=Ut,Fge=fi,zge=kt,Bge=zge("match"),Lge=function(t){var r;return Rge(t)&&((r=t[Bge])!==void 0?!!r:Fge(t)==="RegExp")},jge=Lge,Hge=TypeError,Wge=function(t){if(jge(t))throw new Hge("The method doesn't accept regular expressions");return t},qge=kt,Uge=qge("match"),Vge=function(t){var r=/./;try{"/./"[t](r)}catch{try{return r[Uge]=!1,"/./"[t](r)}catch{}}return!1},Gge=Ee,Kge=Ue,Yge=Wge,Xge=Zl,Z3=Bn,Jge=Vge,Zge=Kge("".indexOf);Gge({target:"String",proto:!0,forced:!Jge("includes")},{includes:function(r){return!!~Zge(Z3(Xge(this)),Z3(Yge(r)),arguments.length>1?arguments[1]:void 0)}});var Qge=Gt,eye=Qge("String").includes,Q3=It,tye=Nge,rye=eye,vv=Array.prototype,pv=String.prototype,nye=function(t){var r=t.includes;return t===vv||Q3(vv,t)&&r===vv.includes?tye:typeof t=="string"||t===pv||Q3(pv,t)&&r===pv.includes?rye:r},iye=nye,aye=iye,oye=aye,Ai=pe(oye),sye=Ee,lye=He,uye=Cr,hE=k0,cye=tS,hye=lye(function(){hE(1)});sye({target:"Object",stat:!0,forced:hye,sham:!cye},{getPrototypeOf:function(r){return hE(uye(r))}});var dye=We,fye=dye.Object.getPrototypeOf,vye=fye,dE=vye,pye=dE,e6=pe(pye),mye=Ee,gye=Yi.filter,yye=lu,bye=yye("filter");mye({target:"Array",proto:!0,forced:!bye},{filter:function(r){return gye(this,r,arguments.length>1?arguments[1]:void 0)}});var wye=Gt,$ye=wye("Array").filter,xye=It,kye=$ye,mv=Array.prototype,Sye=function(t){var r=t.filter;return t===mv||xye(mv,t)&&r===mv.filter?kye:r},Eye=Sye,Tye=Eye,_ye=Tye,kr=pe(_ye),lg=` -\v\f\r                 \u2028\u2029\uFEFF`,Oye=Ue,Iye=Zl,Cye=Bn,Jp=lg,t6=Oye("".replace),Pye=RegExp("^["+Jp+"]+"),Aye=RegExp("(^|[^"+Jp+"])["+Jp+"]+$"),gv=function(t){return function(r){var e=Cye(Iye(r));return t&1&&(e=t6(e,Pye,"")),t&2&&(e=t6(e,Aye,"$1")),e}},fE={start:gv(1),end:gv(2),trim:gv(3)},vE=xt,Mye=He,Dye=Ue,Nye=Bn,Rye=fE.trim,r6=lg,Gs=vE.parseInt,n6=vE.Symbol,i6=n6&&n6.iterator,pE=/^[+-]?0x/i,Fye=Dye(pE.exec),zye=Gs(r6+"08")!==8||Gs(r6+"0x16")!==22||i6&&!Mye(function(){Gs(Object(i6))}),Bye=zye?function(r,e){var n=Rye(Nye(r));return Gs(n,e>>>0||(Fye(pE,n)?16:10))}:Gs,Lye=Ee,a6=Bye;Lye({global:!0,forced:parseInt!==a6},{parseInt:a6});var jye=We,Hye=jye.parseInt,Wye=Hye,qye=Wye,Uye=qye,dn=pe(Uye),Vye=Ee,Gye=j1,Kye=q1.indexOf,Yye=bs,Zp=Gye([].indexOf),mE=!!Zp&&1/Zp([1],1,-0)<0,Xye=mE||!Yye("indexOf");Vye({target:"Array",proto:!0,forced:Xye},{indexOf:function(r){var e=arguments.length>1?arguments[1]:void 0;return mE?Zp(this,r,e)||0:Kye(this,r,e)}});var Jye=Gt,Zye=Jye("Array").indexOf,Qye=It,ebe=Zye,yv=Array.prototype,tbe=function(t){var r=t.indexOf;return t===yv||Qye(yv,t)&&r===yv.indexOf?ebe:r},rbe=tbe,nbe=rbe,ibe=nbe,je=pe(ibe),abe=Ee,obe=qt,sbe=ps;abe({target:"Object",stat:!0,sham:!obe},{create:sbe});var lbe=We,ube=lbe.Object,cbe=function(r,e){return ube.create(r,e)},hbe=cbe,gE=hbe,dbe=gE,ya=pe(dbe),Qp=We,fbe=Xl;Qp.JSON||(Qp.JSON={stringify:JSON.stringify});var vbe=function(r,e,n){return fbe(Qp.JSON.stringify,null,arguments)},pbe=vbe,mbe=pbe,gbe=mbe,fu=pe(gbe),ybe=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",bbe=TypeError,wbe=function(t,r){if(te,o=xbe(n)?n:_be(n),s=a?Ebe(arguments,e):[],l=a?function(){$be(o,this,s)}:o;return r?t(l,i):t(l)}:t},Ibe=Ee,wE=xt,Cbe=bE,o6=Cbe(wE.setInterval,!0);Ibe({global:!0,bind:!0,forced:wE.setInterval!==o6},{setInterval:o6});var Pbe=Ee,$E=xt,Abe=bE,s6=Abe($E.setTimeout,!0);Pbe({global:!0,bind:!0,forced:$E.setTimeout!==s6},{setTimeout:s6});var Mbe=We,Dbe=Mbe.setTimeout,Nbe=Dbe,Cn=pe(Nbe),Rbe=Cr,l6=iu,Fbe=an,zbe=function(r){for(var e=Rbe(this),n=Fbe(e),i=arguments.length,a=l6(i>1?arguments[1]:void 0,n),o=i>2?arguments[2]:void 0,s=o===void 0?n:l6(o,n);s>a;)e[a++]=r;return e},Bbe=Ee,Lbe=zbe;Bbe({target:"Array",proto:!0},{fill:Lbe});var jbe=Gt,Hbe=jbe("Array").fill,Wbe=It,qbe=Hbe,bv=Array.prototype,Ube=function(t){var r=t.fill;return t===bv||Wbe(bv,t)&&r===bv.fill?qbe:r},Vbe=Ube,Gbe=Vbe,Kbe=Gbe,vu=pe(Kbe);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sn(t){return Fme(t)||zme(t)||sE(t)||Bme()}var Lme=XS,Xi=pe(Lme),jme=Gt,Hme=jme("Array").concat,Wme=It,qme=Hme,lv=Array.prototype,Ume=function(t){var r=t.concat;return t===lv||Wme(lv,t)&&r===lv.concat?qme:r},Vme=Ume,Gme=Vme,Kme=Gme,sg=pe(Kme),Yme=aE,Xt=pe(Yme),Xme=nn,Jme=Ge,Zme=uu,Qme=ou,e1e=Wr,t1e=Jme([].concat),r1e=Xme("Reflect","ownKeys")||function(r){var e=Zme.f(e1e(r)),n=Qme.f;return n?t1e(e,n(r)):e},n1e=rE,Xe=pe(n1e),i1e=ke,a1e=Yi.map,o1e=lu,s1e=o1e("map");i1e({target:"Array",proto:!0,forced:!s1e},{map:function(r){return a1e(this,r,arguments.length>1?arguments[1]:void 0)}});var l1e=Gt,u1e=l1e("Array").map,c1e=It,h1e=u1e,uv=Array.prototype,d1e=function(t){var r=t.map;return t===uv||c1e(uv,t)&&r===uv.map?h1e:r},f1e=d1e,v1e=f1e,p1e=v1e,Lo=pe(p1e),m1e=ke,g1e=Cr,lE=b0,y1e=We,b1e=y1e(function(){lE(1)});m1e({target:"Object",stat:!0,forced:b1e},{keys:function(r){return lE(g1e(r))}});var w1e=qe,$1e=w1e.Object.keys,x1e=$1e,k1e=x1e,S1e=k1e,yt=pe(S1e),E1e=ke,T1e=Ge,uE=Date,_1e=T1e(uE.prototype.getTime);E1e({target:"Date",stat:!0},{now:function(){return _1e(new uE)}});var O1e=qe,I1e=O1e.Date.now,C1e=I1e,P1e=C1e,A1e=P1e,mh=pe(A1e),M1e=We,bs=function(t,r){var e=[][t];return!!e&&M1e(function(){e.call(null,r||function(){return 1},1)})},D1e=Yi.forEach,N1e=bs,R1e=N1e("forEach"),F1e=R1e?[].forEach:function(r){return D1e(this,r,arguments.length>1?arguments[1]:void 0)},z1e=ke,Y3=F1e;z1e({target:"Array",proto:!0,forced:[].forEach!==Y3},{forEach:Y3});var B1e=Gt,L1e=B1e("Array").forEach,j1e=L1e,H1e=j1e,W1e=ja,q1e=Vt,U1e=It,V1e=H1e,cv=Array.prototype,G1e={DOMTokenList:!0,NodeList:!0},K1e=function(t){var r=t.forEach;return t===cv||U1e(cv,t)&&r===cv.forEach||q1e(G1e,W1e(t))?V1e:r},Y1e=K1e,tt=pe(Y1e),X1e=ke,J1e=Ge,Z1e=Ua,Q1e=J1e([].reverse),X3=[1,2];X1e({target:"Array",proto:!0,forced:String(X3)===String(X3.reverse())},{reverse:function(){return Z1e(this)&&(this.length=this.length),Q1e(this)}});var ege=Gt,tge=ege("Array").reverse,rge=It,nge=tge,hv=Array.prototype,ige=function(t){var r=t.reverse;return t===hv||rge(hv,t)&&r===hv.reverse?nge:r},age=ige,oge=age,sge=oge,ga=pe(sge),J3=ds,lge=TypeError,cE=function(t,r){if(!delete t[r])throw new lge("Cannot delete property "+J3(r)+" of "+J3(t))},uge=ke,cge=Cr,hge=iu,dge=y0,fge=an,vge=iE,pge=Q1,mge=eg,gge=ys,dv=cE,yge=lu,bge=yge("splice"),wge=Math.max,$ge=Math.min;uge({target:"Array",proto:!0,forced:!bge},{splice:function(r,e){var n=cge(this),i=fge(n),a=hge(r,i),o=arguments.length,s,l,u,c,h,d;for(o===0?s=l=0:o===1?(s=0,l=i-a):(s=o-2,l=$ge(wge(dge(e),0),i-a)),pge(i+s-l),u=mge(n,l),c=0;ci-l+s;c--)dv(n,c-1)}else if(s>l)for(c=i-l;c>a;c--)h=c+l-1,d=c+s-1,h in n?n[d]=n[h]:dv(n,d);for(c=0;c1?arguments[1]:void 0)}});var Dge=Gt,Nge=Dge("Array").includes,Rge=Ut,Fge=fi,zge=kt,Bge=zge("match"),Lge=function(t){var r;return Rge(t)&&((r=t[Bge])!==void 0?!!r:Fge(t)==="RegExp")},jge=Lge,Hge=TypeError,Wge=function(t){if(jge(t))throw new Hge("The method doesn't accept regular expressions");return t},qge=kt,Uge=qge("match"),Vge=function(t){var r=/./;try{"/./"[t](r)}catch{try{return r[Uge]=!1,"/./"[t](r)}catch{}}return!1},Gge=ke,Kge=Ge,Yge=Wge,Xge=Zl,Z3=Bn,Jge=Vge,Zge=Kge("".indexOf);Gge({target:"String",proto:!0,forced:!Jge("includes")},{includes:function(r){return!!~Zge(Z3(Xge(this)),Z3(Yge(r)),arguments.length>1?arguments[1]:void 0)}});var Qge=Gt,eye=Qge("String").includes,Q3=It,tye=Nge,rye=eye,vv=Array.prototype,pv=String.prototype,nye=function(t){var r=t.includes;return t===vv||Q3(vv,t)&&r===vv.includes?tye:typeof t=="string"||t===pv||Q3(pv,t)&&r===pv.includes?rye:r},iye=nye,aye=iye,oye=aye,Ai=pe(oye),sye=ke,lye=We,uye=Cr,hE=k0,cye=tS,hye=lye(function(){hE(1)});sye({target:"Object",stat:!0,forced:hye,sham:!cye},{getPrototypeOf:function(r){return hE(uye(r))}});var dye=qe,fye=dye.Object.getPrototypeOf,vye=fye,dE=vye,pye=dE,e6=pe(pye),mye=ke,gye=Yi.filter,yye=lu,bye=yye("filter");mye({target:"Array",proto:!0,forced:!bye},{filter:function(r){return gye(this,r,arguments.length>1?arguments[1]:void 0)}});var wye=Gt,$ye=wye("Array").filter,xye=It,kye=$ye,mv=Array.prototype,Sye=function(t){var r=t.filter;return t===mv||xye(mv,t)&&r===mv.filter?kye:r},Eye=Sye,Tye=Eye,_ye=Tye,kr=pe(_ye),lg=` +\v\f\r                 \u2028\u2029\uFEFF`,Oye=Ge,Iye=Zl,Cye=Bn,Jp=lg,t6=Oye("".replace),Pye=RegExp("^["+Jp+"]+"),Aye=RegExp("(^|[^"+Jp+"])["+Jp+"]+$"),gv=function(t){return function(r){var e=Cye(Iye(r));return t&1&&(e=t6(e,Pye,"")),t&2&&(e=t6(e,Aye,"$1")),e}},fE={start:gv(1),end:gv(2),trim:gv(3)},vE=xt,Mye=We,Dye=Ge,Nye=Bn,Rye=fE.trim,r6=lg,Gs=vE.parseInt,n6=vE.Symbol,i6=n6&&n6.iterator,pE=/^[+-]?0x/i,Fye=Dye(pE.exec),zye=Gs(r6+"08")!==8||Gs(r6+"0x16")!==22||i6&&!Mye(function(){Gs(Object(i6))}),Bye=zye?function(r,e){var n=Rye(Nye(r));return Gs(n,e>>>0||(Fye(pE,n)?16:10))}:Gs,Lye=ke,a6=Bye;Lye({global:!0,forced:parseInt!==a6},{parseInt:a6});var jye=qe,Hye=jye.parseInt,Wye=Hye,qye=Wye,Uye=qye,dn=pe(Uye),Vye=ke,Gye=j1,Kye=q1.indexOf,Yye=bs,Zp=Gye([].indexOf),mE=!!Zp&&1/Zp([1],1,-0)<0,Xye=mE||!Yye("indexOf");Vye({target:"Array",proto:!0,forced:Xye},{indexOf:function(r){var e=arguments.length>1?arguments[1]:void 0;return mE?Zp(this,r,e)||0:Kye(this,r,e)}});var Jye=Gt,Zye=Jye("Array").indexOf,Qye=It,ebe=Zye,yv=Array.prototype,tbe=function(t){var r=t.indexOf;return t===yv||Qye(yv,t)&&r===yv.indexOf?ebe:r},rbe=tbe,nbe=rbe,ibe=nbe,He=pe(ibe),abe=ke,obe=qt,sbe=ps;abe({target:"Object",stat:!0,sham:!obe},{create:sbe});var lbe=qe,ube=lbe.Object,cbe=function(r,e){return ube.create(r,e)},hbe=cbe,gE=hbe,dbe=gE,ya=pe(dbe),Qp=qe,fbe=Xl;Qp.JSON||(Qp.JSON={stringify:JSON.stringify});var vbe=function(r,e,n){return fbe(Qp.JSON.stringify,null,arguments)},pbe=vbe,mbe=pbe,gbe=mbe,fu=pe(gbe),ybe=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",bbe=TypeError,wbe=function(t,r){if(te,o=xbe(n)?n:_be(n),s=a?Ebe(arguments,e):[],l=a?function(){$be(o,this,s)}:o;return r?t(l,i):t(l)}:t},Ibe=ke,wE=xt,Cbe=bE,o6=Cbe(wE.setInterval,!0);Ibe({global:!0,bind:!0,forced:wE.setInterval!==o6},{setInterval:o6});var Pbe=ke,$E=xt,Abe=bE,s6=Abe($E.setTimeout,!0);Pbe({global:!0,bind:!0,forced:$E.setTimeout!==s6},{setTimeout:s6});var Mbe=qe,Dbe=Mbe.setTimeout,Nbe=Dbe,Cn=pe(Nbe),Rbe=Cr,l6=iu,Fbe=an,zbe=function(r){for(var e=Rbe(this),n=Fbe(e),i=arguments.length,a=l6(i>1?arguments[1]:void 0,n),o=i>2?arguments[2]:void 0,s=o===void 0?n:l6(o,n);s>a;)e[a++]=r;return e},Bbe=ke,Lbe=zbe;Bbe({target:"Array",proto:!0},{fill:Lbe});var jbe=Gt,Hbe=jbe("Array").fill,Wbe=It,qbe=Hbe,bv=Array.prototype,Ube=function(t){var r=t.fill;return t===bv||Wbe(bv,t)&&r===bv.fill?qbe:r},Vbe=Ube,Gbe=Vbe,Kbe=Gbe,vu=pe(Kbe);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 * http://naver.github.io/egjs * * Forked By Naver egjs @@ -423,9 +423,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * Licensed under the MIT license */function gn(){return gn=Object.assign||function(t){for(var r=1;r"u"?{style:{}}:document.createElement("div"),Xbe="function",$o=Math.round,Oa=Math.abs,ug=Date.now;function D0(t,r){for(var e,n,i=r[0].toUpperCase()+r.slice(1),a=0;a"u"?Qn={}:Qn=window;var xE=D0(Ybe.style,"touchAction"),kE=xE!==void 0;function Jbe(){if(!kE)return!1;var t={},r=Qn.CSS&&Qn.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return t[e]=r?Qn.CSS.supports("touch-action",e):!0}),t}var SE="compute",EE="auto",tm="manipulation",ba="none",gl="pan-x",yl="pan-y",hc=Jbe(),Zbe=/mobile|tablet|ip(ad|hone|od)|android/i,TE="ontouchstart"in Qn,Qbe=D0(Qn,"PointerEvent")!==void 0,e4e=TE&&Zbe.test(navigator.userAgent),pu="touch",t4e="pen",cg="mouse",r4e="kinect",n4e=25,cr=1,Va=2,Mt=4,Er=8,gh=1,mu=2,gu=4,yu=8,jo=16,Pn=mu|gu,wa=yu|jo,_E=Pn|wa,OE=["x","y"],yh=["clientX","clientY"];function ei(t,r,e){var n;if(t)if(t.forEach)t.forEach(r,e);else if(t.length!==void 0)for(n=0;n-1}function i4e(t){if(la(t,ba))return ba;var r=la(t,gl),e=la(t,yl);return r&&e?ba:r||e?r?gl:yl:la(t,tm)?tm:EE}var IE=function(){function t(e,n){this.manager=e,this.set(n)}var r=t.prototype;return r.set=function(n){n===SE&&(n=this.compute()),kE&&this.manager.element.style&&hc[n]&&(this.manager.element.style[xE]=n),this.actions=n.toLowerCase().trim()},r.update=function(){this.set(this.manager.options.touchAction)},r.compute=function(){var n=[];return ei(this.manager.recognizers,function(i){N0(i.options.enable,[i])&&(n=n.concat(i.getTouchAction()))}),i4e(n.join(" "))},r.preventDefaults=function(n){var i=n.srcEvent,a=n.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var o=this.actions,s=la(o,ba)&&!hc[ba],l=la(o,yl)&&!hc[yl],u=la(o,gl)&&!hc[gl];if(s){var c=n.pointers.length===1,h=n.distance<2,d=n.deltaTime<250;if(c&&h&&d)return}if(!(u&&l)&&(s||l&&a&Pn||u&&a&wa))return this.preventSrc(i)},r.preventSrc=function(n){this.manager.session.prevented=!0,n.preventDefault()},t}();function hg(t,r){for(;t;){if(t===r)return!0;t=t.parentNode}return!1}function CE(t){var r=t.length;if(r===1)return{x:$o(t[0].clientX),y:$o(t[0].clientY)};for(var e=0,n=0,i=0;i=Oa(r)?t<0?mu:gu:r<0?yu:jo}function a4e(t,r){var e=r.center,n=t.offsetDelta||{},i=t.prevDelta||{},a=t.prevInput||{};(r.eventType===cr||a.eventType===Mt)&&(i=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=t.offsetDelta={x:e.x,y:e.y}),r.deltaX=i.x+(e.x-n.x),r.deltaY=i.y+(e.y-n.y)}function AE(t,r,e){return{x:r/t||0,y:e/t||0}}function o4e(t,r){return bh(r[0],r[1],yh)/bh(t[0],t[1],yh)}function s4e(t,r){return rm(r[1],r[0],yh)+rm(t[1],t[0],yh)}function l4e(t,r){var e=t.lastInterval||r,n=r.timeStamp-e.timeStamp,i,a,o,s;if(r.eventType!==Er&&(n>n4e||e.velocity===void 0)){var l=r.deltaX-e.deltaX,u=r.deltaY-e.deltaY,c=AE(n,l,u);a=c.x,o=c.y,i=Oa(c.x)>Oa(c.y)?c.x:c.y,s=PE(l,u),t.lastInterval=r}else i=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;r.velocity=i,r.velocityX=a,r.velocityY=o,r.direction=s}function u4e(t,r){var e=t.session,n=r.pointers,i=n.length;e.firstInput||(e.firstInput=c6(r)),i>1&&!e.firstMultiple?e.firstMultiple=c6(r):i===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,l=r.center=CE(n);r.timeStamp=ug(),r.deltaTime=r.timeStamp-a.timeStamp,r.angle=rm(s,l),r.distance=bh(s,l),a4e(e,r),r.offsetDirection=PE(r.deltaX,r.deltaY);var u=AE(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=u.x,r.overallVelocityY=u.y,r.overallVelocity=Oa(u.x)>Oa(u.y)?u.x:u.y,r.scale=o?o4e(o.pointers,n):1,r.rotation=o?s4e(o.pointers,n):0,r.maxPointers=e.prevInput?r.pointers.length>e.prevInput.maxPointers?r.pointers.length:e.prevInput.maxPointers:r.pointers.length,l4e(e,r);var c=t.element,h=r.srcEvent,d;h.composedPath?d=h.composedPath()[0]:h.path?d=h.path[0]:d=h.target,hg(d,c)&&(c=d),r.target=c}function c4e(t,r,e){var n=e.pointers.length,i=e.changedPointers.length,a=r&cr&&n-i===0,o=r&(Mt|Er)&&n-i===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=r,u4e(t,e),t.emit("hammer.input",e),t.recognize(e),t.session.prevInput=e}function bl(t){return t.trim().split(/\s+/g)}function Ks(t,r,e){ei(bl(r),function(n){t.addEventListener(n,e,!1)})}function Ys(t,r,e){ei(bl(r),function(n){t.removeEventListener(n,e,!1)})}function h6(t){var r=t.ownerDocument||t;return r.defaultView||r.parentWindow||window}var ws=function(){function t(e,n){var i=this;this.manager=e,this.callback=n,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){N0(e.options.enable,[e])&&i.handler(a)},this.init()}var r=t.prototype;return r.handler=function(){},r.init=function(){this.evEl&&Ks(this.element,this.evEl,this.domHandler),this.evTarget&&Ks(this.target,this.evTarget,this.domHandler),this.evWin&&Ks(h6(this.element),this.evWin,this.domHandler)},r.destroy=function(){this.evEl&&Ys(this.element,this.evEl,this.domHandler),this.evTarget&&Ys(this.target,this.evTarget,this.domHandler),this.evWin&&Ys(h6(this.element),this.evWin,this.domHandler)},t}();function Ia(t,r,e){if(t.indexOf&&!e)return t.indexOf(r);for(var n=0;nl[r]}):n=n.sort()),n}var f4e={touchstart:cr,touchmove:Va,touchend:Mt,touchcancel:Er},v4e="touchstart touchmove touchend touchcancel",fg=function(t){on(r,t);function r(){var n;return r.prototype.evTarget=v4e,n=t.apply(this,arguments)||this,n.targetIds={},n}var e=r.prototype;return e.handler=function(i){var a=f4e[i.type],o=p4e.call(this,i,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:pu,srcEvent:i})},r}(ws);function p4e(t,r){var e=wl(t.touches),n=this.targetIds;if(r&(cr|Va)&&e.length===1)return n[e[0].identifier]=!0,[e,e];var i,a,o=wl(t.changedTouches),s=[],l=this.target;if(a=e.filter(function(u){return hg(u.target,l)}),r===cr)for(i=0;i-1&&i.splice(s,1)};setTimeout(a,b4e)}}function w4e(t,r){t&cr?(this.primaryTouch=r.changedPointers[0].identifier,f6.call(this,r)):t&(Mt|Er)&&f6.call(this,r)}function $4e(t){for(var r=t.srcEvent.clientX,e=t.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(i,1),this},r.hasRequireFailures=function(){return this.requireFail.length>0},r.canRecognizeWith=function(n){return!!this.simultaneous[n.id]},r.emit=function(n){var i=this,a=this.state;function o(s){i.manager.emit(s,n)}a=Mi&&o(i.options.event+v6(a))},r.tryEmit=function(n){if(this.canEmit())return this.emit(n);this.state=_n},r.canEmit=function(){for(var n=0;na.threshold&&l&a.direction},e.attrTest=function(i){return Wo.prototype.attrTest.call(this,i)&&(this.state&Zr||!(this.state&Zr)&&this.directionTest(i))},e.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var a=FE(i.direction);a&&(i.additionalEvent=this.options.event+a),t.prototype.emit.call(this,i)},r}(Wo),zE=function(t){on(r,t);function r(n){return n===void 0&&(n={}),t.call(this,gn({event:"swipe",threshold:10,velocity:.3,direction:Pn|wa,pointers:1},n))||this}var e=r.prototype;return e.getTouchAction=function(){return pg.prototype.getTouchAction.call(this)},e.attrTest=function(i){var a=this.options.direction,o;return a&(Pn|wa)?o=i.overallVelocity:a&Pn?o=i.overallVelocityX:a&wa&&(o=i.overallVelocityY),t.prototype.attrTest.call(this,i)&&a&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&Oa(o)>this.options.velocity&&i.eventType&Mt},e.emit=function(i){var a=FE(i.offsetDirection);a&&this.manager.emit(this.options.event+a,i),this.manager.emit(this.options.event,i)},r}(Wo),BE=function(t){on(r,t);function r(n){return n===void 0&&(n={}),t.call(this,gn({event:"pinch",threshold:0,pointers:2},n))||this}var e=r.prototype;return e.getTouchAction=function(){return[ba]},e.attrTest=function(i){return t.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&Zr)},e.emit=function(i){if(i.scale!==1){var a=i.scale<1?"in":"out";i.additionalEvent=this.options.event+a}t.prototype.emit.call(this,i)},r}(Wo),LE=function(t){on(r,t);function r(n){return n===void 0&&(n={}),t.call(this,gn({event:"rotate",threshold:0,pointers:2},n))||this}var e=r.prototype;return e.getTouchAction=function(){return[ba]},e.attrTest=function(i){return t.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&Zr)},r}(Wo),jE=function(t){on(r,t);function r(n){var i;return n===void 0&&(n={}),i=t.call(this,gn({event:"press",pointers:1,time:251,threshold:9},n))||this,i._timer=null,i._input=null,i}var e=r.prototype;return e.getTouchAction=function(){return[EE]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,l=i.distanceo.time;if(this._input=i,!l||!s||i.eventType&(Mt|Er)&&!u)this.reset();else if(i.eventType&cr)this.reset(),this._timer=setTimeout(function(){a.state=ti,a.tryEmit()},o.time);else if(i.eventType&Mt)return ti;return _n},e.reset=function(){clearTimeout(this._timer)},e.emit=function(i){this.state===ti&&(i&&i.eventType&Mt?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=ug(),this.manager.emit(this.options.event,this._input)))},r}(bu),HE={domEvents:!1,touchAction:SE,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},p6=[[LE,{enable:!1}],[BE,{enable:!1},["rotate"]],[zE,{direction:Pn}],[pg,{direction:Pn},["swipe"]],[nm],[nm,{event:"doubletap",taps:2},["tap"]],[jE]],E4e=1,m6=2;function g6(t,r){var e=t.element;if(e.style){var n;ei(t.options.cssProps,function(i,a){n=D0(e.style,a),r?(t.oldCssProps[n]=e.style[n],e.style[n]=i):e.style[n]=t.oldCssProps[n]||""}),r||(t.oldCssProps={})}}function T4e(t,r){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=r,r.target.dispatchEvent(e)}var y6=function(){function t(e,n){var i=this;this.options=_a({},HE,n||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=x4e(this),this.touchAction=new IE(this,this.options.touchAction),g6(this,!0),ei(this.options.recognizers,function(a){var o=i.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var r=t.prototype;return r.set=function(n){return _a(this.options,n),n.touchAction&&this.touchAction.update(),n.inputTarget&&(this.input.destroy(),this.input.target=n.inputTarget,this.input.init()),this},r.stop=function(n){this.session.stopped=n?m6:E4e},r.recognize=function(n){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(n);var a,o=this.recognizers,s=i.curRecognizer;(!s||s&&s.state&ti)&&(i.curRecognizer=null,s=null);for(var l=0;l\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,n,a),t.apply(this,arguments)}}var qE=WE(function(t,r,e){for(var n=Object.keys(r),i=0;i=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function N4e(t,r){var e;if(t){if(typeof t=="string")return w6(t,r);var n=Xt(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Wa(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w6(t,r)}}function w6(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e>>0,i-=t,i*=t,t=i>>>0,i-=t,t+=i*4294967296}return(t>>>0)*23283064365386963e-26}}function B4e(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var mg=typeof window<"u"?window.Hammer||D4e:function(){return B4e()};function On(t){var r=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){r._dom.overlay.parentNode.removeChild(r._dom.overlay)});var n=mg(this._dom.overlay);n.on("tap",X(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){n.destroy()});var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];tt(i).call(i,function(a){n.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){L4e(a.target,t)||r.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",r._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&r.deactivate()}}Kk(On.prototype);On.current=null;On.prototype.destroy=function(){var t,r;this.deactivate();var e=VE(ga(t=Zn(r=this._cleanupQueue).call(r,0)).call(t)),n;try{for(e.s();!(n=e.n()).done;){var i=n.value;i()}}catch(a){e.e(a)}finally{e.f()}};On.prototype.activate=function(){On.current&&On.current.deactivate(),On.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};On.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};On.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};function L4e(t,r){for(;t;){if(t===r)return!0;t=t.parentNode}return!1}var j4e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,H4e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,W4e=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,q4e=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function $i(t){if(t)for(;t.hasChildNodes()===!0;){var r=t.firstChild;r&&($i(r),t.removeChild(r))}}function To(t){return t instanceof String||typeof t=="string"}function $6(t){return Ze(t)==="object"&&t!==null}function Ca(t,r,e,n){var i=!1;n===!0&&(i=r[e]===null&&t[e]!==void 0),i?delete t[e]:t[e]=r[e]}function GE(t,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var n in t)if(r[n]!==void 0)if(r[n]===null||Ze(r[n])!=="object")Ca(t,r,n,e);else{var i=t[n],a=r[n];$6(i)&&$6(a)&&GE(i,a,e)}}function $s(t,r,e){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Xe(e))throw new TypeError("Arrays are not supported by deepExtend");for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!1;if(Xe(e))throw new TypeError("Arrays are not supported by deepExtend");for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&!Ai(t).call(t,i))if(e[i]&&e[i].constructor===Object)r[i]===void 0&&(r[i]={}),r[i].constructor===Object?st(r[i],e[i]):Ca(r,e,i,n);else if(Xe(e[i])){r[i]=[];for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)||e===!0)if(Ze(r[i])==="object"&&r[i]!==null&&e6(r[i])===Object.prototype)t[i]===void 0?t[i]=st({},r[i],e):Ze(t[i])==="object"&&t[i]!==null&&e6(t[i])===Object.prototype?st(t[i],r[i],e):Ca(t,r,i,n);else if(Xe(r[i])){var a;t[i]=Xt(a=r[i]).call(a)}else Ca(t,r,i,n);return t}function $h(t,r){var e;return sg(e=[]).call(e,Sn(t),[r])}function U4e(t){return Xt(t).call(t)}function V4e(t){return t.getBoundingClientRect().left}function G4e(t){return t.getBoundingClientRect().top}function Ne(t,r){if(Xe(t))for(var e=t.length,n=0;n3&&arguments[3]!==void 0?arguments[3]:{},i=function(v){return v!=null},a=function(v){return v!==null&&Ze(v)==="object"},o=function(v){for(var g in v)if(Object.prototype.hasOwnProperty.call(v,g))return!1;return!0};if(!a(t))throw new Error("Parameter mergeTarget must be an object");if(!a(r))throw new Error("Parameter options must be an object");if(!i(e))throw new Error("Parameter option must have a value");if(!a(n))throw new Error("Parameter globalOptions must be an object");var s=function(v,g,b){a(v[b])||(v[b]={});var y=g[b],$=v[b];for(var k in y)Object.prototype.hasOwnProperty.call(y,k)&&($[k]=y[k])},l=r[e],u=a(n)&&!o(n),c=u?n[e]:void 0,h=c?c.enabled:void 0;if(l!==void 0){if(typeof l=="boolean"){a(t[e])||(t[e]={}),t[e].enabled=l;return}if(l===null&&!a(t[e]))if(i(c))t[e]=ya(c);else return;if(a(l)){var d=!0;l.enabled!==void 0?d=l.enabled:h!==void 0&&(d=c.enabled),s(t,r,e),t[e].enabled=d}}}var X4e={linear:function(r){return r},easeInQuad:function(r){return r*r},easeOutQuad:function(r){return r*(2-r)},easeInOutQuad:function(r){return r<.5?2*r*r:-1+(4-2*r)*r},easeInCubic:function(r){return r*r*r},easeOutCubic:function(r){return--r*r*r+1},easeInOutCubic:function(r){return r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1},easeInQuart:function(r){return r*r*r*r},easeOutQuart:function(r){return 1- --r*r*r*r},easeInOutQuart:function(r){return r<.5?8*r*r*r*r:1-8*--r*r*r*r},easeInQuint:function(r){return r*r*r*r*r},easeOutQuint:function(r){return 1+--r*r*r*r*r},easeInOutQuint:function(r){return r<.5?16*r*r*r*r*r:1+16*--r*r*r*r*r}};function xi(t,r){var e;Xe(r)||(r=[r]);var n=VE(t),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a){e=a[r[0]];for(var o=1;o0&&arguments[0]!==void 0?arguments[0]:1;te(this,t),this.pixelRatio=r,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return re(t,[{key:"insertTo",value:function(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}},{key:"setCloseCallback",value:function(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}},{key:"_isColorString",value:function(e){if(typeof e=="string")return J4e[e]}},{key:"setColor",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var i,a=this._isColorString(e);if(a!==void 0&&(e=a),To(e)===!0){if(XE(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");i={r:o[0],g:o[1],b:o[2],a:1}}else if(Y4e(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");i={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(YE(e)===!0){var l=gg(e);i={r:l.r,g:l.g,b:l.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var u=e.a!==void 0?e.a:"1.0";i={r:e.r,g:e.g,b:e.b,a:u}}if(i===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+fu(e));this._setColor(i,n)}}},{key:"show",value:function(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;n===!0&&(this.previousColor=At({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",Cn(function(){e.closeCallback!==void 0&&(e.closeCallback(),e.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n===!0&&(this.initialColor=At({},e)),this.color=e;var i=Fs(e.r,e.g,e.b),a=2*Math.PI,o=this.r*i.s,s=this.centerCoordinates.x+o*Math.sin(a*i.h),l=this.centerCoordinates.y+o*Math.cos(a*i.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=l-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var n=Fs(this.color.r,this.color.g,this.color.b);n.v=e/100;var i=Rc(n.h,n.s,n.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,n=Fs(e.r,e.g,e.b),i=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,a,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-n.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),vu(i).call(i),this.brightnessRange.value=100*n.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var e,n,i,a;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var s=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var l=this;this.opacityRange.onchange=function(){l._setOpacity(this.value)},this.opacityRange.oninput=function(){l._setOpacity(this.value)},this.brightnessRange.onchange=function(){l._setBrightness(this.value)},this.brightnessRange.oninput=function(){l._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=X(e=this._hide).call(e,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=X(n=this._apply).call(n,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=X(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=X(a=this._loadLast).call(a,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var e=this;this.drag={},this.pinch={},this.hammer=new mg(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(n){n.isFirst&&e._moveSelector(n)}),this.hammer.on("tap",function(n){e._moveSelector(n)}),this.hammer.on("panstart",function(n){e._moveSelector(n)}),this.hammer.on("panmove",function(n){e._moveSelector(n)}),this.hammer.on("panend",function(n){e._moveSelector(n)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var n=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,n,i);var a,o,s,l;this.centerCoordinates={x:n*.5,y:i*.5},this.r=.49*n;var u=2*Math.PI/360,c=1/360,h=1/this.r,d;for(s=0;s<360;s++)for(l=0;l3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return!1};te(this,t),this.parent=r,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=a,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},At(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Z4e(i),this.wrapper=void 0}return re(t,[{key:"setOptions",value:function(e){if(e!==void 0){this.popupHistory={},this._removePopup();var n=!0;if(typeof e=="string")this.options.filter=e;else if(Xe(e))this.options.filter=e.join();else if(Ze(e)==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),kr(e)!==void 0&&(this.options.filter=kr(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(n=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,n=e):typeof e=="function"&&(this.options.filter=e,n=!0);kr(this.options)===!1&&(n=!1),this.options.enabled=n}this._clean()}},{key:"setModuleOptions",value:function(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var e=kr(this.options),n=0,i=!1;for(var a in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,a)&&(this.allowCreation=!1,i=!1,typeof e=="function"?(i=e(a,[]),i=i||this._handleObject(this.configureOptions[a],[a],!0)):(e===!0||je(e).call(e,a)!==-1)&&(i=!0),i!==!1&&(this.allowCreation=!0,n>0&&this._makeItem([]),this._makeHeader(a),this._handleObject(this.configureOptions[a],[a])),n++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var e=0;e1?i-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:!1,a=document.createElement("div");if(a.className="vis-configuration vis-config-label vis-config-s"+n.length,i===!0){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(om("i","b",e))}else a.innerText=e+":";return a}},{key:"_makeDropdown",value:function(e,n,i){var a=document.createElement("select");a.className="vis-configuration vis-config-select";var o=0;n!==void 0&&je(e).call(e,n)!==-1&&(o=je(e).call(e,n));for(var s=0;ss&&s!==1&&(u.max=Math.ceil(n*d),h=u.max,c="range increased"),u.value=n}else u.value=a;var f=document.createElement("input");f.className="vis-configuration vis-config-rangeinput",f.value=u.value;var v=this;u.onchange=function(){f.value=this.value,v._update(Number(this.value),i)},u.oninput=function(){f.value=this.value};var g=this._makeLabel(i[i.length-1],i),b=this._makeItem(i,g,u,f);c!==""&&this.popupHistory[b]!==h&&(this.popupHistory[b]=h,this._setupPopup(c,b))}},{key:"_makeButton",value:function(){var e=this;if(this.options.showButton===!0){var n=document.createElement("div");n.className="vis-configuration vis-config-button",n.innerText="generate options",n.onclick=function(){e._printOptions()},n.onmouseover=function(){n.className="vis-configuration vis-config-button hover"},n.onmouseout=function(){n.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(n)}}},{key:"_setupPopup",value:function(e,n){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,o=kr(this.options),s=!1;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){a=!0;var u=e[l],c=$h(n,l);if(typeof o=="function"&&(a=o(l,n),a===!1&&!Xe(u)&&typeof u!="string"&&typeof u!="boolean"&&u instanceof Object&&(this.allowCreation=!1,a=this._handleObject(u,c,!0),this.allowCreation=i===!1)),a!==!1){s=!0;var h=this._getValue(c);if(Xe(u))this._handleArray(u,h,c);else if(typeof u=="string")this._makeTextInput(u,h,c);else if(typeof u=="boolean")this._makeCheckbox(u,h,c);else if(u instanceof Object){if(!this.hideOption(n,l,this.moduleOptions))if(u.enabled!==void 0){var d=$h(c,"enabled"),f=this._getValue(d);if(f===!0){var v=this._makeLabel(l,c,!0);this._makeItem(c,v),s=this._handleObject(u,c)||s}else this._makeCheckbox(u,f,c)}else{var g=this._makeLabel(l,c,!0);this._makeItem(c,g),s=this._handleObject(u,c)||s}}else console.error("dont know how to handle",u,l,c)}}return s}},{key:"_handleArray",value:function(e,n,i){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,n,i),e[1]!==n&&this.changedOptions.push({path:i,value:n})):typeof e[0]=="string"?(this._makeDropdown(e,n,i),e[0]!==n&&this.changedOptions.push({path:i,value:n})):typeof e[0]=="number"&&(this._makeRange(e,n,i),e[0]!==n&&this.changedOptions.push({path:i,value:Number(n)}))}},{key:"_update",value:function(e,n){var i=this._constructOptions(e,n);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var o=0;oo-this.padding&&(u=!0),u?s=this.x-i:s=this.x,c?l=this.y-n:l=this.y}else l=this.y-n,l+n+this.padding>a&&(l=a-n-this.padding),lo&&(s=o-i-this.padding),st.length)&&(r=t.length);for(var e=0,n=new Array(r);e>>0,i-=t,i*=t,t=i>>>0,i-=t,t+=i*4294967296}return(t>>>0)*23283064365386963e-26}}function B4e(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var mg=typeof window<"u"?window.Hammer||D4e:function(){return B4e()};function On(t){var r=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){r._dom.overlay.parentNode.removeChild(r._dom.overlay)});var n=mg(this._dom.overlay);n.on("tap",X(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){n.destroy()});var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];tt(i).call(i,function(a){n.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){L4e(a.target,t)||r.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",r._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&r.deactivate()}}Kk(On.prototype);On.current=null;On.prototype.destroy=function(){var t,r;this.deactivate();var e=VE(ga(t=Zn(r=this._cleanupQueue).call(r,0)).call(t)),n;try{for(e.s();!(n=e.n()).done;){var i=n.value;i()}}catch(a){e.e(a)}finally{e.f()}};On.prototype.activate=function(){On.current&&On.current.deactivate(),On.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};On.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};On.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};function L4e(t,r){for(;t;){if(t===r)return!0;t=t.parentNode}return!1}var j4e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,H4e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,W4e=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,q4e=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function $i(t){if(t)for(;t.hasChildNodes()===!0;){var r=t.firstChild;r&&($i(r),t.removeChild(r))}}function To(t){return t instanceof String||typeof t=="string"}function $6(t){return Ze(t)==="object"&&t!==null}function Ca(t,r,e,n){var i=!1;n===!0&&(i=r[e]===null&&t[e]!==void 0),i?delete t[e]:t[e]=r[e]}function GE(t,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var n in t)if(r[n]!==void 0)if(r[n]===null||Ze(r[n])!=="object")Ca(t,r,n,e);else{var i=t[n],a=r[n];$6(i)&&$6(a)&&GE(i,a,e)}}function $s(t,r,e){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Xe(e))throw new TypeError("Arrays are not supported by deepExtend");for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!1;if(Xe(e))throw new TypeError("Arrays are not supported by deepExtend");for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&!Ai(t).call(t,i))if(e[i]&&e[i].constructor===Object)r[i]===void 0&&(r[i]={}),r[i].constructor===Object?st(r[i],e[i]):Ca(r,e,i,n);else if(Xe(e[i])){r[i]=[];for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)||e===!0)if(Ze(r[i])==="object"&&r[i]!==null&&e6(r[i])===Object.prototype)t[i]===void 0?t[i]=st({},r[i],e):Ze(t[i])==="object"&&t[i]!==null&&e6(t[i])===Object.prototype?st(t[i],r[i],e):Ca(t,r,i,n);else if(Xe(r[i])){var a;t[i]=Xt(a=r[i]).call(a)}else Ca(t,r,i,n);return t}function $h(t,r){var e;return sg(e=[]).call(e,Sn(t),[r])}function U4e(t){return Xt(t).call(t)}function V4e(t){return t.getBoundingClientRect().left}function G4e(t){return t.getBoundingClientRect().top}function Me(t,r){if(Xe(t))for(var e=t.length,n=0;n3&&arguments[3]!==void 0?arguments[3]:{},i=function(v){return v!=null},a=function(v){return v!==null&&Ze(v)==="object"},o=function(v){for(var m in v)if(Object.prototype.hasOwnProperty.call(v,m))return!1;return!0};if(!a(t))throw new Error("Parameter mergeTarget must be an object");if(!a(r))throw new Error("Parameter options must be an object");if(!i(e))throw new Error("Parameter option must have a value");if(!a(n))throw new Error("Parameter globalOptions must be an object");var s=function(v,m,b){a(v[b])||(v[b]={});var y=m[b],$=v[b];for(var k in y)Object.prototype.hasOwnProperty.call(y,k)&&($[k]=y[k])},l=r[e],u=a(n)&&!o(n),c=u?n[e]:void 0,h=c?c.enabled:void 0;if(l!==void 0){if(typeof l=="boolean"){a(t[e])||(t[e]={}),t[e].enabled=l;return}if(l===null&&!a(t[e]))if(i(c))t[e]=ya(c);else return;if(a(l)){var d=!0;l.enabled!==void 0?d=l.enabled:h!==void 0&&(d=c.enabled),s(t,r,e),t[e].enabled=d}}}var X4e={linear:function(r){return r},easeInQuad:function(r){return r*r},easeOutQuad:function(r){return r*(2-r)},easeInOutQuad:function(r){return r<.5?2*r*r:-1+(4-2*r)*r},easeInCubic:function(r){return r*r*r},easeOutCubic:function(r){return--r*r*r+1},easeInOutCubic:function(r){return r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1},easeInQuart:function(r){return r*r*r*r},easeOutQuart:function(r){return 1- --r*r*r*r},easeInOutQuart:function(r){return r<.5?8*r*r*r*r:1-8*--r*r*r*r},easeInQuint:function(r){return r*r*r*r*r},easeOutQuint:function(r){return 1+--r*r*r*r*r},easeInOutQuint:function(r){return r<.5?16*r*r*r*r*r:1+16*--r*r*r*r*r}};function xi(t,r){var e;Xe(r)||(r=[r]);var n=VE(t),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a){e=a[r[0]];for(var o=1;o0&&arguments[0]!==void 0?arguments[0]:1;te(this,t),this.pixelRatio=r,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return re(t,[{key:"insertTo",value:function(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}},{key:"setCloseCallback",value:function(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}},{key:"_isColorString",value:function(e){if(typeof e=="string")return J4e[e]}},{key:"setColor",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var i,a=this._isColorString(e);if(a!==void 0&&(e=a),To(e)===!0){if(XE(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");i={r:o[0],g:o[1],b:o[2],a:1}}else if(Y4e(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");i={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(YE(e)===!0){var l=gg(e);i={r:l.r,g:l.g,b:l.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var u=e.a!==void 0?e.a:"1.0";i={r:e.r,g:e.g,b:e.b,a:u}}if(i===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+fu(e));this._setColor(i,n)}}},{key:"show",value:function(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;n===!0&&(this.previousColor=At({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",Cn(function(){e.closeCallback!==void 0&&(e.closeCallback(),e.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n===!0&&(this.initialColor=At({},e)),this.color=e;var i=Fs(e.r,e.g,e.b),a=2*Math.PI,o=this.r*i.s,s=this.centerCoordinates.x+o*Math.sin(a*i.h),l=this.centerCoordinates.y+o*Math.cos(a*i.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=l-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var n=Fs(this.color.r,this.color.g,this.color.b);n.v=e/100;var i=Rc(n.h,n.s,n.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,n=Fs(e.r,e.g,e.b),i=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,a,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-n.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),vu(i).call(i),this.brightnessRange.value=100*n.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var e,n,i,a;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var s=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var l=this;this.opacityRange.onchange=function(){l._setOpacity(this.value)},this.opacityRange.oninput=function(){l._setOpacity(this.value)},this.brightnessRange.onchange=function(){l._setBrightness(this.value)},this.brightnessRange.oninput=function(){l._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=X(e=this._hide).call(e,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=X(n=this._apply).call(n,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=X(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=X(a=this._loadLast).call(a,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var e=this;this.drag={},this.pinch={},this.hammer=new mg(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(n){n.isFirst&&e._moveSelector(n)}),this.hammer.on("tap",function(n){e._moveSelector(n)}),this.hammer.on("panstart",function(n){e._moveSelector(n)}),this.hammer.on("panmove",function(n){e._moveSelector(n)}),this.hammer.on("panend",function(n){e._moveSelector(n)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var n=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,n,i);var a,o,s,l;this.centerCoordinates={x:n*.5,y:i*.5},this.r=.49*n;var u=2*Math.PI/360,c=1/360,h=1/this.r,d;for(s=0;s<360;s++)for(l=0;l3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return!1};te(this,t),this.parent=r,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=a,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},At(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Z4e(i),this.wrapper=void 0}return re(t,[{key:"setOptions",value:function(e){if(e!==void 0){this.popupHistory={},this._removePopup();var n=!0;if(typeof e=="string")this.options.filter=e;else if(Xe(e))this.options.filter=e.join();else if(Ze(e)==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),kr(e)!==void 0&&(this.options.filter=kr(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(n=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,n=e):typeof e=="function"&&(this.options.filter=e,n=!0);kr(this.options)===!1&&(n=!1),this.options.enabled=n}this._clean()}},{key:"setModuleOptions",value:function(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var e=kr(this.options),n=0,i=!1;for(var a in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,a)&&(this.allowCreation=!1,i=!1,typeof e=="function"?(i=e(a,[]),i=i||this._handleObject(this.configureOptions[a],[a],!0)):(e===!0||He(e).call(e,a)!==-1)&&(i=!0),i!==!1&&(this.allowCreation=!0,n>0&&this._makeItem([]),this._makeHeader(a),this._handleObject(this.configureOptions[a],[a])),n++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var e=0;e1?i-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:!1,a=document.createElement("div");if(a.className="vis-configuration vis-config-label vis-config-s"+n.length,i===!0){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(om("i","b",e))}else a.innerText=e+":";return a}},{key:"_makeDropdown",value:function(e,n,i){var a=document.createElement("select");a.className="vis-configuration vis-config-select";var o=0;n!==void 0&&He(e).call(e,n)!==-1&&(o=He(e).call(e,n));for(var s=0;ss&&s!==1&&(u.max=Math.ceil(n*d),h=u.max,c="range increased"),u.value=n}else u.value=a;var f=document.createElement("input");f.className="vis-configuration vis-config-rangeinput",f.value=u.value;var v=this;u.onchange=function(){f.value=this.value,v._update(Number(this.value),i)},u.oninput=function(){f.value=this.value};var m=this._makeLabel(i[i.length-1],i),b=this._makeItem(i,m,u,f);c!==""&&this.popupHistory[b]!==h&&(this.popupHistory[b]=h,this._setupPopup(c,b))}},{key:"_makeButton",value:function(){var e=this;if(this.options.showButton===!0){var n=document.createElement("div");n.className="vis-configuration vis-config-button",n.innerText="generate options",n.onclick=function(){e._printOptions()},n.onmouseover=function(){n.className="vis-configuration vis-config-button hover"},n.onmouseout=function(){n.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(n)}}},{key:"_setupPopup",value:function(e,n){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,o=kr(this.options),s=!1;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){a=!0;var u=e[l],c=$h(n,l);if(typeof o=="function"&&(a=o(l,n),a===!1&&!Xe(u)&&typeof u!="string"&&typeof u!="boolean"&&u instanceof Object&&(this.allowCreation=!1,a=this._handleObject(u,c,!0),this.allowCreation=i===!1)),a!==!1){s=!0;var h=this._getValue(c);if(Xe(u))this._handleArray(u,h,c);else if(typeof u=="string")this._makeTextInput(u,h,c);else if(typeof u=="boolean")this._makeCheckbox(u,h,c);else if(u instanceof Object){if(!this.hideOption(n,l,this.moduleOptions))if(u.enabled!==void 0){var d=$h(c,"enabled"),f=this._getValue(d);if(f===!0){var v=this._makeLabel(l,c,!0);this._makeItem(c,v),s=this._handleObject(u,c)||s}else this._makeCheckbox(u,f,c)}else{var m=this._makeLabel(l,c,!0);this._makeItem(c,m),s=this._handleObject(u,c)||s}}else console.error("dont know how to handle",u,l,c)}}return s}},{key:"_handleArray",value:function(e,n,i){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,n,i),e[1]!==n&&this.changedOptions.push({path:i,value:n})):typeof e[0]=="string"?(this._makeDropdown(e,n,i),e[0]!==n&&this.changedOptions.push({path:i,value:n})):typeof e[0]=="number"&&(this._makeRange(e,n,i),e[0]!==n&&this.changedOptions.push({path:i,value:Number(n)}))}},{key:"_update",value:function(e,n){var i=this._constructOptions(e,n);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var o=0;oo-this.padding&&(u=!0),u?s=this.x-i:s=this.x,c?l=this.y-n:l=this.y}else l=this.y-n,l+n+this.padding>a&&(l=a-n-this.padding),lo&&(s=o-i-this.padding),so.distance?u=" in "+t.printLocation(a.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(o.path,o.closestMatch,""):a.distance<=s?u='. Did you mean "'+a.closestMatch+'"?'+t.printLocation(a.path,e):u=". Did you mean one of these: "+t.print(yt(n))+t.printLocation(i,e),console.error('%cUnknown option detected: "'+e+'"'+u,sm),Cs=!0}},{key:"findInOptions",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=1e9,s="",l=[],u=e.toLowerCase(),c=void 0;for(var h in n){var d=void 0;if(n[h].__type__!==void 0&&a===!0){var f=t.findInOptions(e,n[h],$h(i,h));o>f.distance&&(s=f.closestMatch,l=f.path,o=f.distance,c=f.indexMatch)}else{var v;je(v=h.toLowerCase()).call(v,u)!==-1&&(c=h),d=t.levenshteinDistance(e,h),o>d&&(s=h,l=U4e(i),o=d)}}return{closestMatch:s,path:l,distance:o,indexMatch:c}}},{key:"printLocation",value:function(e,n){for(var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at: +`:o.distance<=l&&a.distance>o.distance?u=" in "+t.printLocation(a.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(o.path,o.closestMatch,""):a.distance<=s?u='. Did you mean "'+a.closestMatch+'"?'+t.printLocation(a.path,e):u=". Did you mean one of these: "+t.print(yt(n))+t.printLocation(i,e),console.error('%cUnknown option detected: "'+e+'"'+u,sm),Cs=!0}},{key:"findInOptions",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=1e9,s="",l=[],u=e.toLowerCase(),c=void 0;for(var h in n){var d=void 0;if(n[h].__type__!==void 0&&a===!0){var f=t.findInOptions(e,n[h],$h(i,h));o>f.distance&&(s=f.closestMatch,l=f.path,o=f.distance,c=f.indexMatch)}else{var v;He(v=h.toLowerCase()).call(v,u)!==-1&&(c=h),d=t.levenshteinDistance(e,h),o>d&&(s=h,l=U4e(i),o=d)}}return{closestMatch:s,path:l,distance:o,indexMatch:c}}},{key:"printLocation",value:function(e,n){for(var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at: `,a=` `+i+`options = { @@ -434,27 +434,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `;for(var u=0;u":!0,"--":!0},Ei="",qo=0,Me="",Se="",yr=nr.NULL;function s2e(){qo=0,Me=Ei.charAt(0)}function zt(){qo++,Me=Ei.charAt(qo)}function so(){return Ei.charAt(qo+1)}function S6(t){var r=t.charCodeAt(0);return r<47?r===35||r===46:r<59?r>47:r<91?r>64:r<96?r===95:r<123?r>96:!1}function Bi(t,r){if(t||(t={}),r)for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);return t}function l2e(t,r,e){for(var n=r.split("."),i=t;n.length;){var a=n.shift();n.length?(i[a]||(i[a]={}),i=i[a]):i[a]=e}}function QE(t,r){for(var e,n,i=null,a=[t],o=t;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(e=0,n=o.nodes.length;e=0;e--){var s,l=a[e];l.nodes||(l.nodes=[]),je(s=l.nodes).call(s,i)===-1&&l.nodes.push(i)}r.attr&&(i.attr=Bi(i.attr,r.attr))}function u2e(t,r){if(t.edges||(t.edges=[]),t.edges.push(r),t.edge){var e=Bi({},t.edge);r.attr=Bi(e,r.attr)}}function eT(t,r,e,n,i){var a={from:r,to:e,type:n};return t.edge&&(a.attr=Bi({},t.edge)),a.attr=Bi(a.attr||{},i),i!=null&&i.hasOwnProperty("arrows")&&i.arrows!=null&&(a.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),a}function lt(){for(yr=nr.NULL,Se="";Me===" "||Me===" "||Me===` -`||Me==="\r";)zt();do{var t=!1;if(Me==="#"){for(var r=qo-1;Ei.charAt(r)===" "||Ei.charAt(r)===" ";)r--;if(Ei.charAt(r)===` -`||Ei.charAt(r)===""){for(;Me!=""&&Me!=` -`;)zt();t=!0}}if(Me==="/"&&so()==="/"){for(;Me!=""&&Me!=` -`;)zt();t=!0}if(Me==="/"&&so()==="*"){for(;Me!="";)if(Me==="*"&&so()==="/"){zt(),zt();break}else zt();t=!0}for(;Me===" "||Me===" "||Me===` -`||Me==="\r";)zt()}while(t);if(Me===""){yr=nr.DELIMITER;return}var e=Me+so();if(k6[e]){yr=nr.DELIMITER,Se=e,zt(),zt();return}if(k6[Me]){yr=nr.DELIMITER,Se=Me,zt();return}if(S6(Me)||Me==="-"){for(Se+=Me,zt();S6(Me);)Se+=Me,zt();Se==="false"?Se=!1:Se==="true"?Se=!0:isNaN(Number(Se))||(Se=Number(Se)),yr=nr.IDENTIFIER;return}if(Me==='"'){for(zt();Me!=""&&(Me!='"'||Me==='"'&&so()==='"');)Me==='"'?(Se+=Me,zt()):Me==="\\"&&so()==="n"?(Se+=` -`,zt()):Se+=Me,zt();if(Me!='"')throw ir('End of string " expected');zt(),yr=nr.IDENTIFIER;return}for(yr=nr.UNKNOWN;Me!="";)Se+=Me,zt();throw new SyntaxError('Syntax error in part "'+iT(Se,30)+'"')}function c2e(){var t={};if(s2e(),lt(),Se==="strict"&&(t.strict=!0,lt()),(Se==="graph"||Se==="digraph")&&(t.type=Se,lt()),yr===nr.IDENTIFIER&&(t.id=Se,lt()),Se!="{")throw ir("Angle bracket { expected");if(lt(),tT(t),Se!="}")throw ir("Angle bracket } expected");if(lt(),Se!=="")throw ir("End of file expected");return lt(),delete t.node,delete t.edge,delete t.graph,t}function tT(t){for(;Se!==""&&Se!="}";)h2e(t),Se===";"&<()}function h2e(t){var r=rT(t);if(r){nT(t,r);return}var e=d2e(t);if(!e){if(yr!=nr.IDENTIFIER)throw ir("Identifier expected");var n=Se;if(lt(),Se==="="){if(lt(),yr!=nr.IDENTIFIER)throw ir("Identifier expected");t[n]=Se,lt()}else f2e(t,n)}}function rT(t){var r=null;if(Se==="subgraph"&&(r={},r.type="subgraph",lt(),yr===nr.IDENTIFIER&&(r.id=Se,lt())),Se==="{"){if(lt(),r||(r={}),r.parent=t,r.node=t.node,r.edge=t.edge,r.graph=t.graph,tT(r),Se!="}")throw ir("Angle bracket } expected");lt(),delete r.node,delete r.edge,delete r.graph,delete r.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(r)}return r}function d2e(t){return Se==="node"?(lt(),t.node=Xs(),"node"):Se==="edge"?(lt(),t.edge=Xs(),"edge"):Se==="graph"?(lt(),t.graph=Xs(),"graph"):null}function f2e(t,r){var e={id:r},n=Xs();n&&(e.attr=n),QE(t,e),nT(t,r)}function nT(t,r){for(;Se==="->"||Se==="--";){var e,n=Se;lt();var i=rT(t);if(i)e=i;else{if(yr!=nr.IDENTIFIER)throw ir("Identifier or subgraph expected");e=Se,QE(t,{id:e}),lt()}var a=Xs(),o=eT(t,r,e,n,a);u2e(t,o),r=e}}function Xs(){for(var t,r=null,e={dashed:!0,solid:!1,dotted:[1,5]},n={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},i=new Array,a=new Array;Se==="[";){for(lt(),r={};Se!==""&&Se!="]";){if(yr!=nr.IDENTIFIER)throw ir("Attribute name expected");var o=Se;if(lt(),Se!="=")throw ir("Equal sign = expected");if(lt(),yr!=nr.IDENTIFIER)throw ir("Attribute value expected");var s=Se;o==="style"&&(s=e[s]);var l;o==="arrowhead"&&(l=n[s],o="arrows",s={to:{enabled:!0,type:l}}),o==="arrowtail"&&(l=n[s],o="arrows",s={from:{enabled:!0,type:l}}),i.push({attr:r,name:o,value:s}),a.push(o),lt(),Se==","&<()}if(Se!="]")throw ir("Bracket ] expected");lt()}if(Ai(a).call(a,"dir")){var u={};for(u.arrows={},t=0;t"&&(l.arrows="to"),l};tt(i=r.edges).call(i,function(o){var s,l;if(o.from instanceof Object?s=o.from.nodes:s={id:o.from},o.to instanceof Object?l=o.to.nodes:l={id:o.to},o.from instanceof Object&&o.from.edges){var u;tt(u=o.from.edges).call(u,function(h){var d=a(h);e.edges.push(d)})}if(v2e(s,l,function(h,d){var f=eT(e,h.id,d.id,o.type,o.attr),v=a(f);e.edges.push(v)}),o.to instanceof Object&&o.to.edges){var c;tt(c=o.to.edges).call(c,function(h){var d=a(h);e.edges.push(d)})}})}return r.attr&&(e.options=r.attr),e}function m2e(t,r){var e,n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};r!=null&&(r.fixed!=null&&(n.nodes.fixed=r.fixed),r.parseColor!=null&&(n.nodes.parseColor=r.parseColor),r.inheritColor!=null&&(n.edges.inheritColor=r.inheritColor));var i=t.edges,a=Lo(i).call(i,function(s){var l={from:s.source,id:s.id,to:s.target};return s.attributes!=null&&(l.attributes=s.attributes),s.label!=null&&(l.label=s.label),s.attributes!=null&&s.attributes.title!=null&&(l.title=s.attributes.title),s.type==="Directed"&&(l.arrows="to"),s.color&&n.edges.inheritColor===!1&&(l.color=s.color),l}),o=Lo(e=t.nodes).call(e,function(s){var l={id:s.id,fixed:n.nodes.fixed&&s.x!=null&&s.y!=null};return s.attributes!=null&&(l.attributes=s.attributes),s.label!=null&&(l.label=s.label),s.size!=null&&(l.size=s.size),s.attributes!=null&&s.attributes.title!=null&&(l.title=s.attributes.title),s.title!=null&&(l.title=s.title),s.x!=null&&(l.x=s.x),s.y!=null&&(l.y=s.y),s.color!=null&&(n.nodes.parseColor===!0?l.color=s.color:l.color={background:s.color,border:s.color,highlight:{background:s.color,border:s.color},hover:{background:s.color,border:s.color}}),l});return{nodes:o,edges:a}}var g2e={addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},y2e={addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},b2e={addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},w2e={addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},$2e={addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},x2e={addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},k2e={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},S2e={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},E2e={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},T2e={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},_2e={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"},O2e=Object.freeze({__proto__:null,cn:S2e,cs:_2e,de:y2e,en:g2e,es:b2e,fr:T2e,it:w2e,nl:$2e,pt:x2e,ru:k2e,uk:E2e});function I2e(t,r){try{var e=r.split(/[-_ /]/,2),n=bt(e,2),i=n[0],a=n[1],o=i!=null?i.toLowerCase():null,s=a!=null?a.toUpperCase():null;if(o&&s){var l=o+"-"+s;if(Object.prototype.hasOwnProperty.call(t,l))return l;var u;console.warn(sg(u="Unknown variant ".concat(s," of language ")).call(u,o,"."))}if(o){var c=o;if(Object.prototype.hasOwnProperty.call(t,c))return c;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(r,", falling back to English.")),"en"}catch(h){return console.error(h),console.warn("Unexpected error while normalizing locale ".concat(r,", falling back to English.")),"en"}}var C2e=function(){function t(){te(this,t),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return re(t,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var e=this.image.width,n=this.image.height;this.width=e,this.height=n;var i=Math.floor(n/2),a=Math.floor(n/4),o=Math.floor(n/8),s=Math.floor(n/16),l=Math.floor(e/2),u=Math.floor(e/4),c=Math.floor(e/8),h=Math.floor(e/16);this.canvas.width=3*u,this.canvas.height=i,this.coordinates=[[0,0,l,i],[l,0,u,a],[l,a,c,o],[5*c,a,h,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return this.coordinates!==void 0}},{key:"_fillMipMap",value:function(){var e=this.canvas.getContext("2d"),n=this.coordinates[0];e.drawImage(this.image,n[0],n[1],n[2],n[3]);for(var i=1;i2){n*=.5;for(var l=0;n>2&&l=this.NUM_ITERATIONS&&(l=this.NUM_ITERATIONS-1);var u=this.coordinates[l];e.drawImage(this.canvas,u[0],u[1],u[2],u[3],i,a,o,s)}else e.drawImage(this.image,i,a,o,s)}}]),t}(),P2e=function(){function t(r){te(this,t),this.images={},this.imageBroken={},this.callback=r}return re(t,[{key:"_tryloadBrokenUrl",value:function(e,n,i){if(!(e===void 0||i===void 0)){if(n===void 0){console.warn("No broken url image defined");return}i.image.onerror=function(){console.error("Could not load brokenImage:",n)},i.image.src=n}}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,n){var i=this,a=this.images[e];if(a)return a;var o=new C2e;return this.images[e]=o,o.image.onload=function(){i._fixImageCoordinates(o.image),o.init(),i._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),i._tryloadBrokenUrl(e,n,o)},o.image.src=e,o}},{key:"_fixImageCoordinates",value:function(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),t}(),aT={exports:{}},A2e=He,M2e=A2e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),D2e=He,N2e=Ut,R2e=fi,T6=M2e,Fc=Object.isExtensible,F2e=D2e(function(){Fc(1)}),z2e=F2e||T6?function(r){return!N2e(r)||T6&&R2e(r)==="ArrayBuffer"?!1:Fc?Fc(r):!0}:Fc,B2e=He,oT=!B2e(function(){return Object.isExtensible(Object.preventExtensions({}))}),L2e=Ee,j2e=Ue,H2e=au,W2e=Ut,bg=Vt,q2e=Hr.f,_6=uu,U2e=_0,wg=z2e,V2e=m0,G2e=oT,sT=!1,li=V2e("meta"),K2e=0,$g=function(t){q2e(t,li,{value:{objectID:"O"+K2e++,weakData:{}}})},Y2e=function(t,r){if(!W2e(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!bg(t,li)){if(!wg(t))return"F";if(!r)return"E";$g(t)}return t[li].objectID},X2e=function(t,r){if(!bg(t,li)){if(!wg(t))return!0;if(!r)return!1;$g(t)}return t[li].weakData},J2e=function(t){return G2e&&sT&&wg(t)&&!bg(t,li)&&$g(t),t},Z2e=function(){Q2e.enable=function(){},sT=!0;var t=_6.f,r=j2e([].splice),e={};e[li]=1,t(e).length&&(_6.f=function(n){for(var i=t(n),a=0,o=i.length;ah;h++)if(f=y(t[h]),f&&O6(C6,f))return f;return new zc(!1)}u=o5e(t,c)}for(v=a?t.next:u.next;!(g=t5e(v,u)).done;){try{f=y(g.value)}catch($){I6(u,"throw",$)}if(typeof f=="object"&&f&&O6(C6,f))return f}return new zc(!1)},u5e=It,c5e=TypeError,kg=function(t,r){if(u5e(r,t))return t;throw new c5e("Incorrect invocation")},h5e=Ee,d5e=xt,f5e=F0,v5e=He,p5e=vs,m5e=xg,g5e=kg,y5e=Wt,b5e=Ut,w5e=cs,$5e=ms,x5e=Hr.f,k5e=Yi.forEach,S5e=qt,lT=Ha,E5e=lT.set,T5e=lT.getterFor,Sg=function(t,r,e){var n=t.indexOf("Map")!==-1,i=t.indexOf("Weak")!==-1,a=n?"set":"add",o=d5e[t],s=o&&o.prototype,l={},u;if(!S5e||!y5e(o)||!(i||s.forEach&&!v5e(function(){new o().entries().next()})))u=e.getConstructor(r,t,n,a),f5e.enable();else{u=r(function(d,f){E5e(g5e(d,c),{type:t,collection:new o}),w5e(f)||m5e(f,d[a],{that:d,AS_ENTRIES:n})});var c=u.prototype,h=T5e(t);k5e(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d==="add"||d==="set";d in s&&!(i&&d==="clear")&&p5e(c,d,function(v,g){var b=h(this).collection;if(!f&&i&&!b5e(v))return d==="get"?void 0:!1;var y=b[d](v===0?0:v,g);return f?this:y})}),i||x5e(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return $5e(u,t,!1,!0),l[t]=u,h5e({global:!0,forced:!0},l),i||e.setStrong(u,t,n),u},_5e=su,Eg=function(t,r,e){for(var n in r)e&&e.unsafe&&t[n]?t[n]=r[n]:_5e(t,n,r[n],e);return t},O5e=nn,I5e=tg,C5e=kt,P5e=qt,P6=C5e("species"),A5e=function(t){var r=O5e(t);P5e&&r&&!r[P6]&&I5e(r,P6,{configurable:!0,get:function(){return this}})},M5e=ps,D5e=tg,A6=Eg,N5e=nu,R5e=kg,F5e=cs,z5e=xg,B5e=X1,fc=J1,L5e=A5e,Ps=qt,M6=F0.fastKey,uT=Ha,D6=uT.set,$v=uT.getterFor,cT={getConstructor:function(t,r,e,n){var i=t(function(u,c){R5e(u,a),D6(u,{type:r,index:M5e(null),first:void 0,last:void 0,size:0}),Ps||(u.size=0),F5e(c)||z5e(c,u[n],{that:u,AS_ENTRIES:e})}),a=i.prototype,o=$v(r),s=function(u,c,h){var d=o(u),f=l(u,c),v,g;return f?f.value=h:(d.last=f={index:g=M6(c,!0),key:c,value:h,previous:v=d.last,next:void 0,removed:!1},d.first||(d.first=f),v&&(v.next=f),Ps?d.size++:u.size++,g!=="F"&&(d.index[g]=f)),u},l=function(u,c){var h=o(u),d=M6(c),f;if(d!=="F")return h.index[d];for(f=h.first;f;f=f.next)if(f.key===c)return f};return A6(a,{clear:function(){for(var c=this,h=o(c),d=h.index,f=h.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete d[f.index],f=f.next;h.first=h.last=void 0,Ps?h.size=0:c.size=0},delete:function(u){var c=this,h=o(c),d=l(c,u);if(d){var f=d.next,v=d.previous;delete h.index[d.index],d.removed=!0,v&&(v.next=f),f&&(f.previous=v),h.first===d&&(h.first=f),h.last===d&&(h.last=v),Ps?h.size--:c.size--}return!!d},forEach:function(c){for(var h=o(this),d=N5e(c,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:h.first;)for(d(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(c){return!!l(this,c)}}),A6(a,e?{get:function(c){var h=l(this,c);return h&&h.value},set:function(c,h){return s(this,c===0?0:c,h)}}:{add:function(c){return s(this,c=c===0?0:c,c)}}),Ps&&D5e(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(t,r,e){var n=r+" Iterator",i=$v(r),a=$v(n);B5e(t,r,function(o,s){D6(this,{type:n,target:o,state:i(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,l=o.last;l&&l.removed;)l=l.previous;return!o.target||!(o.last=l=l?l.next:o.state.first)?(o.target=void 0,fc(void 0,!0)):fc(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},e?"entries":"values",!e,!0),L5e(r)}},j5e=Sg,H5e=cT;j5e("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},H5e);var W5e=We,q5e=W5e.Map,U5e=q5e,V5e=U5e,G5e=V5e,hT=pe(G5e),K5e=function(){function t(){te(this,t),this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},At(this.options,this.defaultOptions)}return re(t,[{key:"setOptions",value:function(e){var n=["useDefaultGroups"];if(e!==void 0){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&je(n).call(n,i)===-1){var a=e[i];this.add(i,a)}}}},{key:"clear",value:function(){this._groups=new hT,this._groupNames=[]}},{key:"get",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this._groups.get(e);if(i===void 0&&n)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){var a=this._groupIndex%this._groupNames.length;++this._groupIndex,i={},i.color=this._groups.get(this._groupNames[a]),this._groups.set(e,i)}else{var o=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,i={},i.color=this._defaultGroups[o],this._groups.set(e,i)}return i}},{key:"add",value:function(e,n){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,n),n}}]),t}(),Y5e=Ee;Y5e({target:"Number",stat:!0},{isNaN:function(r){return r!==r}});var X5e=We,J5e=X5e.Number.isNaN,Z5e=J5e,Q5e=Z5e,e3e=Q5e,lm=pe(e3e),t3e=xt,r3e=t3e.isFinite,n3e=Number.isFinite||function(r){return typeof r=="number"&&r3e(r)},i3e=Ee,a3e=n3e;i3e({target:"Number",stat:!0},{isFinite:a3e});var o3e=We,s3e=o3e.Number.isFinite,l3e=s3e,u3e=l3e,c3e=u3e,ua=pe(c3e),h3e=Ee,d3e=Yi.some,f3e=bs,v3e=f3e("some");h3e({target:"Array",proto:!0,forced:!v3e},{some:function(r){return d3e(this,r,arguments.length>1?arguments[1]:void 0)}});var p3e=Gt,m3e=p3e("Array").some,g3e=It,y3e=m3e,xv=Array.prototype,b3e=function(t){var r=t.some;return t===xv||g3e(xv,t)&&r===xv.some?y3e:r},w3e=b3e,$3e=w3e,x3e=$3e,k3e=pe(x3e),S3e=We,E3e=S3e.Object.getOwnPropertySymbols,T3e=E3e,_3e=T3e,O3e=_3e,Li=pe(O3e),dT={exports:{}},I3e=Ee,C3e=He,P3e=zn,fT=us.f,vT=qt,A3e=!vT||C3e(function(){fT(1)});I3e({target:"Object",stat:!0,forced:A3e,sham:!vT},{getOwnPropertyDescriptor:function(r,e){return fT(P3e(r),e)}});var M3e=We,pT=M3e.Object,D3e=dT.exports=function(r,e){return pT.getOwnPropertyDescriptor(r,e)};pT.getOwnPropertyDescriptor.sham&&(D3e.sham=!0);var N3e=dT.exports,R3e=N3e,mT=R3e,F3e=mT,Ji=pe(F3e),z3e=Ee,B3e=qt,L3e=r1e,j3e=zn,H3e=us,W3e=ys;z3e({target:"Object",stat:!0,sham:!B3e},{getOwnPropertyDescriptors:function(r){for(var e=j3e(r),n=H3e.f,i=L3e(e),a={},o=0,s,l;i.length>o;)l=n(e,s=i[o++]),l!==void 0&&W3e(a,s,l);return a}});var q3e=We,U3e=q3e.Object.getOwnPropertyDescriptors,V3e=U3e,G3e=V3e,K3e=G3e,ji=pe(K3e),gT={exports:{}},Y3e=Ee,X3e=qt,N6=x0.f;Y3e({target:"Object",stat:!0,forced:Object.defineProperties!==N6,sham:!X3e},{defineProperties:N6});var J3e=We,yT=J3e.Object,Z3e=gT.exports=function(r,e){return yT.defineProperties(r,e)};yT.defineProperties.sham&&(Z3e.sham=!0);var Q3e=gT.exports,e6e=Q3e,t6e=e6e,r6e=t6e,z0=pe(r6e),n6e=xS,B0=pe(n6e);function L0(t,r,e){return r=tE(r),r in t?T0(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var bT=xt,i6e=He,a6e=Ue,o6e=Bn,s6e=fE.trim,l6e=lg,u6e=a6e("".charAt),xh=bT.parseFloat,R6=bT.Symbol,F6=R6&&R6.iterator,c6e=1/xh(l6e+"-0")!==-1/0||F6&&!i6e(function(){xh(Object(F6))}),h6e=c6e?function(r){var e=s6e(o6e(r)),n=xh(e);return n===0&&u6e(e,0)==="-"?-0:n}:xh,d6e=Ee,z6=h6e;d6e({global:!0,forced:parseFloat!==z6},{parseFloat:z6});var f6e=We,v6e=f6e.parseFloat,p6e=v6e,m6e=p6e,g6e=m6e,wT=pe(g6e),y6e=Ee,b6e=He,w6e=_0.f,$6e=b6e(function(){return!Object.getOwnPropertyNames(1)});y6e({target:"Object",stat:!0,forced:$6e},{getOwnPropertyNames:w6e});var x6e=We,k6e=x6e.Object,S6e=function(r){return k6e.getOwnPropertyNames(r)},E6e=S6e,T6e=E6e,_6e=T6e,O6e=pe(_6e);function Tg(t,r){var e=["node","edge","label"],n=!0,i=xi(r,"chosen");if(typeof i=="boolean")n=i;else if(Ze(i)==="object"){if(je(e).call(e,t)===-1)throw new Error("choosify: subOption '"+t+"' should be one of '"+e.join("', '")+"'");var a=xi(r,["chosen",t]);(typeof a=="boolean"||typeof a=="function")&&(n=a)}return n}function um(t,r,e){if(t.width<=0||t.height<=0)return!1;if(e!==void 0){var n={x:r.x-e.x,y:r.y-e.y};if(e.angle!==0){var i=-e.angle,a={x:Math.cos(i)*n.x-Math.sin(i)*n.y,y:Math.sin(i)*n.x+Math.cos(i)*n.y};r=a}else r=n}var o=t.x+t.width,s=t.y+t.width;return t.leftr.x&&t.topr.y}function kh(t){return typeof t=="string"&&t!==""}function $T(t,r,e,n){var i=n.x,a=n.y;if(typeof n.distanceToBorder=="function"){var o=n.distanceToBorder(t,r),s=Math.sin(r)*o,l=Math.cos(r)*o;l===o?(i+=o,a=n.y):s===o?(i=n.x,a-=o):(i+=l,a-=s)}else n.shape.width>n.shape.height?(i=n.x+n.shape.width*.5,a=n.y-e):(i=n.x+e,a=n.y-n.shape.height*.5);return{x:i,y:a}}var I6e=Gt,C6e=I6e("Array").values,P6e=C6e,A6e=P6e,M6e=ja,D6e=Vt,N6e=It,R6e=A6e,kv=Array.prototype,F6e={DOMTokenList:!0,NodeList:!0},z6e=function(t){var r=t.values;return t===kv||N6e(kv,t)&&r===kv.values||D6e(F6e,M6e(t))?R6e:r},B6e=z6e,xT=pe(B6e),L6e=function(){function t(r){te(this,t),this.measureText=r,this.current=0,this.width=0,this.height=0,this.lines=[]}return re(t,[{key:"_add",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});var a=n;(n===void 0||n==="")&&(a=" ");var o=this.measureText(a,i),s=At({},xT(o));s.text=n,s.width=o.width,s.mod=i,(n===void 0||n==="")&&(s.width=0),this.lines[e].blocks.push(s),this.lines[e].width+=s.width}},{key:"curWidth",value:function(){var e=this.lines[this.current];return e===void 0?0:e.width}},{key:"append",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,n)}},{key:"newLine",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,n),this.current++}},{key:"determineLineHeights",value:function(){for(var e=0;ee&&(e=a.width),n+=a.height}this.width=e,this.height=n}},{key:"removeEmptyBlocks",value:function(){for(var e=[],n=0;n"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},B6=function(){function t(r){te(this,t),this.text=r,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return re(t,[{key:"mod",value:function(){return this.modStack.length===0?"normal":this.modStack[0]}},{key:"modName",value:function(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}},{key:"parseWS",value:function(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}},{key:"setTag",value:function(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}},{key:"unsetTag",value:function(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(e,n){return!this.mono&&!this[e]&&this.match(n)?(this.setTag(e),!0):!1}},{key:"match",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this.prepareRegExp(e),a=bt(i,2),o=a[0],s=a[1],l=o.test(this.text.substr(this.position,s));return l&&n&&(this.position+=s-1),l}},{key:"parseEndTag",value:function(e,n,i){var a=this.mod()===e;return e==="mono"?a=a&&this.mono:a=a&&!this.mono,a&&this.match(n)?(i!==void 0?(this.position===this.text.length-1||this.match(i,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}},{key:"replace",value:function(e,n){return this.match(e)?(this.add(n),this.position+=length-1,!0):!1}},{key:"prepareRegExp",value:function(e){var n,i;if(e instanceof RegExp)i=e,n=1;else{var a=j6e[e];a!==void 0?i=a:i=new RegExp(e),n=e.length}return[i,n]}}]),t}(),H6e=function(){function t(r,e,n,i){var a=this;te(this,t),this.ctx=r,this.parent=e,this.selected=n,this.hover=i;var o=function(l,u){if(l===void 0)return 0;var c=a.parent.getFormattingValues(r,n,i,u),h=0;if(l!==""){var d=a.ctx.measureText(l);h=d.width}return{width:h,values:c}};this.lines=new L6e(o)}return re(t,[{key:"process",value:function(e){if(!kh(e))return this.lines.finalize();var n=this.parent.fontOptions;e=e.replace(/\r\n/g,` +`}},{key:"print",value:function(e){return fu(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}},{key:"levenshteinDistance",value:function(e,n){if(e.length===0)return n.length;if(n.length===0)return e.length;var i=[],a;for(a=0;a<=n.length;a++)i[a]=[a];var o;for(o=0;o<=e.length;o++)i[0][o]=o;for(a=1;a<=n.length;a++)for(o=1;o<=e.length;o++)n.charAt(a-1)==e.charAt(o-1)?i[a][o]=i[a-1][o-1]:i[a][o]=Math.min(i[a-1][o-1]+1,Math.min(i[a][o-1]+1,i[a-1][o]+1));return i[n.length][e.length]}}]),t}(),r2e=On,n2e=Q4e,_o=mg,i2e=e2e,JE=sm,a2e=t2e;function o2e(t){return Ei=t,c2e()}var ZE={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},yg=ya(ZE);yg.color="color.color";yg.style="dashes";var nr={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},k6={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Ei="",qo=0,Ae="",xe="",yr=nr.NULL;function s2e(){qo=0,Ae=Ei.charAt(0)}function zt(){qo++,Ae=Ei.charAt(qo)}function so(){return Ei.charAt(qo+1)}function S6(t){var r=t.charCodeAt(0);return r<47?r===35||r===46:r<59?r>47:r<91?r>64:r<96?r===95:r<123?r>96:!1}function Bi(t,r){if(t||(t={}),r)for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);return t}function l2e(t,r,e){for(var n=r.split("."),i=t;n.length;){var a=n.shift();n.length?(i[a]||(i[a]={}),i=i[a]):i[a]=e}}function QE(t,r){for(var e,n,i=null,a=[t],o=t;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(e=0,n=o.nodes.length;e=0;e--){var s,l=a[e];l.nodes||(l.nodes=[]),He(s=l.nodes).call(s,i)===-1&&l.nodes.push(i)}r.attr&&(i.attr=Bi(i.attr,r.attr))}function u2e(t,r){if(t.edges||(t.edges=[]),t.edges.push(r),t.edge){var e=Bi({},t.edge);r.attr=Bi(e,r.attr)}}function eT(t,r,e,n,i){var a={from:r,to:e,type:n};return t.edge&&(a.attr=Bi({},t.edge)),a.attr=Bi(a.attr||{},i),i!=null&&i.hasOwnProperty("arrows")&&i.arrows!=null&&(a.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),a}function lt(){for(yr=nr.NULL,xe="";Ae===" "||Ae===" "||Ae===` +`||Ae==="\r";)zt();do{var t=!1;if(Ae==="#"){for(var r=qo-1;Ei.charAt(r)===" "||Ei.charAt(r)===" ";)r--;if(Ei.charAt(r)===` +`||Ei.charAt(r)===""){for(;Ae!=""&&Ae!=` +`;)zt();t=!0}}if(Ae==="/"&&so()==="/"){for(;Ae!=""&&Ae!=` +`;)zt();t=!0}if(Ae==="/"&&so()==="*"){for(;Ae!="";)if(Ae==="*"&&so()==="/"){zt(),zt();break}else zt();t=!0}for(;Ae===" "||Ae===" "||Ae===` +`||Ae==="\r";)zt()}while(t);if(Ae===""){yr=nr.DELIMITER;return}var e=Ae+so();if(k6[e]){yr=nr.DELIMITER,xe=e,zt(),zt();return}if(k6[Ae]){yr=nr.DELIMITER,xe=Ae,zt();return}if(S6(Ae)||Ae==="-"){for(xe+=Ae,zt();S6(Ae);)xe+=Ae,zt();xe==="false"?xe=!1:xe==="true"?xe=!0:isNaN(Number(xe))||(xe=Number(xe)),yr=nr.IDENTIFIER;return}if(Ae==='"'){for(zt();Ae!=""&&(Ae!='"'||Ae==='"'&&so()==='"');)Ae==='"'?(xe+=Ae,zt()):Ae==="\\"&&so()==="n"?(xe+=` +`,zt()):xe+=Ae,zt();if(Ae!='"')throw ir('End of string " expected');zt(),yr=nr.IDENTIFIER;return}for(yr=nr.UNKNOWN;Ae!="";)xe+=Ae,zt();throw new SyntaxError('Syntax error in part "'+iT(xe,30)+'"')}function c2e(){var t={};if(s2e(),lt(),xe==="strict"&&(t.strict=!0,lt()),(xe==="graph"||xe==="digraph")&&(t.type=xe,lt()),yr===nr.IDENTIFIER&&(t.id=xe,lt()),xe!="{")throw ir("Angle bracket { expected");if(lt(),tT(t),xe!="}")throw ir("Angle bracket } expected");if(lt(),xe!=="")throw ir("End of file expected");return lt(),delete t.node,delete t.edge,delete t.graph,t}function tT(t){for(;xe!==""&&xe!="}";)h2e(t),xe===";"&<()}function h2e(t){var r=rT(t);if(r){nT(t,r);return}var e=d2e(t);if(!e){if(yr!=nr.IDENTIFIER)throw ir("Identifier expected");var n=xe;if(lt(),xe==="="){if(lt(),yr!=nr.IDENTIFIER)throw ir("Identifier expected");t[n]=xe,lt()}else f2e(t,n)}}function rT(t){var r=null;if(xe==="subgraph"&&(r={},r.type="subgraph",lt(),yr===nr.IDENTIFIER&&(r.id=xe,lt())),xe==="{"){if(lt(),r||(r={}),r.parent=t,r.node=t.node,r.edge=t.edge,r.graph=t.graph,tT(r),xe!="}")throw ir("Angle bracket } expected");lt(),delete r.node,delete r.edge,delete r.graph,delete r.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(r)}return r}function d2e(t){return xe==="node"?(lt(),t.node=Xs(),"node"):xe==="edge"?(lt(),t.edge=Xs(),"edge"):xe==="graph"?(lt(),t.graph=Xs(),"graph"):null}function f2e(t,r){var e={id:r},n=Xs();n&&(e.attr=n),QE(t,e),nT(t,r)}function nT(t,r){for(;xe==="->"||xe==="--";){var e,n=xe;lt();var i=rT(t);if(i)e=i;else{if(yr!=nr.IDENTIFIER)throw ir("Identifier or subgraph expected");e=xe,QE(t,{id:e}),lt()}var a=Xs(),o=eT(t,r,e,n,a);u2e(t,o),r=e}}function Xs(){for(var t,r=null,e={dashed:!0,solid:!1,dotted:[1,5]},n={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},i=new Array,a=new Array;xe==="[";){for(lt(),r={};xe!==""&&xe!="]";){if(yr!=nr.IDENTIFIER)throw ir("Attribute name expected");var o=xe;if(lt(),xe!="=")throw ir("Equal sign = expected");if(lt(),yr!=nr.IDENTIFIER)throw ir("Attribute value expected");var s=xe;o==="style"&&(s=e[s]);var l;o==="arrowhead"&&(l=n[s],o="arrows",s={to:{enabled:!0,type:l}}),o==="arrowtail"&&(l=n[s],o="arrows",s={from:{enabled:!0,type:l}}),i.push({attr:r,name:o,value:s}),a.push(o),lt(),xe==","&<()}if(xe!="]")throw ir("Bracket ] expected");lt()}if(Ai(a).call(a,"dir")){var u={};for(u.arrows={},t=0;t"&&(l.arrows="to"),l};tt(i=r.edges).call(i,function(o){var s,l;if(o.from instanceof Object?s=o.from.nodes:s={id:o.from},o.to instanceof Object?l=o.to.nodes:l={id:o.to},o.from instanceof Object&&o.from.edges){var u;tt(u=o.from.edges).call(u,function(h){var d=a(h);e.edges.push(d)})}if(v2e(s,l,function(h,d){var f=eT(e,h.id,d.id,o.type,o.attr),v=a(f);e.edges.push(v)}),o.to instanceof Object&&o.to.edges){var c;tt(c=o.to.edges).call(c,function(h){var d=a(h);e.edges.push(d)})}})}return r.attr&&(e.options=r.attr),e}function m2e(t,r){var e,n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};r!=null&&(r.fixed!=null&&(n.nodes.fixed=r.fixed),r.parseColor!=null&&(n.nodes.parseColor=r.parseColor),r.inheritColor!=null&&(n.edges.inheritColor=r.inheritColor));var i=t.edges,a=Lo(i).call(i,function(s){var l={from:s.source,id:s.id,to:s.target};return s.attributes!=null&&(l.attributes=s.attributes),s.label!=null&&(l.label=s.label),s.attributes!=null&&s.attributes.title!=null&&(l.title=s.attributes.title),s.type==="Directed"&&(l.arrows="to"),s.color&&n.edges.inheritColor===!1&&(l.color=s.color),l}),o=Lo(e=t.nodes).call(e,function(s){var l={id:s.id,fixed:n.nodes.fixed&&s.x!=null&&s.y!=null};return s.attributes!=null&&(l.attributes=s.attributes),s.label!=null&&(l.label=s.label),s.size!=null&&(l.size=s.size),s.attributes!=null&&s.attributes.title!=null&&(l.title=s.attributes.title),s.title!=null&&(l.title=s.title),s.x!=null&&(l.x=s.x),s.y!=null&&(l.y=s.y),s.color!=null&&(n.nodes.parseColor===!0?l.color=s.color:l.color={background:s.color,border:s.color,highlight:{background:s.color,border:s.color},hover:{background:s.color,border:s.color}}),l});return{nodes:o,edges:a}}var g2e={addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},y2e={addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},b2e={addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},w2e={addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},$2e={addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},x2e={addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},k2e={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},S2e={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},E2e={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},T2e={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},_2e={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"},O2e=Object.freeze({__proto__:null,cn:S2e,cs:_2e,de:y2e,en:g2e,es:b2e,fr:T2e,it:w2e,nl:$2e,pt:x2e,ru:k2e,uk:E2e});function I2e(t,r){try{var e=r.split(/[-_ /]/,2),n=bt(e,2),i=n[0],a=n[1],o=i!=null?i.toLowerCase():null,s=a!=null?a.toUpperCase():null;if(o&&s){var l=o+"-"+s;if(Object.prototype.hasOwnProperty.call(t,l))return l;var u;console.warn(sg(u="Unknown variant ".concat(s," of language ")).call(u,o,"."))}if(o){var c=o;if(Object.prototype.hasOwnProperty.call(t,c))return c;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(r,", falling back to English.")),"en"}catch(h){return console.error(h),console.warn("Unexpected error while normalizing locale ".concat(r,", falling back to English.")),"en"}}var C2e=function(){function t(){te(this,t),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return re(t,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var e=this.image.width,n=this.image.height;this.width=e,this.height=n;var i=Math.floor(n/2),a=Math.floor(n/4),o=Math.floor(n/8),s=Math.floor(n/16),l=Math.floor(e/2),u=Math.floor(e/4),c=Math.floor(e/8),h=Math.floor(e/16);this.canvas.width=3*u,this.canvas.height=i,this.coordinates=[[0,0,l,i],[l,0,u,a],[l,a,c,o],[5*c,a,h,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return this.coordinates!==void 0}},{key:"_fillMipMap",value:function(){var e=this.canvas.getContext("2d"),n=this.coordinates[0];e.drawImage(this.image,n[0],n[1],n[2],n[3]);for(var i=1;i2){n*=.5;for(var l=0;n>2&&l=this.NUM_ITERATIONS&&(l=this.NUM_ITERATIONS-1);var u=this.coordinates[l];e.drawImage(this.canvas,u[0],u[1],u[2],u[3],i,a,o,s)}else e.drawImage(this.image,i,a,o,s)}}]),t}(),P2e=function(){function t(r){te(this,t),this.images={},this.imageBroken={},this.callback=r}return re(t,[{key:"_tryloadBrokenUrl",value:function(e,n,i){if(!(e===void 0||i===void 0)){if(n===void 0){console.warn("No broken url image defined");return}i.image.onerror=function(){console.error("Could not load brokenImage:",n)},i.image.src=n}}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,n){var i=this,a=this.images[e];if(a)return a;var o=new C2e;return this.images[e]=o,o.image.onload=function(){i._fixImageCoordinates(o.image),o.init(),i._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),i._tryloadBrokenUrl(e,n,o)},o.image.src=e,o}},{key:"_fixImageCoordinates",value:function(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),t}(),aT={exports:{}},A2e=We,M2e=A2e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),D2e=We,N2e=Ut,R2e=fi,T6=M2e,Fc=Object.isExtensible,F2e=D2e(function(){Fc(1)}),z2e=F2e||T6?function(r){return!N2e(r)||T6&&R2e(r)==="ArrayBuffer"?!1:Fc?Fc(r):!0}:Fc,B2e=We,oT=!B2e(function(){return Object.isExtensible(Object.preventExtensions({}))}),L2e=ke,j2e=Ge,H2e=au,W2e=Ut,bg=Vt,q2e=Hr.f,_6=uu,U2e=_0,wg=z2e,V2e=m0,G2e=oT,sT=!1,li=V2e("meta"),K2e=0,$g=function(t){q2e(t,li,{value:{objectID:"O"+K2e++,weakData:{}}})},Y2e=function(t,r){if(!W2e(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!bg(t,li)){if(!wg(t))return"F";if(!r)return"E";$g(t)}return t[li].objectID},X2e=function(t,r){if(!bg(t,li)){if(!wg(t))return!0;if(!r)return!1;$g(t)}return t[li].weakData},J2e=function(t){return G2e&&sT&&wg(t)&&!bg(t,li)&&$g(t),t},Z2e=function(){Q2e.enable=function(){},sT=!0;var t=_6.f,r=j2e([].splice),e={};e[li]=1,t(e).length&&(_6.f=function(n){for(var i=t(n),a=0,o=i.length;ah;h++)if(f=y(t[h]),f&&O6(C6,f))return f;return new zc(!1)}u=o5e(t,c)}for(v=a?t.next:u.next;!(m=t5e(v,u)).done;){try{f=y(m.value)}catch($){I6(u,"throw",$)}if(typeof f=="object"&&f&&O6(C6,f))return f}return new zc(!1)},u5e=It,c5e=TypeError,kg=function(t,r){if(u5e(r,t))return t;throw new c5e("Incorrect invocation")},h5e=ke,d5e=xt,f5e=F0,v5e=We,p5e=vs,m5e=xg,g5e=kg,y5e=Wt,b5e=Ut,w5e=cs,$5e=ms,x5e=Hr.f,k5e=Yi.forEach,S5e=qt,lT=Ha,E5e=lT.set,T5e=lT.getterFor,Sg=function(t,r,e){var n=t.indexOf("Map")!==-1,i=t.indexOf("Weak")!==-1,a=n?"set":"add",o=d5e[t],s=o&&o.prototype,l={},u;if(!S5e||!y5e(o)||!(i||s.forEach&&!v5e(function(){new o().entries().next()})))u=e.getConstructor(r,t,n,a),f5e.enable();else{u=r(function(d,f){E5e(g5e(d,c),{type:t,collection:new o}),w5e(f)||m5e(f,d[a],{that:d,AS_ENTRIES:n})});var c=u.prototype,h=T5e(t);k5e(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d==="add"||d==="set";d in s&&!(i&&d==="clear")&&p5e(c,d,function(v,m){var b=h(this).collection;if(!f&&i&&!b5e(v))return d==="get"?void 0:!1;var y=b[d](v===0?0:v,m);return f?this:y})}),i||x5e(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return $5e(u,t,!1,!0),l[t]=u,h5e({global:!0,forced:!0},l),i||e.setStrong(u,t,n),u},_5e=su,Eg=function(t,r,e){for(var n in r)e&&e.unsafe&&t[n]?t[n]=r[n]:_5e(t,n,r[n],e);return t},O5e=nn,I5e=tg,C5e=kt,P5e=qt,P6=C5e("species"),A5e=function(t){var r=O5e(t);P5e&&r&&!r[P6]&&I5e(r,P6,{configurable:!0,get:function(){return this}})},M5e=ps,D5e=tg,A6=Eg,N5e=nu,R5e=kg,F5e=cs,z5e=xg,B5e=X1,fc=J1,L5e=A5e,Ps=qt,M6=F0.fastKey,uT=Ha,D6=uT.set,$v=uT.getterFor,cT={getConstructor:function(t,r,e,n){var i=t(function(u,c){R5e(u,a),D6(u,{type:r,index:M5e(null),first:void 0,last:void 0,size:0}),Ps||(u.size=0),F5e(c)||z5e(c,u[n],{that:u,AS_ENTRIES:e})}),a=i.prototype,o=$v(r),s=function(u,c,h){var d=o(u),f=l(u,c),v,m;return f?f.value=h:(d.last=f={index:m=M6(c,!0),key:c,value:h,previous:v=d.last,next:void 0,removed:!1},d.first||(d.first=f),v&&(v.next=f),Ps?d.size++:u.size++,m!=="F"&&(d.index[m]=f)),u},l=function(u,c){var h=o(u),d=M6(c),f;if(d!=="F")return h.index[d];for(f=h.first;f;f=f.next)if(f.key===c)return f};return A6(a,{clear:function(){for(var c=this,h=o(c),d=h.index,f=h.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete d[f.index],f=f.next;h.first=h.last=void 0,Ps?h.size=0:c.size=0},delete:function(u){var c=this,h=o(c),d=l(c,u);if(d){var f=d.next,v=d.previous;delete h.index[d.index],d.removed=!0,v&&(v.next=f),f&&(f.previous=v),h.first===d&&(h.first=f),h.last===d&&(h.last=v),Ps?h.size--:c.size--}return!!d},forEach:function(c){for(var h=o(this),d=N5e(c,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:h.first;)for(d(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(c){return!!l(this,c)}}),A6(a,e?{get:function(c){var h=l(this,c);return h&&h.value},set:function(c,h){return s(this,c===0?0:c,h)}}:{add:function(c){return s(this,c=c===0?0:c,c)}}),Ps&&D5e(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(t,r,e){var n=r+" Iterator",i=$v(r),a=$v(n);B5e(t,r,function(o,s){D6(this,{type:n,target:o,state:i(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,l=o.last;l&&l.removed;)l=l.previous;return!o.target||!(o.last=l=l?l.next:o.state.first)?(o.target=void 0,fc(void 0,!0)):fc(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},e?"entries":"values",!e,!0),L5e(r)}},j5e=Sg,H5e=cT;j5e("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},H5e);var W5e=qe,q5e=W5e.Map,U5e=q5e,V5e=U5e,G5e=V5e,hT=pe(G5e),K5e=function(){function t(){te(this,t),this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},At(this.options,this.defaultOptions)}return re(t,[{key:"setOptions",value:function(e){var n=["useDefaultGroups"];if(e!==void 0){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&He(n).call(n,i)===-1){var a=e[i];this.add(i,a)}}}},{key:"clear",value:function(){this._groups=new hT,this._groupNames=[]}},{key:"get",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this._groups.get(e);if(i===void 0&&n)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){var a=this._groupIndex%this._groupNames.length;++this._groupIndex,i={},i.color=this._groups.get(this._groupNames[a]),this._groups.set(e,i)}else{var o=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,i={},i.color=this._defaultGroups[o],this._groups.set(e,i)}return i}},{key:"add",value:function(e,n){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,n),n}}]),t}(),Y5e=ke;Y5e({target:"Number",stat:!0},{isNaN:function(r){return r!==r}});var X5e=qe,J5e=X5e.Number.isNaN,Z5e=J5e,Q5e=Z5e,e3e=Q5e,lm=pe(e3e),t3e=xt,r3e=t3e.isFinite,n3e=Number.isFinite||function(r){return typeof r=="number"&&r3e(r)},i3e=ke,a3e=n3e;i3e({target:"Number",stat:!0},{isFinite:a3e});var o3e=qe,s3e=o3e.Number.isFinite,l3e=s3e,u3e=l3e,c3e=u3e,ua=pe(c3e),h3e=ke,d3e=Yi.some,f3e=bs,v3e=f3e("some");h3e({target:"Array",proto:!0,forced:!v3e},{some:function(r){return d3e(this,r,arguments.length>1?arguments[1]:void 0)}});var p3e=Gt,m3e=p3e("Array").some,g3e=It,y3e=m3e,xv=Array.prototype,b3e=function(t){var r=t.some;return t===xv||g3e(xv,t)&&r===xv.some?y3e:r},w3e=b3e,$3e=w3e,x3e=$3e,k3e=pe(x3e),S3e=qe,E3e=S3e.Object.getOwnPropertySymbols,T3e=E3e,_3e=T3e,O3e=_3e,Li=pe(O3e),dT={exports:{}},I3e=ke,C3e=We,P3e=zn,fT=us.f,vT=qt,A3e=!vT||C3e(function(){fT(1)});I3e({target:"Object",stat:!0,forced:A3e,sham:!vT},{getOwnPropertyDescriptor:function(r,e){return fT(P3e(r),e)}});var M3e=qe,pT=M3e.Object,D3e=dT.exports=function(r,e){return pT.getOwnPropertyDescriptor(r,e)};pT.getOwnPropertyDescriptor.sham&&(D3e.sham=!0);var N3e=dT.exports,R3e=N3e,mT=R3e,F3e=mT,Ji=pe(F3e),z3e=ke,B3e=qt,L3e=r1e,j3e=zn,H3e=us,W3e=ys;z3e({target:"Object",stat:!0,sham:!B3e},{getOwnPropertyDescriptors:function(r){for(var e=j3e(r),n=H3e.f,i=L3e(e),a={},o=0,s,l;i.length>o;)l=n(e,s=i[o++]),l!==void 0&&W3e(a,s,l);return a}});var q3e=qe,U3e=q3e.Object.getOwnPropertyDescriptors,V3e=U3e,G3e=V3e,K3e=G3e,ji=pe(K3e),gT={exports:{}},Y3e=ke,X3e=qt,N6=x0.f;Y3e({target:"Object",stat:!0,forced:Object.defineProperties!==N6,sham:!X3e},{defineProperties:N6});var J3e=qe,yT=J3e.Object,Z3e=gT.exports=function(r,e){return yT.defineProperties(r,e)};yT.defineProperties.sham&&(Z3e.sham=!0);var Q3e=gT.exports,e6e=Q3e,t6e=e6e,r6e=t6e,z0=pe(r6e),n6e=xS,B0=pe(n6e);function L0(t,r,e){return r=tE(r),r in t?T0(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var bT=xt,i6e=We,a6e=Ge,o6e=Bn,s6e=fE.trim,l6e=lg,u6e=a6e("".charAt),xh=bT.parseFloat,R6=bT.Symbol,F6=R6&&R6.iterator,c6e=1/xh(l6e+"-0")!==-1/0||F6&&!i6e(function(){xh(Object(F6))}),h6e=c6e?function(r){var e=s6e(o6e(r)),n=xh(e);return n===0&&u6e(e,0)==="-"?-0:n}:xh,d6e=ke,z6=h6e;d6e({global:!0,forced:parseFloat!==z6},{parseFloat:z6});var f6e=qe,v6e=f6e.parseFloat,p6e=v6e,m6e=p6e,g6e=m6e,wT=pe(g6e),y6e=ke,b6e=We,w6e=_0.f,$6e=b6e(function(){return!Object.getOwnPropertyNames(1)});y6e({target:"Object",stat:!0,forced:$6e},{getOwnPropertyNames:w6e});var x6e=qe,k6e=x6e.Object,S6e=function(r){return k6e.getOwnPropertyNames(r)},E6e=S6e,T6e=E6e,_6e=T6e,O6e=pe(_6e);function Tg(t,r){var e=["node","edge","label"],n=!0,i=xi(r,"chosen");if(typeof i=="boolean")n=i;else if(Ze(i)==="object"){if(He(e).call(e,t)===-1)throw new Error("choosify: subOption '"+t+"' should be one of '"+e.join("', '")+"'");var a=xi(r,["chosen",t]);(typeof a=="boolean"||typeof a=="function")&&(n=a)}return n}function um(t,r,e){if(t.width<=0||t.height<=0)return!1;if(e!==void 0){var n={x:r.x-e.x,y:r.y-e.y};if(e.angle!==0){var i=-e.angle,a={x:Math.cos(i)*n.x-Math.sin(i)*n.y,y:Math.sin(i)*n.x+Math.cos(i)*n.y};r=a}else r=n}var o=t.x+t.width,s=t.y+t.width;return t.leftr.x&&t.topr.y}function kh(t){return typeof t=="string"&&t!==""}function $T(t,r,e,n){var i=n.x,a=n.y;if(typeof n.distanceToBorder=="function"){var o=n.distanceToBorder(t,r),s=Math.sin(r)*o,l=Math.cos(r)*o;l===o?(i+=o,a=n.y):s===o?(i=n.x,a-=o):(i+=l,a-=s)}else n.shape.width>n.shape.height?(i=n.x+n.shape.width*.5,a=n.y-e):(i=n.x+e,a=n.y-n.shape.height*.5);return{x:i,y:a}}var I6e=Gt,C6e=I6e("Array").values,P6e=C6e,A6e=P6e,M6e=ja,D6e=Vt,N6e=It,R6e=A6e,kv=Array.prototype,F6e={DOMTokenList:!0,NodeList:!0},z6e=function(t){var r=t.values;return t===kv||N6e(kv,t)&&r===kv.values||D6e(F6e,M6e(t))?R6e:r},B6e=z6e,xT=pe(B6e),L6e=function(){function t(r){te(this,t),this.measureText=r,this.current=0,this.width=0,this.height=0,this.lines=[]}return re(t,[{key:"_add",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});var a=n;(n===void 0||n==="")&&(a=" ");var o=this.measureText(a,i),s=At({},xT(o));s.text=n,s.width=o.width,s.mod=i,(n===void 0||n==="")&&(s.width=0),this.lines[e].blocks.push(s),this.lines[e].width+=s.width}},{key:"curWidth",value:function(){var e=this.lines[this.current];return e===void 0?0:e.width}},{key:"append",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,n)}},{key:"newLine",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,n),this.current++}},{key:"determineLineHeights",value:function(){for(var e=0;ee&&(e=a.width),n+=a.height}this.width=e,this.height=n}},{key:"removeEmptyBlocks",value:function(){for(var e=[],n=0;n"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},B6=function(){function t(r){te(this,t),this.text=r,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return re(t,[{key:"mod",value:function(){return this.modStack.length===0?"normal":this.modStack[0]}},{key:"modName",value:function(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}},{key:"parseWS",value:function(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}},{key:"setTag",value:function(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}},{key:"unsetTag",value:function(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(e,n){return!this.mono&&!this[e]&&this.match(n)?(this.setTag(e),!0):!1}},{key:"match",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this.prepareRegExp(e),a=bt(i,2),o=a[0],s=a[1],l=o.test(this.text.substr(this.position,s));return l&&n&&(this.position+=s-1),l}},{key:"parseEndTag",value:function(e,n,i){var a=this.mod()===e;return e==="mono"?a=a&&this.mono:a=a&&!this.mono,a&&this.match(n)?(i!==void 0?(this.position===this.text.length-1||this.match(i,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}},{key:"replace",value:function(e,n){return this.match(e)?(this.add(n),this.position+=length-1,!0):!1}},{key:"prepareRegExp",value:function(e){var n,i;if(e instanceof RegExp)i=e,n=1;else{var a=j6e[e];a!==void 0?i=a:i=new RegExp(e),n=e.length}return[i,n]}}]),t}(),H6e=function(){function t(r,e,n,i){var a=this;te(this,t),this.ctx=r,this.parent=e,this.selected=n,this.hover=i;var o=function(l,u){if(l===void 0)return 0;var c=a.parent.getFormattingValues(r,n,i,u),h=0;if(l!==""){var d=a.ctx.measureText(l);h=d.width}return{width:h,values:c}};this.lines=new L6e(o)}return re(t,[{key:"process",value:function(e){if(!kh(e))return this.lines.finalize();var n=this.parent.fontOptions;e=e.replace(/\r\n/g,` `),e=e.replace(/\r/g,` `);var i=String(e).split(` -`),a=i.length;if(n.multi)for(var o=0;o0)for(var l=0;l0)for(var v=0;v")||n.parseStartTag("ital","")||n.parseStartTag("mono","")||n.parseEndTag("bold","")||n.parseEndTag("ital","")||n.parseEndTag("mono",""))||i(a);o||n.add(a),n.position++}return n.emitBlock(),n.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var n=this,i=new B6(e),a=!0,o=function(c){return/\\/.test(c)?(i.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var n="",i=0;i1&&arguments[1]!==void 0?arguments[1]:"normal",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,n),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var a=e.split("\r");a.length>0;){var o=this.getLongestFit(a);if(o===0){var s=a[0],l=this.getLongestFitWord(s);this.lines.newLine(Xt(s).call(s,0,l),n),a[0]=Xt(s).call(s,l)}else{var u=o;a[o-1]===" "?o--:a[u]===" "&&u++;var c=Xt(a).call(a,0,o).join("");o==a.length&&i?this.lines.append(c,n):this.lines.newLine(c,n),a=Xt(a).call(a,u)}}}}]),t}(),As=["bold","ital","boldital","mono"],kT=function(){function t(r,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;te(this,t),this.body=r,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(e),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=n}return re(t,[{key:"setOptions",value:function(e){if(this.elementOptions=e,this.initFontOptions(e.font),kh(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(Ze(e.font)==="object"){var n=e.font.size;n!==void 0&&(this.baseSize=n)}}}},{key:"initFontOptions",value:function(e){var n=this;if(Ne(As,function(i){n.fontOptions[i]={}}),t.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}Ne(e,function(i,a){i!=null&&Ze(i)!=="object"&&(n.fontOptions[a]=i)})}},{key:"constrain",value:function(e){var n={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=xi(e,"widthConstraint");if(typeof i=="number")n.maxWdt=Number(i),n.minWdt=Number(i);else if(Ze(i)==="object"){var a=xi(e,["widthConstraint","maximum"]);typeof a=="number"&&(n.maxWdt=Number(a));var o=xi(e,["widthConstraint","minimum"]);typeof o=="number"&&(n.minWdt=Number(o))}var s=xi(e,"heightConstraint");if(typeof s=="number")n.minHgt=Number(s);else if(Ze(s)==="object"){var l=xi(e,["heightConstraint","minimum"]);typeof l=="number"&&(n.minHgt=Number(l));var u=xi(e,["heightConstraint","valign"]);typeof u=="string"&&(u==="top"||u==="bottom")&&(n.valign=u)}return n}},{key:"update",value:function(e,n){this.setOptions(e,!0),this.propagateFonts(n),st(this.fontOptions,this.constrain(n)),this.fontOptions.chooser=Tg("label",n)}},{key:"adjustSizes",value:function(e){var n=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=n,this.fontOptions.minWdt-=n);var i=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}},{key:"addFontOptionsToPile",value:function(e,n){for(var i=0;i5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label!==void 0){var l=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&l=this.elementOptions.scaling.label.maxVisible&&(l=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,a,o,n,i,s),this._drawBackground(e),this._drawText(e,n,this.size.yLine,s,l))}}},{key:"_drawBackground",value:function(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;var n=this.getSize();e.fillRect(n.left,n.top,n.width,n.height)}}},{key:"_drawText",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0,s=this._setAlignment(e,n,i,a),l=bt(s,2);n=l[0],i=l[1],e.textAlign="left",n=n-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(i-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(i+=(this.size.height-this.size.labelHeight)/2));for(var u=0;u0&&(e.lineWidth=f.strokeWidth,e.strokeStyle=y,e.lineJoin="round"),e.fillStyle=b,f.strokeWidth>0&&e.strokeText(f.text,n+h,i+f.vadjust),e.fillText(f.text,n+h,i+f.vadjust),h+=f.width}i+=c.height}}}},{key:"_setAlignment",value:function(e,n,i,a){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){n=0,i=0;var o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",i-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",i+=2*o):e.textBaseline="middle"}else e.textBaseline=a;return[n,i]}},{key:"_getColor",value:function(e,n,i){var a=e||"#000000",o=i||"#ffffff";if(n<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-n)));a=Kr(a,s),o=Kr(o,s)}return[a,o]}},{key:"getTextSize",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,n,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var e=2,n=this.size.left,i=this.size.top-.5*e;if(this.isEdgeLabel){var a=-this.size.width*.5;switch(this.fontOptions.align){case"middle":n=a,i=-this.size.height*.5;break;case"top":n=a,i=-(this.size.height+e);break;case"bottom":n=a,i=e;break}}var o={left:n,top:i,width:this.size.width,height:this.size.height};return o}},{key:"calculateLabelSize",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,n,i),this.size.left=a-this.size.width*.5,this.size.top=o-this.size.height*.5,this.size.yLine=o+(1-this.lineCount)*.5*this.fontOptions.size,s==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(e,n,i,a){var o=function(c,h,d){return h==="normal"?d==="mod"?"":c[d]:c[h][d]!==void 0?c[h][d]:c[d]},s={color:o(this.fontOptions,a,"color"),size:o(this.fontOptions,a,"size"),face:o(this.fontOptions,a,"face"),mod:o(this.fontOptions,a,"mod"),vadjust:o(this.fontOptions,a,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(n||i)&&(a==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,n,i));var l="";return s.mod!==void 0&&s.mod!==""&&(l+=s.mod+" "),l+=s.size+"px "+s.face,e.font=l.replace(/"/g,""),s.font=e.font,s.height=s.size,s}},{key:"differentState",value:function(e,n){return e!==this.selectedState||n!==this.hoverState}},{key:"_processLabelText",value:function(e,n,i,a){var o=new H6e(e,this,n,i);return o.process(a)}},{key:"_processLabel",value:function(e,n,i){if(!(this.labelDirty===!1&&!this.differentState(n,i))){var a=this._processLabelText(e,n,i,this.elementOptions.label);this.fontOptions.minWdt>0&&a.width0&&a.height0&&(this.enableBorderDashes(e,n),e.stroke(),this.disableBorderDashes(e,n)),e.restore()}},{key:"performFill",value:function(e,n){e.save(),e.fillStyle=n.color,this.enableShadow(e,n),vu(e).call(e),this.disableShadow(e,n),e.restore(),this.performStroke(e,n)}},{key:"_addBoundingBoxMargin",value:function(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}},{key:"_updateBoundingBox",value:function(e,n,i,a,o){i!==void 0&&this.resize(i,a,o),this.left=e-this.width/2,this.top=n-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(e,n,i,a,o){this._updateBoundingBox(e,n,i,a,o)}},{key:"getDimensionsFromLabel",value:function(e,n,i){this.textSize=this.labelModule.getTextSize(e,n,i);var a=this.textSize.width,o=this.textSize.height,s=14;return a===0&&(a=s,o=s),{width:a,height:o}}}]),t}();function Mwe(t){var r=Dwe();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function Dwe(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Nwe=function(t){Ve(e,t);var r=Mwe(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return re(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o);this.width=s.width+this.margin.right+this.margin.left,this.height=s.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,l,u){this.resize(i,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(i,u),qk(i,this.left,this.top,this.width,this.height,u.borderRadius),this.performFill(i,u),this.updateBoundingBox(a,o,i,s,l),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l)}},{key:"updateBoundingBox",value:function(i,a,o,s,l){this._updateBoundingBox(i,a,o,s,l);var u=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(u)}},{key:"distanceToBorder",value:function(i,a){i&&this.resize(i);var o=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(a)),Math.abs(this.height/2/Math.sin(a)))+o}}]),e}(Ga);function Rwe(t){var r=Fwe();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function Fwe(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Ig=function(t){Ve(e,t);var r=Rwe(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o.labelOffset=0,o.selected=!1,o}return re(e,[{key:"setOptions",value:function(i,a,o){this.options=i,a===void 0&&o===void 0||this.setImages(a,o)}},{key:"setImages",value:function(i,a){a&&this.selected?(this.imageObj=a,this.imageObjAlt=i):(this.imageObj=i,this.imageObjAlt=a)}},{key:"switchImages",value:function(i){var a=i&&!this.selected||!i&&this.selected;if(this.selected=i,this.imageObjAlt!==void 0&&a){var o=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=o}}},{key:"_getImagePadding",value:function(){var i={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var a=this.options.imagePadding;Ze(a)=="object"?(i.top=a.top,i.right=a.right,i.bottom=a.bottom,i.left=a.left):(i.top=a,i.right=a,i.bottom=a,i.left=a)}return i}},{key:"_resizeImage",value:function(){var i,a;if(this.options.shapeProperties.useImageSize===!1){var o=1,s=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?o=this.imageObj.width/this.imageObj.height:s=this.imageObj.height/this.imageObj.width),i=this.options.size*2*o,a=this.options.size*2*s}else{var l=this._getImagePadding();i=this.imageObj.width+l.left+l.right,a=this.imageObj.height+l.top+l.bottom}this.width=i,this.height=a,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(i,a,o,s){this.initContextForDraw(i,s),V1(i,a,o,s.size),this.performFill(i,s)}},{key:"_drawImageAtPosition",value:function(i,a){if(this.imageObj.width!=0){i.globalAlpha=a.opacity!==void 0?a.opacity:1,this.enableShadow(i,a);var o=1;this.options.shapeProperties.interpolation===!0&&(o=this.imageObj.width/this.width/this.body.view.scale);var s=this._getImagePadding(),l=this.left+s.left,u=this.top+s.top,c=this.width-s.left-s.right,h=this.height-s.top-s.bottom;this.imageObj.drawImageAtPosition(i,o,l,u,c,h),this.disableShadow(i,a)}}},{key:"_drawImageLabel",value:function(i,a,o,s,l){var u=0;if(this.height!==void 0){u=this.height*.5;var c=this.labelModule.getTextSize(i,s,l);c.lineCount>=1&&(u+=c.height/2)}var h=o+u;this.options.label&&(this.labelOffset=u),this.labelModule.draw(i,a,h,s,l,"hanging")}}]),e}(Ga);function zwe(t){var r=Bwe();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function Bwe(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Lwe=function(t){Ve(e,t);var r=zwe(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return re(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o),l=Math.max(s.width+this.margin.right+this.margin.left,s.height+this.margin.top+this.margin.bottom);this.options.size=l/2,this.width=l,this.height=l,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,l,u){this.resize(i,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this._drawRawCircle(i,a,o,u),this.updateBoundingBox(a,o),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,o,s,l)}},{key:"updateBoundingBox",value:function(i,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.width*.5}}]),e}(Ig);function jwe(t){var r=Hwe();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function Hwe(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Wwe=function(t){Ve(e,t);var r=jwe(e);function e(n,i,a,o,s){var l;return te(this,e),l=r.call(this,n,i,a),l.setImages(o,s),l}return re(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var l=this.options.size*2;this.width=l,this.height=l,this.radius=.5*this.width;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(i,a,o,s,l,u){this.switchImages(s),this.resize();var c=a,h=o;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,c+=this.width/2,h+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this._drawRawCircle(i,c,h,u),i.save(),i.clip(),this._drawImageAtPosition(i,u),i.restore(),this._drawImageLabel(i,c,h,s,l),this.updateBoundingBox(a,o)}},{key:"updateBoundingBox",value:function(i,a){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=a,this.boundingBox.left=i,this.boundingBox.right=i+this.options.size*2,this.boundingBox.bottom=a+this.options.size*2):(this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.width*.5}}]),e}(Ig);function qwe(t){var r=Uwe();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function Uwe(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Zi=function(t){Ve(e,t);var r=qwe(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(a,o)){var l,u;this.labelModule.getTextSize(i,a,o);var c=2*s.size;this.width=(l=this.customSizeWidth)!==null&&l!==void 0?l:c,this.height=(u=this.customSizeHeight)!==null&&u!==void 0?u:c,this.radius=.5*this.width}}},{key:"_drawShape",value:function(i,a,o,s,l,u,c,h){var d=this;return this.resize(i,u,c,h),this.left=s-this.width/2,this.top=l-this.height/2,this.initContextForDraw(i,h),Tue(a)(i,s,l,h.size),this.performFill(i,h),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(i.font=(u?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),i.fillStyle=this.options.icon.color||"black",i.textAlign="center",i.textBaseline="middle",i.fillText(this.options.icon.code,s,l)),{drawExternalLabel:function(){if(d.options.label!==void 0){d.labelModule.calculateLabelSize(i,u,c,s,l,"hanging");var v=l+.5*d.height+.5*d.labelModule.size.height;d.labelModule.draw(i,s,v,u,c,"hanging")}d.updateBoundingBox(s,l)}}}},{key:"updateBoundingBox",value:function(i,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),e}(Ga);function q6(t,r){var e=yt(t);if(Li){var n=Li(t);r&&(n=kr(n).call(n,function(i){return Ji(t,i).enumerable})),e.push.apply(e,n)}return e}function Vwe(t){for(var r=1;r"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Ywe=function(t){Ve(e,t);var r=Gwe(e);function e(n,i,a,o){var s;return te(this,e),s=r.call(this,n,i,a,o),s.ctxRenderer=o,s}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){this.resize(i,s,l,u),this.left=a-this.width/2,this.top=o-this.height/2,i.save();var c=this.ctxRenderer({ctx:i,id:this.options.id,x:a,y:o,state:{selected:s,hover:l},style:Vwe({},u),label:this.options.label});if(c.drawNode!=null&&c.drawNode(),i.restore(),c.drawExternalLabel){var h=c.drawExternalLabel;c.drawExternalLabel=function(){i.save(),h(),i.restore()}}return c.nodeDimensions&&(this.customSizeWidth=c.nodeDimensions.width,this.customSizeHeight=c.nodeDimensions.height),c}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function Xwe(t){var r=Jwe();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function Jwe(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Zwe=function(t){Ve(e,t);var r=Xwe(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return re(e,[{key:"resize",value:function(i,a,o){if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o),l=s.width+this.margin.right+this.margin.left;this.width=l,this.height=l,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,l,u){this.resize(i,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(i,u),Uk(i,a-this.width/2,o-this.height/2,this.width,this.height),this.performFill(i,u),this.updateBoundingBox(a,o,i,s,l),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Ga);function Qwe(t){var r=e7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function e7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var t7e=function(t){Ve(e,t);var r=Qwe(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"diamond",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function r7e(t){var r=n7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function n7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var i7e=function(t){Ve(e,t);var r=r7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"circle",2,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.options.size}}]),e}(Zi);function a7e(t){var r=o7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function o7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var U6=function(t){Ve(e,t);var r=a7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o);this.height=s.height*2,this.width=s.width+s.height,this.radius=.5*this.width}}},{key:"draw",value:function(i,a,o,s,l,u){this.resize(i,s,l),this.left=a-this.width*.5,this.top=o-this.height*.5,this.initContextForDraw(i,u),zp(i,this.left,this.top,this.width,this.height),this.performFill(i,u),this.updateBoundingBox(a,o,i,s,l),this.labelModule.draw(i,a,o,s,l)}},{key:"distanceToBorder",value:function(i,a){i&&this.resize(i);var o=this.width*.5,s=this.height*.5,l=Math.sin(a)*o,u=Math.cos(a)*s;return o*s/Math.sqrt(l*l+u*u)}}]),e}(Ga);function s7e(t){var r=l7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function l7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var u7e=function(t){Ve(e,t);var r=s7e(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return re(e,[{key:"resize",value:function(i,a,o){this.needsRefresh(a,o)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(i,a,o,s,l,u){var c=this;return this.resize(i,s,l),this.options.icon.size=this.options.icon.size||50,this.left=a-this.width/2,this.top=o-this.height/2,this._icon(i,a,o,s,l,u),{drawExternalLabel:function(){if(c.options.label!==void 0){var d=5;c.labelModule.draw(i,c.left+c.iconSize.width/2+c.margin.left,o+c.height/2+d,s)}c.updateBoundingBox(a,o)}}}},{key:"updateBoundingBox",value:function(i,a){if(this.boundingBox.top=a-this.options.icon.size*.5,this.boundingBox.left=i-this.options.icon.size*.5,this.boundingBox.right=i+this.options.icon.size*.5,this.boundingBox.bottom=a+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0){var o=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+o)}}},{key:"_icon",value:function(i,a,o,s,l,u){var c=Number(this.options.icon.size);this.options.icon.code!==void 0?(i.font=[this.options.icon.weight!=null?this.options.icon.weight:s?"bold":"",(this.options.icon.weight!=null&&s?5:0)+c+"px",this.options.icon.face].join(" "),i.fillStyle=this.options.icon.color||"black",i.textAlign="center",i.textBaseline="middle",this.enableShadow(i,u),i.fillText(this.options.icon.code,a,o),this.disableShadow(i,u)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Ga);function c7e(t){var r=h7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function h7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var d7e=function(t){Ve(e,t);var r=c7e(e);function e(n,i,a,o,s){var l;return te(this,e),l=r.call(this,n,i,a),l.setImages(o,s),l}return re(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var l=this.options.size*2;this.width=l,this.height=l;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(i,a,o,s,l,u){i.save(),this.switchImages(s),this.resize();var c=a,h=o;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,c+=this.width/2,h+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){var d=this.options.borderWidth,f=this.options.borderWidthSelected||2*this.options.borderWidth,v=(s?f:d)/this.body.view.scale;i.lineWidth=Math.min(this.width,v),i.beginPath();var g=s?this.options.color.highlight.border:l?this.options.color.hover.border:this.options.color.border,b=s?this.options.color.highlight.background:l?this.options.color.hover.background:this.options.color.background;u.opacity!==void 0&&(g=Kr(g,u.opacity),b=Kr(b,u.opacity)),i.strokeStyle=g,i.fillStyle=b,i.rect(this.left-.5*i.lineWidth,this.top-.5*i.lineWidth,this.width+i.lineWidth,this.height+i.lineWidth),vu(i).call(i),this.performStroke(i,u),i.closePath()}this._drawImageAtPosition(i,u),this._drawImageLabel(i,c,h,s,l),this.updateBoundingBox(a,o),i.restore()}},{key:"updateBoundingBox",value:function(i,a){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=i,this.top=a):(this.left=i-this.width/2,this.top=a-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Ig);function f7e(t){var r=v7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function v7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var p7e=function(t){Ve(e,t);var r=f7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"square",2,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function m7e(t){var r=g7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function g7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var y7e=function(t){Ve(e,t);var r=m7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"hexagon",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function b7e(t){var r=w7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function w7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var $7e=function(t){Ve(e,t);var r=b7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"star",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function x7e(t){var r=k7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function k7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var S7e=function(t){Ve(e,t);var r=x7e(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return re(e,[{key:"resize",value:function(i,a,o){this.needsRefresh(a,o)&&(this.textSize=this.labelModule.getTextSize(i,a,o),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(i,a,o,s,l,u){this.resize(i,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.enableShadow(i,u),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l),this.disableShadow(i,u),this.updateBoundingBox(a,o,i,s,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Ga);function E7e(t){var r=T7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function T7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var _7e=function(t){Ve(e,t);var r=E7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"triangle",3,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function O7e(t){var r=I7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function I7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var C7e=function(t){Ve(e,t);var r=O7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"triangleDown",3,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function V6(t,r){var e=yt(t);if(Li){var n=Li(t);r&&(n=kr(n).call(n,function(i){return Ji(t,i).enumerable})),e.push.apply(e,n)}return e}function G6(t){for(var r=1;re.left&&this.shape.tope.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}}],[{key:"checkOpacity",value:function(e){return 0<=e&&e<=1}},{key:"checkCoordinateOrigin",value:function(e){return e===void 0||e==="center"||e==="top-left"}},{key:"updateGroupOptions",value:function(e,n,i){var a;if(i!==void 0){var o=e.group;if(n!==void 0&&n.group!==void 0&&o!==n.group)throw new Error("updateGroupOptions: group values in options don't match.");var s=typeof o=="number"||typeof o=="string"&&o!="";if(s){var l=i.get(o);l.opacity!==void 0&&n.opacity===void 0&&(t.checkOpacity(l.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+l.opacity),l.opacity=void 0));var u=kr(a=O6e(n)).call(a,function(c){return n[c]!=null});u.push("font"),wh(u,e,l),e.color=im(e.color)}}}},{key:"parseOptions",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,s=["color","fixed","shadow"];if(wh(s,e,n,i),t.checkMass(n),e.opacity!==void 0&&(t.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),n.opacity!==void 0&&(t.checkOpacity(n.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+n.opacity),n.opacity=void 0)),n.shapeProperties&&!t.checkCoordinateOrigin(n.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+n.shapeProperties.coordinateOrigin),Ur(e,n,"shadow",a),n.color!==void 0&&n.color!==null){var l=im(n.color);GE(e.color,l)}else i===!0&&n.color===null&&(e.color=Di(a.color));n.fixed!==void 0&&n.fixed!==null&&(typeof n.fixed=="boolean"?(e.fixed.x=n.fixed,e.fixed.y=n.fixed):(n.fixed.x!==void 0&&typeof n.fixed.x=="boolean"&&(e.fixed.x=n.fixed.x),n.fixed.y!==void 0&&typeof n.fixed.y=="boolean"&&(e.fixed.y=n.fixed.y))),i===!0&&n.font===null&&(e.font=Di(a.font)),t.updateGroupOptions(e,n,o),n.scaling!==void 0&&Ur(e.scaling,n.scaling,"label",a.scaling)}},{key:"checkMass",value:function(e,n){if(e.mass!==void 0&&e.mass<=0){var i="";n!==void 0&&(i=" in node id: "+n),console.error("%cNegative or zero mass disallowed"+i+", setting mass to 1.",JE),e.mass=1}}}]),t}();function P7e(t,r){var e=typeof Xi<"u"&&qa(t)||t["@@iterator"];if(!e){if(Xe(t)||(e=A7e(t))||r){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function A7e(t,r){var e;if(t){if(typeof t=="string")return K6(t,r);var n=Xt(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Wa(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K6(t,r)}}function K6(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(var n in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,n)&&this.body.nodes[n].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(var i=0,a=yt(this.body.nodes);i1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.data.nodes;if(kk("id",e))this.body.data.nodes=e;else if(Xe(e))this.body.data.nodes=new hh,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new hh;else throw new TypeError("Array or DataSet expected");if(i&&Ne(this.nodesListeners,function(s,l){i.off(l,s)}),this.body.nodes={},this.body.data.nodes){var a=this;Ne(this.nodesListeners,function(s,l){a.body.data.nodes.on(l,s)});var o=this.body.data.nodes.getIds();this.add(o,!0)}n===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i,a=[],o=0;o1&&arguments[1]!==void 0?arguments[1]:Mr;return new n(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ne(this.body.nodes,function(i,a){var o=e.body.data.nodes.get(a);o!==void 0&&(n===!0&&i.setOptions({x:null,y:null}),i.setOptions({fixed:!1}),i.setOptions(o))})}},{key:"getPositions",value:function(e){var n={};if(e!==void 0){if(Xe(e)===!0){for(var i=0;i0?(l=s/o,n+=l*l):n+=s;return o===1/0?1/0:o*o$e(n)}});var l$e=We,u$e=l$e.Math.hypot,c$e=u$e,h$e=c$e,d$e=h$e,f$e=pe(d$e);function OT(t){var r=v$e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function v$e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Ot=function(){function t(){te(this,t)}return re(t,null,[{key:"transform",value:function(e,n){Xe(e)||(e=[e]);for(var i=n.point.x,a=n.point.y,o=n.angle,s=n.length,l=0;l4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,n),e.lineWidth=n.width,n.dashes!==!1?this._drawDashedLine(e,n,o):this._drawLine(e,n,o)}},{key:"_drawLine",value:function(e,n,i,a,o){if(this.from!=this.to)this._line(e,n,i,a,o);else{var s=this._getCircleData(e),l=bt(s,3),u=l[0],c=l[1],h=l[2];this._circle(e,n,u,c,h)}}},{key:"_drawDashedLine",value:function(e,n,i,a,o){e.lineCap="round";var s=Xe(n.dashes)?n.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,n,i);else{var l=this._getCircleData(e),u=bt(l,3),c=u[0],h=u[1],d=u[2];this._circle(e,n,c,h,d)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)Vk(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{var f=this._getCircleData(e),v=bt(f,3),g=v[0],b=v[1],y=v[2];this._circle(e,n,g,b,y)}this.enableShadow(e,n),e.stroke(),this.disableShadow(e,n)}}},{key:"findBorderPosition",value:function(e,n,i){return this.from!=this.to?this._findBorderPosition(e,n,i):this._findBorderPositionCircle(e,n,i)}},{key:"findBorderPositions",value:function(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};var n,i=Xt(n=this._getCircleData(e)).call(n,0,2),a=bt(i,2),o=a[0],s=a[1];return{from:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(e){var n=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);var i=$T(e,this.options.selfReference.angle,n,this.from);return[i.x,i.y,n]}},{key:"_pointOnCircle",value:function(e,n,i,a){var o=a*2*Math.PI;return{x:e+i*Math.cos(o),y:n-i*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,n,i){var a=i.x,o=i.y,s=i.low,l=i.high,u=i.direction,c=10,h=this.options.selfReference.size,d=.05,f,v=(s+l)*.5,g=0;this.options.arrowStrikethrough===!0&&(u===-1?g=this.options.endPointOffset.from:u===1&&(g=this.options.endPointOffset.to));var b=0;do{v=(s+l)*.5,f=this._pointOnCircle(a,o,h,v);var y=Math.atan2(e.y-f.y,e.x-f.x),$=e.distanceToBorder(n,y)+g,k=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),_=$-k;if(Math.abs(_)0?u>0?s=v:l=v:u>0?l=v:s=v,++b}while(s<=l&&b1?h=1:h<0&&(h=0);var d=e+h*l,f=n+h*u,v=d-o,g=f-s;return Math.sqrt(v*v+g*g)}},{key:"getArrowData",value:function(e,n,i,a,o,s){var l,u,c,h,d,f,v,g=s.width;n==="from"?(c=this.from,h=this.to,d=s.fromArrowScale<0,f=Math.abs(s.fromArrowScale),v=s.fromArrowType):n==="to"?(c=this.to,h=this.from,d=s.toArrowScale<0,f=Math.abs(s.toArrowScale),v=s.toArrowType):(c=this.to,h=this.from,d=s.middleArrowScale<0,f=Math.abs(s.middleArrowScale),v=s.middleArrowType);var b=15*f+3*g;if(c!=h){var y=f$e(c.x-h.x,c.y-h.y),$=b/y;if(n!=="middle")if(this.options.smooth.enabled===!0){var k=this._findBorderPosition(c,e,{via:i}),_=this.getPoint(k.t+$*(n==="from"?1:-1),i);l=Math.atan2(k.y-_.y,k.x-_.x),u=k}else l=Math.atan2(c.y-h.y,c.x-h.x),u=this._findBorderPosition(c,e);else{var P=(d?-$:$)/2,S=this.getPoint(.5+P,i),D=this.getPoint(.5-P,i);l=Math.atan2(S.y-D.y,S.x-D.x),u=this.getPoint(.5,i)}}else{var B=this._getCircleData(e),R=bt(B,3),A=R[0],z=R[1],L=R[2];if(n==="from"){var J=this.options.selfReference.angle,ie=this.options.selfReference.angle+Math.PI,oe=this._findBorderPositionCircle(this.from,e,{x:A,y:z,low:J,high:ie,direction:-1});l=oe.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=oe}else if(n==="to"){var me=this.options.selfReference.angle,Ce=this.options.selfReference.angle+Math.PI,ne=this._findBorderPositionCircle(this.from,e,{x:A,y:z,low:me,high:Ce,direction:1});l=ne.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=ne}else{var ue=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(A,z,L,ue),l=ue*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var T=u.x-b*.9*Math.cos(l),ge=u.y-b*.9*Math.sin(l),ye={x:T,y:ge};return{point:u,core:ye,angle:l,length:b,type:v}}},{key:"drawArrowHead",value:function(e,n,i,a,o){e.strokeStyle=this.getColor(e,n),e.fillStyle=e.strokeStyle,e.lineWidth=n.width;var s=IT.draw(e,o);s&&(this.enableShadow(e,n),vu(e).call(e),this.disableShadow(e,n))}},{key:"enableShadow",value:function(e,n){n.shadow===!0&&(e.shadowColor=n.shadowColor,e.shadowBlur=n.shadowSize,e.shadowOffsetX=n.shadowX,e.shadowOffsetY=n.shadowY)}},{key:"disableShadow",value:function(e,n){n.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,n){if(n.background!==!1){var i={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=n.backgroundColor,e.lineWidth=n.backgroundSize,this.setStrokeDashed(e,n.backgroundDashes),e.stroke(),e.strokeStyle=i.strokeStyle,e.lineWidth=i.lineWidth,e.dashes=i.dashes,this.setStrokeDashed(e,n.dashes)}}},{key:"setStrokeDashed",value:function(e,n){if(n!==!1)if(e.setLineDash!==void 0){var i=Xe(n)?n:[5,5];e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),t}();function ew(t,r){var e=yt(t);if(Li){var n=Li(t);r&&(n=kr(n).call(n,function(i){return Ji(t,i).enumerable})),e.push.apply(e,n)}return e}function tw(t){for(var r=1;r"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Cg=function(t){Ve(e,t);var r=_$e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"_findBorderPositionBezier",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),s=10,l=.2,u=!1,c=1,h=0,d=this.to,f,v,g=this.options.endPointOffset?this.options.endPointOffset.to:0;i.id===this.from.id&&(d=this.from,u=!0,g=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(g=0);var b=0;do{v=(h+c)*.5,f=this.getPoint(v,o);var y=Math.atan2(d.y-f.y,d.x-f.x),$=d.distanceToBorder(a,y)+g,k=Math.sqrt(Math.pow(f.x-d.x,2)+Math.pow(f.y-d.y,2)),_=$-k;if(Math.abs(_)0&&(d=this._getDistanceToLine(y,$,g,b,l,u),h=d"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var rw=function(t){Ve(e,t);var r=I$e(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o.via=o.via,o._boundFunction=function(){o.positionBezierNode()},o._body.emitter.on("_repositionBezierNodes",o._boundFunction),o}return re(e,[{key:"setOptions",value:function(i){Bc(ce(e.prototype),"setOptions",this).call(this,i);var a=!1;this.options.physics!==i.physics&&(a=!0),this.options=i,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),a===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}},{key:"setupSupportNode",value:function(){if(this.via===void 0){var i="edgeId:"+this.id,a=this._body.functions.createNode({id:i,shape:"circle",physics:!0,hidden:!0});this._body.nodes[i]=a,this.via=a,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(i,a,o){this._bezierCurve(i,a,o)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var o=this._getCircleData(),s=bt(o,3),l=s[0],u=s[1],c=s[2],h=2*Math.PI*(1-i);return{x:l+c*Math.sin(h),y:u+c-c*(1-Math.cos(h))}}else return{x:Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*a.x+Math.pow(i,2)*this.toPoint.x,y:Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*a.y+Math.pow(i,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(i,a){return this._findBorderPositionBezier(i,a,this.via)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,l,u){return this._getDistanceToBezierEdge(i,a,o,s,l,u,this.via)}}]),e}(Cg);function P$e(t){var r=A$e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function A$e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var nw=function(t){Ve(e,t);var r=P$e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"_line",value:function(i,a,o){this._bezierCurve(i,a,o)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var i=this.options.smooth.roundness,a=this.options.smooth.type,o=Math.abs(this.from.x-this.to.x),s=Math.abs(this.from.y-this.to.y);if(a==="discrete"||a==="diagonalCross"){var l,u;o<=s?l=u=i*s:l=u=i*o,this.from.x>this.to.x&&(l=-l),this.from.y>=this.to.y&&(u=-u);var c=this.from.x+l,h=this.from.y+u;return a==="discrete"&&(o<=s?c=othis.to.x&&(B=-B),this.from.y>=this.to.y&&(R=-R);var A=this.from.x+B,z=this.from.y+R;return o<=s?this.from.x<=this.to.x?A=this.to.xA?this.to.x:A:this.from.y>=this.to.y?z=this.to.y>z?this.to.y:z:z=this.to.y2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(i,a,o.via)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,l,u){var c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(i,a,o,s,l,u,c)}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=i,s=Math.pow(1-o,2)*this.fromPoint.x+2*o*(1-o)*a.x+Math.pow(o,2)*this.toPoint.x,l=Math.pow(1-o,2)*this.fromPoint.y+2*o*(1-o)*a.y+Math.pow(o,2)*this.toPoint.y;return{x:s,y:l}}}]),e}(Cg);function M$e(t){var r=D$e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function D$e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var N$e=function(t){Ve(e,t);var r=M$e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"_getDistanceToBezierEdge2",value:function(i,a,o,s,l,u,c,h){for(var d=1e9,f=i,v=a,g=[0,0,0,0],b=1;b<10;b++){var y=.1*b;g[0]=Math.pow(1-y,3),g[1]=3*y*Math.pow(1-y,2),g[2]=3*Math.pow(y,2)*(1-y),g[3]=Math.pow(y,3);var $=g[0]*i+g[1]*c.x+g[2]*h.x+g[3]*o,k=g[0]*a+g[1]*c.y+g[2]*h.y+g[3]*s;if(b>0){var _=this._getDistanceToLine(f,v,$,k,l,u);d=_"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var iw=function(t){Ve(e,t);var r=R$e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"_line",value:function(i,a,o){var s=o[0],l=o[1];this._bezierCurve(i,a,s,l)}},{key:"_getViaCoordinates",value:function(){var i=this.from.x-this.to.x,a=this.from.y-this.to.y,o,s,l,u,c=this.options.smooth.roundness;return(Math.abs(i)>Math.abs(a)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(s=this.from.y,u=this.to.y,o=this.from.x-c*i,l=this.to.x+c*i):(s=this.from.y-c*a,u=this.to.y+c*a,o=this.from.x,l=this.to.x),[{x:o,y:s},{x:l,y:u}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(i,a){return this._findBorderPositionBezier(i,a)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,l,u){var c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),h=bt(c,2),d=h[0],f=h[1];return this._getDistanceToBezierEdge2(i,a,o,s,l,u,d,f)}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=bt(a,2),s=o[0],l=o[1],u=i,c=[Math.pow(1-u,3),3*u*Math.pow(1-u,2),3*Math.pow(u,2)*(1-u),Math.pow(u,3)],h=c[0]*this.fromPoint.x+c[1]*s.x+c[2]*l.x+c[3]*this.toPoint.x,d=c[0]*this.fromPoint.y+c[1]*s.y+c[2]*l.y+c[3]*this.toPoint.y;return{x:h,y:d}}}]),e}(N$e);function z$e(t){var r=B$e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function B$e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var aw=function(t){Ve(e,t);var r=z$e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"_line",value:function(i,a){i.beginPath(),i.moveTo(this.fromPoint.x,this.fromPoint.y),i.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(i,a),i.stroke(),this.disableShadow(i,a)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(i){return{x:(1-i)*this.fromPoint.x+i*this.toPoint.x,y:(1-i)*this.fromPoint.y+i*this.toPoint.y}}},{key:"_findBorderPosition",value:function(i,a){var o=this.to,s=this.from;i.id===this.from.id&&(o=this.from,s=this.to);var l=Math.atan2(o.y-s.y,o.x-s.x),u=o.x-s.x,c=o.y-s.y,h=Math.sqrt(u*u+c*c),d=i.distanceToBorder(a,l),f=(h-d)/h;return{x:(1-f)*s.x+f*o.x,y:(1-f)*s.y+f*o.y,t:0}}},{key:"_getDistanceToEdge",value:function(i,a,o,s,l,u){return this._getDistanceToLine(i,a,o,s,l,u)}}]),e}(CT),Oo=function(){function t(r,e,n,i,a){if(te(this,t),e===void 0)throw new Error("No body provided");this.options=Di(i),this.globalOptions=i,this.defaultOptions=a,this.body=e,this.imagelist=n,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new kT(this.body,this.options,!0),this.setOptions(r)}return re(t,[{key:"setOptions",value:function(e){if(e){var n=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;t.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=wT(e.value));var i=[e,this.options,this.defaultOptions];return this.chooser=Tg("edge",i),this.updateLabelModule(e),n=this.updateEdgeType()||n,this._setInteractionWidths(),this.connect(),n}}},{key:"getFormattingValues",value:function(){var e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,n=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,i=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,a=this.options.color.inherit,o={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:n,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:a?void 0:this.options.color.color,inheritsColor:a,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){var s=this.options.selectionWidth;typeof s=="function"?o.width=s(o.width):typeof s=="number"&&(o.width+=s),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.highlight,o.shadow=this.options.shadow.enabled}else if(this.hover){var l=this.options.hoverWidth;typeof l=="function"?o.width=l(o.width):typeof l=="number"&&(o.width+=l),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(o,this.options.id,this.selected,this.hover),o.color!==void 0&&(o.inheritsColor=!1),o.shadow===!1&&(o.shadowColor!==this.options.shadow.color||o.shadowSize!==this.options.shadow.size||o.shadowX!==this.options.shadow.x||o.shadowY!==this.options.shadow.y)&&(o.shadow=!0));else o.shadow=this.options.shadow.enabled,o.width=Math.max(o.width,.3/this.body.view.scale);return o}},{key:"updateLabelModule",value:function(e){var n=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,n),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var e=this.options.smooth,n=!1,i=!0;return this.edgeType!==void 0&&((this.edgeType instanceof rw&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof iw&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof nw&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof aw&&e.type.enabled===!1)&&(i=!1),i===!0&&(n=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(n=!0,this.edgeType=new rw(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new iw(this.options,this.body,this.labelModule):this.edgeType=new nw(this.options,this.body,this.labelModule):this.edgeType=new aw(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),n}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(e,n,i){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,n,i,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.width=this.options.scaling.min+a*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(e){var n=this.getFormattingValues();if(!n.hidden){var i=this.edgeType.getViaNode();this.edgeType.drawLine(e,n,this.selected,this.hover,i),this.drawLabel(e,i)}}},{key:"drawArrows",value:function(e){var n=this.getFormattingValues();if(!n.hidden){var i=this.edgeType.getViaNode(),a={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,n.fromArrow&&(a.from=this.edgeType.getArrowData(e,"from",i,this.selected,this.hover,n),n.arrowStrikethrough===!1&&(this.edgeType.fromPoint=a.from.core),n.fromArrowSrc&&(a.from.image=this.imagelist.load(n.fromArrowSrc)),n.fromArrowImageWidth&&(a.from.imageWidth=n.fromArrowImageWidth),n.fromArrowImageHeight&&(a.from.imageHeight=n.fromArrowImageHeight)),n.toArrow&&(a.to=this.edgeType.getArrowData(e,"to",i,this.selected,this.hover,n),n.arrowStrikethrough===!1&&(this.edgeType.toPoint=a.to.core),n.toArrowSrc&&(a.to.image=this.imagelist.load(n.toArrowSrc)),n.toArrowImageWidth&&(a.to.imageWidth=n.toArrowImageWidth),n.toArrowImageHeight&&(a.to.imageHeight=n.toArrowImageHeight)),n.middleArrow&&(a.middle=this.edgeType.getArrowData(e,"middle",i,this.selected,this.hover,n),n.middleArrowSrc&&(a.middle.image=this.imagelist.load(n.middleArrowSrc)),n.middleArrowImageWidth&&(a.middle.imageWidth=n.middleArrowImageWidth),n.middleArrowImageHeight&&(a.middle.imageHeight=n.middleArrowImageHeight)),n.fromArrow&&this.edgeType.drawArrowHead(e,n,this.selected,this.hover,a.from),n.middleArrow&&this.edgeType.drawArrowHead(e,n,this.selected,this.hover,a.middle),n.toArrow&&this.edgeType.drawArrowHead(e,n,this.selected,this.hover,a.to)}}},{key:"drawLabel",value:function(e,n){if(this.options.label!==void 0){var i=this.from,a=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);var o;if(i.id!=a.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,n),e.save();var s=this._getRotation(e);s.angle!=0&&(e.translate(s.x,s.y),e.rotate(s.angle)),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;var l=$T(e,this.options.selfReference.angle,this.options.selfReference.size,i);o=this._pointOnCircle(l.x,l.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(e){var n=[];if(this.labelModule.visible()){var i=this._getRotation();um(this.labelModule.getSize(),e,i)&&n.push({edgeId:this.id,labelId:0})}var a={left:e.x,top:e.y};return this.isOverlappingWith(a)&&n.push({edgeId:this.id}),n}},{key:"isOverlappingWith",value:function(e){if(this.connected){var n=10,i=this.from.x,a=this.from.y,o=this.to.x,s=this.to.y,l=e.left,u=e.top,c=this.edgeType.getDistanceToEdge(i,a,o,s,l,u);return c0&&s<0)&&(l+=Math.PI),a.angle=l,a}},{key:"_pointOnCircle",value:function(e,n,i,a){return{x:e+i*Math.cos(a),y:n-i*Math.sin(a)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}],[{key:"parseOptions",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"];if($s(s,e,n,i),n.endPointOffset!==void 0&&n.endPointOffset.from!==void 0&&(ua(n.endPointOffset.from)?e.endPointOffset.from=n.endPointOffset.from:(e.endPointOffset.from=a.endPointOffset.from!==void 0?a.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),n.endPointOffset!==void 0&&n.endPointOffset.to!==void 0&&(ua(n.endPointOffset.to)?e.endPointOffset.to=n.endPointOffset.to:(e.endPointOffset.to=a.endPointOffset.to!==void 0?a.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),kh(n.label)?e.label=n.label:kh(e.label)||(e.label=void 0),Ur(e,n,"smooth",a),Ur(e,n,"shadow",a),Ur(e,n,"background",a),n.dashes!==void 0&&n.dashes!==null?e.dashes=n.dashes:i===!0&&n.dashes===null&&(e.dashes=ya(a.dashes)),n.scaling!==void 0&&n.scaling!==null?(n.scaling.min!==void 0&&(e.scaling.min=n.scaling.min),n.scaling.max!==void 0&&(e.scaling.max=n.scaling.max),Ur(e.scaling,n.scaling,"label",a.scaling)):i===!0&&n.scaling===null&&(e.scaling=ya(a.scaling)),n.arrows!==void 0&&n.arrows!==null)if(typeof n.arrows=="string"){var l=n.arrows.toLowerCase();e.arrows.to.enabled=je(l).call(l,"to")!=-1,e.arrows.middle.enabled=je(l).call(l,"middle")!=-1,e.arrows.from.enabled=je(l).call(l,"from")!=-1}else if(Ze(n.arrows)==="object")Ur(e.arrows,n.arrows,"to",a.arrows),Ur(e.arrows,n.arrows,"middle",a.arrows),Ur(e.arrows,n.arrows,"from",a.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+fu(n.arrows));else i===!0&&n.arrows===null&&(e.arrows=ya(a.arrows));if(n.color!==void 0&&n.color!==null){var u=To(n.color)?{color:n.color,highlight:n.color,hover:n.color,inherit:!1,opacity:1}:n.color,c=e.color;if(o)st(c,a.color,!1,i);else for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&delete c[h];if(To(c))c.color=c,c.highlight=c,c.hover=c,c.inherit=!1,u.opacity===void 0&&(c.opacity=1);else{var d=!1;u.color!==void 0&&(c.color=u.color,d=!0),u.highlight!==void 0&&(c.highlight=u.highlight,d=!0),u.hover!==void 0&&(c.hover=u.hover,d=!0),u.inherit!==void 0&&(c.inherit=u.inherit),u.opacity!==void 0&&(c.opacity=Math.min(1,Math.max(0,u.opacity))),d===!0?c.inherit=!1:c.inherit===void 0&&(c.inherit="from")}}else i===!0&&n.color===null&&(e.color=Di(a.color));i===!0&&n.font===null&&(e.font=Di(a.font)),Object.prototype.hasOwnProperty.call(n,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=n.selfReferenceSize)}}]),t}(),L$e=function(){function t(r,e,n){var i,a=this;te(this,t),this.body=r,this.images=e,this.groups=n,this.body.functions.createEdge=X(i=this.create).call(i,this),this.edgesListeners={add:function(s,l){a.add(l.items)},update:function(s,l){a.update(l.items)},remove:function(s,l){a.remove(l.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,l,u,c){if(l===s)return .5;var h=1/(l-s);return Math.max(0,(c-s)*h)}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},st(this.options,this.defaultOptions),this.bindEventListeners()}return re(t,[{key:"bindEventListeners",value:function(){var e=this,n,i;this.body.emitter.on("_forceDisableDynamicCurves",function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a==="dynamic"&&(a="continuous");var s=!1;for(var l in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,l)){var u=e.body.edges[l],c=e.body.data.edges.get(l);if(c!=null){var h=c.smooth;h!==void 0&&h.enabled===!0&&h.type==="dynamic"&&(a===void 0?u.setOptions({smooth:!1}):u.setOptions({smooth:{type:a}}),s=!0)}}o===!0&&s===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){e.reconnectEdges()}),this.body.emitter.on("refreshEdges",X(n=this.refresh).call(n,this)),this.body.emitter.on("refresh",X(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",function(){Ne(e.edgesListeners,function(a,o){e.body.data.edges&&e.body.data.edges.off(o,a)}),delete e.body.functions.createEdge,delete e.edgesListeners.add,delete e.edgesListeners.update,delete e.edgesListeners.remove,delete e.edgesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){Oo.parseOptions(this.options,e,!0,this.defaultOptions,!0);var n=!1;if(e.smooth!==void 0)for(var i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&(n=this.body.edges[i].updateEdgeType()||n);if(e.font!==void 0)for(var a in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,a)&&this.body.edges[a].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||n===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.body.data.edges;if(kk("id",e))this.body.data.edges=e;else if(Xe(e))this.body.data.edges=new hh,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new hh;else throw new TypeError("Array or DataSet expected");if(a&&Ne(this.edgesListeners,function(s,l){a.off(l,s)}),this.body.edges={},this.body.data.edges){Ne(this.edgesListeners,function(s,l){n.body.data.edges.on(l,s)});var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),i===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.edges,a=this.body.data.edges,o=0;o1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length!==0){var i=this.body.edges;Ne(e,function(a){var o=i[a];o!==void 0&&o.remove()}),n&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var e=this;Ne(this.body.edges,function(n,i){var a=e.body.data.edges.get(i);a!==void 0&&n.setOptions(a)})}},{key:"create",value:function(e){return new Oo(e,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var e,n=this.body.nodes,i=this.body.edges;for(e in n)Object.prototype.hasOwnProperty.call(n,e)&&(n[e].edges=[]);for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)){var a=i[e];a.from=null,a.to=null,a.connect()}}},{key:"getConnectedNodes",value:function(e){var n=[];if(this.body.edges[e]!==void 0){var i=this.body.edges[e];i.fromId!==void 0&&n.push(i.fromId),i.toId!==void 0&&n.push(i.toId)}return n}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var e=this,n=[];Ne(this.body.edges,function(i,a){var o=e.body.nodes[i.toId],s=e.body.nodes[i.fromId];o!==void 0&&o.isCluster===!0||s!==void 0&&s.isCluster===!0||(o===void 0||s===void 0)&&n.push(a)}),this.remove(n,!1)}},{key:"_addMissingEdges",value:function(){var e=this.body.data.edges;if(e!=null){var n=this.body.edges,i=[];tt(e).call(e,function(a,o){var s=n[o];s===void 0&&i.push(o)}),this.add(i,!0)}}}]),t}(),PT=function(){function t(r,e,n){te(this,t),this.body=r,this.physicsBody=e,this.barnesHutTree,this.setOptions(n),this._rng=R0("BARNES HUT SOLVER")}return re(t,[{key:"setOptions",value:function(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){var e,n=this.body.nodes,i=this.physicsBody.physicsNodeIndices,a=i.length,o=this._formBarnesHutTree(n,i);this.barnesHutTree=o;for(var s=0;s0&&this._getForceContributions(o.root,e)}}},{key:"_getForceContributions",value:function(e,n){this._getForceContribution(e.children.NW,n),this._getForceContribution(e.children.NE,n),this._getForceContribution(e.children.SW,n),this._getForceContribution(e.children.SE,n)}},{key:"_getForceContribution",value:function(e,n){if(e.childrenCount>0){var i=e.centerOfMass.x-n.x,a=e.centerOfMass.y-n.y,o=Math.sqrt(i*i+a*a);o*e.calcSize>this.thetaInversed?this._calculateForces(o,i,a,n,e):e.childrenCount===4?this._getForceContributions(e,n):e.children.data.id!=n.id&&this._calculateForces(o,i,a,n,e)}}},{key:"_calculateForces",value:function(e,n,i,a,o){e===0&&(e=.1,n=e),this.overlapAvoidanceFactor<1&&a.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*a.shape.radius,e-a.shape.radius));var s=this.options.gravitationalConstant*o.mass*a.options.mass/Math.pow(e,3),l=n*s,u=i*s;this.physicsBody.forces[a.id].x+=l,this.physicsBody.forces[a.id].y+=u}},{key:"_formBarnesHutTree",value:function(e,n){for(var i,a=n.length,o=e[n[0]].x,s=e[n[0]].y,l=e[n[0]].x,u=e[n[0]].y,c=1;c0&&(dl&&(l=d),fu&&(u=f))}var v=Math.abs(l-o)-Math.abs(u-s);v>0?(s-=.5*v,u+=.5*v):(o+=.5*v,l-=.5*v);var g=1e-5,b=Math.max(g,Math.abs(l-o)),y=.5*b,$=.5*(o+l),k=.5*(s+u),_={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:$-y,maxX:$+y,minY:k-y,maxY:k+y},size:b,calcSize:1/b,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(_.root);for(var P=0;P0&&this._placeInTree(_.root,i);return _}},{key:"_updateBranchMass",value:function(e,n){var i=e.centerOfMass,a=e.mass+n.options.mass,o=1/a;i.x=i.x*e.mass+n.x*n.options.mass,i.x*=o,i.y=i.y*e.mass+n.y*n.options.mass,i.y*=o,e.mass=a;var s=Math.max(Math.max(n.height,n.radius),n.width);e.maxWidth=e.maxWidthn.x?a.maxY>n.y?o="NW":o="SW":a.maxY>n.y?o="NE":o="SE",this._placeInRegion(e,n,o)}},{key:"_placeInRegion",value:function(e,n,i){var a=e.children[i];switch(a.childrenCount){case 0:a.children.data=n,a.childrenCount=1,this._updateBranchMass(a,n);break;case 1:a.children.data.x===n.x&&a.children.data.y===n.y?(n.x+=this._rng(),n.y+=this._rng()):(this._splitBranch(a),this._placeInTree(a,n));break;case 4:this._placeInTree(a,n);break}}},{key:"_splitBranch",value:function(e){var n=null;e.childrenCount===1&&(n=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),n!=null&&this._placeInTree(e,n)}},{key:"_insertRegion",value:function(e,n){var i,a,o,s,l=.5*e.size;switch(n){case"NW":i=e.range.minX,a=e.range.minX+l,o=e.range.minY,s=e.range.minY+l;break;case"NE":i=e.range.minX+l,a=e.range.maxX,o=e.range.minY,s=e.range.minY+l;break;case"SW":i=e.range.minX,a=e.range.minX+l,o=e.range.minY+l,s=e.range.maxY;break;case"SE":i=e.range.minX+l,a=e.range.maxX,o=e.range.minY+l,s=e.range.maxY;break}e.children[n]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:a,minY:o,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,n){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,n))}},{key:"_drawBranch",value:function(e,n,i){i===void 0&&(i="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,n),this._drawBranch(e.children.NE,n),this._drawBranch(e.children.SE,n),this._drawBranch(e.children.SW,n)),n.strokeStyle=i,n.beginPath(),n.moveTo(e.range.minX,e.range.minY),n.lineTo(e.range.maxX,e.range.minY),n.stroke(),n.beginPath(),n.moveTo(e.range.maxX,e.range.minY),n.lineTo(e.range.maxX,e.range.maxY),n.stroke(),n.beginPath(),n.moveTo(e.range.maxX,e.range.maxY),n.lineTo(e.range.minX,e.range.maxY),n.stroke(),n.beginPath(),n.moveTo(e.range.minX,e.range.maxY),n.lineTo(e.range.minX,e.range.minY),n.stroke()}}]),t}(),j$e=function(){function t(r,e,n){te(this,t),this._rng=R0("REPULSION SOLVER"),this.body=r,this.physicsBody=e,this.setOptions(n)}return re(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,n,i,a,o,s,l,u,c=this.body.nodes,h=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces,f=this.options.nodeDistance,v=-2/3/f,g=4/3,b=0;b"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var V$e=function(t){Ve(e,t);var r=q$e(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o._rng=R0("FORCE ATLAS 2 BASED REPULSION SOLVER"),o}return re(e,[{key:"_calculateForces",value:function(i,a,o,s,l){i===0&&(i=.1*this._rng(),a=i),this.overlapAvoidanceFactor<1&&s.shape.radius&&(i=Math.max(.1+this.overlapAvoidanceFactor*s.shape.radius,i-s.shape.radius));var u=s.edges.length+1,c=this.options.gravitationalConstant*l.mass*s.options.mass*u/Math.pow(i,2),h=a*c,d=o*c;this.physicsBody.forces[s.id].x+=h,this.physicsBody.forces[s.id].y+=d}}]),e}(PT);function G$e(t){var r=K$e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function K$e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Y$e=function(t){Ve(e,t);var r=G$e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"_calculateForces",value:function(i,a,o,s,l){if(i>0){var u=l.edges.length+1,c=this.options.centralGravity*u*l.options.mass;s[l.id].x=a*c,s[l.id].y=o*c}}}]),e}(Lc),X$e=function(){function t(r){te(this,t),this.body=r,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},At(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return re(t,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("initPhysics",function(){e.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){e.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){e.stopSimulation(),e.ready=!1}),this.body.emitter.on("disablePhysics",function(){e.physicsEnabled=!1,e.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){e.setOptions(e.options),e.ready===!0&&e.startSimulation()}),this.body.emitter.on("startSimulation",function(){e.ready===!0&&e.startSimulation()}),this.body.emitter.on("stopSimulation",function(){e.stopSimulation()}),this.body.emitter.on("destroy",function(){e.stopSimulation(!1),e.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){e.updatePhysicsData()})}},{key:"setOptions",value:function(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,wh(["stabilization"],this.options,e),Ur(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var n=this.options.wind;n&&((typeof n.x!="number"||lm(n.x))&&(n.x=0),(typeof n.y!="number"||lm(n.y))&&(n.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new V$e(this.body,this.physicsBody,e),this.edgesSolver=new Ev(this.body,this.physicsBody,e),this.gravitySolver=new Y$e(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new j$e(this.body,this.physicsBody,e),this.edgesSolver=new Ev(this.body,this.physicsBody,e),this.gravitySolver=new Lc(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new H$e(this.body,this.physicsBody,e),this.edgesSolver=new W$e(this.body,this.physicsBody,e),this.gravitySolver=new Lc(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new PT(this.body,this.physicsBody,e),this.edgesSolver=new Ev(this.body,this.physicsBody,e),this.gravitySolver=new Lc(this.body,this.physicsBody,e)),this.modelOptions=e}},{key:"initPhysics",value:function(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=X(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var e=mh();this.physicsTick();var n=mh()-e;(n<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&Cn(function(){e.body.emitter.emit("stabilized",{iterations:n}),e.startedStabilization=!1,e.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){var e=1.2;this._evaluateStepQuality()===!0?this.timestep=e*this.timestep:this.timestep/es))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,n=0,i=0,a=5,o=0;os&&(e=e>0?s:-s),e}},{key:"_performStep",value:function(e){var n=this.body.nodes[e],i=this.physicsBody.forces[e];this.options.wind&&(i.x+=this.options.wind.x,i.y+=this.options.wind.y);var a=this.physicsBody.velocities[e];this.previousStates[e]={x:n.x,y:n.y,vx:a.x,vy:a.y},n.options.fixed.x===!1?(a.x=this.calculateComponentVelocity(a.x,i.x,n.options.mass),n.x+=a.x*this.timestep):(i.x=0,a.x=0),n.options.fixed.y===!1?(a.y=this.calculateComponentVelocity(a.y,i.y,n.options.mass),n.y+=a.y*this.timestep):(i.y=0,a.y=0);var o=Math.sqrt(Math.pow(a.x,2)+Math.pow(a.y,2));return o}},{key:"_freezeNodes",value:function(){var e=this.body.nodes;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&e[n].x&&e[n].y){var i=e[n].options.fixed;this.freezeCache[n]={x:i.x,y:i.y},i.x=!0,i.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var e=this.body.nodes;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.freezeCache[n]!==void 0&&(e[n].options.fixed.x=this.freezeCache[n].x,e[n].options.fixed.y=this.freezeCache[n].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof n!="number"&&(n=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",n)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=n,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,Cn(function(){return e._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var e=this,n=function(){return e.stabilized===!1&&e.stabilizationIterations1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,a=-1e9,o=1e9,s=-1e9,l;if(n.length>0)for(var u=0;ul.shape.boundingBox.left&&(o=l.shape.boundingBox.left),sl.shape.boundingBox.top&&(i=l.shape.boundingBox.top),a1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,a=-1e9,o=1e9,s=-1e9,l;if(n.length>0)for(var u=0;ul.x&&(o=l.x),sl.y&&(i=l.y),a"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var n8e=function(t){Ve(e,t);var r=t8e(e);function e(n,i,a,o,s,l){var u;return te(this,e),u=r.call(this,n,i,a,o,s,l),u.isCluster=!0,u.containedNodes={},u.containedEdges={},u}return re(e,[{key:"_openChildCluster",value:function(i){var a=this,o=this.body.nodes[i];if(this.containedNodes[i]===void 0)throw new Error("node with id: "+i+" not in current cluster");if(!o.isCluster)throw new Error("node with id: "+i+" is not a cluster");delete this.containedNodes[i],Ne(o.edges,function(s){delete a.containedEdges[s.id]}),Ne(o.containedNodes,function(s,l){a.containedNodes[l]=s}),o.containedNodes={},Ne(o.containedEdges,function(s,l){a.containedEdges[l]=s}),o.containedEdges={},Ne(o.edges,function(s){Ne(a.edges,function(l){var u,c,h=je(u=l.clusteringEdgeReplacingIds).call(u,s.id);h!==-1&&(Ne(s.clusteringEdgeReplacingIds,function(d){l.clusteringEdgeReplacingIds.push(d),a.body.edges[d].edgeReplacedById=l.id}),Zn(c=l.clusteringEdgeReplacingIds).call(c,h,1))})}),o.edges=[]}}]),e}(Mr),i8e=function(){function t(r){var e=this;te(this,t),this.body=r,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},At(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){e.clusteredNodes={},e.clusteredEdges={}})}return re(t,[{key:"clusterByHubsize",value:function(e,n){e===void 0?e=this._getHubSize():Ze(e)==="object"&&(n=this._checkOptions(e),e=this._getHubSize());for(var i=[],a=0;a=e&&i.push(o.id)}for(var s=0;s0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(n.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");n=this._checkOptions(n);var a={},o={};Ne(this.body.nodes,function(s,l){s.options&&n.joinCondition(s.options)===!0&&(a[l]=s,Ne(s.edges,function(u){e.clusteredEdges[u.id]===void 0&&(o[u.id]=u)}))}),this._cluster(a,o,n,i)}},{key:"clusterByEdgeCount",value:function(e,n){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;n=this._checkOptions(n);for(var o=[],s={},l,u,c,h=function(){var g={},b={},y=i.body.nodeIndices[d],$=i.body.nodes[y];if(s[y]===void 0){c=0,u=[];for(var k=0;k<$.edges.length;k++)l=$.edges[k],i.clusteredEdges[l.id]===void 0&&(l.toId!==l.fromId&&c++,u.push(l));if(c===e){for(var _=function(J){if(n.joinCondition===void 0||n.joinCondition===null)return!0;var ie=ar.cloneOptions(J);return n.joinCondition(ie)},P=!0,S=0;S0&&yt(b).length>0&&P===!0){var B=function(){for(var J=0;J1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,n)}},{key:"clusterBridges",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,n)}},{key:"clusterByConnection",value:function(e,n){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[e];n=this._checkOptions(n,o),n.clusterNodeProperties.x===void 0&&(n.clusterNodeProperties.x=o.x),n.clusterNodeProperties.y===void 0&&(n.clusterNodeProperties.y=o.y),n.clusterNodeProperties.fixed===void 0&&(n.clusterNodeProperties.fixed={},n.clusterNodeProperties.fixed.x=o.options.fixed.x,n.clusterNodeProperties.fixed.y=o.options.fixed.y);var s={},l={},u=o.id,c=ar.cloneOptions(o);s[u]=o;for(var h=0;h-1&&(l[k.id]=k)}this._cluster(s,l,n,a)}},{key:"_createClusterEdges",value:function(e,n,i,a){for(var o,s,l,u,c,h,d=yt(e),f=[],v=0;v0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}},{key:"_cluster",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&this.clusteredNodes[s]!==void 0&&o.push(s);for(var l=0;la?l.x:a,o=l.ys?l.y:s;return{x:.5*(i+a),y:.5*(o+s)}}},{key:"openCluster",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");var a=this.body.nodes[e];if(a===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(a.isCluster!==!0||a.containedNodes===void 0||a.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");var o=this.findNode(e),s=je(o).call(o,e)-1;if(s>=0){var l=o[s],u=this.body.nodes[l];u._openChildCluster(e),delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged");return}var c=a.containedNodes,h=a.containedEdges;if(n!==void 0&&n.releaseFunction!==void 0&&typeof n.releaseFunction=="function"){var d={},f={x:a.x,y:a.y};for(var v in c)if(Object.prototype.hasOwnProperty.call(c,v)){var g=this.body.nodes[v];d[v]={x:g.x,y:g.y}}var b=n.releaseFunction(f,d);for(var y in c)if(Object.prototype.hasOwnProperty.call(c,y)){var $=this.body.nodes[y];b[y]!==void 0&&($.x=b[y].x===void 0?a.x:b[y].x,$.y=b[y].y===void 0?a.y:b[y].y)}}else Ne(c,function(ne){ne.options.fixed.x===!1&&(ne.x=a.x),ne.options.fixed.y===!1&&(ne.y=a.y)});for(var k in c)if(Object.prototype.hasOwnProperty.call(c,k)){var _=this.body.nodes[k];_.vx=a.vx,_.vy=a.vy,_.setOptions({physics:!0}),delete this.clusteredNodes[k]}for(var P=[],S=0;S0&&sa&&(a=s.edges.length),e+=s.edges.length,n+=Math.pow(s.edges.length,2),i+=1}e=e/i,n=n/i;var l=n-Math.pow(e,2),u=Math.sqrt(l),c=Math.floor(e+2*u);return c>a&&(c=a),c}},{key:"_createClusteredEdge",value:function(e,n,i,a,o){var s=ar.cloneOptions(i,"edge");st(s,a),s.from=e,s.to=n,s.id="clusterEdge:"+Js(),o!==void 0&&st(s,o);var l=this.body.functions.createEdge(s);return l.clusteringEdgeReplacingIds=[i.id],l.connect(),this.body.edges[l.id]=l,l}},{key:"_clusterEdges",value:function(e,n,i,a){if(n instanceof Oo){var o=n,s={};s[o.id]=o,n=s}if(e instanceof Mr){var l=e,u={};u[l.id]=l,e=u}if(i==null)throw new Error("_clusterEdges: parameter clusterNode required");a===void 0&&(a=i.clusterEdgeProperties),this._createClusterEdges(e,n,i,a);for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)&&this.body.edges[c]!==void 0){var h=this.body.edges[c];this._backupEdgeOptions(h),h.setOptions({physics:!1})}for(var d in e)Object.prototype.hasOwnProperty.call(e,d)&&(this.clusteredNodes[d]={clusterId:i.id,node:this.body.nodes[d]},this.body.nodes[d].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(e!==void 0){var n=this.clusteredNodes[e];if(n!==void 0){var i=n.clusterId;if(i!==void 0)return this.body.nodes[i]}}}},{key:"_filter",value:function(e,n){var i=[];return Ne(e,function(a){n(a)&&i.push(a)}),i}},{key:"_updateState",value:function(){var e=this,n,i=[],a={},o=function(v){Ne(e.body.nodes,function(g){g.isCluster===!0&&v(g)})};for(n in this.clusteredNodes)if(Object.prototype.hasOwnProperty.call(this.clusteredNodes,n)){var s=this.body.nodes[n];s===void 0&&i.push(n)}o(function(f){for(var v=0;v0}(!f.endPointsValid()||!g)&&(a[v]=v)}),o(function(f){Ne(a,function(v){delete f.containedEdges[v],Ne(f.edges,function(g,b){if(g.id===v){f.edges[b]=null;return}g.clusteringEdgeReplacingIds=e._filter(g.clusteringEdgeReplacingIds,function(y){return!a[y]})}),f.edges=e._filter(f.edges,function(g){return g!==null})})}),Ne(a,function(f){delete e.clusteredEdges[f]}),Ne(a,function(f){delete e.body.edges[f]});var u=yt(this.body.edges);Ne(u,function(f){var v=e.body.edges[f],g=e._isClusteredNode(v.fromId)||e._isClusteredNode(v.toId);if(g!==e._isClusteredEdge(v.id))if(g){var b=e._getClusterNodeForNode(v.fromId);b!==void 0&&e._clusterEdges(e.body.nodes[v.fromId],v,b);var y=e._getClusterNodeForNode(v.toId);y!==void 0&&e._clusterEdges(e.body.nodes[v.toId],v,y)}else delete e._clusterEdges[f],e._restoreEdge(v)});for(var c=!1,h=!0,d=function(){var v=[];o(function(b){var y=yt(b.containedNodes).length,$=b.options.allowSingleNodeCluster===!0;($&&y<1||!$&&y<2)&&v.push(b.id)});for(var g=0;g0,c=c||h};h;)d();c&&this._updateState()}},{key:"_isClusteredNode",value:function(e){return this.clusteredNodes[e]!==void 0}},{key:"_isClusteredEdge",value:function(e){return this.clusteredEdges[e]!==void 0}}]),t}();function a8e(){var t;window!==void 0&&(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),t===void 0?window.requestAnimationFrame=function(r){r()}:window.requestAnimationFrame=t}var o8e=function(){function t(r,e){te(this,t),a8e(),this.body=r,this.canvas=e,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},At(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return re(t,[{key:"bindEventListeners",value:function(){var e=this,n;this.body.emitter.on("dragStart",function(){e.dragging=!0}),this.body.emitter.on("dragEnd",function(){e.dragging=!1}),this.body.emitter.on("zoom",function(){e.zooming=!0,window.clearTimeout(e.zoomTimeoutId),e.zoomTimeoutId=Cn(function(){var i;e.zooming=!1,X(i=e._requestRedraw).call(i,e)()},250)}),this.body.emitter.on("_resizeNodes",function(){e._resizeNodes()}),this.body.emitter.on("_redraw",function(){e.renderingActive===!1&&e._redraw()}),this.body.emitter.on("_blockRedraw",function(){e.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){e.allowRedraw=!0,e.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",X(n=this._requestRedraw).call(n,this)),this.body.emitter.on("_startRendering",function(){e.renderRequests+=1,e.renderingActive=!0,e._startRendering()}),this.body.emitter.on("_stopRendering",function(){e.renderRequests-=1,e.renderingActive=e.renderRequests>0,e.renderTimer=void 0}),this.body.emitter.on("destroy",function(){e.renderRequests=0,e.allowRedraw=!1,e.renderingActive=!1,e.requiresTimeout===!0?clearTimeout(e.renderTimer):window.cancelAnimationFrame(e.renderTimer),e.body.emitter.off()})}},{key:"setOptions",value:function(e){if(e!==void 0){var n=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];$s(n,this.options,e)}}},{key:"_requestNextFrame",value:function(e,n){if(!(typeof window>"u")){var i,a=window;return this.requiresTimeout===!0?i=Cn(e,n):a.requestAnimationFrame&&(i=a.requestAnimationFrame(e)),i}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(X(e=this._renderStep).call(e,this),this.simulationInterval)}}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var e=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this._requestNextFrame(function(){e._redraw(!1)},0))}},{key:"_redraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var n={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var i=this.canvas.getContext(),a=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(i.clearRect(0,0,a,o),this.canvas.frame.clientWidth===0)return;if(i.save(),i.translate(this.body.view.translation.x,this.body.view.translation.y),i.scale(this.body.view.scale,this.body.view.scale),i.beginPath(),this.body.emitter.emit("beforeDrawing",i),i.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(i),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){var s=this._drawNodes(i,e),l=s.drawExternalLabels;n.drawExternalLabels=l}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(i),n.drawExternalLabels!=null&&n.drawExternalLabels(),e===!1&&this._drawSelectionBox(i),i.beginPath(),this.body.emitter.emit("afterDrawing",i),i.closePath(),i.restore(),e===!0&&i.clearRect(0,0,a,o)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);var n=this.body.nodes,i;for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(i=n[a],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.nodes,a=this.body.nodeIndices,o,s=[],l=[],u=20,c=this.canvas.DOMtoCanvas({x:-20,y:-20}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+u,y:this.canvas.frame.canvas.clientHeight+u}),d={top:c.y,left:c.x,bottom:h.y,right:h.x},f=[],v=0;v0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}},{key:"_setCameraState",value:function(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){var e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,n=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;e!=1&&n!=1?i=this.cameraState.scale*.5*(e+n):e!=1?i=this.cameraState.scale*e:n!=1&&(i=this.cameraState.scale*n),this.body.view.scale=i;var a=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),o={x:a.x-this.cameraState.position.x,y:a.y-this.cameraState.position.y};this.body.view.translation.x+=o.x*this.body.view.scale,this.body.view.translation.y+=o.y*this.body.view.scale}}},{key:"_prepareValue",value:function(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(je(e).call(e,"%")!==-1||je(e).call(e,"px")!==-1)return e;if(je(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var e=this;this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new _o(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:_o.DIRECTION_ALL}),Sh(this.hammer,function(n){e.body.eventListeners.onTouch(n)}),this.hammer.on("tap",function(n){e.body.eventListeners.onTap(n)}),this.hammer.on("doubletap",function(n){e.body.eventListeners.onDoubleTap(n)}),this.hammer.on("press",function(n){e.body.eventListeners.onHold(n)}),this.hammer.on("panstart",function(n){e.body.eventListeners.onDragStart(n)}),this.hammer.on("panmove",function(n){e.body.eventListeners.onDrag(n)}),this.hammer.on("panend",function(n){e.body.eventListeners.onDragEnd(n)}),this.hammer.on("pinch",function(n){e.body.eventListeners.onPinch(n)}),this.frame.canvas.addEventListener("wheel",function(n){e.body.eventListeners.onMouseWheel(n)}),this.frame.canvas.addEventListener("mousemove",function(n){e.body.eventListeners.onMouseMove(n)}),this.frame.canvas.addEventListener("contextmenu",function(n){e.body.eventListeners.onContext(n)}),this.hammerFrame=new _o(this.frame),AT(this.hammerFrame,function(n){e.body.eventListeners.onRelease(n)})}},{key:"setSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),n=this._prepareValue(n);var i=!1,a=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||n!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=n)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=n,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=n,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{var l=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),u=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==l||this.frame.canvas.height!==u)&&this._getCameraState(s),this.frame.canvas.width!==l&&(this.frame.canvas.width=l,i=!0),this.frame.canvas.height!==u&&(this.frame.canvas.height=u,i=!0)}return i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(a/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");var n=1;typeof window<"u"&&(n=window.devicePixelRatio||1);var i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return n/i}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}},{key:"DOMtoCanvas",value:function(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}]),t}();function d8e(t,r){var e=At({nodes:r,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},t??{});if(!Xe(e.nodes))throw new TypeError("Nodes has to be an array of ids.");if(e.nodes.length===0&&(e.nodes=r),!(typeof e.minZoomLevel=="number"&&e.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof e.maxZoomLevel=="number"&&e.minZoomLevel<=e.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return e}var f8e=function(){function t(r,e){var n,i=this,a;te(this,t),this.body=r,this.canvas=e,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",X(n=this.fit).call(n,this)),this.body.emitter.on("animationFinished",function(){i.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",X(a=this.releaseNode).call(a,this))}return re(t,[{key:"setOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}},{key:"fit",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=d8e(e,this.body.nodeIndices);var i=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight,o,s;if(i===0||a===0)s=1,o=ar.getRange(this.body.nodes,e.nodes);else if(n===!0){var l=0;for(var u in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,u)){var c=this.body.nodes[u];c.predefinedPosition===!0&&(l+=1)}if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=ar.getRange(this.body.nodes,e.nodes);var h=this.body.nodeIndices.length;s=12.662/(h+7.4147)+.0964822;var d=Math.min(i/600,a/600);s*=d}else{this.body.emitter.emit("_resizeNodes"),o=ar.getRange(this.body.nodes,e.nodes);var f=Math.abs(o.maxX-o.minX)*1.1,v=Math.abs(o.maxY-o.minY)*1.1,g=i/f,b=a/v;s=g<=b?g:b}s>e.maxZoomLevel?s=e.maxZoomLevel:s1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){var i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};n.position=i,n.lockedOnNode=e,this.moveTo(n)}else console.error("Node: "+e+" cannot be found.")}},{key:"moveTo",value:function(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!ua(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!ua(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!ua(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!ua(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}},{key:"animateView",value:function(e){if(e!==void 0){this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;var n=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:n.x-e.position.x,y:n.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var a;this.viewFunction=X(a=this._lockedRedraw).call(a,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var o;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=X(o=this._transitionRedraw).call(o,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}}},{key:"_lockedRedraw",value:function(){var e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},n=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:n.x-e.x,y:n.y-e.y},a=this.body.view.translation,o={x:a.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}},{key:"releaseNode",value:function(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;var n=X4e[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*n,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*n,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*n},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var i;this.viewFunction=X(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();function sw(t){var r=t&&t.preventDefault||!1,e=t&&t.container||window,n={},i={keydown:{},keyup:{}},a={},o;for(o=97;o<=122;o++)a[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)a[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)a[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)a["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)a["num"+o]={code:96+o,shift:!1};a["num*"]={code:106,shift:!1},a["num+"]={code:107,shift:!1},a["num-"]={code:109,shift:!1},a["num/"]={code:111,shift:!1},a["num."]={code:110,shift:!1},a.left={code:37,shift:!1},a.up={code:38,shift:!1},a.right={code:39,shift:!1},a.down={code:40,shift:!1},a.space={code:32,shift:!1},a.enter={code:13,shift:!1},a.shift={code:16,shift:void 0},a.esc={code:27,shift:!1},a.backspace={code:8,shift:!1},a.tab={code:9,shift:!1},a.ctrl={code:17,shift:!1},a.alt={code:18,shift:!1},a.delete={code:46,shift:!1},a.pageup={code:33,shift:!1},a.pagedown={code:34,shift:!1},a["="]={code:187,shift:!1},a["-"]={code:189,shift:!1},a["]"]={code:221,shift:!1},a["["]={code:219,shift:!1};var s=function(c){u(c,"keydown")},l=function(c){u(c,"keyup")},u=function(c,h){if(i[h][c.keyCode]!==void 0){for(var d=i[h][c.keyCode],f=0;f700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}},{key:"_stopMovement",value:function(){for(var e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var e=this.body.view.scale,n=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,a=n/e,o=(1-a)*this.canvas.canvasViewCenter.x+i.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+i.y*a;this.body.view.scale=n,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var e=this.body.view.scale,n=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,a=n/e,o=(1-a)*this.canvas.canvasViewCenter.x+i.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+i.y*a;this.body.view.scale=n,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var e=this;if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=sw({container:window,preventDefault:!0}):this.keycharm=sw({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var n,i,a,o,s,l,u,c,h,d,f,v,g,b,y,$,k,_,P,S,D,B,R,A;X(n=this.keycharm).call(n,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),X(i=this.keycharm).call(i,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),X(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),X(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),X(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),X(l=this.keycharm).call(l,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),X(u=this.keycharm).call(u,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),X(c=this.keycharm).call(c,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),X(h=this.keycharm).call(h,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),X(d=this.keycharm).call(d,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),X(f=this.keycharm).call(f,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),X(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),X(g=this.keycharm).call(g,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),X(b=this.keycharm).call(b,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),X(y=this.keycharm).call(y,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),X($=this.keycharm).call($,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),X(k=this.keycharm).call(k,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),X(_=this.keycharm).call(_,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),X(P=this.keycharm).call(P,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),X(S=this.keycharm).call(S,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),X(D=this.keycharm).call(D,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),X(B=this.keycharm).call(B,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),X(R=this.keycharm).call(R,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),X(A=this.keycharm).call(A,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),t}();function p8e(t,r){var e=typeof Xi<"u"&&qa(t)||t["@@iterator"];if(!e){if(Xe(t)||(e=m8e(t))||r){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function m8e(t,r){var e;if(t){if(typeof t=="string")return lw(t,r);var n=Xt(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Wa(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lw(t,r)}}function lw(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}},{key:"onTap",value:function(e){var n=this.getPointer(e.center),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(n,i),this.selectionHandler.commitAndEmit(n,e),this.selectionHandler.generateClickEvent("click",e,n)}},{key:"onDoubleTap",value:function(e){var n=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,n)}},{key:"onHold",value:function(e){var n=this.getPointer(e.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(n,i),this.selectionHandler.commitAndEmit(n,e),this.selectionHandler.generateClickEvent("click",e,n),this.selectionHandler.generateClickEvent("hold",e,n)}},{key:"onRelease",value:function(e){if(new Date().valueOf()-this.touchTime>10){var n=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,n),this.touchTime=new Date().valueOf()}}},{key:"onContext",value:function(e){var n=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,n)}},{key:"checkSelectionChanges",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}},{key:"_determineDifference",value:function(e,n){var i=function(o,s){for(var l=[],u=0;u=o.minX&&h.x<=o.maxX&&h.y>=o.minY&&h.y<=o.maxY});tt(s).call(s,function(c){return n.selectionHandler.selectObject(n.body.nodes[c])});var l=this.getPointer(e.center);this.selectionHandler.commitAndEmit(l,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var u=this.drag.selection;u&&u.length?(tt(u).call(u,function(c){c.node.options.fixed.x=c.xFixed,c.node.options.fixed.y=c.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}},{key:"onPinch",value:function(e){var n=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);var i=this.pinch.scale*e.scale;this.zoom(i,n)}},{key:"zoom",value:function(e,n){if(this.options.zoomView===!0){var i=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);var a=void 0;this.drag!==void 0&&this.drag.dragging===!0&&(a=this.canvas.DOMtoCanvas(this.drag.pointer));var o=this.body.view.translation,s=e/i,l=(1-s)*n.x+o.x*s,u=(1-s)*n.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:l,y:u},a!=null){var c=this.canvas.canvasToDOM(a);this.drag.pointer.x=c.x,this.drag.pointer.y=c.y}this.body.emitter.emit("_requestRedraw"),i0&&(this.popupObj=c[d[d.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){for(var v=this.body.edgeIndices,g=this.body.edges,b,y=[],$=0;$0&&(this.popupObj=g[y[y.length-1]],l="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new i2e(this.canvas.frame)),this.popup.popupTargetType=l,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(e){var n=this.selectionHandler._pointerToPositionObject(e),i=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(n),i===!0)){var a=this.selectionHandler.getNodeAt(e);i=a===void 0?!1:a.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(n));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}(),y8e=Sg,b8e=cT;y8e("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},b8e);var w8e=We,$8e=w8e.Set,x8e=$8e,k8e=x8e,S8e=k8e,oa=pe(S8e),E8e=Ue,uw=Eg,pc=F0.getWeakData,T8e=kg,_8e=Wr,O8e=cs,Tv=Ut,I8e=xg,MT=Yi,cw=Vt,DT=Ha,C8e=DT.set,P8e=DT.getterFor,A8e=MT.find,M8e=MT.findIndex,D8e=E8e([].splice),N8e=0,mc=function(t){return t.frozen||(t.frozen=new NT)},NT=function(){this.entries=[]},_v=function(t,r){return A8e(t.entries,function(e){return e[0]===r})};NT.prototype={get:function(t){var r=_v(this,t);if(r)return r[1]},has:function(t){return!!_v(this,t)},set:function(t,r){var e=_v(this,t);e?e[1]=r:this.entries.push([t,r])},delete:function(t){var r=M8e(this.entries,function(e){return e[0]===t});return~r&&D8e(this.entries,r,1),!!~r}};var R8e={getConstructor:function(t,r,e,n){var i=t(function(l,u){T8e(l,a),C8e(l,{type:r,id:N8e++,frozen:void 0}),O8e(u)||I8e(u,l[n],{that:l,AS_ENTRIES:e})}),a=i.prototype,o=P8e(r),s=function(l,u,c){var h=o(l),d=pc(_8e(u),!0);return d===!0?mc(h).set(u,c):d[h.id]=c,l};return uw(a,{delete:function(l){var u=o(this);if(!Tv(l))return!1;var c=pc(l);return c===!0?mc(u).delete(l):c&&cw(c,u.id)&&delete c[u.id]},has:function(u){var c=o(this);if(!Tv(u))return!1;var h=pc(u);return h===!0?mc(c).has(u):h&&cw(h,c.id)}}),uw(a,e?{get:function(u){var c=o(this);if(Tv(u)){var h=pc(u);return h===!0?mc(c).get(u):h?h[c.id]:void 0}},set:function(u,c){return s(this,u,c)}}:{add:function(u){return s(this,u,!0)}}),i}},F8e=oT,hw=xt,jc=Ue,dw=Eg,z8e=F0,B8e=Sg,RT=R8e,gc=Ut,yc=Ha.enforce,L8e=He,j8e=Xk,wu=Object,H8e=Array.isArray,bc=wu.isExtensible,FT=wu.isFrozen,W8e=wu.isSealed,zT=wu.freeze,q8e=wu.seal,fw={},vw={},U8e=!hw.ActiveXObject&&"ActiveXObject"in hw,Ms,BT=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},LT=B8e("WeakMap",BT,RT),uo=LT.prototype,Hc=jc(uo.set),V8e=function(){return F8e&&L8e(function(){var t=zT([]);return Hc(new LT,t,1),!FT(t)})};if(j8e)if(U8e){Ms=RT.getConstructor(BT,"WeakMap",!0),z8e.enable();var pw=jc(uo.delete),wc=jc(uo.has),mw=jc(uo.get);dw(uo,{delete:function(t){if(gc(t)&&!bc(t)){var r=yc(this);return r.frozen||(r.frozen=new Ms),pw(this,t)||r.frozen.delete(t)}return pw(this,t)},has:function(r){if(gc(r)&&!bc(r)){var e=yc(this);return e.frozen||(e.frozen=new Ms),wc(this,r)||e.frozen.has(r)}return wc(this,r)},get:function(r){if(gc(r)&&!bc(r)){var e=yc(this);return e.frozen||(e.frozen=new Ms),wc(this,r)?mw(this,r):e.frozen.get(r)}return mw(this,r)},set:function(r,e){if(gc(r)&&!bc(r)){var n=yc(this);n.frozen||(n.frozen=new Ms),wc(this,r)?Hc(this,r,e):n.frozen.set(r,e)}else Hc(this,r,e);return this}})}else V8e()&&dw(uo,{set:function(r,e){var n;return H8e(r)&&(FT(r)?n=fw:W8e(r)&&(n=vw)),Hc(this,r,e),n===fw&&zT(r),n===vw&&q8e(r),this}});var G8e=We,K8e=G8e.WeakMap,Y8e=K8e,X8e=Y8e,J8e=X8e,Zs=pe(J8e);function ot(t,r,e,n){if(e==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?t!==r||!n:!r.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?n:e==="a"?n.call(t):n?n.value:r.get(t)}function dm(t,r,e,n,i){if(typeof r=="function"?t!==r||!0:!r.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r.set(t,e),e}function fm(t,r){var e=typeof Xi<"u"&&qa(t)||t["@@iterator"];if(!e){if(Xe(t)||(e=Z8e(t))||r){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +`),a=i.length;if(n.multi)for(var o=0;o0)for(var l=0;l0)for(var v=0;v")||n.parseStartTag("ital","")||n.parseStartTag("mono","")||n.parseEndTag("bold","")||n.parseEndTag("ital","")||n.parseEndTag("mono",""))||i(a);o||n.add(a),n.position++}return n.emitBlock(),n.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var n=this,i=new B6(e),a=!0,o=function(c){return/\\/.test(c)?(i.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var n="",i=0;i1&&arguments[1]!==void 0?arguments[1]:"normal",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,n),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var a=e.split("\r");a.length>0;){var o=this.getLongestFit(a);if(o===0){var s=a[0],l=this.getLongestFitWord(s);this.lines.newLine(Xt(s).call(s,0,l),n),a[0]=Xt(s).call(s,l)}else{var u=o;a[o-1]===" "?o--:a[u]===" "&&u++;var c=Xt(a).call(a,0,o).join("");o==a.length&&i?this.lines.append(c,n):this.lines.newLine(c,n),a=Xt(a).call(a,u)}}}}]),t}(),As=["bold","ital","boldital","mono"],kT=function(){function t(r,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;te(this,t),this.body=r,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(e),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=n}return re(t,[{key:"setOptions",value:function(e){if(this.elementOptions=e,this.initFontOptions(e.font),kh(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(Ze(e.font)==="object"){var n=e.font.size;n!==void 0&&(this.baseSize=n)}}}},{key:"initFontOptions",value:function(e){var n=this;if(Me(As,function(i){n.fontOptions[i]={}}),t.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}Me(e,function(i,a){i!=null&&Ze(i)!=="object"&&(n.fontOptions[a]=i)})}},{key:"constrain",value:function(e){var n={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=xi(e,"widthConstraint");if(typeof i=="number")n.maxWdt=Number(i),n.minWdt=Number(i);else if(Ze(i)==="object"){var a=xi(e,["widthConstraint","maximum"]);typeof a=="number"&&(n.maxWdt=Number(a));var o=xi(e,["widthConstraint","minimum"]);typeof o=="number"&&(n.minWdt=Number(o))}var s=xi(e,"heightConstraint");if(typeof s=="number")n.minHgt=Number(s);else if(Ze(s)==="object"){var l=xi(e,["heightConstraint","minimum"]);typeof l=="number"&&(n.minHgt=Number(l));var u=xi(e,["heightConstraint","valign"]);typeof u=="string"&&(u==="top"||u==="bottom")&&(n.valign=u)}return n}},{key:"update",value:function(e,n){this.setOptions(e,!0),this.propagateFonts(n),st(this.fontOptions,this.constrain(n)),this.fontOptions.chooser=Tg("label",n)}},{key:"adjustSizes",value:function(e){var n=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=n,this.fontOptions.minWdt-=n);var i=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}},{key:"addFontOptionsToPile",value:function(e,n){for(var i=0;i5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label!==void 0){var l=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&l=this.elementOptions.scaling.label.maxVisible&&(l=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,a,o,n,i,s),this._drawBackground(e),this._drawText(e,n,this.size.yLine,s,l))}}},{key:"_drawBackground",value:function(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;var n=this.getSize();e.fillRect(n.left,n.top,n.width,n.height)}}},{key:"_drawText",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0,s=this._setAlignment(e,n,i,a),l=bt(s,2);n=l[0],i=l[1],e.textAlign="left",n=n-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(i-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(i+=(this.size.height-this.size.labelHeight)/2));for(var u=0;u0&&(e.lineWidth=f.strokeWidth,e.strokeStyle=y,e.lineJoin="round"),e.fillStyle=b,f.strokeWidth>0&&e.strokeText(f.text,n+h,i+f.vadjust),e.fillText(f.text,n+h,i+f.vadjust),h+=f.width}i+=c.height}}}},{key:"_setAlignment",value:function(e,n,i,a){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){n=0,i=0;var o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",i-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",i+=2*o):e.textBaseline="middle"}else e.textBaseline=a;return[n,i]}},{key:"_getColor",value:function(e,n,i){var a=e||"#000000",o=i||"#ffffff";if(n<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-n)));a=Kr(a,s),o=Kr(o,s)}return[a,o]}},{key:"getTextSize",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,n,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var e=2,n=this.size.left,i=this.size.top-.5*e;if(this.isEdgeLabel){var a=-this.size.width*.5;switch(this.fontOptions.align){case"middle":n=a,i=-this.size.height*.5;break;case"top":n=a,i=-(this.size.height+e);break;case"bottom":n=a,i=e;break}}var o={left:n,top:i,width:this.size.width,height:this.size.height};return o}},{key:"calculateLabelSize",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,n,i),this.size.left=a-this.size.width*.5,this.size.top=o-this.size.height*.5,this.size.yLine=o+(1-this.lineCount)*.5*this.fontOptions.size,s==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(e,n,i,a){var o=function(c,h,d){return h==="normal"?d==="mod"?"":c[d]:c[h][d]!==void 0?c[h][d]:c[d]},s={color:o(this.fontOptions,a,"color"),size:o(this.fontOptions,a,"size"),face:o(this.fontOptions,a,"face"),mod:o(this.fontOptions,a,"mod"),vadjust:o(this.fontOptions,a,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(n||i)&&(a==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,n,i));var l="";return s.mod!==void 0&&s.mod!==""&&(l+=s.mod+" "),l+=s.size+"px "+s.face,e.font=l.replace(/"/g,""),s.font=e.font,s.height=s.size,s}},{key:"differentState",value:function(e,n){return e!==this.selectedState||n!==this.hoverState}},{key:"_processLabelText",value:function(e,n,i,a){var o=new H6e(e,this,n,i);return o.process(a)}},{key:"_processLabel",value:function(e,n,i){if(!(this.labelDirty===!1&&!this.differentState(n,i))){var a=this._processLabelText(e,n,i,this.elementOptions.label);this.fontOptions.minWdt>0&&a.width0&&a.height0&&(this.enableBorderDashes(e,n),e.stroke(),this.disableBorderDashes(e,n)),e.restore()}},{key:"performFill",value:function(e,n){e.save(),e.fillStyle=n.color,this.enableShadow(e,n),vu(e).call(e),this.disableShadow(e,n),e.restore(),this.performStroke(e,n)}},{key:"_addBoundingBoxMargin",value:function(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}},{key:"_updateBoundingBox",value:function(e,n,i,a,o){i!==void 0&&this.resize(i,a,o),this.left=e-this.width/2,this.top=n-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(e,n,i,a,o){this._updateBoundingBox(e,n,i,a,o)}},{key:"getDimensionsFromLabel",value:function(e,n,i){this.textSize=this.labelModule.getTextSize(e,n,i);var a=this.textSize.width,o=this.textSize.height,s=14;return a===0&&(a=s,o=s),{width:a,height:o}}}]),t}();function Mwe(t){var r=Dwe();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function Dwe(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Nwe=function(t){Ke(e,t);var r=Mwe(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return re(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o);this.width=s.width+this.margin.right+this.margin.left,this.height=s.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,l,u){this.resize(i,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(i,u),qk(i,this.left,this.top,this.width,this.height,u.borderRadius),this.performFill(i,u),this.updateBoundingBox(a,o,i,s,l),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l)}},{key:"updateBoundingBox",value:function(i,a,o,s,l){this._updateBoundingBox(i,a,o,s,l);var u=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(u)}},{key:"distanceToBorder",value:function(i,a){i&&this.resize(i);var o=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(a)),Math.abs(this.height/2/Math.sin(a)))+o}}]),e}(Ga);function Rwe(t){var r=Fwe();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function Fwe(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Ig=function(t){Ke(e,t);var r=Rwe(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o.labelOffset=0,o.selected=!1,o}return re(e,[{key:"setOptions",value:function(i,a,o){this.options=i,a===void 0&&o===void 0||this.setImages(a,o)}},{key:"setImages",value:function(i,a){a&&this.selected?(this.imageObj=a,this.imageObjAlt=i):(this.imageObj=i,this.imageObjAlt=a)}},{key:"switchImages",value:function(i){var a=i&&!this.selected||!i&&this.selected;if(this.selected=i,this.imageObjAlt!==void 0&&a){var o=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=o}}},{key:"_getImagePadding",value:function(){var i={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var a=this.options.imagePadding;Ze(a)=="object"?(i.top=a.top,i.right=a.right,i.bottom=a.bottom,i.left=a.left):(i.top=a,i.right=a,i.bottom=a,i.left=a)}return i}},{key:"_resizeImage",value:function(){var i,a;if(this.options.shapeProperties.useImageSize===!1){var o=1,s=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?o=this.imageObj.width/this.imageObj.height:s=this.imageObj.height/this.imageObj.width),i=this.options.size*2*o,a=this.options.size*2*s}else{var l=this._getImagePadding();i=this.imageObj.width+l.left+l.right,a=this.imageObj.height+l.top+l.bottom}this.width=i,this.height=a,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(i,a,o,s){this.initContextForDraw(i,s),V1(i,a,o,s.size),this.performFill(i,s)}},{key:"_drawImageAtPosition",value:function(i,a){if(this.imageObj.width!=0){i.globalAlpha=a.opacity!==void 0?a.opacity:1,this.enableShadow(i,a);var o=1;this.options.shapeProperties.interpolation===!0&&(o=this.imageObj.width/this.width/this.body.view.scale);var s=this._getImagePadding(),l=this.left+s.left,u=this.top+s.top,c=this.width-s.left-s.right,h=this.height-s.top-s.bottom;this.imageObj.drawImageAtPosition(i,o,l,u,c,h),this.disableShadow(i,a)}}},{key:"_drawImageLabel",value:function(i,a,o,s,l){var u=0;if(this.height!==void 0){u=this.height*.5;var c=this.labelModule.getTextSize(i,s,l);c.lineCount>=1&&(u+=c.height/2)}var h=o+u;this.options.label&&(this.labelOffset=u),this.labelModule.draw(i,a,h,s,l,"hanging")}}]),e}(Ga);function zwe(t){var r=Bwe();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function Bwe(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Lwe=function(t){Ke(e,t);var r=zwe(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return re(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o),l=Math.max(s.width+this.margin.right+this.margin.left,s.height+this.margin.top+this.margin.bottom);this.options.size=l/2,this.width=l,this.height=l,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,l,u){this.resize(i,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this._drawRawCircle(i,a,o,u),this.updateBoundingBox(a,o),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,o,s,l)}},{key:"updateBoundingBox",value:function(i,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.width*.5}}]),e}(Ig);function jwe(t){var r=Hwe();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function Hwe(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Wwe=function(t){Ke(e,t);var r=jwe(e);function e(n,i,a,o,s){var l;return te(this,e),l=r.call(this,n,i,a),l.setImages(o,s),l}return re(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var l=this.options.size*2;this.width=l,this.height=l,this.radius=.5*this.width;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(i,a,o,s,l,u){this.switchImages(s),this.resize();var c=a,h=o;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,c+=this.width/2,h+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this._drawRawCircle(i,c,h,u),i.save(),i.clip(),this._drawImageAtPosition(i,u),i.restore(),this._drawImageLabel(i,c,h,s,l),this.updateBoundingBox(a,o)}},{key:"updateBoundingBox",value:function(i,a){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=a,this.boundingBox.left=i,this.boundingBox.right=i+this.options.size*2,this.boundingBox.bottom=a+this.options.size*2):(this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.width*.5}}]),e}(Ig);function qwe(t){var r=Uwe();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function Uwe(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Zi=function(t){Ke(e,t);var r=qwe(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(a,o)){var l,u;this.labelModule.getTextSize(i,a,o);var c=2*s.size;this.width=(l=this.customSizeWidth)!==null&&l!==void 0?l:c,this.height=(u=this.customSizeHeight)!==null&&u!==void 0?u:c,this.radius=.5*this.width}}},{key:"_drawShape",value:function(i,a,o,s,l,u,c,h){var d=this;return this.resize(i,u,c,h),this.left=s-this.width/2,this.top=l-this.height/2,this.initContextForDraw(i,h),Tue(a)(i,s,l,h.size),this.performFill(i,h),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(i.font=(u?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),i.fillStyle=this.options.icon.color||"black",i.textAlign="center",i.textBaseline="middle",i.fillText(this.options.icon.code,s,l)),{drawExternalLabel:function(){if(d.options.label!==void 0){d.labelModule.calculateLabelSize(i,u,c,s,l,"hanging");var v=l+.5*d.height+.5*d.labelModule.size.height;d.labelModule.draw(i,s,v,u,c,"hanging")}d.updateBoundingBox(s,l)}}}},{key:"updateBoundingBox",value:function(i,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),e}(Ga);function q6(t,r){var e=yt(t);if(Li){var n=Li(t);r&&(n=kr(n).call(n,function(i){return Ji(t,i).enumerable})),e.push.apply(e,n)}return e}function Vwe(t){for(var r=1;r"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Ywe=function(t){Ke(e,t);var r=Gwe(e);function e(n,i,a,o){var s;return te(this,e),s=r.call(this,n,i,a,o),s.ctxRenderer=o,s}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){this.resize(i,s,l,u),this.left=a-this.width/2,this.top=o-this.height/2,i.save();var c=this.ctxRenderer({ctx:i,id:this.options.id,x:a,y:o,state:{selected:s,hover:l},style:Vwe({},u),label:this.options.label});if(c.drawNode!=null&&c.drawNode(),i.restore(),c.drawExternalLabel){var h=c.drawExternalLabel;c.drawExternalLabel=function(){i.save(),h(),i.restore()}}return c.nodeDimensions&&(this.customSizeWidth=c.nodeDimensions.width,this.customSizeHeight=c.nodeDimensions.height),c}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function Xwe(t){var r=Jwe();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function Jwe(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Zwe=function(t){Ke(e,t);var r=Xwe(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return re(e,[{key:"resize",value:function(i,a,o){if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o),l=s.width+this.margin.right+this.margin.left;this.width=l,this.height=l,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,l,u){this.resize(i,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(i,u),Uk(i,a-this.width/2,o-this.height/2,this.width,this.height),this.performFill(i,u),this.updateBoundingBox(a,o,i,s,l),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Ga);function Qwe(t){var r=e7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function e7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var t7e=function(t){Ke(e,t);var r=Qwe(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"diamond",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function r7e(t){var r=n7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function n7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var i7e=function(t){Ke(e,t);var r=r7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"circle",2,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.options.size}}]),e}(Zi);function a7e(t){var r=o7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function o7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var U6=function(t){Ke(e,t);var r=a7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o);this.height=s.height*2,this.width=s.width+s.height,this.radius=.5*this.width}}},{key:"draw",value:function(i,a,o,s,l,u){this.resize(i,s,l),this.left=a-this.width*.5,this.top=o-this.height*.5,this.initContextForDraw(i,u),zp(i,this.left,this.top,this.width,this.height),this.performFill(i,u),this.updateBoundingBox(a,o,i,s,l),this.labelModule.draw(i,a,o,s,l)}},{key:"distanceToBorder",value:function(i,a){i&&this.resize(i);var o=this.width*.5,s=this.height*.5,l=Math.sin(a)*o,u=Math.cos(a)*s;return o*s/Math.sqrt(l*l+u*u)}}]),e}(Ga);function s7e(t){var r=l7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function l7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var u7e=function(t){Ke(e,t);var r=s7e(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return re(e,[{key:"resize",value:function(i,a,o){this.needsRefresh(a,o)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(i,a,o,s,l,u){var c=this;return this.resize(i,s,l),this.options.icon.size=this.options.icon.size||50,this.left=a-this.width/2,this.top=o-this.height/2,this._icon(i,a,o,s,l,u),{drawExternalLabel:function(){if(c.options.label!==void 0){var d=5;c.labelModule.draw(i,c.left+c.iconSize.width/2+c.margin.left,o+c.height/2+d,s)}c.updateBoundingBox(a,o)}}}},{key:"updateBoundingBox",value:function(i,a){if(this.boundingBox.top=a-this.options.icon.size*.5,this.boundingBox.left=i-this.options.icon.size*.5,this.boundingBox.right=i+this.options.icon.size*.5,this.boundingBox.bottom=a+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0){var o=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+o)}}},{key:"_icon",value:function(i,a,o,s,l,u){var c=Number(this.options.icon.size);this.options.icon.code!==void 0?(i.font=[this.options.icon.weight!=null?this.options.icon.weight:s?"bold":"",(this.options.icon.weight!=null&&s?5:0)+c+"px",this.options.icon.face].join(" "),i.fillStyle=this.options.icon.color||"black",i.textAlign="center",i.textBaseline="middle",this.enableShadow(i,u),i.fillText(this.options.icon.code,a,o),this.disableShadow(i,u)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Ga);function c7e(t){var r=h7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function h7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var d7e=function(t){Ke(e,t);var r=c7e(e);function e(n,i,a,o,s){var l;return te(this,e),l=r.call(this,n,i,a),l.setImages(o,s),l}return re(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var l=this.options.size*2;this.width=l,this.height=l;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(i,a,o,s,l,u){i.save(),this.switchImages(s),this.resize();var c=a,h=o;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,c+=this.width/2,h+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){var d=this.options.borderWidth,f=this.options.borderWidthSelected||2*this.options.borderWidth,v=(s?f:d)/this.body.view.scale;i.lineWidth=Math.min(this.width,v),i.beginPath();var m=s?this.options.color.highlight.border:l?this.options.color.hover.border:this.options.color.border,b=s?this.options.color.highlight.background:l?this.options.color.hover.background:this.options.color.background;u.opacity!==void 0&&(m=Kr(m,u.opacity),b=Kr(b,u.opacity)),i.strokeStyle=m,i.fillStyle=b,i.rect(this.left-.5*i.lineWidth,this.top-.5*i.lineWidth,this.width+i.lineWidth,this.height+i.lineWidth),vu(i).call(i),this.performStroke(i,u),i.closePath()}this._drawImageAtPosition(i,u),this._drawImageLabel(i,c,h,s,l),this.updateBoundingBox(a,o),i.restore()}},{key:"updateBoundingBox",value:function(i,a){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=i,this.top=a):(this.left=i-this.width/2,this.top=a-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Ig);function f7e(t){var r=v7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function v7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var p7e=function(t){Ke(e,t);var r=f7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"square",2,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function m7e(t){var r=g7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function g7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var y7e=function(t){Ke(e,t);var r=m7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"hexagon",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function b7e(t){var r=w7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function w7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var $7e=function(t){Ke(e,t);var r=b7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"star",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function x7e(t){var r=k7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function k7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var S7e=function(t){Ke(e,t);var r=x7e(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return re(e,[{key:"resize",value:function(i,a,o){this.needsRefresh(a,o)&&(this.textSize=this.labelModule.getTextSize(i,a,o),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(i,a,o,s,l,u){this.resize(i,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.enableShadow(i,u),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l),this.disableShadow(i,u),this.updateBoundingBox(a,o,i,s,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Ga);function E7e(t){var r=T7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function T7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var _7e=function(t){Ke(e,t);var r=E7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"triangle",3,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function O7e(t){var r=I7e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function I7e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var C7e=function(t){Ke(e,t);var r=O7e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"draw",value:function(i,a,o,s,l,u){return this._drawShape(i,"triangleDown",3,a,o,s,l,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Zi);function V6(t,r){var e=yt(t);if(Li){var n=Li(t);r&&(n=kr(n).call(n,function(i){return Ji(t,i).enumerable})),e.push.apply(e,n)}return e}function G6(t){for(var r=1;re.left&&this.shape.tope.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}}],[{key:"checkOpacity",value:function(e){return 0<=e&&e<=1}},{key:"checkCoordinateOrigin",value:function(e){return e===void 0||e==="center"||e==="top-left"}},{key:"updateGroupOptions",value:function(e,n,i){var a;if(i!==void 0){var o=e.group;if(n!==void 0&&n.group!==void 0&&o!==n.group)throw new Error("updateGroupOptions: group values in options don't match.");var s=typeof o=="number"||typeof o=="string"&&o!="";if(s){var l=i.get(o);l.opacity!==void 0&&n.opacity===void 0&&(t.checkOpacity(l.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+l.opacity),l.opacity=void 0));var u=kr(a=O6e(n)).call(a,function(c){return n[c]!=null});u.push("font"),wh(u,e,l),e.color=im(e.color)}}}},{key:"parseOptions",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,s=["color","fixed","shadow"];if(wh(s,e,n,i),t.checkMass(n),e.opacity!==void 0&&(t.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),n.opacity!==void 0&&(t.checkOpacity(n.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+n.opacity),n.opacity=void 0)),n.shapeProperties&&!t.checkCoordinateOrigin(n.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+n.shapeProperties.coordinateOrigin),Ur(e,n,"shadow",a),n.color!==void 0&&n.color!==null){var l=im(n.color);GE(e.color,l)}else i===!0&&n.color===null&&(e.color=Di(a.color));n.fixed!==void 0&&n.fixed!==null&&(typeof n.fixed=="boolean"?(e.fixed.x=n.fixed,e.fixed.y=n.fixed):(n.fixed.x!==void 0&&typeof n.fixed.x=="boolean"&&(e.fixed.x=n.fixed.x),n.fixed.y!==void 0&&typeof n.fixed.y=="boolean"&&(e.fixed.y=n.fixed.y))),i===!0&&n.font===null&&(e.font=Di(a.font)),t.updateGroupOptions(e,n,o),n.scaling!==void 0&&Ur(e.scaling,n.scaling,"label",a.scaling)}},{key:"checkMass",value:function(e,n){if(e.mass!==void 0&&e.mass<=0){var i="";n!==void 0&&(i=" in node id: "+n),console.error("%cNegative or zero mass disallowed"+i+", setting mass to 1.",JE),e.mass=1}}}]),t}();function P7e(t,r){var e=typeof Xi<"u"&&qa(t)||t["@@iterator"];if(!e){if(Xe(t)||(e=A7e(t))||r){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function A7e(t,r){var e;if(t){if(typeof t=="string")return K6(t,r);var n=Xt(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Wa(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K6(t,r)}}function K6(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(var n in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,n)&&this.body.nodes[n].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(var i=0,a=yt(this.body.nodes);i1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.data.nodes;if(kk("id",e))this.body.data.nodes=e;else if(Xe(e))this.body.data.nodes=new hh,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new hh;else throw new TypeError("Array or DataSet expected");if(i&&Me(this.nodesListeners,function(s,l){i.off(l,s)}),this.body.nodes={},this.body.data.nodes){var a=this;Me(this.nodesListeners,function(s,l){a.body.data.nodes.on(l,s)});var o=this.body.data.nodes.getIds();this.add(o,!0)}n===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i,a=[],o=0;o1&&arguments[1]!==void 0?arguments[1]:Mr;return new n(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Me(this.body.nodes,function(i,a){var o=e.body.data.nodes.get(a);o!==void 0&&(n===!0&&i.setOptions({x:null,y:null}),i.setOptions({fixed:!1}),i.setOptions(o))})}},{key:"getPositions",value:function(e){var n={};if(e!==void 0){if(Xe(e)===!0){for(var i=0;i0?(l=s/o,n+=l*l):n+=s;return o===1/0?1/0:o*o$e(n)}});var l$e=qe,u$e=l$e.Math.hypot,c$e=u$e,h$e=c$e,d$e=h$e,f$e=pe(d$e);function OT(t){var r=v$e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function v$e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Ot=function(){function t(){te(this,t)}return re(t,null,[{key:"transform",value:function(e,n){Xe(e)||(e=[e]);for(var i=n.point.x,a=n.point.y,o=n.angle,s=n.length,l=0;l4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,n),e.lineWidth=n.width,n.dashes!==!1?this._drawDashedLine(e,n,o):this._drawLine(e,n,o)}},{key:"_drawLine",value:function(e,n,i,a,o){if(this.from!=this.to)this._line(e,n,i,a,o);else{var s=this._getCircleData(e),l=bt(s,3),u=l[0],c=l[1],h=l[2];this._circle(e,n,u,c,h)}}},{key:"_drawDashedLine",value:function(e,n,i,a,o){e.lineCap="round";var s=Xe(n.dashes)?n.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,n,i);else{var l=this._getCircleData(e),u=bt(l,3),c=u[0],h=u[1],d=u[2];this._circle(e,n,c,h,d)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)Vk(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{var f=this._getCircleData(e),v=bt(f,3),m=v[0],b=v[1],y=v[2];this._circle(e,n,m,b,y)}this.enableShadow(e,n),e.stroke(),this.disableShadow(e,n)}}},{key:"findBorderPosition",value:function(e,n,i){return this.from!=this.to?this._findBorderPosition(e,n,i):this._findBorderPositionCircle(e,n,i)}},{key:"findBorderPositions",value:function(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};var n,i=Xt(n=this._getCircleData(e)).call(n,0,2),a=bt(i,2),o=a[0],s=a[1];return{from:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(e){var n=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);var i=$T(e,this.options.selfReference.angle,n,this.from);return[i.x,i.y,n]}},{key:"_pointOnCircle",value:function(e,n,i,a){var o=a*2*Math.PI;return{x:e+i*Math.cos(o),y:n-i*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,n,i){var a=i.x,o=i.y,s=i.low,l=i.high,u=i.direction,c=10,h=this.options.selfReference.size,d=.05,f,v=(s+l)*.5,m=0;this.options.arrowStrikethrough===!0&&(u===-1?m=this.options.endPointOffset.from:u===1&&(m=this.options.endPointOffset.to));var b=0;do{v=(s+l)*.5,f=this._pointOnCircle(a,o,h,v);var y=Math.atan2(e.y-f.y,e.x-f.x),$=e.distanceToBorder(n,y)+m,k=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),O=$-k;if(Math.abs(O)0?u>0?s=v:l=v:u>0?l=v:s=v,++b}while(s<=l&&b1?h=1:h<0&&(h=0);var d=e+h*l,f=n+h*u,v=d-o,m=f-s;return Math.sqrt(v*v+m*m)}},{key:"getArrowData",value:function(e,n,i,a,o,s){var l,u,c,h,d,f,v,m=s.width;n==="from"?(c=this.from,h=this.to,d=s.fromArrowScale<0,f=Math.abs(s.fromArrowScale),v=s.fromArrowType):n==="to"?(c=this.to,h=this.from,d=s.toArrowScale<0,f=Math.abs(s.toArrowScale),v=s.toArrowType):(c=this.to,h=this.from,d=s.middleArrowScale<0,f=Math.abs(s.middleArrowScale),v=s.middleArrowType);var b=15*f+3*m;if(c!=h){var y=f$e(c.x-h.x,c.y-h.y),$=b/y;if(n!=="middle")if(this.options.smooth.enabled===!0){var k=this._findBorderPosition(c,e,{via:i}),O=this.getPoint(k.t+$*(n==="from"?1:-1),i);l=Math.atan2(k.y-O.y,k.x-O.x),u=k}else l=Math.atan2(c.y-h.y,c.x-h.x),u=this._findBorderPosition(c,e);else{var P=(d?-$:$)/2,E=this.getPoint(.5+P,i),D=this.getPoint(.5-P,i);l=Math.atan2(E.y-D.y,E.x-D.x),u=this.getPoint(.5,i)}}else{var B=this._getCircleData(e),R=bt(B,3),A=R[0],z=R[1],L=R[2];if(n==="from"){var J=this.options.selfReference.angle,ne=this.options.selfReference.angle+Math.PI,ae=this._findBorderPositionCircle(this.from,e,{x:A,y:z,low:J,high:ne,direction:-1});l=ae.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=ae}else if(n==="to"){var me=this.options.selfReference.angle,Ie=this.options.selfReference.angle+Math.PI,Re=this._findBorderPositionCircle(this.from,e,{x:A,y:z,low:me,high:Ie,direction:1});l=Re.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=Re}else{var Le=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(A,z,L,Le),l=Le*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var S=u.x-b*.9*Math.cos(l),se=u.y-b*.9*Math.sin(l),ue={x:S,y:se};return{point:u,core:ue,angle:l,length:b,type:v}}},{key:"drawArrowHead",value:function(e,n,i,a,o){e.strokeStyle=this.getColor(e,n),e.fillStyle=e.strokeStyle,e.lineWidth=n.width;var s=IT.draw(e,o);s&&(this.enableShadow(e,n),vu(e).call(e),this.disableShadow(e,n))}},{key:"enableShadow",value:function(e,n){n.shadow===!0&&(e.shadowColor=n.shadowColor,e.shadowBlur=n.shadowSize,e.shadowOffsetX=n.shadowX,e.shadowOffsetY=n.shadowY)}},{key:"disableShadow",value:function(e,n){n.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,n){if(n.background!==!1){var i={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=n.backgroundColor,e.lineWidth=n.backgroundSize,this.setStrokeDashed(e,n.backgroundDashes),e.stroke(),e.strokeStyle=i.strokeStyle,e.lineWidth=i.lineWidth,e.dashes=i.dashes,this.setStrokeDashed(e,n.dashes)}}},{key:"setStrokeDashed",value:function(e,n){if(n!==!1)if(e.setLineDash!==void 0){var i=Xe(n)?n:[5,5];e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),t}();function ew(t,r){var e=yt(t);if(Li){var n=Li(t);r&&(n=kr(n).call(n,function(i){return Ji(t,i).enumerable})),e.push.apply(e,n)}return e}function tw(t){for(var r=1;r"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Cg=function(t){Ke(e,t);var r=_$e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"_findBorderPositionBezier",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),s=10,l=.2,u=!1,c=1,h=0,d=this.to,f,v,m=this.options.endPointOffset?this.options.endPointOffset.to:0;i.id===this.from.id&&(d=this.from,u=!0,m=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(m=0);var b=0;do{v=(h+c)*.5,f=this.getPoint(v,o);var y=Math.atan2(d.y-f.y,d.x-f.x),$=d.distanceToBorder(a,y)+m,k=Math.sqrt(Math.pow(f.x-d.x,2)+Math.pow(f.y-d.y,2)),O=$-k;if(Math.abs(O)0&&(d=this._getDistanceToLine(y,$,m,b,l,u),h=d"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var rw=function(t){Ke(e,t);var r=I$e(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o.via=o.via,o._boundFunction=function(){o.positionBezierNode()},o._body.emitter.on("_repositionBezierNodes",o._boundFunction),o}return re(e,[{key:"setOptions",value:function(i){Bc(ce(e.prototype),"setOptions",this).call(this,i);var a=!1;this.options.physics!==i.physics&&(a=!0),this.options=i,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),a===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}},{key:"setupSupportNode",value:function(){if(this.via===void 0){var i="edgeId:"+this.id,a=this._body.functions.createNode({id:i,shape:"circle",physics:!0,hidden:!0});this._body.nodes[i]=a,this.via=a,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(i,a,o){this._bezierCurve(i,a,o)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var o=this._getCircleData(),s=bt(o,3),l=s[0],u=s[1],c=s[2],h=2*Math.PI*(1-i);return{x:l+c*Math.sin(h),y:u+c-c*(1-Math.cos(h))}}else return{x:Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*a.x+Math.pow(i,2)*this.toPoint.x,y:Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*a.y+Math.pow(i,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(i,a){return this._findBorderPositionBezier(i,a,this.via)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,l,u){return this._getDistanceToBezierEdge(i,a,o,s,l,u,this.via)}}]),e}(Cg);function P$e(t){var r=A$e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function A$e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var nw=function(t){Ke(e,t);var r=P$e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"_line",value:function(i,a,o){this._bezierCurve(i,a,o)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var i=this.options.smooth.roundness,a=this.options.smooth.type,o=Math.abs(this.from.x-this.to.x),s=Math.abs(this.from.y-this.to.y);if(a==="discrete"||a==="diagonalCross"){var l,u;o<=s?l=u=i*s:l=u=i*o,this.from.x>this.to.x&&(l=-l),this.from.y>=this.to.y&&(u=-u);var c=this.from.x+l,h=this.from.y+u;return a==="discrete"&&(o<=s?c=othis.to.x&&(B=-B),this.from.y>=this.to.y&&(R=-R);var A=this.from.x+B,z=this.from.y+R;return o<=s?this.from.x<=this.to.x?A=this.to.xA?this.to.x:A:this.from.y>=this.to.y?z=this.to.y>z?this.to.y:z:z=this.to.y2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(i,a,o.via)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,l,u){var c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(i,a,o,s,l,u,c)}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=i,s=Math.pow(1-o,2)*this.fromPoint.x+2*o*(1-o)*a.x+Math.pow(o,2)*this.toPoint.x,l=Math.pow(1-o,2)*this.fromPoint.y+2*o*(1-o)*a.y+Math.pow(o,2)*this.toPoint.y;return{x:s,y:l}}}]),e}(Cg);function M$e(t){var r=D$e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function D$e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var N$e=function(t){Ke(e,t);var r=M$e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"_getDistanceToBezierEdge2",value:function(i,a,o,s,l,u,c,h){for(var d=1e9,f=i,v=a,m=[0,0,0,0],b=1;b<10;b++){var y=.1*b;m[0]=Math.pow(1-y,3),m[1]=3*y*Math.pow(1-y,2),m[2]=3*Math.pow(y,2)*(1-y),m[3]=Math.pow(y,3);var $=m[0]*i+m[1]*c.x+m[2]*h.x+m[3]*o,k=m[0]*a+m[1]*c.y+m[2]*h.y+m[3]*s;if(b>0){var O=this._getDistanceToLine(f,v,$,k,l,u);d=O"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var iw=function(t){Ke(e,t);var r=R$e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"_line",value:function(i,a,o){var s=o[0],l=o[1];this._bezierCurve(i,a,s,l)}},{key:"_getViaCoordinates",value:function(){var i=this.from.x-this.to.x,a=this.from.y-this.to.y,o,s,l,u,c=this.options.smooth.roundness;return(Math.abs(i)>Math.abs(a)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(s=this.from.y,u=this.to.y,o=this.from.x-c*i,l=this.to.x+c*i):(s=this.from.y-c*a,u=this.to.y+c*a,o=this.from.x,l=this.to.x),[{x:o,y:s},{x:l,y:u}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(i,a){return this._findBorderPositionBezier(i,a)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,l,u){var c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),h=bt(c,2),d=h[0],f=h[1];return this._getDistanceToBezierEdge2(i,a,o,s,l,u,d,f)}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=bt(a,2),s=o[0],l=o[1],u=i,c=[Math.pow(1-u,3),3*u*Math.pow(1-u,2),3*Math.pow(u,2)*(1-u),Math.pow(u,3)],h=c[0]*this.fromPoint.x+c[1]*s.x+c[2]*l.x+c[3]*this.toPoint.x,d=c[0]*this.fromPoint.y+c[1]*s.y+c[2]*l.y+c[3]*this.toPoint.y;return{x:h,y:d}}}]),e}(N$e);function z$e(t){var r=B$e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function B$e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var aw=function(t){Ke(e,t);var r=z$e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"_line",value:function(i,a){i.beginPath(),i.moveTo(this.fromPoint.x,this.fromPoint.y),i.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(i,a),i.stroke(),this.disableShadow(i,a)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(i){return{x:(1-i)*this.fromPoint.x+i*this.toPoint.x,y:(1-i)*this.fromPoint.y+i*this.toPoint.y}}},{key:"_findBorderPosition",value:function(i,a){var o=this.to,s=this.from;i.id===this.from.id&&(o=this.from,s=this.to);var l=Math.atan2(o.y-s.y,o.x-s.x),u=o.x-s.x,c=o.y-s.y,h=Math.sqrt(u*u+c*c),d=i.distanceToBorder(a,l),f=(h-d)/h;return{x:(1-f)*s.x+f*o.x,y:(1-f)*s.y+f*o.y,t:0}}},{key:"_getDistanceToEdge",value:function(i,a,o,s,l,u){return this._getDistanceToLine(i,a,o,s,l,u)}}]),e}(CT),Oo=function(){function t(r,e,n,i,a){if(te(this,t),e===void 0)throw new Error("No body provided");this.options=Di(i),this.globalOptions=i,this.defaultOptions=a,this.body=e,this.imagelist=n,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new kT(this.body,this.options,!0),this.setOptions(r)}return re(t,[{key:"setOptions",value:function(e){if(e){var n=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;t.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=wT(e.value));var i=[e,this.options,this.defaultOptions];return this.chooser=Tg("edge",i),this.updateLabelModule(e),n=this.updateEdgeType()||n,this._setInteractionWidths(),this.connect(),n}}},{key:"getFormattingValues",value:function(){var e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,n=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,i=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,a=this.options.color.inherit,o={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:n,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:a?void 0:this.options.color.color,inheritsColor:a,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){var s=this.options.selectionWidth;typeof s=="function"?o.width=s(o.width):typeof s=="number"&&(o.width+=s),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.highlight,o.shadow=this.options.shadow.enabled}else if(this.hover){var l=this.options.hoverWidth;typeof l=="function"?o.width=l(o.width):typeof l=="number"&&(o.width+=l),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(o,this.options.id,this.selected,this.hover),o.color!==void 0&&(o.inheritsColor=!1),o.shadow===!1&&(o.shadowColor!==this.options.shadow.color||o.shadowSize!==this.options.shadow.size||o.shadowX!==this.options.shadow.x||o.shadowY!==this.options.shadow.y)&&(o.shadow=!0));else o.shadow=this.options.shadow.enabled,o.width=Math.max(o.width,.3/this.body.view.scale);return o}},{key:"updateLabelModule",value:function(e){var n=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,n),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var e=this.options.smooth,n=!1,i=!0;return this.edgeType!==void 0&&((this.edgeType instanceof rw&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof iw&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof nw&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof aw&&e.type.enabled===!1)&&(i=!1),i===!0&&(n=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(n=!0,this.edgeType=new rw(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new iw(this.options,this.body,this.labelModule):this.edgeType=new nw(this.options,this.body,this.labelModule):this.edgeType=new aw(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),n}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(e,n,i){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,n,i,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.width=this.options.scaling.min+a*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(e){var n=this.getFormattingValues();if(!n.hidden){var i=this.edgeType.getViaNode();this.edgeType.drawLine(e,n,this.selected,this.hover,i),this.drawLabel(e,i)}}},{key:"drawArrows",value:function(e){var n=this.getFormattingValues();if(!n.hidden){var i=this.edgeType.getViaNode(),a={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,n.fromArrow&&(a.from=this.edgeType.getArrowData(e,"from",i,this.selected,this.hover,n),n.arrowStrikethrough===!1&&(this.edgeType.fromPoint=a.from.core),n.fromArrowSrc&&(a.from.image=this.imagelist.load(n.fromArrowSrc)),n.fromArrowImageWidth&&(a.from.imageWidth=n.fromArrowImageWidth),n.fromArrowImageHeight&&(a.from.imageHeight=n.fromArrowImageHeight)),n.toArrow&&(a.to=this.edgeType.getArrowData(e,"to",i,this.selected,this.hover,n),n.arrowStrikethrough===!1&&(this.edgeType.toPoint=a.to.core),n.toArrowSrc&&(a.to.image=this.imagelist.load(n.toArrowSrc)),n.toArrowImageWidth&&(a.to.imageWidth=n.toArrowImageWidth),n.toArrowImageHeight&&(a.to.imageHeight=n.toArrowImageHeight)),n.middleArrow&&(a.middle=this.edgeType.getArrowData(e,"middle",i,this.selected,this.hover,n),n.middleArrowSrc&&(a.middle.image=this.imagelist.load(n.middleArrowSrc)),n.middleArrowImageWidth&&(a.middle.imageWidth=n.middleArrowImageWidth),n.middleArrowImageHeight&&(a.middle.imageHeight=n.middleArrowImageHeight)),n.fromArrow&&this.edgeType.drawArrowHead(e,n,this.selected,this.hover,a.from),n.middleArrow&&this.edgeType.drawArrowHead(e,n,this.selected,this.hover,a.middle),n.toArrow&&this.edgeType.drawArrowHead(e,n,this.selected,this.hover,a.to)}}},{key:"drawLabel",value:function(e,n){if(this.options.label!==void 0){var i=this.from,a=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);var o;if(i.id!=a.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,n),e.save();var s=this._getRotation(e);s.angle!=0&&(e.translate(s.x,s.y),e.rotate(s.angle)),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;var l=$T(e,this.options.selfReference.angle,this.options.selfReference.size,i);o=this._pointOnCircle(l.x,l.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(e){var n=[];if(this.labelModule.visible()){var i=this._getRotation();um(this.labelModule.getSize(),e,i)&&n.push({edgeId:this.id,labelId:0})}var a={left:e.x,top:e.y};return this.isOverlappingWith(a)&&n.push({edgeId:this.id}),n}},{key:"isOverlappingWith",value:function(e){if(this.connected){var n=10,i=this.from.x,a=this.from.y,o=this.to.x,s=this.to.y,l=e.left,u=e.top,c=this.edgeType.getDistanceToEdge(i,a,o,s,l,u);return c0&&s<0)&&(l+=Math.PI),a.angle=l,a}},{key:"_pointOnCircle",value:function(e,n,i,a){return{x:e+i*Math.cos(a),y:n-i*Math.sin(a)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}],[{key:"parseOptions",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"];if($s(s,e,n,i),n.endPointOffset!==void 0&&n.endPointOffset.from!==void 0&&(ua(n.endPointOffset.from)?e.endPointOffset.from=n.endPointOffset.from:(e.endPointOffset.from=a.endPointOffset.from!==void 0?a.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),n.endPointOffset!==void 0&&n.endPointOffset.to!==void 0&&(ua(n.endPointOffset.to)?e.endPointOffset.to=n.endPointOffset.to:(e.endPointOffset.to=a.endPointOffset.to!==void 0?a.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),kh(n.label)?e.label=n.label:kh(e.label)||(e.label=void 0),Ur(e,n,"smooth",a),Ur(e,n,"shadow",a),Ur(e,n,"background",a),n.dashes!==void 0&&n.dashes!==null?e.dashes=n.dashes:i===!0&&n.dashes===null&&(e.dashes=ya(a.dashes)),n.scaling!==void 0&&n.scaling!==null?(n.scaling.min!==void 0&&(e.scaling.min=n.scaling.min),n.scaling.max!==void 0&&(e.scaling.max=n.scaling.max),Ur(e.scaling,n.scaling,"label",a.scaling)):i===!0&&n.scaling===null&&(e.scaling=ya(a.scaling)),n.arrows!==void 0&&n.arrows!==null)if(typeof n.arrows=="string"){var l=n.arrows.toLowerCase();e.arrows.to.enabled=He(l).call(l,"to")!=-1,e.arrows.middle.enabled=He(l).call(l,"middle")!=-1,e.arrows.from.enabled=He(l).call(l,"from")!=-1}else if(Ze(n.arrows)==="object")Ur(e.arrows,n.arrows,"to",a.arrows),Ur(e.arrows,n.arrows,"middle",a.arrows),Ur(e.arrows,n.arrows,"from",a.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+fu(n.arrows));else i===!0&&n.arrows===null&&(e.arrows=ya(a.arrows));if(n.color!==void 0&&n.color!==null){var u=To(n.color)?{color:n.color,highlight:n.color,hover:n.color,inherit:!1,opacity:1}:n.color,c=e.color;if(o)st(c,a.color,!1,i);else for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&delete c[h];if(To(c))c.color=c,c.highlight=c,c.hover=c,c.inherit=!1,u.opacity===void 0&&(c.opacity=1);else{var d=!1;u.color!==void 0&&(c.color=u.color,d=!0),u.highlight!==void 0&&(c.highlight=u.highlight,d=!0),u.hover!==void 0&&(c.hover=u.hover,d=!0),u.inherit!==void 0&&(c.inherit=u.inherit),u.opacity!==void 0&&(c.opacity=Math.min(1,Math.max(0,u.opacity))),d===!0?c.inherit=!1:c.inherit===void 0&&(c.inherit="from")}}else i===!0&&n.color===null&&(e.color=Di(a.color));i===!0&&n.font===null&&(e.font=Di(a.font)),Object.prototype.hasOwnProperty.call(n,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=n.selfReferenceSize)}}]),t}(),L$e=function(){function t(r,e,n){var i,a=this;te(this,t),this.body=r,this.images=e,this.groups=n,this.body.functions.createEdge=X(i=this.create).call(i,this),this.edgesListeners={add:function(s,l){a.add(l.items)},update:function(s,l){a.update(l.items)},remove:function(s,l){a.remove(l.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,l,u,c){if(l===s)return .5;var h=1/(l-s);return Math.max(0,(c-s)*h)}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},st(this.options,this.defaultOptions),this.bindEventListeners()}return re(t,[{key:"bindEventListeners",value:function(){var e=this,n,i;this.body.emitter.on("_forceDisableDynamicCurves",function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a==="dynamic"&&(a="continuous");var s=!1;for(var l in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,l)){var u=e.body.edges[l],c=e.body.data.edges.get(l);if(c!=null){var h=c.smooth;h!==void 0&&h.enabled===!0&&h.type==="dynamic"&&(a===void 0?u.setOptions({smooth:!1}):u.setOptions({smooth:{type:a}}),s=!0)}}o===!0&&s===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){e.reconnectEdges()}),this.body.emitter.on("refreshEdges",X(n=this.refresh).call(n,this)),this.body.emitter.on("refresh",X(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",function(){Me(e.edgesListeners,function(a,o){e.body.data.edges&&e.body.data.edges.off(o,a)}),delete e.body.functions.createEdge,delete e.edgesListeners.add,delete e.edgesListeners.update,delete e.edgesListeners.remove,delete e.edgesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){Oo.parseOptions(this.options,e,!0,this.defaultOptions,!0);var n=!1;if(e.smooth!==void 0)for(var i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&(n=this.body.edges[i].updateEdgeType()||n);if(e.font!==void 0)for(var a in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,a)&&this.body.edges[a].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||n===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.body.data.edges;if(kk("id",e))this.body.data.edges=e;else if(Xe(e))this.body.data.edges=new hh,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new hh;else throw new TypeError("Array or DataSet expected");if(a&&Me(this.edgesListeners,function(s,l){a.off(l,s)}),this.body.edges={},this.body.data.edges){Me(this.edgesListeners,function(s,l){n.body.data.edges.on(l,s)});var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),i===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.edges,a=this.body.data.edges,o=0;o1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length!==0){var i=this.body.edges;Me(e,function(a){var o=i[a];o!==void 0&&o.remove()}),n&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var e=this;Me(this.body.edges,function(n,i){var a=e.body.data.edges.get(i);a!==void 0&&n.setOptions(a)})}},{key:"create",value:function(e){return new Oo(e,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var e,n=this.body.nodes,i=this.body.edges;for(e in n)Object.prototype.hasOwnProperty.call(n,e)&&(n[e].edges=[]);for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)){var a=i[e];a.from=null,a.to=null,a.connect()}}},{key:"getConnectedNodes",value:function(e){var n=[];if(this.body.edges[e]!==void 0){var i=this.body.edges[e];i.fromId!==void 0&&n.push(i.fromId),i.toId!==void 0&&n.push(i.toId)}return n}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var e=this,n=[];Me(this.body.edges,function(i,a){var o=e.body.nodes[i.toId],s=e.body.nodes[i.fromId];o!==void 0&&o.isCluster===!0||s!==void 0&&s.isCluster===!0||(o===void 0||s===void 0)&&n.push(a)}),this.remove(n,!1)}},{key:"_addMissingEdges",value:function(){var e=this.body.data.edges;if(e!=null){var n=this.body.edges,i=[];tt(e).call(e,function(a,o){var s=n[o];s===void 0&&i.push(o)}),this.add(i,!0)}}}]),t}(),PT=function(){function t(r,e,n){te(this,t),this.body=r,this.physicsBody=e,this.barnesHutTree,this.setOptions(n),this._rng=R0("BARNES HUT SOLVER")}return re(t,[{key:"setOptions",value:function(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){var e,n=this.body.nodes,i=this.physicsBody.physicsNodeIndices,a=i.length,o=this._formBarnesHutTree(n,i);this.barnesHutTree=o;for(var s=0;s0&&this._getForceContributions(o.root,e)}}},{key:"_getForceContributions",value:function(e,n){this._getForceContribution(e.children.NW,n),this._getForceContribution(e.children.NE,n),this._getForceContribution(e.children.SW,n),this._getForceContribution(e.children.SE,n)}},{key:"_getForceContribution",value:function(e,n){if(e.childrenCount>0){var i=e.centerOfMass.x-n.x,a=e.centerOfMass.y-n.y,o=Math.sqrt(i*i+a*a);o*e.calcSize>this.thetaInversed?this._calculateForces(o,i,a,n,e):e.childrenCount===4?this._getForceContributions(e,n):e.children.data.id!=n.id&&this._calculateForces(o,i,a,n,e)}}},{key:"_calculateForces",value:function(e,n,i,a,o){e===0&&(e=.1,n=e),this.overlapAvoidanceFactor<1&&a.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*a.shape.radius,e-a.shape.radius));var s=this.options.gravitationalConstant*o.mass*a.options.mass/Math.pow(e,3),l=n*s,u=i*s;this.physicsBody.forces[a.id].x+=l,this.physicsBody.forces[a.id].y+=u}},{key:"_formBarnesHutTree",value:function(e,n){for(var i,a=n.length,o=e[n[0]].x,s=e[n[0]].y,l=e[n[0]].x,u=e[n[0]].y,c=1;c0&&(dl&&(l=d),fu&&(u=f))}var v=Math.abs(l-o)-Math.abs(u-s);v>0?(s-=.5*v,u+=.5*v):(o+=.5*v,l-=.5*v);var m=1e-5,b=Math.max(m,Math.abs(l-o)),y=.5*b,$=.5*(o+l),k=.5*(s+u),O={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:$-y,maxX:$+y,minY:k-y,maxY:k+y},size:b,calcSize:1/b,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(O.root);for(var P=0;P0&&this._placeInTree(O.root,i);return O}},{key:"_updateBranchMass",value:function(e,n){var i=e.centerOfMass,a=e.mass+n.options.mass,o=1/a;i.x=i.x*e.mass+n.x*n.options.mass,i.x*=o,i.y=i.y*e.mass+n.y*n.options.mass,i.y*=o,e.mass=a;var s=Math.max(Math.max(n.height,n.radius),n.width);e.maxWidth=e.maxWidthn.x?a.maxY>n.y?o="NW":o="SW":a.maxY>n.y?o="NE":o="SE",this._placeInRegion(e,n,o)}},{key:"_placeInRegion",value:function(e,n,i){var a=e.children[i];switch(a.childrenCount){case 0:a.children.data=n,a.childrenCount=1,this._updateBranchMass(a,n);break;case 1:a.children.data.x===n.x&&a.children.data.y===n.y?(n.x+=this._rng(),n.y+=this._rng()):(this._splitBranch(a),this._placeInTree(a,n));break;case 4:this._placeInTree(a,n);break}}},{key:"_splitBranch",value:function(e){var n=null;e.childrenCount===1&&(n=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),n!=null&&this._placeInTree(e,n)}},{key:"_insertRegion",value:function(e,n){var i,a,o,s,l=.5*e.size;switch(n){case"NW":i=e.range.minX,a=e.range.minX+l,o=e.range.minY,s=e.range.minY+l;break;case"NE":i=e.range.minX+l,a=e.range.maxX,o=e.range.minY,s=e.range.minY+l;break;case"SW":i=e.range.minX,a=e.range.minX+l,o=e.range.minY+l,s=e.range.maxY;break;case"SE":i=e.range.minX+l,a=e.range.maxX,o=e.range.minY+l,s=e.range.maxY;break}e.children[n]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:a,minY:o,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,n){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,n))}},{key:"_drawBranch",value:function(e,n,i){i===void 0&&(i="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,n),this._drawBranch(e.children.NE,n),this._drawBranch(e.children.SE,n),this._drawBranch(e.children.SW,n)),n.strokeStyle=i,n.beginPath(),n.moveTo(e.range.minX,e.range.minY),n.lineTo(e.range.maxX,e.range.minY),n.stroke(),n.beginPath(),n.moveTo(e.range.maxX,e.range.minY),n.lineTo(e.range.maxX,e.range.maxY),n.stroke(),n.beginPath(),n.moveTo(e.range.maxX,e.range.maxY),n.lineTo(e.range.minX,e.range.maxY),n.stroke(),n.beginPath(),n.moveTo(e.range.minX,e.range.maxY),n.lineTo(e.range.minX,e.range.minY),n.stroke()}}]),t}(),j$e=function(){function t(r,e,n){te(this,t),this._rng=R0("REPULSION SOLVER"),this.body=r,this.physicsBody=e,this.setOptions(n)}return re(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,n,i,a,o,s,l,u,c=this.body.nodes,h=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces,f=this.options.nodeDistance,v=-2/3/f,m=4/3,b=0;b"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var V$e=function(t){Ke(e,t);var r=q$e(e);function e(n,i,a){var o;return te(this,e),o=r.call(this,n,i,a),o._rng=R0("FORCE ATLAS 2 BASED REPULSION SOLVER"),o}return re(e,[{key:"_calculateForces",value:function(i,a,o,s,l){i===0&&(i=.1*this._rng(),a=i),this.overlapAvoidanceFactor<1&&s.shape.radius&&(i=Math.max(.1+this.overlapAvoidanceFactor*s.shape.radius,i-s.shape.radius));var u=s.edges.length+1,c=this.options.gravitationalConstant*l.mass*s.options.mass*u/Math.pow(i,2),h=a*c,d=o*c;this.physicsBody.forces[s.id].x+=h,this.physicsBody.forces[s.id].y+=d}}]),e}(PT);function G$e(t){var r=K$e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function K$e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var Y$e=function(t){Ke(e,t);var r=G$e(e);function e(n,i,a){return te(this,e),r.call(this,n,i,a)}return re(e,[{key:"_calculateForces",value:function(i,a,o,s,l){if(i>0){var u=l.edges.length+1,c=this.options.centralGravity*u*l.options.mass;s[l.id].x=a*c,s[l.id].y=o*c}}}]),e}(Lc),X$e=function(){function t(r){te(this,t),this.body=r,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},At(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return re(t,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("initPhysics",function(){e.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){e.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){e.stopSimulation(),e.ready=!1}),this.body.emitter.on("disablePhysics",function(){e.physicsEnabled=!1,e.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){e.setOptions(e.options),e.ready===!0&&e.startSimulation()}),this.body.emitter.on("startSimulation",function(){e.ready===!0&&e.startSimulation()}),this.body.emitter.on("stopSimulation",function(){e.stopSimulation()}),this.body.emitter.on("destroy",function(){e.stopSimulation(!1),e.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){e.updatePhysicsData()})}},{key:"setOptions",value:function(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,wh(["stabilization"],this.options,e),Ur(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var n=this.options.wind;n&&((typeof n.x!="number"||lm(n.x))&&(n.x=0),(typeof n.y!="number"||lm(n.y))&&(n.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new V$e(this.body,this.physicsBody,e),this.edgesSolver=new Ev(this.body,this.physicsBody,e),this.gravitySolver=new Y$e(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new j$e(this.body,this.physicsBody,e),this.edgesSolver=new Ev(this.body,this.physicsBody,e),this.gravitySolver=new Lc(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new H$e(this.body,this.physicsBody,e),this.edgesSolver=new W$e(this.body,this.physicsBody,e),this.gravitySolver=new Lc(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new PT(this.body,this.physicsBody,e),this.edgesSolver=new Ev(this.body,this.physicsBody,e),this.gravitySolver=new Lc(this.body,this.physicsBody,e)),this.modelOptions=e}},{key:"initPhysics",value:function(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=X(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var e=mh();this.physicsTick();var n=mh()-e;(n<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&Cn(function(){e.body.emitter.emit("stabilized",{iterations:n}),e.startedStabilization=!1,e.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){var e=1.2;this._evaluateStepQuality()===!0?this.timestep=e*this.timestep:this.timestep/es))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,n=0,i=0,a=5,o=0;os&&(e=e>0?s:-s),e}},{key:"_performStep",value:function(e){var n=this.body.nodes[e],i=this.physicsBody.forces[e];this.options.wind&&(i.x+=this.options.wind.x,i.y+=this.options.wind.y);var a=this.physicsBody.velocities[e];this.previousStates[e]={x:n.x,y:n.y,vx:a.x,vy:a.y},n.options.fixed.x===!1?(a.x=this.calculateComponentVelocity(a.x,i.x,n.options.mass),n.x+=a.x*this.timestep):(i.x=0,a.x=0),n.options.fixed.y===!1?(a.y=this.calculateComponentVelocity(a.y,i.y,n.options.mass),n.y+=a.y*this.timestep):(i.y=0,a.y=0);var o=Math.sqrt(Math.pow(a.x,2)+Math.pow(a.y,2));return o}},{key:"_freezeNodes",value:function(){var e=this.body.nodes;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&e[n].x&&e[n].y){var i=e[n].options.fixed;this.freezeCache[n]={x:i.x,y:i.y},i.x=!0,i.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var e=this.body.nodes;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.freezeCache[n]!==void 0&&(e[n].options.fixed.x=this.freezeCache[n].x,e[n].options.fixed.y=this.freezeCache[n].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof n!="number"&&(n=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",n)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=n,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,Cn(function(){return e._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var e=this,n=function(){return e.stabilized===!1&&e.stabilizationIterations1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,a=-1e9,o=1e9,s=-1e9,l;if(n.length>0)for(var u=0;ul.shape.boundingBox.left&&(o=l.shape.boundingBox.left),sl.shape.boundingBox.top&&(i=l.shape.boundingBox.top),a1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,a=-1e9,o=1e9,s=-1e9,l;if(n.length>0)for(var u=0;ul.x&&(o=l.x),sl.y&&(i=l.y),a"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var n8e=function(t){Ke(e,t);var r=t8e(e);function e(n,i,a,o,s,l){var u;return te(this,e),u=r.call(this,n,i,a,o,s,l),u.isCluster=!0,u.containedNodes={},u.containedEdges={},u}return re(e,[{key:"_openChildCluster",value:function(i){var a=this,o=this.body.nodes[i];if(this.containedNodes[i]===void 0)throw new Error("node with id: "+i+" not in current cluster");if(!o.isCluster)throw new Error("node with id: "+i+" is not a cluster");delete this.containedNodes[i],Me(o.edges,function(s){delete a.containedEdges[s.id]}),Me(o.containedNodes,function(s,l){a.containedNodes[l]=s}),o.containedNodes={},Me(o.containedEdges,function(s,l){a.containedEdges[l]=s}),o.containedEdges={},Me(o.edges,function(s){Me(a.edges,function(l){var u,c,h=He(u=l.clusteringEdgeReplacingIds).call(u,s.id);h!==-1&&(Me(s.clusteringEdgeReplacingIds,function(d){l.clusteringEdgeReplacingIds.push(d),a.body.edges[d].edgeReplacedById=l.id}),Zn(c=l.clusteringEdgeReplacingIds).call(c,h,1))})}),o.edges=[]}}]),e}(Mr),i8e=function(){function t(r){var e=this;te(this,t),this.body=r,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},At(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){e.clusteredNodes={},e.clusteredEdges={}})}return re(t,[{key:"clusterByHubsize",value:function(e,n){e===void 0?e=this._getHubSize():Ze(e)==="object"&&(n=this._checkOptions(e),e=this._getHubSize());for(var i=[],a=0;a=e&&i.push(o.id)}for(var s=0;s0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(n.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");n=this._checkOptions(n);var a={},o={};Me(this.body.nodes,function(s,l){s.options&&n.joinCondition(s.options)===!0&&(a[l]=s,Me(s.edges,function(u){e.clusteredEdges[u.id]===void 0&&(o[u.id]=u)}))}),this._cluster(a,o,n,i)}},{key:"clusterByEdgeCount",value:function(e,n){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;n=this._checkOptions(n);for(var o=[],s={},l,u,c,h=function(){var m={},b={},y=i.body.nodeIndices[d],$=i.body.nodes[y];if(s[y]===void 0){c=0,u=[];for(var k=0;k<$.edges.length;k++)l=$.edges[k],i.clusteredEdges[l.id]===void 0&&(l.toId!==l.fromId&&c++,u.push(l));if(c===e){for(var O=function(J){if(n.joinCondition===void 0||n.joinCondition===null)return!0;var ne=ar.cloneOptions(J);return n.joinCondition(ne)},P=!0,E=0;E0&&yt(b).length>0&&P===!0){var B=function(){for(var J=0;J1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,n)}},{key:"clusterBridges",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,n)}},{key:"clusterByConnection",value:function(e,n){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[e];n=this._checkOptions(n,o),n.clusterNodeProperties.x===void 0&&(n.clusterNodeProperties.x=o.x),n.clusterNodeProperties.y===void 0&&(n.clusterNodeProperties.y=o.y),n.clusterNodeProperties.fixed===void 0&&(n.clusterNodeProperties.fixed={},n.clusterNodeProperties.fixed.x=o.options.fixed.x,n.clusterNodeProperties.fixed.y=o.options.fixed.y);var s={},l={},u=o.id,c=ar.cloneOptions(o);s[u]=o;for(var h=0;h-1&&(l[k.id]=k)}this._cluster(s,l,n,a)}},{key:"_createClusterEdges",value:function(e,n,i,a){for(var o,s,l,u,c,h,d=yt(e),f=[],v=0;v0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}},{key:"_cluster",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&this.clusteredNodes[s]!==void 0&&o.push(s);for(var l=0;la?l.x:a,o=l.ys?l.y:s;return{x:.5*(i+a),y:.5*(o+s)}}},{key:"openCluster",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");var a=this.body.nodes[e];if(a===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(a.isCluster!==!0||a.containedNodes===void 0||a.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");var o=this.findNode(e),s=He(o).call(o,e)-1;if(s>=0){var l=o[s],u=this.body.nodes[l];u._openChildCluster(e),delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged");return}var c=a.containedNodes,h=a.containedEdges;if(n!==void 0&&n.releaseFunction!==void 0&&typeof n.releaseFunction=="function"){var d={},f={x:a.x,y:a.y};for(var v in c)if(Object.prototype.hasOwnProperty.call(c,v)){var m=this.body.nodes[v];d[v]={x:m.x,y:m.y}}var b=n.releaseFunction(f,d);for(var y in c)if(Object.prototype.hasOwnProperty.call(c,y)){var $=this.body.nodes[y];b[y]!==void 0&&($.x=b[y].x===void 0?a.x:b[y].x,$.y=b[y].y===void 0?a.y:b[y].y)}}else Me(c,function(Re){Re.options.fixed.x===!1&&(Re.x=a.x),Re.options.fixed.y===!1&&(Re.y=a.y)});for(var k in c)if(Object.prototype.hasOwnProperty.call(c,k)){var O=this.body.nodes[k];O.vx=a.vx,O.vy=a.vy,O.setOptions({physics:!0}),delete this.clusteredNodes[k]}for(var P=[],E=0;E0&&sa&&(a=s.edges.length),e+=s.edges.length,n+=Math.pow(s.edges.length,2),i+=1}e=e/i,n=n/i;var l=n-Math.pow(e,2),u=Math.sqrt(l),c=Math.floor(e+2*u);return c>a&&(c=a),c}},{key:"_createClusteredEdge",value:function(e,n,i,a,o){var s=ar.cloneOptions(i,"edge");st(s,a),s.from=e,s.to=n,s.id="clusterEdge:"+Js(),o!==void 0&&st(s,o);var l=this.body.functions.createEdge(s);return l.clusteringEdgeReplacingIds=[i.id],l.connect(),this.body.edges[l.id]=l,l}},{key:"_clusterEdges",value:function(e,n,i,a){if(n instanceof Oo){var o=n,s={};s[o.id]=o,n=s}if(e instanceof Mr){var l=e,u={};u[l.id]=l,e=u}if(i==null)throw new Error("_clusterEdges: parameter clusterNode required");a===void 0&&(a=i.clusterEdgeProperties),this._createClusterEdges(e,n,i,a);for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)&&this.body.edges[c]!==void 0){var h=this.body.edges[c];this._backupEdgeOptions(h),h.setOptions({physics:!1})}for(var d in e)Object.prototype.hasOwnProperty.call(e,d)&&(this.clusteredNodes[d]={clusterId:i.id,node:this.body.nodes[d]},this.body.nodes[d].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(e!==void 0){var n=this.clusteredNodes[e];if(n!==void 0){var i=n.clusterId;if(i!==void 0)return this.body.nodes[i]}}}},{key:"_filter",value:function(e,n){var i=[];return Me(e,function(a){n(a)&&i.push(a)}),i}},{key:"_updateState",value:function(){var e=this,n,i=[],a={},o=function(v){Me(e.body.nodes,function(m){m.isCluster===!0&&v(m)})};for(n in this.clusteredNodes)if(Object.prototype.hasOwnProperty.call(this.clusteredNodes,n)){var s=this.body.nodes[n];s===void 0&&i.push(n)}o(function(f){for(var v=0;v0}(!f.endPointsValid()||!m)&&(a[v]=v)}),o(function(f){Me(a,function(v){delete f.containedEdges[v],Me(f.edges,function(m,b){if(m.id===v){f.edges[b]=null;return}m.clusteringEdgeReplacingIds=e._filter(m.clusteringEdgeReplacingIds,function(y){return!a[y]})}),f.edges=e._filter(f.edges,function(m){return m!==null})})}),Me(a,function(f){delete e.clusteredEdges[f]}),Me(a,function(f){delete e.body.edges[f]});var u=yt(this.body.edges);Me(u,function(f){var v=e.body.edges[f],m=e._isClusteredNode(v.fromId)||e._isClusteredNode(v.toId);if(m!==e._isClusteredEdge(v.id))if(m){var b=e._getClusterNodeForNode(v.fromId);b!==void 0&&e._clusterEdges(e.body.nodes[v.fromId],v,b);var y=e._getClusterNodeForNode(v.toId);y!==void 0&&e._clusterEdges(e.body.nodes[v.toId],v,y)}else delete e._clusterEdges[f],e._restoreEdge(v)});for(var c=!1,h=!0,d=function(){var v=[];o(function(b){var y=yt(b.containedNodes).length,$=b.options.allowSingleNodeCluster===!0;($&&y<1||!$&&y<2)&&v.push(b.id)});for(var m=0;m0,c=c||h};h;)d();c&&this._updateState()}},{key:"_isClusteredNode",value:function(e){return this.clusteredNodes[e]!==void 0}},{key:"_isClusteredEdge",value:function(e){return this.clusteredEdges[e]!==void 0}}]),t}();function a8e(){var t;window!==void 0&&(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),t===void 0?window.requestAnimationFrame=function(r){r()}:window.requestAnimationFrame=t}var o8e=function(){function t(r,e){te(this,t),a8e(),this.body=r,this.canvas=e,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},At(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return re(t,[{key:"bindEventListeners",value:function(){var e=this,n;this.body.emitter.on("dragStart",function(){e.dragging=!0}),this.body.emitter.on("dragEnd",function(){e.dragging=!1}),this.body.emitter.on("zoom",function(){e.zooming=!0,window.clearTimeout(e.zoomTimeoutId),e.zoomTimeoutId=Cn(function(){var i;e.zooming=!1,X(i=e._requestRedraw).call(i,e)()},250)}),this.body.emitter.on("_resizeNodes",function(){e._resizeNodes()}),this.body.emitter.on("_redraw",function(){e.renderingActive===!1&&e._redraw()}),this.body.emitter.on("_blockRedraw",function(){e.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){e.allowRedraw=!0,e.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",X(n=this._requestRedraw).call(n,this)),this.body.emitter.on("_startRendering",function(){e.renderRequests+=1,e.renderingActive=!0,e._startRendering()}),this.body.emitter.on("_stopRendering",function(){e.renderRequests-=1,e.renderingActive=e.renderRequests>0,e.renderTimer=void 0}),this.body.emitter.on("destroy",function(){e.renderRequests=0,e.allowRedraw=!1,e.renderingActive=!1,e.requiresTimeout===!0?clearTimeout(e.renderTimer):window.cancelAnimationFrame(e.renderTimer),e.body.emitter.off()})}},{key:"setOptions",value:function(e){if(e!==void 0){var n=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];$s(n,this.options,e)}}},{key:"_requestNextFrame",value:function(e,n){if(!(typeof window>"u")){var i,a=window;return this.requiresTimeout===!0?i=Cn(e,n):a.requestAnimationFrame&&(i=a.requestAnimationFrame(e)),i}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(X(e=this._renderStep).call(e,this),this.simulationInterval)}}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var e=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this._requestNextFrame(function(){e._redraw(!1)},0))}},{key:"_redraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var n={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var i=this.canvas.getContext(),a=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(i.clearRect(0,0,a,o),this.canvas.frame.clientWidth===0)return;if(i.save(),i.translate(this.body.view.translation.x,this.body.view.translation.y),i.scale(this.body.view.scale,this.body.view.scale),i.beginPath(),this.body.emitter.emit("beforeDrawing",i),i.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(i),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){var s=this._drawNodes(i,e),l=s.drawExternalLabels;n.drawExternalLabels=l}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(i),n.drawExternalLabels!=null&&n.drawExternalLabels(),e===!1&&this._drawSelectionBox(i),i.beginPath(),this.body.emitter.emit("afterDrawing",i),i.closePath(),i.restore(),e===!0&&i.clearRect(0,0,a,o)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);var n=this.body.nodes,i;for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(i=n[a],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.nodes,a=this.body.nodeIndices,o,s=[],l=[],u=20,c=this.canvas.DOMtoCanvas({x:-20,y:-20}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+u,y:this.canvas.frame.canvas.clientHeight+u}),d={top:c.y,left:c.x,bottom:h.y,right:h.x},f=[],v=0;v0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}},{key:"_setCameraState",value:function(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){var e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,n=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;e!=1&&n!=1?i=this.cameraState.scale*.5*(e+n):e!=1?i=this.cameraState.scale*e:n!=1&&(i=this.cameraState.scale*n),this.body.view.scale=i;var a=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),o={x:a.x-this.cameraState.position.x,y:a.y-this.cameraState.position.y};this.body.view.translation.x+=o.x*this.body.view.scale,this.body.view.translation.y+=o.y*this.body.view.scale}}},{key:"_prepareValue",value:function(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(He(e).call(e,"%")!==-1||He(e).call(e,"px")!==-1)return e;if(He(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var e=this;this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new _o(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:_o.DIRECTION_ALL}),Sh(this.hammer,function(n){e.body.eventListeners.onTouch(n)}),this.hammer.on("tap",function(n){e.body.eventListeners.onTap(n)}),this.hammer.on("doubletap",function(n){e.body.eventListeners.onDoubleTap(n)}),this.hammer.on("press",function(n){e.body.eventListeners.onHold(n)}),this.hammer.on("panstart",function(n){e.body.eventListeners.onDragStart(n)}),this.hammer.on("panmove",function(n){e.body.eventListeners.onDrag(n)}),this.hammer.on("panend",function(n){e.body.eventListeners.onDragEnd(n)}),this.hammer.on("pinch",function(n){e.body.eventListeners.onPinch(n)}),this.frame.canvas.addEventListener("wheel",function(n){e.body.eventListeners.onMouseWheel(n)}),this.frame.canvas.addEventListener("mousemove",function(n){e.body.eventListeners.onMouseMove(n)}),this.frame.canvas.addEventListener("contextmenu",function(n){e.body.eventListeners.onContext(n)}),this.hammerFrame=new _o(this.frame),AT(this.hammerFrame,function(n){e.body.eventListeners.onRelease(n)})}},{key:"setSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),n=this._prepareValue(n);var i=!1,a=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||n!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=n)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=n,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=n,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{var l=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),u=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==l||this.frame.canvas.height!==u)&&this._getCameraState(s),this.frame.canvas.width!==l&&(this.frame.canvas.width=l,i=!0),this.frame.canvas.height!==u&&(this.frame.canvas.height=u,i=!0)}return i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(a/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");var n=1;typeof window<"u"&&(n=window.devicePixelRatio||1);var i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return n/i}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}},{key:"DOMtoCanvas",value:function(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}]),t}();function d8e(t,r){var e=At({nodes:r,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},t??{});if(!Xe(e.nodes))throw new TypeError("Nodes has to be an array of ids.");if(e.nodes.length===0&&(e.nodes=r),!(typeof e.minZoomLevel=="number"&&e.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof e.maxZoomLevel=="number"&&e.minZoomLevel<=e.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return e}var f8e=function(){function t(r,e){var n,i=this,a;te(this,t),this.body=r,this.canvas=e,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",X(n=this.fit).call(n,this)),this.body.emitter.on("animationFinished",function(){i.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",X(a=this.releaseNode).call(a,this))}return re(t,[{key:"setOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}},{key:"fit",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=d8e(e,this.body.nodeIndices);var i=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight,o,s;if(i===0||a===0)s=1,o=ar.getRange(this.body.nodes,e.nodes);else if(n===!0){var l=0;for(var u in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,u)){var c=this.body.nodes[u];c.predefinedPosition===!0&&(l+=1)}if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=ar.getRange(this.body.nodes,e.nodes);var h=this.body.nodeIndices.length;s=12.662/(h+7.4147)+.0964822;var d=Math.min(i/600,a/600);s*=d}else{this.body.emitter.emit("_resizeNodes"),o=ar.getRange(this.body.nodes,e.nodes);var f=Math.abs(o.maxX-o.minX)*1.1,v=Math.abs(o.maxY-o.minY)*1.1,m=i/f,b=a/v;s=m<=b?m:b}s>e.maxZoomLevel?s=e.maxZoomLevel:s1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){var i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};n.position=i,n.lockedOnNode=e,this.moveTo(n)}else console.error("Node: "+e+" cannot be found.")}},{key:"moveTo",value:function(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!ua(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!ua(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!ua(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!ua(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}},{key:"animateView",value:function(e){if(e!==void 0){this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;var n=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:n.x-e.position.x,y:n.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var a;this.viewFunction=X(a=this._lockedRedraw).call(a,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var o;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=X(o=this._transitionRedraw).call(o,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}}},{key:"_lockedRedraw",value:function(){var e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},n=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:n.x-e.x,y:n.y-e.y},a=this.body.view.translation,o={x:a.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}},{key:"releaseNode",value:function(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;var n=X4e[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*n,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*n,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*n},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var i;this.viewFunction=X(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();function sw(t){var r=t&&t.preventDefault||!1,e=t&&t.container||window,n={},i={keydown:{},keyup:{}},a={},o;for(o=97;o<=122;o++)a[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)a[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)a[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)a["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)a["num"+o]={code:96+o,shift:!1};a["num*"]={code:106,shift:!1},a["num+"]={code:107,shift:!1},a["num-"]={code:109,shift:!1},a["num/"]={code:111,shift:!1},a["num."]={code:110,shift:!1},a.left={code:37,shift:!1},a.up={code:38,shift:!1},a.right={code:39,shift:!1},a.down={code:40,shift:!1},a.space={code:32,shift:!1},a.enter={code:13,shift:!1},a.shift={code:16,shift:void 0},a.esc={code:27,shift:!1},a.backspace={code:8,shift:!1},a.tab={code:9,shift:!1},a.ctrl={code:17,shift:!1},a.alt={code:18,shift:!1},a.delete={code:46,shift:!1},a.pageup={code:33,shift:!1},a.pagedown={code:34,shift:!1},a["="]={code:187,shift:!1},a["-"]={code:189,shift:!1},a["]"]={code:221,shift:!1},a["["]={code:219,shift:!1};var s=function(c){u(c,"keydown")},l=function(c){u(c,"keyup")},u=function(c,h){if(i[h][c.keyCode]!==void 0){for(var d=i[h][c.keyCode],f=0;f700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}},{key:"_stopMovement",value:function(){for(var e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var e=this.body.view.scale,n=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,a=n/e,o=(1-a)*this.canvas.canvasViewCenter.x+i.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+i.y*a;this.body.view.scale=n,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var e=this.body.view.scale,n=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,a=n/e,o=(1-a)*this.canvas.canvasViewCenter.x+i.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+i.y*a;this.body.view.scale=n,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var e=this;if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=sw({container:window,preventDefault:!0}):this.keycharm=sw({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var n,i,a,o,s,l,u,c,h,d,f,v,m,b,y,$,k,O,P,E,D,B,R,A;X(n=this.keycharm).call(n,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),X(i=this.keycharm).call(i,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),X(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),X(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),X(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),X(l=this.keycharm).call(l,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),X(u=this.keycharm).call(u,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),X(c=this.keycharm).call(c,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),X(h=this.keycharm).call(h,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),X(d=this.keycharm).call(d,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),X(f=this.keycharm).call(f,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),X(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),X(m=this.keycharm).call(m,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),X(b=this.keycharm).call(b,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),X(y=this.keycharm).call(y,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),X($=this.keycharm).call($,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),X(k=this.keycharm).call(k,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),X(O=this.keycharm).call(O,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),X(P=this.keycharm).call(P,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),X(E=this.keycharm).call(E,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),X(D=this.keycharm).call(D,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),X(B=this.keycharm).call(B,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),X(R=this.keycharm).call(R,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),X(A=this.keycharm).call(A,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),t}();function p8e(t,r){var e=typeof Xi<"u"&&qa(t)||t["@@iterator"];if(!e){if(Xe(t)||(e=m8e(t))||r){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function m8e(t,r){var e;if(t){if(typeof t=="string")return lw(t,r);var n=Xt(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Wa(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lw(t,r)}}function lw(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}},{key:"onTap",value:function(e){var n=this.getPointer(e.center),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(n,i),this.selectionHandler.commitAndEmit(n,e),this.selectionHandler.generateClickEvent("click",e,n)}},{key:"onDoubleTap",value:function(e){var n=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,n)}},{key:"onHold",value:function(e){var n=this.getPointer(e.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(n,i),this.selectionHandler.commitAndEmit(n,e),this.selectionHandler.generateClickEvent("click",e,n),this.selectionHandler.generateClickEvent("hold",e,n)}},{key:"onRelease",value:function(e){if(new Date().valueOf()-this.touchTime>10){var n=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,n),this.touchTime=new Date().valueOf()}}},{key:"onContext",value:function(e){var n=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,n)}},{key:"checkSelectionChanges",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}},{key:"_determineDifference",value:function(e,n){var i=function(o,s){for(var l=[],u=0;u=o.minX&&h.x<=o.maxX&&h.y>=o.minY&&h.y<=o.maxY});tt(s).call(s,function(c){return n.selectionHandler.selectObject(n.body.nodes[c])});var l=this.getPointer(e.center);this.selectionHandler.commitAndEmit(l,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var u=this.drag.selection;u&&u.length?(tt(u).call(u,function(c){c.node.options.fixed.x=c.xFixed,c.node.options.fixed.y=c.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}},{key:"onPinch",value:function(e){var n=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);var i=this.pinch.scale*e.scale;this.zoom(i,n)}},{key:"zoom",value:function(e,n){if(this.options.zoomView===!0){var i=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);var a=void 0;this.drag!==void 0&&this.drag.dragging===!0&&(a=this.canvas.DOMtoCanvas(this.drag.pointer));var o=this.body.view.translation,s=e/i,l=(1-s)*n.x+o.x*s,u=(1-s)*n.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:l,y:u},a!=null){var c=this.canvas.canvasToDOM(a);this.drag.pointer.x=c.x,this.drag.pointer.y=c.y}this.body.emitter.emit("_requestRedraw"),i0&&(this.popupObj=c[d[d.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){for(var v=this.body.edgeIndices,m=this.body.edges,b,y=[],$=0;$0&&(this.popupObj=m[y[y.length-1]],l="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new i2e(this.canvas.frame)),this.popup.popupTargetType=l,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(e){var n=this.selectionHandler._pointerToPositionObject(e),i=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(n),i===!0)){var a=this.selectionHandler.getNodeAt(e);i=a===void 0?!1:a.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(n));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}(),y8e=Sg,b8e=cT;y8e("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},b8e);var w8e=qe,$8e=w8e.Set,x8e=$8e,k8e=x8e,S8e=k8e,oa=pe(S8e),E8e=Ge,uw=Eg,pc=F0.getWeakData,T8e=kg,_8e=Wr,O8e=cs,Tv=Ut,I8e=xg,MT=Yi,cw=Vt,DT=Ha,C8e=DT.set,P8e=DT.getterFor,A8e=MT.find,M8e=MT.findIndex,D8e=E8e([].splice),N8e=0,mc=function(t){return t.frozen||(t.frozen=new NT)},NT=function(){this.entries=[]},_v=function(t,r){return A8e(t.entries,function(e){return e[0]===r})};NT.prototype={get:function(t){var r=_v(this,t);if(r)return r[1]},has:function(t){return!!_v(this,t)},set:function(t,r){var e=_v(this,t);e?e[1]=r:this.entries.push([t,r])},delete:function(t){var r=M8e(this.entries,function(e){return e[0]===t});return~r&&D8e(this.entries,r,1),!!~r}};var R8e={getConstructor:function(t,r,e,n){var i=t(function(l,u){T8e(l,a),C8e(l,{type:r,id:N8e++,frozen:void 0}),O8e(u)||I8e(u,l[n],{that:l,AS_ENTRIES:e})}),a=i.prototype,o=P8e(r),s=function(l,u,c){var h=o(l),d=pc(_8e(u),!0);return d===!0?mc(h).set(u,c):d[h.id]=c,l};return uw(a,{delete:function(l){var u=o(this);if(!Tv(l))return!1;var c=pc(l);return c===!0?mc(u).delete(l):c&&cw(c,u.id)&&delete c[u.id]},has:function(u){var c=o(this);if(!Tv(u))return!1;var h=pc(u);return h===!0?mc(c).has(u):h&&cw(h,c.id)}}),uw(a,e?{get:function(u){var c=o(this);if(Tv(u)){var h=pc(u);return h===!0?mc(c).get(u):h?h[c.id]:void 0}},set:function(u,c){return s(this,u,c)}}:{add:function(u){return s(this,u,!0)}}),i}},F8e=oT,hw=xt,jc=Ge,dw=Eg,z8e=F0,B8e=Sg,RT=R8e,gc=Ut,yc=Ha.enforce,L8e=We,j8e=Xk,wu=Object,H8e=Array.isArray,bc=wu.isExtensible,FT=wu.isFrozen,W8e=wu.isSealed,zT=wu.freeze,q8e=wu.seal,fw={},vw={},U8e=!hw.ActiveXObject&&"ActiveXObject"in hw,Ms,BT=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},LT=B8e("WeakMap",BT,RT),uo=LT.prototype,Hc=jc(uo.set),V8e=function(){return F8e&&L8e(function(){var t=zT([]);return Hc(new LT,t,1),!FT(t)})};if(j8e)if(U8e){Ms=RT.getConstructor(BT,"WeakMap",!0),z8e.enable();var pw=jc(uo.delete),wc=jc(uo.has),mw=jc(uo.get);dw(uo,{delete:function(t){if(gc(t)&&!bc(t)){var r=yc(this);return r.frozen||(r.frozen=new Ms),pw(this,t)||r.frozen.delete(t)}return pw(this,t)},has:function(r){if(gc(r)&&!bc(r)){var e=yc(this);return e.frozen||(e.frozen=new Ms),wc(this,r)||e.frozen.has(r)}return wc(this,r)},get:function(r){if(gc(r)&&!bc(r)){var e=yc(this);return e.frozen||(e.frozen=new Ms),wc(this,r)?mw(this,r):e.frozen.get(r)}return mw(this,r)},set:function(r,e){if(gc(r)&&!bc(r)){var n=yc(this);n.frozen||(n.frozen=new Ms),wc(this,r)?Hc(this,r,e):n.frozen.set(r,e)}else Hc(this,r,e);return this}})}else V8e()&&dw(uo,{set:function(r,e){var n;return H8e(r)&&(FT(r)?n=fw:W8e(r)&&(n=vw)),Hc(this,r,e),n===fw&&zT(r),n===vw&&q8e(r),this}});var G8e=qe,K8e=G8e.WeakMap,Y8e=K8e,X8e=Y8e,J8e=X8e,Zs=pe(J8e);function ot(t,r,e,n){if(e==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?t!==r||!n:!r.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?n:e==="a"?n.call(t):n?n.value:r.get(t)}function dm(t,r,e,n,i){if(typeof r=="function"?t!==r||!0:!r.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r.set(t,e),e}function fm(t,r){var e=typeof Xi<"u"&&qa(t)||t["@@iterator"];if(!e){if(Xe(t)||(e=Z8e(t))||r){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Z8e(t,r){var e;if(t){if(typeof t=="string")return gw(t,r);var n=Xt(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Wa(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gw(t,r)}}function gw(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e0&&arguments[0]!==void 0?arguments[0]:function(){};te(this,t),bi.set(this,new bw),wi.set(this,new bw),Wc.set(this,void 0),dm(this,Wc,r)}return re(t,[{key:"sizeNodes",get:function(){return ot(this,bi,"f").size}},{key:"sizeEdges",get:function(){return ot(this,wi,"f").size}},{key:"getNodes",value:function(){return ot(this,bi,"f").getSelection()}},{key:"getEdges",value:function(){return ot(this,wi,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=ot(this,bi,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=ot(this,wi,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){ot(this,bi,"f").delete(e)}},{key:"deleteEdges",value:function(e){ot(this,wi,"f").delete(e)}},{key:"clear",value:function(){ot(this,bi,"f").clear(),ot(this,wi,"f").clear()}},{key:"commit",value:function(){for(var e,n,i={nodes:ot(this,bi,"f").commit(),edges:ot(this,wi,"f").commit()},a=arguments.length,o=new Array(a),s=0;s=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function exe(t,r){var e;if(t){if(typeof t=="string")return $w(t,r);var n=Xt(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Wa(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $w(t,r)}}function $w(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e4&&arguments[4]!==void 0?arguments[4]:!1,s=this._initBaseEvent(n,i);if(o===!0)s.nodes=[],s.edges=[];else{var l=this.getSelection();s.nodes=l.nodes,s.edges=l.edges}a!==void 0&&(s.previousSelection=a),e=="click"&&(s.items=this.getClickedItems(i)),n.controlEdge!==void 0&&(s.controlEdge=n.controlEdge),this.body.emitter.emit(e,s)}},{key:"selectObject",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(e!==void 0){if(e instanceof Mr){if(n===!0){var i;(i=this._selectionAccumulator).addEdges.apply(i,Sn(e.edges))}this._selectionAccumulator.addNodes(e)}else this._selectionAccumulator.addEdges(e);return!0}return!1}},{key:"deselectObject",value:function(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}},{key:"_getAllNodesOverlappingWith",value:function(e){for(var n=[],i=this.body.nodes,a=0;a1&&arguments[1]!==void 0?arguments[1]:!0,i=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(i);if(a.length>0)return n===!0?this.body.nodes[a[a.length-1]]:a[a.length-1]}},{key:"_getEdgesOverlappingWith",value:function(e,n){for(var i=this.body.edges,a=0;a1&&arguments[1]!==void 0?arguments[1]:!0,i=this.canvas.DOMtoCanvas(e),a=10,o=null,s=this.body.edges,l=0;l0&&(this.generateClickEvent("deselectEdge",n,e,o),i=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",n,e,o),i=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",n,e),i=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",n,e),i=!0),i===!0&&this.generateClickEvent("select",n,e)}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:"getSelectedNodes",value:function(){return this._selectionAccumulator.getNodes()}},{key:"getSelectedEdges",value:function(){return this._selectionAccumulator.getEdges()}},{key:"getSelectedNodeIds",value:function(){var e;return Lo(e=this._selectionAccumulator.getNodes()).call(e,function(n){return n.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return Lo(e=this._selectionAccumulator.getEdges()).call(e,function(n){return n.id})}},{key:"setSelection",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((n.unselectAll||n.unselectAll===void 0)&&this.unselectAll(),e.nodes){var i=ww(e.nodes),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=this.body.nodes[o];if(!s)throw new RangeError('Node with id "'+o+'" not found');this.selectObject(s,n.highlightEdges)}}catch(d){i.e(d)}finally{i.f()}}if(e.edges){var l=ww(e.edges),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,h=this.body.edges[c];if(!h)throw new RangeError('Edge with id "'+c+'" not found');this.selectObject(h)}}catch(d){l.e(d)}finally{l.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:n})}},{key:"selectEdges",value:function(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}},{key:"updateSelection",value:function(){for(var e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(var n in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,n.id)||this._selectionAccumulator.deleteEdges(n)}},{key:"getClickedItems",value:function(e){for(var n=this.canvas.DOMtoCanvas(e),i=[],a=this.body.nodeIndices,o=this.body.nodes,s=a.length-1;s>=0;s--){var l=o[a[s]],u=l.getItemsOnPoint(n);i.push.apply(i,u)}for(var c=this.body.edgeIndices,h=this.body.edges,d=c.length-1;d>=0;d--){var f=h[c[d]],v=f.getItemsOnPoint(n);i.push.apply(i,v)}return i}}]),t}(),xw=SS,rxe=Math.floor,vm=function(t,r){var e=t.length,n=rxe(e/2);return e<8?nxe(t,r):ixe(t,vm(xw(t,0,n),r),vm(xw(t,n),r),r)},nxe=function(t,r){for(var e=t.length,n=1,i,a;n0;)t[a]=t[--a];a!==n++&&(t[a]=i)}return t},ixe=function(t,r,e,n){for(var i=r.length,a=e.length,o=0,s=0;o3)){if(yxe)return!0;if(Iw)return Iw<603;var t="",r,e,n,i;for(r=65;r<76;r++){switch(e=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)Ti.push({k:e+i,v:n})}for(Ti.sort(function(a,o){return o.v-a.v}),i=0;iTw(e)?1:-1}};dxe({target:"Array",proto:!0,forced:kxe},{sort:function(r){r!==void 0&&fxe(r);var e=vxe(this);if(HT)return r===void 0?Cw(e):Cw(e,r);var n=[],i=Ew(e),a,o;for(o=0;o=0:s>l;l+=u)l in o&&(i=e(i,o[l],l,a));return i}},zxe={left:Pw(!1),right:Pw(!0)},Bxe=xt,Lxe=fi,jxe=Lxe(Bxe.process)==="process",Hxe=Ee,Wxe=zxe.left,qxe=bs,Aw=eu,Uxe=jxe,Vxe=!Uxe&&Aw>79&&Aw<83,Gxe=Vxe||!qxe("reduce");Hxe({target:"Array",proto:!0,forced:Gxe},{reduce:function(r){var e=arguments.length;return Wxe(this,r,e,e>1?arguments[1]:void 0)}});var Kxe=Gt,Yxe=Kxe("Array").reduce,Xxe=It,Jxe=Yxe,Iv=Array.prototype,Zxe=function(t){var r=t.reduce;return t===Iv||Xxe(Iv,t)&&r===Iv.reduce?Jxe:r},Qxe=Zxe,e9e=Qxe,t9e=e9e,WT=pe(t9e);function qT(t){var r=r9e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function r9e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var UT=function(){function t(){te(this,t)}return re(t,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(e){return this.fake_use(e),this.abstract()}},{key:"setPosition",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,n,i),this.abstract()}},{key:"getTreeSize",value:function(e){return this.fake_use(e),this.abstract()}},{key:"sort",value:function(e){this.fake_use(e),this.abstract()}},{key:"fix",value:function(e,n){this.fake_use(e,n),this.abstract()}},{key:"shift",value:function(e,n){this.fake_use(e,n),this.abstract()}}]),t}(),n9e=function(t){Ve(e,t);var r=qT(e);function e(n){var i;return te(this,e),i=r.call(this),i.layout=n,i}return re(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(i){return i.x}},{key:"setPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(i,o),i.x=a}},{key:"getTreeSize",value:function(i){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,i);return{min:a.min_x,max:a.max_x}}},{key:"sort",value:function(i){Qs(i).call(i,function(a,o){return a.x-o.x})}},{key:"fix",value:function(i,a){i.y=this.layout.options.hierarchical.levelSeparation*a,i.options.fixed.y=!0}},{key:"shift",value:function(i,a){this.layout.body.nodes[i].x+=a}}]),e}(UT),i9e=function(t){Ve(e,t);var r=qT(e);function e(n){var i;return te(this,e),i=r.call(this),i.layout=n,i}return re(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(i){return i.y}},{key:"setPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(i,o),i.y=a}},{key:"getTreeSize",value:function(i){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,i);return{min:a.min_y,max:a.max_y}}},{key:"sort",value:function(i){Qs(i).call(i,function(a,o){return a.y-o.y})}},{key:"fix",value:function(i,a){i.x=this.layout.options.hierarchical.levelSeparation*a,i.options.fixed.x=!0}},{key:"shift",value:function(i,a){this.layout.body.nodes[i].y+=a}}]),e}(UT),a9e=Ee,o9e=Yi.every,s9e=bs,l9e=s9e("every");a9e({target:"Array",proto:!0,forced:!l9e},{every:function(r){return o9e(this,r,arguments.length>1?arguments[1]:void 0)}});var u9e=Gt,c9e=u9e("Array").every,h9e=It,d9e=c9e,Cv=Array.prototype,f9e=function(t){var r=t.every;return t===Cv||h9e(Cv,t)&&r===Cv.every?d9e:r},v9e=f9e,p9e=v9e,m9e=p9e,VT=pe(m9e);function g9e(t,r){var e=typeof Xi<"u"&&qa(t)||t["@@iterator"];if(!e){if(Xe(t)||(e=y9e(t))||r){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function y9e(t,r){var e;if(t){if(typeof t=="string")return Mw(t,r);var n=Xt(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Wa(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mw(t,r)}}function Mw(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e=r[a])&&(r[a]=r[i]+1)}),r}function w9e(t){return GT(function(r){var e,n;return VT(e=kr(n=r.edges).call(n,function(i){return t.has(i.toId)})).call(e,function(i){return i.to===r})},function(r,e){return e>r},"from",t)}function $9e(t){return GT(function(r){var e,n;return VT(e=kr(n=r.edges).call(n,function(i){return t.has(i.toId)})).call(e,function(i){return i.from===r})},function(r,e){return eo)return{v:{v:b9e(n,a)}};++$},P;k=y.pop();)if(P=_(),P!==0&&P)return P.v},d;for(u.s();!(c=u.n()).done;)if(d=h(),d!==0&&d)return d.v}catch(f){u.e(f)}finally{u.f()}return a}var x9e=function(){function t(){te(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return re(t,[{key:"addRelation",value:function(e,n){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(n),this.parentReference[n]===void 0&&(this.parentReference[n]=[]),this.parentReference[n].push(e)}},{key:"checkIfTree",value:function(){for(var e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(e,n){n!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=n,this.treeIndex=Math.max(n,this.treeIndex))}},{key:"ensureLevel",value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var n=this,i={},a=function o(s){if(i[s]!==void 0)return i[s];var l=n.levels[s];if(n.childrenReference[s]){var u=n.childrenReference[s];if(u.length>0)for(var c=0;c0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(n);if(a===!0)return this.body.emitter.emit("refresh"),st(n,this.optionsBackup)}return n}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=R0(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var n=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:n.enabled===void 0?!0:n.enabled,solver:"hierarchicalRepulsion"},n.enabled=n.enabled===void 0?!0:n.enabled,n.solver=n.solver||"barnesHut"):Ze(e.physics)==="object"?(n.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,n.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(n.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var i=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:i};else{var a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(i=a.type),this.optionsBackup.edges={smooth:{enabled:a.enabled===void 0?!0:a.enabled,type:a.type===void 0?"dynamic":a.type,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}},e.edges.smooth={enabled:a.enabled===void 0?!0:a.enabled,type:i,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var n=e.length+50,i=0;il){for(var c=e.length;e.length>l&&s<=o;){s+=1;var h=e.length;s%3===0?this.body.modules.clustering.clusterBridges(u):this.body.modules.clustering.clusterOutliers(u);var d=e.length;if(h==d&&s%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*c)})}s>o&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();for(var f=70,v=0;v0){var e,n,i=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new x9e;for(n in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,n)&&(e=this.body.nodes[n],e.options.level!==void 0?(i=!0,this.hierarchical.levels[n]=e.options.level):a=!0);if(a===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(a===!0){var o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.hierarchical.ensureLevel(s);var l=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(l),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var e=this,n=!1,i={},a=function(){for(var k=s(),_=0,P=0;P0)for(var S=0;S1&&arguments[1]!==void 0?arguments[1]:1e9,P=1e9,S=1e9,D=1e9,B=-1e9;for(var R in k)if(Object.prototype.hasOwnProperty.call(k,R)){var A=e.body.nodes[R],z=e.hierarchical.levels[A.id],L=e.direction.getPosition(A),J=e._getSpaceAroundNode(A,k),ie=bt(J,2),oe=ie[0],me=ie[1];P=Math.min(oe,P),S=Math.min(me,S),z<=_&&(D=Math.min(L,D),B=Math.max(L,B))}return[D,B,P,S]},c=function(k,_){var P=e.hierarchical.getMaxLevel(k.id),S=e.hierarchical.getMaxLevel(_.id);return Math.min(P,S)},h=function(k,_,P){for(var S=e.hierarchical,D=0;D<_.length;D++){var B=_[D],R=S.distributionOrdering[B];if(R.length>1)for(var A=0;A2&&arguments[2]!==void 0?arguments[2]:!1,S=e.direction.getPosition(k),D=e.direction.getPosition(_),B=Math.abs(D-S),R=e.options.hierarchical.nodeSpacing;if(B>R){var A={},z={};l(k,A),l(_,z);var L=c(k,_),J=u(A,L),ie=u(z,L),oe=J[1],me=ie[0],Ce=ie[2],ne=Math.abs(oe-me);if(ne>R){var ue=oe-me+R;ue<-Ce+R&&(ue=-Ce+R),ue<0&&(e._shiftBlock(_.id,ue),n=!0,P===!0&&e._centerParent(_))}}},f=function(k,_){for(var P=_.id,S=_.edges,D=e.hierarchical.levels[_.id],B=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,R={},A=[],z=0;z0?Le=Math.min(it,Ge-e.options.hierarchical.nodeSpacing):it<0&&(Le=-Math.min(-it,qe-e.options.hierarchical.nodeSpacing)),Le!=0&&(e._shiftBlock(_.id,Le),n=!0)},ne=function(ge){var ye=e.direction.getPosition(_),I=e._getSpaceAroundNode(_),De=bt(I,2),qe=De[0],Ge=De[1],it=ge-ye,Le=ye;it>0?Le=Math.min(ye+(Ge-e.options.hierarchical.nodeSpacing),ge):it<0&&(Le=Math.max(ye-(qe-e.options.hierarchical.nodeSpacing),ge)),Le!==ye&&(e.direction.setPosition(_,Le),n=!0)},ue=me(k,A);Ce(ue),ue=me(k,S),ne(ue)},v=function(k){var _=e.hierarchical.getLevels();_=ga(_).call(_);for(var P=0;P0&&Math.abs(v)0&&(c=this.direction.getPosition(a[s-1])+u),this.direction.setPosition(l,c,n),this._validatePositionAndContinue(l,n,c),o++}}}}},{key:"_placeBranchNodes",value:function(e,n){var i,a=this.hierarchical.childrenReference[e];if(a!==void 0){for(var o=[],s=0;sn&&this.positionedNodes[u.id]===void 0){var h=this.options.hierarchical.nodeSpacing,d=void 0;l===0?d=this.direction.getPosition(this.body.nodes[e]):d=this.direction.getPosition(o[l-1])+h,this.direction.setPosition(u,d,c),this._validatePositionAndContinue(u,c,d)}else return}var f=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],f,n)}}},{key:"_validatePositionAndContinue",value:function(e,n,i){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[n]!==void 0){var a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[n]]);if(i-ae.hierarchical.levels[a.id]&&e.hierarchical.addRelation(a.id,o.id)};this._crawlNetwork(n),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},i=arguments.length>1?arguments[1]:void 0,a={},o=function d(f,v){if(a[f.id]===void 0){e.hierarchical.setTreeIndex(f,v),a[f.id]=!0;for(var g,b=e._getActiveEdges(f),y=0;y=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function E9e(t,r){var e;if(t){if(typeof t=="string")return Dw(t,r);var n=Xt(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Wa(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dw(t,r)}}function Dw(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e0&&this.options.deleteNode!==!1?(l===!0&&this._createSeperator(4),this._createDeleteButton(s)):i===0&&this.options.deleteEdge!==!1&&(l===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,X(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",X(n=this.showManipulatorToolbar).call(n,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var n,i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,X(n=this.toggleEditMode).call(n,this))}this._temporaryBindEvent("click",X(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var n=this.selectionHandler.getSelectedNodes()[0];if(n!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(n.isCluster!==!0){var i=st({},n.options,!1);if(i.x=n.x,i.y=n.y,this.options.editNode.length===2)this.options.editNode(i,function(a){a!=null&&e.inMode==="editNode"&&e.body.data.nodes.getDataSet().update(a),e.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var e,n,i,a,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s,l=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(l),this._createSeperator(),this._createDescription(l.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,X(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",X(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",X(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDrag",X(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",X(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",X(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",Ze(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){var e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from.id,e.to.id);return}if(this.guiEnabled===!0){var n,i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,X(n=this.toggleEditMode).call(n,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,l,u=this.body.edges[this.edgeBeingEditedId],c=this._getNewTargetNode(u.from.x,u.from.y),h=this._getNewTargetNode(u.to.x,u.to.y);this.temporaryIds.nodes.push(c.id),this.temporaryIds.nodes.push(h.id),this.body.nodes[c.id]=c,this.body.nodeIndices.push(c.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this._temporaryBindUI("onTouch",X(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",X(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",X(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",X(l=this._controlNodeDragEnd).call(l,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(d){var f=u.edgeType.findBorderPositions(d);c.selected===!1&&(c.x=f.from.x,c.y=f.from.y),h.selected===!1&&(h.x=f.to.x,h.y=f.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var n=this.selectionHandler.getSelectedNodeIds(),i=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(n.length>0){for(var o=0;o0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:n,edges:i};if(a.length===2)a(s,function(l){l!=null&&e.inMode==="delete"?(e.body.data.edges.getDataSet().remove(l.edges),e.body.data.nodes.getDataSet().remove(l.nodes),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()):(e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(n),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,n;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(n=this.options.locales[this.options.locale])===null||n===void 0?void 0:n.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}},{key:"_getNewTargetNode",value:function(e,n){var i=st({},this.options.controlNodeStyle);i.id="targetNode"+Js(),i.hidden=!1,i.physics=!1,i.x=e,i.y=n;var a=this.body.functions.createNode(i);return a.shape.boundingBox={left:e,right:e,top:n,bottom:n},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},$i(this.editModeDiv);var n=this.options.locales[this.options.locale],i=this._createButton("editMode","vis-edit vis-edit-mode",n.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(i),this._bindElementEvents(i,X(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&($i(this.editModeDiv),$i(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,n=S9e(Zn(e=this._domEventListenerCleanupQueue).call(e,0)),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;a()}}catch(o){n.e(o)}finally{n.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),$i(this.manipulationDiv),$i(this.editModeDiv),$i(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}},{key:"_createAddNodeButton",value:function(e){var n,i=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,X(n=this.addNodeMode).call(n,this))}},{key:"_createAddEdgeButton",value:function(e){var n,i=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,X(n=this.addEdgeMode).call(n,this))}},{key:"_createEditNodeButton",value:function(e){var n,i=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,X(n=this.editNode).call(n,this))}},{key:"_createEditEdgeButton",value:function(e){var n,i=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,X(n=this.editEdgeMode).call(n,this))}},{key:"_createDeleteButton",value:function(e){var n,i;this.options.rtl?i="vis-delete-rtl":i="vis-delete";var a=this._createButton("delete",i,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,X(n=this.deleteSelected).call(n,this))}},{key:"_createBackButton",value:function(e){var n,i=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,X(n=this.showManipulatorToolbar).call(n,this))}},{key:"_createButton",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+n,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=i,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}},{key:"_createDescription",value:function(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(e,n){this.temporaryEventFunctions.push({event:e,boundFunction:n}),this.body.emitter.on(e,n)}},{key:"_temporaryBindUI",value:function(e,n){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=n;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+fu(yt(this.body.eventListeners)))}},{key:"_unbindTemporaryUIs",value:function(){for(var e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var e=0;e=0;l--)if(o[l]!==this.selectedControlNode.id){s=this.body.nodes[o[l]];break}if(s!==void 0&&this.selectedControlNode!==void 0)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var u=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===u.id?this._performEditEdge(s.id,a.to.id):this._performEditEdge(a.from.id,s.id)}else a.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=At({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var n=this.lastTouch,i=this.selectionHandler.getNodeAt(n);if(i!==void 0)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(i.x,i.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+Js(),from:i.id,to:a.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(a.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(e){var n=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(n),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,l=o.length-1;l>=0;l--){var u;if(je(u=this.temporaryIds.nodes).call(u,o[l])===-1){s=this.body.nodes[o[l]];break}}if(e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,n),this.temporaryIds.nodes[0]!==void 0){var c=this.body.nodes[this.temporaryIds.nodes[0]];c.x=this.canvas._XconvertDOMtoCanvas(n.x),c.y=this.canvas._YconvertDOMtoCanvas(n.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var n=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(n),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,l=o.length-1;l>=0;l--){var u;if(je(u=this.temporaryIds.nodes).call(u,o[l])===-1){s=this.body.nodes[o[l]];break}}this._cleanupTemporaryNodesAndEdges(),s!==void 0&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[a]!==void 0&&this.body.nodes[s.id]!==void 0&&this._performAddEdge(a,s.id)),e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,n),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var n=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,n,void 0,!0)}},{key:"_performAddNode",value:function(e){var n=this,i={id:Js(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(i,function(a){a!=null&&n.inMode==="addNode"&&n.body.data.nodes.getDataSet().add(a),n.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,n){var i=this,a={from:e,to:n};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&i.inMode==="addEdge"&&(i.body.data.edges.getDataSet().add(o),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,n){var i=this,a={id:this.edgeBeingEditedId,from:e,to:n,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(Ze(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||i.inMode!=="editEdge"?(i.body.edges[a.id].updateEdgeType(),i.body.emitter.emit("_redraw"),i.showManipulatorToolbar()):(i.body.data.edges.getDataSet().update(s),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}(),Q="string",G="boolean",F="number",zs="array",fe="object",KT="dom",_9e="any",Pv=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Av={borderWidth:{number:F},borderWidthSelected:{number:F,undefined:"undefined"},brokenImage:{string:Q,undefined:"undefined"},chosen:{label:{boolean:G,function:"function"},node:{boolean:G,function:"function"},__type__:{object:fe,boolean:G}},color:{border:{string:Q},background:{string:Q},highlight:{border:{string:Q},background:{string:Q},__type__:{object:fe,string:Q}},hover:{border:{string:Q},background:{string:Q},__type__:{object:fe,string:Q}},__type__:{object:fe,string:Q}},opacity:{number:F,undefined:"undefined"},fixed:{x:{boolean:G},y:{boolean:G},__type__:{object:fe,boolean:G}},font:{align:{string:Q},color:{string:Q},size:{number:F},face:{string:Q},background:{string:Q},strokeWidth:{number:F},strokeColor:{string:Q},vadjust:{number:F},multi:{boolean:G,string:Q},bold:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},boldital:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},ital:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},mono:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},__type__:{object:fe,string:Q}},group:{string:Q,number:F,undefined:"undefined"},heightConstraint:{minimum:{number:F},valign:{string:Q},__type__:{object:fe,boolean:G,number:F}},hidden:{boolean:G},icon:{face:{string:Q},code:{string:Q},size:{number:F},color:{string:Q},weight:{string:Q,number:F},__type__:{object:fe}},id:{string:Q,number:F},image:{selected:{string:Q,undefined:"undefined"},unselected:{string:Q,undefined:"undefined"},__type__:{object:fe,string:Q}},imagePadding:{top:{number:F},right:{number:F},bottom:{number:F},left:{number:F},__type__:{object:fe,number:F}},label:{string:Q,undefined:"undefined"},labelHighlightBold:{boolean:G},level:{number:F,undefined:"undefined"},margin:{top:{number:F},right:{number:F},bottom:{number:F},left:{number:F},__type__:{object:fe,number:F}},mass:{number:F},physics:{boolean:G},scaling:{min:{number:F},max:{number:F},label:{enabled:{boolean:G},min:{number:F},max:{number:F},maxVisible:{number:F},drawThreshold:{number:F},__type__:{object:fe,boolean:G}},customScalingFunction:{function:"function"},__type__:{object:fe}},shadow:{enabled:{boolean:G},color:{string:Q},size:{number:F},x:{number:F},y:{number:F},__type__:{object:fe,boolean:G}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:G,array:zs},borderRadius:{number:F},interpolation:{boolean:G},useImageSize:{boolean:G},useBorderWithImage:{boolean:G},coordinateOrigin:{string:["center","top-left"]},__type__:{object:fe}},size:{number:F},title:{string:Q,dom:KT,undefined:"undefined"},value:{number:F,undefined:"undefined"},widthConstraint:{minimum:{number:F},maximum:{number:F},__type__:{object:fe,boolean:G,number:F}},x:{number:F},y:{number:F},__type__:{object:fe}},O9e={configure:{enabled:{boolean:G},filter:{boolean:G,string:Q,array:zs,function:"function"},container:{dom:KT},showButton:{boolean:G},__type__:{object:fe,boolean:G,string:Q,array:zs,function:"function"}},edges:{arrows:{to:{enabled:{boolean:G},scaleFactor:{number:F},type:{string:Pv},imageHeight:{number:F},imageWidth:{number:F},src:{string:Q},__type__:{object:fe,boolean:G}},middle:{enabled:{boolean:G},scaleFactor:{number:F},type:{string:Pv},imageWidth:{number:F},imageHeight:{number:F},src:{string:Q},__type__:{object:fe,boolean:G}},from:{enabled:{boolean:G},scaleFactor:{number:F},type:{string:Pv},imageWidth:{number:F},imageHeight:{number:F},src:{string:Q},__type__:{object:fe,boolean:G}},__type__:{string:["from","to","middle"],object:fe}},endPointOffset:{from:{number:F},to:{number:F},__type__:{object:fe,number:F}},arrowStrikethrough:{boolean:G},background:{enabled:{boolean:G},color:{string:Q},size:{number:F},dashes:{boolean:G,array:zs},__type__:{object:fe,boolean:G}},chosen:{label:{boolean:G,function:"function"},edge:{boolean:G,function:"function"},__type__:{object:fe,boolean:G}},color:{color:{string:Q},highlight:{string:Q},hover:{string:Q},inherit:{string:["from","to","both"],boolean:G},opacity:{number:F},__type__:{object:fe,string:Q}},dashes:{boolean:G,array:zs},font:{color:{string:Q},size:{number:F},face:{string:Q},background:{string:Q},strokeWidth:{number:F},strokeColor:{string:Q},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:F},multi:{boolean:G,string:Q},bold:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},boldital:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},ital:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},mono:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},__type__:{object:fe,string:Q}},hidden:{boolean:G},hoverWidth:{function:"function",number:F},label:{string:Q,undefined:"undefined"},labelHighlightBold:{boolean:G},length:{number:F,undefined:"undefined"},physics:{boolean:G},scaling:{min:{number:F},max:{number:F},label:{enabled:{boolean:G},min:{number:F},max:{number:F},maxVisible:{number:F},drawThreshold:{number:F},__type__:{object:fe,boolean:G}},customScalingFunction:{function:"function"},__type__:{object:fe}},selectionWidth:{function:"function",number:F},selfReferenceSize:{number:F},selfReference:{size:{number:F},angle:{number:F},renderBehindTheNode:{boolean:G},__type__:{object:fe}},shadow:{enabled:{boolean:G},color:{string:Q},size:{number:F},x:{number:F},y:{number:F},__type__:{object:fe,boolean:G}},smooth:{enabled:{boolean:G},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:F},forceDirection:{string:["horizontal","vertical","none"],boolean:G},__type__:{object:fe,boolean:G}},title:{string:Q,undefined:"undefined"},width:{number:F},widthConstraint:{maximum:{number:F},__type__:{object:fe,boolean:G,number:F}},value:{number:F,undefined:"undefined"},__type__:{object:fe}},groups:{useDefaultGroups:{boolean:G},__any__:Av,__type__:{object:fe}},interaction:{dragNodes:{boolean:G},dragView:{boolean:G},hideEdgesOnDrag:{boolean:G},hideEdgesOnZoom:{boolean:G},hideNodesOnDrag:{boolean:G},hover:{boolean:G},keyboard:{enabled:{boolean:G},speed:{x:{number:F},y:{number:F},zoom:{number:F},__type__:{object:fe}},bindToWindow:{boolean:G},autoFocus:{boolean:G},__type__:{object:fe,boolean:G}},multiselect:{boolean:G},navigationButtons:{boolean:G},selectable:{boolean:G},selectConnectedEdges:{boolean:G},hoverConnectedEdges:{boolean:G},tooltipDelay:{number:F},zoomView:{boolean:G},zoomSpeed:{number:F},__type__:{object:fe}},layout:{randomSeed:{undefined:"undefined",number:F,string:Q},improvedLayout:{boolean:G},clusterThreshold:{number:F},hierarchical:{enabled:{boolean:G},levelSeparation:{number:F},nodeSpacing:{number:F},treeSpacing:{number:F},blockShifting:{boolean:G},edgeMinimization:{boolean:G},parentCentralization:{boolean:G},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:fe,boolean:G}},__type__:{object:fe}},manipulation:{enabled:{boolean:G},initiallyActive:{boolean:G},addNode:{boolean:G,function:"function"},addEdge:{boolean:G,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:fe,boolean:G,function:"function"}},deleteNode:{boolean:G,function:"function"},deleteEdge:{boolean:G,function:"function"},controlNodeStyle:Av,__type__:{object:fe,boolean:G}},nodes:Av,physics:{enabled:{boolean:G},barnesHut:{theta:{number:F},gravitationalConstant:{number:F},centralGravity:{number:F},springLength:{number:F},springConstant:{number:F},damping:{number:F},avoidOverlap:{number:F},__type__:{object:fe}},forceAtlas2Based:{theta:{number:F},gravitationalConstant:{number:F},centralGravity:{number:F},springLength:{number:F},springConstant:{number:F},damping:{number:F},avoidOverlap:{number:F},__type__:{object:fe}},repulsion:{centralGravity:{number:F},springLength:{number:F},springConstant:{number:F},nodeDistance:{number:F},damping:{number:F},__type__:{object:fe}},hierarchicalRepulsion:{centralGravity:{number:F},springLength:{number:F},springConstant:{number:F},nodeDistance:{number:F},damping:{number:F},avoidOverlap:{number:F},__type__:{object:fe}},maxVelocity:{number:F},minVelocity:{number:F},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:G},iterations:{number:F},updateInterval:{number:F},onlyDynamicEdges:{boolean:G},fit:{boolean:G},__type__:{object:fe,boolean:G}},timestep:{number:F},adaptiveTimestep:{boolean:G},wind:{x:{number:F},y:{number:F},__type__:{object:fe}},__type__:{object:fe,boolean:G}},autoResize:{boolean:G},clickToUse:{boolean:G},locale:{string:Q},locales:{__any__:{any:_9e},__type__:{object:fe}},height:{string:Q},width:{string:Q},__type__:{object:fe}},YT={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},I9e=function(r,e,n){var i;return!!(Ai(r).call(r,"physics")&&Ai(i=YT.physics.solver).call(i,e)&&n.physics.solver!==e&&e!=="wind")},C9e=function(){function t(){te(this,t)}return re(t,[{key:"getDistances",value:function(e,n,i){for(var a={},o=e.edges,s=0;s2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,n);this._createL_matrix(a),this._createK_matrix(a),this._createE_matrix();for(var o=.01,s=1,l=0,u=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),c=5,h=1e9,d=0,f=0,v=0,g=0,b=0;h>o&&ls&&bb.type==="downstream_subgraph_search"))==null?void 0:g.data)||[],c=b=>{const y=b.json.nodes.map(k=>({id:k.id,label:k.type,color:{background:"#2B7CE9",border:"#1B5BB1"},font:{size:16,color:"#FFFFFF",face:"arial",bold:!0},margin:12,padding:10,shape:"box",widthConstraint:{minimum:100,maximum:200}})),$=b.json.links.map(k=>({from:k.origin_id,to:k.target_id,arrows:{to:{enabled:!0,scaleFactor:1.2}},color:"#FFFFFF",width:2}));return{nodes:y,edges:$}};Ke.useEffect(()=>()=>{l.current&&(l.current.destroy(),l.current=null)},[]);const h=Ke.useCallback((b,y)=>{l.current&&l.current.destroy();const $=c(y),k=new he(b,$,{nodes:{shape:"box",margin:12,padding:10,font:{size:16,color:"#FFFFFF",face:"arial",bold:!0},borderWidth:2,shadow:{enabled:!0,color:"rgba(0,0,0,0.2)",size:5}},edges:{arrows:"to",color:"#FFFFFF",width:2,smooth:{enabled:!0,type:"straightCross"}},physics:{enabled:!0,solver:"hierarchicalRepulsion",hierarchicalRepulsion:{nodeDistance:200,springLength:200}},layout:{hierarchical:{enabled:!0,direction:"UD",sortMethod:"directed",nodeSpacing:200,levelSeparation:150}},interaction:{dragNodes:!1,zoomView:!1,dragView:!1}});l.current=k},[]),d=async b=>{console.log("[DownstreamSubgraphs] Starting checkAndLoadSubgraph with node:",b);const y=b.json.nodes,$=Object.values(sr.canvas.selected_nodes)[0];if(!$){console.warn("[DownstreamSubgraphs] No node selected"),alert("Please select a upstream node first before adding a subgraph.");return}const k=y.map(S=>S.type),_=n;console.log("[DownstreamSubgraphs] Required node types:",k),console.log("[DownstreamSubgraphs] Installed node types:",_);const P=k.filter(S=>!_.includes(S));if(console.log("[DownstreamSubgraphs] Missing node types:",P),P.length>0)try{console.log("[DownstreamSubgraphs] Fetching info for missing nodes");const S=await _i.batchGetNodeInfo(P);console.log("[DownstreamSubgraphs] Received node infos:",S);const D={text:"",ext:[{type:"node_install_guide",data:S.map(R=>({name:R.name,repository_url:R.github_url}))}]};console.log("[DownstreamSubgraphs] Created message content:",D);const B={id:br(),role:"ai",content:JSON.stringify(D),format:"markdown",name:"Assistant",metadata:{pendingSubgraph:b}};console.log("[DownstreamSubgraphs] Created AI message:",B),i==null||i(B);return}catch(S){console.error("[DownstreamSubgraphs] Error fetching node info:",S),alert("Error checking required nodes. Please try again.");return}console.log("[DownstreamSubgraphs] All required nodes are installed, proceeding to load subgraph"),f(b,$)},f=(b,y)=>{const $=b.json.nodes,k=b.json.links,_=$.find(D=>D.id===0),P=_==null?void 0:_.id;console.log("[DownstreamSubgraphs] Entry node ID:",P);const S={};P!==null&&(S[P]=y),sr.canvas.emitBeforeChange();try{for(const D of $)if(D.id!==P){const B=_==null?void 0:_.pos,R=[y._pos[0],y._pos[1]],A=[D.pos[0]+R[0]-B[0],D.pos[1]+R[1]-B[1]];S[D.id]=sr.addNodeOnGraph({name:D.type},{pos:A})}for(const D of k){const B=S[D.origin_id],R=S[D.target_id];B&&R&&B.connect(D.origin_slot,R,D.target_slot)}}finally{sr.canvas.emitAfterChange()}};return C.jsx("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:u.length>0&&C.jsx("div",{className:"space-y-3",children:C.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(b=>C.jsxs("div",{className:"relative group",children:[C.jsx("button",{className:`px-3 py-1.5 bg-blue-500 text-white rounded-md +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function exe(t,r){var e;if(t){if(typeof t=="string")return $w(t,r);var n=Xt(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Wa(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $w(t,r)}}function $w(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e4&&arguments[4]!==void 0?arguments[4]:!1,s=this._initBaseEvent(n,i);if(o===!0)s.nodes=[],s.edges=[];else{var l=this.getSelection();s.nodes=l.nodes,s.edges=l.edges}a!==void 0&&(s.previousSelection=a),e=="click"&&(s.items=this.getClickedItems(i)),n.controlEdge!==void 0&&(s.controlEdge=n.controlEdge),this.body.emitter.emit(e,s)}},{key:"selectObject",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(e!==void 0){if(e instanceof Mr){if(n===!0){var i;(i=this._selectionAccumulator).addEdges.apply(i,Sn(e.edges))}this._selectionAccumulator.addNodes(e)}else this._selectionAccumulator.addEdges(e);return!0}return!1}},{key:"deselectObject",value:function(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}},{key:"_getAllNodesOverlappingWith",value:function(e){for(var n=[],i=this.body.nodes,a=0;a1&&arguments[1]!==void 0?arguments[1]:!0,i=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(i);if(a.length>0)return n===!0?this.body.nodes[a[a.length-1]]:a[a.length-1]}},{key:"_getEdgesOverlappingWith",value:function(e,n){for(var i=this.body.edges,a=0;a1&&arguments[1]!==void 0?arguments[1]:!0,i=this.canvas.DOMtoCanvas(e),a=10,o=null,s=this.body.edges,l=0;l0&&(this.generateClickEvent("deselectEdge",n,e,o),i=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",n,e,o),i=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",n,e),i=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",n,e),i=!0),i===!0&&this.generateClickEvent("select",n,e)}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:"getSelectedNodes",value:function(){return this._selectionAccumulator.getNodes()}},{key:"getSelectedEdges",value:function(){return this._selectionAccumulator.getEdges()}},{key:"getSelectedNodeIds",value:function(){var e;return Lo(e=this._selectionAccumulator.getNodes()).call(e,function(n){return n.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return Lo(e=this._selectionAccumulator.getEdges()).call(e,function(n){return n.id})}},{key:"setSelection",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((n.unselectAll||n.unselectAll===void 0)&&this.unselectAll(),e.nodes){var i=ww(e.nodes),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=this.body.nodes[o];if(!s)throw new RangeError('Node with id "'+o+'" not found');this.selectObject(s,n.highlightEdges)}}catch(d){i.e(d)}finally{i.f()}}if(e.edges){var l=ww(e.edges),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,h=this.body.edges[c];if(!h)throw new RangeError('Edge with id "'+c+'" not found');this.selectObject(h)}}catch(d){l.e(d)}finally{l.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:n})}},{key:"selectEdges",value:function(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}},{key:"updateSelection",value:function(){for(var e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(var n in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,n.id)||this._selectionAccumulator.deleteEdges(n)}},{key:"getClickedItems",value:function(e){for(var n=this.canvas.DOMtoCanvas(e),i=[],a=this.body.nodeIndices,o=this.body.nodes,s=a.length-1;s>=0;s--){var l=o[a[s]],u=l.getItemsOnPoint(n);i.push.apply(i,u)}for(var c=this.body.edgeIndices,h=this.body.edges,d=c.length-1;d>=0;d--){var f=h[c[d]],v=f.getItemsOnPoint(n);i.push.apply(i,v)}return i}}]),t}(),xw=SS,rxe=Math.floor,vm=function(t,r){var e=t.length,n=rxe(e/2);return e<8?nxe(t,r):ixe(t,vm(xw(t,0,n),r),vm(xw(t,n),r),r)},nxe=function(t,r){for(var e=t.length,n=1,i,a;n0;)t[a]=t[--a];a!==n++&&(t[a]=i)}return t},ixe=function(t,r,e,n){for(var i=r.length,a=e.length,o=0,s=0;o3)){if(yxe)return!0;if(Iw)return Iw<603;var t="",r,e,n,i;for(r=65;r<76;r++){switch(e=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)Ti.push({k:e+i,v:n})}for(Ti.sort(function(a,o){return o.v-a.v}),i=0;iTw(e)?1:-1}};dxe({target:"Array",proto:!0,forced:kxe},{sort:function(r){r!==void 0&&fxe(r);var e=vxe(this);if(HT)return r===void 0?Cw(e):Cw(e,r);var n=[],i=Ew(e),a,o;for(o=0;o=0:s>l;l+=u)l in o&&(i=e(i,o[l],l,a));return i}},zxe={left:Pw(!1),right:Pw(!0)},Bxe=xt,Lxe=fi,jxe=Lxe(Bxe.process)==="process",Hxe=ke,Wxe=zxe.left,qxe=bs,Aw=eu,Uxe=jxe,Vxe=!Uxe&&Aw>79&&Aw<83,Gxe=Vxe||!qxe("reduce");Hxe({target:"Array",proto:!0,forced:Gxe},{reduce:function(r){var e=arguments.length;return Wxe(this,r,e,e>1?arguments[1]:void 0)}});var Kxe=Gt,Yxe=Kxe("Array").reduce,Xxe=It,Jxe=Yxe,Iv=Array.prototype,Zxe=function(t){var r=t.reduce;return t===Iv||Xxe(Iv,t)&&r===Iv.reduce?Jxe:r},Qxe=Zxe,e9e=Qxe,t9e=e9e,WT=pe(t9e);function qT(t){var r=r9e();return function(){var n=ce(t),i;if(r){var a=ce(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Je(this,i)}}function r9e(){if(typeof Reflect>"u"||!H||H.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(H(Boolean,[],function(){})),!0}catch{return!1}}var UT=function(){function t(){te(this,t)}return re(t,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(e){return this.fake_use(e),this.abstract()}},{key:"setPosition",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,n,i),this.abstract()}},{key:"getTreeSize",value:function(e){return this.fake_use(e),this.abstract()}},{key:"sort",value:function(e){this.fake_use(e),this.abstract()}},{key:"fix",value:function(e,n){this.fake_use(e,n),this.abstract()}},{key:"shift",value:function(e,n){this.fake_use(e,n),this.abstract()}}]),t}(),n9e=function(t){Ke(e,t);var r=qT(e);function e(n){var i;return te(this,e),i=r.call(this),i.layout=n,i}return re(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(i){return i.x}},{key:"setPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(i,o),i.x=a}},{key:"getTreeSize",value:function(i){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,i);return{min:a.min_x,max:a.max_x}}},{key:"sort",value:function(i){Qs(i).call(i,function(a,o){return a.x-o.x})}},{key:"fix",value:function(i,a){i.y=this.layout.options.hierarchical.levelSeparation*a,i.options.fixed.y=!0}},{key:"shift",value:function(i,a){this.layout.body.nodes[i].x+=a}}]),e}(UT),i9e=function(t){Ke(e,t);var r=qT(e);function e(n){var i;return te(this,e),i=r.call(this),i.layout=n,i}return re(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(i){return i.y}},{key:"setPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(i,o),i.y=a}},{key:"getTreeSize",value:function(i){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,i);return{min:a.min_y,max:a.max_y}}},{key:"sort",value:function(i){Qs(i).call(i,function(a,o){return a.y-o.y})}},{key:"fix",value:function(i,a){i.x=this.layout.options.hierarchical.levelSeparation*a,i.options.fixed.x=!0}},{key:"shift",value:function(i,a){this.layout.body.nodes[i].y+=a}}]),e}(UT),a9e=ke,o9e=Yi.every,s9e=bs,l9e=s9e("every");a9e({target:"Array",proto:!0,forced:!l9e},{every:function(r){return o9e(this,r,arguments.length>1?arguments[1]:void 0)}});var u9e=Gt,c9e=u9e("Array").every,h9e=It,d9e=c9e,Cv=Array.prototype,f9e=function(t){var r=t.every;return t===Cv||h9e(Cv,t)&&r===Cv.every?d9e:r},v9e=f9e,p9e=v9e,m9e=p9e,VT=pe(m9e);function g9e(t,r){var e=typeof Xi<"u"&&qa(t)||t["@@iterator"];if(!e){if(Xe(t)||(e=y9e(t))||r){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function y9e(t,r){var e;if(t){if(typeof t=="string")return Mw(t,r);var n=Xt(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Wa(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mw(t,r)}}function Mw(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e=r[a])&&(r[a]=r[i]+1)}),r}function w9e(t){return GT(function(r){var e,n;return VT(e=kr(n=r.edges).call(n,function(i){return t.has(i.toId)})).call(e,function(i){return i.to===r})},function(r,e){return e>r},"from",t)}function $9e(t){return GT(function(r){var e,n;return VT(e=kr(n=r.edges).call(n,function(i){return t.has(i.toId)})).call(e,function(i){return i.from===r})},function(r,e){return eo)return{v:{v:b9e(n,a)}};++$},P;k=y.pop();)if(P=O(),P!==0&&P)return P.v},d;for(u.s();!(c=u.n()).done;)if(d=h(),d!==0&&d)return d.v}catch(f){u.e(f)}finally{u.f()}return a}var x9e=function(){function t(){te(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return re(t,[{key:"addRelation",value:function(e,n){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(n),this.parentReference[n]===void 0&&(this.parentReference[n]=[]),this.parentReference[n].push(e)}},{key:"checkIfTree",value:function(){for(var e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(e,n){n!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=n,this.treeIndex=Math.max(n,this.treeIndex))}},{key:"ensureLevel",value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var n=this,i={},a=function o(s){if(i[s]!==void 0)return i[s];var l=n.levels[s];if(n.childrenReference[s]){var u=n.childrenReference[s];if(u.length>0)for(var c=0;c0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(n);if(a===!0)return this.body.emitter.emit("refresh"),st(n,this.optionsBackup)}return n}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=R0(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var n=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:n.enabled===void 0?!0:n.enabled,solver:"hierarchicalRepulsion"},n.enabled=n.enabled===void 0?!0:n.enabled,n.solver=n.solver||"barnesHut"):Ze(e.physics)==="object"?(n.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,n.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(n.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var i=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:i};else{var a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(i=a.type),this.optionsBackup.edges={smooth:{enabled:a.enabled===void 0?!0:a.enabled,type:a.type===void 0?"dynamic":a.type,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}},e.edges.smooth={enabled:a.enabled===void 0?!0:a.enabled,type:i,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var n=e.length+50,i=0;il){for(var c=e.length;e.length>l&&s<=o;){s+=1;var h=e.length;s%3===0?this.body.modules.clustering.clusterBridges(u):this.body.modules.clustering.clusterOutliers(u);var d=e.length;if(h==d&&s%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*c)})}s>o&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();for(var f=70,v=0;v0){var e,n,i=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new x9e;for(n in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,n)&&(e=this.body.nodes[n],e.options.level!==void 0?(i=!0,this.hierarchical.levels[n]=e.options.level):a=!0);if(a===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(a===!0){var o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.hierarchical.ensureLevel(s);var l=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(l),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var e=this,n=!1,i={},a=function(){for(var k=s(),O=0,P=0;P0)for(var E=0;E1&&arguments[1]!==void 0?arguments[1]:1e9,P=1e9,E=1e9,D=1e9,B=-1e9;for(var R in k)if(Object.prototype.hasOwnProperty.call(k,R)){var A=e.body.nodes[R],z=e.hierarchical.levels[A.id],L=e.direction.getPosition(A),J=e._getSpaceAroundNode(A,k),ne=bt(J,2),ae=ne[0],me=ne[1];P=Math.min(ae,P),E=Math.min(me,E),z<=O&&(D=Math.min(L,D),B=Math.max(L,B))}return[D,B,P,E]},c=function(k,O){var P=e.hierarchical.getMaxLevel(k.id),E=e.hierarchical.getMaxLevel(O.id);return Math.min(P,E)},h=function(k,O,P){for(var E=e.hierarchical,D=0;D1)for(var A=0;A2&&arguments[2]!==void 0?arguments[2]:!1,E=e.direction.getPosition(k),D=e.direction.getPosition(O),B=Math.abs(D-E),R=e.options.hierarchical.nodeSpacing;if(B>R){var A={},z={};l(k,A),l(O,z);var L=c(k,O),J=u(A,L),ne=u(z,L),ae=J[1],me=ne[0],Ie=ne[2],Re=Math.abs(ae-me);if(Re>R){var Le=ae-me+R;Le<-Ie+R&&(Le=-Ie+R),Le<0&&(e._shiftBlock(O.id,Le),n=!0,P===!0&&e._centerParent(O))}}},f=function(k,O){for(var P=O.id,E=O.edges,D=e.hierarchical.levels[O.id],B=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,R={},A=[],z=0;z0?je=Math.min(it,Ue-e.options.hierarchical.nodeSpacing):it<0&&(je=-Math.min(-it,Fe-e.options.hierarchical.nodeSpacing)),je!=0&&(e._shiftBlock(O.id,je),n=!0)},Re=function(se){var ue=e.direction.getPosition(O),_=e._getSpaceAroundNode(O),_e=bt(_,2),Fe=_e[0],Ue=_e[1],it=se-ue,je=ue;it>0?je=Math.min(ue+(Ue-e.options.hierarchical.nodeSpacing),se):it<0&&(je=Math.max(ue-(Fe-e.options.hierarchical.nodeSpacing),se)),je!==ue&&(e.direction.setPosition(O,je),n=!0)},Le=me(k,A);Ie(Le),Le=me(k,E),Re(Le)},v=function(k){var O=e.hierarchical.getLevels();O=ga(O).call(O);for(var P=0;P0&&Math.abs(v)0&&(c=this.direction.getPosition(a[s-1])+u),this.direction.setPosition(l,c,n),this._validatePositionAndContinue(l,n,c),o++}}}}},{key:"_placeBranchNodes",value:function(e,n){var i,a=this.hierarchical.childrenReference[e];if(a!==void 0){for(var o=[],s=0;sn&&this.positionedNodes[u.id]===void 0){var h=this.options.hierarchical.nodeSpacing,d=void 0;l===0?d=this.direction.getPosition(this.body.nodes[e]):d=this.direction.getPosition(o[l-1])+h,this.direction.setPosition(u,d,c),this._validatePositionAndContinue(u,c,d)}else return}var f=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],f,n)}}},{key:"_validatePositionAndContinue",value:function(e,n,i){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[n]!==void 0){var a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[n]]);if(i-ae.hierarchical.levels[a.id]&&e.hierarchical.addRelation(a.id,o.id)};this._crawlNetwork(n),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},i=arguments.length>1?arguments[1]:void 0,a={},o=function d(f,v){if(a[f.id]===void 0){e.hierarchical.setTreeIndex(f,v),a[f.id]=!0;for(var m,b=e._getActiveEdges(f),y=0;y=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function E9e(t,r){var e;if(t){if(typeof t=="string")return Dw(t,r);var n=Xt(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Wa(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dw(t,r)}}function Dw(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e0&&this.options.deleteNode!==!1?(l===!0&&this._createSeperator(4),this._createDeleteButton(s)):i===0&&this.options.deleteEdge!==!1&&(l===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,X(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",X(n=this.showManipulatorToolbar).call(n,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var n,i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,X(n=this.toggleEditMode).call(n,this))}this._temporaryBindEvent("click",X(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var n=this.selectionHandler.getSelectedNodes()[0];if(n!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(n.isCluster!==!0){var i=st({},n.options,!1);if(i.x=n.x,i.y=n.y,this.options.editNode.length===2)this.options.editNode(i,function(a){a!=null&&e.inMode==="editNode"&&e.body.data.nodes.getDataSet().update(a),e.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var e,n,i,a,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s,l=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(l),this._createSeperator(),this._createDescription(l.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,X(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",X(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",X(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDrag",X(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",X(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",X(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",Ze(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){var e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from.id,e.to.id);return}if(this.guiEnabled===!0){var n,i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,X(n=this.toggleEditMode).call(n,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,l,u=this.body.edges[this.edgeBeingEditedId],c=this._getNewTargetNode(u.from.x,u.from.y),h=this._getNewTargetNode(u.to.x,u.to.y);this.temporaryIds.nodes.push(c.id),this.temporaryIds.nodes.push(h.id),this.body.nodes[c.id]=c,this.body.nodeIndices.push(c.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this._temporaryBindUI("onTouch",X(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",X(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",X(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",X(l=this._controlNodeDragEnd).call(l,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(d){var f=u.edgeType.findBorderPositions(d);c.selected===!1&&(c.x=f.from.x,c.y=f.from.y),h.selected===!1&&(h.x=f.to.x,h.y=f.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var n=this.selectionHandler.getSelectedNodeIds(),i=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(n.length>0){for(var o=0;o0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:n,edges:i};if(a.length===2)a(s,function(l){l!=null&&e.inMode==="delete"?(e.body.data.edges.getDataSet().remove(l.edges),e.body.data.nodes.getDataSet().remove(l.nodes),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()):(e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(n),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,n;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(n=this.options.locales[this.options.locale])===null||n===void 0?void 0:n.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}},{key:"_getNewTargetNode",value:function(e,n){var i=st({},this.options.controlNodeStyle);i.id="targetNode"+Js(),i.hidden=!1,i.physics=!1,i.x=e,i.y=n;var a=this.body.functions.createNode(i);return a.shape.boundingBox={left:e,right:e,top:n,bottom:n},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},$i(this.editModeDiv);var n=this.options.locales[this.options.locale],i=this._createButton("editMode","vis-edit vis-edit-mode",n.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(i),this._bindElementEvents(i,X(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&($i(this.editModeDiv),$i(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,n=S9e(Zn(e=this._domEventListenerCleanupQueue).call(e,0)),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;a()}}catch(o){n.e(o)}finally{n.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),$i(this.manipulationDiv),$i(this.editModeDiv),$i(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}},{key:"_createAddNodeButton",value:function(e){var n,i=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,X(n=this.addNodeMode).call(n,this))}},{key:"_createAddEdgeButton",value:function(e){var n,i=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,X(n=this.addEdgeMode).call(n,this))}},{key:"_createEditNodeButton",value:function(e){var n,i=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,X(n=this.editNode).call(n,this))}},{key:"_createEditEdgeButton",value:function(e){var n,i=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,X(n=this.editEdgeMode).call(n,this))}},{key:"_createDeleteButton",value:function(e){var n,i;this.options.rtl?i="vis-delete-rtl":i="vis-delete";var a=this._createButton("delete",i,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,X(n=this.deleteSelected).call(n,this))}},{key:"_createBackButton",value:function(e){var n,i=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,X(n=this.showManipulatorToolbar).call(n,this))}},{key:"_createButton",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+n,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=i,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}},{key:"_createDescription",value:function(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(e,n){this.temporaryEventFunctions.push({event:e,boundFunction:n}),this.body.emitter.on(e,n)}},{key:"_temporaryBindUI",value:function(e,n){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=n;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+fu(yt(this.body.eventListeners)))}},{key:"_unbindTemporaryUIs",value:function(){for(var e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var e=0;e=0;l--)if(o[l]!==this.selectedControlNode.id){s=this.body.nodes[o[l]];break}if(s!==void 0&&this.selectedControlNode!==void 0)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var u=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===u.id?this._performEditEdge(s.id,a.to.id):this._performEditEdge(a.from.id,s.id)}else a.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=At({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var n=this.lastTouch,i=this.selectionHandler.getNodeAt(n);if(i!==void 0)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(i.x,i.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+Js(),from:i.id,to:a.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(a.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(e){var n=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(n),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,l=o.length-1;l>=0;l--){var u;if(He(u=this.temporaryIds.nodes).call(u,o[l])===-1){s=this.body.nodes[o[l]];break}}if(e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,n),this.temporaryIds.nodes[0]!==void 0){var c=this.body.nodes[this.temporaryIds.nodes[0]];c.x=this.canvas._XconvertDOMtoCanvas(n.x),c.y=this.canvas._YconvertDOMtoCanvas(n.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var n=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(n),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,l=o.length-1;l>=0;l--){var u;if(He(u=this.temporaryIds.nodes).call(u,o[l])===-1){s=this.body.nodes[o[l]];break}}this._cleanupTemporaryNodesAndEdges(),s!==void 0&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[a]!==void 0&&this.body.nodes[s.id]!==void 0&&this._performAddEdge(a,s.id)),e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,n),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var n=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,n,void 0,!0)}},{key:"_performAddNode",value:function(e){var n=this,i={id:Js(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(i,function(a){a!=null&&n.inMode==="addNode"&&n.body.data.nodes.getDataSet().add(a),n.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,n){var i=this,a={from:e,to:n};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&i.inMode==="addEdge"&&(i.body.data.edges.getDataSet().add(o),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,n){var i=this,a={id:this.edgeBeingEditedId,from:e,to:n,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(Ze(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||i.inMode!=="editEdge"?(i.body.edges[a.id].updateEdgeType(),i.body.emitter.emit("_redraw"),i.showManipulatorToolbar()):(i.body.data.edges.getDataSet().update(s),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}(),Q="string",G="boolean",F="number",zs="array",fe="object",KT="dom",_9e="any",Pv=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Av={borderWidth:{number:F},borderWidthSelected:{number:F,undefined:"undefined"},brokenImage:{string:Q,undefined:"undefined"},chosen:{label:{boolean:G,function:"function"},node:{boolean:G,function:"function"},__type__:{object:fe,boolean:G}},color:{border:{string:Q},background:{string:Q},highlight:{border:{string:Q},background:{string:Q},__type__:{object:fe,string:Q}},hover:{border:{string:Q},background:{string:Q},__type__:{object:fe,string:Q}},__type__:{object:fe,string:Q}},opacity:{number:F,undefined:"undefined"},fixed:{x:{boolean:G},y:{boolean:G},__type__:{object:fe,boolean:G}},font:{align:{string:Q},color:{string:Q},size:{number:F},face:{string:Q},background:{string:Q},strokeWidth:{number:F},strokeColor:{string:Q},vadjust:{number:F},multi:{boolean:G,string:Q},bold:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},boldital:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},ital:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},mono:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},__type__:{object:fe,string:Q}},group:{string:Q,number:F,undefined:"undefined"},heightConstraint:{minimum:{number:F},valign:{string:Q},__type__:{object:fe,boolean:G,number:F}},hidden:{boolean:G},icon:{face:{string:Q},code:{string:Q},size:{number:F},color:{string:Q},weight:{string:Q,number:F},__type__:{object:fe}},id:{string:Q,number:F},image:{selected:{string:Q,undefined:"undefined"},unselected:{string:Q,undefined:"undefined"},__type__:{object:fe,string:Q}},imagePadding:{top:{number:F},right:{number:F},bottom:{number:F},left:{number:F},__type__:{object:fe,number:F}},label:{string:Q,undefined:"undefined"},labelHighlightBold:{boolean:G},level:{number:F,undefined:"undefined"},margin:{top:{number:F},right:{number:F},bottom:{number:F},left:{number:F},__type__:{object:fe,number:F}},mass:{number:F},physics:{boolean:G},scaling:{min:{number:F},max:{number:F},label:{enabled:{boolean:G},min:{number:F},max:{number:F},maxVisible:{number:F},drawThreshold:{number:F},__type__:{object:fe,boolean:G}},customScalingFunction:{function:"function"},__type__:{object:fe}},shadow:{enabled:{boolean:G},color:{string:Q},size:{number:F},x:{number:F},y:{number:F},__type__:{object:fe,boolean:G}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:G,array:zs},borderRadius:{number:F},interpolation:{boolean:G},useImageSize:{boolean:G},useBorderWithImage:{boolean:G},coordinateOrigin:{string:["center","top-left"]},__type__:{object:fe}},size:{number:F},title:{string:Q,dom:KT,undefined:"undefined"},value:{number:F,undefined:"undefined"},widthConstraint:{minimum:{number:F},maximum:{number:F},__type__:{object:fe,boolean:G,number:F}},x:{number:F},y:{number:F},__type__:{object:fe}},O9e={configure:{enabled:{boolean:G},filter:{boolean:G,string:Q,array:zs,function:"function"},container:{dom:KT},showButton:{boolean:G},__type__:{object:fe,boolean:G,string:Q,array:zs,function:"function"}},edges:{arrows:{to:{enabled:{boolean:G},scaleFactor:{number:F},type:{string:Pv},imageHeight:{number:F},imageWidth:{number:F},src:{string:Q},__type__:{object:fe,boolean:G}},middle:{enabled:{boolean:G},scaleFactor:{number:F},type:{string:Pv},imageWidth:{number:F},imageHeight:{number:F},src:{string:Q},__type__:{object:fe,boolean:G}},from:{enabled:{boolean:G},scaleFactor:{number:F},type:{string:Pv},imageWidth:{number:F},imageHeight:{number:F},src:{string:Q},__type__:{object:fe,boolean:G}},__type__:{string:["from","to","middle"],object:fe}},endPointOffset:{from:{number:F},to:{number:F},__type__:{object:fe,number:F}},arrowStrikethrough:{boolean:G},background:{enabled:{boolean:G},color:{string:Q},size:{number:F},dashes:{boolean:G,array:zs},__type__:{object:fe,boolean:G}},chosen:{label:{boolean:G,function:"function"},edge:{boolean:G,function:"function"},__type__:{object:fe,boolean:G}},color:{color:{string:Q},highlight:{string:Q},hover:{string:Q},inherit:{string:["from","to","both"],boolean:G},opacity:{number:F},__type__:{object:fe,string:Q}},dashes:{boolean:G,array:zs},font:{color:{string:Q},size:{number:F},face:{string:Q},background:{string:Q},strokeWidth:{number:F},strokeColor:{string:Q},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:F},multi:{boolean:G,string:Q},bold:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},boldital:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},ital:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},mono:{color:{string:Q},size:{number:F},face:{string:Q},mod:{string:Q},vadjust:{number:F},__type__:{object:fe,string:Q}},__type__:{object:fe,string:Q}},hidden:{boolean:G},hoverWidth:{function:"function",number:F},label:{string:Q,undefined:"undefined"},labelHighlightBold:{boolean:G},length:{number:F,undefined:"undefined"},physics:{boolean:G},scaling:{min:{number:F},max:{number:F},label:{enabled:{boolean:G},min:{number:F},max:{number:F},maxVisible:{number:F},drawThreshold:{number:F},__type__:{object:fe,boolean:G}},customScalingFunction:{function:"function"},__type__:{object:fe}},selectionWidth:{function:"function",number:F},selfReferenceSize:{number:F},selfReference:{size:{number:F},angle:{number:F},renderBehindTheNode:{boolean:G},__type__:{object:fe}},shadow:{enabled:{boolean:G},color:{string:Q},size:{number:F},x:{number:F},y:{number:F},__type__:{object:fe,boolean:G}},smooth:{enabled:{boolean:G},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:F},forceDirection:{string:["horizontal","vertical","none"],boolean:G},__type__:{object:fe,boolean:G}},title:{string:Q,undefined:"undefined"},width:{number:F},widthConstraint:{maximum:{number:F},__type__:{object:fe,boolean:G,number:F}},value:{number:F,undefined:"undefined"},__type__:{object:fe}},groups:{useDefaultGroups:{boolean:G},__any__:Av,__type__:{object:fe}},interaction:{dragNodes:{boolean:G},dragView:{boolean:G},hideEdgesOnDrag:{boolean:G},hideEdgesOnZoom:{boolean:G},hideNodesOnDrag:{boolean:G},hover:{boolean:G},keyboard:{enabled:{boolean:G},speed:{x:{number:F},y:{number:F},zoom:{number:F},__type__:{object:fe}},bindToWindow:{boolean:G},autoFocus:{boolean:G},__type__:{object:fe,boolean:G}},multiselect:{boolean:G},navigationButtons:{boolean:G},selectable:{boolean:G},selectConnectedEdges:{boolean:G},hoverConnectedEdges:{boolean:G},tooltipDelay:{number:F},zoomView:{boolean:G},zoomSpeed:{number:F},__type__:{object:fe}},layout:{randomSeed:{undefined:"undefined",number:F,string:Q},improvedLayout:{boolean:G},clusterThreshold:{number:F},hierarchical:{enabled:{boolean:G},levelSeparation:{number:F},nodeSpacing:{number:F},treeSpacing:{number:F},blockShifting:{boolean:G},edgeMinimization:{boolean:G},parentCentralization:{boolean:G},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:fe,boolean:G}},__type__:{object:fe}},manipulation:{enabled:{boolean:G},initiallyActive:{boolean:G},addNode:{boolean:G,function:"function"},addEdge:{boolean:G,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:fe,boolean:G,function:"function"}},deleteNode:{boolean:G,function:"function"},deleteEdge:{boolean:G,function:"function"},controlNodeStyle:Av,__type__:{object:fe,boolean:G}},nodes:Av,physics:{enabled:{boolean:G},barnesHut:{theta:{number:F},gravitationalConstant:{number:F},centralGravity:{number:F},springLength:{number:F},springConstant:{number:F},damping:{number:F},avoidOverlap:{number:F},__type__:{object:fe}},forceAtlas2Based:{theta:{number:F},gravitationalConstant:{number:F},centralGravity:{number:F},springLength:{number:F},springConstant:{number:F},damping:{number:F},avoidOverlap:{number:F},__type__:{object:fe}},repulsion:{centralGravity:{number:F},springLength:{number:F},springConstant:{number:F},nodeDistance:{number:F},damping:{number:F},__type__:{object:fe}},hierarchicalRepulsion:{centralGravity:{number:F},springLength:{number:F},springConstant:{number:F},nodeDistance:{number:F},damping:{number:F},avoidOverlap:{number:F},__type__:{object:fe}},maxVelocity:{number:F},minVelocity:{number:F},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:G},iterations:{number:F},updateInterval:{number:F},onlyDynamicEdges:{boolean:G},fit:{boolean:G},__type__:{object:fe,boolean:G}},timestep:{number:F},adaptiveTimestep:{boolean:G},wind:{x:{number:F},y:{number:F},__type__:{object:fe}},__type__:{object:fe,boolean:G}},autoResize:{boolean:G},clickToUse:{boolean:G},locale:{string:Q},locales:{__any__:{any:_9e},__type__:{object:fe}},height:{string:Q},width:{string:Q},__type__:{object:fe}},YT={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},I9e=function(r,e,n){var i;return!!(Ai(r).call(r,"physics")&&Ai(i=YT.physics.solver).call(i,e)&&n.physics.solver!==e&&e!=="wind")},C9e=function(){function t(){te(this,t)}return re(t,[{key:"getDistances",value:function(e,n,i){for(var a={},o=e.edges,s=0;s2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,n);this._createL_matrix(a),this._createK_matrix(a),this._createE_matrix();for(var o=.01,s=1,l=0,u=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),c=5,h=1e9,d=0,f=0,v=0,m=0,b=0;h>o&&ls&&bb.type==="downstream_subgraph_search"))==null?void 0:m.data)||[],c=b=>{const y=b.json.nodes.map(k=>({id:k.id,label:k.type,color:{background:"#2B7CE9",border:"#1B5BB1"},font:{size:16,color:"#FFFFFF",face:"arial",bold:!0},margin:12,padding:10,shape:"box",widthConstraint:{minimum:100,maximum:200}})),$=b.json.links.map(k=>({from:k.origin_id,to:k.target_id,arrows:{to:{enabled:!0,scaleFactor:1.2}},color:"#FFFFFF",width:2}));return{nodes:y,edges:$}};Ve.useEffect(()=>()=>{l.current&&(l.current.destroy(),l.current=null)},[]);const h=Ve.useCallback((b,y)=>{l.current&&l.current.destroy();const $=c(y),k=new he(b,$,{nodes:{shape:"box",margin:12,padding:10,font:{size:16,color:"#FFFFFF",face:"arial",bold:!0},borderWidth:2,shadow:{enabled:!0,color:"rgba(0,0,0,0.2)",size:5}},edges:{arrows:"to",color:"#FFFFFF",width:2,smooth:{enabled:!0,type:"straightCross"}},physics:{enabled:!0,solver:"hierarchicalRepulsion",hierarchicalRepulsion:{nodeDistance:200,springLength:200}},layout:{hierarchical:{enabled:!0,direction:"UD",sortMethod:"directed",nodeSpacing:200,levelSeparation:150}},interaction:{dragNodes:!1,zoomView:!1,dragView:!1}});l.current=k},[]),d=async b=>{console.log("[DownstreamSubgraphs] Starting checkAndLoadSubgraph with node:",b);const y=b.json.nodes,$=Object.values(sr.canvas.selected_nodes)[0];if(!$){console.warn("[DownstreamSubgraphs] No node selected"),alert("Please select a upstream node first before adding a subgraph.");return}const k=y.map(E=>E.type),O=n;console.log("[DownstreamSubgraphs] Required node types:",k),console.log("[DownstreamSubgraphs] Installed node types:",O);const P=k.filter(E=>!O.includes(E));if(console.log("[DownstreamSubgraphs] Missing node types:",P),P.length>0)try{console.log("[DownstreamSubgraphs] Fetching info for missing nodes");const E=await _i.batchGetNodeInfo(P);console.log("[DownstreamSubgraphs] Received node infos:",E);const D={text:"",ext:[{type:"node_install_guide",data:E.map(R=>({name:R.name,repository_url:R.github_url}))}]};console.log("[DownstreamSubgraphs] Created message content:",D);const B={id:br(),role:"ai",content:JSON.stringify(D),format:"markdown",name:"Assistant",metadata:{pendingSubgraph:b}};console.log("[DownstreamSubgraphs] Created AI message:",B),i==null||i(B);return}catch(E){console.error("[DownstreamSubgraphs] Error fetching node info:",E),alert("Error checking required nodes. Please try again.");return}console.log("[DownstreamSubgraphs] All required nodes are installed, proceeding to load subgraph"),f(b,$)},f=(b,y)=>{const $=b.json.nodes,k=b.json.links,O=$.find(D=>D.id===0),P=O==null?void 0:O.id;console.log("[DownstreamSubgraphs] Entry node ID:",P);const E={};P!==null&&(E[P]=y),sr.canvas.emitBeforeChange();try{for(const D of $)if(D.id!==P){const B=O==null?void 0:O.pos,R=[y._pos[0],y._pos[1]],A=[D.pos[0]+R[0]-B[0],D.pos[1]+R[1]-B[1]];E[D.id]=sr.addNodeOnGraph({name:D.type},{pos:A})}for(const D of k){const B=E[D.origin_id],R=E[D.target_id];B&&R&&B.connect(D.origin_slot,R,D.target_slot)}}finally{sr.canvas.emitAfterChange()}};return C.jsx("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:u.length>0&&C.jsx("div",{className:"space-y-3",children:C.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(b=>C.jsxs("div",{className:"relative group",children:[C.jsx("button",{className:`px-3 py-1.5 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors text-xs`,onClick:()=>d(b),onMouseEnter:()=>s(b.name),onMouseLeave:()=>s(null),children:b.name}),C.jsxs("p",{className:"text-xs ml-3 text-gray-500",children:["[",b.tags.join(", "),"]"]}),o===b.name&&C.jsx("div",{className:`fixed transform -translate-y-full z-[9999] w-[500px] p-4 bg-gray-800 text-white text-xs rounded-md shadow-lg mb-2 border border-gray-700`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:C.jsx("div",{style:{width:"100%",height:"300px"},ref:y=>{y&&h(y,b)}})})]},b.name))})})})}function M9e({content:t,onLoadSubgraph:r}){var i,a;const n=((a=(i=JSON.parse(t).ext)==null?void 0:i.find(o=>o.type==="node_install_guide"))==null?void 0:a.data)||[];return C.jsxs("div",{children:[C.jsx("p",{children:"在加载graph到画布前,以下节点有待安装,请跳转到对应的github安装节点:"}),C.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:n.map((o,s)=>C.jsx("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 hover:shadow-sm transition-all duration-200`,children:C.jsxs("div",{className:"flex flex-col",children:[C.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:o.name}),C.jsx("div",{className:"flex justify-end",children:C.jsxs("a",{href:o.repository_url,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-white text-gray-900 rounded-md border border-gray-900 hover:bg-gray-100 transition-colors text-[10px] flex items-center gap-1`,children:[C.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download"]})})]})},s))}),C.jsx("p",{className:"mt-4"}),C.jsx("p",{children:"安装完成后,请点击继续加载graph按钮,将graph加载到画布中:"}),C.jsx("div",{className:"mt-4",children:C.jsx("button",{className:`px-3 py-2 bg-blue-500 text-white rounded-md - hover:bg-blue-600 transition-colors text-xs block mx-auto`,onClick:r,children:"继续加载graph"})})]})}function D9e(){return C.jsx(pm,{name:"Assistant",children:C.jsxs("div",{className:"flex items-center space-x-2 p-4 bg-gray-50 rounded-lg",children:[C.jsxs("div",{className:"flex space-x-1",children:[C.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),C.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),C.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),C.jsx("span",{className:"text-sm text-gray-500",children:"AI is thinking..."})]})})}const N9e=t=>`https://ui-avatars.com/api/?name=${t||"User"}&background=random`;function R9e({messages:t,latestInput:r,onOptionClick:e,installedNodes:n,onAddMessage:i,loading:a}){const o=s=>{var l,u,c,h,d;if(console.log("[MessageList] Rendering message:",s),s.role==="user")return C.jsx(p_,{content:s.content},s.id);if(s.role==="ai"||s.role==="tool"){const f=N9e(s.role);try{const v=JSON.parse(s.content);console.log("[MessageList] Parsed message content:",v);const g=(l=v.ext)==null?void 0:l.find(P=>P.type==="workflow"),b=(u=v.ext)==null?void 0:u.find(P=>P.type==="node"),y=(c=v.ext)==null?void 0:c.find(P=>P.type==="node_recommend"),$=(h=v.ext)==null?void 0:h.find(P=>P.type==="downstream_subgraph_search"),k=(d=v.ext)==null?void 0:d.find(P=>P.type==="node_install_guide");console.log("[MessageList] Found extensions:",{workflowExt:g,nodeExt:b,nodeRecommendExt:y,downstreamSubgraphsExt:$,nodeInstallGuideExt:k});let _=null;return g?_=C.jsx(BR,{content:s.content,name:s.name,latestInput:r,installedNodes:n,onAddMessage:i}):y?_=C.jsx(jR,{content:s.content,name:s.name,avatar:f,installedNodes:n}):b?_=C.jsx(LR,{content:s.content,name:s.name,avatar:f,installedNodes:n}):$?_=C.jsx(A9e,{content:s.content,name:s.name,avatar:f,installedNodes:n,onAddMessage:i}):k&&(_=C.jsx(M9e,{content:s.content,onLoadSubgraph:()=>{var P,S;if((P=s.metadata)!=null&&P.pendingSubgraph){const D=Object.values(app.canvas.selected_nodes)[0];if(D){const B=s.metadata.pendingSubgraph,R=B.json.nodes,A=B.json.links,z=R.find(ie=>ie.id===0),L=z==null?void 0:z.id,J={};L&&(J[L]=D),app.canvas.emitBeforeChange();try{for(const ie of R)if(ie.id!==L){const oe=z==null?void 0:z.pos,me=[D._pos[0],D._pos[1]],Ce=[ie.pos[0]+me[0]-oe[0],ie.pos[1]+me[1]-oe[1]];J[ie.id]=app.addNodeOnGraph({name:ie.type},{pos:Ce})}}finally{app.canvas.emitAfterChange()}for(const ie of A){const oe=J[ie.origin_id],me=J[ie.target_id];oe&&me&&oe.connect(ie.origin_slot,me,ie.target_slot)}}else alert("Please select a upstream node first before adding a subgraph.")}else if((S=s.metadata)!=null&&S.pendingWorkflow){const D=s.metadata.pendingWorkflow,B=s.metadata.optimizedParams;app.loadGraphData(D);for(const[A,z,L,J,ie]of B){const oe=app.graph._nodes_by_id[A].widgets;for(const me of oe)me.name===J&&(me.value=ie)}app.graph.setDirtyCanvas(!1,!0);const R={id:br(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};i==null||i(R)}}})),v.text||_?C.jsx(gd,{content:s.content,name:s.name,format:s.format,onOptionClick:e,extComponent:_},s.id):_||C.jsx(gd,{content:s.content,name:s.name,format:s.format,onOptionClick:e},s.id)}catch(v){return console.error("[MessageList] Error parsing message content:",v),console.error("解析JSON失败",s.content),C.jsx(gd,{content:s.content,name:s.name,format:s.format,onOptionClick:e},s.id)}}return null};return C.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[t==null?void 0:t.map(o),a&&C.jsx(D9e,{})]})}async function F9e(){try{return await(await r_.fetchApi("/object_info",{method:"GET"})).json()}catch(t){throw console.error("Error fetching object info:",t),t}}async function z9e(){const t=await F9e();return Object.keys(t)}function L9e({onClose:t,visible:r=!0}){const[e,n]=Ke.useState([]),[i,a]=Ke.useState(""),[o,s]=Ke.useState(""),[l,u]=Ke.useState(!1),[c,h]=Ke.useState(),d=Ke.useRef(null),[f,v]=Ke.useState(null),[g,b]=Ke.useState([]),[y,$]=Ke.useState(window.innerWidth/3),[k,_]=Ke.useState(!1),[P,S]=Ke.useState([]);Ke.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[e]),Ke.useEffect(()=>{(async()=>{console.log("[WorkflowChat] Fetching installed nodes");const ue=await z9e();console.log("[WorkflowChat] Received installed nodes:",ue),b(ue)})()},[]);const D=async ne=>{try{const ue=await _i.fetchMessages(ne);n(ue)}catch(ue){console.error("Error fetching messages:",ue)}};Ke.useEffect(()=>{let ne=localStorage.getItem("sessionId");ne?(h(ne),D(ne)):(ne=br(),h(ne),localStorage.setItem("sessionId",ne))},[]),Ke.useEffect(()=>{const ne=()=>{const ue=sr.canvas.selected_nodes;if(Object.keys(ue??{}).length){const T=Object.values(ue)[0];v(T)}else v(null)};return document.addEventListener("click",ne),()=>{document.removeEventListener("click",ne)}},[]),Ke.useEffect(()=>{const ne=ue=>{document.documentElement.style.setProperty("--mouse-x",`${ue.clientX}px`),document.documentElement.style.setProperty("--mouse-y",`${ue.clientY}px`)};return document.addEventListener("mousemove",ne),()=>{document.removeEventListener("mousemove",ne)}},[]);const B=ne=>{a(ne.target.value)},R=async()=>{if(i.trim()===""&&!f||!c)return;u(!0),s(i);const ne={id:br(),role:"user",content:i};n(ue=>[...ue,ne]),a("");try{for await(const ue of _i.streamInvokeServer(c,i,P.map(T=>T.file))){const T={id:br(),role:"ai",content:JSON.stringify(ue),type:ue.type,format:ue.format,finished:ue.finished,name:"Assistant"};n(ge=>ge[ge.length-1].role==="ai"?[...ge.slice(0,-1),T]:[...ge,T]),ue.finished&&u(!1)}}catch(ue){console.error("Error sending message:",ue),u(!1)}finally{S([])}},A=ne=>{ne.metaKey&&ne.key==="Enter"&&R()},z=()=>{n([]),localStorage.removeItem("sessionId");const ne=br();h(ne),localStorage.setItem("sessionId",ne)},L=ne=>{a(ne)},J=async(ne,ue)=>{if(!c||!f)return;u(!0);const T={id:br(),role:"user",content:f.comfyClass||f.type};n(ge=>[...ge,T]);try{for await(const ge of _i.streamInvokeServer(c,f.comfyClass||f.type,[],ne,ue)){const ye={id:br(),role:"ai",content:JSON.stringify(ge),format:ge.format,finished:ge.finished,name:"Assistant"};n(I=>I[I.length-1].role==="ai"?[...I.slice(0,-1),ye]:[...I,ye]),ge.finished&&u(!1)}}catch(ge){console.error("Error sending message:",ge),u(!1)}},ie=ne=>{console.log("[WorkflowChat] Adding new message:",ne),n(ue=>{const T=[...ue,ne];return console.log("[WorkflowChat] Updated messages:",T),T})},oe=ne=>{_(!0),ne.preventDefault()};Ke.useEffect(()=>{const ne=T=>{if(!k)return;const ge=window.innerWidth-T.clientX,ye=Math.min(Math.max(300,ge),window.innerWidth*.8);$(ye)},ue=()=>{_(!1)};return k&&(document.addEventListener("mousemove",ne),document.addEventListener("mouseup",ue)),()=>{document.removeEventListener("mousemove",ne),document.removeEventListener("mouseup",ue)}},[k]);const me=ne=>{const ue=Array.from(ne).map(T=>({id:Math.random().toString(36).substr(2,9),file:T,preview:URL.createObjectURL(T)}));S(T=>[...T,...ue])},Ce=ne=>{S(ue=>ue.filter(ge=>ge.id!==ne))};return Nw.useEffect(()=>()=>{P.forEach(ne=>URL.revokeObjectURL(ne.preview))},[P]),C.jsxs("div",{className:`fixed top-0 right-0 h-full shadow-lg bg-white - transition-all duration-300 ease-in-out hover:shadow-xl text-gray-700`,style:{display:r?"block":"none",width:`${y}px`},children:[C.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 cursor-ew-resize hover:bg-gray-300 active:bg-gray-400",onMouseDown:oe}),C.jsxs("div",{className:"flex h-full flex-col",children:[C.jsx(c_,{onClose:t,onClear:z,hasMessages:e.length>0}),C.jsx("div",{children:g.map(ne=>C.jsx("div",{children:ne.name},ne.name))}),C.jsx("div",{className:"flex-1 overflow-y-auto p-4 scroll-smooth",ref:d,children:C.jsx(R9e,{messages:e,latestInput:o,onOptionClick:L,installedNodes:g,onAddMessage:ie,loading:l})}),C.jsxs("div",{className:"border-t px-4 py-3 border-gray-200 bg-white sticky bottom-0",children:[f&&C.jsx(v_,{nodeInfo:f,onSendWithIntent:J,loading:l}),C.jsx(d_,{input:i,loading:l,onChange:B,onSend:R,onKeyPress:A,onUploadImages:me,uploadedImages:P,onRemoveImage:Ce})]})]})]})}export{L9e as default}; + hover:bg-blue-600 transition-colors text-xs block mx-auto`,onClick:r,children:"继续加载graph"})})]})}function D9e(){return C.jsx(pm,{name:"Assistant",children:C.jsxs("div",{className:"flex items-center space-x-2 p-4 bg-gray-50 rounded-lg",children:[C.jsxs("div",{className:"flex space-x-1",children:[C.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),C.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),C.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),C.jsx("span",{className:"text-sm text-gray-500",children:"AI is thinking..."})]})})}const N9e=t=>`https://ui-avatars.com/api/?name=${t||"User"}&background=random`;function R9e({messages:t,latestInput:r,onOptionClick:e,installedNodes:n,onAddMessage:i,loading:a}){const o=s=>{var l,u,c,h,d;if(console.log("[MessageList] Rendering message:",s),s.role==="user")return C.jsx(p_,{content:s.content},s.id);if(s.role==="ai"||s.role==="tool"){const f=N9e(s.role);try{const v=JSON.parse(s.content);console.log("[MessageList] Parsed message content:",v);const m=(l=v.ext)==null?void 0:l.find(P=>P.type==="workflow"),b=(u=v.ext)==null?void 0:u.find(P=>P.type==="node"),y=(c=v.ext)==null?void 0:c.find(P=>P.type==="node_recommend"),$=(h=v.ext)==null?void 0:h.find(P=>P.type==="downstream_subgraph_search"),k=(d=v.ext)==null?void 0:d.find(P=>P.type==="node_install_guide");console.log("[MessageList] Found extensions:",{workflowExt:m,nodeExt:b,nodeRecommendExt:y,downstreamSubgraphsExt:$,nodeInstallGuideExt:k});let O=null;return m?O=C.jsx(BR,{content:s.content,name:s.name,latestInput:r,installedNodes:n,onAddMessage:i}):y?O=C.jsx(jR,{content:s.content,name:s.name,avatar:f,installedNodes:n}):b?O=C.jsx(LR,{content:s.content,name:s.name,avatar:f,installedNodes:n}):$?O=C.jsx(A9e,{content:s.content,name:s.name,avatar:f,installedNodes:n,onAddMessage:i}):k&&(O=C.jsx(M9e,{content:s.content,onLoadSubgraph:()=>{var P,E;if((P=s.metadata)!=null&&P.pendingSubgraph){const D=Object.values(app.canvas.selected_nodes)[0];if(D){const B=s.metadata.pendingSubgraph,R=B.json.nodes,A=B.json.links,z=R.find(ne=>ne.id===0),L=z==null?void 0:z.id,J={};L&&(J[L]=D),app.canvas.emitBeforeChange();try{for(const ne of R)if(ne.id!==L){const ae=z==null?void 0:z.pos,me=[D._pos[0],D._pos[1]],Ie=[ne.pos[0]+me[0]-ae[0],ne.pos[1]+me[1]-ae[1]];J[ne.id]=app.addNodeOnGraph({name:ne.type},{pos:Ie})}}finally{app.canvas.emitAfterChange()}for(const ne of A){const ae=J[ne.origin_id],me=J[ne.target_id];ae&&me&&ae.connect(ne.origin_slot,me,ne.target_slot)}}else alert("Please select a upstream node first before adding a subgraph.")}else if((E=s.metadata)!=null&&E.pendingWorkflow){const D=s.metadata.pendingWorkflow,B=s.metadata.optimizedParams;app.loadGraphData(D);for(const[A,z,L,J,ne]of B){const ae=app.graph._nodes_by_id[A].widgets;for(const me of ae)me.name===J&&(me.value=ne)}app.graph.setDirtyCanvas(!1,!0);const R={id:br(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};i==null||i(R)}}})),v.text||O?C.jsx(gd,{content:s.content,name:s.name,format:s.format,onOptionClick:e,extComponent:O},s.id):O||C.jsx(gd,{content:s.content,name:s.name,format:s.format,onOptionClick:e},s.id)}catch(v){return console.error("[MessageList] Error parsing message content:",v),console.error("解析JSON失败",s.content),C.jsx(gd,{content:s.content,name:s.name,format:s.format,onOptionClick:e},s.id)}}return null};return C.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[t==null?void 0:t.map(o),a&&C.jsx(D9e,{})]})}async function F9e(){try{return await(await r_.fetchApi("/object_info",{method:"GET"})).json()}catch(t){throw console.error("Error fetching object info:",t),t}}async function z9e(){const t=await F9e();return Object.keys(t)}function L9e({onClose:t,visible:r=!0,triggerUsage:e=!1,onUsageTriggered:n}){const[i,a]=Ve.useState([]),[o,s]=Ve.useState(""),[l,u]=Ve.useState(""),[c,h]=Ve.useState(!1),[d,f]=Ve.useState(),v=Ve.useRef(null),[m,b]=Ve.useState(null),[y,$]=Ve.useState([]),[k,O]=Ve.useState(window.innerWidth/3),[P,E]=Ve.useState(!1),[D,B]=Ve.useState([]);Ve.useEffect(()=>{v.current&&(v.current.scrollTop=v.current.scrollHeight)},[i]),Ve.useEffect(()=>{(async()=>{console.log("[WorkflowChat] Fetching installed nodes");const se=await z9e();console.log("[WorkflowChat] Received installed nodes:",se),$(se)})()},[]);const R=async S=>{try{const se=await _i.fetchMessages(S);a(se)}catch(se){console.error("Error fetching messages:",se)}};Ve.useEffect(()=>{let S=localStorage.getItem("sessionId");S?(f(S),R(S)):(S=br(),f(S),localStorage.setItem("sessionId",S))},[]),Ve.useEffect(()=>{const S=()=>{const se=sr.canvas.selected_nodes;if(Object.keys(se??{}).length){const ue=Object.values(se)[0];b(ue)}else b(null)};return document.addEventListener("click",S),()=>{document.removeEventListener("click",S)}},[]),Ve.useEffect(()=>{const S=se=>{document.documentElement.style.setProperty("--mouse-x",`${se.clientX}px`),document.documentElement.style.setProperty("--mouse-y",`${se.clientY}px`)};return document.addEventListener("mousemove",S),()=>{document.removeEventListener("mousemove",S)}},[]);const A=S=>{s(S.target.value)},z=async()=>{if(o.trim()===""&&!m||!d)return;h(!0),u(o);const S={id:br(),role:"user",content:o};a(se=>[...se,S]),s("");try{for await(const se of _i.streamInvokeServer(d,o,D.map(ue=>ue.file))){const ue={id:br(),role:"ai",content:JSON.stringify(se),type:se.type,format:se.format,finished:se.finished,name:"Assistant"};a(_=>_[_.length-1].role==="ai"?[..._.slice(0,-1),ue]:[..._,ue]),se.finished&&h(!1)}}catch(se){console.error("Error sending message:",se),h(!1)}finally{B([])}},L=S=>{S.metaKey&&S.key==="Enter"&&z()},J=()=>{a([]),localStorage.removeItem("sessionId");const S=br();f(S),localStorage.setItem("sessionId",S)},ne=S=>{s(S)},ae=async(S,se)=>{if(!d||!m)return;h(!0);const ue={id:br(),role:"user",content:m.comfyClass||m.type};a(_=>[..._,ue]);try{for await(const _ of _i.streamInvokeServer(d,m.comfyClass||m.type,[],S,se)){const _e={id:br(),role:"ai",content:JSON.stringify(_),format:_.format,finished:_.finished,name:"Assistant"};a(Fe=>Fe[Fe.length-1].role==="ai"?[...Fe.slice(0,-1),_e]:[...Fe,_e]),_.finished&&h(!1)}}catch(_){console.error("Error sending message:",_),h(!1)}},me=S=>{console.log("[WorkflowChat] Adding new message:",S),a(se=>{const ue=[...se,S];return console.log("[WorkflowChat] Updated messages:",ue),ue})},Ie=S=>{E(!0),S.preventDefault()};Ve.useEffect(()=>{const S=ue=>{if(!P)return;const _=window.innerWidth-ue.clientX,_e=Math.min(Math.max(300,_),window.innerWidth*.8);O(_e)},se=()=>{E(!1)};return P&&(document.addEventListener("mousemove",S),document.addEventListener("mouseup",se)),()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",se)}},[P]);const Re=S=>{const se=Array.from(S).map(ue=>({id:Math.random().toString(36).substr(2,9),file:ue,preview:URL.createObjectURL(ue)}));B(ue=>[...ue,...se])},Le=S=>{B(se=>se.filter(_=>_.id!==S))};return Nw.useEffect(()=>()=>{D.forEach(S=>URL.revokeObjectURL(S.preview))},[D]),Ve.useEffect(()=>{e&&n&&(ae("node_explain"),n())},[e]),C.jsxs("div",{className:`fixed top-0 right-0 h-full shadow-lg bg-white + transition-all duration-300 ease-in-out hover:shadow-xl text-gray-700`,style:{display:r?"block":"none",width:`${k}px`},children:[C.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 cursor-ew-resize hover:bg-gray-300 active:bg-gray-400",onMouseDown:Ie}),C.jsxs("div",{className:"flex h-full flex-col",children:[C.jsx(c_,{onClose:t,onClear:J,hasMessages:i.length>0}),C.jsx("div",{children:y.map(S=>C.jsx("div",{children:S.name},S.name))}),C.jsx("div",{className:"flex-1 overflow-y-auto p-4 scroll-smooth",ref:v,children:C.jsx(R9e,{messages:i,latestInput:l,onOptionClick:ne,installedNodes:y,onAddMessage:me,loading:c})}),C.jsxs("div",{className:"border-t px-4 py-3 border-gray-200 bg-white sticky bottom-0",children:[m&&C.jsx(v_,{nodeInfo:m,onSendWithIntent:ae,loading:c}),C.jsx(d_,{input:o,loading:c,onChange:A,onSend:z,onKeyPress:L,onUploadImages:Re,uploadedImages:D,onRemoveImage:Le})]})]})]})}export{L9e as default}; diff --git a/entry/comfyui-bridge.js b/entry/comfyui-bridge.js new file mode 100644 index 0000000..fea3da7 --- /dev/null +++ b/entry/comfyui-bridge.js @@ -0,0 +1,31 @@ +import { app } from "../../scripts/app.js"; +import { api } from "../../scripts/api.js"; + +// 定义事件常量 +const COPILOT_EVENTS = { + EXPLAIN_NODE: 'copilot:explain-node' +}; + +function addExtraMenuOptions(nodeType, nodeData, app) { + const original_getExtraMenuOptions = nodeType.prototype.getExtraMenuOptions; + nodeType.prototype.getExtraMenuOptions = function (_, options) { + original_getExtraMenuOptions?.apply(this, arguments); + options.push({ + content: "Explain with Copilot", + callback: async () => { + const nodeTypeUniqueId = nodeType?.comfyClass; + // 触发自定义事件 + window.dispatchEvent(new CustomEvent(COPILOT_EVENTS.EXPLAIN_NODE, { + detail: { nodeType: nodeTypeUniqueId } + })); + } + }) + } +} + +app.registerExtension({ + name: "ComfyUI-Copilot-Bridge", + async beforeRegisterNodeDef(nodeType, nodeData, app) { + addExtraMenuOptions(nodeType, nodeData, app); + }, +}) \ No newline at end of file diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 59f45d3..980cdf1 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -1,5 +1,6 @@ import React, { useRef, useState, useEffect } from "react"; import { DRAWER_Z_INDEX } from "./const"; +import { COPILOT_EVENTS } from "./constants/events"; const WorkflowChat = React.lazy(() => import("./workflowChat/workflowChat")); export default function App() { @@ -8,6 +9,18 @@ export default function App() { const [position, setPosition] = useState<{ x: number; y: number }>(); const [isDragging, setIsDragging] = useState(false); const [dragOffset, setDragOffset] = useState({ x: 0, y: 0 }); + const [shouldTriggerUsage, setShouldTriggerUsage] = useState(false); + + useEffect(() => { + const handleExplainNode = () => { + console.log("Explain node event received"); + setShowChat(true); + setShouldTriggerUsage(true); + }; + + window.addEventListener(COPILOT_EVENTS.EXPLAIN_NODE, handleExplainNode); + return () => window.removeEventListener(COPILOT_EVENTS.EXPLAIN_NODE, handleExplainNode); + }, []); useEffect(() => { setPosition({ @@ -65,12 +78,22 @@ export default function App() { > - setShowChat(false)} visible={showChat} /> + { + setShowChat(false); + setShouldTriggerUsage(false); + }} + visible={showChat} + triggerUsage={shouldTriggerUsage} + onUsageTriggered={() => setShouldTriggerUsage(false)} + /> ); diff --git a/ui/src/constants/events.ts b/ui/src/constants/events.ts new file mode 100644 index 0000000..7cba915 --- /dev/null +++ b/ui/src/constants/events.ts @@ -0,0 +1,3 @@ +export const COPILOT_EVENTS = { + EXPLAIN_NODE: 'copilot:explain-node' +} as const; diff --git a/ui/src/output.css b/ui/src/output.css index 5b564ad..ea8c434 100644 --- a/ui/src/output.css +++ b/ui/src/output.css @@ -588,550 +588,1683 @@ video { } } +.prose { + color: var(--tw-prose-body); + max-width: 65ch; +} + +.prose :where(p):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 1.25em; + margin-bottom: 1.25em; +} + +.prose :where([class~="lead"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: var(--tw-prose-lead); + font-size: 1.25em; + line-height: 1.6; + margin-top: 1.2em; + margin-bottom: 1.2em; +} + +.prose :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: var(--tw-prose-links); + text-decoration: underline; + font-weight: 500; +} + +.prose :where(strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: var(--tw-prose-bold); + font-weight: 600; +} + +.prose :where(a strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: inherit; +} + +.prose :where(blockquote strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: inherit; +} + +.prose :where(thead th strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: inherit; +} + +.prose :where(ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + list-style-type: decimal; + margin-top: 1.25em; + margin-bottom: 1.25em; + padding-inline-start: 1.625em; +} + +.prose :where(ol[type="A"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + list-style-type: upper-alpha; +} + +.prose :where(ol[type="a"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + list-style-type: lower-alpha; +} + +.prose :where(ol[type="A" s]):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + list-style-type: upper-alpha; +} + +.prose :where(ol[type="a" s]):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + list-style-type: lower-alpha; +} + +.prose :where(ol[type="I"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + list-style-type: upper-roman; +} + +.prose :where(ol[type="i"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + list-style-type: lower-roman; +} + +.prose :where(ol[type="I" s]):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + list-style-type: upper-roman; +} + +.prose :where(ol[type="i" s]):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + list-style-type: lower-roman; +} + +.prose :where(ol[type="1"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + list-style-type: decimal; +} + +.prose :where(ul):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + list-style-type: disc; + margin-top: 1.25em; + margin-bottom: 1.25em; + padding-inline-start: 1.625em; +} + +.prose :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *))::marker { + font-weight: 400; + color: var(--tw-prose-counters); +} + +.prose :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *))::marker { + color: var(--tw-prose-bullets); +} + +.prose :where(dt):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 600; + margin-top: 1.25em; +} + +.prose :where(hr):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + border-color: var(--tw-prose-hr); + border-top-width: 1px; + margin-top: 3em; + margin-bottom: 3em; +} + +.prose :where(blockquote):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + font-weight: 500; + font-style: italic; + color: var(--tw-prose-quotes); + border-inline-start-width: 0.25rem; + border-inline-start-color: var(--tw-prose-quote-borders); + quotes: "\201C""\201D""\2018""\2019"; + margin-top: 1.6em; + margin-bottom: 1.6em; + padding-inline-start: 1em; +} + +.prose :where(blockquote p:first-of-type):not(:where([class~="not-prose"],[class~="not-prose"] *))::before { + content: open-quote; +} + +.prose :where(blockquote p:last-of-type):not(:where([class~="not-prose"],[class~="not-prose"] *))::after { + content: close-quote; +} + +.prose :where(h1):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 800; + font-size: 2.25em; + margin-top: 0; + margin-bottom: 0.8888889em; + line-height: 1.1111111; +} + +.prose :where(h1 strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + font-weight: 900; + color: inherit; +} + +.prose :where(h2):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 700; + font-size: 1.5em; + margin-top: 2em; + margin-bottom: 1em; + line-height: 1.3333333; +} + +.prose :where(h2 strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + font-weight: 800; + color: inherit; +} + +.prose :where(h3):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 600; + font-size: 1.25em; + margin-top: 1.6em; + margin-bottom: 0.6em; + line-height: 1.6; +} + +.prose :where(h3 strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + font-weight: 700; + color: inherit; +} + +.prose :where(h4):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 600; + margin-top: 1.5em; + margin-bottom: 0.5em; + line-height: 1.5; +} + +.prose :where(h4 strong):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + font-weight: 700; + color: inherit; +} + +.prose :where(img):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; +} + +.prose :where(picture):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + display: block; + margin-top: 2em; + margin-bottom: 2em; +} + +.prose :where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; +} + +.prose :where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + font-weight: 500; + font-family: inherit; + color: var(--tw-prose-kbd); + box-shadow: 0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%); + font-size: 0.875em; + border-radius: 0.3125rem; + padding-top: 0.1875em; + padding-inline-end: 0.375em; + padding-bottom: 0.1875em; + padding-inline-start: 0.375em; +} + +.prose :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: var(--tw-prose-code); + font-weight: 600; + font-size: 0.875em; +} + +.prose :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *))::before { + content: "`"; +} + +.prose :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *))::after { + content: "`"; +} + +.prose :where(a code):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: inherit; +} + +.prose :where(h1 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: inherit; +} + +.prose :where(h2 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: inherit; + font-size: 0.875em; +} + +.prose :where(h3 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: inherit; + font-size: 0.9em; +} + +.prose :where(h4 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: inherit; +} + +.prose :where(blockquote code):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: inherit; +} + +.prose :where(thead th code):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: inherit; +} + +.prose :where(pre):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: var(--tw-prose-pre-code); + background-color: var(--tw-prose-pre-bg); + overflow-x: auto; + font-weight: 400; + font-size: 0.875em; + line-height: 1.7142857; + margin-top: 1.7142857em; + margin-bottom: 1.7142857em; + border-radius: 0.375rem; + padding-top: 0.8571429em; + padding-inline-end: 1.1428571em; + padding-bottom: 0.8571429em; + padding-inline-start: 1.1428571em; +} + +.prose :where(pre code):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + background-color: transparent; + border-width: 0; + border-radius: 0; + padding: 0; + font-weight: inherit; + color: inherit; + font-size: inherit; + font-family: inherit; + line-height: inherit; +} + +.prose :where(pre code):not(:where([class~="not-prose"],[class~="not-prose"] *))::before { + content: none; +} + +.prose :where(pre code):not(:where([class~="not-prose"],[class~="not-prose"] *))::after { + content: none; +} + +.prose :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + width: 100%; + table-layout: auto; + margin-top: 2em; + margin-bottom: 2em; + font-size: 0.875em; + line-height: 1.7142857; +} + +.prose :where(thead):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + border-bottom-width: 1px; + border-bottom-color: var(--tw-prose-th-borders); +} + +.prose :where(thead th):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: var(--tw-prose-headings); + font-weight: 600; + vertical-align: bottom; + padding-inline-end: 0.5714286em; + padding-bottom: 0.5714286em; + padding-inline-start: 0.5714286em; +} + +.prose :where(tbody tr):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + border-bottom-width: 1px; + border-bottom-color: var(--tw-prose-td-borders); +} + +.prose :where(tbody tr:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + border-bottom-width: 0; +} + +.prose :where(tbody td):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + vertical-align: baseline; +} + +.prose :where(tfoot):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + border-top-width: 1px; + border-top-color: var(--tw-prose-th-borders); +} + +.prose :where(tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + vertical-align: top; +} + +.prose :where(th, td):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + text-align: start; +} + +.prose :where(figure > *):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 0; + margin-bottom: 0; +} + +.prose :where(figcaption):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + color: var(--tw-prose-captions); + font-size: 0.875em; + line-height: 1.4285714; + margin-top: 0.8571429em; +} + +.prose { + --tw-prose-body: #374151; + --tw-prose-headings: #111827; + --tw-prose-lead: #4b5563; + --tw-prose-links: #111827; + --tw-prose-bold: #111827; + --tw-prose-counters: #6b7280; + --tw-prose-bullets: #d1d5db; + --tw-prose-hr: #e5e7eb; + --tw-prose-quotes: #111827; + --tw-prose-quote-borders: #e5e7eb; + --tw-prose-captions: #6b7280; + --tw-prose-kbd: #111827; + --tw-prose-kbd-shadows: 17 24 39; + --tw-prose-code: #111827; + --tw-prose-pre-code: #e5e7eb; + --tw-prose-pre-bg: #1f2937; + --tw-prose-th-borders: #d1d5db; + --tw-prose-td-borders: #e5e7eb; + --tw-prose-invert-body: #d1d5db; + --tw-prose-invert-headings: #fff; + --tw-prose-invert-lead: #9ca3af; + --tw-prose-invert-links: #fff; + --tw-prose-invert-bold: #fff; + --tw-prose-invert-counters: #9ca3af; + --tw-prose-invert-bullets: #4b5563; + --tw-prose-invert-hr: #374151; + --tw-prose-invert-quotes: #f3f4f6; + --tw-prose-invert-quote-borders: #374151; + --tw-prose-invert-captions: #9ca3af; + --tw-prose-invert-kbd: #fff; + --tw-prose-invert-kbd-shadows: 255 255 255; + --tw-prose-invert-code: #fff; + --tw-prose-invert-pre-code: #d1d5db; + --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%); + --tw-prose-invert-th-borders: #4b5563; + --tw-prose-invert-td-borders: #374151; + font-size: 1rem; + line-height: 1.75; +} + +.prose :where(picture > img):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 0; + margin-bottom: 0; +} + +.prose :where(li):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +.prose :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + padding-inline-start: 0.375em; +} + +.prose :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + padding-inline-start: 0.375em; +} + +.prose :where(.prose > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 0.75em; + margin-bottom: 0.75em; +} + +.prose :where(.prose > ul > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 1.25em; +} + +.prose :where(.prose > ul > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-bottom: 1.25em; +} + +.prose :where(.prose > ol > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 1.25em; +} + +.prose :where(.prose > ol > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-bottom: 1.25em; +} + +.prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 0.75em; + margin-bottom: 0.75em; +} + +.prose :where(dl):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 1.25em; + margin-bottom: 1.25em; +} + +.prose :where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 0.5em; + padding-inline-start: 1.625em; +} + +.prose :where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 0; +} + +.prose :where(h2 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 0; +} + +.prose :where(h3 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 0; +} + +.prose :where(h4 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 0; +} + +.prose :where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + padding-inline-start: 0; +} + +.prose :where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + padding-inline-end: 0; +} + +.prose :where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + padding-top: 0.5714286em; + padding-inline-end: 0.5714286em; + padding-bottom: 0.5714286em; + padding-inline-start: 0.5714286em; +} + +.prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + padding-inline-start: 0; +} + +.prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + padding-inline-end: 0; +} + +.prose :where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; +} + +.prose :where(.prose > :first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-top: 0; +} + +.prose :where(.prose > :last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + margin-bottom: 0; +} + +.prose-neutral { + --tw-prose-body: #404040; + --tw-prose-headings: #171717; + --tw-prose-lead: #525252; + --tw-prose-links: #171717; + --tw-prose-bold: #171717; + --tw-prose-counters: #737373; + --tw-prose-bullets: #d4d4d4; + --tw-prose-hr: #e5e5e5; + --tw-prose-quotes: #171717; + --tw-prose-quote-borders: #e5e5e5; + --tw-prose-captions: #737373; + --tw-prose-kbd: #171717; + --tw-prose-kbd-shadows: 23 23 23; + --tw-prose-code: #171717; + --tw-prose-pre-code: #e5e5e5; + --tw-prose-pre-bg: #262626; + --tw-prose-th-borders: #d4d4d4; + --tw-prose-td-borders: #e5e5e5; + --tw-prose-invert-body: #d4d4d4; + --tw-prose-invert-headings: #fff; + --tw-prose-invert-lead: #a3a3a3; + --tw-prose-invert-links: #fff; + --tw-prose-invert-bold: #fff; + --tw-prose-invert-counters: #a3a3a3; + --tw-prose-invert-bullets: #525252; + --tw-prose-invert-hr: #404040; + --tw-prose-invert-quotes: #f5f5f5; + --tw-prose-invert-quote-borders: #404040; + --tw-prose-invert-captions: #a3a3a3; + --tw-prose-invert-kbd: #fff; + --tw-prose-invert-kbd-shadows: 255 255 255; + --tw-prose-invert-code: #fff; + --tw-prose-invert-pre-code: #d4d4d4; + --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%); + --tw-prose-invert-th-borders: #525252; + --tw-prose-invert-td-borders: #404040; +} + .visible { - visibility: visible !important; + visibility: visible; } .collapse { - visibility: collapse !important; + visibility: collapse; } .static { - position: static !important; + position: static; } .fixed { - position: fixed !important; + position: fixed; } .absolute { - position: absolute !important; + position: absolute; } .relative { - position: relative !important; + position: relative; } -.bottom-2 { - bottom: 0.5rem !important; +.sticky { + position: sticky; +} + +.inset-0 { + inset: 0px; +} + +.inset-y-0 { + top: 0px; + bottom: 0px; +} + +.-bottom-1 { + bottom: -0.25rem; +} + +.-right-1 { + right: -0.25rem; +} + +.-top-1 { + top: -0.25rem; +} + +.-top-10 { + top: -2.5rem; +} + +.bottom-0 { + bottom: 0px; } .bottom-3 { - bottom: 0.75rem !important; + bottom: 0.75rem; +} + +.bottom-full { + bottom: 100%; } .left-0 { - left: 0px !important; + left: 0px; } -.left-2 { - left: 0.5rem !important; +.left-1\/2 { + left: 50%; +} + +.left-3 { + left: 0.75rem; } .right-0 { - right: 0px !important; + right: 0px; +} + +.right-2 { + right: 0.5rem; } .right-3 { - right: 0.75rem !important; + right: 0.75rem; } .top-0 { - top: 0px !important; + top: 0px; +} + +.top-2 { + top: 0.5rem; +} + +.z-10 { + z-index: 10; +} + +.z-50 { + z-index: 50; +} + +.z-\[9999\] { + z-index: 9999; +} + +.\!my-0\.5 { + margin-top: 0.125rem !important; + margin-bottom: 0.125rem !important; +} + +.\!my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} + +.mx-auto { + margin-left: auto; + margin-right: auto; } .mb-2 { - margin-bottom: 0.5rem !important; + margin-bottom: 0.5rem; } .mb-3 { - margin-bottom: 0.75rem !important; + margin-bottom: 0.75rem; +} + +.mb-4 { + margin-bottom: 1rem; +} + +.ml-3 { + margin-left: 0.75rem; +} + +.mt-1 { + margin-top: 0.25rem; +} + +.mt-12 { + margin-top: 3rem; } .mt-2 { - margin-top: 0.5rem !important; + margin-top: 0.5rem; } .mt-4 { - margin-top: 1rem !important; + margin-top: 1rem; } -.inline-block { - display: inline-block !important; +.line-clamp-2 { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.block { + display: block; } .flex { - display: flex !important; + display: flex; } .inline-flex { - display: inline-flex !important; + display: inline-flex; } .table { - display: table !important; + display: table; } .grid { - display: grid !important; + display: grid; +} + +.hidden { + display: none; } .h-10 { - height: 2.5rem !important; + height: 2.5rem; } .h-14 { - height: 3.5rem !important; + height: 3.5rem; +} + +.h-2 { + height: 0.5rem; +} + +.h-20 { + height: 5rem; } .h-3 { - height: 0.75rem !important; + height: 0.75rem; +} + +.h-3\.5 { + height: 0.875rem; +} + +.h-4 { + height: 1rem; } .h-5 { - height: 1.25rem !important; + height: 1.25rem; +} + +.h-8 { + height: 2rem; +} + +.h-\[4\.5rem\] { + height: 4.5rem; +} + +.h-auto { + height: auto; } .h-full { - height: 100% !important; + height: 100%; } .min-h-\[80px\] { - min-height: 80px !important; + min-height: 80px; } -.w-1\/4 { - width: 25% !important; +.w-1 { + width: 0.25rem; } -.w-10 { - width: 2.5rem !important; +.w-1\/2 { + width: 50%; } .w-14 { - width: 3.5rem !important; + width: 3.5rem; +} + +.w-2 { + width: 0.5rem; } .w-3 { - width: 0.75rem !important; + width: 0.75rem; +} + +.w-3\.5 { + width: 0.875rem; +} + +.w-4 { + width: 1rem; } .w-5 { - width: 1.25rem !important; + width: 1.25rem; +} + +.w-64 { + width: 16rem; +} + +.w-8 { + width: 2rem; +} + +.w-96 { + width: 24rem; +} + +.w-\[100\%\] { + width: 100%; +} + +.w-\[500px\] { + width: 500px; +} + +.w-\[calc\(50\%-0\.25rem\)\] { + width: calc(50% - 0.25rem); } .w-full { - width: 100% !important; + width: 100%; } -.min-w-0 { - min-width: 0px !important; -} - -.max-w-\[200px\] { - max-width: 200px !important; -} - -.max-w-\[300px\] { - max-width: 300px !important; +.max-w-xs { + max-width: 20rem; } .flex-1 { - flex: 1 1 0% !important; + flex: 1 1 0%; } -.flex-shrink-0 { - flex-shrink: 0 !important; +.-translate-x-1\/2 { + --tw-translate-x: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.-translate-y-full { + --tw-translate-y: -100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.transform { + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +@keyframes bounce { + 0%, 100% { + transform: translateY(-25%); + animation-timing-function: cubic-bezier(0.8,0,1,1); + } + + 50% { + transform: none; + animation-timing-function: cubic-bezier(0,0,0.2,1); + } +} + +.animate-bounce { + animation: bounce 1s infinite; +} + +@keyframes spin { + to { + transform: rotate(360deg); + } +} + +.animate-spin { + animation: spin 1s linear infinite; +} + +.cursor-ew-resize { + cursor: ew-resize; +} + +.cursor-help { + cursor: help; } .cursor-pointer { - cursor: pointer !important; + cursor: pointer; +} + +.select-none { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } .resize-none { - resize: none !important; + resize: none; } .resize { - resize: both !important; + resize: both; +} + +.grid-cols-1 { + grid-template-columns: repeat(1, minmax(0, 1fr)); +} + +.grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); } .flex-col { - flex-direction: column !important; + flex-direction: column; } .flex-wrap { - flex-wrap: wrap !important; + flex-wrap: wrap; } .items-start { - align-items: flex-start !important; + align-items: flex-start; } .items-center { - align-items: center !important; + align-items: center; } .justify-end { - justify-content: flex-end !important; + justify-content: flex-end; } .justify-center { - justify-content: center !important; + justify-content: center; } .justify-between { - justify-content: space-between !important; + justify-content: space-between; } .gap-1 { - gap: 0.25rem !important; + gap: 0.25rem; } .gap-2 { - gap: 0.5rem !important; + gap: 0.5rem; } .gap-3 { - gap: 0.75rem !important; + gap: 0.75rem; } .gap-4 { - gap: 1rem !important; + gap: 1rem; } -.space-y-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0 !important; - margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))) !important; - margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)) !important; +.space-x-1 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.25rem * var(--tw-space-x-reverse)); + margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse))); +} + +.space-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.5rem * var(--tw-space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); } .space-y-3 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0 !important; - margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))) !important; - margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)) !important; + --tw-space-y-reverse: 0; + margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); } .space-y-4 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0 !important; - margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))) !important; - margin-bottom: calc(1rem * var(--tw-space-y-reverse)) !important; + --tw-space-y-reverse: 0; + margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(1rem * var(--tw-space-y-reverse)); } .overflow-hidden { - overflow: hidden !important; + overflow: hidden; +} + +.overflow-visible { + overflow: visible; +} + +.overflow-x-auto { + overflow-x: auto; } .overflow-y-auto { - overflow-y: auto !important; + overflow-y: auto; +} + +.scroll-smooth { + scroll-behavior: smooth; +} + +.whitespace-pre-wrap { + white-space: pre-wrap; } .break-words { - overflow-wrap: break-word !important; + overflow-wrap: break-word; } .rounded { - border-radius: 0.25rem !important; + border-radius: 0.25rem; } .rounded-full { - border-radius: 9999px !important; + border-radius: 9999px; } .rounded-lg { - border-radius: 0.5rem !important; + border-radius: 0.5rem; } .rounded-md { - border-radius: 0.375rem !important; + border-radius: 0.375rem; } .border { - border-width: 1px !important; + border-width: 1px; +} + +.border-2 { + border-width: 2px; +} + +.border-4 { + border-width: 4px; } .border-b { - border-bottom-width: 1px !important; + border-bottom-width: 1px; } .border-t { - border-top-width: 1px !important; + border-top-width: 1px; } -.border-blue-200 { - --tw-border-opacity: 1 !important; - border-color: rgb(191 219 254 / var(--tw-border-opacity, 1)) !important; +.border-solid { + border-style: solid; +} + +.border-dashed { + border-style: dashed; +} + +.border-\[\#979797\] { + --tw-border-opacity: 1; + border-color: rgb(151 151 151 / var(--tw-border-opacity, 1)); } .border-gray-200 { - --tw-border-opacity: 1 !important; - border-color: rgb(229 231 235 / var(--tw-border-opacity, 1)) !important; + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity, 1)); } .border-gray-300 { - --tw-border-opacity: 1 !important; - border-color: rgb(209 213 219 / var(--tw-border-opacity, 1)) !important; + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity, 1)); } -.\!bg-white { - --tw-bg-opacity: 1 !important; - background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important; +.border-gray-700 { + --tw-border-opacity: 1; + border-color: rgb(55 65 81 / var(--tw-border-opacity, 1)); +} + +.border-gray-900 { + --tw-border-opacity: 1; + border-color: rgb(17 24 39 / var(--tw-border-opacity, 1)); +} + +.border-transparent { + border-color: transparent; +} + +.border-t-blue-500 { + --tw-border-opacity: 1; + border-top-color: rgb(59 130 246 / var(--tw-border-opacity, 1)); +} + +.border-t-gray-800 { + --tw-border-opacity: 1; + border-top-color: rgb(31 41 55 / var(--tw-border-opacity, 1)); +} + +.bg-\[\#E5E7ED\] { + --tw-bg-opacity: 1; + background-color: rgb(229 231 237 / var(--tw-bg-opacity, 1)); +} + +.bg-black { + --tw-bg-opacity: 1; + background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); } .bg-blue-50 { - --tw-bg-opacity: 1 !important; - background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1)); } .bg-blue-500 { - --tw-bg-opacity: 1 !important; - background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); +} + +.bg-gray-100 { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)); +} + +.bg-gray-400 { + --tw-bg-opacity: 1; + background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1)); } .bg-gray-50 { - --tw-bg-opacity: 1 !important; - background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1)); +} + +.bg-gray-500 { + --tw-bg-opacity: 1; + background-color: rgb(107 114 128 / var(--tw-bg-opacity, 1)); +} + +.bg-gray-800 { + --tw-bg-opacity: 1; + background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1)); +} + +.bg-gray-900 { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1)); } .bg-green-100 { - --tw-bg-opacity: 1 !important; - background-color: rgb(220 252 231 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(220 252 231 / var(--tw-bg-opacity, 1)); +} + +.bg-green-50 { + --tw-bg-opacity: 1; + background-color: rgb(240 253 244 / var(--tw-bg-opacity, 1)); } .bg-purple-100 { - --tw-bg-opacity: 1 !important; - background-color: rgb(243 232 255 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(243 232 255 / var(--tw-bg-opacity, 1)); +} + +.bg-red-500 { + --tw-bg-opacity: 1; + background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); } .bg-white { - --tw-bg-opacity: 1 !important; - background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); } -.bg-red-300 { - --tw-bg-opacity: 1 !important; - background-color: rgb(252 165 165 / var(--tw-bg-opacity, 1)) !important; +.bg-opacity-25 { + --tw-bg-opacity: 0.25; +} + +.bg-opacity-50 { + --tw-bg-opacity: 0.5; } .object-cover { - -o-object-fit: cover !important; - object-fit: cover !important; + -o-object-fit: cover; + object-fit: cover; +} + +.p-0\.5 { + padding: 0.125rem; +} + +.p-1 { + padding: 0.25rem; } .p-2 { - padding: 0.5rem !important; + padding: 0.5rem; } .p-3 { - padding: 0.75rem !important; + padding: 0.75rem; } .p-4 { - padding: 1rem !important; + padding: 1rem; +} + +.p-6 { + padding: 1.5rem; +} + +.p-8 { + padding: 2rem; +} + +.px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; +} + +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; } .px-3 { - padding-left: 0.75rem !important; - padding-right: 0.75rem !important; + padding-left: 0.75rem; + padding-right: 0.75rem; } .px-4 { - padding-left: 1rem !important; - padding-right: 1rem !important; + padding-left: 1rem; + padding-right: 1rem; } .py-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; + padding-top: 0.25rem; + padding-bottom: 0.25rem; } .py-1\.5 { - padding-top: 0.375rem !important; - padding-bottom: 0.375rem !important; + padding-top: 0.375rem; + padding-bottom: 0.375rem; } .py-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; + padding-top: 0.5rem; + padding-bottom: 0.5rem; } .py-3 { - padding-top: 0.75rem !important; - padding-bottom: 0.75rem !important; + padding-top: 0.75rem; + padding-bottom: 0.75rem; +} + +.pr-10 { + padding-right: 2.5rem; } .pr-12 { - padding-right: 3rem !important; + padding-right: 3rem; +} + +.pr-3 { + padding-right: 0.75rem; +} + +.pt-2 { + padding-top: 0.5rem; } .text-left { - text-align: left !important; + text-align: left; } -.text-right { - text-align: right !important; +.text-center { + text-align: center; +} + +.text-\[10px\] { + font-size: 10px; +} + +.text-\[11px\] { + font-size: 11px; +} + +.text-\[12px\] { + font-size: 12px; +} + +.text-base { + font-size: 1rem; + line-height: 1.5rem; } .text-lg { - font-size: 1.125rem !important; - line-height: 1.75rem !important; + font-size: 1.125rem; + line-height: 1.75rem; } .text-sm { - font-size: 0.875rem !important; - line-height: 1.25rem !important; + font-size: 0.875rem; + line-height: 1.25rem; } .text-xs { - font-size: 0.75rem !important; - line-height: 1rem !important; + font-size: 0.75rem; + line-height: 1rem; } .font-medium { - font-weight: 500 !important; + font-weight: 500; +} + +.font-semibold { + font-weight: 600; +} + +.leading-relaxed { + line-height: 1.625; } .text-black { - --tw-text-opacity: 1 !important; - color: rgb(0 0 0 / var(--tw-text-opacity, 1)) !important; + --tw-text-opacity: 1; + color: rgb(0 0 0 / var(--tw-text-opacity, 1)); +} + +.text-blue-500 { + --tw-text-opacity: 1; + color: rgb(59 130 246 / var(--tw-text-opacity, 1)); } .text-blue-700 { - --tw-text-opacity: 1 !important; - color: rgb(29 78 216 / var(--tw-text-opacity, 1)) !important; + --tw-text-opacity: 1; + color: rgb(29 78 216 / var(--tw-text-opacity, 1)); +} + +.text-gray-400 { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity, 1)); } .text-gray-500 { - --tw-text-opacity: 1 !important; - color: rgb(107 114 128 / var(--tw-text-opacity, 1)) !important; + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity, 1)); } .text-gray-600 { - --tw-text-opacity: 1 !important; - color: rgb(75 85 99 / var(--tw-text-opacity, 1)) !important; + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity, 1)); } .text-gray-700 { - --tw-text-opacity: 1 !important; - color: rgb(55 65 81 / var(--tw-text-opacity, 1)) !important; + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity, 1)); } .text-gray-800 { - --tw-text-opacity: 1 !important; - color: rgb(31 41 55 / var(--tw-text-opacity, 1)) !important; + --tw-text-opacity: 1; + color: rgb(31 41 55 / var(--tw-text-opacity, 1)); +} + +.text-gray-900 { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity, 1)); } .text-green-700 { - --tw-text-opacity: 1 !important; - color: rgb(21 128 61 / var(--tw-text-opacity, 1)) !important; + --tw-text-opacity: 1; + color: rgb(21 128 61 / var(--tw-text-opacity, 1)); } .text-purple-700 { - --tw-text-opacity: 1 !important; - color: rgb(126 34 206 / var(--tw-text-opacity, 1)) !important; + --tw-text-opacity: 1; + color: rgb(126 34 206 / var(--tw-text-opacity, 1)); } .text-white { - --tw-text-opacity: 1 !important; - color: rgb(255 255 255 / var(--tw-text-opacity, 1)) !important; + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); +} + +.underline { + text-decoration-line: underline; +} + +.opacity-0 { + opacity: 0; } .shadow { - --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1) !important; - --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important; - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important; + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .shadow-lg { - --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important; - --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important; - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important; + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .shadow-sm { - --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important; - --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important; - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important; + --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.shadow-xl { + --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .filter { - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important; + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); } .transition { - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter !important; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter !important; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter !important; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important; - transition-duration: 150ms !important; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.transition-all { + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; } .transition-colors { - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke !important; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important; - transition-duration: 150ms !important; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.transition-opacity { + transition-property: opacity; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.transition-transform { + transition-property: transform; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; } .duration-200 { - transition-duration: 200ms !important; + transition-duration: 200ms; +} + +.duration-300 { + transition-duration: 300ms; +} + +.ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); +} + +.hover\:border-blue-500:hover { + --tw-border-opacity: 1; + border-color: rgb(59 130 246 / var(--tw-border-opacity, 1)); } .hover\:bg-blue-100:hover { - --tw-bg-opacity: 1 !important; - background-color: rgb(219 234 254 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(219 234 254 / var(--tw-bg-opacity, 1)); } .hover\:bg-blue-600:hover { - --tw-bg-opacity: 1 !important; - background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1)); } .hover\:bg-gray-100:hover { - --tw-bg-opacity: 1 !important; - background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)); +} + +.hover\:bg-gray-200:hover { + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1)); +} + +.hover\:bg-gray-300:hover { + --tw-bg-opacity: 1; + background-color: rgb(209 213 219 / var(--tw-bg-opacity, 1)); } .hover\:bg-gray-50:hover { - --tw-bg-opacity: 1 !important; - background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1)); } .hover\:bg-green-200:hover { - --tw-bg-opacity: 1 !important; - background-color: rgb(187 247 208 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(187 247 208 / var(--tw-bg-opacity, 1)); } .hover\:bg-green-600:hover { - --tw-bg-opacity: 1 !important; - background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1)); } .hover\:bg-purple-200:hover { - --tw-bg-opacity: 1 !important; - background-color: rgb(233 213 255 / var(--tw-bg-opacity, 1)) !important; + --tw-bg-opacity: 1; + background-color: rgb(233 213 255 / var(--tw-bg-opacity, 1)); +} + +.hover\:text-blue-600:hover { + --tw-text-opacity: 1; + color: rgb(37 99 235 / var(--tw-text-opacity, 1)); } .hover\:text-gray-600:hover { - --tw-text-opacity: 1 !important; - color: rgb(75 85 99 / var(--tw-text-opacity, 1)) !important; + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity, 1)); +} + +.hover\:text-gray-700:hover { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity, 1)); +} + +.hover\:text-gray-800:hover { + --tw-text-opacity: 1; + color: rgb(31 41 55 / var(--tw-text-opacity, 1)); +} + +.hover\:shadow-md:hover { + --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.hover\:shadow-sm:hover { + --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.hover\:shadow-xl:hover { + --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.focus\:border-transparent:focus { + border-color: transparent; } .focus\:outline-none:focus { - outline: 2px solid transparent !important; - outline-offset: 2px !important; + outline: 2px solid transparent; + outline-offset: 2px; } -.focus\:ring-1:focus { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important; - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important; - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) !important; +.focus\:ring-2:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .focus\:ring-blue-500:focus { - --tw-ring-opacity: 1 !important; - --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1)) !important; + --tw-ring-opacity: 1; + --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1)); +} + +.active\:scale-95:active { + --tw-scale-x: .95; + --tw-scale-y: .95; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.active\:bg-gray-400:active { + --tw-bg-opacity: 1; + background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1)); } .disabled\:opacity-50:disabled { - opacity: 0.5 !important; + opacity: 0.5; +} + +.group:hover .group-hover\:block { + display: block; +} + +.group:hover .group-hover\:translate-x-1 { + --tw-translate-x: 0.25rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.group:hover .group-hover\:opacity-100 { + opacity: 1; +} + +.prose-headings\:font-semibold :is(:where(h1, h2, h3, h4, h5, h6, th):not(:where([class~="not-prose"],[class~="not-prose"] *))) { + font-weight: 600; +} + +.prose-h1\:text-base :is(:where(h1):not(:where([class~="not-prose"],[class~="not-prose"] *))) { + font-size: 1rem; + line-height: 1.5rem; +} + +.prose-h2\:text-sm :is(:where(h2):not(:where([class~="not-prose"],[class~="not-prose"] *))) { + font-size: 0.875rem; + line-height: 1.25rem; +} + +.prose-h3\:text-xs :is(:where(h3):not(:where([class~="not-prose"],[class~="not-prose"] *))) { + font-size: 0.75rem; + line-height: 1rem; +} + +.prose-h4\:text-xs :is(:where(h4):not(:where([class~="not-prose"],[class~="not-prose"] *))) { + font-size: 0.75rem; + line-height: 1rem; +} + +.prose-p\:text-xs :is(:where(p):not(:where([class~="not-prose"],[class~="not-prose"] *))) { + font-size: 0.75rem; + line-height: 1rem; +} + +.prose-code\:text-xs :is(:where(code):not(:where([class~="not-prose"],[class~="not-prose"] *))) { + font-size: 0.75rem; + line-height: 1rem; +} + +.prose-pre\:text-xs :is(:where(pre):not(:where([class~="not-prose"],[class~="not-prose"] *))) { + font-size: 0.75rem; + line-height: 1rem; +} + +.prose-ol\:text-xs :is(:where(ol):not(:where([class~="not-prose"],[class~="not-prose"] *))) { + font-size: 0.75rem; + line-height: 1rem; +} + +.prose-ul\:text-xs :is(:where(ul):not(:where([class~="not-prose"],[class~="not-prose"] *))) { + font-size: 0.75rem; + line-height: 1rem; +} + +.prose-li\:text-xs :is(:where(li):not(:where([class~="not-prose"],[class~="not-prose"] *))) { + font-size: 0.75rem; + line-height: 1rem; +} + +@media (min-width: 640px) { + .sm\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (prefers-color-scheme: dark) { + .dark\:bg-\[\#FFFFFF\] { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); + } + + .dark\:text-\[\#000000\] { + --tw-text-opacity: 1; + color: rgb(0 0 0 / var(--tw-text-opacity, 1)); + } +} + +.\[\&\>\*\]\:\!my-1>* { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; } diff --git a/ui/src/workflowChat/workflowChat.tsx b/ui/src/workflowChat/workflowChat.tsx index 350e191..5fb4713 100644 --- a/ui/src/workflowChat/workflowChat.tsx +++ b/ui/src/workflowChat/workflowChat.tsx @@ -14,9 +14,11 @@ import React from "react"; interface WorkflowChatProps { onClose?: () => void; visible?: boolean; + triggerUsage?: boolean; + onUsageTriggered?: () => void; } -export default function WorkflowChat({ onClose, visible = true }: WorkflowChatProps) { +export default function WorkflowChat({ onClose, visible = true, triggerUsage = false, onUsageTriggered }: WorkflowChatProps) { const [messages, setMessages] = useState([]); const [input, setInput] = useState(''); const [latestInput, setLatestInput] = useState(''); @@ -285,6 +287,13 @@ export default function WorkflowChat({ onClose, visible = true }: WorkflowChatPr }; }, [uploadedImages]); + useEffect(() => { + if (triggerUsage && onUsageTriggered) { + handleSendMessageWithIntent('node_explain'); + onUsageTriggered(); + } + }, [triggerUsage]); + return (