diff --git a/dist/copilot_web/App-DDLwSOc-.js b/dist/copilot_web/App-DDLwSOc-.js new file mode 100644 index 0000000..39eb230 --- /dev/null +++ b/dist/copilot_web/App-DDLwSOc-.js @@ -0,0 +1,6 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/workflowChat-YHBEer0-.js","copilot_web/vendor-markdown-Dek94WS0.js","copilot_web/vendor-react-V04_Axys.js","copilot_web/message-components-DAhwqZXx.js","copilot_web/input.js","copilot_web/assets/input-DHLrLZYh.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{_}from"./input.js";import{j as n}from"./vendor-markdown-Dek94WS0.js";import{r as t,R as m}from"./vendor-react-V04_Axys.js";const b=9999999,g={EXPLAIN_NODE:"copilot:explain-node"},y="/copilot_web/assets/logo-BTZhX0BN.png",L=m.lazy(()=>_(()=>import("./workflowChat-YHBEer0-.js"),__vite__mapDeps([0,1,2,3,4,5])).then(r=>({default:r.default})));function N(){const r=t.useRef(null),[p,a]=t.useState(!1),[i,d]=t.useState(),[s,u]=t.useState(!1),[l,x]=t.useState({x:0,y:0}),[h,c]=t.useState(!1);t.useEffect(()=>{const e=()=>{console.log("Explain node event received"),a(!0),c(!0)};return window.addEventListener(g.EXPLAIN_NODE,e),()=>window.removeEventListener(g.EXPLAIN_NODE,e)},[]),t.useEffect(()=>{d({x:window.innerWidth-160,y:20})},[]);const E=e=>{e.preventDefault(),u(!0);const o=e.currentTarget.getBoundingClientRect();x({x:e.clientX-o.left,y:e.clientY-o.top})};return t.useEffect(()=>{const e=f=>{if(s){const v=Math.min(Math.max(0,f.clientX-l.x),window.innerWidth-100),w=Math.min(Math.max(0,f.clientY-l.y),window.innerHeight-40);d({x:v,y:w})}},o=()=>{u(!1)};return s&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",o)),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",o)}},[s,l]),i?n.jsx("div",{ref:r,children:n.jsxs("div",{className:"fixed",style:{zIndex:b,left:i.x,top:i.y,cursor:s?"grabbing":"grab"},children:[n.jsxs("button",{onMouseDown:E,onClick:()=>{a(!0)},className:"px-2 py-1 border border-gray-300 rounded-md bg-white text-black hover:bg-blue-300 hover:font-bold transition-colors select-none w-40 flex items-center space-x-1",style:{marginLeft:"-40px"},children:[n.jsx("img",{src:y,alt:"ComfyUI-Copilot Logo",className:"h-8 w-8"}),n.jsx("span",{className:"text-[14px] font-medium text-gray-800",children:"ComfyUI-Copilot"})]}),n.jsx(m.Suspense,{fallback:n.jsx("div",{children:"Loading..."}),children:n.jsx(L,{onClose:()=>{a(!1),c(!1)},visible:p,triggerUsage:h,onUsageTriggered:()=>c(!1)})})]})}):null}const I=Object.freeze(Object.defineProperty({__proto__:null,default:N},Symbol.toStringTag,{value:"Module"}));export{I as A,y as l}; diff --git a/dist/copilot_web/App-ZU9wZLJP.js b/dist/copilot_web/App-ZU9wZLJP.js deleted file mode 100644 index a013213..0000000 --- a/dist/copilot_web/App-ZU9wZLJP.js +++ /dev/null @@ -1,6 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/workflowChat-BvDkCk05.js","copilot_web/input.js","copilot_web/assets/input-CH_9SpKL.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 n,R as w,_}from"./input.js";const b=9999999,g={EXPLAIN_NODE:"copilot:explain-node"},y="/copilot_web/assets/logo-BTZhX0BN.png",N=w.lazy(()=>_(()=>import("./workflowChat-BvDkCk05.js"),__vite__mapDeps([0,1,2])));function L(){const f=t.useRef(null),[m,r]=t.useState(!1),[a,c]=t.useState(),[s,u]=t.useState(!1),[i,p]=t.useState({x:0,y:0}),[x,l]=t.useState(!1);t.useEffect(()=>{const e=()=>{console.log("Explain node event received"),r(!0),l(!0)};return window.addEventListener(g.EXPLAIN_NODE,e),()=>window.removeEventListener(g.EXPLAIN_NODE,e)},[]),t.useEffect(()=>{c({x:window.innerWidth-160,y:20})},[]);const h=e=>{e.preventDefault(),u(!0);const o=e.currentTarget.getBoundingClientRect();p({x:e.clientX-o.left,y:e.clientY-o.top})};return t.useEffect(()=>{const e=d=>{if(s){const E=Math.min(Math.max(0,d.clientX-i.x),window.innerWidth-100),v=Math.min(Math.max(0,d.clientY-i.y),window.innerHeight-40);c({x:E,y:v})}},o=()=>{u(!1)};return s&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",o)),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",o)}},[s,i]),a?n.jsx("div",{ref:f,children:n.jsxs("div",{className:"fixed",style:{zIndex:b,left:a.x,top:a.y,cursor:s?"grabbing":"grab"},children:[n.jsxs("button",{onMouseDown:h,onClick:()=>{r(!0)},className:"px-2 py-1 border border-gray-300 rounded-md bg-white text-black hover:bg-blue-300 hover:font-bold transition-colors select-none w-40 flex items-center space-x-1",style:{marginLeft:"-40px"},children:[n.jsx("img",{src:y,alt:"ComfyUI-Copilot Logo",className:"h-8 w-8"}),n.jsx("span",{className:"text-[14px] font-medium text-gray-800",children:"ComfyUI-Copilot"})]}),n.jsx(N,{onClose:()=>{r(!1),l(!1)},visible:m,triggerUsage:x,onUsageTriggered:()=>l(!1)})]})}):null}const D=Object.freeze(Object.defineProperty({__proto__:null,default:L},Symbol.toStringTag,{value:"Module"}));export{D as A,y as l}; diff --git a/dist/copilot_web/WorkflowOption-lbGaSVN-.js b/dist/copilot_web/WorkflowOption-lbGaSVN-.js new file mode 100644 index 0000000..614bf8e --- /dev/null +++ b/dist/copilot_web/WorkflowOption-lbGaSVN-.js @@ -0,0 +1 @@ +import{j as e}from"./vendor-markdown-Dek94WS0.js";import{W as f,g as h,a as l}from"./message-components-DAhwqZXx.js";import"./vendor-react-V04_Axys.js";function A({content:g,name:j="Assistant",avatar:k,latestInput:x,installedNodes:w,onAddMessage:d}){const c=JSON.parse(g).ext?.find(o=>o.type==="workflow")?.data||[],u=async o=>{if(!o.id){console.error("No workflow id provided");return}try{const t=await f.getOptimizedWorkflow(o.id,x);if(t.workflow){const n=new Set;for(const s of t.workflow.nodes)n.add(s.type);const r=Array.from(n).filter(s=>!w.includes(s));if(console.log("[WorkflowOption] Missing node types:",r),r.length>0)try{console.log("[WorkflowOption] Fetching info for missing nodes");const s=await f.batchGetNodeInfo(r);console.log("[WorkflowOption] Received node infos:",s);const m={text:"",ext:[{type:"node_install_guide",data:s.map(a=>({name:a.name,repository_url:a.github_url}))}]},i={id:h(),role:"ai",content:JSON.stringify(m),format:"markdown",name:"Assistant",metadata:{pendingWorkflow:t.workflow,optimizedParams:t.optimized_params}};d?.(i);return}catch(s){console.error("[WorkflowOption] Error fetching node info:",s),alert("Error checking required nodes. Please try again.");return}v(t.workflow,t.optimized_params)}}catch(t){console.error("Failed to optimize workflow:",t)}},v=(o,t)=>{l.loadGraphData(o);for(const[r,s,m,i,a]of t){const y=l.graph._nodes_by_id[r].widgets;for(const p of y)p.name===i&&(p.value=a)}l.graph.setDirtyCanvas(!1,!0);const n={id:h(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};d?.(n)};return e.jsx("div",{className:"space-y-3",children:c.length>0&&e.jsx("div",{className:"flex flex-col space-y-4",children:c.map((o,t)=>e.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg border border-gray-200 hover:bg-gray-50",children:[o.image&&e.jsx("img",{src:o.image,alt:o.name,className:"w-14 h-14 object-cover rounded-lg",onError:n=>{const r=n.target;r.onerror=null,r.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"}}),e.jsxs("div",{className:"flex-1 break-words flex flex-col h-[4.5rem] justify-between",children:[e.jsx("div",{children:e.jsx("h3",{className:"font-medium text-sm line-clamp-2 h-10 overflow-hidden",children:o.name})}),e.jsxs("div",{className:"flex justify-between items-center mt-1",children:[o.description&&e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"w-5 h-5 flex items-center justify-center text-gray-500 cursor-help",children:e.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:e.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"})})}),e.jsx("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block",children:e.jsx("div",{className:"bg-gray-900 text-white text-xs rounded-md py-1 px-2 max-w-xs",children:o.description})})]}),e.jsx("button",{onClick:()=>u(o),className:"px-3 py-1.5 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors text-xs",children:"Accept"})]})]})]},t))})})}export{A as WorkflowOption}; diff --git a/dist/copilot_web/assets/input-CH_9SpKL.css b/dist/copilot_web/assets/input-DHLrLZYh.css similarity index 52% rename from dist/copilot_web/assets/input-CH_9SpKL.css rename to dist/copilot_web/assets/input-DHLrLZYh.css index 4b63d71..d7248c9 100644 --- a/dist/copilot_web/assets/input-CH_9SpKL.css +++ b/dist/copilot_web/assets/input-DHLrLZYh.css @@ -1 +1 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.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:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";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:.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:.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:.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 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.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:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.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:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.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:.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:.5714286em;padding-bottom:.5714286em;padding-inline-start:.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:.875em;line-height:1.4285714;margin-top:.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:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.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:.75em;margin-bottom:.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:.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:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.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}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-1{bottom:-.25rem}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.-top-10{top:-2.5rem}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-3{bottom:.75rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.right-0{right:0}.right-12{right:3rem}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-2{top:.5rem}.z-10{z-index:10}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.\!my-0\.5{margin-top:.125rem!important;margin-bottom:.125rem!important}.\!my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.mx-auto{margin-left:auto;margin-right:auto}.-ml-2{margin-left:-.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-3{margin-left:.75rem}.mt-1{margin-top:.25rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-\[4\.5rem\]{height:4.5rem}.h-auto{height:auto}.h-full{height:100%}.max-h-\[400px\]{max-height:400px}.min-h-\[80px\]{min-height:80px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-12{width:3rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{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% - .25rem)}.w-full{width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(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)) skew(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)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(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}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{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}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--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}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.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-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.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;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--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;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;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;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;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-25{--tw-bg-opacity: .25}.bg-opacity-50{--tw-bg-opacity: .5}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-10{padding-bottom:2.5rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-3{padding-right:.75rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[14px\]{font-size:14px}.text-\[16px\]{font-size:16px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-relaxed{line-height:1.625}.text-black{--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;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;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--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;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-white{--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 / .1), 0 1px 2px -1px rgb(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 / .1), 0 4px 6px -4px rgb(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 / .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 / .1), 0 8px 10px -6px rgb(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)}.outline-none{outline:2px solid transparent;outline-offset:2px}.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)}.transition{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(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,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;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(147 197 253 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--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;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-200:hover{--tw-bg-opacity: 1;background-color:rgb(233 213 255 / var(--tw-bg-opacity, 1))}.hover\:font-bold:hover{font-weight:700}.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;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 / .1), 0 2px 4px -2px rgb(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 / .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 / .1), 0 8px 10px -6px rgb(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;outline-offset:2px}.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;--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)) skew(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:.5}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(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:.875rem;line-height:1.25rem}.prose-h3\:text-xs :is(:where(h3):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-h4\:text-xs :is(:where(h4):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-p\:text-xs :is(:where(p):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-code\:text-xs :is(:where(code):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-pre\:text-xs :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-ol\:text-xs :is(:where(ol):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-ul\:text-xs :is(:where(ul):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-li\:text-xs :is(:where(li):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.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:.25rem!important;margin-bottom:.25rem!important} +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.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:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";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:.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:.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:.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 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.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:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.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:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.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:.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:.5714286em;padding-bottom:.5714286em;padding-inline-start:.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:.875em;line-height:1.4285714;margin-top:.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:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.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:.75em;margin-bottom:.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:.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:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.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}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{top:0;bottom:0}.-bottom-1{bottom:-.25rem}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.-top-10{top:-2.5rem}.-top-6{top:-1.5rem}.bottom-0{bottom:0}.bottom-1\.5{bottom:.375rem}.bottom-2{bottom:.5rem}.bottom-3{bottom:.75rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.right-0{right:0}.right-1\.5{right:.375rem}.right-12{right:3rem}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-2{top:.5rem}.z-10{z-index:10}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.\!my-0\.5{margin-top:.125rem!important;margin-bottom:.125rem!important}.\!my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.mx-auto{margin-left:auto;margin-right:auto}.-ml-2{margin-left:-.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-3{margin-left:.75rem}.mt-1{margin-top:.25rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-\[4\.5rem\]{height:4.5rem}.h-auto{height:auto}.h-full{height:100%}.max-h-\[400px\]{max-height:400px}.min-h-\[80px\]{min-height:80px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-12{width:3rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{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% - .25rem)}.w-full{width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(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)) skew(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)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(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}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{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}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--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}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.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-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.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;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--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;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-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / 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;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;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;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-25{--tw-bg-opacity: .25}.bg-opacity-50{--tw-bg-opacity: .5}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-10{padding-bottom:2.5rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-3{padding-right:.75rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[14px\]{font-size:14px}.text-\[16px\]{font-size:16px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-relaxed{line-height:1.625}.text-black{--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;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;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--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;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-40{opacity:.4}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(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 / .1), 0 4px 6px -4px rgb(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 / .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 / .1), 0 8px 10px -6px rgb(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)}.outline-none{outline:2px solid transparent;outline-offset:2px}.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)}.transition{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(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,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;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(147 197 253 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--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;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-200:hover{--tw-bg-opacity: 1;background-color:rgb(233 213 255 / var(--tw-bg-opacity, 1))}.hover\:font-bold:hover{font-weight:700}.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;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\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(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 / .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 / .1), 0 8px 10px -6px rgb(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;outline-offset:2px}.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;--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)) skew(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:.5}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(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:.875rem;line-height:1.25rem}.prose-h3\:text-xs :is(:where(h3):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-h4\:text-xs :is(:where(h4):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-p\:text-xs :is(:where(p):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-code\:text-xs :is(:where(code):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-pre\:text-xs :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-ol\:text-xs :is(:where(ol):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-ul\:text-xs :is(:where(ul):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-li\:text-xs :is(:where(li):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.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:.25rem!important;margin-bottom:.25rem!important} diff --git a/dist/copilot_web/input.js b/dist/copilot_web/input.js index 9197a56..8d2a07b 100644 --- a/dist/copilot_web/input.js +++ b/dist/copilot_web/input.js @@ -1,40 +1,2 @@ -const of="modulepreload",sf=function(e){return"/"+e},Oi={},af=function(n,t,r){let l=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),o=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));l=Promise.allSettled(t.map(s=>{if(s=sf(s),s in Oi)return;Oi[s]=!0;const f=s.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${h}`))return;const m=document.createElement("link");if(m.rel=f?"stylesheet":of,f||(m.as="script"),m.crossOrigin="",m.href=s,o&&m.setAttribute("nonce",o),document.head.appendChild(m),f)return new Promise((p,g)=>{m.addEventListener("load",p),m.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${s}`)))})}))}function u(i){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i}return l.then(i=>{for(const o of i||[])o.status==="rejected"&&u(o.reason);return n().catch(u)})};var Ad=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ff(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qo={exports:{}},qr={},Ko={exports:{}},T={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Kt=Symbol.for("react.element"),cf=Symbol.for("react.portal"),df=Symbol.for("react.fragment"),pf=Symbol.for("react.strict_mode"),mf=Symbol.for("react.profiler"),hf=Symbol.for("react.provider"),vf=Symbol.for("react.context"),yf=Symbol.for("react.forward_ref"),gf=Symbol.for("react.suspense"),wf=Symbol.for("react.memo"),Sf=Symbol.for("react.lazy"),Di=Symbol.iterator;function kf(e){return e===null||typeof e!="object"?null:(e=Di&&e[Di]||e["@@iterator"],typeof e=="function"?e:null)}var Yo={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Xo=Object.assign,Go={};function rt(e,n,t){this.props=e,this.context=n,this.refs=Go,this.updater=t||Yo}rt.prototype.isReactComponent={};rt.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")};rt.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Zo(){}Zo.prototype=rt.prototype;function Iu(e,n,t){this.props=e,this.context=n,this.refs=Go,this.updater=t||Yo}var ju=Iu.prototype=new Zo;ju.constructor=Iu;Xo(ju,rt.prototype);ju.isPureReactComponent=!0;var Mi=Array.isArray,Jo=Object.prototype.hasOwnProperty,Uu={current:null},qo={key:!0,ref:!0,__self:!0,__source:!0};function bo(e,n,t){var r,l={},u=null,i=null;if(n!=null)for(r in n.ref!==void 0&&(i=n.ref),n.key!==void 0&&(u=""+n.key),n)Jo.call(n,r)&&!qo.hasOwnProperty(r)&&(l[r]=n[r]);var o=arguments.length-2;if(o===1)l.children=t;else if(1>>1,X=_[H];if(0>>1;Hl(vl,z))vnl(qt,vl)?(_[H]=qt,_[vn]=z,H=vn):(_[H]=vl,_[hn]=z,H=hn);else if(vnl(qt,z))_[H]=qt,_[vn]=z,H=vn;else break e}}return N}function l(_,N){var z=_.sortIndex-N.sortIndex;return z!==0?z:_.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var s=[],f=[],h=1,m=null,p=3,g=!1,w=!1,S=!1,I=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(_){for(var N=t(f);N!==null;){if(N.callback===null)r(f);else if(N.startTime<=_)r(f),N.sortIndex=N.expirationTime,n(s,N);else break;N=t(f)}}function v(_){if(S=!1,d(_),!w)if(t(s)!==null)w=!0,ml(E);else{var N=t(f);N!==null&&hl(v,N.startTime-_)}}function E(_,N){w=!1,S&&(S=!1,c(P),P=-1),g=!0;var z=p;try{for(d(N),m=t(s);m!==null&&(!(m.expirationTime>N)||_&&!xe());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var X=H(m.expirationTime<=N);N=e.unstable_now(),typeof X=="function"?m.callback=X:m===t(s)&&r(s),d(N)}else r(s);m=t(s)}if(m!==null)var Jt=!0;else{var hn=t(f);hn!==null&&hl(v,hn.startTime-N),Jt=!1}return Jt}finally{m=null,p=z,g=!1}}var C=!1,x=null,P=-1,B=5,L=-1;function xe(){return!(e.unstable_now()-L_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return t(s)},e.unstable_next=function(_){switch(p){case 1:case 2:case 3:var N=3;break;default:N=p}var z=p;p=N;try{return _()}finally{p=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,N){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var z=p;p=_;try{return N()}finally{p=z}},e.unstable_scheduleCallback=function(_,N,z){var H=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0H?(_.sortIndex=z,n(f,_),t(s)===null&&_===t(f)&&(S?(c(P),P=-1):S=!0,hl(v,z-H))):(_.sortIndex=X,n(s,_),w||g||(w=!0,ml(E))),_},e.unstable_shouldYield=xe,e.unstable_wrapCallback=function(_){var N=p;return function(){var z=p;p=N;try{return _.apply(this,arguments)}finally{p=z}}}})(ls);rs.exports=ls;var Of=rs.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var us=Au,ve=Of;function y(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wl=Object.prototype.hasOwnProperty,Df=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ji={},Ui={};function Mf(e){return Wl.call(Ui,e)?!0:Wl.call(ji,e)?!1:Df.test(e)?Ui[e]=!0:(ji[e]=!0,!1)}function Ff(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function If(e,n,t,r){if(n===null||typeof n>"u"||Ff(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function oe(e,n,t,r,l,u,i){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=u,this.removeEmptyString=i}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new oe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];b[n]=new oe(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new oe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){b[e]=new oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){b[e]=new oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){b[e]=new oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){b[e]=new oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){b[e]=new oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Vu=/[\-:]([a-z])/g;function Bu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(Vu,Bu);b[n]=new oe(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Vu,Bu);b[n]=new oe(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Vu,Bu);b[n]=new oe(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){b[e]=new oe(e,1,!1,e.toLowerCase(),null,!1,!1)});b.xlinkHref=new oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){b[e]=new oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Hu(e,n,t,r){var l=b.hasOwnProperty(n)?b[n]:null;(l!==null?l.type!==0:r||!(2o||l[i]!==u[o]){var s=` -`+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-ZU9wZLJP.js").then(n=>n.A);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}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/App-DDLwSOc-.js","copilot_web/vendor-markdown-Dek94WS0.js","copilot_web/vendor-react-V04_Axys.js"])))=>i.map(i=>d[i]); +import{j as u}from"./vendor-markdown-Dek94WS0.js";import{a as v,R as p}from"./vendor-react-V04_Axys.js";import{w}from"./message-components-DAhwqZXx.js";const R="modulepreload",b=function(e){return"/"+e},m={},P=function(a,s,S){let d=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),t=r?.nonce||r?.getAttribute("nonce");d=Promise.allSettled(s.map(n=>{if(n=b(n),n in m)return;m[n]=!0;const c=n.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${h}`))return;const o=document.createElement("link");if(o.rel=c?"stylesheet":R,c||(o.as="script"),o.crossOrigin="",o.href=n,t&&o.setAttribute("nonce",t),document.head.appendChild(o),c)return new Promise((y,E)=>{o.addEventListener("load",y),o.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${n}`)))})}))}function l(r){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=r,window.dispatchEvent(t),!t.defaultPrevented)throw r}return d.then(r=>{for(const t of r||[])t.status==="rejected"&&l(t.reason);return a().catch(l)})};var i={},f=v;i.createRoot=f.createRoot,i.hydrateRoot=f.hydrateRoot;const _=p.lazy(()=>P(async()=>{const{default:e}=await import("./App-DDLwSOc-.js").then(a=>a.A);return{default:e}},__vite__mapDeps([0,1,2])).then(({default:e})=>({default:e})));function A(){return new Promise(e=>{if(document.body)return e(document.body);document.addEventListener("DOMContentLoaded",()=>{e(document.body)})})}A().then(()=>w()).then(()=>{const e=document.createElement("div");document.body.append(e),i.createRoot(e).render(u.jsx(p.StrictMode,{children:u.jsx(_,{})}))});export{P as _}; diff --git a/dist/copilot_web/message-components-DAhwqZXx.js b/dist/copilot_web/message-components-DAhwqZXx.js new file mode 100644 index 0000000..480ea7c --- /dev/null +++ b/dist/copilot_web/message-components-DAhwqZXx.js @@ -0,0 +1,139 @@ +import{r as bt}from"./vendor-react-V04_Axys.js";import{j as S,M as eT,r as tT,a as rT,b as nT,c as iT}from"./vendor-markdown-Dek94WS0.js";let $i=null;const Mv=location.pathname.split("/").slice(0,-1).join("/");let aT=null;async function sve(){try{await Promise.all([import(Mv+"/scripts/api.js").then(r=>{aT=r?.api}),import(Mv+"/scripts/app.js").then(r=>{$i=r?.app})])}catch(r){console.error("waitForApp error",r)}}const oT={apiBaseUrl:"https://comfyui-copilot-server.onrender.com"};function ba(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const i=Math.random()*16|0;return(r==="x"?i:i&3|8).toString(16)})}const Vo=oT.apiBaseUrl,Go=()=>localStorage.getItem("chatApiKey");var jc;(r=>{async function*i(a,o,s=[],l=null,u=null,d){try{const c=Go();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(m=>new Promise(($,b)=>{const _=new FileReader;_.onloadend=()=>$(_.result),_.onerror=b,_.readAsDataURL(m)})),f=await Promise.all(h);let v=u?Array.isArray(u)?u:[u]:[];const g=(await fetch(`${Vo}/api/chat/invoke`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${c}`,"trace-id":d||ba()},body:JSON.stringify({session_id:a,prompt:o,mock:!1,intent:l,ext:v,images:f.map((m,$)=>({filename:s[$].name,data:m}))})})).body.getReader();let y="";for(;;){const{done:m,value:$}=await g.read();if(m)break;y+=new TextDecoder().decode($);const b=y.split(` +`);y=b.pop()||"";for(const _ of b)_.trim()&&(yield JSON.parse(_))}y.trim()&&(yield JSON.parse(y))}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}}r.streamInvokeServer=i;async function e(a,o){try{const s=Go(),u=await(await fetch(`${Vo}/api/chat/get_optimized_workflow`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${s}`,"trace-id":ba()},body:JSON.stringify({workflow_id:a,prompt:o})})).json();if(!u.success){const d=u.message||"Failed to get optimized workflow";throw alert(d),new Error(d)}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}}r.getOptimizedWorkflow=e;async function t(a){const o=Go(),l=await(await fetch(`${Vo}/api/chat/get_node_info_by_types`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`,"trace-id":ba()},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}r.batchGetNodeInfo=t;async function n(a){try{const o=Go(),l=await(await fetch(`${Vo}/api/chat/get_messages_by_session_id?session_id=${a}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${o}`,"trace-id":ba()}})).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}}r.fetchMessages=n})(jc||(jc={}));function X$({name:r,isUser:i=!1,children:e}){return S.jsx("div",{className:"flex flex-col w-full items-start gap-2 py-2 animate-fadeIn",children:S.jsx("div",{className:"w-full",children:e})})}function sT({title:r,titleId:i,...e},t){return bt.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},e),r?bt.createElement("title",{id:i},r):null,bt.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const lT=bt.forwardRef(sT);function lve({content:r,trace_id:i}){const[e,t]=bt.useState(!1),[n,a]=bt.useState(!1),o=async()=>{i&&(await navigator.clipboard.writeText(i),a(!0),setTimeout(()=>a(!1),2e3))};return S.jsx(X$,{name:"User",isUser:!0,children:S.jsxs("div",{className:"w-full rounded-lg border border-gray-700 p-4 text-gray-700 text-sm break-words relative",children:[S.jsx("p",{className:"whitespace-pre-wrap",children:r}),i&&S.jsxs("div",{className:"absolute bottom-1.5 right-1.5 cursor-pointer opacity-40 hover:opacity-100 transition-opacity",onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),onClick:o,children:[S.jsx(lT,{className:"h-3.5 w-3.5 text-gray-500 hover:text-gray-700"}),e&&S.jsx("div",{className:"absolute right-0 -top-6 bg-gray-700 text-white text-[10px] py-0.5 px-1.5 rounded shadow-sm whitespace-nowrap",children:n?"Copied!":"Copy trace ID"})]})]})})}const uT=bt.memo(eT,(r,i)=>r.children===i.children&&r.className===i.className);function uve({content:r,name:i="Assistant",format:e,onOptionClick:t,extComponent:n}){const a=bt.useRef(),o=()=>{try{const s=JSON.parse(r),l=s.ext?.find(u=>u.type==="guides")?.data||[];return S.jsxs("div",{className:"space-y-3",children:[e==="markdown"&&s.text?S.jsx("div",{ref:a,children:S.jsx(uT,{rehypePlugins:[[tT,{target:"_blank"}],rT],remarkPlugins:[nT,iT],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 + prose-h3:text-xs + prose-h4:text-xs + prose-p:text-xs + prose-ul:text-xs + prose-ol:text-xs + prose-li:text-xs + prose-code:text-xs + prose-pre:text-xs`,components:{p:({children:u})=>S.jsx("p",{className:"!my-0.5 leading-relaxed text-xs",children:u}),h1:({children:u})=>S.jsx("h1",{className:"text-base font-semibold !my-1",children:u}),h2:({children:u})=>S.jsx("h2",{className:"text-sm font-semibold !my-1",children:u}),h3:({children:u})=>S.jsx("h3",{className:"text-xs font-semibold !my-1",children:u}),h4:({children:u})=>S.jsx("h4",{className:"text-xs font-semibold !my-1",children:u}),table:({children:u})=>S.jsx("table",{className:"border-solid border border-[#979797] w-[100%] text-xs",children:u}),th:({children:u})=>S.jsx("th",{className:"border-solid bg-[#E5E7ED] dark:bg-[#FFFFFF] dark:text-[#000000] border border-[#979797] text-center pt-2 text-xs",children:u}),td:({children:u})=>{if(Array.isArray(u)&&u?.length>0){const d=[],c=u.length;for(let h=0;h"?d.push(S.jsx("br",{})):d.push(u[h]);u=d}return S.jsx("td",{className:"border-solid border border-[#979797] text-center text-xs",children:u})},code:({children:u})=>S.jsx("code",{className:"text-xs bg-gray-100 rounded px-1",children:u}),pre:({children:u})=>S.jsx("pre",{className:"text-xs bg-gray-100 rounded p-2 overflow-x-auto",children:u}),img:({node:u,...d})=>S.jsx("div",{className:"w-1/2 mx-auto",children:S.jsx("img",{...d,loading:"lazy",className:"w-full h-auto block",onError:c=>{console.warn("Image failed to load:",d.src,"Error:",c),c.currentTarget.style.opacity="0"}})})},children:s.text})}):s.text?S.jsx("p",{className:"whitespace-pre-wrap text-left",children:s.text}):null,l.length>0&&S.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:l.map((u,d)=>S.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:()=>t?.(u),children:u},d))}),n]})}catch{return S.jsx("p",{className:"whitespace-pre-wrap text-left",children:r})}};return S.jsx(X$,{name:i,children:S.jsx("div",{className:"w-full rounded-lg bg-gray-50 p-4 text-gray-700 text-sm break-words overflow-hidden",children:o()})})}const dT=LiteGraph;function ef(r,i={}){const e=dT.createNode(r,"",i);return $i.graph.add(e),e}function cT({content:r,name:i="Assistant",avatar:e,installedNodes:t}){const n=JSON.parse(r),[a,o]=bt.useState(null),s=n.ext?.find(h=>h.type==="node")?.data||[],l=h=>t.some(f=>f===h),u=s.filter(h=>l(h.name)),d=s.filter(h=>!l(h.name)),c=h=>h>=1e4?`${(h/1e4).toFixed(1)}w`:h>=1e3?`${(h/1e3).toFixed(1)}k`:h.toString();return S.jsxs("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[u.length>0&&S.jsxs("div",{className:"space-y-3",children:[S.jsx("p",{className:"text-xs font-medium",children:"Installed nodes:"}),S.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:u.map(h=>S.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(h.name),onMouseLeave:()=>o(null),children:[S.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:h.name}),S.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[S.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[S.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:S.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"})}),S.jsx("span",{children:c(h.github_stars||0)})]}),S.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 f=ef(h.name);f&&f.connect(h.from_index,f,h.to_index)},children:[S.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add to Canvas"]})]}),a===h.name&&h.description&&S.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:[h.description,S.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 + border-4 border-transparent border-t-gray-800`})]})]},h.name))})]}),d.length>0&&S.jsxs("div",{className:`space-y-3 ${u.length>0?"mt-4":""}`,children:[S.jsx("p",{className:"text-xs font-medium",children:"Uninstalled nodes:"}),S.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:d.map(h=>S.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(h.name),onMouseLeave:()=>o(null),children:[S.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:h.name}),S.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[S.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[S.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:S.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"})}),S.jsx("span",{children:c(h.github_stars||0)})]}),S.jsxs("a",{href:h.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:[S.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:S.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===h.name&&h.description&&S.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:[h.description,S.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 + border-4 border-transparent border-t-gray-800`})]})]},h.name))})]})]})}const dve=Object.freeze(Object.defineProperty({__proto__:null,NodeSearch:cT},Symbol.toStringTag,{value:"Module"}));function hT({content:r,name:i="Assistant",avatar:e,installedNodes:t}){const n=JSON.parse(r),[a,o]=bt.useState(null),s=n.ext?.find(u=>u.type==="node")?.data||[],l=u=>t.some(d=>d===u);return S.jsxs("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[s.length>0&&S.jsxs("div",{className:"space-y-3",children:[S.jsx("p",{className:"text-xs",children:"Recommended downstream nodes that can be connected:"}),S.jsx("div",{className:"flex flex-wrap gap-2",children:s.map(u=>{const d=l(u.name);return S.jsxs("div",{className:"relative group",children:[d?S.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 c=ef(u.name);if(c){const h=Object.values($i.canvas.selected_nodes)[0];h&&h.connect(u.from_index,c,u.to_index)}},onMouseEnter:()=>o(u.name),onMouseLeave:()=>o(null),children:u.name}):S.jsx("a",{href:u.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(u.name),onMouseLeave:()=>o(null),children:u.name}),a===u.name&&u.description&&S.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:[u.description,S.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 + border-4 border-transparent border-t-gray-800`})]})]},u.name)})})]}),n.node_info?.missing_nodes&&n.node_info.missing_nodes.length>0&&S.jsxs("div",{className:"space-y-3 mt-4",children:[S.jsx("p",{children:"Other recommended nodes (requires installation):"}),S.jsx("div",{className:"flex flex-wrap gap-2",children:n.node_info.missing_nodes.map(u=>S.jsxs("div",{className:"relative group",children:[S.jsx("a",{href:u.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(u.name),onMouseLeave:()=>o(null),children:u.name}),a===u.name&&u.description&&S.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:[u.description,S.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 + border-4 border-transparent border-t-gray-800`})]})]},u.name))})]})]})}const cve=Object.freeze(Object.defineProperty({__proto__:null,NodeRecommend:hT},Symbol.toStringTag,{value:"Module"}));/** + * vis-data + * http://visjs.org/ + * + * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data. + * + * @version 7.1.9 + * @date 2023-11-24T17:53:34.179Z + * + * @copyright (c) 2011-2017 Almende B.V, http://almende.com + * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs + * + * @license + * vis.js is dual licensed under both + * + * 1. The Apache 2.0 License + * http://www.apache.org/licenses/LICENSE-2.0 + * + * and + * + * 2. The MIT License + * http://opensource.org/licenses/MIT + * + * vis.js may be distributed under either license. + */function _l(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}var Ou=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function K(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var J$={exports:{}},Ko=function(r){return r&&r.Math===Math&&r},pe=Ko(typeof globalThis=="object"&&globalThis)||Ko(typeof window=="object"&&window)||Ko(typeof self=="object"&&self)||Ko(typeof Ou=="object"&&Ou)||function(){return this}()||Ou||Function("return this")(),ae=function(r){try{return!!r()}catch{return!0}},fT=ae,Qa=!fT(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),vT=Qa,Q$=Function.prototype,Dv=Q$.apply,Nv=Q$.call,ji=typeof Reflect=="object"&&Reflect.apply||(vT?Nv.bind(Dv):function(){return Nv.apply(Dv,arguments)}),Z$=Qa,e1=Function.prototype,Lc=e1.call,pT=Z$&&e1.bind.bind(Lc,Lc),ve=Z$?pT:function(r){return function(){return Lc.apply(r,arguments)}},t1=ve,gT=t1({}.toString),yT=t1("".slice),Zr=function(r){return yT(gT(r),8,-1)},mT=Zr,bT=ve,r1=function(r){if(mT(r)==="Function")return bT(r)},zc=typeof document=="object"&&document.all,$T=typeof zc>"u"&&zc!==void 0,n1={all:zc,IS_HTMLDDA:$T},i1=n1,wT=i1.all,we=i1.IS_HTMLDDA?function(r){return typeof r=="function"||r===wT}:function(r){return typeof r=="function"},Dn={},_T=ae,Le=!_T(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ET=Qa,qo=Function.prototype.call,ze=ET?qo.bind(qo):function(){return qo.apply(qo,arguments)},El={},a1={}.propertyIsEnumerable,o1=Object.getOwnPropertyDescriptor,ST=o1&&!a1.call({1:2},1);El.f=ST?function(i){var e=o1(this,i);return!!e&&e.enumerable}:a1;var Nn=function(r,i){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:i}},OT=ve,TT=ae,kT=Zr,Tu=Object,IT=OT("".split),Sl=TT(function(){return!Tu("z").propertyIsEnumerable(0)})?function(r){return kT(r)==="String"?IT(r,""):Tu(r)}:Tu,Li=function(r){return r==null},PT=Li,xT=TypeError,tf=function(r){if(PT(r))throw new xT("Can't call method on "+r);return r},CT=Sl,AT=tf,dr=function(r){return CT(AT(r))},Fv=we,s1=n1,RT=s1.all,Je=s1.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:Fv(r)||r===RT}:function(r){return typeof r=="object"?r!==null:Fv(r)},ge={},ku=ge,Iu=pe,MT=we,Bv=function(r){return MT(r)?r:void 0},dt=function(r,i){return arguments.length<2?Bv(ku[r])||Bv(Iu[r]):ku[r]&&ku[r][i]||Iu[r]&&Iu[r][i]},DT=ve,De=DT({}.isPrototypeOf),en=typeof navigator<"u"&&String(navigator.userAgent)||"",l1=pe,Pu=en,jv=l1.process,Lv=l1.Deno,zv=jv&&jv.versions||Lv&&Lv.version,Hv=zv&&zv.v8,Gt,Xs;Hv&&(Gt=Hv.split("."),Xs=Gt[0]>0&&Gt[0]<4?1:+(Gt[0]+Gt[1]));!Xs&&Pu&&(Gt=Pu.match(/Edge\/(\d+)/),(!Gt||Gt[1]>=74)&&(Gt=Pu.match(/Chrome\/(\d+)/),Gt&&(Xs=+Gt[1])));var zi=Xs,Wv=zi,NT=ae,FT=pe,BT=FT.String,Hi=!!Object.getOwnPropertySymbols&&!NT(function(){var r=Symbol("symbol detection");return!BT(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Wv&&Wv<41}),jT=Hi,u1=jT&&!Symbol.sham&&typeof Symbol.iterator=="symbol",LT=dt,zT=we,HT=De,WT=u1,UT=Object,Za=WT?function(r){return typeof r=="symbol"}:function(r){var i=LT("Symbol");return zT(i)&&HT(i.prototype,UT(r))},VT=String,Wi=function(r){try{return VT(r)}catch{return"Object"}},GT=we,KT=Wi,qT=TypeError,_t=function(r){if(GT(r))return r;throw new qT(KT(r)+" is not a function")},YT=_t,XT=Li,rf=function(r,i){var e=r[i];return XT(e)?void 0:YT(e)},xu=ze,Cu=we,Au=Je,JT=TypeError,QT=function(r,i){var e,t;if(i==="string"&&Cu(e=r.toString)&&!Au(t=xu(e,r))||Cu(e=r.valueOf)&&!Au(t=xu(e,r))||i!=="string"&&Cu(e=r.toString)&&!Au(t=xu(e,r)))return t;throw new JT("Can't convert object to primitive value")},d1={exports:{}},ZT=!0,Uv=pe,ek=Object.defineProperty,tk=function(r,i){try{ek(Uv,r,{value:i,configurable:!0,writable:!0})}catch{Uv[r]=i}return i},rk=pe,nk=tk,Vv="__core-js_shared__",ik=rk[Vv]||nk(Vv,{}),nf=ik,Gv=nf;(d1.exports=function(r,i){return Gv[r]||(Gv[r]=i!==void 0?i:{})})("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 Ui=d1.exports,ak=tf,ok=Object,Et=function(r){return ok(ak(r))},sk=ve,lk=Et,uk=sk({}.hasOwnProperty),Ne=Object.hasOwn||function(i,e){return uk(lk(i),e)},dk=ve,ck=0,hk=Math.random(),fk=dk(1 .toString),Ol=function(r){return"Symbol("+(r===void 0?"":r)+")_"+fk(++ck+hk,36)},vk=pe,pk=Ui,Kv=Ne,gk=Ol,yk=Hi,mk=u1,li=vk.Symbol,Ru=pk("wks"),bk=mk?li.for||li:li&&li.withoutSetter||gk,me=function(r){return Kv(Ru,r)||(Ru[r]=yk&&Kv(li,r)?li[r]:bk("Symbol."+r)),Ru[r]},$k=ze,qv=Je,Yv=Za,wk=rf,_k=QT,Ek=me,Sk=TypeError,Ok=Ek("toPrimitive"),Tk=function(r,i){if(!qv(r)||Yv(r))return r;var e=wk(r,Ok),t;if(e){if(i===void 0&&(i="default"),t=$k(e,r,i),!qv(t)||Yv(t))return t;throw new Sk("Can't convert object to primitive value")}return i===void 0&&(i="number"),_k(r,i)},kk=Tk,Ik=Za,Tl=function(r){var i=kk(r,"string");return Ik(i)?i:i+""},Pk=pe,Xv=Je,Hc=Pk.document,xk=Xv(Hc)&&Xv(Hc.createElement),af=function(r){return xk?Hc.createElement(r):{}},Ck=Le,Ak=ae,Rk=af,c1=!Ck&&!Ak(function(){return Object.defineProperty(Rk("div"),"a",{get:function(){return 7}}).a!==7}),Mk=Le,Dk=ze,Nk=El,Fk=Nn,Bk=dr,jk=Tl,Lk=Ne,zk=c1,Jv=Object.getOwnPropertyDescriptor;Dn.f=Mk?Jv:function(i,e){if(i=Bk(i),e=jk(e),zk)try{return Jv(i,e)}catch{}if(Lk(i,e))return Fk(!Dk(Nk.f,i,e),i[e])};var Hk=ae,Wk=we,Uk=/#|\.prototype\./,eo=function(r,i){var e=Gk[Vk(r)];return e===qk?!0:e===Kk?!1:Wk(i)?Hk(i):!!i},Vk=eo.normalize=function(r){return String(r).replace(Uk,".").toLowerCase()},Gk=eo.data={},Kk=eo.NATIVE="N",qk=eo.POLYFILL="P",h1=eo,Qv=r1,Yk=_t,Xk=Qa,Jk=Qv(Qv.bind),tn=function(r,i){return Yk(r),i===void 0?r:Xk?Jk(r,i):function(){return r.apply(i,arguments)}},St={},Qk=Le,Zk=ae,f1=Qk&&Zk(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),eI=Je,tI=String,rI=TypeError,At=function(r){if(eI(r))return r;throw new rI(tI(r)+" is not an object")},nI=Le,iI=c1,aI=f1,Yo=At,Zv=Tl,oI=TypeError,Mu=Object.defineProperty,sI=Object.getOwnPropertyDescriptor,Du="enumerable",Nu="configurable",Fu="writable";St.f=nI?aI?function(i,e,t){if(Yo(i),e=Zv(e),Yo(t),typeof i=="function"&&e==="prototype"&&"value"in t&&Fu in t&&!t[Fu]){var n=sI(i,e);n&&n[Fu]&&(i[e]=t.value,t={configurable:Nu in t?t[Nu]:n[Nu],enumerable:Du in t?t[Du]:n[Du],writable:!1})}return Mu(i,e,t)}:Mu:function(i,e,t){if(Yo(i),e=Zv(e),Yo(t),iI)try{return Mu(i,e,t)}catch{}if("get"in t||"set"in t)throw new oI("Accessors not supported");return"value"in t&&(i[e]=t.value),i};var lI=Le,uI=St,dI=Nn,Pr=lI?function(r,i,e){return uI.f(r,i,dI(1,e))}:function(r,i,e){return r[i]=e,r},Xo=pe,cI=ji,hI=r1,fI=we,vI=Dn.f,pI=h1,Xn=ge,gI=tn,Jn=Pr,ep=Ne,yI=function(r){var i=function(e,t,n){if(this instanceof i){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,n)}return cI(r,this,arguments)};return i.prototype=r.prototype,i},W=function(r,i){var e=r.target,t=r.global,n=r.stat,a=r.proto,o=t?Xo:n?Xo[e]:(Xo[e]||{}).prototype,s=t?Xn:Xn[e]||Jn(Xn,e,{})[e],l=s.prototype,u,d,c,h,f,v,p,g,y;for(h in i)u=pI(t?h:e+(n?".":"#")+h,r.forced),d=!u&&o&&ep(o,h),v=s[h],d&&(r.dontCallGetSet?(y=vI(o,h),p=y&&y.value):p=o[h]),f=d&&p?p:i[h],!(d&&typeof v==typeof f)&&(r.bind&&d?g=gI(f,Xo):r.wrap&&d?g=yI(f):a&&fI(f)?g=hI(f):g=f,(r.sham||f&&f.sham||v&&v.sham)&&Jn(g,"sham",!0),Jn(s,h,g),a&&(c=e+"Prototype",ep(Xn,c)||Jn(Xn,c,{}),Jn(Xn[c],h,f),r.real&&l&&(u||!l[h])&&Jn(l,h,f)))},mI=W,bI=Le,tp=St.f;mI({target:"Object",stat:!0,forced:Object.defineProperty!==tp,sham:!bI},{defineProperty:tp});var $I=ge,v1=$I.Object,wI=J$.exports=function(i,e,t){return v1.defineProperty(i,e,t)};v1.defineProperty.sham&&(wI.sham=!0);var _I=J$.exports,EI=_I,p1=EI,SI=p1,OI=SI,TI=OI,kI=TI,g1=kI,kl=K(g1),II=Zr,rn=Array.isArray||function(i){return II(i)==="Array"},PI=Math.ceil,xI=Math.floor,CI=Math.trunc||function(i){var e=+i;return(e>0?xI:PI)(e)},AI=CI,Il=function(r){var i=+r;return i!==i||i===0?0:AI(i)},RI=Il,MI=Math.min,DI=function(r){return r>0?MI(RI(r),9007199254740991):0},NI=DI,Rt=function(r){return NI(r.length)},FI=TypeError,BI=9007199254740991,Pl=function(r){if(r>BI)throw FI("Maximum allowed index exceeded");return r},jI=Tl,LI=St,zI=Nn,Vi=function(r,i,e){var t=jI(i);t in r?LI.f(r,t,zI(0,e)):r[t]=e},HI=me,WI=HI("toStringTag"),y1={};y1[WI]="z";var of=String(y1)==="[object z]",UI=of,VI=we,As=Zr,GI=me,KI=GI("toStringTag"),qI=Object,YI=As(function(){return arguments}())==="Arguments",XI=function(r,i){try{return r[i]}catch{}},xr=UI?As:function(r){var i,e,t;return r===void 0?"Undefined":r===null?"Null":typeof(e=XI(i=qI(r),KI))=="string"?e:YI?As(i):(t=As(i))==="Object"&&VI(i.callee)?"Arguments":t},JI=ve,QI=we,Wc=nf,ZI=JI(Function.toString);QI(Wc.inspectSource)||(Wc.inspectSource=function(r){return ZI(r)});var m1=Wc.inspectSource,eP=ve,tP=ae,b1=we,rP=xr,nP=dt,iP=m1,$1=function(){},aP=[],w1=nP("Reflect","construct"),sf=/^\s*(?:class|function)\b/,oP=eP(sf.exec),sP=!sf.test($1),ha=function(i){if(!b1(i))return!1;try{return w1($1,aP,i),!0}catch{return!1}},_1=function(i){if(!b1(i))return!1;switch(rP(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return sP||!!oP(sf,iP(i))}catch{return!0}};_1.sham=!0;var xl=!w1||tP(function(){var r;return ha(ha.call)||!ha(Object)||!ha(function(){r=!0})||r})?_1:ha,rp=rn,lP=xl,uP=Je,dP=me,cP=dP("species"),np=Array,hP=function(r){var i;return rp(r)&&(i=r.constructor,lP(i)&&(i===np||rp(i.prototype))?i=void 0:uP(i)&&(i=i[cP],i===null&&(i=void 0))),i===void 0?np:i},fP=hP,Cl=function(r,i){return new(fP(r))(i===0?0:i)},vP=ae,pP=me,gP=zi,yP=pP("species"),to=function(r){return gP>=51||!vP(function(){var i=[],e=i.constructor={};return e[yP]=function(){return{foo:1}},i[r](Boolean).foo!==1})},mP=W,bP=ae,$P=rn,wP=Je,_P=Et,EP=Rt,ip=Pl,ap=Vi,SP=Cl,OP=to,TP=me,kP=zi,E1=TP("isConcatSpreadable"),IP=kP>=51||!bP(function(){var r=[];return r[E1]=!1,r.concat()[0]!==r}),PP=function(r){if(!wP(r))return!1;var i=r[E1];return i!==void 0?!!i:$P(r)},xP=!IP||!OP("concat");mP({target:"Array",proto:!0,arity:1,forced:xP},{concat:function(i){var e=_P(this),t=SP(e,0),n=0,a,o,s,l,u;for(a=-1,s=arguments.length;ao;)if(s=n[o++],s!==s)return!0}else for(;a>o;o++)if((r||o in n)&&n[o]===e)return r||o||0;return!r&&-1}},jP={includes:op(!0),indexOf:op(!1)},ro={},LP=ve,Bu=Ne,zP=dr,HP=jP.indexOf,WP=ro,sp=LP([].push),S1=function(r,i){var e=zP(r),t=0,n=[],a;for(a in e)!Bu(WP,a)&&Bu(e,a)&&sp(n,a);for(;i.length>t;)Bu(e,a=i[t++])&&(~HP(n,a)||sp(n,a));return n},lf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],UP=S1,VP=lf,Ml=Object.keys||function(i){return UP(i,VP)},GP=Le,KP=f1,qP=St,YP=At,XP=dr,JP=Ml;Al.f=GP&&!KP?Object.defineProperties:function(i,e){YP(i);for(var t=XP(e),n=JP(e),a=n.length,o=0,s;a>o;)qP.f(i,s=n[o++],t[s]);return i};var QP=dt,O1=QP("document","documentElement"),ZP=Ui,ex=Ol,lp=ZP("keys"),Dl=function(r){return lp[r]||(lp[r]=ex(r))},tx=At,rx=Al,up=lf,nx=ro,ix=O1,ax=af,ox=Dl,dp=">",cp="<",Uc="prototype",Vc="script",T1=ox("IE_PROTO"),ju=function(){},k1=function(r){return cp+Vc+dp+r+cp+"/"+Vc+dp},hp=function(r){r.write(k1("")),r.close();var i=r.parentWindow.Object;return r=null,i},sx=function(){var r=ax("iframe"),i="java"+Vc+":",e;return r.style.display="none",ix.appendChild(r),r.src=String(i),e=r.contentWindow.document,e.open(),e.write(k1("document.F=Object")),e.close(),e.F},Jo,Rs=function(){try{Jo=new ActiveXObject("htmlfile")}catch{}Rs=typeof document<"u"?document.domain&&Jo?hp(Jo):sx():hp(Jo);for(var r=up.length;r--;)delete Rs[Uc][up[r]];return Rs()};nx[T1]=!0;var Bn=Object.create||function(i,e){var t;return i!==null?(ju[Uc]=tx(i),t=new ju,ju[Uc]=null,t[T1]=i):t=Rs(),e===void 0?t:rx.f(t,e)},no={},lx=S1,ux=lf,dx=ux.concat("length","prototype");no.f=Object.getOwnPropertyNames||function(i){return lx(i,dx)};var uf={},fp=Rl,cx=Rt,hx=Vi,fx=Array,vx=Math.max,I1=function(r,i,e){for(var t=cx(r),n=fp(i,t),a=fp(e===void 0?t:e,t),o=fx(vx(a-n,0)),s=0;ng;g++)if((s||g in f)&&($=f[g],b=v($,g,h),r))if(i)m[g]=b;else if(b)switch(r){case 3:return!0;case 5:return $;case 6:return g;case 2:mp(m,$)}else switch(r){case 4:return!1;case 7:mp(m,$)}return a?-1:t||n?n:m}},qi={forEach:Rr(0),map:Rr(1),filter:Rr(2),some:Rr(3),every:Rr(4),find:Rr(5),findIndex:Rr(6),filterReject:Rr(7)},Nl=W,oo=pe,cf=ze,tC=ve,Oi=Le,Ti=Hi,rC=ae,Be=Ne,nC=De,Kc=At,Fl=dr,hf=Tl,iC=Fn,qc=Nn,Na=Bn,R1=Ml,aC=no,M1=uf,oC=io,D1=Dn,N1=St,sC=Al,F1=El,bp=Gi,lC=df,ff=Ui,uC=Dl,B1=ro,$p=Ol,dC=me,cC=ao,hC=_e,fC=C1,vC=jn,j1=Ki,Bl=qi.forEach,pt=uC("hidden"),jl="Symbol",Fa="prototype",pC=j1.set,wp=j1.getterFor(jl),Xt=Object[Fa],gn=oo.Symbol,$a=gn&&gn[Fa],gC=oo.RangeError,yC=oo.TypeError,Hu=oo.QObject,L1=D1.f,yn=N1.f,z1=M1.f,mC=F1.f,H1=tC([].push),Or=ff("symbols"),so=ff("op-symbols"),bC=ff("wks"),Yc=!Hu||!Hu[Fa]||!Hu[Fa].findChild,W1=function(r,i,e){var t=L1(Xt,i);t&&delete Xt[i],yn(r,i,e),t&&r!==Xt&&yn(Xt,i,t)},Xc=Oi&&rC(function(){return Na(yn({},"a",{get:function(){return yn(this,"a",{value:7}).a}})).a!==7})?W1:yn,Wu=function(r,i){var e=Or[r]=Na($a);return pC(e,{type:jl,tag:r,description:i}),Oi||(e.description=i),e},Ll=function(i,e,t){i===Xt&&Ll(so,e,t),Kc(i);var n=hf(e);return Kc(t),Be(Or,n)?(t.enumerable?(Be(i,pt)&&i[pt][n]&&(i[pt][n]=!1),t=Na(t,{enumerable:qc(0,!1)})):(Be(i,pt)||yn(i,pt,qc(1,{})),i[pt][n]=!0),Xc(i,n,t)):yn(i,n,t)},vf=function(i,e){Kc(i);var t=Fl(e),n=R1(t).concat(K1(t));return Bl(n,function(a){(!Oi||cf(U1,t,a))&&Ll(i,a,t[a])}),i},$C=function(i,e){return e===void 0?Na(i):vf(Na(i),e)},U1=function(i){var e=hf(i),t=cf(mC,this,e);return this===Xt&&Be(Or,e)&&!Be(so,e)?!1:t||!Be(this,e)||!Be(Or,e)||Be(this,pt)&&this[pt][e]?t:!0},V1=function(i,e){var t=Fl(i),n=hf(e);if(!(t===Xt&&Be(Or,n)&&!Be(so,n))){var a=L1(t,n);return a&&Be(Or,n)&&!(Be(t,pt)&&t[pt][n])&&(a.enumerable=!0),a}},G1=function(i){var e=z1(Fl(i)),t=[];return Bl(e,function(n){!Be(Or,n)&&!Be(B1,n)&&H1(t,n)}),t},K1=function(r){var i=r===Xt,e=z1(i?so:Fl(r)),t=[];return Bl(e,function(n){Be(Or,n)&&(!i||Be(Xt,n))&&H1(t,Or[n])}),t};Ti||(gn=function(){if(nC($a,this))throw new yC("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:iC(arguments[0]),e=$p(i),t=function(n){var a=this===void 0?oo:this;a===Xt&&cf(t,so,n),Be(a,pt)&&Be(a[pt],e)&&(a[pt][e]=!1);var o=qc(1,n);try{Xc(a,e,o)}catch(s){if(!(s instanceof gC))throw s;W1(a,e,o)}};return Oi&&Yc&&Xc(Xt,e,{configurable:!0,set:t}),Wu(e,i)},$a=gn[Fa],bp($a,"toString",function(){return wp(this).tag}),bp(gn,"withoutSetter",function(r){return Wu($p(r),r)}),F1.f=U1,N1.f=Ll,sC.f=vf,D1.f=V1,aC.f=M1.f=G1,oC.f=K1,cC.f=function(r){return Wu(dC(r),r)},Oi&&lC($a,"description",{configurable:!0,get:function(){return wp(this).description}}));Nl({global:!0,constructor:!0,wrap:!0,forced:!Ti,sham:!Ti},{Symbol:gn});Bl(R1(bC),function(r){hC(r)});Nl({target:jl,stat:!0,forced:!Ti},{useSetter:function(){Yc=!0},useSimple:function(){Yc=!1}});Nl({target:"Object",stat:!0,forced:!Ti,sham:!Oi},{create:$C,defineProperty:Ll,defineProperties:vf,getOwnPropertyDescriptor:V1});Nl({target:"Object",stat:!0,forced:!Ti},{getOwnPropertyNames:G1});fC();vC(gn,jl);B1[pt]=!0;var wC=Hi,q1=wC&&!!Symbol.for&&!!Symbol.keyFor,_C=W,EC=dt,SC=Ne,OC=Fn,Y1=Ui,TC=q1,Uu=Y1("string-to-symbol-registry"),kC=Y1("symbol-to-string-registry");_C({target:"Symbol",stat:!0,forced:!TC},{for:function(r){var i=OC(r);if(SC(Uu,i))return Uu[i];var e=EC("Symbol")(i);return Uu[i]=e,kC[e]=i,e}});var IC=W,PC=Ne,xC=Za,CC=Wi,AC=Ui,RC=q1,_p=AC("symbol-to-string-registry");IC({target:"Symbol",stat:!0,forced:!RC},{keyFor:function(i){if(!xC(i))throw new TypeError(CC(i)+" is not a symbol");if(PC(_p,i))return _p[i]}});var MC=ve,lo=MC([].slice),DC=ve,Ep=rn,NC=we,Sp=Zr,FC=Fn,Op=DC([].push),BC=function(r){if(NC(r))return r;if(Ep(r)){for(var i=r.length,e=[],t=0;t=i.length)return r.target=void 0,ts(void 0,!0);switch(r.kind){case"keys":return ts(e,!1);case"values":return ts(i[e],!1)}return ts([e,i[e]],!1)},"values");jp.Arguments=jp.Array;var yR={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},mR=yR,bR=pe,$R=xr,wR=Pr,Lp=Yi,_R=me,zp=_R("toStringTag");for(var qu in mR){var Hp=bR[qu],Yu=Hp&&Hp.prototype;Yu&&$R(Yu)!==zp&&wR(Yu,zp,qu),Lp[qu]=Lp.Array}var ER=$A,lw=ER,SR=me,OR=St.f,Wp=SR("metadata"),Up=Function.prototype;Up[Wp]===void 0&&OR(Up,Wp,{value:null});var TR=_e;TR("asyncDispose");var kR=_e;kR("dispose");var IR=_e;IR("metadata");var PR=lw,xR=PR,CR=dt,AR=ve,mf=CR("Symbol"),RR=mf.keyFor,MR=AR(mf.prototype.valueOf),uw=mf.isRegisteredSymbol||function(i){try{return RR(MR(i))!==void 0}catch{return!1}},DR=W,NR=uw;DR({target:"Symbol",stat:!0},{isRegisteredSymbol:NR});var FR=Ui,dw=dt,BR=ve,jR=Za,LR=me,Zs=dw("Symbol"),Vp=Zs.isWellKnownSymbol,cw=dw("Object","getOwnPropertyNames"),zR=BR(Zs.prototype.valueOf),Gp=FR("wks");for(var Xu=0,Kp=cw(Zs),HR=Kp.length;Xu=a?r?"":void 0:(o=Yp(t,n),o<55296||o>56319||n+1===a||(s=Yp(t,n+1))<56320||s>57343?r?aM(t,n):o:r?oM(t,n,n+2):(o-55296<<10)+(s-56320)+65536)}},sM={codeAt:Xp(!1),charAt:Xp(!0)},lM=sM.charAt,uM=Fn,fw=Ki,dM=gf,Jp=yf,vw="String Iterator",cM=fw.set,hM=fw.getterFor(vw);dM(String,"String",function(r){cM(this,{type:vw,string:uM(r),index:0})},function(){var i=hM(this),e=i.string,t=i.index,n;return t>=e.length?Jp(void 0,!0):(n=lM(e,t),i.index+=n.length,Jp(n,!1))});var fM=ao,vM=fM.f("iterator"),pM=vM,pw=pM,gM=pw,yM=gM,mM=yM,bM=mM,gw=bM,$M=K(gw);function ki(r){"@babel/helpers - typeof";return ki=typeof ui=="function"&&typeof $M=="symbol"?function(i){return typeof i}:function(i){return i&&typeof ui=="function"&&i.constructor===ui&&i!==ui.prototype?"symbol":typeof i},ki(r)}var wM=ao,_M=wM.f("toPrimitive"),EM=_M,SM=EM,OM=SM,TM=OM,kM=TM,IM=kM,PM=IM,xM=K(PM);function CM(r,i){if(ki(r)!=="object"||r===null)return r;var e=r[xM];if(e!==void 0){var t=e.call(r,i||"default");if(ki(t)!=="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function yw(r){var i=CM(r,"string");return ki(i)==="symbol"?i:String(i)}function Qp(r,i){for(var e=0;e=0:s>l;l+=u)l in o&&(n=e(n,o[l],l,a));return n}},eD={left:tg(!1),right:tg(!0)},tD=ae,Wl=function(r,i){var e=[][r];return!!e&&tD(function(){e.call(null,i||function(){return 1},1)})},rD=pe,nD=Zr,co=nD(rD.process)==="process",iD=W,aD=eD.left,oD=Wl,rg=zi,sD=co,lD=!sD&&rg>79&&rg<83,uD=lD||!oD("reduce");iD({target:"Array",proto:!0,forced:uD},{reduce:function(i){var e=arguments.length;return aD(this,i,e,e>1?arguments[1]:void 0)}});var dD=rt,cD=dD("Array","reduce"),hD=De,fD=cD,Zu=Array.prototype,vD=function(r){var i=r.reduce;return r===Zu||hD(Zu,r)&&i===Zu.reduce?fD:i},pD=vD,gD=pD,yD=gD,mD=K(yD),bD=W,$D=qi.filter,wD=to,_D=wD("filter");bD({target:"Array",proto:!0,forced:!_D},{filter:function(i){return $D(this,i,arguments.length>1?arguments[1]:void 0)}});var ED=rt,SD=ED("Array","filter"),OD=De,TD=SD,ed=Array.prototype,kD=function(r){var i=r.filter;return r===ed||OD(ed,r)&&i===ed.filter?TD:i},ID=kD,PD=ID,xD=PD,di=K(xD),CD=W,AD=qi.map,RD=to,MD=RD("map");CD({target:"Array",proto:!0,forced:!MD},{map:function(i){return AD(this,i,arguments.length>1?arguments[1]:void 0)}});var DD=rt,ND=DD("Array","map"),FD=De,BD=ND,td=Array.prototype,jD=function(r){var i=r.map;return r===td||FD(td,r)&&i===td.map?BD:i},LD=jD,zD=LD,HD=zD,Kt=K(HD),WD=rn,UD=Rt,VD=Pl,GD=tn,Ew=function(r,i,e,t,n,a,o,s){for(var l=n,u=0,d=o?GD(o,s):!1,c,h;u0&&WD(c)?(h=UD(c),l=Ew(r,i,c,h,l,a-1)-1):(VD(l+1),r[l]=c),l++),u++;return l},KD=Ew,qD=W,YD=KD,XD=_t,JD=Et,QD=Rt,ZD=Cl;qD({target:"Array",proto:!0},{flatMap:function(i){var e=JD(this),t=QD(e),n;return XD(i),n=ZD(e,0),n.length=YD(n,e,e,t,0,1,i,arguments.length>1?arguments[1]:void 0),n}});var eN=rt;eN("Array","flatMap");var tN=ze,ng=At,rN=rf,Sw=function(r,i,e){var t,n;ng(r);try{if(t=rN(r,"return"),!t){if(i==="throw")throw e;return e}t=tN(t,r)}catch(a){n=!0,t=a}if(i==="throw")throw e;if(n)throw t;return ng(t),e},nN=At,iN=Sw,aN=function(r,i,e,t){try{return t?i(nN(e)[0],e[1]):i(e)}catch(n){iN(r,"throw",n)}},oN=me,sN=Yi,lN=oN("iterator"),uN=Array.prototype,Ow=function(r){return r!==void 0&&(sN.Array===r||uN[lN]===r)},dN=xr,ig=rf,cN=Li,hN=Yi,fN=me,vN=fN("iterator"),Ul=function(r){if(!cN(r))return ig(r,vN)||ig(r,"@@iterator")||hN[dN(r)]},pN=ze,gN=_t,yN=At,mN=Wi,bN=Ul,$N=TypeError,wf=function(r,i){var e=arguments.length<2?bN(r):i;if(gN(e))return yN(pN(e,r));throw new $N(mN(r)+" is not iterable")},wN=tn,_N=ze,EN=Et,SN=aN,ON=Ow,TN=xl,kN=Rt,ag=Vi,IN=wf,PN=Ul,og=Array,xN=function(i){var e=EN(i),t=TN(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=wN(a,n>2?arguments[2]:void 0));var s=PN(e),l=0,u,d,c,h,f,v;if(s&&!(this===og&&ON(s)))for(h=IN(e,s),f=h.next,d=t?new this:[];!(c=_N(f,h)).done;l++)v=o?SN(h,a,[c.value,l],!0):c.value,ag(d,l,v);else for(u=kN(e),d=t?new this(u):og(u);u>l;l++)v=o?a(e[l],l):e[l],ag(d,l,v);return d.length=l,d},CN=me,Tw=CN("iterator"),kw=!1;try{var AN=0,sg={next:function(){return{done:!!AN++}},return:function(){kw=!0}};sg[Tw]=function(){return this},Array.from(sg,function(){throw 2})}catch{}var Iw=function(r,i){try{if(!i&&!kw)return!1}catch{return!1}var e=!1;try{var t={};t[Tw]=function(){return{next:function(){return{done:e=!0}}}},r(t)}catch{}return e},RN=W,MN=xN,DN=Iw,NN=!DN(function(r){Array.from(r)});RN({target:"Array",stat:!0,forced:NN},{from:MN});var FN=ge,BN=FN.Array.from,jN=BN,Pw=jN,LN=Pw,_f=K(LN),zN=Ul,HN=zN,WN=HN,UN=WN,VN=UN,GN=VN,KN=GN,qN=KN,xw=qN,Cw=K(xw),YN=xw,Ef=K(YN),XN=W,JN=rn;XN({target:"Array",stat:!0},{isArray:JN});var QN=ge,ZN=QN.Array.isArray,e2=ZN,Aw=e2,t2=Aw,r2=t2,n2=r2,i2=n2,a2=i2,Rw=K(a2);function o2(r){if(Rw(r))return r}var s2=Le,l2=rn,u2=TypeError,d2=Object.getOwnPropertyDescriptor,c2=s2&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}(),Mw=c2?function(r,i){if(l2(r)&&!d2(r,"length").writable)throw new u2("Cannot set read only .length");return r.length=i}:function(r,i){return r.length=i},h2=W,f2=Et,v2=Rt,p2=Mw,g2=Pl,y2=ae,m2=y2(function(){return[].push.call({length:4294967296},1)!==4294967297}),b2=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(r){return r instanceof TypeError}},$2=m2||!b2();h2({target:"Array",proto:!0,arity:1,forced:$2},{push:function(i){var e=f2(this),t=v2(e),n=arguments.length;g2(t+n);for(var a=0;ar.length)&&(i=r.length);for(var e=0,t=new Array(i);e1?arguments[1]:void 0)},XF=W,dg=YF;XF({target:"Array",proto:!0,forced:[].forEach!==dg},{forEach:dg});var JF=rt,QF=JF("Array","forEach"),ZF=QF,eB=ZF,tB=xr,rB=Ne,nB=De,iB=eB,od=Array.prototype,aB={DOMTokenList:!0,NodeList:!0},zw=function(r){var i=r.forEach;return r===od||nB(od,r)&&i===od.forEach||rB(aB,tB(r))?iB:i},oB=zw,Tn=K(oB),sB=W,lB=ve,uB=rn,dB=lB([].reverse),cg=[1,2];sB({target:"Array",proto:!0,forced:String(cg)===String(cg.reverse())},{reverse:function(){return uB(this)&&(this.length=this.length),dB(this)}});var cB=rt,hB=cB("Array","reverse"),fB=De,vB=hB,sd=Array.prototype,pB=function(r){var i=r.reverse;return r===sd||fB(sd,r)&&i===sd.reverse?vB:i},gB=pB,Hw=gB,yB=Hw,mB=K(yB),hg=Wi,bB=TypeError,Ww=function(r,i){if(!delete r[i])throw new bB("Cannot delete property "+hg(i)+" of "+hg(r))},$B=W,wB=Et,_B=Rl,EB=Il,SB=Rt,OB=Mw,TB=Pl,kB=Cl,IB=Vi,ld=Ww,PB=to,xB=PB("splice"),CB=Math.max,AB=Math.min;$B({target:"Array",proto:!0,forced:!xB},{splice:function(i,e){var t=wB(this),n=SB(t),a=_B(i,n),o=arguments.length,s,l,u,d,c,h;for(o===0?s=l=0:o===1?(s=0,l=n-a):(s=o-2,l=AB(CB(EB(e),0),n-a)),TB(n+s-l),u=kB(t,l),d=0;dn-l+s;d--)ld(t,d-1)}else if(s>l)for(d=n-l;d>a;d--)c=d+l-1,h=d+s-1,c in t?t[h]=t[c]:ld(t,h);for(d=0;da;)for(var l=KB(arguments[a++]),u=o?qB(dd(l),o(l)):dd(l),d=u.length,c=0,h;d>c;)h=u[c++],(!fg||HB(s,l,h))&&(t[h]=l[h]);return t}:Zn,XB=W,pg=YB;XB({target:"Object",stat:!0,arity:2,forced:Object.assign!==pg},{assign:pg});var JB=ge,QB=JB.Object.assign,ZB=QB,ej=ZB,tj=ej,rj=K(tj),nj=W,ij=ae,aj=Et,Vw=zl,oj=rw,sj=ij(function(){Vw(1)});nj({target:"Object",stat:!0,forced:sj,sham:!oj},{getPrototypeOf:function(i){return Vw(aj(i))}});var lj=ge,uj=lj.Object.getPrototypeOf,dj=uj,cj=dj,hj=W,fj=Le,vj=Bn;hj({target:"Object",stat:!0,sham:!fj},{create:vj});var pj=ge,gj=pj.Object,yj=function(i,e){return gj.create(i,e)},mj=yj,Gw=mj,bj=Gw,$j=K(bj),th=ge,wj=ji;th.JSON||(th.JSON={stringify:JSON.stringify});var _j=function(i,e,t){return wj(th.JSON.stringify,null,arguments)},Ej=_j,Sj=Ej,Oj=Sj,Tj=K(Oj),kj=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",Ij=TypeError,Kw=function(r,i){if(re,o=xj(t)?t:Dj(t),s=a?Rj(arguments,e):[],l=a?function(){Pj(o,this,s)}:o;return i?r(l,n):r(l)}:r},Fj=W,Xw=pe,Bj=Yw,gg=Bj(Xw.setInterval,!0);Fj({global:!0,bind:!0,forced:Xw.setInterval!==gg},{setInterval:gg});var jj=W,Jw=pe,Lj=Yw,yg=Lj(Jw.setTimeout,!0);jj({global:!0,bind:!0,forced:Jw.setTimeout!==yg},{setTimeout:yg});var zj=ge,Hj=zj.setTimeout,Wj=Hj,Uj=K(Wj),Qw={exports:{}};(function(r){function i(t){if(t)return e(t);this._callbacks=new Map}function e(t){return Object.assign(t,i.prototype),t._callbacks=new Map,t}i.prototype.on=function(t,n){const a=this._callbacks.get(t)??[];return a.push(n),this._callbacks.set(t,a),this},i.prototype.once=function(t,n){const a=(...o)=>{this.off(t,a),n.apply(this,o)};return a.fn=n,this.on(t,a),this},i.prototype.off=function(t,n){if(t===void 0&&n===void 0)return this._callbacks.clear(),this;if(n===void 0)return this._callbacks.delete(t),this;const a=this._callbacks.get(t);if(a){for(const[o,s]of a.entries())if(s===n||s.fn===n){a.splice(o,1);break}a.length===0?this._callbacks.delete(t):this._callbacks.set(t,a)}return this},i.prototype.emit=function(t,...n){const a=this._callbacks.get(t);if(a){const o=[...a];for(const s of o)s.apply(this,n)}return this},i.prototype.listeners=function(t){return this._callbacks.get(t)??[]},i.prototype.listenerCount=function(t){if(t)return this.listeners(t).length;let n=0;for(const a of this._callbacks.values())n+=a.length;return n},i.prototype.hasListeners=function(t){return this.listenerCount(t)>0},i.prototype.addEventListener=i.prototype.on,i.prototype.removeListener=i.prototype.off,i.prototype.removeEventListener=i.prototype.off,i.prototype.removeAllListeners=i.prototype.off,r.exports=i})(Qw);var Vj=Qw.exports,Gj=K(Vj);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 + * http://naver.github.io/egjs + * + * Forked By Naver egjs + * Copyright (c) hammerjs + * Licensed under the MIT license */function Qt(){return Qt=Object.assign||function(r){for(var i=1;i"u"?{style:{}}:document.createElement("div"),qj="function",ci=Math.round,In=Math.abs,Tf=Date.now;function ql(r,i){for(var e,t,n=i[0].toUpperCase()+i.slice(1),a=0;a"u"?yr={}:yr=window;var Zw=ql(Kj.style,"touchAction"),e0=Zw!==void 0;function Yj(){if(!e0)return!1;var r={},i=yr.CSS&&yr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return r[e]=i?yr.CSS.supports("touch-action",e):!0}),r}var t0="compute",r0="auto",nh="manipulation",mn="none",Ba="pan-x",ja="pan-y",ns=Yj(),Xj=/mobile|tablet|ip(ad|hone|od)|android/i,n0="ontouchstart"in yr,Jj=ql(yr,"PointerEvent")!==void 0,Qj=n0&&Xj.test(navigator.userAgent),ho="touch",Zj="pen",kf="mouse",eL="kinect",tL=25,lt=1,Ln=2,Ae=4,$t=8,el=1,fo=2,vo=4,po=8,Ii=16,sr=fo|vo,bn=po|Ii,i0=sr|bn,a0=["x","y"],tl=["clientX","clientY"];function mr(r,i,e){var t;if(r)if(r.forEach)r.forEach(i,e);else if(r.length!==void 0)for(t=0;t-1}function rL(r){if(fn(r,mn))return mn;var i=fn(r,Ba),e=fn(r,ja);return i&&e?mn:i||e?i?Ba:ja:fn(r,nh)?nh:r0}var o0=function(){function r(e,t){this.manager=e,this.set(t)}var i=r.prototype;return i.set=function(t){t===t0&&(t=this.compute()),e0&&this.manager.element.style&&ns[t]&&(this.manager.element.style[Zw]=t),this.actions=t.toLowerCase().trim()},i.update=function(){this.set(this.manager.options.touchAction)},i.compute=function(){var t=[];return mr(this.manager.recognizers,function(n){Yl(n.options.enable,[n])&&(t=t.concat(n.getTouchAction()))}),rL(t.join(" "))},i.preventDefaults=function(t){var n=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=fn(o,mn)&&!ns[mn],l=fn(o,ja)&&!ns[ja],u=fn(o,Ba)&&!ns[Ba];if(s){var d=t.pointers.length===1,c=t.distance<2,h=t.deltaTime<250;if(d&&c&&h)return}if(!(u&&l)&&(s||l&&a&sr||u&&a&bn))return this.preventSrc(n)},i.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},r}();function If(r,i){for(;r;){if(r===i)return!0;r=r.parentNode}return!1}function s0(r){var i=r.length;if(i===1)return{x:ci(r[0].clientX),y:ci(r[0].clientY)};for(var e=0,t=0,n=0;n=In(i)?r<0?fo:vo:i<0?po:Ii}function nL(r,i){var e=i.center,t=r.offsetDelta||{},n=r.prevDelta||{},a=r.prevInput||{};(i.eventType===lt||a.eventType===Ae)&&(n=r.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=r.offsetDelta={x:e.x,y:e.y}),i.deltaX=n.x+(e.x-t.x),i.deltaY=n.y+(e.y-t.y)}function u0(r,i,e){return{x:i/r||0,y:e/r||0}}function iL(r,i){return rl(i[0],i[1],tl)/rl(r[0],r[1],tl)}function aL(r,i){return ih(i[1],i[0],tl)+ih(r[1],r[0],tl)}function oL(r,i){var e=r.lastInterval||i,t=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==$t&&(t>tL||e.velocity===void 0)){var l=i.deltaX-e.deltaX,u=i.deltaY-e.deltaY,d=u0(t,l,u);a=d.x,o=d.y,n=In(d.x)>In(d.y)?d.x:d.y,s=l0(l,u),r.lastInterval=i}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;i.velocity=n,i.velocityX=a,i.velocityY=o,i.direction=s}function sL(r,i){var e=r.session,t=i.pointers,n=t.length;e.firstInput||(e.firstInput=bg(i)),n>1&&!e.firstMultiple?e.firstMultiple=bg(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,l=i.center=s0(t);i.timeStamp=Tf(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=ih(s,l),i.distance=rl(s,l),nL(e,i),i.offsetDirection=l0(i.deltaX,i.deltaY);var u=u0(i.deltaTime,i.deltaX,i.deltaY);i.overallVelocityX=u.x,i.overallVelocityY=u.y,i.overallVelocity=In(u.x)>In(u.y)?u.x:u.y,i.scale=o?iL(o.pointers,t):1,i.rotation=o?aL(o.pointers,t):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,oL(e,i);var d=r.element,c=i.srcEvent,h;c.composedPath?h=c.composedPath()[0]:c.path?h=c.path[0]:h=c.target,If(h,d)&&(d=h),i.target=d}function lL(r,i,e){var t=e.pointers.length,n=e.changedPointers.length,a=i<&&t-n===0,o=i&(Ae|$t)&&t-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(r.session={}),e.eventType=i,sL(r,e),r.emit("hammer.input",e),r.recognize(e),r.session.prevInput=e}function La(r){return r.trim().split(/\s+/g)}function Sa(r,i,e){mr(La(i),function(t){r.addEventListener(t,e,!1)})}function Oa(r,i,e){mr(La(i),function(t){r.removeEventListener(t,e,!1)})}function $g(r){var i=r.ownerDocument||r;return i.defaultView||i.parentWindow||window}var Xi=function(){function r(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){Yl(e.options.enable,[e])&&n.handler(a)},this.init()}var i=r.prototype;return i.handler=function(){},i.init=function(){this.evEl&&Sa(this.element,this.evEl,this.domHandler),this.evTarget&&Sa(this.target,this.evTarget,this.domHandler),this.evWin&&Sa($g(this.element),this.evWin,this.domHandler)},i.destroy=function(){this.evEl&&Oa(this.element,this.evEl,this.domHandler),this.evTarget&&Oa(this.target,this.evTarget,this.domHandler),this.evWin&&Oa($g(this.element),this.evWin,this.domHandler)},r}();function Pn(r,i,e){if(r.indexOf&&!e)return r.indexOf(i);for(var t=0;tl[i]}):t=t.sort()),t}var cL={touchstart:lt,touchmove:Ln,touchend:Ae,touchcancel:$t},hL="touchstart touchmove touchend touchcancel",xf=function(r){Ht(i,r);function i(){var t;return i.prototype.evTarget=hL,t=r.apply(this,arguments)||this,t.targetIds={},t}var e=i.prototype;return e.handler=function(n){var a=cL[n.type],o=fL.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:ho,srcEvent:n})},i}(Xi);function fL(r,i){var e=za(r.touches),t=this.targetIds;if(i&(lt|Ln)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var n,a,o=za(r.changedTouches),s=[],l=this.target;if(a=e.filter(function(u){return If(u.target,l)}),i===lt)for(n=0;n-1&&n.splice(s,1)};setTimeout(a,yL)}}function mL(r,i){r<?(this.primaryTouch=i.changedPointers[0].identifier,_g.call(this,i)):r&(Ae|$t)&&_g.call(this,i)}function bL(r){for(var i=r.srcEvent.clientX,e=r.srcEvent.clientY,t=0;t-1&&this.requireFail.splice(n,1),this},i.hasRequireFailures=function(){return this.requireFail.length>0},i.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},i.emit=function(t){var n=this,a=this.state;function o(s){n.manager.emit(s,t)}a=Ur&&o(n.options.event+Eg(a))},i.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=ir},i.canEmit=function(){for(var t=0;ta.threshold&&l&a.direction},e.attrTest=function(n){return xi.prototype.attrTest.call(this,n)&&(this.state&Lt||!(this.state&Lt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=v0(n.direction);a&&(n.additionalEvent=this.options.event+a),r.prototype.emit.call(this,n)},i}(xi),p0=function(r){Ht(i,r);function i(t){return t===void 0&&(t={}),r.call(this,Qt({event:"swipe",threshold:10,velocity:.3,direction:sr|bn,pointers:1},t))||this}var e=i.prototype;return e.getTouchAction=function(){return Af.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(sr|bn)?o=n.overallVelocity:a&sr?o=n.overallVelocityX:a&bn&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&In(o)>this.options.velocity&&n.eventType&Ae},e.emit=function(n){var a=v0(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(xi),g0=function(r){Ht(i,r);function i(t){return t===void 0&&(t={}),r.call(this,Qt({event:"pinch",threshold:0,pointers:2},t))||this}var e=i.prototype;return e.getTouchAction=function(){return[mn]},e.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&Lt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}r.prototype.emit.call(this,n)},i}(xi),y0=function(r){Ht(i,r);function i(t){return t===void 0&&(t={}),r.call(this,Qt({event:"rotate",threshold:0,pointers:2},t))||this}var e=i.prototype;return e.getTouchAction=function(){return[mn]},e.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&Lt)},i}(xi),m0=function(r){Ht(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,Qt({event:"press",pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var e=i.prototype;return e.getTouchAction=function(){return[r0]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,l=n.distanceo.time;if(this._input=n,!l||!s||n.eventType&(Ae|$t)&&!u)this.reset();else if(n.eventType<)this.reset(),this._timer=setTimeout(function(){a.state=br,a.tryEmit()},o.time);else if(n.eventType&Ae)return br;return ir},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===br&&(n&&n.eventType&Ae?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Tf(),this.manager.emit(this.options.event,this._input)))},i}(go),b0={domEvents:!1,touchAction:t0,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Sg=[[y0,{enable:!1}],[g0,{enable:!1},["rotate"]],[p0,{direction:sr}],[Af,{direction:sr},["swipe"]],[ah],[ah,{event:"doubletap",taps:2},["tap"]],[m0]],EL=1,Og=2;function Tg(r,i){var e=r.element;if(e.style){var t;mr(r.options.cssProps,function(n,a){t=ql(e.style,a),i?(r.oldCssProps[t]=e.style[t],e.style[t]=n):e.style[t]=r.oldCssProps[t]||""}),i||(r.oldCssProps={})}}function SL(r,i){var e=document.createEvent("Event");e.initEvent(r,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var kg=function(){function r(e,t){var n=this;this.options=kn({},b0,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=$L(this),this.touchAction=new o0(this,this.options.touchAction),Tg(this,!0),mr(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var i=r.prototype;return i.set=function(t){return kn(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},i.stop=function(t){this.session.stopped=t?Og:EL},i.recognize=function(t){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&br)&&(n.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,t,a),r.apply(this,arguments)}}var w0=$0(function(r,i,e){for(var t=Object.keys(i),n=0;n=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},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 ML(r,i){var e;if(r){if(typeof r=="string")return Pg(r,i);var t=Kl(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return _f(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Pg(r,i)}}function Pg(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e1?e-1:0),n=1;n2){var t;return nl.apply(void 0,Gl(t=[S0(i[0],i[1])]).call(t,gt(Kl(i).call(i,2))))}var n=i[0],a=i[1];if(n instanceof Date&&a instanceof Date)return n.setTime(a.getTime()),n;var o=_0(DF(a)),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;Object.prototype.propertyIsEnumerable.call(a,l)&&(a[l]===E0?delete n[l]:n[l]!==null&&a[l]!==null&&typeof n[l]=="object"&&typeof a[l]=="object"&&!xt(n[l])&&!xt(a[l])?n[l]=nl(n[l],a[l]):n[l]=O0(a[l]))}}catch(u){o.e(u)}finally{o.f()}return n}function O0(r){return xt(r)?Kt(r).call(r,function(i){return O0(i)}):typeof r=="object"&&r!==null?r instanceof Date?new Date(r.getTime()):nl({},r):r}function T0(r){for(var i=0,e=Of(r);io;)l=t(e,s=n[o++]),l!==void 0&&$z(a,s,l);return a}});var wz=ge,_z=wz.Object.getOwnPropertyDescriptors,Ez=_z,Sz=Ez,Oz=Sz,Mg=K(Oz),N0={exports:{}},Tz=W,kz=Le,Dg=Al.f;Tz({target:"Object",stat:!0,forced:Object.defineProperties!==Dg,sham:!kz},{defineProperties:Dg});var Iz=ge,F0=Iz.Object,Pz=N0.exports=function(i,e){return F0.defineProperties(i,e)};F0.defineProperties.sham&&(Pz.sham=!0);var xz=N0.exports,Cz=xz,Az=Cz,Rz=Az,Mz=K(Rz),Dz=p1,Nz=K(Dz);function B0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var Fz=Gw,Bz=Fz,jz=Bz,Lz=jz,j0=Lz,zz=K(j0),Hz=W,Wz=aw;Hz({target:"Object",stat:!0},{setPrototypeOf:Wz});var Uz=ge,Vz=Uz.Object.setPrototypeOf,Gz=Vz,Kz=Gz,qz=Kz,Yz=qz,Xz=Yz,Jz=Xz,L0=Jz,oh=K(L0),Qz=ww,Zz=Qz,e3=Zz,t3=e3,r3=t3,z0=K(r3);function sh(r,i){var e;return sh=oh?z0(e=oh).call(e):function(n,a){return n.__proto__=a,n},sh(r,i)}function n3(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=zz(i.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),kl(r,"prototype",{writable:!1}),sh(r,i)}function i3(r,i){if(i&&(ki(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return B0(r)}var a3=cj,o3=a3,s3=o3,l3=s3,H0=l3,Ng=K(H0);function il(r){var i;return il=oh?z0(i=Ng).call(i):function(t){return t.__proto__||Ng(t)},il(r)}var W0={exports:{}},U0={exports:{}};(function(r){var i=bf,e=gw;function t(n){"@babel/helpers - typeof";return r.exports=t=typeof i=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof i=="function"&&a.constructor===i&&a!==i.prototype?"symbol":typeof a},r.exports.__esModule=!0,r.exports.default=r.exports,t(n)}r.exports=t,r.exports.__esModule=!0,r.exports.default=r.exports})(U0);var u3=U0.exports,d3=zw,c3=d3,h3=c3,f3=h3,v3=f3,Fg=Ne,p3=Sf,g3=Dn,y3=St,m3=function(r,i,e){for(var t=p3(i),n=y3.f,a=g3.f,o=0;oc;c++)if(f=y(r[c]),f&&jg(zg,f))return f;return new Ns(!1)}u=L3(r,d)}for(v=a?r.next:u.next;!(p=D3(v,u)).done;){try{f=y(p.value)}catch(m){Lg(u,"throw",m)}if(typeof f=="object"&&f&&jg(zg,f))return f}return new Ns(!1)},W3=Fn,U3=function(r,i){return r===void 0?arguments.length<2?"":i:W3(r)},V3=W,G3=De,K3=zl,al=aw,q3=m3,K0=Bn,hd=Pr,fd=Nn,Y3=w3,X3=R3,J3=zn,Q3=U3,Z3=me,e5=Z3("toStringTag"),ol=Error,t5=[].push,Ci=function(i,e){var t=G3(vd,this),n;al?n=al(new ol,t?K3(this):vd):(n=t?this:K0(vd),hd(n,e5,"Error")),e!==void 0&&hd(n,"message",Q3(e)),X3(n,Ci,n.stack,1),arguments.length>2&&Y3(n,arguments[2]);var a=[];return J3(i,t5,{that:a}),hd(n,"errors",a),n};al?al(Ci,ol):q3(Ci,ol,{name:!0});var vd=Ci.prototype=K0(ol.prototype,{constructor:fd(1,Ci),message:fd(1,""),name:fd(1,"AggregateError")});V3({global:!0,constructor:!0,arity:2},{AggregateError:Ci});var r5=dt,n5=df,i5=me,a5=Le,Hg=i5("species"),q0=function(r){var i=r5(r);a5&&i&&!i[Hg]&&n5(i,Hg,{configurable:!0,get:function(){return this}})},o5=De,s5=TypeError,Mf=function(r,i){if(o5(i,r))return r;throw new s5("Incorrect invocation")},Wg=At,l5=k0,u5=Li,d5=me,c5=d5("species"),Y0=function(r,i){var e=Wg(r).constructor,t;return e===void 0||u5(t=Wg(e)[c5])?i:l5(t)},h5=en,X0=/(?:ipad|iphone|ipod).*applewebkit/i.test(h5),Ct=pe,f5=ji,v5=tn,Ug=we,p5=Ne,J0=ae,Vg=O1,g5=lo,Gg=af,y5=Kw,m5=X0,b5=co,lh=Ct.setImmediate,uh=Ct.clearImmediate,$5=Ct.process,pd=Ct.Dispatch,w5=Ct.Function,Kg=Ct.MessageChannel,_5=Ct.String,gd=0,Ta={},qg="onreadystatechange",Wa,dn,yd,md;J0(function(){Wa=Ct.location});var Df=function(r){if(p5(Ta,r)){var i=Ta[r];delete Ta[r],i()}},bd=function(r){return function(){Df(r)}},Yg=function(r){Df(r.data)},Xg=function(r){Ct.postMessage(_5(r),Wa.protocol+"//"+Wa.host)};(!lh||!uh)&&(lh=function(i){y5(arguments.length,1);var e=Ug(i)?i:w5(i),t=g5(arguments,1);return Ta[++gd]=function(){f5(e,void 0,t)},dn(gd),gd},uh=function(i){delete Ta[i]},b5?dn=function(r){$5.nextTick(bd(r))}:pd&&pd.now?dn=function(r){pd.now(bd(r))}:Kg&&!m5?(yd=new Kg,md=yd.port2,yd.port1.onmessage=Yg,dn=v5(md.postMessage,md)):Ct.addEventListener&&Ug(Ct.postMessage)&&!Ct.importScripts&&Wa&&Wa.protocol!=="file:"&&!J0(Xg)?(dn=Xg,Ct.addEventListener("message",Yg,!1)):qg in Gg("script")?dn=function(r){Vg.appendChild(Gg("script"))[qg]=function(){Vg.removeChild(this),Df(r)}}:dn=function(r){setTimeout(bd(r),0)});var Q0={set:lh,clear:uh},Z0=function(){this.head=null,this.tail=null};Z0.prototype={add:function(r){var i={item:r,next:null},e=this.tail;e?e.next=i:this.head=i,this.tail=i},get:function(){var r=this.head;if(r){var i=this.head=r.next;return i===null&&(this.tail=null),r.item}}};var e_=Z0,E5=en,S5=/ipad|iphone|ipod/i.test(E5)&&typeof Pebble<"u",O5=en,T5=/web0s(?!.*chrome)/i.test(O5),xn=pe,Jg=tn,k5=Dn.f,$d=Q0.set,I5=e_,P5=X0,x5=S5,C5=T5,wd=co,Qg=xn.MutationObserver||xn.WebKitMutationObserver,Zg=xn.document,ey=xn.process,as=xn.Promise,ty=k5(xn,"queueMicrotask"),dh=ty&&ty.value,ei,_d,Ed,os,ry;if(!dh){var ss=new I5,ls=function(){var r,i;for(wd&&(r=ey.domain)&&r.exit();i=ss.get();)try{i()}catch(e){throw ss.head&&ei(),e}r&&r.enter()};!P5&&!wd&&!C5&&Qg&&Zg?(_d=!0,Ed=Zg.createTextNode(""),new Qg(ls).observe(Ed,{characterData:!0}),ei=function(){Ed.data=_d=!_d}):!x5&&as&&as.resolve?(os=as.resolve(void 0),os.constructor=as,ry=Jg(os.then,os),ei=function(){ry(ls)}):wd?ei=function(){ey.nextTick(ls)}:($d=Jg($d,xn),ei=function(){$d(ls)}),dh=function(r){ss.head||ei(),ss.add(r)}}var A5=dh,R5=function(r,i){try{arguments.length===1?console.error(r):console.error(r,i)}catch{}},Ji=function(r){try{return{error:!1,value:r()}}catch(i){return{error:!0,value:i}}},M5=pe,Qi=M5.Promise,t_=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",D5=t_,N5=co,F5=!D5&&!N5&&typeof window=="object"&&typeof document=="object",B5=pe,ka=Qi,j5=we,L5=h1,z5=m1,H5=me,W5=F5,U5=t_,Sd=zi,ny=ka&&ka.prototype,V5=H5("species"),ch=!1,r_=j5(B5.PromiseRejectionEvent),G5=L5("Promise",function(){var r=z5(ka),i=r!==String(ka);if(!i&&Sd===66||!(ny.catch&&ny.finally))return!0;if(!Sd||Sd<51||!/native code/.test(r)){var e=new ka(function(a){a(1)}),t=function(a){a(function(){},function(){})},n=e.constructor={};if(n[V5]=t,ch=e.then(function(){})instanceof t,!ch)return!0}return!i&&(W5||U5)&&!r_}),yo={CONSTRUCTOR:G5,REJECTION_EVENT:r_,SUBCLASSING:ch},cr={},iy=_t,K5=TypeError,q5=function(r){var i,e;this.promise=new r(function(t,n){if(i!==void 0||e!==void 0)throw new K5("Bad Promise constructor");i=t,e=n}),this.resolve=iy(i),this.reject=iy(e)};cr.f=function(r){return new q5(r)};var Y5=W,sl=co,Yr=pe,mo=ze,X5=Gi,J5=jn,Q5=q0,Z5=_t,hh=we,e4=Je,t4=Mf,r4=Y0,n_=Q0.set,Nf=A5,n4=R5,i4=Ji,a4=e_,i_=Ki,fh=Qi,a_=yo,o_=cr,Xl="Promise",s_=a_.CONSTRUCTOR,o4=a_.REJECTION_EVENT,Od=i_.getterFor(Xl),s4=i_.set,l4=fh&&fh.prototype,fi=fh,Td=l4,l_=Yr.TypeError,vh=Yr.document,Ff=Yr.process,ph=o_.f,u4=ph,d4=!!(vh&&vh.createEvent&&Yr.dispatchEvent),u_="unhandledrejection",c4="rejectionhandled",ay=0,d_=1,h4=2,Bf=1,c_=2,us,oy,f4,h_=function(r){var i;return e4(r)&&hh(i=r.then)?i:!1},f_=function(r,i){var e=i.value,t=i.state===d_,n=t?r.ok:r.fail,a=r.resolve,o=r.reject,s=r.domain,l,u,d;try{n?(t||(i.rejection===c_&&p4(i),i.rejection=Bf),n===!0?l=e:(s&&s.enter(),l=n(e),s&&(s.exit(),d=!0)),l===r.promise?o(new l_("Promise-chain cycle")):(u=h_(l))?mo(u,l,a,o):a(l)):o(e)}catch(c){s&&!d&&s.exit(),o(c)}},v_=function(r,i){r.notified||(r.notified=!0,Nf(function(){for(var e=r.reactions,t;t=e.get();)f_(t,r);r.notified=!1,i&&!r.rejection&&v4(r)}))},p_=function(r,i,e){var t,n;d4?(t=vh.createEvent("Event"),t.promise=i,t.reason=e,t.initEvent(r,!1,!0),Yr.dispatchEvent(t)):t={promise:i,reason:e},!o4&&(n=Yr["on"+r])?n(t):r===u_&&n4("Unhandled promise rejection",e)},v4=function(r){mo(n_,Yr,function(){var i=r.facade,e=r.value,t=sy(r),n;if(t&&(n=i4(function(){sl?Ff.emit("unhandledRejection",e,i):p_(u_,i,e)}),r.rejection=sl||sy(r)?c_:Bf,n.error))throw n.value})},sy=function(r){return r.rejection!==Bf&&!r.parent},p4=function(r){mo(n_,Yr,function(){var i=r.facade;sl?Ff.emit("rejectionHandled",i):p_(c4,i,r.value)})},vi=function(r,i,e){return function(t){r(i,t,e)}},wi=function(r,i,e){r.done||(r.done=!0,e&&(r=e),r.value=i,r.state=h4,v_(r,!0))},gh=function(r,i,e){if(!r.done){r.done=!0,e&&(r=e);try{if(r.facade===i)throw new l_("Promise can't be resolved itself");var t=h_(i);t?Nf(function(){var n={done:!1};try{mo(t,i,vi(gh,n,r),vi(wi,n,r))}catch(a){wi(n,a,r)}}):(r.value=i,r.state=d_,v_(r,!1))}catch(n){wi({done:!1},n,r)}}};s_&&(fi=function(i){t4(this,Td),Z5(i),mo(us,this);var e=Od(this);try{i(vi(gh,e),vi(wi,e))}catch(t){wi(e,t)}},Td=fi.prototype,us=function(i){s4(this,{type:Xl,done:!1,notified:!1,parent:!1,reactions:new a4,rejection:!1,state:ay,value:void 0})},us.prototype=X5(Td,"then",function(i,e){var t=Od(this),n=ph(r4(this,fi));return t.parent=!0,n.ok=hh(i)?i:!0,n.fail=hh(e)&&e,n.domain=sl?Ff.domain:void 0,t.state===ay?t.reactions.add(n):Nf(function(){f_(n,t)}),n.promise}),oy=function(){var r=new us,i=Od(r);this.promise=r,this.resolve=vi(gh,i),this.reject=vi(wi,i)},o_.f=ph=function(r){return r===fi||r===f4?new oy(r):u4(r)});Y5({global:!0,constructor:!0,wrap:!0,forced:s_},{Promise:fi});J5(fi,Xl,!1,!0);Q5(Xl);var g4=Qi,y4=Iw,m4=yo.CONSTRUCTOR,Jl=m4||!y4(function(r){g4.all(r).then(void 0,function(){})}),b4=W,$4=ze,w4=_t,_4=cr,E4=Ji,S4=zn,O4=Jl;b4({target:"Promise",stat:!0,forced:O4},{all:function(i){var e=this,t=_4.f(e),n=t.resolve,a=t.reject,o=E4(function(){var s=w4(e.resolve),l=[],u=0,d=1;S4(i,function(c){var h=u++,f=!1;d++,$4(s,e,c).then(function(v){f||(f=!0,l[h]=v,--d||n(l))},a)}),--d||n(l)});return o.error&&a(o.value),t.promise}});var T4=W,k4=yo.CONSTRUCTOR,ly=Qi;ly&&ly.prototype;T4({target:"Promise",proto:!0,forced:k4,real:!0},{catch:function(r){return this.then(void 0,r)}});var I4=W,P4=ze,x4=_t,C4=cr,A4=Ji,R4=zn,M4=Jl;I4({target:"Promise",stat:!0,forced:M4},{race:function(i){var e=this,t=C4.f(e),n=t.reject,a=A4(function(){var o=x4(e.resolve);R4(i,function(s){P4(o,e,s).then(t.resolve,n)})});return a.error&&n(a.value),t.promise}});var D4=W,N4=ze,F4=cr,B4=yo.CONSTRUCTOR;D4({target:"Promise",stat:!0,forced:B4},{reject:function(i){var e=F4.f(this);return N4(e.reject,void 0,i),e.promise}});var j4=At,L4=Je,z4=cr,g_=function(r,i){if(j4(r),L4(i)&&i.constructor===r)return i;var e=z4.f(r),t=e.resolve;return t(i),e.promise},H4=W,W4=dt,U4=ZT,V4=Qi,G4=yo.CONSTRUCTOR,K4=g_,q4=W4("Promise"),Y4=!G4;H4({target:"Promise",stat:!0,forced:U4},{resolve:function(i){return K4(Y4&&this===q4?V4:this,i)}});var X4=W,J4=ze,Q4=_t,Z4=cr,eH=Ji,tH=zn,rH=Jl;X4({target:"Promise",stat:!0,forced:rH},{allSettled:function(i){var e=this,t=Z4.f(e),n=t.resolve,a=t.reject,o=eH(function(){var s=Q4(e.resolve),l=[],u=0,d=1;tH(i,function(c){var h=u++,f=!1;d++,J4(s,e,c).then(function(v){f||(f=!0,l[h]={status:"fulfilled",value:v},--d||n(l))},function(v){f||(f=!0,l[h]={status:"rejected",reason:v},--d||n(l))})}),--d||n(l)});return o.error&&a(o.value),t.promise}});var nH=W,iH=ze,aH=_t,oH=dt,sH=cr,lH=Ji,uH=zn,dH=Jl,uy="No one promise resolved";nH({target:"Promise",stat:!0,forced:dH},{any:function(i){var e=this,t=oH("AggregateError"),n=sH.f(e),a=n.resolve,o=n.reject,s=lH(function(){var l=aH(e.resolve),u=[],d=0,c=1,h=!1;uH(i,function(f){var v=d++,p=!1;c++,iH(l,e,f).then(function(g){p||h||(h=!0,a(g))},function(g){p||h||(p=!0,u[v]=g,--c||o(new t(u,uy)))})}),--c||o(new t(u,uy))});return s.error&&o(s.value),n.promise}});var cH=W,yh=Qi,hH=ae,fH=dt,vH=we,pH=Y0,dy=g_,gH=yh&&yh.prototype,yH=!!yh&&hH(function(){gH.finally.call({then:function(){}},function(){})});cH({target:"Promise",proto:!0,real:!0,forced:yH},{finally:function(r){var i=pH(this,fH("Promise")),e=vH(r);return this.then(e?function(t){return dy(i,r()).then(function(){return t})}:r,e?function(t){return dy(i,r()).then(function(){throw t})}:r)}});var mH=ge,bH=mH.Promise,$H=bH,wH=$H,_H=W,EH=cr;_H({target:"Promise",stat:!0},{withResolvers:function(){var i=EH.f(this);return{promise:i.promise,resolve:i.resolve,reject:i.reject}}});var SH=wH,OH=SH,TH=W,kH=cr,IH=Ji;TH({target:"Promise",stat:!0,forced:!0},{try:function(r){var i=kH.f(this),e=IH(r);return(e.error?i.reject:i.resolve)(e.value),i.promise}});var PH=OH,xH=PH,CH=xH,AH=Hw,RH=AH,MH=RH,DH=MH,NH=DH;(function(r){var i=u3.default,e=g1,t=bf,n=j0,a=H0,o=v3,s=Dw,l=L0,u=CH,d=NH,c=Fw;function h(){r.exports=h=function(){return v},r.exports.__esModule=!0,r.exports.default=r.exports;var f,v={},p=Object.prototype,g=p.hasOwnProperty,y=e||function(R,I,P){R[I]=P.value},m=typeof t=="function"?t:{},$=m.iterator||"@@iterator",b=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";function O(R,I,P){return e(R,I,{value:P,enumerable:!0,configurable:!0,writable:!0}),R[I]}try{O({},"")}catch{O=function(P,H,Y){return P[H]=Y}}function M(R,I,P,H){var Y=I&&I.prototype instanceof ye?I:ye,q=n(Y.prototype),ke=new It(H||[]);return y(q,"_invoke",{value:Ce(R,P,ke)}),q}function j(R,I,P){try{return{type:"normal",arg:R.call(I,P)}}catch(H){return{type:"throw",arg:H}}}v.wrap=M;var D="suspendedStart",N="suspendedYield",U="executing",J="completed",X={};function ye(){}function Ke(){}function xe(){}var Tt={};O(Tt,$,function(){return this});var nt=a,Qe=nt&&nt(nt(tt([])));Qe&&Qe!==p&&g.call(Qe,$)&&(Tt=Qe);var kt=xe.prototype=ye.prototype=n(Tt);function Ze(R){var I;o(I=["next","throw","return"]).call(I,function(P){O(R,P,function(H){return this._invoke(P,H)})})}function fe(R,I){function P(Y,q,ke,it){var ct=j(R[Y],R,q);if(ct.type!=="throw"){var ln=ct.arg,Ar=ln.value;return Ar&&i(Ar)=="object"&&g.call(Ar,"__await")?I.resolve(Ar.__await).then(function(un){P("next",un,ke,it)},function(un){P("throw",un,ke,it)}):I.resolve(Ar).then(function(un){ln.value=un,ke(ln)},function(un){return P("throw",un,ke,it)})}it(ct.arg)}var H;y(this,"_invoke",{value:function(q,ke){function it(){return new I(function(ct,ln){P(q,ke,ct,ln)})}return H=H?H.then(it,it):it()}})}function Ce(R,I,P){var H=D;return function(Y,q){if(H===U)throw new Error("Generator is already running");if(H===J){if(Y==="throw")throw q;return{value:f,done:!0}}for(P.method=Y,P.arg=q;;){var ke=P.delegate;if(ke){var it=Te(ke,P);if(it){if(it===X)continue;return it}}if(P.method==="next")P.sent=P._sent=P.arg;else if(P.method==="throw"){if(H===D)throw H=J,P.arg;P.dispatchException(P.arg)}else P.method==="return"&&P.abrupt("return",P.arg);H=U;var ct=j(R,I,P);if(ct.type==="normal"){if(H=P.done?J:N,ct.arg===X)continue;return{value:ct.arg,done:P.done}}ct.type==="throw"&&(H=J,P.method="throw",P.arg=ct.arg)}}}function Te(R,I){var P=I.method,H=R.iterator[P];if(H===f)return I.delegate=null,P==="throw"&&R.iterator.return&&(I.method="return",I.arg=f,Te(R,I),I.method==="throw")||P!=="return"&&(I.method="throw",I.arg=new TypeError("The iterator does not provide a '"+P+"' method")),X;var Y=j(H,R.iterator,I.arg);if(Y.type==="throw")return I.method="throw",I.arg=Y.arg,I.delegate=null,X;var q=Y.arg;return q?q.done?(I[R.resultName]=q.value,I.next=R.nextLoc,I.method!=="return"&&(I.method="next",I.arg=f),I.delegate=null,X):q:(I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,X)}function et(R){var I,P={tryLoc:R[0]};1 in R&&(P.catchLoc=R[1]),2 in R&&(P.finallyLoc=R[2],P.afterLoc=R[3]),s(I=this.tryEntries).call(I,P)}function vr(R){var I=R.completion||{};I.type="normal",delete I.arg,R.completion=I}function It(R){this.tryEntries=[{tryLoc:"root"}],o(R).call(R,et,this),this.reset(!0)}function tt(R){if(R||R===""){var I=R[$];if(I)return I.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var P=-1,H=function Y(){for(;++P=0;--Y){var q=this.tryEntries[Y],ke=q.completion;if(q.tryLoc==="root")return H("end");if(q.tryLoc<=this.prev){var it=g.call(q,"catchLoc"),ct=g.call(q,"finallyLoc");if(it&&ct){if(this.prev=0;--H){var Y=this.tryEntries[H];if(Y.tryLoc<=this.prev&&g.call(Y,"finallyLoc")&&this.prev=0;--P){var H=this.tryEntries[P];if(H.finallyLoc===I)return this.complete(H.completion,H.afterLoc),vr(H),X}},catch:function(I){for(var P=this.tryEntries.length-1;P>=0;--P){var H=this.tryEntries[P];if(H.tryLoc===I){var Y=H.completion;if(Y.type==="throw"){var q=Y.arg;vr(H)}return q}}throw new Error("illegal catch attempt")},delegateYield:function(I,P,H){return this.delegate={iterator:tt(I),resultName:P,nextLoc:H},this.method==="next"&&(this.arg=f),X}},v}r.exports=h,r.exports.__esModule=!0,r.exports.default=r.exports})(W0);var FH=W0.exports,Fs=FH(),BH=Fs;try{regeneratorRuntime=Fs}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Fs:Function("r","regeneratorRuntime = r")(Fs)}var ft=K(BH),y_={exports:{}},jH=ae,LH=jH(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}}),zH=ae,HH=Je,WH=Zr,cy=LH,Bs=Object.isExtensible,UH=zH(function(){Bs(1)}),VH=UH||cy?function(i){return!HH(i)||cy&&WH(i)==="ArrayBuffer"?!1:Bs?Bs(i):!0}:Bs,GH=ae,KH=!GH(function(){return Object.isExtensible(Object.preventExtensions({}))}),qH=W,YH=ve,XH=ro,JH=Je,jf=Ne,QH=St.f,hy=no,ZH=uf,Lf=VH,eW=Ol,tW=KH,m_=!1,Tr=eW("meta"),rW=0,zf=function(r){QH(r,Tr,{value:{objectID:"O"+rW++,weakData:{}}})},nW=function(r,i){if(!JH(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!jf(r,Tr)){if(!Lf(r))return"F";if(!i)return"E";zf(r)}return r[Tr].objectID},iW=function(r,i){if(!jf(r,Tr)){if(!Lf(r))return!0;if(!i)return!1;zf(r)}return r[Tr].weakData},aW=function(r){return tW&&m_&&Lf(r)&&!jf(r,Tr)&&zf(r),r},oW=function(){sW.enable=function(){},m_=!0;var r=hy.f,i=YH([].splice),e={};e[Tr]=1,r(e).length&&(hy.f=function(t){for(var n=r(t),a=0,o=n.length;a1?arguments[1]:void 0),f;f=f?f.next:c.first;)for(h(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(d){return!!l(this,d)}}),fy(a,e?{get:function(d){var c=l(this,d);return c&&c.value},set:function(d,c){return s(this,d===0?0:d,c)}}:{add:function(d){return s(this,d=d===0?0:d,d)}}),fa&&kW(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(r,i,e){var t=i+" Iterator",n=kd(i),a=kd(t);AW(r,i,function(o,s){py(this,{type:t,target:o,state:n(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,ds(void 0,!0)):ds(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},e?"entries":"values",!e,!0),RW(i)}},MW=w_,DW=E_;MW("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},DW);var NW=ge,FW=NW.Map,BW=FW,jW=BW,LW=jW,S_=K(LW),zW=W,HW=qi.some,WW=Wl,UW=WW("some");zW({target:"Array",proto:!0,forced:!UW},{some:function(i){return HW(this,i,arguments.length>1?arguments[1]:void 0)}});var VW=rt,GW=VW("Array","some"),KW=De,qW=GW,Id=Array.prototype,YW=function(r){var i=r.some;return r===Id||KW(Id,r)&&i===Id.some?qW:i},XW=YW,JW=XW,QW=JW,ZW=K(QW),e6=rt,t6=e6("Array","keys"),r6=t6,n6=r6,i6=xr,a6=Ne,o6=De,s6=n6,Pd=Array.prototype,l6={DOMTokenList:!0,NodeList:!0},u6=function(r){var i=r.keys;return r===Pd||o6(Pd,r)&&i===Pd.keys||a6(l6,i6(r))?s6:i},d6=u6,ti=K(d6),gy=I1,c6=Math.floor,mh=function(r,i){var e=r.length,t=c6(e/2);return e<8?h6(r,i):f6(r,mh(gy(r,0,t),i),mh(gy(r,t),i),i)},h6=function(r,i){for(var e=r.length,t=1,n,a;t0;)r[a]=r[--a];a!==t++&&(r[a]=n)}return r},f6=function(r,i,e,t){for(var n=i.length,a=e.length,o=0,s=0;o3)){if(k6)return!0;if(Ey)return Ey<603;var r="",i,e,t,n;for(i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)jr.push({k:e+n,v:t})}for(jr.sort(function(a,o){return o.v-a.v}),n=0;n$y(e)?1:-1}};w6({target:"Array",proto:!0,forced:A6},{sort:function(i){i!==void 0&&_6(i);var e=E6(this);if(T_)return i===void 0?Sy(e):Sy(e,i);var t=[],n=by(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=Uj(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,t;Tn(e=Uw(t=this._queue).call(t,0)).call(e,function(n){n.fn.apply(n.context||n.fn,n.args||[])})}}],[{key:"extend",value:function(e,t){var n=new r(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){n.flush()};var a=[{name:"flush",original:void 0}];if(t&&t.replace)for(var o=0;o=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},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 N8(r,i){var e;if(r){if(typeof r=="string")return Iy(r,i);var t=Kl(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return _f(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Iy(r,i)}}function Iy(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);es&&(s=c,o=d)}return o}},{key:"min",value:function(t){var n=Md(this._pairs),a=n.next();if(a.done)return null;for(var o=a.value[1],s=t(a.value[1],a.value[0]);!(a=n.next()).done;){var l=ht(a.value,2),u=l[0],d=l[1],c=t(d,u);c=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},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 F8(r,i){var e;if(r){if(typeof r=="string")return Ay(r,i);var t=Kl(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return _f(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ay(r,i)}}function Ay(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e"u"||!Ds||Ds.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Ds(Boolean,[],function(){})),!0}catch{return!1}}function L8(r,i){return r[i]==null&&(r[i]=g8()),r}var ll=function(r){n3(e,r);var i=B8(e);function e(t,n){var a;return _l(this,e),a=i.call(this),Wr(B0(a),"_queue",null),t&&!xt(t)&&(n=t,t=[]),a._options=n||{},a._data=new S_,a.length=0,a._idProp=a._options.fieldId||"id",t&&t.length&&a.add(t),a.setOptions(n),a}return Hl(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(n){n&&n.queue!==void 0&&(n.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=y8.extend(this,{replace:["add","update","remove"]})),n.queue&&typeof n.queue=="object"&&this._queue.setOptions(n.queue)))}},{key:"add",value:function(n,a){var o=this,s=[],l;if(xt(n)){var u=Kt(n).call(n,function(h){return h[o._idProp]});if(ZW(u).call(u,function(h){return o._data.has(h)}))throw new Error("A duplicate id was found in the parameter array.");for(var d=0,c=n.length;dd?1:us)&&(o=d,s=c)}}catch(h){l.e(h)}finally{l.f()}return o||null}},{key:"min",value:function(n){var a,o=null,s=null,l=Dd(Oy(a=this._data).call(a)),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,c=d[n];typeof c=="number"&&(s==null||c"u"&&wh!==void 0,A_={all:wh,IS_HTMLDDA:Y8},R_=A_,X8=R_.all,He=R_.IS_HTMLDDA?function(r){return typeof r=="function"||r===X8}:function(r){return typeof r=="function"},Zi={},J8=te,We=!J8(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Q8=bo,fs=Function.prototype.call,Mt=Q8?fs.bind(fs):function(){return fs.apply(fs,arguments)},Ql={},M_={}.propertyIsEnumerable,D_=Object.getOwnPropertyDescriptor,Z8=D_&&!M_.call({1:2},1);Ql.f=Z8?function(i){var e=D_(this,i);return!!e&&e.enumerable}:M_;var wo=function(r,i){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:i}},eU=ne,tU=te,rU=Cr,Fd=Object,nU=eU("".split),Zl=tU(function(){return!Fd("z").propertyIsEnumerable(0)})?function(r){return rU(r)==="String"?nU(r,""):Fd(r)}:Fd,ea=function(r){return r==null},iU=ea,aU=TypeError,_o=function(r){if(iU(r))throw new aU("Can't call method on "+r);return r},oU=Zl,sU=_o,hr=function(r){return oU(sU(r))},Dy=He,N_=A_,lU=N_.all,Ue=N_.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:Dy(r)||r===lU}:function(r){return typeof r=="object"?r!==null:Dy(r)},re={},Bd=re,jd=Ee,uU=He,Ny=function(r){return uU(r)?r:void 0},Wt=function(r,i){return arguments.length<2?Ny(Bd[r])||Ny(jd[r]):Bd[r]&&Bd[r][i]||jd[r]&&jd[r][i]},dU=ne,Pe=dU({}.isPrototypeOf),Eo=typeof navigator<"u"&&String(navigator.userAgent)||"",F_=Ee,Ld=Eo,Fy=F_.process,By=F_.Deno,jy=Fy&&Fy.versions||By&&By.version,Ly=jy&&jy.v8,qt,ul;Ly&&(qt=Ly.split("."),ul=qt[0]>0&&qt[0]<4?1:+(qt[0]+qt[1]));!ul&&Ld&&(qt=Ld.match(/Edge\/(\d+)/),(!qt||qt[1]>=74)&&(qt=Ld.match(/Chrome\/(\d+)/),qt&&(ul=+qt[1])));var So=ul,zy=So,cU=te,hU=Ee,fU=hU.String,ta=!!Object.getOwnPropertySymbols&&!cU(function(){var r=Symbol("symbol detection");return!fU(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&zy&&zy<41}),vU=ta,B_=vU&&!Symbol.sham&&typeof Symbol.iterator=="symbol",pU=Wt,gU=He,yU=Pe,mU=B_,bU=Object,Oo=mU?function(r){return typeof r=="symbol"}:function(r){var i=pU("Symbol");return gU(i)&&yU(i.prototype,bU(r))},$U=String,ra=function(r){try{return $U(r)}catch{return"Object"}},wU=He,_U=ra,EU=TypeError,Hn=function(r){if(wU(r))return r;throw new EU(_U(r)+" is not a function")},SU=Hn,OU=ea,Uf=function(r,i){var e=r[i];return OU(e)?void 0:SU(e)},zd=Mt,Hd=He,Wd=Ue,TU=TypeError,kU=function(r,i){var e,t;if(i==="string"&&Hd(e=r.toString)&&!Wd(t=zd(e,r))||Hd(e=r.valueOf)&&!Wd(t=zd(e,r))||i!=="string"&&Hd(e=r.toString)&&!Wd(t=zd(e,r)))return t;throw new TU("Can't convert object to primitive value")},j_={exports:{}},Hy=Ee,IU=Object.defineProperty,PU=function(r,i){try{IU(Hy,r,{value:i,configurable:!0,writable:!0})}catch{Hy[r]=i}return i},xU=Ee,CU=PU,Wy="__core-js_shared__",AU=xU[Wy]||CU(Wy,{}),Vf=AU,Uy=Vf;(j_.exports=function(r,i){return Uy[r]||(Uy[r]=i!==void 0?i:{})})("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 na=j_.exports,RU=_o,MU=Object,Ot=function(r){return MU(RU(r))},DU=ne,NU=Ot,FU=DU({}.hasOwnProperty),Ve=Object.hasOwn||function(i,e){return FU(NU(i),e)},BU=ne,jU=0,LU=Math.random(),zU=BU(1 .toString),eu=function(r){return"Symbol("+(r===void 0?"":r)+")_"+zU(++jU+LU,36)},HU=Ee,WU=na,Vy=Ve,UU=eu,VU=ta,GU=B_,gi=HU.Symbol,Ud=WU("wks"),KU=GU?gi.for||gi:gi&&gi.withoutSetter||UU,Se=function(r){return Vy(Ud,r)||(Ud[r]=VU&&Vy(gi,r)?gi[r]:KU("Symbol."+r)),Ud[r]},qU=Mt,Gy=Ue,Ky=Oo,YU=Uf,XU=kU,JU=Se,QU=TypeError,ZU=JU("toPrimitive"),e9=function(r,i){if(!Gy(r)||Ky(r))return r;var e=YU(r,ZU),t;if(e){if(i===void 0&&(i="default"),t=qU(e,r,i),!Gy(t)||Ky(t))return t;throw new QU("Can't convert object to primitive value")}return i===void 0&&(i="number"),XU(r,i)},t9=e9,r9=Oo,tu=function(r){var i=t9(r,"string");return r9(i)?i:i+""},n9=Ee,qy=Ue,_h=n9.document,i9=qy(_h)&&qy(_h.createElement),L_=function(r){return i9?_h.createElement(r):{}},a9=We,o9=te,s9=L_,z_=!a9&&!o9(function(){return Object.defineProperty(s9("div"),"a",{get:function(){return 7}}).a!==7}),l9=We,u9=Mt,d9=Ql,c9=wo,h9=hr,f9=tu,v9=Ve,p9=z_,Yy=Object.getOwnPropertyDescriptor;Zi.f=l9?Yy:function(i,e){if(i=h9(i),e=f9(e),p9)try{return Yy(i,e)}catch{}if(v9(i,e))return c9(!u9(d9.f,i,e),i[e])};var g9=te,y9=He,m9=/#|\.prototype\./,To=function(r,i){var e=$9[b9(r)];return e===_9?!0:e===w9?!1:y9(i)?g9(i):!!i},b9=To.normalize=function(r){return String(r).replace(m9,".").toLowerCase()},$9=To.data={},w9=To.NATIVE="N",_9=To.POLYFILL="P",E9=To,Xy=Wf,S9=Hn,O9=bo,T9=Xy(Xy.bind),ko=function(r,i){return S9(r),i===void 0?r:O9?T9(r,i):function(){return r.apply(i,arguments)}},Dt={},k9=We,I9=te,H_=k9&&I9(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),P9=Ue,x9=String,C9=TypeError,Nt=function(r){if(P9(r))return r;throw new C9(x9(r)+" is not an object")},A9=We,R9=z_,M9=H_,vs=Nt,Jy=tu,D9=TypeError,Vd=Object.defineProperty,N9=Object.getOwnPropertyDescriptor,Gd="enumerable",Kd="configurable",qd="writable";Dt.f=A9?M9?function(i,e,t){if(vs(i),e=Jy(e),vs(t),typeof i=="function"&&e==="prototype"&&"value"in t&&qd in t&&!t[qd]){var n=N9(i,e);n&&n[qd]&&(i[e]=t.value,t={configurable:Kd in t?t[Kd]:n[Kd],enumerable:Gd in t?t[Gd]:n[Gd],writable:!1})}return Vd(i,e,t)}:Vd:function(i,e,t){if(vs(i),e=Jy(e),vs(t),R9)try{return Vd(i,e,t)}catch{}if("get"in t||"set"in t)throw new D9("Accessors not supported");return"value"in t&&(i[e]=t.value),i};var F9=We,B9=Dt,j9=wo,ia=F9?function(r,i,e){return B9.f(r,i,j9(1,e))}:function(r,i,e){return r[i]=e,r},ps=Ee,L9=$o,z9=Wf,H9=He,W9=Zi.f,U9=E9,ri=re,V9=ko,ni=ia,Qy=Ve,G9=function(r){var i=function(e,t,n){if(this instanceof i){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,n)}return L9(r,this,arguments)};return i.prototype=r.prototype,i},G=function(r,i){var e=r.target,t=r.global,n=r.stat,a=r.proto,o=t?ps:n?ps[e]:(ps[e]||{}).prototype,s=t?ri:ri[e]||ni(ri,e,{})[e],l=s.prototype,u,d,c,h,f,v,p,g,y;for(h in i)u=U9(t?h:e+(n?".":"#")+h,r.forced),d=!u&&o&&Qy(o,h),v=s[h],d&&(r.dontCallGetSet?(y=W9(o,h),p=y&&y.value):p=o[h]),f=d&&p?p:i[h],!(d&&typeof v==typeof f)&&(r.bind&&d?g=V9(f,ps):r.wrap&&d?g=G9(f):a&&H9(f)?g=z9(f):g=f,(r.sham||f&&f.sham||v&&v.sham)&&ni(g,"sham",!0),ni(s,h,g),a&&(c=e+"Prototype",Qy(ri,c)||ni(ri,c,{}),ni(ri[c],h,f),r.real&&l&&(u||!l[h])&&ni(l,h,f)))},K9=Math.ceil,q9=Math.floor,Y9=Math.trunc||function(i){var e=+i;return(e>0?q9:K9)(e)},X9=Y9,ru=function(r){var i=+r;return i!==i||i===0?0:X9(i)},J9=ru,Q9=Math.max,Z9=Math.min,Io=function(r,i){var e=J9(r);return e<0?Q9(e+i,0):Z9(e,i)},eV=ru,tV=Math.min,rV=function(r){return r>0?tV(eV(r),9007199254740991):0},nV=rV,Ut=function(r){return nV(r.length)},iV=hr,aV=Io,oV=Ut,Zy=function(r){return function(i,e,t){var n=iV(i),a=oV(n),o=aV(t,a),s;if(r&&e!==e){for(;a>o;)if(s=n[o++],s!==s)return!0}else for(;a>o;o++)if((r||o in n)&&n[o]===e)return r||o||0;return!r&&-1}},Gf={includes:Zy(!0),indexOf:Zy(!1)},Po={},sV=ne,Yd=Ve,lV=hr,uV=Gf.indexOf,dV=Po,em=sV([].push),W_=function(r,i){var e=lV(r),t=0,n=[],a;for(a in e)!Yd(dV,a)&&Yd(e,a)&&em(n,a);for(;i.length>t;)Yd(e,a=i[t++])&&(~uV(n,a)||em(n,a));return n},Kf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],cV=W_,hV=Kf,nu=Object.keys||function(i){return cV(i,hV)},xo={};xo.f=Object.getOwnPropertySymbols;var tm=We,fV=ne,vV=Mt,pV=te,Xd=nu,gV=xo,yV=Ql,mV=Ot,bV=Zl,ii=Object.assign,rm=Object.defineProperty,$V=fV([].concat),wV=!ii||pV(function(){if(tm&&ii({b:1},ii(rm({},"a",{enumerable:!0,get:function(){rm(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},i={},e=Symbol("assign detection"),t="abcdefghijklmnopqrst";return r[e]=7,t.split("").forEach(function(n){i[n]=n}),ii({},r)[e]!==7||Xd(ii({},i)).join("")!==t})?function(i,e){for(var t=mV(i),n=arguments.length,a=1,o=gV.f,s=yV.f;n>a;)for(var l=bV(arguments[a++]),u=o?$V(Xd(l),o(l)):Xd(l),d=u.length,c=0,h;d>c;)h=u[c++],(!tm||vV(s,l,h))&&(t[h]=l[h]);return t}:ii,_V=G,nm=wV;_V({target:"Object",stat:!0,arity:2,forced:Object.assign!==nm},{assign:nm});var EV=re,SV=EV.Object.assign,OV=SV,TV=OV,kV=TV,Re=z(kV),IV=ne,iu=IV([].slice),U_=ne,PV=Hn,xV=Ue,CV=Ve,im=iu,AV=bo,V_=Function,RV=U_([].concat),MV=U_([].join),Jd={},DV=function(r,i,e){if(!CV(Jd,i)){for(var t=[],n=0;n=.1;)v=+a[c++%o],v>d&&(v=d),f=Math.sqrt(v*v/(1+u*u)),f=s<0?-f:f,i+=f,e+=u*f,h===!0?r.lineTo(i,e):r.moveTo(i,e),d-=v,h=!h}function XV(r,i,e,t){r.beginPath();var n=6,a=Math.PI*2/n;r.moveTo(i+t,e);for(var o=1;o1?e-1:0),n=1;n=a?r?"":void 0:(o=sm(t,n),o<55296||o>56319||n+1===a||(s=sm(t,n+1))<56320||s>57343?r?f7(t,n):o:r?v7(t,n,n+2):(o-55296<<10)+(s-56320)+65536)}},p7={codeAt:lm(!1),charAt:lm(!0)},g7=Ee,y7=He,um=g7.WeakMap,eE=y7(um)&&/native code/.test(String(um)),m7=na,b7=eu,dm=m7("keys"),au=function(r){return dm[r]||(dm[r]=b7(r))},$7=eE,tE=Ee,w7=Ue,_7=ia,Zd=Ve,ec=Vf,E7=au,S7=Po,cm="Object already initialized",Sh=tE.TypeError,O7=tE.WeakMap,dl,Ua,cl,T7=function(r){return cl(r)?Ua(r):dl(r,{})},k7=function(r){return function(i){var e;if(!w7(i)||(e=Ua(i)).type!==r)throw new Sh("Incompatible receiver, "+r+" required");return e}};if($7||ec.state){var rr=ec.state||(ec.state=new O7);rr.get=rr.get,rr.has=rr.has,rr.set=rr.set,dl=function(r,i){if(rr.has(r))throw new Sh(cm);return i.facade=r,rr.set(r,i),i},Ua=function(r){return rr.get(r)||{}},cl=function(r){return rr.has(r)}}else{var ai=E7("state");S7[ai]=!0,dl=function(r,i){if(Zd(r,ai))throw new Sh(cm);return i.facade=r,_7(r,ai,i),i},Ua=function(r){return Zd(r,ai)?r[ai]:{}},cl=function(r){return Zd(r,ai)}}var Un={set:dl,get:Ua,has:cl,enforce:T7,getterFor:k7},Oh=We,I7=Ve,rE=Function.prototype,P7=Oh&&Object.getOwnPropertyDescriptor,Jf=I7(rE,"name"),x7=Jf&&function(){}.name==="something",C7=Jf&&(!Oh||Oh&&P7(rE,"name").configurable),A7={EXISTS:Jf,PROPER:x7,CONFIGURABLE:C7},ou={},R7=We,M7=H_,D7=Dt,N7=Nt,F7=hr,B7=nu;ou.f=R7&&!M7?Object.defineProperties:function(i,e){N7(i);for(var t=F7(e),n=B7(e),a=n.length,o=0,s;a>o;)D7.f(i,s=n[o++],t[s]);return i};var j7=Wt,L7=j7("document","documentElement"),z7=Nt,H7=ou,hm=Kf,W7=Po,U7=L7,V7=L_,G7=au,fm=">",vm="<",Th="prototype",kh="script",nE=G7("IE_PROTO"),tc=function(){},iE=function(r){return vm+kh+fm+r+vm+"/"+kh+fm},pm=function(r){r.write(iE("")),r.close();var i=r.parentWindow.Object;return r=null,i},K7=function(){var r=V7("iframe"),i="java"+kh+":",e;return r.style.display="none",U7.appendChild(r),r.src=String(i),e=r.contentWindow.document,e.open(),e.write(iE("document.F=Object")),e.close(),e.F},gs,Ls=function(){try{gs=new ActiveXObject("htmlfile")}catch{}Ls=typeof document<"u"?document.domain&&gs?pm(gs):K7():pm(gs);for(var r=hm.length;r--;)delete Ls[Th][hm[r]];return Ls()};W7[nE]=!0;var aa=Object.create||function(i,e){var t;return i!==null?(tc[Th]=z7(i),t=new tc,tc[Th]=null,t[nE]=i):t=Ls(),e===void 0?t:H7.f(t,e)},q7=te,aE=!q7(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),Y7=Ve,X7=He,J7=Ot,Q7=au,Z7=aE,gm=Q7("IE_PROTO"),Ih=Object,eG=Ih.prototype,su=Z7?Ih.getPrototypeOf:function(r){var i=J7(r);if(Y7(i,gm))return i[gm];var e=i.constructor;return X7(e)&&i instanceof e?e.prototype:i instanceof Ih?eG:null},tG=ia,Co=function(r,i,e,t){return t&&t.enumerable?r[i]=e:tG(r,i,e),r},rG=te,nG=He,iG=Ue,aG=aa,ym=su,oG=Co,sG=Se,Ph=sG("iterator"),oE=!1,$r,rc,nc;[].keys&&(nc=[].keys(),"next"in nc?(rc=ym(ym(nc)),rc!==Object.prototype&&($r=rc)):oE=!0);var lG=!iG($r)||rG(function(){var r={};return $r[Ph].call(r)!==r});lG?$r={}:$r=aG($r);nG($r[Ph])||oG($r,Ph,function(){return this});var sE={IteratorPrototype:$r,BUGGY_SAFARI_ITERATORS:oE},uG=Yf,dG=Wn,cG=uG?{}.toString:function(){return"[object "+dG(this)+"]"},hG=Yf,fG=Dt.f,vG=ia,pG=Ve,gG=cG,yG=Se,mm=yG("toStringTag"),oa=function(r,i,e,t){if(r){var n=e?r:r.prototype;pG(n,mm)||fG(n,mm,{configurable:!0,value:i}),t&&!hG&&vG(n,"toString",gG)}},sa={},mG=sE.IteratorPrototype,bG=aa,$G=wo,wG=oa,_G=sa,EG=function(){return this},SG=function(r,i,e,t){var n=i+" Iterator";return r.prototype=bG(mG,{next:$G(+!t,e)}),wG(r,n,!1,!0),_G[n]=EG,r},OG=ne,TG=Hn,kG=function(r,i,e){try{return OG(TG(Object.getOwnPropertyDescriptor(r,i)[e]))}catch{}},IG=He,PG=String,xG=TypeError,CG=function(r){if(typeof r=="object"||IG(r))return r;throw new xG("Can't set "+PG(r)+" as a prototype")},AG=kG,RG=Nt,MG=CG,DG=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,i={},e;try{e=AG(Object.prototype,"__proto__","set"),e(i,[]),r=i instanceof Array}catch{}return function(n,a){return RG(n),MG(a),r?e(n,a):n.__proto__=a,n}}():void 0),NG=G,FG=Mt,BG=A7,jG=SG,LG=su,zG=oa,bm=Co,HG=Se,$m=sa,WG=sE,UG=BG.PROPER,ys=WG.BUGGY_SAFARI_ITERATORS,ic=HG("iterator"),wm="keys",ms="values",_m="entries",VG=function(){return this},Qf=function(r,i,e,t,n,a,o){jG(e,i,t);var s=function(y){if(y===n&&h)return h;if(!ys&&y&&y in d)return d[y];switch(y){case wm:return function(){return new e(this,y)};case ms:return function(){return new e(this,y)};case _m:return function(){return new e(this,y)}}return function(){return new e(this)}},l=i+" Iterator",u=!1,d=r.prototype,c=d[ic]||d["@@iterator"]||n&&d[n],h=!ys&&c||s(n),f=i==="Array"&&d.entries||c,v,p,g;if(f&&(v=LG(f.call(new r)),v!==Object.prototype&&v.next&&(zG(v,l,!0,!0),$m[l]=VG)),UG&&n===ms&&c&&c.name!==ms&&(u=!0,h=function(){return FG(c,this)}),n)if(p={values:s(ms),keys:a?h:s(wm),entries:s(_m)},o)for(g in p)(ys||u||!(g in d))&&bm(d,g,p[g]);else NG({target:i,proto:!0,forced:ys||u},p);return o&&d[ic]!==h&&bm(d,ic,h,{name:n}),$m[i]=h,p},Zf=function(r,i){return{value:r,done:i}},GG=p7.charAt,KG=fr,lE=Un,qG=Qf,Em=Zf,uE="String Iterator",YG=lE.set,XG=lE.getterFor(uE);qG(String,"String",function(r){YG(this,{type:uE,string:KG(r),index:0})},function(){var i=XG(this),e=i.string,t=i.index,n;return t>=e.length?Em(void 0,!0):(n=GG(e,t),i.index+=n.length,Em(n,!1))});var JG=Mt,Sm=Nt,QG=Uf,dE=function(r,i,e){var t,n;Sm(r);try{if(t=QG(r,"return"),!t){if(i==="throw")throw e;return e}t=JG(t,r)}catch(a){n=!0,t=a}if(i==="throw")throw e;if(n)throw t;return Sm(t),e},ZG=Nt,eK=dE,tK=function(r,i,e,t){try{return t?i(ZG(e)[0],e[1]):i(e)}catch(n){eK(r,"throw",n)}},rK=Se,nK=sa,iK=rK("iterator"),aK=Array.prototype,cE=function(r){return r!==void 0&&(nK.Array===r||aK[iK]===r)},oK=ne,sK=He,xh=Vf,lK=oK(Function.toString);sK(xh.inspectSource)||(xh.inspectSource=function(r){return lK(r)});var uK=xh.inspectSource,dK=ne,cK=te,hE=He,hK=Wn,fK=Wt,vK=uK,fE=function(){},pK=[],vE=fK("Reflect","construct"),ev=/^\s*(?:class|function)\b/,gK=dK(ev.exec),yK=!ev.test(fE),va=function(i){if(!hE(i))return!1;try{return vE(fE,pK,i),!0}catch{return!1}},pE=function(i){if(!hE(i))return!1;switch(hK(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return yK||!!gK(ev,vK(i))}catch{return!0}};pE.sham=!0;var lu=!vE||cK(function(){var r;return va(va.call)||!va(Object)||!va(function(){r=!0})||r})?pE:va,mK=tu,bK=Dt,$K=wo,la=function(r,i,e){var t=mK(i);t in r?bK.f(r,t,$K(0,e)):r[t]=e},wK=Wn,Om=Uf,_K=ea,EK=sa,SK=Se,OK=SK("iterator"),uu=function(r){if(!_K(r))return Om(r,OK)||Om(r,"@@iterator")||EK[wK(r)]},TK=Mt,kK=Hn,IK=Nt,PK=ra,xK=uu,CK=TypeError,gE=function(r,i){var e=arguments.length<2?xK(r):i;if(kK(e))return IK(TK(e,r));throw new CK(PK(r)+" is not iterable")},AK=ko,RK=Mt,MK=Ot,DK=tK,NK=cE,FK=lu,BK=Ut,Tm=la,jK=gE,LK=uu,km=Array,zK=function(i){var e=MK(i),t=FK(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=AK(a,n>2?arguments[2]:void 0));var s=LK(e),l=0,u,d,c,h,f,v;if(s&&!(this===km&&NK(s)))for(h=jK(e,s),f=h.next,d=t?new this:[];!(c=RK(f,h)).done;l++)v=o?DK(h,a,[c.value,l],!0):c.value,Tm(d,l,v);else for(u=BK(e),d=t?new this(u):km(u);u>l;l++)v=o?a(e[l],l):e[l],Tm(d,l,v);return d.length=l,d},HK=Se,yE=HK("iterator"),mE=!1;try{var WK=0,Im={next:function(){return{done:!!WK++}},return:function(){mE=!0}};Im[yE]=function(){return this},Array.from(Im,function(){throw 2})}catch{}var UK=function(r,i){try{if(!i&&!mE)return!1}catch{return!1}var e=!1;try{var t={};t[yE]=function(){return{next:function(){return{done:e=!0}}}},r(t)}catch{}return e},VK=G,GK=zK,KK=UK,qK=!KK(function(r){Array.from(r)});VK({target:"Array",stat:!0,forced:qK},{from:GK});var YK=re,XK=YK.Array.from,JK=XK,bE=JK,QK=bE,Vn=z(QK),ZK=hr,Pm=sa,$E=Un;Dt.f;var eq=Qf,bs=Zf,wE="Array Iterator",tq=$E.set,rq=$E.getterFor(wE);eq(Array,"Array",function(r,i){tq(this,{type:wE,target:ZK(r),index:0,kind:i})},function(){var r=rq(this),i=r.target,e=r.kind,t=r.index++;if(!i||t>=i.length)return r.target=void 0,bs(void 0,!0);switch(e){case"keys":return bs(t,!1);case"values":return bs(i[t],!1)}return bs([t,i[t]],!1)},"values");Pm.Arguments=Pm.Array;var nq=uu,iq=nq,aq={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},oq=aq,sq=Ee,lq=Wn,uq=ia,xm=sa,dq=Se,Cm=dq("toStringTag");for(var ac in oq){var Am=sq[ac],oc=Am&&Am.prototype;oc&&lq(oc)!==Cm&&uq(oc,Cm,ac),xm[ac]=xm.Array}var cq=iq,hq=cq,fq=hq,vq=fq,pq=vq,gq=pq,_E=gq,EE=z(_E),yq=_E,Gn=z(yq);function C(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}var SE={exports:{}},mq=G,bq=We,Rm=Dt.f;mq({target:"Object",stat:!0,forced:Object.defineProperty!==Rm,sham:!bq},{defineProperty:Rm});var $q=re,OE=$q.Object,wq=SE.exports=function(i,e,t){return OE.defineProperty(i,e,t)};OE.defineProperty.sham&&(wq.sham=!0);var _q=SE.exports,Eq=_q,TE=Eq,Sq=TE,Oq=Sq,Tq=Oq,kq=Tq,Iq=kq,du=z(Iq),Pq=Cr,Kn=Array.isArray||function(i){return Pq(i)==="Array"},xq=TypeError,Cq=9007199254740991,tv=function(r){if(r>Cq)throw xq("Maximum allowed index exceeded");return r},Mm=Kn,Aq=lu,Rq=Ue,Mq=Se,Dq=Mq("species"),Dm=Array,Nq=function(r){var i;return Mm(r)&&(i=r.constructor,Aq(i)&&(i===Dm||Mm(i.prototype))?i=void 0:Rq(i)&&(i=i[Dq],i===null&&(i=void 0))),i===void 0?Dm:i},Fq=Nq,rv=function(r,i){return new(Fq(r))(i===0?0:i)},Bq=te,jq=Se,Lq=So,zq=jq("species"),Ao=function(r){return Lq>=51||!Bq(function(){var i=[],e=i.constructor={};return e[zq]=function(){return{foo:1}},i[r](Boolean).foo!==1})},Hq=G,Wq=te,Uq=Kn,Vq=Ue,Gq=Ot,Kq=Ut,Nm=tv,Fm=la,qq=rv,Yq=Ao,Xq=Se,Jq=So,kE=Xq("isConcatSpreadable"),Qq=Jq>=51||!Wq(function(){var r=[];return r[kE]=!1,r.concat()[0]!==r}),Zq=function(r){if(!Vq(r))return!1;var i=r[kE];return i!==void 0?!!i:Uq(r)},eY=!Qq||!Yq("concat");Hq({target:"Array",proto:!0,arity:1,forced:eY},{concat:function(i){var e=Gq(this),t=qq(e,0),n=0,a,o,s,l,u;for(a=-1,s=arguments.length;ag;g++)if((s||g in f)&&($=f[g],b=v($,g,h),r))if(i)m[g]=b;else if(b)switch(r){case 3:return!0;case 5:return $;case 6:return g;case 2:Lm(m,$)}else switch(r){case 4:return!1;case 7:Lm(m,$)}return a?-1:t||n?n:m}},nn={forEach:Mr(0),map:Mr(1),filter:Mr(2),some:Mr(3),every:Mr(4),find:Mr(5),findIndex:Mr(6),filterReject:Mr(7)},hu=G,fu=Ee,iv=Mt,kY=ne,Ai=We,Ri=ta,IY=te,je=Ve,PY=Pe,Ch=Nt,vu=hr,av=tu,xY=fr,Ah=wo,Va=aa,AE=nu,CY=Ro,RE=cu,AY=xo,ME=Zi,DE=Dt,RY=ou,NE=Ql,zm=Co,MY=nv,ov=na,DY=au,FE=Po,Hm=eu,NY=Se,FY=Mo,BY=Oe,jY=CE,LY=oa,BE=Un,pu=nn.forEach,yt=DY("hidden"),gu="Symbol",Ga="prototype",zY=BE.set,Wm=BE.getterFor(gu),Jt=Object[Ga],$n=fu.Symbol,wa=$n&&$n[Ga],HY=fu.RangeError,WY=fu.TypeError,sc=fu.QObject,jE=ME.f,wn=DE.f,LE=RE.f,UY=NE.f,zE=kY([].push),kr=ov("symbols"),Do=ov("op-symbols"),VY=ov("wks"),Rh=!sc||!sc[Ga]||!sc[Ga].findChild,HE=function(r,i,e){var t=jE(Jt,i);t&&delete Jt[i],wn(r,i,e),t&&r!==Jt&&wn(Jt,i,t)},Mh=Ai&&IY(function(){return Va(wn({},"a",{get:function(){return wn(this,"a",{value:7}).a}})).a!==7})?HE:wn,lc=function(r,i){var e=kr[r]=Va(wa);return zY(e,{type:gu,tag:r,description:i}),Ai||(e.description=i),e},yu=function(i,e,t){i===Jt&&yu(Do,e,t),Ch(i);var n=av(e);return Ch(t),je(kr,n)?(t.enumerable?(je(i,yt)&&i[yt][n]&&(i[yt][n]=!1),t=Va(t,{enumerable:Ah(0,!1)})):(je(i,yt)||wn(i,yt,Ah(1,{})),i[yt][n]=!0),Mh(i,n,t)):wn(i,n,t)},sv=function(i,e){Ch(i);var t=vu(e),n=AE(t).concat(GE(t));return pu(n,function(a){(!Ai||iv(WE,t,a))&&yu(i,a,t[a])}),i},GY=function(i,e){return e===void 0?Va(i):sv(Va(i),e)},WE=function(i){var e=av(i),t=iv(UY,this,e);return this===Jt&&je(kr,e)&&!je(Do,e)?!1:t||!je(this,e)||!je(kr,e)||je(this,yt)&&this[yt][e]?t:!0},UE=function(i,e){var t=vu(i),n=av(e);if(!(t===Jt&&je(kr,n)&&!je(Do,n))){var a=jE(t,n);return a&&je(kr,n)&&!(je(t,yt)&&t[yt][n])&&(a.enumerable=!0),a}},VE=function(i){var e=LE(vu(i)),t=[];return pu(e,function(n){!je(kr,n)&&!je(FE,n)&&zE(t,n)}),t},GE=function(r){var i=r===Jt,e=LE(i?Do:vu(r)),t=[];return pu(e,function(n){je(kr,n)&&(!i||je(Jt,n))&&zE(t,kr[n])}),t};Ri||($n=function(){if(PY(wa,this))throw new WY("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:xY(arguments[0]),e=Hm(i),t=function(n){this===Jt&&iv(t,Do,n),je(this,yt)&&je(this[yt],e)&&(this[yt][e]=!1);var a=Ah(1,n);try{Mh(this,e,a)}catch(o){if(!(o instanceof HY))throw o;HE(this,e,a)}};return Ai&&Rh&&Mh(Jt,e,{configurable:!0,set:t}),lc(e,i)},wa=$n[Ga],zm(wa,"toString",function(){return Wm(this).tag}),zm($n,"withoutSetter",function(r){return lc(Hm(r),r)}),NE.f=WE,DE.f=yu,RY.f=sv,ME.f=UE,CY.f=RE.f=VE,AY.f=GE,FY.f=function(r){return lc(NY(r),r)},Ai&&MY(wa,"description",{configurable:!0,get:function(){return Wm(this).description}}));hu({global:!0,constructor:!0,wrap:!0,forced:!Ri,sham:!Ri},{Symbol:$n});pu(AE(VY),function(r){BY(r)});hu({target:gu,stat:!0,forced:!Ri},{useSetter:function(){Rh=!0},useSimple:function(){Rh=!1}});hu({target:"Object",stat:!0,forced:!Ri,sham:!Ai},{create:GY,defineProperty:yu,defineProperties:sv,getOwnPropertyDescriptor:UE});hu({target:"Object",stat:!0,forced:!Ri},{getOwnPropertyNames:VE});jY();LY($n,gu);FE[yt]=!0;var KY=ta,KE=KY&&!!Symbol.for&&!!Symbol.keyFor,qY=G,YY=Wt,XY=Ve,JY=fr,qE=na,QY=KE,uc=qE("string-to-symbol-registry"),ZY=qE("symbol-to-string-registry");qY({target:"Symbol",stat:!0,forced:!QY},{for:function(r){var i=JY(r);if(XY(uc,i))return uc[i];var e=YY("Symbol")(i);return uc[i]=e,ZY[e]=i,e}});var eX=G,tX=Ve,rX=Oo,nX=ra,iX=na,aX=KE,Um=iX("symbol-to-string-registry");eX({target:"Symbol",stat:!0,forced:!aX},{keyFor:function(i){if(!rX(i))throw new TypeError(nX(i)+" is not a symbol");if(tX(Um,i))return Um[i]}});var oX=ne,Vm=Kn,sX=He,Gm=Cr,lX=fr,Km=oX([].push),uX=function(r){if(sX(r))return r;if(Vm(r)){for(var i=r.length,e=[],t=0;tr.length)&&(i=r.length);for(var e=0,t=new Array(i);e1?arguments[1]:void 0)}});var RZ=Ge,MZ=RZ("Array").map,DZ=Pe,NZ=MZ,pc=Array.prototype,FZ=function(r){var i=r.map;return r===pc||DZ(pc,r)&&i===pc.map?NZ:i},BZ=FZ,jZ=BZ,LZ=jZ,Mi=z(LZ),zZ=G,HZ=Ot,hS=nu,WZ=te,UZ=WZ(function(){hS(1)});zZ({target:"Object",stat:!0,forced:UZ},{keys:function(i){return hS(HZ(i))}});var VZ=re,GZ=VZ.Object.keys,KZ=GZ,qZ=KZ,YZ=qZ,be=z(YZ),XZ=G,JZ=ne,fS=Date,QZ=JZ(fS.prototype.getTime);XZ({target:"Date",stat:!0},{now:function(){return QZ(new fS)}});var ZZ=re,eee=ZZ.Date.now,tee=eee,ree=tee,nee=ree,fl=z(nee),iee=te,ua=function(r,i){var e=[][r];return!!e&&iee(function(){e.call(null,i||function(){return 1},1)})},aee=nn.forEach,oee=ua,see=oee("forEach"),lee=see?[].forEach:function(i){return aee(this,i,arguments.length>1?arguments[1]:void 0)},uee=G,db=lee;uee({target:"Array",proto:!0,forced:[].forEach!==db},{forEach:db});var dee=Ge,cee=dee("Array").forEach,hee=cee,fee=hee,vee=Wn,pee=Ve,gee=Pe,yee=fee,gc=Array.prototype,mee={DOMTokenList:!0,NodeList:!0},bee=function(r){var i=r.forEach;return r===gc||gee(gc,r)&&i===gc.forEach||pee(mee,vee(r))?yee:i},$ee=bee,ue=z($ee),wee=G,_ee=ne,Eee=Kn,See=_ee([].reverse),cb=[1,2];wee({target:"Array",proto:!0,forced:String(cb)===String(cb.reverse())},{reverse:function(){return Eee(this)&&(this.length=this.length),See(this)}});var Oee=Ge,Tee=Oee("Array").reverse,kee=Pe,Iee=Tee,yc=Array.prototype,Pee=function(r){var i=r.reverse;return r===yc||kee(yc,r)&&i===yc.reverse?Iee:i},xee=Pee,Cee=xee,Aee=Cee,_n=z(Aee),hb=ra,Ree=TypeError,vS=function(r,i){if(!delete r[i])throw new Ree("Cannot delete property "+hb(i)+" of "+hb(r))},Mee=G,Dee=Ot,Nee=Io,Fee=ru,Bee=Ut,jee=lS,Lee=tv,zee=rv,Hee=la,mc=vS,Wee=Ao,Uee=Wee("splice"),Vee=Math.max,Gee=Math.min;Mee({target:"Array",proto:!0,forced:!Uee},{splice:function(i,e){var t=Dee(this),n=Bee(t),a=Nee(i,n),o=arguments.length,s,l,u,d,c,h;for(o===0?s=l=0:o===1?(s=0,l=n-a):(s=o-2,l=Gee(Vee(Fee(e),0),n-a)),Lee(n+s-l),u=zee(t,l),d=0;dn-l+s;d--)mc(t,d-1)}else if(s>l)for(d=n-l;d>a;d--)c=d+l-1,h=d+s-1,c in t?t[h]=t[c]:mc(t,h);for(d=0;d1?arguments[1]:void 0)}});var ate=Ge,ote=ate("Array").includes,ste=Ue,lte=Cr,ute=Se,dte=ute("match"),cte=function(r){var i;return ste(r)&&((i=r[dte])!==void 0?!!i:lte(r)==="RegExp")},hte=cte,fte=TypeError,vte=function(r){if(hte(r))throw new fte("The method doesn't accept regular expressions");return r},pte=Se,gte=pte("match"),yte=function(r){var i=/./;try{"/./"[r](i)}catch{try{return i[gte]=!1,"/./"[r](i)}catch{}}return!1},mte=G,bte=ne,$te=vte,wte=_o,fb=fr,_te=yte,Ete=bte("".indexOf);mte({target:"String",proto:!0,forced:!_te("includes")},{includes:function(i){return!!~Ete(fb(wte(this)),fb($te(i)),arguments.length>1?arguments[1]:void 0)}});var Ste=Ge,Ote=Ste("String").includes,vb=Pe,Tte=ote,kte=Ote,$c=Array.prototype,wc=String.prototype,Ite=function(r){var i=r.includes;return r===$c||vb($c,r)&&i===$c.includes?Tte:typeof r=="string"||r===wc||vb(wc,r)&&i===wc.includes?kte:i},Pte=Ite,xte=Pte,Cte=xte,Gr=z(Cte),Ate=G,Rte=te,Mte=Ot,pS=su,Dte=aE,Nte=Rte(function(){pS(1)});Ate({target:"Object",stat:!0,forced:Nte,sham:!Dte},{getPrototypeOf:function(i){return pS(Mte(i))}});var Fte=re,Bte=Fte.Object.getPrototypeOf,jte=Bte,gS=jte,Lte=gS,pb=z(Lte),zte=G,Hte=nn.filter,Wte=Ao,Ute=Wte("filter");zte({target:"Array",proto:!0,forced:!Ute},{filter:function(i){return Hte(this,i,arguments.length>1?arguments[1]:void 0)}});var Vte=Ge,Gte=Vte("Array").filter,Kte=Pe,qte=Gte,_c=Array.prototype,Yte=function(r){var i=r.filter;return r===_c||Kte(_c,r)&&i===_c.filter?qte:i},Xte=Yte,Jte=Xte,Qte=Jte,mt=z(Qte),dv=` +\v\f\r                 \u2028\u2029\uFEFF`,Zte=ne,ere=_o,tre=fr,Nh=dv,gb=Zte("".replace),rre=RegExp("^["+Nh+"]+"),nre=RegExp("(^|[^"+Nh+"])["+Nh+"]+$"),Ec=function(r){return function(i){var e=tre(ere(i));return r&1&&(e=gb(e,rre,"")),r&2&&(e=gb(e,nre,"$1")),e}},yS={start:Ec(1),end:Ec(2),trim:Ec(3)},mS=Ee,ire=te,are=ne,ore=fr,sre=yS.trim,yb=dv,Ia=mS.parseInt,mb=mS.Symbol,bb=mb&&mb.iterator,bS=/^[+-]?0x/i,lre=are(bS.exec),ure=Ia(yb+"08")!==8||Ia(yb+"0x16")!==22||bb&&!ire(function(){Ia(Object(bb))}),dre=ure?function(i,e){var t=sre(ore(i));return Ia(t,e>>>0||(lre(bS,t)?16:10))}:Ia,cre=G,$b=dre;cre({global:!0,forced:parseInt!==$b},{parseInt:$b});var hre=re,fre=hre.parseInt,vre=fre,pre=vre,gre=pre,Yt=z(gre),yre=G,mre=Wf,bre=Gf.indexOf,$re=ua,Fh=mre([].indexOf),$S=!!Fh&&1/Fh([1],1,-0)<0,wre=$S||!$re("indexOf");yre({target:"Array",proto:!0,forced:wre},{indexOf:function(i){var e=arguments.length>1?arguments[1]:void 0;return $S?Fh(this,i,e)||0:bre(this,i,e)}});var _re=Ge,Ere=_re("Array").indexOf,Sre=Pe,Ore=Ere,Sc=Array.prototype,Tre=function(r){var i=r.indexOf;return r===Sc||Sre(Sc,r)&&i===Sc.indexOf?Ore:i},kre=Tre,Ire=kre,Pre=Ire,ee=z(Pre),xre=G,Cre=We,Are=aa;xre({target:"Object",stat:!0,sham:!Cre},{create:Are});var Rre=re,Mre=Rre.Object,Dre=function(i,e){return Mre.create(i,e)},Nre=Dre,wS=Nre,Fre=wS,En=z(Fre),Bh=re,Bre=$o;Bh.JSON||(Bh.JSON={stringify:JSON.stringify});var jre=function(i,e,t){return Bre(Bh.JSON.stringify,null,arguments)},Lre=jre,zre=Lre,Hre=zre,Fo=z(Hre),Wre=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",Ure=TypeError,Vre=function(r,i){if(re,o=Kre(t)?t:Qre(t),s=a?Xre(arguments,e):[],l=a?function(){Gre(o,this,s)}:o;return i?r(l,n):r(l)}:r},ene=G,SS=Ee,tne=ES,wb=tne(SS.setInterval,!0);ene({global:!0,bind:!0,forced:SS.setInterval!==wb},{setInterval:wb});var rne=G,OS=Ee,nne=ES,_b=nne(OS.setTimeout,!0);rne({global:!0,bind:!0,forced:OS.setTimeout!==_b},{setTimeout:_b});var ine=re,ane=ine.setTimeout,one=ane,lr=z(one),sne=Ot,Eb=Io,lne=Ut,une=function(i){for(var e=sne(this),t=lne(e),n=arguments.length,a=Eb(n>1?arguments[1]:void 0,t),o=n>2?arguments[2]:void 0,s=o===void 0?t:Eb(o,t);s>a;)e[a++]=i;return e},dne=G,cne=une;dne({target:"Array",proto:!0},{fill:cne});var hne=Ge,fne=hne("Array").fill,vne=Pe,pne=fne,Oc=Array.prototype,gne=function(r){var i=r.fill;return r===Oc||vne(Oc,r)&&i===Oc.fill?pne:i},yne=gne,mne=yne,bne=mne,Bo=z(bne);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 + * http://naver.github.io/egjs + * + * Forked By Naver egjs + * Copyright (c) hammerjs + * Licensed under the MIT license */function Zt(){return Zt=Object.assign||function(r){for(var i=1;i"u"?{style:{}}:document.createElement("div"),wne="function",mi=Math.round,An=Math.abs,cv=Date.now;function mu(r,i){for(var e,t,n=i[0].toUpperCase()+i.slice(1),a=0;a"u"?_r={}:_r=window;var TS=mu($ne.style,"touchAction"),kS=TS!==void 0;function _ne(){if(!kS)return!1;var r={},i=_r.CSS&&_r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return r[e]=i?_r.CSS.supports("touch-action",e):!0}),r}var IS="compute",PS="auto",Lh="manipulation",Sn="none",Ka="pan-x",qa="pan-y",_s=_ne(),Ene=/mobile|tablet|ip(ad|hone|od)|android/i,xS="ontouchstart"in _r,Sne=mu(_r,"PointerEvent")!==void 0,One=xS&&Ene.test(navigator.userAgent),jo="touch",Tne="pen",hv="mouse",kne="kinect",Ine=25,ut=1,qn=2,Me=4,wt=8,vl=1,Lo=2,zo=4,Ho=8,Di=16,ur=Lo|zo,On=Ho|Di,CS=ur|On,AS=["x","y"],pl=["clientX","clientY"];function Er(r,i,e){var t;if(r)if(r.forEach)r.forEach(i,e);else if(r.length!==void 0)for(t=0;t-1}function Pne(r){if(vn(r,Sn))return Sn;var i=vn(r,Ka),e=vn(r,qa);return i&&e?Sn:i||e?i?Ka:qa:vn(r,Lh)?Lh:PS}var RS=function(){function r(e,t){this.manager=e,this.set(t)}var i=r.prototype;return i.set=function(t){t===IS&&(t=this.compute()),kS&&this.manager.element.style&&_s[t]&&(this.manager.element.style[TS]=t),this.actions=t.toLowerCase().trim()},i.update=function(){this.set(this.manager.options.touchAction)},i.compute=function(){var t=[];return Er(this.manager.recognizers,function(n){bu(n.options.enable,[n])&&(t=t.concat(n.getTouchAction()))}),Pne(t.join(" "))},i.preventDefaults=function(t){var n=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=vn(o,Sn)&&!_s[Sn],l=vn(o,qa)&&!_s[qa],u=vn(o,Ka)&&!_s[Ka];if(s){var d=t.pointers.length===1,c=t.distance<2,h=t.deltaTime<250;if(d&&c&&h)return}if(!(u&&l)&&(s||l&&a&ur||u&&a&On))return this.preventSrc(n)},i.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},r}();function fv(r,i){for(;r;){if(r===i)return!0;r=r.parentNode}return!1}function MS(r){var i=r.length;if(i===1)return{x:mi(r[0].clientX),y:mi(r[0].clientY)};for(var e=0,t=0,n=0;n=An(i)?r<0?Lo:zo:i<0?Ho:Di}function xne(r,i){var e=i.center,t=r.offsetDelta||{},n=r.prevDelta||{},a=r.prevInput||{};(i.eventType===ut||a.eventType===Me)&&(n=r.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=r.offsetDelta={x:e.x,y:e.y}),i.deltaX=n.x+(e.x-t.x),i.deltaY=n.y+(e.y-t.y)}function NS(r,i,e){return{x:i/r||0,y:e/r||0}}function Cne(r,i){return gl(i[0],i[1],pl)/gl(r[0],r[1],pl)}function Ane(r,i){return zh(i[1],i[0],pl)+zh(r[1],r[0],pl)}function Rne(r,i){var e=r.lastInterval||i,t=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==wt&&(t>Ine||e.velocity===void 0)){var l=i.deltaX-e.deltaX,u=i.deltaY-e.deltaY,d=NS(t,l,u);a=d.x,o=d.y,n=An(d.x)>An(d.y)?d.x:d.y,s=DS(l,u),r.lastInterval=i}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;i.velocity=n,i.velocityX=a,i.velocityY=o,i.direction=s}function Mne(r,i){var e=r.session,t=i.pointers,n=t.length;e.firstInput||(e.firstInput=Ob(i)),n>1&&!e.firstMultiple?e.firstMultiple=Ob(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,l=i.center=MS(t);i.timeStamp=cv(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=zh(s,l),i.distance=gl(s,l),xne(e,i),i.offsetDirection=DS(i.deltaX,i.deltaY);var u=NS(i.deltaTime,i.deltaX,i.deltaY);i.overallVelocityX=u.x,i.overallVelocityY=u.y,i.overallVelocity=An(u.x)>An(u.y)?u.x:u.y,i.scale=o?Cne(o.pointers,t):1,i.rotation=o?Ane(o.pointers,t):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,Rne(e,i);var d=r.element,c=i.srcEvent,h;c.composedPath?h=c.composedPath()[0]:c.path?h=c.path[0]:h=c.target,fv(h,d)&&(d=h),i.target=d}function Dne(r,i,e){var t=e.pointers.length,n=e.changedPointers.length,a=i&ut&&t-n===0,o=i&(Me|wt)&&t-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(r.session={}),e.eventType=i,Mne(r,e),r.emit("hammer.input",e),r.recognize(e),r.session.prevInput=e}function Ya(r){return r.trim().split(/\s+/g)}function Pa(r,i,e){Er(Ya(i),function(t){r.addEventListener(t,e,!1)})}function xa(r,i,e){Er(Ya(i),function(t){r.removeEventListener(t,e,!1)})}function Tb(r){var i=r.ownerDocument||r;return i.defaultView||i.parentWindow||window}var da=function(){function r(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){bu(e.options.enable,[e])&&n.handler(a)},this.init()}var i=r.prototype;return i.handler=function(){},i.init=function(){this.evEl&&Pa(this.element,this.evEl,this.domHandler),this.evTarget&&Pa(this.target,this.evTarget,this.domHandler),this.evWin&&Pa(Tb(this.element),this.evWin,this.domHandler)},i.destroy=function(){this.evEl&&xa(this.element,this.evEl,this.domHandler),this.evTarget&&xa(this.target,this.evTarget,this.domHandler),this.evWin&&xa(Tb(this.element),this.evWin,this.domHandler)},r}();function Rn(r,i,e){if(r.indexOf&&!e)return r.indexOf(i);for(var t=0;tl[i]}):t=t.sort()),t}var Bne={touchstart:ut,touchmove:qn,touchend:Me,touchcancel:wt},jne="touchstart touchmove touchend touchcancel",pv=function(r){Vt(i,r);function i(){var t;return i.prototype.evTarget=jne,t=r.apply(this,arguments)||this,t.targetIds={},t}var e=i.prototype;return e.handler=function(n){var a=Bne[n.type],o=Lne.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:jo,srcEvent:n})},i}(da);function Lne(r,i){var e=Xa(r.touches),t=this.targetIds;if(i&(ut|qn)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var n,a,o=Xa(r.changedTouches),s=[],l=this.target;if(a=e.filter(function(u){return fv(u.target,l)}),i===ut)for(n=0;n-1&&n.splice(s,1)};setTimeout(a,Une)}}function Vne(r,i){r&ut?(this.primaryTouch=i.changedPointers[0].identifier,Ib.call(this,i)):r&(Me|wt)&&Ib.call(this,i)}function Gne(r){for(var i=r.srcEvent.clientX,e=r.srcEvent.clientY,t=0;t-1&&this.requireFail.splice(n,1),this},i.hasRequireFailures=function(){return this.requireFail.length>0},i.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},i.emit=function(t){var n=this,a=this.state;function o(s){n.manager.emit(s,t)}a=Kr&&o(n.options.event+Pb(a))},i.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=ar},i.canEmit=function(){for(var t=0;ta.threshold&&l&a.direction},e.attrTest=function(n){return Fi.prototype.attrTest.call(this,n)&&(this.state&zt||!(this.state&zt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=zS(n.direction);a&&(n.additionalEvent=this.options.event+a),r.prototype.emit.call(this,n)},i}(Fi),HS=function(r){Vt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,Zt({event:"swipe",threshold:10,velocity:.3,direction:ur|On,pointers:1},t))||this}var e=i.prototype;return e.getTouchAction=function(){return yv.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(ur|On)?o=n.overallVelocity:a&ur?o=n.overallVelocityX:a&On&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&An(o)>this.options.velocity&&n.eventType&Me},e.emit=function(n){var a=zS(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(Fi),WS=function(r){Vt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,Zt({event:"pinch",threshold:0,pointers:2},t))||this}var e=i.prototype;return e.getTouchAction=function(){return[Sn]},e.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&zt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}r.prototype.emit.call(this,n)},i}(Fi),US=function(r){Vt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,Zt({event:"rotate",threshold:0,pointers:2},t))||this}var e=i.prototype;return e.getTouchAction=function(){return[Sn]},e.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&zt)},i}(Fi),VS=function(r){Vt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,Zt({event:"press",pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var e=i.prototype;return e.getTouchAction=function(){return[PS]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,l=n.distanceo.time;if(this._input=n,!l||!s||n.eventType&(Me|wt)&&!u)this.reset();else if(n.eventType&ut)this.reset(),this._timer=setTimeout(function(){a.state=Sr,a.tryEmit()},o.time);else if(n.eventType&Me)return Sr;return ar},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Sr&&(n&&n.eventType&Me?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=cv(),this.manager.emit(this.options.event,this._input)))},i}(Wo),GS={domEvents:!1,touchAction:IS,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},xb=[[US,{enable:!1}],[WS,{enable:!1},["rotate"]],[HS,{direction:ur}],[yv,{direction:ur},["swipe"]],[Hh],[Hh,{event:"doubletap",taps:2},["tap"]],[VS]],Xne=1,Cb=2;function Ab(r,i){var e=r.element;if(e.style){var t;Er(r.options.cssProps,function(n,a){t=mu(e.style,a),i?(r.oldCssProps[t]=e.style[t],e.style[t]=n):e.style[t]=r.oldCssProps[t]||""}),i||(r.oldCssProps={})}}function Jne(r,i){var e=document.createEvent("Event");e.initEvent(r,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var Rb=function(){function r(e,t){var n=this;this.options=Cn({},GS,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Kne(this),this.touchAction=new RS(this,this.options.touchAction),Ab(this,!0),Er(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var i=r.prototype;return i.set=function(t){return Cn(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},i.stop=function(t){this.session.stopped=t?Cb:Xne},i.recognize=function(t){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&Sr)&&(n.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,t,a),r.apply(this,arguments)}}var qS=KS(function(r,i,e){for(var t=Object.keys(i),n=0;n=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},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 oie(r,i){var e;if(r){if(typeof r=="string")return Db(r,i);var t=Xe(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Vn(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Db(r,i)}}function Db(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e>>0,n-=r,n*=r,r=n>>>0,n-=r,r+=n*4294967296}return(r>>>0)*23283064365386963e-26}}function die(){var r=function(){};return{on:r,off:r,destroy:r,emit:r,get:function(){return{set:r}}}}var mv=typeof window<"u"?window.Hammer||aie:function(){return die()};function or(r){var i=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)});var t=mv(this._dom.overlay);t.on("tap",k(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];ue(n).call(n,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){cie(a.target,r)||i.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",i._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&i.deactivate()}}Q_(or.prototype);or.current=null;or.prototype.destroy=function(){var r,i;this.deactivate();var e=XS(_n(r=wr(i=this._cleanupQueue).call(i,0)).call(r)),t;try{for(e.s();!(t=e.n()).done;){var n=t.value;n()}}catch(a){e.e(a)}finally{e.f()}};or.prototype.activate=function(){or.current&&or.current.deactivate(),or.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)};or.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")};or.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function cie(r,i){for(;r;){if(r===i)return!0;r=r.parentNode}return!1}var hie=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,fie=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,vie=/^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,pie=/^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 Fr(r){if(r)for(;r.hasChildNodes()===!0;){var i=r.firstChild;i&&(Fr(i),r.removeChild(i))}}function _i(r){return r instanceof String||typeof r=="string"}function Nb(r){return le(r)==="object"&&r!==null}function Mn(r,i,e,t){var n=!1;t===!0&&(n=i[e]===null&&r[e]!==void 0),n?delete r[e]:r[e]=i[e]}function JS(r,i){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var t in r)if(i[t]!==void 0)if(i[t]===null||le(i[t])!=="object")Mn(r,i,t,e);else{var n=r[t],a=i[t];Nb(n)&&Nb(a)&&JS(n,a,e)}}function ca(r,i,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(oe(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!1;if(oe(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!Gr(r).call(r,n))if(e[n]&&e[n].constructor===Object)i[n]===void 0&&(i[n]={}),i[n].constructor===Object?ce(i[n],e[n]):Mn(i,e,n,t);else if(oe(e[n])){i[n]=[];for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:!1,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)||e===!0)if(le(i[n])==="object"&&i[n]!==null&&pb(i[n])===Object.prototype)r[n]===void 0?r[n]=ce({},i[n],e):le(r[n])==="object"&&r[n]!==null&&pb(r[n])===Object.prototype?ce(r[n],i[n],e):Mn(r,i,n,t);else if(oe(i[n])){var a;r[n]=Xe(a=i[n]).call(a)}else Mn(r,i,n,t);return r}function ml(r,i){var e;return uv(e=[]).call(e,nr(r),[i])}function gie(r){return Xe(r).call(r)}function yie(r){return r.getBoundingClientRect().left}function mie(r){return r.getBoundingClientRect().top}function Z(r,i){if(oe(r))for(var e=r.length,t=0;t3&&arguments[3]!==void 0?arguments[3]:{},n=function(v){return v!=null},a=function(v){return v!==null&&le(v)==="object"},o=function(v){for(var p in v)if(Object.prototype.hasOwnProperty.call(v,p))return!1;return!0};if(!a(r))throw new Error("Parameter mergeTarget must be an object");if(!a(i))throw new Error("Parameter options must be an object");if(!n(e))throw new Error("Parameter option must have a value");if(!a(t))throw new Error("Parameter globalOptions must be an object");var s=function(v,p,g){a(v[g])||(v[g]={});var y=p[g],m=v[g];for(var $ in y)Object.prototype.hasOwnProperty.call(y,$)&&(m[$]=y[$])},l=i[e],u=a(t)&&!o(t),d=u?t[e]:void 0,c=d?d.enabled:void 0;if(l!==void 0){if(typeof l=="boolean"){a(r[e])||(r[e]={}),r[e].enabled=l;return}if(l===null&&!a(r[e]))if(n(d))r[e]=En(d);else return;if(a(l)){var h=!0;l.enabled!==void 0?h=l.enabled:c!==void 0&&(h=d.enabled),s(r,i,e),r[e].enabled=h}}}var wie={linear:function(i){return i},easeInQuad:function(i){return i*i},easeOutQuad:function(i){return i*(2-i)},easeInOutQuad:function(i){return i<.5?2*i*i:-1+(4-2*i)*i},easeInCubic:function(i){return i*i*i},easeOutCubic:function(i){return--i*i*i+1},easeInOutCubic:function(i){return i<.5?4*i*i*i:(i-1)*(2*i-2)*(2*i-2)+1},easeInQuart:function(i){return i*i*i*i},easeOutQuart:function(i){return 1- --i*i*i*i},easeInOutQuart:function(i){return i<.5?8*i*i*i*i:1-8*--i*i*i*i},easeInQuint:function(i){return i*i*i*i*i},easeOutQuint:function(i){return 1+--i*i*i*i*i},easeInOutQuint:function(i){return i<.5?16*i*i*i*i*i:1+16*--i*i*i*i*i}};function Br(r,i){var e;oe(i)||(i=[i]);var t=XS(r),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;if(a){e=a[i[0]];for(var o=1;o0&&arguments[0]!==void 0?arguments[0]:1;C(this,r),this.pixelRatio=i,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 A(r,[{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 _ie[e]}},{key:"setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var n,a=this._isColorString(e);if(a!==void 0&&(e=a),_i(e)===!0){if(eO(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");n={r:o[0],g:o[1],b:o[2],a:1}}else if($ie(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");n={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(ZS(e)===!0){var l=bv(e);n={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";n={r:e.r,g:e.g,b:e.b,a:u}}if(n===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: "+Fo(e));this._setColor(n,t)}}},{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,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t===!0&&(this.previousColor=Re({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",lr(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 t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;t===!0&&(this.initialColor=Re({},e)),this.color=e;var n=_a(e.r,e.g,e.b),a=2*Math.PI,o=this.r*n.s,s=this.centerCoordinates.x+o*Math.sin(a*n.h),l=this.centerCoordinates.y+o*Math.cos(a*n.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 t=_a(this.color.r,this.color.g,this.color.b);t.v=e/100;var n=Hs(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=_a(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,a,o),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-t.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),Bo(n).call(n),this.brightnessRange.value=100*t.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,t,n,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=k(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=k(t=this._apply).call(t,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=k(n=this._save).call(n,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=k(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 mv(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(t){t.isFirst&&e._moveSelector(t)}),this.hammer.on("tap",function(t){e._moveSelector(t)}),this.hammer.on("panstart",function(t){e._moveSelector(t)}),this.hammer.on("panmove",function(t){e._moveSelector(t)}),this.hammer.on("panend",function(t){e._moveSelector(t)})}},{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 t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);var a,o,s,l;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;var u=2*Math.PI/360,d=1/360,c=1/this.r,h;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};C(this,r),this.parent=i,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},Re(this.options,this.defaultOptions),this.configureOptions=t,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Eie(n),this.wrapper=void 0}return A(r,[{key:"setOptions",value:function(e){if(e!==void 0){this.popupHistory={},this._removePopup();var t=!0;if(typeof e=="string")this.options.filter=e;else if(oe(e))this.options.filter=e.join();else if(le(e)==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),mt(e)!==void 0&&(this.options.filter=mt(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);mt(this.options)===!1&&(t=!1),this.options.enabled=t}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=mt(this.options),t=0,n=!1;for(var a in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,a)&&(this.allowCreation=!1,n=!1,typeof e=="function"?(n=e(a,[]),n=n||this._handleObject(this.configureOptions[a],[a],!0)):(e===!0||ee(e).call(e,a)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(a),this._handleObject(this.configureOptions[a],[a])),t++);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?n-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"+t.length,n===!0){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(Vh("i","b",e))}else a.innerText=e+":";return a}},{key:"_makeDropdown",value:function(e,t,n){var a=document.createElement("select");a.className="vis-configuration vis-config-select";var o=0;t!==void 0&&ee(e).call(e,t)!==-1&&(o=ee(e).call(e,t));for(var s=0;ss&&s!==1&&(u.max=Math.ceil(t*h),c=u.max,d="range increased"),u.value=t}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),n)},u.oninput=function(){f.value=this.value};var p=this._makeLabel(n[n.length-1],n),g=this._makeItem(n,p,u,f);d!==""&&this.popupHistory[g]!==c&&(this.popupHistory[g]=c,this._setupPopup(d,g))}},{key:"_makeButton",value:function(){var e=this;if(this.options.showButton===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerText="generate options",t.onclick=function(){e._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.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(t)}}},{key:"_setupPopup",value:function(e,t){var n=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,o=mt(this.options),s=!1;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){a=!0;var u=e[l],d=ml(t,l);if(typeof o=="function"&&(a=o(l,t),a===!1&&!oe(u)&&typeof u!="string"&&typeof u!="boolean"&&u instanceof Object&&(this.allowCreation=!1,a=this._handleObject(u,d,!0),this.allowCreation=n===!1)),a!==!1){s=!0;var c=this._getValue(d);if(oe(u))this._handleArray(u,c,d);else if(typeof u=="string")this._makeTextInput(u,c,d);else if(typeof u=="boolean")this._makeCheckbox(u,c,d);else if(u instanceof Object){if(!this.hideOption(t,l,this.moduleOptions))if(u.enabled!==void 0){var h=ml(d,"enabled"),f=this._getValue(h);if(f===!0){var v=this._makeLabel(l,d,!0);this._makeItem(d,v),s=this._handleObject(u,d)||s}else this._makeCheckbox(u,f,d)}else{var p=this._makeLabel(l,d,!0);this._makeItem(d,p),s=this._handleObject(u,d)||s}}else console.error("dont know how to handle",u,l,d)}}return s}},{key:"_handleArray",value:function(e,t,n){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}},{key:"_update",value:function(e,t){var n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",n),this.initialized=!0,this.parent.setOptions(n)}},{key:"_constructOptions",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var o=0;oo-this.padding&&(u=!0),u?s=this.x-n:s=this.x,d?l=this.y-t:l=this.y}else l=this.y-t,l+t+this.padding>a&&(l=a-t-this.padding),lo&&(s=o-n-this.padding),so.distance?u=" in "+r.printLocation(a.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+r.printLocation(o.path,o.closestMatch,""):a.distance<=s?u='. Did you mean "'+a.closestMatch+'"?'+r.printLocation(a.path,e):u=". Did you mean one of these: "+r.print(be(t))+r.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+u,Gh),pa=!0}},{key:"findInOptions",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=1e9,s="",l=[],u=e.toLowerCase(),d=void 0;for(var c in t){var h=void 0;if(t[c].__type__!==void 0&&a===!0){var f=r.findInOptions(e,t[c],ml(n,c));o>f.distance&&(s=f.closestMatch,l=f.path,o=f.distance,d=f.indexMatch)}else{var v;ee(v=c.toLowerCase()).call(v,u)!==-1&&(d=c),h=r.levenshteinDistance(e,c),o>h&&(s=c,l=gie(n),o=h)}}return{closestMatch:s,path:l,distance:o,indexMatch:d}}},{key:"printLocation",value:function(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at: +`,a=` + +`+n+`options = { +`,o=0;o":!0,"--":!0},Lr="",Bi=0,Q="",V="",vt=at.NULL;function Aie(){Bi=0,Q=Lr.charAt(0)}function Fe(){Bi++,Q=Lr.charAt(Bi)}function oi(){return Lr.charAt(Bi+1)}function jb(r){var i=r.charCodeAt(0);return i<47?i===35||i===46:i<59?i>47:i<91?i>64:i<96?i===95:i<123?i>96:!1}function Xr(r,i){if(r||(r={}),i)for(var e in i)i.hasOwnProperty(e)&&(r[e]=i[e]);return r}function Rie(r,i,e){for(var t=i.split("."),n=r;t.length;){var a=t.shift();t.length?(n[a]||(n[a]={}),n=n[a]):n[a]=e}}function nO(r,i){for(var e,t,n=null,a=[r],o=r;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(e=0,t=o.nodes.length;e=0;e--){var s,l=a[e];l.nodes||(l.nodes=[]),ee(s=l.nodes).call(s,n)===-1&&l.nodes.push(n)}i.attr&&(n.attr=Xr(n.attr,i.attr))}function Mie(r,i){if(r.edges||(r.edges=[]),r.edges.push(i),r.edge){var e=Xr({},r.edge);i.attr=Xr(e,i.attr)}}function iO(r,i,e,t,n){var a={from:i,to:e,type:t};return r.edge&&(a.attr=Xr({},r.edge)),a.attr=Xr(a.attr||{},n),n!=null&&n.hasOwnProperty("arrows")&&n.arrows!=null&&(a.arrows={to:{enabled:!0,type:n.arrows.type}},n.arrows=null),a}function he(){for(vt=at.NULL,V="";Q===" "||Q===" "||Q===` +`||Q==="\r";)Fe();do{var r=!1;if(Q==="#"){for(var i=Bi-1;Lr.charAt(i)===" "||Lr.charAt(i)===" ";)i--;if(Lr.charAt(i)===` +`||Lr.charAt(i)===""){for(;Q!=""&&Q!=` +`;)Fe();r=!0}}if(Q==="/"&&oi()==="/"){for(;Q!=""&&Q!=` +`;)Fe();r=!0}if(Q==="/"&&oi()==="*"){for(;Q!="";)if(Q==="*"&&oi()==="/"){Fe(),Fe();break}else Fe();r=!0}for(;Q===" "||Q===" "||Q===` +`||Q==="\r";)Fe()}while(r);if(Q===""){vt=at.DELIMITER;return}var e=Q+oi();if(Bb[e]){vt=at.DELIMITER,V=e,Fe(),Fe();return}if(Bb[Q]){vt=at.DELIMITER,V=Q,Fe();return}if(jb(Q)||Q==="-"){for(V+=Q,Fe();jb(Q);)V+=Q,Fe();V==="false"?V=!1:V==="true"?V=!0:isNaN(Number(V))||(V=Number(V)),vt=at.IDENTIFIER;return}if(Q==='"'){for(Fe();Q!=""&&(Q!='"'||Q==='"'&&oi()==='"');)Q==='"'?(V+=Q,Fe()):Q==="\\"&&oi()==="n"?(V+=` +`,Fe()):V+=Q,Fe();if(Q!='"')throw ot('End of string " expected');Fe(),vt=at.IDENTIFIER;return}for(vt=at.UNKNOWN;Q!="";)V+=Q,Fe();throw new SyntaxError('Syntax error in part "'+lO(V,30)+'"')}function Die(){var r={};if(Aie(),he(),V==="strict"&&(r.strict=!0,he()),(V==="graph"||V==="digraph")&&(r.type=V,he()),vt===at.IDENTIFIER&&(r.id=V,he()),V!="{")throw ot("Angle bracket { expected");if(he(),aO(r),V!="}")throw ot("Angle bracket } expected");if(he(),V!=="")throw ot("End of file expected");return he(),delete r.node,delete r.edge,delete r.graph,r}function aO(r){for(;V!==""&&V!="}";)Nie(r),V===";"&&he()}function Nie(r){var i=oO(r);if(i){sO(r,i);return}var e=Fie(r);if(!e){if(vt!=at.IDENTIFIER)throw ot("Identifier expected");var t=V;if(he(),V==="="){if(he(),vt!=at.IDENTIFIER)throw ot("Identifier expected");r[t]=V,he()}else Bie(r,t)}}function oO(r){var i=null;if(V==="subgraph"&&(i={},i.type="subgraph",he(),vt===at.IDENTIFIER&&(i.id=V,he())),V==="{"){if(he(),i||(i={}),i.parent=r,i.node=r.node,i.edge=r.edge,i.graph=r.graph,aO(i),V!="}")throw ot("Angle bracket } expected");he(),delete i.node,delete i.edge,delete i.graph,delete i.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(i)}return i}function Fie(r){return V==="node"?(he(),r.node=Ca(),"node"):V==="edge"?(he(),r.edge=Ca(),"edge"):V==="graph"?(he(),r.graph=Ca(),"graph"):null}function Bie(r,i){var e={id:i},t=Ca();t&&(e.attr=t),nO(r,e),sO(r,i)}function sO(r,i){for(;V==="->"||V==="--";){var e,t=V;he();var n=oO(r);if(n)e=n;else{if(vt!=at.IDENTIFIER)throw ot("Identifier or subgraph expected");e=V,nO(r,{id:e}),he()}var a=Ca(),o=iO(r,i,e,t,a);Mie(r,o),i=e}}function Ca(){for(var r,i=null,e={dashed:!0,solid:!1,dotted:[1,5]},t={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},n=new Array,a=new Array;V==="[";){for(he(),i={};V!==""&&V!="]";){if(vt!=at.IDENTIFIER)throw ot("Attribute name expected");var o=V;if(he(),V!="=")throw ot("Equal sign = expected");if(he(),vt!=at.IDENTIFIER)throw ot("Attribute value expected");var s=V;o==="style"&&(s=e[s]);var l;o==="arrowhead"&&(l=t[s],o="arrows",s={to:{enabled:!0,type:l}}),o==="arrowtail"&&(l=t[s],o="arrows",s={from:{enabled:!0,type:l}}),n.push({attr:i,name:o,value:s}),a.push(o),he(),V==","&&he()}if(V!="]")throw ot("Bracket ] expected");he()}if(Gr(a).call(a,"dir")){var u={};for(u.arrows={},r=0;r"&&(l.arrows="to"),l};ue(n=i.edges).call(n,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;ue(u=o.from.edges).call(u,function(c){var h=a(c);e.edges.push(h)})}if(jie(s,l,function(c,h){var f=iO(e,c.id,h.id,o.type,o.attr),v=a(f);e.edges.push(v)}),o.to instanceof Object&&o.to.edges){var d;ue(d=o.to.edges).call(d,function(c){var h=a(c);e.edges.push(h)})}})}return i.attr&&(e.options=i.attr),e}function zie(r,i){var e,t={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};i!=null&&(i.fixed!=null&&(t.nodes.fixed=i.fixed),i.parseColor!=null&&(t.nodes.parseColor=i.parseColor),i.inheritColor!=null&&(t.edges.inheritColor=i.inheritColor));var n=r.edges,a=Mi(n).call(n,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&&t.edges.inheritColor===!1&&(l.color=s.color),l}),o=Mi(e=r.nodes).call(e,function(s){var l={id:s.id,fixed:t.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&&(t.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 Hie={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"},Wie={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"},Uie={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"},Vie={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"},Gie={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"},Kie={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ó"},qie={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},Yie={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},Xie={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},Jie={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"},Qie={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"},Zie=Object.freeze({__proto__:null,cn:Yie,cs:Qie,de:Wie,en:Hie,es:Uie,fr:Jie,it:Vie,nl:Gie,pt:Kie,ru:qie,uk:Xie});function eae(r,i){try{var e=i.split(/[-_ /]/,2),t=$e(e,2),n=t[0],a=t[1],o=n!=null?n.toLowerCase():null,s=a!=null?a.toUpperCase():null;if(o&&s){var l=o+"-"+s;if(Object.prototype.hasOwnProperty.call(r,l))return l;var u;console.warn(uv(u="Unknown variant ".concat(s," of language ")).call(u,o,"."))}if(o){var d=o;if(Object.prototype.hasOwnProperty.call(r,d))return d;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(i,", falling back to English.")),"en"}catch(c){return console.error(c),console.warn("Unexpected error while normalizing locale ".concat(i,", falling back to English.")),"en"}}var tae=function(){function r(){C(this,r),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return A(r,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var e=this.image.width,t=this.image.height;this.width=e,this.height=t;var n=Math.floor(t/2),a=Math.floor(t/4),o=Math.floor(t/8),s=Math.floor(t/16),l=Math.floor(e/2),u=Math.floor(e/4),d=Math.floor(e/8),c=Math.floor(e/16);this.canvas.width=3*u,this.canvas.height=n,this.coordinates=[[0,0,l,n],[l,0,u,a],[l,a,d,o],[5*d,a,c,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return this.coordinates!==void 0}},{key:"_fillMipMap",value:function(){var e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(var n=1;n2){t*=.5;for(var l=0;t>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],n,a,o,s)}else e.drawImage(this.image,n,a,o,s)}}]),r}(),rae=function(){function r(i){C(this,r),this.images={},this.imageBroken={},this.callback=i}return A(r,[{key:"_tryloadBrokenUrl",value:function(e,t,n){if(!(e===void 0||n===void 0)){if(t===void 0){console.warn("No broken url image defined");return}n.image.onerror=function(){console.error("Could not load brokenImage:",t)},n.image.src=t}}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,t){var n=this,a=this.images[e];if(a)return a;var o=new tae;return this.images[e]=o,o.image.onload=function(){n._fixImageCoordinates(o.image),o.init(),n._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),n._tryloadBrokenUrl(e,t,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))}}]),r}(),uO={exports:{}},nae=te,iae=nae(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}}),aae=te,oae=Ue,sae=Cr,zb=iae,Ws=Object.isExtensible,lae=aae(function(){Ws(1)}),uae=lae||zb?function(i){return!oae(i)||zb&&sae(i)==="ArrayBuffer"?!1:Ws?Ws(i):!0}:Ws,dae=te,dO=!dae(function(){return Object.isExtensible(Object.preventExtensions({}))}),cae=G,hae=ne,fae=Po,vae=Ue,wv=Ve,pae=Dt.f,Hb=Ro,gae=cu,_v=uae,yae=eu,mae=dO,cO=!1,Ir=yae("meta"),bae=0,Ev=function(r){pae(r,Ir,{value:{objectID:"O"+bae++,weakData:{}}})},$ae=function(r,i){if(!vae(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!wv(r,Ir)){if(!_v(r))return"F";if(!i)return"E";Ev(r)}return r[Ir].objectID},wae=function(r,i){if(!wv(r,Ir)){if(!_v(r))return!0;if(!i)return!1;Ev(r)}return r[Ir].weakData},_ae=function(r){return mae&&cO&&_v(r)&&!wv(r,Ir)&&Ev(r),r},Eae=function(){Sae.enable=function(){},cO=!0;var r=Hb.f,i=hae([].splice),e={};e[Ir]=1,r(e).length&&(Hb.f=function(t){for(var n=r(t),a=0,o=n.length;ac;c++)if(f=y(r[c]),f&&Wb(Vb,f))return f;return new Us(!1)}u=Cae(r,d)}for(v=a?r.next:u.next;!(p=Tae(v,u)).done;){try{f=y(p.value)}catch(m){Ub(u,"throw",m)}if(typeof f=="object"&&f&&Wb(Vb,f))return f}return new Us(!1)},Mae=Pe,Dae=TypeError,Ov=function(r,i){if(Mae(i,r))return r;throw new Dae("Incorrect invocation")},Nae=G,Fae=Ee,Bae=wu,jae=te,Lae=ia,zae=Sv,Hae=Ov,Wae=He,Uae=Ue,Vae=ea,Gae=oa,Kae=Dt.f,qae=nn.forEach,Yae=We,hO=Un,Xae=hO.set,Jae=hO.getterFor,Tv=function(r,i,e){var t=r.indexOf("Map")!==-1,n=r.indexOf("Weak")!==-1,a=t?"set":"add",o=Fae[r],s=o&&o.prototype,l={},u;if(!Yae||!Wae(o)||!(n||s.forEach&&!jae(function(){new o().entries().next()})))u=e.getConstructor(i,r,t,a),Bae.enable();else{u=i(function(h,f){Xae(Hae(h,d),{type:r,collection:new o}),Vae(f)||zae(f,h[a],{that:h,AS_ENTRIES:t})});var d=u.prototype,c=Jae(r);qae(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(h){var f=h==="add"||h==="set";h in s&&!(n&&h==="clear")&&Lae(d,h,function(v,p){var g=c(this).collection;if(!f&&n&&!Uae(v))return h==="get"?void 0:!1;var y=g[h](v===0?0:v,p);return f?this:y})}),n||Kae(d,"size",{configurable:!0,get:function(){return c(this).collection.size}})}return Gae(u,r,!1,!0),l[r]=u,Nae({global:!0,forced:!0},l),n||e.setStrong(u,r,t),u},Qae=Co,kv=function(r,i,e){for(var t in i)e&&e.unsafe&&r[t]?r[t]=i[t]:Qae(r,t,i[t],e);return r},Zae=Wt,eoe=nv,toe=Se,roe=We,Gb=toe("species"),noe=function(r){var i=Zae(r);roe&&i&&!i[Gb]&&eoe(i,Gb,{configurable:!0,get:function(){return this}})},ioe=aa,aoe=nv,Kb=kv,ooe=ko,soe=Ov,loe=ea,uoe=Sv,doe=Qf,Ss=Zf,coe=noe,ga=We,qb=wu.fastKey,fO=Un,Yb=fO.set,kc=fO.getterFor,vO={getConstructor:function(r,i,e,t){var n=r(function(u,d){soe(u,a),Yb(u,{type:i,index:ioe(null),first:void 0,last:void 0,size:0}),ga||(u.size=0),loe(d)||uoe(d,u[t],{that:u,AS_ENTRIES:e})}),a=n.prototype,o=kc(i),s=function(u,d,c){var h=o(u),f=l(u,d),v,p;return f?f.value=c:(h.last=f={index:p=qb(d,!0),key:d,value:c,previous:v=h.last,next:void 0,removed:!1},h.first||(h.first=f),v&&(v.next=f),ga?h.size++:u.size++,p!=="F"&&(h.index[p]=f)),u},l=function(u,d){var c=o(u),h=qb(d),f;if(h!=="F")return c.index[h];for(f=c.first;f;f=f.next)if(f.key===d)return f};return Kb(a,{clear:function(){for(var d=this,c=o(d),h=c.index,f=c.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete h[f.index],f=f.next;c.first=c.last=void 0,ga?c.size=0:d.size=0},delete:function(u){var d=this,c=o(d),h=l(d,u);if(h){var f=h.next,v=h.previous;delete c.index[h.index],h.removed=!0,v&&(v.next=f),f&&(f.previous=v),c.first===h&&(c.first=f),c.last===h&&(c.last=v),ga?c.size--:d.size--}return!!h},forEach:function(d){for(var c=o(this),h=ooe(d,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:c.first;)for(h(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(d){return!!l(this,d)}}),Kb(a,e?{get:function(d){var c=l(this,d);return c&&c.value},set:function(d,c){return s(this,d===0?0:d,c)}}:{add:function(d){return s(this,d=d===0?0:d,d)}}),ga&&aoe(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(r,i,e){var t=i+" Iterator",n=kc(i),a=kc(t);doe(r,i,function(o,s){Yb(this,{type:t,target:o,state:n(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,Ss(void 0,!0)):Ss(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},e?"entries":"values",!e,!0),coe(i)}},hoe=Tv,foe=vO;hoe("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},foe);var voe=re,poe=voe.Map,goe=poe,yoe=goe,moe=yoe,pO=z(moe),boe=function(){function r(){C(this,r),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},Re(this.options,this.defaultOptions)}return A(r,[{key:"setOptions",value:function(e){var t=["useDefaultGroups"];if(e!==void 0){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ee(t).call(t,n)===-1){var a=e[n];this.add(n,a)}}}},{key:"clear",value:function(){this._groups=new pO,this._groupNames=[]}},{key:"get",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._groups.get(e);if(n===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){var a=this._groupIndex%this._groupNames.length;++this._groupIndex,n={},n.color=this._groups.get(this._groupNames[a]),this._groups.set(e,n)}else{var o=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,n={},n.color=this._defaultGroups[o],this._groups.set(e,n)}return n}},{key:"add",value:function(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}]),r}(),$oe=G;$oe({target:"Number",stat:!0},{isNaN:function(i){return i!==i}});var woe=re,_oe=woe.Number.isNaN,Eoe=_oe,Soe=Eoe,Ooe=Soe,Kh=z(Ooe),Toe=Ee,koe=Toe.isFinite,Ioe=Number.isFinite||function(i){return typeof i=="number"&&koe(i)},Poe=G,xoe=Ioe;Poe({target:"Number",stat:!0},{isFinite:xoe});var Coe=re,Aoe=Coe.Number.isFinite,Roe=Aoe,Moe=Roe,Doe=Moe,pn=z(Doe),Noe=G,Foe=nn.some,Boe=ua,joe=Boe("some");Noe({target:"Array",proto:!0,forced:!joe},{some:function(i){return Foe(this,i,arguments.length>1?arguments[1]:void 0)}});var Loe=Ge,zoe=Loe("Array").some,Hoe=Pe,Woe=zoe,Ic=Array.prototype,Uoe=function(r){var i=r.some;return r===Ic||Hoe(Ic,r)&&i===Ic.some?Woe:i},Voe=Uoe,Goe=Voe,Koe=Goe,qoe=z(Koe),Yoe=re,Xoe=Yoe.Object.getOwnPropertySymbols,Joe=Xoe,Qoe=Joe,Zoe=Qoe,Jr=z(Zoe),gO={exports:{}},ese=G,tse=te,rse=hr,yO=Zi.f,mO=We,nse=!mO||tse(function(){yO(1)});ese({target:"Object",stat:!0,forced:nse,sham:!mO},{getOwnPropertyDescriptor:function(i,e){return yO(rse(i),e)}});var ise=re,bO=ise.Object,ase=gO.exports=function(i,e){return bO.getOwnPropertyDescriptor(i,e)};bO.getOwnPropertyDescriptor.sham&&(ase.sham=!0);var ose=gO.exports,sse=ose,$O=sse,lse=$O,on=z(lse),use=G,dse=We,cse=kZ,hse=hr,fse=Zi,vse=la;use({target:"Object",stat:!0,sham:!dse},{getOwnPropertyDescriptors:function(i){for(var e=hse(i),t=fse.f,n=cse(e),a={},o=0,s,l;n.length>o;)l=t(e,s=n[o++]),l!==void 0&&vse(a,s,l);return a}});var pse=re,gse=pse.Object.getOwnPropertyDescriptors,yse=gse,mse=yse,bse=mse,Qr=z(bse),wO={exports:{}},$se=G,wse=We,Xb=ou.f;$se({target:"Object",stat:!0,forced:Object.defineProperties!==Xb,sham:!wse},{defineProperties:Xb});var _se=re,_O=_se.Object,Ese=wO.exports=function(i,e){return _O.defineProperties(i,e)};_O.defineProperties.sham&&(Ese.sham=!0);var Sse=wO.exports,Ose=Sse,Tse=Ose,kse=Tse,_u=z(kse),Ise=TE,Eu=z(Ise);function Su(r,i,e){return i=aS(i),i in r?du(r,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[i]=e,r}var EO=Ee,Pse=te,xse=ne,Cse=fr,Ase=yS.trim,Rse=dv,Mse=xse("".charAt),bl=EO.parseFloat,Jb=EO.Symbol,Qb=Jb&&Jb.iterator,Dse=1/bl(Rse+"-0")!==-1/0||Qb&&!Pse(function(){bl(Object(Qb))}),Nse=Dse?function(i){var e=Ase(Cse(i)),t=bl(e);return t===0&&Mse(e,0)==="-"?-0:t}:bl,Fse=G,Zb=Nse;Fse({global:!0,forced:parseFloat!==Zb},{parseFloat:Zb});var Bse=re,jse=Bse.parseFloat,Lse=jse,zse=Lse,Hse=zse,SO=z(Hse),Wse=G,Use=te,Vse=cu.f,Gse=Use(function(){return!Object.getOwnPropertyNames(1)});Wse({target:"Object",stat:!0,forced:Gse},{getOwnPropertyNames:Vse});var Kse=re,qse=Kse.Object,Yse=function(i){return qse.getOwnPropertyNames(i)},Xse=Yse,Jse=Xse,Qse=Jse,Zse=z(Qse);function Iv(r,i){var e=["node","edge","label"],t=!0,n=Br(i,"chosen");if(typeof n=="boolean")t=n;else if(le(n)==="object"){if(ee(e).call(e,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+e.join("', '")+"'");var a=Br(i,["chosen",r]);(typeof a=="boolean"||typeof a=="function")&&(t=a)}return t}function qh(r,i,e){if(r.width<=0||r.height<=0)return!1;if(e!==void 0){var t={x:i.x-e.x,y:i.y-e.y};if(e.angle!==0){var n=-e.angle,a={x:Math.cos(n)*t.x-Math.sin(n)*t.y,y:Math.sin(n)*t.x+Math.cos(n)*t.y};i=a}else i=t}var o=r.x+r.width,s=r.y+r.width;return r.lefti.x&&r.topi.y}function $l(r){return typeof r=="string"&&r!==""}function OO(r,i,e,t){var n=t.x,a=t.y;if(typeof t.distanceToBorder=="function"){var o=t.distanceToBorder(r,i),s=Math.sin(i)*o,l=Math.cos(i)*o;l===o?(n+=o,a=t.y):s===o?(n=t.x,a-=o):(n+=l,a-=s)}else t.shape.width>t.shape.height?(n=t.x+t.shape.width*.5,a=t.y-e):(n=t.x+e,a=t.y-t.shape.height*.5);return{x:n,y:a}}var ele=Ge,tle=ele("Array").values,rle=tle,nle=rle,ile=Wn,ale=Ve,ole=Pe,sle=nle,Pc=Array.prototype,lle={DOMTokenList:!0,NodeList:!0},ule=function(r){var i=r.values;return r===Pc||ole(Pc,r)&&i===Pc.values||ale(lle,ile(r))?sle:i},dle=ule,TO=z(dle),cle=function(){function r(i){C(this,r),this.measureText=i,this.current=0,this.width=0,this.height=0,this.lines=[]}return A(r,[{key:"_add",value:function(e,t){var n=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=t;(t===void 0||t==="")&&(a=" ");var o=this.measureText(a,n),s=Re({},TO(o));s.text=t,s.width=o.width,s.mod=n,(t===void 0||t==="")&&(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 t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}},{key:"newLine",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}},{key:"determineLineHeights",value:function(){for(var e=0;ee&&(e=a.width),t+=a.height}this.width=e,this.height=t}},{key:"removeEmptyBlocks",value:function(){for(var e=[],t=0;t"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},e$=function(){function r(i){C(this,r),this.text=i,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return A(r,[{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,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}},{key:"match",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.prepareRegExp(e),a=$e(n,2),o=a[0],s=a[1],l=o.test(this.text.substr(this.position,s));return l&&t&&(this.position+=s-1),l}},{key:"parseEndTag",value:function(e,t,n){var a=this.mod()===e;return e==="mono"?a=a&&this.mono:a=a&&!this.mono,a&&this.match(t)?(n!==void 0?(this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}},{key:"replace",value:function(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}},{key:"prepareRegExp",value:function(e){var t,n;if(e instanceof RegExp)n=e,t=1;else{var a=hle[e];a!==void 0?n=a:n=new RegExp(e),t=e.length}return[n,t]}}]),r}(),fle=function(){function r(i,e,t,n){var a=this;C(this,r),this.ctx=i,this.parent=e,this.selected=t,this.hover=n;var o=function(l,u){if(l===void 0)return 0;var d=a.parent.getFormattingValues(i,t,n,u),c=0;if(l!==""){var h=a.ctx.measureText(l);c=h.width}return{width:c,values:d}};this.lines=new cle(o)}return A(r,[{key:"process",value:function(e){if(!$l(e))return this.lines.finalize();var t=this.parent.fontOptions;e=e.replace(/\r\n/g,` +`),e=e.replace(/\r/g,` +`);var n=String(e).split(` +`),a=n.length;if(t.multi)for(var o=0;o0)for(var l=0;l0)for(var v=0;v")||t.parseStartTag("ital","")||t.parseStartTag("mono","")||t.parseEndTag("bold","")||t.parseEndTag("ital","")||t.parseEndTag("mono",""))||n(a);o||t.add(a),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t=this,n=new e$(e),a=!0,o=function(d){return/\\/.test(d)?(n.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",n=0;n1&&arguments[1]!==void 0?arguments[1]:"normal",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),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(Xe(s).call(s,0,l),t),a[0]=Xe(s).call(s,l)}else{var u=o;a[o-1]===" "?o--:a[u]===" "&&u++;var d=Xe(a).call(a,0,o).join("");o==a.length&&n?this.lines.append(d,t):this.lines.newLine(d,t),a=Xe(a).call(a,u)}}}}]),r}(),ya=["bold","ital","boldital","mono"],kO=function(){function r(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;C(this,r),this.body=i,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=t}return A(r,[{key:"setOptions",value:function(e){if(this.elementOptions=e,this.initFontOptions(e.font),$l(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(le(e.font)==="object"){var t=e.font.size;t!==void 0&&(this.baseSize=t)}}}},{key:"initFontOptions",value:function(e){var t=this;if(Z(ya,function(n){t.fontOptions[n]={}}),r.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}Z(e,function(n,a){n!=null&&le(n)!=="object"&&(t.fontOptions[a]=n)})}},{key:"constrain",value:function(e){var t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},n=Br(e,"widthConstraint");if(typeof n=="number")t.maxWdt=Number(n),t.minWdt=Number(n);else if(le(n)==="object"){var a=Br(e,["widthConstraint","maximum"]);typeof a=="number"&&(t.maxWdt=Number(a));var o=Br(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}var s=Br(e,"heightConstraint");if(typeof s=="number")t.minHgt=Number(s);else if(le(s)==="object"){var l=Br(e,["heightConstraint","minimum"]);typeof l=="number"&&(t.minHgt=Number(l));var u=Br(e,["heightConstraint","valign"]);typeof u=="string"&&(u==="top"||u==="bottom")&&(t.valign=u)}return t}},{key:"update",value:function(e,t){this.setOptions(e,!0),this.propagateFonts(t),ce(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=Iv("label",t)}},{key:"adjustSizes",value:function(e){var t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);var n=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=n)}},{key:"addFontOptionsToPile",value:function(e,t){for(var n=0;n5&&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,t,n,s),this._drawBackground(e),this._drawText(e,t,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 t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}},{key:"_drawText",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0,s=this._setAlignment(e,t,n,a),l=$e(s,2);t=l[0],n=l[1],e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(n-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(n+=(this.size.height-this.size.labelHeight)/2));for(var u=0;u0&&(e.lineWidth=f.strokeWidth,e.strokeStyle=y,e.lineJoin="round"),e.fillStyle=g,f.strokeWidth>0&&e.strokeText(f.text,t+c,n+f.vadjust),e.fillText(f.text,t+c,n+f.vadjust),c+=f.width}n+=d.height}}}},{key:"_setAlignment",value:function(e,t,n,a){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,n=0;var o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",n-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",n+=2*o):e.textBaseline="middle"}else e.textBaseline=a;return[t,n]}},{key:"_getColor",value:function(e,t,n){var a=e||"#000000",o=n||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));a=jt(a,s),o=jt(o,s)}return[a,o]}},{key:"getTextSize",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var e=2,t=this.size.left,n=this.size.top-.5*e;if(this.isEdgeLabel){var a=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=a,n=-this.size.height*.5;break;case"top":t=a,n=-(this.size.height+e);break;case"bottom":t=a,n=e;break}}var o={left:t,top:n,width:this.size.width,height:this.size.height};return o}},{key:"calculateLabelSize",value:function(e,t,n){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,t,n),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,t,n,a){var o=function(d,c,h){return c==="normal"?h==="mod"?"":d[h]:d[c][h]!==void 0?d[c][h]:d[h]},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};(t||n)&&(a==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,t,n));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,t){return e!==this.selectedState||t!==this.hoverState}},{key:"_processLabelText",value:function(e,t,n,a){var o=new fle(e,this,t,n);return o.process(a)}},{key:"_processLabel",value:function(e,t,n){if(!(this.labelDirty===!1&&!this.differentState(t,n))){var a=this._processLabelText(e,t,n,this.elementOptions.label);this.fontOptions.minWdt>0&&a.width0&&a.height0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}},{key:"performFill",value:function(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),Bo(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}},{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,t,n,a,o){n!==void 0&&this.resize(n,a,o),this.left=e-this.width/2,this.top=t-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,t,n,a,o){this._updateBoundingBox(e,t,n,a,o)}},{key:"getDimensionsFromLabel",value:function(e,t,n){this.textSize=this.labelModule.getTextSize(e,t,n);var a=this.textSize.width,o=this.textSize.height,s=14;return a===0&&(a=s,o=s),{width:a,height:o}}}]),r}();function iue(r){var i=aue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function aue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var oue=function(r){ie(e,r);var i=iue(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return A(e,[{key:"resize",value:function(n){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(n,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(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(n,u),q_(n,this.left,this.top,this.width,this.height,u.borderRadius),this.performFill(n,u),this.updateBoundingBox(a,o,n,s,l),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l)}},{key:"updateBoundingBox",value:function(n,a,o,s,l){this._updateBoundingBox(n,a,o,s,l);var u=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(u)}},{key:"distanceToBorder",value:function(n,a){n&&this.resize(n);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}(Yn);function sue(r){var i=lue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function lue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Cv=function(r){ie(e,r);var i=sue(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o.labelOffset=0,o.selected=!1,o}return A(e,[{key:"setOptions",value:function(n,a,o){this.options=n,a===void 0&&o===void 0||this.setImages(a,o)}},{key:"setImages",value:function(n,a){a&&this.selected?(this.imageObj=a,this.imageObjAlt=n):(this.imageObj=n,this.imageObjAlt=a)}},{key:"switchImages",value:function(n){var a=n&&!this.selected||!n&&this.selected;if(this.selected=n,this.imageObjAlt!==void 0&&a){var o=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=o}}},{key:"_getImagePadding",value:function(){var n={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var a=this.options.imagePadding;le(a)=="object"?(n.top=a.top,n.right=a.right,n.bottom=a.bottom,n.left=a.left):(n.top=a,n.right=a,n.bottom=a,n.left=a)}return n}},{key:"_resizeImage",value:function(){var n,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),n=this.options.size*2*o,a=this.options.size*2*s}else{var l=this._getImagePadding();n=this.imageObj.width+l.left+l.right,a=this.imageObj.height+l.top+l.bottom}this.width=n,this.height=a,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(n,a,o,s){this.initContextForDraw(n,s),qf(n,a,o,s.size),this.performFill(n,s)}},{key:"_drawImageAtPosition",value:function(n,a){if(this.imageObj.width!=0){n.globalAlpha=a.opacity!==void 0?a.opacity:1,this.enableShadow(n,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,d=this.width-s.left-s.right,c=this.height-s.top-s.bottom;this.imageObj.drawImageAtPosition(n,o,l,u,d,c),this.disableShadow(n,a)}}},{key:"_drawImageLabel",value:function(n,a,o,s,l){var u=0;if(this.height!==void 0){u=this.height*.5;var d=this.labelModule.getTextSize(n,s,l);d.lineCount>=1&&(u+=d.height/2)}var c=o+u;this.options.label&&(this.labelOffset=u),this.labelModule.draw(n,a,c,s,l,"hanging")}}]),e}(Yn);function uue(r){var i=due();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function due(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var cue=function(r){ie(e,r);var i=uue(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return A(e,[{key:"resize",value:function(n){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(n,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(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this._drawRawCircle(n,a,o,u),this.updateBoundingBox(a,o),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,o,s,l)}},{key:"updateBoundingBox",value:function(n,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+this.options.size,this.boundingBox.bottom=a+this.options.size}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.width*.5}}]),e}(Cv);function hue(r){var i=fue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function fue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var vue=function(r){ie(e,r);var i=hue(e);function e(t,n,a,o,s){var l;return C(this,e),l=i.call(this,t,n,a),l.setImages(o,s),l}return A(e,[{key:"resize",value:function(n){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(n,a,o,s,l,u){this.switchImages(s),this.resize();var d=a,c=o;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,d+=this.width/2,c+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this._drawRawCircle(n,d,c,u),n.save(),n.clip(),this._drawImageAtPosition(n,u),n.restore(),this._drawImageLabel(n,d,c,s,l),this.updateBoundingBox(a,o)}},{key:"updateBoundingBox",value:function(n,a){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=a,this.boundingBox.left=n,this.boundingBox.right=n+this.options.size*2,this.boundingBox.bottom=a+this.options.size*2):(this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+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(n){return n&&this.resize(n),this.width*.5}}]),e}(Cv);function pue(r){var i=gue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function gue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var sn=function(r){ie(e,r);var i=pue(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"resize",value:function(n){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(n,a,o);var d=2*s.size;this.width=(l=this.customSizeWidth)!==null&&l!==void 0?l:d,this.height=(u=this.customSizeHeight)!==null&&u!==void 0?u:d,this.radius=.5*this.width}}},{key:"_drawShape",value:function(n,a,o,s,l,u,d,c){var h=this;return this.resize(n,u,d,c),this.left=s-this.width/2,this.top=l-this.height/2,this.initContextForDraw(n,c),JV(a)(n,s,l,c.size),this.performFill(n,c),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(n.font=(u?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),n.fillStyle=this.options.icon.color||"black",n.textAlign="center",n.textBaseline="middle",n.fillText(this.options.icon.code,s,l)),{drawExternalLabel:function(){if(h.options.label!==void 0){h.labelModule.calculateLabelSize(n,u,d,s,l,"hanging");var v=l+.5*h.height+.5*h.labelModule.size.height;h.labelModule.draw(n,s,v,u,d,"hanging")}h.updateBoundingBox(s,l)}}}},{key:"updateBoundingBox",value:function(n,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+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}(Yn);function a$(r,i){var e=be(r);if(Jr){var t=Jr(r);i&&(t=mt(t).call(t,function(n){return on(r,n).enumerable})),e.push.apply(e,t)}return e}function yue(r){for(var i=1;i"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var $ue=function(r){ie(e,r);var i=mue(e);function e(t,n,a,o){var s;return C(this,e),s=i.call(this,t,n,a,o),s.ctxRenderer=o,s}return A(e,[{key:"draw",value:function(n,a,o,s,l,u){this.resize(n,s,l,u),this.left=a-this.width/2,this.top=o-this.height/2,n.save();var d=this.ctxRenderer({ctx:n,id:this.options.id,x:a,y:o,state:{selected:s,hover:l},style:yue({},u),label:this.options.label});if(d.drawNode!=null&&d.drawNode(),n.restore(),d.drawExternalLabel){var c=d.drawExternalLabel;d.drawExternalLabel=function(){n.save(),c(),n.restore()}}return d.nodeDimensions&&(this.customSizeWidth=d.nodeDimensions.width,this.customSizeHeight=d.nodeDimensions.height),d}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(sn);function wue(r){var i=_ue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function _ue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Eue=function(r){ie(e,r);var i=wue(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return A(e,[{key:"resize",value:function(n,a,o){if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(n,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(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(n,u),Y_(n,a-this.width/2,o-this.height/2,this.width,this.height),this.performFill(n,u),this.updateBoundingBox(a,o,n,s,l),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(Yn);function Sue(r){var i=Oue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function Oue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Tue=function(r){ie(e,r);var i=Sue(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"diamond",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(sn);function kue(r){var i=Iue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function Iue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Pue=function(r){ie(e,r);var i=kue(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"circle",2,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.options.size}}]),e}(sn);function xue(r){var i=Cue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function Cue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var o$=function(r){ie(e,r);var i=xue(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"resize",value:function(n){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(n,a,o);this.height=s.height*2,this.width=s.width+s.height,this.radius=.5*this.width}}},{key:"draw",value:function(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width*.5,this.top=o-this.height*.5,this.initContextForDraw(n,u),Eh(n,this.left,this.top,this.width,this.height),this.performFill(n,u),this.updateBoundingBox(a,o,n,s,l),this.labelModule.draw(n,a,o,s,l)}},{key:"distanceToBorder",value:function(n,a){n&&this.resize(n);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}(Yn);function Aue(r){var i=Rue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function Rue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Mue=function(r){ie(e,r);var i=Aue(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return A(e,[{key:"resize",value:function(n,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(n,a,o,s,l,u){var d=this;return this.resize(n,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(n,a,o,s,l,u),{drawExternalLabel:function(){if(d.options.label!==void 0){var h=5;d.labelModule.draw(n,d.left+d.iconSize.width/2+d.margin.left,o+d.height/2+h,s)}d.updateBoundingBox(a,o)}}}},{key:"updateBoundingBox",value:function(n,a){if(this.boundingBox.top=a-this.options.icon.size*.5,this.boundingBox.left=n-this.options.icon.size*.5,this.boundingBox.right=n+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(n,a,o,s,l,u){var d=Number(this.options.icon.size);this.options.icon.code!==void 0?(n.font=[this.options.icon.weight!=null?this.options.icon.weight:s?"bold":"",(this.options.icon.weight!=null&&s?5:0)+d+"px",this.options.icon.face].join(" "),n.fillStyle=this.options.icon.color||"black",n.textAlign="center",n.textBaseline="middle",this.enableShadow(n,u),n.fillText(this.options.icon.code,a,o),this.disableShadow(n,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(n,a){return this._distanceToBorder(n,a)}}]),e}(Yn);function Due(r){var i=Nue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function Nue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Fue=function(r){ie(e,r);var i=Due(e);function e(t,n,a,o,s){var l;return C(this,e),l=i.call(this,t,n,a),l.setImages(o,s),l}return A(e,[{key:"resize",value:function(n){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(n,a,o,s,l,u){n.save(),this.switchImages(s),this.resize();var d=a,c=o;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,d+=this.width/2,c+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){var h=this.options.borderWidth,f=this.options.borderWidthSelected||2*this.options.borderWidth,v=(s?f:h)/this.body.view.scale;n.lineWidth=Math.min(this.width,v),n.beginPath();var p=s?this.options.color.highlight.border:l?this.options.color.hover.border:this.options.color.border,g=s?this.options.color.highlight.background:l?this.options.color.hover.background:this.options.color.background;u.opacity!==void 0&&(p=jt(p,u.opacity),g=jt(g,u.opacity)),n.strokeStyle=p,n.fillStyle=g,n.rect(this.left-.5*n.lineWidth,this.top-.5*n.lineWidth,this.width+n.lineWidth,this.height+n.lineWidth),Bo(n).call(n),this.performStroke(n,u),n.closePath()}this._drawImageAtPosition(n,u),this._drawImageLabel(n,d,c,s,l),this.updateBoundingBox(a,o),n.restore()}},{key:"updateBoundingBox",value:function(n,a){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=n,this.top=a):(this.left=n-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(n,a){return this._distanceToBorder(n,a)}}]),e}(Cv);function Bue(r){var i=jue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function jue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Lue=function(r){ie(e,r);var i=Bue(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"square",2,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(sn);function zue(r){var i=Hue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function Hue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Wue=function(r){ie(e,r);var i=zue(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"hexagon",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(sn);function Uue(r){var i=Vue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function Vue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Gue=function(r){ie(e,r);var i=Uue(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"star",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(sn);function Kue(r){var i=que();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function que(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Yue=function(r){ie(e,r);var i=Kue(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return A(e,[{key:"resize",value:function(n,a,o){this.needsRefresh(a,o)&&(this.textSize=this.labelModule.getTextSize(n,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(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.enableShadow(n,u),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l),this.disableShadow(n,u),this.updateBoundingBox(a,o,n,s,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(Yn);function Xue(r){var i=Jue();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function Jue(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Que=function(r){ie(e,r);var i=Xue(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"triangle",3,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(sn);function Zue(r){var i=ede();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function ede(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var tde=function(r){ie(e,r);var i=Zue(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"triangleDown",3,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(sn);function s$(r,i){var e=be(r);if(Jr){var t=Jr(r);i&&(t=mt(t).call(t,function(n){return on(r,n).enumerable})),e.push.apply(e,t)}return e}function l$(r){for(var i=1;ie.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,t,n){var a;if(n!==void 0){var o=e.group;if(t!==void 0&&t.group!==void 0&&o!==t.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=n.get(o);l.opacity!==void 0&&t.opacity===void 0&&(r.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=mt(a=Zse(t)).call(a,function(d){return t[d]!=null});u.push("font"),yl(u,e,l),e.color=Wh(e.color)}}}},{key:"parseOptions",value:function(e,t){var n=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(yl(s,e,t,n),r.checkMass(t),e.opacity!==void 0&&(r.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(r.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!r.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),Bt(e,t,"shadow",a),t.color!==void 0&&t.color!==null){var l=Wh(t.color);JS(e.color,l)}else n===!0&&t.color===null&&(e.color=qr(a.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),n===!0&&t.font===null&&(e.font=qr(a.font)),r.updateGroupOptions(e,t,o),t.scaling!==void 0&&Bt(e.scaling,t.scaling,"label",a.scaling)}},{key:"checkMass",value:function(e,t){if(e.mass!==void 0&&e.mass<=0){var n="";t!==void 0&&(n=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+n+", setting mass to 1.",tO),e.mass=1}}}]),r}();function rde(r,i){var e=typeof an<"u"&&Gn(r)||r["@@iterator"];if(!e){if(oe(r)||(e=nde(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},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 nde(r,i){var e;if(r){if(typeof r=="string")return u$(r,i);var t=Xe(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Vn(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u$(r,i)}}function u$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);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 t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(var n=0,a=be(this.body.nodes);n1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.data.nodes;if(k_("id",e))this.body.data.nodes=e;else if(oe(e))this.body.data.nodes=new ll,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new ll;else throw new TypeError("Array or DataSet expected");if(n&&Z(this.nodesListeners,function(s,l){n.off(l,s)}),this.body.nodes={},this.body.data.nodes){var a=this;Z(this.nodesListeners,function(s,l){a.body.data.nodes.on(l,s)});var o=this.body.data.nodes.getIds();this.add(o,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,a=[],o=0;o1&&arguments[1]!==void 0?arguments[1]:Pt;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Z(this.body.nodes,function(n,a){var o=e.body.data.nodes.get(a);o!==void 0&&(t===!0&&n.setOptions({x:null,y:null}),n.setOptions({fixed:!1}),n.setOptions(o))})}},{key:"getPositions",value:function(e){var t={};if(e!==void 0){if(oe(e)===!0){for(var n=0;n0?(l=s/o,t+=l*l):t+=s;return o===1/0?1/0:o*Cde(t)}});var Rde=re,Mde=Rde.Math.hypot,Dde=Mde,Nde=Dde,Fde=Nde,Bde=z(Fde);function AO(r){var i=jde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function jde(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Ie=function(){function r(){C(this,r)}return A(r,null,[{key:"transform",value:function(e,t){oe(e)||(e=[e]);for(var n=t.point.x,a=t.point.y,o=t.angle,s=t.length,l=0;l4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,o):this._drawLine(e,t,o)}},{key:"_drawLine",value:function(e,t,n,a,o){if(this.from!=this.to)this._line(e,t,n,a,o);else{var s=this._getCircleData(e),l=$e(s,3),u=l[0],d=l[1],c=l[2];this._circle(e,t,u,d,c)}}},{key:"_drawDashedLine",value:function(e,t,n,a,o){e.lineCap="round";var s=oe(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,n);else{var l=this._getCircleData(e),u=$e(l,3),d=u[0],c=u[1],h=u[2];this._circle(e,t,d,c,h)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)X_(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{var f=this._getCircleData(e),v=$e(f,3),p=v[0],g=v[1],y=v[2];this._circle(e,t,p,g,y)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}},{key:"findBorderPosition",value:function(e,t,n){return this.from!=this.to?this._findBorderPosition(e,t,n):this._findBorderPositionCircle(e,t,n)}},{key:"findBorderPositions",value:function(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};var t,n=Xe(t=this._getCircleData(e)).call(t,0,2),a=$e(n,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 t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);var n=OO(e,this.options.selfReference.angle,t,this.from);return[n.x,n.y,t]}},{key:"_pointOnCircle",value:function(e,t,n,a){var o=a*2*Math.PI;return{x:e+n*Math.cos(o),y:t-n*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,t,n){var a=n.x,o=n.y,s=n.low,l=n.high,u=n.direction,d=10,c=this.options.selfReference.size,h=.05,f,v=(s+l)*.5,p=0;this.options.arrowStrikethrough===!0&&(u===-1?p=this.options.endPointOffset.from:u===1&&(p=this.options.endPointOffset.to));var g=0;do{v=(s+l)*.5,f=this._pointOnCircle(a,o,c,v);var y=Math.atan2(e.y-f.y,e.x-f.x),m=e.distanceToBorder(t,y)+p,$=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),b=m-$;if(Math.abs(b)0?u>0?s=v:l=v:u>0?l=v:s=v,++g}while(s<=l&&g1?c=1:c<0&&(c=0);var h=e+c*l,f=t+c*u,v=h-o,p=f-s;return Math.sqrt(v*v+p*p)}},{key:"getArrowData",value:function(e,t,n,a,o,s){var l,u,d,c,h,f,v,p=s.width;t==="from"?(d=this.from,c=this.to,h=s.fromArrowScale<0,f=Math.abs(s.fromArrowScale),v=s.fromArrowType):t==="to"?(d=this.to,c=this.from,h=s.toArrowScale<0,f=Math.abs(s.toArrowScale),v=s.toArrowType):(d=this.to,c=this.from,h=s.middleArrowScale<0,f=Math.abs(s.middleArrowScale),v=s.middleArrowType);var g=15*f+3*p;if(d!=c){var y=Bde(d.x-c.x,d.y-c.y),m=g/y;if(t!=="middle")if(this.options.smooth.enabled===!0){var $=this._findBorderPosition(d,e,{via:n}),b=this.getPoint($.t+m*(t==="from"?1:-1),n);l=Math.atan2($.y-b.y,$.x-b.x),u=$}else l=Math.atan2(d.y-c.y,d.x-c.x),u=this._findBorderPosition(d,e);else{var _=(h?-m:m)/2,O=this.getPoint(.5+_,n),M=this.getPoint(.5-_,n);l=Math.atan2(O.y-M.y,O.x-M.x),u=this.getPoint(.5,n)}}else{var j=this._getCircleData(e),D=$e(j,3),N=D[0],U=D[1],J=D[2];if(t==="from"){var X=this.options.selfReference.angle,ye=this.options.selfReference.angle+Math.PI,Ke=this._findBorderPositionCircle(this.from,e,{x:N,y:U,low:X,high:ye,direction:-1});l=Ke.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=Ke}else if(t==="to"){var xe=this.options.selfReference.angle,Tt=this.options.selfReference.angle+Math.PI,nt=this._findBorderPositionCircle(this.from,e,{x:N,y:U,low:xe,high:Tt,direction:1});l=nt.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=nt}else{var Qe=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(N,U,J,Qe),l=Qe*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var kt=u.x-g*.9*Math.cos(l),Ze=u.y-g*.9*Math.sin(l),fe={x:kt,y:Ze};return{point:u,core:fe,angle:l,length:g,type:v}}},{key:"drawArrowHead",value:function(e,t,n,a,o){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width;var s=RO.draw(e,o);s&&(this.enableShadow(e,t),Bo(e).call(e),this.disableShadow(e,t))}},{key:"enableShadow",value:function(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,t){if(t.background!==!1){var n={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=n.strokeStyle,e.lineWidth=n.lineWidth,e.dashes=n.dashes,this.setStrokeDashed(e,t.dashes)}}},{key:"setStrokeDashed",value:function(e,t){if(t!==!1)if(e.setLineDash!==void 0){var n=oe(t)?t:[5,5];e.setLineDash(n)}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.")}}]),r}();function p$(r,i){var e=be(r);if(Jr){var t=Jr(r);i&&(t=mt(t).call(t,function(n){return on(r,n).enumerable})),e.push.apply(e,t)}return e}function g$(r){for(var i=1;i"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Av=function(r){ie(e,r);var i=Qde(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"_findBorderPositionBezier",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),s=10,l=.2,u=!1,d=1,c=0,h=this.to,f,v,p=this.options.endPointOffset?this.options.endPointOffset.to:0;n.id===this.from.id&&(h=this.from,u=!0,p=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(p=0);var g=0;do{v=(c+d)*.5,f=this.getPoint(v,o);var y=Math.atan2(h.y-f.y,h.x-f.x),m=h.distanceToBorder(a,y)+p,$=Math.sqrt(Math.pow(f.x-h.x,2)+Math.pow(f.y-h.y,2)),b=m-$;if(Math.abs(b)0&&(h=this._getDistanceToLine(y,m,p,g,l,u),c=h"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var y$=function(r){ie(e,r);var i=ece(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o.via=o.via,o._boundFunction=function(){o.positionBezierNode()},o._body.emitter.on("_repositionBezierNodes",o._boundFunction),o}return A(e,[{key:"setOptions",value:function(n){Vs(F(e.prototype),"setOptions",this).call(this,n);var a=!1;this.options.physics!==n.physics&&(a=!0),this.options=n,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 n="edgeId:"+this.id,a=this._body.functions.createNode({id:n,shape:"circle",physics:!0,hidden:!0});this._body.nodes[n]=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(n,a,o){this._bezierCurve(n,a,o)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var o=this._getCircleData(),s=$e(o,3),l=s[0],u=s[1],d=s[2],c=2*Math.PI*(1-n);return{x:l+d*Math.sin(c),y:u+d-d*(1-Math.cos(c))}}else return{x:Math.pow(1-n,2)*this.fromPoint.x+2*n*(1-n)*a.x+Math.pow(n,2)*this.toPoint.x,y:Math.pow(1-n,2)*this.fromPoint.y+2*n*(1-n)*a.y+Math.pow(n,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(n,a){return this._findBorderPositionBezier(n,a,this.via)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,l,u){return this._getDistanceToBezierEdge(n,a,o,s,l,u,this.via)}}]),e}(Av);function rce(r){var i=nce();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function nce(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var m$=function(r){ie(e,r);var i=rce(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"_line",value:function(n,a,o){this._bezierCurve(n,a,o)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var n=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=n*s:l=u=n*o,this.from.x>this.to.x&&(l=-l),this.from.y>=this.to.y&&(u=-u);var d=this.from.x+l,c=this.from.y+u;return a==="discrete"&&(o<=s?d=othis.to.x&&(j=-j),this.from.y>=this.to.y&&(D=-D);var N=this.from.x+j,U=this.from.y+D;return o<=s?this.from.x<=this.to.x?N=this.to.xN?this.to.x:N:this.from.y>=this.to.y?U=this.to.y>U?this.to.y:U:U=this.to.y2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(n,a,o.via)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,l,u){var d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(n,a,o,s,l,u,d)}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=n,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}(Av);function ice(r){var i=ace();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function ace(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var oce=function(r){ie(e,r);var i=ice(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"_getDistanceToBezierEdge2",value:function(n,a,o,s,l,u,d,c){for(var h=1e9,f=n,v=a,p=[0,0,0,0],g=1;g<10;g++){var y=.1*g;p[0]=Math.pow(1-y,3),p[1]=3*y*Math.pow(1-y,2),p[2]=3*Math.pow(y,2)*(1-y),p[3]=Math.pow(y,3);var m=p[0]*n+p[1]*d.x+p[2]*c.x+p[3]*o,$=p[0]*a+p[1]*d.y+p[2]*c.y+p[3]*s;if(g>0){var b=this._getDistanceToLine(f,v,m,$,l,u);h=b"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var b$=function(r){ie(e,r);var i=sce(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"_line",value:function(n,a,o){var s=o[0],l=o[1];this._bezierCurve(n,a,s,l)}},{key:"_getViaCoordinates",value:function(){var n=this.from.x-this.to.x,a=this.from.y-this.to.y,o,s,l,u,d=this.options.smooth.roundness;return(Math.abs(n)>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-d*n,l=this.to.x+d*n):(s=this.from.y-d*a,u=this.to.y+d*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(n,a){return this._findBorderPositionBezier(n,a)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,l,u){var d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),c=$e(d,2),h=c[0],f=c[1];return this._getDistanceToBezierEdge2(n,a,o,s,l,u,h,f)}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=$e(a,2),s=o[0],l=o[1],u=n,d=[Math.pow(1-u,3),3*u*Math.pow(1-u,2),3*Math.pow(u,2)*(1-u),Math.pow(u,3)],c=d[0]*this.fromPoint.x+d[1]*s.x+d[2]*l.x+d[3]*this.toPoint.x,h=d[0]*this.fromPoint.y+d[1]*s.y+d[2]*l.y+d[3]*this.toPoint.y;return{x:c,y:h}}}]),e}(oce);function uce(r){var i=dce();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function dce(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var $$=function(r){ie(e,r);var i=uce(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"_line",value:function(n,a){n.beginPath(),n.moveTo(this.fromPoint.x,this.fromPoint.y),n.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(n,a),n.stroke(),this.disableShadow(n,a)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(n){return{x:(1-n)*this.fromPoint.x+n*this.toPoint.x,y:(1-n)*this.fromPoint.y+n*this.toPoint.y}}},{key:"_findBorderPosition",value:function(n,a){var o=this.to,s=this.from;n.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,d=o.y-s.y,c=Math.sqrt(u*u+d*d),h=n.distanceToBorder(a,l),f=(c-h)/c;return{x:(1-f)*s.x+f*o.x,y:(1-f)*s.y+f*o.y,t:0}}},{key:"_getDistanceToEdge",value:function(n,a,o,s,l,u){return this._getDistanceToLine(n,a,o,s,l,u)}}]),e}(MO),Si=function(){function r(i,e,t,n,a){if(C(this,r),e===void 0)throw new Error("No body provided");this.options=qr(n),this.globalOptions=n,this.defaultOptions=a,this.body=e,this.imagelist=t,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 kO(this.body,this.options,!0),this.setOptions(i)}return A(r,[{key:"setOptions",value:function(e){if(e){var t=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;r.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=SO(e.value));var n=[e,this.options,this.defaultOptions];return this.chooser=Iv("edge",n),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}}},{key:"getFormattingValues",value:function(){var e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,n=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:n,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:t,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 t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var e=this.options.smooth,t=!1,n=!0;return this.edgeType!==void 0&&((this.edgeType instanceof y$&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof b$&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof m$&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof $$&&e.type.enabled===!1)&&(n=!1),n===!0&&(t=this.cleanup())),n===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new y$(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new b$(this.options,this.body,this.labelModule):this.edgeType=new m$(this.options,this.body,this.labelModule):this.edgeType=new $$(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}},{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,t,n){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,t,n,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 t=this.getFormattingValues();if(!t.hidden){var n=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,n),this.drawLabel(e,n)}}},{key:"drawArrows",value:function(e){var t=this.getFormattingValues();if(!t.hidden){var n=this.edgeType.getViaNode(),a={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(a.from=this.edgeType.getArrowData(e,"from",n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=a.from.core),t.fromArrowSrc&&(a.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(a.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(a.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(a.to=this.edgeType.getArrowData(e,"to",n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=a.to.core),t.toArrowSrc&&(a.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(a.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(a.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(a.middle=this.edgeType.getArrowData(e,"middle",n,this.selected,this.hover,t),t.middleArrowSrc&&(a.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(a.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(a.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.to)}}},{key:"drawLabel",value:function(e,t){if(this.options.label!==void 0){var n=this.from,a=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);var o;if(n.id!=a.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,t),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=OO(e,this.options.selfReference.angle,this.options.selfReference.size,n);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 t=[];if(this.labelModule.visible()){var n=this._getRotation();qh(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}var a={left:e.x,top:e.y};return this.isOverlappingWith(a)&&t.push({edgeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){if(this.connected){var t=10,n=this.from.x,a=this.from.y,o=this.to.x,s=this.to.y,l=e.left,u=e.top,d=this.edgeType.getDistanceToEdge(n,a,o,s,l,u);return d0&&s<0)&&(l+=Math.PI),a.angle=l,a}},{key:"_pointOnCircle",value:function(e,t,n,a){return{x:e+n*Math.cos(a),y:t-n*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,t){var n=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(ca(s,e,t,n),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(pn(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=a.endPointOffset.from!==void 0?a.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(pn(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=a.endPointOffset.to!==void 0?a.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),$l(t.label)?e.label=t.label:$l(e.label)||(e.label=void 0),Bt(e,t,"smooth",a),Bt(e,t,"shadow",a),Bt(e,t,"background",a),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:n===!0&&t.dashes===null&&(e.dashes=En(a.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),Bt(e.scaling,t.scaling,"label",a.scaling)):n===!0&&t.scaling===null&&(e.scaling=En(a.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){var l=t.arrows.toLowerCase();e.arrows.to.enabled=ee(l).call(l,"to")!=-1,e.arrows.middle.enabled=ee(l).call(l,"middle")!=-1,e.arrows.from.enabled=ee(l).call(l,"from")!=-1}else if(le(t.arrows)==="object")Bt(e.arrows,t.arrows,"to",a.arrows),Bt(e.arrows,t.arrows,"middle",a.arrows),Bt(e.arrows,t.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:"+Fo(t.arrows));else n===!0&&t.arrows===null&&(e.arrows=En(a.arrows));if(t.color!==void 0&&t.color!==null){var u=_i(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,d=e.color;if(o)ce(d,a.color,!1,n);else for(var c in d)Object.prototype.hasOwnProperty.call(d,c)&&delete d[c];if(_i(d))d.color=d,d.highlight=d,d.hover=d,d.inherit=!1,u.opacity===void 0&&(d.opacity=1);else{var h=!1;u.color!==void 0&&(d.color=u.color,h=!0),u.highlight!==void 0&&(d.highlight=u.highlight,h=!0),u.hover!==void 0&&(d.hover=u.hover,h=!0),u.inherit!==void 0&&(d.inherit=u.inherit),u.opacity!==void 0&&(d.opacity=Math.min(1,Math.max(0,u.opacity))),h===!0?d.inherit=!1:d.inherit===void 0&&(d.inherit="from")}}else n===!0&&t.color===null&&(e.color=qr(a.color));n===!0&&t.font===null&&(e.font=qr(a.font)),Object.prototype.hasOwnProperty.call(t,"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=t.selfReferenceSize)}}]),r}(),cce=function(){function r(i,e,t){var n,a=this;C(this,r),this.body=i,this.images=e,this.groups=t,this.body.functions.createEdge=k(n=this.create).call(n,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,d){if(l===s)return .5;var c=1/(l-s);return Math.max(0,(d-s)*c)}},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},ce(this.options,this.defaultOptions),this.bindEventListeners()}return A(r,[{key:"bindEventListeners",value:function(){var e=this,t,n;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],d=e.body.data.edges.get(l);if(d!=null){var c=d.smooth;c!==void 0&&c.enabled===!0&&c.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",k(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",k(n=this.refresh).call(n,this)),this.body.emitter.on("destroy",function(){Z(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){Si.parseOptions(this.options,e,!0,this.defaultOptions,!0);var t=!1;if(e.smooth!==void 0)for(var n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&(t=this.body.edges[n].updateEdgeType()||t);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||t===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.body.data.edges;if(k_("id",e))this.body.data.edges=e;else if(oe(e))this.body.data.edges=new ll,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new ll;else throw new TypeError("Array or DataSet expected");if(a&&Z(this.edgesListeners,function(s,l){a.off(l,s)}),this.body.edges={},this.body.data.edges){Z(this.edgesListeners,function(s,l){t.body.data.edges.on(l,s)});var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),n===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.edges,a=this.body.data.edges,o=0;o1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length!==0){var n=this.body.edges;Z(e,function(a){var o=n[a];o!==void 0&&o.remove()}),t&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var e=this;Z(this.body.edges,function(t,n){var a=e.body.data.edges.get(n);a!==void 0&&t.setOptions(a)})}},{key:"create",value:function(e){return new Si(e,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var e,t=this.body.nodes,n=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){var a=n[e];a.from=null,a.to=null,a.connect()}}},{key:"getConnectedNodes",value:function(e){var t=[];if(this.body.edges[e]!==void 0){var n=this.body.edges[e];n.fromId!==void 0&&t.push(n.fromId),n.toId!==void 0&&t.push(n.toId)}return t}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var e=this,t=[];Z(this.body.edges,function(n,a){var o=e.body.nodes[n.toId],s=e.body.nodes[n.fromId];o!==void 0&&o.isCluster===!0||s!==void 0&&s.isCluster===!0||(o===void 0||s===void 0)&&t.push(a)}),this.remove(t,!1)}},{key:"_addMissingEdges",value:function(){var e=this.body.data.edges;if(e!=null){var t=this.body.edges,n=[];ue(e).call(e,function(a,o){var s=t[o];s===void 0&&n.push(o)}),this.add(n,!0)}}}]),r}(),DO=function(){function r(i,e,t){C(this,r),this.body=i,this.physicsBody=e,this.barnesHutTree,this.setOptions(t),this._rng=$u("BARNES HUT SOLVER")}return A(r,[{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,t=this.body.nodes,n=this.physicsBody.physicsNodeIndices,a=n.length,o=this._formBarnesHutTree(t,n);this.barnesHutTree=o;for(var s=0;s0&&this._getForceContributions(o.root,e)}}},{key:"_getForceContributions",value:function(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}},{key:"_getForceContribution",value:function(e,t){if(e.childrenCount>0){var n=e.centerOfMass.x-t.x,a=e.centerOfMass.y-t.y,o=Math.sqrt(n*n+a*a);o*e.calcSize>this.thetaInversed?this._calculateForces(o,n,a,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(o,n,a,t,e)}}},{key:"_calculateForces",value:function(e,t,n,a,o){e===0&&(e=.1,t=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=t*s,u=n*s;this.physicsBody.forces[a.id].x+=l,this.physicsBody.forces[a.id].y+=u}},{key:"_formBarnesHutTree",value:function(e,t){for(var n,a=t.length,o=e[t[0]].x,s=e[t[0]].y,l=e[t[0]].x,u=e[t[0]].y,d=1;d0&&(hl&&(l=h),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 p=1e-5,g=Math.max(p,Math.abs(l-o)),y=.5*g,m=.5*(o+l),$=.5*(s+u),b={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:m-y,maxX:m+y,minY:$-y,maxY:$+y},size:g,calcSize:1/g,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(b.root);for(var _=0;_0&&this._placeInTree(b.root,n);return b}},{key:"_updateBranchMass",value:function(e,t){var n=e.centerOfMass,a=e.mass+t.options.mass,o=1/a;n.x=n.x*e.mass+t.x*t.options.mass,n.x*=o,n.y=n.y*e.mass+t.y*t.options.mass,n.y*=o,e.mass=a;var s=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidtht.x?a.maxY>t.y?o="NW":o="SW":a.maxY>t.y?o="NE":o="SE",this._placeInRegion(e,t,o)}},{key:"_placeInRegion",value:function(e,t,n){var a=e.children[n];switch(a.childrenCount){case 0:a.children.data=t,a.childrenCount=1,this._updateBranchMass(a,t);break;case 1:a.children.data.x===t.x&&a.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(a),this._placeInTree(a,t));break;case 4:this._placeInTree(a,t);break}}},{key:"_splitBranch",value:function(e){var t=null;e.childrenCount===1&&(t=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"),t!=null&&this._placeInTree(e,t)}},{key:"_insertRegion",value:function(e,t){var n,a,o,s,l=.5*e.size;switch(t){case"NW":n=e.range.minX,a=e.range.minX+l,o=e.range.minY,s=e.range.minY+l;break;case"NE":n=e.range.minX+l,a=e.range.maxX,o=e.range.minY,s=e.range.minY+l;break;case"SW":n=e.range.minX,a=e.range.minX+l,o=e.range.minY+l,s=e.range.maxY;break;case"SE":n=e.range.minX+l,a=e.range.maxX,o=e.range.minY+l,s=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,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,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,n){n===void 0&&(n="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=n,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),r}(),hce=function(){function r(i,e,t){C(this,r),this._rng=$u("REPULSION SOLVER"),this.body=i,this.physicsBody=e,this.setOptions(t)}return A(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n,a,o,s,l,u,d=this.body.nodes,c=this.physicsBody.physicsNodeIndices,h=this.physicsBody.forces,f=this.options.nodeDistance,v=-2/3/f,p=4/3,g=0;g"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var yce=function(r){ie(e,r);var i=pce(e);function e(t,n,a){var o;return C(this,e),o=i.call(this,t,n,a),o._rng=$u("FORCE ATLAS 2 BASED REPULSION SOLVER"),o}return A(e,[{key:"_calculateForces",value:function(n,a,o,s,l){n===0&&(n=.1*this._rng(),a=n),this.overlapAvoidanceFactor<1&&s.shape.radius&&(n=Math.max(.1+this.overlapAvoidanceFactor*s.shape.radius,n-s.shape.radius));var u=s.edges.length+1,d=this.options.gravitationalConstant*l.mass*s.options.mass*u/Math.pow(n,2),c=a*d,h=o*d;this.physicsBody.forces[s.id].x+=c,this.physicsBody.forces[s.id].y+=h}}]),e}(DO);function mce(r){var i=bce();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function bce(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var $ce=function(r){ie(e,r);var i=mce(e);function e(t,n,a){return C(this,e),i.call(this,t,n,a)}return A(e,[{key:"_calculateForces",value:function(n,a,o,s,l){if(n>0){var u=l.edges.length+1,d=this.options.centralGravity*u*l.options.mass;s[l.id].x=a*d,s[l.id].y=o*d}}}]),e}(Gs),wce=function(){function r(i){C(this,r),this.body=i,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}},Re(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return A(r,[{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,yl(["stabilization"],this.options,e),Bt(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var t=this.options.wind;t&&((typeof t.x!="number"||Kh(t.x))&&(t.x=0),(typeof t.y!="number"||Kh(t.y))&&(t.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 yce(this.body,this.physicsBody,e),this.edgesSolver=new Cc(this.body,this.physicsBody,e),this.gravitySolver=new $ce(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new hce(this.body,this.physicsBody,e),this.edgesSolver=new Cc(this.body,this.physicsBody,e),this.gravitySolver=new Gs(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new fce(this.body,this.physicsBody,e),this.edgesSolver=new vce(this.body,this.physicsBody,e),this.gravitySolver=new Gs(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new DO(this.body,this.physicsBody,e),this.edgesSolver=new Cc(this.body,this.physicsBody,e),this.gravitySolver=new Gs(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=k(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=fl();this.physicsTick();var t=fl()-e;(t<.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,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&lr(function(){e.body.emitter.emit("stabilized",{iterations:t}),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,t=0,n=0,a=5,o=0;os&&(e=e>0?s:-s),e}},{key:"_performStep",value:function(e){var t=this.body.nodes[e],n=this.physicsBody.forces[e];this.options.wind&&(n.x+=this.options.wind.x,n.y+=this.options.wind.y);var a=this.physicsBody.velocities[e];this.previousStates[e]={x:t.x,y:t.y,vx:a.x,vy:a.y},t.options.fixed.x===!1?(a.x=this.calculateComponentVelocity(a.x,n.x,t.options.mass),t.x+=a.x*this.timestep):(n.x=0,a.x=0),t.options.fixed.y===!1?(a.y=this.calculateComponentVelocity(a.y,n.y,t.options.mass),t.y+=a.y*this.timestep):(n.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 t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){var n=e[t].options.fixed;this.freezeCache[t]={x:n.x,y:n.y},n.x=!0,n.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var e=this.body.nodes;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof t!="number"&&(t=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",t)),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=t,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,lr(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,t=function(){return e.stabilized===!1&&e.stabilizationIterations1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,o=1e9,s=-1e9,l;if(t.length>0)for(var u=0;ul.shape.boundingBox.left&&(o=l.shape.boundingBox.left),sl.shape.boundingBox.top&&(n=l.shape.boundingBox.top),a1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,o=1e9,s=-1e9,l;if(t.length>0)for(var u=0;ul.x&&(o=l.x),sl.y&&(n=l.y),a"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Ice=function(r){ie(e,r);var i=Tce(e);function e(t,n,a,o,s,l){var u;return C(this,e),u=i.call(this,t,n,a,o,s,l),u.isCluster=!0,u.containedNodes={},u.containedEdges={},u}return A(e,[{key:"_openChildCluster",value:function(n){var a=this,o=this.body.nodes[n];if(this.containedNodes[n]===void 0)throw new Error("node with id: "+n+" not in current cluster");if(!o.isCluster)throw new Error("node with id: "+n+" is not a cluster");delete this.containedNodes[n],Z(o.edges,function(s){delete a.containedEdges[s.id]}),Z(o.containedNodes,function(s,l){a.containedNodes[l]=s}),o.containedNodes={},Z(o.containedEdges,function(s,l){a.containedEdges[l]=s}),o.containedEdges={},Z(o.edges,function(s){Z(a.edges,function(l){var u,d,c=ee(u=l.clusteringEdgeReplacingIds).call(u,s.id);c!==-1&&(Z(s.clusteringEdgeReplacingIds,function(h){l.clusteringEdgeReplacingIds.push(h),a.body.edges[h].edgeReplacedById=l.id}),wr(d=l.clusteringEdgeReplacingIds).call(d,c,1))})}),o.edges=[]}}]),e}(Pt),Pce=function(){function r(i){var e=this;C(this,r),this.body=i,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Re(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){e.clusteredNodes={},e.clusteredEdges={}})}return A(r,[{key:"clusterByHubsize",value:function(e,t){e===void 0?e=this._getHubSize():le(e)==="object"&&(t=this._checkOptions(e),e=this._getHubSize());for(var n=[],a=0;a=e&&n.push(o.id)}for(var s=0;s0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(t.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");t=this._checkOptions(t);var a={},o={};Z(this.body.nodes,function(s,l){s.options&&t.joinCondition(s.options)===!0&&(a[l]=s,Z(s.edges,function(u){e.clusteredEdges[u.id]===void 0&&(o[u.id]=u)}))}),this._cluster(a,o,t,n)}},{key:"clusterByEdgeCount",value:function(e,t){var n=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);for(var o=[],s={},l,u,d,c=function(){var p={},g={},y=n.body.nodeIndices[h],m=n.body.nodes[y];if(s[y]===void 0){d=0,u=[];for(var $=0;$0&&be(g).length>0&&_===!0){var j=function(){for(var X=0;X1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}},{key:"clusterBridges",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}},{key:"clusterByConnection",value:function(e,t){var n,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];t=this._checkOptions(t,o),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=o.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=o.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=o.options.fixed.x,t.clusterNodeProperties.fixed.y=o.options.fixed.y);var s={},l={},u=o.id,d=st.cloneOptions(o);s[u]=o;for(var c=0;c-1&&(l[$.id]=$)}this._cluster(s,l,t,a)}},{key:"_createClusterEdges",value:function(e,t,n,a){for(var o,s,l,u,d,c,h=be(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,t,n){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*(n+a),y:.5*(o+s)}}},{key:"openCluster",value:function(e,t){var n=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=ee(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],n===!0&&this.body.emitter.emit("_dataChanged");return}var d=a.containedNodes,c=a.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){var h={},f={x:a.x,y:a.y};for(var v in d)if(Object.prototype.hasOwnProperty.call(d,v)){var p=this.body.nodes[v];h[v]={x:p.x,y:p.y}}var g=t.releaseFunction(f,h);for(var y in d)if(Object.prototype.hasOwnProperty.call(d,y)){var m=this.body.nodes[y];g[y]!==void 0&&(m.x=g[y].x===void 0?a.x:g[y].x,m.y=g[y].y===void 0?a.y:g[y].y)}}else Z(d,function(nt){nt.options.fixed.x===!1&&(nt.x=a.x),nt.options.fixed.y===!1&&(nt.y=a.y)});for(var $ in d)if(Object.prototype.hasOwnProperty.call(d,$)){var b=this.body.nodes[$];b.vx=a.vx,b.vy=a.vy,b.setOptions({physics:!0}),delete this.clusteredNodes[$]}for(var _=[],O=0;O0&&sa&&(a=s.edges.length),e+=s.edges.length,t+=Math.pow(s.edges.length,2),n+=1}e=e/n,t=t/n;var l=t-Math.pow(e,2),u=Math.sqrt(l),d=Math.floor(e+2*u);return d>a&&(d=a),d}},{key:"_createClusteredEdge",value:function(e,t,n,a,o){var s=st.cloneOptions(n,"edge");ce(s,a),s.from=e,s.to=t,s.id="clusterEdge:"+Aa(),o!==void 0&&ce(s,o);var l=this.body.functions.createEdge(s);return l.clusteringEdgeReplacingIds=[n.id],l.connect(),this.body.edges[l.id]=l,l}},{key:"_clusterEdges",value:function(e,t,n,a){if(t instanceof Si){var o=t,s={};s[o.id]=o,t=s}if(e instanceof Pt){var l=e,u={};u[l.id]=l,e=u}if(n==null)throw new Error("_clusterEdges: parameter clusterNode required");a===void 0&&(a=n.clusterEdgeProperties),this._createClusterEdges(e,t,n,a);for(var d in t)if(Object.prototype.hasOwnProperty.call(t,d)&&this.body.edges[d]!==void 0){var c=this.body.edges[d];this._backupEdgeOptions(c),c.setOptions({physics:!1})}for(var h in e)Object.prototype.hasOwnProperty.call(e,h)&&(this.clusteredNodes[h]={clusterId:n.id,node:this.body.nodes[h]},this.body.nodes[h].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(e!==void 0){var t=this.clusteredNodes[e];if(t!==void 0){var n=t.clusterId;if(n!==void 0)return this.body.nodes[n]}}}},{key:"_filter",value:function(e,t){var n=[];return Z(e,function(a){t(a)&&n.push(a)}),n}},{key:"_updateState",value:function(){var e=this,t,n=[],a={},o=function(v){Z(e.body.nodes,function(p){p.isCluster===!0&&v(p)})};for(t in this.clusteredNodes)if(Object.prototype.hasOwnProperty.call(this.clusteredNodes,t)){var s=this.body.nodes[t];s===void 0&&n.push(t)}o(function(f){for(var v=0;v0}(!f.endPointsValid()||!p)&&(a[v]=v)}),o(function(f){Z(a,function(v){delete f.containedEdges[v],Z(f.edges,function(p,g){if(p.id===v){f.edges[g]=null;return}p.clusteringEdgeReplacingIds=e._filter(p.clusteringEdgeReplacingIds,function(y){return!a[y]})}),f.edges=e._filter(f.edges,function(p){return p!==null})})}),Z(a,function(f){delete e.clusteredEdges[f]}),Z(a,function(f){delete e.body.edges[f]});var u=be(this.body.edges);Z(u,function(f){var v=e.body.edges[f],p=e._isClusteredNode(v.fromId)||e._isClusteredNode(v.toId);if(p!==e._isClusteredEdge(v.id))if(p){var g=e._getClusterNodeForNode(v.fromId);g!==void 0&&e._clusterEdges(e.body.nodes[v.fromId],v,g);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 d=!1,c=!0,h=function(){var v=[];o(function(g){var y=be(g.containedNodes).length,m=g.options.allowSingleNodeCluster===!0;(m&&y<1||!m&&y<2)&&v.push(g.id)});for(var p=0;p0,d=d||c};c;)h();d&&this._updateState()}},{key:"_isClusteredNode",value:function(e){return this.clusteredNodes[e]!==void 0}},{key:"_isClusteredEdge",value:function(e){return this.clusteredEdges[e]!==void 0}}]),r}();function xce(){var r;window!==void 0&&(r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),r===void 0?window.requestAnimationFrame=function(i){i()}:window.requestAnimationFrame=r}var Cce=function(){function r(i,e){C(this,r),xce(),this.body=i,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},Re(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return A(r,[{key:"bindEventListeners",value:function(){var e=this,t;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=lr(function(){var n;e.zooming=!1,k(n=e._requestRedraw).call(n,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",k(t=this._requestRedraw).call(t,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 t=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];ca(t,this.options,e)}}},{key:"_requestNextFrame",value:function(e,t){if(!(typeof window>"u")){var n,a=window;return this.requiresTimeout===!0?n=lr(e,t):a.requestAnimationFrame&&(n=a.requestAnimationFrame(e)),n}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(k(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 t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var n=this.canvas.getContext(),a=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,a,o),this.canvas.frame.clientWidth===0)return;if(n.save(),n.translate(this.body.view.translation.x,this.body.view.translation.y),n.scale(this.body.view.scale,this.body.view.scale),n.beginPath(),this.body.emitter.emit("beforeDrawing",n),n.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(n),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){var s=this._drawNodes(n,e),l=s.drawExternalLabels;t.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(n),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit("afterDrawing",n),n.closePath(),n.restore(),e===!0&&n.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 t=this.body.nodes,n;for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n=t[a],n.resize(e),n.updateBoundingBox(e,n.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.nodes,a=this.body.nodeIndices,o,s=[],l=[],u=20,d=this.canvas.DOMtoCanvas({x:-20,y:-20}),c=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+u,y:this.canvas.frame.canvas.clientHeight+u}),h={top:d.y,left:d.x,bottom:c.y,right:c.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,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,n=this.cameraState.scale;e!=1&&t!=1?n=this.cameraState.scale*.5*(e+t):e!=1?n=this.cameraState.scale*e:t!=1&&(n=this.cameraState.scale*t),this.body.view.scale=n;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(ee(e).call(e,"%")!==-1||ee(e).call(e,"px")!==-1)return e;if(ee(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 Ei(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Ei.DIRECTION_ALL}),wl(this.hammer,function(t){e.body.eventListeners.onTouch(t)}),this.hammer.on("tap",function(t){e.body.eventListeners.onTap(t)}),this.hammer.on("doubletap",function(t){e.body.eventListeners.onDoubleTap(t)}),this.hammer.on("press",function(t){e.body.eventListeners.onHold(t)}),this.hammer.on("panstart",function(t){e.body.eventListeners.onDragStart(t)}),this.hammer.on("panmove",function(t){e.body.eventListeners.onDrag(t)}),this.hammer.on("panend",function(t){e.body.eventListeners.onDragEnd(t)}),this.hammer.on("pinch",function(t){e.body.eventListeners.onPinch(t)}),this.frame.canvas.addEventListener("wheel",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("mousemove",function(t){e.body.eventListeners.onMouseMove(t)}),this.frame.canvas.addEventListener("contextmenu",function(t){e.body.eventListeners.onContext(t)}),this.hammerFrame=new Ei(this.frame),NO(this.hammerFrame,function(t){e.body.eventListeners.onRelease(t)})}},{key:"setSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);var n=!1,a=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=t,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=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!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,n=!0),this.frame.canvas.height!==u&&(this.frame.canvas.height=u,n=!0)}return n===!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,n}},{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 t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);var n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}},{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)}}}]),r}();function Fce(r,i){var e=Re({nodes:i,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!oe(e.nodes))throw new TypeError("Nodes has to be an array of ids.");if(e.nodes.length===0&&(e.nodes=i),!(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 Bce=function(){function r(i,e){var t,n=this,a;C(this,r),this.body=i,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",k(t=this.fit).call(t,this)),this.body.emitter.on("animationFinished",function(){n.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",k(a=this.releaseNode).call(a,this))}return A(r,[{key:"setOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}},{key:"fit",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=Fce(e,this.body.nodeIndices);var n=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight,o,s;if(n===0||a===0)s=1,o=st.getRange(this.body.nodes,e.nodes);else if(t===!0){var l=0;for(var u in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,u)){var d=this.body.nodes[u];d.predefinedPosition===!0&&(l+=1)}if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=st.getRange(this.body.nodes,e.nodes);var c=this.body.nodeIndices.length;s=12.662/(c+7.4147)+.0964822;var h=Math.min(n/600,a/600);s*=h}else{this.body.emitter.emit("_resizeNodes"),o=st.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,p=n/f,g=a/v;s=p<=g?p:g}s>e.maxZoomLevel?s=e.maxZoomLevel:s1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){var n={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=n,t.lockedOnNode=e,this.moveTo(t)}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,!pn(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,!pn(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,!pn(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,!pn(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 t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+n.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+n.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var a;this.viewFunction=k(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=k(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},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.x,y:t.y-e.y},a=this.body.view.translation,o={x:a.x+n.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+n.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 t=wie[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var n;this.viewFunction=k(n=this._lockedRedraw).call(n,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})}}]),r}();function _$(r){var i=r&&r.preventDefault||!1,e=r&&r.container||window,t={},n={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(d){u(d,"keydown")},l=function(d){u(d,"keyup")},u=function(d,c){if(n[c][d.keyCode]!==void 0){for(var h=n[c][d.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,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+n.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+n.y*a;this.body.view.scale=t,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,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+n.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+n.y*a;this.body.view.scale=t,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=_$({container:window,preventDefault:!0}):this.keycharm=_$({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var t,n,a,o,s,l,u,d,c,h,f,v,p,g,y,m,$,b,_,O,M,j,D,N;k(t=this.keycharm).call(t,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),k(n=this.keycharm).call(n,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),k(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),k(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),k(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),k(l=this.keycharm).call(l,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),k(u=this.keycharm).call(u,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),k(d=this.keycharm).call(d,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),k(c=this.keycharm).call(c,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),k(h=this.keycharm).call(h,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),k(f=this.keycharm).call(f,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),k(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),k(p=this.keycharm).call(p,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),k(g=this.keycharm).call(g,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),k(y=this.keycharm).call(y,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),k(m=this.keycharm).call(m,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),k($=this.keycharm).call($,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),k(b=this.keycharm).call(b,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),k(_=this.keycharm).call(_,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),k(O=this.keycharm).call(O,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),k(M=this.keycharm).call(M,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),k(j=this.keycharm).call(j,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),k(D=this.keycharm).call(D,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),k(N=this.keycharm).call(N,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),r}();function Lce(r,i){var e=typeof an<"u"&&Gn(r)||r["@@iterator"];if(!e){if(oe(r)||(e=zce(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},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 zce(r,i){var e;if(r){if(typeof r=="string")return E$(r,i);var t=Xe(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Vn(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return E$(r,i)}}function E$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);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 t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}},{key:"onDoubleTap",value:function(e){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}},{key:"onHold",value:function(e){var t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}},{key:"onRelease",value:function(e){if(new Date().valueOf()-this.touchTime>10){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}},{key:"onContext",value:function(e){var t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}},{key:"checkSelectionChanges",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;t===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}},{key:"_determineDifference",value:function(e,t){var n=function(o,s){for(var l=[],u=0;u=o.minX&&c.x<=o.maxX&&c.y>=o.minY&&c.y<=o.maxY});ue(s).call(s,function(d){return t.selectionHandler.selectObject(t.body.nodes[d])});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?(ue(u).call(u,function(d){d.node.options.fixed.x=d.xFixed,d.node.options.fixed.y=d.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 t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);var n=this.pinch.scale*e.scale;this.zoom(n,t)}},{key:"zoom",value:function(e,t){if(this.options.zoomView===!0){var n=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/n,l=(1-s)*t.x+o.x*s,u=(1-s)*t.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:l,y:u},a!=null){var d=this.canvas.canvasToDOM(a);this.drag.pointer.x=d.x,this.drag.pointer.y=d.y}this.body.emitter.emit("_requestRedraw"),n0&&(this.popupObj=d[h[h.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){for(var v=this.body.edgeIndices,p=this.body.edges,g,y=[],m=0;m0&&(this.popupObj=p[y[y.length-1]],l="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new Pie(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 t=this.selectionHandler._pointerToPositionObject(e),n=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(n=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),n===!0)){var a=this.selectionHandler.getNodeAt(e);n=a===void 0?!1:a.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(n=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));n===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),r}(),Wce=Tv,Uce=vO;Wce("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},Uce);var Vce=re,Gce=Vce.Set,Kce=Gce,qce=Kce,Yce=qce,hn=z(Yce),Xce=ne,S$=kv,Ts=wu.getWeakData,Jce=Ov,Qce=Nt,Zce=ea,Ac=Ue,ehe=Sv,FO=nn,O$=Ve,BO=Un,the=BO.set,rhe=BO.getterFor,nhe=FO.find,ihe=FO.findIndex,ahe=Xce([].splice),ohe=0,ks=function(r){return r.frozen||(r.frozen=new jO)},jO=function(){this.entries=[]},Rc=function(r,i){return nhe(r.entries,function(e){return e[0]===i})};jO.prototype={get:function(r){var i=Rc(this,r);if(i)return i[1]},has:function(r){return!!Rc(this,r)},set:function(r,i){var e=Rc(this,r);e?e[1]=i:this.entries.push([r,i])},delete:function(r){var i=ihe(this.entries,function(e){return e[0]===r});return~i&&ahe(this.entries,i,1),!!~i}};var she={getConstructor:function(r,i,e,t){var n=r(function(l,u){Jce(l,a),the(l,{type:i,id:ohe++,frozen:void 0}),Zce(u)||ehe(u,l[t],{that:l,AS_ENTRIES:e})}),a=n.prototype,o=rhe(i),s=function(l,u,d){var c=o(l),h=Ts(Qce(u),!0);return h===!0?ks(c).set(u,d):h[c.id]=d,l};return S$(a,{delete:function(l){var u=o(this);if(!Ac(l))return!1;var d=Ts(l);return d===!0?ks(u).delete(l):d&&O$(d,u.id)&&delete d[u.id]},has:function(u){var d=o(this);if(!Ac(u))return!1;var c=Ts(u);return c===!0?ks(d).has(u):c&&O$(c,d.id)}}),S$(a,e?{get:function(u){var d=o(this);if(Ac(u)){var c=Ts(u);return c===!0?ks(d).get(u):c?c[d.id]:void 0}},set:function(u,d){return s(this,u,d)}}:{add:function(u){return s(this,u,!0)}}),n}},lhe=dO,T$=Ee,Ks=ne,k$=kv,uhe=wu,dhe=Tv,LO=she,Is=Ue,Ps=Un.enforce,che=te,hhe=eE,Uo=Object,fhe=Array.isArray,xs=Uo.isExtensible,zO=Uo.isFrozen,vhe=Uo.isSealed,HO=Uo.freeze,phe=Uo.seal,I$={},P$={},ghe=!T$.ActiveXObject&&"ActiveXObject"in T$,ma,WO=function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},UO=dhe("WeakMap",WO,LO),si=UO.prototype,qs=Ks(si.set),yhe=function(){return lhe&&che(function(){var r=HO([]);return qs(new UO,r,1),!zO(r)})};if(hhe)if(ghe){ma=LO.getConstructor(WO,"WeakMap",!0),uhe.enable();var x$=Ks(si.delete),Cs=Ks(si.has),C$=Ks(si.get);k$(si,{delete:function(r){if(Is(r)&&!xs(r)){var i=Ps(this);return i.frozen||(i.frozen=new ma),x$(this,r)||i.frozen.delete(r)}return x$(this,r)},has:function(i){if(Is(i)&&!xs(i)){var e=Ps(this);return e.frozen||(e.frozen=new ma),Cs(this,i)||e.frozen.has(i)}return Cs(this,i)},get:function(i){if(Is(i)&&!xs(i)){var e=Ps(this);return e.frozen||(e.frozen=new ma),Cs(this,i)?C$(this,i):e.frozen.get(i)}return C$(this,i)},set:function(i,e){if(Is(i)&&!xs(i)){var t=Ps(this);t.frozen||(t.frozen=new ma),Cs(this,i)?qs(this,i,e):t.frozen.set(i,e)}else qs(this,i,e);return this}})}else yhe()&&k$(si,{set:function(i,e){var t;return fhe(i)&&(zO(i)?t=I$:vhe(i)&&(t=P$)),qs(this,i,e),t===I$&&HO(i),t===P$&&phe(i),this}});var mhe=re,bhe=mhe.WeakMap,$he=bhe,whe=$he,_he=whe,Ra=z(_he);function de(r,i,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?r!==i||!t:!i.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?t:e==="a"?t.call(r):t?t.value:i.get(r)}function Jh(r,i,e,t,n){if(typeof i=="function"?r!==i||!0:!i.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i.set(r,e),e}function Qh(r,i){var e=typeof an<"u"&&Gn(r)||r["@@iterator"];if(!e){if(oe(r)||(e=Ehe(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},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 Ehe(r,i){var e;if(r){if(typeof r=="string")return A$(r,i);var t=Xe(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Vn(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return A$(r,i)}}function A$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e0&&arguments[0]!==void 0?arguments[0]:function(){};C(this,r),Dr.set(this,new M$),Nr.set(this,new M$),Ys.set(this,void 0),Jh(this,Ys,i)}return A(r,[{key:"sizeNodes",get:function(){return de(this,Dr,"f").size}},{key:"sizeEdges",get:function(){return de(this,Nr,"f").size}},{key:"getNodes",value:function(){return de(this,Dr,"f").getSelection()}},{key:"getEdges",value:function(){return de(this,Nr,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=de(this,Dr,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=de(this,Nr,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){de(this,Dr,"f").delete(e)}},{key:"deleteEdges",value:function(e){de(this,Nr,"f").delete(e)}},{key:"clear",value:function(){de(this,Dr,"f").clear(),de(this,Nr,"f").clear()}},{key:"commit",value:function(){for(var e,t,n={nodes:de(this,Dr,"f").commit(),edges:de(this,Nr,"f").commit()},a=arguments.length,o=new Array(a),s=0;s=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},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 Ohe(r,i){var e;if(r){if(typeof r=="string")return N$(r,i);var t=Xe(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Vn(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return N$(r,i)}}function N$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e4&&arguments[4]!==void 0?arguments[4]:!1,s=this._initBaseEvent(t,n);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(n)),t.controlEdge!==void 0&&(s.controlEdge=t.controlEdge),this.body.emitter.emit(e,s)}},{key:"selectObject",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(e!==void 0){if(e instanceof Pt){if(t===!0){var n;(n=this._selectionAccumulator).addEdges.apply(n,nr(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 t=[],n=this.body.nodes,a=0;a1&&arguments[1]!==void 0?arguments[1]:!0,n=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(n);if(a.length>0)return t===!0?this.body.nodes[a[a.length-1]]:a[a.length-1]}},{key:"_getEdgesOverlappingWith",value:function(e,t){for(var n=this.body.edges,a=0;a1&&arguments[1]!==void 0?arguments[1]:!0,n=this.canvas.DOMtoCanvas(e),a=10,o=null,s=this.body.edges,l=0;l0&&(this.generateClickEvent("deselectEdge",t,e,o),n=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,o),n=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),n=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),n=!0),n===!0&&this.generateClickEvent("select",t,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 Mi(e=this._selectionAccumulator.getNodes()).call(e,function(t){return t.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return Mi(e=this._selectionAccumulator.getEdges()).call(e,function(t){return t.id})}},{key:"setSelection",value:function(e){var t=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((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes){var n=D$(e.nodes),a;try{for(n.s();!(a=n.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,t.highlightEdges)}}catch(h){n.e(h)}finally{n.f()}}if(e.edges){var l=D$(e.edges),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,c=this.body.edges[d];if(!c)throw new RangeError('Edge with id "'+d+'" not found');this.selectObject(c)}}catch(h){l.e(h)}finally{l.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(e){var t=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:t})}},{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 t in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,t.id)||this._selectionAccumulator.deleteEdges(t)}},{key:"getClickedItems",value:function(e){for(var t=this.canvas.DOMtoCanvas(e),n=[],a=this.body.nodeIndices,o=this.body.nodes,s=a.length-1;s>=0;s--){var l=o[a[s]],u=l.getItemsOnPoint(t);n.push.apply(n,u)}for(var d=this.body.edgeIndices,c=this.body.edges,h=d.length-1;h>=0;h--){var f=c[d[h]],v=f.getItemsOnPoint(t);n.push.apply(n,v)}return n}}]),r}(),F$=IE,khe=Math.floor,Zh=function(r,i){var e=r.length,t=khe(e/2);return e<8?Ihe(r,i):Phe(r,Zh(F$(r,0,t),i),Zh(F$(r,t),i),i)},Ihe=function(r,i){for(var e=r.length,t=1,n,a;t0;)r[a]=r[--a];a!==t++&&(r[a]=n)}return r},Phe=function(r,i,e,t){for(var n=i.length,a=e.length,o=0,s=0;o3)){if(Whe)return!0;if(U$)return U$<603;var r="",i,e,t,n;for(i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)zr.push({k:e+n,v:t})}for(zr.sort(function(a,o){return o.v-a.v}),n=0;nz$(e)?1:-1}};Fhe({target:"Array",proto:!0,forced:qhe},{sort:function(i){i!==void 0&&Bhe(i);var e=jhe(this);if(GO)return i===void 0?V$(e):V$(e,i);var t=[],n=L$(e),a,o;for(o=0;o=0:s>l;l+=u)l in o&&(n=e(n,o[l],l,a));return n}},ufe={left:G$(!1),right:G$(!0)},dfe=Ee,cfe=Cr,hfe=cfe(dfe.process)==="process",ffe=G,vfe=ufe.left,pfe=ua,K$=So,gfe=hfe,yfe=!gfe&&K$>79&&K$<83,mfe=yfe||!pfe("reduce");ffe({target:"Array",proto:!0,forced:mfe},{reduce:function(i){var e=arguments.length;return vfe(this,i,e,e>1?arguments[1]:void 0)}});var bfe=Ge,$fe=bfe("Array").reduce,wfe=Pe,_fe=$fe,Dc=Array.prototype,Efe=function(r){var i=r.reduce;return r===Dc||wfe(Dc,r)&&i===Dc.reduce?_fe:i},Sfe=Efe,Ofe=Sfe,Tfe=Ofe,KO=z(Tfe);function qO(r){var i=kfe();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return se(this,n)}}function kfe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var YO=function(){function r(){C(this,r)}return A(r,[{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,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,n),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,t){this.fake_use(e,t),this.abstract()}},{key:"shift",value:function(e,t){this.fake_use(e,t),this.abstract()}}]),r}(),Ife=function(r){ie(e,r);var i=qO(e);function e(t){var n;return C(this,e),n=i.call(this),n.layout=t,n}return A(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(n){return n.x}},{key:"setPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(n,o),n.x=a}},{key:"getTreeSize",value:function(n){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,n);return{min:a.min_x,max:a.max_x}}},{key:"sort",value:function(n){Ma(n).call(n,function(a,o){return a.x-o.x})}},{key:"fix",value:function(n,a){n.y=this.layout.options.hierarchical.levelSeparation*a,n.options.fixed.y=!0}},{key:"shift",value:function(n,a){this.layout.body.nodes[n].x+=a}}]),e}(YO),Pfe=function(r){ie(e,r);var i=qO(e);function e(t){var n;return C(this,e),n=i.call(this),n.layout=t,n}return A(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(n){return n.y}},{key:"setPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(n,o),n.y=a}},{key:"getTreeSize",value:function(n){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,n);return{min:a.min_y,max:a.max_y}}},{key:"sort",value:function(n){Ma(n).call(n,function(a,o){return a.y-o.y})}},{key:"fix",value:function(n,a){n.x=this.layout.options.hierarchical.levelSeparation*a,n.options.fixed.x=!0}},{key:"shift",value:function(n,a){this.layout.body.nodes[n].y+=a}}]),e}(YO),xfe=G,Cfe=nn.every,Afe=ua,Rfe=Afe("every");xfe({target:"Array",proto:!0,forced:!Rfe},{every:function(i){return Cfe(this,i,arguments.length>1?arguments[1]:void 0)}});var Mfe=Ge,Dfe=Mfe("Array").every,Nfe=Pe,Ffe=Dfe,Nc=Array.prototype,Bfe=function(r){var i=r.every;return r===Nc||Nfe(Nc,r)&&i===Nc.every?Ffe:i},jfe=Bfe,Lfe=jfe,zfe=Lfe,XO=z(zfe);function Hfe(r,i){var e=typeof an<"u"&&Gn(r)||r["@@iterator"];if(!e){if(oe(r)||(e=Wfe(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},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 Wfe(r,i){var e;if(r){if(typeof r=="string")return q$(r,i);var t=Xe(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Vn(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return q$(r,i)}}function q$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e=i[a])&&(i[a]=i[n]+1)}),i}function Vfe(r){return JO(function(i){var e,t;return XO(e=mt(t=i.edges).call(t,function(n){return r.has(n.toId)})).call(e,function(n){return n.to===i})},function(i,e){return e>i},"from",r)}function Gfe(r){return JO(function(i){var e,t;return XO(e=mt(t=i.edges).call(t,function(n){return r.has(n.toId)})).call(e,function(n){return n.from===i})},function(i,e){return eo)return{v:{v:Ufe(t,a)}};++m},_;$=y.pop();)if(_=b(),_!==0&&_)return _.v},h;for(u.s();!(d=u.n()).done;)if(h=c(),h!==0&&h)return h.v}catch(f){u.e(f)}finally{u.f()}return a}var Kfe=function(){function r(){C(this,r),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return A(r,[{key:"addRelation",value:function(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].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,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}},{key:"ensureLevel",value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var t=this,n={},a=function o(s){if(n[s]!==void 0)return n[s];var l=t.levels[s];if(t.childrenReference[s]){var u=t.childrenReference[s];if(u.length>0)for(var d=0;d0&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(a===!0)return this.body.emitter.emit("refresh"),ce(t,this.optionsBackup)}return t}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=$u(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):le(e.physics)==="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var n=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:n};else{var a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(n=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:n,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",n)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var t=e.length+50,n=0;nl){for(var d=e.length;e.length>l&&s<=o;){s+=1;var c=e.length;s%3===0?this.body.modules.clustering.clusterBridges(u):this.body.modules.clustering.clusterOutliers(u);var h=e.length;if(c==h&&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*d)})}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,t,n=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new Kfe;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(n=!0,this.hierarchical.levels[t]=e.options.level):a=!0);if(a===!0&&n===!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,t=!1,n={},a=function(){for(var $=s(),b=0,_=0;_<$.length-1;_++){var O=$[_].max-$[_+1].min;b+=O+e.options.hierarchical.treeSpacing,o(_+1,b)}},o=function($,b){var _=e.hierarchical.trees;for(var O in _)Object.prototype.hasOwnProperty.call(_,O)&&_[O]===$&&e.direction.shift(O,b)},s=function(){for(var $=[],b=0;b0)for(var O=0;O<_.length;O++)m(e.body.nodes[_[O]],b)}},u=function($){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,_=1e9,O=1e9,M=1e9,j=-1e9;for(var D in $)if(Object.prototype.hasOwnProperty.call($,D)){var N=e.body.nodes[D],U=e.hierarchical.levels[N.id],J=e.direction.getPosition(N),X=e._getSpaceAroundNode(N,$),ye=$e(X,2),Ke=ye[0],xe=ye[1];_=Math.min(Ke,_),O=Math.min(xe,O),U<=b&&(M=Math.min(J,M),j=Math.max(J,j))}return[M,j,_,O]},d=function($,b){var _=e.hierarchical.getMaxLevel($.id),O=e.hierarchical.getMaxLevel(b.id);return Math.min(_,O)},c=function($,b,_){for(var O=e.hierarchical,M=0;M1)for(var N=0;N2&&arguments[2]!==void 0?arguments[2]:!1,O=e.direction.getPosition($),M=e.direction.getPosition(b),j=Math.abs(M-O),D=e.options.hierarchical.nodeSpacing;if(j>D){var N={},U={};l($,N),l(b,U);var J=d($,b),X=u(N,J),ye=u(U,J),Ke=X[1],xe=ye[0],Tt=ye[2],nt=Math.abs(Ke-xe);if(nt>D){var Qe=Ke-xe+D;Qe<-Tt+D&&(Qe=-Tt+D),Qe<0&&(e._shiftBlock(b.id,Qe),t=!0,_===!0&&e._centerParent(b))}}},f=function($,b){for(var _=b.id,O=b.edges,M=e.hierarchical.levels[b.id],j=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,D={},N=[],U=0;U0?tt=Math.min(It,vr-e.options.hierarchical.nodeSpacing):It<0&&(tt=-Math.min(-It,et-e.options.hierarchical.nodeSpacing)),tt!=0&&(e._shiftBlock(b.id,tt),t=!0)},nt=function(Ze){var fe=e.direction.getPosition(b),Ce=e._getSpaceAroundNode(b),Te=$e(Ce,2),et=Te[0],vr=Te[1],It=Ze-fe,tt=fe;It>0?tt=Math.min(fe+(vr-e.options.hierarchical.nodeSpacing),Ze):It<0&&(tt=Math.max(fe-(et-e.options.hierarchical.nodeSpacing),Ze)),tt!==fe&&(e.direction.setPosition(b,tt),t=!0)},Qe=xe($,N);Tt(Qe),Qe=xe($,O),nt(Qe)},v=function($){var b=e.hierarchical.getLevels();b=_n(b).call(b);for(var _=0;_<$;_++){t=!1;for(var O=0;O0&&Math.abs(v)0&&(d=this.direction.getPosition(a[s-1])+u),this.direction.setPosition(l,d,t),this._validatePositionAndContinue(l,t,d),o++}}}}},{key:"_placeBranchNodes",value:function(e,t){var n,a=this.hierarchical.childrenReference[e];if(a!==void 0){for(var o=[],s=0;st&&this.positionedNodes[u.id]===void 0){var c=this.options.hierarchical.nodeSpacing,h=void 0;l===0?h=this.direction.getPosition(this.body.nodes[e]):h=this.direction.getPosition(o[l-1])+c,this.direction.setPosition(u,h,d),this._validatePositionAndContinue(u,d,h)}else return}var f=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],f,t)}}},{key:"_validatePositionAndContinue",value:function(e,t,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){var a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(n-ae.hierarchical.levels[a.id]&&e.hierarchical.addRelation(a.id,o.id)};this._crawlNetwork(t),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},n=arguments.length>1?arguments[1]:void 0,a={},o=function h(f,v){if(a[f.id]===void 0){e.hierarchical.setTreeIndex(f,v),a[f.id]=!0;for(var p,g=e._getActiveEdges(f),y=0;y=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},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 Xfe(r,i){var e;if(r){if(typeof r=="string")return Y$(r,i);var t=Xe(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Vn(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Y$(r,i)}}function Y$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e0&&this.options.deleteNode!==!1?(l===!0&&this._createSeperator(4),this._createDeleteButton(s)):n===0&&this.options.deleteEdge!==!1&&(l===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,k(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",k(t=this.showManipulatorToolbar).call(t,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 t,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,k(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",k(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var t=this.selectionHandler.getSelectedNodes()[0];if(t!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(t.isCluster!==!0){var n=ce({},t.options,!1);if(n.x=t.x,n.y=t.y,this.options.editNode.length===2)this.options.editNode(n,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,t,n,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,k(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",k(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",k(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",k(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",k(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",k(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",le(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 t,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,k(t=this.toggleEditMode).call(t,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,l,u=this.body.edges[this.edgeBeingEditedId],d=this._getNewTargetNode(u.from.x,u.from.y),c=this._getNewTargetNode(u.to.x,u.to.y);this.temporaryIds.nodes.push(d.id),this.temporaryIds.nodes.push(c.id),this.body.nodes[d.id]=d,this.body.nodeIndices.push(d.id),this.body.nodes[c.id]=c,this.body.nodeIndices.push(c.id),this._temporaryBindUI("onTouch",k(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",k(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",k(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",k(l=this._controlNodeDragEnd).call(l,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(h){var f=u.edgeType.findBorderPositions(h);d.selected===!1&&(d.x=f.from.x,d.y=f.from.y),c.selected===!1&&(c.x=f.to.x,c.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 t=this.selectionHandler.getSelectedNodeIds(),n=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(t.length>0){for(var o=0;o0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:t,edges:n};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(n),this.body.data.nodes.getDataSet().remove(t),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,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.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,t){var n=ce({},this.options.controlNodeStyle);n.id="targetNode"+Aa(),n.hidden=!1,n.physics=!1,n.x=e,n.y=t;var a=this.body.functions.createNode(n);return a.shape.boundingBox={left:e,right:e,top:t,bottom:t},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},Fr(this.editModeDiv);var t=this.options.locales[this.options.locale],n=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,k(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(Fr(this.editModeDiv),Fr(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,t=Yfe(wr(e=this._domEventListenerCleanupQueue).call(e,0)),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;a()}}catch(o){t.e(o)}finally{t.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),Fr(this.manipulationDiv),Fr(this.editModeDiv),Fr(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 t,n=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,k(t=this.addNodeMode).call(t,this))}},{key:"_createAddEdgeButton",value:function(e){var t,n=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,k(t=this.addEdgeMode).call(t,this))}},{key:"_createEditNodeButton",value:function(e){var t,n=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,k(t=this.editNode).call(t,this))}},{key:"_createEditEdgeButton",value:function(e){var t,n=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,k(t=this.editEdgeMode).call(t,this))}},{key:"_createDeleteButton",value:function(e){var t,n;this.options.rtl?n="vis-delete-rtl":n="vis-delete";var a=this._createButton("delete",n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,k(t=this.deleteSelected).call(t,this))}},{key:"_createBackButton",value:function(e){var t,n=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,k(t=this.showManipulatorToolbar).call(t,this))}},{key:"_createButton",value:function(e,t,n){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 "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=n,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,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}},{key:"_temporaryBindUI",value:function(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+Fo(be(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=Re({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var t=this.lastTouch,n=this.selectionHandler.getNodeAt(t);if(n!==void 0)if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(n.x,n.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+Aa(),from:n.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 t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,l=o.length-1;l>=0;l--){var u;if(ee(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,t),this.temporaryIds.nodes[0]!==void 0){var d=this.body.nodes[this.temporaryIds.nodes[0]];d.x=this.canvas._XconvertDOMtoCanvas(t.x),d.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,l=o.length-1;l>=0;l--){var u;if(ee(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,t),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}},{key:"_performAddNode",value:function(e){var t=this,n={id:Aa(),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(n,function(a){a!=null&&t.inMode==="addNode"&&t.body.data.nodes.getDataSet().add(a),t.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(n),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,t){var n=this,a={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&n.inMode==="addEdge"&&(n.body.data.edges.getDataSet().add(o),n.selectionHandler.unselectAll(),n.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,t){var n=this,a={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(le(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||n.inMode!=="editEdge"?(n.body.edges[a.id].updateEdgeType(),n.body.emitter.emit("_redraw"),n.showManipulatorToolbar()):(n.body.data.edges.getDataSet().update(s),n.selectionHandler.unselectAll(),n.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()}}]),r}(),x="string",T="boolean",w="number",Ea="array",L="object",QO="dom",Qfe="any",Fc=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Bc={borderWidth:{number:w},borderWidthSelected:{number:w,undefined:"undefined"},brokenImage:{string:x,undefined:"undefined"},chosen:{label:{boolean:T,function:"function"},node:{boolean:T,function:"function"},__type__:{object:L,boolean:T}},color:{border:{string:x},background:{string:x},highlight:{border:{string:x},background:{string:x},__type__:{object:L,string:x}},hover:{border:{string:x},background:{string:x},__type__:{object:L,string:x}},__type__:{object:L,string:x}},opacity:{number:w,undefined:"undefined"},fixed:{x:{boolean:T},y:{boolean:T},__type__:{object:L,boolean:T}},font:{align:{string:x},color:{string:x},size:{number:w},face:{string:x},background:{string:x},strokeWidth:{number:w},strokeColor:{string:x},vadjust:{number:w},multi:{boolean:T,string:x},bold:{color:{string:x},size:{number:w},face:{string:x},mod:{string:x},vadjust:{number:w},__type__:{object:L,string:x}},boldital:{color:{string:x},size:{number:w},face:{string:x},mod:{string:x},vadjust:{number:w},__type__:{object:L,string:x}},ital:{color:{string:x},size:{number:w},face:{string:x},mod:{string:x},vadjust:{number:w},__type__:{object:L,string:x}},mono:{color:{string:x},size:{number:w},face:{string:x},mod:{string:x},vadjust:{number:w},__type__:{object:L,string:x}},__type__:{object:L,string:x}},group:{string:x,number:w,undefined:"undefined"},heightConstraint:{minimum:{number:w},valign:{string:x},__type__:{object:L,boolean:T,number:w}},hidden:{boolean:T},icon:{face:{string:x},code:{string:x},size:{number:w},color:{string:x},weight:{string:x,number:w},__type__:{object:L}},id:{string:x,number:w},image:{selected:{string:x,undefined:"undefined"},unselected:{string:x,undefined:"undefined"},__type__:{object:L,string:x}},imagePadding:{top:{number:w},right:{number:w},bottom:{number:w},left:{number:w},__type__:{object:L,number:w}},label:{string:x,undefined:"undefined"},labelHighlightBold:{boolean:T},level:{number:w,undefined:"undefined"},margin:{top:{number:w},right:{number:w},bottom:{number:w},left:{number:w},__type__:{object:L,number:w}},mass:{number:w},physics:{boolean:T},scaling:{min:{number:w},max:{number:w},label:{enabled:{boolean:T},min:{number:w},max:{number:w},maxVisible:{number:w},drawThreshold:{number:w},__type__:{object:L,boolean:T}},customScalingFunction:{function:"function"},__type__:{object:L}},shadow:{enabled:{boolean:T},color:{string:x},size:{number:w},x:{number:w},y:{number:w},__type__:{object:L,boolean:T}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:T,array:Ea},borderRadius:{number:w},interpolation:{boolean:T},useImageSize:{boolean:T},useBorderWithImage:{boolean:T},coordinateOrigin:{string:["center","top-left"]},__type__:{object:L}},size:{number:w},title:{string:x,dom:QO,undefined:"undefined"},value:{number:w,undefined:"undefined"},widthConstraint:{minimum:{number:w},maximum:{number:w},__type__:{object:L,boolean:T,number:w}},x:{number:w},y:{number:w},__type__:{object:L}},Zfe={configure:{enabled:{boolean:T},filter:{boolean:T,string:x,array:Ea,function:"function"},container:{dom:QO},showButton:{boolean:T},__type__:{object:L,boolean:T,string:x,array:Ea,function:"function"}},edges:{arrows:{to:{enabled:{boolean:T},scaleFactor:{number:w},type:{string:Fc},imageHeight:{number:w},imageWidth:{number:w},src:{string:x},__type__:{object:L,boolean:T}},middle:{enabled:{boolean:T},scaleFactor:{number:w},type:{string:Fc},imageWidth:{number:w},imageHeight:{number:w},src:{string:x},__type__:{object:L,boolean:T}},from:{enabled:{boolean:T},scaleFactor:{number:w},type:{string:Fc},imageWidth:{number:w},imageHeight:{number:w},src:{string:x},__type__:{object:L,boolean:T}},__type__:{string:["from","to","middle"],object:L}},endPointOffset:{from:{number:w},to:{number:w},__type__:{object:L,number:w}},arrowStrikethrough:{boolean:T},background:{enabled:{boolean:T},color:{string:x},size:{number:w},dashes:{boolean:T,array:Ea},__type__:{object:L,boolean:T}},chosen:{label:{boolean:T,function:"function"},edge:{boolean:T,function:"function"},__type__:{object:L,boolean:T}},color:{color:{string:x},highlight:{string:x},hover:{string:x},inherit:{string:["from","to","both"],boolean:T},opacity:{number:w},__type__:{object:L,string:x}},dashes:{boolean:T,array:Ea},font:{color:{string:x},size:{number:w},face:{string:x},background:{string:x},strokeWidth:{number:w},strokeColor:{string:x},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:w},multi:{boolean:T,string:x},bold:{color:{string:x},size:{number:w},face:{string:x},mod:{string:x},vadjust:{number:w},__type__:{object:L,string:x}},boldital:{color:{string:x},size:{number:w},face:{string:x},mod:{string:x},vadjust:{number:w},__type__:{object:L,string:x}},ital:{color:{string:x},size:{number:w},face:{string:x},mod:{string:x},vadjust:{number:w},__type__:{object:L,string:x}},mono:{color:{string:x},size:{number:w},face:{string:x},mod:{string:x},vadjust:{number:w},__type__:{object:L,string:x}},__type__:{object:L,string:x}},hidden:{boolean:T},hoverWidth:{function:"function",number:w},label:{string:x,undefined:"undefined"},labelHighlightBold:{boolean:T},length:{number:w,undefined:"undefined"},physics:{boolean:T},scaling:{min:{number:w},max:{number:w},label:{enabled:{boolean:T},min:{number:w},max:{number:w},maxVisible:{number:w},drawThreshold:{number:w},__type__:{object:L,boolean:T}},customScalingFunction:{function:"function"},__type__:{object:L}},selectionWidth:{function:"function",number:w},selfReferenceSize:{number:w},selfReference:{size:{number:w},angle:{number:w},renderBehindTheNode:{boolean:T},__type__:{object:L}},shadow:{enabled:{boolean:T},color:{string:x},size:{number:w},x:{number:w},y:{number:w},__type__:{object:L,boolean:T}},smooth:{enabled:{boolean:T},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:w},forceDirection:{string:["horizontal","vertical","none"],boolean:T},__type__:{object:L,boolean:T}},title:{string:x,undefined:"undefined"},width:{number:w},widthConstraint:{maximum:{number:w},__type__:{object:L,boolean:T,number:w}},value:{number:w,undefined:"undefined"},__type__:{object:L}},groups:{useDefaultGroups:{boolean:T},__any__:Bc,__type__:{object:L}},interaction:{dragNodes:{boolean:T},dragView:{boolean:T},hideEdgesOnDrag:{boolean:T},hideEdgesOnZoom:{boolean:T},hideNodesOnDrag:{boolean:T},hover:{boolean:T},keyboard:{enabled:{boolean:T},speed:{x:{number:w},y:{number:w},zoom:{number:w},__type__:{object:L}},bindToWindow:{boolean:T},autoFocus:{boolean:T},__type__:{object:L,boolean:T}},multiselect:{boolean:T},navigationButtons:{boolean:T},selectable:{boolean:T},selectConnectedEdges:{boolean:T},hoverConnectedEdges:{boolean:T},tooltipDelay:{number:w},zoomView:{boolean:T},zoomSpeed:{number:w},__type__:{object:L}},layout:{randomSeed:{undefined:"undefined",number:w,string:x},improvedLayout:{boolean:T},clusterThreshold:{number:w},hierarchical:{enabled:{boolean:T},levelSeparation:{number:w},nodeSpacing:{number:w},treeSpacing:{number:w},blockShifting:{boolean:T},edgeMinimization:{boolean:T},parentCentralization:{boolean:T},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:L,boolean:T}},__type__:{object:L}},manipulation:{enabled:{boolean:T},initiallyActive:{boolean:T},addNode:{boolean:T,function:"function"},addEdge:{boolean:T,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:L,boolean:T,function:"function"}},deleteNode:{boolean:T,function:"function"},deleteEdge:{boolean:T,function:"function"},controlNodeStyle:Bc,__type__:{object:L,boolean:T}},nodes:Bc,physics:{enabled:{boolean:T},barnesHut:{theta:{number:w},gravitationalConstant:{number:w},centralGravity:{number:w},springLength:{number:w},springConstant:{number:w},damping:{number:w},avoidOverlap:{number:w},__type__:{object:L}},forceAtlas2Based:{theta:{number:w},gravitationalConstant:{number:w},centralGravity:{number:w},springLength:{number:w},springConstant:{number:w},damping:{number:w},avoidOverlap:{number:w},__type__:{object:L}},repulsion:{centralGravity:{number:w},springLength:{number:w},springConstant:{number:w},nodeDistance:{number:w},damping:{number:w},__type__:{object:L}},hierarchicalRepulsion:{centralGravity:{number:w},springLength:{number:w},springConstant:{number:w},nodeDistance:{number:w},damping:{number:w},avoidOverlap:{number:w},__type__:{object:L}},maxVelocity:{number:w},minVelocity:{number:w},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:T},iterations:{number:w},updateInterval:{number:w},onlyDynamicEdges:{boolean:T},fit:{boolean:T},__type__:{object:L,boolean:T}},timestep:{number:w},adaptiveTimestep:{boolean:T},wind:{x:{number:w},y:{number:w},__type__:{object:L}},__type__:{object:L,boolean:T}},autoResize:{boolean:T},clickToUse:{boolean:T},locale:{string:x},locales:{__any__:{any:Qfe},__type__:{object:L}},height:{string:x},width:{string:x},__type__:{object:L}},ZO={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]}}},eve=function(i,e,t){var n;return!!(Gr(i).call(i,"physics")&&Gr(n=ZO.physics.solver).call(n,e)&&t.physics.solver!==e&&e!=="wind")},tve=function(){function r(){C(this,r)}return A(r,[{key:"getDistances",value:function(e,t,n){for(var a={},o=e.edges,s=0;s2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,t);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)),d=5,c=1e9,h=0,f=0,v=0,p=0,g=0;c>o&&ls&&gv.type==="downstream_subgraph_search")?.data||[],d=v=>{const p=v.json.nodes.map(y=>({id:y.id,label:y.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}})),g=v.json.links.map(y=>({from:y.origin_id,to:y.target_id,arrows:{to:{enabled:!0,scaleFactor:1.2}},color:"#FFFFFF",width:2}));return{nodes:p,edges:g}};bt.useEffect(()=>()=>{l.current&&(l.current.destroy(),l.current=null)},[]);const c=bt.useCallback((v,p)=>{l.current&&l.current.destroy();const g=d(p),y=new B(v,g,{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=y},[]),h=async v=>{console.log("[DownstreamSubgraphs] Starting checkAndLoadSubgraph with node:",v);const p=v.json.nodes,g=Object.values($i.canvas.selected_nodes)[0];if(!g){console.warn("[DownstreamSubgraphs] No node selected"),alert("Please select a upstream node first before adding a subgraph.");return}const y=p.map(b=>b.type),m=t;console.log("[DownstreamSubgraphs] Required node types:",y),console.log("[DownstreamSubgraphs] Installed node types:",m);const $=y.filter(b=>!m.includes(b));if(console.log("[DownstreamSubgraphs] Missing node types:",$),$.length>0)try{console.log("[DownstreamSubgraphs] Fetching info for missing nodes");const b=await jc.batchGetNodeInfo($);console.log("[DownstreamSubgraphs] Received node infos:",b);const _={text:"",ext:[{type:"node_install_guide",data:b.map(M=>({name:M.name,repository_url:M.github_url}))}]};console.log("[DownstreamSubgraphs] Created message content:",_);const O={id:ba(),role:"ai",content:JSON.stringify(_),format:"markdown",name:"Assistant",metadata:{pendingSubgraph:v}};console.log("[DownstreamSubgraphs] Created AI message:",O),n?.(O);return}catch(b){console.error("[DownstreamSubgraphs] Error fetching node info:",b),alert("Error checking required nodes. Please try again.");return}console.log("[DownstreamSubgraphs] All required nodes are installed, proceeding to load subgraph"),f(v,g)},f=(v,p)=>{const g=v.json.nodes,y=v.json.links,m=g.find(_=>_.id===0),$=m?.id;console.log("[DownstreamSubgraphs] Entry node ID:",$);const b={};$!==null&&(b[$]=p),$i.canvas.emitBeforeChange();try{for(const _ of g)if(_.id!==$){const O=m?.pos,M=[p._pos[0],p._pos[1]],j=[_.pos[0]+M[0]-O[0],_.pos[1]+M[1]-O[1]];b[_.id]=ef(_.type,{pos:j})}for(const _ of y){const O=b[_.origin_id],M=b[_.target_id];O&&M&&O.connect(_.origin_slot,M,_.target_slot)}}finally{$i.canvas.emitAfterChange()}};return S.jsx("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:u.length>0&&S.jsx("div",{className:"space-y-3",children:S.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(v=>S.jsxs("div",{className:"relative group",children:[S.jsx("button",{className:`px-3 py-1.5 bg-blue-500 text-white rounded-md + hover:bg-blue-600 transition-colors text-xs`,onClick:()=>h(v),onMouseEnter:()=>s(v.name),onMouseLeave:()=>s(null),children:v.name}),S.jsxs("p",{className:"text-xs ml-3 text-gray-500",children:["[",v.tags.join(", "),"]"]}),o===v.name&&S.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:S.jsx("div",{style:{width:"100%",height:"300px"},ref:p=>{p&&c(p,v)}})})]},v.name))})})})}const hve=Object.freeze(Object.defineProperty({__proto__:null,DownstreamSubgraphs:nve},Symbol.toStringTag,{value:"Module"}));function ive({content:r,onLoadSubgraph:i}){const t=JSON.parse(r).ext?.find(n=>n.type==="node_install_guide")?.data||[];return S.jsxs("div",{children:[S.jsx("p",{children:"在加载graph到画布前,以下节点有待安装,请跳转到对应的github安装节点:"}),S.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:t.map((n,a)=>S.jsx("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 + hover:shadow-sm transition-all duration-200`,children:S.jsxs("div",{className:"flex flex-col",children:[S.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:n.name}),S.jsx("div",{className:"flex justify-end",children:n.repository_url?S.jsxs("a",{href:n.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:[S.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:S.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.jsxs("a",{href:`https://www.google.com/search?q=${encodeURIComponent(n.name+" comfyui custom node")}`,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-gray-100 text-gray-500 rounded-md + border border-gray-300 text-[10px] flex items-center gap-1`,children:[S.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 21h7a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v11m0 5l4.879-4.879m0 0a3 3 0 104.243-4.242 3 3 0 00-4.243 4.242z"})}),"Search on Google"]})})]})},a))}),S.jsx("p",{className:"mt-4"}),S.jsx("p",{children:"安装完成后,请点击继续加载graph按钮,将graph加载到画布中:"}),S.jsx("div",{className:"mt-4",children:S.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:i,children:"继续加载graph"})})]})}const fve=Object.freeze(Object.defineProperty({__proto__:null,NodeInstallGuide:ive},Symbol.toStringTag,{value:"Module"}));export{uve as A,X$ as B,hve as D,dve as N,lve as U,jc as W,$i as a,ef as b,aT as c,cve as d,fve as e,ba as g,sve as w}; diff --git a/dist/copilot_web/vendor-markdown-Dek94WS0.js b/dist/copilot_web/vendor-markdown-Dek94WS0.js new file mode 100644 index 0000000..e939edf --- /dev/null +++ b/dist/copilot_web/vendor-markdown-Dek94WS0.js @@ -0,0 +1,302 @@ +import{r as so,c as ri,g as oo}from"./vendor-react-V04_Axys.js";var $a={exports:{}},tn={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var uo=so,co=Symbol.for("react.element"),ho=Symbol.for("react.fragment"),mo=Object.prototype.hasOwnProperty,fo=uo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,po={key:!0,ref:!0,__self:!0,__source:!0};function Ua(e,t,r){var n,i={},a=null,l=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(l=t.ref);for(n in t)mo.call(t,n)&&!po.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:co,type:e,key:a,ref:l,props:i,_owner:fo.current}}tn.Fragment=ho;tn.jsx=Ua;tn.jsxs=Ua;$a.exports=tn;var vn=$a.exports;function ni(e){const t=[],r=String(e||"");let n=r.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const l=r.slice(i,n).trim();(l||!a)&&t.push(l),i=n+1,n=r.indexOf(",",i)}return t}function go(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const yo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bo={};function ii(e,t){return(bo.jsx?vo:yo).test(e)}const xo=/[ \t\n\f\r]/g;function wo(e){return typeof e=="object"?e.type==="text"?ai(e.value):!1:ai(e)}function ai(e){return e.replace(xo,"")===""}class kr{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}kr.prototype.property={};kr.prototype.normal={};kr.prototype.space=null;function _a(e,t){const r={},n={};let i=-1;for(;++i4&&r.slice(0,4)==="data"&&To.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(si,Eo);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!si.test(a)){let l=a.replace(Mo,Co);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=y0}return new i(n,t)}function Co(e){return"-"+e.toLowerCase()}function Eo(e){return e.charAt(1).toUpperCase()}const Do={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"},el=_a([Ya,Wa,Za,Qa,Ao],"html"),rn=_a([Ya,Wa,Za,Qa,zo],"svg");function Kn(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Io(e){return e.join(" ").trim()}var tl={},oi=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,No=/\n/g,Bo=/^\s*/,Fo=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Lo=/^:\s*/,Ro=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Po=/^[;\s]*/,Oo=/^\s+|\s+$/g,qo=` +`,ui="/",ci="*",Ot="",Ho="comment",Vo="declaration",jo=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(v){var x=v.match(No);x&&(r+=x.length);var M=v.lastIndexOf(qo);n=~M?v.length-M:n+v.length}function a(){var v={line:r,column:n};return function(x){return x.position=new l(v),u(),x}}function l(v){this.start=v,this.end={line:r,column:n},this.source=t.source}l.prototype.content=e;function s(v){var x=new Error(t.source+":"+r+":"+n+": "+v);if(x.reason=v,x.filename=t.source,x.line=r,x.column=n,x.source=e,!t.silent)throw x}function o(v){var x=v.exec(e);if(x){var M=x[0];return i(M),e=e.slice(M.length),x}}function u(){o(Bo)}function m(v){var x;for(v=v||[];x=h();)x!==!1&&v.push(x);return v}function h(){var v=a();if(!(ui!=e.charAt(0)||ci!=e.charAt(1))){for(var x=2;Ot!=e.charAt(x)&&(ci!=e.charAt(x)||ui!=e.charAt(x+1));)++x;if(x+=2,Ot===e.charAt(x-1))return s("End of comment missing");var M=e.slice(2,x-2);return n+=2,i(M),e=e.slice(x),n+=2,v({type:Ho,comment:M})}}function g(){var v=a(),x=o(Fo);if(x){if(h(),!o(Lo))return s("property missing ':'");var M=o(Ro),A=v({type:Vo,property:hi(x[0].replace(oi,Ot)),value:M?hi(M[0].replace(oi,Ot)):Ot});return o(Po),A}}function p(){var v=[];m(v);for(var x;x=g();)x!==!1&&(v.push(x),m(v));return v}return u(),p()};function hi(e){return e?e.replace(Oo,Ot):Ot}var $o=ri&&ri.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tl,"__esModule",{value:!0});var mi=tl.default=_o,Uo=$o(jo);function _o(e,t){var r=null;if(!e||typeof e!="string")return r;var n=(0,Uo.default)(e),i=typeof t=="function";return n.forEach(function(a){if(a.type==="declaration"){var l=a.property,s=a.value;i?t(l,s,a):s&&(r=r||{},r[l]=s)}}),r}const Go=mi.default||mi,rl=nl("end"),v0=nl("start");function nl(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};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 Wo(e){const t=v0(e),r=rl(e);if(t&&r)return{start:t,end:r}}function fr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fi(e.position):"start"in e||"end"in e?fi(e):"line"in e||"column"in e?Zn(e):""}function Zn(e){return pi(e&&e.line)+":"+pi(e&&e.column)}function fi(e){return Zn(e&&e.start)+"-"+Zn(e&&e.end)}function pi(e){return e&&typeof e=="number"?e:1}class Ee extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},l=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?i=t:!a.cause&&t&&(l=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const o=n.indexOf(":");o===-1?a.ruleId=n:(a.source=n.slice(0,o),a.ruleId=n.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.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=fr(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=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ee.prototype.file="";Ee.prototype.name="";Ee.prototype.reason="";Ee.prototype.message="";Ee.prototype.stack="";Ee.prototype.column=void 0;Ee.prototype.line=void 0;Ee.prototype.ancestors=void 0;Ee.prototype.cause=void 0;Ee.prototype.fatal=void 0;Ee.prototype.place=void 0;Ee.prototype.ruleId=void 0;Ee.prototype.source=void 0;const b0={}.hasOwnProperty,Yo=new Map,Xo=/[A-Z]/g,Ko=/-([a-z])/g,Zo=new Set(["table","tbody","thead","tfoot","tr"]),Qo=new Set(["td","th"]),il="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Jo(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=su(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=lu(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?rn:el,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=al(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function al(e,t,r){if(t.type==="element")return eu(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tu(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return nu(e,t,r);if(t.type==="mdxjsEsm")return ru(e,t);if(t.type==="root")return iu(e,t,r);if(t.type==="text")return au(e,t)}function eu(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=rn,e.schema=i),e.ancestors.push(t);const a=sl(e,t.tagName,!1),l=ou(e,t);let s=w0(e,t);return Zo.has(t.tagName)&&(s=s.filter(function(o){return typeof o=="string"?!wo(o):!0})),ll(e,l,a,t),x0(l,s),e.ancestors.pop(),e.schema=n,e.create(t,a,l,r)}function tu(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}vr(e,t.position)}function ru(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);vr(e,t.position)}function nu(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=rn,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:sl(e,t.name,!0),l=uu(e,t),s=w0(e,t);return ll(e,l,a,t),x0(l,s),e.ancestors.pop(),e.schema=n,e.create(t,a,l,r)}function iu(e,t,r){const n={};return x0(n,w0(e,t)),e.create(t,e.Fragment,n,r)}function au(e,t){return t.value}function ll(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function x0(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function lu(e,t,r){return n;function n(i,a,l,s){const u=Array.isArray(l.children)?r:t;return s?u(a,l,s):u(a,l)}}function su(e,t){return r;function r(n,i,a,l){const s=Array.isArray(a.children),o=v0(n);return t(i,a,l,s,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function ou(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&b0.call(t.properties,i)){const a=cu(e,i,t.properties[i]);if(a){const[l,s]=a;e.tableCellAlignToStyle&&l==="align"&&typeof s=="string"&&Qo.has(t.tagName)?n=s:r[l]=s}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function uu(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];a.type;const l=a.expression;l.type;const s=l.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else vr(e,t.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const s=n.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else vr(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function w0(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:Yo;for(;++ni?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)l=Array.from(n),l.unshift(t,r),e.splice(...l);else for(r&&e.splice(t,r);a0?(Ue(e,e.length,0,t),e):t}const yi={}.hasOwnProperty;function ul(e){const t={};let r=-1;for(;++r13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function it(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Be=Dt(/[A-Za-z]/),Ce=Dt(/[\dA-Za-z]/),xu=Dt(/[#-'*+\--9=?A-Z^-~]/);function Gr(e){return e!==null&&(e<32||e===127)}const Qn=Dt(/\d/),wu=Dt(/[\dA-Fa-f]/),ku=Dt(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function ce(e){return e!==null&&(e<0||e===32)}function ae(e){return e===-2||e===-1||e===32}const nn=Dt(/\p{P}|\p{S}/u),Ht=Dt(/\s/);function Dt(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function tr(e){const t=[];let r=-1,n=0,i=0;for(;++r55295&&a<57344){const s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(l=String.fromCharCode(a,s),i=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(n,r),encodeURIComponent(l)),n=r+i+1,l=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function ie(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(o){return ae(o)?(e.enter(r),s(o)):t(o)}function s(o){return ae(o)&&a++l))return;const $=t.events.length;let Z=$,_,I;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(_){I=t.events[Z][1].end;break}_=!0}for(A(n),E=$;ED;){const R=r[q];t.containerState=R[1],R[0].exit.call(t,e)}r.length=D}function T(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Mu(e,t,r){return ie(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qt(e){if(e===null||ce(e)||Ht(e))return 1;if(nn(e))return 2}function an(e,t,r){const n=[];let i=-1;for(;++i1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const h={...e[n][1].end},g={...e[r][1].start};bi(h,-o),bi(g,o),l={type:o>1?"strongSequence":"emphasisSequence",start:h,end:{...e[n][1].end}},s={type:o>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:g},a={type:o>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:o>1?"strong":"emphasis",start:{...l.start},end:{...s.end}},e[n][1].end={...l.start},e[r][1].start={...s.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=We(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=We(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",a,t]]),u=We(u,an(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),u=We(u,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(m=2,u=We(u,[["enter",e[r][1],t],["exit",e[r][1],t]])):m=0,Ue(e,n-1,r-n+3,u),r=n+u.length-m-2;break}}for(r=-1;++r0&&ae(E)?ie(e,T,"linePrefix",a+1)(E):T(E)}function T(E){return E===null||W(E)?e.check(xi,x,q)(E):(e.enter("codeFlowValue"),D(E))}function D(E){return E===null||W(E)?(e.exit("codeFlowValue"),T(E)):(e.consume(E),D)}function q(E){return e.exit("codeFenced"),t(E)}function R(E,$,Z){let _=0;return I;function I(J){return E.enter("lineEnding"),E.consume(J),E.exit("lineEnding"),U}function U(J){return E.enter("codeFencedFence"),ae(J)?ie(E,V,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):V(J)}function V(J){return J===s?(E.enter("codeFencedFenceSequence"),le(J)):Z(J)}function le(J){return J===s?(_++,E.consume(J),le):_>=l?(E.exit("codeFencedFenceSequence"),ae(J)?ie(E,ne,"whitespace")(J):ne(J)):Z(J)}function ne(J){return J===null||W(J)?(E.exit("codeFencedFence"),$(J)):Z(J)}}}function qu(e,t,r){const n=this;return i;function i(l){return l===null?r(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return n.parser.lazy[n.now().line]?r(l):t(l)}}const wn={name:"codeIndented",tokenize:Vu},Hu={partial:!0,tokenize:ju};function Vu(e,t,r){const n=this;return i;function i(u){return e.enter("codeIndented"),ie(e,a,"linePrefix",5)(u)}function a(u){const m=n.events[n.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?l(u):r(u)}function l(u){return u===null?o(u):W(u)?e.attempt(Hu,l,o)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||W(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),s)}function o(u){return e.exit("codeIndented"),t(u)}}function ju(e,t,r){const n=this;return i;function i(l){return n.parser.lazy[n.now().line]?r(l):W(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):ie(e,a,"linePrefix",5)(l)}function a(l){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):W(l)?i(l):r(l)}}const $u={name:"codeText",previous:_u,resolve:Uu,tokenize:Gu};function Uu(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&ur(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ur(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ur(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(l):e.interrupt(n.parser.constructs.flow,r,t)(l)}}function dl(e,t,r,n,i,a,l,s,o){const u=o||Number.POSITIVE_INFINITY;let m=0;return h;function h(A){return A===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(A),e.exit(a),g):A===null||A===32||A===41||Gr(A)?r(A):(e.enter(n),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),x(A))}function g(A){return A===62?(e.enter(a),e.consume(A),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===62?(e.exit("chunkString"),e.exit(s),g(A)):A===null||A===60||W(A)?r(A):(e.consume(A),A===92?v:p)}function v(A){return A===60||A===62||A===92?(e.consume(A),p):p(A)}function x(A){return!m&&(A===null||A===41||ce(A))?(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(n),t(A)):m999||p===null||p===91||p===93&&!o||p===94&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?r(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(n),t):W(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||W(p)||s++>999?(e.exit("chunkString"),m(p)):(e.consume(p),o||(o=!ae(p)),p===92?g:h)}function g(p){return p===91||p===92||p===93?(e.consume(p),s++,h):h(p)}}function yl(e,t,r,n,i,a){let l;return s;function s(g){return g===34||g===39||g===40?(e.enter(n),e.enter(i),e.consume(g),e.exit(i),l=g===40?41:g,o):r(g)}function o(g){return g===l?(e.enter(i),e.consume(g),e.exit(i),e.exit(n),t):(e.enter(a),u(g))}function u(g){return g===l?(e.exit(a),o(l)):g===null?r(g):W(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),ie(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(g))}function m(g){return g===l||g===null||W(g)?(e.exit("chunkString"),u(g)):(e.consume(g),g===92?h:m)}function h(g){return g===l||g===92?(e.consume(g),m):m(g)}}function pr(e,t){let r;return n;function n(i){return W(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):ae(i)?ie(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const e1={name:"definition",tokenize:r1},t1={partial:!0,tokenize:n1};function r1(e,t,r){const n=this;let i;return a;function a(p){return e.enter("definition"),l(p)}function l(p){return gl.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=it(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):r(p)}function o(p){return ce(p)?pr(e,u)(p):u(p)}function u(p){return dl(e,m,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function m(p){return e.attempt(t1,h,h)(p)}function h(p){return ae(p)?ie(e,g,"whitespace")(p):g(p)}function g(p){return p===null||W(p)?(e.exit("definition"),n.parser.defined.push(i),t(p)):r(p)}}function n1(e,t,r){return n;function n(s){return ce(s)?pr(e,i)(s):r(s)}function i(s){return yl(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return ae(s)?ie(e,l,"whitespace")(s):l(s)}function l(s){return s===null||W(s)?t(s):r(s)}}const i1={name:"hardBreakEscape",tokenize:a1};function a1(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return W(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const l1={name:"headingAtx",resolve:s1,tokenize:o1};function s1(e,t){let r=e.length-2,n=3,i,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},Ue(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function o1(e,t,r){let n=0;return i;function i(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),l(m)}function l(m){return m===35&&n++<6?(e.consume(m),l):m===null||ce(m)?(e.exit("atxHeadingSequence"),s(m)):r(m)}function s(m){return m===35?(e.enter("atxHeadingSequence"),o(m)):m===null||W(m)?(e.exit("atxHeading"),t(m)):ae(m)?ie(e,s,"whitespace")(m):(e.enter("atxHeadingText"),u(m))}function o(m){return m===35?(e.consume(m),o):(e.exit("atxHeadingSequence"),s(m))}function u(m){return m===null||m===35||ce(m)?(e.exit("atxHeadingText"),s(m)):(e.consume(m),u)}}const u1=["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"],ki=["pre","script","style","textarea"],c1={concrete:!0,name:"htmlFlow",resolveTo:f1,tokenize:p1},h1={partial:!0,tokenize:g1},m1={partial:!0,tokenize:d1};function f1(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function p1(e,t,r){const n=this;let i,a,l,s,o;return u;function u(S){return m(S)}function m(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),h}function h(S){return S===33?(e.consume(S),g):S===47?(e.consume(S),a=!0,x):S===63?(e.consume(S),i=3,n.interrupt?t:k):Be(S)?(e.consume(S),l=String.fromCharCode(S),M):r(S)}function g(S){return S===45?(e.consume(S),i=2,p):S===91?(e.consume(S),i=5,s=0,v):Be(S)?(e.consume(S),i=4,n.interrupt?t:k):r(S)}function p(S){return S===45?(e.consume(S),n.interrupt?t:k):r(S)}function v(S){const De="CDATA[";return S===De.charCodeAt(s++)?(e.consume(S),s===De.length?n.interrupt?t:V:v):r(S)}function x(S){return Be(S)?(e.consume(S),l=String.fromCharCode(S),M):r(S)}function M(S){if(S===null||S===47||S===62||ce(S)){const De=S===47,Re=l.toLowerCase();return!De&&!a&&ki.includes(Re)?(i=1,n.interrupt?t(S):V(S)):u1.includes(l.toLowerCase())?(i=6,De?(e.consume(S),A):n.interrupt?t(S):V(S)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(S):a?T(S):D(S))}return S===45||Ce(S)?(e.consume(S),l+=String.fromCharCode(S),M):r(S)}function A(S){return S===62?(e.consume(S),n.interrupt?t:V):r(S)}function T(S){return ae(S)?(e.consume(S),T):I(S)}function D(S){return S===47?(e.consume(S),I):S===58||S===95||Be(S)?(e.consume(S),q):ae(S)?(e.consume(S),D):I(S)}function q(S){return S===45||S===46||S===58||S===95||Ce(S)?(e.consume(S),q):R(S)}function R(S){return S===61?(e.consume(S),E):ae(S)?(e.consume(S),R):D(S)}function E(S){return S===null||S===60||S===61||S===62||S===96?r(S):S===34||S===39?(e.consume(S),o=S,$):ae(S)?(e.consume(S),E):Z(S)}function $(S){return S===o?(e.consume(S),o=null,_):S===null||W(S)?r(S):(e.consume(S),$)}function Z(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||ce(S)?R(S):(e.consume(S),Z)}function _(S){return S===47||S===62||ae(S)?D(S):r(S)}function I(S){return S===62?(e.consume(S),U):r(S)}function U(S){return S===null||W(S)?V(S):ae(S)?(e.consume(S),U):r(S)}function V(S){return S===45&&i===2?(e.consume(S),pe):S===60&&i===1?(e.consume(S),de):S===62&&i===4?(e.consume(S),ke):S===63&&i===3?(e.consume(S),k):S===93&&i===5?(e.consume(S),He):W(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(h1,be,le)(S)):S===null||W(S)?(e.exit("htmlFlowData"),le(S)):(e.consume(S),V)}function le(S){return e.check(m1,ne,be)(S)}function ne(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),J}function J(S){return S===null||W(S)?le(S):(e.enter("htmlFlowData"),V(S))}function pe(S){return S===45?(e.consume(S),k):V(S)}function de(S){return S===47?(e.consume(S),l="",Me):V(S)}function Me(S){if(S===62){const De=l.toLowerCase();return ki.includes(De)?(e.consume(S),ke):V(S)}return Be(S)&&l.length<8?(e.consume(S),l+=String.fromCharCode(S),Me):V(S)}function He(S){return S===93?(e.consume(S),k):V(S)}function k(S){return S===62?(e.consume(S),ke):S===45&&i===2?(e.consume(S),k):V(S)}function ke(S){return S===null||W(S)?(e.exit("htmlFlowData"),be(S)):(e.consume(S),ke)}function be(S){return e.exit("htmlFlow"),t(S)}}function d1(e,t,r){const n=this;return i;function i(l){return W(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):r(l)}function a(l){return n.parser.lazy[n.now().line]?r(l):t(l)}}function g1(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Sr,t,r)}}const y1={name:"htmlText",tokenize:v1};function v1(e,t,r){const n=this;let i,a,l;return s;function s(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),o}function o(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),R):k===63?(e.consume(k),D):Be(k)?(e.consume(k),Z):r(k)}function u(k){return k===45?(e.consume(k),m):k===91?(e.consume(k),a=0,v):Be(k)?(e.consume(k),T):r(k)}function m(k){return k===45?(e.consume(k),p):r(k)}function h(k){return k===null?r(k):k===45?(e.consume(k),g):W(k)?(l=h,de(k)):(e.consume(k),h)}function g(k){return k===45?(e.consume(k),p):h(k)}function p(k){return k===62?pe(k):k===45?g(k):h(k)}function v(k){const ke="CDATA[";return k===ke.charCodeAt(a++)?(e.consume(k),a===ke.length?x:v):r(k)}function x(k){return k===null?r(k):k===93?(e.consume(k),M):W(k)?(l=x,de(k)):(e.consume(k),x)}function M(k){return k===93?(e.consume(k),A):x(k)}function A(k){return k===62?pe(k):k===93?(e.consume(k),A):x(k)}function T(k){return k===null||k===62?pe(k):W(k)?(l=T,de(k)):(e.consume(k),T)}function D(k){return k===null?r(k):k===63?(e.consume(k),q):W(k)?(l=D,de(k)):(e.consume(k),D)}function q(k){return k===62?pe(k):D(k)}function R(k){return Be(k)?(e.consume(k),E):r(k)}function E(k){return k===45||Ce(k)?(e.consume(k),E):$(k)}function $(k){return W(k)?(l=$,de(k)):ae(k)?(e.consume(k),$):pe(k)}function Z(k){return k===45||Ce(k)?(e.consume(k),Z):k===47||k===62||ce(k)?_(k):r(k)}function _(k){return k===47?(e.consume(k),pe):k===58||k===95||Be(k)?(e.consume(k),I):W(k)?(l=_,de(k)):ae(k)?(e.consume(k),_):pe(k)}function I(k){return k===45||k===46||k===58||k===95||Ce(k)?(e.consume(k),I):U(k)}function U(k){return k===61?(e.consume(k),V):W(k)?(l=U,de(k)):ae(k)?(e.consume(k),U):_(k)}function V(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(e.consume(k),i=k,le):W(k)?(l=V,de(k)):ae(k)?(e.consume(k),V):(e.consume(k),ne)}function le(k){return k===i?(e.consume(k),i=void 0,J):k===null?r(k):W(k)?(l=le,de(k)):(e.consume(k),le)}function ne(k){return k===null||k===34||k===39||k===60||k===61||k===96?r(k):k===47||k===62||ce(k)?_(k):(e.consume(k),ne)}function J(k){return k===47||k===62||ce(k)?_(k):r(k)}function pe(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):r(k)}function de(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Me}function Me(k){return ae(k)?ie(e,He,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):He(k)}function He(k){return e.enter("htmlTextData"),l(k)}}const A0={name:"labelEnd",resolveAll:k1,resolveTo:S1,tokenize:A1},b1={tokenize:z1},x1={tokenize:T1},w1={tokenize:M1};function k1(e){let t=-1;const r=[];for(;++t=3&&(u===null||W(u))?(e.exit("thematicBreak"),t(u)):r(u)}function o(u){return u===i?(e.consume(u),n++,o):(e.exit("thematicBreakSequence"),ae(u)?ie(e,s,"whitespace")(u):s(u))}}const Pe={continuation:{tokenize:P1},exit:q1,name:"list",tokenize:R1},F1={partial:!0,tokenize:H1},L1={partial:!0,tokenize:O1};function R1(e,t,r){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,l=0;return s;function s(p){const v=n.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!n.containerState.marker||p===n.containerState.marker:Qn(p)){if(n.containerState.type||(n.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(jr,r,u)(p):u(p);if(!n.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return r(p)}function o(p){return Qn(p)&&++l<10?(e.consume(p),o):(!n.interrupt||l<2)&&(n.containerState.marker?p===n.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):r(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||p,e.check(Sr,n.interrupt?r:m,e.attempt(F1,g,h))}function m(p){return n.containerState.initialBlankLine=!0,a++,g(p)}function h(p){return ae(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),g):r(p)}function g(p){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function P1(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Sr,i,a);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ie(e,t,"listItemIndent",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!ae(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,l(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(L1,t,l)(s))}function l(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,ie(e,e.attempt(Pe,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function O1(e,t,r){const n=this;return ie(e,i,"listItemIndent",n.containerState.size+1);function i(a){const l=n.events[n.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===n.containerState.size?t(a):r(a)}}function q1(e){e.exit(this.containerState.type)}function H1(e,t,r){const n=this;return ie(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const l=n.events[n.events.length-1];return!ae(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const Si={name:"setextUnderline",resolveTo:V1,tokenize:j1};function V1(e,t){let r=e.length,n,i,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",l,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=l,e.push(["exit",l,t]),e}function j1(e,t,r){const n=this;let i;return a;function a(u){let m=n.events.length,h;for(;m--;)if(n.events[m][1].type!=="lineEnding"&&n.events[m][1].type!=="linePrefix"&&n.events[m][1].type!=="content"){h=n.events[m][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(e.enter("setextHeadingLine"),i=u,l(u)):r(u)}function l(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),ae(u)?ie(e,o,"lineSuffix")(u):o(u))}function o(u){return u===null||W(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}const $1={tokenize:U1};function U1(e){const t=this,r=e.attempt(Sr,n,e.attempt(this.parser.constructs.flowInitial,i,ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Xu,i)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const _1={resolveAll:bl()},G1=vl("string"),W1=vl("text");function vl(e){return{resolveAll:bl(e==="text"?Y1:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,l,s);return l;function l(m){return u(m)?a(m):s(m)}function s(m){if(m===null){r.consume(m);return}return r.enter("data"),r.consume(m),o}function o(m){return u(m)?(r.exit("data"),a(m)):(r.consume(m),o)}function u(m){if(m===null)return!0;const h=i[m];let g=-1;if(h)for(;++g-1){const s=l[0];typeof s=="string"?l[0]=s.slice(n):l.shift()}a>0&&l.push(e[i].slice(0,a))}return l}function sc(e,t){let r=-1;const n=[];let i;for(;++r0){const rt=ee.tokenStack[ee.tokenStack.length-1];(rt[1]||zi).call(ee,void 0,rt[0])}for(H.position={start:St(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:St(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,o);const u={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,u),e.applyData(t,u)}function Ac(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zc(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function kl(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=n:i.push({type:"text",value:n}),i}function Tc(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return kl(e,t);const i={src:tr(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Mc(e,t){const r={src:tr(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function Cc(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function Ec(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return kl(e,t);const i={href:tr(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Dc(e,t){const r={href:tr(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ic(e,t,r){const n=e.all(t),i=r?Nc(r):Sl(t),a={},l=[];if(typeof t.checked=="boolean"){const m=n[0];let h;m&&m.type==="element"&&m.tagName==="p"?h=m:(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:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s1}function Bc(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},s=v0(t.children[1]),o=rl(t.children[t.children.length-1]);s&&o&&(l.position={start:s,end:o}),i.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Oc(e,t,r){const n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",l=r&&r.type==="table"?r.align:void 0,s=l?l.length:t.children.length;let o=-1;const u=[];for(;++o0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(Ci(t.slice(i),i>0,!1)),a.join("")}function Ci(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===Ti||a===Mi;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===Ti||a===Mi;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function Vc(e,t){const r={type:"text",value:Hc(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function jc(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const $c={blockquote:vc,break:bc,code:xc,delete:wc,emphasis:kc,footnoteReference:Sc,heading:Ac,html:zc,imageReference:Tc,image:Mc,inlineCode:Cc,linkReference:Ec,link:Dc,listItem:Ic,list:Bc,paragraph:Fc,root:Lc,strong:Rc,table:Pc,tableCell:qc,tableRow:Oc,text:Vc,thematicBreak:jc,toml:Er,yaml:Er,definition:Er,footnoteDefinition:Er};function Er(){}const Al=-1,ln=0,Wr=1,Yr=2,z0=3,T0=4,M0=5,C0=6,zl=7,Tl=8,Ei=typeof self=="object"?self:globalThis,Uc=(e,t)=>{const r=(i,a)=>(e.set(a,i),i),n=i=>{if(e.has(i))return e.get(i);const[a,l]=t[i];switch(a){case ln:case Al:return r(l,i);case Wr:{const s=r([],i);for(const o of l)s.push(n(o));return s}case Yr:{const s=r({},i);for(const[o,u]of l)s[n(o)]=n(u);return s}case z0:return r(new Date(l),i);case T0:{const{source:s,flags:o}=l;return r(new RegExp(s,o),i)}case M0:{const s=r(new Map,i);for(const[o,u]of l)s.set(n(o),n(u));return s}case C0:{const s=r(new Set,i);for(const o of l)s.add(n(o));return s}case zl:{const{name:s,message:o}=l;return r(new Ei[s](o),i)}case Tl:return r(BigInt(l),i);case"BigInt":return r(Object(BigInt(l)),i)}return r(new Ei[a](l),i)};return n},Di=e=>Uc(new Map,e)(0),Wt="",{toString:_c}={},{keys:Gc}=Object,cr=e=>{const t=typeof e;if(t!=="object"||!e)return[ln,t];const r=_c.call(e).slice(8,-1);switch(r){case"Array":return[Wr,Wt];case"Object":return[Yr,Wt];case"Date":return[z0,Wt];case"RegExp":return[T0,Wt];case"Map":return[M0,Wt];case"Set":return[C0,Wt]}return r.includes("Array")?[Wr,r]:r.includes("Error")?[zl,r]:[Yr,r]},Dr=([e,t])=>e===ln&&(t==="function"||t==="symbol"),Wc=(e,t,r,n)=>{const i=(l,s)=>{const o=n.push(l)-1;return r.set(s,o),o},a=l=>{if(r.has(l))return r.get(l);let[s,o]=cr(l);switch(s){case ln:{let m=l;switch(o){case"bigint":s=Tl,m=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);m=null;break;case"undefined":return i([Al],l)}return i([s,m],l)}case Wr:{if(o)return i([o,[...l]],l);const m=[],h=i([s,m],l);for(const g of l)m.push(a(g));return h}case Yr:{if(o)switch(o){case"BigInt":return i([o,l.toString()],l);case"Boolean":case"Number":case"String":return i([o,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const m=[],h=i([s,m],l);for(const g of Gc(l))(e||!Dr(cr(l[g])))&&m.push([a(g),a(l[g])]);return h}case z0:return i([s,l.toISOString()],l);case T0:{const{source:m,flags:h}=l;return i([s,{source:m,flags:h}],l)}case M0:{const m=[],h=i([s,m],l);for(const[g,p]of l)(e||!(Dr(cr(g))||Dr(cr(p))))&&m.push([a(g),a(p)]);return h}case C0:{const m=[],h=i([s,m],l);for(const g of l)(e||!Dr(cr(g)))&&m.push(a(g));return h}}const{message:u}=l;return i([s,{name:o,message:u}],l)};return a},Ii=(e,{json:t,lossy:r}={})=>{const n=[];return Wc(!(t||r),!!t,new Map,n)(e),n},qt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Di(Ii(e,t)):structuredClone(e):(e,t)=>Di(Ii(e,t));function Yc(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function Xc(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Kc(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||Yc,n=e.options.footnoteBackLabel||Xc,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let o=-1;for(;++o0&&v.push({type:"text",value:" "});let T=typeof r=="string"?r:r(o,p);typeof T=="string"&&(T={type:"text",value:T}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(o,p),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const M=m[m.length-1];if(M&&M.type==="element"&&M.tagName==="p"){const T=M.children[M.children.length-1];T&&T.type==="text"?T.value+=" ":M.children.push({type:"text",value:" "}),M.children.push(...v)}else m.push(...v);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(m,!0)};e.patch(u,A),s.push(A)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...qt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:` +`}]}}const Ar=function(e){if(e==null)return eh;if(typeof e=="function")return sn(e);if(typeof e=="object")return Array.isArray(e)?Zc(e):Qc(e);if(typeof e=="string")return Jc(e);throw new Error("Expected function, string, or object as test")};function Zc(e){const t=[];let r=-1;for(;++r":""))+")"})}return g;function g(){let p=Ml,v,x,M;if((!t||a(o,u,m[m.length-1]||void 0))&&(p=nh(r(o,m)),p[0]===e0))return p;if("children"in o&&o.children){const A=o;if(A.children&&p[0]!==Cl)for(x=(n?A.children.length:-1)+l,M=m.concat(A);x>-1&&x0&&r.push({type:"text",value:` +`}),r}function Ni(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Bi(e,t){const r=ah(e,t),n=r.one(e,void 0),i=Kc(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:` +`},i),a}function ch(e,t){return e&&"run"in e?async function(r,n){const i=Bi(r,{file:n,...t});await e.run(i,n)}:function(r,n){return Bi(r,{file:n,...e||t})}}function Fi(e){if(e)throw e}var $r=Object.prototype.hasOwnProperty,El=Object.prototype.toString,Li=Object.defineProperty,Ri=Object.getOwnPropertyDescriptor,Pi=function(t){return typeof Array.isArray=="function"?Array.isArray(t):El.call(t)==="[object Array]"},Oi=function(t){if(!t||El.call(t)!=="[object Object]")return!1;var r=$r.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&$r.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||$r.call(t,i)},qi=function(t,r){Li&&r.name==="__proto__"?Li(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},Hi=function(t,r){if(r==="__proto__")if($r.call(t,r)){if(Ri)return Ri(t,r).value}else return;return t[r]},hh=function e(){var t,r,n,i,a,l,s=arguments[0],o=1,u=arguments.length,m=!1;for(typeof s=="boolean"&&(m=s,s=arguments[1]||{},o=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});ol.length;let o;s&&l.push(i);try{o=e.apply(this,l)}catch(u){const m=u;if(s&&r)throw m;return i(m)}s||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(l,...s){r||(r=!0,t(l,...s))}function a(l){i(null,l)}}const at={basename:ph,dirname:dh,extname:gh,join:yh,sep:"/"};function ph(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');zr(e);let r=0,n=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let l=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else l<0&&(a=!0,l=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(n=i):(s=-1,n=l));return r===n?n=l:n<0&&(n=e.length),e.slice(r,n)}function dh(e){if(zr(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gh(e){zr(e);let t=e.length,r=-1,n=0,i=-1,a=0,l;for(;t--;){const s=e.codePointAt(t);if(s===47){if(l){n=t+1;break}continue}r<0&&(l=!0,r=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function yh(...e){let t=-1,r;for(;++t0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function bh(e,t){let r="",n=0,i=-1,a=0,l=-1,s,o;for(;++l<=e.length;){if(l2){if(o=r.lastIndexOf("/"),o!==r.length-1){o<0?(r="",n=0):(r=r.slice(0,o),n=r.length-1-r.lastIndexOf("/")),i=l,a=0;continue}}else if(r.length>0){r="",n=0,i=l,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,l):r=e.slice(i+1,l),n=l-i-1;i=l,a=0}else s===46&&a>-1?a++:a=-1}return r}function zr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const xh={cwd:wh};function wh(){return"/"}function n0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function kh(e){if(typeof e=="string")e=new URL(e);else if(!n0(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Sh(e)}function Sh(e){if(e.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 t=e.pathname;let r=-1;for(;++r0){let[p,...v]=m;const x=n[g][1];r0(x)&&r0(p)&&(p=Sn(!0,x,p)),n[g]=[u,p,...v]}}}}const Mh=new D0().freeze();function Mn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Cn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function En(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ji(e){if(!r0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $i(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ir(e){return Ch(e)?e:new Dl(e)}function Ch(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Eh(e){return typeof e=="string"||Dh(e)}function Dh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ih="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ui=[],_i={allowDangerousHtml:!0},Nh=/^(https?|ircs?|mailto|xmpp)$/i,Bh=[{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 Lp(e){const t=e.allowedElements,r=e.allowElement,n=e.children||"",i=e.className,a=e.components,l=e.disallowedElements,s=e.rehypePlugins||Ui,o=e.remarkPlugins||Ui,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,..._i}:_i,m=e.skipHtml,h=e.unwrapDisallowed,g=e.urlTransform||Fh,p=Mh().use(yc).use(o).use(ch,u).use(s),v=new Dl;typeof n=="string"&&(v.value=n);for(const T of Bh)Object.hasOwn(e,T.from)&&(""+T.from+(T.to?"use `"+T.to+"` instead":"remove it")+Ih+T.id,void 0);const x=p.parse(v);let M=p.runSync(x,v);return i&&(M={type:"element",tagName:"div",properties:{className:i},children:M.type==="root"?M.children:[M]}),on(M,A),Jo(M,{Fragment:vn.Fragment,components:a,ignoreInvalidStyle:!0,jsx:vn.jsx,jsxs:vn.jsxs,passKeys:!0,passNode:!0});function A(T,D,q){if(T.type==="raw"&&q&&typeof D=="number")return m?q.children.splice(D,1):q.children[D]={type:"text",value:T.value},D;if(T.type==="element"){let R;for(R in xn)if(Object.hasOwn(xn,R)&&Object.hasOwn(T.properties,R)){const E=T.properties[R],$=xn[R];($===null||$.includes(T.tagName))&&(T.properties[R]=g(String(E||""),R,T))}}if(T.type==="element"){let R=t?!t.includes(T.tagName):l?l.includes(T.tagName):!1;if(!R&&r&&typeof D=="number"&&(R=!r(T,D,q)),R&&q&&typeof D=="number")return h&&T.children?q.children.splice(D,1,...T.children):q.children.splice(D,1),D}}}function Fh(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||r>-1&&t>r||n>-1&&t>n||Nh.test(e.slice(0,t))?e:""}function Gi(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}function Lh(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Rh(e,t,r){const i=Ar(r.ignore||[]),a=Ph(t);let l=-1;for(;++l0?{type:"text",value:E}:void 0),E===!1?g.lastIndex=q+1:(v!==q&&T.push({type:"text",value:u.value.slice(v,q)}),Array.isArray(E)?T.push(...E):E&&T.push(E),v=q+D[0].length,A=!0),!g.global)break;D=g.exec(u.value)}return A?(v?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=Gi(e,"(");let a=Gi(e,")");for(;n!==-1&&i>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function Il(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ht(r)||nn(r))&&(!t||r!==47)}Nl.peek=o4;function Qh(){return{enter:{gfmFootnoteDefinition:e4,gfmFootnoteDefinitionLabelString:t4,gfmFootnoteCall:i4,gfmFootnoteCallString:a4},exit:{gfmFootnoteDefinition:n4,gfmFootnoteDefinitionLabelString:r4,gfmFootnoteCall:s4,gfmFootnoteCallString:l4}}}function Jh(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:u4,footnoteReference:Nl}}}function e4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function t4(){this.buffer()}function r4(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=it(this.sliceSerialize(e)).toLowerCase()}function n4(e){this.exit(e)}function i4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function a4(){this.buffer()}function l4(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=it(this.sliceSerialize(e)).toLowerCase()}function s4(e){this.exit(e)}function Nl(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const l=r.enter("footnoteReference"),s=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{...i.current(),before:a,after:"]"})),s(),l(),a+=i.move("]"),a}function o4(){return"["}function u4(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const l=r.enter("footnoteDefinition"),s=r.enter("label");return a+=i.move(r.safe(r.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(r.indentLines(r.containerFlow(e,i.current()),c4)),l(),a}function c4(e,t,r){return t===0?e:(r?"":" ")+e}const h4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Bl.peek=g4;function m4(){return{canContainEols:["delete"],enter:{strikethrough:p4},exit:{strikethrough:d4}}}function f4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:h4}],handlers:{delete:Bl}}}function p4(e){this.enter({type:"delete",children:[]},e)}function d4(e){this.exit(e)}function Bl(e,t,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let l=i.move("~~");return l+=r.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),a(),l}function g4(){return"~"}function y4(e){return e.length}function v4(e,t){const r=t,n=(r.align||[]).concat(),i=r.stringLength||y4,a=[],l=[],s=[],o=[];let u=0,m=-1;for(;++mu&&(u=e[m].length);++Ao[A])&&(o[A]=D)}x.push(T)}l[m]=x,s[m]=M}let h=-1;if(typeof n=="object"&&"length"in n)for(;++ho[h]&&(o[h]=T),p[h]=T),g[h]=D}l.splice(1,0,g),s.splice(1,0,p),m=-1;const v=[];for(;++m "),a.shift(2);const l=r.indentLines(r.containerFlow(e,a.current()),w4);return i(),l}function w4(e,t,r){return">"+(r?"":" ")+e}function k4(e,t){return Yi(e,t.inConstruct,!0)&&!Yi(e,t.notInConstruct,!1)}function Yi(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++nl&&(l=a):a=1,i=n+t.length,n=r.indexOf(t,i);return l}function S4(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function A4(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function z4(e,t,r,n){const i=A4(r),a=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(S4(e,r)){const h=r.enter("codeIndented"),g=r.indentLines(a,T4);return h(),g}const s=r.createTracker(n),o=i.repeat(Math.max(Fl(a,i)+1,3)),u=r.enter("codeFenced");let m=s.move(o);if(e.lang){const h=r.enter(`codeFencedLang${l}`);m+=s.move(r.safe(e.lang,{before:m,after:" ",encode:["`"],...s.current()})),h()}if(e.lang&&e.meta){const h=r.enter(`codeFencedMeta${l}`);m+=s.move(" "),m+=s.move(r.safe(e.meta,{before:m,after:` +`,encode:["`"],...s.current()})),h()}return m+=s.move(` +`),a&&(m+=s.move(a+` +`)),m+=s.move(o),u(),m}function T4(e,t,r){return(r?"":" ")+e}function I0(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function M4(e,t,r,n){const i=I0(r),a=i==='"'?"Quote":"Apostrophe",l=r.enter("definition");let s=r.enter("label");const o=r.createTracker(n);let u=o.move("[");return u+=o.move(r.safe(r.associationId(e),{before:u,after:"]",...o.current()})),u+=o.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(r.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(s=r.enter("destinationRaw"),u+=o.move(r.safe(e.url,{before:u,after:e.title?" ":` +`,...o.current()}))),s(),e.title&&(s=r.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(r.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),s()),l(),u}function C4(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function br(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Xr(e,t,r){const n=Qt(e),i=Qt(t);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ll.peek=E4;function Ll(e,t,r,n){const i=C4(r),a=r.enter("emphasis"),l=r.createTracker(n),s=l.move(i);let o=l.move(r.containerPhrasing(e,{after:i,before:s,...l.current()}));const u=o.charCodeAt(0),m=Xr(n.before.charCodeAt(n.before.length-1),u,i);m.inside&&(o=br(u)+o.slice(1));const h=o.charCodeAt(o.length-1),g=Xr(n.after.charCodeAt(0),h,i);g.inside&&(o=o.slice(0,-1)+br(h));const p=l.move(i);return a(),r.attentionEncodeSurroundingInfo={after:g.outside,before:m.outside},s+o+p}function E4(e,t,r){return r.options.emphasis||"*"}function D4(e,t){let r=!1;return on(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,e0}),!!((!e.depth||e.depth<3)&&k0(e)&&(t.options.setext||r))}function I4(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(D4(e,r)){const m=r.enter("headingSetext"),h=r.enter("phrasing"),g=r.containerPhrasing(e,{...a.current(),before:` +`,after:` +`});return h(),m(),g+` +`+(i===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(` +`))+1))}const l="#".repeat(i),s=r.enter("headingAtx"),o=r.enter("phrasing");a.move(l+" ");let u=r.containerPhrasing(e,{before:"# ",after:` +`,...a.current()});return/^[\t ]/.test(u)&&(u=br(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,r.options.closeAtx&&(u+=" "+l),o(),s(),u}Rl.peek=N4;function Rl(e){return e.value||""}function N4(){return"<"}Pl.peek=B4;function Pl(e,t,r,n){const i=I0(r),a=i==='"'?"Quote":"Apostrophe",l=r.enter("image");let s=r.enter("label");const o=r.createTracker(n);let u=o.move("![");return u+=o.move(r.safe(e.alt,{before:u,after:"]",...o.current()})),u+=o.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(r.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(s=r.enter("destinationRaw"),u+=o.move(r.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),s(),e.title&&(s=r.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(r.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),s()),u+=o.move(")"),l(),u}function B4(){return"!"}Ol.peek=F4;function Ol(e,t,r,n){const i=e.referenceType,a=r.enter("imageReference");let l=r.enter("label");const s=r.createTracker(n);let o=s.move("![");const u=r.safe(e.alt,{before:o,after:"]",...s.current()});o+=s.move(u+"]["),l();const m=r.stack;r.stack=[],l=r.enter("reference");const h=r.safe(r.associationId(e),{before:o,after:"]",...s.current()});return l(),r.stack=m,a(),i==="full"||!u||u!==h?o+=s.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=s.move("]"),o}function F4(){return"!"}ql.peek=L4;function ql(e,t,r){let n=e.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(e.url))}Vl.peek=R4;function Vl(e,t,r,n){const i=I0(r),a=i==='"'?"Quote":"Apostrophe",l=r.createTracker(n);let s,o;if(Hl(e,r)){const m=r.stack;r.stack=[],s=r.enter("autolink");let h=l.move("<");return h+=l.move(r.containerPhrasing(e,{before:h,after:">",...l.current()})),h+=l.move(">"),s(),r.stack=m,h}s=r.enter("link"),o=r.enter("label");let u=l.move("[");return u+=l.move(r.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(r.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=r.enter("destinationRaw"),u+=l.move(r.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=r.enter(`title${a}`),u+=l.move(" "+i),u+=l.move(r.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),s(),u}function R4(e,t,r){return Hl(e,r)?"<":"["}jl.peek=P4;function jl(e,t,r,n){const i=e.referenceType,a=r.enter("linkReference");let l=r.enter("label");const s=r.createTracker(n);let o=s.move("[");const u=r.containerPhrasing(e,{before:o,after:"]",...s.current()});o+=s.move(u+"]["),l();const m=r.stack;r.stack=[],l=r.enter("reference");const h=r.safe(r.associationId(e),{before:o,after:"]",...s.current()});return l(),r.stack=m,a(),i==="full"||!u||u!==h?o+=s.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=s.move("]"),o}function P4(){return"["}function N0(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function O4(e){const t=N0(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function q4(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function $l(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function H4(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let l=e.ordered?q4(r):N0(r);const s=e.ordered?l==="."?")":".":O4(r);let o=t&&r.bulletLastUsed?l===r.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&m&&(!m.children||!m.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(o=!0),$l(r)===l&&m){let h=-1;for(;++h-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const s=r.createTracker(n);s.move(a+" ".repeat(l-a.length)),s.shift(l);const o=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,s.current()),m);return o(),u;function m(h,g,p){return g?(p?"":" ".repeat(l))+h:(p?a:a+" ".repeat(l-a.length))+h}}function $4(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),l=r.containerPhrasing(e,n);return a(),i(),l}const U4=Ar(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function _4(e,t,r,n){return(e.children.some(function(l){return U4(l)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function G4(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ul.peek=W4;function Ul(e,t,r,n){const i=G4(r),a=r.enter("strong"),l=r.createTracker(n),s=l.move(i+i);let o=l.move(r.containerPhrasing(e,{after:i,before:s,...l.current()}));const u=o.charCodeAt(0),m=Xr(n.before.charCodeAt(n.before.length-1),u,i);m.inside&&(o=br(u)+o.slice(1));const h=o.charCodeAt(o.length-1),g=Xr(n.after.charCodeAt(0),h,i);g.inside&&(o=o.slice(0,-1)+br(h));const p=l.move(i+i);return a(),r.attentionEncodeSurroundingInfo={after:g.outside,before:m.outside},s+o+p}function W4(e,t,r){return r.options.strong||"*"}function Y4(e,t,r,n){return r.safe(e.value,n)}function X4(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function K4(e,t,r){const n=($l(r)+(r.options.ruleSpaces?" ":"")).repeat(X4(r));return r.options.ruleSpaces?n.slice(0,-1):n}const _l={blockquote:x4,break:Xi,code:z4,definition:M4,emphasis:Ll,hardBreak:Xi,heading:I4,html:Rl,image:Pl,imageReference:Ol,inlineCode:ql,link:Vl,linkReference:jl,list:H4,listItem:j4,paragraph:$4,root:_4,strong:Ul,text:Y4,thematicBreak:K4};function Z4(){return{enter:{table:Q4,tableData:Ki,tableHeader:Ki,tableRow:em},exit:{codeText:tm,table:J4,tableData:Bn,tableHeader:Bn,tableRow:Bn}}}function Q4(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function J4(e){this.exit(e),this.data.inTable=void 0}function em(e){this.enter({type:"tableRow",children:[]},e)}function Bn(e){this.exit(e)}function Ki(e){this.enter({type:"tableCell",children:[]},e)}function tm(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rm));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function rm(e,t){return t==="|"?t:e}function nm(e){const t=e,r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";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:g,table:l,tableCell:o,tableRow:s}};function l(p,v,x,M){return u(m(p,x,M),p.align)}function s(p,v,x,M){const A=h(p,x,M),T=u([A]);return T.slice(0,T.indexOf(` +`))}function o(p,v,x,M){const A=x.enter("tableCell"),T=x.enter("phrasing"),D=x.containerPhrasing(p,{...M,before:a,after:a});return T(),A(),D}function u(p,v){return v4(p,{align:v,alignDelimiters:n,padding:r,stringLength:i})}function m(p,v,x){const M=p.children;let A=-1;const T=[],D=v.enter("table");for(;++A0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const wm={tokenize:Em,partial:!0};function km(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Tm,continuation:{tokenize:Mm},exit:Cm}},text:{91:{name:"gfmFootnoteCall",tokenize:zm},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Sm,resolveTo:Am}}}}function Sm(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let l;for(;i--;){const o=n.events[i][1];if(o.type==="labelImage"){l=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return s;function s(o){if(!l||!l._balanced)return r(o);const u=it(n.sliceSerialize({start:l.end,end:n.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?r(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function Am(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function zm(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,l;return s;function s(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),o}function o(h){return h!==94?r(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(a>999||h===93&&!l||h===null||h===91||ce(h))return r(h);if(h===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return i.includes(it(n.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(h)}return ce(h)||(l=!0),a++,e.consume(h),h===92?m:u}function m(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}}function Tm(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,l=0,s;return o;function o(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):r(v)}function m(v){if(l>999||v===93&&!s||v===null||v===91||ce(v))return r(v);if(v===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=it(n.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return ce(v)||(s=!0),l++,e.consume(v),v===92?h:m}function h(v){return v===91||v===92||v===93?(e.consume(v),l++,m):m(v)}function g(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),i.includes(a)||i.push(a),ie(e,p,"gfmFootnoteDefinitionWhitespace")):r(v)}function p(v){return t(v)}}function Mm(e,t,r){return e.check(Sr,t,e.attempt(wm,t,r))}function Cm(e){e.exit("gfmFootnoteDefinition")}function Em(e,t,r){const n=this;return ie(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const l=n.events[n.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):r(a)}}function Dm(e){let r=e.singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(l,s){let o=-1;for(;++o1?o(v):(l.consume(v),h++,p);if(h<2&&!r)return o(v);const M=l.exit("strikethroughSequenceTemporary"),A=Qt(v);return M._open=!A||A===2&&!!x,M._close=!x||x===2&&!!A,s(v)}}}class Im{constructor(){this.map=[]}add(t,r,n){Nm(this,t,r,n)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push([...t]),t.length=0;let i=n.pop();for(;i;)t.push(...i),i=n.pop();this.map.length=0}}function Nm(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i-1;){const ne=n.events[U][1].type;if(ne==="lineEnding"||ne==="linePrefix")U--;else break}const V=U>-1?n.events[U][1].type:null,le=V==="tableHead"||V==="tableRow"?E:o;return le===E&&n.parser.lazy[n.now().line]?r(I):le(I)}function o(I){return e.enter("tableHead"),e.enter("tableRow"),u(I)}function u(I){return I===124||(l=!0,a+=1),m(I)}function m(I){return I===null?r(I):W(I)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),p):r(I):ae(I)?ie(e,m,"whitespace")(I):(a+=1,l&&(l=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),l=!0,m):(e.enter("data"),h(I)))}function h(I){return I===null||I===124||ce(I)?(e.exit("data"),m(I)):(e.consume(I),I===92?g:h)}function g(I){return I===92||I===124?(e.consume(I),h):h(I)}function p(I){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(I):(e.enter("tableDelimiterRow"),l=!1,ae(I)?ie(e,v,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):v(I))}function v(I){return I===45||I===58?M(I):I===124?(l=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),x):R(I)}function x(I){return ae(I)?ie(e,M,"whitespace")(I):M(I)}function M(I){return I===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),A):I===45?(a+=1,A(I)):I===null||W(I)?q(I):R(I)}function A(I){return I===45?(e.enter("tableDelimiterFiller"),T(I)):R(I)}function T(I){return I===45?(e.consume(I),T):I===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),D):(e.exit("tableDelimiterFiller"),D(I))}function D(I){return ae(I)?ie(e,q,"whitespace")(I):q(I)}function q(I){return I===124?v(I):I===null||W(I)?!l||i!==a?R(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):R(I)}function R(I){return r(I)}function E(I){return e.enter("tableRow"),$(I)}function $(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),$):I===null||W(I)?(e.exit("tableRow"),t(I)):ae(I)?ie(e,$,"whitespace")(I):(e.enter("data"),Z(I))}function Z(I){return I===null||I===124||ce(I)?(e.exit("data"),$(I)):(e.consume(I),I===92?_:Z)}function _(I){return I===92||I===124?(e.consume(I),Z):Z(I)}}function Rm(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],l=[0,0,0,0],s=!1,o=0,u,m,h;const g=new Im;for(;++rr[2]+1){const v=r[2]+1,x=r[3]-r[2]-1;e.add(v,x,[])}}e.add(r[3]+1,0,[["exit",h,t]])}return i!==void 0&&(a.end=Object.assign({},Xt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Qi(e,t,r,n,i){const a=[],l=Xt(t.events,r);i&&(i.end=Object.assign({},l),a.push(["exit",i,t])),n.end=Object.assign({},l),a.push(["exit",n,t]),e.add(r+1,0,a)}function Xt(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const Pm={name:"tasklistCheck",tokenize:qm};function Om(){return{text:{91:Pm}}}function qm(e,t,r){const n=this;return i;function i(o){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return ce(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),l):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),l):r(o)}function l(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(o)}function s(o){return W(o)?t(o):ae(o)?e.check({tokenize:Hm},t,r)(o):r(o)}}function Hm(e,t,r){return ie(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function Vm(e){return ul([mm(),km(),Dm(e),Fm(),Om()])}const jm={};function Rp(e){const t=this,r=e||jm,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),l=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Vm(r)),a.push(om()),l.push(um(r))}function $m(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:s,mathText:l,mathTextData:s}};function e(o){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]}},o)}function t(){this.buffer()}function r(){const o=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=o}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(o){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),m=this.stack[this.stack.length-1];m.type,this.exit(o),m.value=u;const h=m.data.hChildren[0];h.type,h.tagName,h.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function a(o){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},o),this.buffer()}function l(o){const u=this.resume(),m=this.stack[this.stack.length-1];m.type,this.exit(o),m.value=u,m.data.hChildren.push({type:"text",value:u})}function s(o){this.config.enter.data.call(this,o),this.config.exit.data.call(this,o)}}function Um(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(a,l,s,o){const u=a.value||"",m=s.createTracker(o),h="$".repeat(Math.max(Fl(u,"$")+1,2)),g=s.enter("mathFlow");let p=m.move(h);if(a.meta){const v=s.enter("mathFlowMeta");p+=m.move(s.safe(a.meta,{after:` +`,before:p,encode:["$"],...m.current()})),v()}return p+=m.move(` +`),u&&(p+=m.move(u+` +`)),p+=m.move(h),g(),p}function n(a,l,s){let o=a.value||"",u=1;for(t||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(o);)u++;const m="$".repeat(u);/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^\$|\$$/.test(o))&&(o=" "+o+" ");let h=-1;for(;++h15?u="…"+s.slice(i-15,i):u=s.slice(0,i);var m;a+15":">","<":"<",'"':""","'":"'"},nf=/[&><"']/g;function af(e){return String(e).replace(nf,t=>rf[t])}var es=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},lf=function(t){var r=es(t);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},sf=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},of=function(t){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},Y={contains:Qm,deflt:Jm,escape:af,hyphenate:tf,getBaseElem:es,isCharacterBox:lf,protocolFromUrl:of},Ur={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function uf(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class F0{constructor(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var r in Ur)if(Ur.hasOwnProperty(r)){var n=Ur[r];this[r]=t[r]!==void 0?n.processor?n.processor(t[r]):t[r]:uf(n)}}reportNonstrict(t,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(t,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new L("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var i=this.strict;if(typeof i=="function")try{i=i(t,r,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': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if(t.url&&!t.protocol){var r=Y.protocolFromUrl(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}}class At{constructor(t,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=n}sup(){return lt[cf[this.id]]}sub(){return lt[hf[this.id]]}fracNum(){return lt[mf[this.id]]}fracDen(){return lt[ff[this.id]]}cramp(){return lt[pf[this.id]]}text(){return lt[df[this.id]]}isTight(){return this.size>=2}}var L0=0,Kr=1,Zt=2,gt=3,xr=4,Xe=5,Jt=6,Fe=7,lt=[new At(L0,0,!1),new At(Kr,0,!0),new At(Zt,1,!1),new At(gt,1,!0),new At(xr,2,!1),new At(Xe,2,!0),new At(Jt,3,!1),new At(Fe,3,!0)],cf=[xr,Xe,xr,Xe,Jt,Fe,Jt,Fe],hf=[Xe,Xe,Xe,Xe,Fe,Fe,Fe,Fe],mf=[Zt,gt,xr,Xe,Jt,Fe,Jt,Fe],ff=[gt,gt,Xe,Xe,Fe,Fe,Fe,Fe],pf=[Kr,Kr,gt,gt,Xe,Xe,Fe,Fe],df=[L0,Kr,Zt,gt,Zt,gt,Zt,gt],K={DISPLAY:lt[L0],TEXT:lt[Zt],SCRIPT:lt[xr],SCRIPTSCRIPT:lt[Jt]},a0=[{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 gf(e){for(var t=0;t=i[0]&&e<=i[1])return r.name}return null}var _r=[];a0.forEach(e=>e.blocks.forEach(t=>_r.push(...t)));function ts(e){for(var t=0;t<_r.length;t+=2)if(e>=_r[t]&&e<=_r[t+1])return!0;return!1}var Yt=80,yf=function(t,r){return"M95,"+(622+t+r)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+t/2.075+" -"+t+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+t)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},vf=function(t,r){return"M263,"+(601+t+r)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+t/2.084+" -"+t+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+t)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},bf=function(t,r){return"M983 "+(10+t+r)+` +l`+t/3.13+" -"+t+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},xf=function(t,r){return"M424,"+(2398+t+r)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+t)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+r+` +h400000v`+(40+t)+"h-400000z"},wf=function(t,r){return"M473,"+(2713+t+r)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+t)+" "+r+"h400000v"+(40+t)+"H1017.7z"},kf=function(t){var r=t/2;return"M400000 "+t+" H0 L"+r+" 0 l65 45 L145 "+(t-80)+" H400000z"},Sf=function(t,r,n){var i=n-54-r-t;return"M702 "+(t+r)+"H400000"+(40+t)+` +H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+r+"H400000v"+(40+t)+"H742z"},Af=function(t,r,n){r=1e3*r;var i="";switch(t){case"sqrtMain":i=yf(r,Yt);break;case"sqrtSize1":i=vf(r,Yt);break;case"sqrtSize2":i=bf(r,Yt);break;case"sqrtSize3":i=xf(r,Yt);break;case"sqrtSize4":i=wf(r,Yt);break;case"sqrtTall":i=Sf(r,Yt,n)}return i},zf=function(t,r){switch(t){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"∣":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},ea={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Tf=function(t,r){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z +M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z +M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z +M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(r+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 Tr{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return Y.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),r=0;rr.toText();return this.children.map(t).join("")}}var st={"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]}},Br={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]},ta={Å:"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 Mf(e,t){st[e]=t}function R0(e,t,r){if(!st[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),i=st[t][n];if(!i&&e[0]in ta&&(n=ta[e[0]].charCodeAt(0),i=st[t][n]),!i&&r==="text"&&ts(n)&&(i=st[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Fn={};function Cf(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Fn[t]){var r=Fn[t]={cssEmPerMu:Br.quad[t]/18};for(var n in Br)Br.hasOwnProperty(n)&&(r[n]=Br[n][t])}return Fn[t]}var Ef=[[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]],ra=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],na=function(t,r){return r.size<2?t:Ef[t-1][r.size-1]};class dt{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||dt.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=ra[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var r={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 t)t.hasOwnProperty(n)&&(r[n]=t[n]);return new dt(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:na(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:ra[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=na(dt.BASESIZE,t);return this.size===r&&this.textSize===dt.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==dt.BASESIZE?["sizing","reset-size"+this.size,"size"+dt.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Cf(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}dt.BASESIZE=6;var l0={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},Df={ex:!0,em:!0,mu:!0},rs=function(t){return typeof t!="string"&&(t=t.unit),t in l0||t in Df||t==="ex"},ve=function(t,r){var n;if(t.unit in l0)n=l0[t.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(t.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,t.unit==="ex")n=i.fontMetrics().xHeight;else if(t.unit==="em")n=i.fontMetrics().quad;else throw new L("Invalid unit: '"+t.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*n,r.maxSize)},O=function(t){return+t.toFixed(4)+"em"},Mt=function(t){return t.filter(r=>r).join(" ")},ns=function(t,r,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},is=function(t){var r=document.createElement(t);r.className=Mt(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var a=0;a",r};class Mr{constructor(t,r,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,ns.call(this,t,n,i),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return Y.contains(this.classes,t)}toNode(){return is.call(this,"span")}toMarkup(){return as.call(this,"span")}}class P0{constructor(t,r,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,ns.call(this,r,i),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return Y.contains(this.classes,t)}toNode(){return is.call(this,"a")}toMarkup(){return as.call(this,"a")}}class If{constructor(t,r,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=r,this.src=t,this.classes=["mord"],this.style=n}hasClass(t){return Y.contains(this.classes,t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);return t}toMarkup(){var t=''+Y.escape(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=O(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Mt(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(t),r):t}toMarkup(){var t=!1,r="0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Y.hyphenate(i)+":"+this.style[i]+";");n&&(t=!0,r+=' style="'+Y.escape(n)+'"');var a=Y.escape(this.text);return t?(r+=">",r+=a,r+="",r):a}}class vt{constructor(t,r){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=r||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i':''}}class s0{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var t=" but got "+String(e)+".")}var Ff={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Lf={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},fe={math:{},text:{}};function c(e,t,r,n,i,a){fe[e][i]={font:t,group:r,replace:n},a&&n&&(fe[e][n]=fe[e][i])}var f="math",B="text",d="main",b="ams",ge="accent-token",G="bin",Le="close",rr="inner",X="mathord",ze="op-token",_e="open",un="punct",w="rel",kt="spacing",z="textord";c(f,d,w,"≡","\\equiv",!0);c(f,d,w,"≺","\\prec",!0);c(f,d,w,"≻","\\succ",!0);c(f,d,w,"∼","\\sim",!0);c(f,d,w,"⊥","\\perp");c(f,d,w,"⪯","\\preceq",!0);c(f,d,w,"⪰","\\succeq",!0);c(f,d,w,"≃","\\simeq",!0);c(f,d,w,"∣","\\mid",!0);c(f,d,w,"≪","\\ll",!0);c(f,d,w,"≫","\\gg",!0);c(f,d,w,"≍","\\asymp",!0);c(f,d,w,"∥","\\parallel");c(f,d,w,"⋈","\\bowtie",!0);c(f,d,w,"⌣","\\smile",!0);c(f,d,w,"⊑","\\sqsubseteq",!0);c(f,d,w,"⊒","\\sqsupseteq",!0);c(f,d,w,"≐","\\doteq",!0);c(f,d,w,"⌢","\\frown",!0);c(f,d,w,"∋","\\ni",!0);c(f,d,w,"∝","\\propto",!0);c(f,d,w,"⊢","\\vdash",!0);c(f,d,w,"⊣","\\dashv",!0);c(f,d,w,"∋","\\owns");c(f,d,un,".","\\ldotp");c(f,d,un,"⋅","\\cdotp");c(f,d,z,"#","\\#");c(B,d,z,"#","\\#");c(f,d,z,"&","\\&");c(B,d,z,"&","\\&");c(f,d,z,"ℵ","\\aleph",!0);c(f,d,z,"∀","\\forall",!0);c(f,d,z,"ℏ","\\hbar",!0);c(f,d,z,"∃","\\exists",!0);c(f,d,z,"∇","\\nabla",!0);c(f,d,z,"♭","\\flat",!0);c(f,d,z,"ℓ","\\ell",!0);c(f,d,z,"♮","\\natural",!0);c(f,d,z,"♣","\\clubsuit",!0);c(f,d,z,"℘","\\wp",!0);c(f,d,z,"♯","\\sharp",!0);c(f,d,z,"♢","\\diamondsuit",!0);c(f,d,z,"ℜ","\\Re",!0);c(f,d,z,"♡","\\heartsuit",!0);c(f,d,z,"ℑ","\\Im",!0);c(f,d,z,"♠","\\spadesuit",!0);c(f,d,z,"§","\\S",!0);c(B,d,z,"§","\\S");c(f,d,z,"¶","\\P",!0);c(B,d,z,"¶","\\P");c(f,d,z,"†","\\dag");c(B,d,z,"†","\\dag");c(B,d,z,"†","\\textdagger");c(f,d,z,"‡","\\ddag");c(B,d,z,"‡","\\ddag");c(B,d,z,"‡","\\textdaggerdbl");c(f,d,Le,"⎱","\\rmoustache",!0);c(f,d,_e,"⎰","\\lmoustache",!0);c(f,d,Le,"⟯","\\rgroup",!0);c(f,d,_e,"⟮","\\lgroup",!0);c(f,d,G,"∓","\\mp",!0);c(f,d,G,"⊖","\\ominus",!0);c(f,d,G,"⊎","\\uplus",!0);c(f,d,G,"⊓","\\sqcap",!0);c(f,d,G,"∗","\\ast");c(f,d,G,"⊔","\\sqcup",!0);c(f,d,G,"◯","\\bigcirc",!0);c(f,d,G,"∙","\\bullet",!0);c(f,d,G,"‡","\\ddagger");c(f,d,G,"≀","\\wr",!0);c(f,d,G,"⨿","\\amalg");c(f,d,G,"&","\\And");c(f,d,w,"⟵","\\longleftarrow",!0);c(f,d,w,"⇐","\\Leftarrow",!0);c(f,d,w,"⟸","\\Longleftarrow",!0);c(f,d,w,"⟶","\\longrightarrow",!0);c(f,d,w,"⇒","\\Rightarrow",!0);c(f,d,w,"⟹","\\Longrightarrow",!0);c(f,d,w,"↔","\\leftrightarrow",!0);c(f,d,w,"⟷","\\longleftrightarrow",!0);c(f,d,w,"⇔","\\Leftrightarrow",!0);c(f,d,w,"⟺","\\Longleftrightarrow",!0);c(f,d,w,"↦","\\mapsto",!0);c(f,d,w,"⟼","\\longmapsto",!0);c(f,d,w,"↗","\\nearrow",!0);c(f,d,w,"↩","\\hookleftarrow",!0);c(f,d,w,"↪","\\hookrightarrow",!0);c(f,d,w,"↘","\\searrow",!0);c(f,d,w,"↼","\\leftharpoonup",!0);c(f,d,w,"⇀","\\rightharpoonup",!0);c(f,d,w,"↙","\\swarrow",!0);c(f,d,w,"↽","\\leftharpoondown",!0);c(f,d,w,"⇁","\\rightharpoondown",!0);c(f,d,w,"↖","\\nwarrow",!0);c(f,d,w,"⇌","\\rightleftharpoons",!0);c(f,b,w,"≮","\\nless",!0);c(f,b,w,"","\\@nleqslant");c(f,b,w,"","\\@nleqq");c(f,b,w,"⪇","\\lneq",!0);c(f,b,w,"≨","\\lneqq",!0);c(f,b,w,"","\\@lvertneqq");c(f,b,w,"⋦","\\lnsim",!0);c(f,b,w,"⪉","\\lnapprox",!0);c(f,b,w,"⊀","\\nprec",!0);c(f,b,w,"⋠","\\npreceq",!0);c(f,b,w,"⋨","\\precnsim",!0);c(f,b,w,"⪹","\\precnapprox",!0);c(f,b,w,"≁","\\nsim",!0);c(f,b,w,"","\\@nshortmid");c(f,b,w,"∤","\\nmid",!0);c(f,b,w,"⊬","\\nvdash",!0);c(f,b,w,"⊭","\\nvDash",!0);c(f,b,w,"⋪","\\ntriangleleft");c(f,b,w,"⋬","\\ntrianglelefteq",!0);c(f,b,w,"⊊","\\subsetneq",!0);c(f,b,w,"","\\@varsubsetneq");c(f,b,w,"⫋","\\subsetneqq",!0);c(f,b,w,"","\\@varsubsetneqq");c(f,b,w,"≯","\\ngtr",!0);c(f,b,w,"","\\@ngeqslant");c(f,b,w,"","\\@ngeqq");c(f,b,w,"⪈","\\gneq",!0);c(f,b,w,"≩","\\gneqq",!0);c(f,b,w,"","\\@gvertneqq");c(f,b,w,"⋧","\\gnsim",!0);c(f,b,w,"⪊","\\gnapprox",!0);c(f,b,w,"⊁","\\nsucc",!0);c(f,b,w,"⋡","\\nsucceq",!0);c(f,b,w,"⋩","\\succnsim",!0);c(f,b,w,"⪺","\\succnapprox",!0);c(f,b,w,"≆","\\ncong",!0);c(f,b,w,"","\\@nshortparallel");c(f,b,w,"∦","\\nparallel",!0);c(f,b,w,"⊯","\\nVDash",!0);c(f,b,w,"⋫","\\ntriangleright");c(f,b,w,"⋭","\\ntrianglerighteq",!0);c(f,b,w,"","\\@nsupseteqq");c(f,b,w,"⊋","\\supsetneq",!0);c(f,b,w,"","\\@varsupsetneq");c(f,b,w,"⫌","\\supsetneqq",!0);c(f,b,w,"","\\@varsupsetneqq");c(f,b,w,"⊮","\\nVdash",!0);c(f,b,w,"⪵","\\precneqq",!0);c(f,b,w,"⪶","\\succneqq",!0);c(f,b,w,"","\\@nsubseteqq");c(f,b,G,"⊴","\\unlhd");c(f,b,G,"⊵","\\unrhd");c(f,b,w,"↚","\\nleftarrow",!0);c(f,b,w,"↛","\\nrightarrow",!0);c(f,b,w,"⇍","\\nLeftarrow",!0);c(f,b,w,"⇏","\\nRightarrow",!0);c(f,b,w,"↮","\\nleftrightarrow",!0);c(f,b,w,"⇎","\\nLeftrightarrow",!0);c(f,b,w,"△","\\vartriangle");c(f,b,z,"ℏ","\\hslash");c(f,b,z,"▽","\\triangledown");c(f,b,z,"◊","\\lozenge");c(f,b,z,"Ⓢ","\\circledS");c(f,b,z,"®","\\circledR");c(B,b,z,"®","\\circledR");c(f,b,z,"∡","\\measuredangle",!0);c(f,b,z,"∄","\\nexists");c(f,b,z,"℧","\\mho");c(f,b,z,"Ⅎ","\\Finv",!0);c(f,b,z,"⅁","\\Game",!0);c(f,b,z,"‵","\\backprime");c(f,b,z,"▲","\\blacktriangle");c(f,b,z,"▼","\\blacktriangledown");c(f,b,z,"■","\\blacksquare");c(f,b,z,"⧫","\\blacklozenge");c(f,b,z,"★","\\bigstar");c(f,b,z,"∢","\\sphericalangle",!0);c(f,b,z,"∁","\\complement",!0);c(f,b,z,"ð","\\eth",!0);c(B,d,z,"ð","ð");c(f,b,z,"╱","\\diagup");c(f,b,z,"╲","\\diagdown");c(f,b,z,"□","\\square");c(f,b,z,"□","\\Box");c(f,b,z,"◊","\\Diamond");c(f,b,z,"¥","\\yen",!0);c(B,b,z,"¥","\\yen",!0);c(f,b,z,"✓","\\checkmark",!0);c(B,b,z,"✓","\\checkmark");c(f,b,z,"ℶ","\\beth",!0);c(f,b,z,"ℸ","\\daleth",!0);c(f,b,z,"ℷ","\\gimel",!0);c(f,b,z,"ϝ","\\digamma",!0);c(f,b,z,"ϰ","\\varkappa");c(f,b,_e,"┌","\\@ulcorner",!0);c(f,b,Le,"┐","\\@urcorner",!0);c(f,b,_e,"└","\\@llcorner",!0);c(f,b,Le,"┘","\\@lrcorner",!0);c(f,b,w,"≦","\\leqq",!0);c(f,b,w,"⩽","\\leqslant",!0);c(f,b,w,"⪕","\\eqslantless",!0);c(f,b,w,"≲","\\lesssim",!0);c(f,b,w,"⪅","\\lessapprox",!0);c(f,b,w,"≊","\\approxeq",!0);c(f,b,G,"⋖","\\lessdot");c(f,b,w,"⋘","\\lll",!0);c(f,b,w,"≶","\\lessgtr",!0);c(f,b,w,"⋚","\\lesseqgtr",!0);c(f,b,w,"⪋","\\lesseqqgtr",!0);c(f,b,w,"≑","\\doteqdot");c(f,b,w,"≓","\\risingdotseq",!0);c(f,b,w,"≒","\\fallingdotseq",!0);c(f,b,w,"∽","\\backsim",!0);c(f,b,w,"⋍","\\backsimeq",!0);c(f,b,w,"⫅","\\subseteqq",!0);c(f,b,w,"⋐","\\Subset",!0);c(f,b,w,"⊏","\\sqsubset",!0);c(f,b,w,"≼","\\preccurlyeq",!0);c(f,b,w,"⋞","\\curlyeqprec",!0);c(f,b,w,"≾","\\precsim",!0);c(f,b,w,"⪷","\\precapprox",!0);c(f,b,w,"⊲","\\vartriangleleft");c(f,b,w,"⊴","\\trianglelefteq");c(f,b,w,"⊨","\\vDash",!0);c(f,b,w,"⊪","\\Vvdash",!0);c(f,b,w,"⌣","\\smallsmile");c(f,b,w,"⌢","\\smallfrown");c(f,b,w,"≏","\\bumpeq",!0);c(f,b,w,"≎","\\Bumpeq",!0);c(f,b,w,"≧","\\geqq",!0);c(f,b,w,"⩾","\\geqslant",!0);c(f,b,w,"⪖","\\eqslantgtr",!0);c(f,b,w,"≳","\\gtrsim",!0);c(f,b,w,"⪆","\\gtrapprox",!0);c(f,b,G,"⋗","\\gtrdot");c(f,b,w,"⋙","\\ggg",!0);c(f,b,w,"≷","\\gtrless",!0);c(f,b,w,"⋛","\\gtreqless",!0);c(f,b,w,"⪌","\\gtreqqless",!0);c(f,b,w,"≖","\\eqcirc",!0);c(f,b,w,"≗","\\circeq",!0);c(f,b,w,"≜","\\triangleq",!0);c(f,b,w,"∼","\\thicksim");c(f,b,w,"≈","\\thickapprox");c(f,b,w,"⫆","\\supseteqq",!0);c(f,b,w,"⋑","\\Supset",!0);c(f,b,w,"⊐","\\sqsupset",!0);c(f,b,w,"≽","\\succcurlyeq",!0);c(f,b,w,"⋟","\\curlyeqsucc",!0);c(f,b,w,"≿","\\succsim",!0);c(f,b,w,"⪸","\\succapprox",!0);c(f,b,w,"⊳","\\vartriangleright");c(f,b,w,"⊵","\\trianglerighteq");c(f,b,w,"⊩","\\Vdash",!0);c(f,b,w,"∣","\\shortmid");c(f,b,w,"∥","\\shortparallel");c(f,b,w,"≬","\\between",!0);c(f,b,w,"⋔","\\pitchfork",!0);c(f,b,w,"∝","\\varpropto");c(f,b,w,"◀","\\blacktriangleleft");c(f,b,w,"∴","\\therefore",!0);c(f,b,w,"∍","\\backepsilon");c(f,b,w,"▶","\\blacktriangleright");c(f,b,w,"∵","\\because",!0);c(f,b,w,"⋘","\\llless");c(f,b,w,"⋙","\\gggtr");c(f,b,G,"⊲","\\lhd");c(f,b,G,"⊳","\\rhd");c(f,b,w,"≂","\\eqsim",!0);c(f,d,w,"⋈","\\Join");c(f,b,w,"≑","\\Doteq",!0);c(f,b,G,"∔","\\dotplus",!0);c(f,b,G,"∖","\\smallsetminus");c(f,b,G,"⋒","\\Cap",!0);c(f,b,G,"⋓","\\Cup",!0);c(f,b,G,"⩞","\\doublebarwedge",!0);c(f,b,G,"⊟","\\boxminus",!0);c(f,b,G,"⊞","\\boxplus",!0);c(f,b,G,"⋇","\\divideontimes",!0);c(f,b,G,"⋉","\\ltimes",!0);c(f,b,G,"⋊","\\rtimes",!0);c(f,b,G,"⋋","\\leftthreetimes",!0);c(f,b,G,"⋌","\\rightthreetimes",!0);c(f,b,G,"⋏","\\curlywedge",!0);c(f,b,G,"⋎","\\curlyvee",!0);c(f,b,G,"⊝","\\circleddash",!0);c(f,b,G,"⊛","\\circledast",!0);c(f,b,G,"⋅","\\centerdot");c(f,b,G,"⊺","\\intercal",!0);c(f,b,G,"⋒","\\doublecap");c(f,b,G,"⋓","\\doublecup");c(f,b,G,"⊠","\\boxtimes",!0);c(f,b,w,"⇢","\\dashrightarrow",!0);c(f,b,w,"⇠","\\dashleftarrow",!0);c(f,b,w,"⇇","\\leftleftarrows",!0);c(f,b,w,"⇆","\\leftrightarrows",!0);c(f,b,w,"⇚","\\Lleftarrow",!0);c(f,b,w,"↞","\\twoheadleftarrow",!0);c(f,b,w,"↢","\\leftarrowtail",!0);c(f,b,w,"↫","\\looparrowleft",!0);c(f,b,w,"⇋","\\leftrightharpoons",!0);c(f,b,w,"↶","\\curvearrowleft",!0);c(f,b,w,"↺","\\circlearrowleft",!0);c(f,b,w,"↰","\\Lsh",!0);c(f,b,w,"⇈","\\upuparrows",!0);c(f,b,w,"↿","\\upharpoonleft",!0);c(f,b,w,"⇃","\\downharpoonleft",!0);c(f,d,w,"⊶","\\origof",!0);c(f,d,w,"⊷","\\imageof",!0);c(f,b,w,"⊸","\\multimap",!0);c(f,b,w,"↭","\\leftrightsquigarrow",!0);c(f,b,w,"⇉","\\rightrightarrows",!0);c(f,b,w,"⇄","\\rightleftarrows",!0);c(f,b,w,"↠","\\twoheadrightarrow",!0);c(f,b,w,"↣","\\rightarrowtail",!0);c(f,b,w,"↬","\\looparrowright",!0);c(f,b,w,"↷","\\curvearrowright",!0);c(f,b,w,"↻","\\circlearrowright",!0);c(f,b,w,"↱","\\Rsh",!0);c(f,b,w,"⇊","\\downdownarrows",!0);c(f,b,w,"↾","\\upharpoonright",!0);c(f,b,w,"⇂","\\downharpoonright",!0);c(f,b,w,"⇝","\\rightsquigarrow",!0);c(f,b,w,"⇝","\\leadsto");c(f,b,w,"⇛","\\Rrightarrow",!0);c(f,b,w,"↾","\\restriction");c(f,d,z,"‘","`");c(f,d,z,"$","\\$");c(B,d,z,"$","\\$");c(B,d,z,"$","\\textdollar");c(f,d,z,"%","\\%");c(B,d,z,"%","\\%");c(f,d,z,"_","\\_");c(B,d,z,"_","\\_");c(B,d,z,"_","\\textunderscore");c(f,d,z,"∠","\\angle",!0);c(f,d,z,"∞","\\infty",!0);c(f,d,z,"′","\\prime");c(f,d,z,"△","\\triangle");c(f,d,z,"Γ","\\Gamma",!0);c(f,d,z,"Δ","\\Delta",!0);c(f,d,z,"Θ","\\Theta",!0);c(f,d,z,"Λ","\\Lambda",!0);c(f,d,z,"Ξ","\\Xi",!0);c(f,d,z,"Π","\\Pi",!0);c(f,d,z,"Σ","\\Sigma",!0);c(f,d,z,"Υ","\\Upsilon",!0);c(f,d,z,"Φ","\\Phi",!0);c(f,d,z,"Ψ","\\Psi",!0);c(f,d,z,"Ω","\\Omega",!0);c(f,d,z,"A","Α");c(f,d,z,"B","Β");c(f,d,z,"E","Ε");c(f,d,z,"Z","Ζ");c(f,d,z,"H","Η");c(f,d,z,"I","Ι");c(f,d,z,"K","Κ");c(f,d,z,"M","Μ");c(f,d,z,"N","Ν");c(f,d,z,"O","Ο");c(f,d,z,"P","Ρ");c(f,d,z,"T","Τ");c(f,d,z,"X","Χ");c(f,d,z,"¬","\\neg",!0);c(f,d,z,"¬","\\lnot");c(f,d,z,"⊤","\\top");c(f,d,z,"⊥","\\bot");c(f,d,z,"∅","\\emptyset");c(f,b,z,"∅","\\varnothing");c(f,d,X,"α","\\alpha",!0);c(f,d,X,"β","\\beta",!0);c(f,d,X,"γ","\\gamma",!0);c(f,d,X,"δ","\\delta",!0);c(f,d,X,"ϵ","\\epsilon",!0);c(f,d,X,"ζ","\\zeta",!0);c(f,d,X,"η","\\eta",!0);c(f,d,X,"θ","\\theta",!0);c(f,d,X,"ι","\\iota",!0);c(f,d,X,"κ","\\kappa",!0);c(f,d,X,"λ","\\lambda",!0);c(f,d,X,"μ","\\mu",!0);c(f,d,X,"ν","\\nu",!0);c(f,d,X,"ξ","\\xi",!0);c(f,d,X,"ο","\\omicron",!0);c(f,d,X,"π","\\pi",!0);c(f,d,X,"ρ","\\rho",!0);c(f,d,X,"σ","\\sigma",!0);c(f,d,X,"τ","\\tau",!0);c(f,d,X,"υ","\\upsilon",!0);c(f,d,X,"ϕ","\\phi",!0);c(f,d,X,"χ","\\chi",!0);c(f,d,X,"ψ","\\psi",!0);c(f,d,X,"ω","\\omega",!0);c(f,d,X,"ε","\\varepsilon",!0);c(f,d,X,"ϑ","\\vartheta",!0);c(f,d,X,"ϖ","\\varpi",!0);c(f,d,X,"ϱ","\\varrho",!0);c(f,d,X,"ς","\\varsigma",!0);c(f,d,X,"φ","\\varphi",!0);c(f,d,G,"∗","*",!0);c(f,d,G,"+","+");c(f,d,G,"−","-",!0);c(f,d,G,"⋅","\\cdot",!0);c(f,d,G,"∘","\\circ",!0);c(f,d,G,"÷","\\div",!0);c(f,d,G,"±","\\pm",!0);c(f,d,G,"×","\\times",!0);c(f,d,G,"∩","\\cap",!0);c(f,d,G,"∪","\\cup",!0);c(f,d,G,"∖","\\setminus",!0);c(f,d,G,"∧","\\land");c(f,d,G,"∨","\\lor");c(f,d,G,"∧","\\wedge",!0);c(f,d,G,"∨","\\vee",!0);c(f,d,z,"√","\\surd");c(f,d,_e,"⟨","\\langle",!0);c(f,d,_e,"∣","\\lvert");c(f,d,_e,"∥","\\lVert");c(f,d,Le,"?","?");c(f,d,Le,"!","!");c(f,d,Le,"⟩","\\rangle",!0);c(f,d,Le,"∣","\\rvert");c(f,d,Le,"∥","\\rVert");c(f,d,w,"=","=");c(f,d,w,":",":");c(f,d,w,"≈","\\approx",!0);c(f,d,w,"≅","\\cong",!0);c(f,d,w,"≥","\\ge");c(f,d,w,"≥","\\geq",!0);c(f,d,w,"←","\\gets");c(f,d,w,">","\\gt",!0);c(f,d,w,"∈","\\in",!0);c(f,d,w,"","\\@not");c(f,d,w,"⊂","\\subset",!0);c(f,d,w,"⊃","\\supset",!0);c(f,d,w,"⊆","\\subseteq",!0);c(f,d,w,"⊇","\\supseteq",!0);c(f,b,w,"⊈","\\nsubseteq",!0);c(f,b,w,"⊉","\\nsupseteq",!0);c(f,d,w,"⊨","\\models");c(f,d,w,"←","\\leftarrow",!0);c(f,d,w,"≤","\\le");c(f,d,w,"≤","\\leq",!0);c(f,d,w,"<","\\lt",!0);c(f,d,w,"→","\\rightarrow",!0);c(f,d,w,"→","\\to");c(f,b,w,"≱","\\ngeq",!0);c(f,b,w,"≰","\\nleq",!0);c(f,d,kt," ","\\ ");c(f,d,kt," ","\\space");c(f,d,kt," ","\\nobreakspace");c(B,d,kt," ","\\ ");c(B,d,kt," "," ");c(B,d,kt," ","\\space");c(B,d,kt," ","\\nobreakspace");c(f,d,kt,null,"\\nobreak");c(f,d,kt,null,"\\allowbreak");c(f,d,un,",",",");c(f,d,un,";",";");c(f,b,G,"⊼","\\barwedge",!0);c(f,b,G,"⊻","\\veebar",!0);c(f,d,G,"⊙","\\odot",!0);c(f,d,G,"⊕","\\oplus",!0);c(f,d,G,"⊗","\\otimes",!0);c(f,d,z,"∂","\\partial",!0);c(f,d,G,"⊘","\\oslash",!0);c(f,b,G,"⊚","\\circledcirc",!0);c(f,b,G,"⊡","\\boxdot",!0);c(f,d,G,"△","\\bigtriangleup");c(f,d,G,"▽","\\bigtriangledown");c(f,d,G,"†","\\dagger");c(f,d,G,"⋄","\\diamond");c(f,d,G,"⋆","\\star");c(f,d,G,"◃","\\triangleleft");c(f,d,G,"▹","\\triangleright");c(f,d,_e,"{","\\{");c(B,d,z,"{","\\{");c(B,d,z,"{","\\textbraceleft");c(f,d,Le,"}","\\}");c(B,d,z,"}","\\}");c(B,d,z,"}","\\textbraceright");c(f,d,_e,"{","\\lbrace");c(f,d,Le,"}","\\rbrace");c(f,d,_e,"[","\\lbrack",!0);c(B,d,z,"[","\\lbrack",!0);c(f,d,Le,"]","\\rbrack",!0);c(B,d,z,"]","\\rbrack",!0);c(f,d,_e,"(","\\lparen",!0);c(f,d,Le,")","\\rparen",!0);c(B,d,z,"<","\\textless",!0);c(B,d,z,">","\\textgreater",!0);c(f,d,_e,"⌊","\\lfloor",!0);c(f,d,Le,"⌋","\\rfloor",!0);c(f,d,_e,"⌈","\\lceil",!0);c(f,d,Le,"⌉","\\rceil",!0);c(f,d,z,"\\","\\backslash");c(f,d,z,"∣","|");c(f,d,z,"∣","\\vert");c(B,d,z,"|","\\textbar",!0);c(f,d,z,"∥","\\|");c(f,d,z,"∥","\\Vert");c(B,d,z,"∥","\\textbardbl");c(B,d,z,"~","\\textasciitilde");c(B,d,z,"\\","\\textbackslash");c(B,d,z,"^","\\textasciicircum");c(f,d,w,"↑","\\uparrow",!0);c(f,d,w,"⇑","\\Uparrow",!0);c(f,d,w,"↓","\\downarrow",!0);c(f,d,w,"⇓","\\Downarrow",!0);c(f,d,w,"↕","\\updownarrow",!0);c(f,d,w,"⇕","\\Updownarrow",!0);c(f,d,ze,"∐","\\coprod");c(f,d,ze,"⋁","\\bigvee");c(f,d,ze,"⋀","\\bigwedge");c(f,d,ze,"⨄","\\biguplus");c(f,d,ze,"⋂","\\bigcap");c(f,d,ze,"⋃","\\bigcup");c(f,d,ze,"∫","\\int");c(f,d,ze,"∫","\\intop");c(f,d,ze,"∬","\\iint");c(f,d,ze,"∭","\\iiint");c(f,d,ze,"∏","\\prod");c(f,d,ze,"∑","\\sum");c(f,d,ze,"⨂","\\bigotimes");c(f,d,ze,"⨁","\\bigoplus");c(f,d,ze,"⨀","\\bigodot");c(f,d,ze,"∮","\\oint");c(f,d,ze,"∯","\\oiint");c(f,d,ze,"∰","\\oiiint");c(f,d,ze,"⨆","\\bigsqcup");c(f,d,ze,"∫","\\smallint");c(B,d,rr,"…","\\textellipsis");c(f,d,rr,"…","\\mathellipsis");c(B,d,rr,"…","\\ldots",!0);c(f,d,rr,"…","\\ldots",!0);c(f,d,rr,"⋯","\\@cdots",!0);c(f,d,rr,"⋱","\\ddots",!0);c(f,d,z,"⋮","\\varvdots");c(f,d,ge,"ˊ","\\acute");c(f,d,ge,"ˋ","\\grave");c(f,d,ge,"¨","\\ddot");c(f,d,ge,"~","\\tilde");c(f,d,ge,"ˉ","\\bar");c(f,d,ge,"˘","\\breve");c(f,d,ge,"ˇ","\\check");c(f,d,ge,"^","\\hat");c(f,d,ge,"⃗","\\vec");c(f,d,ge,"˙","\\dot");c(f,d,ge,"˚","\\mathring");c(f,d,X,"","\\@imath");c(f,d,X,"","\\@jmath");c(f,d,z,"ı","ı");c(f,d,z,"ȷ","ȷ");c(B,d,z,"ı","\\i",!0);c(B,d,z,"ȷ","\\j",!0);c(B,d,z,"ß","\\ss",!0);c(B,d,z,"æ","\\ae",!0);c(B,d,z,"œ","\\oe",!0);c(B,d,z,"ø","\\o",!0);c(B,d,z,"Æ","\\AE",!0);c(B,d,z,"Œ","\\OE",!0);c(B,d,z,"Ø","\\O",!0);c(B,d,ge,"ˊ","\\'");c(B,d,ge,"ˋ","\\`");c(B,d,ge,"ˆ","\\^");c(B,d,ge,"˜","\\~");c(B,d,ge,"ˉ","\\=");c(B,d,ge,"˘","\\u");c(B,d,ge,"˙","\\.");c(B,d,ge,"¸","\\c");c(B,d,ge,"˚","\\r");c(B,d,ge,"ˇ","\\v");c(B,d,ge,"¨",'\\"');c(B,d,ge,"˝","\\H");c(B,d,ge,"◯","\\textcircled");var ls={"--":!0,"---":!0,"``":!0,"''":!0};c(B,d,z,"–","--",!0);c(B,d,z,"–","\\textendash");c(B,d,z,"—","---",!0);c(B,d,z,"—","\\textemdash");c(B,d,z,"‘","`",!0);c(B,d,z,"‘","\\textquoteleft");c(B,d,z,"’","'",!0);c(B,d,z,"’","\\textquoteright");c(B,d,z,"“","``",!0);c(B,d,z,"“","\\textquotedblleft");c(B,d,z,"”","''",!0);c(B,d,z,"”","\\textquotedblright");c(f,d,z,"°","\\degree",!0);c(B,d,z,"°","\\degree");c(B,d,z,"°","\\textdegree",!0);c(f,d,z,"£","\\pounds");c(f,d,z,"£","\\mathsterling",!0);c(B,d,z,"£","\\pounds");c(B,d,z,"£","\\textsterling",!0);c(f,b,z,"✠","\\maltese");c(B,b,z,"✠","\\maltese");var aa='0123456789/@."';for(var Ln=0;Ln0)return nt(a,u,i,r,l.concat(m));if(o){var h,g;if(o==="boldsymbol"){var p=Of(a,i,r,l,n);h=p.fontName,g=[p.fontClass]}else s?(h=us[o].fontName,g=[o]):(h=Pr(o,r.fontWeight,r.fontShape),g=[o,r.fontWeight,r.fontShape]);if(cn(a,h,i).metrics)return nt(a,h,i,r,l.concat(g));if(ls.hasOwnProperty(a)&&h.slice(0,10)==="Typewriter"){for(var v=[],x=0;x{if(Mt(e.classes)!==Mt(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var r=e.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},Vf=e=>{for(var t=0;tr&&(r=l.height),l.depth>n&&(n=l.depth),l.maxFontSize>i&&(i=l.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=i},Oe=function(t,r,n,i){var a=new Mr(t,r,n,i);return O0(a),a},ss=(e,t,r,n)=>new Mr(e,t,r,n),jf=function(t,r,n){var i=Oe([t],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=O(i.height),i.maxFontSize=1,i},$f=function(t,r,n,i){var a=new P0(t,r,n,i);return O0(a),a},os=function(t){var r=new Tr(t);return O0(r),r},Uf=function(t,r){return t instanceof Tr?Oe([],[t],r):t},_f=function(t){if(t.positionType==="individualShift"){for(var r=t.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,l=1;l{var r=Oe(["mspace"],[],t),n=ve(e,t);return r.style.marginRight=O(n),r},Pr=function(t,r,n){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}var a;return r==="textbf"&&n==="textit"?a="BoldItalic":r==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",i+"-"+a},us={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"}},cs={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Yf=function(t,r){var[n,i,a]=cs[t],l=new Ct(n),s=new vt([l],{width:O(i),height:O(a),style:"width:"+O(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),o=ss(["overlay"],[s],r);return o.height=a,o.style.height=O(a),o.style.width=O(i),o},C={fontMap:us,makeSymbol:nt,mathsym:Pf,makeSpan:Oe,makeSvgSpan:ss,makeLineSpan:jf,makeAnchor:$f,makeFragment:os,wrapFragment:Uf,makeVList:Gf,makeOrd:qf,makeGlue:Wf,staticSvg:Yf,svgData:cs,tryCombineChars:Vf},ye={number:3,unit:"mu"},Pt={number:4,unit:"mu"},pt={number:5,unit:"mu"},Xf={mord:{mop:ye,mbin:Pt,mrel:pt,minner:ye},mop:{mord:ye,mop:ye,mrel:pt,minner:ye},mbin:{mord:Pt,mop:Pt,mopen:Pt,minner:Pt},mrel:{mord:pt,mop:pt,mopen:pt,minner:pt},mopen:{},mclose:{mop:ye,mbin:Pt,mrel:pt,minner:ye},mpunct:{mord:ye,mop:ye,mrel:pt,mopen:ye,mclose:ye,mpunct:ye,minner:ye},minner:{mord:ye,mop:ye,mbin:Pt,mrel:pt,mopen:ye,mpunct:ye,minner:ye}},Kf={mord:{mop:ye},mop:{mord:ye,mop:ye},mbin:{},mrel:{},mopen:{},mclose:{mop:ye},mpunct:{},minner:{mop:ye}},hs={},Qr={},Jr={};function j(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:l}=e,s={type:t,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},o=0;o{var M=x.classes[0],A=v.classes[0];M==="mbin"&&Y.contains(Qf,A)?x.classes[0]="mord":A==="mbin"&&Y.contains(Zf,M)&&(v.classes[0]="mord")},{node:h},g,p),ca(a,(v,x)=>{var M=u0(x),A=u0(v),T=M&&A?v.hasClass("mtight")?Kf[M][A]:Xf[M][A]:null;if(T)return C.makeGlue(T,u)},{node:h},g,p),a},ca=function e(t,r,n,i,a){i&&t.push(i);for(var l=0;lg=>{t.splice(h+1,0,g),l++})(l)}i&&t.pop()},ms=function(t){return t instanceof Tr||t instanceof P0||t instanceof Mr&&t.hasClass("enclosing")?t:null},t2=function e(t,r){var n=ms(t);if(n){var i=n.children;if(i.length){if(r==="right")return e(i[i.length-1],"right");if(r==="left")return e(i[0],"left")}}return t},u0=function(t,r){return t?(r&&(t=t2(t,r)),e2[t.classes[0]]||null):null},wr=function(t,r){var n=["nulldelimiter"].concat(t.baseSizingClasses());return bt(r.concat(n))},oe=function(t,r,n){if(!t)return bt();if(Qr[t.type]){var i=Qr[t.type](t,r);if(n&&r.size!==n.size){i=bt(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new L("Got group of unknown type: '"+t.type+"'")};function Or(e,t){var r=bt(["base"],e,t),n=bt(["strut"]);return n.style.height=O(r.height+r.depth),r.depth&&(n.style.verticalAlign=O(-r.depth)),r.children.unshift(n),r}function c0(e,t){var r=null;e.length===1&&e[0].type==="tag"&&(r=e[0].tag,e=e[0].body);var n=Te(e,t,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var a=[],l=[],s=0;s0&&(a.push(Or(l,t)),l=[]),a.push(n[s]));l.length>0&&a.push(Or(l,t));var u;r?(u=Or(Te(r,t,!0)),u.classes=["tag"],a.push(u)):i&&a.push(i);var m=bt(["katex-html"],a);if(m.setAttribute("aria-hidden","true"),u){var h=u.children[0];h.style.height=O(m.height+m.depth),m.depth&&(h.style.verticalAlign=O(-m.depth))}return m}function fs(e){return new Tr(e)}class Ye{constructor(t,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=Mt(this.classes));for(var n=0;n0&&(t+=' class ="'+Y.escape(Mt(this.classes))+'"'),t+=">";for(var n=0;n",t}toText(){return this.children.map(t=>t.toText()).join("")}}class dr{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return Y.escape(this.toText())}toText(){return this.text}}class r2{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character="  ":t>=-.05556&&t<=-.05555?this.character=" ⁣":t>=-.1667&&t<=-.1666?this.character=" ⁣":t>=-.2223&&t<=-.2222?this.character=" ⁣":t>=-.2778&&t<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",O(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var F={MathNode:Ye,TextNode:dr,SpaceNode:r2,newDocumentFragment:fs},Qe=function(t,r,n){return fe[r][t]&&fe[r][t].replace&&t.charCodeAt(0)!==55349&&!(ls.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=fe[r][t].replace),new F.TextNode(t)},q0=function(t){return t.length===1?t[0]:new F.MathNode("mrow",t)},H0=function(t,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=t.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return t.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=t.text;if(Y.contains(["\\imath","\\jmath"],a))return null;fe[i][a]&&fe[i][a].replace&&(a=fe[i][a].replace);var l=C.fontMap[n].fontName;return R0(a,l,i)?C.fontMap[n].variant:null},qe=function(t,r,n){if(t.length===1){var i=he(t[0],r);return n&&i instanceof Ye&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],l,s=0;s0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(o),l=o}return a},Et=function(t,r,n){return q0(qe(t,r,n))},he=function(t,r){if(!t)return new F.MathNode("mrow");if(Jr[t.type]){var n=Jr[t.type](t,r);return n}else throw new L("Got group of unknown type: '"+t.type+"'")};function ha(e,t,r,n,i){var a=qe(e,r),l;a.length===1&&a[0]instanceof Ye&&Y.contains(["mrow","mtable"],a[0].type)?l=a[0]:l=new F.MathNode("mrow",a);var s=new F.MathNode("annotation",[new F.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var o=new F.MathNode("semantics",[l,s]),u=new F.MathNode("math",[o]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var m=i?"katex":"katex-mathml";return C.makeSpan([m],[u])}var ps=function(t){return new dt({style:t.displayMode?K.DISPLAY:K.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},ds=function(t,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),t=C.makeSpan(n,[t])}return t},n2=function(t,r,n){var i=ps(n),a;if(n.output==="mathml")return ha(t,r,i,n.displayMode,!0);if(n.output==="html"){var l=c0(t,i);a=C.makeSpan(["katex"],[l])}else{var s=ha(t,r,i,n.displayMode,!1),o=c0(t,i);a=C.makeSpan(["katex"],[s,o])}return ds(a,n)},i2=function(t,r,n){var i=ps(n),a=c0(t,i),l=C.makeSpan(["katex"],[a]);return ds(l,n)},a2={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":"="},l2=function(t){var r=new F.MathNode("mo",[new F.TextNode(a2[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},s2={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]},o2=function(t){return t.type==="ordgroup"?t.body.length:1},u2=function(t,r){function n(){var s=4e5,o=t.label.slice(1);if(Y.contains(["widehat","widecheck","widetilde","utilde"],o)){var u=t,m=o2(u.base),h,g,p;if(m>5)o==="widehat"||o==="widecheck"?(h=420,s=2364,p=.42,g=o+"4"):(h=312,s=2340,p=.34,g="tilde4");else{var v=[1,1,2,2,3,3][m];o==="widehat"||o==="widecheck"?(s=[0,1062,2364,2364,2364][v],h=[0,239,300,360,420][v],p=[0,.24,.3,.3,.36,.42][v],g=o+v):(s=[0,600,1033,2339,2340][v],h=[0,260,286,306,312][v],p=[0,.26,.286,.3,.306,.34][v],g="tilde"+v)}var x=new Ct(g),M=new vt([x],{width:"100%",height:O(p),viewBox:"0 0 "+s+" "+h,preserveAspectRatio:"none"});return{span:C.makeSvgSpan([],[M],r),minWidth:0,height:p}}else{var A=[],T=s2[o],[D,q,R]=T,E=R/1e3,$=D.length,Z,_;if($===1){var I=T[3];Z=["hide-tail"],_=[I]}else if($===2)Z=["halfarrow-left","halfarrow-right"],_=["xMinYMin","xMaxYMin"];else if($===3)Z=["brace-left","brace-center","brace-right"],_=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+$+" children.");for(var U=0;U<$;U++){var V=new Ct(D[U]),le=new vt([V],{width:"400em",height:O(E),viewBox:"0 0 "+s+" "+R,preserveAspectRatio:_[U]+" slice"}),ne=C.makeSvgSpan([Z[U]],[le],r);if($===1)return{span:ne,minWidth:q,height:E};ne.style.height=O(E),A.push(ne)}return{span:C.makeSpan(["stretchy"],A,r),minWidth:q,height:E}}}var{span:i,minWidth:a,height:l}=n();return i.height=l,i.style.height=O(l),a>0&&(i.style.minWidth=O(a)),i},c2=function(t,r,n,i,a){var l,s=t.height+t.depth+n+i;if(/fbox|color|angl/.test(r)){if(l=C.makeSpan(["stretchy",r],[],a),r==="fbox"){var o=a.color&&a.getColor();o&&(l.style.borderColor=o)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new s0({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new s0({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var m=new vt(u,{width:"100%",height:O(s)});l=C.makeSvgSpan([],[m],a)}return l.height=s,l.style.height=O(s),l},xt={encloseSpan:c2,mathMLnode:l2,svgSpan:u2};function re(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function V0(e){var t=hn(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function hn(e){return e&&(e.type==="atom"||Lf.hasOwnProperty(e.type))?e:null}var j0=(e,t)=>{var r,n,i;e&&e.type==="supsub"?(n=re(e.base,"accent"),r=n.base,e.base=r,i=Bf(oe(e,t)),e.base=n):(n=re(e,"accent"),r=n.base);var a=oe(r,t.havingCrampedStyle()),l=n.isShifty&&Y.isCharacterBox(r),s=0;if(l){var o=Y.getBaseElem(r),u=oe(o,t.havingCrampedStyle());s=ia(u).skew}var m=n.label==="\\c",h=m?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),g;if(n.isStretchy)g=xt.svgSpan(n,t),g=C.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:g,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+O(2*s)+")",marginLeft:O(2*s)}:void 0}]},t);else{var p,v;n.label==="\\vec"?(p=C.staticSvg("vec",t),v=C.svgData.vec[1]):(p=C.makeOrd({mode:n.mode,text:n.label},t,"textord"),p=ia(p),p.italic=0,v=p.width,m&&(h+=p.depth)),g=C.makeSpan(["accent-body"],[p]);var x=n.label==="\\textcircled";x&&(g.classes.push("accent-full"),h=a.height);var M=s;x||(M-=v/2),g.style.left=O(M),n.label==="\\textcircled"&&(g.style.top=".2em"),g=C.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-h},{type:"elem",elem:g}]},t)}var A=C.makeSpan(["mord","accent"],[g],t);return i?(i.children[0]=A,i.height=Math.max(A.height,i.height),i.classes[0]="mord",i):A},gs=(e,t)=>{var r=e.isStretchy?xt.mathMLnode(e.label):new F.MathNode("mo",[Qe(e.label,e.mode)]),n=new F.MathNode("mover",[he(e.base,t),r]);return n.setAttribute("accent","true"),n},h2=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));j({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=en(t[0]),n=!h2.test(e.funcName),i=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:j0,mathmlBuilder:gs});j({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:j0,mathmlBuilder:gs});j({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(e,t)=>{var r=oe(e.base,t),n=xt.svgSpan(e,t),i=e.label==="\\utilde"?.12:0,a=C.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},t);return C.makeSpan(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var r=xt.mathMLnode(e.label),n=new F.MathNode("munder",[he(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var qr=e=>{var t=new F.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};j({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n,funcName:i}=e;return{type:"xArrow",mode:n.mode,label:i,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),i=C.wrapFragment(oe(e.body,n,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var l;e.below&&(n=t.havingStyle(r.sub()),l=C.wrapFragment(oe(e.below,n,t),t),l.classes.push(a+"-arrow-pad"));var s=xt.svgSpan(e,t),o=-t.fontMetrics().axisHeight+.5*s.height,u=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(u-=i.depth);var m;if(l){var h=-t.fontMetrics().axisHeight+l.height+.5*s.height+.111;m=C.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:s,shift:o},{type:"elem",elem:l,shift:h}]},t)}else m=C.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:s,shift:o}]},t);return m.children[0].children[0].children[1].classes.push("svg-align"),C.makeSpan(["mrel","x-arrow"],[m],t)},mathmlBuilder(e,t){var r=xt.mathMLnode(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var i=qr(he(e.body,t));if(e.below){var a=qr(he(e.below,t));n=new F.MathNode("munderover",[r,a,i])}else n=new F.MathNode("mover",[r,i])}else if(e.below){var l=qr(he(e.below,t));n=new F.MathNode("munder",[r,l])}else n=qr(),n=new F.MathNode("mover",[r,n]);return n}});var m2=C.makeSpan;function ys(e,t){var r=Te(e.body,t,!0);return m2([e.mclass],r,t)}function vs(e,t){var r,n=qe(e.body,t);return e.mclass==="minner"?r=new F.MathNode("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new F.MathNode("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new F.MathNode("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}j({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:we(i),isCharacterBox:Y.isCharacterBox(i)}},htmlBuilder:ys,mathmlBuilder:vs});var mn=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};j({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:mn(t[0]),body:we(t[1]),isCharacterBox:Y.isCharacterBox(t[1])}}});j({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,i=t[1],a=t[0],l;n!=="\\stackrel"?l=mn(i):l="mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:we(i)},o={type:"supsub",mode:a.mode,base:s,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:l,body:[o],isCharacterBox:Y.isCharacterBox(o)}},htmlBuilder:ys,mathmlBuilder:vs});j({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:mn(t[0]),body:we(t[0])}},htmlBuilder(e,t){var r=Te(e.body,t,!0),n=C.makeSpan([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=qe(e.body,t),n=new F.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var f2={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ma=()=>({type:"styling",body:[],mode:"math",style:"display"}),fa=e=>e.type==="textord"&&e.text==="@",p2=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function d2(e,t,r){var n=f2[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},l=r.callFunction("\\Big",[a],[]),s=r.callFunction("\\\\cdright",[t[1]],[]),o={type:"ordgroup",mode:"math",body:[i,l,s]};return r.callFunction("\\\\cdparent",[o],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function g2(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new L("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],i=[n],a=0;a-1))if("<>AV".indexOf(u)>-1)for(var h=0;h<2;h++){for(var g=!0,p=o+1;pAV=|." after @',l[o]);var v=d2(u,m,e),x={type:"styling",body:[v],mode:"math",style:"display"};n.push(x),s=ma()}a%2===0?n.push(s):n.shift(),n=[],i.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var M=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:M,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}j({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=C.wrapFragment(oe(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=O(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new F.MathNode("mrow",[he(e.label,t)]);return r=new F.MathNode("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new F.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});j({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=C.wrapFragment(oe(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new F.MathNode("mrow",[he(e.fragment,t)])}});j({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=re(t[0],"ordgroup"),i=n.body,a="",l=0;l=1114111)throw new L("\\@char with invalid code point "+a);return o<=65535?u=String.fromCharCode(o):(o-=65536,u=String.fromCharCode((o>>10)+55296,(o&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});var bs=(e,t)=>{var r=Te(e.body,t.withColor(e.color),!1);return C.makeFragment(r)},xs=(e,t)=>{var r=qe(e.body,t.withColor(e.color)),n=new F.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};j({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=re(t[0],"color-token").color,i=t[1];return{type:"color",mode:r.mode,color:n,body:we(i)}},htmlBuilder:bs,mathmlBuilder:xs});j({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,i=re(t[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:bs,mathmlBuilder:xs});j({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,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&&re(i,"size").value}},htmlBuilder(e,t){var r=C.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=O(ve(e.size,t)))),r},mathmlBuilder(e,t){var r=new F.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",O(ve(e.size,t)))),r}});var h0={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},ws=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new L("Expected a control sequence",e);return t},y2=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},ks=(e,t,r,n)=>{var i=e.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,i,n)};j({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(h0[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=h0[n.text]),re(t.parseFunction(),"internal");throw new L("Invalid token after macro prefix",n)}});j({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new L("Expected a control sequence",n);for(var a=0,l,s=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){l=t.gullet.future(),s[a].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new L('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new L('Argument number "'+n.text+'" out of order');a++,s.push([])}else{if(n.text==="EOF")throw new L("Expected a macro definition");s[a].push(n.text)}var{tokens:o}=t.gullet.consumeArg();return l&&o.unshift(l),(r==="\\edef"||r==="\\xdef")&&(o=t.gullet.expandTokens(o),o.reverse()),t.gullet.macros.set(i,{tokens:o,numArgs:a,delimiters:s},r===h0[r]),{type:"internal",mode:t.mode}}});j({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=ws(t.gullet.popToken());t.gullet.consumeSpaces();var i=y2(t);return ks(t,n,i,r==="\\\\globallet"),{type:"internal",mode:t.mode}}});j({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=ws(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return ks(t,n,a,r==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var mr=function(t,r,n){var i=fe.math[t]&&fe.math[t].replace,a=R0(i||t,r,n);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return a},$0=function(t,r,n,i){var a=n.havingBaseStyle(r),l=C.makeSpan(i.concat(a.sizingClasses(n)),[t],n),s=a.sizeMultiplier/n.sizeMultiplier;return l.height*=s,l.depth*=s,l.maxFontSize=a.sizeMultiplier,l},Ss=function(t,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=O(a),t.height-=a,t.depth+=a},v2=function(t,r,n,i,a,l){var s=C.makeSymbol(t,"Main-Regular",a,i),o=$0(s,r,i,l);return n&&Ss(o,i,r),o},b2=function(t,r,n,i){return C.makeSymbol(t,"Size"+r+"-Regular",n,i)},As=function(t,r,n,i,a,l){var s=b2(t,r,a,i),o=$0(C.makeSpan(["delimsizing","size"+r],[s],i),K.TEXT,i,l);return n&&Ss(o,i,K.TEXT),o},qn=function(t,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=C.makeSpan(["delimsizinginner",i],[C.makeSpan([],[C.makeSymbol(t,r,n)])]);return{type:"elem",elem:a}},Hn=function(t,r,n){var i=st["Size4-Regular"][t.charCodeAt(0)]?st["Size4-Regular"][t.charCodeAt(0)][4]:st["Size1-Regular"][t.charCodeAt(0)][4],a=new Ct("inner",zf(t,Math.round(1e3*r))),l=new vt([a],{width:O(i),height:O(r),style:"width:"+O(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),s=C.makeSvgSpan([],[l],n);return s.height=r,s.style.height=O(r),s.style.width=O(i),{type:"elem",elem:s}},m0=.008,Hr={type:"kern",size:-1*m0},x2=["|","\\lvert","\\rvert","\\vert"],w2=["\\|","\\lVert","\\rVert","\\Vert"],zs=function(t,r,n,i,a,l){var s,o,u,m,h="",g=0;s=u=m=t,o=null;var p="Size1-Regular";t==="\\uparrow"?u=m="⏐":t==="\\Uparrow"?u=m="‖":t==="\\downarrow"?s=u="⏐":t==="\\Downarrow"?s=u="‖":t==="\\updownarrow"?(s="\\uparrow",u="⏐",m="\\downarrow"):t==="\\Updownarrow"?(s="\\Uparrow",u="‖",m="\\Downarrow"):Y.contains(x2,t)?(u="∣",h="vert",g=333):Y.contains(w2,t)?(u="∥",h="doublevert",g=556):t==="["||t==="\\lbrack"?(s="⎡",u="⎢",m="⎣",p="Size4-Regular",h="lbrack",g=667):t==="]"||t==="\\rbrack"?(s="⎤",u="⎥",m="⎦",p="Size4-Regular",h="rbrack",g=667):t==="\\lfloor"||t==="⌊"?(u=s="⎢",m="⎣",p="Size4-Regular",h="lfloor",g=667):t==="\\lceil"||t==="⌈"?(s="⎡",u=m="⎢",p="Size4-Regular",h="lceil",g=667):t==="\\rfloor"||t==="⌋"?(u=s="⎥",m="⎦",p="Size4-Regular",h="rfloor",g=667):t==="\\rceil"||t==="⌉"?(s="⎤",u=m="⎥",p="Size4-Regular",h="rceil",g=667):t==="("||t==="\\lparen"?(s="⎛",u="⎜",m="⎝",p="Size4-Regular",h="lparen",g=875):t===")"||t==="\\rparen"?(s="⎞",u="⎟",m="⎠",p="Size4-Regular",h="rparen",g=875):t==="\\{"||t==="\\lbrace"?(s="⎧",o="⎨",m="⎩",u="⎪",p="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(s="⎫",o="⎬",m="⎭",u="⎪",p="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(s="⎧",m="⎩",u="⎪",p="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(s="⎫",m="⎭",u="⎪",p="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(s="⎧",m="⎭",u="⎪",p="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(s="⎫",m="⎩",u="⎪",p="Size4-Regular");var v=mr(s,p,a),x=v.height+v.depth,M=mr(u,p,a),A=M.height+M.depth,T=mr(m,p,a),D=T.height+T.depth,q=0,R=1;if(o!==null){var E=mr(o,p,a);q=E.height+E.depth,R=2}var $=x+D+q,Z=Math.max(0,Math.ceil((r-$)/(R*A))),_=$+Z*R*A,I=i.fontMetrics().axisHeight;n&&(I*=i.sizeMultiplier);var U=_/2-I,V=[];if(h.length>0){var le=_-x-D,ne=Math.round(_*1e3),J=Tf(h,Math.round(le*1e3)),pe=new Ct(h,J),de=(g/1e3).toFixed(3)+"em",Me=(ne/1e3).toFixed(3)+"em",He=new vt([pe],{width:de,height:Me,viewBox:"0 0 "+g+" "+ne}),k=C.makeSvgSpan([],[He],i);k.height=ne/1e3,k.style.width=de,k.style.height=Me,V.push({type:"elem",elem:k})}else{if(V.push(qn(m,p,a)),V.push(Hr),o===null){var ke=_-x-D+2*m0;V.push(Hn(u,ke,i))}else{var be=(_-x-D-q)/2+2*m0;V.push(Hn(u,be,i)),V.push(Hr),V.push(qn(o,p,a)),V.push(Hr),V.push(Hn(u,be,i))}V.push(Hr),V.push(qn(s,p,a))}var S=i.havingBaseStyle(K.TEXT),De=C.makeVList({positionType:"bottom",positionData:U,children:V},S);return $0(C.makeSpan(["delimsizing","mult"],[De],S),K.TEXT,i,l)},Vn=80,jn=.08,$n=function(t,r,n,i,a){var l=Af(t,i,n),s=new Ct(t,l),o=new vt([s],{width:"400em",height:O(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return C.makeSvgSpan(["hide-tail"],[o],a)},k2=function(t,r){var n=r.havingBaseSizing(),i=Es("\\surd",t*n.sizeMultiplier,Cs,n),a=n.sizeMultiplier,l=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),s,o=0,u=0,m=0,h;return i.type==="small"?(m=1e3+1e3*l+Vn,t<1?a=1:t<1.4&&(a=.7),o=(1+l+jn)/a,u=(1+l)/a,s=$n("sqrtMain",o,m,l,r),s.style.minWidth="0.853em",h=.833/a):i.type==="large"?(m=(1e3+Vn)*gr[i.size],u=(gr[i.size]+l)/a,o=(gr[i.size]+l+jn)/a,s=$n("sqrtSize"+i.size,o,m,l,r),s.style.minWidth="1.02em",h=1/a):(o=t+l+jn,u=t+l,m=Math.floor(1e3*t+l)+Vn,s=$n("sqrtTall",o,m,l,r),s.style.minWidth="0.742em",h=1.056),s.height=u,s.style.height=O(o),{span:s,advanceWidth:h,ruleWidth:(r.fontMetrics().sqrtRuleThickness+l)*a}},Ts=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],S2=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Ms=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],gr=[0,1.2,1.8,2.4,3],A2=function(t,r,n,i,a){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),Y.contains(Ts,t)||Y.contains(Ms,t))return As(t,r,!1,n,i,a);if(Y.contains(S2,t))return zs(t,gr[r],!1,n,i,a);throw new L("Illegal delimiter: '"+t+"'")},z2=[{type:"small",style:K.SCRIPTSCRIPT},{type:"small",style:K.SCRIPT},{type:"small",style:K.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],T2=[{type:"small",style:K.SCRIPTSCRIPT},{type:"small",style:K.SCRIPT},{type:"small",style:K.TEXT},{type:"stack"}],Cs=[{type:"small",style:K.SCRIPTSCRIPT},{type:"small",style:K.SCRIPT},{type:"small",style:K.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],M2=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},Es=function(t,r,n,i){for(var a=Math.min(2,3-i.style.size),l=a;lr)return n[l]}return n[n.length-1]},Ds=function(t,r,n,i,a,l){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var s;Y.contains(Ms,t)?s=z2:Y.contains(Ts,t)?s=Cs:s=T2;var o=Es(t,r,s,i);return o.type==="small"?v2(t,o.style,n,i,a,l):o.type==="large"?As(t,o.size,n,i,a,l):zs(t,r,n,i,a,l)},C2=function(t,r,n,i,a,l){var s=i.fontMetrics().axisHeight*i.sizeMultiplier,o=901,u=5/i.fontMetrics().ptPerEm,m=Math.max(r-s,n+s),h=Math.max(m/500*o,2*m-u);return Ds(t,h,!0,i,a,l)},yt={sqrtImage:k2,sizedDelim:A2,sizeToMaxHeight:gr,customSizedDelim:Ds,leftRightDelim:C2},pa={"\\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}},E2=["(","\\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 fn(e,t){var r=hn(e);if(r&&Y.contains(E2,r.text))return r;throw r?new L("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new L("Invalid delimiter type '"+e.type+"'",e)}j({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=fn(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:pa[e.funcName].size,mclass:pa[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?C.makeSpan([e.mclass]):yt.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Qe(e.delim,e.mode));var r=new F.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=O(yt.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function da(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}j({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new L("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:fn(t[0],e).text,color:r}}});j({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=fn(t[0],e),n=e.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=re(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{da(e);for(var r=Te(e.body,t,!0,["mopen","mclose"]),n=0,i=0,a=!1,l=0;l{da(e);var r=qe(e.body,t);if(e.left!=="."){var n=new F.MathNode("mo",[Qe(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var i=new F.MathNode("mo",[Qe(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),r.push(i)}return q0(r)}});j({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=fn(t[0],e);if(!e.parser.leftrightDepth)throw new L("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if(e.delim===".")r=wr(t,[]);else{r=yt.sizedDelim(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?Qe("|","text"):Qe(e.delim,e.mode),n=new F.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var U0=(e,t)=>{var r=C.wrapFragment(oe(e.body,t),t),n=e.label.slice(1),i=t.sizeMultiplier,a,l=0,s=Y.isCharacterBox(e.body);if(n==="sout")a=C.makeSpan(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/i,l=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var o=ve({number:.6,unit:"pt"},t),u=ve({number:.35,unit:"ex"},t),m=t.havingBaseSizing();i=i/m.sizeMultiplier;var h=r.height+r.depth+o+u;r.style.paddingLeft=O(h/2+o);var g=Math.floor(1e3*h*i),p=kf(g),v=new vt([new Ct("phase",p)],{width:"400em",height:O(g/1e3),viewBox:"0 0 400000 "+g,preserveAspectRatio:"xMinYMin slice"});a=C.makeSvgSpan(["hide-tail"],[v],t),a.style.height=O(h),l=r.depth+o+u}else{/cancel/.test(n)?s||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var x=0,M=0,A=0;/box/.test(n)?(A=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),x=t.fontMetrics().fboxsep+(n==="colorbox"?0:A),M=x):n==="angl"?(A=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),x=4*A,M=Math.max(0,.25-r.depth)):(x=s?.2:0,M=x),a=xt.encloseSpan(r,n,x,M,t),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=O(A)):n==="angl"&&A!==.049&&(a.style.borderTopWidth=O(A),a.style.borderRightWidth=O(A)),l=r.depth+M,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var T;if(e.backgroundColor)T=C.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:r,shift:0}]},t);else{var D=/cancel|phase/.test(n)?["svg-align"]:[];T=C.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:l,wrapperClasses:D}]},t)}return/cancel/.test(n)&&(T.height=r.height,T.depth=r.depth),/cancel/.test(n)&&!s?C.makeSpan(["mord","cancel-lap"],[T],t):C.makeSpan(["mord"],[T],t)},_0=(e,t)=>{var r=0,n=new F.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[he(e.body,t)]);switch(e.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(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};j({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=re(t[0],"color-token").color,l=t[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:l}},htmlBuilder:U0,mathmlBuilder:_0});j({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=re(t[0],"color-token").color,l=re(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:l,borderColor:a,body:s}},htmlBuilder:U0,mathmlBuilder:_0});j({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}});j({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:U0,mathmlBuilder:_0});j({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var Is={};function ut(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:l}=e,s={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},o=0;o{var t=e.parser.settings;if(!t.displayMode)throw new L("{"+e.envName+"} can be used only in display mode.")};function G0(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function It(e,t,r){var{hskipBeforeAndAfter:n,addJot:i,cols:a,arraystretch:l,colSeparationType:s,autoTag:o,singleRow:u,emptySingleRow:m,maxNumCols:h,leqno:g}=t;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!l){var p=e.gullet.expandMacroAsText("\\arraystretch");if(p==null)l=1;else if(l=parseFloat(p),!l||l<0)throw new L("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var v=[],x=[v],M=[],A=[],T=o!=null?[]:void 0;function D(){o&&e.gullet.macros.set("\\@eqnsw","1",!0)}function q(){T&&(e.gullet.macros.get("\\df@tag")?(T.push(e.subparse([new Ke("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):T.push(!!o&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(D(),A.push(ga(e));;){var R=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),R={type:"ordgroup",mode:e.mode,body:R},r&&(R={type:"styling",mode:e.mode,style:r,body:[R]}),v.push(R);var E=e.fetch().text;if(E==="&"){if(h&&v.length===h){if(u||s)throw new L("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(E==="\\end"){q(),v.length===1&&R.type==="styling"&&R.body[0].body.length===0&&(x.length>1||!m)&&x.pop(),A.length0&&(D+=.25),u.push({pos:D,isDashed:_t[Bt]})}for(q(l[0]),n=0;n0&&(U+=T,$_t))for(n=0;n=s)){var Ge=void 0;(i>0||t.hskipBeforeAndAfter)&&(Ge=Y.deflt(be.pregap,g),Ge!==0&&(J=C.makeSpan(["arraycolsep"],[]),J.style.width=O(Ge),ne.push(J)));var Ie=[];for(n=0;n0){for(var gn=C.makeLineSpan("hline",r,m),yn=C.makeLineSpan("hdashline",r,m),ir=[{type:"elem",elem:o,shift:0}];u.length>0;){var ar=u.pop(),lr=ar.pos-V;ar.isDashed?ir.push({type:"elem",elem:yn,shift:lr}):ir.push({type:"elem",elem:gn,shift:lr})}o=C.makeVList({positionType:"individualShift",children:ir},r)}if(de.length===0)return C.makeSpan(["mord"],[o],r);var Ut=C.makeVList({positionType:"individualShift",children:de},r);return Ut=C.makeSpan(["tag"],[Ut],r),C.makeFragment([o,Ut])},D2={c:"center ",l:"left ",r:"right "},ht=function(t,r){for(var n=[],i=new F.MathNode("mtd",[],["mtr-glue"]),a=new F.MathNode("mtd",[],["mml-eqn-num"]),l=0;l0){var v=t.cols,x="",M=!1,A=0,T=v.length;v[0].type==="separator"&&(g+="top ",A=1),v[v.length-1].type==="separator"&&(g+="bottom ",T-=1);for(var D=A;D0?"left ":"",g+=Z[Z.length-1].length>0?"right ":"";for(var _=1;_-1?"alignat":"align",a=t.envName==="split",l=It(t.parser,{cols:n,addJot:!0,autoTag:a?void 0:G0(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),s,o=0,u={type:"ordgroup",mode:t.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var m="",h=0;h0&&p&&(M=1),n[v]={type:"align",align:x,pregap:M,postgap:0}}return l.colSeparationType=p?"align":"alignat",l};ut({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=hn(t[0]),n=r?[t[0]]:re(t[0],"ordgroup").body,i=n.map(function(l){var s=V0(l),o=s.text;if("lcr".indexOf(o)!==-1)return{type:"align",align:o};if(o==="|")return{type:"separator",separator:"|"};if(o===":")return{type:"separator",separator:":"};throw new L("Unknown column alignment: "+o,l)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return It(e.parser,a,W0(e.envName))},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new L("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=It(e.parser,n,W0(e.envName)),l=Math.max(0,...a.body.map(s=>s.length));return a.cols=new Array(l).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=It(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=hn(t[0]),n=r?[t[0]]:re(t[0],"ordgroup").body,i=n.map(function(l){var s=V0(l),o=s.text;if("lc".indexOf(o)!==-1)return{type:"align",align:o};throw new L("Unknown column alignment: "+o,l)});if(i.length>1)throw new L("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=It(e.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new L("{subarray} can contain only one column");return a},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=It(e.parser,t,W0(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Bs,htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Y.contains(["gather","gather*"],e.envName)&&pn(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:G0(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return It(e.parser,t,"display")},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Bs,htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){pn(e);var t={autoTag:G0(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return It(e.parser,t,"display")},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["CD"],props:{numArgs:0},handler(e){return pn(e),g2(e.parser)},htmlBuilder:ct,mathmlBuilder:ht});y("\\nonumber","\\gdef\\@eqnsw{0}");y("\\notag","\\nonumber");j({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new L(e.funcName+" valid only within array environment")}});var ya=Is;j({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];if(i.type!=="ordgroup")throw new L("Invalid environment name",i);for(var a="",l=0;l{var r=e.font,n=t.withFont(r);return oe(e.body,n)},Ls=(e,t)=>{var r=e.font,n=t.withFont(r);return he(e.body,n)},va={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};j({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=en(t[0]),a=n;return a in va&&(a=va[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:Fs,mathmlBuilder:Ls});j({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0],i=Y.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:mn(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});j({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:i}=e,{mode:a}=r,l=r.parseExpression(!0,i),s="math"+n.slice(1);return{type:"font",mode:a,font:s,body:{type:"ordgroup",mode:r.mode,body:l}}},htmlBuilder:Fs,mathmlBuilder:Ls});var Rs=(e,t)=>{var r=t;return e==="display"?r=r.id>=K.SCRIPT.id?r.text():K.DISPLAY:e==="text"&&r.size===K.DISPLAY.size?r=K.TEXT:e==="script"?r=K.SCRIPT:e==="scriptscript"&&(r=K.SCRIPTSCRIPT),r},Y0=(e,t)=>{var r=Rs(e.size,t.style),n=r.fracNum(),i=r.fracDen(),a;a=t.havingStyle(n);var l=oe(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,o=3.5/t.fontMetrics().ptPerEm;l.height=l.height0?v=3*g:v=7*g,x=t.fontMetrics().denom1):(h>0?(p=t.fontMetrics().num2,v=g):(p=t.fontMetrics().num3,v=3*g),x=t.fontMetrics().denom2);var M;if(m){var T=t.fontMetrics().axisHeight;p-l.depth-(T+.5*h){var r=new F.MathNode("mfrac",[he(e.numer,t),he(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=ve(e.barSize,t);r.setAttribute("linethickness",O(n))}var i=Rs(e.size,t.style);if(i.size!==t.style.size){r=new F.MathNode("mstyle",[r]);var a=i.size===K.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",a),r.setAttribute("scriptlevel","0")}if(e.leftDelim!=null||e.rightDelim!=null){var l=[];if(e.leftDelim!=null){var s=new F.MathNode("mo",[new F.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),l.push(s)}if(l.push(r),e.rightDelim!=null){var o=new F.MathNode("mo",[new F.TextNode(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),l.push(o)}return q0(l)}return r};j({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=t[1],l,s=null,o=null,u="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":l=!0;break;case"\\\\atopfrac":l=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":l=!1,s="(",o=")";break;case"\\\\bracefrac":l=!1,s="\\{",o="\\}";break;case"\\\\brackfrac":l=!1,s="[",o="]";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:r.mode,continued:!1,numer:i,denom:a,hasBarLine:l,leftDelim:s,rightDelim:o,size:u,barSize:null}},htmlBuilder:Y0,mathmlBuilder:X0});j({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});j({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:n}}});var ba=["display","text","script","scriptscript"],xa=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};j({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],i=t[5],a=en(t[0]),l=a.type==="atom"&&a.family==="open"?xa(a.text):null,s=en(t[1]),o=s.type==="atom"&&s.family==="close"?xa(s.text):null,u=re(t[2],"size"),m,h=null;u.isBlank?m=!0:(h=u.value,m=h.number>0);var g="auto",p=t[3];if(p.type==="ordgroup"){if(p.body.length>0){var v=re(p.body[0],"textord");g=ba[Number(v.text)]}}else p=re(p,"textord"),g=ba[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:m,barSize:h,leftDelim:l,rightDelim:o,size:g}},htmlBuilder:Y0,mathmlBuilder:X0});j({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:i}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:re(t[0],"size").value,token:i}}});j({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=sf(re(t[1],"infix").size),l=t[2],s=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:l,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Y0,mathmlBuilder:X0});var Ps=(e,t)=>{var r=t.style,n,i;e.type==="supsub"?(n=e.sup?oe(e.sup,t.havingStyle(r.sup()),t):oe(e.sub,t.havingStyle(r.sub()),t),i=re(e.base,"horizBrace")):i=re(e,"horizBrace");var a=oe(i.base,t.havingBaseStyle(K.DISPLAY)),l=xt.svgSpan(i,t),s;if(i.isOver?(s=C.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:l}]},t),s.children[0].children[0].children[1].classes.push("svg-align")):(s=C.makeVList({positionType:"bottom",positionData:a.depth+.1+l.height,children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:a}]},t),s.children[0].children[0].children[0].classes.push("svg-align")),n){var o=C.makeSpan(["mord",i.isOver?"mover":"munder"],[s],t);i.isOver?s=C.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.2},{type:"elem",elem:n}]},t):s=C.makeVList({positionType:"bottom",positionData:o.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:o}]},t)}return C.makeSpan(["mord",i.isOver?"mover":"munder"],[s],t)},I2=(e,t)=>{var r=xt.mathMLnode(e.label);return new F.MathNode(e.isOver?"mover":"munder",[he(e.base,t),r])};j({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:Ps,mathmlBuilder:I2});j({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],i=re(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:we(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Te(e.body,t,!1);return C.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=Et(e.body,t);return r instanceof Ye||(r=new Ye("mrow",[r])),r.setAttribute("href",e.href),r}});j({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=re(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a{var{parser:r,funcName:n,token:i}=e,a=re(t[0],"raw").string,l=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s,o={};switch(n){case"\\htmlClass":o.class=a,s={command:"\\htmlClass",class:a};break;case"\\htmlId":o.id=a,s={command:"\\htmlId",id:a};break;case"\\htmlStyle":o.style=a,s={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var u=a.split(","),m=0;m{var r=Te(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var i=C.makeSpan(n,r,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>Et(e.body,t)});j({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:we(t[0]),mathml:we(t[1])}},htmlBuilder:(e,t)=>{var r=Te(e.html,t,!1);return C.makeFragment(r)},mathmlBuilder:(e,t)=>Et(e.mathml,t)});var Un=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new L("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!rs(n))throw new L("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};j({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,i={number:0,unit:"em"},a={number:.9,unit:"em"},l={number:0,unit:"em"},s="";if(r[0])for(var o=re(r[0],"raw").string,u=o.split(","),m=0;m{var r=ve(e.height,t),n=0;e.totalheight.number>0&&(n=ve(e.totalheight,t)-r);var i=0;e.width.number>0&&(i=ve(e.width,t));var a={height:O(r+n)};i>0&&(a.width=O(i)),n>0&&(a.verticalAlign=O(-n));var l=new If(e.src,e.alt,a);return l.height=r,l.depth=n,l},mathmlBuilder:(e,t)=>{var r=new F.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=ve(e.height,t),i=0;if(e.totalheight.number>0&&(i=ve(e.totalheight,t)-n,r.setAttribute("valign",O(-i))),r.setAttribute("height",O(n+i)),e.width.number>0){var a=ve(e.width,t);r.setAttribute("width",O(a))}return r.setAttribute("src",e.src),r}});j({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=re(t[0],"size");if(r.settings.strict){var a=n[1]==="m",l=i.value.unit==="mu";a?(l||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):l&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(e,t){return C.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var r=ve(e.dimension,t);return new F.SpaceNode(r)}});j({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=C.makeSpan([],[oe(e.body,t)]),r=C.makeSpan(["inner"],[r],t)):r=C.makeSpan(["inner"],[oe(e.body,t)]);var n=C.makeSpan(["fix"],[]),i=C.makeSpan([e.alignment],[r,n],t),a=C.makeSpan(["strut"]);return a.style.height=O(i.height+i.depth),i.depth&&(a.style.verticalAlign=O(-i.depth)),i.children.unshift(a),i=C.makeSpan(["thinbox"],[i],t),C.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var r=new F.MathNode("mpadded",[he(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});j({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",l=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:l}}});j({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new L("Mismatched "+e.funcName)}});var wa=(e,t)=>{switch(t.style.size){case K.DISPLAY.size:return e.display;case K.TEXT.size:return e.text;case K.SCRIPT.size:return e.script;case K.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};j({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:we(t[0]),text:we(t[1]),script:we(t[2]),scriptscript:we(t[3])}},htmlBuilder:(e,t)=>{var r=wa(e,t),n=Te(r,t,!1);return C.makeFragment(n)},mathmlBuilder:(e,t)=>{var r=wa(e,t);return Et(r,t)}});var Os=(e,t,r,n,i,a,l)=>{e=C.makeSpan([],[e]);var s=r&&Y.isCharacterBox(r),o,u;if(t){var m=oe(t,n.havingStyle(i.sup()),n);u={elem:m,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-m.depth)}}if(r){var h=oe(r,n.havingStyle(i.sub()),n);o={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}var g;if(u&&o){var p=n.fontMetrics().bigOpSpacing5+o.elem.height+o.elem.depth+o.kern+e.depth+l;g=C.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:O(-a)},{type:"kern",size:o.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:O(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(o){var v=e.height-l;g=C.makeVList({positionType:"top",positionData:v,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:O(-a)},{type:"kern",size:o.kern},{type:"elem",elem:e}]},n)}else if(u){var x=e.depth+l;g=C.makeVList({positionType:"bottom",positionData:x,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:O(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return e;var M=[g];if(o&&a!==0&&!s){var A=C.makeSpan(["mspace"],[],n);A.style.marginRight=O(a),M.unshift(A)}return C.makeSpan(["mop","op-limits"],M,n)},qs=["\\smallint"],nr=(e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=re(e.base,"op"),i=!0):a=re(e,"op");var l=t.style,s=!1;l.size===K.DISPLAY.size&&a.symbol&&!Y.contains(qs,a.name)&&(s=!0);var o;if(a.symbol){var u=s?"Size2-Regular":"Size1-Regular",m="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(m=a.name.slice(1),a.name=m==="oiint"?"\\iint":"\\iiint"),o=C.makeSymbol(a.name,u,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),m.length>0){var h=o.italic,g=C.staticSvg(m+"Size"+(s?"2":"1"),t);o=C.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:g,shift:s?.08:0}]},t),a.name="\\"+m,o.classes.unshift("mop"),o.italic=h}}else if(a.body){var p=Te(a.body,t,!0);p.length===1&&p[0]instanceof Ze?(o=p[0],o.classes[0]="mop"):o=C.makeSpan(["mop"],p,t)}else{for(var v=[],x=1;x{var r;if(e.symbol)r=new Ye("mo",[Qe(e.name,e.mode)]),Y.contains(qs,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Ye("mo",qe(e.body,t));else{r=new Ye("mi",[new dr(e.name.slice(1))]);var n=new Ye("mo",[Qe("⁡","text")]);e.parentIsSupSub?r=new Ye("mrow",[r,n]):r=fs([r,n])}return r},N2={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};j({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=n;return i.length===1&&(i=N2[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:nr,mathmlBuilder:Cr});j({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:we(n)}},htmlBuilder:nr,mathmlBuilder:Cr});var B2={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};j({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:nr,mathmlBuilder:Cr});j({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:nr,mathmlBuilder:Cr});j({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=B2[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:nr,mathmlBuilder:Cr});var Hs=(e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=re(e.base,"operatorname"),i=!0):a=re(e,"operatorname");var l;if(a.body.length>0){for(var s=a.body.map(h=>{var g=h.text;return typeof g=="string"?{type:"textord",mode:h.mode,text:g}:h}),o=Te(s,t.withFont("mathrm"),!0),u=0;u{for(var r=qe(e.body,t.withFont("mathrm")),n=!0,i=0;im.toText()).join("");r=[new F.TextNode(s)]}var o=new F.MathNode("mi",r);o.setAttribute("mathvariant","normal");var u=new F.MathNode("mo",[Qe("⁡","text")]);return e.parentIsSupSub?new F.MathNode("mrow",[o,u]):F.newDocumentFragment([o,u])};j({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"operatorname",mode:r.mode,body:we(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Hs,mathmlBuilder:F2});y("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");jt({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?C.makeFragment(Te(e.body,t,!1)):C.makeSpan(["mord"],Te(e.body,t,!0),t)},mathmlBuilder(e,t){return Et(e.body,t,!0)}});j({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=oe(e.body,t.havingCrampedStyle()),n=C.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,a=C.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},t);return C.makeSpan(["mord","overline"],[a],t)},mathmlBuilder(e,t){var r=new F.MathNode("mo",[new F.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new F.MathNode("mover",[he(e.body,t),r]);return n.setAttribute("accent","true"),n}});j({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:we(n)}},htmlBuilder:(e,t)=>{var r=Te(e.body,t.withPhantom(),!1);return C.makeFragment(r)},mathmlBuilder:(e,t)=>{var r=qe(e.body,t);return new F.MathNode("mphantom",r)}});j({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=C.makeSpan([],[oe(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n{var r=qe(we(e.body),t),n=new F.MathNode("mphantom",r),i=new F.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});j({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=C.makeSpan(["inner"],[oe(e.body,t.withPhantom())]),n=C.makeSpan(["fix"],[]);return C.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=qe(we(e.body),t),n=new F.MathNode("mphantom",r),i=new F.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});j({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=re(t[0],"size").value,i=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(e,t){var r=oe(e.body,t),n=ve(e.dy,t);return C.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){var r=new F.MathNode("mpadded",[he(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}});j({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});j({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,i=r[0],a=re(t[0],"size"),l=re(t[1],"size");return{type:"rule",mode:n.mode,shift:i&&re(i,"size").value,width:a.value,height:l.value}},htmlBuilder(e,t){var r=C.makeSpan(["mord","rule"],[],t),n=ve(e.width,t),i=ve(e.height,t),a=e.shift?ve(e.shift,t):0;return r.style.borderRightWidth=O(n),r.style.borderTopWidth=O(i),r.style.bottom=O(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=ve(e.width,t),n=ve(e.height,t),i=e.shift?ve(e.shift,t):0,a=t.color&&t.getColor()||"black",l=new F.MathNode("mspace");l.setAttribute("mathbackground",a),l.setAttribute("width",O(r)),l.setAttribute("height",O(n));var s=new F.MathNode("mpadded",[l]);return i>=0?s.setAttribute("height",O(i)):(s.setAttribute("height",O(i)),s.setAttribute("depth",O(-i))),s.setAttribute("voffset",O(i)),s}});function Vs(e,t,r){for(var n=Te(e,t,!1),i=t.sizeMultiplier/r.sizeMultiplier,a=0;a{var r=t.havingSize(e.size);return Vs(e.body,r,t)};j({type:"sizing",names:ka,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:ka.indexOf(n)+1,body:a}},htmlBuilder:L2,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=qe(e.body,r),i=new F.MathNode("mstyle",n);return i.setAttribute("mathsize",O(r.sizeMultiplier)),i}});j({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,i=!1,a=!1,l=r[0]&&re(r[0],"ordgroup");if(l)for(var s="",o=0;o{var r=C.makeSpan([],[oe(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n{var r=new F.MathNode("mpadded",[he(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}});j({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,i=r[0],a=t[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(e,t){var r=oe(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=C.wrapFragment(r,t);var n=t.fontMetrics(),i=n.defaultRuleThickness,a=i;t.style.idr.height+r.depth+l&&(l=(l+h-r.height-r.depth)/2);var g=o.height-r.height-l-u;r.style.paddingLeft=O(m);var p=C.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+g)},{type:"elem",elem:o},{type:"kern",size:u}]},t);if(e.index){var v=t.havingStyle(K.SCRIPTSCRIPT),x=oe(e.index,v,t),M=.6*(p.height-p.depth),A=C.makeVList({positionType:"shift",positionData:-M,children:[{type:"elem",elem:x}]},t),T=C.makeSpan(["root"],[A]);return C.makeSpan(["mord","sqrt"],[T,p],t)}else return C.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new F.MathNode("mroot",[he(r,t),he(n,t)]):new F.MathNode("msqrt",[he(r,t)])}});var Sa={display:K.DISPLAY,text:K.TEXT,script:K.SCRIPT,scriptscript:K.SCRIPTSCRIPT};j({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!0,r),l=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:l,body:a}},htmlBuilder(e,t){var r=Sa[e.style],n=t.havingStyle(r).withFont("");return Vs(e.body,n,t)},mathmlBuilder(e,t){var r=Sa[e.style],n=t.havingStyle(r),i=qe(e.body,n),a=new F.MathNode("mstyle",i),l={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},s=l[e.style];return a.setAttribute("scriptlevel",s[0]),a.setAttribute("displaystyle",s[1]),a}});var R2=function(t,r){var n=t.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===K.DISPLAY.size||n.alwaysHandleSupSub);return i?nr:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===K.DISPLAY.size||n.limits);return a?Hs:null}else{if(n.type==="accent")return Y.isCharacterBox(n.base)?j0:null;if(n.type==="horizBrace"){var l=!t.sub;return l===n.isOver?Ps:null}else return null}else return null};jt({type:"supsub",htmlBuilder(e,t){var r=R2(e,t);if(r)return r(e,t);var{base:n,sup:i,sub:a}=e,l=oe(n,t),s,o,u=t.fontMetrics(),m=0,h=0,g=n&&Y.isCharacterBox(n);if(i){var p=t.havingStyle(t.style.sup());s=oe(i,p,t),g||(m=l.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var v=t.havingStyle(t.style.sub());o=oe(a,v,t),g||(h=l.depth+v.fontMetrics().subDrop*v.sizeMultiplier/t.sizeMultiplier)}var x;t.style===K.DISPLAY?x=u.sup1:t.style.cramped?x=u.sup3:x=u.sup2;var M=t.sizeMultiplier,A=O(.5/u.ptPerEm/M),T=null;if(o){var D=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(l instanceof Ze||D)&&(T=O(-l.italic))}var q;if(s&&o){m=Math.max(m,x,s.depth+.25*u.xHeight),h=Math.max(h,u.sub2);var R=u.defaultRuleThickness,E=4*R;if(m-s.depth-(o.height-h)0&&(m+=$,h-=$)}var Z=[{type:"elem",elem:o,shift:h,marginRight:A,marginLeft:T},{type:"elem",elem:s,shift:-m,marginRight:A}];q=C.makeVList({positionType:"individualShift",children:Z},t)}else if(o){h=Math.max(h,u.sub1,o.height-.8*u.xHeight);var _=[{type:"elem",elem:o,marginLeft:T,marginRight:A}];q=C.makeVList({positionType:"shift",positionData:h,children:_},t)}else if(s)m=Math.max(m,x,s.depth+.25*u.xHeight),q=C.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:s,marginRight:A}]},t);else throw new Error("supsub must have either sup or sub.");var I=u0(l,"right")||"mord";return C.makeSpan([I],[l,C.makeSpan(["msupsub"],[q])],t)},mathmlBuilder(e,t){var r=!1,n,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[he(e.base,t)];e.sub&&a.push(he(e.sub,t)),e.sup&&a.push(he(e.sup,t));var l;if(r)l=n?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&t.style===K.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===K.DISPLAY||u.limits)?l="munderover":l="msubsup"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===K.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===K.DISPLAY)?l="munder":l="msub"}else{var s=e.base;s&&s.type==="op"&&s.limits&&(t.style===K.DISPLAY||s.alwaysHandleSupSub)||s&&s.type==="operatorname"&&s.alwaysHandleSupSub&&(s.limits||t.style===K.DISPLAY)?l="mover":l="msup"}return new F.MathNode(l,a)}});jt({type:"atom",htmlBuilder(e,t){return C.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new F.MathNode("mo",[Qe(e.text,e.mode)]);if(e.family==="bin"){var n=H0(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});var js={mi:"italic",mn:"normal",mtext:"normal"};jt({type:"mathord",htmlBuilder(e,t){return C.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new F.MathNode("mi",[Qe(e.text,e.mode,t)]),n=H0(e,t)||"italic";return n!==js[r.type]&&r.setAttribute("mathvariant",n),r}});jt({type:"textord",htmlBuilder(e,t){return C.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=Qe(e.text,e.mode,t),n=H0(e,t)||"normal",i;return e.mode==="text"?i=new F.MathNode("mtext",[r]):/[0-9]/.test(e.text)?i=new F.MathNode("mn",[r]):e.text==="\\prime"?i=new F.MathNode("mo",[r]):i=new F.MathNode("mi",[r]),n!==js[i.type]&&i.setAttribute("mathvariant",n),i}});var _n={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Gn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};jt({type:"spacing",htmlBuilder(e,t){if(Gn.hasOwnProperty(e.text)){var r=Gn[e.text].className||"";if(e.mode==="text"){var n=C.makeOrd(e,t,"textord");return n.classes.push(r),n}else return C.makeSpan(["mspace",r],[C.mathsym(e.text,e.mode,t)],t)}else{if(_n.hasOwnProperty(e.text))return C.makeSpan(["mspace",_n[e.text]],[],t);throw new L('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(Gn.hasOwnProperty(e.text))r=new F.MathNode("mtext",[new F.TextNode(" ")]);else{if(_n.hasOwnProperty(e.text))return new F.MathNode("mspace");throw new L('Unknown type of space "'+e.text+'"')}return r}});var Aa=()=>{var e=new F.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};jt({type:"tag",mathmlBuilder(e,t){var r=new F.MathNode("mtable",[new F.MathNode("mtr",[Aa(),new F.MathNode("mtd",[Et(e.body,t)]),Aa(),new F.MathNode("mtd",[Et(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var za={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ta={"\\textbf":"textbf","\\textmd":"textmd"},P2={"\\textit":"textit","\\textup":"textup"},Ma=(e,t)=>{var r=e.font;if(r){if(za[r])return t.withTextFontFamily(za[r]);if(Ta[r])return t.withTextFontWeight(Ta[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(P2[r])};j({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"text",mode:r.mode,body:we(i),font:n}},htmlBuilder(e,t){var r=Ma(e,t),n=Te(e.body,r,!0);return C.makeSpan(["mord","text"],n,r)},mathmlBuilder(e,t){var r=Ma(e,t);return Et(e.body,r)}});j({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=oe(e.body,t),n=C.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,a=C.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},t);return C.makeSpan(["mord","underline"],[a],t)},mathmlBuilder(e,t){var r=new F.MathNode("mo",[new F.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new F.MathNode("munder",[he(e.body,t),r]);return n.setAttribute("accentunder","true"),n}});j({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=oe(e.body,t),n=t.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return C.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return new F.MathNode("mpadded",[he(e.body,t)],["vcenter"])}});j({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new L("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Ca(e),n=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),Tt=hs,$s=`[ \r + ]`,O2="\\\\[a-zA-Z@]+",q2="\\\\[^\uD800-\uDFFF]",H2="("+O2+")"+$s+"*",V2=`\\\\( +|[ \r ]+ +?)[ \r ]*`,f0="[̀-ͯ]",j2=new RegExp(f0+"+$"),$2="("+$s+"+)|"+(V2+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(f0+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(f0+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+H2)+("|"+q2+")");class Ea{constructor(t,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=r,this.tokenRegex=new RegExp($2,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new Ke("EOF",new $e(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new L("Unexpected character: '"+t[r]+"'",new Ke(t[r],new $e(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=t.indexOf(` +`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new Ke(i,new $e(this,r,this.tokenRegex.lastIndex))}}class U2{constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new L("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(t)&&(a[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}}var _2=Ns;y("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});y("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});y("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});y("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});y("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});y("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");y("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Da={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};y("\\char",function(e){var t=e.popToken(),r,n="";if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")n=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new L("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=Da[t.text],n==null||n>=r)throw new L("Invalid base-"+r+" digit "+t.text);for(var i;(i=Da[e.future().text])!=null&&i{var n=e.consumeArg().tokens;if(n.length!==1)throw new L("\\newcommand's first argument must be a macro name");var i=n[0].text,a=e.isDefined(i);if(a&&!t)throw new L("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!r)throw new L("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var l=0;if(n=e.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var s="",o=e.expandNextToken();o.text!=="]"&&o.text!=="EOF";)s+=o.text,o=e.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new L("Invalid number of arguments: "+s);l=parseInt(s),n=e.consumeArg().tokens}return e.macros.set(i,{tokens:n,numArgs:l}),""};y("\\newcommand",e=>K0(e,!1,!0));y("\\renewcommand",e=>K0(e,!0,!1));y("\\providecommand",e=>K0(e,!0,!0));y("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""});y("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""});y("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Tt[r],fe.math[r],fe.text[r]),""});y("\\bgroup","{");y("\\egroup","}");y("~","\\nobreakspace");y("\\lq","`");y("\\rq","'");y("\\aa","\\r a");y("\\AA","\\r A");y("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");y("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");y("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");y("ℬ","\\mathscr{B}");y("ℰ","\\mathscr{E}");y("ℱ","\\mathscr{F}");y("ℋ","\\mathscr{H}");y("ℐ","\\mathscr{I}");y("ℒ","\\mathscr{L}");y("ℳ","\\mathscr{M}");y("ℛ","\\mathscr{R}");y("ℭ","\\mathfrak{C}");y("ℌ","\\mathfrak{H}");y("ℨ","\\mathfrak{Z}");y("\\Bbbk","\\Bbb{k}");y("·","\\cdotp");y("\\llap","\\mathllap{\\textrm{#1}}");y("\\rlap","\\mathrlap{\\textrm{#1}}");y("\\clap","\\mathclap{\\textrm{#1}}");y("\\mathstrut","\\vphantom{(}");y("\\underbar","\\underline{\\text{#1}}");y("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');y("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");y("\\ne","\\neq");y("≠","\\neq");y("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");y("∉","\\notin");y("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");y("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");y("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");y("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");y("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");y("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");y("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");y("⟂","\\perp");y("‼","\\mathclose{!\\mkern-0.8mu!}");y("∌","\\notni");y("⌜","\\ulcorner");y("⌝","\\urcorner");y("⌞","\\llcorner");y("⌟","\\lrcorner");y("©","\\copyright");y("®","\\textregistered");y("️","\\textregistered");y("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');y("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');y("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');y("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');y("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");y("⋮","\\vdots");y("\\varGamma","\\mathit{\\Gamma}");y("\\varDelta","\\mathit{\\Delta}");y("\\varTheta","\\mathit{\\Theta}");y("\\varLambda","\\mathit{\\Lambda}");y("\\varXi","\\mathit{\\Xi}");y("\\varPi","\\mathit{\\Pi}");y("\\varSigma","\\mathit{\\Sigma}");y("\\varUpsilon","\\mathit{\\Upsilon}");y("\\varPhi","\\mathit{\\Phi}");y("\\varPsi","\\mathit{\\Psi}");y("\\varOmega","\\mathit{\\Omega}");y("\\substack","\\begin{subarray}{c}#1\\end{subarray}");y("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");y("\\boxed","\\fbox{$\\displaystyle{#1}$}");y("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");y("\\implies","\\DOTSB\\;\\Longrightarrow\\;");y("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var Ia={",":"\\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"};y("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Ia?t=Ia[r]:(r.slice(0,4)==="\\not"||r in fe.math&&Y.contains(["bin","rel"],fe.math[r].group))&&(t="\\dotsb"),t});var Z0={")":!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};y("\\dotso",function(e){var t=e.future().text;return t in Z0?"\\ldots\\,":"\\ldots"});y("\\dotsc",function(e){var t=e.future().text;return t in Z0&&t!==","?"\\ldots\\,":"\\ldots"});y("\\cdots",function(e){var t=e.future().text;return t in Z0?"\\@cdots\\,":"\\@cdots"});y("\\dotsb","\\cdots");y("\\dotsm","\\cdots");y("\\dotsi","\\!\\cdots");y("\\dotsx","\\ldots\\,");y("\\DOTSI","\\relax");y("\\DOTSB","\\relax");y("\\DOTSX","\\relax");y("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");y("\\,","\\tmspace+{3mu}{.1667em}");y("\\thinspace","\\,");y("\\>","\\mskip{4mu}");y("\\:","\\tmspace+{4mu}{.2222em}");y("\\medspace","\\:");y("\\;","\\tmspace+{5mu}{.2777em}");y("\\thickspace","\\;");y("\\!","\\tmspace-{3mu}{.1667em}");y("\\negthinspace","\\!");y("\\negmedspace","\\tmspace-{4mu}{.2222em}");y("\\negthickspace","\\tmspace-{5mu}{.277em}");y("\\enspace","\\kern.5em ");y("\\enskip","\\hskip.5em\\relax");y("\\quad","\\hskip1em\\relax");y("\\qquad","\\hskip2em\\relax");y("\\tag","\\@ifstar\\tag@literal\\tag@paren");y("\\tag@paren","\\tag@literal{({#1})}");y("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new L("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});y("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");y("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");y("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");y("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");y("\\newline","\\\\\\relax");y("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Us=O(st["Main-Regular"][84][1]-.7*st["Main-Regular"][65][1]);y("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Us+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");y("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Us+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");y("\\hspace","\\@ifstar\\@hspacer\\@hspace");y("\\@hspace","\\hskip #1\\relax");y("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");y("\\ordinarycolon",":");y("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");y("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');y("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');y("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');y("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');y("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');y("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');y("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');y("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');y("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');y("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');y("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');y("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');y("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');y("∷","\\dblcolon");y("∹","\\eqcolon");y("≔","\\coloneqq");y("≕","\\eqqcolon");y("⩴","\\Coloneqq");y("\\ratio","\\vcentcolon");y("\\coloncolon","\\dblcolon");y("\\colonequals","\\coloneqq");y("\\coloncolonequals","\\Coloneqq");y("\\equalscolon","\\eqqcolon");y("\\equalscoloncolon","\\Eqqcolon");y("\\colonminus","\\coloneq");y("\\coloncolonminus","\\Coloneq");y("\\minuscolon","\\eqcolon");y("\\minuscoloncolon","\\Eqcolon");y("\\coloncolonapprox","\\Colonapprox");y("\\coloncolonsim","\\Colonsim");y("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");y("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");y("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");y("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");y("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");y("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");y("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");y("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");y("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");y("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");y("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");y("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");y("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");y("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");y("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");y("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");y("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");y("\\nleqq","\\html@mathml{\\@nleqq}{≰}");y("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");y("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");y("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");y("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");y("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");y("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");y("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");y("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");y("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");y("\\imath","\\html@mathml{\\@imath}{ı}");y("\\jmath","\\html@mathml{\\@jmath}{ȷ}");y("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");y("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");y("⟦","\\llbracket");y("⟧","\\rrbracket");y("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");y("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");y("⦃","\\lBrace");y("⦄","\\rBrace");y("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");y("⦵","\\minuso");y("\\darr","\\downarrow");y("\\dArr","\\Downarrow");y("\\Darr","\\Downarrow");y("\\lang","\\langle");y("\\rang","\\rangle");y("\\uarr","\\uparrow");y("\\uArr","\\Uparrow");y("\\Uarr","\\Uparrow");y("\\N","\\mathbb{N}");y("\\R","\\mathbb{R}");y("\\Z","\\mathbb{Z}");y("\\alef","\\aleph");y("\\alefsym","\\aleph");y("\\Alpha","\\mathrm{A}");y("\\Beta","\\mathrm{B}");y("\\bull","\\bullet");y("\\Chi","\\mathrm{X}");y("\\clubs","\\clubsuit");y("\\cnums","\\mathbb{C}");y("\\Complex","\\mathbb{C}");y("\\Dagger","\\ddagger");y("\\diamonds","\\diamondsuit");y("\\empty","\\emptyset");y("\\Epsilon","\\mathrm{E}");y("\\Eta","\\mathrm{H}");y("\\exist","\\exists");y("\\harr","\\leftrightarrow");y("\\hArr","\\Leftrightarrow");y("\\Harr","\\Leftrightarrow");y("\\hearts","\\heartsuit");y("\\image","\\Im");y("\\infin","\\infty");y("\\Iota","\\mathrm{I}");y("\\isin","\\in");y("\\Kappa","\\mathrm{K}");y("\\larr","\\leftarrow");y("\\lArr","\\Leftarrow");y("\\Larr","\\Leftarrow");y("\\lrarr","\\leftrightarrow");y("\\lrArr","\\Leftrightarrow");y("\\Lrarr","\\Leftrightarrow");y("\\Mu","\\mathrm{M}");y("\\natnums","\\mathbb{N}");y("\\Nu","\\mathrm{N}");y("\\Omicron","\\mathrm{O}");y("\\plusmn","\\pm");y("\\rarr","\\rightarrow");y("\\rArr","\\Rightarrow");y("\\Rarr","\\Rightarrow");y("\\real","\\Re");y("\\reals","\\mathbb{R}");y("\\Reals","\\mathbb{R}");y("\\Rho","\\mathrm{P}");y("\\sdot","\\cdot");y("\\sect","\\S");y("\\spades","\\spadesuit");y("\\sub","\\subset");y("\\sube","\\subseteq");y("\\supe","\\supseteq");y("\\Tau","\\mathrm{T}");y("\\thetasym","\\vartheta");y("\\weierp","\\wp");y("\\Zeta","\\mathrm{Z}");y("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");y("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");y("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");y("\\bra","\\mathinner{\\langle{#1}|}");y("\\ket","\\mathinner{|{#1}\\rangle}");y("\\braket","\\mathinner{\\langle{#1}\\rangle}");y("\\Bra","\\left\\langle#1\\right|");y("\\Ket","\\left|#1\\right\\rangle");var _s=e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,l=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var o=h=>g=>{e&&(g.macros.set("|",l),i.length&&g.macros.set("\\|",s));var p=h;if(!h&&i.length){var v=g.future();v.text==="|"&&(g.popToken(),p=!0)}return{tokens:p?i:n,numArgs:0}};t.macros.set("|",o(!1)),i.length&&t.macros.set("\\|",o(!0));var u=t.consumeArg().tokens,m=t.expandTokens([...a,...u,...r]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};y("\\bra@ket",_s(!1));y("\\bra@set",_s(!0));y("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");y("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");y("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");y("\\angln","{\\angl n}");y("\\blue","\\textcolor{##6495ed}{#1}");y("\\orange","\\textcolor{##ffa500}{#1}");y("\\pink","\\textcolor{##ff00af}{#1}");y("\\red","\\textcolor{##df0030}{#1}");y("\\green","\\textcolor{##28ae7b}{#1}");y("\\gray","\\textcolor{gray}{#1}");y("\\purple","\\textcolor{##9d38bd}{#1}");y("\\blueA","\\textcolor{##ccfaff}{#1}");y("\\blueB","\\textcolor{##80f6ff}{#1}");y("\\blueC","\\textcolor{##63d9ea}{#1}");y("\\blueD","\\textcolor{##11accd}{#1}");y("\\blueE","\\textcolor{##0c7f99}{#1}");y("\\tealA","\\textcolor{##94fff5}{#1}");y("\\tealB","\\textcolor{##26edd5}{#1}");y("\\tealC","\\textcolor{##01d1c1}{#1}");y("\\tealD","\\textcolor{##01a995}{#1}");y("\\tealE","\\textcolor{##208170}{#1}");y("\\greenA","\\textcolor{##b6ffb0}{#1}");y("\\greenB","\\textcolor{##8af281}{#1}");y("\\greenC","\\textcolor{##74cf70}{#1}");y("\\greenD","\\textcolor{##1fab54}{#1}");y("\\greenE","\\textcolor{##0d923f}{#1}");y("\\goldA","\\textcolor{##ffd0a9}{#1}");y("\\goldB","\\textcolor{##ffbb71}{#1}");y("\\goldC","\\textcolor{##ff9c39}{#1}");y("\\goldD","\\textcolor{##e07d10}{#1}");y("\\goldE","\\textcolor{##a75a05}{#1}");y("\\redA","\\textcolor{##fca9a9}{#1}");y("\\redB","\\textcolor{##ff8482}{#1}");y("\\redC","\\textcolor{##f9685d}{#1}");y("\\redD","\\textcolor{##e84d39}{#1}");y("\\redE","\\textcolor{##bc2612}{#1}");y("\\maroonA","\\textcolor{##ffbde0}{#1}");y("\\maroonB","\\textcolor{##ff92c6}{#1}");y("\\maroonC","\\textcolor{##ed5fa6}{#1}");y("\\maroonD","\\textcolor{##ca337c}{#1}");y("\\maroonE","\\textcolor{##9e034e}{#1}");y("\\purpleA","\\textcolor{##ddd7ff}{#1}");y("\\purpleB","\\textcolor{##c6b9fc}{#1}");y("\\purpleC","\\textcolor{##aa87ff}{#1}");y("\\purpleD","\\textcolor{##7854ab}{#1}");y("\\purpleE","\\textcolor{##543b78}{#1}");y("\\mintA","\\textcolor{##f5f9e8}{#1}");y("\\mintB","\\textcolor{##edf2df}{#1}");y("\\mintC","\\textcolor{##e0e5cc}{#1}");y("\\grayA","\\textcolor{##f6f7f7}{#1}");y("\\grayB","\\textcolor{##f0f1f2}{#1}");y("\\grayC","\\textcolor{##e3e5e6}{#1}");y("\\grayD","\\textcolor{##d6d8da}{#1}");y("\\grayE","\\textcolor{##babec2}{#1}");y("\\grayF","\\textcolor{##888d93}{#1}");y("\\grayG","\\textcolor{##626569}{#1}");y("\\grayH","\\textcolor{##3b3e40}{#1}");y("\\grayI","\\textcolor{##21242c}{#1}");y("\\kaBlue","\\textcolor{##314453}{#1}");y("\\kaGreen","\\textcolor{##71B307}{#1}");var Gs={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class G2{constructor(t,r,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=r,this.expansionCount=0,this.feed(t),this.macros=new U2(_2,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new Ea(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var r,n,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new Ke("EOF",n.loc)),this.pushTokens(i),r.range(n,"")}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],n=t&&t.length>0;n||this.consumeSpaces();var i=this.future(),a,l=0,s=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++l;else if(a.text==="}"){if(--l,l===-1)throw new L("Extra }",a)}else if(a.text==="EOF")throw new L("Unexpected end of input in a macro argument, expected '"+(t&&n?t[s]:"}")+"'",a);if(t&&n)if((l===0||l===1&&t[s]==="{")&&a.text===t[s]){if(++s,s===t.length){r.splice(-s,s);break}}else s=0}while(l!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new L("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;ithis.settings.maxExpand)throw new L("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||t&&i.unexpandable){if(t&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new L("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,l=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var s=a.length-1;s>=0;--s){var o=a[s];if(o.text==="#"){if(s===0)throw new L("Incomplete placeholder at end of macro body",o);if(o=a[--s],o.text==="#")a.splice(s+1,1);else if(/^[1-9]$/.test(o.text))a.splice(s,2,...l[+o.text-1]);else throw new L("Not a valid argument number",o)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new Ke(t)]):void 0}expandTokens(t){var r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(n=>n.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var n=this.lexer.catcodes[t];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var l=i.replace(/##/g,"");l.indexOf("#"+(a+1))!==-1;)++a;for(var s=new Ea(i,this.settings),o=[],u=s.lex();u.text!=="EOF";)o.push(u),u=s.lex();o.reverse();var m={tokens:o,numArgs:a};return m}return i}isDefined(t){return this.macros.has(t)||Tt.hasOwnProperty(t)||fe.math.hasOwnProperty(t)||fe.text.hasOwnProperty(t)||Gs.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Tt.hasOwnProperty(t)&&!Tt[t].primitive}}var Na=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Vr=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Wn={"́":{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"}},Ba={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class dn{constructor(t,r){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 G2(t,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new L("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var r=this.nextToken;this.consume(),this.gullet.pushToken(new Ke("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(t,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(dn.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||t&&Tt[i.text]&&Tt[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var r=-1,n,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var s=fe[this.mode][r].group,o=$e.range(t),u;if(Ff.hasOwnProperty(s)){var m=s;u={type:"atom",mode:this.mode,family:m,loc:o,text:r}}else u={type:s,mode:this.mode,loc:o,text:r};l=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(ts(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),l={type:"textord",mode:"text",loc:$e.range(t),text:r};else return null;if(this.consume(),a)for(var h=0;hu&&(u=m):m&&(u!==void 0&&u>-1&&o.push(` +`.repeat(u)||" "),u=-1,o.push(m))}return o.join("")}function Js(e,t,r){return e.type==="element"?xp(e,t,r):e.type==="text"?r.whitespace==="normal"?eo(e,r):wp(e):[]}function xp(e,t,r){const n=to(e,r),i=e.children||[];let a=-1,l=[];if(vp(e))return l;let s,o;for(g0(e)||ja(e)&&Oa(t,e,ja)?o=` +`:yp(e)?(s=2,o=2):Qs(e)&&(s=1,o=1);++a0&&(a.properties.rel=[...g]),p&&(a.properties.target=p),m){const x=hr(t.contentProperties,a)||{};a.children.push({type:"element",tagName:"span",properties:qt(x),children:qt(m)})}}}})}}function hr(e,t){return typeof e=="function"?e(t):e}export{Lp as M,Op as a,Rp as b,Pp as c,vn as j,qp as r}; diff --git a/dist/copilot_web/vendor-react-V04_Axys.js b/dist/copilot_web/vendor-react-V04_Axys.js new file mode 100644 index 0000000..8327c86 --- /dev/null +++ b/dist/copilot_web/vendor-react-V04_Axys.js @@ -0,0 +1,32 @@ +var vd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Uo={exports:{}},T={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Kt=Symbol.for("react.element"),qa=Symbol.for("react.portal"),ba=Symbol.for("react.fragment"),ef=Symbol.for("react.strict_mode"),nf=Symbol.for("react.profiler"),tf=Symbol.for("react.provider"),rf=Symbol.for("react.context"),lf=Symbol.for("react.forward_ref"),uf=Symbol.for("react.suspense"),of=Symbol.for("react.memo"),sf=Symbol.for("react.lazy"),Ti=Symbol.iterator;function af(e){return e===null||typeof e!="object"?null:(e=Ti&&e[Ti]||e["@@iterator"],typeof e=="function"?e:null)}var $o={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vo=Object.assign,Ao={};function rt(e,n,t){this.props=e,this.context=n,this.refs=Ao,this.updater=t||$o}rt.prototype.isReactComponent={};rt.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")};rt.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Bo(){}Bo.prototype=rt.prototype;function Du(e,n,t){this.props=e,this.context=n,this.refs=Ao,this.updater=t||$o}var Iu=Du.prototype=new Bo;Iu.constructor=Du;Vo(Iu,rt.prototype);Iu.isPureReactComponent=!0;var Li=Array.isArray,Ho=Object.prototype.hasOwnProperty,Fu={current:null},Wo={key:!0,ref:!0,__self:!0,__source:!0};function Qo(e,n,t){var r,l={},u=null,i=null;if(n!=null)for(r in n.ref!==void 0&&(i=n.ref),n.key!==void 0&&(u=""+n.key),n)Ho.call(n,r)&&!Wo.hasOwnProperty(r)&&(l[r]=n[r]);var o=arguments.length-2;if(o===1)l.children=t;else if(1>>1,X=C[H];if(0>>1;Hl(hl,z))vnl(qt,hl)?(C[H]=qt,C[vn]=z,H=vn):(C[H]=hl,C[hn]=z,H=hn);else if(vnl(qt,z))C[H]=qt,C[vn]=z,H=vn;else break e}}return N}function l(C,N){var z=C.sortIndex-N.sortIndex;return z!==0?z:C.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var s=[],f=[],h=1,m=null,p=3,g=!1,w=!1,k=!1,F=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(C){for(var N=t(f);N!==null;){if(N.callback===null)r(f);else if(N.startTime<=C)r(f),N.sortIndex=N.expirationTime,n(s,N);else break;N=t(f)}}function v(C){if(k=!1,d(C),!w)if(t(s)!==null)w=!0,pl(E);else{var N=t(f);N!==null&&ml(v,N.startTime-C)}}function E(C,N){w=!1,k&&(k=!1,c(P),P=-1),g=!0;var z=p;try{for(d(N),m=t(s);m!==null&&(!(m.expirationTime>N)||C&&!xe());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var X=H(m.expirationTime<=N);N=e.unstable_now(),typeof X=="function"?m.callback=X:m===t(s)&&r(s),d(N)}else r(s);m=t(s)}if(m!==null)var Jt=!0;else{var hn=t(f);hn!==null&&ml(v,hn.startTime-N),Jt=!1}return Jt}finally{m=null,p=z,g=!1}}var _=!1,x=null,P=-1,B=5,L=-1;function xe(){return!(e.unstable_now()-LC||125H?(C.sortIndex=z,n(f,C),t(s)===null&&C===t(f)&&(k?(c(P),P=-1):k=!0,ml(v,z-H))):(C.sortIndex=X,n(s,C),w||g||(w=!0,pl(E))),C},e.unstable_shouldYield=xe,e.unstable_wrapCallback=function(C){var N=p;return function(){var z=p;p=N;try{return C.apply(this,arguments)}finally{p=z}}}})(Go);Xo.exports=Go;var mf=Xo.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Zo=Ko,ve=mf;function y(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bl=Object.prototype.hasOwnProperty,hf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Mi={},Oi={};function vf(e){return Bl.call(Oi,e)?!0:Bl.call(Mi,e)?!1:hf.test(e)?Oi[e]=!0:(Mi[e]=!0,!1)}function yf(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function gf(e,n,t,r){if(n===null||typeof n>"u"||yf(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function oe(e,n,t,r,l,u,i){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=u,this.removeEmptyString=i}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new oe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];b[n]=new oe(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new oe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){b[e]=new oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){b[e]=new oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){b[e]=new oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){b[e]=new oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){b[e]=new oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Uu=/[\-:]([a-z])/g;function $u(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(Uu,$u);b[n]=new oe(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Uu,$u);b[n]=new oe(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Uu,$u);b[n]=new oe(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){b[e]=new oe(e,1,!1,e.toLowerCase(),null,!1,!1)});b.xlinkHref=new oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){b[e]=new oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vu(e,n,t,r){var l=b.hasOwnProperty(n)?b[n]:null;(l!==null?l.type!==0:r||!(2o||l[i]!==u[o]){var s=` +`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=o);break}}}finally{gl=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?vt(e):""}function wf(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=wl(e.type,!1),e;case 11:return e=wl(e.type.render,!1),e;case 1:return e=wl(e.type,!0),e;default:return""}}function Kl(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 On:return"Fragment";case Mn:return"Portal";case Hl:return"Profiler";case Au:return"StrictMode";case Wl:return"Suspense";case Ql:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bo:return(e.displayName||"Context")+".Consumer";case qo:return(e._context.displayName||"Context")+".Provider";case Bu:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Hu:return n=e.displayName||null,n!==null?n:Kl(e.type)||"Memo";case Ge:n=e._payload,e=e._init;try{return Kl(e(n))}catch{}}return null}function kf(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 Kl(n);case 8:return n===Au?"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 ns(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Sf(e){var n=ns(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=Sf(e))}function ts(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=ns(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 Yl(e,n){var t=n.checked;return V({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function Ii(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 rs(e,n){n=n.checked,n!=null&&Vu(e,"checked",n,!1)}function Xl(e,n){rs(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")?Gl(e,n.type,t):n.hasOwnProperty("defaultValue")&&Gl(e,n.type,fn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Fi(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 Gl(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 kt={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},Ef=["Webkit","ms","Moz","O"];Object.keys(kt).forEach(function(e){Ef.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),kt[n]=kt[e]})});function os(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||kt.hasOwnProperty(e)&&kt[e]?(""+n).trim():n+"px"}function ss(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,l=os(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}var Cf=V({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 ql(e,n){if(n){if(Cf[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 bl(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 eu=null;function Wu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nu=null,Qn=null,Kn=null;function $i(e){if(e=Gt(e)){if(typeof nu!="function")throw Error(y(280));var n=e.stateNode;n&&(n=tl(n),nu(e.stateNode,e.type,n))}}function as(e){Qn?Kn?Kn.push(e):Kn=[e]:Qn=e}function fs(){if(Qn){var e=Qn,n=Kn;if(Kn=Qn=null,$i(e),n)for(e=0;e>>=0,e===0?32:31-(Df(e)/If|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 Mr(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 $f(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),Xi=" ",Gi=!1;function Ls(e,n){switch(e){case"keyup":return pc.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rs(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dn=!1;function hc(e,n){switch(e){case"compositionend":return Rs(n);case"keypress":return n.which!==32?null:(Gi=!0,Xi);case"textInput":return e=n.data,e===Xi&&Gi?null:e;default:return null}}function vc(e,n){if(Dn)return e==="compositionend"||!qu&&Ls(e,n)?(e=zs(),wr=Gu=be=null,Dn=!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=bi(t)}}function Is(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Is(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Fs(){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 bu(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 xc(e){var n=Fs(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Is(t.ownerDocument.documentElement,t)){if(r!==null&&bu(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=eo(t,u);var i=eo(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,In=null,ou=null,_t=null,su=!1;function no(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;su||In==null||In!==zr(r)||(r=In,"selectionStart"in r&&bu(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}),_t&&Ft(_t,r)||(_t=r,r=Ir(ou,"onSelect"),0Un||(e.current=mu[Un],mu[Un]=null,Un--)}function O(e,n){Un++,mu[Un]=e.current,e.current=n}var cn={},re=pn(cn),fe=pn(!1),_n=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(){I(fe),I(re)}function so(e,n,t){if(re.current!==cn)throw Error(y(168));O(re,n),O(fe,t)}function Qs(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,kf(e)||"Unknown",l));return V({},t,r)}function Ur(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cn,_n=re.current,O(re,e),O(fe,fe.current),!0}function ao(e,n,t){var r=e.stateNode;if(!r)throw Error(y(169));t?(e=Qs(e,n,_n),r.__reactInternalMemoizedMergedChildContext=e,I(fe),I(re),O(re,e)):I(fe),O(fe,t)}var $e=null,rl=!1,Ol=!1;function Ks(e){$e===null?$e=[e]:$e.push(e)}function jc(e){rl=!0,Ks(e)}function mn(){if(!Ol&&$e!==null){Ol=!0;var e=0,n=M;try{var t=$e;for(M=1;e>=i,l-=i,Ve=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),_===null?E=L:_.sibling=L,_=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),_===null?E=xe:_.sibling=xe,_=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),_===null?E=L:_.sibling=L,_=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),_===null?E=L:_.sibling=L,_=L);return e&&x.forEach(function(it){return n(c,it)}),j&&yn(c,P),E}function F(c,a,d,v){if(typeof d=="object"&&d!==null&&d.type===On&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case er:e:{for(var E=d.key,_=a;_!==null;){if(_.key===E){if(E=d.type,E===On){if(_.tag===7){t(c,_.sibling),a=l(_,d.props.children),a.return=c,c=a;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ge&&yo(E)===_.type){t(c,_.sibling),a=l(_,d.props),a.ref=pt(c,_,d),a.return=c,c=a;break e}t(c,_);break}else n(c,_);_=_.sibling}d.type===On?(a=Cn(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 Mn:e:{for(_=d.key;a!==null;){if(a.key===_)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=Al(d,c.mode,v),a.return=c,c=a}return i(c);case Ge:return _=d._init,F(c,a,_(d._payload),v)}if(yt(d))return w(c,a,d,v);if(st(d))return k(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 F}var bn=ea(!0),na=ea(!1),Zt={},je=pn(Zt),Vt=pn(Zt),At=pn(Zt);function Sn(e){if(e===Zt)throw Error(y(174));return e}function si(e,n){switch(O(At,n),O(Vt,e),O(je,Zt),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Jl(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Jl(n,e)}I(je),O(je,n)}function et(){I(je),I(Vt),I(At)}function ta(e){Sn(At.current);var n=Sn(je.current),t=Jl(n,e.type);n!==t&&(O(Vt,e),O(je,t))}function ai(e){Vt.current===e&&(I(je),I(Vt))}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 Dl=[];function fi(){for(var e=0;et?t:4,e(!0);var r=Il.transition;Il.transition={};try{e(!1),n()}finally{M=t,Il.transition=r}}function ga(){return _e().memoizedState}function Ac(e,n,t){var r=sn(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},wa(e))ka(n,t);else if(t=Zs(e,n,t,r),t!==null){var l=ue();Re(t,e,r,l),Sa(t,n,r)}}function Bc(e,n,t){var r=sn(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(wa(e))ka(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,Me(o,i)){var s=n.interleaved;s===null?(l.next=l,ii(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=Zs(e,n,l,r),t!==null&&(l=ue(),Re(t,e,r,l),Sa(t,n,r))}}function wa(e){var n=e.alternate;return e===$||n!==null&&n===$}function ka(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 Sa(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Ku(e,t)}}var Kr={readContext:Ce,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},Hc={readContext:Ce,useCallback:function(e,n){return De().memoizedState=[e,n===void 0?null:n],e},useContext:Ce,useEffect:wo,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,Cr(4194308,4,pa.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Cr(4194308,4,e,n)},useInsertionEffect:function(e,n){return Cr(4,2,e,n)},useMemo:function(e,n){var t=De();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=De();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=Ac.bind(null,$,e),[r.memoizedState,e]},useRef:function(e){var n=De();return e={current:e},n.memoizedState=e},useState:go,useDebugValue:hi,useDeferredValue:function(e){return De().memoizedState=e},useTransition:function(){var e=go(!1),n=e[0];return e=Vc.bind(null,e[1]),De().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=$,l=De();if(j){if(t===void 0)throw Error(y(407));t=t()}else{if(t=n(),Z===null)throw Error(y(349));Pn&30||ua(r,n,t)}l.memoizedState=t;var u={value:t,getSnapshot:n};return l.queue=u,wo(oa.bind(null,r,u,e),[e]),r.flags|=2048,Wt(9,ia.bind(null,r,u,t,n),void 0,null),t},useId:function(){var e=De(),n=Z.identifierPrefix;if(j){var t=Ae,r=Ve;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[Ie]=n,e[$t]=r,La(e,n,!1,!1),n.stateNode=e;e:{switch(i=bl(t,r),t){case"dialog":D("cancel",e),D("close",e),l=r;break;case"iframe":case"object":case"embed":D("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,O(U,r?t&1|2:t&1),n):(ne(n),null);case 22:case 23:return Si(),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 Jc(e,n){switch(ni(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(),I(fe),I(re),fi(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return ai(n),null;case 13:if(I(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 I(U),null;case 4:return et(),null;case 10:return ui(n.type._context),null;case 22:case 23:return Si(),null;case 24:return null;default:return null}}var pr=!1,te=!1,qc=typeof WeakSet=="function"?WeakSet:Set,S=null;function Bn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){A(e,n,r)}else t.current=null}function Pu(e,n,t){try{t()}catch(r){A(e,n,r)}}var zo=!1;function bc(e,n){if(au=Or,e=Fs(),bu(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(fu={focusedElem:e,selectionRange:t},Or=!1,S=n;S!==null;)if(n=S,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,S=e;else for(;S!==null;){n=S;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 k=w.memoizedProps,F=w.memoizedState,c=n.stateNode,a=c.getSnapshotBeforeUpdate(n.elementType===n.type?k:Ne(n.type,k),F);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){A(n,n.return,v)}if(e=n.sibling,e!==null){e.return=n.return,S=e;break}S=n.return}return w=zo,zo=!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&&Pu(n,t,u)}l=l.next}while(l!==r)}}function il(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 Nu(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 Oa(e){var n=e.alternate;n!==null&&(e.alternate=null,Oa(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Ie],delete n[$t],delete n[pu],delete n[Ic],delete n[Fc])),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 Da(e){return e.tag===5||e.tag===3||e.tag===4}function To(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Da(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 zu(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=Fr));else if(r!==4&&(e=e.child,e!==null))for(zu(e,n,t),e=e.sibling;e!==null;)zu(e,n,t),e=e.sibling}function Tu(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(Tu(e,n,t),e=e.sibling;e!==null;)Tu(e,n,t),e=e.sibling}var J=null,ze=!1;function Xe(e,n,t){for(t=t.child;t!==null;)Ia(e,n,t),t=t.sibling}function Ia(e,n,t){if(Fe&&typeof Fe.onCommitFiberUnmount=="function")try{Fe.onCommitFiberUnmount(qr,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?Ml(e.parentNode,t):e.nodeType===1&&Ml(e,t),Dt(e)):Ml(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)&&Pu(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){A(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 Lo(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new qc),n.forEach(function(r){var l=sd.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*nd(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,S=e.current;S!==null;){var u=S,i=u.child;if(S.flags&16){var o=u.deletions;if(o!==null){for(var s=0;sW()-wi?En(e,0):gi|=t),de(e,n)}function Ha(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 od(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),Ha(e,t)}function sd(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),Ha(e,t)}var Wa;Wa=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,Gc(e,n,t);ae=!!(e.flags&131072)}else ae=!1,j&&n.flags&1048576&&Ys(n,Vr,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;_r(e,n),e=n.pendingProps;var l=Jn(n,re.current);Xn(n,t),l=di(null,n,r,e,l,t);var u=pi();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,oi(n),l.updater=ll,n.stateNode=l,l._reactInternals=n,wu(n,r,e,t),n=Eu(null,n,r,!0,u,t)):(n.tag=0,j&&u&&ei(n),le(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(_r(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=fd(r),e=Ne(r,e),l){case 0:n=Su(null,n,r,e,t);break e;case 1:n=xo(null,n,r,e,t);break e;case 11:n=Co(null,n,r,e,t);break e;case 14:n=_o(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),Su(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),xo(e,n,r,l,t);case 3:e:{if(Na(n),e===null)throw Error(y(387));r=n.pendingProps,u=n.memoizedState,l=u.element,Js(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=Po(e,n,r,t,l);break e}else if(r!==l){l=nt(Error(y(424)),n),n=Po(e,n,r,t,l);break e}else for(me=ln(n.stateNode.containerInfo.firstChild),he=n,j=!0,Te=null,t=na(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 ta(n),e===null&&vu(n),r=n.type,l=n.pendingProps,u=e!==null?e.memoizedProps:null,i=l.children,cu(r,l)?i=null:u!==null&&cu(r,u)&&(n.flags|=32),Pa(e,n),le(e,n,i,t),n.child;case 6:return e===null&&vu(n),null;case 13:return za(e,n,t);case 4:return si(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),Co(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,O(Ar,r._currentValue),r._currentValue=i,u!==null)if(Me(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),yu(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),yu(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=Ce(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),_o(e,n,r,l,t);case 15:return _a(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),_r(e,n),n.tag=1,ce(r)?(e=!0,Ur(n)):e=!1,Xn(n,t),bs(n,r,l),wu(n,r,l,t),Eu(null,n,r,!0,e,t);case 19:return Ta(e,n,t);case 22:return xa(e,n,t)}throw Error(y(156,n.tag))};function Qa(e,n){return ys(e,n)}function ad(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 Se(e,n,t,r){return new ad(e,n,t,r)}function Ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fd(e){if(typeof e=="function")return Ci(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bu)return 11;if(e===Hu)return 14}return 2}function an(e,n){var t=e.alternate;return t===null?(t=Se(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")Ci(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case On:return Cn(t.children,l,u,n);case Au:i=8,l|=8;break;case Hl:return e=Se(12,t,n,l|2),e.elementType=Hl,e.lanes=u,e;case Wl:return e=Se(13,t,n,l),e.elementType=Wl,e.lanes=u,e;case Ql:return e=Se(19,t,n,l),e.elementType=Ql,e.lanes=u,e;case es:return sl(t,l,u,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qo:i=10;break e;case bo:i=9;break e;case Bu:i=11;break e;case Hu:i=14;break e;case Ge:i=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return n=Se(i,t,n,l),n.elementType=e,n.type=r,n.lanes=u,n}function Cn(e,n,t,r){return e=Se(7,e,r,n),e.lanes=t,e}function sl(e,n,t,r){return e=Se(22,e,r,n),e.elementType=es,e.lanes=t,e.stateNode={isHidden:!1},e}function Vl(e,n,t){return e=Se(6,e,null,n),e.lanes=t,e}function Al(e,n,t){return n=Se(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function cd(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=Sl(0),this.expirationTimes=Sl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function _i(e,n,t,r,l,u,i,o,s){return e=new cd(e,n,t,o,s),n===1?(n=1,u===!0&&(n|=8)):n=0,u=Se(3,null,null,n),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},oi(u),e}function dd(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ga)}catch(e){console.error(e)}}Ga(),Yo.exports=ye;var gd=Yo.exports;export{yd as R,gd as a,vd as c,Ja as g,Ko as r}; diff --git a/dist/copilot_web/vendor-ui-Dzvx2fKw.js b/dist/copilot_web/vendor-ui-Dzvx2fKw.js new file mode 100644 index 0000000..e7af5f5 --- /dev/null +++ b/dist/copilot_web/vendor-ui-Dzvx2fKw.js @@ -0,0 +1 @@ +import"./vendor-react-V04_Axys.js"; diff --git a/dist/copilot_web/workflowChat-BvDkCk05.js b/dist/copilot_web/workflowChat-BvDkCk05.js deleted file mode 100644 index c4948d4..0000000 --- a/dist/copilot_web/workflowChat-BvDkCk05.js +++ /dev/null @@ -1,467 +0,0 @@ -import{j as O,r as qe,R as Rw,a as Ft,c as Mg,g as r_,b as n_}from"./input.js";import{l as i_}from"./App-ZU9wZLJP.js";const a_={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=a_.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(y=>new Promise(($,k)=>{const T=new FileReader;T.onloadend=()=>$(T.result),T.onerror=k,T.readAsDataURL(y)})),d=await Promise.all(h);let f=u?Array.isArray(u)?u:[u]:[];const g=(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:f,images:d.map((y,$)=>({filename:s[$].name,data:y}))})})).body.getReader();let b="";for(;;){const{done:y,value:$}=await g.read();if(y)break;b+=new TextDecoder().decode($);const k=b.split(` -`);b=k.pop()||"";for(const T of k)T.trim()&&(yield JSON.parse(T))}b.trim()&&(yield JSON.parse(b))}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 o_(t){return O.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:[O.jsx("path",{d:"m22 2-7 20-4-9-9-4Z"}),O.jsx("path",{d:"M22 2 11 13"})]})}function $c(t){return O.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:[O.jsx("path",{d:"M18 6 6 18"}),O.jsx("path",{d:"m6 6 12 12"})]})}function s_(t){return O.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:[O.jsx("path",{d:"M3 6h18"}),O.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),O.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})}function l_(t){return O.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:[O.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),O.jsx("circle",{cx:"9",cy:"9",r:"2"}),O.jsx("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]})}function u_(t){return O.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:[O.jsx("path",{d:"M12 5v14"}),O.jsx("path",{d:"M5 12h14"})]})}function c_(t){return O.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:[O.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"}),O.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function h_({isOpen:t,onClose:r,onSave:e,initialApiKey:n=""}){const[i,a]=qe.useState(n),[o,s]=qe.useState(!1);return qe.useEffect(()=>{a(n)},[n]),t?O.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-25 flex items-center justify-center z-50",children:O.jsxs("div",{className:"bg-white rounded-lg p-6 w-96 shadow-xl",children:[O.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Set API Key"}),O.jsxs("div",{className:"relative",children:[O.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"}),O.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?O.jsxs("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),O.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"})]}):O.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.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"})})})]}),O.jsxs("div",{className:"mb-4 text-sm text-gray-600",children:[O.jsx("span",{children:"Don't have an API key? "}),O.jsx("a",{href:"https://form.typeform.com/to/tkg91K8D",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-600 underline",children:"Click here to request one"})]}),O.jsxs("div",{className:"flex justify-end gap-2",children:[O.jsx("button",{onClick:r,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md",children:"Cancel"}),O.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 d_({onClose:t,onClear:r,hasMessages:e}){const[n,i]=qe.useState(!1),a=()=>{i(!0)},o=s=>{localStorage.setItem("chatApiKey",s)};return O.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:[O.jsxs("div",{className:"flex items-center space-x-2",children:[O.jsx("img",{src:i_,alt:"ComfyUI-Copilot Logo",className:"h-12 w-12 -ml-2"}),O.jsx("h3",{className:"text-[16px] font-medium text-gray-800",children:"ComfyUI-Copilot"}),O.jsx("button",{onClick:a,className:"p-1 hover:bg-gray-100 rounded text-gray-500",children:O.jsx(c_,{className:"h-5 w-5"})})]}),O.jsxs("div",{className:"flex items-center gap-1",children:[O.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:O.jsx(s_,{className:"h-5 w-5"})}),O.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:O.jsx($c,{className:"h-5 w-5"})})]}),O.jsx(h_,{isOpen:n,onClose:()=>i(!1),onSave:o,initialApiKey:localStorage.getItem("chatApiKey")||""})]})}const f_=5*1024*1024,Dg=["image/jpeg","image/png","image/gif","image/webp"];function v_({input:t,loading:r,onChange:e,onSend:n,onKeyPress:i,onUploadImages:a,uploadedImages:o,onRemoveImage:s,selectedModel:l,onModelChange:u}){const[c,h]=qe.useState(!1),d=Rw.useRef(null),f=v=>{if(v.target.files){const g=[],b=[];if(Array.from(v.target.files).forEach(y=>{Dg.includes(y.type)?y.size>f_?g.push(`${y.name} (exceeds 5MB)`):b.push(y):g.push(`${y.name} (unsupported format)`)}),g.length>0&&alert(`The following files couldn't be uploaded: -${g.join(` -`)}`),b.length>0){const y=new DataTransfer;b.forEach($=>y.items.add($)),a(y.files)}}};return O.jsxs("div",{className:`relative ${o.length>0?"mt-12":""}`,children:[o.length>0&&O.jsx("div",{className:"absolute -top-10 left-0 flex gap-2",children:o.map(v=>O.jsxs("div",{className:"relative group",children:[O.jsx("img",{src:v.preview,alt:"uploaded",className:"w-8 h-8 rounded object-cover"}),O.jsx("button",{onClick:()=>s(v.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:O.jsx($c,{className:"w-3 h-3"})})]},v.id))}),O.jsx("textarea",{onChange:e,onKeyDown:v=>{if(v.key==="Enter"&&!v.shiftKey){if(v.nativeEvent.isComposing)return;v.preventDefault(),n()}i(v)},value:t,placeholder:"Type your message...",className:`w-full min-h-[80px] max-h-[400px] resize-none rounded-md border - border-gray-200 px-3 py-2 pr-12 pb-10 text-sm shadow-sm - focus:outline-none focus:ring-2 focus:ring-blue-500 - focus:border-transparent bg-white transition-all - duration-200 text-gray-700 overflow-y-auto`,style:{height:"auto"}}),O.jsxs("div",{className:`absolute bottom-2 left-3 right-12 flex items-center gap-2 - bg-white border-t border-gray-100 pt-1`,children:[O.jsxs("select",{value:l,onChange:v=>u(v.target.value),className:`px-1.5 py-0.5 text-xs rounded-md - border border-gray-200 bg-white text-gray-700 - focus:outline-none focus:ring-2 focus:ring-blue-500 - focus:border-transparent hover:bg-gray-50 - transition-colors border-0`,children:[O.jsx("option",{value:"gpt-4o",children:"gpt-4o"}),O.jsx("option",{value:"gpt-4o-mini",children:"gpt-4o-mini"}),O.jsx("option",{value:"DeepSeek-V3",children:"DeepSeek-V3"})]}),O.jsx("button",{type:"button",onClick:()=>h(!0),className:`p-1.5 text-gray-500 - hover:bg-gray-100 hover:text-gray-600 - transition-all duration-200 outline-none`,children:O.jsx(l_,{className:"h-4 w-4"})})]}),O.jsx("button",{type:"submit",onClick:n,disabled:r,className:`absolute bottom-3 right-3 p-2 rounded-md text-gray-500 - hover:bg-gray-100 hover:text-gray-600 disabled:opacity-50 - transition-all duration-200 active:scale-95`,children:r?O.jsx("div",{className:`h-5 w-5 animate-spin rounded-full - border-2 border-gray-300 border-t-blue-500`}):O.jsx(o_,{className:`h-5 w-5 transform transition-transform - group-hover:translate-x-1`})}),c&&O.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:O.jsxs("div",{className:"bg-white rounded-lg p-6 w-96 relative",children:[O.jsx("button",{onClick:()=>h(!1),className:"absolute top-2 right-2 text-gray-500 hover:text-gray-700",children:O.jsx($c,{className:"w-5 h-5"})}),O.jsx("h3",{className:"text-lg font-medium mb-4",children:"Upload Images"}),O.jsxs("div",{className:`border-2 border-dashed border-gray-300 rounded-lg p-8 - flex flex-col items-center justify-center gap-4 - hover:border-blue-500 transition-colors cursor-pointer`,onClick:()=>{var v;return(v=d.current)==null?void 0:v.click()},children:[O.jsx(u_,{className:"w-8 h-8 text-gray-400"}),O.jsxs("div",{className:"text-center",children:[O.jsx("p",{className:"text-sm text-gray-500 mb-2",children:"Click to upload images or drag and drop"}),O.jsx("p",{className:"text-xs text-gray-400",children:"Supported formats: JPG, PNG, GIF, WebP"}),O.jsx("p",{className:"text-xs text-gray-400",children:"Max file size: 5MB"})]})]}),O.jsx("input",{ref:d,type:"file",multiple:!0,accept:Dg.join(","),onChange:f,className:"hidden"}),o.length>0&&O.jsx("div",{className:"mt-4 grid grid-cols-3 gap-2",children:o.map(v=>O.jsxs("div",{className:"relative group",children:[O.jsx("img",{src:v.preview,alt:"preview",className:"w-full h-20 object-cover rounded"}),O.jsx("button",{onClick:()=>s(v.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:O.jsx($c,{className:"w-3 h-3"})})]},v.id))}),O.jsx("div",{className:"mt-4 flex justify-end gap-2",children:O.jsx("button",{onClick:()=>h(!1),className:`px-4 py-2 text-sm font-medium text-gray-700 - bg-white border border-gray-300 rounded-md - hover:bg-gray-50`,children:"Close"})})]})})]})}function p_(){const t=Object.values(Ft.canvas.selected_nodes)[0],r=new Set;function e(n,i){if(!(!n||i>=1)&&n.inputs)for(const a of Object.values(n.inputs)){const o=a.link;if(o&&Ft.graph.links[o]){const s=Ft.graph.links[o].origin_id,l=Ft.graph._nodes_by_id[s];l&&(r.add(l.type),e(l,i+1))}}}return t?(e(t,0),[{type:"upstream_node_types",data:Array.from(r)}]):null}function m_({nodeInfo:t,onSendWithIntent:r,loading:e}){return O.jsx("div",{className:`mb-3 p-3 rounded-md bg-gray-50 border border-gray-200 - transform transition-all duration-200 hover:shadow-md`,children:O.jsxs("div",{className:"text-sm",children:[O.jsxs("p",{children:["Selected node: ",t.type]}),O.jsxs("div",{className:"flex gap-2 mt-2",children:[O.jsx("button",{className:`px-3 py-1 text-xs rounded-md bg-blue-50 - 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"}),O.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"}),O.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",p_()),disabled:e,children:"Downstream Nodes"})]})]})})}function mm({name:t,isUser:r=!1,children:e}){return O.jsx("div",{className:"flex flex-col w-full items-start gap-2 py-2 animate-fadeIn",children:O.jsx("div",{className:"w-full",children:e})})}function g_({content:t}){return O.jsx(mm,{name:"User",isUser:!0,children:O.jsx("div",{className:"w-full rounded-lg border border-gray-700 p-4 text-gray-700 text-sm break-words",children:O.jsx("p",{className:"whitespace-pre-wrap",children:t})})})}function Ng(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 y_(t,r){const e={};return(t[t.length-1]===""?[...t,""]:t).join((e.padRight?" ":"")+","+(e.padLeft===!1?"":" ")).trim()}const b_=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,w_=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$_={};function Rg(t,r){return($_.jsx?w_:b_).test(t)}const x_=/[ \t\n\f\r]/g;function k_(t){return typeof t=="object"?t.type==="text"?Fg(t.value):!1:Fg(t)}function Fg(t){return t.replace(x_,"")===""}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 Fw(t,r){const e={},n={};let i=-1;for(;++i4&&e.slice(0,4)==="data"&&O_.test(r)){if(r.charAt(4)==="-"){const a=r.slice(5).replace(Bg,P_);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=r.slice(4);if(!Bg.test(a)){let o=a.replace(I_,C_);o.charAt(0)!=="-"&&(o="-"+o),r="data"+o}}i=gm}return new i(n,r)}function C_(t){return"-"+t.toLowerCase()}function P_(t){return t.charAt(1).toUpperCase()}const A_={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"},Vw=Fw([Lw,Bw,Ww,qw,T_],"html"),Eh=Fw([Lw,Bw,Ww,qw,__],"svg");function Nv(t){const r=String(t||"").trim();return r?r.split(/[ \t\n\r\f]+/g):[]}function M_(t){return t.join(" ").trim()}var Gw={},Lg=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,D_=/\n/g,N_=/^\s*/,R_=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,F_=/^:\s*/,z_=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,B_=/^[;\s]*/,L_=/^\s+|\s+$/g,j_=` -`,jg="/",Hg="*",aa="",H_="comment",W_="declaration",q_=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(D_);g&&(e+=g.length);var b=v.lastIndexOf(j_);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(N_)}function c(v){var g;for(v=v||[];g=h();)g!==!1&&v.push(g);return v}function h(){var v=a();if(!(jg!=t.charAt(0)||Hg!=t.charAt(1))){for(var g=2;aa!=t.charAt(g)&&(Hg!=t.charAt(g)||jg!=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:H_,comment:b})}}function d(){var v=a(),g=l(R_);if(g){if(h(),!l(F_))return s("property missing ':'");var b=l(z_),y=v({type:W_,property:Wg(g[0].replace(Lg,aa)),value:b?Wg(b[0].replace(Lg,aa)):aa});return l(B_),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 Wg(t){return t?t.replace(L_,aa):aa}var U_=Mg&&Mg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Gw,"__esModule",{value:!0});var qg=Gw.default=G_,V_=U_(q_);function G_(t,r){var e=null;if(!t||typeof t!="string")return e;var n=(0,V_.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 K_=qg.default||qg,Kw=Yw("end"),ym=Yw("start");function Yw(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 Y_(t){const r=ym(t),e=Kw(t);if(r&&e)return{start:r,end:e}}function Bs(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Ug(t.position):"start"in t||"end"in t?Ug(t):"line"in t||"column"in t?Rv(t):""}function Rv(t){return Vg(t&&t.line)+":"+Vg(t&&t.column)}function Ug(t){return Rv(t&&t.start)+"-"+Rv(t&&t.end)}function Vg(t){return t&&typeof t=="number"?t:1}class tr 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}}tr.prototype.file="";tr.prototype.name="";tr.prototype.reason="";tr.prototype.message="";tr.prototype.stack="";tr.prototype.column=void 0;tr.prototype.line=void 0;tr.prototype.ancestors=void 0;tr.prototype.cause=void 0;tr.prototype.fatal=void 0;tr.prototype.place=void 0;tr.prototype.ruleId=void 0;tr.prototype.source=void 0;const bm={}.hasOwnProperty,X_=new Map,J_=/[A-Z]/g,Z_=/-([a-z])/g,Q_=new Set(["table","tbody","thead","tfoot","tr"]),eO=new Set(["td","th"]),Xw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tO(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=uO(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=lO(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:Vw,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},a=Jw(i,t,void 0);return a&&typeof a!="string"?a:i.create(t,i.Fragment,{children:a||void 0},void 0)}function Jw(t,r,e){if(r.type==="element")return rO(t,r,e);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return nO(t,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return aO(t,r,e);if(r.type==="mdxjsEsm")return iO(t,r);if(r.type==="root")return oO(t,r,e);if(r.type==="text")return sO(t,r)}function rO(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=Qw(t,r.tagName,!1),o=cO(t,r);let s=$m(t,r);return Q_.has(r.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!k_(l):!0})),Zw(t,o,a,r),wm(o,s),t.ancestors.pop(),t.schema=n,t.create(r,a,o,e)}function nO(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 iO(t,r){if(r.data&&r.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(r.data.estree);tl(t,r.position)}function aO(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:Qw(t,r.name,!0),o=hO(t,r),s=$m(t,r);return Zw(t,o,a,r),wm(o,s),t.ancestors.pop(),t.schema=n,t.create(r,a,o,e)}function oO(t,r,e){const n={};return wm(n,$m(t,r)),t.create(r,t.Fragment,n,e)}function sO(t,r){return r.value}function Zw(t,r,e,n){typeof e!="string"&&e!==t.Fragment&&t.passNode&&(r.node=n)}function wm(t,r){if(r.length>0){const e=r.length>1?r:r[0];e&&(t.children=e)}}function lO(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 uO(t,r){return e;function e(n,i,a,o){const s=Array.isArray(a.children),l=ym(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 cO(t,r){const e={};let n,i;for(i in r.properties)if(i!=="children"&&bm.call(r.properties,i)){const a=dO(t,i,r.properties[i]);if(a){const[o,s]=a;t.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&eO.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 hO(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 $m(t,r){const e=[];let n=-1;const i=t.passKeys?new Map:X_;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 Yg={}.hasOwnProperty;function t7(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 sr=Hi(/[A-Za-z]/),er=Hi(/[\dA-Za-z]/),xO=Hi(/[#-'*+\--9=?A-Z^-~]/);function qc(t){return t!==null&&(t<32||t===127)}const Fv=Hi(/\d/),kO=Hi(/[\dA-Fa-f]/),SO=Hi(/[!-/:-@[-`{-~]/);function fe(t){return t!==null&&t<-2}function nt(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),E=D;Ek;){const P=e[T];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 IO(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||nt(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};Jg(h,-l),Jg(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(E)?Re(t,$,"linePrefix",a+1)(E):$(E)}function $(E){return E===null||fe(E)?t.check(Zg,g,T)(E):(t.enter("codeFlowValue"),k(E))}function k(E){return E===null||fe(E)?(t.exit("codeFlowValue"),$(E)):(t.consume(E),k)}function T(E){return t.exit("codeFenced"),r(E)}function P(E,D,B){let R=0;return A;function A(oe){return E.enter("lineEnding"),E.consume(oe),E.exit("lineEnding"),z}function z(oe){return E.enter("codeFencedFence"),Fe(oe)?Re(E,L,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):L(oe)}function L(oe){return oe===s?(E.enter("codeFencedFenceSequence"),Z(oe)):B(oe)}function Z(oe){return oe===s?(R++,E.consume(oe),Z):R>=o?(E.exit("codeFencedFenceSequence"),Fe(oe)?Re(E,ie,"whitespace")(oe):ie(oe)):B(oe)}function ie(oe){return oe===null||fe(oe)?(E.exit("codeFencedFence"),D(oe)):B(oe)}}}function jO(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 q0={name:"codeIndented",tokenize:WO},HO={partial:!0,tokenize:qO};function WO(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):fe(u)?t.attempt(HO,o,l)(u):(t.enter("codeFlowValue"),s(u))}function s(u){return u===null||fe(u)?(t.exit("codeFlowValue"),o(u)):(t.consume(u),s)}function l(u){return t.exit("codeIndented"),r(u)}}function qO(t,r,e){const n=this;return i;function i(o){return n.parser.lazy[n.now().line]?e(o):fe(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):fe(o)?i(o):e(o)}}const UO={name:"codeText",previous:GO,resolve:VO,tokenize:KO};function VO(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 s7(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||fe(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||nt(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):fe(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||fe(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 u7(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):fe(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||fe(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 fe(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 rI={name:"definition",tokenize:iI},nI={partial:!0,tokenize:aI};function iI(t,r,e){const n=this;let i;return a;function a(f){return t.enter("definition"),o(f)}function o(f){return l7.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 nt(f)?Ls(t,u)(f):u(f)}function u(f){return s7(t,c,e,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return t.attempt(nI,h,h)(f)}function h(f){return Fe(f)?Re(t,d,"whitespace")(f):d(f)}function d(f){return f===null||fe(f)?(t.exit("definition"),n.parser.defined.push(i),r(f)):e(f)}}function aI(t,r,e){return n;function n(s){return nt(s)?Ls(t,i)(s):e(s)}function i(s){return u7(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||fe(s)?r(s):e(s)}}const oI={name:"hardBreakEscape",tokenize:sI};function sI(t,r,e){return n;function n(a){return t.enter("hardBreakEscape"),t.consume(a),i}function i(a){return fe(a)?(t.exit("hardBreakEscape"),r(a)):e(a)}}const lI={name:"headingAtx",resolve:uI,tokenize:cI};function uI(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 cI(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||nt(c)?(t.exit("atxHeadingSequence"),s(c)):e(c)}function s(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||fe(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||nt(c)?(t.exit("atxHeadingText"),s(c)):(t.consume(c),u)}}const hI=["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"],ey=["pre","script","style","textarea"],dI={concrete:!0,name:"htmlFlow",resolveTo:pI,tokenize:mI},fI={partial:!0,tokenize:yI},vI={partial:!0,tokenize:gI};function pI(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 mI(t,r,e){const n=this;let i,a,o,s,l;return u;function u(S){return c(S)}function c(S){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(S),h}function h(S){return S===33?(t.consume(S),d):S===47?(t.consume(S),a=!0,g):S===63?(t.consume(S),i=3,n.interrupt?r:C):sr(S)?(t.consume(S),o=String.fromCharCode(S),b):e(S)}function d(S){return S===45?(t.consume(S),i=2,f):S===91?(t.consume(S),i=5,s=0,v):sr(S)?(t.consume(S),i=4,n.interrupt?r:C):e(S)}function f(S){return S===45?(t.consume(S),n.interrupt?r:C):e(S)}function v(S){const pe="CDATA[";return S===pe.charCodeAt(s++)?(t.consume(S),s===pe.length?n.interrupt?r:L:v):e(S)}function g(S){return sr(S)?(t.consume(S),o=String.fromCharCode(S),b):e(S)}function b(S){if(S===null||S===47||S===62||nt(S)){const pe=S===47,Se=o.toLowerCase();return!pe&&!a&&ey.includes(Se)?(i=1,n.interrupt?r(S):L(S)):hI.includes(o.toLowerCase())?(i=6,pe?(t.consume(S),y):n.interrupt?r(S):L(S)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?e(S):a?$(S):k(S))}return S===45||er(S)?(t.consume(S),o+=String.fromCharCode(S),b):e(S)}function y(S){return S===62?(t.consume(S),n.interrupt?r:L):e(S)}function $(S){return Fe(S)?(t.consume(S),$):A(S)}function k(S){return S===47?(t.consume(S),A):S===58||S===95||sr(S)?(t.consume(S),T):Fe(S)?(t.consume(S),k):A(S)}function T(S){return S===45||S===46||S===58||S===95||er(S)?(t.consume(S),T):P(S)}function P(S){return S===61?(t.consume(S),E):Fe(S)?(t.consume(S),P):k(S)}function E(S){return S===null||S===60||S===61||S===62||S===96?e(S):S===34||S===39?(t.consume(S),l=S,D):Fe(S)?(t.consume(S),E):B(S)}function D(S){return S===l?(t.consume(S),l=null,R):S===null||fe(S)?e(S):(t.consume(S),D)}function B(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||nt(S)?P(S):(t.consume(S),B)}function R(S){return S===47||S===62||Fe(S)?k(S):e(S)}function A(S){return S===62?(t.consume(S),z):e(S)}function z(S){return S===null||fe(S)?L(S):Fe(S)?(t.consume(S),z):e(S)}function L(S){return S===45&&i===2?(t.consume(S),me):S===60&&i===1?(t.consume(S),Oe):S===62&&i===4?(t.consume(S),Me):S===63&&i===3?(t.consume(S),C):S===93&&i===5?(t.consume(S),He):fe(S)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(fI,V,Z)(S)):S===null||fe(S)?(t.exit("htmlFlowData"),Z(S)):(t.consume(S),L)}function Z(S){return t.check(vI,ie,V)(S)}function ie(S){return t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),oe}function oe(S){return S===null||fe(S)?Z(S):(t.enter("htmlFlowData"),L(S))}function me(S){return S===45?(t.consume(S),C):L(S)}function Oe(S){return S===47?(t.consume(S),o="",ze):L(S)}function ze(S){if(S===62){const pe=o.toLowerCase();return ey.includes(pe)?(t.consume(S),Me):L(S)}return sr(S)&&o.length<8?(t.consume(S),o+=String.fromCharCode(S),ze):L(S)}function He(S){return S===93?(t.consume(S),C):L(S)}function C(S){return S===62?(t.consume(S),Me):S===45&&i===2?(t.consume(S),C):L(S)}function Me(S){return S===null||fe(S)?(t.exit("htmlFlowData"),V(S)):(t.consume(S),Me)}function V(S){return t.exit("htmlFlow"),r(S)}}function gI(t,r,e){const n=this;return i;function i(o){return fe(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 yI(t,r,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(kl,r,e)}}const bI={name:"htmlText",tokenize:wI};function wI(t,r,e){const n=this;let i,a,o;return s;function s(C){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(C),l}function l(C){return C===33?(t.consume(C),u):C===47?(t.consume(C),P):C===63?(t.consume(C),k):sr(C)?(t.consume(C),B):e(C)}function u(C){return C===45?(t.consume(C),c):C===91?(t.consume(C),a=0,v):sr(C)?(t.consume(C),$):e(C)}function c(C){return C===45?(t.consume(C),f):e(C)}function h(C){return C===null?e(C):C===45?(t.consume(C),d):fe(C)?(o=h,Oe(C)):(t.consume(C),h)}function d(C){return C===45?(t.consume(C),f):h(C)}function f(C){return C===62?me(C):C===45?d(C):h(C)}function v(C){const Me="CDATA[";return C===Me.charCodeAt(a++)?(t.consume(C),a===Me.length?g:v):e(C)}function g(C){return C===null?e(C):C===93?(t.consume(C),b):fe(C)?(o=g,Oe(C)):(t.consume(C),g)}function b(C){return C===93?(t.consume(C),y):g(C)}function y(C){return C===62?me(C):C===93?(t.consume(C),y):g(C)}function $(C){return C===null||C===62?me(C):fe(C)?(o=$,Oe(C)):(t.consume(C),$)}function k(C){return C===null?e(C):C===63?(t.consume(C),T):fe(C)?(o=k,Oe(C)):(t.consume(C),k)}function T(C){return C===62?me(C):k(C)}function P(C){return sr(C)?(t.consume(C),E):e(C)}function E(C){return C===45||er(C)?(t.consume(C),E):D(C)}function D(C){return fe(C)?(o=D,Oe(C)):Fe(C)?(t.consume(C),D):me(C)}function B(C){return C===45||er(C)?(t.consume(C),B):C===47||C===62||nt(C)?R(C):e(C)}function R(C){return C===47?(t.consume(C),me):C===58||C===95||sr(C)?(t.consume(C),A):fe(C)?(o=R,Oe(C)):Fe(C)?(t.consume(C),R):me(C)}function A(C){return C===45||C===46||C===58||C===95||er(C)?(t.consume(C),A):z(C)}function z(C){return C===61?(t.consume(C),L):fe(C)?(o=z,Oe(C)):Fe(C)?(t.consume(C),z):R(C)}function L(C){return C===null||C===60||C===61||C===62||C===96?e(C):C===34||C===39?(t.consume(C),i=C,Z):fe(C)?(o=L,Oe(C)):Fe(C)?(t.consume(C),L):(t.consume(C),ie)}function Z(C){return C===i?(t.consume(C),i=void 0,oe):C===null?e(C):fe(C)?(o=Z,Oe(C)):(t.consume(C),Z)}function ie(C){return C===null||C===34||C===39||C===60||C===61||C===96?e(C):C===47||C===62||nt(C)?R(C):(t.consume(C),ie)}function oe(C){return C===47||C===62||nt(C)?R(C):e(C)}function me(C){return C===62?(t.consume(C),t.exit("htmlTextData"),t.exit("htmlText"),r):e(C)}function Oe(C){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),ze}function ze(C){return Fe(C)?Re(t,He,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):He(C)}function He(C){return t.enter("htmlTextData"),o(C)}}const Sm={name:"labelEnd",resolveAll:SI,resolveTo:EI,tokenize:TI},$I={tokenize:_I},xI={tokenize:OI},kI={tokenize:II};function SI(t){let r=-1;const e=[];for(;++r=3&&(u===null||fe(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:BI},exit:jI,name:"list",tokenize:zI},RI={partial:!0,tokenize:HI},FI={partial:!0,tokenize:LI};function zI(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:Fv(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 Fv(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(RI,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 BI(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(FI,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 LI(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 jI(t){t.exit(this.containerState.type)}function HI(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 ty={name:"setextUnderline",resolveTo:WI,tokenize:qI};function WI(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 qI(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||fe(u)?(t.exit("setextHeadingLine"),r(u)):e(u)}}const UI={tokenize:VI};function VI(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(JO,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 GI={resolveAll:h7()},KI=c7("string"),YI=c7("text");function c7(t){return{resolveAll:h7(t==="text"?XI: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 uC(t,r){let e=-1;const n=[];let i;for(;++e0){const sn=Ie.tokenStack[Ie.tokenStack.length-1];(sn[1]||ny).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})},tt=-1;++tt1?"-"+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 TC(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 _C(t,r){if(t.options.allowDangerousHtml){const e={type:"raw",value:r.value};return t.patch(r,e),t.applyData(r,e)}}function v7(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 OC(t,r){const e=String(r.identifier).toUpperCase(),n=t.definitionById.get(e);if(!n)return v7(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 IC(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 CC(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 PC(t,r){const e=String(r.identifier).toUpperCase(),n=t.definitionById.get(e);if(!n)return v7(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 AC(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 MC(t,r,e){const n=t.all(r),i=e?DC(e):p7(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 NC(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=ym(r.children[1]),l=Kw(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 LC(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(oy(r.slice(i),i>0,!1)),a.join("")}function oy(t,r,e){let n=0,i=t.length;if(r){let a=t.codePointAt(n);for(;a===iy||a===ay;)n++,a=t.codePointAt(n)}if(e){let a=t.codePointAt(i-1);for(;a===iy||a===ay;)i--,a=t.codePointAt(i-1)}return i>n?t.slice(n,i):""}function WC(t,r){const e={type:"text",value:HC(String(r.value))};return t.patch(r,e),t.applyData(r,e)}function qC(t,r){const e={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(r,e),t.applyData(r,e)}const UC={blockquote:wC,break:$C,code:xC,delete:kC,emphasis:SC,footnoteReference:EC,heading:TC,html:_C,imageReference:OC,image:IC,inlineCode:CC,linkReference:PC,link:AC,listItem:MC,list:NC,paragraph:RC,root:FC,strong:zC,table:BC,tableCell:jC,tableRow:LC,text:WC,thematicBreak:qC,toml:ku,yaml:ku,definition:ku,footnoteDefinition:ku};function ku(){}const m7=-1,Oh=0,Uc=1,Vc=2,Em=3,Tm=4,_m=5,Om=6,g7=7,y7=8,sy=typeof self=="object"?self:globalThis,VC=(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 m7: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 Em:return e(new Date(o),i);case Tm:{const{source:s,flags:l}=o;return e(new RegExp(s,l),i)}case _m:{const s=e(new Map,i);for(const[l,u]of o)s.set(n(l),n(u));return s}case Om:{const s=e(new Set,i);for(const l of o)s.add(n(l));return s}case g7:{const{name:s,message:l}=o;return e(new sy[s](l),i)}case y7:return e(BigInt(o),i);case"BigInt":return e(Object(BigInt(o)),i)}return e(new sy[a](o),i)};return n},ly=t=>VC(new Map,t)(0),Ya="",{toString:GC}={},{keys:KC}=Object,Es=t=>{const r=typeof t;if(r!=="object"||!t)return[Oh,r];const e=GC.call(t).slice(8,-1);switch(e){case"Array":return[Uc,Ya];case"Object":return[Vc,Ya];case"Date":return[Em,Ya];case"RegExp":return[Tm,Ya];case"Map":return[_m,Ya];case"Set":return[Om,Ya]}return e.includes("Array")?[Uc,e]:e.includes("Error")?[g7,e]:[Vc,e]},Su=([t,r])=>t===Oh&&(r==="function"||r==="symbol"),YC=(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=y7,c=o.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([m7],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 KC(o))(t||!Su(Es(o[d])))&&c.push([a(d),a(o[d])]);return h}case Em:return i([s,o.toISOString()],o);case Tm:{const{source:c,flags:h}=o;return i([s,{source:c,flags:h}],o)}case _m:{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 Om:{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},uy=(t,{json:r,lossy:e}={})=>{const n=[];return YC(!(r||e),!!r,new Map,n)(t),n},ca=typeof structuredClone=="function"?(t,r)=>r&&("json"in r||"lossy"in r)?ly(uy(t,r)):structuredClone(t):(t,r)=>ly(uy(t,r));function XC(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 JC(t,r){return"Back to reference "+(t+1)+(r>1?"-"+r:"")}function ZC(t){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",e=t.options.footnoteBackContent||XC,n=t.options.footnoteBackLabel||JC,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 rP;if(typeof t=="function")return Ih(t);if(typeof t=="object")return Array.isArray(t)?QC(t):eP(t);if(typeof t=="string")return tP(t);throw new Error("Expected function, string, or object as test")};function QC(t){const r=[];let e=-1;for(;++e":""))+")"})}return d;function d(){let f=b7,v,g,b;if((!r||a(l,u,c[c.length-1]||void 0))&&(f=aP(e(l,c)),f[0]===Bv))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==w7)for(g=(n?y.children.length:-1)+o,b=c.concat(y);g>-1&&g0&&e.push({type:"text",value:` -`}),e}function cy(t){let r=0,e=t.charCodeAt(r);for(;e===9||e===32;)r++,e=t.charCodeAt(r);return t.slice(r)}function hy(t,r){const e=sP(t,r),n=e.one(t,void 0),i=ZC(e),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:` -`},i),a}function dP(t,r){return t&&"run"in t?async function(e,n){const i=hy(e,{file:n,...r});await t.run(i,n)}:function(e,n){return hy(e,{file:n,...t||r})}}function dy(t){if(t)throw t}var kc=Object.prototype.hasOwnProperty,$7=Object.prototype.toString,fy=Object.defineProperty,vy=Object.getOwnPropertyDescriptor,py=function(r){return typeof Array.isArray=="function"?Array.isArray(r):$7.call(r)==="[object Array]"},my=function(r){if(!r||$7.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)},gy=function(r,e){fy&&e.name==="__proto__"?fy(r,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):r[e.name]=e.newValue},yy=function(r,e){if(e==="__proto__")if(kc.call(r,e)){if(vy)return vy(r,e).value}else return;return r[e]},fP=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:mP,dirname:gP,extname:yP,join:bP,sep:"/"};function mP(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 gP(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 yP(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 bP(...t){let r=-1,e;for(;++r0&&t.codePointAt(t.length-1)===47&&(e+="/"),r?"/"+e:e}function $P(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 xP={cwd:kP};function kP(){return"/"}function Hv(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function SP(t){if(typeof t=="string")t=new URL(t);else if(!Hv(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 EP(t)}function EP(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];jv(g)&&jv(f)&&(f=V0(!0,g,f)),n[d]=[u,f,...v]}}}}const IP=new Cm().freeze();function X0(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function J0(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Z0(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 wy(t){if(!jv(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function $y(t,r,e){if(!e)throw new Error("`"+t+"` finished async. Use `"+r+"` instead")}function Eu(t){return CP(t)?t:new x7(t)}function CP(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function PP(t){return typeof t=="string"||AP(t)}function AP(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const MP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",xy=[],ky={allowDangerousHtml:!0},DP=/^(https?|ircs?|mailto|xmpp)$/i,NP=[{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 RP(t){const r=t.allowedElements,e=t.allowElement,n=t.children||"",i=t.className,a=t.components,o=t.disallowedElements,s=t.rehypePlugins||xy,l=t.remarkPlugins||xy,u=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...ky}:ky,c=t.skipHtml,h=t.unwrapDisallowed,d=t.urlTransform||FP,f=IP().use(bC).use(l).use(dP,u).use(s),v=new x7;typeof n=="string"&&(v.value=n);for(const $ of NP)Object.hasOwn(t,$.from)&&(""+$.from+($.to?"use `"+$.to+"` instead":"remove it")+MP+$.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),tO(b,{Fragment:O.Fragment,components:a,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function y($,k,T){if($.type==="raw"&&T&&typeof k=="number")return c?T.children.splice(k,1):T.children[k]={type:"text",value:$.value},k;if($.type==="element"){let P;for(P in W0)if(Object.hasOwn(W0,P)&&Object.hasOwn($.properties,P)){const E=$.properties[P],D=W0[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,T)),P&&T&&typeof k=="number")return h&&$.children?T.children.splice(k,1,...$.children):T.children.splice(k,1),k}}}function FP(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||DP.test(t.slice(0,r))?t:""}const zP=qe.memo(RP,(t,r)=>t.children===r.children&&t.className===r.className);function Sy(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 BP(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function LP(t,r,e){const i=Sl(e.ignore||[]),a=jP(r);let o=-1;for(;++o0?{type:"text",value:E}:void 0),E===!1?d.lastIndex=T+1:(v!==T&&$.push({type:"text",value:u.value.slice(v,T)}),Array.isArray(E)?$.push(...E):E&&$.push(E),v=T+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=Sy(t,"(");let a=Sy(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 k7(t,r){const e=t.input.charCodeAt(t.index-1);return(t.index===0||$a(e)||Th(e))&&(!r||e!==47)}S7.peek=dA;function rA(){return{enter:{gfmFootnoteDefinition:iA,gfmFootnoteDefinitionLabelString:aA,gfmFootnoteCall:lA,gfmFootnoteCallString:uA},exit:{gfmFootnoteDefinition:sA,gfmFootnoteDefinitionLabelString:oA,gfmFootnoteCall:hA,gfmFootnoteCallString:cA}}}function nA(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:fA,footnoteReference:S7}}}function iA(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function aA(){this.buffer()}function oA(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 sA(t){this.exit(t)}function lA(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function uA(){this.buffer()}function cA(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 hA(t){this.exit(t)}function S7(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 dA(){return"["}function fA(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()),vA)),o(),a}function vA(t,r,e){return r===0?t:(e?"":" ")+t}const pA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];E7.peek=wA;function mA(){return{canContainEols:["delete"],enter:{strikethrough:yA},exit:{strikethrough:bA}}}function gA(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:pA}],handlers:{delete:E7}}}function yA(t){this.enter({type:"delete",children:[]},t)}function bA(t){this.exit(t)}function E7(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 wA(){return"~"}function $A(t){return t.length}function xA(t,r){const e=r,n=(e.align||[]).concat(),i=e.stringLength||$A,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 "),a.shift(2);const o=e.indentLines(e.containerFlow(t,a.current()),EA);return i(),o}function EA(t,r,e){return">"+(e?"":" ")+t}function TA(t,r){return Ty(t,r.inConstruct,!0)&&!Ty(t,r.notInConstruct,!1)}function Ty(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 _A(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 OA(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 IA(t,r,e,n){const i=OA(e),a=t.value||"",o=i==="`"?"GraveAccent":"Tilde";if(_A(t,e)){const h=e.enter("codeIndented"),d=e.indentLines(a,CA);return h(),d}const s=e.createTracker(n),l=i.repeat(Math.max(T7(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:` -`,encode:["`"],...s.current()})),h()}return c+=s.move(` -`),a&&(c+=s.move(a+` -`)),c+=s.move(l),u(),c}function CA(t,r,e){return(e?"":" ")+t}function Pm(t){const r=t.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function PA(t,r,e,n){const i=Pm(e),a=i==='"'?"Quote":"Apostrophe",o=e.enter("definition");let s=e.enter("label");const l=e.createTracker(n);let u=l.move("[");return u+=l.move(e.safe(e.associationId(t),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!t.url||/[\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()),o(),u}function AA(t){const r=t.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function rl(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Gc(t,r,e){const n=Io(t),i=Io(r);return n===void 0?i===void 0?e==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}_7.peek=MA;function _7(t,r,e,n){const i=AA(e),a=e.enter("emphasis"),o=e.createTracker(n),s=o.move(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);return a(),e.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},s+l+f}function MA(t,r,e){return e.options.emphasis||"*"}function DA(t,r){let e=!1;return Ch(t,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return e=!0,Bv}),!!((!t.depth||t.depth<3)&&xm(t)&&(r.options.setext||e))}function NA(t,r,e,n){const i=Math.max(Math.min(6,t.depth||1),1),a=e.createTracker(n);if(DA(t,e)){const c=e.enter("headingSetext"),h=e.enter("phrasing"),d=e.containerPhrasing(t,{...a.current(),before:` -`,after:` -`});return h(),c(),d+` -`+(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}O7.peek=RA;function O7(t){return t.value||""}function RA(){return"<"}I7.peek=FA;function I7(t,r,e,n){const i=Pm(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 FA(){return"!"}C7.peek=zA;function C7(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 zA(){return"!"}P7.peek=BA;function P7(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))}M7.peek=LA;function M7(t,r,e,n){const i=Pm(e),a=i==='"'?"Quote":"Apostrophe",o=e.createTracker(n);let s,l;if(A7(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 LA(t,r,e){return A7(t,e)?"<":"["}D7.peek=jA;function D7(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 jA(){return"["}function Am(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 HA(t){const r=Am(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 WA(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 N7(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 qA(t,r,e,n){const i=e.enter("list"),a=e.bulletCurrent;let o=t.ordered?WA(e):Am(e);const s=t.ordered?o==="."?")":".":HA(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),N7(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 GA(t,r,e,n){const i=e.enter("paragraph"),a=e.enter("phrasing"),o=e.containerPhrasing(t,n);return a(),i(),o}const KA=Sl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function YA(t,r,e,n){return(t.children.some(function(o){return KA(o)})?e.containerPhrasing:e.containerFlow).call(e,t,n)}function XA(t){const r=t.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}R7.peek=JA;function R7(t,r,e,n){const i=XA(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 JA(t,r,e){return e.options.strong||"*"}function ZA(t,r,e,n){return e.safe(t.value,n)}function QA(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 eM(t,r,e){const n=(N7(e)+(e.options.ruleSpaces?" ":"")).repeat(QA(e));return e.options.ruleSpaces?n.slice(0,-1):n}const F7={blockquote:SA,break:_y,code:IA,definition:PA,emphasis:_7,hardBreak:_y,heading:NA,html:O7,image:I7,imageReference:C7,inlineCode:P7,link:M7,linkReference:D7,list:qA,listItem:VA,paragraph:GA,root:YA,strong:R7,text:ZA,thematicBreak:eM};function tM(){return{enter:{table:rM,tableData:Oy,tableHeader:Oy,tableRow:iM},exit:{codeText:aM,table:nM,tableData:rd,tableHeader:rd,tableRow:rd}}}function rM(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 nM(t){this.exit(t),this.data.inTable=void 0}function iM(t){this.enter({type:"tableRow",children:[]},t)}function rd(t){this.exit(t)}function Oy(t){this.enter({type:"tableCell",children:[]},t)}function aM(t){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,oM));const e=this.stack[this.stack.length-1];e.type,e.value=r,this.exit(t)}function oM(t,r){return r==="|"?r:t}function sM(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 xA(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 EM={tokenize:MM,partial:!0};function TM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:CM,continuation:{tokenize:PM},exit:AM}},text:{91:{name:"gfmFootnoteCall",tokenize:IM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_M,resolveTo:OM}}}}function _M(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 OM(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 IM(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||nt(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 nt(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 CM(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||nt(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 nt(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 PM(t,r,e){return t.check(kl,r,t.attempt(EM,r,e))}function AM(t){t.exit("gfmFootnoteDefinition")}function MM(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 DM(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 NM{constructor(){this.map=[]}add(r,e,n){RM(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 RM(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,Z=L==="tableHead"||L==="tableRow"?E:l;return Z===E&&n.parser.lazy[n.now().line]?e(A):Z(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):fe(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||nt(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||fe(A)?T(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,T,"whitespace")(A):T(A)}function T(A){return A===124?v(A):A===null||fe(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||fe(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||nt(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 LM(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 NM;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 Cy(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 jM={name:"tasklistCheck",tokenize:WM};function HM(){return{text:{91:jM}}}function WM(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 nt(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 fe(l)?r(l):Fe(l)?t.check({tokenize:qM},r,e)(l):e(l)}}function qM(t,r,e){return Re(t,n,"whitespace");function n(i){return i===null?e(i):r(i)}}function UM(t){return t7([mM(),TM(),DM(t),zM(),HM()])}const VM={};function GM(t){const r=this,e=t||VM,n=r.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(UM(e)),a.push(dM()),o.push(fM(e))}function KM(){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 YM(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(T7(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":">","<":"<",'"':""","'":"'"},lD=/[&><"']/g;function uD(t){return String(t).replace(lD,r=>sD[r])}var V7=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},cD=function(r){var e=V7(r);return e.type==="mathord"||e.type==="textord"||e.type==="atom"},hD=function(r){if(!r)throw new Error("Expected non-null, but got "+String(r));return r},dD=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:nD,deflt:iD,escape:uD,hyphenate:oD,getBaseElem:V7,isCharacterBox:cD,protocolFromUrl:dD},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 fD(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 Dm{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]:fD(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 Y("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[vD[this.id]]}sub(){return kn[pD[this.id]]}fracNum(){return kn[mD[this.id]]}fracDen(){return kn[gD[this.id]]}cramp(){return kn[yD[this.id]]}text(){return kn[bD[this.id]]}isTight(){return this.size>=2}}var Nm=0,Kc=1,So=2,Un=3,nl=4,Yr=5,Co=6,lr=7,kn=[new pi(Nm,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)],vD=[nl,Yr,nl,Yr,Co,lr,Co,lr],pD=[Yr,Yr,Yr,Yr,lr,lr,lr,lr],mD=[So,Un,nl,Yr,Co,lr,Co,lr],gD=[Un,Un,Yr,Yr,lr,lr,lr,lr],yD=[Kc,Kc,Un,Un,Yr,Yr,lr,lr],bD=[Nm,Kc,So,Un,So,Un,So,Un],we={DISPLAY:kn[Nm],TEXT:kn[So],SCRIPT:kn[nl],SCRIPTSCRIPT:kn[Co]},qv=[{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 wD(t){for(var r=0;r=i[0]&&t<=i[1])return e.name}return null}var Ec=[];qv.forEach(t=>t.blocks.forEach(r=>Ec.push(...r)));function G7(t){for(var r=0;r=Ec[r]&&t<=Ec[r+1])return!0;return!1}var Xa=80,$D=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 -s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 -c69,-144,104.5,-217.7,106.5,-221 -l`+r/2.075+" -"+r+` -c5.3,-9.3,12,-14,20,-14 -H400000v`+(40+r)+`H845.2724 -s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 -c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+r)+" "+e+"h400000v"+(40+r)+"h-400000z"},xD=function(r,e){return"M263,"+(601+r+e)+`c0.7,0,18,39.7,52,119 -c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 -c340,-704.7,510.7,-1060.3,512,-1067 -l`+r/2.084+" -"+r+` -c4.7,-7.3,11,-11,19,-11 -H40000v`+(40+r)+`H1012.3 -s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 -c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 -s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 -c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+r)+" "+e+"h400000v"+(40+r)+"h-400000z"},kD=function(r,e){return"M983 "+(10+r+e)+` -l`+r/3.13+" -"+r+` -c4,-6.7,10,-10,18,-10 H400000v`+(40+r)+` -H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 -s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 -c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 -c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 -c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 -c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+r)+" "+e+"h400000v"+(40+r)+"h-400000z"},SD=function(r,e){return"M424,"+(2398+r+e)+` -c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 -c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 -s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 -s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 -l`+r/4.223+" -"+r+`c4,-6.7,10,-10,18,-10 H400000 -v`+(40+r)+`H1014.6 -s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 -c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2z M`+(1001+r)+" "+e+` -h400000v`+(40+r)+"h-400000z"},ED=function(r,e){return"M473,"+(2713+r+e)+` -c339.3,-1799.3,509.3,-2700,510,-2702 l`+r/5.298+" -"+r+` -c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+r)+`H1017.7 -s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 -c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 -s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+r)+" "+e+"h400000v"+(40+r)+"H1017.7z"},TD=function(r){var e=r/2;return"M400000 "+r+" H0 L"+e+" 0 l65 45 L145 "+(r-80)+" H400000z"},_D=function(r,e,n){var i=n-54-e-r;return"M702 "+(r+e)+"H400000"+(40+r)+` -H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 -h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 -c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+e+"H400000v"+(40+r)+"H742z"},OD=function(r,e,n){e=1e3*e;var i="";switch(r){case"sqrtMain":i=$D(e,Xa);break;case"sqrtSize1":i=xD(e,Xa);break;case"sqrtSize2":i=kD(e,Xa);break;case"sqrtSize3":i=SD(e,Xa);break;case"sqrtSize4":i=ED(e,Xa);break;case"sqrtTall":i=_D(e,Xa,n)}return i},ID=function(r,e){switch(r){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"∣":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z"+("M367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z");case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257z"+("M478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z");default:return""}},Ay={doubleleftarrow:`M262 157 -l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 - 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 - 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 -c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 - 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 --86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 --2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z -m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l --10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 - 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 --33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 --17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 --13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 -c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 --107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 - 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 --5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 -c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 - 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 - 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 - l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 --45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 - 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 - 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 - 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 --331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 -H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 - 435 0h399565z`,leftgroupunder:`M400000 262 -H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 - 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 --3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 --18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 --196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 - 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 --4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 --10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z -m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 - 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 - 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 --152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 - 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 --2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 -v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 --83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 --68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 - 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z -M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z -M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 --.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 -c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 - 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z -M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 -c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 --53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 - 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 - 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 -c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 - 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 - 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 --5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 --320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z -m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 -60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 --451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z -m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 -c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 --480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z -m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 -85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 --707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z -m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 -c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 --16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 - 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 - 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 --40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 - 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l --6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 -s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 -c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 - 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 --174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 - 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 - 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 --3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 --10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 - 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 --18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 - 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z -m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 - 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 --7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 --27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 - 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 - 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 --64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z -m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 - 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 --13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 - 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z -M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 - 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 --52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 --167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 - 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 --70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 --40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 --37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 - 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 -c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 - 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 - 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 --19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 - 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 --2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 - 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 - 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 --68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 --8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 - 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 -c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 - 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 --11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 - 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 - 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 - -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 --11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 - 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 - 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 - -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 -3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 -10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 --1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 --7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 -H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 -c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 -c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, --5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 -c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 -c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 -s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 -121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 -s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 -c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z -M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 --27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 -13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 --84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 --119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 -151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 -c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 -c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 -c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z -M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, -1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, --152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z -M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},CD=function(r,e){switch(r){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v1759 h347 v-84 -H403z M403 1759 V0 H319 V1759 v`+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v1759 H0 v84 H347z -M347 1759 V0 H263 V1759 v`+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+` v585 h43z -M367 15 v585 v`+e+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+` v1715 h263 v84 H319z -MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+` v1799 H0 v-84 H319z -MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v602 h84z -M403 1759 V0 H319 V1759 v`+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v602 h84z -M347 1759 V0 h-84 V1759 v`+e+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 -c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, --36,557 l0,`+(e+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, -949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 -c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, --544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 -l0,-`+(e+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, --210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, -63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 -c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(e+9)+` -c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 -c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 -c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 -c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 -l0,-`+(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 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]},My={Å:"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 PD(t,r){En[t]=r}function Rm(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 My&&(n=My[t[0]].charCodeAt(0),i=En[r][n]),!i&&e==="text"&&G7(n)&&(i=En[r][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var nd={};function AD(t){var r;if(t>=5?r=0:t>=3?r=1:r=2,!nd[r]){var e=nd[r]={cssEmPerMu:_u.quad[r]/18};for(var n in _u)_u.hasOwnProperty(n)&&(e[n]=_u[n][r])}return nd[r]}var MD=[[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]],Dy=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ny=function(r,e){return e.size<2?r:MD[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=Dy[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:Ny(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:Dy[r-1]})}havingBaseStyle(r){r=r||this.style.text();var e=Ny(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=AD(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Wn.BASESIZE=6;var Uv={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},DD={ex:!0,em:!0,mu:!0},K7=function(r){return typeof r!="string"&&(r=r.unit),r in Uv||r in DD||r==="ex"},pt=function(r,e){var n;if(r.unit in Uv)n=Uv[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 Y("Invalid unit: '"+r.unit+"'");i!==e&&(n*=i.sizeMultiplier/e.sizeMultiplier)}return Math.min(r.number*n,e.maxSize)},te=function(r){return+r.toFixed(4)+"em"},Ni=function(r){return r.filter(e=>e).join(" ")},Y7=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)}},X7=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,Y7.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 X7.call(this,"span")}toMarkup(){return J7.call(this,"span")}}class Fm{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,Y7.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 X7.call(this,"a")}toMarkup(){return J7.call(this,"a")}}class ND{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=te(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 Vv{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 zD={bin:1,close:1,inner:1,open:1,punct:1,rel:1},BD={"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",_="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(m,w,I,"≡","\\equiv",!0);p(m,w,I,"≺","\\prec",!0);p(m,w,I,"≻","\\succ",!0);p(m,w,I,"∼","\\sim",!0);p(m,w,I,"⊥","\\perp");p(m,w,I,"⪯","\\preceq",!0);p(m,w,I,"⪰","\\succeq",!0);p(m,w,I,"≃","\\simeq",!0);p(m,w,I,"∣","\\mid",!0);p(m,w,I,"≪","\\ll",!0);p(m,w,I,"≫","\\gg",!0);p(m,w,I,"≍","\\asymp",!0);p(m,w,I,"∥","\\parallel");p(m,w,I,"⋈","\\bowtie",!0);p(m,w,I,"⌣","\\smile",!0);p(m,w,I,"⊑","\\sqsubseteq",!0);p(m,w,I,"⊒","\\sqsupseteq",!0);p(m,w,I,"≐","\\doteq",!0);p(m,w,I,"⌢","\\frown",!0);p(m,w,I,"∋","\\ni",!0);p(m,w,I,"∝","\\propto",!0);p(m,w,I,"⊢","\\vdash",!0);p(m,w,I,"⊣","\\dashv",!0);p(m,w,I,"∋","\\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,I,"⟵","\\longleftarrow",!0);p(m,w,I,"⇐","\\Leftarrow",!0);p(m,w,I,"⟸","\\Longleftarrow",!0);p(m,w,I,"⟶","\\longrightarrow",!0);p(m,w,I,"⇒","\\Rightarrow",!0);p(m,w,I,"⟹","\\Longrightarrow",!0);p(m,w,I,"↔","\\leftrightarrow",!0);p(m,w,I,"⟷","\\longleftrightarrow",!0);p(m,w,I,"⇔","\\Leftrightarrow",!0);p(m,w,I,"⟺","\\Longleftrightarrow",!0);p(m,w,I,"↦","\\mapsto",!0);p(m,w,I,"⟼","\\longmapsto",!0);p(m,w,I,"↗","\\nearrow",!0);p(m,w,I,"↩","\\hookleftarrow",!0);p(m,w,I,"↪","\\hookrightarrow",!0);p(m,w,I,"↘","\\searrow",!0);p(m,w,I,"↼","\\leftharpoonup",!0);p(m,w,I,"⇀","\\rightharpoonup",!0);p(m,w,I,"↙","\\swarrow",!0);p(m,w,I,"↽","\\leftharpoondown",!0);p(m,w,I,"⇁","\\rightharpoondown",!0);p(m,w,I,"↖","\\nwarrow",!0);p(m,w,I,"⇌","\\rightleftharpoons",!0);p(m,_,I,"≮","\\nless",!0);p(m,_,I,"","\\@nleqslant");p(m,_,I,"","\\@nleqq");p(m,_,I,"⪇","\\lneq",!0);p(m,_,I,"≨","\\lneqq",!0);p(m,_,I,"","\\@lvertneqq");p(m,_,I,"⋦","\\lnsim",!0);p(m,_,I,"⪉","\\lnapprox",!0);p(m,_,I,"⊀","\\nprec",!0);p(m,_,I,"⋠","\\npreceq",!0);p(m,_,I,"⋨","\\precnsim",!0);p(m,_,I,"⪹","\\precnapprox",!0);p(m,_,I,"≁","\\nsim",!0);p(m,_,I,"","\\@nshortmid");p(m,_,I,"∤","\\nmid",!0);p(m,_,I,"⊬","\\nvdash",!0);p(m,_,I,"⊭","\\nvDash",!0);p(m,_,I,"⋪","\\ntriangleleft");p(m,_,I,"⋬","\\ntrianglelefteq",!0);p(m,_,I,"⊊","\\subsetneq",!0);p(m,_,I,"","\\@varsubsetneq");p(m,_,I,"⫋","\\subsetneqq",!0);p(m,_,I,"","\\@varsubsetneqq");p(m,_,I,"≯","\\ngtr",!0);p(m,_,I,"","\\@ngeqslant");p(m,_,I,"","\\@ngeqq");p(m,_,I,"⪈","\\gneq",!0);p(m,_,I,"≩","\\gneqq",!0);p(m,_,I,"","\\@gvertneqq");p(m,_,I,"⋧","\\gnsim",!0);p(m,_,I,"⪊","\\gnapprox",!0);p(m,_,I,"⊁","\\nsucc",!0);p(m,_,I,"⋡","\\nsucceq",!0);p(m,_,I,"⋩","\\succnsim",!0);p(m,_,I,"⪺","\\succnapprox",!0);p(m,_,I,"≆","\\ncong",!0);p(m,_,I,"","\\@nshortparallel");p(m,_,I,"∦","\\nparallel",!0);p(m,_,I,"⊯","\\nVDash",!0);p(m,_,I,"⋫","\\ntriangleright");p(m,_,I,"⋭","\\ntrianglerighteq",!0);p(m,_,I,"","\\@nsupseteqq");p(m,_,I,"⊋","\\supsetneq",!0);p(m,_,I,"","\\@varsupsetneq");p(m,_,I,"⫌","\\supsetneqq",!0);p(m,_,I,"","\\@varsupsetneqq");p(m,_,I,"⊮","\\nVdash",!0);p(m,_,I,"⪵","\\precneqq",!0);p(m,_,I,"⪶","\\succneqq",!0);p(m,_,I,"","\\@nsubseteqq");p(m,_,le,"⊴","\\unlhd");p(m,_,le,"⊵","\\unrhd");p(m,_,I,"↚","\\nleftarrow",!0);p(m,_,I,"↛","\\nrightarrow",!0);p(m,_,I,"⇍","\\nLeftarrow",!0);p(m,_,I,"⇏","\\nRightarrow",!0);p(m,_,I,"↮","\\nleftrightarrow",!0);p(m,_,I,"⇎","\\nLeftrightarrow",!0);p(m,_,I,"△","\\vartriangle");p(m,_,M,"ℏ","\\hslash");p(m,_,M,"▽","\\triangledown");p(m,_,M,"◊","\\lozenge");p(m,_,M,"Ⓢ","\\circledS");p(m,_,M,"®","\\circledR");p(q,_,M,"®","\\circledR");p(m,_,M,"∡","\\measuredangle",!0);p(m,_,M,"∄","\\nexists");p(m,_,M,"℧","\\mho");p(m,_,M,"Ⅎ","\\Finv",!0);p(m,_,M,"⅁","\\Game",!0);p(m,_,M,"‵","\\backprime");p(m,_,M,"▲","\\blacktriangle");p(m,_,M,"▼","\\blacktriangledown");p(m,_,M,"■","\\blacksquare");p(m,_,M,"⧫","\\blacklozenge");p(m,_,M,"★","\\bigstar");p(m,_,M,"∢","\\sphericalangle",!0);p(m,_,M,"∁","\\complement",!0);p(m,_,M,"ð","\\eth",!0);p(q,w,M,"ð","ð");p(m,_,M,"╱","\\diagup");p(m,_,M,"╲","\\diagdown");p(m,_,M,"□","\\square");p(m,_,M,"□","\\Box");p(m,_,M,"◊","\\Diamond");p(m,_,M,"¥","\\yen",!0);p(q,_,M,"¥","\\yen",!0);p(m,_,M,"✓","\\checkmark",!0);p(q,_,M,"✓","\\checkmark");p(m,_,M,"ℶ","\\beth",!0);p(m,_,M,"ℸ","\\daleth",!0);p(m,_,M,"ℷ","\\gimel",!0);p(m,_,M,"ϝ","\\digamma",!0);p(m,_,M,"ϰ","\\varkappa");p(m,_,zr,"┌","\\@ulcorner",!0);p(m,_,hr,"┐","\\@urcorner",!0);p(m,_,zr,"└","\\@llcorner",!0);p(m,_,hr,"┘","\\@lrcorner",!0);p(m,_,I,"≦","\\leqq",!0);p(m,_,I,"⩽","\\leqslant",!0);p(m,_,I,"⪕","\\eqslantless",!0);p(m,_,I,"≲","\\lesssim",!0);p(m,_,I,"⪅","\\lessapprox",!0);p(m,_,I,"≊","\\approxeq",!0);p(m,_,le,"⋖","\\lessdot");p(m,_,I,"⋘","\\lll",!0);p(m,_,I,"≶","\\lessgtr",!0);p(m,_,I,"⋚","\\lesseqgtr",!0);p(m,_,I,"⪋","\\lesseqqgtr",!0);p(m,_,I,"≑","\\doteqdot");p(m,_,I,"≓","\\risingdotseq",!0);p(m,_,I,"≒","\\fallingdotseq",!0);p(m,_,I,"∽","\\backsim",!0);p(m,_,I,"⋍","\\backsimeq",!0);p(m,_,I,"⫅","\\subseteqq",!0);p(m,_,I,"⋐","\\Subset",!0);p(m,_,I,"⊏","\\sqsubset",!0);p(m,_,I,"≼","\\preccurlyeq",!0);p(m,_,I,"⋞","\\curlyeqprec",!0);p(m,_,I,"≾","\\precsim",!0);p(m,_,I,"⪷","\\precapprox",!0);p(m,_,I,"⊲","\\vartriangleleft");p(m,_,I,"⊴","\\trianglelefteq");p(m,_,I,"⊨","\\vDash",!0);p(m,_,I,"⊪","\\Vvdash",!0);p(m,_,I,"⌣","\\smallsmile");p(m,_,I,"⌢","\\smallfrown");p(m,_,I,"≏","\\bumpeq",!0);p(m,_,I,"≎","\\Bumpeq",!0);p(m,_,I,"≧","\\geqq",!0);p(m,_,I,"⩾","\\geqslant",!0);p(m,_,I,"⪖","\\eqslantgtr",!0);p(m,_,I,"≳","\\gtrsim",!0);p(m,_,I,"⪆","\\gtrapprox",!0);p(m,_,le,"⋗","\\gtrdot");p(m,_,I,"⋙","\\ggg",!0);p(m,_,I,"≷","\\gtrless",!0);p(m,_,I,"⋛","\\gtreqless",!0);p(m,_,I,"⪌","\\gtreqqless",!0);p(m,_,I,"≖","\\eqcirc",!0);p(m,_,I,"≗","\\circeq",!0);p(m,_,I,"≜","\\triangleq",!0);p(m,_,I,"∼","\\thicksim");p(m,_,I,"≈","\\thickapprox");p(m,_,I,"⫆","\\supseteqq",!0);p(m,_,I,"⋑","\\Supset",!0);p(m,_,I,"⊐","\\sqsupset",!0);p(m,_,I,"≽","\\succcurlyeq",!0);p(m,_,I,"⋟","\\curlyeqsucc",!0);p(m,_,I,"≿","\\succsim",!0);p(m,_,I,"⪸","\\succapprox",!0);p(m,_,I,"⊳","\\vartriangleright");p(m,_,I,"⊵","\\trianglerighteq");p(m,_,I,"⊩","\\Vdash",!0);p(m,_,I,"∣","\\shortmid");p(m,_,I,"∥","\\shortparallel");p(m,_,I,"≬","\\between",!0);p(m,_,I,"⋔","\\pitchfork",!0);p(m,_,I,"∝","\\varpropto");p(m,_,I,"◀","\\blacktriangleleft");p(m,_,I,"∴","\\therefore",!0);p(m,_,I,"∍","\\backepsilon");p(m,_,I,"▶","\\blacktriangleright");p(m,_,I,"∵","\\because",!0);p(m,_,I,"⋘","\\llless");p(m,_,I,"⋙","\\gggtr");p(m,_,le,"⊲","\\lhd");p(m,_,le,"⊳","\\rhd");p(m,_,I,"≂","\\eqsim",!0);p(m,w,I,"⋈","\\Join");p(m,_,I,"≑","\\Doteq",!0);p(m,_,le,"∔","\\dotplus",!0);p(m,_,le,"∖","\\smallsetminus");p(m,_,le,"⋒","\\Cap",!0);p(m,_,le,"⋓","\\Cup",!0);p(m,_,le,"⩞","\\doublebarwedge",!0);p(m,_,le,"⊟","\\boxminus",!0);p(m,_,le,"⊞","\\boxplus",!0);p(m,_,le,"⋇","\\divideontimes",!0);p(m,_,le,"⋉","\\ltimes",!0);p(m,_,le,"⋊","\\rtimes",!0);p(m,_,le,"⋋","\\leftthreetimes",!0);p(m,_,le,"⋌","\\rightthreetimes",!0);p(m,_,le,"⋏","\\curlywedge",!0);p(m,_,le,"⋎","\\curlyvee",!0);p(m,_,le,"⊝","\\circleddash",!0);p(m,_,le,"⊛","\\circledast",!0);p(m,_,le,"⋅","\\centerdot");p(m,_,le,"⊺","\\intercal",!0);p(m,_,le,"⋒","\\doublecap");p(m,_,le,"⋓","\\doublecup");p(m,_,le,"⊠","\\boxtimes",!0);p(m,_,I,"⇢","\\dashrightarrow",!0);p(m,_,I,"⇠","\\dashleftarrow",!0);p(m,_,I,"⇇","\\leftleftarrows",!0);p(m,_,I,"⇆","\\leftrightarrows",!0);p(m,_,I,"⇚","\\Lleftarrow",!0);p(m,_,I,"↞","\\twoheadleftarrow",!0);p(m,_,I,"↢","\\leftarrowtail",!0);p(m,_,I,"↫","\\looparrowleft",!0);p(m,_,I,"⇋","\\leftrightharpoons",!0);p(m,_,I,"↶","\\curvearrowleft",!0);p(m,_,I,"↺","\\circlearrowleft",!0);p(m,_,I,"↰","\\Lsh",!0);p(m,_,I,"⇈","\\upuparrows",!0);p(m,_,I,"↿","\\upharpoonleft",!0);p(m,_,I,"⇃","\\downharpoonleft",!0);p(m,w,I,"⊶","\\origof",!0);p(m,w,I,"⊷","\\imageof",!0);p(m,_,I,"⊸","\\multimap",!0);p(m,_,I,"↭","\\leftrightsquigarrow",!0);p(m,_,I,"⇉","\\rightrightarrows",!0);p(m,_,I,"⇄","\\rightleftarrows",!0);p(m,_,I,"↠","\\twoheadrightarrow",!0);p(m,_,I,"↣","\\rightarrowtail",!0);p(m,_,I,"↬","\\looparrowright",!0);p(m,_,I,"↷","\\curvearrowright",!0);p(m,_,I,"↻","\\circlearrowright",!0);p(m,_,I,"↱","\\Rsh",!0);p(m,_,I,"⇊","\\downdownarrows",!0);p(m,_,I,"↾","\\upharpoonright",!0);p(m,_,I,"⇂","\\downharpoonright",!0);p(m,_,I,"⇝","\\rightsquigarrow",!0);p(m,_,I,"⇝","\\leadsto");p(m,_,I,"⇛","\\Rrightarrow",!0);p(m,_,I,"↾","\\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,_,M,"∅","\\varnothing");p(m,w,be,"α","\\alpha",!0);p(m,w,be,"β","\\beta",!0);p(m,w,be,"γ","\\gamma",!0);p(m,w,be,"δ","\\delta",!0);p(m,w,be,"ϵ","\\epsilon",!0);p(m,w,be,"ζ","\\zeta",!0);p(m,w,be,"η","\\eta",!0);p(m,w,be,"θ","\\theta",!0);p(m,w,be,"ι","\\iota",!0);p(m,w,be,"κ","\\kappa",!0);p(m,w,be,"λ","\\lambda",!0);p(m,w,be,"μ","\\mu",!0);p(m,w,be,"ν","\\nu",!0);p(m,w,be,"ξ","\\xi",!0);p(m,w,be,"ο","\\omicron",!0);p(m,w,be,"π","\\pi",!0);p(m,w,be,"ρ","\\rho",!0);p(m,w,be,"σ","\\sigma",!0);p(m,w,be,"τ","\\tau",!0);p(m,w,be,"υ","\\upsilon",!0);p(m,w,be,"ϕ","\\phi",!0);p(m,w,be,"χ","\\chi",!0);p(m,w,be,"ψ","\\psi",!0);p(m,w,be,"ω","\\omega",!0);p(m,w,be,"ε","\\varepsilon",!0);p(m,w,be,"ϑ","\\vartheta",!0);p(m,w,be,"ϖ","\\varpi",!0);p(m,w,be,"ϱ","\\varrho",!0);p(m,w,be,"ς","\\varsigma",!0);p(m,w,be,"φ","\\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,I,"=","=");p(m,w,I,":",":");p(m,w,I,"≈","\\approx",!0);p(m,w,I,"≅","\\cong",!0);p(m,w,I,"≥","\\ge");p(m,w,I,"≥","\\geq",!0);p(m,w,I,"←","\\gets");p(m,w,I,">","\\gt",!0);p(m,w,I,"∈","\\in",!0);p(m,w,I,"","\\@not");p(m,w,I,"⊂","\\subset",!0);p(m,w,I,"⊃","\\supset",!0);p(m,w,I,"⊆","\\subseteq",!0);p(m,w,I,"⊇","\\supseteq",!0);p(m,_,I,"⊈","\\nsubseteq",!0);p(m,_,I,"⊉","\\nsupseteq",!0);p(m,w,I,"⊨","\\models");p(m,w,I,"←","\\leftarrow",!0);p(m,w,I,"≤","\\le");p(m,w,I,"≤","\\leq",!0);p(m,w,I,"<","\\lt",!0);p(m,w,I,"→","\\rightarrow",!0);p(m,w,I,"→","\\to");p(m,_,I,"≱","\\ngeq",!0);p(m,_,I,"≰","\\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,_,le,"⊼","\\barwedge",!0);p(m,_,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,_,le,"⊚","\\circledcirc",!0);p(m,_,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,I,"↑","\\uparrow",!0);p(m,w,I,"⇑","\\Uparrow",!0);p(m,w,I,"↓","\\downarrow",!0);p(m,w,I,"⇓","\\Downarrow",!0);p(m,w,I,"↕","\\updownarrow",!0);p(m,w,I,"⇕","\\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,be,"","\\@imath");p(m,w,be,"","\\@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 Z7={"--":!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,_,M,"✠","\\maltese");p(q,_,M,"✠","\\maltese");var Fy='0123456789/@."';for(var id=0;id0)return ln(a,u,i,e,o.concat(c));if(l){var h,d;if(l==="boldsymbol"){var f=HD(a,i,e,o,n);h=f.fontName,d=[f.fontClass]}else s?(h=t$[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(Z7.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},UD=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 zm(a),a},Q7=(t,r,e,n)=>new _l(t,r,e,n),VD=function(r,e,n){var i=gr([r],[],e);return i.height=Math.max(n||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),i.style.borderBottomWidth=te(i.height),i.maxFontSize=1,i},GD=function(r,e,n,i){var a=new Fm(r,e,n,i);return zm(a),a},e$=function(r){var e=new Tl(r);return zm(e),e},KD=function(r,e){return r instanceof Tl?gr([],[r],e):r},YD=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=te(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},t$={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"}},r$={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ZD=function(r,e){var[n,i,a]=r$[r],o=new Ri(n),s=new ri([o],{width:te(i),height:te(a),style:"width:"+te(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=Q7(["overlay"],[s],e);return l.height=a,l.style.height=te(a),l.style.width=te(i),l},N={fontMap:t$,makeSymbol:ln,mathsym:jD,makeSpan:gr,makeSvgSpan:Q7,makeLineSpan:VD,makeAnchor:GD,makeFragment:e$,wrapFragment:KD,makeVList:XD,makeOrd:WD,makeGlue:JD,staticSvg:ZD,svgData:r$,tryCombineChars:UD},vt={number:3,unit:"mu"},ra={number:4,unit:"mu"},Hn={number:5,unit:"mu"},QD={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}},eN={mord:{mop:vt},mop:{mord:vt,mop:vt},mbin:{},mrel:{},mopen:{},mclose:{mop:vt},mpunct:{},minner:{mop:vt}},n$={},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"&&ge.contains(rN,y)?g.classes[0]="mord":y==="mbin"&&ge.contains(tN,b)&&(v.classes[0]="mord")},{node:h},d,f),Hy(a,(v,g)=>{var b=Kv(g),y=Kv(v),$=b&&y?v.hasClass("mtight")?eN[b][y]:QD[b][y]:null;if($)return N.makeGlue($,u)},{node:h},d,f),a},Hy=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()},i$=function(r){return r instanceof Tl||r instanceof Fm||r instanceof _l&&r.hasClass("enclosing")?r:null},aN=function t(r,e){var n=i$(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},Kv=function(r,e){return r?(e&&(r=aN(r,e)),iN[r.classes[0]]||null):null},il=function(r,e){var n=["nulldelimiter"].concat(r.baseSizingClasses());return ni(e.concat(n))},je=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 Y("Got group of unknown type: '"+r.type+"'")};function Au(t,r){var e=ni(["base"],t,r),n=ni(["strut"]);return n.style.height=te(e.height+e.depth),e.depth&&(n.style.verticalAlign=te(-e.depth)),e.children.unshift(n),e}function Yv(t,r){var e=null;t.length===1&&t[0].type==="tag"&&(e=t[0].tag,t=t[0].body);var n=zt(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(zt(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=te(c.height+c.depth),c.depth&&(h.style.verticalAlign=te(-c.depth))}return c}function a$(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 oN{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",te(this.width)),r}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var U={MathNode:Gr,TextNode:js,SpaceNode:oN,newDocumentFragment:a$},en=function(r,e,n){return ut[e][r]&&ut[e][r].replace&&r.charCodeAt(0)!==55349&&!(Z7.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)},Bm=function(r){return r.length===1?r[0]:new U.MathNode("mrow",r)},Lm=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 Rm(a,o,i)?N.fontMap[n].variant:null},Tr=function(r,e,n){if(r.length===1){var i=it(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 Bm(Tr(r,e,n))},it=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 Y("Got group of unknown type: '"+r.type+"'")};function Wy(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 o$=function(r){return new Wn({style:r.displayMode?we.DISPLAY:we.TEXT,maxSize:r.maxSize,minRuleThickness:r.minRuleThickness})},s$=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},sN=function(r,e,n){var i=o$(n),a;if(n.output==="mathml")return Wy(r,e,i,n.displayMode,!0);if(n.output==="html"){var o=Yv(r,i);a=N.makeSpan(["katex"],[o])}else{var s=Wy(r,e,i,n.displayMode,!1),l=Yv(r,i);a=N.makeSpan(["katex"],[s,l])}return s$(a,n)},lN=function(r,e,n){var i=o$(n),a=Yv(r,i),o=N.makeSpan(["katex"],[a]);return s$(o,n)},uN={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":"="},cN=function(r){var e=new U.MathNode("mo",[new U.TextNode(uN[r.replace(/^\\/,"")])]);return e.setAttribute("stretchy","true"),e},hN={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]},dN=function(r){return r.type==="ordgroup"?r.body.length:1},fN=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=dN(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:te(f),viewBox:"0 0 "+s+" "+h,preserveAspectRatio:"none"});return{span:N.makeSvgSpan([],[b],e),minWidth:0,height:f}}else{var y=[],$=hN[l],[k,T,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=te(a)),i},vN=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 Vv({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&u.push(new Vv({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new ri(u,{width:"100%",height:te(s)});o=N.makeSvgSpan([],[c],a)}return o.height=s,o.style.height=te(s),o},ii={encloseSpan:vN,mathMLnode:cN,svgSpan:fN};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 jm(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"||BD.hasOwnProperty(t.type))?t:null}var Hm=(t,r)=>{var e,n,i;t&&t.type==="supsub"?(n=Pe(t.base,"accent"),e=n.base,t.base=e,i=FD(je(t,r)),t.base=n):(n=Pe(t,"accent"),e=n.base);var a=je(e,r.havingCrampedStyle()),o=n.isShifty&&ge.isCharacterBox(e),s=0;if(o){var l=ge.getBaseElem(e),u=je(l,r.havingCrampedStyle());s=Ry(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% - "+te(2*s)+")",marginLeft:te(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=Ry(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=te(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},l$=(t,r)=>{var e=t.isStretchy?ii.mathMLnode(t.label):new U.MathNode("mo",[en(t.label,t.mode)]),n=new U.MathNode("mover",[it(t.base,r),e]);return n.setAttribute("accent","true"),n},pN=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=!pN.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:Hm,mathmlBuilder:l$});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:Hm,mathmlBuilder:l$});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=je(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",[it(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(je(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(je(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(it(t.body,r));if(t.below){var a=Mu(it(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(it(t.below,r));n=new U.MathNode("munder",[e,o])}else n=Mu(),n=new U.MathNode("mover",[e,n]);return n}});var mN=N.makeSpan;function u$(t,r){var e=zt(t.body,r,!0);return mN([t.mclass],e,r)}function c$(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:ge.isCharacterBox(i)}},htmlBuilder:u$,mathmlBuilder:c$});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:ge.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:ge.isCharacterBox(l)}},htmlBuilder:u$,mathmlBuilder:c$});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=zt(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 gN={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},qy=()=>({type:"styling",body:[],mode:"math",style:"display"}),Uy=t=>t.type==="textord"&&t.text==="@",yN=(t,r)=>(t.type==="mathord"||t.type==="atom")&&t.text===r;function bN(t,r,e){var n=gN[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 wN(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 Y("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=bN(u,c,t),g={type:"styling",body:[v],mode:"math",style:"display"};n.push(g),s=qy()}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(je(t.label,e,r),r);return n.classes.push("cd-label-"+t.side),n.style.bottom=te(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,r){var e=new U.MathNode("mrow",[it(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(je(t.fragment,r),r);return e.classes.push("cd-vert-arrow"),e},mathmlBuilder(t,r){return new U.MathNode("mrow",[it(t.fragment,r)])}});se({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 Y("\\@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 h$=(t,r)=>{var e=zt(t.body,r.withColor(t.color),!1);return N.makeFragment(e)},d$=(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=Pe(r[0],"color-token").color,i=r[1];return{type:"color",mode:e.mode,color:n,body:_t(i)}},htmlBuilder:h$,mathmlBuilder:d$});se({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:h$,mathmlBuilder:d$});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&&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=te(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",te(pt(t.size,r)))),e}});var Xv={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},f$=t=>{var r=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new Y("Expected a control sequence",t);return r},$N=t=>{var r=t.gullet.popToken();return r.text==="="&&(r=t.gullet.popToken(),r.text===" "&&(r=t.gullet.popToken())),r},v$=(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(Xv[n.text])return(e==="\\global"||e==="\\\\globallong")&&(n.text=Xv[n.text]),Pe(r.parseFunction(),"internal");throw new Y("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 Y("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 Y('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new Y('Argument number "'+n.text+'" out of order');a++,s.push([])}else{if(n.text==="EOF")throw new Y("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===Xv[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=f$(r.gullet.popToken());r.gullet.consumeSpaces();var i=$N(r);return v$(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=f$(r.gullet.popToken()),i=r.gullet.popToken(),a=r.gullet.popToken();return v$(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=Rm(i||r,e,n);if(!a)throw new Error("Unsupported symbol "+r+" and font size "+e+".");return a},Wm=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},p$=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=te(a),r.height-=a,r.depth+=a},xN=function(r,e,n,i,a,o){var s=N.makeSymbol(r,"Main-Regular",a,i),l=Wm(s,e,i,o);return n&&p$(l,i,e),l},kN=function(r,e,n,i){return N.makeSymbol(r,"Size"+e+"-Regular",n,i)},m$=function(r,e,n,i,a,o){var s=kN(r,e,a,i),l=Wm(N.makeSpan(["delimsizing","size"+e],[s],i),we.TEXT,i,o);return n&&p$(l,i,we.TEXT),l},ld=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}},ud=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",ID(r,Math.round(1e3*e))),o=new ri([a],{width:te(i),height:te(e),style:"width:"+te(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"}),s=N.makeSvgSpan([],[o],n);return s.height=e,s.style.height=te(e),s.style.width=te(i),{type:"elem",elem:s}},Jv=.008,Du={type:"kern",size:-1*Jv},SN=["|","\\lvert","\\rvert","\\vert"],EN=["\\|","\\lVert","\\rVert","\\Vert"],g$=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(SN,r)?(u="∣",h="vert",d=333):ge.contains(EN,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,T=0,P=1;if(l!==null){var E=Ds(l,f,a);T=E.height+E.depth,P=2}var D=g+k+T,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 Z=R-g-k,ie=Math.round(R*1e3),oe=CD(h,Math.round(Z*1e3)),me=new Ri(h,oe),Oe=(d/1e3).toFixed(3)+"em",ze=(ie/1e3).toFixed(3)+"em",He=new ri([me],{width:Oe,height:ze,viewBox:"0 0 "+d+" "+ie}),C=N.makeSvgSpan([],[He],i);C.height=ie/1e3,C.style.width=Oe,C.style.height=ze,L.push({type:"elem",elem:C})}else{if(L.push(ld(c,f,a)),L.push(Du),l===null){var Me=R-g-k+2*Jv;L.push(ud(u,Me,i))}else{var V=(R-g-k-T)/2+2*Jv;L.push(ud(u,V,i)),L.push(Du),L.push(ld(l,f,a)),L.push(Du),L.push(ud(u,V,i))}L.push(Du),L.push(ld(s,f,a))}var S=i.havingBaseStyle(we.TEXT),pe=N.makeVList({positionType:"bottom",positionData:z,children:L},S);return Wm(N.makeSpan(["delimsizing","mult"],[pe],S),we.TEXT,i,o)},cd=80,hd=.08,dd=function(r,e,n,i,a){var o=OD(r,i,n),s=new Ri(r,o),l=new ri([s],{width:"400em",height:te(e),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return N.makeSvgSpan(["hide-tail"],[l],a)},TN=function(r,e){var n=e.havingBaseSizing(),i=$$("\\surd",r*n.sizeMultiplier,w$,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+cd,r<1?a=1:r<1.4&&(a=.7),l=(1+o+hd)/a,u=(1+o)/a,s=dd("sqrtMain",l,c,o,e),s.style.minWidth="0.853em",h=.833/a):i.type==="large"?(c=(1e3+cd)*Hs[i.size],u=(Hs[i.size]+o)/a,l=(Hs[i.size]+o+hd)/a,s=dd("sqrtSize"+i.size,l,c,o,e),s.style.minWidth="1.02em",h=1/a):(l=r+o+hd,u=r+o,c=Math.floor(1e3*r+o)+cd,s=dd("sqrtTall",l,c,o,e),s.style.minWidth="0.742em",h=1.056),s.height=u,s.style.height=te(l),{span:s,advanceWidth:h,ruleWidth:(e.fontMetrics().sqrtRuleThickness+o)*a}},y$=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],_N=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],b$=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Hs=[0,1.2,1.8,2.4,3],ON=function(r,e,n,i,a){if(r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle"),ge.contains(y$,r)||ge.contains(b$,r))return m$(r,e,!1,n,i,a);if(ge.contains(_N,r))return g$(r,Hs[e],!1,n,i,a);throw new Y("Illegal delimiter: '"+r+"'")},IN=[{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}],CN=[{type:"small",style:we.SCRIPTSCRIPT},{type:"small",style:we.SCRIPT},{type:"small",style:we.TEXT},{type:"stack"}],w$=[{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"}],PN=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.")},$$=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]},x$=function(r,e,n,i,a,o){r==="<"||r==="\\lt"||r==="⟨"?r="\\langle":(r===">"||r==="\\gt"||r==="⟩")&&(r="\\rangle");var s;ge.contains(b$,r)?s=IN:ge.contains(y$,r)?s=w$:s=CN;var l=$$(r,e,s,i);return l.type==="small"?xN(r,l.style,n,i,a,o):l.type==="large"?m$(r,l.size,n,i,a,o):g$(r,e,n,i,a,o)},AN=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 x$(r,h,!0,i,a,o)},Vn={sqrtImage:TN,sizedDelim:ON,sizeToMaxHeight:Hs,customSizedDelim:x$,leftRightDelim:AN},Vy={"\\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}},MN=["(","\\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(MN,e.text))return e;throw e?new Y("Invalid delimiter '"+e.text+"' after '"+r.funcName+"'",t):new Y("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:Vy[t.funcName].size,mclass:Vy[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=te(Vn.sizeToMaxHeight[t.size]);return e.setAttribute("minsize",n),e.setAttribute("maxsize",n),e}});function Gy(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 Y("\\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=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)=>{Gy(t);for(var e=zt(t.body,r,!0,["mopen","mclose"]),n=0,i=0,a=!1,o=0;o{Gy(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 Bm(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 Y("\\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 qm=(t,r)=>{var e=N.wrapFragment(je(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=te(h/2+l);var d=Math.floor(1e3*h*i),f=TD(d),v=new ri([new Ri("phase",f)],{width:"400em",height:te(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});a=N.makeSvgSpan(["hide-tail"],[v],r),a.style.height=te(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=te(y)):n==="angl"&&y!==.049&&(a.style.borderTopWidth=te(y),a.style.borderRightWidth=te(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)},Um=(t,r)=>{var e=0,n=new U.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[it(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=Pe(r[0],"color-token").color,o=r[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:qm,mathmlBuilder:Um});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=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:qm,mathmlBuilder:Um});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:qm,mathmlBuilder:Um});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 k$={};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 Y("{"+t.envName+"} can be used only in display mode.")};function Vm(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 Y("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(){$&&(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(Ky(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 Y("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"){T(),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[Qt]})}for(T(o[0]),n=0;n0&&(z+=$,Dfr))for(n=0;n=s)){var We=void 0;(i>0||r.hskipBeforeAndAfter)&&(We=ge.deflt(V.pregap,d),We!==0&&(oe=N.makeSpan(["arraycolsep"],[]),oe.style.width=te(We),ie.push(oe)));var Le=[];for(n=0;n0){for(var he=N.makeLineSpan("hline",e,c),_e=N.makeLineSpan("hdashline",e,c),ye=[{type:"elem",elem:l,shift:0}];u.length>0;){var et=u.pop(),Et=et.pos-L;et.isDashed?ye.push({type:"elem",elem:_e,shift:Et}):ye.push({type:"elem",elem:he,shift:Et})}l=N.makeVList({positionType:"individualShift",children:ye},e)}if(Oe.length===0)return N.makeSpan(["mord"],[l],e);var Tt=N.makeVList({positionType:"individualShift",children:Oe},e);return Tt=N.makeSpan(["tag"],[Tt],e),N.makeFragment([l,Tt])},DN={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+=DN[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 T=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:Vm(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]]:Pe(r[0],"ordgroup").body,i=n.map(function(o){var s=jm(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 Y("Unknown column alignment: "+l,o)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Wi(t.parser,a,Gm(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 Y("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,Gm(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=jm(o),l=s.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new Y("Unknown column alignment: "+l,o)});if(i.length>1)throw new Y("{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 Y("{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,Gm(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:E$,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:Vm(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:E$,htmlBuilder:Dn,mathmlBuilder:Nn});Mn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){Rh(t);var r={autoTag:Vm(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),wN(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 Y(t.funcName+" valid only within array environment")}});var Yy=k$;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 Y("Invalid environment name",i);for(var a="",o=0;o{var e=t.font,n=r.withFont(e);return je(t.body,n)},_$=(t,r)=>{var e=t.font,n=r.withFont(e);return it(t.body,n)},Xy={"\\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 Xy&&(a=Xy[a]),{type:"font",mode:e.mode,font:a.slice(1),body:i}},htmlBuilder:T$,mathmlBuilder:_$});se({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}}});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:T$,mathmlBuilder:_$});var O$=(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},Km=(t,r)=>{var e=O$(t.size,r.style),n=e.fracNum(),i=e.fracDen(),a;a=r.havingStyle(n);var o=je(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",[it(t.numer,r),it(t.denom,r)]);if(!t.hasBarLine)e.setAttribute("linethickness","0px");else if(t.barSize){var n=pt(t.barSize,r);e.setAttribute("linethickness",te(n))}var i=O$(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 Bm(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:Km,mathmlBuilder:Ym});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 Jy=["display","text","script","scriptscript"],Zy=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"?Zy(a.text):null,s=Zc(r[1]),l=s.type==="atom"&&s.family==="close"?Zy(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=Jy[Number(v.text)]}}else f=Pe(f,"textord"),d=Jy[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:Km,mathmlBuilder:Ym});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:Pe(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=hD(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:Km,mathmlBuilder:Ym});var I$=(t,r)=>{var e=r.style,n,i;t.type==="supsub"?(n=t.sup?je(t.sup,r.havingStyle(e.sup()),r):je(t.sub,r.havingStyle(e.sub()),r),i=Pe(t.base,"horizBrace")):i=Pe(t,"horizBrace");var a=je(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)},NN=(t,r)=>{var e=ii.mathMLnode(t.label);return new U.MathNode(t.isOver?"mover":"munder",[it(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:I$,mathmlBuilder:NN});se({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=zt(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=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=zt(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=zt(t.html,r,!1);return N.makeFragment(e)},mathmlBuilder:(t,r)=>Fi(t.mathml,r)});var fd=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 Y("Invalid size: '"+r+"' in \\includegraphics");var n={number:+(e[1]+e[2]),unit:e[3]};if(!K7(n))throw new Y("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=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:te(e+n)};i>0&&(a.width=te(i)),n>0&&(a.verticalAlign=te(-n));var o=new ND(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",te(-i))),e.setAttribute("height",te(n+i)),t.width.number>0){var a=pt(t.width,r);e.setAttribute("width",te(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=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)}});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([],[je(t.body,r)]),e=N.makeSpan(["inner"],[e],r)):e=N.makeSpan(["inner"],[je(t.body,r)]);var n=N.makeSpan(["fix"],[]),i=N.makeSpan([t.alignment],[e,n],r),a=N.makeSpan(["strut"]);return a.style.height=te(i.height+i.depth),i.depth&&(a.style.verticalAlign=te(-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",[it(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 Y("Mismatched "+t.funcName)}});var Qy=(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}};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=Qy(t,r),n=zt(e,r,!1);return N.makeFragment(n)},mathmlBuilder:(t,r)=>{var e=Qy(t,r);return Fi(e,r)}});var C$=(t,r,e,n,i,a,o)=>{t=N.makeSpan([],[t]);var s=e&&ge.isCharacterBox(e),l,u;if(r){var c=je(r,n.havingStyle(i.sup()),n);u={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}}if(e){var h=je(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:te(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:te(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:te(-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:te(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=te(a),b.unshift(y)}return N.makeSpan(["mop","op-limits"],b,n)},P$=["\\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(P$,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=zt(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)]),ge.contains(P$,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=a$([e,n])}return e},RN={"∏":"\\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=RN[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 FN={"∫":"\\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=FN[n]),{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Ko,mathmlBuilder:Ol});var A$=(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=zt(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:A$,mathmlBuilder:zN});x("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Aa({type:"ordgroup",htmlBuilder(t,r){return t.semisimple?N.makeFragment(zt(t.body,r,!1)):N.makeSpan(["mord"],zt(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=je(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",[it(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=zt(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([],[je(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"],[je(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=Pe(r[0],"size").value,i=r[1];return{type:"raisebox",mode:e.mode,dy:n,body:i}},htmlBuilder(t,r){var e=je(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",[it(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=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=te(n),e.style.borderTopWidth=te(i),e.style.bottom=te(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",te(e)),o.setAttribute("height",te(n));var s=new U.MathNode("mpadded",[o]);return i>=0?s.setAttribute("height",te(i)):(s.setAttribute("height",te(i)),s.setAttribute("depth",te(-i))),s.setAttribute("voffset",te(i)),s}});function M$(t,r,e){for(var n=zt(t,r,!1),i=r.sizeMultiplier/e.sizeMultiplier,a=0;a{var e=r.havingSize(t.size);return M$(t.body,e,r)};se({type:"sizing",names:eb,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:eb.indexOf(n)+1,body:a}},htmlBuilder:BN,mathmlBuilder:(t,r)=>{var e=r.havingSize(t.size),n=Tr(t.body,e),i=new U.MathNode("mstyle",n);return i.setAttribute("mathsize",te(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]&&Pe(e[0],"ordgroup");if(o)for(var s="",l=0;l{var e=N.makeSpan([],[je(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",[it(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=je(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=te(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),g=je(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",[it(e,r),it(n,r)]):new U.MathNode("msqrt",[it(e,r)])}});var tb={display:we.DISPLAY,text:we.TEXT,script:we.SCRIPT,scriptscript:we.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=tb[t.style],n=r.havingStyle(e).withFont("");return M$(t.body,n,r)},mathmlBuilder(t,r){var e=tb[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 LN=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?A$:null}else{if(n.type==="accent")return ge.isCharacterBox(n.base)?Hm:null;if(n.type==="horizBrace"){var o=!r.sub;return o===n.isOver?I$:null}else return null}else return null};Aa({type:"supsub",htmlBuilder(t,r){var e=LN(t,r);if(e)return e(t,r);var{base:n,sup:i,sub:a}=t,o=je(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=je(i,f,r),d||(c=o.height-f.fontMetrics().supDrop*f.sizeMultiplier/r.sizeMultiplier)}if(a){var v=r.havingStyle(r.style.sub());l=je(a,v,r),d||(h=o.depth+v.fontMetrics().subDrop*v.sizeMultiplier/r.sizeMultiplier)}var g;r.style===we.DISPLAY?g=u.sup1:r.style.cramped?g=u.sup3:g=u.sup2;var b=r.sizeMultiplier,y=te(.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)&&($=te(-o.italic))}var T;if(s&&l){c=Math.max(c,g,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}];T=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}];T=N.makeVList({positionType:"shift",positionData:h,children:R},r)}else if(s)c=Math.max(c,g,s.depth+.25*u.xHeight),T=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=Kv(o,"right")||"mord";return N.makeSpan([A],[o,N.makeSpan(["msupsub"],[T])],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=[it(t.base,r)];t.sub&&a.push(it(t.sub,r)),t.sup&&a.push(it(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=Lm(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 D$={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=Lm(t,r)||"italic";return n!==D$[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=Lm(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!==D$[i.type]&&i.setAttribute("mathvariant",n),i}});var vd={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},pd={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Aa({type:"spacing",htmlBuilder(t,r){if(pd.hasOwnProperty(t.text)){var e=pd[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(vd.hasOwnProperty(t.text))return N.makeSpan(["mspace",vd[t.text]],[],r);throw new Y('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,r){var e;if(pd.hasOwnProperty(t.text))e=new U.MathNode("mtext",[new U.TextNode(" ")]);else{if(vd.hasOwnProperty(t.text))return new U.MathNode("mspace");throw new Y('Unknown type of space "'+t.text+'"')}return e}});var rb=()=>{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",[rb(),new U.MathNode("mtd",[Fi(t.body,r)]),rb(),new U.MathNode("mtd",[Fi(t.tag,r)])])]);return e.setAttribute("width","100%"),e}});var nb={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},ib={"\\textbf":"textbf","\\textmd":"textmd"},jN={"\\textit":"textit","\\textup":"textup"},ab=(t,r)=>{var e=t.font;if(e){if(nb[e])return r.withTextFontFamily(nb[e]);if(ib[e])return r.withTextFontWeight(ib[e]);if(e==="\\emph")return r.fontShape==="textit"?r.withTextFontShape("textup"):r.withTextFontShape("textit")}else return r;return r.withTextFontShape(jN[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=ab(t,r),n=zt(t.body,e,!0);return N.makeSpan(["mord","text"],n,e)},mathmlBuilder(t,r){var e=ab(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=je(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",[it(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=je(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",[it(t.body,r)],["vcenter"])}});se({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,r,e){throw new Y("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,r){for(var e=ob(t),n=[],i=r.havingStyle(r.style.text()),a=0;at.body.replace(/ /g,t.star?"␣":" "),ki=n$,N$=`[ \r - ]`,HN="\\\\[a-zA-Z@]+",WN="\\\\[^\uD800-\uDFFF]",qN="("+HN+")"+N$+"*",UN=`\\\\( -|[ \r ]+ -?)[ \r ]*`,Zv="[̀-ͯ]",VN=new RegExp(Zv+"+$"),GN="("+N$+"+)|"+(UN+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(Zv+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Zv+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+qN)+("|"+WN+")");class sb{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(GN,"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 Y("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 KN{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 Y("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 YN=S$;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 lb={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 Y("\\char` missing argument");n=r.text.charCodeAt(0)}else e=10;if(e){if(n=lb[r.text],n==null||n>=e)throw new Y("Invalid base-"+e+" digit "+r.text);for(var i;(i=lb[t.future().text])!=null&&i{var n=t.consumeArg().tokens;if(n.length!==1)throw new Y("\\newcommand's first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!r)throw new Y("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!e)throw new Y("\\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 Y("Invalid number of arguments: "+s);o=parseInt(s),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:o}),""};x("\\newcommand",t=>Xm(t,!1,!0));x("\\renewcommand",t=>Xm(t,!0,!1));x("\\providecommand",t=>Xm(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 ub={",":"\\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 ub?r=ub[e]:(e.slice(0,4)==="\\not"||e in ut.math&&ge.contains(["bin","rel"],ut.math[e].group))&&(r="\\dotsb"),r});var Jm={")":!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 Jm?"\\ldots\\,":"\\ldots"});x("\\dotsc",function(t){var r=t.future().text;return r in Jm&&r!==","?"\\ldots\\,":"\\ldots"});x("\\cdots",function(t){var r=t.future().text;return r in Jm?"\\@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 Y("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 R$=te(En["Main-Regular"][84][1]-.7*En["Main-Regular"][65][1]);x("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+R$+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");x("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+R$+"}{\\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 F$=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",F$(!1));x("\\bra@set",F$(!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 z$={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class XN{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 KN(YN,e.macros),this.mode=n,this.stack=[]}feed(r){this.lexer=new sb(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 Y("Extra }",a)}else if(a.text==="EOF")throw new Y("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 Y("The length of delimiters doesn't match the number of args!");for(var n=e[0],i=0;ithis.settings.maxExpand)throw new Y("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 Y("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 Y("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 Y("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 sb(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)||z$.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 cb=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),md={"́":{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"}},hb={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};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 XN(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 Y("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(zD.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&&(G7(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 U$(t,r,e){return t.type==="element"?ER(t,r,e):t.type==="text"?e.whitespace==="normal"?V$(t,e):TR(t):[]}function ER(t,r,e){const n=G$(t,e),i=t.children||[];let a=-1,o=[];if(kR(t))return o;let s,l;for(tp(t)||wb(t)&&mb(r,t,wb)?l=` -`:xR(t)?(s=2,l=2):q$(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 yd({content:t,name:r="Assistant",format:e,onOptionClick:n,extComponent:i}){const a=qe.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 O.jsxs("div",{className:"space-y-3",children:[e==="markdown"&&u.text?O.jsx("div",{ref:a,children:O.jsx(zP,{rehypePlugins:[[LR,{target:"_blank"}],MR],remarkPlugins:[GM,tR],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 - prose-h3:text-xs - prose-h4:text-xs - prose-p:text-xs - prose-ul:text-xs - prose-ol:text-xs - prose-li:text-xs - prose-code:text-xs - prose-pre:text-xs`,components:{p:({children:h})=>O.jsx("p",{className:"!my-0.5 leading-relaxed text-xs",children:h}),h1:({children:h})=>O.jsx("h1",{className:"text-base font-semibold !my-1",children:h}),h2:({children:h})=>O.jsx("h2",{className:"text-sm font-semibold !my-1",children:h}),h3:({children:h})=>O.jsx("h3",{className:"text-xs font-semibold !my-1",children:h}),h4:({children:h})=>O.jsx("h4",{className:"text-xs font-semibold !my-1",children:h}),table:({children:h})=>O.jsx("table",{className:"border-solid border border-[#979797] w-[100%] text-xs",children:h}),th:({children:h})=>O.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(O.jsx("br",{})):d.push(h[v]);h=d}return O.jsx("td",{className:"border-solid border border-[#979797] text-center text-xs",children:h})},code:({children:h})=>O.jsx("code",{className:"text-xs bg-gray-100 rounded px-1",children:h}),pre:({children:h})=>O.jsx("pre",{className:"text-xs bg-gray-100 rounded p-2 overflow-x-auto",children:h}),img:({node:h,...d})=>O.jsx("div",{className:"w-1/2 mx-auto",children:O.jsx("img",{...d,loading:"lazy",className:"w-full h-auto block",onError:f=>{console.warn("Image failed to load:",d.src,"Error:",f),f.currentTarget.style.opacity="0"}})})},children:u.text})}):u.text?O.jsx("p",{className:"whitespace-pre-wrap text-left",children:u.text}):null,c.length>0&&O.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:c.map((h,d)=>O.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 O.jsx("p",{className:"whitespace-pre-wrap text-left",children:t})}};return O.jsx(mm,{name:r,children:O.jsx("div",{className:"w-full rounded-lg bg-gray-50 p-4 text-gray-700 text-sm break-words overflow-hidden",children:o()})})}function jR({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)=>{Ft.loadGraphData(d);for(const[g,b,y,$,k]of f){const T=Ft.graph._nodes_by_id[g].widgets;for(const P of T)P.name===$&&(P.value=k)}Ft.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 O.jsx("div",{className:"space-y-3",children:s.length>0&&O.jsx("div",{className:"flex flex-col space-y-4",children:s.map((d,f)=>O.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg border border-gray-200 hover:bg-gray-50",children:[d.image&&O.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"}}),O.jsxs("div",{className:"flex-1 break-words flex flex-col h-[4.5rem] justify-between",children:[O.jsx("div",{children:O.jsx("h3",{className:"font-medium text-sm line-clamp-2 h-10 overflow-hidden",children:d.name})}),O.jsxs("div",{className:"flex justify-between items-center mt-1",children:[d.description&&O.jsxs("div",{className:"relative group",children:[O.jsx("div",{className:"w-5 h-5 flex items-center justify-center text-gray-500 cursor-help",children:O.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:O.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"})})}),O.jsx("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block",children:O.jsx("div",{className:"bg-gray-900 text-white text-xs rounded-md py-1 px-2 max-w-xs",children:d.description})})]}),O.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))})})}const HR=LiteGraph;function zh(t,r={}){const e=HR.createNode(t,"",r);return Ft.graph.add(e),e}function WR({content:t,name:r="Assistant",avatar:e,installedNodes:n}){var d,f;const i=JSON.parse(t),[a,o]=qe.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 O.jsxs("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[u.length>0&&O.jsxs("div",{className:"space-y-3",children:[O.jsx("p",{className:"text-xs font-medium",children:"Installed nodes:"}),O.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:u.map(v=>O.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:[O.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:v.name}),O.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[O.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[O.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:O.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"})}),O.jsx("span",{children:h(v.github_stars||0)})]}),O.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=zh(v.name);g&&g.connect(v.from_index,g,v.to_index)},children:[O.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add to Canvas"]})]}),a===v.name&&v.description&&O.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,O.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&&O.jsxs("div",{className:`space-y-3 ${u.length>0?"mt-4":""}`,children:[O.jsx("p",{className:"text-xs font-medium",children:"Uninstalled nodes:"}),O.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:c.map(v=>O.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:[O.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:v.name}),O.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[O.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[O.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:O.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"})}),O.jsx("span",{children:h(v.github_stars||0)})]}),O.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:[O.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.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&&O.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,O.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 - border-4 border-transparent border-t-gray-800`})]})]},v.name))})]})]})}function qR({content:t,name:r="Assistant",avatar:e,installedNodes:n}){var u,c,h;const i=JSON.parse(t),[a,o]=qe.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 O.jsxs("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[s.length>0&&O.jsxs("div",{className:"space-y-3",children:[O.jsx("p",{className:"text-xs",children:"Recommended downstream nodes that can be connected:"}),O.jsx("div",{className:"flex flex-wrap gap-2",children:s.map(d=>{const f=l(d.name);return O.jsxs("div",{className:"relative group",children:[f?O.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=zh(d.name);if(v){const g=Object.values(Ft.canvas.selected_nodes)[0];g&&g.connect(d.from_index,v,d.to_index)}},onMouseEnter:()=>o(d.name),onMouseLeave:()=>o(null),children:d.name}):O.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&&O.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:[d.description,O.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 - border-4 border-transparent border-t-gray-800`})]})]},d.name)})})]}),((h=i.node_info)==null?void 0:h.missing_nodes)&&i.node_info.missing_nodes.length>0&&O.jsxs("div",{className:"space-y-3 mt-4",children:[O.jsx("p",{children:"Other recommended nodes (requires installation):"}),O.jsx("div",{className:"flex flex-wrap gap-2",children:i.node_info.missing_nodes.map(d=>O.jsxs("div",{className:"relative group",children:[O.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&&O.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:[d.description,O.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 - border-4 border-transparent border-t-gray-800`})]})]},d.name))})]})]})}/** - * vis-data - * http://visjs.org/ - * - * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data. - * - * @version 7.1.9 - * @date 2023-11-24T17:53:34.179Z - * - * @copyright (c) 2011-2017 Almende B.V, http://almende.com - * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs - * - * @license - * vis.js is dual licensed under both - * - * 1. The Apache 2.0 License - * http://www.apache.org/licenses/LICENSE-2.0 - * - * and - * - * 2. The MIT License - * http://opensource.org/licenses/MIT - * - * vis.js may be distributed under either license. - */function Bh(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var bd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ee(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var K$={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 bd=="object"&&bd)||function(){return this}()||bd||Function("return this")(),Xe=function(t){try{return!!t()}catch{return!0}},UR=Xe,Il=!UR(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),VR=Il,Y$=Function.prototype,$b=Y$.apply,xb=Y$.call,Yo=typeof Reflect=="object"&&Reflect.apply||(VR?xb.bind($b):function(){return xb.apply($b,arguments)}),X$=Il,J$=Function.prototype,rp=J$.call,GR=X$&&J$.bind.bind(rp,rp),ct=X$?GR:function(t){return function(){return rp.apply(t,arguments)}},Z$=ct,KR=Z$({}.toString),YR=Z$("".slice),Ui=function(t){return YR(KR(t),8,-1)},XR=Ui,JR=ct,Q$=function(t){if(XR(t)==="Function")return JR(t)},np=typeof document=="object"&&document.all,ZR=typeof np>"u"&&np!==void 0,e8={all:np,IS_HTMLDDA:ZR},t8=e8,QR=t8.all,wt=t8.IS_HTMLDDA?function(t){return typeof t=="function"||t===QR}:function(t){return typeof t=="function"},Ma={},eF=Xe,Ht=!eF(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),tF=Il,Fu=Function.prototype.call,Wt=tF?Fu.bind(Fu):function(){return Fu.apply(Fu,arguments)},Lh={},r8={}.propertyIsEnumerable,n8=Object.getOwnPropertyDescriptor,rF=n8&&!r8.call({1:2},1);Lh.f=rF?function(r){var e=n8(this,r);return!!e&&e.enumerable}:r8;var Da=function(t,r){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:r}},nF=ct,iF=Xe,aF=Ui,wd=Object,oF=nF("".split),jh=iF(function(){return!wd("z").propertyIsEnumerable(0)})?function(t){return aF(t)==="String"?oF(t,""):wd(t)}:wd,Xo=function(t){return t==null},sF=Xo,lF=TypeError,t1=function(t){if(sF(t))throw new lF("Can't call method on "+t);return t},uF=jh,cF=t1,Rn=function(t){return uF(cF(t))},kb=wt,i8=e8,hF=i8.all,Zt=i8.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:kb(t)||t===hF}:function(t){return typeof t=="object"?t!==null:kb(t)},ft={},$d=ft,xd=dt,dF=wt,Sb=function(t){return dF(t)?t:void 0},dr=function(t,r){return arguments.length<2?Sb($d[t])||Sb(xd[t]):$d[t]&&$d[t][r]||xd[t]&&xd[t][r]},fF=ct,Nt=fF({}.isPrototypeOf),Vi=typeof navigator<"u"&&String(navigator.userAgent)||"",a8=dt,kd=Vi,Eb=a8.process,Tb=a8.Deno,_b=Eb&&Eb.versions||Tb&&Tb.version,Ob=_b&&_b.v8,un,Qc;Ob&&(un=Ob.split("."),Qc=un[0]>0&&un[0]<4?1:+(un[0]+un[1]));!Qc&&kd&&(un=kd.match(/Edge\/(\d+)/),(!un||un[1]>=74)&&(un=kd.match(/Chrome\/(\d+)/),un&&(Qc=+un[1])));var Jo=Qc,Ib=Jo,vF=Xe,pF=dt,mF=pF.String,Zo=!!Object.getOwnPropertySymbols&&!vF(function(){var t=Symbol("symbol detection");return!mF(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Ib&&Ib<41}),gF=Zo,o8=gF&&!Symbol.sham&&typeof Symbol.iterator=="symbol",yF=dr,bF=wt,wF=Nt,$F=o8,xF=Object,Cl=$F?function(t){return typeof t=="symbol"}:function(t){var r=yF("Symbol");return bF(r)&&wF(r.prototype,xF(t))},kF=String,Qo=function(t){try{return kF(t)}catch{return"Object"}},SF=wt,EF=Qo,TF=TypeError,_r=function(t){if(SF(t))return t;throw new TF(EF(t)+" is not a function")},_F=_r,OF=Xo,r1=function(t,r){var e=t[r];return OF(e)?void 0:_F(e)},Sd=Wt,Ed=wt,Td=Zt,IF=TypeError,CF=function(t,r){var e,n;if(r==="string"&&Ed(e=t.toString)&&!Td(n=Sd(e,t))||Ed(e=t.valueOf)&&!Td(n=Sd(e,t))||r!=="string"&&Ed(e=t.toString)&&!Td(n=Sd(e,t)))return n;throw new IF("Can't convert object to primitive value")},s8={exports:{}},PF=!0,Cb=dt,AF=Object.defineProperty,MF=function(t,r){try{AF(Cb,t,{value:r,configurable:!0,writable:!0})}catch{Cb[t]=r}return r},DF=dt,NF=MF,Pb="__core-js_shared__",RF=DF[Pb]||NF(Pb,{}),n1=RF,Ab=n1;(s8.exports=function(t,r){return Ab[t]||(Ab[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=s8.exports,FF=t1,zF=Object,Or=function(t){return zF(FF(t))},BF=ct,LF=Or,jF=BF({}.hasOwnProperty),Rt=Object.hasOwn||function(r,e){return jF(LF(r),e)},HF=ct,WF=0,qF=Math.random(),UF=HF(1 .toString),Hh=function(t){return"Symbol("+(t===void 0?"":t)+")_"+UF(++WF+qF,36)},VF=dt,GF=es,Mb=Rt,KF=Hh,YF=Zo,XF=o8,co=VF.Symbol,_d=GF("wks"),JF=XF?co.for||co:co&&co.withoutSetter||KF,mt=function(t){return Mb(_d,t)||(_d[t]=YF&&Mb(co,t)?co[t]:JF("Symbol."+t)),_d[t]},ZF=Wt,Db=Zt,Nb=Cl,QF=r1,ez=CF,tz=mt,rz=TypeError,nz=tz("toPrimitive"),iz=function(t,r){if(!Db(t)||Nb(t))return t;var e=QF(t,nz),n;if(e){if(r===void 0&&(r="default"),n=ZF(e,t,r),!Db(n)||Nb(n))return n;throw new rz("Can't convert object to primitive value")}return r===void 0&&(r="number"),ez(t,r)},az=iz,oz=Cl,Wh=function(t){var r=az(t,"string");return oz(r)?r:r+""},sz=dt,Rb=Zt,ip=sz.document,lz=Rb(ip)&&Rb(ip.createElement),i1=function(t){return lz?ip.createElement(t):{}},uz=Ht,cz=Xe,hz=i1,l8=!uz&&!cz(function(){return Object.defineProperty(hz("div"),"a",{get:function(){return 7}}).a!==7}),dz=Ht,fz=Wt,vz=Lh,pz=Da,mz=Rn,gz=Wh,yz=Rt,bz=l8,Fb=Object.getOwnPropertyDescriptor;Ma.f=dz?Fb:function(r,e){if(r=mz(r),e=gz(e),bz)try{return Fb(r,e)}catch{}if(yz(r,e))return pz(!fz(vz.f,r,e),r[e])};var wz=Xe,$z=wt,xz=/#|\.prototype\./,Pl=function(t,r){var e=Sz[kz(t)];return e===Tz?!0:e===Ez?!1:$z(r)?wz(r):!!r},kz=Pl.normalize=function(t){return String(t).replace(xz,".").toLowerCase()},Sz=Pl.data={},Ez=Pl.NATIVE="N",Tz=Pl.POLYFILL="P",u8=Pl,zb=Q$,_z=_r,Oz=Il,Iz=zb(zb.bind),Gi=function(t,r){return _z(t),r===void 0?t:Oz?Iz(t,r):function(){return t.apply(r,arguments)}},Ir={},Cz=Ht,Pz=Xe,c8=Cz&&Pz(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Az=Zt,Mz=String,Dz=TypeError,Br=function(t){if(Az(t))return t;throw new Dz(Mz(t)+" is not an object")},Nz=Ht,Rz=l8,Fz=c8,zu=Br,Bb=Wh,zz=TypeError,Od=Object.defineProperty,Bz=Object.getOwnPropertyDescriptor,Id="enumerable",Cd="configurable",Pd="writable";Ir.f=Nz?Fz?function(r,e,n){if(zu(r),e=Bb(e),zu(n),typeof r=="function"&&e==="prototype"&&"value"in n&&Pd in n&&!n[Pd]){var i=Bz(r,e);i&&i[Pd]&&(r[e]=n.value,n={configurable:Cd in n?n[Cd]:i[Cd],enumerable:Id in n?n[Id]:i[Id],writable:!1})}return Od(r,e,n)}:Od:function(r,e,n){if(zu(r),e=Bb(e),zu(n),Rz)try{return Od(r,e,n)}catch{}if("get"in n||"set"in n)throw new zz("Accessors not supported");return"value"in n&&(r[e]=n.value),r};var Lz=Ht,jz=Ir,Hz=Da,hi=Lz?function(t,r,e){return jz.f(t,r,Hz(1,e))}:function(t,r,e){return t[r]=e,t},Bu=dt,Wz=Yo,qz=Q$,Uz=wt,Vz=Ma.f,Gz=u8,Ja=ft,Kz=Gi,Za=hi,Lb=Rt,Yz=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 Wz(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,g,b,y;for(d in r)u=Gz(n?d:e+(i?".":"#")+d,t.forced),c=!u&&o&&Lb(o,d),v=s[d],c&&(t.dontCallGetSet?(y=Vz(o,d),g=y&&y.value):g=o[d]),f=c&&g?g:r[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=Kz(f,Bu):t.wrap&&c?b=Yz(f):a&&Uz(f)?b=qz(f):b=f,(t.sham||f&&f.sham||v&&v.sham)&&Za(b,"sham",!0),Za(s,d,b),a&&(h=e+"Prototype",Lb(Ja,h)||Za(Ja,h,{}),Za(Ja[h],d,f),t.real&&l&&(u||!l[d])&&Za(l,d,f)))},Xz=$e,Jz=Ht,jb=Ir.f;Xz({target:"Object",stat:!0,forced:Object.defineProperty!==jb,sham:!Jz},{defineProperty:jb});var Zz=ft,h8=Zz.Object,Qz=K$.exports=function(r,e,n){return h8.defineProperty(r,e,n)};h8.defineProperty.sham&&(Qz.sham=!0);var eB=K$.exports,tB=eB,d8=tB,rB=d8,nB=rB,iB=nB,aB=iB,f8=aB,qh=Ee(f8),oB=Ui,Ki=Array.isArray||function(r){return oB(r)==="Array"},sB=Math.ceil,lB=Math.floor,uB=Math.trunc||function(r){var e=+r;return(e>0?lB:sB)(e)},cB=uB,Uh=function(t){var r=+t;return r!==r||r===0?0:cB(r)},hB=Uh,dB=Math.min,fB=function(t){return t>0?dB(hB(t),9007199254740991):0},vB=fB,Lr=function(t){return vB(t.length)},pB=TypeError,mB=9007199254740991,Vh=function(t){if(t>mB)throw pB("Maximum allowed index exceeded");return t},gB=Wh,yB=Ir,bB=Da,ts=function(t,r,e){var n=gB(r);n in t?yB.f(t,n,bB(0,e)):t[n]=e},wB=mt,$B=wB("toStringTag"),v8={};v8[$B]="z";var a1=String(v8)==="[object z]",xB=a1,kB=wt,Tc=Ui,SB=mt,EB=SB("toStringTag"),TB=Object,_B=Tc(function(){return arguments}())==="Arguments",OB=function(t,r){try{return t[r]}catch{}},di=xB?Tc:function(t){var r,e,n;return t===void 0?"Undefined":t===null?"Null":typeof(e=OB(r=TB(t),EB))=="string"?e:_B?Tc(r):(n=Tc(r))==="Object"&&kB(r.callee)?"Arguments":n},IB=ct,CB=wt,ap=n1,PB=IB(Function.toString);CB(ap.inspectSource)||(ap.inspectSource=function(t){return PB(t)});var p8=ap.inspectSource,AB=ct,MB=Xe,m8=wt,DB=di,NB=dr,RB=p8,g8=function(){},FB=[],y8=NB("Reflect","construct"),o1=/^\s*(?:class|function)\b/,zB=AB(o1.exec),BB=!o1.test(g8),_s=function(r){if(!m8(r))return!1;try{return y8(g8,FB,r),!0}catch{return!1}},b8=function(r){if(!m8(r))return!1;switch(DB(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return BB||!!zB(o1,RB(r))}catch{return!0}};b8.sham=!0;var Gh=!y8||MB(function(){var t;return _s(_s.call)||!_s(Object)||!_s(function(){t=!0})||t})?b8:_s,Hb=Ki,LB=Gh,jB=Zt,HB=mt,WB=HB("species"),Wb=Array,qB=function(t){var r;return Hb(t)&&(r=t.constructor,LB(r)&&(r===Wb||Hb(r.prototype))?r=void 0:jB(r)&&(r=r[WB],r===null&&(r=void 0))),r===void 0?Wb:r},UB=qB,Kh=function(t,r){return new(UB(t))(r===0?0:r)},VB=Xe,GB=mt,KB=Jo,YB=GB("species"),Al=function(t){return KB>=51||!VB(function(){var r=[],e=r.constructor={};return e[YB]=function(){return{foo:1}},r[t](Boolean).foo!==1})},XB=$e,JB=Xe,ZB=Ki,QB=Zt,eL=Or,tL=Lr,qb=Vh,Ub=ts,rL=Kh,nL=Al,iL=mt,aL=Jo,w8=iL("isConcatSpreadable"),oL=aL>=51||!JB(function(){var t=[];return t[w8]=!1,t.concat()[0]!==t}),sL=function(t){if(!QB(t))return!1;var r=t[w8];return r!==void 0?!!r:ZB(t)},lL=!oL||!nL("concat");XB({target:"Array",proto:!0,arity:1,forced:lL},{concat:function(r){var e=eL(this),n=rL(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}},gL={includes:Vb(!0),indexOf:Vb(!1)},Ml={},yL=ct,Ad=Rt,bL=Rn,wL=gL.indexOf,$L=Ml,Gb=yL([].push),$8=function(t,r){var e=bL(t),n=0,i=[],a;for(a in e)!Ad($L,a)&&Ad(e,a)&&Gb(i,a);for(;r.length>n;)Ad(e,a=r[n++])&&(~wL(i,a)||Gb(i,a));return i},s1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xL=$8,kL=s1,Jh=Object.keys||function(r){return xL(r,kL)},SL=Ht,EL=c8,TL=Ir,_L=Br,OL=Rn,IL=Jh;Yh.f=SL&&!EL?Object.defineProperties:function(r,e){_L(r);for(var n=OL(e),i=IL(e),a=i.length,o=0,s;a>o;)TL.f(r,s=i[o++],n[s]);return r};var CL=dr,x8=CL("document","documentElement"),PL=es,AL=Hh,Kb=PL("keys"),Zh=function(t){return Kb[t]||(Kb[t]=AL(t))},ML=Br,DL=Yh,Yb=s1,NL=Ml,RL=x8,FL=i1,zL=Zh,Xb=">",Jb="<",op="prototype",sp="script",k8=zL("IE_PROTO"),Md=function(){},S8=function(t){return Jb+sp+Xb+t+Jb+"/"+sp+Xb},Zb=function(t){t.write(S8("")),t.close();var r=t.parentWindow.Object;return t=null,r},BL=function(){var t=FL("iframe"),r="java"+sp+":",e;return t.style.display="none",RL.appendChild(t),t.src=String(r),e=t.contentWindow.document,e.open(),e.write(S8("document.F=Object")),e.close(),e.F},Lu,_c=function(){try{Lu=new ActiveXObject("htmlfile")}catch{}_c=typeof document<"u"?document.domain&&Lu?Zb(Lu):BL():Zb(Lu);for(var t=Yb.length;t--;)delete _c[op][Yb[t]];return _c()};NL[k8]=!0;var Ra=Object.create||function(r,e){var n;return r!==null?(Md[op]=ML(r),n=new Md,Md[op]=null,n[k8]=r):n=_c(),e===void 0?n:DL.f(n,e)},Dl={},LL=$8,jL=s1,HL=jL.concat("length","prototype");Dl.f=Object.getOwnPropertyNames||function(r){return LL(r,HL)};var l1={},Qb=Xh,WL=Lr,qL=ts,UL=Array,VL=Math.max,E8=function(t,r,e){for(var n=WL(t),i=Qb(r,n),a=Qb(e===void 0?n:e,n),o=UL(VL(a-i,0)),s=0;ib;b++)if((s||b in f)&&(k=f[b],T=v(k,b,d),t))if(r)$[b]=T;else if(T)switch(t){case 3:return!0;case 5:return k;case 6:return b;case 2:i4($,k)}else switch(t){case 4:return!1;case 7:i4($,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)},Qh=$e,Fl=dt,c1=Wt,Mj=ct,Po=Ht,Ao=Zo,Dj=Xe,Lt=Rt,Nj=Nt,up=Br,e0=Rn,h1=Wh,Rj=Na,cp=Da,ol=Ra,C8=Jh,Fj=Dl,P8=l1,zj=Nl,A8=Ma,M8=Ir,Bj=Yh,D8=Lh,a4=rs,Lj=u1,d1=es,jj=Zh,N8=Ml,o4=Hh,Hj=mt,Wj=Rl,qj=$t,Uj=O8,Vj=Fa,R8=ns,t0=is.forEach,wr=jj("hidden"),r0="Symbol",sl="prototype",Gj=R8.set,s4=R8.getterFor(r0),fn=Object[sl],ha=Fl.Symbol,Ns=ha&&ha[sl],Kj=Fl.RangeError,Yj=Fl.TypeError,Rd=Fl.QObject,F8=A8.f,da=M8.f,z8=P8.f,Xj=D8.f,B8=Mj([].push),ai=d1("symbols"),zl=d1("op-symbols"),Jj=d1("wks"),hp=!Rd||!Rd[sl]||!Rd[sl].findChild,L8=function(t,r,e){var n=F8(fn,r);n&&delete fn[r],da(t,r,e),n&&t!==fn&&da(fn,r,n)},dp=Po&&Dj(function(){return ol(da({},"a",{get:function(){return da(this,"a",{value:7}).a}})).a!==7})?L8:da,Fd=function(t,r){var e=ai[t]=ol(Ns);return Gj(e,{type:r0,tag:t,description:r}),Po||(e.description=r),e},n0=function(r,e,n){r===fn&&n0(zl,e,n),up(r);var i=h1(e);return up(n),Lt(ai,i)?(n.enumerable?(Lt(r,wr)&&r[wr][i]&&(r[wr][i]=!1),n=ol(n,{enumerable:cp(0,!1)})):(Lt(r,wr)||da(r,wr,cp(1,{})),r[wr][i]=!0),dp(r,i,n)):da(r,i,n)},f1=function(r,e){up(r);var n=e0(e),i=C8(n).concat(q8(n));return t0(i,function(a){(!Po||c1(j8,n,a))&&n0(r,a,n[a])}),r},Zj=function(r,e){return e===void 0?ol(r):f1(ol(r),e)},j8=function(r){var e=h1(r),n=c1(Xj,this,e);return this===fn&&Lt(ai,e)&&!Lt(zl,e)?!1:n||!Lt(this,e)||!Lt(ai,e)||Lt(this,wr)&&this[wr][e]?n:!0},H8=function(r,e){var n=e0(r),i=h1(e);if(!(n===fn&&Lt(ai,i)&&!Lt(zl,i))){var a=F8(n,i);return a&&Lt(ai,i)&&!(Lt(n,wr)&&n[wr][i])&&(a.enumerable=!0),a}},W8=function(r){var e=z8(e0(r)),n=[];return t0(e,function(i){!Lt(ai,i)&&!Lt(N8,i)&&B8(n,i)}),n},q8=function(t){var r=t===fn,e=z8(r?zl:e0(t)),n=[];return t0(e,function(i){Lt(ai,i)&&(!r||Lt(fn,i))&&B8(n,ai[i])}),n};Ao||(ha=function(){if(Nj(Ns,this))throw new Yj("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:Rj(arguments[0]),e=o4(r),n=function(i){var a=this===void 0?Fl:this;a===fn&&c1(n,zl,i),Lt(a,wr)&&Lt(a[wr],e)&&(a[wr][e]=!1);var o=cp(1,i);try{dp(a,e,o)}catch(s){if(!(s instanceof Kj))throw s;L8(a,e,o)}};return Po&&hp&&dp(fn,e,{configurable:!0,set:n}),Fd(e,r)},Ns=ha[sl],a4(Ns,"toString",function(){return s4(this).tag}),a4(ha,"withoutSetter",function(t){return Fd(o4(t),t)}),D8.f=j8,M8.f=n0,Bj.f=f1,A8.f=H8,Fj.f=P8.f=W8,zj.f=q8,Wj.f=function(t){return Fd(Hj(t),t)},Po&&Lj(Ns,"description",{configurable:!0,get:function(){return s4(this).description}}));Qh({global:!0,constructor:!0,wrap:!0,forced:!Ao,sham:!Ao},{Symbol:ha});t0(C8(Jj),function(t){qj(t)});Qh({target:r0,stat:!0,forced:!Ao},{useSetter:function(){hp=!0},useSimple:function(){hp=!1}});Qh({target:"Object",stat:!0,forced:!Ao,sham:!Po},{create:Zj,defineProperty:n0,defineProperties:f1,getOwnPropertyDescriptor:H8});Qh({target:"Object",stat:!0,forced:!Ao},{getOwnPropertyNames:W8});Uj();Vj(ha,r0);N8[wr]=!0;var Qj=Zo,U8=Qj&&!!Symbol.for&&!!Symbol.keyFor,eH=$e,tH=dr,rH=Rt,nH=Na,V8=es,iH=U8,zd=V8("string-to-symbol-registry"),aH=V8("symbol-to-string-registry");eH({target:"Symbol",stat:!0,forced:!iH},{for:function(t){var r=nH(t);if(rH(zd,r))return zd[r];var e=tH("Symbol")(r);return zd[r]=e,aH[e]=r,e}});var oH=$e,sH=Rt,lH=Cl,uH=Qo,cH=es,hH=U8,l4=cH("symbol-to-string-registry");oH({target:"Symbol",stat:!0,forced:!hH},{keyFor:function(r){if(!lH(r))throw new TypeError(uH(r)+" is not a symbol");if(sH(l4,r))return l4[r]}});var dH=ct,Bl=dH([].slice),fH=ct,u4=Ki,vH=wt,c4=Ui,pH=Na,h4=fH([].push),mH=function(t){if(vH(t))return t;if(u4(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");E4.Arguments=E4.Array;var YW={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},XW=YW,JW=dt,ZW=di,QW=hi,T4=as,eq=mt,_4=eq("toStringTag");for(var Hd in XW){var O4=JW[Hd],Wd=O4&&O4.prototype;Wd&&ZW(Wd)!==_4&&QW(Wd,_4,Hd),T4[Hd]=T4.Array}var tq=ZH,ax=tq,rq=mt,nq=Ir.f,I4=rq("metadata"),C4=Function.prototype;C4[I4]===void 0&&nq(C4,I4,{value:null});var iq=$t;iq("asyncDispose");var aq=$t;aq("dispose");var oq=$t;oq("metadata");var sq=ax,lq=sq,uq=dr,cq=ct,g1=uq("Symbol"),hq=g1.keyFor,dq=cq(g1.prototype.valueOf),ox=g1.isRegisteredSymbol||function(r){try{return hq(dq(r))!==void 0}catch{return!1}},fq=$e,vq=ox;fq({target:"Symbol",stat:!0},{isRegisteredSymbol:vq});var pq=es,sx=dr,mq=ct,gq=Cl,yq=mt,rh=sx("Symbol"),P4=rh.isWellKnownSymbol,lx=sx("Object","getOwnPropertyNames"),bq=mq(rh.prototype.valueOf),A4=pq("wks");for(var qd=0,M4=lx(rh),wq=M4.length;qd=a?t?"":void 0:(o=N4(n,i),o<55296||o>56319||i+1===a||(s=N4(n,i+1))<56320||s>57343?t?Fq(n,i):o:t?zq(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Bq={codeAt:R4(!1),charAt:R4(!0)},Lq=Bq.charAt,jq=Na,cx=ns,Hq=p1,F4=m1,hx="String Iterator",Wq=cx.set,qq=cx.getterFor(hx);Hq(String,"String",function(t){Wq(this,{type:hx,string:jq(t),index:0})},function(){var r=qq(this),e=r.string,n=r.index,i;return n>=e.length?F4(void 0,!0):(i=Lq(e,n),r.index+=i.length,F4(i,!1))});var Uq=Rl,Vq=Uq.f("iterator"),Gq=Vq,dx=Gq,Kq=dx,Yq=Kq,Xq=Yq,Jq=Xq,fx=Jq,Zq=Ee(fx);function Mo(t){"@babel/helpers - typeof";return Mo=typeof ho=="function"&&typeof Zq=="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 Qq=Rl,eU=Qq.f("toPrimitive"),tU=eU,rU=tU,nU=rU,iU=nU,aU=iU,oU=aU,sU=oU,lU=Ee(sU);function uU(t,r){if(Mo(t)!=="object"||t===null)return t;var e=t[lU];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 vx(t){var r=uU(t,"string");return Mo(r)==="symbol"?r:String(r)}function z4(t,r){for(var e=0;e=0:s>l;l+=u)l in o&&(i=e(i,o[l],l,a));return i}},AU={left:j4(!1),right:j4(!0)},MU=Xe,o0=function(t,r){var e=[][t];return!!e&&MU(function(){e.call(null,r||function(){return 1},1)})},DU=dt,NU=Ui,jl=NU(DU.process)==="process",RU=$e,FU=AU.left,zU=o0,H4=Jo,BU=jl,LU=!BU&&H4>79&&H4<83,jU=LU||!zU("reduce");RU({target:"Array",proto:!0,forced:jU},{reduce:function(r){var e=arguments.length;return FU(this,r,e,e>1?arguments[1]:void 0)}});var HU=rr,WU=HU("Array","reduce"),qU=Nt,UU=WU,Gd=Array.prototype,VU=function(t){var r=t.reduce;return t===Gd||qU(Gd,t)&&r===Gd.reduce?UU:r},GU=VU,KU=GU,YU=KU,XU=Ee(YU),JU=$e,ZU=is.filter,QU=Al,eV=QU("filter");JU({target:"Array",proto:!0,forced:!eV},{filter:function(r){return ZU(this,r,arguments.length>1?arguments[1]:void 0)}});var tV=rr,rV=tV("Array","filter"),nV=Nt,iV=rV,Kd=Array.prototype,aV=function(t){var r=t.filter;return t===Kd||nV(Kd,t)&&r===Kd.filter?iV:r},oV=aV,sV=oV,lV=sV,fo=Ee(lV),uV=$e,cV=is.map,hV=Al,dV=hV("map");uV({target:"Array",proto:!0,forced:!dV},{map:function(r){return cV(this,r,arguments.length>1?arguments[1]:void 0)}});var fV=rr,vV=fV("Array","map"),pV=Nt,mV=vV,Yd=Array.prototype,gV=function(t){var r=t.map;return t===Yd||pV(Yd,t)&&r===Yd.map?mV:r},yV=gV,bV=yV,wV=bV,cn=Ee(wV),$V=Ki,xV=Lr,kV=Vh,SV=Gi,wx=function(t,r,e,n,i,a,o,s){for(var l=i,u=0,c=o?SV(o,s):!1,h,d;u0&&$V(h)?(d=xV(h),l=wx(t,r,h,d,l,a-1)-1):(kV(l+1),t[l]=h),l++),u++;return l},EV=wx,TV=$e,_V=EV,OV=_r,IV=Or,CV=Lr,PV=Kh;TV({target:"Array",proto:!0},{flatMap:function(r){var e=IV(this),n=CV(e),i;return OV(r),i=PV(e,0),i.length=_V(i,e,e,n,0,1,r,arguments.length>1?arguments[1]:void 0),i}});var AV=rr;AV("Array","flatMap");var MV=Wt,W4=Br,DV=r1,$x=function(t,r,e){var n,i;W4(t);try{if(n=DV(t,"return"),!n){if(r==="throw")throw e;return e}n=MV(n,t)}catch(a){i=!0,n=a}if(r==="throw")throw e;if(i)throw n;return W4(n),e},NV=Br,RV=$x,FV=function(t,r,e,n){try{return n?r(NV(e)[0],e[1]):r(e)}catch(i){RV(t,"throw",i)}},zV=mt,BV=as,LV=zV("iterator"),jV=Array.prototype,xx=function(t){return t!==void 0&&(BV.Array===t||jV[LV]===t)},HV=di,q4=r1,WV=Xo,qV=as,UV=mt,VV=UV("iterator"),s0=function(t){if(!WV(t))return q4(t,VV)||q4(t,"@@iterator")||qV[HV(t)]},GV=Wt,KV=_r,YV=Br,XV=Qo,JV=s0,ZV=TypeError,w1=function(t,r){var e=arguments.length<2?JV(t):r;if(KV(e))return YV(GV(e,t));throw new ZV(XV(t)+" is not iterable")},QV=Gi,eG=Wt,tG=Or,rG=FV,nG=xx,iG=Gh,aG=Lr,U4=ts,oG=w1,sG=s0,V4=Array,lG=function(r){var e=tG(r),n=iG(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=QV(a,i>2?arguments[2]:void 0));var s=sG(e),l=0,u,c,h,d,f,v;if(s&&!(this===V4&&nG(s)))for(d=oG(e,s),f=d.next,c=n?new this:[];!(h=eG(f,d)).done;l++)v=o?rG(d,a,[h.value,l],!0):h.value,U4(c,l,v);else for(u=aG(e),c=n?new this(u):V4(u);u>l;l++)v=o?a(e[l],l):e[l],U4(c,l,v);return c.length=l,c},uG=mt,kx=uG("iterator"),Sx=!1;try{var cG=0,G4={next:function(){return{done:!!cG++}},return:function(){Sx=!0}};G4[kx]=function(){return this},Array.from(G4,function(){throw 2})}catch{}var Ex=function(t,r){try{if(!r&&!Sx)return!1}catch{return!1}var e=!1;try{var n={};n[kx]=function(){return{next:function(){return{done:e=!0}}}},t(n)}catch{}return e},hG=$e,dG=lG,fG=Ex,vG=!fG(function(t){Array.from(t)});hG({target:"Array",stat:!0,forced:vG},{from:dG});var pG=ft,mG=pG.Array.from,gG=mG,Tx=gG,yG=Tx,$1=Ee(yG),bG=s0,wG=bG,$G=wG,xG=$G,kG=xG,SG=kG,EG=SG,TG=EG,_x=TG,Ox=Ee(_x),_G=_x,x1=Ee(_G),OG=$e,IG=Ki;OG({target:"Array",stat:!0},{isArray:IG});var CG=ft,PG=CG.Array.isArray,AG=PG,Ix=AG,MG=Ix,DG=MG,NG=DG,RG=NG,FG=RG,Cx=Ee(FG);function zG(t){if(Cx(t))return t}var BG=Ht,LG=Ki,jG=TypeError,HG=Object.getOwnPropertyDescriptor,WG=BG&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),Px=WG?function(t,r){if(LG(t)&&!HG(t,"length").writable)throw new jG("Cannot set read only .length");return t.length=r}:function(t,r){return t.length=r},qG=$e,UG=Or,VG=Lr,GG=Px,KG=Vh,YG=Xe,XG=YG(function(){return[].push.call({length:4294967296},1)!==4294967297}),JG=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},ZG=XG||!JG();qG({target:"Array",proto:!0,arity:1,forced:ZG},{push:function(r){var e=UG(this),n=VG(e),i=arguments.length;KG(n+i);for(var a=0;at.length)&&(r=t.length);for(var e=0,n=new Array(r);e1?arguments[1]:void 0)},OY=$e,X4=_Y;OY({target:"Array",proto:!0,forced:[].forEach!==X4},{forEach:X4});var IY=rr,CY=IY("Array","forEach"),PY=CY,AY=PY,MY=di,DY=Rt,NY=Nt,RY=AY,ef=Array.prototype,FY={DOMTokenList:!0,NodeList:!0},zx=function(t){var r=t.forEach;return t===ef||NY(ef,t)&&r===ef.forEach||DY(FY,MY(t))?RY:r},zY=zx,xa=Ee(zY),BY=$e,LY=ct,jY=Ki,HY=LY([].reverse),J4=[1,2];BY({target:"Array",proto:!0,forced:String(J4)===String(J4.reverse())},{reverse:function(){return jY(this)&&(this.length=this.length),HY(this)}});var WY=rr,qY=WY("Array","reverse"),UY=Nt,VY=qY,tf=Array.prototype,GY=function(t){var r=t.reverse;return t===tf||UY(tf,t)&&r===tf.reverse?VY:r},KY=GY,Bx=KY,YY=Bx,XY=Ee(YY),Z4=Qo,JY=TypeError,Lx=function(t,r){if(!delete t[r])throw new JY("Cannot delete property "+Z4(r)+" of "+Z4(t))},ZY=$e,QY=Or,eX=Xh,tX=Uh,rX=Lr,nX=Px,iX=Vh,aX=Kh,oX=ts,rf=Lx,sX=Al,lX=sX("splice"),uX=Math.max,cX=Math.min;ZY({target:"Array",proto:!0,forced:!lX},{splice:function(r,e){var n=QY(this),i=rX(n),a=eX(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=cX(uX(tX(e),0),i-a)),iX(i+s-l),u=aX(n,l),c=0;ci-l+s;c--)rf(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]:rf(n,d);for(c=0;ca;)for(var l=EX(arguments[a++]),u=o?TX(af(l),o(l)):af(l),c=u.length,h=0,d;c>h;)d=u[h++],(!Q4||wX(s,l,d))&&(n[d]=l[d]);return n}:eo,OX=$e,t2=_X;OX({target:"Object",stat:!0,arity:2,forced:Object.assign!==t2},{assign:t2});var IX=ft,CX=IX.Object.assign,PX=CX,AX=PX,MX=AX,DX=Ee(MX),NX=$e,RX=Xe,FX=Or,Hx=i0,zX=Q8,BX=RX(function(){Hx(1)});NX({target:"Object",stat:!0,forced:BX,sham:!zX},{getPrototypeOf:function(r){return Hx(FX(r))}});var LX=ft,jX=LX.Object.getPrototypeOf,HX=jX,WX=HX,qX=$e,UX=Ht,VX=Ra;qX({target:"Object",stat:!0,sham:!UX},{create:VX});var GX=ft,KX=GX.Object,YX=function(r,e){return KX.create(r,e)},XX=YX,Wx=XX,JX=Wx,ZX=Ee(JX),gp=ft,QX=Yo;gp.JSON||(gp.JSON={stringify:JSON.stringify});var eJ=function(r,e,n){return QX(gp.JSON.stringify,null,arguments)},tJ=eJ,rJ=tJ,nJ=rJ,iJ=Ee(nJ),aJ=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",oJ=TypeError,qx=function(t,r){if(te,o=lJ(n)?n:fJ(n),s=a?hJ(arguments,e):[],l=a?function(){sJ(o,this,s)}:o;return r?t(l,i):t(l)}:t},pJ=$e,Gx=dt,mJ=Vx,r2=mJ(Gx.setInterval,!0);pJ({global:!0,bind:!0,forced:Gx.setInterval!==r2},{setInterval:r2});var gJ=$e,Kx=dt,yJ=Vx,n2=yJ(Kx.setTimeout,!0);gJ({global:!0,bind:!0,forced:Kx.setTimeout!==n2},{setTimeout:n2});var bJ=ft,wJ=bJ.setTimeout,$J=wJ,xJ=Ee($J),Yx={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})(Yx);var kJ=Yx.exports,SJ=Ee(kJ);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 - * http://naver.github.io/egjs - * - * Forked By Naver egjs - * Copyright (c) hammerjs - * Licensed under the MIT license */function mn(){return mn=Object.assign||function(t){for(var r=1;r"u"?{style:{}}:document.createElement("div"),TJ="function",vo=Math.round,Sa=Math.abs,E1=Date.now;function h0(t,r){for(var e,n,i=r[0].toUpperCase()+r.slice(1),a=0;a"u"?Kn={}:Kn=window;var Xx=h0(EJ.style,"touchAction"),Jx=Xx!==void 0;function _J(){if(!Jx)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 Zx="compute",Qx="auto",bp="manipulation",fa="none",ll="pan-x",ul="pan-y",Vu=_J(),OJ=/mobile|tablet|ip(ad|hone|od)|android/i,e9="ontouchstart"in Kn,IJ=h0(Kn,"PointerEvent")!==void 0,CJ=e9&&OJ.test(navigator.userAgent),Hl="touch",PJ="pen",T1="mouse",AJ="kinect",MJ=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,t9=In|va,r9=["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 DJ(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,bp)?bp:Qx}var n9=function(){function t(e,n){this.manager=e,this.set(n)}var r=t.prototype;return r.set=function(n){n===Zx&&(n=this.compute()),Jx&&this.manager.element.style&&Vu[n]&&(this.manager.element.style[Xx]=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){d0(i.options.enable,[i])&&(n=n.concat(i.getTouchAction()))}),DJ(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 _1(t,r){for(;t;){if(t===r)return!0;t=t.parentNode}return!1}function i9(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 NJ(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 o9(t,r,e){return{x:r/t||0,y:e/t||0}}function RJ(t,r){return ah(r[0],r[1],ih)/ah(t[0],t[1],ih)}function FJ(t,r){return wp(r[1],r[0],ih)+wp(t[1],t[0],ih)}function zJ(t,r){var e=t.lastInterval||r,n=r.timeStamp-e.timeStamp,i,a,o,s;if(r.eventType!==Sr&&(n>MJ||e.velocity===void 0)){var l=r.deltaX-e.deltaX,u=r.deltaY-e.deltaY,c=o9(n,l,u);a=c.x,o=c.y,i=Sa(c.x)>Sa(c.y)?c.x:c.y,s=a9(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 BJ(t,r){var e=t.session,n=r.pointers,i=n.length;e.firstInput||(e.firstInput=a2(r)),i>1&&!e.firstMultiple?e.firstMultiple=a2(r):i===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,l=r.center=i9(n);r.timeStamp=E1(),r.deltaTime=r.timeStamp-a.timeStamp,r.angle=wp(s,l),r.distance=ah(s,l),NJ(e,r),r.offsetDirection=a9(r.deltaX,r.deltaY);var u=o9(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?RJ(o.pointers,n):1,r.rotation=o?FJ(o.pointers,n):0,r.maxPointers=e.prevInput?r.pointers.length>e.prevInput.maxPointers?r.pointers.length:e.prevInput.maxPointers:r.pointers.length,zJ(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,_1(d,c)&&(c=d),r.target=c}function LJ(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,BJ(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 o2(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){d0(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(o2(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(o2(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 WJ={touchstart:ur,touchmove:za,touchend:Pt,touchcancel:Sr},qJ="touchstart touchmove touchend touchcancel",I1=function(t){rn(r,t);function r(){var n;return r.prototype.evTarget=qJ,n=t.apply(this,arguments)||this,n.targetIds={},n}var e=r.prototype;return e.handler=function(i){var a=WJ[i.type],o=UJ.call(this,i,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Hl,srcEvent:i})},r}(os);function UJ(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 _1(u.target,l)}),r===ur)for(i=0;i-1&&i.splice(s,1)};setTimeout(a,YJ)}}function XJ(t,r){t&ur?(this.primaryTouch=r.changedPointers[0].identifier,l2.call(this,r)):t&(Pt|Sr)&&l2.call(this,r)}function JJ(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+u2(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=h9(i.direction);a&&(i.additionalEvent=this.options.event+a),t.prototype.emit.call(this,i)},r}(Ro),d9=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 P1.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=h9(i.offsetDirection);a&&this.manager.emit(this.options.event+a,i),this.manager.emit(this.options.event,i)},r}(Ro),f9=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),v9=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),p9=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[Qx]},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=E1(),this.manager.emit(this.options.event,this._input)))},r}(Vl),m9={domEvents:!1,touchAction:Zx,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},c2=[[v9,{enable:!1}],[f9,{enable:!1},["rotate"]],[d9,{direction:In}],[P1,{direction:In},["swipe"]],[$p],[$p,{event:"doubletap",taps:2},["tap"]],[p9]],tZ=1,h2=2;function d2(t,r){var e=t.element;if(e.style){var n;Yn(t.options.cssProps,function(i,a){n=h0(e.style,a),r?(t.oldCssProps[n]=e.style[n],e.style[n]=i):e.style[n]=t.oldCssProps[n]||""}),r||(t.oldCssProps={})}}function rZ(t,r){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=r,r.target.dispatchEvent(e)}var f2=function(){function t(e,n){var i=this;this.options=ka({},m9,n||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=ZJ(this),this.touchAction=new n9(this,this.options.touchAction),d2(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?h2:tZ},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 y9=g9(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 dZ(t,r){var e;if(t){if(typeof t=="string")return p2(t,r);var n=c0(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return $1(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p2(t,r)}}function p2(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,u0(n=[$9(r[0],r[1])]).call(n,$r(c0(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=b9(fY(a)),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;Object.prototype.propertyIsEnumerable.call(a,l)&&(a[l]===w9?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]=x9(a[l]))}}catch(u){o.e(u)}finally{o.f()}return i}function x9(t){return Nr(t)?cn(t).call(t,function(r){return x9(r)}):typeof t=="object"&&t!==null?t instanceof Date?new Date(t.getTime()):oh({},t):t}function k9(t){for(var r=0,e=S1(t);ro;)l=n(e,s=i[o++]),l!==void 0&&ZZ(a,s,l);return a}});var QZ=ft,eQ=QZ.Object.getOwnPropertyDescriptors,tQ=eQ,rQ=tQ,nQ=rQ,w2=Ee(nQ),M9={exports:{}},iQ=$e,aQ=Ht,$2=Yh.f;iQ({target:"Object",stat:!0,forced:Object.defineProperties!==$2,sham:!aQ},{defineProperties:$2});var oQ=ft,D9=oQ.Object,sQ=M9.exports=function(r,e){return D9.defineProperties(r,e)};D9.defineProperties.sham&&(sQ.sham=!0);var lQ=M9.exports,uQ=lQ,cQ=uQ,hQ=cQ,dQ=Ee(hQ),fQ=d8,vQ=Ee(fQ);function N9(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var pQ=Wx,mQ=pQ,gQ=mQ,yQ=gQ,R9=yQ,bQ=Ee(R9),wQ=$e,$Q=rx;wQ({target:"Object",stat:!0},{setPrototypeOf:$Q});var xQ=ft,kQ=xQ.Object.setPrototypeOf,SQ=kQ,EQ=SQ,TQ=EQ,_Q=TQ,OQ=_Q,IQ=OQ,F9=IQ,xp=Ee(F9),CQ=yx,PQ=CQ,AQ=PQ,MQ=AQ,DQ=MQ,z9=Ee(DQ);function kp(t,r){var e;return kp=xp?z9(e=xp).call(e):function(i,a){return i.__proto__=a,i},kp(t,r)}function NQ(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=bQ(r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),qh(t,"prototype",{writable:!1}),kp(t,r)}function RQ(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 N9(t)}var FQ=WX,zQ=FQ,BQ=zQ,LQ=BQ,B9=LQ,x2=Ee(B9);function sh(t){var r;return sh=xp?z9(r=x2).call(r):function(n){return n.__proto__||x2(n)},sh(t)}var L9={exports:{}},j9={exports:{}};(function(t){var r=y1,e=fx;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})(j9);var jQ=j9.exports,HQ=zx,WQ=HQ,qQ=WQ,UQ=qQ,VQ=UQ,k2=Rt,GQ=k1,KQ=Ma,YQ=Ir,XQ=function(t,r,e){for(var n=GQ(r),i=YQ.f,a=KQ.f,o=0;oh;h++)if(f=y(t[h]),f&&E2(_2,f))return f;return new Cc(!1)}u=yee(t,c)}for(v=a?t.next:u.next;!(g=fee(v,u)).done;){try{f=y(g.value)}catch($){T2(u,"throw",$)}if(typeof f=="object"&&f&&E2(_2,f))return f}return new Cc(!1)},$ee=Na,xee=function(t,r){return t===void 0?arguments.length<2?"":r:$ee(t)},kee=$e,See=Nt,Eee=i0,lh=rx,Tee=XQ,q9=Ra,sf=hi,lf=Da,_ee=QQ,Oee=hee,Iee=Ba,Cee=xee,Pee=mt,Aee=Pee("toStringTag"),uh=Error,Mee=[].push,Fo=function(r,e){var n=See(uf,this),i;lh?i=lh(new uh,n?Eee(this):uf):(i=n?this:q9(uf),sf(i,Aee,"Error")),e!==void 0&&sf(i,"message",Cee(e)),Oee(i,Fo,i.stack,1),arguments.length>2&&_ee(i,arguments[2]);var a=[];return Iee(r,Mee,{that:a}),sf(i,"errors",a),i};lh?lh(Fo,uh):Tee(Fo,uh,{name:!0});var uf=Fo.prototype=q9(uh.prototype,{constructor:lf(1,Fo),message:lf(1,""),name:lf(1,"AggregateError")});kee({global:!0,constructor:!0,arity:2},{AggregateError:Fo});var Dee=dr,Nee=u1,Ree=mt,Fee=Ht,O2=Ree("species"),U9=function(t){var r=Dee(t);Fee&&r&&!r[O2]&&Nee(r,O2,{configurable:!0,get:function(){return this}})},zee=Nt,Bee=TypeError,M1=function(t,r){if(zee(r,t))return t;throw new Bee("Incorrect invocation")},I2=Br,Lee=S9,jee=Xo,Hee=mt,Wee=Hee("species"),V9=function(t,r){var e=I2(t).constructor,n;return e===void 0||jee(n=I2(e)[Wee])?r:Lee(n)},qee=Vi,G9=/(?:ipad|iphone|ipod).*applewebkit/i.test(qee),Rr=dt,Uee=Yo,Vee=Gi,C2=wt,Gee=Rt,K9=Xe,P2=x8,Kee=Bl,A2=i1,Yee=qx,Xee=G9,Jee=jl,Sp=Rr.setImmediate,Ep=Rr.clearImmediate,Zee=Rr.process,cf=Rr.Dispatch,Qee=Rr.Function,M2=Rr.MessageChannel,ete=Rr.String,hf=0,Us={},D2="onreadystatechange",fl,na,df,ff;K9(function(){fl=Rr.location});var D1=function(t){if(Gee(Us,t)){var r=Us[t];delete Us[t],r()}},vf=function(t){return function(){D1(t)}},N2=function(t){D1(t.data)},R2=function(t){Rr.postMessage(ete(t),fl.protocol+"//"+fl.host)};(!Sp||!Ep)&&(Sp=function(r){Yee(arguments.length,1);var e=C2(r)?r:Qee(r),n=Kee(arguments,1);return Us[++hf]=function(){Uee(e,void 0,n)},na(hf),hf},Ep=function(r){delete Us[r]},Jee?na=function(t){Zee.nextTick(vf(t))}:cf&&cf.now?na=function(t){cf.now(vf(t))}:M2&&!Xee?(df=new M2,ff=df.port2,df.port1.onmessage=N2,na=Vee(ff.postMessage,ff)):Rr.addEventListener&&C2(Rr.postMessage)&&!Rr.importScripts&&fl&&fl.protocol!=="file:"&&!K9(R2)?(na=R2,Rr.addEventListener("message",N2,!1)):D2 in A2("script")?na=function(t){P2.appendChild(A2("script"))[D2]=function(){P2.removeChild(this),D1(t)}}:na=function(t){setTimeout(vf(t),0)});var Y9={set:Sp,clear:Ep},X9=function(){this.head=null,this.tail=null};X9.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 J9=X9,tte=Vi,rte=/ipad|iphone|ipod/i.test(tte)&&typeof Pebble<"u",nte=Vi,ite=/web0s(?!.*chrome)/i.test(nte),Ta=dt,F2=Gi,ate=Ma.f,pf=Y9.set,ote=J9,ste=G9,lte=rte,ute=ite,mf=jl,z2=Ta.MutationObserver||Ta.WebKitMutationObserver,B2=Ta.document,L2=Ta.process,Ku=Ta.Promise,j2=ate(Ta,"queueMicrotask"),Tp=j2&&j2.value,to,gf,yf,Yu,H2;if(!Tp){var Xu=new ote,Ju=function(){var t,r;for(mf&&(t=L2.domain)&&t.exit();r=Xu.get();)try{r()}catch(e){throw Xu.head&&to(),e}t&&t.enter()};!ste&&!mf&&!ute&&z2&&B2?(gf=!0,yf=B2.createTextNode(""),new z2(Ju).observe(yf,{characterData:!0}),to=function(){yf.data=gf=!gf}):!lte&&Ku&&Ku.resolve?(Yu=Ku.resolve(void 0),Yu.constructor=Ku,H2=F2(Yu.then,Yu),to=function(){H2(Ju)}):mf?to=function(){L2.nextTick(Ju)}:(pf=F2(pf,Ta),to=function(){pf(Ju)}),Tp=function(t){Xu.head||to(),Xu.add(t)}}var cte=Tp,hte=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}}},dte=dt,ls=dte.Promise,Z9=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",fte=Z9,vte=jl,pte=!fte&&!vte&&typeof window=="object"&&typeof document=="object",mte=dt,Vs=ls,gte=wt,yte=u8,bte=p8,wte=mt,$te=pte,xte=Z9,bf=Jo,W2=Vs&&Vs.prototype,kte=wte("species"),_p=!1,Q9=gte(mte.PromiseRejectionEvent),Ste=yte("Promise",function(){var t=bte(Vs),r=t!==String(Vs);if(!r&&bf===66||!(W2.catch&&W2.finally))return!0;if(!bf||bf<51||!/native code/.test(t)){var e=new Vs(function(a){a(1)}),n=function(a){a(function(){},function(){})},i=e.constructor={};if(i[kte]=n,_p=e.then(function(){})instanceof n,!_p)return!0}return!r&&($te||xte)&&!Q9}),Gl={CONSTRUCTOR:Ste,REJECTION_EVENT:Q9,SUBCLASSING:_p},Fn={},q2=_r,Ete=TypeError,Tte=function(t){var r,e;this.promise=new t(function(n,i){if(r!==void 0||e!==void 0)throw new Ete("Bad Promise constructor");r=n,e=i}),this.resolve=q2(r),this.reject=q2(e)};Fn.f=function(t){return new Tte(t)};var _te=$e,ch=jl,zi=dt,Kl=Wt,Ote=rs,Ite=Fa,Cte=U9,Pte=_r,Op=wt,Ate=Zt,Mte=M1,Dte=V9,ek=Y9.set,N1=cte,Nte=hte,Rte=ss,Fte=J9,tk=ns,Ip=ls,rk=Gl,nk=Fn,f0="Promise",ik=rk.CONSTRUCTOR,zte=rk.REJECTION_EVENT,wf=tk.getterFor(f0),Bte=tk.set,Lte=Ip&&Ip.prototype,mo=Ip,$f=Lte,ak=zi.TypeError,Cp=zi.document,R1=zi.process,Pp=nk.f,jte=Pp,Hte=!!(Cp&&Cp.createEvent&&zi.dispatchEvent),ok="unhandledrejection",Wte="rejectionhandled",U2=0,sk=1,qte=2,F1=1,lk=2,Zu,V2,Ute,uk=function(t){var r;return Ate(t)&&Op(r=t.then)?r:!1},ck=function(t,r){var e=r.value,n=r.state===sk,i=n?t.ok:t.fail,a=t.resolve,o=t.reject,s=t.domain,l,u,c;try{i?(n||(r.rejection===lk&&Gte(r),r.rejection=F1),i===!0?l=e:(s&&s.enter(),l=i(e),s&&(s.exit(),c=!0)),l===t.promise?o(new ak("Promise-chain cycle")):(u=uk(l))?Kl(u,l,a,o):a(l)):o(e)}catch(h){s&&!c&&s.exit(),o(h)}},hk=function(t,r){t.notified||(t.notified=!0,N1(function(){for(var e=t.reactions,n;n=e.get();)ck(n,t);t.notified=!1,r&&!t.rejection&&Vte(t)}))},dk=function(t,r,e){var n,i;Hte?(n=Cp.createEvent("Event"),n.promise=r,n.reason=e,n.initEvent(t,!1,!0),zi.dispatchEvent(n)):n={promise:r,reason:e},!zte&&(i=zi["on"+t])?i(n):t===ok&&Nte("Unhandled promise rejection",e)},Vte=function(t){Kl(ek,zi,function(){var r=t.facade,e=t.value,n=G2(t),i;if(n&&(i=Rte(function(){ch?R1.emit("unhandledRejection",e,r):dk(ok,r,e)}),t.rejection=ch||G2(t)?lk:F1,i.error))throw i.value})},G2=function(t){return t.rejection!==F1&&!t.parent},Gte=function(t){Kl(ek,zi,function(){var r=t.facade;ch?R1.emit("rejectionHandled",r):dk(Wte,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=qte,hk(t,!0))},Ap=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw new ak("Promise can't be resolved itself");var n=uk(r);n?N1(function(){var i={done:!1};try{Kl(n,r,go(Ap,i,t),go(Eo,i,t))}catch(a){Eo(i,a,t)}}):(t.value=r,t.state=sk,hk(t,!1))}catch(i){Eo({done:!1},i,t)}}};ik&&(mo=function(r){Mte(this,$f),Pte(r),Kl(Zu,this);var e=wf(this);try{r(go(Ap,e),go(Eo,e))}catch(n){Eo(e,n)}},$f=mo.prototype,Zu=function(r){Bte(this,{type:f0,done:!1,notified:!1,parent:!1,reactions:new Fte,rejection:!1,state:U2,value:void 0})},Zu.prototype=Ote($f,"then",function(r,e){var n=wf(this),i=Pp(Dte(this,mo));return n.parent=!0,i.ok=Op(r)?r:!0,i.fail=Op(e)&&e,i.domain=ch?R1.domain:void 0,n.state===U2?n.reactions.add(i):N1(function(){ck(i,n)}),i.promise}),V2=function(){var t=new Zu,r=wf(t);this.promise=t,this.resolve=go(Ap,r),this.reject=go(Eo,r)},nk.f=Pp=function(t){return t===mo||t===Ute?new V2(t):jte(t)});_te({global:!0,constructor:!0,wrap:!0,forced:ik},{Promise:mo});Ite(mo,f0,!1,!0);Cte(f0);var Kte=ls,Yte=Ex,Xte=Gl.CONSTRUCTOR,v0=Xte||!Yte(function(t){Kte.all(t).then(void 0,function(){})}),Jte=$e,Zte=Wt,Qte=_r,ere=Fn,tre=ss,rre=Ba,nre=v0;Jte({target:"Promise",stat:!0,forced:nre},{all:function(r){var e=this,n=ere.f(e),i=n.resolve,a=n.reject,o=tre(function(){var s=Qte(e.resolve),l=[],u=0,c=1;rre(r,function(h){var d=u++,f=!1;c++,Zte(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 ire=$e,are=Gl.CONSTRUCTOR,K2=ls;K2&&K2.prototype;ire({target:"Promise",proto:!0,forced:are,real:!0},{catch:function(t){return this.then(void 0,t)}});var ore=$e,sre=Wt,lre=_r,ure=Fn,cre=ss,hre=Ba,dre=v0;ore({target:"Promise",stat:!0,forced:dre},{race:function(r){var e=this,n=ure.f(e),i=n.reject,a=cre(function(){var o=lre(e.resolve);hre(r,function(s){sre(o,e,s).then(n.resolve,i)})});return a.error&&i(a.value),n.promise}});var fre=$e,vre=Wt,pre=Fn,mre=Gl.CONSTRUCTOR;fre({target:"Promise",stat:!0,forced:mre},{reject:function(r){var e=pre.f(this);return vre(e.reject,void 0,r),e.promise}});var gre=Br,yre=Zt,bre=Fn,fk=function(t,r){if(gre(t),yre(r)&&r.constructor===t)return r;var e=bre.f(t),n=e.resolve;return n(r),e.promise},wre=$e,$re=dr,xre=PF,kre=ls,Sre=Gl.CONSTRUCTOR,Ere=fk,Tre=$re("Promise"),_re=!Sre;wre({target:"Promise",stat:!0,forced:xre},{resolve:function(r){return Ere(_re&&this===Tre?kre:this,r)}});var Ore=$e,Ire=Wt,Cre=_r,Pre=Fn,Are=ss,Mre=Ba,Dre=v0;Ore({target:"Promise",stat:!0,forced:Dre},{allSettled:function(r){var e=this,n=Pre.f(e),i=n.resolve,a=n.reject,o=Are(function(){var s=Cre(e.resolve),l=[],u=0,c=1;Mre(r,function(h){var d=u++,f=!1;c++,Ire(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 Nre=$e,Rre=Wt,Fre=_r,zre=dr,Bre=Fn,Lre=ss,jre=Ba,Hre=v0,Y2="No one promise resolved";Nre({target:"Promise",stat:!0,forced:Hre},{any:function(r){var e=this,n=zre("AggregateError"),i=Bre.f(e),a=i.resolve,o=i.reject,s=Lre(function(){var l=Fre(e.resolve),u=[],c=0,h=1,d=!1;jre(r,function(f){var v=c++,g=!1;h++,Rre(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,Y2)))})}),--h||o(new n(u,Y2))});return s.error&&o(s.value),i.promise}});var Wre=$e,Mp=ls,qre=Xe,Ure=dr,Vre=wt,Gre=V9,X2=fk,Kre=Mp&&Mp.prototype,Yre=!!Mp&&qre(function(){Kre.finally.call({then:function(){}},function(){})});Wre({target:"Promise",proto:!0,real:!0,forced:Yre},{finally:function(t){var r=Gre(this,Ure("Promise")),e=Vre(t);return this.then(e?function(n){return X2(r,t()).then(function(){return n})}:t,e?function(n){return X2(r,t()).then(function(){throw n})}:t)}});var Xre=ft,Jre=Xre.Promise,Zre=Jre,Qre=Zre,ene=$e,tne=Fn;ene({target:"Promise",stat:!0},{withResolvers:function(){var r=tne.f(this);return{promise:r.promise,resolve:r.resolve,reject:r.reject}}});var rne=Qre,nne=rne,ine=$e,ane=Fn,one=ss;ine({target:"Promise",stat:!0,forced:!0},{try:function(t){var r=ane.f(this),e=one(t);return(e.error?r.reject:r.resolve)(e.value),r.promise}});var sne=nne,lne=sne,une=lne,cne=Bx,hne=cne,dne=hne,fne=dne,vne=fne;(function(t){var r=jQ.default,e=f8,n=y1,i=R9,a=B9,o=VQ,s=Ax,l=F9,u=une,c=vne,h=Dx;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(Q,W,G){Q[W]=G.value},$=typeof n=="function"?n:{},k=$.iterator||"@@iterator",T=$.asyncIterator||"@@asyncIterator",P=$.toStringTag||"@@toStringTag";function E(Q,W,G){return e(Q,W,{value:G,enumerable:!0,configurable:!0,writable:!0}),Q[W]}try{E({},"")}catch{E=function(G,he,_e){return G[he]=_e}}function D(Q,W,G,he){var _e=W&&W.prototype instanceof ie?W:ie,ye=i(_e.prototype),et=new We(he||[]);return y(ye,"_invoke",{value:S(Q,G,et)}),ye}function B(Q,W,G){try{return{type:"normal",arg:Q.call(W,G)}}catch(he){return{type:"throw",arg:he}}}v.wrap=D;var R="suspendedStart",A="suspendedYield",z="executing",L="completed",Z={};function ie(){}function oe(){}function me(){}var Oe={};E(Oe,k,function(){return this});var ze=a,He=ze&&ze(ze(Le([])));He&&He!==g&&b.call(He,k)&&(Oe=He);var C=me.prototype=ie.prototype=i(Oe);function Me(Q){var W;o(W=["next","throw","return"]).call(W,function(G){E(Q,G,function(he){return this._invoke(G,he)})})}function V(Q,W){function G(_e,ye,et,Et){var Tt=B(Q[_e],Q,ye);if(Tt.type!=="throw"){var fr=Tt.arg,Qt=fr.value;return Qt&&r(Qt)=="object"&&b.call(Qt,"__await")?W.resolve(Qt.__await).then(function(yn){G("next",yn,et,Et)},function(yn){G("throw",yn,et,Et)}):W.resolve(Qt).then(function(yn){fr.value=yn,et(fr)},function(yn){return G("throw",yn,et,Et)})}Et(Tt.arg)}var he;y(this,"_invoke",{value:function(ye,et){function Et(){return new W(function(Tt,fr){G(ye,et,Tt,fr)})}return he=he?he.then(Et,Et):Et()}})}function S(Q,W,G){var he=R;return function(_e,ye){if(he===z)throw new Error("Generator is already running");if(he===L){if(_e==="throw")throw ye;return{value:f,done:!0}}for(G.method=_e,G.arg=ye;;){var et=G.delegate;if(et){var Et=pe(et,G);if(Et){if(Et===Z)continue;return Et}}if(G.method==="next")G.sent=G._sent=G.arg;else if(G.method==="throw"){if(he===R)throw he=L,G.arg;G.dispatchException(G.arg)}else G.method==="return"&&G.abrupt("return",G.arg);he=z;var Tt=B(Q,W,G);if(Tt.type==="normal"){if(he=G.done?L:A,Tt.arg===Z)continue;return{value:Tt.arg,done:G.done}}Tt.type==="throw"&&(he=L,G.method="throw",G.arg=Tt.arg)}}}function pe(Q,W){var G=W.method,he=Q.iterator[G];if(he===f)return W.delegate=null,G==="throw"&&Q.iterator.return&&(W.method="return",W.arg=f,pe(Q,W),W.method==="throw")||G!=="return"&&(W.method="throw",W.arg=new TypeError("The iterator does not provide a '"+G+"' method")),Z;var _e=B(he,Q.iterator,W.arg);if(_e.type==="throw")return W.method="throw",W.arg=_e.arg,W.delegate=null,Z;var ye=_e.arg;return ye?ye.done?(W[Q.resultName]=ye.value,W.next=Q.nextLoc,W.method!=="return"&&(W.method="next",W.arg=f),W.delegate=null,Z):ye:(W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,Z)}function Se(Q){var W,G={tryLoc:Q[0]};1 in Q&&(G.catchLoc=Q[1]),2 in Q&&(G.finallyLoc=Q[2],G.afterLoc=Q[3]),s(W=this.tryEntries).call(W,G)}function Ae(Q){var W=Q.completion||{};W.type="normal",delete W.arg,Q.completion=W}function We(Q){this.tryEntries=[{tryLoc:"root"}],o(Q).call(Q,Se,this),this.reset(!0)}function Le(Q){if(Q||Q===""){var W=Q[k];if(W)return W.call(Q);if(typeof Q.next=="function")return Q;if(!isNaN(Q.length)){var G=-1,he=function _e(){for(;++G=0;--_e){var ye=this.tryEntries[_e],et=ye.completion;if(ye.tryLoc==="root")return he("end");if(ye.tryLoc<=this.prev){var Et=b.call(ye,"catchLoc"),Tt=b.call(ye,"finallyLoc");if(Et&&Tt){if(this.prev=0;--he){var _e=this.tryEntries[he];if(_e.tryLoc<=this.prev&&b.call(_e,"finallyLoc")&&this.prev<_e.finallyLoc){var ye=_e;break}}ye&&(W==="break"||W==="continue")&&ye.tryLoc<=G&&G<=ye.finallyLoc&&(ye=null);var et=ye?ye.completion:{};return et.type=W,et.arg=G,ye?(this.method="next",this.next=ye.finallyLoc,Z):this.complete(et)},complete:function(W,G){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&G&&(this.next=G),Z},finish:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var he=this.tryEntries[G];if(he.finallyLoc===W)return this.complete(he.completion,he.afterLoc),Ae(he),Z}},catch:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var he=this.tryEntries[G];if(he.tryLoc===W){var _e=he.completion;if(_e.type==="throw"){var ye=_e.arg;Ae(he)}return ye}}throw new Error("illegal catch attempt")},delegateYield:function(W,G,he){return this.delegate={iterator:Le(W),resultName:G,nextLoc:he},this.method==="next"&&(this.arg=f),Z}},v}t.exports=d,t.exports.__esModule=!0,t.exports.default=t.exports})(L9);var pne=L9.exports,Pc=pne(),mne=Pc;try{regeneratorRuntime=Pc}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Pc:Function("r","regeneratorRuntime = r")(Pc)}var mr=Ee(mne),vk={exports:{}},gne=Xe,yne=gne(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),bne=Xe,wne=Zt,$ne=Ui,J2=yne,Ac=Object.isExtensible,xne=bne(function(){Ac(1)}),kne=xne||J2?function(r){return!wne(r)||J2&&$ne(r)==="ArrayBuffer"?!1:Ac?Ac(r):!0}:Ac,Sne=Xe,Ene=!Sne(function(){return Object.isExtensible(Object.preventExtensions({}))}),Tne=$e,_ne=ct,One=Ml,Ine=Zt,z1=Rt,Cne=Ir.f,Z2=Dl,Pne=l1,B1=kne,Ane=Hh,Mne=Ene,pk=!1,oi=Ane("meta"),Dne=0,L1=function(t){Cne(t,oi,{value:{objectID:"O"+Dne++,weakData:{}}})},Nne=function(t,r){if(!Ine(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!z1(t,oi)){if(!B1(t))return"F";if(!r)return"E";L1(t)}return t[oi].objectID},Rne=function(t,r){if(!z1(t,oi)){if(!B1(t))return!0;if(!r)return!1;L1(t)}return t[oi].weakData},Fne=function(t){return Mne&&pk&&B1(t)&&!z1(t,oi)&&L1(t),t},zne=function(){Bne.enable=function(){},pk=!0;var t=Z2.f,r=_ne([].splice),e={};e[oi]=1,t(e).length&&(Z2.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)}}),Q2(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&&aie(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(t,r,e){var n=r+" Iterator",i=xf(r),a=xf(n);cie(t,r,function(o,s){t5(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),hie(r)}},die=yk,fie=wk;die("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},fie);var vie=ft,pie=vie.Map,mie=pie,gie=mie,yie=gie,$k=Ee(yie),bie=$e,wie=is.some,$ie=o0,xie=$ie("some");bie({target:"Array",proto:!0,forced:!xie},{some:function(r){return wie(this,r,arguments.length>1?arguments[1]:void 0)}});var kie=rr,Sie=kie("Array","some"),Eie=Nt,Tie=Sie,kf=Array.prototype,_ie=function(t){var r=t.some;return t===kf||Eie(kf,t)&&r===kf.some?Tie:r},Oie=_ie,Iie=Oie,Cie=Iie,Pie=Ee(Cie),Aie=rr,Mie=Aie("Array","keys"),Die=Mie,Nie=Die,Rie=di,Fie=Rt,zie=Nt,Bie=Nie,Sf=Array.prototype,Lie={DOMTokenList:!0,NodeList:!0},jie=function(t){var r=t.keys;return t===Sf||zie(Sf,t)&&r===Sf.keys||Fie(Lie,Rie(t))?Bie:r},Hie=jie,ro=Ee(Hie),r5=E8,Wie=Math.floor,Dp=function(t,r){var e=t.length,n=Wie(e/2);return e<8?qie(t,r):Uie(t,Dp(r5(t,0,n),r),Dp(r5(t,n),r),r)},qie=function(t,r){for(var e=t.length,n=1,i,a;n0;)t[a]=t[--a];a!==n++&&(t[a]=i)}return t},Uie=function(t,r,e,n){for(var i=r.length,a=e.length,o=0,s=0;o3)){if(aae)return!0;if(u5)return u5<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;io5(e)?1:-1}};Qie({target:"Array",proto:!0,forced:cae},{sort:function(r){r!==void 0&&eae(r);var e=tae(this);if(kk)return r===void 0?c5(e):c5(e,r);var n=[],i=a5(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=xJ(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,n;xa(e=jx(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 voe(t,r){var e;if(t){if(typeof t=="string")return v5(t,r);var n=c0(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return $1(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v5(t,r)}}function v5(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=If(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 poe(t,r){var e;if(t){if(typeof t=="string")return y5(t,r);var n=c0(e=Object.prototype.toString.call(t)).call(e,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return $1(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y5(t,r)}}function y5(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 yoe(t,r){return t[r]==null&&(t[r]=Kae()),t}var hh=function(t){NQ(e,t);var r=moe(e);function e(n,i){var a;return Bh(this,e),a=r.call(this),Ii(N9(a),"_queue",null),n&&!Nr(n)&&(i=n,n=[]),a._options=i||{},a._data=new $k,a.length=0,a._idProp=a._options.fieldId||"id",n&&n.length&&a.add(n),a.setOptions(i),a}return a0(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=Yae.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(Pie(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=Cf(h5(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"&&Fp!==void 0,Ik={all:Fp,IS_HTMLDDA:_oe},Ck=Ik,Ooe=Ck.all,qt=Ck.IS_HTMLDDA?function(t){return typeof t=="function"||t===Ooe}:function(t){return typeof t=="function"},us={},Ioe=Ve,Ut=!Ioe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Coe=Yl,rc=Function.prototype.call,jr=Coe?rc.bind(rc):function(){return rc.apply(rc,arguments)},p0={},Pk={}.propertyIsEnumerable,Ak=Object.getOwnPropertyDescriptor,Poe=Ak&&!Pk.call({1:2},1);p0.f=Poe?function(r){var e=Ak(this,r);return!!e&&e.enumerable}:Pk;var Jl=function(t,r){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:r}},Aoe=Ke,Moe=Ve,Doe=fi,Af=Object,Noe=Aoe("".split),m0=Moe(function(){return!Af("z").propertyIsEnumerable(0)})?function(t){return Doe(t)==="String"?Noe(t,""):Af(t)}:Af,cs=function(t){return t==null},Roe=cs,Foe=TypeError,Zl=function(t){if(Roe(t))throw new Foe("Can't call method on "+t);return t},zoe=m0,Boe=Zl,zn=function(t){return zoe(Boe(t))},$5=qt,Mk=Ik,Loe=Mk.all,Vt=Mk.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:$5(t)||t===Loe}:function(t){return typeof t=="object"?t!==null:$5(t)},Ge={},Mf=Ge,Df=xt,joe=qt,x5=function(t){return joe(t)?t:void 0},nn=function(t,r){return arguments.length<2?x5(Mf[t])||x5(Df[t]):Mf[t]&&Mf[t][r]||Df[t]&&Df[t][r]},Hoe=Ke,It=Hoe({}.isPrototypeOf),Ql=typeof navigator<"u"&&String(navigator.userAgent)||"",Dk=xt,Nf=Ql,k5=Dk.process,S5=Dk.Deno,E5=k5&&k5.versions||S5&&S5.version,T5=E5&&E5.v8,hn,dh;T5&&(hn=T5.split("."),dh=hn[0]>0&&hn[0]<4?1:+(hn[0]+hn[1]));!dh&&Nf&&(hn=Nf.match(/Edge\/(\d+)/),(!hn||hn[1]>=74)&&(hn=Nf.match(/Chrome\/(\d+)/),hn&&(dh=+hn[1])));var eu=dh,_5=eu,Woe=Ve,qoe=xt,Uoe=qoe.String,hs=!!Object.getOwnPropertySymbols&&!Woe(function(){var t=Symbol("symbol detection");return!Uoe(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&_5&&_5<41}),Voe=hs,Nk=Voe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Goe=nn,Koe=qt,Yoe=It,Xoe=Nk,Joe=Object,tu=Xoe?function(t){return typeof t=="symbol"}:function(t){var r=Goe("Symbol");return Koe(r)&&Yoe(r.prototype,Joe(t))},Zoe=String,ds=function(t){try{return Zoe(t)}catch{return"Object"}},Qoe=qt,ese=ds,tse=TypeError,La=function(t){if(Qoe(t))return t;throw new tse(ese(t)+" is not a function")},rse=La,nse=cs,W1=function(t,r){var e=t[r];return nse(e)?void 0:rse(e)},Rf=jr,Ff=qt,zf=Vt,ise=TypeError,ase=function(t,r){var e,n;if(r==="string"&&Ff(e=t.toString)&&!zf(n=Rf(e,t))||Ff(e=t.valueOf)&&!zf(n=Rf(e,t))||r!=="string"&&Ff(e=t.toString)&&!zf(n=Rf(e,t)))return n;throw new ise("Can't convert object to primitive value")},Rk={exports:{}},O5=xt,ose=Object.defineProperty,sse=function(t,r){try{ose(O5,t,{value:r,configurable:!0,writable:!0})}catch{O5[t]=r}return r},lse=xt,use=sse,I5="__core-js_shared__",cse=lse[I5]||use(I5,{}),q1=cse,C5=q1;(Rk.exports=function(t,r){return C5[t]||(C5[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=Rk.exports,hse=Zl,dse=Object,Cr=function(t){return dse(hse(t))},fse=Ke,vse=Cr,pse=fse({}.hasOwnProperty),Gt=Object.hasOwn||function(r,e){return pse(vse(r),e)},mse=Ke,gse=0,yse=Math.random(),bse=mse(1 .toString),g0=function(t){return"Symbol("+(t===void 0?"":t)+")_"+bse(++gse+yse,36)},wse=xt,$se=fs,P5=Gt,xse=g0,kse=hs,Sse=Nk,bo=wse.Symbol,Bf=$se("wks"),Ese=Sse?bo.for||bo:bo&&bo.withoutSetter||xse,kt=function(t){return P5(Bf,t)||(Bf[t]=kse&&P5(bo,t)?bo[t]:Ese("Symbol."+t)),Bf[t]},Tse=jr,A5=Vt,M5=tu,_se=W1,Ose=ase,Ise=kt,Cse=TypeError,Pse=Ise("toPrimitive"),Ase=function(t,r){if(!A5(t)||M5(t))return t;var e=_se(t,Pse),n;if(e){if(r===void 0&&(r="default"),n=Tse(e,t,r),!A5(n)||M5(n))return n;throw new Cse("Can't convert object to primitive value")}return r===void 0&&(r="number"),Ose(t,r)},Mse=Ase,Dse=tu,y0=function(t){var r=Mse(t,"string");return Dse(r)?r:r+""},Nse=xt,D5=Vt,zp=Nse.document,Rse=D5(zp)&&D5(zp.createElement),Fk=function(t){return Rse?zp.createElement(t):{}},Fse=Ut,zse=Ve,Bse=Fk,zk=!Fse&&!zse(function(){return Object.defineProperty(Bse("div"),"a",{get:function(){return 7}}).a!==7}),Lse=Ut,jse=jr,Hse=p0,Wse=Jl,qse=zn,Use=y0,Vse=Gt,Gse=zk,N5=Object.getOwnPropertyDescriptor;us.f=Lse?N5:function(r,e){if(r=qse(r),e=Use(e),Gse)try{return N5(r,e)}catch{}if(Vse(r,e))return Wse(!jse(Hse.f,r,e),r[e])};var Kse=Ve,Yse=qt,Xse=/#|\.prototype\./,ru=function(t,r){var e=Zse[Jse(t)];return e===ele?!0:e===Qse?!1:Yse(r)?Kse(r):!!r},Jse=ru.normalize=function(t){return String(t).replace(Xse,".").toLowerCase()},Zse=ru.data={},Qse=ru.NATIVE="N",ele=ru.POLYFILL="P",tle=ru,R5=H1,rle=La,nle=Yl,ile=R5(R5.bind),nu=function(t,r){return rle(t),r===void 0?t:nle?ile(t,r):function(){return t.apply(r,arguments)}},Hr={},ale=Ut,ole=Ve,Bk=ale&&ole(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),sle=Vt,lle=String,ule=TypeError,Wr=function(t){if(sle(t))return t;throw new ule(lle(t)+" is not an object")},cle=Ut,hle=zk,dle=Bk,nc=Wr,F5=y0,fle=TypeError,Lf=Object.defineProperty,vle=Object.getOwnPropertyDescriptor,jf="enumerable",Hf="configurable",Wf="writable";Hr.f=cle?dle?function(r,e,n){if(nc(r),e=F5(e),nc(n),typeof r=="function"&&e==="prototype"&&"value"in n&&Wf in n&&!n[Wf]){var i=vle(r,e);i&&i[Wf]&&(r[e]=n.value,n={configurable:Hf in n?n[Hf]:i[Hf],enumerable:jf in n?n[jf]:i[jf],writable:!1})}return Lf(r,e,n)}:Lf:function(r,e,n){if(nc(r),e=F5(e),nc(n),hle)try{return Lf(r,e,n)}catch{}if("get"in n||"set"in n)throw new fle("Accessors not supported");return"value"in n&&(r[e]=n.value),r};var ple=Ut,mle=Hr,gle=Jl,vs=ple?function(t,r,e){return mle.f(t,r,gle(1,e))}:function(t,r,e){return t[r]=e,t},ic=xt,yle=Xl,ble=H1,wle=qt,$le=us.f,xle=tle,no=Ge,kle=nu,io=vs,z5=Gt,Sle=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 yle(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,g,b,y;for(d in r)u=xle(n?d:e+(i?".":"#")+d,t.forced),c=!u&&o&&z5(o,d),v=s[d],c&&(t.dontCallGetSet?(y=$le(o,d),g=y&&y.value):g=o[d]),f=c&&g?g:r[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=kle(f,ic):t.wrap&&c?b=Sle(f):a&&wle(f)?b=ble(f):b=f,(t.sham||f&&f.sham||v&&v.sham)&&io(b,"sham",!0),io(s,d,b),a&&(h=e+"Prototype",z5(no,h)||io(no,h,{}),io(no[h],d,f),t.real&&l&&(u||!l[d])&&io(l,d,f)))},Ele=Math.ceil,Tle=Math.floor,_le=Math.trunc||function(r){var e=+r;return(e>0?Tle:Ele)(e)},Ole=_le,b0=function(t){var r=+t;return r!==r||r===0?0:Ole(r)},Ile=b0,Cle=Math.max,Ple=Math.min,iu=function(t,r){var e=Ile(t);return e<0?Cle(e+r,0):Ple(e,r)},Ale=b0,Mle=Math.min,Dle=function(t){return t>0?Mle(Ale(t),9007199254740991):0},Nle=Dle,an=function(t){return Nle(t.length)},Rle=zn,Fle=iu,zle=an,B5=function(t){return function(r,e,n){var i=Rle(r),a=zle(i),o=Fle(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}},U1={includes:B5(!0),indexOf:B5(!1)},au={},Ble=Ke,qf=Gt,Lle=zn,jle=U1.indexOf,Hle=au,L5=Ble([].push),Lk=function(t,r){var e=Lle(t),n=0,i=[],a;for(a in e)!qf(Hle,a)&&qf(e,a)&&L5(i,a);for(;r.length>n;)qf(e,a=r[n++])&&(~jle(i,a)||L5(i,a));return i},V1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Wle=Lk,qle=V1,w0=Object.keys||function(r){return Wle(r,qle)},ou={};ou.f=Object.getOwnPropertySymbols;var j5=Ut,Ule=Ke,Vle=jr,Gle=Ve,Uf=w0,Kle=ou,Yle=p0,Xle=Cr,Jle=m0,ao=Object.assign,H5=Object.defineProperty,Zle=Ule([].concat),Qle=!ao||Gle(function(){if(j5&&ao({b:1},ao(H5({},"a",{enumerable:!0,get:function(){H5(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||Uf(ao({},r)).join("")!==n})?function(r,e){for(var n=Xle(r),i=arguments.length,a=1,o=Kle.f,s=Yle.f;i>a;)for(var l=Jle(arguments[a++]),u=o?Zle(Uf(l),o(l)):Uf(l),c=u.length,h=0,d;c>h;)d=u[h++],(!j5||Vle(s,l,d))&&(n[d]=l[d]);return n}:ao,eue=ke,W5=Qle;eue({target:"Object",stat:!0,arity:2,forced:Object.assign!==W5},{assign:W5});var tue=Ge,rue=tue.Object.assign,nue=rue,iue=nue,aue=iue,At=ve(aue),oue=Ke,$0=oue([].slice),jk=Ke,sue=La,lue=Vt,uue=Gt,q5=$0,cue=Yl,Hk=Function,hue=jk([].concat),due=jk([].join),Vf={},fue=function(t,r,e){if(!uue(Vf,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 Oue(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=G5(n,i),o<55296||o>56319||i+1===a||(s=G5(n,i+1))<56320||s>57343?t?Uue(n,i):o:t?Vue(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Gue={codeAt:K5(!1),charAt:K5(!0)},Kue=xt,Yue=qt,Y5=Kue.WeakMap,Jk=Yue(Y5)&&/native code/.test(String(Y5)),Xue=fs,Jue=g0,X5=Xue("keys"),x0=function(t){return X5[t]||(X5[t]=Jue(t))},Zue=Jk,Zk=xt,Que=Vt,ece=vs,Kf=Gt,Yf=q1,tce=x0,rce=au,J5="Object already initialized",Lp=Zk.TypeError,nce=Zk.WeakMap,fh,vl,vh,ice=function(t){return vh(t)?vl(t):fh(t,{})},ace=function(t){return function(r){var e;if(!Que(r)||(e=vl(r)).type!==t)throw new Lp("Incompatible receiver, "+t+" required");return e}};if(Zue||Yf.state){var $n=Yf.state||(Yf.state=new nce);$n.get=$n.get,$n.has=$n.has,$n.set=$n.set,fh=function(t,r){if($n.has(t))throw new Lp(J5);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=tce("state");rce[oo]=!0,fh=function(t,r){if(Kf(t,oo))throw new Lp(J5);return r.facade=t,ece(t,oo,r),r},vl=function(t){return Kf(t,oo)?t[oo]:{}},vh=function(t){return Kf(t,oo)}}var Ha={set:fh,get:vl,has:vh,enforce:ice,getterFor:ace},jp=Ut,oce=Gt,Qk=Function.prototype,sce=jp&&Object.getOwnPropertyDescriptor,X1=oce(Qk,"name"),lce=X1&&(function(){}).name==="something",uce=X1&&(!jp||jp&&sce(Qk,"name").configurable),cce={EXISTS:X1,PROPER:lce,CONFIGURABLE:uce},k0={},hce=Ut,dce=Bk,fce=Hr,vce=Wr,pce=zn,mce=w0;k0.f=hce&&!dce?Object.defineProperties:function(r,e){vce(r);for(var n=pce(e),i=mce(e),a=i.length,o=0,s;a>o;)fce.f(r,s=i[o++],n[s]);return r};var gce=nn,yce=gce("document","documentElement"),bce=Wr,wce=k0,Z5=V1,$ce=au,xce=yce,kce=Fk,Sce=x0,Q5=">",e3="<",Hp="prototype",Wp="script",eS=Sce("IE_PROTO"),Xf=function(){},tS=function(t){return e3+Wp+Q5+t+e3+"/"+Wp+Q5},t3=function(t){t.write(tS("")),t.close();var r=t.parentWindow.Object;return t=null,r},Ece=function(){var t=kce("iframe"),r="java"+Wp+":",e;return t.style.display="none",xce.appendChild(t),t.src=String(r),e=t.contentWindow.document,e.open(),e.write(tS("document.F=Object")),e.close(),e.F},ac,Dc=function(){try{ac=new ActiveXObject("htmlfile")}catch{}Dc=typeof document<"u"?document.domain&&ac?t3(ac):Ece():t3(ac);for(var t=Z5.length;t--;)delete Dc[Hp][Z5[t]];return Dc()};$ce[eS]=!0;var ps=Object.create||function(r,e){var n;return r!==null?(Xf[Hp]=bce(r),n=new Xf,Xf[Hp]=null,n[eS]=r):n=Dc(),e===void 0?n:wce.f(n,e)},Tce=Ve,rS=!Tce(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),_ce=Gt,Oce=qt,Ice=Cr,Cce=x0,Pce=rS,r3=Cce("IE_PROTO"),qp=Object,Ace=qp.prototype,S0=Pce?qp.getPrototypeOf:function(t){var r=Ice(t);if(_ce(r,r3))return r[r3];var e=r.constructor;return Oce(e)&&r instanceof e?e.prototype:r instanceof qp?Ace:null},Mce=vs,su=function(t,r,e,n){return n&&n.enumerable?t[r]=e:Mce(t,r,e),t},Dce=Ve,Nce=qt,Rce=Vt,Fce=ps,n3=S0,zce=su,Bce=kt,Up=Bce("iterator"),nS=!1,Jn,Jf,Zf;[].keys&&(Zf=[].keys(),"next"in Zf?(Jf=n3(n3(Zf)),Jf!==Object.prototype&&(Jn=Jf)):nS=!0);var Lce=!Rce(Jn)||Dce(function(){var t={};return Jn[Up].call(t)!==t});Lce?Jn={}:Jn=Fce(Jn);Nce(Jn[Up])||zce(Jn,Up,function(){return this});var iS={IteratorPrototype:Jn,BUGGY_SAFARI_ITERATORS:nS},jce=K1,Hce=ja,Wce=jce?{}.toString:function(){return"[object "+Hce(this)+"]"},qce=K1,Uce=Hr.f,Vce=vs,Gce=Gt,Kce=Wce,Yce=kt,i3=Yce("toStringTag"),ms=function(t,r,e,n){if(t){var i=e?t:t.prototype;Gce(i,i3)||Uce(i,i3,{configurable:!0,value:r}),n&&!qce&&Vce(i,"toString",Kce)}},gs={},Xce=iS.IteratorPrototype,Jce=ps,Zce=Jl,Qce=ms,ehe=gs,the=function(){return this},rhe=function(t,r,e,n){var i=r+" Iterator";return t.prototype=Jce(Xce,{next:Zce(+!n,e)}),Qce(t,i,!1,!0),ehe[i]=the,t},nhe=Ke,ihe=La,ahe=function(t,r,e){try{return nhe(ihe(Object.getOwnPropertyDescriptor(t,r)[e]))}catch{}},ohe=qt,she=String,lhe=TypeError,uhe=function(t){if(typeof t=="object"||ohe(t))return t;throw new lhe("Can't set "+she(t)+" as a prototype")},che=ahe,hhe=Wr,dhe=uhe,fhe=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,r={},e;try{e=che(Object.prototype,"__proto__","set"),e(r,[]),t=r instanceof Array}catch{}return function(i,a){return hhe(i),dhe(a),t?e(i,a):i.__proto__=a,i}}():void 0),vhe=ke,phe=jr,mhe=cce,ghe=rhe,yhe=S0,bhe=ms,a3=su,whe=kt,o3=gs,$he=iS,xhe=mhe.PROPER,oc=$he.BUGGY_SAFARI_ITERATORS,Qf=whe("iterator"),s3="keys",sc="values",l3="entries",khe=function(){return this},J1=function(t,r,e,n,i,a,o){ghe(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 s3:return function(){return new e(this,y)};case sc:return function(){return new e(this,y)};case l3:return function(){return new e(this,y)}}return function(){return new e(this)}},l=r+" Iterator",u=!1,c=t.prototype,h=c[Qf]||c["@@iterator"]||i&&c[i],d=!oc&&h||s(i),f=r==="Array"&&c.entries||h,v,g,b;if(f&&(v=yhe(f.call(new t)),v!==Object.prototype&&v.next&&(bhe(v,l,!0,!0),o3[l]=khe)),xhe&&i===sc&&h&&h.name!==sc&&(u=!0,d=function(){return phe(h,this)}),i)if(g={values:s(sc),keys:a?d:s(s3),entries:s(l3)},o)for(b in g)(oc||u||!(b in c))&&a3(c,b,g[b]);else vhe({target:r,proto:!0,forced:oc||u},g);return o&&c[Qf]!==d&&a3(c,Qf,d,{name:i}),o3[r]=d,g},Z1=function(t,r){return{value:t,done:r}},She=Gue.charAt,Ehe=Bn,aS=Ha,The=J1,u3=Z1,oS="String Iterator",_he=aS.set,Ohe=aS.getterFor(oS);The(String,"String",function(t){_he(this,{type:oS,string:Ehe(t),index:0})},function(){var r=Ohe(this),e=r.string,n=r.index,i;return n>=e.length?u3(void 0,!0):(i=She(e,n),r.index+=i.length,u3(i,!1))});var Ihe=jr,c3=Wr,Che=W1,sS=function(t,r,e){var n,i;c3(t);try{if(n=Che(t,"return"),!n){if(r==="throw")throw e;return e}n=Ihe(n,t)}catch(a){i=!0,n=a}if(r==="throw")throw e;if(i)throw n;return c3(n),e},Phe=Wr,Ahe=sS,Mhe=function(t,r,e,n){try{return n?r(Phe(e)[0],e[1]):r(e)}catch(i){Ahe(t,"throw",i)}},Dhe=kt,Nhe=gs,Rhe=Dhe("iterator"),Fhe=Array.prototype,lS=function(t){return t!==void 0&&(Nhe.Array===t||Fhe[Rhe]===t)},zhe=Ke,Bhe=qt,Vp=q1,Lhe=zhe(Function.toString);Bhe(Vp.inspectSource)||(Vp.inspectSource=function(t){return Lhe(t)});var jhe=Vp.inspectSource,Hhe=Ke,Whe=Ve,uS=qt,qhe=ja,Uhe=nn,Vhe=jhe,cS=function(){},Ghe=[],hS=Uhe("Reflect","construct"),Q1=/^\s*(?:class|function)\b/,Khe=Hhe(Q1.exec),Yhe=!Q1.test(cS),Is=function(r){if(!uS(r))return!1;try{return hS(cS,Ghe,r),!0}catch{return!1}},dS=function(r){if(!uS(r))return!1;switch(qhe(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Yhe||!!Khe(Q1,Vhe(r))}catch{return!0}};dS.sham=!0;var E0=!hS||Whe(function(){var t;return Is(Is.call)||!Is(Object)||!Is(function(){t=!0})||t})?dS:Is,Xhe=y0,Jhe=Hr,Zhe=Jl,ys=function(t,r,e){var n=Xhe(r);n in t?Jhe.f(t,n,Zhe(0,e)):t[n]=e},Qhe=ja,h3=W1,e0e=cs,t0e=gs,r0e=kt,n0e=r0e("iterator"),T0=function(t){if(!e0e(t))return h3(t,n0e)||h3(t,"@@iterator")||t0e[Qhe(t)]},i0e=jr,a0e=La,o0e=Wr,s0e=ds,l0e=T0,u0e=TypeError,fS=function(t,r){var e=arguments.length<2?l0e(t):r;if(a0e(e))return o0e(i0e(e,t));throw new u0e(s0e(t)+" is not iterable")},c0e=nu,h0e=jr,d0e=Cr,f0e=Mhe,v0e=lS,p0e=E0,m0e=an,d3=ys,g0e=fS,y0e=T0,f3=Array,b0e=function(r){var e=d0e(r),n=p0e(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=c0e(a,i>2?arguments[2]:void 0));var s=y0e(e),l=0,u,c,h,d,f,v;if(s&&!(this===f3&&v0e(s)))for(d=g0e(e,s),f=d.next,c=n?new this:[];!(h=h0e(f,d)).done;l++)v=o?f0e(d,a,[h.value,l],!0):h.value,d3(c,l,v);else for(u=m0e(e),c=n?new this(u):f3(u);u>l;l++)v=o?a(e[l],l):e[l],d3(c,l,v);return c.length=l,c},w0e=kt,vS=w0e("iterator"),pS=!1;try{var $0e=0,v3={next:function(){return{done:!!$0e++}},return:function(){pS=!0}};v3[vS]=function(){return this},Array.from(v3,function(){throw 2})}catch{}var x0e=function(t,r){try{if(!r&&!pS)return!1}catch{return!1}var e=!1;try{var n={};n[vS]=function(){return{next:function(){return{done:e=!0}}}},t(n)}catch{}return e},k0e=ke,S0e=b0e,E0e=x0e,T0e=!E0e(function(t){Array.from(t)});k0e({target:"Array",stat:!0,forced:T0e},{from:S0e});var _0e=Ge,O0e=_0e.Array.from,I0e=O0e,mS=I0e,C0e=mS,Wa=ve(C0e),P0e=zn,p3=gs,gS=Ha;Hr.f;var A0e=J1,lc=Z1,yS="Array Iterator",M0e=gS.set,D0e=gS.getterFor(yS);A0e(Array,"Array",function(t,r){M0e(this,{type:yS,target:P0e(t),index:0,kind:r})},function(){var t=D0e(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");p3.Arguments=p3.Array;var N0e=T0,R0e=N0e,F0e={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},z0e=F0e,B0e=xt,L0e=ja,j0e=vs,m3=gs,H0e=kt,g3=H0e("toStringTag");for(var ev in z0e){var y3=B0e[ev],tv=y3&&y3.prototype;tv&&L0e(tv)!==g3&&j0e(tv,g3,ev),m3[ev]=m3.Array}var W0e=R0e,q0e=W0e,U0e=q0e,V0e=U0e,G0e=V0e,K0e=G0e,bS=K0e,wS=ve(bS),Y0e=bS,qa=ve(Y0e);function re(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var $S={exports:{}},X0e=ke,J0e=Ut,b3=Hr.f;X0e({target:"Object",stat:!0,forced:Object.defineProperty!==b3,sham:!J0e},{defineProperty:b3});var Z0e=Ge,xS=Z0e.Object,Q0e=$S.exports=function(r,e,n){return xS.defineProperty(r,e,n)};xS.defineProperty.sham&&(Q0e.sham=!0);var ede=$S.exports,tde=ede,kS=tde,rde=kS,nde=rde,ide=nde,ade=ide,ode=ade,_0=ve(ode),sde=fi,Ua=Array.isArray||function(r){return sde(r)==="Array"},lde=TypeError,ude=9007199254740991,eg=function(t){if(t>ude)throw lde("Maximum allowed index exceeded");return t},w3=Ua,cde=E0,hde=Vt,dde=kt,fde=dde("species"),$3=Array,vde=function(t){var r;return w3(t)&&(r=t.constructor,cde(r)&&(r===$3||w3(r.prototype))?r=void 0:hde(r)&&(r=r[fde],r===null&&(r=void 0))),r===void 0?$3:r},pde=vde,tg=function(t,r){return new(pde(t))(r===0?0:r)},mde=Ve,gde=kt,yde=eu,bde=gde("species"),lu=function(t){return yde>=51||!mde(function(){var r=[],e=r.constructor={};return e[bde]=function(){return{foo:1}},r[t](Boolean).foo!==1})},wde=ke,$de=Ve,xde=Ua,kde=Vt,Sde=Cr,Ede=an,x3=eg,k3=ys,Tde=tg,_de=lu,Ode=kt,Ide=eu,SS=Ode("isConcatSpreadable"),Cde=Ide>=51||!$de(function(){var t=[];return t[SS]=!1,t.concat()[0]!==t}),Pde=function(t){if(!kde(t))return!1;var r=t[SS];return r!==void 0?!!r:xde(t)},Ade=!Cde||!_de("concat");wde({target:"Array",proto:!0,arity:1,forced:Ade},{concat:function(r){var e=Sde(this),n=Tde(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],T=v(k,b,d),t))if(r)$[b]=T;else if(T)switch(t){case 3:return!0;case 5:return k;case 6:return b;case 2:T3($,k)}else switch(t){case 4:return!1;case 7:T3($,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)},I0=ke,C0=xt,ng=jr,afe=Ke,zo=Ut,Bo=hs,ofe=Ve,jt=Gt,sfe=It,Gp=Wr,P0=zn,ig=y0,lfe=Bn,Kp=Jl,pl=ps,IS=w0,ufe=uu,CS=O0,cfe=ou,PS=us,AS=Hr,hfe=k0,MS=p0,_3=su,dfe=rg,ag=fs,ffe=x0,DS=au,O3=g0,vfe=kt,pfe=cu,mfe=St,gfe=OS,yfe=ms,NS=Ha,A0=Yi.forEach,xr=ffe("hidden"),M0="Symbol",ml="prototype",bfe=NS.set,I3=NS.getterFor(M0),vn=Object[ml],pa=C0.Symbol,Rs=pa&&pa[ml],wfe=C0.RangeError,$fe=C0.TypeError,rv=C0.QObject,RS=PS.f,ma=AS.f,FS=CS.f,xfe=MS.f,zS=afe([].push),si=ag("symbols"),hu=ag("op-symbols"),kfe=ag("wks"),Yp=!rv||!rv[ml]||!rv[ml].findChild,BS=function(t,r,e){var n=RS(vn,r);n&&delete vn[r],ma(t,r,e),n&&t!==vn&&ma(vn,r,n)},Xp=zo&&ofe(function(){return pl(ma({},"a",{get:function(){return ma(this,"a",{value:7}).a}})).a!==7})?BS:ma,nv=function(t,r){var e=si[t]=pl(Rs);return bfe(e,{type:M0,tag:t,description:r}),zo||(e.description=r),e},D0=function(r,e,n){r===vn&&D0(hu,e,n),Gp(r);var i=ig(e);return Gp(n),jt(si,i)?(n.enumerable?(jt(r,xr)&&r[xr][i]&&(r[xr][i]=!1),n=pl(n,{enumerable:Kp(0,!1)})):(jt(r,xr)||ma(r,xr,Kp(1,{})),r[xr][i]=!0),Xp(r,i,n)):ma(r,i,n)},og=function(r,e){Gp(r);var n=P0(e),i=IS(n).concat(WS(n));return A0(i,function(a){(!zo||ng(LS,n,a))&&D0(r,a,n[a])}),r},Sfe=function(r,e){return e===void 0?pl(r):og(pl(r),e)},LS=function(r){var e=ig(r),n=ng(xfe,this,e);return this===vn&&jt(si,e)&&!jt(hu,e)?!1:n||!jt(this,e)||!jt(si,e)||jt(this,xr)&&this[xr][e]?n:!0},jS=function(r,e){var n=P0(r),i=ig(e);if(!(n===vn&&jt(si,i)&&!jt(hu,i))){var a=RS(n,i);return a&&jt(si,i)&&!(jt(n,xr)&&n[xr][i])&&(a.enumerable=!0),a}},HS=function(r){var e=FS(P0(r)),n=[];return A0(e,function(i){!jt(si,i)&&!jt(DS,i)&&zS(n,i)}),n},WS=function(t){var r=t===vn,e=FS(r?hu:P0(t)),n=[];return A0(e,function(i){jt(si,i)&&(!r||jt(vn,i))&&zS(n,si[i])}),n};Bo||(pa=function(){if(sfe(Rs,this))throw new $fe("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:lfe(arguments[0]),e=O3(r),n=function(i){this===vn&&ng(n,hu,i),jt(this,xr)&&jt(this[xr],e)&&(this[xr][e]=!1);var a=Kp(1,i);try{Xp(this,e,a)}catch(o){if(!(o instanceof wfe))throw o;BS(this,e,a)}};return zo&&Yp&&Xp(vn,e,{configurable:!0,set:n}),nv(e,r)},Rs=pa[ml],_3(Rs,"toString",function(){return I3(this).tag}),_3(pa,"withoutSetter",function(t){return nv(O3(t),t)}),MS.f=LS,AS.f=D0,hfe.f=og,PS.f=jS,ufe.f=CS.f=HS,cfe.f=WS,pfe.f=function(t){return nv(vfe(t),t)},zo&&dfe(Rs,"description",{configurable:!0,get:function(){return I3(this).description}}));I0({global:!0,constructor:!0,wrap:!0,forced:!Bo,sham:!Bo},{Symbol:pa});A0(IS(kfe),function(t){mfe(t)});I0({target:M0,stat:!0,forced:!Bo},{useSetter:function(){Yp=!0},useSimple:function(){Yp=!1}});I0({target:"Object",stat:!0,forced:!Bo,sham:!zo},{create:Sfe,defineProperty:D0,defineProperties:og,getOwnPropertyDescriptor:jS});I0({target:"Object",stat:!0,forced:!Bo},{getOwnPropertyNames:HS});gfe();yfe(pa,M0);DS[xr]=!0;var Efe=hs,qS=Efe&&!!Symbol.for&&!!Symbol.keyFor,Tfe=ke,_fe=nn,Ofe=Gt,Ife=Bn,US=fs,Cfe=qS,iv=US("string-to-symbol-registry"),Pfe=US("symbol-to-string-registry");Tfe({target:"Symbol",stat:!0,forced:!Cfe},{for:function(t){var r=Ife(t);if(Ofe(iv,r))return iv[r];var e=_fe("Symbol")(r);return iv[r]=e,Pfe[e]=r,e}});var Afe=ke,Mfe=Gt,Dfe=tu,Nfe=ds,Rfe=fs,Ffe=qS,C3=Rfe("symbol-to-string-registry");Afe({target:"Symbol",stat:!0,forced:!Ffe},{keyFor:function(r){if(!Dfe(r))throw new TypeError(Nfe(r)+" is not a symbol");if(Mfe(C3,r))return C3[r]}});var zfe=Ke,P3=Ua,Bfe=qt,A3=fi,Lfe=Bn,M3=zfe([].push),jfe=function(t){if(Bfe(t))return t;if(P3(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 h1e=Kt,d1e=h1e("Array").map,f1e=It,v1e=d1e,cv=Array.prototype,p1e=function(t){var r=t.map;return t===cv||f1e(cv,t)&&r===cv.map?v1e:r},m1e=p1e,g1e=m1e,y1e=g1e,Lo=ve(y1e),b1e=ke,w1e=Cr,uE=w0,$1e=Ve,x1e=$1e(function(){uE(1)});b1e({target:"Object",stat:!0,forced:x1e},{keys:function(r){return uE(w1e(r))}});var k1e=Ge,S1e=k1e.Object.keys,E1e=S1e,T1e=E1e,_1e=T1e,yt=ve(_1e),O1e=ke,I1e=Ke,cE=Date,C1e=I1e(cE.prototype.getTime);O1e({target:"Date",stat:!0},{now:function(){return C1e(new cE)}});var P1e=Ge,A1e=P1e.Date.now,M1e=A1e,D1e=M1e,N1e=D1e,mh=ve(N1e),R1e=Ve,bs=function(t,r){var e=[][t];return!!e&&R1e(function(){e.call(null,r||function(){return 1},1)})},F1e=Yi.forEach,z1e=bs,B1e=z1e("forEach"),L1e=B1e?[].forEach:function(r){return F1e(this,r,arguments.length>1?arguments[1]:void 0)},j1e=ke,X3=L1e;j1e({target:"Array",proto:!0,forced:[].forEach!==X3},{forEach:X3});var H1e=Kt,W1e=H1e("Array").forEach,q1e=W1e,U1e=q1e,V1e=ja,G1e=Gt,K1e=It,Y1e=U1e,hv=Array.prototype,X1e={DOMTokenList:!0,NodeList:!0},J1e=function(t){var r=t.forEach;return t===hv||K1e(hv,t)&&r===hv.forEach||G1e(X1e,V1e(t))?Y1e:r},Z1e=J1e,rt=ve(Z1e),Q1e=ke,ege=Ke,tge=Ua,rge=ege([].reverse),J3=[1,2];Q1e({target:"Array",proto:!0,forced:String(J3)===String(J3.reverse())},{reverse:function(){return tge(this)&&(this.length=this.length),rge(this)}});var nge=Kt,ige=nge("Array").reverse,age=It,oge=ige,dv=Array.prototype,sge=function(t){var r=t.reverse;return t===dv||age(dv,t)&&r===dv.reverse?oge:r},lge=sge,uge=lge,cge=uge,ga=ve(cge),Z3=ds,hge=TypeError,hE=function(t,r){if(!delete t[r])throw new hge("Cannot delete property "+Z3(r)+" of "+Z3(t))},dge=ke,fge=Cr,vge=iu,pge=b0,mge=an,gge=aE,yge=eg,bge=tg,wge=ys,fv=hE,$ge=lu,xge=$ge("splice"),kge=Math.max,Sge=Math.min;dge({target:"Array",proto:!0,forced:!xge},{splice:function(r,e){var n=fge(this),i=mge(n),a=vge(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=Sge(kge(pge(e),0),i-a)),yge(i+s-l),u=bge(n,l),c=0;ci-l+s;c--)fv(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]:fv(n,d);for(c=0;c1?arguments[1]:void 0)}});var Fge=Kt,zge=Fge("Array").includes,Bge=Vt,Lge=fi,jge=kt,Hge=jge("match"),Wge=function(t){var r;return Bge(t)&&((r=t[Hge])!==void 0?!!r:Lge(t)==="RegExp")},qge=Wge,Uge=TypeError,Vge=function(t){if(qge(t))throw new Uge("The method doesn't accept regular expressions");return t},Gge=kt,Kge=Gge("match"),Yge=function(t){var r=/./;try{"/./"[t](r)}catch{try{return r[Kge]=!1,"/./"[t](r)}catch{}}return!1},Xge=ke,Jge=Ke,Zge=Vge,Qge=Zl,Q3=Bn,eye=Yge,tye=Jge("".indexOf);Xge({target:"String",proto:!0,forced:!eye("includes")},{includes:function(r){return!!~tye(Q3(Qge(this)),Q3(Zge(r)),arguments.length>1?arguments[1]:void 0)}});var rye=Kt,nye=rye("String").includes,e6=It,iye=zge,aye=nye,pv=Array.prototype,mv=String.prototype,oye=function(t){var r=t.includes;return t===pv||e6(pv,t)&&r===pv.includes?iye:typeof t=="string"||t===mv||e6(mv,t)&&r===mv.includes?aye:r},sye=oye,lye=sye,uye=lye,Ai=ve(uye),cye=ke,hye=Ve,dye=Cr,dE=S0,fye=rS,vye=hye(function(){dE(1)});cye({target:"Object",stat:!0,forced:vye,sham:!fye},{getPrototypeOf:function(r){return dE(dye(r))}});var pye=Ge,mye=pye.Object.getPrototypeOf,gye=mye,fE=gye,yye=fE,t6=ve(yye),bye=ke,wye=Yi.filter,$ye=lu,xye=$ye("filter");bye({target:"Array",proto:!0,forced:!xye},{filter:function(r){return wye(this,r,arguments.length>1?arguments[1]:void 0)}});var kye=Kt,Sye=kye("Array").filter,Eye=It,Tye=Sye,gv=Array.prototype,_ye=function(t){var r=t.filter;return t===gv||Eye(gv,t)&&r===gv.filter?Tye:r},Oye=_ye,Iye=Oye,Cye=Iye,kr=ve(Cye),ug=` -\v\f\r                 \u2028\u2029\uFEFF`,Pye=Ke,Aye=Zl,Mye=Bn,Zp=ug,r6=Pye("".replace),Dye=RegExp("^["+Zp+"]+"),Nye=RegExp("(^|[^"+Zp+"])["+Zp+"]+$"),yv=function(t){return function(r){var e=Mye(Aye(r));return t&1&&(e=r6(e,Dye,"")),t&2&&(e=r6(e,Nye,"$1")),e}},vE={start:yv(1),end:yv(2),trim:yv(3)},pE=xt,Rye=Ve,Fye=Ke,zye=Bn,Bye=vE.trim,n6=ug,Gs=pE.parseInt,i6=pE.Symbol,a6=i6&&i6.iterator,mE=/^[+-]?0x/i,Lye=Fye(mE.exec),jye=Gs(n6+"08")!==8||Gs(n6+"0x16")!==22||a6&&!Rye(function(){Gs(Object(a6))}),Hye=jye?function(r,e){var n=Bye(zye(r));return Gs(n,e>>>0||(Lye(mE,n)?16:10))}:Gs,Wye=ke,o6=Hye;Wye({global:!0,forced:parseInt!==o6},{parseInt:o6});var qye=Ge,Uye=qye.parseInt,Vye=Uye,Gye=Vye,Kye=Gye,dn=ve(Kye),Yye=ke,Xye=H1,Jye=U1.indexOf,Zye=bs,Qp=Xye([].indexOf),gE=!!Qp&&1/Qp([1],1,-0)<0,Qye=gE||!Zye("indexOf");Yye({target:"Array",proto:!0,forced:Qye},{indexOf:function(r){var e=arguments.length>1?arguments[1]:void 0;return gE?Qp(this,r,e)||0:Jye(this,r,e)}});var ebe=Kt,tbe=ebe("Array").indexOf,rbe=It,nbe=tbe,bv=Array.prototype,ibe=function(t){var r=t.indexOf;return t===bv||rbe(bv,t)&&r===bv.indexOf?nbe:r},abe=ibe,obe=abe,sbe=obe,Ue=ve(sbe),lbe=ke,ube=Ut,cbe=ps;lbe({target:"Object",stat:!0,sham:!ube},{create:cbe});var hbe=Ge,dbe=hbe.Object,fbe=function(r,e){return dbe.create(r,e)},vbe=fbe,yE=vbe,pbe=yE,ya=ve(pbe),em=Ge,mbe=Xl;em.JSON||(em.JSON={stringify:JSON.stringify});var gbe=function(r,e,n){return mbe(em.JSON.stringify,null,arguments)},ybe=gbe,bbe=ybe,wbe=bbe,fu=ve(wbe),$be=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",xbe=TypeError,kbe=function(t,r){if(te,o=Ebe(n)?n:Cbe(n),s=a?Obe(arguments,e):[],l=a?function(){Sbe(o,this,s)}:o;return r?t(l,i):t(l)}:t},Abe=ke,$E=xt,Mbe=wE,s6=Mbe($E.setInterval,!0);Abe({global:!0,bind:!0,forced:$E.setInterval!==s6},{setInterval:s6});var Dbe=ke,xE=xt,Nbe=wE,l6=Nbe(xE.setTimeout,!0);Dbe({global:!0,bind:!0,forced:xE.setTimeout!==l6},{setTimeout:l6});var Rbe=Ge,Fbe=Rbe.setTimeout,zbe=Fbe,Cn=ve(zbe),Bbe=Cr,u6=iu,Lbe=an,jbe=function(r){for(var e=Bbe(this),n=Lbe(e),i=arguments.length,a=u6(i>1?arguments[1]:void 0,n),o=i>2?arguments[2]:void 0,s=o===void 0?n:u6(o,n);s>a;)e[a++]=r;return e},Hbe=ke,Wbe=jbe;Hbe({target:"Array",proto:!0},{fill:Wbe});var qbe=Kt,Ube=qbe("Array").fill,Vbe=It,Gbe=Ube,wv=Array.prototype,Kbe=function(t){var r=t.fill;return t===wv||Vbe(wv,t)&&r===wv.fill?Gbe:r},Ybe=Kbe,Xbe=Ybe,Jbe=Xbe,vu=ve(Jbe);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 - * http://naver.github.io/egjs - * - * Forked By Naver egjs - * Copyright (c) hammerjs - * Licensed under the MIT license */function gn(){return gn=Object.assign||function(t){for(var r=1;r"u"?{style:{}}:document.createElement("div"),Qbe="function",$o=Math.round,Oa=Math.abs,cg=Date.now;function N0(t,r){for(var e,n,i=r[0].toUpperCase()+r.slice(1),a=0;a"u"?Qn={}:Qn=window;var kE=N0(Zbe.style,"touchAction"),SE=kE!==void 0;function e4e(){if(!SE)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 EE="compute",TE="auto",rm="manipulation",ba="none",gl="pan-x",yl="pan-y",hc=e4e(),t4e=/mobile|tablet|ip(ad|hone|od)|android/i,_E="ontouchstart"in Qn,r4e=N0(Qn,"PointerEvent")!==void 0,n4e=_E&&t4e.test(navigator.userAgent),pu="touch",i4e="pen",hg="mouse",a4e="kinect",o4e=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,OE=Pn|wa,IE=["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 s4e(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,rm)?rm:TE}var CE=function(){function t(e,n){this.manager=e,this.set(n)}var r=t.prototype;return r.set=function(n){n===EE&&(n=this.compute()),SE&&this.manager.element.style&&hc[n]&&(this.manager.element.style[kE]=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){R0(i.options.enable,[i])&&(n=n.concat(i.getTouchAction()))}),s4e(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 dg(t,r){for(;t;){if(t===r)return!0;t=t.parentNode}return!1}function PE(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 l4e(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 ME(t,r,e){return{x:r/t||0,y:e/t||0}}function u4e(t,r){return bh(r[0],r[1],yh)/bh(t[0],t[1],yh)}function c4e(t,r){return nm(r[1],r[0],yh)+nm(t[1],t[0],yh)}function h4e(t,r){var e=t.lastInterval||r,n=r.timeStamp-e.timeStamp,i,a,o,s;if(r.eventType!==Er&&(n>o4e||e.velocity===void 0)){var l=r.deltaX-e.deltaX,u=r.deltaY-e.deltaY,c=ME(n,l,u);a=c.x,o=c.y,i=Oa(c.x)>Oa(c.y)?c.x:c.y,s=AE(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 d4e(t,r){var e=t.session,n=r.pointers,i=n.length;e.firstInput||(e.firstInput=h6(r)),i>1&&!e.firstMultiple?e.firstMultiple=h6(r):i===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,l=r.center=PE(n);r.timeStamp=cg(),r.deltaTime=r.timeStamp-a.timeStamp,r.angle=nm(s,l),r.distance=bh(s,l),l4e(e,r),r.offsetDirection=AE(r.deltaX,r.deltaY);var u=ME(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?u4e(o.pointers,n):1,r.rotation=o?c4e(o.pointers,n):0,r.maxPointers=e.prevInput?r.pointers.length>e.prevInput.maxPointers?r.pointers.length:e.prevInput.maxPointers:r.pointers.length,h4e(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,dg(d,c)&&(c=d),r.target=c}function f4e(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,d4e(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 d6(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){R0(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(d6(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(d6(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 m4e={touchstart:cr,touchmove:Va,touchend:Mt,touchcancel:Er},g4e="touchstart touchmove touchend touchcancel",vg=function(t){on(r,t);function r(){var n;return r.prototype.evTarget=g4e,n=t.apply(this,arguments)||this,n.targetIds={},n}var e=r.prototype;return e.handler=function(i){var a=m4e[i.type],o=y4e.call(this,i,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:pu,srcEvent:i})},r}(ws);function y4e(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 dg(u.target,l)}),r===cr)for(i=0;i-1&&i.splice(s,1)};setTimeout(a,x4e)}}function k4e(t,r){t&cr?(this.primaryTouch=r.changedPointers[0].identifier,v6.call(this,r)):t&(Mt|Er)&&v6.call(this,r)}function S4e(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+p6(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=zE(i.direction);a&&(i.additionalEvent=this.options.event+a),t.prototype.emit.call(this,i)},r}(Wo),BE=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 mg.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=zE(i.offsetDirection);a&&this.manager.emit(this.options.event+a,i),this.manager.emit(this.options.event,i)},r}(Wo),LE=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),jE=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),HE=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[TE]},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=cg(),this.manager.emit(this.options.event,this._input)))},r}(bu),WE={domEvents:!1,touchAction:EE,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},m6=[[jE,{enable:!1}],[LE,{enable:!1},["rotate"]],[BE,{direction:Pn}],[mg,{direction:Pn},["swipe"]],[im],[im,{event:"doubletap",taps:2},["tap"]],[HE]],O4e=1,g6=2;function y6(t,r){var e=t.element;if(e.style){var n;ei(t.options.cssProps,function(i,a){n=N0(e.style,a),r?(t.oldCssProps[n]=e.style[n],e.style[n]=i):e.style[n]=t.oldCssProps[n]||""}),r||(t.oldCssProps={})}}function I4e(t,r){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=r,r.target.dispatchEvent(e)}var b6=function(){function t(e,n){var i=this;this.options=_a({},WE,n||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=E4e(this),this.touchAction=new CE(this,this.options.touchAction),y6(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?g6:O4e},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 UE=qE(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 z4e(t,r){var e;if(t){if(typeof t=="string")return $6(t,r);var n=Jt(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 $6(t,r)}}function $6(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 H4e(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var gg=typeof window<"u"?window.Hammer||F4e:function(){return H4e()};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=gg(this._dom.overlay);n.on("tap",J(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){n.destroy()});var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];rt(i).call(i,function(a){n.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){W4e(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()}}Yk(On.prototype);On.current=null;On.prototype.destroy=function(){var t,r;this.deactivate();var e=GE(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 W4e(t,r){for(;t;){if(t===r)return!0;t=t.parentNode}return!1}var q4e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,U4e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,V4e=/^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,G4e=/^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 x6(t){return Qe(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 KE(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||Qe(r[n])!=="object")Ca(t,r,n,e);else{var i=t[n],a=r[n];x6(i)&&x6(a)&&KE(i,a,e)}}function $s(t,r,e){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Je(e))throw new TypeError("Arrays are not supported by deepExtend");for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!1;if(Je(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(Je(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(Qe(r[i])==="object"&&r[i]!==null&&t6(r[i])===Object.prototype)t[i]===void 0?t[i]=st({},r[i],e):Qe(t[i])==="object"&&t[i]!==null&&t6(t[i])===Object.prototype?st(t[i],r[i],e):Ca(t,r,i,n);else if(Je(r[i])){var a;t[i]=Jt(a=r[i]).call(a)}else Ca(t,r,i,n);return t}function $h(t,r){var e;return lg(e=[]).call(e,Sn(t),[r])}function K4e(t){return Jt(t).call(t)}function Y4e(t){return t.getBoundingClientRect().left}function X4e(t){return t.getBoundingClientRect().top}function Ne(t,r){if(Je(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&&Qe(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 Q4e={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;Je(r)||(r=[r]);var n=GE(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;re(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 ne(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 e2e[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(JE(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(Z4e(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(XE(e)===!0){var l=yg(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=J(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=J(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=J(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=J(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 gg(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};re(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 t2e(i),this.wrapper=void 0}return ne(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(Je(e))this.options.filter=e.join();else if(Qe(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||Ue(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(sm("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&&Ue(e).call(e,n)!==-1&&(o=Ue(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&&!Je(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(Je(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),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,lm),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;Ue(v=h.toLowerCase()).call(v,u)!==-1&&(c=h),d=t.levenshteinDistance(e,h),o>d&&(s=h,l=K4e(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 = { -`,o=0;o":!0,"--":!0},Ei="",qo=0,De="",xe="",yr=ir.NULL;function c2e(){qo=0,De=Ei.charAt(0)}function Bt(){qo++,De=Ei.charAt(qo)}function so(){return Ei.charAt(qo+1)}function E6(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 h2e(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 eT(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=[]),Ue(s=l.nodes).call(s,i)===-1&&l.nodes.push(i)}r.attr&&(i.attr=Bi(i.attr,r.attr))}function d2e(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 tT(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=ir.NULL,xe="";De===" "||De===" "||De===` -`||De==="\r";)Bt();do{var t=!1;if(De==="#"){for(var r=qo-1;Ei.charAt(r)===" "||Ei.charAt(r)===" ";)r--;if(Ei.charAt(r)===` -`||Ei.charAt(r)===""){for(;De!=""&&De!=` -`;)Bt();t=!0}}if(De==="/"&&so()==="/"){for(;De!=""&&De!=` -`;)Bt();t=!0}if(De==="/"&&so()==="*"){for(;De!="";)if(De==="*"&&so()==="/"){Bt(),Bt();break}else Bt();t=!0}for(;De===" "||De===" "||De===` -`||De==="\r";)Bt()}while(t);if(De===""){yr=ir.DELIMITER;return}var e=De+so();if(S6[e]){yr=ir.DELIMITER,xe=e,Bt(),Bt();return}if(S6[De]){yr=ir.DELIMITER,xe=De,Bt();return}if(E6(De)||De==="-"){for(xe+=De,Bt();E6(De);)xe+=De,Bt();xe==="false"?xe=!1:xe==="true"?xe=!0:isNaN(Number(xe))||(xe=Number(xe)),yr=ir.IDENTIFIER;return}if(De==='"'){for(Bt();De!=""&&(De!='"'||De==='"'&&so()==='"');)De==='"'?(xe+=De,Bt()):De==="\\"&&so()==="n"?(xe+=` -`,Bt()):xe+=De,Bt();if(De!='"')throw ar('End of string " expected');Bt(),yr=ir.IDENTIFIER;return}for(yr=ir.UNKNOWN;De!="";)xe+=De,Bt();throw new SyntaxError('Syntax error in part "'+aT(xe,30)+'"')}function f2e(){var t={};if(c2e(),lt(),xe==="strict"&&(t.strict=!0,lt()),(xe==="graph"||xe==="digraph")&&(t.type=xe,lt()),yr===ir.IDENTIFIER&&(t.id=xe,lt()),xe!="{")throw ar("Angle bracket { expected");if(lt(),rT(t),xe!="}")throw ar("Angle bracket } expected");if(lt(),xe!=="")throw ar("End of file expected");return lt(),delete t.node,delete t.edge,delete t.graph,t}function rT(t){for(;xe!==""&&xe!="}";)v2e(t),xe===";"&<()}function v2e(t){var r=nT(t);if(r){iT(t,r);return}var e=p2e(t);if(!e){if(yr!=ir.IDENTIFIER)throw ar("Identifier expected");var n=xe;if(lt(),xe==="="){if(lt(),yr!=ir.IDENTIFIER)throw ar("Identifier expected");t[n]=xe,lt()}else m2e(t,n)}}function nT(t){var r=null;if(xe==="subgraph"&&(r={},r.type="subgraph",lt(),yr===ir.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,rT(r),xe!="}")throw ar("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 p2e(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 m2e(t,r){var e={id:r},n=Xs();n&&(e.attr=n),eT(t,e),iT(t,r)}function iT(t,r){for(;xe==="->"||xe==="--";){var e,n=xe;lt();var i=nT(t);if(i)e=i;else{if(yr!=ir.IDENTIFIER)throw ar("Identifier or subgraph expected");e=xe,eT(t,{id:e}),lt()}var a=Xs(),o=tT(t,r,e,n,a);d2e(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!=ir.IDENTIFIER)throw ar("Attribute name expected");var o=xe;if(lt(),xe!="=")throw ar("Equal sign = expected");if(lt(),yr!=ir.IDENTIFIER)throw ar("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 ar("Bracket ] expected");lt()}if(Ai(a).call(a,"dir")){var u={};for(u.arrows={},t=0;t"&&(l.arrows="to"),l};rt(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;rt(u=o.from.edges).call(u,function(h){var d=a(h);e.edges.push(d)})}if(g2e(s,l,function(h,d){var f=tT(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;rt(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 b2e(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 w2e={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"},$2e={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"},x2e={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"},k2e={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"},S2e={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"},E2e={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ó"},T2e={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},_2e={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},O2e={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},I2e={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"},C2e={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"},P2e=Object.freeze({__proto__:null,cn:_2e,cs:C2e,de:$2e,en:w2e,es:x2e,fr:I2e,it:k2e,nl:S2e,pt:E2e,ru:T2e,uk:O2e});function A2e(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(lg(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 M2e=function(){function t(){re(this,t),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return ne(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}(),D2e=function(){function t(r){re(this,t),this.images={},this.imageBroken={},this.callback=r}return ne(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 M2e;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}(),oT={exports:{}},N2e=Ve,R2e=N2e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),F2e=Ve,z2e=Vt,B2e=fi,_6=R2e,Fc=Object.isExtensible,L2e=F2e(function(){Fc(1)}),j2e=L2e||_6?function(r){return!z2e(r)||_6&&B2e(r)==="ArrayBuffer"?!1:Fc?Fc(r):!0}:Fc,H2e=Ve,sT=!H2e(function(){return Object.isExtensible(Object.preventExtensions({}))}),W2e=ke,q2e=Ke,U2e=au,V2e=Vt,wg=Gt,G2e=Hr.f,O6=uu,K2e=O0,$g=j2e,Y2e=g0,X2e=sT,lT=!1,li=Y2e("meta"),J2e=0,xg=function(t){G2e(t,li,{value:{objectID:"O"+J2e++,weakData:{}}})},Z2e=function(t,r){if(!V2e(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!wg(t,li)){if(!$g(t))return"F";if(!r)return"E";xg(t)}return t[li].objectID},Q2e=function(t,r){if(!wg(t,li)){if(!$g(t))return!0;if(!r)return!1;xg(t)}return t[li].weakData},e5e=function(t){return X2e&&lT&&$g(t)&&!wg(t,li)&&xg(t),t},t5e=function(){r5e.enable=function(){},lT=!0;var t=O6.f,r=q2e([].splice),e={};e[li]=1,t(e).length&&(O6.f=function(n){for(var i=t(n),a=0,o=i.length;ah;h++)if(f=y(t[h]),f&&I6(P6,f))return f;return new zc(!1)}u=u5e(t,c)}for(v=a?t.next:u.next;!(g=i5e(v,u)).done;){try{f=y(g.value)}catch($){C6(u,"throw",$)}if(typeof f=="object"&&f&&I6(P6,f))return f}return new zc(!1)},d5e=It,f5e=TypeError,Sg=function(t,r){if(d5e(r,t))return t;throw new f5e("Incorrect invocation")},v5e=ke,p5e=xt,m5e=z0,g5e=Ve,y5e=vs,b5e=kg,w5e=Sg,$5e=qt,x5e=Vt,k5e=cs,S5e=ms,E5e=Hr.f,T5e=Yi.forEach,_5e=Ut,uT=Ha,O5e=uT.set,I5e=uT.getterFor,Eg=function(t,r,e){var n=t.indexOf("Map")!==-1,i=t.indexOf("Weak")!==-1,a=n?"set":"add",o=p5e[t],s=o&&o.prototype,l={},u;if(!_5e||!$5e(o)||!(i||s.forEach&&!g5e(function(){new o().entries().next()})))u=e.getConstructor(r,t,n,a),m5e.enable();else{u=r(function(d,f){O5e(w5e(d,c),{type:t,collection:new o}),k5e(f)||b5e(f,d[a],{that:d,AS_ENTRIES:n})});var c=u.prototype,h=I5e(t);T5e(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d==="add"||d==="set";d in s&&!(i&&d==="clear")&&y5e(c,d,function(v,g){var b=h(this).collection;if(!f&&i&&!x5e(v))return d==="get"?void 0:!1;var y=b[d](v===0?0:v,g);return f?this:y})}),i||E5e(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return S5e(u,t,!1,!0),l[t]=u,v5e({global:!0,forced:!0},l),i||e.setStrong(u,t,n),u},C5e=su,Tg=function(t,r,e){for(var n in r)e&&e.unsafe&&t[n]?t[n]=r[n]:C5e(t,n,r[n],e);return t},P5e=nn,A5e=rg,M5e=kt,D5e=Ut,A6=M5e("species"),N5e=function(t){var r=P5e(t);D5e&&r&&!r[A6]&&A5e(r,A6,{configurable:!0,get:function(){return this}})},R5e=ps,F5e=rg,M6=Tg,z5e=nu,B5e=Sg,L5e=cs,j5e=kg,H5e=J1,fc=Z1,W5e=N5e,Ps=Ut,D6=z0.fastKey,cT=Ha,N6=cT.set,xv=cT.getterFor,hT={getConstructor:function(t,r,e,n){var i=t(function(u,c){B5e(u,a),N6(u,{type:r,index:R5e(null),first:void 0,last:void 0,size:0}),Ps||(u.size=0),L5e(c)||j5e(c,u[n],{that:u,AS_ENTRIES:e})}),a=i.prototype,o=xv(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=D6(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=D6(c),f;if(d!=="F")return h.index[d];for(f=h.first;f;f=f.next)if(f.key===c)return f};return M6(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=z5e(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)}}),M6(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&&F5e(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(t,r,e){var n=r+" Iterator",i=xv(r),a=xv(n);H5e(t,r,function(o,s){N6(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),W5e(r)}},q5e=Eg,U5e=hT;q5e("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},U5e);var V5e=Ge,G5e=V5e.Map,K5e=G5e,Y5e=K5e,X5e=Y5e,dT=ve(X5e),J5e=function(){function t(){re(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 ne(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)&&Ue(n).call(n,i)===-1){var a=e[i];this.add(i,a)}}}},{key:"clear",value:function(){this._groups=new dT,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}(),Z5e=ke;Z5e({target:"Number",stat:!0},{isNaN:function(r){return r!==r}});var Q5e=Ge,e3e=Q5e.Number.isNaN,t3e=e3e,r3e=t3e,n3e=r3e,um=ve(n3e),i3e=xt,a3e=i3e.isFinite,o3e=Number.isFinite||function(r){return typeof r=="number"&&a3e(r)},s3e=ke,l3e=o3e;s3e({target:"Number",stat:!0},{isFinite:l3e});var u3e=Ge,c3e=u3e.Number.isFinite,h3e=c3e,d3e=h3e,f3e=d3e,ua=ve(f3e),v3e=ke,p3e=Yi.some,m3e=bs,g3e=m3e("some");v3e({target:"Array",proto:!0,forced:!g3e},{some:function(r){return p3e(this,r,arguments.length>1?arguments[1]:void 0)}});var y3e=Kt,b3e=y3e("Array").some,w3e=It,$3e=b3e,kv=Array.prototype,x3e=function(t){var r=t.some;return t===kv||w3e(kv,t)&&r===kv.some?$3e:r},k3e=x3e,S3e=k3e,E3e=S3e,T3e=ve(E3e),_3e=Ge,O3e=_3e.Object.getOwnPropertySymbols,I3e=O3e,C3e=I3e,P3e=C3e,Li=ve(P3e),fT={exports:{}},A3e=ke,M3e=Ve,D3e=zn,vT=us.f,pT=Ut,N3e=!pT||M3e(function(){vT(1)});A3e({target:"Object",stat:!0,forced:N3e,sham:!pT},{getOwnPropertyDescriptor:function(r,e){return vT(D3e(r),e)}});var R3e=Ge,mT=R3e.Object,F3e=fT.exports=function(r,e){return mT.getOwnPropertyDescriptor(r,e)};mT.getOwnPropertyDescriptor.sham&&(F3e.sham=!0);var z3e=fT.exports,B3e=z3e,gT=B3e,L3e=gT,Ji=ve(L3e),j3e=ke,H3e=Ut,W3e=a1e,q3e=zn,U3e=us,V3e=ys;j3e({target:"Object",stat:!0,sham:!H3e},{getOwnPropertyDescriptors:function(r){for(var e=q3e(r),n=U3e.f,i=W3e(e),a={},o=0,s,l;i.length>o;)l=n(e,s=i[o++]),l!==void 0&&V3e(a,s,l);return a}});var G3e=Ge,K3e=G3e.Object.getOwnPropertyDescriptors,Y3e=K3e,X3e=Y3e,J3e=X3e,ji=ve(J3e),yT={exports:{}},Z3e=ke,Q3e=Ut,R6=k0.f;Z3e({target:"Object",stat:!0,forced:Object.defineProperties!==R6,sham:!Q3e},{defineProperties:R6});var e6e=Ge,bT=e6e.Object,t6e=yT.exports=function(r,e){return bT.defineProperties(r,e)};bT.defineProperties.sham&&(t6e.sham=!0);var r6e=yT.exports,n6e=r6e,i6e=n6e,a6e=i6e,B0=ve(a6e),o6e=kS,L0=ve(o6e);function j0(t,r,e){return r=rE(r),r in t?_0(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var wT=xt,s6e=Ve,l6e=Ke,u6e=Bn,c6e=vE.trim,h6e=ug,d6e=l6e("".charAt),xh=wT.parseFloat,F6=wT.Symbol,z6=F6&&F6.iterator,f6e=1/xh(h6e+"-0")!==-1/0||z6&&!s6e(function(){xh(Object(z6))}),v6e=f6e?function(r){var e=c6e(u6e(r)),n=xh(e);return n===0&&d6e(e,0)==="-"?-0:n}:xh,p6e=ke,B6=v6e;p6e({global:!0,forced:parseFloat!==B6},{parseFloat:B6});var m6e=Ge,g6e=m6e.parseFloat,y6e=g6e,b6e=y6e,w6e=b6e,$T=ve(w6e),$6e=ke,x6e=Ve,k6e=O0.f,S6e=x6e(function(){return!Object.getOwnPropertyNames(1)});$6e({target:"Object",stat:!0,forced:S6e},{getOwnPropertyNames:k6e});var E6e=Ge,T6e=E6e.Object,_6e=function(r){return T6e.getOwnPropertyNames(r)},O6e=_6e,I6e=O6e,C6e=I6e,P6e=ve(C6e);function _g(t,r){var e=["node","edge","label"],n=!0,i=xi(r,"chosen");if(typeof i=="boolean")n=i;else if(Qe(i)==="object"){if(Ue(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 cm(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 xT(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 A6e=Kt,M6e=A6e("Array").values,D6e=M6e,N6e=D6e,R6e=ja,F6e=Gt,z6e=It,B6e=N6e,Sv=Array.prototype,L6e={DOMTokenList:!0,NodeList:!0},j6e=function(t){var r=t.values;return t===Sv||z6e(Sv,t)&&r===Sv.values||F6e(L6e,R6e(t))?B6e:r},H6e=j6e,kT=ve(H6e),W6e=function(){function t(r){re(this,t),this.measureText=r,this.current=0,this.width=0,this.height=0,this.lines=[]}return ne(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({},kT(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:/[^`]/},L6=function(){function t(r){re(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 ne(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=q6e[e];a!==void 0?i=a:i=new RegExp(e),n=e.length}return[i,n]}}]),t}(),U6e=function(){function t(r,e,n,i){var a=this;re(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 W6e(o)}return ne(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 L6(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(Jt(s).call(s,0,l),n),a[0]=Jt(s).call(s,l)}else{var u=o;a[o-1]===" "?o--:a[u]===" "&&u++;var c=Jt(a).call(a,0,o).join("");o==a.length&&i?this.lines.append(c,n):this.lines.newLine(c,n),a=Jt(a).call(a,u)}}}}]),t}(),As=["bold","ital","boldital","mono"],ST=function(){function t(r,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;re(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 ne(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(Qe(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&&Qe(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(Qe(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(Qe(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=_g("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 U6e(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 Rwe(t){var r=Fwe();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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 zwe=function(t){Ye(e,t);var r=Rwe(e);function e(n,i,a){var o;return re(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return ne(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),Uk(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 Bwe(t){var r=Lwe();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(this,i)}}function Lwe(){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 Cg=function(t){Ye(e,t);var r=Bwe(e);function e(n,i,a){var o;return re(this,e),o=r.call(this,n,i,a),o.labelOffset=0,o.selected=!1,o}return ne(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;Qe(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),G1(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 jwe(t){var r=Hwe();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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){Ye(e,t);var r=jwe(e);function e(n,i,a){var o;return re(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return ne(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}(Cg);function qwe(t){var r=Uwe();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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 Vwe=function(t){Ye(e,t);var r=qwe(e);function e(n,i,a,o,s){var l;return re(this,e),l=r.call(this,n,i,a),l.setImages(o,s),l}return ne(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}(Cg);function Gwe(t){var r=Kwe();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(this,i)}}function Kwe(){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){Ye(e,t);var r=Gwe(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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),Iue(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 U6(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 Ywe(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 Zwe=function(t){Ye(e,t);var r=Xwe(e);function e(n,i,a,o){var s;return re(this,e),s=r.call(this,n,i,a,o),s.ctxRenderer=o,s}return ne(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:Ywe({},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 Qwe(t){var r=e7e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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){Ye(e,t);var r=Qwe(e);function e(n,i,a){var o;return re(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return ne(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),Vk(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 r7e(t){var r=n7e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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){Ye(e,t);var r=r7e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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 a7e(t){var r=o7e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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 s7e=function(t){Ye(e,t);var r=a7e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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 l7e(t){var r=u7e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(this,i)}}function u7e(){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 V6=function(t){Ye(e,t);var r=l7e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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),Bp(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 c7e(t){var r=h7e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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){Ye(e,t);var r=c7e(e);function e(n,i,a){var o;return re(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return ne(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 f7e(t){var r=v7e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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){Ye(e,t);var r=f7e(e);function e(n,i,a,o,s){var l;return re(this,e),l=r.call(this,n,i,a),l.setImages(o,s),l}return ne(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}(Cg);function m7e(t){var r=g7e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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){Ye(e,t);var r=m7e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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 b7e(t){var r=w7e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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){Ye(e,t);var r=b7e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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 x7e(t){var r=k7e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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){Ye(e,t);var r=x7e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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 E7e(t){var r=T7e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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){Ye(e,t);var r=E7e(e);function e(n,i,a){var o;return re(this,e),o=r.call(this,n,i,a),o._setMargins(a),o}return ne(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 O7e(t){var r=I7e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(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){Ye(e,t);var r=O7e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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 P7e(t){var r=A7e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(this,i)}}function A7e(){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 M7e=function(t){Ye(e,t);var r=P7e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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 G6(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 K6(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=P6e(n)).call(a,function(c){return n[c]!=null});u.push("font"),wh(u,e,l),e.color=am(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=am(n.color);KE(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.",ZE),e.mass=1}}}]),t}();function D7e(t,r){var e=typeof Xi<"u"&&qa(t)||t["@@iterator"];if(!e){if(Je(t)||(e=N7e(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 N7e(t,r){var e;if(t){if(typeof t=="string")return Y6(t,r);var n=Jt(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 Y6(t,r)}}function Y6(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(Sk("id",e))this.body.data.nodes=e;else if(Je(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(Je(e)===!0){for(var i=0;i0?(l=s/o,n+=l*l):n+=s;return o===1/0?1/0:o*u$e(n)}});var h$e=Ge,d$e=h$e.Math.hypot,f$e=d$e,v$e=f$e,p$e=v$e,m$e=ve(p$e);function IT(t){var r=g$e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(this,i)}}function g$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(){re(this,t)}return ne(t,null,[{key:"transform",value:function(e,n){Je(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=Je(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)Gk(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=Jt(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=xT(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)),T=$-k;if(Math.abs(T)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=m$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}),T=this.getPoint(k.t+$*(n==="from"?1:-1),i);l=Math.atan2(k.y-T.y,k.x-T.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 Z=this.options.selfReference.angle,ie=this.options.selfReference.angle+Math.PI,oe=this._findBorderPositionCircle(this.from,e,{x:A,y:z,low:Z,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,Oe=this.options.selfReference.angle+Math.PI,ze=this._findBorderPositionCircle(this.from,e,{x:A,y:z,low:me,high:Oe,direction:1});l=ze.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=ze}else{var He=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(A,z,L,He),l=He*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var C=u.x-b*.9*Math.cos(l),Me=u.y-b*.9*Math.sin(l),V={x:C,y:Me};return{point:u,core:V,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=CT.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=Je(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 tw(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 rw(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 Pg=function(t){Ye(e,t);var r=C$e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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)),T=$-k;if(Math.abs(T)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 nw=function(t){Ye(e,t);var r=A$e(e);function e(n,i,a){var o;return re(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 ne(e,[{key:"setOptions",value:function(i){Bc(ue(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}(Pg);function D$e(t){var r=N$e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(this,i)}}function N$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 iw=function(t){Ye(e,t);var r=D$e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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}(Pg);function R$e(t){var r=F$e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(this,i)}}function F$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 z$e=function(t){Ye(e,t);var r=R$e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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 T=this._getDistanceToLine(f,v,$,k,l,u);d=T"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){Ye(e,t);var r=B$e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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}(z$e);function j$e(t){var r=H$e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(this,i)}}function H$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 ow=function(t){Ye(e,t);var r=j$e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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}(PT),Oo=function(){function t(r,e,n,i,a){if(re(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 ST(this.body,this.options,!0),this.setOptions(r)}return ne(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=$T(e.value));var i=[e,this.options,this.defaultOptions];return this.chooser=_g("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 nw&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof aw&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof iw&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof ow&&e.type.enabled===!1)&&(i=!1),i===!0&&(n=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(n=!0,this.edgeType=new nw(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new aw(this.options,this.body,this.labelModule):this.edgeType=new iw(this.options,this.body,this.labelModule):this.edgeType=new ow(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=xT(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();cm(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=Ue(l).call(l,"to")!=-1,e.arrows.middle.enabled=Ue(l).call(l,"middle")!=-1,e.arrows.from.enabled=Ue(l).call(l,"from")!=-1}else if(Qe(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}(),W$e=function(){function t(r,e,n){var i,a=this;re(this,t),this.body=r,this.images=e,this.groups=n,this.body.functions.createEdge=J(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 ne(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",J(n=this.refresh).call(n,this)),this.body.emitter.on("refresh",J(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(Sk("id",e))this.body.data.edges=e;else if(Je(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=[];rt(e).call(e,function(a,o){var s=n[o];s===void 0&&i.push(o)}),this.add(i,!0)}}}]),t}(),AT=function(){function t(r,e,n){re(this,t),this.body=r,this.physicsBody=e,this.barnesHutTree,this.setOptions(n),this._rng=F0("BARNES HUT SOLVER")}return ne(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),T={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(T.root);for(var P=0;P0&&this._placeInTree(T.root,i);return T}},{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}(),q$e=function(){function t(r,e,n){re(this,t),this._rng=F0("REPULSION SOLVER"),this.body=r,this.physicsBody=e,this.setOptions(n)}return ne(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 Y$e=function(t){Ye(e,t);var r=G$e(e);function e(n,i,a){var o;return re(this,e),o=r.call(this,n,i,a),o._rng=F0("FORCE ATLAS 2 BASED REPULSION SOLVER"),o}return ne(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}(AT);function X$e(t){var r=J$e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(this,i)}}function J$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 Z$e=function(t){Ye(e,t);var r=X$e(e);function e(n,i,a){return re(this,e),r.call(this,n,i,a)}return ne(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),Q$e=function(){function t(r){re(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 ne(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"||um(n.x))&&(n.x=0),(typeof n.y!="number"||um(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 Y$e(this.body,this.physicsBody,e),this.edgesSolver=new Tv(this.body,this.physicsBody,e),this.gravitySolver=new Z$e(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new q$e(this.body,this.physicsBody,e),this.edgesSolver=new Tv(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 U$e(this.body,this.physicsBody,e),this.edgesSolver=new V$e(this.body,this.physicsBody,e),this.gravitySolver=new Lc(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new AT(this.body,this.physicsBody,e),this.edgesSolver=new Tv(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=J(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 o8e=function(t){Ye(e,t);var r=i8e(e);function e(n,i,a,o,s,l){var u;return re(this,e),u=r.call(this,n,i,a,o,s,l),u.isCluster=!0,u.containedNodes={},u.containedEdges={},u}return ne(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=Ue(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),s8e=function(){function t(r){var e=this;re(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 ne(t,[{key:"clusterByHubsize",value:function(e,n){e===void 0?e=this._getHubSize():Qe(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 T=function(Z){if(n.joinCondition===void 0||n.joinCondition===null)return!0;var ie=or.cloneOptions(Z);return n.joinCondition(ie)},P=!0,E=0;E0&&yt(b).length>0&&P===!0){var B=function(){for(var Z=0;Z1&&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=or.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=Ue(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(ze){ze.options.fixed.x===!1&&(ze.x=a.x),ze.options.fixed.y===!1&&(ze.y=a.y)});for(var k in c)if(Object.prototype.hasOwnProperty.call(c,k)){var T=this.body.nodes[k];T.vx=a.vx,T.vy=a.vy,T.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=or.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 l8e(){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 u8e=function(){function t(r,e){re(this,t),l8e(),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 ne(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,J(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",J(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(J(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(Ue(e).call(e,"%")!==-1||Ue(e).call(e,"px")!==-1)return e;if(Ue(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),MT(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 p8e(t,r){var e=At({nodes:r,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},t??{});if(!Je(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 m8e=function(){function t(r,e){var n,i=this,a;re(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",J(n=this.fit).call(n,this)),this.body.emitter.on("animationFinished",function(){i.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",J(a=this.releaseNode).call(a,this))}return ne(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=p8e(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=or.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=or.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=or.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=J(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=J(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=Q4e[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=J(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 lw(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=lw({container:window,preventDefault:!0}):this.keycharm=lw({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,T,P,E,D,B,R,A;J(n=this.keycharm).call(n,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),J(i=this.keycharm).call(i,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),J(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),J(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),J(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),J(l=this.keycharm).call(l,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),J(u=this.keycharm).call(u,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),J(c=this.keycharm).call(c,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),J(h=this.keycharm).call(h,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),J(d=this.keycharm).call(d,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),J(f=this.keycharm).call(f,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),J(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),J(g=this.keycharm).call(g,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),J(b=this.keycharm).call(b,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),J(y=this.keycharm).call(y,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),J($=this.keycharm).call($,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),J(k=this.keycharm).call(k,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),J(T=this.keycharm).call(T,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),J(P=this.keycharm).call(P,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),J(E=this.keycharm).call(E,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),J(D=this.keycharm).call(D,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),J(B=this.keycharm).call(B,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),J(R=this.keycharm).call(R,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),J(A=this.keycharm).call(A,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),t}();function y8e(t,r){var e=typeof Xi<"u"&&qa(t)||t["@@iterator"];if(!e){if(Je(t)||(e=b8e(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 b8e(t,r){var e;if(t){if(typeof t=="string")return uw(t,r);var n=Jt(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 uw(t,r)}}function uw(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});rt(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?(rt(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 s2e(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}(),$8e=Eg,x8e=hT;$8e("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},x8e);var k8e=Ge,S8e=k8e.Set,E8e=S8e,T8e=E8e,_8e=T8e,oa=ve(_8e),O8e=Ke,cw=Tg,pc=z0.getWeakData,I8e=Sg,C8e=Wr,P8e=cs,_v=Vt,A8e=kg,DT=Yi,hw=Gt,NT=Ha,M8e=NT.set,D8e=NT.getterFor,N8e=DT.find,R8e=DT.findIndex,F8e=O8e([].splice),z8e=0,mc=function(t){return t.frozen||(t.frozen=new RT)},RT=function(){this.entries=[]},Ov=function(t,r){return N8e(t.entries,function(e){return e[0]===r})};RT.prototype={get:function(t){var r=Ov(this,t);if(r)return r[1]},has:function(t){return!!Ov(this,t)},set:function(t,r){var e=Ov(this,t);e?e[1]=r:this.entries.push([t,r])},delete:function(t){var r=R8e(this.entries,function(e){return e[0]===t});return~r&&F8e(this.entries,r,1),!!~r}};var B8e={getConstructor:function(t,r,e,n){var i=t(function(l,u){I8e(l,a),M8e(l,{type:r,id:z8e++,frozen:void 0}),P8e(u)||A8e(u,l[n],{that:l,AS_ENTRIES:e})}),a=i.prototype,o=D8e(r),s=function(l,u,c){var h=o(l),d=pc(C8e(u),!0);return d===!0?mc(h).set(u,c):d[h.id]=c,l};return cw(a,{delete:function(l){var u=o(this);if(!_v(l))return!1;var c=pc(l);return c===!0?mc(u).delete(l):c&&hw(c,u.id)&&delete c[u.id]},has:function(u){var c=o(this);if(!_v(u))return!1;var h=pc(u);return h===!0?mc(c).has(u):h&&hw(h,c.id)}}),cw(a,e?{get:function(u){var c=o(this);if(_v(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}},L8e=sT,dw=xt,jc=Ke,fw=Tg,j8e=z0,H8e=Eg,FT=B8e,gc=Vt,yc=Ha.enforce,W8e=Ve,q8e=Jk,wu=Object,U8e=Array.isArray,bc=wu.isExtensible,zT=wu.isFrozen,V8e=wu.isSealed,BT=wu.freeze,G8e=wu.seal,vw={},pw={},K8e=!dw.ActiveXObject&&"ActiveXObject"in dw,Ms,LT=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},jT=H8e("WeakMap",LT,FT),uo=jT.prototype,Hc=jc(uo.set),Y8e=function(){return L8e&&W8e(function(){var t=BT([]);return Hc(new jT,t,1),!zT(t)})};if(q8e)if(K8e){Ms=FT.getConstructor(LT,"WeakMap",!0),j8e.enable();var mw=jc(uo.delete),wc=jc(uo.has),gw=jc(uo.get);fw(uo,{delete:function(t){if(gc(t)&&!bc(t)){var r=yc(this);return r.frozen||(r.frozen=new Ms),mw(this,t)||r.frozen.delete(t)}return mw(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)?gw(this,r):e.frozen.get(r)}return gw(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 Y8e()&&fw(uo,{set:function(r,e){var n;return U8e(r)&&(zT(r)?n=vw:V8e(r)&&(n=pw)),Hc(this,r,e),n===vw&&BT(r),n===pw&&G8e(r),this}});var X8e=Ge,J8e=X8e.WeakMap,Z8e=J8e,Q8e=Z8e,exe=Q8e,Zs=ve(exe);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 fm(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 vm(t,r){var e=typeof Xi<"u"&&qa(t)||t["@@iterator"];if(!e){if(Je(t)||(e=txe(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 txe(t,r){var e;if(t){if(typeof t=="string")return yw(t,r);var n=Jt(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 yw(t,r)}}function yw(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(){};re(this,t),bi.set(this,new ww),wi.set(this,new ww),Wc.set(this,void 0),fm(this,Wc,r)}return ne(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 nxe(t,r){var e;if(t){if(typeof t=="string")return xw(t,r);var n=Jt(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 xw(t,r)}}function xw(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=$w(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=$w(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}(),kw=ES,axe=Math.floor,pm=function(t,r){var e=t.length,n=axe(e/2);return e<8?oxe(t,r):sxe(t,pm(kw(t,0,n),r),pm(kw(t,n),r),r)},oxe=function(t,r){for(var e=t.length,n=1,i,a;n0;)t[a]=t[--a];a!==n++&&(t[a]=i)}return t},sxe=function(t,r,e,n){for(var i=r.length,a=e.length,o=0,s=0;o3)){if($xe)return!0;if(Cw)return Cw<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;i_w(e)?1:-1}};pxe({target:"Array",proto:!0,forced:Txe},{sort:function(r){r!==void 0&&mxe(r);var e=gxe(this);if(WT)return r===void 0?Pw(e):Pw(e,r);var n=[],i=Tw(e),a,o;for(o=0;o=0:s>l;l+=u)l in o&&(i=e(i,o[l],l,a));return i}},jxe={left:Aw(!1),right:Aw(!0)},Hxe=xt,Wxe=fi,qxe=Wxe(Hxe.process)==="process",Uxe=ke,Vxe=jxe.left,Gxe=bs,Mw=eu,Kxe=qxe,Yxe=!Kxe&&Mw>79&&Mw<83,Xxe=Yxe||!Gxe("reduce");Uxe({target:"Array",proto:!0,forced:Xxe},{reduce:function(r){var e=arguments.length;return Vxe(this,r,e,e>1?arguments[1]:void 0)}});var Jxe=Kt,Zxe=Jxe("Array").reduce,Qxe=It,e9e=Zxe,Cv=Array.prototype,t9e=function(t){var r=t.reduce;return t===Cv||Qxe(Cv,t)&&r===Cv.reduce?e9e:r},r9e=t9e,n9e=r9e,i9e=n9e,qT=ve(i9e);function UT(t){var r=a9e();return function(){var n=ue(t),i;if(r){var a=ue(this).constructor;i=H(n,arguments,a)}else i=n.apply(this,arguments);return Ze(this,i)}}function a9e(){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 VT=function(){function t(){re(this,t)}return ne(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}(),o9e=function(t){Ye(e,t);var r=UT(e);function e(n){var i;return re(this,e),i=r.call(this),i.layout=n,i}return ne(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}(VT),s9e=function(t){Ye(e,t);var r=UT(e);function e(n){var i;return re(this,e),i=r.call(this),i.layout=n,i}return ne(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}(VT),l9e=ke,u9e=Yi.every,c9e=bs,h9e=c9e("every");l9e({target:"Array",proto:!0,forced:!h9e},{every:function(r){return u9e(this,r,arguments.length>1?arguments[1]:void 0)}});var d9e=Kt,f9e=d9e("Array").every,v9e=It,p9e=f9e,Pv=Array.prototype,m9e=function(t){var r=t.every;return t===Pv||v9e(Pv,t)&&r===Pv.every?p9e:r},g9e=m9e,y9e=g9e,b9e=y9e,GT=ve(b9e);function w9e(t,r){var e=typeof Xi<"u"&&qa(t)||t["@@iterator"];if(!e){if(Je(t)||(e=$9e(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 $9e(t,r){var e;if(t){if(typeof t=="string")return Dw(t,r);var n=Jt(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);e=r[a])&&(r[a]=r[i]+1)}),r}function k9e(t){return KT(function(r){var e,n;return GT(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 S9e(t){return KT(function(r){var e,n;return GT(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:x9e(n,a)}};++$},P;k=y.pop();)if(P=T(),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 E9e=function(){function t(){re(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return ne(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=F0(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"):Qe(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 E9e;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(),T=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),Z=e._getSpaceAroundNode(A,k),ie=bt(Z,2),oe=ie[0],me=ie[1];P=Math.min(oe,P),E=Math.min(me,E),z<=T&&(D=Math.min(L,D),B=Math.max(L,B))}return[D,B,P,E]},c=function(k,T){var P=e.hierarchical.getMaxLevel(k.id),E=e.hierarchical.getMaxLevel(T.id);return Math.min(P,E)},h=function(k,T,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(T),B=Math.abs(D-E),R=e.options.hierarchical.nodeSpacing;if(B>R){var A={},z={};l(k,A),l(T,z);var L=c(k,T),Z=u(A,L),ie=u(z,L),oe=Z[1],me=ie[0],Oe=ie[2],ze=Math.abs(oe-me);if(ze>R){var He=oe-me+R;He<-Oe+R&&(He=-Oe+R),He<0&&(e._shiftBlock(T.id,He),n=!0,P===!0&&e._centerParent(T))}}},f=function(k,T){for(var P=T.id,E=T.edges,D=e.hierarchical.levels[T.id],B=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,R={},A=[],z=0;z0?Le=Math.min(We,Ae-e.options.hierarchical.nodeSpacing):We<0&&(Le=-Math.min(-We,Se-e.options.hierarchical.nodeSpacing)),Le!=0&&(e._shiftBlock(T.id,Le),n=!0)},ze=function(Me){var V=e.direction.getPosition(T),S=e._getSpaceAroundNode(T),pe=bt(S,2),Se=pe[0],Ae=pe[1],We=Me-V,Le=V;We>0?Le=Math.min(V+(Ae-e.options.hierarchical.nodeSpacing),Me):We<0&&(Le=Math.max(V-(Se-e.options.hierarchical.nodeSpacing),Me)),Le!==V&&(e.direction.setPosition(T,Le),n=!0)},He=me(k,A);Oe(He),He=me(k,E),ze(He)},v=function(k){var T=e.hierarchical.getLevels();T=ga(T).call(T);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 O9e(t,r){var e;if(t){if(typeof t=="string")return Nw(t,r);var n=Jt(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 Nw(t,r)}}function Nw(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,J(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",J(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,J(n=this.toggleEditMode).call(n,this))}this._temporaryBindEvent("click",J(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,J(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",J(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",J(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDrag",J(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",J(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",J(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",Qe(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,J(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",J(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",J(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",J(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",J(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,J(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=_9e(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,J(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,J(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,J(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,J(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,J(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,J(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(Ue(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(Ue(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(Qe(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}(),ee="string",K="boolean",F="number",zs="array",de="object",YT="dom",C9e="any",Av=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Mv={borderWidth:{number:F},borderWidthSelected:{number:F,undefined:"undefined"},brokenImage:{string:ee,undefined:"undefined"},chosen:{label:{boolean:K,function:"function"},node:{boolean:K,function:"function"},__type__:{object:de,boolean:K}},color:{border:{string:ee},background:{string:ee},highlight:{border:{string:ee},background:{string:ee},__type__:{object:de,string:ee}},hover:{border:{string:ee},background:{string:ee},__type__:{object:de,string:ee}},__type__:{object:de,string:ee}},opacity:{number:F,undefined:"undefined"},fixed:{x:{boolean:K},y:{boolean:K},__type__:{object:de,boolean:K}},font:{align:{string:ee},color:{string:ee},size:{number:F},face:{string:ee},background:{string:ee},strokeWidth:{number:F},strokeColor:{string:ee},vadjust:{number:F},multi:{boolean:K,string:ee},bold:{color:{string:ee},size:{number:F},face:{string:ee},mod:{string:ee},vadjust:{number:F},__type__:{object:de,string:ee}},boldital:{color:{string:ee},size:{number:F},face:{string:ee},mod:{string:ee},vadjust:{number:F},__type__:{object:de,string:ee}},ital:{color:{string:ee},size:{number:F},face:{string:ee},mod:{string:ee},vadjust:{number:F},__type__:{object:de,string:ee}},mono:{color:{string:ee},size:{number:F},face:{string:ee},mod:{string:ee},vadjust:{number:F},__type__:{object:de,string:ee}},__type__:{object:de,string:ee}},group:{string:ee,number:F,undefined:"undefined"},heightConstraint:{minimum:{number:F},valign:{string:ee},__type__:{object:de,boolean:K,number:F}},hidden:{boolean:K},icon:{face:{string:ee},code:{string:ee},size:{number:F},color:{string:ee},weight:{string:ee,number:F},__type__:{object:de}},id:{string:ee,number:F},image:{selected:{string:ee,undefined:"undefined"},unselected:{string:ee,undefined:"undefined"},__type__:{object:de,string:ee}},imagePadding:{top:{number:F},right:{number:F},bottom:{number:F},left:{number:F},__type__:{object:de,number:F}},label:{string:ee,undefined:"undefined"},labelHighlightBold:{boolean:K},level:{number:F,undefined:"undefined"},margin:{top:{number:F},right:{number:F},bottom:{number:F},left:{number:F},__type__:{object:de,number:F}},mass:{number:F},physics:{boolean:K},scaling:{min:{number:F},max:{number:F},label:{enabled:{boolean:K},min:{number:F},max:{number:F},maxVisible:{number:F},drawThreshold:{number:F},__type__:{object:de,boolean:K}},customScalingFunction:{function:"function"},__type__:{object:de}},shadow:{enabled:{boolean:K},color:{string:ee},size:{number:F},x:{number:F},y:{number:F},__type__:{object:de,boolean:K}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:K,array:zs},borderRadius:{number:F},interpolation:{boolean:K},useImageSize:{boolean:K},useBorderWithImage:{boolean:K},coordinateOrigin:{string:["center","top-left"]},__type__:{object:de}},size:{number:F},title:{string:ee,dom:YT,undefined:"undefined"},value:{number:F,undefined:"undefined"},widthConstraint:{minimum:{number:F},maximum:{number:F},__type__:{object:de,boolean:K,number:F}},x:{number:F},y:{number:F},__type__:{object:de}},P9e={configure:{enabled:{boolean:K},filter:{boolean:K,string:ee,array:zs,function:"function"},container:{dom:YT},showButton:{boolean:K},__type__:{object:de,boolean:K,string:ee,array:zs,function:"function"}},edges:{arrows:{to:{enabled:{boolean:K},scaleFactor:{number:F},type:{string:Av},imageHeight:{number:F},imageWidth:{number:F},src:{string:ee},__type__:{object:de,boolean:K}},middle:{enabled:{boolean:K},scaleFactor:{number:F},type:{string:Av},imageWidth:{number:F},imageHeight:{number:F},src:{string:ee},__type__:{object:de,boolean:K}},from:{enabled:{boolean:K},scaleFactor:{number:F},type:{string:Av},imageWidth:{number:F},imageHeight:{number:F},src:{string:ee},__type__:{object:de,boolean:K}},__type__:{string:["from","to","middle"],object:de}},endPointOffset:{from:{number:F},to:{number:F},__type__:{object:de,number:F}},arrowStrikethrough:{boolean:K},background:{enabled:{boolean:K},color:{string:ee},size:{number:F},dashes:{boolean:K,array:zs},__type__:{object:de,boolean:K}},chosen:{label:{boolean:K,function:"function"},edge:{boolean:K,function:"function"},__type__:{object:de,boolean:K}},color:{color:{string:ee},highlight:{string:ee},hover:{string:ee},inherit:{string:["from","to","both"],boolean:K},opacity:{number:F},__type__:{object:de,string:ee}},dashes:{boolean:K,array:zs},font:{color:{string:ee},size:{number:F},face:{string:ee},background:{string:ee},strokeWidth:{number:F},strokeColor:{string:ee},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:F},multi:{boolean:K,string:ee},bold:{color:{string:ee},size:{number:F},face:{string:ee},mod:{string:ee},vadjust:{number:F},__type__:{object:de,string:ee}},boldital:{color:{string:ee},size:{number:F},face:{string:ee},mod:{string:ee},vadjust:{number:F},__type__:{object:de,string:ee}},ital:{color:{string:ee},size:{number:F},face:{string:ee},mod:{string:ee},vadjust:{number:F},__type__:{object:de,string:ee}},mono:{color:{string:ee},size:{number:F},face:{string:ee},mod:{string:ee},vadjust:{number:F},__type__:{object:de,string:ee}},__type__:{object:de,string:ee}},hidden:{boolean:K},hoverWidth:{function:"function",number:F},label:{string:ee,undefined:"undefined"},labelHighlightBold:{boolean:K},length:{number:F,undefined:"undefined"},physics:{boolean:K},scaling:{min:{number:F},max:{number:F},label:{enabled:{boolean:K},min:{number:F},max:{number:F},maxVisible:{number:F},drawThreshold:{number:F},__type__:{object:de,boolean:K}},customScalingFunction:{function:"function"},__type__:{object:de}},selectionWidth:{function:"function",number:F},selfReferenceSize:{number:F},selfReference:{size:{number:F},angle:{number:F},renderBehindTheNode:{boolean:K},__type__:{object:de}},shadow:{enabled:{boolean:K},color:{string:ee},size:{number:F},x:{number:F},y:{number:F},__type__:{object:de,boolean:K}},smooth:{enabled:{boolean:K},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:F},forceDirection:{string:["horizontal","vertical","none"],boolean:K},__type__:{object:de,boolean:K}},title:{string:ee,undefined:"undefined"},width:{number:F},widthConstraint:{maximum:{number:F},__type__:{object:de,boolean:K,number:F}},value:{number:F,undefined:"undefined"},__type__:{object:de}},groups:{useDefaultGroups:{boolean:K},__any__:Mv,__type__:{object:de}},interaction:{dragNodes:{boolean:K},dragView:{boolean:K},hideEdgesOnDrag:{boolean:K},hideEdgesOnZoom:{boolean:K},hideNodesOnDrag:{boolean:K},hover:{boolean:K},keyboard:{enabled:{boolean:K},speed:{x:{number:F},y:{number:F},zoom:{number:F},__type__:{object:de}},bindToWindow:{boolean:K},autoFocus:{boolean:K},__type__:{object:de,boolean:K}},multiselect:{boolean:K},navigationButtons:{boolean:K},selectable:{boolean:K},selectConnectedEdges:{boolean:K},hoverConnectedEdges:{boolean:K},tooltipDelay:{number:F},zoomView:{boolean:K},zoomSpeed:{number:F},__type__:{object:de}},layout:{randomSeed:{undefined:"undefined",number:F,string:ee},improvedLayout:{boolean:K},clusterThreshold:{number:F},hierarchical:{enabled:{boolean:K},levelSeparation:{number:F},nodeSpacing:{number:F},treeSpacing:{number:F},blockShifting:{boolean:K},edgeMinimization:{boolean:K},parentCentralization:{boolean:K},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:de,boolean:K}},__type__:{object:de}},manipulation:{enabled:{boolean:K},initiallyActive:{boolean:K},addNode:{boolean:K,function:"function"},addEdge:{boolean:K,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:de,boolean:K,function:"function"}},deleteNode:{boolean:K,function:"function"},deleteEdge:{boolean:K,function:"function"},controlNodeStyle:Mv,__type__:{object:de,boolean:K}},nodes:Mv,physics:{enabled:{boolean:K},barnesHut:{theta:{number:F},gravitationalConstant:{number:F},centralGravity:{number:F},springLength:{number:F},springConstant:{number:F},damping:{number:F},avoidOverlap:{number:F},__type__:{object:de}},forceAtlas2Based:{theta:{number:F},gravitationalConstant:{number:F},centralGravity:{number:F},springLength:{number:F},springConstant:{number:F},damping:{number:F},avoidOverlap:{number:F},__type__:{object:de}},repulsion:{centralGravity:{number:F},springLength:{number:F},springConstant:{number:F},nodeDistance:{number:F},damping:{number:F},__type__:{object:de}},hierarchicalRepulsion:{centralGravity:{number:F},springLength:{number:F},springConstant:{number:F},nodeDistance:{number:F},damping:{number:F},avoidOverlap:{number:F},__type__:{object:de}},maxVelocity:{number:F},minVelocity:{number:F},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:K},iterations:{number:F},updateInterval:{number:F},onlyDynamicEdges:{boolean:K},fit:{boolean:K},__type__:{object:de,boolean:K}},timestep:{number:F},adaptiveTimestep:{boolean:K},wind:{x:{number:F},y:{number:F},__type__:{object:de}},__type__:{object:de,boolean:K}},autoResize:{boolean:K},clickToUse:{boolean:K},locale:{string:ee},locales:{__any__:{any:C9e},__type__:{object:de}},height:{string:ee},width:{string:ee},__type__:{object:de}},XT={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]}}},A9e=function(r,e,n){var i;return!!(Ai(r).call(r,"physics")&&Ai(i=XT.physics.solver).call(i,e)&&n.physics.solver!==e&&e!=="wind")},M9e=function(){function t(){re(this,t)}return ne(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:$}};qe.useEffect(()=>()=>{l.current&&(l.current.destroy(),l.current=null)},[]);const h=qe.useCallback((b,y)=>{l.current&&l.current.destroy();const $=c(y),k=new ce(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(Ft.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),T=n;console.log("[DownstreamSubgraphs] Required node types:",k),console.log("[DownstreamSubgraphs] Installed node types:",T);const P=k.filter(E=>!T.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,T=$.find(D=>D.id===0),P=T==null?void 0:T.id;console.log("[DownstreamSubgraphs] Entry node ID:",P);const E={};P!==null&&(E[P]=y),Ft.canvas.emitBeforeChange();try{for(const D of $)if(D.id!==P){const B=T==null?void 0:T.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]=zh(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{Ft.canvas.emitAfterChange()}};return O.jsx("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:u.length>0&&O.jsx("div",{className:"space-y-3",children:O.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(b=>O.jsxs("div",{className:"relative group",children:[O.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}),O.jsxs("p",{className:"text-xs ml-3 text-gray-500",children:["[",b.tags.join(", "),"]"]}),o===b.name&&O.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:O.jsx("div",{style:{width:"100%",height:"300px"},ref:y=>{y&&h(y,b)}})})]},b.name))})})})}function R9e({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 O.jsxs("div",{children:[O.jsx("p",{children:"在加载graph到画布前,以下节点有待安装,请跳转到对应的github安装节点:"}),O.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:n.map((o,s)=>O.jsx("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 - hover:shadow-sm transition-all duration-200`,children:O.jsxs("div",{className:"flex flex-col",children:[O.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:o.name}),O.jsx("div",{className:"flex justify-end",children:o.repository_url?O.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:[O.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.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"]}):O.jsxs("a",{href:`https://www.google.com/search?q=${encodeURIComponent(o.name+" comfyui custom node")}`,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-gray-100 text-gray-500 rounded-md - border border-gray-300 text-[10px] flex items-center gap-1`,children:[O.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 21h7a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v11m0 5l4.879-4.879m0 0a3 3 0 104.243-4.242 3 3 0 00-4.243 4.242z"})}),"Search on Google"]})})]})},s))}),O.jsx("p",{className:"mt-4"}),O.jsx("p",{children:"安装完成后,请点击继续加载graph按钮,将graph加载到画布中:"}),O.jsx("div",{className:"mt-4",children:O.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 F9e(){return O.jsx(mm,{name:"Assistant",children:O.jsxs("div",{className:"flex items-center space-x-2 p-4 bg-gray-50 rounded-lg",children:[O.jsxs("div",{className:"flex space-x-1",children:[O.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),O.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),O.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),O.jsx("span",{className:"text-sm text-gray-500",children:"AI is thinking..."})]})})}const z9e=t=>`https://ui-avatars.com/api/?name=${t||"User"}&background=random`;function B9e({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 O.jsx(g_,{content:s.content},s.id);if(s.role==="ai"||s.role==="tool"){const f=z9e(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 T=null;return g?T=O.jsx(jR,{content:s.content,name:s.name,latestInput:r,installedNodes:n,onAddMessage:i}):y?T=O.jsx(qR,{content:s.content,name:s.name,avatar:f,installedNodes:n}):b?T=O.jsx(WR,{content:s.content,name:s.name,avatar:f,installedNodes:n}):$?T=O.jsx(N9e,{content:s.content,name:s.name,avatar:f,installedNodes:n,onAddMessage:i}):k&&(T=O.jsx(R9e,{content:s.content,onLoadSubgraph:()=>{var P,E;if((P=s.metadata)!=null&&P.pendingSubgraph){const D=Object.values(Ft.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,Z={};L&&(Z[L]=D),Ft.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]],Oe=[ie.pos[0]+me[0]-oe[0],ie.pos[1]+me[1]-oe[1]];Z[ie.id]=zh(ie.type,{pos:Oe})}}finally{Ft.canvas.emitAfterChange()}for(const ie of A){const oe=Z[ie.origin_id],me=Z[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((E=s.metadata)!=null&&E.pendingWorkflow){const D=s.metadata.pendingWorkflow,B=s.metadata.optimizedParams;Ft.loadGraphData(D);for(const[A,z,L,Z,ie]of B){const oe=Ft.graph._nodes_by_id[A].widgets;for(const me of oe)me.name===Z&&(me.value=ie)}Ft.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||T?O.jsx(yd,{content:s.content,name:s.name,format:s.format,onOptionClick:e,extComponent:T},s.id):T||O.jsx(yd,{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),O.jsx(yd,{content:s.content,name:s.name,format:s.format,onOptionClick:e},s.id)}}return null};return O.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[t==null?void 0:t.map(o),a&&O.jsx(F9e,{})]})}async function L9e(){try{return await(await n_.fetchApi("/object_info",{method:"GET"})).json()}catch(t){throw console.error("Error fetching object info:",t),t}}async function j9e(){const t=await L9e();return Object.keys(t)}function q9e({onClose:t,visible:r=!0,triggerUsage:e=!1,onUsageTriggered:n}){const[i,a]=qe.useState([]),[o,s]=qe.useState(""),[l,u]=qe.useState(""),[c,h]=qe.useState(!1),[d,f]=qe.useState(),v=qe.useRef(null),[g,b]=qe.useState(null),[y,$]=qe.useState([]),[k,T]=qe.useState(window.innerWidth/3),[P,E]=qe.useState(!1),[D,B]=qe.useState([]),[R,A]=qe.useState("gpt-4o");qe.useEffect(()=>{v.current&&(v.current.scrollTop=v.current.scrollHeight)},[i]),qe.useEffect(()=>{(async()=>{console.log("[WorkflowChat] Fetching installed nodes");const S=await j9e();console.log("[WorkflowChat] Received installed nodes:",S),$(S)})()},[]);const z=async V=>{try{const S=await _i.fetchMessages(V);a(S)}catch(S){console.error("Error fetching messages:",S)}};qe.useEffect(()=>{let V=localStorage.getItem("sessionId");V?(f(V),z(V)):(V=br(),f(V),localStorage.setItem("sessionId",V))},[]),qe.useEffect(()=>{const V=()=>{const S=Ft.canvas.selected_nodes;if(Object.keys(S??{}).length){const pe=Object.values(S)[0];b(pe)}else b(null)};return document.addEventListener("click",V),()=>{document.removeEventListener("click",V)}},[]),qe.useEffect(()=>{const V=S=>{document.documentElement.style.setProperty("--mouse-x",`${S.clientX}px`),document.documentElement.style.setProperty("--mouse-y",`${S.clientY}px`)};return document.addEventListener("mousemove",V),()=>{document.removeEventListener("mousemove",V)}},[]);const L=V=>{s(V.target.value)},Z=async()=>{if(o.trim()===""&&!g||!d)return;h(!0),u(o);const V={id:br(),role:"user",content:o};a(S=>[...S,V]),s("");try{const S={type:"model_select",data:[R]};for await(const pe of _i.streamInvokeServer(d,o,D.map(Se=>Se.file),null,S)){const Se={id:br(),role:"ai",content:JSON.stringify(pe),type:pe.type,format:pe.format,finished:pe.finished,name:"Assistant"};a(Ae=>Ae[Ae.length-1].role==="ai"?[...Ae.slice(0,-1),Se]:[...Ae,Se]),pe.finished&&h(!1)}}catch(S){console.error("Error sending message:",S),h(!1)}finally{B([])}},ie=V=>{V.metaKey&&V.key==="Enter"&&Z()},oe=()=>{a([]),localStorage.removeItem("sessionId");const V=br();f(V),localStorage.setItem("sessionId",V)},me=V=>{s(V)},Oe=async(V,S)=>{if(!d||!g)return;h(!0);const pe={id:br(),role:"user",content:g.comfyClass||g.type};a(Se=>[...Se,pe]);try{for await(const Se of _i.streamInvokeServer(d,g.comfyClass||g.type,[],V,S)){const Ae={id:br(),role:"ai",content:JSON.stringify(Se),format:Se.format,finished:Se.finished,name:"Assistant"};a(We=>We[We.length-1].role==="ai"?[...We.slice(0,-1),Ae]:[...We,Ae]),Se.finished&&h(!1)}}catch(Se){console.error("Error sending message:",Se),h(!1)}},ze=V=>{console.log("[WorkflowChat] Adding new message:",V),a(S=>{const pe=[...S,V];return console.log("[WorkflowChat] Updated messages:",pe),pe})},He=V=>{E(!0),V.preventDefault()};qe.useEffect(()=>{const V=pe=>{if(!P)return;const Se=window.innerWidth-pe.clientX,Ae=Math.min(Math.max(300,Se),window.innerWidth*.8);T(Ae)},S=()=>{E(!1)};return P&&(document.addEventListener("mousemove",V),document.addEventListener("mouseup",S)),()=>{document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",S)}},[P]);const C=V=>{const S=Array.from(V).map(pe=>({id:Math.random().toString(36).substr(2,9),file:pe,preview:URL.createObjectURL(pe)}));B(pe=>[...pe,...S])},Me=V=>{B(S=>S.filter(Se=>Se.id!==V))};return Rw.useEffect(()=>()=>{D.forEach(V=>URL.revokeObjectURL(V.preview))},[D]),qe.useEffect(()=>{e&&n&&(Oe("node_explain"),n())},[e]),O.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:[O.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 cursor-ew-resize hover:bg-gray-300 active:bg-gray-400",onMouseDown:He}),O.jsxs("div",{className:"flex h-full flex-col",children:[O.jsx(d_,{onClose:t,onClear:oe,hasMessages:i.length>0}),O.jsx("div",{children:y.map(V=>O.jsx("div",{children:V.name},V.name))}),O.jsx("div",{className:"flex-1 overflow-y-auto p-4 scroll-smooth",ref:v,children:O.jsx(B9e,{messages:i,latestInput:l,onOptionClick:me,installedNodes:y,onAddMessage:ze,loading:c})}),O.jsxs("div",{className:"border-t px-4 py-3 border-gray-200 bg-white sticky bottom-0",children:[g&&O.jsx(m_,{nodeInfo:g,onSendWithIntent:Oe,loading:c}),O.jsx(v_,{input:o,loading:c,onChange:L,onSend:Z,onKeyPress:ie,onUploadImages:C,uploadedImages:D,onRemoveImage:Me,selectedModel:R,onModelChange:A})]})]})]})}export{q9e as default}; diff --git a/dist/copilot_web/workflowChat-YHBEer0-.js b/dist/copilot_web/workflowChat-YHBEer0-.js new file mode 100644 index 0000000..fe85dcd --- /dev/null +++ b/dist/copilot_web/workflowChat-YHBEer0-.js @@ -0,0 +1,37 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/WorkflowOption-lbGaSVN-.js","copilot_web/vendor-markdown-Dek94WS0.js","copilot_web/vendor-react-V04_Axys.js","copilot_web/message-components-DAhwqZXx.js"])))=>i.map(i=>d[i]); +import{j as e}from"./vendor-markdown-Dek94WS0.js";import{r as o,R as F}from"./vendor-react-V04_Axys.js";import{a as I,B as te,U as ne,b as se,g as S,A as K,c as oe,W as T}from"./message-components-DAhwqZXx.js";import{l as re}from"./App-DDLwSOc-.js";import{_ as R}from"./input.js";function ae(t){return e.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:[e.jsx("path",{d:"m22 2-7 20-4-9-9-4Z"}),e.jsx("path",{d:"M22 2 11 13"})]})}function U(t){return e.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:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})}function ie(t){return e.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:[e.jsx("path",{d:"M3 6h18"}),e.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),e.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})}function le(t){return e.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:[e.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),e.jsx("circle",{cx:"9",cy:"9",r:"2"}),e.jsx("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]})}function ce(t){return e.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:[e.jsx("path",{d:"M12 5v14"}),e.jsx("path",{d:"M5 12h14"})]})}function de(t){return e.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:[e.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"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function ue({isOpen:t,onClose:p,onSave:h,initialApiKey:u=""}){const[f,g]=o.useState(u),[i,n]=o.useState(!1);return o.useEffect(()=>{g(u)},[u]),t?e.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-25 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-white rounded-lg p-6 w-96 shadow-xl",children:[e.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Set API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:i?"text":"password",value:f,onChange:b=>g(b.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"}),e.jsx("button",{type:"button",className:"absolute inset-y-0 right-0 pr-3 flex items-center text-gray-600 hover:text-gray-800",onClick:()=>n(!i),children:i?e.jsxs("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e.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"})]}):e.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.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"})})})]}),e.jsxs("div",{className:"mb-4 text-sm text-gray-600",children:[e.jsx("span",{children:"Don't have an API key? "}),e.jsx("a",{href:"https://form.typeform.com/to/tkg91K8D",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-600 underline",children:"Click here to request one"})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{onClick:p,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md",children:"Cancel"}),e.jsx("button",{onClick:()=>{h(f),p()},className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600",children:"Save"})]})]})}):null}function he({onClose:t,onClear:p,hasMessages:h}){const[u,f]=o.useState(!1),g=()=>{f(!0)},i=n=>{localStorage.setItem("chatApiKey",n)};return e.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:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("img",{src:re,alt:"ComfyUI-Copilot Logo",className:"h-12 w-12 -ml-2"}),e.jsx("h3",{className:"text-[16px] font-medium text-gray-800",children:"ComfyUI-Copilot"}),e.jsx("button",{onClick:g,className:"p-1 hover:bg-gray-100 rounded text-gray-500",children:e.jsx(de,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.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:!h,onClick:p,children:e.jsx(ie,{className:"h-5 w-5"})}),e.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:e.jsx(U,{className:"h-5 w-5"})})]}),e.jsx(ue,{isOpen:u,onClose:()=>f(!1),onSave:i,initialApiKey:localStorage.getItem("chatApiKey")||""})]})}const me=5*1024*1024,G=["image/jpeg","image/png","image/gif","image/webp"];function pe({input:t,loading:p,onChange:h,onSend:u,onKeyPress:f,onUploadImages:g,uploadedImages:i,onRemoveImage:n,selectedModel:b,onModelChange:v}){const[C,j]=o.useState(!1),_=F.useRef(null),E=r=>{if(r.target.files){const l=[],c=[];if(Array.from(r.target.files).forEach(x=>{G.includes(x.type)?x.size>me?l.push(`${x.name} (exceeds 5MB)`):c.push(x):l.push(`${x.name} (unsupported format)`)}),l.length>0&&alert(`The following files couldn't be uploaded: +${l.join(` +`)}`),c.length>0){const x=new DataTransfer;c.forEach(L=>x.items.add(L)),g(x.files)}}};return e.jsxs("div",{className:`relative ${i.length>0?"mt-12":""}`,children:[i.length>0&&e.jsx("div",{className:"absolute -top-10 left-0 flex gap-2",children:i.map(r=>e.jsxs("div",{className:"relative group",children:[e.jsx("img",{src:r.preview,alt:"uploaded",className:"w-8 h-8 rounded object-cover"}),e.jsx("button",{onClick:()=>n(r.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:e.jsx(U,{className:"w-3 h-3"})})]},r.id))}),e.jsx("textarea",{onChange:h,onKeyDown:r=>{if(r.key==="Enter"&&!r.shiftKey){if(r.nativeEvent.isComposing)return;r.preventDefault(),u()}f(r)},value:t,placeholder:"Type your message...",className:`w-full min-h-[80px] max-h-[400px] resize-none rounded-md border + border-gray-200 px-3 py-2 pr-12 pb-10 text-sm shadow-sm + focus:outline-none focus:ring-2 focus:ring-blue-500 + focus:border-transparent bg-white transition-all + duration-200 text-gray-700 overflow-y-auto`,style:{height:"auto"}}),e.jsxs("div",{className:`absolute bottom-2 left-3 right-12 flex items-center gap-2 + bg-white border-t border-gray-100 pt-1`,children:[e.jsxs("select",{value:b,onChange:r=>v(r.target.value),className:`px-1.5 py-0.5 text-xs rounded-md + border border-gray-200 bg-white text-gray-700 + focus:outline-none focus:ring-2 focus:ring-blue-500 + focus:border-transparent hover:bg-gray-50 + transition-colors border-0`,children:[e.jsx("option",{value:"gpt-4o-mini",children:"gpt-4o-mini"}),e.jsx("option",{value:"gpt-4o",children:"gpt-4o"}),e.jsx("option",{value:"DeepSeek-V3",children:"DeepSeek-V3"})]}),e.jsx("button",{type:"button",onClick:()=>j(!0),className:`p-1.5 text-gray-500 + hover:bg-gray-100 hover:text-gray-600 + transition-all duration-200 outline-none`,children:e.jsx(le,{className:"h-4 w-4"})})]}),e.jsx("button",{type:"submit",onClick:u,disabled:p,className:`absolute bottom-3 right-3 p-2 rounded-md text-gray-500 + hover:bg-gray-100 hover:text-gray-600 disabled:opacity-50 + transition-all duration-200 active:scale-95`,children:p?e.jsx("div",{className:`h-5 w-5 animate-spin rounded-full + border-2 border-gray-300 border-t-blue-500`}):e.jsx(ae,{className:`h-5 w-5 transform transition-transform + group-hover:translate-x-1`})}),C&&e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-white rounded-lg p-6 w-96 relative",children:[e.jsx("button",{onClick:()=>j(!1),className:"absolute top-2 right-2 text-gray-500 hover:text-gray-700",children:e.jsx(U,{className:"w-5 h-5"})}),e.jsx("h3",{className:"text-lg font-medium mb-4",children:"Upload Images"}),e.jsxs("div",{className:`border-2 border-dashed border-gray-300 rounded-lg p-8 + flex flex-col items-center justify-center gap-4 + hover:border-blue-500 transition-colors cursor-pointer`,onClick:()=>_.current?.click(),children:[e.jsx(ce,{className:"w-8 h-8 text-gray-400"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm text-gray-500 mb-2",children:"Click to upload images or drag and drop"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Supported formats: JPG, PNG, GIF, WebP"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Max file size: 5MB"})]})]}),e.jsx("input",{ref:_,type:"file",multiple:!0,accept:G.join(","),onChange:E,className:"hidden"}),i.length>0&&e.jsx("div",{className:"mt-4 grid grid-cols-3 gap-2",children:i.map(r=>e.jsxs("div",{className:"relative group",children:[e.jsx("img",{src:r.preview,alt:"preview",className:"w-full h-20 object-cover rounded"}),e.jsx("button",{onClick:()=>n(r.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:e.jsx(U,{className:"w-3 h-3"})})]},r.id))}),e.jsx("div",{className:"mt-4 flex justify-end gap-2",children:e.jsx("button",{onClick:()=>j(!1),className:`px-4 py-2 text-sm font-medium text-gray-700 + bg-white border border-gray-300 rounded-md + hover:bg-gray-50`,children:"Close"})})]})})]})}function fe(){const t=Object.values(I.canvas.selected_nodes)[0],p=new Set;function h(u,f){if(!(!u||f>=1)&&u.inputs)for(const g of Object.values(u.inputs)){const i=g.link;if(i&&I.graph.links[i]){const n=I.graph.links[i].origin_id,b=I.graph._nodes_by_id[n];b&&(p.add(b.type),h(b,f+1))}}}return t?(h(t,0),[{type:"upstream_node_types",data:Array.from(p)}]):null}function ge({nodeInfo:t,onSendWithIntent:p,loading:h}){return e.jsx("div",{className:`mb-3 p-3 rounded-md bg-gray-50 border border-gray-200 + transform transition-all duration-200 hover:shadow-md`,children:e.jsxs("div",{className:"text-sm",children:[e.jsxs("p",{children:["Selected node: ",t.type]}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx("button",{className:`px-3 py-1 text-xs rounded-md bg-blue-50 + hover:bg-blue-100 text-blue-700 transition-all + duration-200 hover:shadow-sm active:scale-95`,onClick:()=>p("node_explain"),disabled:h,children:"Usage"}),e.jsx("button",{className:`px-3 py-1 text-xs rounded bg-green-100 + hover:bg-green-200 text-green-700 transition-colors`,onClick:()=>p("node_params"),disabled:h,children:"Parameters"}),e.jsx("button",{className:`px-3 py-1 text-xs rounded bg-purple-100 + hover:bg-purple-200 text-purple-700 transition-colors`,onClick:()=>p("downstream_subgraph_search",fe()),disabled:h,children:"Downstream Nodes"})]})]})})}function xe(){return e.jsx(te,{name:"Assistant",children:e.jsxs("div",{className:"flex items-center space-x-2 p-4 bg-gray-50 rounded-lg",children:[e.jsxs("div",{className:"flex space-x-1",children:[e.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),e.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),e.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),e.jsx("span",{className:"text-sm text-gray-500",children:"AI is thinking..."})]})})}const ye=t=>`https://ui-avatars.com/api/?name=${t||"User"}&background=random`,be=o.lazy(()=>R(()=>import("./WorkflowOption-lbGaSVN-.js"),__vite__mapDeps([0,1,2,3])).then(t=>({default:t.WorkflowOption}))),ve=o.lazy(()=>R(()=>import("./message-components-DAhwqZXx.js").then(t=>t.N),__vite__mapDeps([3,2,1])).then(t=>({default:t.NodeSearch}))),je=o.lazy(()=>R(()=>import("./message-components-DAhwqZXx.js").then(t=>t.d),__vite__mapDeps([3,2,1])).then(t=>({default:t.NodeRecommend}))),we=o.lazy(()=>R(()=>import("./message-components-DAhwqZXx.js").then(t=>t.D),__vite__mapDeps([3,2,1])).then(t=>({default:t.DownstreamSubgraphs}))),Ne=o.lazy(()=>R(()=>import("./message-components-DAhwqZXx.js").then(t=>t.e),__vite__mapDeps([3,2,1])).then(t=>({default:t.NodeInstallGuide})));function ke({messages:t,latestInput:p,onOptionClick:h,installedNodes:u,onAddMessage:f,loading:g}){const i=n=>{if(console.log("[MessageList] Rendering message:",n),n.role==="user")return e.jsx(ne,{content:n.content,trace_id:n.trace_id},n.id);if(n.role==="ai"||n.role==="tool"){const b=ye(n.role);try{const v=JSON.parse(n.content);console.log("[MessageList] Parsed message content:",v);const C=v.ext?.find(c=>c.type==="workflow"),j=v.ext?.find(c=>c.type==="node"),_=v.ext?.find(c=>c.type==="node_recommend"),E=v.ext?.find(c=>c.type==="downstream_subgraph_search"),r=v.ext?.find(c=>c.type==="node_install_guide");console.log("[MessageList] Found extensions:",{workflowExt:C,nodeExt:j,nodeRecommendExt:_,downstreamSubgraphsExt:E,nodeInstallGuideExt:r});let l=null;return C?l=e.jsx(be,{content:n.content,name:n.name,latestInput:p,installedNodes:u,onAddMessage:f}):_?l=e.jsx(je,{content:n.content,name:n.name,avatar:b,installedNodes:u}):j?l=e.jsx(ve,{content:n.content,name:n.name,avatar:b,installedNodes:u}):E?l=e.jsx(we,{content:n.content,name:n.name,avatar:b,installedNodes:u,onAddMessage:f}):r&&(l=e.jsx(Ne,{content:n.content,onLoadSubgraph:()=>{if(n.metadata?.pendingSubgraph){const c=Object.values(I.canvas.selected_nodes)[0];if(c){const x=n.metadata.pendingSubgraph,L=x.json.nodes,O=x.json.links,W=L.find(m=>m.id===0),A=W?.id,M={};A&&(M[A]=c),I.canvas.emitBeforeChange();try{for(const m of L)if(m.id!==A){const w=W?.pos,N=[c._pos[0],c._pos[1]],z=[m.pos[0]+N[0]-w[0],m.pos[1]+N[1]-w[1]];M[m.id]=se(m.type,{pos:z})}}finally{I.canvas.emitAfterChange()}for(const m of O){const w=M[m.origin_id],N=M[m.target_id];w&&N&&w.connect(m.origin_slot,N,m.target_slot)}}else alert("Please select a upstream node first before adding a subgraph.")}else if(n.metadata?.pendingWorkflow){const c=n.metadata.pendingWorkflow,x=n.metadata.optimizedParams;I.loadGraphData(c);for(const[O,W,A,M,m]of x){const w=I.graph._nodes_by_id[O].widgets;for(const N of w)N.name===M&&(N.value=m)}I.graph.setDirtyCanvas(!1,!0);const L={id:S(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};f?.(L)}}})),v.text||l?e.jsx(K,{content:n.content,name:n.name,format:n.format,onOptionClick:h,extComponent:l},n.id):l||e.jsx(K,{content:n.content,name:n.name,format:n.format,onOptionClick:h},n.id)}catch(v){return console.error("[MessageList] Error parsing message content:",v),console.error("解析JSON失败",n.content),e.jsx(K,{content:n.content,name:n.name,format:n.format,onOptionClick:h},n.id)}}return null};return e.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[t?.map(i),g&&e.jsx(xe,{})]})}async function Ie(){try{return await(await oe.fetchApi("/object_info",{method:"GET"})).json()}catch(t){throw console.error("Error fetching object info:",t),t}}async function _e(){const t=await Ie();return Object.keys(t)}function De({onClose:t,visible:p=!0,triggerUsage:h=!1,onUsageTriggered:u}){const[f,g]=o.useState([]),[i,n]=o.useState(""),[b,v]=o.useState(""),[C,j]=o.useState(!1),[_,E]=o.useState(),r=o.useRef(null),[l,c]=o.useState(null),[x,L]=o.useState([]),[O,W]=o.useState(window.innerWidth/3),[A,M]=o.useState(!1),[m,w]=o.useState([]),[N,z]=o.useState("gpt-4o-mini");o.useEffect(()=>{r.current&&(r.current.scrollTop=r.current.scrollHeight)},[f]),o.useEffect(()=>{(async()=>{console.log("[WorkflowChat] Fetching installed nodes");const a=await _e();console.log("[WorkflowChat] Received installed nodes:",a),L(a)})()},[]);const $=async s=>{try{const a=await T.fetchMessages(s);g(a)}catch(a){console.error("Error fetching messages:",a)}};o.useEffect(()=>{let s=localStorage.getItem("sessionId");s?(E(s),$(s)):(s=S(),E(s),localStorage.setItem("sessionId",s))},[]),o.useEffect(()=>{const s=()=>{const a=I.canvas.selected_nodes;if(Object.keys(a??{}).length){const d=Object.values(a)[0];c(d)}else c(null)};return document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}},[]),o.useEffect(()=>{const s=a=>{document.documentElement.style.setProperty("--mouse-x",`${a.clientX}px`),document.documentElement.style.setProperty("--mouse-y",`${a.clientY}px`)};return document.addEventListener("mousemove",s),()=>{document.removeEventListener("mousemove",s)}},[]);const H=s=>{n(s.target.value)},B=async()=>{if(i.trim()===""&&!l||!_)return;j(!0),v(i);const s=S(),a={id:S(),role:"user",content:i,trace_id:s};g(d=>[...d,a]),n("");try{const d={type:"model_select",data:[N]};for await(const k of T.streamInvokeServer(_,i,m.map(y=>y.file),null,d,s)){const y={id:S(),role:"ai",content:JSON.stringify(k),type:k.type,format:k.format,finished:k.finished,name:"Assistant"};g(D=>D[D.length-1].role==="ai"?[...D.slice(0,-1),y]:[...D,y]),k.finished&&j(!1)}}catch(d){console.error("Error sending message:",d),j(!1)}finally{w([])}},J=s=>{s.metaKey&&s.key==="Enter"&&B()},X=()=>{g([]),localStorage.removeItem("sessionId");const s=S();E(s),localStorage.setItem("sessionId",s)},Z=s=>{n(s)},V=async(s,a)=>{if(!_||!l)return;j(!0);const d=S(),k={id:S(),role:"user",content:l.comfyClass||l.type,trace_id:d};g(y=>[...y,k]);try{for await(const y of T.streamInvokeServer(_,l.comfyClass||l.type,[],s,a,d)){const D={id:S(),role:"ai",content:JSON.stringify(y),format:y.format,finished:y.finished,name:"Assistant"};g(P=>P[P.length-1].role==="ai"?[...P.slice(0,-1),D]:[...P,D]),y.finished&&j(!1)}}catch(y){console.error("Error sending message:",y),j(!1)}},q=s=>{console.log("[WorkflowChat] Adding new message:",s),g(a=>{const d=[...a,s];return console.log("[WorkflowChat] Updated messages:",d),d})},Y=s=>{M(!0),s.preventDefault()};o.useEffect(()=>{const s=d=>{if(!A)return;const k=window.innerWidth-d.clientX,y=Math.min(Math.max(300,k),window.innerWidth*.8);W(y)},a=()=>{M(!1)};return A&&(document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)),()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",a)}},[A]);const Q=s=>{const a=Array.from(s).map(d=>({id:Math.random().toString(36).substr(2,9),file:d,preview:URL.createObjectURL(d)}));w(d=>[...d,...a])},ee=s=>{w(a=>a.filter(k=>k.id!==s))};return F.useEffect(()=>()=>{m.forEach(s=>URL.revokeObjectURL(s.preview))},[m]),o.useEffect(()=>{h&&u&&(V("node_explain"),u())},[h]),e.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:p?"block":"none",width:`${O}px`},children:[e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 cursor-ew-resize hover:bg-gray-300 active:bg-gray-400",onMouseDown:Y}),e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx(he,{onClose:t,onClear:X,hasMessages:f.length>0}),e.jsx("div",{children:x.map(s=>e.jsx("div",{children:s.name},s.name))}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4 scroll-smooth",ref:r,children:e.jsx(ke,{messages:f,latestInput:b,onOptionClick:Z,installedNodes:x,onAddMessage:q,loading:C})}),e.jsxs("div",{className:"border-t px-4 py-3 border-gray-200 bg-white sticky bottom-0",children:[l&&e.jsx(ge,{nodeInfo:l,onSendWithIntent:V,loading:C}),e.jsx(pe,{input:i,loading:C,onChange:H,onSend:B,onKeyPress:J,onUploadImages:Q,uploadedImages:m,onRemoveImage:ee,selectedModel:N,onModelChange:z})]})]})]})}export{De as default}; diff --git a/ui/package-lock.json b/ui/package-lock.json index 172622e..422f21f 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -8,6 +8,7 @@ "name": "comfyui-workspace-manager", "version": "0.0.0", "dependencies": { + "@heroicons/react": "^2.2.0", "@tabler/icons-react": "^2.42.0", "dexie": "^3.2.4", "dexie-react-hooks": "^1.1.7", @@ -899,6 +900,14 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@heroicons/react": { + "version": "2.2.0", + "resolved": "https://registry.npmmirror.com/@heroicons/react/-/react-2.2.0.tgz", + "integrity": "sha512-LMcepvRaS9LYHJGsF0zzmgKCUim/X3N/DQKc4jepAXJ7l8QxJ1PmxJzqplF2Z3FE4PqBAIGyJAQ/w4B5dsqbtQ==", + "peerDependencies": { + "react": ">= 16 || ^19.0.0-rc" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.13", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", @@ -6903,6 +6912,12 @@ "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", "dev": true }, + "@heroicons/react": { + "version": "2.2.0", + "resolved": "https://registry.npmmirror.com/@heroicons/react/-/react-2.2.0.tgz", + "integrity": "sha512-LMcepvRaS9LYHJGsF0zzmgKCUim/X3N/DQKc4jepAXJ7l8QxJ1PmxJzqplF2Z3FE4PqBAIGyJAQ/w4B5dsqbtQ==", + "requires": {} + }, "@humanwhocodes/config-array": { "version": "0.11.13", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", diff --git a/ui/package.json b/ui/package.json index 7bbdfc2..75c2972 100644 --- a/ui/package.json +++ b/ui/package.json @@ -13,6 +13,7 @@ "build:prod": "VITE_API_BASE_URL=https://comfyui-copilot-server.onrender.com vite build && node scripts/post-build.js" }, "dependencies": { + "@heroicons/react": "^2.2.0", "@tabler/icons-react": "^2.42.0", "dexie": "^3.2.4", "dexie-react-hooks": "^1.1.7", diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 0d54141..19fe6ca 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -5,7 +5,9 @@ import React, { useRef, useState, useEffect } from "react"; import { DRAWER_Z_INDEX } from "./const"; import { COPILOT_EVENTS } from "./constants/events"; import logoImage from '../../assets/logo.png'; -const WorkflowChat = React.lazy(() => import("./workflowChat/workflowChat")); +const WorkflowChat = React.lazy(() => import("./workflowChat/workflowChat").then(module => ({ + default: module.default +}))); export default function App() { const workspaceContainerRef = useRef(null); @@ -95,15 +97,18 @@ export default function App() { /> ComfyUI-Copilot - { - setShowChat(false); - setShouldTriggerUsage(false); - }} - visible={showChat} - triggerUsage={shouldTriggerUsage} - onUsageTriggered={() => setShouldTriggerUsage(false)} - /> + + Loading...}> + { + setShowChat(false); + setShouldTriggerUsage(false); + }} + visible={showChat} + triggerUsage={shouldTriggerUsage} + onUsageTriggered={() => setShouldTriggerUsage(false)} + /> + ); diff --git a/ui/src/apis/workflowChatApi.ts b/ui/src/apis/workflowChatApi.ts index ca6e787..0553f26 100644 --- a/ui/src/apis/workflowChatApi.ts +++ b/ui/src/apis/workflowChatApi.ts @@ -24,7 +24,8 @@ export namespace WorkflowChatAPI { prompt: string, images: File[] = [], intent: string | null = null, - ext: any | null = null + ext: any | null = null, + trace_id?: string ): AsyncGenerator { try { const apiKey = getApiKey(); @@ -59,7 +60,7 @@ export namespace WorkflowChatAPI { 'accept': 'application/json', 'Access-Control-Allow-Origin': '*', 'Authorization': `Bearer ${apiKey}`, - 'trace-id': generateUUID(), + 'trace-id': trace_id || generateUUID(), }, body: JSON.stringify({ session_id: sessionId, diff --git a/ui/src/components/chat/ChatInput.tsx b/ui/src/components/chat/ChatInput.tsx index a8b8175..2a3307e 100644 --- a/ui/src/components/chat/ChatInput.tsx +++ b/ui/src/components/chat/ChatInput.tsx @@ -128,8 +128,9 @@ export function ChatInput({ focus:border-transparent hover:bg-gray-50 transition-colors border-0" > - + + diff --git a/ui/src/components/chat/MessageList.tsx b/ui/src/components/chat/MessageList.tsx index ce42f9f..5ce5d67 100644 --- a/ui/src/components/chat/MessageList.tsx +++ b/ui/src/components/chat/MessageList.tsx @@ -13,6 +13,7 @@ import { LoadingMessage } from "./messages/LoadingMessage"; import { generateUUID } from "../../utils/uuid"; import { app } from "../../utils/comfyapp"; import { addNodeOnGraph } from "../../utils/graphUtils"; +import React, { lazy } from "react"; interface MessageListProps { messages: Message[]; @@ -27,12 +28,25 @@ const getAvatar = (name?: string) => { return `https://ui-avatars.com/api/?name=${name || 'User'}&background=random`; }; +// 使用动态导入替换直接导入 +// const AIMessage = lazy(() => import('./messages/AIMessage').then(m => ({ default: m.AIMessage }))); +// const UserMessage = lazy(() => import('./messages/UserMessage').then(m => ({ default: m.UserMessage }))); +const WorkflowOption = lazy(() => import('./messages/WorkflowOption').then(m => ({ default: m.WorkflowOption }))); +const NodeSearch = lazy(() => import('./messages/NodeSearch').then(m => ({ default: m.NodeSearch }))); +const NodeRecommend = lazy(() => import('./messages/NodeRecommend').then(m => ({ default: m.NodeRecommend }))); +const DownstreamSubgraphs = lazy(() => import('./messages/DownstreamSubgraphs').then(m => ({ default: m.DownstreamSubgraphs }))); +const NodeInstallGuide = lazy(() => import('./messages/NodeInstallGuide').then(m => ({ default: m.NodeInstallGuide }))); + export function MessageList({ messages, latestInput, onOptionClick, installedNodes, onAddMessage, loading }: MessageListProps) { -const renderMessage = (message: Message) => { + const renderMessage = (message: Message) => { console.log('[MessageList] Rendering message:', message); if (message.role === 'user') { - return ; + return ; } if (message.role === 'ai' || message.role === 'tool') { diff --git a/ui/src/components/chat/SelectedNodeInfo.tsx b/ui/src/components/chat/SelectedNodeInfo.tsx index c56a0ac..3ca6319 100644 --- a/ui/src/components/chat/SelectedNodeInfo.tsx +++ b/ui/src/components/chat/SelectedNodeInfo.tsx @@ -1,3 +1,11 @@ +/* + * @Author: 晴知 qingli.hql@alibaba-inc.com + * @Date: 2025-02-17 20:53:45 + * @LastEditors: 晴知 qingli.hql@alibaba-inc.com + * @LastEditTime: 2025-02-20 18:11:08 + * @FilePath: /comfyui_copilot/ui/src/components/chat/SelectedNodeInfo.tsx + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ // Copyright (C) 2025 AIDC-AI // Licensed under the MIT License. diff --git a/ui/src/components/chat/messages/NodeInstallGuide.tsx b/ui/src/components/chat/messages/NodeInstallGuide.tsx index 316e333..a384916 100644 --- a/ui/src/components/chat/messages/NodeInstallGuide.tsx +++ b/ui/src/components/chat/messages/NodeInstallGuide.tsx @@ -2,7 +2,7 @@ * @Author: 晴知 qingli.hql@alibaba-inc.com * @Date: 2024-12-26 17:16:51 * @LastEditors: 晴知 qingli.hql@alibaba-inc.com - * @LastEditTime: 2025-02-13 21:02:17 + * @LastEditTime: 2025-02-21 13:14:49 * @FilePath: /comfyui_copilot/ui/src/components/chat/messages/NodeInstallGuide.tsx * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ diff --git a/ui/src/components/chat/messages/UserMessage.tsx b/ui/src/components/chat/messages/UserMessage.tsx index 8784bb7..624b3aa 100644 --- a/ui/src/components/chat/messages/UserMessage.tsx +++ b/ui/src/components/chat/messages/UserMessage.tsx @@ -2,16 +2,47 @@ // Licensed under the MIT License. import { BaseMessage } from './BaseMessage'; +import { InformationCircleIcon } from '@heroicons/react/24/outline'; +import { useState } from 'react'; interface UserMessageProps { content: string; + trace_id?: string; } -export function UserMessage({ content }: UserMessageProps) { +export function UserMessage({ content, trace_id }: UserMessageProps) { + const [showTooltip, setShowTooltip] = useState(false); + const [copied, setCopied] = useState(false); + + const handleCopyTraceId = async () => { + if (trace_id) { + await navigator.clipboard.writeText(trace_id); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + } + }; + return ( -
+

{content}

+ {trace_id && ( +
setShowTooltip(true)} + onMouseLeave={() => setShowTooltip(false)} + onClick={handleCopyTraceId} + > + + + {/* Tooltip */} + {showTooltip && ( +
+ {copied ? 'Copied!' : `Copy trace ID`} +
+ )} +
+ )}
); diff --git a/ui/src/components/markdown/markdownComponents.ts b/ui/src/components/markdown/markdownComponents.ts new file mode 100644 index 0000000..11c8790 --- /dev/null +++ b/ui/src/components/markdown/markdownComponents.ts @@ -0,0 +1,17 @@ +export const markdownComponents = { + p: ({ children }) => { + return

{children}

+ }, + h1: ({ children }) => { + return

{children}

+ }, + // ... 其他组件配置 +}; + +export const markdownPlugins = { + rehypePlugins: [ + [rehypeExternalLinks, { target: '_blank' }], + rehypeKatex + ], + remarkPlugins: [remarkGfm, remarkMath] +}; \ No newline at end of file diff --git a/ui/src/types/types.ts b/ui/src/types/types.ts index e3eb0bf..b0388c1 100644 --- a/ui/src/types/types.ts +++ b/ui/src/types/types.ts @@ -78,12 +78,14 @@ export interface ChatResponse { export interface Message { id: string; + role: string; content: string; - role: 'user' | 'ai' | 'tool'; name?: string; - type?: string; format?: string; finished?: boolean; + type?: string; + metadata?: any; + trace_id?: string; } export interface ToolCall { diff --git a/ui/src/workflowChat/workflowChat.tsx b/ui/src/workflowChat/workflowChat.tsx index 418681e..34975c2 100644 --- a/ui/src/workflowChat/workflowChat.tsx +++ b/ui/src/workflowChat/workflowChat.tsx @@ -33,7 +33,7 @@ export default function WorkflowChat({ onClose, visible = true, triggerUsage = f const [width, setWidth] = useState(window.innerWidth / 3); const [isResizing, setIsResizing] = useState(false); const [uploadedImages, setUploadedImages] = useState([]); - const [selectedModel, setSelectedModel] = useState("gpt-4o"); + const [selectedModel, setSelectedModel] = useState("gpt-4o-mini"); useEffect(() => { if (messageDivRef.current) { @@ -114,11 +114,14 @@ export default function WorkflowChat({ onClose, visible = true, triggerUsage = f if ((input.trim() === "" && !selectedNodeInfo) || !sessionId) return; setLoading(true); setLatestInput(input); + + const traceId = generateUUID(); // Generate trace_id for this request const userMessage: Message = { id: generateUUID(), role: "user", content: input, + trace_id: traceId, // Add trace_id to user message }; setMessages(prev => [...prev, userMessage]); @@ -133,7 +136,8 @@ export default function WorkflowChat({ onClose, visible = true, triggerUsage = f input, uploadedImages.map(img => img.file), null, // intent - modelExt // ext + modelExt, // ext + traceId // Pass trace_id to API call )) { const aiMessage: Message = { id: generateUUID(), @@ -195,16 +199,26 @@ export default function WorkflowChat({ onClose, visible = true, triggerUsage = f if (!sessionId || !selectedNodeInfo) return; setLoading(true); + const traceId = generateUUID(); // Generate trace_id for this request + const userMessage: Message = { id: generateUUID(), role: "user", content: selectedNodeInfo.comfyClass || selectedNodeInfo.type, + trace_id: traceId, // Add trace_id to user message }; setMessages(prev => [...prev, userMessage]); try { - for await (const response of WorkflowChatAPI.streamInvokeServer(sessionId, selectedNodeInfo.comfyClass || selectedNodeInfo.type, [], intent, ext)) { + for await (const response of WorkflowChatAPI.streamInvokeServer( + sessionId, + selectedNodeInfo.comfyClass || selectedNodeInfo.type, + [], + intent, + ext, + traceId // Pass trace_id to API call + )) { const aiMessage: Message = { id: generateUUID(), role: "ai", diff --git a/ui/vite.config.ts b/ui/vite.config.ts index 7494b8c..92087b8 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -1,6 +1,15 @@ +/* + * @Author: 晴知 qingli.hql@alibaba-inc.com + * @Date: 2024-12-10 22:11:57 + * @LastEditors: 晴知 qingli.hql@alibaba-inc.com + * @LastEditTime: 2025-02-21 11:50:22 + * @FilePath: /comfyui_copilot/ui/vite.config.ts + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import { exec } from 'child_process'; +import path from 'path'; const rewriteImportPlugin = ({ isDev }) => { return { @@ -72,8 +81,42 @@ export default defineConfig(({ mode }) => ({ entryFileNames: "copilot_web/[name].js", chunkFileNames: `copilot_web/[name]-[hash].js`, assetFileNames: `copilot_web/assets/[name]-[hash].[ext]`, + manualChunks: { + // 只包含实际使用的 React 相关依赖 + 'vendor-react': ['react', 'react-dom'], + + // Markdown 相关依赖 + 'vendor-markdown': [ + 'react-markdown', + 'remark-gfm', + 'remark-math', + 'rehype-katex', + 'rehype-external-links' + ], + + // UI 组件 + 'vendor-ui': [ + '@heroicons/react', + '@tabler/icons-react' + ], + + // 消息组件 + 'message-components': [ + './src/components/chat/messages/AIMessage', + './src/components/chat/messages/UserMessage', + './src/components/chat/messages/NodeInstallGuide', + './src/components/chat/messages/NodeSearch', + './src/components/chat/messages/NodeRecommend', + './src/components/chat/messages/DownstreamSubgraphs', + ], + } }, }, + // Enable compression + target: 'esnext', + minify: 'esbuild', + cssMinify: true, + chunkSizeWarningLimit: 600 // 适当调整警告阈值 }, plugins: [react(), rewriteImportPlugin({ isDev: mode === "development" })], }));